name stringlengths 5 6 | title stringlengths 8 144 | abstract stringlengths 0 2.68k | fulltext stringlengths 1.78k 95k | keywords stringlengths 22 532 |
|---|---|---|---|---|
592966 | Continuous Data Block Placement in and Elevation from Tertiary Storage in Hierarchical Storage Servers. | Given the cost of memories and the very large storage and bandwidth requirements of large-scale multimedia databases, hierarchical storage servers (which consist of disk-based secondary storage and tape-library-based tertiary storage) are becoming increasingly popular. Such server applications rely upon tape libraries to store all media, exploiting their excellent storage capacity and cost per MB characteristics. They also rely upon disk arrays, exploiting their high bandwidth, to satisfy a very large number of requests. Given typical access patterns and server configurations, the tape drives are fully utilized uploading data for requests that fall through to the tertiary level. Such upload operations consume significant secondary storage device and bus bandwidth. In addition, with present technology (and trends) the disk array can serve fewer requests to continuous objects than it can store, mainly due to IO and/or backplane bus bandwidth limitations. In this work we address comprehensively the performance of these hierarchical, continuous-media, storage servers by looking at all three main system resources: the tape drive bandwidth, the secondary-storage bandwidth, and the host's RAM. We provide techniques which, while fully utilizing the tape drive bandwidth (an expensive resource) they introduce bandwidth savings, which allow the secondary storage devices to serve more requests and do so without increasing demands for the host's RAM space. Specifically, we consider the issue of elevating continuous data from its permanent place in tertiary for display purposes. We develop algorithms for sharing the responsibility for the playback between the secondary and tertiary devices and for placing the blocks of continuous objects on tapes, and show how they achieve the above goals. We study these issues for different commercial tape library products with different bandwidth and tape capacity and in environments with and without the multiplexing of tape libraries. | Introduction
Future multimedia information systems are likely to contain large collections
of delay sensitive data objects (e.g. audio and video) with various lengths and
requirements. Some of the main data characteristics which
present serious challenges when building multimedia servers are: their large size,
the delay-sensitivity of their data, and their high display bandwidth requirements.
Multimedia objects can be very large in size: As one example, 100 minutes of
MPEG-2 video may require up to 6 GB of storage. Thus, the storage requirements
of future continuous media servers for many different applications will easily
exceed several terabytes.
The cost of memory strongly depends on the type of memory being em-
ployed. Currently, for RAM memory the cost is about $1.0 per MB; for individual
magnetic disk storage, the cost is about $0.1 per MB (see for ex-
ample, the cost of high performance disk drives, such as the Quantum Atlas
(http://www.quantum.com)and the Seagate Cheetah (http://www.seagate.com)).
When a large number of disk drives are grouped using disk array technology
to store large amounts of data, the cost for disk storage becomes greater than
$0.3 per MB (see for example Maximum Strategy's Gen-5 disk array product
(http://www.maxstrat.com)). For magnetic tape storage the cost is less $0.004
per MB. For higher-end tape libraries, the tape storage cost per MB ranges from
per MB (e.g., for the high-performance Ampex DST812 library with 50GB
tapes (http//www.ampex.com/html)) to significantly lower figures for 330GB
tapes.
These "capital" costs for different types of memories should also include
an organization's costs for managing their storage systems, which can be quite
significant: for disk storage it is reported to be $7 per MB; for tape library
storage, due to its automated functions, this cost is minimal [Sim97].
As an indication, in absolute dollar costs, a company's capital investment
for the storage required for a full-fledged video server (which for a few thousand
videos is currently around 12TB) would be around $400,000 if a high-performance
tape library is chosen (such as the 12.8TB Ampex DST812 library with four drives
and 256 50GB tapes) or more than $4,000,000 for eight Gen-5 disk arrays (each
storing about 1.7TB). Given that small and mid-sized companies are reported
to be willing to spend annually less than $50,000 and $120,000 for mass storage,
respectively the above cost difference ensures a dominant place in the market
for tape libraries. In fact, the annual tape library market has been reported as
growing at a pace of 34%, with some submarkets growing with a pace around
50% [Sim97].
Thus, tape library storage is very attractive when storage cost is of primary
concern. On the other hand, the access speeds of memory units point to a different
direction. Tertiary storage is characterized by very slow access times, in the order
of tens of seconds (or up to minutes in lower-end products) for magnetic tape
libraries. Magnetic disks have access times in the order of tens of milliseconds,
whereas RAM memories' access times are in the order of tens of nanoseconds.
The above are strong arguments for employing a hierarchy of memory tech-
nologies, forming a Hierarchical Storage Management System (HSMS), including
RAM-based Primary Storage (PS), magnetic disk-array-based Secondary Storage
(SS), and tape-based Tertiary Storage (TS). A key idea in a HSMS is to store
all objects in the inexpensive TS, from where they will be elevated to the SS
and PS levels before being accessed. This solves the problems owing to the large
storage space requirements of continuous media servers and the costs of memory
units. A complementary idea is to use the higher levels as a cache for the levels
below; all objects will reside permanently on TS, while popular objects, for ex-
ample, will reside for long periods of time in SS and portions of them will reside
for long periods of time in PS. This idea addresses the problems owing to the
memories' access times, and to the delay-sensitivity and high display bandwidth
requirements of many continuous objects.
Given the reported market growth, tape libraries are becoming increasingly
popular for the low level of such a HSMS. In fact, with respect to continuous
media applications, several companies have developed video storage solutions
based on tape libraries for applications such as broadcasting [Hen97]. In
most envisaged solutions, tape libraries are occupying the lowest level of the
hierarchy, are used mainly for storing the vast amounts of data, exploiting their
excellent cost per MB characteristics, while disk arrays are used for their high
bandwidth in order to serve as many requests as possible. At the same time,
colder (hoter) data objects migrate from disks (tapes) to tapes (disks). With this
in mind, this paper addresses how to cleverly exploit the bandwidth offered by
Table
Storage and display parameters
explanation typical values
bD display bandwidth (consumption rate)
of blocks in an object varies; user-defined
s block size varies; user-defined
d "time display time for 1 block varies; depends on s
bT tape drive bandwidth 0.5 - 20 MB/sec
- # of tape drives 1 - 64
e robot exchange time 6 - ?40 sec
c switch search
- # of tape cartridges
r bT =bD 0.5 - 50
of jobs multiplexed varies
t # of blocks in a "time slice" (in multiplexing) varies
modern tape drives employed in such HSMSs for continuous media applications,
so to help increase the overall system's performance.
1.1. Hierarchical Storage Management Systems
We will now discuss HSMSs in some detail, paying attention to their specifications
and functionality in order to gain the relevant insights and put the
contributions of this work in context. A summary of the HSMS's relevant parameters
and some typical values is given in Table 1.
An appropriate candidate for SS appears to be arrays of magnetic disks
[PGK88]. Given the high bandwidth requirements of many multimedia objects
and the typical, relatively low, effective bandwidth of magnetic disks
(nominal bandwidths are in the range of 4-15 MB/sec), striping techniques
[SGM86,BMGJ94,TF98] are likely to prove beneficial, since, when striping objects
across several disks, the effective SS bandwidth for these objects is several
tape- / CDROM- based
elevate
Primary Storage (PS)
Secondary Storage (SS)
disk-based
Tertiary Storage (TS)
Figure
1. Conceptual model of a Hierarchical Storage Management System (HSMS)
times that of a single disk. Currently, average seek and rotational delays are
approximately 8-10 and 3-5 msec, respectively.
With respect to TS, technological developments have led to the emergence of
robot-based magnetic-tape libraries, making them the best candidate for the TS
devices, given their desirable cost per megabyte figures. Tape libraries consist
of a series of shelves (storing a number of tape cartridges), a number of tape
drives onto which the tapes must be loaded before their objects can be accessed,
and a number of robot arms (usually 1) which are responsible for loading and
unloading the tapes to and from the drives. Despite TS's high data transfer rates
(see
Table
these devices remain comparatively slower than magnetic disks due
to the high exchange costs (unload a tape, put it on the shelf, get another tape,
load it) and to the cost of searching within a tape (proceeding at a maximum
pace of less than 1.6 GB/sec).
The conceptual model of a HSMS is illustrated in Figure 1. The conceptual
model shows the three levels of the HSMS. Data is elevated one level at a time.
In the rest of this paper, the term "elevate" has been reserved for "elevate from
TS to SS".
Figure
2 illustrates the physical architectural view of the HSMS. The key
feature that must be noted here is that PS serves as an intermediate staging
area between the TS and the SS device and that an object is not required to be
SS-resident in order to be displayed; it can also be displayed from TS.
Display
consume
upload
Tape Controller
disk array
Secondary Storage (SS)
robotic tape library
Tertiary Storage (TS)
Disk Controller
Primary Storage (PS)
retrieve
flush
Figure
2. Physical model of a Hierarchical Storage Management System (HSMS)
1.2. Related Work, Motivations, and the Problem
1.2.1. The Big Picture
There is great consensus that the I/O subsystem of a computer system
has become the performance bottleneck [PGK88,Pat93]. This observation is the
motivation for a large body of research in the area of storage servers, aiming to
increase the available SS bandwidth in the system. One thread of this research
led to the development of disk arrays [PGK88] and to the development of new
methods for placing data objects on disk arrays, which attempt to exploit their
inherent potential for high performance and reliability [SGM86,PGK88,CP90,
Gea94], mainly through data placement techniques, such as striping. Multimedia
data, such as video and audio, require very large storage capacities and very
large I/O bandwidths, making disk arrays the natural choice for the SS medium.
Researchers in multimedia and video storage servers then started paying attention
to the placement of multimedia data on SS devices in such a way so to increase
the system's performance by effectively utilizing the available SS bandwidth of
the system [RV93,LS93,GR,Tea93,BMGJ94,KK95,
ORS96,TF98].
Another thread concentrated on developing techniques to reduce the number
of required secondary storage I/O's by exploiting main-memory buffer caches and
the characteristics of several emerging applications (such as video on demand
servers). Through buffer and data sharing techniques, such as batching, bridging,
and adaptive piggybacking, and prefetching into smart-disk caches this research
attained a reduction in the required number of SS I/O streams required to support
video object requests [KRT94,RZ95,GLM96,DS94,Dan95,ASS96,TH99].
Thus, so far related research has concentrated on techniques for cleverly
exploiting the PS and SS resources of the system in order to increase its perfor-
mance. With respect to tertiary storage, there have been efforts at modelling
the performance characteristics of individual tape drives and robotic tape libraries
[HS96b,HS96a,JM98a,JM98b] and [Joh96,JM98a,JM98b] respectively, to
predict future references and prefetch documents in the SS [KW98] for digital
library applications, to derive intelligent placement strategies of data in the library
[CTZ97], as well as efforts to derive intelligent scheduling algorithms for
multiplexed video streams over tape drives [KMP90,LLW95]. As mentioned in
the introduction, disk-based storage is viewed as presently too costly to store the
thousands of video objects in a full-fledged video server, and thus TS is employed
for storage augmentation purposes.
A continuous object can be played either from TS or from SS [Che94,
KDST95,GR98,Che98]. One may Play from TS an object by issuing upload
requests to TS. The uploaded blocks of the object are placed into PS buffers,
from where they are subsequently consumed: 1 either they are transmitted over
a network to a remote client, or they are displayed to a local client. However,
note that the bandwidth of TS tape drives is typically significantly greater than
the display bandwidth of objects. Thus, playing objects directly from TS can
in general create serious PS buffer space problems. As a result, a much more
preferable choice is to first elevate the object from TS to SS (that is, physically
upload it from TS to PS, and then flush it from PS to SS), and subsequently
Play from SS the object, by issuing retrieval requests to SS for the blocks to
be displayed [GS94,KDST95]. Furthermore, given that very few users (if any)
would tolerate high response times, the playback process must be started immediately
after enough data has been elevated to SS; hence, typically, the retrieval
1 The terms "consume", "display", "playback" and "play" will be used interchangeably in this
paper.
operations executing on behalf of the playback process are executed in parallel
with the elevate operations which move the future blocks of the object to SS
[GDS95]. Let us refer to the above procedure (i.e., elevate from TS to SS, and
simultaneously play from SS), which represents the research state of the art, (for
displaying continuous objects residing in TS) as the Conventional Play method.
1.2.2. The Problem
This paper assumes the above framework of a continuous media server based
on a hierarchical storage manager. The research reported here first addresses the
important problem of continuous data elevation, from its permanent place in TS
to the higher levels [CT95]. In particular, we concentrate on on-demand elevation
(i.e., elevation occurs when a display request for the object arrives). On-demand
elevation is a non-trivial problem since it must deal with the bandwidth mismatch
problem: firstly, the display bandwidth requirements of objects are different from
the bandwidths of TS and SS devices; and secondly, the sustained (available,
effective) TS bandwidth vary with time, depending on the requirements of the
current workload (e.g., whenever multiplexing is employed).
An Example System Configuration and Problem Setup
Let us consider an example HSMS system configuration which can be employed
for a media server for movie-viewing, tele-teaching, digital libraries, and
other video-based multimedia applications. At the lower level there is a high
performance tape library (based on the Ampex DST812 tape library) with 12.8
of storage, with four drives and 256 50GB tapes, costing about $400,000.
The SS level, acts as a cache, and is a high performance disk array (based on
Maximum Strategy's Gen-5 array) consisting of 95 magnetic disks, each storing
totaling about 10% of the tertiary storage, and costing about $500,000 (or
125% of the tertiary cost).
Considering 90 minute MPEG-2 videos that require about 3GB of storage,
about 6 videos can fit in a disk. Thus, the SS level can store 570 videos in total.
Assuming for simplicity 500KB video disk blocks, each with a display time of
one second, with present technology each disk drive of the array, in isolation,
can support the uninterrupted display of about 16 videos (e.g., with 12MB/s
transfer rate, 8ms average seek cost, 4 ms average rotational delay, and 1 ms
track/cylinder switch cost). However, due to the bandwidth limitations in the
front-end and back-end I/O buses, the combined data transfer rate of the array
is about 250MB/sec, or about 20 times that of a single member drive. Thus,
although the whole SS can store 570 videos, it can support the playback of about
(20 \Theta 16 =) 320 video requests.
Assuming a real-world system, with several hundred video requests in the
system at any time, and a Zipf access-request distribution to videos, a few (e.g.,
the 10-15) most popular videos will be receiving more than 70% of all requests.
Thus it is important to create copies of the most popular videos and employ
a clever video placement of the copies to the SS disks, so their load can be
balanced and serve as many video requests as possible. Given that considerable
SS bandwidth is (in addition to sustaining the playback of the SS-resident videos)
required for elevating colder video blocks from TS to SS, it is easy to see that
all of the system's SS I/O bandwidth can be consumed. In fact, please note that
products for servers supporting large numbers of disks are currently constrained
by backplane bus limitations, which is many times smaller the combined raw
disk bandwidth [www98,www97]. This fact has been recognized by many storage
system researchers [RGF98,KP98] and is a key problem on which they focus.
In this framework, and using the Conventional Play method, the TS is used
for storage augmentation purposes, simply to store the large number of colder
videos and elevate them to SS when a request for them arrives. Since typically
the TS bandwidth is sufficient to support only few requests that fall through to
the TS level [Che98] the TS drives will be fully utilized elevating colder video
data to SS. The SS I/O bandwidth (including the backplane bus bandwidth)
is also fully utilized supporting retrieval requests for video blocks and elevation
requests for TS blocks. As mentioned, even without the bandwidth consumed by
the data elevation from TS, the SS stores many more videos than it can support.
When SS bandwidth is consumed by the need to elevate colder videos from the
TS, the available SS bandwidth decreases significantly.
The key goal of this work is to develop techniques which cleverly exploit the
bandwidth of the tape drives during elevation so to save IO bandwidth. This
saved bandwidth can allow the SS to serve additional requests for some of the
other videos it stores and thus improve the overall system performance. This is
not an easy task because, despite the high transfer rates of modern tape drives,
the average access cost in tape libraries remains very high (currently, about three
orders of magnitude higher) due to the high costs for robotic movements and
head positioning delays.
Thus, we focus on requests for delay-sensitive data elevation from TS to
higher levels, with the goals of achieving IO bandwidth savings and, in addition,
hiccup-free displays of video streams, and low start-up latencies. The saved IO
bandwidth can be used to accept and serve additional requests for SS-resident
data. At the same time, we handle the bandwidth mismatch problem during data
elevation, in a manner that allows the above savings in IO bandwidth while not
requiring any extra PS buffer space.
The remainder of the paper is structured as follows. In Section 2 we will
present "Alternate Play", a novel algorithm for on-demand data elevation through
the levels of the hierarchy and we will discuss its benefits with respect to IO
bandwidth savings and its compromises with respect to PS buffer space. In
Section 3, we contribute a set of novel techniques which place the blocks of
video objects on the tertiary storage media in a manner which alleviates the
need for extra PS buffer space and companion play algorithms which achieve the
same SS bandwidth savings as the Alternate Play algorithm. Subsequently, we
contribute the notion of strips of streams, the use of which makes our techniques
applicable even when the display bandwidth requirements are larger than the
available TS bandwidth (e.g., for low-end tape drives). In Section 4 we revisit
these issues, contributing algorithms and analyses for the case when the tape
library is multiplexed across streams (to avoid experiencing unacceptably-long
start-up latencies and to be able to offer the SS savings of the earlier sections to
many more video requests). In Section 5 we revisit the same issues, only now the
assumption of a fixed and known, a priori, multiprogramming degree is removed.
In Section 6 we discuss some real-world pitfalls and how our algorithms can be
used to avoid them. Finally, in Section 7 we will present the conclusions of this
work.
2. Data Elevation with Alternate Play
In this section we will present a novel elevation method, achieving IO band-width
savings (when compared with the Conventional Play). This new method
will be an integral part of many of our algorithms in the rest of this paper.
2.1. Alternate Play
The obvious advantage of the Conventional Play method is that it requires
no additional PS buffer space. 2 On the other hand, its obvious deficiency, is
that SS is additionally taxed as a result of the execution of flush and retrieval
operations, reducing thus the available IO bandwidth significantly. Since in our
target environment we expect IO bandwidth to be one of the (two) scarcest
resources, the above observation must be noted seriously. In the following, we
will present some approaches aiming to alleviate this problem.
An initial attempt to overcome the shortcomings of the Conventional Play
method centers on the following idea: uploaded blocks from TS can be maintained
in PS buffers and made available to the playback process from them. This can
save significant IO bandwidth.
Of course, blocks belonging to popular objects may still be flushed to SS, in
addition to maintaining them in PS buffers from where they will be consumed.
This alteration of the Play from TS method (i.e., Play from TS, and then flush to
SS), when compared with the Conventional Play, saves bandwidth for the current
request (since no retrievals from SS are needed). Also, future requests for the
same object will not additionally tax the TS or SS (since no uploads or flushes
for the SS-resident blocks are needed).
Despite these unquestionable benefits, there is an obvious concern regarding
the amount of PS buffer space which is needed to realize the aforementioned
bandwidth savings. For example, if 2, the PS space requirements are 50%
of the size of the entire object to be displayed (since when the last block is
uploaded, only half of the blocks will have been consumed). In general, the PS
space requirements are (r \Gamma 1)=r of the object's size. Given that PS buffer space
is another scarce system resource, care must be taken to use it wisely.
In an effort to reconcile this trade-off between the PS space requirements
and the IO bandwidth savings, we can use hybrid techniques, so that for some
blocks the Conventional Play method - essentially: Play from SS - is employed,
while for other blocks a Play from TS method is followed. We refer to the newly-
2 Throughout the paper, "PS buffer space requirements" will refer to the maximum number of
PS buffers (each holding 1 block) required at any instance during the display of an object.
The buffers holding blocks, which are currently being displayed, to be displayed during the
next time unit, or currently being elevated to SS are not counted, since in each of these cases,
using a buffer is unavoidable.
Table
Example of Alternate Play (r =2; B=13)
time (elevated) (uploaded) block
unit to SS to PS displayed
proposed method as the Alternate Play algorithm.
For the special case, an example of the Alternate Play algorithm on
a 13-block object, playing odd-numbered blocks from TS and even-numbered
blocks from SS, is shown in Table 2. Newly arriving blocks have been underlined.
The Alternate Play algorithm terminates when all blocks have been read off
the TS. The display of the requested object continues by consuming all remaining
blocks in strict alternation from PS and SS. At the end, half of the blocks will
have been played from TS and half from SS.
Two features of the above described (for the Alternate Play
algorithm must be noted. First, during its execution (i.e., during the first
l
time units of the object's display) the SS bandwidth requirements of even
time units are twice the SS bandwidth requirements of odd time units; for the
remaining
time units, the SS bandwidth requirements are equal to
those of the odd time units. Second, during the algorithm's execution, every two
time units the number of PS buffers (needed to hold the Play from TS blocks)
increases by 1; at the end of the algorithm's execution, half of the 'B=2 Play
from TS blocks will still be in PS. It thus follows that the PS space requirements
are 25% of the object's size.
2.2. Generalizing Alternate Play
2.2.1. Integer r
The r=2 Alternate Play algorithm of the last section, can be generalized to
handle arbitrary r ratios as follows: In every time unit, r blocks are read from TS.
From these r blocks, k blocks are uploaded to PS (and played from there) and
the remaining r\Gammak blocks are elevated to SS, for some (arbitrarily/appropriately
chosen) This gives us a family of Alternate Play algorithms, one
for each different value of k.
Pseudo-code for the above described Alternate Play is given as Algorithm 1.
The given algorithm uses routines to upload an indicated block to a PS buffer,
Algorithm 1 Alternate Play
INPUT: Object's blocks in TS
next upld blk
next displ blk
upload(next upld blk++)
for time unit i:= 1 to
l
r
do
parbegin
1. if 1
then Play-from-SS(next displ blk++)
else consume(next displ blk++)
2. for j:= 1 to r \Gamma k do elevate(next upld blk++)
for j:= 1 to k do upload(next upld blk++)
parend
or to elevate (i.e., upload and then flush) an indicated block to SS. The
parbegin/parend construct is intended to indicate that the display (consume
and Play-from-SS) of a block occurs in parallel with the readings (elevate and
upload) of the next two blocks from TS. The reader may verify that Table 2 is
a trace of Algorithm 1 for the r=2, k=1 case.
The obvious question now is "what is the best value of k?". To answer this
question, we will examine the impact of the choice of k on the SS bandwidth
savings and on the required PS buffer space.
For any value of k, the SS bandwidth savings are Bk=r blocks (since for k
out of every r blocks neither a flush to, nor a retrieve from, SS is required).
Also for any value of k, the PS buffer space requirements are Bk(r \Gamma 1)=r 2 .
This holds because the algorithm runs for B=r time units, during which Bk=r
Table
Example of brc Alternate Play (r =3:5; k=1; B=22)
time (elevated) (uploaded) block
unit to SS to PS displayed
blocks are uploaded to PS (k blocks per time unit) and Bk=r 2 blocks (= k=r
blocks for each of the B=r time units) have been played from TS. Therefore,
blocks are still in PS when the algorithm terminates.
We thus see that there is a trade-off between SS bandwidth savings and
required PS buffer space: the higher the # of blocks played from SS
# of blocks played from TS ratio is, the
lower the PS space requirements become, but the lower SS bandwidth savings are
achieved. The k parameter in the general algorithm acts as a "knob", fine-tuning
this trade-off.
2.2.2. Real r
The alert reader may have realized that, so far, we have made the implicit
assumption that r is an (arbitrary) integer. If r is a real number, as it will
most likely be the case in real-world situations, one may apply the above ideas,
uploading k out of every brc blocks to PS (and playing them from there). An
example is shown in Table 3. Again, newly arriving blocks have been underlined.
A block in brackets indicates that only part of the block is uploaded/elevated.
Clearly, the SS bandwidth savings of the above outlined algorithm (when
compared with the Conventional Play algorithm) are Bk= brc blocks.
The PS space requirements of the above algorithm are Bk(r \Gamma 1)=(r brc)
Bk=r. This holds because the algorithm runs for B=r time units, displaying B=r
blocks. During this time, Bk= brc blocks are uploaded to PS, and Bk=(r brc)
blocks (= k= brc blocks for eac h of the B=r time units) are played from TS.
Therefore, when the algorithm terminates, the number of blocks still in PS is
One might of course chose to upload k out of every dre blocks. Alternatively,
if PS space is very scarce, one might chose to upload sometimes k out of every
brc blocks and some other times k out of every dre blocks. This method will be
further discussed in Section 3.2.2.
3. Data Elevation without Multiplexing
The Alternate Play methods of the preceding section (some blocks are played
from TS, and some from SS) will be the starting point for the derivation of better
playing algorithms.
3.1. APWAT
As discussed earlier, the high PS buffer requirements of the Alternate Play
method are due to the long time that a PS buffer is dedicated to holding a
particular Play from TS block. Observe also that this long time is dependent on
r: if r is large, then the Play from TS blocks will occupy a PS buffer for a long
time (since they will come into a PS buffer too far ahead of their consumption
times). In trying to attain further reductions in the PS space requirements, our
key idea is that, by altering the order with which the blocks of an object are
recorded on the TS media, large values of r (i.e., bandwidth mismatches between
the TS and the display) can be accounted for in a way that reduces the occupancy
time of PS buffers by Play from TS blocks.
Algorithm 2 is a placement algorithm, which, when given as inputs B and r,
Algorithm 2 Twisted Placement (integer r)
INPUT: B, integer r
OUTPUT: r-twisted sequence of object's blocks (to be placed on TS)
for i:=0 to
l
r
randomly place blocks B d B
r
to blank tape positions
determines an r-twisted placement/sequence of an object's blocks
locations on a tape. Examples of twisted sequences are given
in
Figure
3 (the "randomly place blocks . " of Algorithm 2 is the "sequentially
(b)
(a)
Figure
3. (a) 2-twisted and (b) 4-twisted placements of a 13-block object
place blocks . " in the given examples).
One may now immediately see that a produced r-twisted sequence is such
that, for given r, when the object's blocks are read off the tape sequentially, every
r-th block (boldfaced in Figure 3) will be uploaded into PS precisely before the
time it has to be consumed. These ' B=r blocks can thus be played from TS
without any PS buffer space requirements; the remaining blocks will be elevated
to SS, and will be played from SS when needed. Algorithm 3 materializes the
above idea. The notational conventions of Algorithm 1 have been used here,
Algorithm 3 APWAT on r-twisted sequence, when system's bandwidth ratio is
r
INPUT: r-twisted placement of object's blocks in TS
next upld blk
next displ blk
upload(next upld blk++)
for time unit i:= 1 to
l
r
do
parbegin
1. consume(next displ blk++)
2. for j:=1 to r \Gamma 1 do
elevate(next upld blk++)
upload(next upld blk++)
parend
too. Note that the given Alternate Play With A Twist (APWAT) algorithm is
essentially an Alternate Play algorithm (that is, some blocks are played from TS
and some others from SS), but applied on a specific arrangement of the object's
blocks, so that boldfaced blocks are played from TS.
The APWAT algorithm terminates when all blocks have been read off the
TS. The display of the requested object continues by consuming one more block
from PS, and all remaining blocks exclusively from SS. The SS bandwidth requirements
remain constant (r \Gamma 1 blocks per time unit) throughout the algorithm's
execution; the display of the remaining blocks requires a constant bandwidth of
1 block per time unit. An example of APWAT's action on the 2-twisted sequence
of
Figure
shown in Table 4. Again, newly arriving blocks
have been underlined.
One can immediately see that the SS bandwidth savings of the APWAT
method are B=r blocks (since 1=r of the blocks are played from TS) for each
object. Clearly also, the PS buffer requirements are zero.
3.2. Generalizing APWAT
3.2.1. Disassociating integer r and twisting
Given the system parameter r, APWAT can be applied not only on the r-
twisted sequence, but also on any r
-twisted sequence, where k is a divisor of r.
In this case, APWAT will play all boldfaced blocks (of the r
-twisted sequence)
from TS. An example of APWAT's action on the 2-twisted sequence of a 13-block
object (see Figure 3(a)) when r=4 is given in Table 5. Once more, newly arrived
blocks have been underlined.
Clearly, when the system's bandwidth ratio is r, the SS bandwidth savings
of our newest APWAT algorithm applied on the r
-twisted sequence, are Bk=r
blocks, since k=r (boldfaced) of the B blocks are never flushed to or retrieved
from the SS.
The PS buffer space requirements of the new algorithm are B(k\Gamma1)=r. This
is true because the algorithm runs for B=r time units, during each of which the
number of blocks in PS is increased by k (uploaded from TS) and decreased by
Note that when space requirements are zero. Note
also that APWAT is always better than Alternate Play, in the sense that for any
attainable SS bandwidth savings, APWAT's PS requirements are less that Alternate
Play's PS requirements. This follows, since Bk(r\Gamma1)
r is equivalent to
r k, which is always true.
3.2.2. Real r
As it were the case with our Alternate Play algorithm (in Section 2.2.2),
our APWAT algorithm and its companion Twisted Placement algorithm do not
require r to be an integer. One may generate the brc-twisted sequence, and apply
APWAT on it (playing all boldfaced blocks from TS). Let's call this algorithm
the brc APWAT algorithm.
The obvious drawback of the brc APWAT algorithm is that the PS buffer
space requirements are not zero any more. Indeed, one may routinely verify that,
in the worst case, the PS buffer requirement will increase to B=(r(r \Gamma 1)). This
is so, because the APWAT algorithm runs for B=r time units, displaying B=r
blocks. During this time, B= brc blocks are uploaded to PS. Since all blocks are
played from TS, when the algorithm terminates, the number of blocks still left
in PS is B
brc
.
If PS space is scarce, an alternative to the brc APWAT is possible. The
main idea is to generate a twisted sequence such that, when it is APWAT-played,
Figure
4. 2.3-twisted sequence of a 20-block object
no boldfaced block will be ever uploaded earlier than the time it will be consumed
(actually, since r may not be an integer, a block is allowed to be uploaded earlier
than the time it will be consumed but only by a fraction of a time unit). An
example of such a twisted sequence is given in Figure 4. Pseudo-code is given
Algorithm 4. Since the distances between the boldfaced blocks of our new
Algorithm 4 Twisted Placement (for real r)
INPUT: B, real r
OUTPUT: r-twisted sequence of object's blocks (to be placed on TS)
for i:=1 to
l
r
randomly place blocks B d B
r
to blank tape positions
method are sometimes 1
brc
and sometimes 1
dre
, we will refer to this new twist and
play method as the brc&dre APWAT algorithm.
Clearly, the SS bandwidth savings of our newest brc&dre APWAT algorithm
are B=r blocks, and the PS requirements is 1 block (needed to hold parts of the
partially uploaded blocks).
3.2.3. Disassociating real r and twisting
If the system parameter is a real number r, APWAT can be applied not
only on the r-twisted sequence, but also on a r 0 -twisted sequence, for any r 0 !r.
Again, APWAT will play all boldfaced blocks (of the r 0 -twisted sequence) from
TS.
Reasoning as in Section 3.2.1, one may easily verify that the SS bandwidth
savings in this case are B=r 0 blocks, and that the PS requirements are B( 1
Table
6 summarizes the performance of all examined play algorithms.
Table
Play algorithms' performance comparison
PS SS bandwidth
requirements savings Remarks
Conventional Play 0 -
Alternate Play
r
(integer r)
r
(integer
r
r
divisor of r
(integer
r
(real
\Gammar
(real
3.3. SS-resident Objects & Strips of Streams
Although not mentioned explicitly so far, all previously described algorithms
work only if r 1. One may notice that a r !1 situation may indeed arise (e.g.,
low-end products - see Table 1). One may also immediately see that the r 1
restriction is obviously not a deficiency of our algorithms: if r!1, and an object
resides exclusively on TS, no algorithm can display it without hiccups, or without
a long response time.
If r ! 1, and the object resides in SS as well, one may use the ideas presented
in the previous sections to display the object in a manner requiring less
SS bandwidth than the obvious Play from SS algorithm, while still requiring zero
PS buffer space. To this goal, we contribute the concept of a strip of a stream.
3.3.1. Integer r
A strip of a stream is a subset of the blocks of a (stream) object. We
define a 1
r -strip (of a stream) to be the strip consisting of every 1
r -th block of
an object, except for the 1st block of the object. For example, the 2-strip is
[B3, B5, B7, B9, . ], the 3-strip is [B4, B7, B10, B13, . ], etc. We store such
a 1
r -strip (as a partial replica of the object) permanently in TS.
One may now see that a continuous uploading of TS blocks results in each
such block being brought into PS precisely before it has to be consumed. Pseudo-code
displaying an object in such a manner is given as Algorithm 5. The nota-
Algorithm 5 Strips of Stream Playing (r !1; 1
r -strip (br(B\Gamma1)c blocks) in TS
ffl (rest of) object's blocks in SS
next upld blk := first block on strip
next displ blk
upload(next upld blk++)
for time unit i:= 1 to 1
r do
Play-from-SS(next displ blk++)
while time unit i B do
parbegin
1. consume(next displ blk++)
for
Play-from-SS(next displ blk++)
2. upload(next upld blk++)
parend
tional conventions of Algorithms 1 and 3 have been used here, too. A trace of
the algorithm is given in Table 7.
Unlike all previous algorithms, the given Strips of Stream Play algorithm
terminates when all blocks have been displayed (not simply when they have been
read off the TS). Eventually, rB of the object's B blocks will have been played
from TS, and the remaining (1\Gammar)B from SS. When compared with the Conventional
Play algorith, the Strips of Stream Play algorithm achieves rB blocks SS
bandwidth savings. The PS buffer space requirement of the algorithm is zero.
Table
Example of Strips of Stream Play (B=12; r=0:5;
time uploaded block
unit from TS strip displayed
5-6 B7 B5 B6
7-8 B9 B7 B8
Table
Example of Strips of Stream Play
2:3
time uploaded block
unit from TS strip displayed
1.0-2.3 B4 B1 B2 [B3
2.3-4.6
6.9-9.2
14.8-16.1
17.1-18.4
3.3.2. Real r
Once more, the given definition of a 1
r -strip is meaningful if 1
r is an integer.
r is a arbitrary real, a 1
r -strip can be defined so that each block in the strip is
uploaded precisely before it is to be consumed.
As an example, the reader is invited to verify that if
2:3
, then the2:3 -strip of a 20-block object should be [B 4
The analogy between this 1
2:3
-strip and the boldfaced blocks of the 2.3-twisted
sequence of Figure 4 should be obvious. The Strips of Stream Play, when applied
on the above 1
2:3
-strip, will play the object as shown in Table 8. Here, notation
that 0.3 of block B 3 is displayed. Pseudo-code generating a
r -strip, for arbitrary r, is given in Algorithm 6.
Algorithm 6 1
r -strip generation (real r!1)
INPUT: B, real r!1
r -strip S[1], . , S[B]
s :=r
for i:= 1 to
l
r
4. Data Elevation With Known Multiplexing Degree
In many environments, consisting of high-end tape library products with
very large bandwidth, the tertiary storage level of a multimedia server will be
satisfying more than one requests simultaneously. In order to avoid unacceptably
high start-up latencies, it is desirable for the TS to be multiplexed. When the
bandwidth is multiplexed across several concurrent streams, the effective TS
bandwidth b T;eff and the effective ratio r eff are reduced. We will assume a Round
Robin scheduling discipline for the multiplexed requests.
A moment's thought reveals that using, say, the APWAT algorithm on the
twisted sequence for r, does not work. Consider, for example, the twisted sequence
for r =4, given in Figure 3(b). If the number of multiplexed jobs (multi-
plexing degree) is for each of the two multiplexed jobs, 3 the
APWAT algorithm, with Round Robin scheduling of a time slice equal to d, will
suffer from hiccups. For instance, while the B1's of the two objects are displayed,
APWAT will elevate/upload the next 4 blocks of the first object (which will take
time unit) and it will then switch to elevate/upload the next 4 blocks of the
second object (which will also take 1 time unit). Thus, it is apparent that the
displays will starve.
Another approach, is to use the APWAT algorithm on the twisted sequence
of
Figure
3(a), instead of Figure 3(b). For our example, the
APWAT algorithm, with Round Robin scheduling of a time slice equal to d=2,
3 For now, for readability purposes, we assume no exchange overhead.
will display both objects without hiccups. It will elevate/upload a pair of blocks
of the first object (which will take 1/2 time unit), and it will then switch to
elevate/upload a pair of blocks of the second object (which will take another 1/2
time unit). This method (playing boldfaced blocks from TS, and the rest from
SS) requires no extra PS buffers, and it achieves 50% SS bandwidth savings (since
half of the blocks are played from TS), when compared with the Conventional
Play algorithm.
A crucial factor to the last approach's success (besides the use of the twisted
sequence for r
was the fact that its time slice was the time needed to
blocks. To see why this is indeed crucial, consider, for example, the
extreme case of a time slice equal to the time needed to upload 12 blocks: the
last approach could not achieve 50% SS bandwidth savings with no extra PS
buffers (for the same sequence of r This suggests that small time slices
are better than big ones, and one should thus use time slices as small as possible.
Unfortunately, as we discussed earlier, the above approach is over-simplified,
since there is a switch cost c (which includes, possibly, a tape exchange cost, plus
a search within a tape) associated with each Round Robin's switch from one
object to another. Therefore, the just derived minimum time slice will not be
sufficient to display the objects without hiccups. Nevertheless, we are now in a
position to describe a general approach and to derive the minimum time slice.
4.1. APWAT with Round Robin
The basic idea is to split each object's blocks into groups of t blocks each
(called t-tuples, or, simply tuples), for some appropriate value of t, as follows:
the first t-tuple will contain the blocks the second t-tuple will contain
the blocks B t+1 , . , B 2t , etc. In order to process (upload, elevate, display) each
t-tuple in the most efficient way, we will use an r-twisted placement of the blocks
within each t-tuple. The desired twisting here is slightly different than the one
produced by Algorithm 2. The Twisted Placement, produced by Algorithm 2,
places the first blocks of an object in locations 1; r+1; 2r+1; 3r+1, etc. (for integer
r). The Twisted Placement that is useful in our case places the first blocks of
a tuple in locations r, 2r, 3r,. within the tuple. Such an arrangement of an
object's blocks will be called a (t; r)-organization, or simply a t-organization. An
example is shown in Figure 5.
The pseudo-code for deriving the (t; r)-organization is given in Algorithm 7.
Figure
5. (8,4)-organization of a 17-block object
The number of "full" t-tuples is
, with possibly one more t-tuple with
fewer than t blocks. Note that there are \Xi t
r
bold blocks in each t-tuple. In
general, the contents of the n-th
t-tuple is the set of blocks
which will occupy the tape positions
The first bold block in the n-th t-tuple will be B (n\Gamma1)t+2 . The i-th bold block
of a t-tuple is placed at position ir within the positions occupied by this t-tuple,
r
Algorithm 7 Twisted (t; r)-organization
INPUT: B, integer r, t
OUTPUT:(t; r)-organization
for n:=1 to
do
/* place the bold blocks in their proper position */
for i:=1 to \Xi t
r
do
randomly place un-assigned blocks of the set fB
on the blank tape positions in the set f(n \Gamma 1)t
As stated earlier, the j objects to be displayed will be multiplexed in a Round
Robin fashion: each time slice will process one t-tuple by employing the APWAT
algorithm. As an example, suppose that r=4, and consider the (8,4)-organization
of
Figure
5. While displaying B 1 of the first object, the Round Robin algorithm
will elevate [B 4 . While displaying B 2 , it will elevate
It will then start displaying B 3 , and it will
switch to a second object (processing its first 9 blocks), possibly then to a third
object (also processing its first 9 blocks), etc. During the uploads/elevations of
the blocks of the second, third, etc., objects, the display process of the first object
will finish off consuming B 3 , and it will subsequently start playing
9 from SS. To guarantee a play of all objects with no hiccups, Round
Robin should return to the first object before its display of B 9 has started.
The last remark can be used to derive a relationship between j and t. As
explained, the time required to read j t-tuples (one tuple from each object) should
be less than or equal to the time needed to display the t blocks of the tuple read
time slices earlier. Since the time needed to upload a t-tuple is ts=b T , or td=r,
and the switch cost is c, it follows that the time required to read j t-tuples is
(td=r+c)j, or (ts=b T also, the time needed to display t blocks (of
one object) is td. Thus
td
td
r
should hold. This allows us to derive the minimum allowable value of t, given the
system's characteristics c, r and d, - or equivalently (since d=r=s=b T
r, s and b T - and the number j of multiplexed jobs, as
cjr
The "j !r" condition is intuitively correct (if the number of jobs to be multiplexed
is greater than the number of blocks that can be uploaded in a time unit, then
no multiplexing is possible), and is mathematically a consequence of the "t ? 0"
condition that must hold together with (1). Note also that if (2) gives t min (j)B,
then no multiplexing is possible.
Example 1: Consider an object consisting of 12,000 blocks, each 0.5 MB,
residing on a TS having bandwidth 20 MB/sec and exchange cost 10 sec. Further-
more, assume that the time needed to display one block is 1 sec. These figures
imply that r=40.
Then, eqn. (2) says that the display of objects can be multiplexed
using APWAT with Round Robin if each object is split into at most 30 tuples of
at least 400 blocks each.
Inequality (1) may be seen under a different angle. If we assume that the
size t of each tuple has been (somehow) fixed, it gives us the maximum number
of jobs that can be multiplexed as
rtd
cr
tsr
ts
Example 2: Given the configuration described in Example 1, eqn. (3) says
that if each object is split into 30 tuples of 400 blocks each, then up to 20 such
objects can be multiplexed.
Given a system bandwidth ratio r, the APWAT algorithm using a (t; r)-
configuration, for any t, has zero PS buffer requirements, since each uploaded
(boldfaced in Figure 5) block of each of the j objects is uploaded precisely before
it is to be consumed. Clearly also, the SS bandwidth savings are B=r for each of
the j jobs yielding a total savings of jB=r blocks for all j jobs, when compared
with the Conventional Play algorithm (elevating all blocks to SS, and playing
them from there).
Note that as discussed in Section 3.2.1, given the system's ratio r, one need
not use a (t; r)-configuration; one may use instead a (t; r
k )-configuration, for any
dividing r. In such a case (see Table 6), the PS buffer requirements will be
and the SS bandwidth savings will be jBk=r blocks
for all j jobs.
Similarly, we can also handle the case where r is real. We omit the relevant
details, for space reasons, since they are very similar to the description presented
in Section 3.2.2.
4.2. Start-Up Latency Considerations
In the algorithms of Sections 2 and 3, the issue of the start-up latency was
not addressed in detail since it was not important (we were assuming only one
display request at a time: start-up latency was equal to the time needed to upload
the 1st block of the object). However, in a multiplexed environment, this issue
deserves more attention.
Assuming that all requests for the j objects arrive simultaneously, the display
of the 1st object will start with a delay of s=b T (i.e., after B 1 of the 1st
object has been uploaded), the display of the 2nd object will start with a delay
of s=b T +ts=b T +c (i.e., after the 1st t-tuple of the first object has been uploaded,
has switched to the beginning of the 2nd object, and B 1 of the 2nd object
has been uploaded), etc. Therefore, the display of the j-th object will start with
4 This is the worst case scenario, assuming that techniques such as bridging, batching, and
adaptive piggy backing are not employed.
a delay of
r
The precise effect of the choice of t now becomes more clear. Given a certain
multiplexing degree j, if one chooses t ? t min , the start-up latency will be higher
(as implied by (4)), but the TS will be idling (since when the time slice of the 1st
object arrives again, not all of its blocks, uploaded during its previous time slice,
will have been consumed), allowing it to be used for other purposes. Nonetheless,
the display of the object will be done correctly (i.e., without hiccups), the PS
space requirement will still be zero, and the total SS bandwidth savings will still
be jB=r for all j jobs. It is worth noting that, for the configuration in Example 1
20, the maximum start-up latency witnessed by a multiplexed stream
is smaller than 7 minutes. If multiplexing was not performed, to serve 20 streams
the maximum start-up latency witnessed would be over one hour and thirty eight
minutes, which is of course unacceptable for video-on-demand applications.
5. Data Elevation With Unknown Multiplexing Degree
The algorithms of the previous section (generating the (t; r)-organizations
and subsequently APWAT-playing them) work if the number j of multiplexed
jobs in known in advance. In this section, we will discuss methods of overcoming
this limitation. Assuming that r?1, if j ?r, then no multiplexing of all j display
requests is possible. We may thus assume that there is a known upper bound j M
on the maximum value of the multiplexing degree j for the system. Obviously,
In order to display j objects, for arbitrary 2 j j M , it suffices to use
the t min (j M )-organization. This is so, because, according to (2), t min (j M )
(j). The discussion now of the last paragraph of Section 4.2 implies that using
the t min (j M )-organization will work correctly, without changing the attained SS
bandwidth savings of jB=r blocks, or the required zero PS buffer space.
One drawback of the last proposal is the fact that the TS may be idling
as discussed in Section 4.2. Additionally, this proposal suffers from increased
start-up latency, as shown by (4). If startup latency is of great importance, it
can be traded-off with additional TS media storage space, as follows: Create and
store a t min (j 1 )-organization, a t min (j 2 )-organization, etc., for various values of
Each used t min (j i )-organization is a full replica of an object in TS.
Frequently, the workload can be guessed, using past experience, and this can be
used as a guide to decide which replicas to create. At run time, given the current
multiplexing degree j curr , use the smallest such t min (j i ) value which is larger than
t min (j curr ). This will result in the smallest possible start-up latency.
On the other hand, as shown by (3), selecting the smallest such t min (j i )
value (which is larger than t min (j curr )) results in a smaller value for the maximum
allowable number of multiplexed jobs. Since the total SS bandwidth savings
offered by our methods are potentially greater when the allowable multiprogramming
degree is higher, it is most beneficial from this point of view to use the t min
value for the highest possible number of multiplexed jobs. To resolve this trade-off
between start-up latencies and achievable SS bandwidth savings, we suggest
the following algorithm:
use the smallest such t min (j i ) value which is larger than t min (j curr )
ffl as more requests arrive to the TS for multiplexing, (or depart from TS service)
dynamically switch to the smallest such t min (j i ) value which is larger than
t min (j curr ) for the new value of j curr .
With this algorithm we exploit the replicas (with the different t-tuple organi-
zations) in order to dynamically adapt to the new j curr value and allow the
maximum number of requests to be multiplexed by the TS, while at the same
time enforcing the smallest possible penalty for their start-up latencies.
6. Pragmatic Concerns
In this section we focus on pragmatic concerns arising from tape technology
and MPEG-based video-server application peculiarities and which present difficulties
for the implementation of the placement strategies developed in the earlier
sections.
6.1. Streaming Mode Recording
The first concern is with regard to the fact that tape drives are usually
recorded in a streaming mode. Because of their relatively high error rates, this
means that, when errors are detected during recording, the re-write of the affected
block occurs without stopping and rewinding the tape, creating essentially a
number of "bad spots" or "holes" amidst the useful data on the tape. This of
course complicates the requirements for our twisted placements.
The proposed solution is technical. Recall from Section 3 that given the
system parameter r, our play algorithms can operate on any r 0 -twisted sequence,
for any r 0 ! r. Note that essentially the aforementioned "holes" on a tape
have the effect of reducing the transfer rate of the real/useful data. In other
words, given r and an estimation of the write-error rate of a tape drive, we can
(perhaps pessimistically, to avoid hiccups) estimate the parameter r 0 and create
the twisting sequence for r 0 . As an example, if our estimations of the
tape write-error rate lead us to r instead of using the 4-twisting sequence
shown by Figure 3(b), we can use the 2-twisting sequence of Figure 3(a). When
recorded on tape, there will be "holes" in between the blocks of this sequence so
that on average, in each time unit the tape head will have scanned as much tape
is required to hold data blocks will have been
read off the tape, one of which will be played from TS directly.
6.2. Twisting Variable Sized Blocks
Our champion application is video servers. The predominant encoding technique
for videos is MPEG. Given the well-established practice of normalizing
video block lengths with respect to the playback duration time, the recorded
MPEG video blocks necessarily become of variable size. The variability in the
block sizes, of course, complicates our twisted placements. In fact, it complicates
all video-data placement problems. For this reason most related work (placement
algorithms (and their analyses) for video data on SS) [
assume
constant block sizes, as we have done up to now.
In this section we solve this problem. We adopt the following approach.
Let us assume that b denotes the size of block
with s now denoting the average block size. Recalling that each time unit lasts
d seconds, in each time unit T \Delta d MB are read off the tape. Assuming that none
of the B blocks has a size that is greater than T \Delta d, the pseudocode for the twist
algorithm is given as Algorithm 8.
Observations
1. During each time unit, by design, one partition is read.
2. Blocks will be the Play-from-TS blocks.
Algorithm 8 Twisted Placement with Variable Block Sizes
1. Store B 1 at the beginning of the tape
2. Split the remaining movie size into partitions
Each partition has size T \Delta d MB
There will be L such partitions, where
l
\Deltad
3. Store blocks BL+1 at the right end of
partition 1, 2, ., L, respectively
4. Distribute the remaining blocks into the empty spaces of
the partitions - these will be the Play-from-SS blocks.
3. As long as each Play-from-TS block is "flushed right" in each partition, there
will be no additional PS space requirements - these blocks will arrive just in
time before their display starts.
4. Step 4 with the above requirement is NP-Complete. It can be reduced to
the well-known bin packing problem, where each partition corresponds to a
bin and we want to employ as few (bins) partitions as possible during Step
4. That is, we wish to fit the remaining Play-from-SS blocks as tightly as
possible in the partitions, so to have the Play-from-TS blocks closer to the
right end of their partitions, so to minimize the additional requirements for
PS space.
Thus, finding the solution with the minimum PS space requirements is an
NP-Complete problem. We want an approximation algorithm for Step 4 that is
computationally inexpensive and performs close to the optimal solution. A simple
algorithm that meets these demands is the Decreasing First Fit (DFF) algorithm
[GJ79]. DFF, when "translated" into our problem setting, works as follows: First
it sorts the blocks in decreasing order of their sizes. Then the blocks are placed
in this order into the first partition they fit. It can be shown [GJ79] that the
performance of DFF is never worse than 22% of the optimal solution, which in
our problem setting means that:
1. On occasion DFF will result in requiring 22% more tape storage for a video,
because of "holes" in each partition between the Play-From-SS and the Play-
3from-TS blocks. This also implies that, in the worst case, 22% more time
will be required to read the blocks of a video from the tape.
2. However, each Play-from-TS block will require zero additional PS space.
The obvious solution to the above problem is to, first, shift left each Play-
block in its partition to fill the empty space and, second, shift left
the partitions to cover the now empty spaces between the partitions. This will
eliminate all "holes" but will also result, in the worst case, in 22% additional PS
space. Thus, we need an algorithm that will strike an effective balance between
read time and PS space overhead. Pseudocode for this algorithm is given as
Algorithm 9.
The essence of the algorithm's contribution is in Step 6, which guarantees
that there will never be a requirement for additional PS space that is greater than
MB. This is achieved at the expense of having fewer Play-from-TS blocks
(i.e., lower SS bandwidth savings, since some partitions "lose" their Play-from-TS
blocks). A following example, using typical parameter values, will illustrate the
usefulness of the above algorithm.
6.3. Average I/O Bandwidth Savings of Algorithm 9
We now provide an analysis showing the average I/O bandwidth savings of
the above algorithm, in the worst case performance of the DFF algorithm.
The total empty space, in the worst case, that would result from the running
of Algorithm 8 is 22% of the total space, that is:
total s: (5)
The number of partitions is
The average empty space per partition is:
Thus, on average, one in every k partitions "loses" its Play-from-TS block,
where
Algorithm 9 Polynomial-Time Twisted Placement under Variable Block Sizes
INPUT: All Play-from-SS and from-TS blocks, after B 1 is placed at the beginning.
next
remaining blocks = set of all Play-from-SS blocks
next
available tape into partitions of size T \Delta d MB.
1. Put at the right end of partition next part the block next TS block
2. Sort remaining blocks in decreasing order
3. Run DFF algorithm until partition next part can be filled no more
i.e., until its empty space is smaller than minimum block size in remaining blocks
4. inherit empty += amount of empty space in partition next part
5. shift left the Play-from-TS block in partition next part to cover
the partition's empty space
6. If (inherit empty T \Delta d) then f
the last block in partition next part will now be marked
as a Play-from-SS block (i.e., partition next part lost its Play-from-TS block)
7. remove from remaining blocks the ones just placed
8. next part += 1
9. next TS block += 1
10. Repeat until all blocks are placed.
Therefore, the number of partitions without a Play-from-TS block is L
k and the
I/O bandwidth savings are
k .
Example 7: Consider an object consisting of 3,000 blocks, each 0.5 MB,
while MB/sec. For this example we have:
total
5. The number of partitions without a Play-from-TS block is about
60. So, in the worst case, we require at most 5MB PS space while about 80% of
all partitions retain their Play-from-TS block.
7. Conclusions
In this paper we have addressed the problem of continuous data elevation
in multimedia servers which are based on HSMSs; a problem which, in our view,
has not received adequate attention despite the facts that: (i) the current cost
per megabyte figures make tape libraries the most cost-efficient medium for such
applications, (ii) several real-world products are already employing tape libraries
for storing continuous media, and (iii) the significant continuous annual increase
in the tape library market promises near-future technological improvements that
will improve their performance.
We first contributed the notion of alternating the playback of delay-sensitive
data between the TS and the SS and discussed how this idea can save significant
SS bandwidth (but also pointed out that it requires non-zero buffer space). Sub-
sequently, we contributed the Twisted Placement algorithm with a companion
play algorithm, called Alternate Play With A Twist; the Placement algorithm
determines the proper placement/recording order for the blocks of objects on
the tapes so that the Play algorithm achieves the same SS bandwidth savings as
before but with zero PS buffer space requirements this time.
Subsequently, we contributed the notion of strips of streams, which are
special partial replicas of stream objects, residing permanently in TS, and which
consist of the blocks which are to be played from TS. Strips of streams allow
the previous contributions to be enjoyed even when (1) the bandwidth of TS is
smaller than the display bandwidth of objects; and (2) the objects also reside in
SS (which will be the case for the most popular objects).
Later we considered the subject of multiplexing TS-resident video streams
over tape drives. Multiplexing is desirable for two reasons. First, it can drastically
reduce the average start-up latency of videos residing in the TS. Second,
employing our placement and Play algorithms in such environments can offer
the associated SS bandwidth savings for all streams being multiplexed, increasing
the total benefits of our approach. We derived algorithms which employ the
previously-developed techniques to continue offering SS bandwidth savings, at no
additional PS buffer space. We presented an algorithm showing how to store the
stream on tapes so that a high multiplexing degree j is maintained. For each of
the j jobs the algorithm continues to achieve the aforementioned savings; thus,
the total savings are significantly greater.
For many applications we expect that the data objects will exhibit skewed
access distributions (e.g., popular movies in a movie-on-demand application). For
a large majority of cases the most popular objects will have been uploaded and
will be residing in SS. In such scenarios, the SS will be responsible for satisfying a
great percentage of requests, referring to the most popular streams. With present
technology, however, even the high-end SS server products do not have enough
bandwidth to satisfy all requests for all streams they store. (This is expected to
hold in the future as well, given the pace of improvement of storage capacities.)
When taking into account the IO bandwidth required for uploading colder streams
from TS to SS, the available IO bandwidth becomes even smaller. In this paper,
we have shown techniques which exploit the ever-increasing bandwidth of modern
tape drives, for increasing the available IO bandwidth for satisfying requests. We
made an effort to view the problem comprehensively in the sense that we focus
on all main resources (host RAM memory, SS and IO bus bandwidth, and TS
bandwidth). With our techniques the overall IO bandwidth is increased without
requiring extra host RAM, while still avoiding video hiccups. In a sense, the
aforementioned contributions suggest the collaboration of TS and SS in order to
improve the system's throughput. The essence of our proposed techniques is that
the TS of a HSMS, is not simply used to augment the storage capacity of SS
(as its traditional role would indicate) but to augment the SS bandwidth as well.
This is the high level contribution of this research.
--R
Dynamic batching policies for an on-demand video server
Staggered striping in multimedia information systems.
Tertiary Storage: An Evaluation of New Applications.
Challenges for tertiary storage in multimedia servers.
Maximizing performance in a striped disk array.
Research and development issues for large-scale multimedia information systems
Principles of optimallly placing data in tertiary storage libraries.
Buffering and caching in large-scale video servers
Buffer management policy for an on-demand video server
A pipelining mechanism to minimize the latency time in hierarchical multimedia storage managers.
Computers and Intractability: A Guide to the Theory of NP-completeness
Adaptive piggybacking: A novel technique for data sharing in video-on-demand storage servers
Continuous retrieval of multimedia data using parallelism.
A Study on the Use of Tertiary Storage in Multimedia Systems.
On multimedia repositories
The role of data storage in broadcasting future.
On the modeling and performance characteristics of a serpentine tape drive.
Random I/O scheduling in online tertiary storage systems.
Benchmarking tape system performance.
Performance measurements and models of tertiary storage devices.
An analytical performance model of robotic storage libraries.
Using tertiary storage in video-on-demand servers
Evaluating video layout strategies for a high performance storage server.
The optimum execution order of queries in linear storage.
A case for intelligent disks (idisks).
Buffer management for continuous media sharing in multimedia database systems.
Integrated document prefetching and caching in hierarchical storage based on markov-chain predictions
The design of a storage server for continuous media.
Keynote speech.
A case for redundant arrays of inexpensive disks (RAID).
Active storage for large-scale data mining and multimedia applications
Efficient storage techniques for digital continuous multime- dia
Buffer management for video database systems.
striping.
Untangle your tape storage costs.
Overlay striping and optimal parallel I/O in modern applications.
Prefetching into smart-disk caches for high-performance continuous media servers
Tpc executive summaries.
--TR
--CTR
simulated annealing approach for multimedia data placement, Journal of Systems and Software, v.73 n.3, p.467-480, November-December 2004
Athena Vakali , Evimaria Terzi , Elisa Bertino , Ahmed Elmagarmid, Hierarchical data placement for navigational multimedia applications, Data & Knowledge Engineering, v.44 n.1, p.49-80, January | tape libraries;video playback;hierarchical storage servers;placement algorithms |
592967 | Cactus Tools for Grid Applications. | Cactus is an open source problem solving environment designed for scientists and engineers. Its modular structure facilitates parallel computation across different architectures and collaborative code development between different groups. The Cactus Code originated in the academic research community, where it has been developed and used over many years by a large international collaboration of physicists and computational scientists. We discuss here how the intensive computing requirements of physics applications now using the Cactus Code encourage the use of distributed and metacomputing, and detail how its design makes it an ideal application test-bed for Grid computing. We describe the development of tools, and the experiments which have already been performed in a Grid environment with Cactus, including distributed simulations, remote monitoring and steering, and data handling and visualization. Finally, we discuss how Grid portals, such as those already developed for Cactus, will open the door to global computing resources for scientific users. | Introduction
Cactus [1], [2] is an open source problem solving environment designed to
provide a unied modular and parallel computational framework for physicists
and engineers. The Cactus Code was originally developed to provide a framework
for the numerical solution of Einstein's Equations [3], one of the most complex
sets of partial dierential equations in physics. These equations govern such cataclysmic
events as the collisions of black holes or the supernova explosions of stars.
The solution of these equations with computers continues to provide challenges
in the elds of mathematics, physics and computer science. The modular design
of Cactus enables people and institutes from all these disciplines to coordinate
their research, using Cactus as the collaborating and unifying tool.
The name Cactus comes from the design of a central core (or
which
connects to application modules (or thorns) through an extensible interface.
Thorns can implement custom developed scientic or engineering applications,
such as the Einstein solvers, or other applications such as computational
uid
dynamics. Other thorns from a standard computational toolkit provide a range
of capabilities, such as parallel I/O, data distribution, or checkpointing.
Cactus runs on many architectures. Applications, developed on standard
workstations or laptops, can be seamlessly run on clusters or supercomputers.
Parallelism and portability are achieved by hiding the driver layer and features
such as the I/O system and calling interface under a simple abstraction API. The
Cactus API supports C/C++ and F77/F90 programming languages for the thorns.
Thus thorn programmers can work in the language they nd most convenient,
and are not required to master the latest and greatest computing paradigms.
This makes it easier for scientists to turn existing codes into thorns which can
then make use of the complete Cactus infrastructure, and in turn be used by
other thorns within Cactus.
Cactus provides easy access to many cutting edge software technologies being
developed in the academic research community, such as the Globus Meta-computing
Toolkit, HDF5 parallel le I/O, the PETSc scientic computing library,
adaptive mesh renement, web interfaces, and advanced visualization tools.
2. The Need for the Grid
Of many applications using the Cactus framework, an important one which
continues to drive its development is the solution of the Einstein Equations. The
large and varied computational requirements of solving these equations for scenarios
such as black hole or neutron star collisions, make them a good example
for demonstrating the need for Grid computing, and an ideal testbed for developing
new techniques. In developing the Cactus infrastructure to make full use
of the Grid for such problems these advances are then immediately available for
all applications.
Implementing the full Einstein Equations in a nite dierence code amounts
to a memory requirement of around one hundred 3D arrays, and a CPU requirement
of thousands of
oating point operations per grid point and timestep.
Considering that a su-ciently accurate solution of a full 3D black hole problem
will require at least 1000 grid points in each spatial dimension, this implies
computers. Further, to analyze the large data sets created
during a simulation requires advanced techniques in le management and visualization
To date, the resources of the individual supercomputers available have limited
simulations to around 200-300 grid points in each spatial dimension. Even
simulations generate huge amounts of data, and negotiating the curiosities
of dierent supercomputers, such as batch queues and le systems, is not
something that physicists relish.
The Grid provides a way to access the resources needed for these simulations.
It provides a uniform access layer to supercomputers and computing resources,
making these resources far more useful to scientists who want to use them for
simulations. Given the appropriate permissions, networks, allocations and Grid
enabling software, a scientist could in principle run a simulation on a set of
supercomputers, all connected by the Grid, and thus be able to run far larger
problems than would be possible on a routine basis without the Grid. With
proper software tools, the Grid provides the necessary infrastructure to connect
the machines, and to deal with the resulting large data sets, and, ultimately, the
resources to analyze such volumes of data.
The dream for physicists is that Grid computing will provide a scientic
programming environment similar to that shown in Figure 1, allowing working
scenarios such as:
A physicist, sitting in a cafe in Berlin has an idea for a colliding black hole run,
maybe to try a new initial data set, or to test a new evolution method. She uses
a web portal on her PDA to select the needed Cactus thorns, and to estimate the
required computer resources. Her Grid software takes over, selecting the most
appropriate machine or set of machines to use from those available to her. This
Grid software automatically creates or transfers executables and parameter les
and starts the run on the remote resources. After several coees, she connects
to the running Cactus simulation, using one of the remote access thorns, and
sees that things are going better than expected. She rings up colleagues in the
who watch the isosurfaces being streamed out from Cactus. They want
to save some 3D data sets to analyze later, so they connect to the Cactus run
using their web browser, and turn on output for the grid functions they are
interested in.
As futuristic as such a scenario sounds, all the pieces already exist in a
prototype form, and are being further developed and integrated, as described
below and in [1], [4], [5] and [6].
Figure
1. The dream of Grid computing: Grid infrastructure provides a transparent and
exible working environment providing access to global computing resources.
3. Grid Computing with Cactus
Cactus was designed with the Grid and Grid applications in mind. It provides
a layer on top of the Grid, giving a programming interface which allows
the user to be completely ignorant of the nature of the machine or machines
that the simulation runs on. The code provides access to Grid resources such as
distributed I/O and parallelization across any number of supercomputers with
precisely the same interface as it does to the resources of a single machine [7].
Cactus thus provides a convenient laboratory for computer scientists to develop
metacomputing techniques, which can then be tested with real physics
applications and also by real users without requiring changes to the physics application
code. When a new technique is perfected, it can immediately be made
available to the whole community of Cactus Users.
Grid Computing developments and experiments have been performed using
Cactus for several years, some of which are described in the sections below.
Capabilities are being further developed in connection with Cactus through several
projects. A DFN-Verein project [4] at the AEI in Germany is funded to
exploit high speed networks for colliding black hole simulations, and is concentrating
on remote visualization [8], remote steering and distributed I/O [9]. A
project funded by the so-called KDI program of the American National Science
Foundation (NSF) joins ve institutes to develop an Astrophysics Simulation
Collaboratory [5] which will provide an environment for physicists to utilize Grid
computing for problems such as the collisions of neutron stars. The GrADs
project [10], also funded by the NSF in the USA, is using Cactus as one of its
applications for developing a Grid based computing environment. The European
Grid Forum [11] has chosen Cactus as one of its applications running on the
European Grid-TestBed. These technologies are being brought into the scientic
and engineering communities as they are developed.
3.1. Distributed Simulations on the Grid
We are actively working to develop techniques which allow researchers to
harness computational resources wherever they may be on the Grid. This could
include a distributed set of machines connected by high speed networks, allowing
larger or faster simulations than would be possible on a single machine. At Super-computing
a neutron star collision was run with Cactus, using the Globus [6]
metacomputing toolkit to split the domain across two T3Es on dierent sides of
the Atlantic, one in Munich, Germany and one in San Diego, California. In this
simulation the neutron stars collided somewhere in cyberspace, over the Atlantic
Ocean. The simulations were launched, visualized, and steered from the show
oor in Orlando. The scaling across the two machines used for this simulation
was roughly 50%, which we believe is excellent considering the large amount of
communication required between the machines to solve these equations and the
latencies in the transatlantic link.
The latency and bandwidth are characteristic features, which determine the
speed of a network. Cactus is aware of these features and can be ne-tuned in order
to optimize communication. For example, if a network has a high latency but
also a high bandwidth, many small messages can be coalesced into fewer bigger
ones. When running in a metacomputing environment, one has to deal with dier-
ent types of networks (shared-memory, distributed-memory, high-speed-network,
LAN, WAN/internet) with dierent latency/bandwidth characteristics. Here, we
also have the possibility to distinguish between these dierent types of network-
connections in one single distributed run and tune Cactus communication patterns
adequately. Partly this is already achieved by using MPICH-G2, the next-generation
MPI-implementation, which can distinguish between processors located
on one host (with native MPI installed) and processors separated by a LAN or
WAN. According to the location, MPICH-G2 can choose dierent protocols (TCP
or vendor's MPI) for communication in one single distributed parallel run. Cactus
can be used with this new technology without problem, which was demonstrated
in many metacomputing experiments last year, including Supercomputing 2000
in Dallas.
A further aspect is load-balancing. Since dierent architectures provide
dierent types of processors at dierent speeds, Cactus provides the ability to
decompose the whole computational problem into sub-problems of dierent size,
which t the local processor power.
For running in a metacomputing environment at a real production-level, a
User Portal has been built (described in Section 5), making it possible to congure
and start Cactus runs from one machine via a special web-based GUI. This greatly
simplies the situation for the scientist, since she does not have to deal with every
detail of the local supercomputer, such as batch-systems, username/password.
The portal provides automatic staging and compilation of the code on the local
supercomputer, the distributed machines appearing as a single virtual machine.
3.2. Checkpointing Distributed Simulations on the Grid
Grid computing events in the past have been often understood as one-time,
well prepared attempts to harness several machines at the same time. In a more
realistic setting, compute resources of considerable size can not be expected to
be available at a given time, instead their availability is a dynamic process. A
true Grid application has to be capable of dealing with such dynamic allocations
of resources.
The Cactus framework addresses this challenge by providing a sophisticated
cross-platform checkpointing mechanism. In general, checkpointing technology
allows the user to freeze the state of an application by writing a checkpoint le to
disk, from which the application can be restored and continued at a later time.
single MPP supercomputer
cluster or compute farm
tightly coupled heterogeneous supercomputers
Figure
2. Migration scenario for a distributed simulation: the simulation starts on three
tightly coupled supercomputers from where it is checkpointed and migrated to a single
machine. The computation migrates again to nish on a cluster.
In Cactus the checkpoint is not just the memory image of the application
written to disk, as found in several other checkpointing systems, but the total set
of user dened objects (variables, scalars, etc. While memory images tend to be
quite huge and are only compatible within the same class of operating systems and
architectures, this approach allows for smaller, architecture-independent check-
points. The cross-platform checkpoints of Cactus can be transferred between
arbitrary architectures, operating systems and numbers of processors for restarting
and continuing simulations.
The checkpointing mechanism is completely transparent to the user, who can
request a checkpoints to be written at regular timestep intervals, at the end of the
requested compute time allocation, or using a steering interface immediately at
the current timestep. All of the internal technicalities of parallel I/O are hidden
from the user. The user can control checkpoint behavior (as frequency or parallel
I/O) by means of steerable parameters.
The checkpoint mechanism allows for the output of a single, global check-point
le as well as multiple checkpoint les for each of the distributed machines.
The mechanism makes use of parallel I/O where possible. For restarting, the
multiple checkpoint les can be recombined into a single le which can be used
to restart on an arbitrary set of machines. The parallel restart operation from
multiple les is currently restricted to the same topology of machines. Future developments
will add intelligent components to immediately restart from multiple
checkpoint les across arbitrary machine topologies.
With respect to distributed simulations, a Cactus user has the ability to
perform a distributed run and checkpoint this simulation even though is it being
run on a heterogeneous machine set. A checkpoint le can then be transferred
to a new conguration of machines to continue the simulation. The new pool
of machines can dier from the previous one in type and number of machines
involved as well as the number of processors. This
exible chain of distributed
simulations is illustrated in Figure 2: an initial simulation run across three tightly
coupled supercomputers is checkpointed. The checkpoint le is transferred to a
single MPP machine and restarted. After a second checkpointing event the third
stage of the simulation is continued on a cluster system.
4. Grid-enabled Communication and I/O Techniques
The parallel driver layer in Cactus, which manages the allocation and domain
decomposition of grid variables as well as their synchronization between
processor boundaries, is provided by a thorn. This means that dierent thorns
can be used to implement dierent parallel paradigms, such as PVM, Pthreads,
OpenMP, CORBA, etc. Cactus can be compiled with as many driver thorns as required
(subject to availability), with the one actually used chosen by the user at
run time through the parameter le.
The current standard driver thorn is called PUGH, which uses MPI to provide
parallelism. In order to perform distributed Cactus simulations on the Grid,
this PUGH thorn is simply linked against the Grid-enabled MPICH-G [12] implementation
of MPI which is available with the Globus toolkit. Thus, preparing
a Grid-enabled version of Cactus is a compilation choice, and it is completely
transparent for application thorn programmers to add their own code to a Grid-enabled
9Cactus. Using the Globus job submission tools, Cactus users can start
their Cactus runs in a Grid environment just as easily as they do on a single
machine.
The Cactus I/O subsystem is implemented in a similar, generic manner: the
esh provides a runtime interface for arbitrary I/O thorns to register their own,
specic I/O methods. These methods can then in turn be invoked by the
esh
or any application thorn to read external data into Cactus variables or dump
their contents to a storage medium for postprocessing analysis and visualization
purposes.
The I/O thorns currently available in the computational toolkit provide
methods to write simulation data in dierent formats (1D traceline plots, 2D
slices and JPEG images, full N-dimensional arrays, arbitrary hyperslabs of N-dimensional
arrays, reduction scalars (e.g. minimum/maximum values), isosurface
geometry data, particle trajectories, runtime standard output) also using
dierent I/O libraries (FlexIO [13], HDF5 [14], JPEG, ASCII). Further methods
or libraries can easily be added by thorn programmers.
In the following sections we will describe in more detail the Grid software
techniques we have developed to date which allow Cactus users to easily perform
postprocessing analysis on data produced by a remote Cactus simulation, and
also to monitor and steer running Cactus jobs remotely. A general overview
of the nal proposed architecture of our Grid-enabled I/O system is shown in
Figure
3.
The Hierarchical Data Format version 5 (HDF5) plays a key role in this
overall picture. HDF5 has become a widely accepted standard in the scientic
computing community for storing data. It denes a very
exible le format and
provides an e-cient software library for managing arbitrary multidimensional
datasets of various types. Raw data access is accomplished via a generic Virtual
File Driver (VFD) layer in HDF5. Beneath this abstraction layer exists a set of
low-level I/O drivers which provide dierent ways of accessing the raw data of
an HDF5 le, either located on a local disk or on other storage media. We have
added our own drivers to this layer which enable existing applications to have the
additional capability of accessing remote data residing anywhere on the Grid.
4.1. Direct Remote File Access
HDF5 already has a GASS driver (Global Access to Secondary Storage) which
Local File System
Virtual File Driver Layer
Amira Data
DPSS
GridFTP
Virtual File Driver Layer
GASS
GridFTP
Unix DPSS Stream
Handling
Cactus Simulation
Thorns
Thorn Hyperslab
I/O Methods
Methods
Visualization (Amira)
Amira Modules
Steering GUI
Steering
DPSS Server
GridFTP Server
HDF5 I/O Library HDF5 I/O Library
Figure
3. General overview of the Grid-enabled I/O architecture
automatically stages complete remote les rst to the local machine and then
operates on their local copies via standard UNIX le I/O. This method is feasible
for small or medium sized data les. However, large-scale computer simulations
often generate large-scale data sets | single simulations may generate
les containing several hundreds of GBytes, up to the order of a TByte as
machine resources increase. Conventional postprocessing analysis then becomes
prohibitively resource-intensive when remote simulation data must be staged for
local processing. Further, in many cases, for example for rst-sight visualization
purposes, only a small fraction of the overall data is really needed. For example,
in a simulation of the evolution of two colliding black holes, the output may contain
a dozen variables representing the state of the gravitational eld at perhaps
1000 time steps during the evolution. For visualization one might want to analyze
only the rst time step of one or two of the variables. Or, in order to perform a
quick pre-analysis of high-resolution data, it might be su-cient to downsample
the array variables and fetch data at only every other grid point.
By enhancing the HDF5 VFD layer with a driver that builds on top of the
Data Grid software components [15] from the Globus toolkit we enable existing
I/O layers to operate on remote HDF5 les directly. These are uniquely addressed
by their URL, and after opening them with the appropriate driver, all read and
write operations are performed as network transactions on the Grid | completely
transparent to the application. Using the data selection capabilities of
(dening so-called hyperslabs as arbitrary rectangular subregions in the
multidimensional data sets, optionally with downsampling and type conversion
applied) individual time steps and zones of interesting data can be read and
visualized in a very e-cient and convenient way.
The Data Grid client software only supports remote partial le access to
Distributed Parallel Storage Systems (DPSS) [16]. During Supercomputing 1999
in Portland and at CeBIT 2000 in Hannover we successfully demonstrated the
feasibility of such a DPSS Data Grid Infrastructure. In these demonstrations,
Cactus simulation data residing on remote DPSS data servers was visualized
by an HDF5-enabled version of the visualization package Amira [17]. This is
illustrated in Figure 4.
Remote Visualization
with Amira
CeBIT 2000 Hannover
AEI Potsdam
HDF5 datasets
on DPSS prototype
Rechenzentrum Garching
Cactus Simulation on T3E
Infrastructure
Gigabit Network
German
Figure
4. Remote le access and visualization demo presented at CeBIT 2000
Remote access to les which are located anywhere on the Grid will soon be
provided by a GridFtp driver [18] which supports the standard FTP protocol,
enhanced with partial le access, parallel streaming capabilities, and Grid security
mechanisms.
Another challenge occurs when simulations are carried out on a distributed
computer and generate physically distributed les. This would occur, for exam-
ple, in order to exploit parallel I/O methods. It is desirable to access and transfer
such distributed data sets as consistent single les, using a global address space
having pointers to pieces at other locations. We plan to also tackle these problems
with the Data Grid components, by organizing related les as collections of
logical le instances. The DataGrid project of the Globus group is investigating
such techniques [15].
4.2. Remote Online Data Streaming and Visualization
Cactus also provides the capability to stream online-data from a running
simulation via TCP/IP socket communications. This can be used for many pur-
poses. To date, the most common use for live data streaming is for remote
visualization, which is our focus here. However, in our vision of future Grid sim-
ulations, we expect running simulations to communicate with each other, migrate
from machine to machine, spawn additional processes on the Grid, etc. Hence,
we expect that data streaming will be a fundamental enabling technology for future
Grid simulations. We are now exploiting the data streaming capabilities
we describe here to enable such advanced Grid simulations, as demonstrated in
our \Cactus Worm" scenario where a running Cactus simulation was able to migrate
itself, using the data streaming techniques described below, from site to site
across the European Egrid [19]. This is a simple example of more sophisticated
types of Grid simulations, based on data streaming, that we will be developing
in the future. But in the remainder of this section we focus on data streaming
for use in remote visualization.
Multiple visualization clients can then connect to a running Cactus executable
via a socket from any remote machine on the Grid, request arbitrary
data from the running simulation, and display simulation results in real-time,
visualizing for example photons falling into a black hole, or isosurfaces of gravitational
waves which are emitted during a black hole collision.
Data streaming is integrated into Cactus in several dierent ways. One
method is to access Cactus output les while they are being written by the
running simulation. Those les are registered with the HTTP control interface,
described in the following section, and can be downloaded to any web browser.
For example, simple 1D data graphs can be viewed by simply clicking on a down-load
le and ring o, for example, an xgraph program. Two-dimensional JPEG
images can be viewed directly in a web browser, and continuous time sequences
of JPEGs can be displayed using the auto-refresh option of the capable browsers.
Another technique implements a proprietary communication protocol for
sending specic geometry data such as isosurfaces or particle trajectories down
a raw socket connection to a visualization program [20]. This is illustrated in
Figure
6. Precomputing such data at the simulation side not only allows for
parallel rendering of images but also reduces the amount of data to be transferred
to remote visualization clients.
Figure
5. Online Visualization: The Amira visualization toolkit [17] allows a user to visualize
slices through a complete 3D data set streamed from a running Cactus simulation,
and at the same time to display an isosurface obtained online for the same 3D eld.
The most generic approach for streaming arbitrary data of any type is again
based on the HDF5 I/O library and its VFD layer. We have developed a Stream
driver which holds the HDF5 data to be streamed out of the Cactus simulation as
an in-memory HDF5 le. On a
ush/close operation the entire le is sent through
Figure
6. Trajectories of freely falling particles in the vicinity of a rotating black hole. The
particle positions are streamed to the visualization tool in real-time during computation.
This was demonstrated with Cactus and Amira at IGrid 2000 in Yokohama [20].
a socket to the connected client. In the client application, the same driver is used
to reconstruct the in-memory le which then can be accessed as usual to read the
datasets.
Since the VFD layer hides all low-level I/O operations from the upper layers
of the HDF5 library and from the application that builds on top of it, applications
can use their existing HDF5 le-based I/O methods immediately for online
remote data access without changing their I/O interfaces. This has been demonstrated
using dierent visualization toolkits, including Amira [17], the IBM Data
Explorer [21], and LCA Vision [22].
The Stream driver is capable of sending data simultaneously to multiple
clients. This is one key component for building a collaborative visualization
environment where scientists at dierent sites can analyze the results of a remote
simulation either by looking simultaneously at the same data or by requesting
dierent views of it. We are working on a design for a more sophisticated I/O
request protocol and the implementation of an external data server which will
handle multiple clients and can also serve requests individually. By integrating
intelligent data management and caching strategies, such a server would relieve
the simulation from communication overhead and help to reduce data tra-c in
general.
4.3. Remote Monitoring and Steering
The Cactus Computational Toolkit contains a thorn HTTPD which can be
added to any Cactus simulation to provide an inbuilt HTTP server. Pointing their
web browsers to a URL identifying a running Cactus job on a remote machine,
any number of collaborators can connect to monitor and steer the simulation
online.
The provided Cactus web interface allows users to query certain information
about the run, such as the current iteration step, a list of available thorns and
variables, and a full description of all parameters and their current settings.
After successful authorization a user can also interactively change parameters
which are marked as steerable. At each simulation cycle these parameters are
checked, and the appropriate thorns may react on changes individually. Most of
the I/O parameters are steerable. This enables users to selectively switch on or
specic output at runtime, dynamically choosing which variables are output
using which I/O method. I/O options such as hyperslabbing or downsampling
parameters may also be modied in order to adjust online data streaming to
remote visualization clients. The web interface can also be used to pause the
simulation, optionally when a chosen condition is satised, and to advance the
simulation by single timesteps.
The Web interface provided by thorn HTTPD is dynamically extensible in
that any thorn can register and update its own HTML pages at runtime. Besides
a download page for Cactus output les there is a also viewport available which
embeds dynamically generated JPEG images.
Another steering interface again builds on top of HDF5 and the Stream driver
described above. For this interface the data streaming is simply used in a bidirectional
way: Cactus writes parameters into an HDF5 le which is then streamed to
any connected steering client. After some user interaction, this client sends back
a modied version of the parameter le which is read and evaluated by Cactus.
Because of its self-describing data format and the
exibility to add addi-
tional, user-dened information, HDF5 also provides the possibility to build more
advanced steering clients with graphical user interfaces. As an example, mini-
mum/maximum values could be assigned to numerical parameters to create sliders
gfor more convenient user interactions. Parameters belonging to one thorn
could be sorted into a group hierarchy for building menus.
These features of HDF5 make it relatively easy to implement dynamic graphical
user interfaces for arbitrary Cactus parameter sets which adapt themselves
to the current Cactus conguration. We are actively working on including such
user interfaces into existing visualization clients. Their steering capabilities would
then not only be limited to exchanging HDF5 parameter les but could also be
extended to feed back any kind of data elds into Cactus, for instance to add
photons to a black hole simulation to locate an event horizon.
5. Portals onto the Grid
The Grid is only useful as a concept if its services can be used to create
the illusion that all of the resources are centralized to the user's workstation.
So the most successful distributed applications on the Grid will paradoxically
be those which make the user least aware that they are in fact operating in
distributed fashion. The motivation for producing a Grid Portal interface to a
like Cactus is derived from the desire to hide distributed applications and
immensely complex distributed/parallel software architectures behind a single
point of presence, and to make them accessible through comparatively simple
client-side interfaces.
A portal is a single point of presence (typically hosted on the web) which
can be customized for a particular user and remembers particular aspects of the
customizations regardless of where the user accesses it from. Yahoo and HotMail
are typical consumer-oriented examples of this capability and are in fact the
originators of this new meaning for the term portal. It doesn't matter where you
are, when you login to the URL of these portals, you get access to the same view
of your personalized environment and data (ie. your email).
Placing the PSE like Cactus within a portal creates a universally accessible
interface to your scientic computing platform. The GUI is user-customizable,
as if it were a desktop application on the user's own workstation, except that the
same customized environment is accessible from virtually any location by simply
connecting to the same URL address. A science portal has the additional implied
function of automating the entire work
ow for a particular scientic application,
from initial data generation, to selecting resources to run the application, to
archival storage management and analysis of the results of those simulations.
This replaces a series of perhaps loosely (or usually poorly) integrated tools with a
comprehensive environment which is customized around a particular application.
Finally a collaboratory provides additional facilities for sharing information either
online or asynchronously among users of the portal.
Cactus has several key advantages which make it very suitable as the basis
for a portal design. Its modular design supports dynamic assembly of applications
online through a simplied GUI. Its sophisticated multiplatform compilation
makes it very simple to run the code on any available Grid resource without
the complexities of Imake or the performance penalty of a Virtual Machine. Its
centralized revision control mechanism permits e-cient sharing of code, software
updates, and bug xes. Finally the integrated visualization for remote monitoring
and steering of the code through a web interface allows seamless integration
of these capabilities with the portal's web-GUI.
The Astrophysics Simulation Collaboratory Portal [5] is a concrete use of
Cactus within a web portal GUI which leverages o of technology which was
developed originally for e-commerce applications. The architecture utilizes a
commercial-grade StrongHold (Apache) webserver which oers SSL encryption
using a site certicate from a commercial Certicate Authority. Running side-
by-side with the webserver is a TomCat JSP engine which oers a cleaner means
to manage automation in an elegant and easily maintainable fashion. JSP allows
us to directly execute methods of server-side Java beans rather than the typical
CGI-script methodology of parsing the state of form elements individually after
an HTTP 'POST' event. The Java beans directly call Java CoG [6] which is a
pure Java implementation of the Globus toolkit to extend the automation to
Grid resources. The user-state within the system is maintained by a back-end
database system (OpenLDAP or mySQL) which allows simple replication of portal
state allowing the web services to be scaled through server replication.
The science portals and collaboratories will play an increasingly important
role in HPC as the Grid evolves. The natural point of organization for
user communities in an HPC environment is a particular eld of science or a
particular application code, just as experimental laboratories bring together top
researchers who are interested in the same or similar lines of research. The internet
has provided us with access to enormous remotely located resources, but
this has shifted the center of focus to the particular HPC site and its operating
environment, batch queues and security policies rather than the science that is
computed there. The single point of presence oered by an Grid portal recreates
gthe traditional laboratory environment where scientists who share similar
interests and applications are brought together under the umbrella of a shared
a collaboratory. The portal itself is a distributed Grid application
for a specic community of scientists rather than a general-purpose resource. So
unlike traditional web-portals where you have an implicit oer that if you go
to www.<my portal location>.org we'll do everything for you here using our
compute resources, the Grid portal's business plan can be simply stated as go
to www.<my portal application>.org and we will do everything you need for
<my application> regardless of your location and that of your compute resources.
This returns the focus of a scientic community to the scientic application rather
than the location of the HPC resources.
If the Grid is really working, in another 5 years we will no longer think of
the, for example, NSF supercomputing centers as distinct sites like SDSC, NCSA,
or PSC. We will instead think only of the particular application collaboratories
which have been set up to study dierent scientic applications. That resource
will merely be a name rather than a place.
Summary
The Cactus Code and Computational Toolkit and the large scale applications
which it serves provide a ideal laboratory for developing and testing new
Grid techniques and working practices. Cactus can be very easily congured
and run in a Grid environment, and the tools developed so far already provide
many capabilities for exploiting global computing resources. The infrastructure
and tools developed are immediately available to the user community for testing,
and many are already being successfully and benecially used by collaborations
researching computationally intensive problems such as black hole and neutron
star collisions.
Acknowledgements
The development of the Cactus Code is a highly collaborative eort, and
we are indebted to a great many experts at dierent institutions for their advice,
visions and support. The original design of Cactus was by Joan Masso and Paul
Walker, since when it has been extensively developed at the AEI, NCSA and
Washington University.
It is a pleasure for us to thank Ian Foster, Steve Tuecke, Warren Smith,
Brian Toonen, and Joe Bester from the Globus team at Argonne National Labs
(ANL) for their Globus and Data Grid work; Mike Folk and his HDF5 development
group at NCSA who helped us in implementing the requirements of remote le
access into their HDF5 code; Brian Tierney from Lawrence Berkeley Labs for his
DPSS support; Jason Novotny at NLANR for his help with Globus and graphical
user interfaces; and Michael Russell at the University of Chicago for his Portal
work. Computing resources and technical support have been provided by AEI,
ANL, NCSA, Rechenzentrum Garching/Germany, and ZIB.
We greatly acknowledge nancial support for Andre Merzky and Thomas
Radke as well as provision of a gigabit network infrastructure in the course of the
TIKSL research project by DFN (German Research Network).
--R
http://www.
Numerical Relativity As A Tool For Computational Astrophysics J.
DFN Gigabit Project:
Toolkit: http://www.
Grid Adaptive Development Software (GrADS): http://www.
The European Grid-Forum: http://www
Implementation: http://www.
FlexIO: http://zeus.
Hierachical Data Format Version 5: http://hdf.
Distributed Parallel Storage System http://www-didc
The Globus Project: GridFTP: Universal Data Transfer for the Grid.
Geodesics in Kerr Space-Time
IBM Data Explorer: http://www.
http://zeus.
--TR
--CTR
Michael Russell , Gabrielle Allen , Greg Daues , Ian Foster , Edward Seidel , Jason Novotny , John Shalf , Gregor von Laszewski, The Astrophysics Simulation Collaboratory: A Science Portal Enabling Community Software Development, Cluster Computing, v.5 n.3, p.297-304, July 2002
Henri Casanova , Francine Berman , Thomas Bartol , Erhan Gokcay , Terry Sejnowski , Adam Birnbaum , Jack Dongarra , Michelle Miller , Mark Ellisman , Marcio Faerman , Graziano Obertelli , Rich Wolski , Stuart Pomerantz , Joel Stiles, The Virtual Instrument: Support for Grid-Enabled Mcell Simulations, International Journal of High Performance Computing Applications, v.18 n.1, p.3-17, February 2004
Gabrielle Allen , David Angulo , Ian Foster , Gerd Lanfermann , Chuang Liu , Thomas Radke , Ed Seidel , John Shalf, The Cactus Worm: Experiments with Dynamic Resource Discovery and Allocation in a Grid Environment, International Journal of High Performance Computing Applications, v.15 n.4, p.345-358, November 2001
James A. Kohl , Torsten Wilde , David E. Bernholdt, Cumulvs: Interacting with High-Performance Scientific Simulations, for Visualization, Steering and Fault Tolerance, International Journal of High Performance Computing Applications, v.20 n.2, p.255-285, May 2006
Katarzyna Rycerz , Alfredo Tirado-Ramos , Alessia Gualandris , Simon F. Portegies Zwart , Marian Bubak , Peter M. A. Sloot, Regular Paper: Interactive N-Body Simulations On the Grid: HLA Versus MPI, International Journal of High Performance Computing Applications, v.21 n.2, p.210-221, May 2007
Lingyun Yang , Jennifer M. Schopf , Ian Foster, Conservative Scheduling: Using Predicted Variance to Improve Scheduling Decisions in Dynamic Environments, Proceedings of the ACM/IEEE conference on Supercomputing, p.31, November 15-21,
Wes Bethel , John Shalf, Grid-Distributed Visualizations Using Connectionless Protocols, IEEE Computer Graphics and Applications, v.23 n.2, p.51-59, March
Ming Wu , Xian-He Sun, Grid harvest service: a performance system of grid computing, Journal of Parallel and Distributed Computing, v.66 n.10, p.1322-1337, October 2006 | grid portals;cactus;grid computing |
592973 | Event Services in High Performance Systems. | The Internet and the Grid are changing the face of high performance computing. Rather than tightly-coupled SPMD-style components running in a single cluster, on a parallel machine, or even on the Internet programmed in MPI, applications are evolving into sets of cooperating components scattered across diverse computational elements. These components may run on different operating systems and hardware platforms and may be written by different organizations in different languages. Complete applications are constructed by assembling these components in a plug-and-play fashion. This new vision for high performance computing demands features and characteristics not easily provided by traditional high-performance communications middleware. In response to these needs, we have developed ECho, a high-performance event-delivery middleware that meets the new demands of the Grid environment. ECho provides efficient binary transmission of event data with unique features that support data-type discovery and enterprise-scale application evolution. We present measurements detailing ECho's performance to show that ECho significantly outperforms other systems intended to provide this functionality and provides throughput and latency comparable to the most efficient middleware infrastructures available. | Introduction
area distributed computing has been a strong
focus of research in high performance computing, resulting
in the development of software infrastructures
like PVM, MPI, and Globus, and in the creation of
the National Machine Room and the Grid by DOE and
NCSA/Alliance researchers. Increasingly, research focus
in this domain has turned towards component architectures
which facilitate the development of complex
applications by allowing the creation of generic
reusable components and by easing independent component
development. Some of the earliest requirements
for component architectures in high-performance computing
were derived from systems that attach scientific
visualizations to running computations, but continuing
research has generalized such models to include the
ability to flexibly link general purpose computational
elements as well [22,24,2]. Component-based software
development has been proposed by the software engineering
community over the last decade [25,29] and its
advantages have been widely recognized in industry, resulting
in the development of systems such as Enterprise
Java Beans, Microsoft's Component Object Model and
its distributed extension (DCOM), and the developing
specification of the CORBA Component Model (CCM)
in OMG's CORBA version 3.0.
A common technique for integrating the different
components of a system is event-based invocation, also
known as implicit or reactive invocation, which has historical
roots in systems based on actors [15], daemons,
and packet-switched networks. Event-based integration
is attractive as it strongly supports software reuse and
facilitates system evolution [12,11]. In bringing the benefits
of component-based software development to the
domain of high-performance computing, our work does
not seek to create a complete component framework.
Instead, we have concentrated on providing the integration
mechanism that will allow the community to obtain
the advantages of such architectures while maintaining
high performance.
This paper discusses the results of our work, an efficient
event-based middleware, ECho, through which
systems of distributed collaborating components can be
constructed. Several attributes of ECho distinguish it
from related work:
High performance sharing of distributed data.
ECho transports distributed data with performance
similar to that achieved by systems like MPI. This level
of performance is required if the integration mechanism
is to support the normally large data flows that are part
of high performance applications. For a distributed vi-
sualization, for example, this level of performance enables
end users to interact via meaningful data sets generated
at runtime by the computational models being
employed.
This paper demonstrates ECho's high performance
across heterogeneous hardware platforms, using networked
machines resident at Georgia Tech. In previous
work, we have used ECho in Internet-wide collabora-
tions[17], and we have demonstrated its ability to represent
both the control and the data events occurring
in distributed computational workbenches.
s
Dynamic data provision and consumption. ECho
supports the publish/subscribe model of communica-
tion. Thus new components can be introduced into an
ECho-based system simply by registering them to the
right set of events in the system, without need for re-compilation
or re-linking. In addition, components can
be dynamically replaced without affecting other components
in the system, facilitating system evolution.
Event-based publish/subscribe models like the one offered
by ECho have become increasingly popular and
their utility within a variety of other environments,
including Internet- and E-commerce applications[30],
extensible systems[23], collaborative systems[14], distributed
virtual reality[19] and mobile systems[32], has
been well-established. ECho differs from such ongoing
or past research in its efficient support for event transmission
across heterogeneous machines, derived from
its ability to recognize and provide runtime translation
for user-defined event formats. While systems like In-
foBus[20] and Schooner[16] have demonstrated the utility
of making type information available to middleware,
neither have attempted to attain the high performance
achieved by ECho.
Dynamic type extension and reflection. One of
the major features differentiating component-based applications
from their tightly-coupled kin is the relative
lack of a priori knowledge about data flows. In order to
be able to "drop" a component into place in a system,
the component must be able to discover the contents
of the data flows it is to operate upon. Even the parts
of an application that were designed to work together
face difficulty maintaining a priori knowledge in a wide
area Grid environment. As different pieces of an application
are changed or upgraded over time it may be
necessary to modify their data flows, invalidating other
pieces that rely on previous knowledge and/or requiring
their simultaneous upgrade. Because of these diffi-
culties, component-based systems typically provide an
integration mechanism that offer some degree of type
extension and reflection. Those terms, borrowed from
object-oriented systems, express the ability to transparently
extend existing data types while preserving the validity
of code using the old type (type extension) and the
ability for third parties to discover the contents of and
operate upon a data type without a priori knowledge
(reflection). One of the most important contributions
of ECho is that it provides these features without compromising
performance, as measurements in this paper
will demonstrate.
Interoperability. ECho-based applications can also
interoperate with CORBA- or Java-based components,
like those used in the Diesel Combustion Collaboratory
or the Hydrology workbench. Thus, end users can continue
to employ tools like the Java-based VisAD data
visualization system or the CORBA-based collaboration
services in Deepview, but gain high performance
for data movement (in contrast to event rates attained
for CORBA- or Java-based event systems[3,31]). Inter-operability
with Java- and CORBA-based systems will
be demonstrated elsewhere.
ECho has been available since October 1997, and our
group has used it for various large-scale, ongoing development
and research efforts. Among such efforts, of
principal interest to the high performance community
are the atmospheric and hydrology applications mentioned
earlier as well as two additional ones now being
developed by our group: (1) a distributed materials
design workbench, where multiple end users interact
with each other and with computational tools in order
to jointly design high performance materials, and (2)
a distributed implementation of an NT-Unix-spanning
system for molecular dynamics and/or for crystal plasticity
studies done by collaborators in the departments
of Mechanical Engineering and Physics in Georgia Tech.
Finally, ECho events are one of the key building blocks
of the DARPA-funded Infosphere Information Technology
Expedition[26].
The remainder of this paper is organized as follows.
Section 2 describes ECho's basic functionality. Section
3 compares ECho's event delivery performance to
that of other communication systems which offer some
form of type extension and reflection. In particular, we
examine the performance of a set of middleware systems
which might be considered as alternative candidates for
the integration mechanism of a component infrastruc-
ture, including CORBA event channels, event distribution
via Java's RMI, and an XML-based communication
scheme; comparing the basic latency of each to that of
ECho and using an MPI message exchange as a baseline
for measurement. We also study the impact of machine
heterogeneity on ECho's performance and explore the
effects of its type extension features. Finally, Section 4
discusses some key areas of future work and summarizes
our conclusions.
2. ECho Functionality
ECho shares semantics common to a class of event
delivery systems that use channel-based subscriptions.
That is, an event channel is the mechanism through
which event sinks and sources are matched. Source
clients submit events to a specific channel and only
the sink clients subscribed to that channel are notified
of the event. Channels are essentially entities through
which the extent of event propagation is controlled. The
CORBA Event Service[13] is also channel-based, with
channels being distributed objects.
Channel
Process C
Process B
Process A
Channel
Event
Channel
Event
Event
(a) Abstract view of Event Channels.
Channel
Event
Channel
Channel
Event
Event
Channel
Event
Event
Channel
Event
Event
Channel
Process C
Process B
Process A
Channel
(b) ECho Realization of Event Channels.
Figure
1. Using Event Channels for Communication.
2.1. Efficient Event Propagation
Unlike many CORBA event implementations and
other event services such as Elvin[28], ECho event channels
are not centralized in any way. Instead, channels
are light-weight virtual entities. Figure 1a depicts a set
of processes communicating using event channels. The
event channels are shown as existing in the space between
processes, but in practice they are distributed
entities, with bookkeeping data residing in each process
where they are referenced as depicted in Figure 1b.
Channels are created once by some process, and opened
anywhere else they are used. The process which creates
the event channel is distinguished, in that it is
the contact point for other processes wishing to use
the channel. The channel ID, which must be used to
open the channel, contains the contact information for
the creating process (as well as information identifying
the specific channel). However, event distribution is
not centralized and there are no distinguished processes
during event propagation. Event messages are always
sent directly from an event source to all sinks and net-work
traffic for individual channels is multiplexed over
shared communications links.
ECho is implemented on top of DataExchange[10]
and PBIO[8], packages developed at Georgia Tech to
simplify connection management and heterogeneous binary
data transfer. As such, it inherits from these packages
portability to different network transport layers
and threads packages. DataExchange and PBIO operate
across the various versions of Unix and Windows
NT, have been used over the TCP/IP, UDP, and ATM
communication protocols and across both standard and
specialized network links like ScramNet[6].
In addition to offering interprocess event delivery,
ECho also provides mechanisms for associating threads
with event handlers allowing a form of intra-process
communication. Local and remote sinks may both appear
on a channel, allowing inter- and intra-process
communication to be freely mixed in a manner that
is transparent to the event sender. When sources and
sinks are within the same address space, an event is delivered
by directly placing the event into the appropriate
shared-memory dispatch queue. While this intra-process
delivery can be valuable, this paper concentrates
on the aspects of ECho relating to remote delivery
of events.
2.2. Event Types and Typed Channels
One of the differentiating characteristics of ECho is
its support for efficient transmission and handling of
fully typed events. Some event delivery systems leave
event data marshalling to the application. ECho allows
types to be associated with event channels, sinks
and sources and will automatically handle heterogeneous
data transfer issues. Building this functionality
into ECho using PBIO allows for efficient layering that
nearly eliminates data copies during marshalling and
unmarshalling. As others have noted[18], careful layering
to minimize data copies is critical to delivering full
network bandwidth to higher levels of software abstrac-
tion. The layering with PBIO is a key feature of ECho
that makes it suitable for applications which demand
high performance for large amounts of data.
Base Type Handling and Optimization. Functionally,
ECho event types are most similar to user defined types
in MPI. The main differences are in expressive power
and implementation. Like MPI's user defined types,
ECho event types describe C-style structures made up
of atomic data types. Both systems support nested
structures and statically-sized arrays. ECho's type sys-
smilliseconds
(logscale)Data Structure Size
Round-trip Latency1Kb 100b
100Kb10.0.1
Java
CORBA
MPICH
ECho
Figure
2. A comparison of latency in basic data exchange in event
infrastructures
tems extends this to support null-terminated strings
and dynamically sized arrays. 1
While fully declaring message types to the underlying
communication system gives the system the opportunity
to optimize their transport, MPI implementations
typically do not exploit this opportunity and often
transport user defined types even more slowly than
messages directly marshalled by the application. In
contrast, ECho and PBIO achieve a performance advantage
by avoiding XDR, IIOP or other 'wire' representations
different than the native representation of
the data type. Instead, ECho and PBIO use a wire
format that is equivalent to the native data representation
(NDR) of the sender. Conversion to the native
representation of the receiver is done upon receipt with
dynamically generated conversion routines. As the measurements
in [4] show, PBIO 'encode' times do not vary
with data size and 'decode' times are much faster than
MPI. Because as much as two-thirds of the latency in a
heterogeneous message exchange is software conversion
overhead[4], PBIO's NDR approach yields round-trip
message latencies as low as 40% of that of MPI.
Type Extension. ECho supports the robust evolution
of sets of programs communicating with events, by allowing
variation in the data types associated with a
single channel. In particular, an event source may submit
an event whose type is a superset of the event type
associated with its channel. Conversely, an event sink
may have a type that is a subset of the event type associated
with its channel. Essentially this allows a new
field to be added to an event at the source without invalidating
existing event receivers. This functionality can
be extremely valuable when a system evolves because
it means that event contents can be changed without
the need to simultaneously upgrade every component
1 In the case of dynamically sized arrays, the array size is given
by an integer-typed field in the record. Full information about
the types supported by ECho and PBIO can be found in [8].1Kb
Data Structure Size
Delivered Bandwidth
100b
Mbits/secCORBA
Java
MPICH
ECho
Figure
3. A comparison of delivered bandwidth in event infrastructure
to accommodate the new type. ECho even allows type
variation in intra-process communication, imposing no
conversions when source and sink use identical types but
performing the necessary transformations when source
and sink types differ in content or layout.
The type variation allowed in ECho differs from
that supported by message passing systems and intra-
address space event systems. For example, the Spin
event system [23] supports only statically typed events.
Similarly, MPI's user defined type interfaces do not offer
any mechanisms through which a program can interpret
a message without a priori knowledge of its con-
tents. Additionally, MPI performs strict type matching
on message sends and receives, specifically prohibiting
the type variation that ECho allows.
In terms of the flexibility offered to applications,
ECho's features most closely resemble the features of
systems that support the marshalling of objects as mes-
sages. In these systems, subclassing and type extension
provide support for robust system evolution that is substantively
similar to that provided by ECho's type vari-
ation. However, object-based marshalling often suffers
from prohibitively poor performance. ECho's strength
is that it maintains the application integration advantages
of object-based systems while significantly out-performing
them. As the measurements in the next
section will show, ECho also outperforms more traditional
message-passing systems in many circumstances.
3. ECho Performance
3.1. Breakdown of Costs
Figures
2 and 3 represent the basic performance characteristics
of a variety of communication infrastructures
that might be used for event-based communication in
high performance applications. The values are of basic
event latency and bandwidth in an environment con-
5ECho CORBA MPICH XML
Total Round-Trip 30.6 53.0 80.1 1249
Network Transfer 13.9 13.9 13.9 182
x86 Decode 1.6 1.6 11.6 276
x86 Encode 0.015 0.64 8.9 124
Network Transfer 13.9 13.9 13.9 182
Table
Cost breakdown for heterogeneous 100Kb event exchange (times
are in milliseconds).
sisting of a x86-based PC and a Sun Sparc connected
by 100 Mbps Ethernet. 2 Note the use of a logarithmic
vertical scale in Figure 2. This is useful in presenting latencies
for a range of message sizes on the same graph,
but it tends to minimize the substantial performance
advantage that ECho demonstrates as compared to the
other infrastructures.
The infrastructures compared don't all share the
same characteristics and features, a fact that accounts
for some of their performance differences. ECho's
strength is that it provides the important features
of these systems while maintaining the performance
achieved by traditional high-performance systems like
MPICH.
In particular, ECho provides for event type discovery
and dynamic type extension in a manner similar to
that of XML, or that which can be achieved by serializing
objects as events (as in Java RMI). CORBA is also
gaining acceptance as distributed systems middleware
and its Event Services provide similar features. This
section will examine ECho's performance characteristics
in more detail and contrast them with these other
infrastructures.
Table
1 shows a breakdown of costs involved in the
roundtrip event latency measures of Figure 2. We
present round-trip times because they naturally show
all the combinations of send/recv on two different architectures
in a heterogeneous system. The time components
labeled "Encode" represent the span of time
between an application submitting data for transmission
and the point at which the infrastructure invokes
the underlying network 'send()' operation. The "Net-
work Transfer" times are the one-way times to transmit
the encoded data from sending to receiving ma-
chines. The "Decode" times are the time between the
end of the "recv()" operation and the point at which
the data is presented to the application in a usable form.
This breakdown is useful for understanding the different
costs of the communication and in particular, how they
might change with different networks or processors.
2 The Sun machine is an Ultra 30 with a 247 MHz cpu running
Solaris 7. The x86 machine is a 450 MHz Pentium II, also
running Solaris 7.
100Kb.00110.0
millisecond
(logscale)
.1
CORBA
MPICH
Sender Encode Times
Data Structure Size
Figure
4. Send-side data encoding times.
We have excluded Java RMI from the breakdown in
Table
1 because it performs its network 'send()' operations
incrementally during the marshalling process.
This allows Java to pipeline the encode and network
send operations making a simple cost breakdown impos-
sible. However, as a result of this design decision, Java
RMI requires tens of thousands of kernel calls to send
a 100Kb message, seriously impacting performance.
Additionally, while the round-trip times listed in Table
are near the sum of the encode/xmit/decode times,
this is not true for the CORBA numbers. This is
because implementations of the CORBA typed event
channel service typically rely on CORBA's dynamic invocation
interface to operate. In the ORBs we have ex-
amined, DII does not function for intra-address-space
invocations. The result of this is that the CORBA
typed event channel must reside in a different address
space than either the event source or event sink, adding
an extra hop to every event delivery. This could be
considered an implementation artifact that might be
handled differently in future CORBA event implementations
3.1.1. Sending side costs
ECho's most significant performance feature is its use
of the native data format on the sending architecture
as its 'wire format'. The effects of this approach are
most noticeable when comparing the "Encode" times
for the different communication infrastructures. Figure
4 expands upon the summary data of Table 1 and
shows sender-side data encoding costs for a variety of
communications systems. For example, MPICH uses a
very slow interpreted marshalling procedure for heterogeneous
communication of MPI user-defined data types.
That this has a significant impact on MPICH performance
sis apparent in Table 1 which shows MPICH devoting
as much as 60% of its round-trip message time
to encoding and decoding.
CORBA's IIOP wire format differs from the architec-
tures' native data layout in its alignment requirements.
As a result, CORBA must copy all application data before
sending. In ORBacus, this copy is performed by
compile-time-generated stub code, resulting in better
performance than with the MPICH approach. How-
ever, ECho is significantly faster because it performs
very little processing prior to the network send operation
Using XML as a wire format is obviously a decision
which has a significant performance impact on an event
system. Table 1 makes clear two of the most significant
issues: the large encode/decode times, and the
expanded network transmission times. The former is
a result of the distance between the ASCII representation
used by XML and the native binary data repre-
sentation. XML encoding costs represent the processing
necessary to convert the data from binary to string form
and to copy the element begin/end blocks into the output
string. Just one end of the encoding time for XML
is several times as expensive as the entire round-trip
message exchange for the other infrastructures. Net-work
time is also significantly higher for
XML because the ASCII-encoded data (plus the be-
gin/end labels) can be much larger than the equivalent
binary representation. How much larger depends upon
the data, the size of the field labels and other details
in the encoding. Thus, XML-based schemes transmit
more data than schemes which rely on binary encoding.
3.2. Receiving side costs
ECho's NDR approach to binary data exchange eliminates
sender-side processing by transmitting in the
sender's native format and isolating the complexity of
managing heterogeneity in the receiver. As a result, the
receiver must perform conversion of the various incoming
'wire' formats to its `native' format. Such a conversion
may require byte-order changes (byte-swapping),
movement of data from one offset to another, or even a
change in the basic size of the data type (for example,
from a 4-byte integer to an 8-byte integer).
This conversion is another form of the "marshal-
ing problem" that occurs widely in RPC implementa-
tions[1] and in network communication. Marshaling can
be a significant overhead[7,27], and tools like USC[21]
attempt to optimize marshaling with compile-time so-
lutions. Unfortunately, the dynamic form of the marshaling
problem in ECho, where the layout and even
the complete field contents of the incoming record are
unknown until run-time, rules out such static solutions.
The conversion overhead is nil for some homogeneous
data exchanges, but as Table 1 shows, can be significantly
high for some heterogeneous exchanges (up to
66%).
Generically, receiver-side overhead in communication
middleware has several components:
ffl byte-order conversion,
ffl data movement costs, and
ffl control costs.
Byte order conversion costs are to some extent unavoid-
able. If the communicating machines use different byte
orders, the translation must be performed somewhere
regardless of the capabilities of the communications
package.
Data movement costs are harder to quantify. If byte-
swapping is necessary, data movement can be performed
as part of the process without incurring significant additional
costs. Otherwise, clever design of the communications
middleware can often avoid copying data. How-
ever, packages that define a 'wire format' for transmitted
data have a harder time being clever in this area.
One of the basic difficulties is that the native format
for mixed-datatype structures on most architectures has
gaps, unused areas between fields, inserted by the compiler
to satisfy data alignment requirements. To avoid
making assumptions about the alignment requirements
of the machines they run on, most packages use wire formats
which are fully packed and have no gaps. This mis-match
forces a data copy operation in situations where
a clever communications system might otherwise have
avoided it.
costs represent the overhead of iterating
through the fields in the record and deciding what to
do next. Packages that require the application to marshal
and unmarshal their own data have the advantage
that this process occurs in special-purpose compiler-
optimized code, minimizing control costs. However, to
keep that code simple and portable, such systems uniformly
rely on communicating in a pre-defined wire for-
mat, therefore incurring the data movement costs described
in the previous paragraph.
Packages that marshal data themselves typically use
an alternative approach to control, where the marshaling
process is controlled by what amounts to a table-driven
interpreter. This interpreter marshals or unmarshals
application-defined data, making data movement
and conversion decisions based upon a description of the
structure provided by the application and its knowledge
of the format of the incoming record. This approach to
data conversion gives the package significant flexibility
in reacting to changes in the incoming data and was our
initial choice when implementing the PBIO technology
ECho is based on.
necessarily takes a different approach to receiver-side
decoding. Because the 'wire' format is a continuous
string, XML is parsed at the receiving end. The Expat
milliseconds
(logscale)
100Kb 10Kb 1Kb 100b10.0Data Structure Size
MPICH
CORBA
ECho
Receiver Decode Times
Figure
5. Receiver side costs for XML, MPI and NDR. (Logarith-
mic scale used in vertical dimension)
XML parser 3 [5] calls handler routines for every data element
in the XML stream. That handler can interpret
the element name, convert the data value from a string
to the appropriate binary type and store it in the appropriate
place. This flexibility makes XML extremely
robust to changes in the incoming record. The parser
we have employed is quite fast, but XML still pays a
relatively heavy penalty for requiring string-to-binary
conversion on the receiving side. (We assume that for
most high performance computing functions, data is being
sent somewhere for processing and that processing
requires the event data to be in other than string form.
Thus, XML decoding is not just parsing, but also the
equivalent of a C strtod() or similar operation to convert
the data into native representation.)
Comparison of receiver-side costs for XML,
ECho, and non-optimized ECho wire formats.
Figure
5 shows a comparison of receiver-side processing
costs on the Sparc for interpreted converters used by
XML, MPICH (via the MPI-Unpack()) call, and NDR.
receiver conversions are clearly expensive, typically
between one and two orders of decimal magnitude
more costly than our NDR-based converter for this heterogeneous
exchange. (For an exchange between homogeneous
architectures, ECho and MPI would have
substantially lower costs, while XML's costs would remain
unchanged.) Our NDR-based converter is relatively
heavily optimized and performs considerably better
than MPI, in part because MPICH uses a separate
buffer for the unpacked message rather than reusing the
receive buffer (as we do). However, ECho's receiver-side
conversion costs still contribute roughly 20% of the cost
3 A variety of implementations of XML, including both XML generators
and parsers, are available. We have used the fastest
known to us at this time, Expat [5].
milliseconds
(logscale)
100b
100Kb1.0
.1
Data Structure Size
ECho DCG
ECho
MPICH
Receiver Decode Times
Figure
6. Receiver side costs for interpreted conversions in MPI
and ECho and DCG conversions in ECho.
of an end-to-end message exchange. While a portion of
this conversion overhead must be the consequence of
the raw number of operations involved in performing
the data conversion, a significant fraction of this overhead
is due to the fact that the conversion is essentially
being performed by an interpreter.
Optimizing receiver-side costs for ECho. Our
decision to transmit data in the sender's native format
results in the wire format being unknown to the
receiver until run-time, requiring a somewhat costly interpreted
conversion. Our solution to this problem to
the problem is to employ dynamic code generation to
create a customized conversion subroutine for every in-coming
record type 4 . These routines are generated by
the receiver on the fly, as soon as the wire format is
known.
The execution times for these dynamically generated
conversion routines are shown in Figure 6. (We have
chosen to leave the XML conversion times off of this
figure to keep the scale to a manageable size. Again,
please note the use of logarithmic scale.) The dynamically
generated conversion routine operates significantly
faster than the interpreted version. This improvement
removes conversion as a major cost in communication,
bringing it down to near the level of a copy operation. In
particular, without dynamic code generation for conversion
routines ECho's practice of eliminating the sender-side
encoding cost by transmitting in the sender's native
format might not be viable. It is the combination
of these two techniques,
ffl transmitting in the sender's native format and
ffl using dynamic code generation for conversion routines
on the receiving side,
that is the key to ECho's efficiency. The PBIO binary
code generation facilities exploited by ECho exist for
most popular machine architectures, including Sparc,
4 More details on the nature of the ECho infrastructure dynamic
code generation can be found in [9].
s
ORBacus ECho
Send Receive Send Receive
Data size side side side side
overhead overhead overhead overhead
Table
Cost breakdown for homogeneous event exchange. (Times are in
milliseconds.)
MIPS, x86, and i960 machines.
3.3. Costs for Homogeneous Exchanges
Because ECho has virtually no sender-side encoding
costs and because its dynamic code generation achieves
performance similar to that achieved through compile-time
stub generation, ECho tends to outperform other
communication infrastructures. This is particularly apparent
in heterogeneous message exchanges because the
encode/decode time can play a significant role in overall
message costs.
However, ECho's approach also yields performance
gains for transfers between homogeneous systems, as
shown in Table 2. For simplicity, this table concentrates
on the ECho and ORBacus infrastructures. The
higher ORBacus costs for large data sizes represent the
cost of the required data copy in converting the IIOP
wire format to the native data representation. ECho
requires no such copy. 5 As in the heterogeneous case,
ECho does not pre-process data prior to sending, and
because the 'wire format' corresponds to the native data
representation, ECho can deliver received data directly
to the application without copying it from the message
buffer. This is not possible with IIOP because of potential
data alignment conflicts between IIOP and the
native data representation.
At common 100Mbps network speeds, these additional
data copy operations are account for a relatively
small fraction of the total exchange costs. How-
ever, minimizing data copies is critical to delivering
full network bandwidth to higher levels of software ab-
straction[18]. As gigabit networks and specialized low-latency
communications mechanisms come into more
common use, the additional copy operations imposed
on even homogeneous communications by fixed wire
formats will become a more important limitation on
communication speeds, increasing ECho's performance
advantage.
5 For the smaller data sizes, the extra copy overhead is small
compared to the fixed delivery costs in these systems.
.1
.01Mismatching fields000000000000111111111111000000001111111100001111Matching fields00001111
100Kb
Hetergeneous Receive Times
Data Structure Size
milliseconds
(logscale)
Figure
7. Receiver-side decoding costs with and without an unexpected
field - heterogeneous case.
3.4. Costs for Type Extension
In addition to efficient operation in basic event
fer, ECho supports the creation and evolution of sets
of collaborating programs through event type discovery
and dynamic type extension. ECho events carry format
meta-information, somewhat like an XML-style description
of the message content. This meta-information can
be an incredibly useful tool in building and deploying
enterprise-level distributed systems because it (1) allows
generic components to operate upon data about
which they have no a priori knowledge, and (2) allows
the evolution and extension of the basic message formats
used by an application without requiring simultaneous
upgrades to all application components. In other
terms, ECho allows reflection and type extension. Both
of these are valuable features commonly associated with
object systems.
data type information is represented during
transmission with format tokens which can be used to
retrieve full type information. These tokens are small
and are included in every ECho event transmission as
part of the header information. As such they do not
affect performance significantly.
ECho supports type extension by virtue of doing field
matching between incoming and expected records by
name. Because of this, new fields can be added to
events without disruption because application components
which don't expect the new fields will simply ignore
them.
Most systems which support reflection and type extension
in messaging, such as systems which use XML as
a wire format or which marshal objects as messages, suffer
prohibitively poor performance compared to systems
such as MPICH and CORBA which have no such sup-
port. Therefore, it is interesting to examine the effect
of exploiting these features upon ECho performance. In
particular, we measure the performance effect of type
extension by introducing an unexpected field into the
incoming message and measuring the change in receiver-side
processing.
Figures
7 and 8 present receive-side processing costs
.1
.010000111100001111Matching fields0000111100001111Mismatching fields
100Kb 10Kb 1Kb 100b
milliseconds
(logscale)
Data Structure Size
Homogeneous Receive Times
Figure
8. Receiver-side decoding costs with and without an unexpected
field - homogeneous case.
for an exchange of data with an unexpected field. These
figures show values measured on the Sparc side of heterogeneous
and homogeneous exchanges, respectively,
using ECho's dynamic code generation facilities to create
conversion routines. It's clear from Figure 7 that
the extra field has no effect upon the receive-side per-
formance. Transmitting would have added slightly to
the network transmission time, but otherwise the support
of type extension adds no cost to this exchange.
Figure
8 shows the effect of the presence of an unexpected
field in the homogeneous case. Here, the overhead
is potentially significant because the homogeneous
case normally imposes no conversion overhead in ECho.
The presence of the unexpected field creates a layout
mismatch between the wire and native record formats
and as a result the conversion routine must relocate the
fields. As the figure shows, the resulting overhead is
non-negligible, but not as high as exists in the heterogeneous
case. For smaller record sizes, most of the cost
of receiving data is actually caused by the overhead of
the kernel select() call. The difference between the
overheads for matching and extra field cases is roughly
comparable to the cost of memcpy() operation for the
same amount of data.
The results shown in Figure 8 are actually based
upon a worst-case assumption, where an unexpected
field appears before all expected fields in the record,
causing field offset mismatches in all expected fields.
In general, the overhead imposed by a mismatch varies
proportionally with the extent of the mismatch. An
evolving application might exploit this feature of ECho
by adding any additional at the end of existing record
formats. This would minimize the overhead caused to
application components which have not been updated.
4. Conclusions and Future Work
This paper examines ECho, an event-based middle-ware
designed to meet the demands of a new generation
of Grid applications. In particular, we consider
the communication/integration demands of component-based
systems in a high-performance computing environment
and how they might be different from those of
more tightly-coupled applications. ECho meets those
requirements by providing a publish-subscribe communication
model that supports type extension and type
discovery. While object-based and XML-based systems
provide similar functionality, the measurements in Section
3 show that ECho does it with significantly better
performance, both in terms of delivered bandwidth and
end-to-end latency. The measurements also show that
ECho matches and, in most cases, outperforms MPICH
in both metrics supporting our assertion that ECho is
suitable for use in the main data flows of Grid applications
Future work will examine aspects of ECho which are
beyond the scope of this paper. Those features include
derived event channels, which support for source-side
event filtering and remote data transformation, and
proto-channels, a mechanism through which receivers
can themselves control and customize source-side event
generation. We will also expand upon ECho's ties to
other systems, including CORBA and Java.
--R
The impact of language and system on remote procedure call design.
Katarzyna Kea- hey
Asynchronous notifications among distributed objects.
Efficient wire formats for high performance computing.
Scramnet networks.
Architectural considerations for a new generation of protocols.
Portable self-describing binary data streams
Fast heterogeneous binary data interchange.
performance communication in distributed laboratories.
Formalizing design spaces: Implicit invocation mechanisms.
An introduction to software architecture.
Object Management Group.
A language for proving theorems in robots.
Configuring scientific applications in a heterogeneous distributed system.
ACDS: Adapting computational data streams for high performance.
Efficient layering for high speed communication: Fast messages 2.
The information bus - an architecture for extensible distributed systems
Universal stub compiler.
The diesel combustion collaboratory: Combustion researchers collaborating over the internet.
Dynamic binding for an extensible system.
A channel for distributed microscopy and informatics.
Foundations for the study of software architecture.
Performance or Firefly RPC.
Elvin has left the building: A publish/subscribe notification service with quenching.
Software Architecture: Perspectives on an Emerging Discipline.
An information flow based approach to message brokering.
The jini
An infrastructure for collaborating mobile agents.
--TR
--CTR
James A. Kohl , Torsten Wilde , David E. Bernholdt, Cumulvs: Interacting with High-Performance Scientific Simulations, for Visualization, Steering and Fault Tolerance, International Journal of High Performance Computing Applications, v.20 n.2, p.255-285, May 2006 | publish/subscribe communication;event services;component architectures;middleware;dynamic extensibility |
592978 | Scalable Session Locking for a Distributed File System. | File systems provide an interface for applications to obtain exclusive access to files, in which a process holds privileges to a file that cannot be preempted and restrict the capabilities of other processes. Local file systems do this by maintaining information about the privileges of current file sessions, and checking subsequent sessions for compatibility. Implementing exclusive access in this manner for distributed file systems degrades performance by requiring every new file session to be registered with a lock server that maintains global session state. We present two techniques for improving the performance of session management in the distributed environment. We introduce a distributed lock for managing file access, called a i>semi-preemptible lock, that allows clients to cache privileges. Under a semi-preemptible lock, a file system creates new sessions without messages to the lock manager. This improves performance by exploiting locality the affinity of files to clients. We also present data structures and algorithms for the i>dynamic evaluation of locks that allow a distributed file system to efficiently manage arbitrarily complex locking. In this case, complex means that an object can be locked in a large number of unique modes. The combination of these techniques results in a distributed locking scheme that supports fine-grained concurrency control with low memory and message overhead and with the assurance that their locking system is correct and avoids unnecessary deadlocks. | Introduction
Distributed file systems have become the principal method for sharing data in distributed applications. Programmers
understand file system semantics well, and use them to easily gain access to shared data. For
exactly the same reason that distributed file systems are easy to use, they are difficult to implement. The
distributed file system takes responsibility for providing synchronized access and consistent views of shared
data, shielding the application and programmer from these tasks, but moving the complexity into the file
system. A distributed client-server file system presents a local file system interface to remote and shared
data. The file system client takes responsibility for implementing the semantics of the local file system and
translating the local interface onto a client/server network protocol. For heterogeneous distributed file systems
(many client operating systems), the system may be translating the semantics of several different local
file systems onto a single network protocol.
In this work, we present a locking construct, called file session locks, that implement sessions on files
defined by open and close calls from an application. File sessions enforce concurrency constraints; e.g., if
one client opens a file for exclusive writing, permitting no concurrent readers, opens for read on other clients
must be forbidden. These locks are not designed to provide data consistency or cache coherency - a suitable
cache coherency protocol is required in addition to file session locking. Instead, the locks allow clients to
choose from among the many exclusive access and sharing options available in its native file system interface
and have the semantics of the local open enforced throughout a distributed system.
To help encode and enforce sessions in a distributed environment, we contribute the semi-preemptible
lock, which allows file system client to cache session privileges. A client holding a semi-preemptible lock
on a file has the right to access a file in any of the modes specified by its held lock. Clients maintain their
own file open (session) state locally, and do not need to transact with the file system server when opening or
closing a file. Clients may continue to hold such a lock even when they have no open instances. In this way,
a client can cache access privileges, the right to open a file, and service subsequent open requests without a
message to the server. This mechanism reduces server traffic by eliminating open and close messages, and
consequently reduces latency by avoiding message round trip time. Clients cache access privileges to a file
on the belief that the file will be used again locally before being used by another client.
Semi-preemptible locks also reduce distributed lock state. Clients often hold multiple open instances of
a single file concurrently. Clients locally create concrete locks for each session which are held under (or in
the context of) a distributed lock. All of these open instances can be granted under a single semi-preemptible
lock, rather than holding a separate lock for every open. A single semi-preemptible lock summarizes all of
the client's open state to the distributed system.
Semi-preemptible locks combine two concepts in lock management. First, clients manage locks hierarchically
to separate session state from lock state. Second, clients use semi-preemptibility, also called
lazy-revocation or sticky locks [24], to retain privileges on files in the absence of active sessions. We use
the term hierarchical differently than most of the locking literature. Generally, the term hierarchical describes
locks held concurrently on different levels of abstraction on the same data object to achieve granular
locking [12, 27]. Instead, we use the term to describe two levels of locking - the higher level is abstract,
summarizing client lock state to the server, and the lower level is concrete, representing sessions.
The interface to open a file (create a session) has many options that allow an application to specify its
intended actions and restrict concurrent actions by other clients. To express these options, locks on these data
generally have multiple locking modes each with unique semantics. The number of different possible locking
modes increases exponentially with the number of access methods and locking for a complex data object
using existing methods quickly becomes unmanageable. We take the Windows-NT interface as an example
to establish this point. The file system takes six binary arguments when opening a file which requires 64
unique locking modes to describe all sessions. Considering locking modes pairwise for compatibility, there
are 4096 combinations. Locks are compatible if they can be held concurrently. Furthermore, the large
number of modes in this interface do not fully specify all possible access modes. For example, they do not
address concurrent or exclusive access to file system metadata.
Existing methods for lock management fall short in that they either fail to scale well as the number of
locking modes become large, or they are ad hoc systems that are poorly specified. Database systems employ
a static data structure, called a lock compatibility table [12], that describes the relationships between all
locking modes pairwise. This data structure fully specifies the interactions between locking modes, but
grows quadratically in size with respect to the number of locking modes. Alternatively, modern file systems
use ad hoc rule-based methods to evaluate locks that are efficient and compact [16]. However, without
formally specified semantics, the interactions between locking modes can be difficult to reason about and
implement correctly.
We present a formal specification of locking modes and derive from this a data structure and algorithms
for the management of distributed locks called dynamic evaluation. Our methods have the advantage of
scaling well with the number of locking modes. In addition, they specify fully the interactions among all
locking modes, which eases the implementation of a correct locking protocol. Our system obviates the
need for static data structures, such as the lock compatibility tables used in database systems, which require
memory
in
respect to the number of legal locking modes. In our system, lock compatibility
is evaluated algorithmically based on small static lock structures that require memory in O(log n). While,
a distributed file system provides a good example of a complex locking system, we feel the dynamic lock
evaluation has wide applicability to distributed systems.
2 A Storage Area Network File System
A brief digression into the file system architecture in which we implement file session locking helps to
motivate the performance advantages. In the Storage Tank project at IBM research, we are building a
distributed file system on a storage area network (SAN) (Figure 1). A SAN is a high speed network that
Storage Area Network
Control Network
Tape
Server
Server
Server
Client
Client
Client
Server Cluster
Figure
1: Schematic of the Storage Tank distributed file system on a storage area network (SAN).
gives computers shared access to storage devices. Currently, SANs are being constructed on Fibre Channel
networks [4]. In the future, we expect network attached storage devices to be available for general
purpose data networks, so that SANs can be constructed for networks such as Gigabit Ethernet [9]. A
distributed file system built on a SAN removes the server bottleneck for I/O requests by giving clients a
direct data path to disks.
File system clients on a SAN access data directly over the storage area network. In contrast, most
traditional client-server file systems [26, 14, 16, 7] store data on the server's private disks. Clients function
ship all data requests to a server that performs I/O on their behalf. Unlike traditional file systems, Storage
Tank clients perform I/O directly to shared storage devices. This direct data access model is similar to the
file system for network attached secure disks (NASD) [11], using shared disks on an IP network, and the
Global file system [21], for SAN attached storage devices.
Clients communicate with Storage Tank servers over a general purpose network to obtain file metadata.
In addition to serving file system metadata, the servers manage cache coherency protocols, authentication,
and the allocation of file data (managing data placement and free space).
Unlike most file systems, metadata and data are stored separately. Metadata, including the location of
the blocks of each file on shared storage, are kept at the server. The SAN storage devices contain only the
blocks of data for the files. In this way, the shared devices on the SAN can be optimized for data traffic,
block transfer of data, and the server private storage can be optimized for a metadata workload, frequent
small reads and writes.
The SAN environment simplifies the distributed file system server by removing its data tasks, and radically
changes the server's performance characteristics. Previously, server performance was measured by
data rate. Performance was occasionally limited by network bandwidth, but more often limited by the
server's ability to read data from storage and write it to the network. In the SAN environment, a server's
performance is more properly measured in transactions per second, analogous to a database server. Without
data to read and write, the Storage Tank server performs many more transactions than a traditional file server
with equal processing power.
Without the relatively slow process of shipping data from the client to the server to hide protocol over-
head, minimizing the message traffic for file system operations becomes important. Protocol overhead is the
network and server resources and added latency used for client-server messages. In traditional client-server
file systems, clients go to the server to obtain data. Because shipping data to the client takes significantly
longer and uses many more resources than a single server message, the overhead associated with the messages
for opening and closing a file are hidden by the cost of shipping data. In Storage Tank, protocol
overhead limits performance. When the semi-preemptible lock allows a client to open a file without contacting
the server, a message is avoided and time is saved on the critical path.
3 Semi-Preemptible File Locks
For distributed files systems, little data sharing occurs in practice [2, 17], where data sharing indicates two
clients concurrently accessing the same file. Additionally, clients often access data that they have recently
used. These claims are supported by the effectiveness of data caching in this environment [19, 15]. More
mature distributed file systems [14, 7, 24, 16, 1, 13, 19, 23] take advantage of this observation and cache file
data at clients even when no process actively uses the data. The design decision to cache file data after a file
has been closed improves performance when a subsequent open from the same system is more likely than a
request from another client to access the same data. For subsequent accesses, caching improves performance
by avoiding a server message and data read from disk. However, if another client attempts to access the same
data, it sees additional latency while the file system server invalidates the cache of the client that holds data
before granting access to the new client.
For the same reasons that caching improves performance on data access, the semi-preemptible lock
improves performance on file open. When a local process requests an open for a file, if no lock is held, the
client obtains a semi-preemptible lock before granting the open. When the local process closes the file, the
client records that there are no open file instances currently using the lock, but holds onto the lock awaiting
future opens of the same file. Analogous to data caching, holding access locks past close decreases latency
by avoiding a server message on subsequent opens. But, caching locks adds latency to opens from other
clients, because the server must revoke the lock before granting access to the other client.
Server Client A Client B
Open Instance
Locks Held Open Files
Client A
Semi-Preemptible Demand Messages
Open State at Clients
Client B
Figure
2: Demands for the semi-preemptible lock are accepted or denied depending upon client file system
open state.
By recording the open instances associated with each access lock, a client differentiates locks that are
held to protect open files, and therefore cannot be released, from locks that are held to improve performance
on subsequent opens. Consider that a second client wishes to obtain exclusive access to a file that is already
locked by a first client. The server processes the second client's request by demanding 1 the lock from the
first client, sending a message that requests the release of the held lock. If the first client holds an open
instance of that file, it requires the held lock to protect that instance and denies demand requests from the
server (Figure 2). However, if no process holds an open instance, the client no longer utilizes the held lock
and releases it safely. These access locks are called semi-preemptible because the server must demand them,
as if they were preemptible locks. However, a client can refuse a demand request.
The semi-preemptible locking system is particularly appropriate for our SAN-based distributed file sys-
tem, because data are not obtained through the server. When a lock is held, a client can directly access the
data from shared storage, and need not interact with the server at all. Without direct access storage, clients
must interact with servers for data, and these file systems cannot save a message from semi-preemptible
locking.
We use the term "demand" for consistency with existing terminology despite the fact that clients can refuse a demand. A term
like "request" would more appropriately describe the server's action, but request is often used to describe the client's process for
acquiring locks from the server.
Managing Complexity
Lock management includes both the locking protocol and the lock evaluation. Protocol describes how locks
are obtained and released and, in our system, we use the semi-preemptible protocol. Lock evaluation is the
enforcement of semantics of the locks themselves and the semantics are encoded in the lock mode. For file
session locks, the mode defines the actions that are allowed under a lock and actions that are restricted by
concurrent sessions. In a file system, there are a large number of possible locking modes, describing all
possible combinations of actions and restrictions.
Evaluation of locks becomes difficult as the number of locking modes grows large. Techniques that
reduce the number of locking modes have been explored as an alternative to implementing the full complement
of possible modes. Although these techniques reduce complexity, they negatively affect concurrency
and reduce performance. In Storage Tank, we implement all possible locking modes for the greatest degree
of concurrency and application correctness. However, we describe other techniques for comparison.
4.1 Implementing Subsets
By implementing a chosen subset of all possible locking modes, some systems trade reduced complexity for
minor semantic violations. File systems often select a set of distributed locks for file access that are simpler
than the semantics of the underlying file open system call [7, 15]. The mismatch between open semantics
and locking results in either concurrent opens being allowed that violate open semantics, or concurrent opens
being disallowed that open semantics would permit. File systems opt to disallow legal opens because this
policy impinges on concurrency rather than correctness.
An extreme example of a subset is to protect an object with a single exclusive lock. This lock is very easy
to reason about, implement, and manage. One client holds it at a time, and it gives that client total control
over the locked object. However, this lock allows no concurrent action by other clients. For sessions, this
would mean that there can only be one open instance of a file at a time. Single exclusive locks operate
reasonably for a data consistency protocol, in which locks can be preempted. However, for non-preemptible
locks, the concurrency restrictions are intolerable.
4.2 Multiple Simple Locks
Breaking a single complex lock into multiple locks with simpler semantics is another technique for reducing
complexity. While this strategy is desirable, because each individual lock has few modes and therefore is
easy to manage, it introduces either deadlock or livelock and ultimately limits performance. Problems arise
as the locks are not truly independent. Applications require multiple locks to be held concurrently for their
operation, and application semantics tie seemingly independent locks together.
Any complex set of locking modes for a single lock can be implemented as multiple locks each with
simple semantics that are obtained individually. For example, a lock that protects a data file for both writing
data and updating metadata can be broken down into two separate locks, one for writing and one for metadata
update. However, both locks cannot be obtained atomically.
For example, clients that need to obtain multiple preemptible locks to conduct an operation can experience
livelock and have no guarantee that they will ever make any progress. Consider two clients trying to
obtain the same set of locks. Both clients hold some locks currently and request the remaining locks. As
each client obtains some locks, other locks are revoked. Neither client ever has the guarantee that it will get
the full complement of locks needed to continue. Increases in the number of clients, resource contention,
and number of locking modes all exacerbate livelock.
Techniques that eliminate livelock introduce deadlock. To eliminate livelock, clients that need multiple
locks can deny or ignore revocation on its currently held locks while awaiting the other locks it requires.
The same two clients in our livelock example, each requesting the same set of locks, would be at an impasse
if they ignored revocation. Neither client releases the locks it holds, and neither client obtains the locks it
needs. Deadlock is generally handled through either avoidance or detection [12]. Regardless of the chosen
technique, dealing with deadlock always incurs a performance penalty.
Protecting all accesses using a single lock with more complex semantics, rather than multiple individual
locks, avoids deadlock, livelock, and the associated inefficiencies. Rather than needing to obtain multiple
locks, applications atomically obtain a single lock. The request can be evaluated immediately at the server
and granted or denied. Application and lock state always progress.
5 Compatibility Tables
For comparison against our system of dynamic evaluation, we present the compatibility table which has
been developed to manage distributed concurrency in databases [12]. Our key criticism of this structure is
that it does not scale well when the number of locking modes becomes large. To be fair, in databases the
number of locking modes tends to be very small (in contrast to file systems) and these static data structures
are more than adequate.
A compatibility table determines whether incoming lock requests can be granted in conjunction with
currently outstanding locks. A system defines a set of locks and fills out this data structure, which defines
Symbol Name Description
r Read Reader lock
w Write Reader and writer lock
s Shared Reader lock, no writers
Update Writer lock, no writers
Exclusive No readers or writers
Held
Requested None r s w u x
Table
1: Locking modes and the compatibility table for file system open mode locks.
how these locks are managed.
When opening a file, clients select a locking mode that best matches the semantics of its open and
requests the corresponding lock from a locking server. The server uses the compatibility table to evaluate
whether the incoming request can be serviced. We present an example based on the locking modes and
compatibility table in Table 1, which are a subset of all possible locks. The table consists of rows that index
the mode of the incoming lock request and columns that index locks currently held by other clients. The table
cells that hold a plus indicate that the request is compatible with the outstanding lock, or a minus indicating
that the requested and held lock are in conflict. For example, if a server receives a request for a w (write) lock
on a file with outstanding locks r (read) and s (shared), it evaluates the locks as follows. It first looks up the
cell for requested mode w and held mode r and sees that the lock modes are compatible. It then continues
to evaluate w against s and, seeing that they are incompatible, the w lock cannot be immediately granted
given current lock state. The server demands the s lock and grants the w lock if the demand succeeds.
For n locking modes, the compatibility table contains n 2 entries. For databases and other systems with
few locks, programming a compatibility table presents no problems. However, when we looked at implementing
this structure for all possible locks in a distributed file system, the amount of state was daunting,
and we were concerned with the correctness and maintenance of our implementation.
6 Dynamic Lock Evaluation
To reduce the memory used by static locking data structures, we define simple algorithms for evaluating the
compatibility of lock requests. These algorithms require the client and server to store only the number of
allowable access methods, k, and need not record every lock mode and the associated compatibility table.
These algorithms support all possible locking modes for a given set of access modes, unlike systems that
implement a subset of all possible locks to limit complexity.
Our algorithms use the following quantities:
L Set of locking modes
A Set of valid access modes
permitted access modes
disallowed sharing modes
Each lock X can be appropriately thought of as an ordered pair hP X ; DX i of the access modes that it
permits and the access modes it disallows. Permitted modes are the access methods that the lock holder
can perform. Disallowed modes are the access methods that the lock holder forbids other clients from
performing concurrently. Both the permitted and disallowed access modes vary over all possible subsets of
the set A. Thus for A containing k different access modes, there are 2 2k different potential locks, because
the number of distinct subsets of A equals 2 k .
To develop algorithms for evaluating lock state, we begin by casting the definition of lock compatibility
in set theoretic terms. From this definition, we create simple algorithms for evaluating lock requests at
the server and processing local open requests and server lock demands at the client. Lock compatibility is
evaluated in a dynamic fashion; i.e., compatibility need not be pre-computed and stored in tables.
Definition 6.1 (Compatibility) Lock X and Y are compatible iff PX \ D
Two locks are compatible if they do not forbid the access modes that the other lock protects. Compatibility
must be symmetric so that the lock state in a distributed system has no dependence on the order in which
locks are acquired. This helps avoid non-deterministic behavior due to race conditions. For illustration,
consider that compatibility were not symmetric. We could have two locks, X and Y , with X compatible
with Y but not vice versa. If two clients were obtaining these locks and lock X were obtained first, then
another client could get lock Y . On the other hand, if Y were obtained first, X would be unavailable. The
final lock state would vary depending upon the order in which the lock requests arrive.
In addition to lock compatibility, used to evaluate lock requests, clients require the concepts of lock
strength and weakness to manage locks hierarchically and determine lock transitions. Strength and weakness
are used by clients when either upgrading a held lock to service a local file open request or downgrading a
lock in response to the server's demand.
Definition 6.2 (Strength) Lock X is stronger than lock Y iff P Y PX and D Y
Definition 6.3 (Weakness) Lock X is weaker than Y iff Y is stronger than X .
A stronger lock permits more access methods and restricts sharing when compared with a weaker lock. The
strength and weakness definitions include identical locks; i.e., two identical locks are both mutually stronger
than each other and weaker than each other. Although this abstraction seems incongruous, it simplifies
locking algorithms by addressing boundary conditions.
The following theorems help show that these definitions match our intuition for file access locking and
have semantics identical to the compatibility, strength, and weakness of static locking data structures. First,
a lock hierarchy can only be valid if the strength and weakness relations are transitive, required conditions
for an ordering.
Theorem 6.1 X stronger than Y and Y stronger than Z implies X stronger than Z .
Proof. X stronger than Y implies that P Y PX and D Y DX . Also, Y stronger than Z implies that
From these, we observe that P Z PX and DZ DX , which is exactly the
condition for X stronger than Z .
Corollary 1 X weaker than Y and Y weaker than Z implies X weaker than Z .
Lock strength is closely related to compatibility and will be used to help determine transitions among locking
modes in our system. This next theorems express key concepts that clients use to summarize locks and
evaluate lock transitions.
Theorem 6.2 If X is weaker than Y then all locks compatible with Y are compatible with X .
Proof. When X weaker than Y , PX P Y and DX D Y . Also, for any lock Z compatible with Y ,
This implies that PX \ We conclude that X
is compatible with Z . As we have not constrained Z , X is compatible with any lock compatible with Y .
Corollary 2 If X is not compatible with Y then all locks stronger than X are also incompatible.
Proof. For the sake of contradiction, conjecture an Z , stronger that X , that is compatible with Y . By
Theorem 6.2 Z compatible with Y implies that X is compatible with Y . This establishes the contradiction
and no such Z can exist.
The presented description of locks defines the semantics that must be implemented by lock evaluation
algorithms. The algorithms for dynamic lock evaluation compare lock requests and transitions to these
definitions, rather than performing a look up in a preset data structure. This eliminates the memory required
to store lock tables.
O L1 O L2 O L3 O L4
O L3
O L3
O L2 O L3 O L4
O L4
Summary
Bitlocks
bit 1:
bit 2:
bit 3:
bit 4:
bit 5:
bit
bit 7:
bit 8:
Outstanding
O
O
O
O
O
Figure
3: Lock management data structure.
7 A Summarizing Data Structure for Lock Evaluation
In addition to the formal definition of lock semantics, we require data structures at the lock requester (client)
and lock granter (server) to fully specify algorithms. For lock evaluation, the server has the task of receiving
incoming lock requests and evaluating the compatibility of these requests against currently outstanding
locks. Obvious implementations might elect a data structure that enumerates all outstanding locks and,
when receiving a new lock request, the server iterates over existing locks comparing compatibility with the
requested lock. Implementations based on lock tables work in exactly this fashion, performing a table look
up that compares the requested lock against each currently outstanding lock.
We define a data structure that allows our algorithms to evaluate lock compatibility directly, without
iteration. The fundamental concept of this data structure is to summarize the sharing restrictions and permitted
access modes of all outstanding locks in a single location and evaluate incoming lock requests against
the summary. The data structure also allows the server to find all locks that need to be demanded directly,
without searching.
This concept of summarizing lock state is similar, but more general than, using the strongest outstanding
lock as a representative for all outstanding locks [12]. However, our system makes provisions for locks that
are compatible yet not strength-related, which occurs when all possible combinations of access modes are
allowed.
The lock summary data structure contains a list of all outstanding locks in addition to the summary itself,
which indexes the list of locks (Figure 3). This allows the data structure to evaluate new lock requests against
the summary, but also permits the contribution of any individual lock to the summary to be calculated and
removed when the lock is released.
In the lock summary data structure, we use a bit vector to represent any individual lock. For a locking
system with k unique access modes, the bit vector contains 2k bits. The first k bits correspond to the
set of access modes that a lock permits. The next k bits indicate the set of access modes that the lock
disallows. For example, in a locking system with metadata read, metadata write, read, and write access
modes (m r the bit vector h1011 : 0001i describes a lock that permits metadata read and data read
and write while disallowing other clients from holding a write privilege. We punctuate the bit vector with a
colon to indicate the semantic differences between the first and second k bits.
The data structure contains a list, called the Outstanding list, of all individual locks currently held by
clients. The list holds a description of each lock, its 2k bits describing permitted access and concurrently
disallowed locking modes (h
i), and is indexed by lock identifier (L i ).
stands for the bit vector
representation of set P . The server picks lock identifiers for incoming lock requests, and all subsequent
lock operations are conducted by lock identifier. Since all client/server lock operations are conducted in the
context of lock identifier, the server can always look up entries in this list quickly. It is possible to maintain
this list as an ordered index, so that locks can be looked up by name in O(1), but engineering restrictions 2
often require unique, non-decreasing lock identifiers. These lock identifiers are maintained using extendible
hashing [8] for scalability and fast look up, in time O(log n) for n outstanding locks.
The data structure also contains a summary of all outstanding locks. The lock summary consists of the
union of all permitted access modes and the union of all disallowed concurrently held modes. For a system
with locks L outstanding, the summary is:
i: (1)
In our data structure, we represent the summary using bit vectors for sets, as if it were a single lock. The
set operations for union and intersection are computed using logical operators on bit vectors: "bit-wise or"
_ for union and "bit-wise and" ^ for intersection. These bit operators can be legally applied to two vectors
of the same length and operate pairwise on the bits in each vector, producing a result bit vector of the same
length.
Our implementation encodes the two unions of the summary in terms of bit operations, whose bit components
can be expanded to arrive at an equivalent logical expression.
_
_
By maintaining the union of the permitted and disallowed lock modes at all times, the server can implicitly
evaluate the compatibility of an incoming lock request against all locks by evaluating the request against the
summary. A requested lock it does not disallow any access modes permitted
recovery [3] benefit from unique and non-decreasing lock identifiers.
by the summary, and the summary does not disallow any permitted modes it accesses, i.e.
The intuition behind the summary is that all the lock state in the system can be represented by an equivalent
single lock, constructed from the union of all permitted and concurrently prohibited access modes.
In addition to the summary and Outstanding lists, we require additional lists to aid in processing lock
requests and efficiently maintaining the summary. For each bit in the lock summary, we keep a BitLocks
structure that contains a list of the locks in Outstanding that set that bit high. Each BitLocks list describes
the set of locks that contribute to setting an individual bit of the summary high. Our algorithms for lock
management use this list to efficiently determine what locks need to be revoked when a requested lock is not
compatible with current lock state.
Each lock in Outstanding also has references (pointers) to the locations in all BitLocks lists in which
the lock appears. When a lock is released, the lock management algorithms use these references to quickly
remove the released lock from all BitLocks lists. The references actually point from the entry in the Outstanding
list to the actual entry in the BitLocks list and not to the head of a list as the diagram might
indicate. This allows the algorithm to look up an entry in the BitLocks list in unit time.
7.1 Correctness
To establish that evaluating lock requests based on this summary (Equation 3) is correct, we show that the
summary expression can be derived as a logical simplification of the compatibility criteria: a requested lock
is compatible with outstanding lock state and can be granted if it is compatible (Definition 6.1) with all
outstanding locks.
For a system with locks L outstanding, the requested lock must be evaluated for compatibility
against locks L
_
_
_
This transformation shows that evaluation against the summary is equivalent to evaluation against all
outstanding locks and is the original motivation for the summarizing data structure. We first developed the
formalism for locking presented in Section 6. Upon seeing the expression for evaluating the compatibility
of a single (requested) lock against a set of compatible (outstanding) locks, we determined that it can be
simplified. The summarizing data structure for lock evaluation merely captures the logical simplification.
8 Algorithms for Lock Management
Based on both dynamic lock evaluation and the semi-preemptible protocol, we develop a set of algorithms
for managing a distributed set of locks. These algorithms are based on the summarizing data structure
and logical rules for lock evaluation. They also capture our design goal of eliminating lock state using
hierarchical locking.
In Storage Tank's semi-preemptible protocol, we restrict each client's lock holdings to a single distributed
session lock for each file. Clients may have many local open instances of that given file protected
by a single lock.
Clients must be able to modify their currently held lock - change the protected access and sharing
without releasing the lock. This need arises in two instances: (1) when the client holds a semi-preemptible
lock protecting local open instances and another client requests a lock for that file that does not conflict with
the open instances, but is incompatible with the held semi-preemptible lock; and (2) when a client holding
a semi-preemptible lock that protects open instances has a local process request another open instance,
compatible with current open instances, that has access and sharing requirements the semi-preemptible lock
cannot provide. In the first case, the held lock is too strong and the client must convert it to a weaker and
compatible lock that still protects the open instances. This process is a lock downgrade. The client cannot
release its lock outright and obtain a weaker lock because it has current open instances to protect. For
downgrades, the lock demands received from a server must contain the type of file access lock requested
so that clients can resolve compatibility and the appropriate downgrade. In the second case, the held lock
cannot provide the access and sharing requirements of the new request. The held lock is too weak and the
client attempts to obtain a stronger lock that can protect all of the current open instances and the new request.
Obtaining the stronger lock while continuing to hold the old lock is called a lock upgrade. The concepts
of strength and weakness help the system determine what action to take, i.e. how to change lock state to
service local open requests or server demand messages.
We note that upgrade does not lead to deadlock for file session locks. In databases, the term upgrade
is sometimes used interchangeably with the term promotion [12], which describes a process reading a data
object under one lock and promoting the lock before writing. This type of promotion leads to deadlock. For
example, if two processes reading the same object both hold the weaker lock and require the stronger lock
for writing, then neither will receive the promoted lock, because neither will release the weaker lock which
protects the contents of the object that it has read. In contrast, for file session locks an upgrade changes
the abstract distributed lock and does not modify the mode of an actual session; i.e., upgrades are not
promotions. Conflicting upgrades of session locks do not result in deadlock, because the semi-preemptible
protocol allows the server to deny conflicting lock requests.
8.1 Server Algorithm
The server acts as a central management authority for granting and revoking locks. It takes incoming lock
requests from clients, takes action by revoking outstanding locks to make the requested lock compatible,
and grants the request when possible. To perform these actions, the server uses the summarizing locking
data structure.
The server receives lock requests from multiple clients concurrently and processes these requests seri-
ally. Distributed locking requires that all lock state changes occur atomically. For this reason, the server
considers one lock operation at a time. Multiple requests for the same lock are queued at the server and
executed serially. Processing one lock request may result in multiple changes in lock state. That is, before
granting a lock a server may demand multiple locks and reflect many state changes on the summary. How-
ever, these are server-driven state changes rather than client requests and, therefore, are conducted in the
context of a single client-initiated lock request.
Upon receiving an incoming lock request, the server must evaluate the requested lock for compatibility
and demand incompatible locks before granting the request. The server follows the steps in Figure 4 to
EvaluateLockRequest
Inputs: The requested lock
DR i and the lock summary data structure.
Evaluate the compatibility of the requested lock.
1. If (
0 , the lock is compatible. Proceed to step 5 to grant the lock.
2. Else Demand all incompatible locks.
(a) For all non-zero bits in
demand the locks from the summary that disallow the
access modes desired by the requested locks, i.e. for
then demand all locks in BitLocks(i
(b) Similarly, for all non-zero bits in
DR demand the locks from the summary that
permit access for the bit the requested lock disallows, i.e. for
DR (i) then demand all locks in BitLocks(i).
3. Receive and process all responses to demand requests using function ReleaseLock or by
downgrading the lock.
4. If any lock holder refuses the demand, deny the lock request and Return.
5. Grant the requested lock. Reflect the change in lock state on the summary data structure using
GrantLock and Return.
Figure
4: Server routine for evaluating incoming lock requests.
determine the compatibility of the incoming lock request with respect to current system state. The server first
evaluates the lock against the summary (step 1) to determine if the lock is compatible with all outstanding
locks and can be granted immediately.
If the request cannot be immediately fulfilled, one or more currently outstanding locks conflict with
the request and must be demanded. The server determines and demands the set of conflicting locks in step
2. Outstanding locks can be incompatible because they disallow one of the access modes required by the
requested lock (step 2(a)). Alternatively, outstanding locks can be incompatible because they permit an
access mode the requested lock disallows (step 2(b)). The routine evaluates the conflicting access modes
using the requested lock and the summary. For all high bits in
DR , the routine demands
all locks that set those bits. The remainder of the routine implements the semi-preemptible lock protocol
through client/server interactions. If any client denies a demand, the requested lock is refused. Otherwise,
if all demands succeed, the server grants the lock request (step 5).
The routine to evaluate lock requests results in outstanding locks being released and a new lock being
granted, which changes the global lock state. The server updates the locking data structure to reflect these
changes using subroutines when granting a lock (Figure 5) and when clients release locks (Figure 6).
When granting a lock, the server updates the locking data structures to reflect the new outstanding lock
Figure
5). The new lock is added to the list of outstanding locks (step 1). The summary is modified to
reflect the change in lock state (step 2). Finally, for every access mode permitted or disallowed, the new
lock must be added to the BitLocks list and references added from the lock entry in Outstanding to the
entries in BitLocks.
GrantLock
Inputs: The lock to be granted
DG i and the lock summary data structure.
1. Register the lock to be granted in the list of outstanding locks. Create entry O
in the list Outstanding.
2. Calculate the contribution of the lock to be granted to the summary.
(a)
PG .
(b)
DG .
3. Add a reference to G in the BitLocks data structures for each bit it permits and each it disal-
lows. For each entry add a link from OG to the BitLocks list.
(a) For
(b) For to BitLocks(i).
Figure
5: Server routine for updating the summarizing data structure when granting a lock.
When clients release locks, the server updates its data structure using the routine in Figure 6. Releasing
a lock consists of removing the lock from the list of Outstanding locks (step 3), updating the summary to
reflect the change of state (step 2), and removing references to the lock (step 1).
We do not present algorithms for processing upgrade requests and downgrade requests because these
operations can be treated as combinations of release and request. The important difference between upgrade
ReleaseLock
Inputs: The lock to be released
DR i and the lock summary data structure.
1. Look at the references in OR to find and remove all occurences of O R in the BitLocks lists.
2. If any of the BitLocks lists become empty, set the corresponding bits low in the summary, i.e.
3. Remove OR from the Outstanding list.
Figure
Server routine for processing released locks.
Summary
Client 1
Client 2
Client 3
2,3
Summary
Held
Summary
Held
Summary
Server Client 1 Client 2 Client 3
Held
Figure
7: Hierarchical lock management among client and servers.
(or downgrade) and a combination of simpler operations is that the upgrade (or downgrade) must be performed
atomically. Atomicity for multiple operations can be achieved at the server by allowing only a single
process to access the locking data structure at a time. However, unlike the server algorithms, the client/server
protocol must contain upgrade and downgrade primitives, as the protocol has no atomicity guarantee across
multiple operations.
8.2 Client Algorithms
The semi-preemptible locking protocol allows clients to hold locks even when they do not use them. By
holding locks when not in use, caching locks, the client optimistically retains privileges on the premise that
the last client to lock a resource is the most likely to lock it again. This design aims to minimize changes in
lock state and the associated messaging and transactional overhead.
The client uses two techniques to manage distributed locks and local processes that operate under these
locks. First, the client allows local processes to use any subset of the access modes allowed by the locked
i.e., the client is not required to use the full strength of the held lock. Also, the client allows
multiple local processes to operate under the same distributed lock.
To implement these techniques, the client manages its held lock and local processes hierarchically. The
client holds a distributed lock (H) with a server (Figure 7). H encapsulates all actions that local processes
can take against the locked resource. The local processes only access data using the modes specified by the
lock and only prohibit the concurrent access modes encoded in H . Under this held lock, the client maps
the access modes and sharing limitations of each local process to a local lock. The local lock is a local
management abstraction and is not visible to other clients or the server. A client holds many local locks and
uses the same summarizing data structure as the server (Figure 3) to evaluate and manage local locks. For the
client, the summary describes all in-use access modes and disallowed modes for local processes accessing
the data. The summary is restricted to be always weaker than the distributed held lock. This allows the held
lock to protect concurrency guarantees expressed in the summary and, therefore, needed by the local locks.
The management of the client's summarizing data structure is different than the server's. In many ways,
management is simpler because the local locks held by local processes are non-preemptible. This eliminates
demands or revocations of held locks. In other ways, management is more complex because when the client
changes local lock state, it must consider the distributed system state, encapsulated by the held distributed
lock H .
The main principle in the management of multiple local locks under a single distributed lock is Theorem
6.2, which states that if a lock is compatible with all other outstanding locks in the distributed system then
all locks weaker than that lock are also compatible. This ensures that if the remainder of the distributed
system acts in accord with the held lock, the permitted access and sharing of the local locks are respected.
Locking clients respond to several stimuli, requests to obtain and release local locks from local pro-
cesses, and demand requests from the lock server. Clients obtain and upgrade distributed locks on behalf
of local processes that require stronger local locks and downgrade and release locks in response to server
demands. In effect, the client acts as a server of locks to local processes, under the constraint that the client
holds a suitable distributed lock. For this reason, lock acquisition, release, upgrade, and grant operations at
the client use routines much like the server's. Owing to similarities, we omit detailed descriptions of these
operations.
The remaining client action is to process demand requests from the server (Figure 8). Demands are
initiated by a server attempting to alter the distributed lock state in order to grant a lock to another client.
The lock mode requested by the other client is included in the server's demand message so that the requested
lock can be evaluated against current open state. In step 1, the client evaluates whether the requested lock
can be granted given local lock state. Only the clients know local state and they must evaluate the request
and determine the conflicting outstanding locks. The clients themselves make the final determination as to
the compatibility of the request against current system state by comparing the requested lock against their
current local lock state.
Clients with compatible local locks downgrade their distributed lock. When choosing the locking mode
for the downgrade, there are many possible choices. We present the two extreme choices as possible heuris-
tics. First, a client can elect to retain as strong a lock as possible, the minimum downgrade heuristic. The
ProcessDemand
Inputs: The remotely requested lock included in the demand message
DR i and the client
lock summary data structure.
1. Evaluate whether the requested lock is compatible with the currently held local locks. If
0 proceed to step 2, Else deny the demand and Return.
2. Determine the downgraded lock mode required to protect the currently held locks and the
requested lock using one of the two following heuristics.
(a) Maximum downgrade heuristic,
(b) Minimum downgrade heuristic,
3. Inform the server of the downgrade and Return.
Figure
8: Client routine to determine the needed lock downgrade.
client reduces its holding as little as possible, in the lock strength sense, to make its lock compatible with
the requested lock. This choice would perform well if future access to the object were more likely to occur
locally than from other clients. However, if the interest in the object has moved to other clients, the policy
may result in future demands. The other alternative is to downgrade the lock holding as much as possible:
the maximum downgrade heuristic. The downgraded locking mode is exactly the lock summary-the fewest
permitted access modes and disallowed modes needed by local locks.
9 Comparing Dynamic Evaluation with Traditional Locking
We present the execution time and memory usage bounds of lock evaluation algorithms to illustrate how
dynamic evaluation asymptotically outperforms evaluation based on static data structures if locking systems
are complex.
The amount of space used by a locking system can be divided into static and dynamically used space.
The static space contains the information the system needs to know about locking modes to properly run the
locking protocol. The dynamic space contains information about current outstanding locks. Conventional
wisdom holds that the dynamic costs dominate the static costs. However, as locking systems become more
complex, this assertion is not always true because the static space costs can grow exponentially in the number
of access modes.
For static data structures, k different access modes results in 2 2k unique locks. Locking with traditional
data structures requires space in
4k ). There are 2 4k entries in a lock compatibility table for 2 2k locks.
For dynamic lock evaluation, the algorithms only need to know the different locking modes, which uses
space in O(k).
The dynamic space usage of locking using traditional data structures is (nk) for n outstanding locks.
The system stores a list of the k modes of the n outstanding locks. Dynamic evaluation uses the summarizing
data structure to hold dynamic lock state, which is an (nk) data structure. The Outstanding list has n
entries each of size k, and there are k different BitLocks lists with a total of n entries in all lists and n
incoming pointers referring to these entries.
For execution time, we look at how long operations take with respect to the amount of outstanding lock
state n and the amount of static state k. Lock evaluation with static data structures takes time in
n),
because the request must be checked against all outstanding locks. Dynamic lock evaluation uses execution
time in O(k) to evaluate the lock, update the lock summary, and fill out the BitLocks and Outstanding lists.
Similarly, releasing a lock takes time in O(k). When concurrency is high, there are many outstanding locks,
dominates k, and dynamic evaluation operates more efficiently.
The total space required for dynamic evaluation of locks is always asymptotically less than or equal to
that required for evaluation based on static data structures. However, the dynamic space requirements of
dynamic evaluation of locks are larger by a constant factor. The list of locks used for static evaluation is
equivalent in size and content to the Outstanding list. All other portions of the summarizing data structure
are overhead. The true space savings are realized on the static data structures and become important when
k grows large.
Perhaps more important than the space and time savings is the improvement in manageability and ease
of implementation. An implementer using a lock compatibility table must reason about each pair of locks
and complete the entry in the table. This task can be difficult even for as few as 64 locks in Windows NT.
Additionally, all locking modes must be pre-programmed. With dynamic evaluation, the implementer need
only identify how the object will be accessed. The dynamic evaluation algorithms manage concurrency and
compatibility.
Related Research
Many distributed file systems clients transact with a server on every open and close of a file for synchronization
[25, 5, 26]. This is the simplest technique to implement local file system open semantics in the
distributed environment. However, all file open and file close requests require a network operation.
The Andrew file system [15] interacts with a server at every open and close and uses open and close as
points to synchronize cached data. Andrew does implement a data cache that can hold data past close and a
general callback (demand) mechanism. However, callbacks apply only to preemptible data locks.
Like Storage Tank, the Calypso file system [7] uses open mode synchronization locks, called tokens, to
implement local file system semantics. In Calypso, tokens are fully preemptible at the client and cannot be
held past close. Every file system open and close generates a token request or release. File system open state
and token request conflicts are managed completely at the server. Calypso uses a simple lock hierarchy for
its data locks, but the hierarchy does not apply to open mode synchronization tokens.
The DFS file system [16] describes a token mechanism similar to semi-preemptible locks for the management
of data, metadata, and open state. Like semi-preemptible locks, a client can refuse or permit
revocation of a token, depending upon local state. Token management in DFS differs in that all elements
of system locking, including file access locks, data locks, and byte-range locks are managed with the single
token mechanism. The DFS treatment of token management is less concrete than our discussion of locking,
and does not address mapping local file system semantics to a distributed locking system.
This work omits a discussion of synchronization in the presence of failure. A distributed file system that
presents a local file system interface to remote and shared storage must continue to do so when components
fail. As do many modern file systems [24, 21, 18], Storage Tank uses a lease-based [6] protocol to ensure
operational safety and high availability in the presence of client and server failures, and network partitions.
Conclusions
Distributed file systems need to manage open state for referential integrity and synchronized access to files.
Existing distributed systems address this problem by either relaxing local file system semantics, or by sending
every file open request to a server. We have introduced a locking construct, the semi-preemptible lock,
that permits file system clients to grant most file open requests locally, without a server transaction. By
avoiding server messages on open, our client improves performance by exploiting locality of access to files.
At the file system client, semi-preemptible locks are used to summarize open state, so that many open
files may be granted under the protection of a single semi-preemptible lock. This reduces global lock state
and further reduces client-server messages.
We have also presented a set of algorithms and data structures for the dynamic evaluation of locks.
Dynamic evaluation provides a formal and compact framework for evaluating lock compatibility at runtime.
Dynamic evaluation obviates lock compatibility tables, exponentially reducing the space requirements to
describe a locking system. It also obviates ad hoc systems for lock evaluation, providing a formalism that
manages locks correctly and without deadlock.
--R
Serverless network file systems.
Measurements of a distributed file system.
Fast Crash Recovery in Distributed File Systems.
Fibre Channel: Gigabit Communication and I/O for Computer Networks.
A universal file server.
An analytical study of opportunistic lease renewal.
Recovery in the Calypso file system.
Extendible hashing: A fast access method for dynamic files.
Gigabit ethernet: From 100 to 1
File server scaling with network-attached secure disks
Filesystems for network-attach secure disks
Transaction Processing: Concepts and Techniques.
The design of a multicast-based distributed file system
Scale and performance in a distributed file system.
Synchronization and caching issues in the Andrew file system.
DEcorum file system architectural overview.
Disconnected operation in the Coda file system.
A coherent distributed file cache with directory write- behind
Caching in the sprite network file system.
An authentication service for computer networks.
Authenticating network attached storage.
A highly available file system for a distributed workstation environment.
A scalable distributed file system.
The LOCUS distributed operating system.
Overview of the Sun network file system.
--TR | session locking;distributed file systems;concurrency control;lock evaluation |
592979 | Web Proxy Acceleration. | Numerous studies show that miss ratios at forward proxies are typically at least 4050%. This paper proposes and evaluates a new approach for improving the throughput of Web proxy systems by reducing the overhead of handling cache misses. Namely, we propose to front-end a Web proxy with a high performance node that filters the requests, processing the misses and forwarding the hits and the new cacheable content to the proxy. Requests are filtered based on hints of the proxy cache content. This system, called Proxy Accelerator, achieves significantly better communications performance than a traditional proxy system. For instance, an accelerator can be built as an embedded system optimized for communication and HTTP processing, or as a kernel-mode HTTP server. Scalability with the Web proxy cluster size is achieved by using several accelerators. We use analytical models, trace-based simulations, and a real implementation to study the benefits and the implementation tradeoffs of this new approach. Our results show that a single proxy accelerator node in front of a 4-node Web proxy can improve the cost-performance ratio by about 40%. Hint-based request filter implementation choices that do not affect the overall hit ratio are available. An implementation of the hint management module integrated in Web proxy software is presented. Experimental evaluation of the implementation demonstrates that the associated overheads are very small. | Introduction
Proxy caches for large Internet Service Providers can receive high request
volumes.
Numerous studies show that miss ratios are often at least 40%-50%, even for
large proxy caches [7,9,12]. Consequently, a reduction of the cache miss overheads
can result in significant throughput improvements for proxy caches experiencing
high request volumes.
Based on this insight and on our experience with Web server acceleration
[15], this paper proposes and evaluates a new approach to improving the through-put
of Web proxy systems. Namely, we propose to front-end a Web proxy system
with a high performance node that filters the requests, processing the misses and
forwarding the hits and new cacheable content to the proxy. The Web proxy's
miss-related overheads are reduced to receiving the cacheable objects pushed by
the accelerator over permanent connections. Consequently, the proxy can use
the released resources to service an increased number of hits. Figure 1 illustrates
the interactions of the proxy accelerator with Web proxy nodes, clients, and Web
servers.
Hints Cache
WebServer
Client
~30%
WebProxy
GBytes
~35%
~35%
Non-cacheable
Content
Hits
Proxy Accelerator
Figure
1. Accelerated Web Proxy Architecture.
The accelerator is an extended HTTP server running under an embedded
operating system optimized for communication, like the Web server accelerator
described [15], or under a general-purpose operating system in kernel-mode at
service-interrupt level, like the Netfinity Web Server Accelerator[16]. The accelerator
has a main memory cache, mainly used to store content to be forwarded
to the Web proxy.
The accelerator filters the requests based on a summary of the proxy cache
content, called hints. The hints are maintained based on information provided
by proxy nodes and information derived from the accelerator's own decisions.
The hint representation and the update mechanism are important factors for the
performance gains enabled by the proposed proxy acceleration method. This is
due to the related requirements for system and network resources and to the
intrinsic tradeoff between resource usage and information accuracy.
Previous research has considered the use of location hints in the context of
cooperative Web proxies [8,19,22,10]. Our system applies this approach to the
management of a cluster-based Web proxy. In addition, we experiment with new
hint maintenance mechanisms, specifically designed for the interaction between
a front end and a cluster of homogeneous nodes.
Our work extends the set of solutions to proxy cache redirection [1,13,14,17].
Most relevant is the comparison with the proposal in [14], which has the front
end identifying and processing the requests for non-cacheable content. Extending
this functionality, a proxy accelerator processes all of the requests for content not
cached at the Web proxy, including the cacheable content not currently in the
proxy cache.
Building on top of previous research on cluster-based network services [4,2],
our proxy acceleration method overcomes the intrinsic limitations of content-based
routing components by integrating several accelerator nodes in front of a
Web proxy cluster.
In this paper, we use analytical models in conjunction with simulations
to study the potential for performance improvement of our proxy acceleration
scheme. We evaluate the impact of several hint representation and maintenance
methods on throughput, hit ratio, and resource usage. In addition, we present
and evaluate the performance impact of an actual implementation of the hint-
management component in Web proxy application.
Our analytical study reveals that the throughput improvement can be signif-
icant. For instance, when the accelerator can achieve about an order of magnitude
better throughput than a Web proxy node for communications operations, such
as the embedded system considered in [15], a single accelerator node can boost the
throughput of a four-node Web proxy by about 100%. Our simulations validate
that, with appropriate hint representations and update protocols, the proposed
acceleration method can offload more than 50% of the WP load with no impact on
the observed hit ratio. In addition, the evaluation of our implementation shows
that the overhead incurred with hint management has no significant impact on
the client-perceived response times and throughput.
Paper
Overview
. The rest of the paper is structured as follows. Section 2 describes
the architecture of an accelerated Web proxy. Section 3 analyzes the
expected throughput improvements with an analytical model. Section 4 evaluates
the impact of the hint management on several Web proxy performance
metrics with a trace-driven simulation. Section 5 presents the implementation
of the hint-management module in a Web proxy application and evaluates its
performance impact. Section 6 discusses related work, and Section 7 summarizes
our results.
2. Accelerated Web Proxy
Typical high-performance Web proxy systems consist of a cluster of nodes
running a Web proxy application and a front-end node that distributes the requests
to the application nodes. Front end-based solutions to improving the performance
of Web proxy systems are restricted mainly to balancing the load based
on criteria like number of active connections and CPU utilization. Because of the
inherently unpredictable content mixtures in Web proxy caches, typical content-based
routing policies that distinguish origin servers and/or object types are less
beneficial. However, a content-based scheme distinguishing between cacheable
and non-cacheable content has been proved to bring significant performance improvements
to Web proxy systems when combined with off-loading the processing
of requests for non-cacheable content from proxy nodes to the front end [14].
In this paper, we propose to further offload proxy node overheads by extending
the functionality of the front-end. Namely, the extended front-end, called
proxy accelerator (PA), is a content-based router that can distinguish between
cache hits and misses based on information about proxy cache content. In the
case of a cache hit, the PA forwards the request to a Web proxy (WP) node that
contains the object either by TCP splicing or handoff [17,21]. In the case of a
cache miss, the PA sends the request to the origin Web site, bypassing the WP.
When it receives the object from the Web site, the PA replies to the client, and
if appropriate, pushes the object to a WP node which is selected based on some
load balancing criteria.
WP WP WP WP
PA PA
Web Proxy Cluster
Requests
Hints
Router Servers
Clients
Figure
2. Interactions in a Web Proxy (WP) cluster with several Proxy Accelerators (PA).
The enabling element for the new front-end functionality is the PA's information
about the content of the WP cache, henceforth called hints. Possible
solutions for hint representation and update mechanism will be discussed later in
this section and evaluated by trace-based simulation in Section 4.
The PA includes a main memory cache for storing content waiting to be
pushed to the WP. In addition, the PA cache can store duplicates of objects in
the WP cache. Requests satisfied from a PA cache never reach the WP, further
reducing the load of the WP.
Figure
1 illustrates the interactions of a PA in a four-node WP cluster. PA
and WP nodes are connected by permanent TCP connections for request handoff
[17], hint updates, and content push. Notice that WP nodes still interact with
Web sites. This occurs when the PA filter is not accurate, or cache objects have
to be revalidated.
For scalability, the system may include several PAs (Figure 2) and a router
that balances the load among them. Each PA has hints about each of the WP
nodes. Therefore, a PA can appropriately forward any of the incoming hits. The
policy for new content distribution may be as simple as round-robin.
A PA can be built from stock hardware and runs under an embedded operating
system optimized for communication. Alternatively, the PA can be built
as an extended kernel-mode HTTP server. Either way, a PA can achieve an order
of magnitude better throughput than a Web proxy node for communications
operations.
A WP node would typically run software extended for hint maintenance
and distribution, for handoff of TCP/IP connections and URL requests, and for
pushing objects to PA caches.
Hint Representation. Previous research has considered several hint representations
and consistency protocols. Hint representations vary from schemes that
provide accurate information [22,10] to schemes that trade accuracy for reduced
costs (e.g. memory and communication requirements, look-up and update over-
In this study, we consider two representations - one that provides accurate
information and one that provides approximate (inaccurate) information. The
accurate-information scheme, called the directory scheme, uses a list of object
identifiers including an entry for each object known to exist in the WP cache. In
our implementation, the list is represented as a hash table [10,22].
Hint Space
Hint Entry
Figure
3. Hint representation based on Bloom Filters.
The approximate-information scheme is based on Bloom Filters [5]. The
filter is represented by a bitmap, henceforth called hint space (see Figure 3),
and several hash functions. To register an object in the hint space, the hash
functions are applied to the object identifier, and the corresponding bits, which
are generically called hint entries, are set in the hint space. A hint look-up is
positive if all of the entries associated with the object of interest are set. A hint
entry is cleared when no object is left in the cache whose representation includes
the entry. Therefore, the cache owner (i.e., the WP node) maintains a "collision"
counter for each entry, which is updated whenever a related object is added or
removed from the cache. When a collision counter reaches its maximum value,
it is no longer updated. The entire hint space is recomputed when the number
of overflowed counters reaches a threshold. The PA maintains a Bloom Filter for
each of the WP nodes.
Hint Consistency. The hint consistency protocol ensures that the information
at the PA site reflects the content of the WP cache. Protocol choices vary in
several dimensions: the entity that identifies the updates, the protocol initiator,
the rate of update messages, and the exchanged information. In the previously
proposed solutions, updates are identified either by the WP (henceforth called
WP-only updates) [8,19] or by the content-based router (PA) [17]. Both methods
have a significant likelihood of wrong request redirection decisions. The first
method may result in false misses because of the inherent delay of updates. The
second method may result in false hits because information about objects removed
from the cache is not propagated to the router. False misses are also possible
because entries in the router directory are discarded periodically due to space
limitations.
In this paper, we propose and evaluate a method, called eager hint regis-
tration, which attempts to address the drawbacks of previous methods. Namely,
both PA and WP identify and record hints. When the PA pushes an object to a
WP node, it "eagerly" registers that the object exists in the corresponding cache.
As a side effect, the method enables a reduction of the update traffic sent by a
WP node. Namely, a WP node does not send update notifications for objects
received from the PA (a small exception, due to the asynchronous communication
between PA and WP, is discussed in Section 5).
With respect to the protocol initiator, previously proposed solutions address
only WP-only updates. Updates are pulled by the hint owner (i.e., PA) [19] or
pushed by the cache owner (i.e., WP) [8,22,10]. With respect to the update rate,
previous proposals consider update messages sent at fixed time intervals [19] or
after a fixed number of cache updates [8]. The exchanged information may be
incremental, addressing only the updates occurred since the previous message
[10,8,19], or a copy of the entire hint space [8].
Proxy Accelerator Cache. The PA cache may include objects received from
Web sites or pushed by the associated WP nodes. In selecting the PA cache
replacement policy, we have to consider that all objects in the PA cache also
exist in the WP cache. Consequently, the PA cache replacement policy should
not be focused on minimizing the network-related costs, as shown appropriate
for WP caches. Policies that maximize the hit ratio based on hotness statistics
and object sizes are expected to enable better PA performance than policies like
Greedy-Dual-Size [6].
In the following sections, we evaluate the throughput potential of the proposed
proxy acceleration method and the impact of several hint implementation
choices.
3. Expected Throughput Improvements
The major benefit of the proposed hint-based acceleration of Web Proxies is
throughput improvement. We analyze the throughput properties of this scheme
with an analytic model by varying the number of WP and PA nodes, the PA
functionality and cache size, and the WP's and PA's CPU speeds.
The system is modeled as a network of M/G/1 queues. The servers represent
PAs, WP CPUs and disks, and a Web site. The serviced events represent
(1) stages in the processing of a client request (e.g. PA Miss, WP Hit, Disk
Access) and (2) hint and cache management operations (e.g. hint update, object
push). Event arrival rates derive from the rate of client requests and the likelihood
of a request to switch from one processing stage to another. The likelihood
of various events, such as cache hits and disk operation, are derived from recent
studies on cache performance and Web content models [23,14,6,18].
The overhead associated with each event includes a basic compute overhead,
I/O overheads (e.g. connect, receive message, handoff), and operating system
overheads (e.g. context switch). The basic overheads are identical for the PA and
WP, but the I/O and operating system overheads are different. Namely, the PA
overheads correspond to the embedded system used for Web server acceleration
in [15] - a 200 MHz Power PC PA which incurs a 514-sec miss overhead (i.e.,
1945 misses/sec) and 209-sec hit overhead (4783 hits/sec). The WP overheads
are derived from [17] - a 300 MHz Pentium II which incurs a 2518-sec miss
overhead (i.e., 397 misses/sec) and 1392-sec hit overhead (718 hits/sec). These
overheads assume 8 KByte objects.
The following parameters are fixed for this study: (1) 40% non-cacheable
content ratio and 25% miss ratio, (2) TCP handoff is used by the PA for client
connections upon positive hint look-up; (3) directory-based hints with 1 hour
incremental updates; (4) disk I/O is required for 75% of the WP hits; (5) one
disk I/O per object; (6) four network I/Os per object transmission; (7) 25% of
WP hits are pushed to the PA, when the PA caches hot objects; (8) 30-sec WP
context switch overhead. Unless otherwise specified, the PA nodes have 450 MHz
CPUs, and the WP nodes have 300 MHz CPUs. The costs of the hint-related
operations are derived from our implementation and the simulation-based study
(see Section 4).
Hint-based acceleration improves throughput and cost-performance ratio
Figure
4 presents the expected performance for a traditional WP-cluster and
Throughput
WP Nodes
traditional
Figure
4. Throughput with number of WP and PA nodes. (no service from PA cache)1030507090Cost/Performance
Improvement
WP Nodes
WP300MHz
PA300MHz
WP300MHz
PA450MHz
WP300MHz
PA700MHz
Figure
5. Cost-performance improvement with number and speed of WP and PA nodes. (no
service from PA cache)
for clusters enhanced with up to four PAs when the PAs do not service objects
from their cache. The plot illustrates that the hint-based acceleration enables
significant WP throughput improvements. For instance, a single PA node can
increase the performance of a 2-node WP about three times and that of a 4 node
WP about two times. With two PAs, a 4-node WP can achieve higher throughput
than a 16-node WP. However, consistent with previous studies on content-based
routing [4,2,21], the plot illustrates that a PA becomes a bottleneck for large WP
clusters.
The cost-performance improvement enabled by the proposed scheme is rele-
vant. For instance, Figure 5 illustrates that if we assume that the cost of a PA is
Throughput
WP Nodes
traditional
1 PA only non-cacheable
2 PAs only non-cacheable
Figure
6. Throughput of hint-based acceleration and non-cacheable redirection. (no service
from PA cache)200040001
Throughput
WP Nodes
traditional
PA hit 0%
PA hit 10%
Figure
7. Throughput when PA services objects from its cache.
almost the same as for a WP node, the cost-performance improvement achieved
with a single PA is -60% in a 2-node WP and -40% in a 4-node WP. The performance
benefits of the scheme increase with the difference between WP and
PA's CPU speeds, as illustrated by Figure 5 for the case of 700 MHz PA CPU's.
Figure
5 also illustrates that a 2-node accelerator benefits relatively large WP
configurations. For instance, the cost-performance improvement with a 2 PAs is
lower than with 1 PA for a 2-node WP.
Hint-based acceleration can benefit more than the redirection of non-cacheable
objects. Figure 6 illustrates that, for appropriately sized WP clus-
ters, the proposed hint-based acceleration can enable better performance than the
previously proposed policy of redirecting only the non-cacheable objects [14]. For
a workload with only 25% miss ratio, a 2-node WP cluster can attain more than
double throughput levels if the front-end can identify and process the request for
cache misses along with the requests for non-cacheable content.
PA-level caches benefit low-performance WPs. Figure 7 illustrates that
the effect of a PA cache is marginal in particular when the ratio of non-cacheable
content is significant, like in our selection of experiment parameters.
To summarize, the hint-based Web Proxy acceleration may lead to significant
performance and cost-performance improvements when the PA nodes can
achieve a much higher throughput network I/O than the WP nodes. The new
scheme improves upon the previously proposed redirection of non-cacheable content
for appropriately sized WP clusters.
4. Impact of Hint Management
In this section, we evaluate how the hint representation and the consistency
protocol can affect the performance of an accelerated Web proxy. We focus on
performance metrics, such as hit ratio and throughput, and on cost metrics, such
as memory, computation, and communication requirements.
These performance and cost metrics depend on various characteristics of the
hint management mechanism (see Table 1). For instance, the look-up overhead
affects the long-term PA throughput. Also, the false miss decisions of the PA
filter cause undue network loads and response delays. Table 2 summarizes some
of the differences between the representation methods and the update protocols
introduced in Section 2. For instance, the look-up overhead is constant for the
Bloom Filter-based scheme while for the directory scheme it depends on the con-
text, namely on how well the hash table is balanced. Similarly, eager registration
results in no false miss, while for WP-only registration the amount of false misses
increases with the update period.
In this study, we identify and compare relevant trends of these representation
methods and update protocols. The study is conducted with a trace-driven
simulator and a segment of the Home IP Web traces collected at UC Berkeley
in 1996 [11]. The traces include about 5.57 million client requests for cacheable
objects over a period of 12.67 days. The number of objects is about 1.68 million
with a total size of about 17 GBytes.
Factors. The factors considered in this study are the following: (1) PA and
Table
Impact of Hint Management Choices.
Characteristic Affects
memory at WP WP memory hit ratio
memory at PA PA cache hit ratio
update period long-term throughput
update period WP/PA short-term throughput
look-up time PA long-term throughput
false hits WP load
false misses network usage
Table
Selected Method Characteristics.
Characteristic Representation
Directory Bloom Filters
memory at WP none O(hint space)
memory at PA O(objs WP) O(hint space)
look-up overhead context-dependent constant
false hits none O(objs WP)
Protocol
WP-only Eager Reg.
false misses period-dependent none
PA computation on-off, large bursts smaller bursts
WP memory, (2) hint representation, (3) hint update protocol, and (4) update
period. Namely, we consider configurations with 0.25-1 GByte PA memory and
memory. For the Bloom Filter-based scheme, we vary the size
of the hint space (0.5-10 MBytes) and the number of hash functions; each hash
function returns the remainder of the hint space size divided by an integer obtained
as a combination of four bytes in the object identifier. Due to limitations
associated with trace encoding, object identifiers are composed of the 16-byte
MD5 representation of the URL and a 4-byte encoding of the server name (this
restriction makes impossible an accurate evaluation of the resource requirements
associated with the Bloom Filter-based scheme). Finally, we experiment with
update periods in the range of 1 sec to 2 hours.
Fixed Parameters. We experiment only with "push" updates; in comparison
to "pull" updates, "push" updates allow better control of hint accuracy [8] and
lower I/O overheads. In addition, we experiment only with incremental updates,
as we consider it more appropriate than "entire copy" updates in the context of
the hint representations and the system parameters considered in this study. The
WP cache replacement policy is LRU. The PA cache replacement is "LRU with
bounded replacement burst". According to this policy, an incoming object is not
cached if this would cause more than a given number of objects to be removed
from the cache. This policy is expected to perform well based on studies that
show that small objects have a large contribution to the hit ratio [18,3]. For both
caches, garbage collection is invoked when a new object has to be accommodated.
4.1. Cost Metrics
Memory Requirements. The main memory requirements of the hint mechanism
derive from the hint meta-data and the message buffers used for the hint
consistency protocol.
Hint Meta-data. For the directory scheme, no meta-data is maintained at the WP,
and at the PA, the requirements increase linearly with the population of the WP
cache. For instance, in our implementation, with 68-byte entries, the meta-data
is -70 MBytes for a 10 GByte WP cache. By contrast, for the Bloom Filter-based
scheme, meta-data is maintained at both PA and WP, and is independent
of the cache size. The PA meta-data is as large as the hint space multiplied by
the number of WP nodes, and the WP meta-data is as large as the hint space
multiplied by the size of the collision counter (e.g. 8 bits).
Hint Consistency Protocol. Message buffer storage space required at the WP site
for the hint consistency protocol increases with the rate of WP cache updates
and the period of the consistency protocol. For the directory scheme, an update
entry has unpredictable length, as it includes the full name of the object. For
the Bloom Filter-based scheme, an update corresponds to a hint entry update,
represented by a 5-byte data structure; a cache update can result in as many hint
entry updates as hash functions in the filter.
Computation Requirements. The computation requirements associated with
our acceleration scheme result mainly from request look-up and the processing of
update messages. In addition, minor computation overheads may be incurred at
WP and PA upon each cache update.
Look-up Overhead. For the directory scheme, the look-up overhead depends on
the distribution of objects to hash table buckets. For the Bloom Filter-based
Maximum
Entries
Per
Update
Message
WP Memory (MBytes)
BloomFilter, WP-only
BloomFilter, eager
WP-only
Figure
8. Variation of maximum number of entries per update message. 1 hour period,
256 MByte PA, 4 MByte hint space, 4 entries per object.0.10.30.50.7
1000 2000 3000 4000 5000 6000 7000 8000 9000 1000011000
Total
Entries
Per
Update
Payload
(MEntries)
WP Memory (MBytes)
BloomFilter, WP-only
BloomFilter, eager
WP-only
Figure
9. Variation of total number of update entries. 1 hour update period, 256 MByte PA,
4 MByte hint space, 4 entries per object.
scheme, the look-up overhead is more predictable, depending mainly on the filter
parameter. More specifically, the overhead includes the transformation of the object
name into one or more integer values, the computation of the hash functions,
the selection, and the test of the corresponding bitmap entries. On a 332 MHz
PowerPC, the transformation of the object name into an MD5 representation
takes -9-sec per 55 byte string segment. For the four simple hash functions
used in our Bloom Filter implementation, the overhead of hash function computation
and bitmap look-up is -1-sec. Overall, the look-up overhead is lower
than 10% of the expected cache hit overhead on a 300MHz PA (see Section 3).
Hit
Memory (MBytes)
Directory
BloomFilter
Figure
10. Variation of overall hit ratio with WP configuration. 512 MByte PA, Bloom Filter
Hint Consistency Protocol. The amount of computation triggered by the receipt
of a hint consistency message depends on the number of update entries included
in the message. Because of hint entry collisions, the Bloom Filter-based scheme
results in about half the load of the directory scheme (with 160-byte object iden-
tifiers). The variation of the maximum and average message sizes presented in
Figure
8 and Figure 9 illustrates this trend. These figures also illustrate the benefit
of the eager registration approach. For both hint schemes, on average, the
eager hint registration reduces by half the computation loads. Similar trends are
observed for the communication requirements of the consistency protocol. Note
that the very large maximums observed in Figure 8 are due to a few very large
WP cache replacement bursts (-2300 objects).
4.2. Performance Metrics
Hit Ratio. The characteristic of the hint mechanism that most affects the
(observed) hit ratio is the likelihood of false misses. Typically, false misses are
due to hint representation and update delays. In our experiments, because of the
selected hint representations, false misses are only the result of update delays.
As expected, the likelihood of false misses increases with the update period.
Figure
11 illustrates this trend indirectly: the ratio of requests directed to the WP
with a traditional update mechanism decreases with the increase of the update
period. Eager hint registration reduces the number of observed false misses, with
less impact on the Bloom-Filter scheme because of collisions.
262728290 1000 2000 3000 4000 5000 6000 7000 8000
of
Requests
to
WP
Hint Update Period (secs)
Eager, BloomFilter
WP-only, BloomFilter
Eager, Directory
WP-only, Directory
Figure
11. Variation of WP requests with update protocol and period. 256 MByte PA, 4 GByte
of
False
Hits
Hint Space (MBytes)
6 GByte WP
8 GByte WP
Figure
12. Variation of false hit ratio with hint space and WP cache. 512 MByte PA.
The amount of hint meta-data at the WP can have a relevant impact on the
overall hit ratio (i.e., hits in both PA and WP caches) when the ratio of the meta-data
in the WP memory is large, as for small WP cache sizes (see Figure 10). PA
meta-data has no significant impact because objects removed from the PA cache
are pushed to the WP rather than being discarded.
Throughput. The extent of throughput improvement depends on how well the
PA identifies the WP cache misses. This characteristic, reflected by the likelihood
of false hits, is affected by the representation method and the consistency
protocol.
Hint Representation. While the directory scheme has no false hits, for the Bloom
of
False
Hits
WP Memory (MBytes)
Figure
13. Variation of false hit ratio with hint entries per-object. 512 MByte PA.
Filter-based scheme, the likelihood of false hits increases with the hint-space
collision. As illustrated in Figure 12, this occurs when the hint space decreases
or the number of objects in the WP cache increases. We notice that the false-hit
ratio is constant when the hint space increases beyond a threshold. This threshold
depends on the WP cache size, and the effect is due to the characteristics of the
selected hash functions.
The likelihood of false hits also depends on the number of hint entries per
object. Figure 13 illustrates the variation observed in our experiments with filters
with 3-5 hash functions. While, typically, the ratio of false hits decreases with the
number of hint entries per object, when hint space occupancy is high, inversions
may occur due to the collisions.
Hint Consistency Protocol. The impact of update period on false hit ratio is more
significant in configurations with frequent WP cache updates (e.g., systems with
small WP caches). Figure 14 illustrates this trend for both hint schemes. For
instance, for Bloom Filters, the difference between the false-hit ratios observed
for 1-hour and for 1-sec updates is 0.07% for a 4 GByte cache and 0.04% for a
6 GByte cache. Comparing the two schemes, the relative impact of the update
period is almost identical.
Request Response Time. Besides the overhead of hint look-up and update,
the accelerated WP architecture can affect the average request response time by
the reduction of the hit ratio in the WP and PA main-memory caches. Besides the
amount of meta-data in the available main memory, the hit ratios depend on the
cache replacement policies. Considering the PA cache, Figure 15 illustrates that
12340 1000 2000 3000 4000 5000 6000 7000 8000
of
False
Hits
Hint Update Period (secs)
BloomFilter, 4 GB WP
BloomFilter, 6 GB WP
Figure
14. Variation of false hits with update period. 256 MByte PA, 4 MByte hint space.40506070
Hit
Replacement Bound
Total Hits, 256 PA
PA Hits, 256 PA
Total Hits, 512 PA
PA Hits, 512 PA
Figure
15. Variation of hit rate with replacement bound. '-1' for unbounded replacements.
Bloom Filter, 6 GByte WP, 4 MByte hint space.
the bounded replacement policy enables better PA hit ratios without reducing
the overall hit ratio. For instance, limiting the replacement burst to 10 objects
enables more than 5% larger PA hit ratios than with unlimited burst (see bound
-1). This is because the average replacement burst is significantly smaller than
the maximum (e.g. 3 vs. 2300 in our experiments).
Summary
. By trading off accuracy, the Bloom Filter-based scheme exhibits
lower computation and communication overheads. However, the meta-data at
the WP node may reduce the memory-hit ratio. While, in general, the hint look-up
overheads are small with respect to the typical request processing overheads,
the overheads are more predictable for the Bloom Filter-based scheme. Eager
hint registration reduces update-related overheads and prevents hit ratio reductions
caused by update delays. False hit ratio (and, consequently, throughput)
is more significantly affected by hint representation than by update period. For
Bloom Filter-based schemes, this ratio increases exponentially with hint space
contention.
5. Implementation of Hint Management in Web Proxy Nodes
The implementation of the hint-based accelerated Web proxy infrastructure
is built by extending a thread-based Web proxy application and a kernel-mode
HTTP server with functionality for hint management and content push. The
implementation of the hint mechanism is based on Bloom Filters with eager
registration and periodic updates. The implementation makes possible a flexible
system configuration. Namely, the Web proxy node can interact with multiple
accelerators and the accelerator node can interact with multiple proxy nodes.
Hint Representation. The size of the hint space is customizable at initialization
time. The collision counters take up one byte. The Bloom Filter has six hash
four applied to the object name and two to the origin server IP address.
The object name, s 0 s 1 :::, is transformed into an integer value by evaluating the
polynomial P
fixed prime number. The overhead of name transformation
is -0.95-sec for the first 10 bytes, and -0.7-sec for each additional 10
bytes, measured on a 332 MHz PowerPC. Note that, although less effective than
MD5 in avoiding collisions, this solution is characterized by lower computation
overheads, which clearly benefit the proxy accelerator performance.
The hash functions are equal to mod(HintSpace) applied to the resulting
4-byte integer and to three permutations of its bytes. Similarly, the
mod(HintSpace) function is applied to the 4-byte integer representing the IP
address and to one permutation of its bytes. The overhead of computing these
hash functions is -5.5-sec.
When the WP has several nodes, the corresponding Bloom Filters are represented
at the PA by interleaved bitmaps. In this representation, the corresponding
bits all of the filters are placed in consecutive memory locations (see
Figure
16). In comparison to the original representation in which each Bloom
Filter is represented in a separate memory segment, the interleaved representa-
/Hint Entry
Hash1(obj,
Hint Space
Figure
16. Hint representation as interleaved Bloom filters for 4 WP nodes.
tion is characterized by predictable look-up overheads, independent of the cluster
size. With the interleaved representation, the look-up overhead for a 4-bit entry
is constant at -1.28-sec, on a 332 MHz PowerPC. For the original representa-
tion, the overhead varies from -1.19-sec for a single node look-up to -4.39-sec
for four node look-up.
Hint Update Protocol. The hint management implementation uses the eager hint
registration protocol introduced in Section 2. Namely, an accelerator registers
hints as it pushes objects towards a proxy node. A proxy node collects the hint
updates and periodically sends them to each accelerator such that an accelerator
will not receive updates resulting from cache updates for content it has pushed to
the WP node. An exception is made when a hint entry is set by a push operation
when the previous clear has not reached the accelerator before it pushed the
object (and set the entry in its representation). If not appropriately handled,
this situation may lead to false misses. To identify this type of situation, proxy
updates are labeled, and the pushed content sent by an accelerator carry the label
of the most recent update enacted by the proxy.
Web Proxy Software Extension. The extension of the Web proxy software has
three components. The first component represents the update interface invoked
by the proxy threads handling client requests when objects are added or permanently
removed from the cache (cache operations that remove objects only for
accommodating their newer versions should not result in hint updates). The calling
thread indicates the object name, origin server, and the corresponding cache
operation. The resulting hint updates, if any, are recorded in update buffers.
When an update buffer gets full, it is released for transmission. Update buffers
are organized in an active set and a waiting set. Updates are recorded in buffers
of the active set. When such a buffer gets full, it is replaced with one in the waiting
set. The active set includes a buffer for each active accelerator and the local
proxy node. Updates are registered in the active buffer associated with the node
that originated the operation. More specifically, updates resulting from a cache-
add operation are registered in the buffer of the proxy node when it has received
the content from the origin Web server; otherwise, the update is registered in
the buffer of the accelerator that pushed the object to the proxy cache. Updates
for cache-remove operations are registered in the buffer of the proxy node. This
scheme prevents replication of update representations when the proxy interacts
with several accelerators and permits the use of multicast if available.
The second component represents the proxy accelerator interface. This component
consists of three threads: one thread listens for incoming connections from
accelerators, one thread handles accelerator requests for transmission of the entire
hint space, and the third thread handles the periodic updates. Accelerators may
request a complete copy of the hint space at their initialization. The periodic
update thread disseminates to the registered accelerators the update buffers released
for transmission. If no buffer is released, the thread transmits the currently
active batch update buffer.
The third component of the Web proxy extension is the push handler. This
component receives the new content and stores it in the cache. The content is
sent in HTTP format as a POST request. While this requires the proxy node
to duplicate the header processing that was already done in the accelerator, it
decouples the implementations of the proxy cache and the accelerator. In order
to hide the latency of the related I/O operations, multiple push connections can
be concurrently active between accelerator and proxy.
Experimental Evaluation. In the remainder of this section, we present an experimental
evaluation of the overhead of hint management. The experimental
evaluation is done with the Web Polygraph proxy performance benchmark [20].
Each component of the benchmark, polyclt, polysrv, Web Proxy, and proxy accelerators
run on separate nodes of a switched Ethernet-based LAN.
The selected traffic model is meant to stress the hint-related component of
the Web proxy application. Namely, the request model is characterized by a 75%
miss ratio. The content size is fixed to 2 bytes, which results, with the headers, in
about 370 bytes per request. Requests are issued by the polyclt node in best-effort
mode, meaning that a new request is sent as soon as the reply for the previous
one is received. Each experiment consists of 100,000 requests.
During experiments, the Web proxy configuration is varied from original
(i.e., no hint collection and updates), to hint collection but no updates, and
to both hint collection and updates to one and two accelerators. During these
experiments, the role of accelerators is reduced to receiving hint updates; requests
are received directly by the Web proxy and, therefore, they do not pass through
the accelerator. The update period is 5 min.
The Web Polygraph statistics about the response times observed by the
client show that the distributions of hit and miss response times are almost identical
up to the 98-percentile for all the tested configurations. For the 99-percentile,
the miss response times experienced with the configurations with active hint management
differ by less than 1% from the performance of the original configuration.
For hit response times, the 99-percentile difference is less than 10% of the performance
in the original configuration. The throughput observed by the client is
unchanged for the experiment with no active accelerators and -1.8% lower for
the experiments with active accelerators.
With Web Proxy internal monitoring instrumentation, we collected statistics
about the overhead of hint collection when no proxy accelerator was active. This
overhead includes hint computation and segment of the collection into batch
update buffers. The statistics show a minimum of 31-sec, a median of 4-sec,
and a 95-percentile of 123-sec. The above results demonstrate that hint collection
and update protocol have negligible impact on the performance of a Web proxy
node.
6. Related Work
Previous research has considered the use of location hints in the context
of cooperative Web Proxies [8,19,10,22]. In these papers, the hints help reduce
network traffic by more efficient Web Proxy cache cooperation. Extending these
approaches, we use hints to improve the throughput of an individual Web proxy.
In addition, we propose and evaluate new hint maintenance techniques that reduce
overheads by exploiting the interactions between a cache redirector and the
associated cache.
Web traffic interception and cache redirection relates our approach to architectures
such as Web server accelerators [15], ACEdirector (Alteon) [1], Dy-
naCache (InfoLibria) [13], Content Smart Switch [14], and LARD [17]. The
ability to integrate a Proxy Accelerator-level cache renders our approach similar
to architectures in which the central element is an embedded system-based cache,
such as a hierarchical caching architecture [13], or the front end of a Web server
[15]. Our proxy accelerator extends the approach to bypassing the Web proxy
proposed in [14]; besides non-cacheable objects, our accelerator can identify the
misses and process them locally. Trading the throughput of the routing compo-
nent, which is not the bottleneck resource, our approach can boost even more the
throughput of the bottleneck proxy nodes. Furthermore, our approach is similar
to the redirection methods used in architectures focused on content-based redirection
of requests to Web Proxy nodes [1,17]. However, our approach enables
dynamic rather than fixed mappings of objects to WP nodes[1]. In contrast to
the method in [17], redirection does not cause caching of multiple object replicas
and is independent of client request patterns.
7. Conclusions
Based on the observation that miss ratios at proxy caches are often relatively
high [7,12,9], we have developed a method to improve the performance of a
cluster-based Web proxy by shifting some of its cache miss-related functionality
to be executed on a Proxy Accelerator - an extended content-based router implemented
on an embedded system optimized for communication. Consequently, the
Web proxy can service a larger number of hits, and the Proxy Accelerator-based
system can achieve better throughput than traditional Web proxies [1,8,19,17] or
systems in which the Web proxy is bypassed only for non-cacheable objects [14].
In addition, under moderate load, response time can be improved with a Proxy
Accelerator main memory cache [15,13].
Our study shows that a single Proxy Accelerator node with about an order
of magnitude better throughput for communication operations than a proxy node
[15,16] can improve the cost-performance ratio of a 4-node Web proxy by -35%.
Our study shows that eager registration is a "must" and that the Bloom Filter-based
scheme is more appropriate than the directory scheme for large WP clusters
or when PA and WP nodes have comparable power. The implementation of
the accelerated Web proxy node demonstrates that the overhead added by hint
management is not significant in comparison to typical proxy node overheads.
--R
Alteon Web Systems
Scalable Content-aware Request Distribution in Cluster-based Network Servers in: <Proceedings>Proc
Changes in Web Client Access Patterns.
Distributed Packet Rewriting and its Application to Scalable Server Architectures in:
Space/time trade-offs in hash coding with allowable errors
The Measured Access Characteristics of World- Wide-Web Client Proxy Caches in: <Proceedings>Proc
A Scalable Wide-Area Web Cache Sharing Protocol in: <Proceedings>Proc
Performance of Web Proxy Caching in Heterogeneous Bandwidth Environments in:
A Taste of Crispy Squid in:
UC Berkeley Home IP HTTP Traces in: http://www.
System Design Issues for Internet Middleware Services: Deductions from a Large Client Trace in:
DynaCache: Weaving Caching into the Internet in: 3-rd International WWW Caching Workshop (<Year>1998</Year>)
Design and Performance of a Web Server Accelerator in:
IBM Netfinity Web Server Accelerator V2.
A Performance Study of the Squid Proxy on HTTP/1.0 in: WWW Journal 1-2 (<Year>1999</Year>)
Cache Digests in: http://squid.
High Performance Benchmarking with Web Polygraph in: http://ircache.
Design Alternatives for Scalable Web Server Accel- erators
Beyond Hierarchies: Design Considerations for Distributed Caching on the Internet in:
On the scale and performance of cooperative Web proxy caching in:
--TR
--CTR
Chi-Hung Chi , HongGuang Wang, A generalized model for characterizing content modification dynamics of web objects, Web content caching and distribution: proceedings of the 8th international workshop, Kluwer Academic Publishers, Norwell, MA, 2004
Yu, The state of the art in locally distributed Web-server systems, ACM Computing Surveys (CSUR), v.34 n.2, p.263-311, June 2002 | web performance;proxy cache;hints |
592983 | A Comparison of Protocols for Updating Location Information. | Detailed location information of mobile objects, for example that of a user with a mobile computer or phone, is an important input for many location-aware applications. However, constantly updating the location information for thousands of mobile objects is not feasible. Therefore, special update protocols for location information are required that transmit the information as efficiently as possible, that is requiring only few update messages, while still being effective in returning the location information with the desired accuracy. Different classes of such update protocols are described in this paper and a new combined protocol is proposed. To be able to compare their effectiveness and efficiency, we present an analysis for the minimum and average resulting accuracy of the location information in comparison with the number of messages transmitted. We also present the results of simulations that we have performed to back up our analysis. | Introduction
As detailed information about the location of a mobile device
or user has become widely available, mainly through
the satellite positioning system GPS, more and more applications
are using this information. Examples are car navigation
or fleet management systems, as well as location-aware
information services for cellular phones (which today use the
less accurate information of the communication cell a mobile
phone is currently located in). Most of these applications
only consider the location of a single user. Further function-
ality, like determining all mobile objects inside a given area
or generating an event whenever a mobile object enters a
room, requires a special location service, which collects and
manages the location information for all of these objects. A
universal global location service has been proposed for example
by [Leo98] and [Maa97]. Such a location service has to
deal with all sorts of mobile objects with various movement
characteristics, for example objects that move continuously
for a longer period of time, like cars and trucks, or objects
that only move seldomly, like pieces of office equipment, for
example a printer. The location information for these objects
may have been acquired by different types of sensor
systems and therefore has different degrees of accuracy.
If the location information is acquired on the mobile object
itself (e.g., via GPS), it has to be transmitted from the
mobile object to a location server using wireless communi-
cation. In case of a distributed service, where the location
information is cached or replicated on a number of servers,
the information also has to be transmitted between location
servers. To control the transmission of location informa-
tion, different update protocols with varying properties can
be used. In case of a querying protocol the information is
pulled by the receiver, while with a reporting protocol it is
pushed by the sender. A combined protocol is also possible,
where an optimal ratio between the number of updates and
the number of queries has to be found.
In this paper we will discuss the characteristics of these
classes of update protocols and their subclasses as well as
their strengths and weaknesses according to different areas
of application. To be able to guarantee the receiver a certain
accuracy of the returned location information, it usually
has to be transmitted rather frequently. If the location information
is transmitted from a mobile device to a location
server, a wireless channel has to be used, where bandwidth
is low and expensive. It is therefore important to use an
update protocol that works efficiently, that is requires as
few messages as possible, and effectively, that is achieves a
desired accuracy of the location information on the server.
In this paper we discuss the efficiency of the basic types of
update protocols by means of an analysis of the number of
transmitted messages and their effectiveness by analyzing
the resulting minimum and average accuracy of the location
information at the receiver. Although this work has been
performed in the context of updating the location information
on a location service, its results are applicable wherever
location information is transmitted from a sender to a receiver
The remainder of this paper is structured as follows: In
Section 2 we look at related work and in Section 3 we describe
the background for this paper as well as its technical
environment. The different classes of update protocols and
their properties are discussed in Section 4, while Section 5,
besides defining a data-model for the location information
and its accuracy, compares their efficiency and effectiveness
by means of an analysis. In Section 6 we present some simulation
results, to support the outcome of our analysis. Fi-
nally, Section 7 contains our conclusion, as well as the plans
for future work.
Related Work
Architectures for a location service have been discussed in
the area of location-aware applications as an important component
of such systems. However, different update protocols
for the transmission of the location information have
not been compared in detail. Early location services were
usually developed for a particular positioning system, like
the location service for the Active Badge system, which is
described in [HH94]. For a similar positioning system, the
ParcTab system developed at Xerox Parc, a location service
has been created, where the location information of
a mobile object or user is protected by a dedicated Home
Agent, which controls access to it [ST94]. In this context
the problem of disseminating the location information to a
large number of clients has been discussed in [ST94]. Clients
with similar queries receive the location information over dynamically
created multicast groups in which the responses
to these queries are grouped. In his PhD-thesis, Leonhardt
([Leo98]) proposes a universal location service, which is independent
from the types of applications accessing it and the
types of positioning systems it gets the location information
from. A detailed location model is presented that integrates
different types of location information. Another main concern
of this work is privacy and security. For this purpose it
defines requirements and policies for access control of a location
service. The thesis also contains some thoughts about
the design of a global, general-purpose location service but
does not propose or evaluate a specific architecture.
The management of the location information of their mobile
phones is a very important issue in the area of mobile
communication networks. When a call has to be forwarded
to a mobile phone, a mobile communication network sends
a paging message to all the cells the mobile phone may be
in, whereupon the corresponding mobile phone answers to
accept the call. The mobile phone on the other hand periodically
reports its current cell, which is updated in the
Visitor Location Register and Home Location Register. Various
update strategies have been discussed with the goal of
minimizing the overall number of paging and update mes-
sages. In [BNKS95] a distance-based, a movement-based
and a time-based protocol are compared. In this special
application area the location information is a discrete iden-
tifier, describing a certain cell of the communication net-
work. Today, these cells have a size of about 1 to 10 miles
but are expected to become smaller with the introduction
of future technologies. Update policies for location management
have been optimized for these special requirements. In
[BD99] the LeZi-update approach is described, which uses
the cell names as an alphabet for minimizing the updates
by an mechanism similar to the Lempel-Ziv compression. In
our work we have assumed that the location information is
much more accurate, acquired for example by a GPS sensor,
and that the location information can have different levels
of accuracy. The location service, these update protocols
are intended to be used for, also allows different types of
queries (e.g., range queries), which are not supported by the
location management components of mobile communication
networks.
In the DOMINO project a database for the tracking of
mobile objects is being developed (see [WSCY99]). One intended
area of application is fleet management for the trucks
of a transportation company. To reduce the number of up-
dates, it is assumed that the route, on which the mobile
object is traveling, is known to the database in advance and
that the object informs the database when it changes its
route. Different dead-reckoning strategies are proposed and
compared, where the database estimates the current location
of a mobile object on this route based on its speed
and the object sends an update of its location when it differs
from this estimation by more than a certain threshold.
The different strategies have different ways for determining
this threshold or for adapting it dynamically. These dead-reckoning
protocols have been designed on the assumption
that the route of the mobile objects is known beforehand. In
this paper we examine update protocols from a more general
point of view, where we assume no knowledge of the mobile
objects' future movements.
3 Background
This section gives an overview of the technical environment
our work is based on, namely the sensor systems the location
information is acquired from and the network environment
it is transmitted over. Finally, we describe the architecture
for a universal distributed location service, which is being
developed at our Institute and where we plan to apply the
results of this work.
3.1 Positioning Sensors
The location information for a mobile object can be determined
through various types of positioning systems. A basic
distinction can be made between tracking systems, where a
system of stationary sensors determines the location of a
mobile object, and positioning systems, where the location
information is determined by a sensor on the mobile object
itself. A typical tracking-system is the Active Badge system
(see [WHFG92]), where an Active Badge carried by a user
or attached to an office device periodically emits an infrared
beacon, which is detected by an infrared sensor placed in
each room of a building. The widely used global positioning
system (GPS) is a positioning system, where a sensor determines
its own position by taking a bearing on four of a whole
of twenty-four special satellites (see [HWLC97]). Different
types of positioning systems return the location information
with varying formats and degrees of accuracy. It can
be symbolic (i.e., the identifier of a region, like a room or
communication cell) or geometric, where it is described by a
global geodetic coordinate system like WGS84 (see [IA97]).
The classifications in this paragraph have been taken from
[Leo98].
Because no positioning system offers a global coverage
(e.g., GPS works only outdoors) a universal location service
has to be able to integrate the location information acquired
by all types of positioning systems.
3.2 Network Environment
In our work, we have assumed the following network environ-
ment: Location servers and stationary clients, which query
the location information, communicate over a fixed network.
Mobile devices need to be connected to this network by a
wireless link. They have to be able to communicate and to
be contacted independently from their geographical location
(e.g., using a mechanism like Mobile IP [Pe96]), because the
device has to transmit location information to a server via
the wireless link or is queried by the location server through
it, if the information is determined locally. Mobile devices
may also act as a client of the location service by posting
queries over the wireless link. The wireless network can either
be a wireless WAN, like GSM [MP92], a MAN, like the
Metricom Ricochet network, or a LAN, for example according
to the IEEE 802.11 standard [Com97].
A common characteristic of these wireless networks is
that a connection can be temporarily lost while the device is
at an unfavorable location (e.g., inside of a tunnel), a state
which is called a disconnection. In most cases a wireless
network can also not offer as good a bandwidth and latency
as a fixed networks (see [Sat96]).
3.3 A Universal Location Service
This comparison of update protocols has been done as part
of our efforts to design and develop a universal distributed
location service (see [LK99]). As mentioned before, this service
will have to collect and integrate the location information
from various sensor systems. Furthermore, it will
provide a general interface through which different types of
applications can access the location information in a general
way. For reasons of scalability and to achieve short response
times as well as high update rates, the information will be
distributed between a number of location servers.
The location service shall provide the following function-
ality: It will support range queries, that is finding all mobile
objects inside a given area, as well as position queries, which
request the current location of a certain mobile object. A
more specialized query is, for example, the search for the
nearest object to a certain location. It is intended, that the
location service will additionally support an event mecha-
nism, where the client can define a certain predicate and
is notified by the service whenever this predicate becomes
true. A client program may for example be notified, whenever
a mobile object enters or leaves a given area or when
a mobile object meets another one, that is comes within a
certain distance from it.
location
server
client
programs
location
register
object
register
sensor
systems
object
sightings
location
service API
queries,
events
results,
notifications
lookups lookups
updates
updates
Figure
1: Main components of a universal distributed location
service
We have proposed an architecture for such a location
service, which is shown in Figure 1. Its components and
their functionality are described next:
ffl Clients and sensor systems: Clients of the location service
are location-aware applications, which run either
on a mobile or on a stationary computer and query the
location servers using the interface mentioned earlier
in this subsection. A client on a mobile device is usually
also equipped with a positioning sensor or is being
tracked by one. Sensor systems, which, depending on
their type, determine the location information for one
or more mobile objects, are associated with a certain
location server and update the location information for
these objects.
ffl Location server: Each location server is responsible
for a certain geographical area and stores the location
information for all mobile objects that are currently
inside of this area. If a mobile object leaves the area,
a hand-over has to be performed with the server, into
whose area the object has moved. A location server
answers the clients' queries concerning the mobile objects
it is responsible for and forwards other queries to
the appropriate server(s). This is done by accessing
one of the two following registers:
ffl Object register: The data, which belongs to a single
mobile object, is stored in the object register. It can
contain general information about the object or information
that is determined by the location service, like
the maximum speed of the object. The object register
also stores the addresses of the location servers the
location information for this object is currently stored
on. It can easily be distributed, so that each register
server is responsible for a certain set of objects.
ffl Location register: The location register stores the association
between the location servers and the area
they are responsible for. It is used to find the appropriate
location servers for a range query. If necessary,
the location register can be distributed across different
servers, which are organized in a tree structure similar
to the Domain Name System (DNS) of the Internet.
Because of privacy concerns, security and access control for
such a location service are very important issues. A user
should be able to control in detail who and to what degree
has access to his location information. Some solutions for
this problem have been presented in [Leo98]. In this paper
we do not discuss privacy any further, but will address the
issue in future work.
4 Update Protocols
In this section the different classes of update protocols are
introduced and their main properties are discussed. The
protocols are used to update a remote secondary copy of the
location information for a certain mobile object based on
the contents of a primary copy. The goal is to guarantee a
given accuracy of the location information in the secondary
copy. The information of the primary copy is either determined
directly by a positioning system or is the information
stored on another location server. We call the component
which manages the primary copy the source of the location
information. The secondary copy is usually stored on a special
or general location server, which is queried by local or
remote applications. Figure 2 shows the components which
are involved in the transmission of the location information.
source/
primary
copy
update
protocol
fixed
networkor
mobile
communication
queries
location
server
mobile
deviceor
location
server
sensor
system application
server/
secondary
copy
Figure
2: Components involved in the updating of location
information.
4.1 Classification
The update protocols can be divided into three main classes,
namely querying, reporting and combined protocols, where
each class has a number of typical variants. Each of these
protocols has its characteristic properties and is suitable for
a given environment or for certain requirements. Some of
the reporting protocols are similar to the paging/update
schemes that are used for Location Management in the re-search
area of Personal Communication Service (PCS) networks
and are summarized, for example, in [BNKS95]. The
classes of update protocols and their relationships are shown
in more detail in Figure 3.
querying
updateprotocols
reporting
simple
simple caching periodic distance-
based
time-
based
dead-
reckoning
combined
Figure
3: Classification of update protocols for the transmission
of location information.
4.1.1 Querying Protocols
A protocol is called a querying protocol, if the server decides
when to request the location information from the source.
In this case, the source can be very simple, as it does not
need to keep extensive information about its state or realize
a complicated logic. This may be important for small mobile
devices. The simple and the cached querying protocols
transmit the location information on-demand, that is only
when it is queried by an application. If the location information
is queried only seldomly, these protocols are more
efficient than the reporting protocols described in 4.1.2, because
the information is not transmitted unnecessarily (see
Section 5).
Simple: In the most simple form the server requests the location
information from the source each time it is queried
by an application and therefore does not need a secondary
copy at all. This leads to the highest possible accuracy of
the location information, but also to a large number of mes-
sages, if the information is queried very often. The response
time of the server is also comparatively large, as the server
has to contact the source for each query. On the other hand,
this protocol has to be used, if because of privacy concerns
the user does not allow his/her location information to be
stored on any location server other than on his/her personal
device. In this case, the personal device has to be accessed
for each query to check for access rights. An example for
this is the location service presented in [ST93], where a special
program, a so-called User Agent, stores and protects
the location information of a certain user. Here, we use this
protocol mainly for comparison.
Cached: The cached querying protocol is an optimization of
the simple protocol, where the server stores a cached copy
of the last transmitted location information. When the location
information for this mobile object is queried by an
application, the server estimates the accuracy of the cached
copy and returns it, if it is considered to be accurate enough.
Otherwise, the server has to send a request to the source like
in the simple protocol. A pessimistic cached querying protocol
uses the distance, a mobile object may have traveled
at its maximum speed, for the estimation of the accuracy.
If the maximum speed of the mobile object is much higher
than its average speed, the cached copy is often unnecessarily
considered not accurate enough. An optimistic cached
querying approach could use the average speed of the mobile
object instead of the maximum one. However, with any
optimistic estimation for the accuracy of the location infor-
mation, the actual location of the mobile object can in the
worst case differ from the reported location by more than
the requested accuracy. With a cached querying protocol
the response time of the server is varying and depends on
whether the server can use the cached copy or has to contact
the source.
Periodic: If the server queries the location information periodically
from the source with a certain time interval D, the
protocol is called a periodic querying protocol. Although
here the initiative is reversed, this protocol has the same
properties as the time-based variant of the reporting protocols
described next.
4.1.2 Reporting Protocols
In case of a reporting protocol the initiative is on the side of
the source. It remembers which location information it has
sent last to the server and therefore knows which location
is stored there. An update of the location information is
sent, whenever a comparison to the current position of the
mobile object exceeds a certain distance or time threshold.
The server can therefore conclude the maximum uncertainty
of its copy from the value of this threshold. With an unmodified
reporting protocol the server always answers the
queries of the applications by directly returning the information
currently stored in its copy. It can therefore only
return the location information with an accuracy specified
by the value of the threshold, even if a more accurate information
is queried by an application. The response time
of the server on the other hand is shorter, as it does not
have to contact the source. A reporting protocol is usually
more efficient for a given maximum accuracy than a querying
protocol, if the location information is queried often (see
Section 5) or if the server has to check periodically for the
occurrence of events.
Simple: The most simple reporting protocol sends the location
information each time the value of the primary copy
Message rate is
adjusted to mobility
of object.
Message
rate is adjusted to
query rate and requested
accuracy.
Upper bound
for spatial uncertainty
of returned
information.
Allows applications
to specify a
desired accuracy.
Can detect disconnections
querying:
simple \Theta (\Theta) \Theta \Theta
cached \Theta (\Theta) \Theta \Theta
periodic \Theta
reporting:
simple (\Theta) (\Theta)
time-based \Theta
distance-based \Theta \Theta
dead reckoning \Theta \Theta
combined \Theta \Theta \Theta \Theta (\Theta)
Table
1: Summary of properties for different update protocols.
changes, for example because a sensor system has determined
a new location sighting. In this case the number of
messages depends on the update rate of the sensor system
and can be rather high. Depending on the type of sensor
system, the simple reporting protocol also falls into one of
the two following categories. We therefore do not consider
it any further.
Time-based: With a time-based protocol the location information
is transmitted periodically, after a certain interval of
time T has elapsed. The update rate is fixed and does not
depend on the behavior of the mobile object, which guarantees
a certain temporal but not a spatial uncertainty of the
information. If the object moves slowly or not at all, there is
little or no difference in the location information transmitted
by the messages to the server. If the object moves fast,
not enough messages are sent to achieve a high accuracy.
Distance-based: The distance-based protocol sends an up-date
of the location information whenever the geographic
distance between the current location of the mobile object
and the last reported location becomes greater than a given
threshold D. As this protocol sends more messages if the
mobile object is moving fast and less messages if it is slower
or stationary, it is often more efficient for objects that perform
sporadic movements between periods of immobility.
This is, for example, typical for users in an office environment
or for all sorts of office equipment. It is also possible
to integrate the time-based and the distance-based protocol
to combine their properties.
Dead-reckoning: Dead-reckoning is an optimization of the
distance-based protocol. Here, the server estimates the current
location of the mobile object based on its old location,
its speed and the direction of its movement or on information
about the route of the object. The source also calculates
this estimated location and sends an update when it differs
from the actual location by more than a certain distance
threshold. A dead-reckoning approach performs very well,
if the object is moving with constant speed in a given direction
for some time or if the route of the mobile object
is known in advance. In the second case the update costs
can, according to [WSCY99], be reduced by 85% compared
to other reporting protocols.
4.1.3 Combined Protocol
While a plain querying protocol can not be adjusted to different
mobility characteristics of the mobile objects, a reporting
protocol does not consider the query rate and the
accuracy requested by the applications. With a combined
protocol, which integrates the distance-based reporting protocol
and the cached querying protocol, both of these features
can be achieved. Similar to the distance-based reporting
protocol, the source may update a secondary copy on
the server to achieve a given spatial accuracy D. If the
location information stored in the secondary copy is not accurate
enough for a certain query, the server requests the
information from the source as in a querying protocol. To
minimize the total number of messages consisting of updates
and queries, it has to be decided whether to update a secondary
copy at all and what distance threshold D has to
be used, depending on the mobility properties of the mobile
object and on the queries by the applications (see Section
5). If the source monitors the mobility properties and the
server those of the queries, they can adapt the properties of
the protocol dynamically by increasing/decreasing the distance
threshold D or by starting/stopping the updating of
the secondary copy altogether. With the combined protocol,
the response time is again varying and depends on whether
the secondary copy on the server is accurate enough or if
the server has to contact the source.
4.2 Behavior in Case of Disconnection
A problem that frequently occurs with mobile devices and
wireless data transmission is a temporal disconnection of the
communication link. A protocol which is intended to transmit
location information from a mobile device to a server
via a wireless communication link has therefore to be able
to deal with such disconnections. In the following paragraphs
we discuss the properties of the basic protocols with
regard to disconnections, namely how long it takes to detect
a disconnection and the maximum uncertainty of the location
information returned during that time. If the server has
detected a disconnection it can, according to the preferences
of its users, either return an error message when queried for
the location information or return the last known position
together with an indication that it is obsolete. Where necessary
we sketch appropriate modifications to these protocols
that enable them to deal with disconnections.
Querying protocols: In case of a querying protocol, the disconnection
is detected as soon as the server receives a query
and requests the location information from the source (and,
in case of a cached querying protocol, also can not answer
the query from its cached copy). Therefore, the server does
not at any time return less accurate information than in the
normal case.
Time-based reporting protocol: When using a time-based
protocol a disconnection can be detected if no update messages
have arrived after the time threshold T has elapsed
since the last update. Again the server only returns location
information with the specified accuracy.
Distance-based reporting protocol: With the basic distance-based
protocol the server is not able to detect a disconnec-
tion. Instead, it assumes that the mobile object has not
moved by more than the distance threshold D and returns
the old location information as being up-to-date. To be able
to detect disconnections, the distance-based protocol can be
combined with a time-based one, by having it sent a location
update at least every time interval Tmax . A suitable value
for Tmax has to be found by considering the message overhead
versus the maximum uncertainty, the user is willing to
tolerate in case of an error.
Dead-reckoning reporting protocol: A basic dead-reckoning
protocol has the same problems with disconnections as the
distance-based protocol and the same mechanism can be
used to deal with them. In [WSCY99] another technique
for detecting disconnections has been introduced, were the
distance threshold D is being continuously decreased until
the source is forced to send an update message or it has become
increasingly likely that a disconnection has occurred.
Combined protocol: How the combined protocol reacts to
disconnections depends on how accurate a secondary copy
is kept on the server. A disconnection is detected as soon as
the server has to request the location information from the
source. If this is not the case, the combined protocol behaves
like the distance-based protocol and can return inaccurate
location information. Again, a maximum time interval Tmax
between update messages should be specified.
A summary of the properties for the different update
protocols discussed in this section is contained in Table 1.
It shows, whether the message rate of a protocol depends
on the mobility characteristics of the mobile objects and
whether it depends on the queries of the applications. It
also indicates, whether the protocol can guarantee an upper
bound for the returned location information and if it allows
the applications to request a certain accuracy of the infor-
mation. The final column shows, whether the protocol is
able to deal with disconnections.
Analytical Comparison of the Protocols
In this section, the effectiveness and efficiency of the update
protocols are compared in more detail, by means of an analy-
sis. First, the variables that appear in the following analysis
are described and a general data model for the location information
and its accuracy is defined. The analysis considers
the number of messages required for updating the location
information on the server as opposed to the minimum and
average accuracy of the location information returned to an
application. Corresponding formulas are shown first for the
querying and reporting protocols, then for a combined pro-
tocol. Finally, we discuss the characteristic properties of
these protocols, based on the results of the analysis. Only
the updates and queries for the location information of a
single mobile object are considered, as the results can be
easily applied to several objects. For reasons of simplicity
we also do not consider the delays for the transmission of
the messages, which would lead to a further (temporal) uncertainty
of the location information. Because it is added
uniformly to all messages, the delay does not substantially
affect the comparison of the protocols.
The efficiency of an update protocol is here considered
to be the average number of messages m that is transmitted
per second between the source and the server. Messages can
be location updates generated by the source as well as location
requests from the server. The accuracy of the location
information on the server, which describes the effectiveness
of a protocol, is defined by the maximum and average deviation
between the information returned as a result of a
query and the actual position of the mobile object. Up to
now, we have assumed that applications are only interested
in the maximum uncertainty of the location information, for
example if they want to be able to determine which room of
a building a certain user is in. However, other types of applications
may be more concerned with the average accuracy
of the information. An example for this could be a map,
where the current locations of a number of mobile objects is
shown. In our analysis we have therefore considered both,
the maximum and the average accuracy, dmax and davg .
The calculations for m, dmax and davg are based on
the behavior of the mobile object, defined by its average
and maximum speed, vavg and vmax , and on the uncertainty
up with which the location information is available
at the source. Moreover, the calculations depend on how
frequently and to what accuracy the location information is
queried by the applications, which is described by the average
number of queries per second q and the average of
the requested uncertainty uq . The calculations are also affected
by characteristic parameters of the different protocols,
namely the maximum uncertainty required of the secondary
copy us , the speed that is assumed for the mobile object by
the cached querying protocol vasd , and the time threshold T
for a time-based or the distance threshold D for a distance-based
reporting protocol. Table 2 shows a summary of these
variables.
Some important restrictions between these variables are
as follows: Because the information transmitted to the server
can not be more accurate than the information of the source,
the uncertainty of the secondary copy is always equal to or
greater than the uncertainty of the primary copy, us - up .
Also, it is not practical for an application to request more
accurate location information than the one available at the
source. Hence, we also assume that uq - up . For the calculation
of the average deviation we assume that the average
uncertainty of the location information on the source is half
of the maximum uncertainty. This may not be true for all
sensor-systems (e.g., the average uncertainty is less than half
of the maximum if the source is a GPS sensor), but does not
have much influence on the outcome of the analysis. The restrictions
described here apply to all formulas in this section
and are not explicitly stated again.
5.1 Location and Uncertainty Model
For the following analysis we use a uniform model of the
location information returned by the different positioning
systems and of its accuracy.
The location information is supposed to be given by
global geodetic coordinates, for example of the WGS84 stan-
Maximum speed of mobile object.
vavg Average speed of mobile object.
q Average number of times per sec-
ond, the location information of the
mobile object is queried.
uq Average of requested accuracy for
this location information.
q Accuracy requested in one certain
query.
up Uncertainty of primary copy.
Tp Update interval of primary copy.
l Time at which a certain location
sighting l has been acquired.
us Uncertainty of secondary copy.
vasd Speed that is assumed for estimating
the accuracy of the location
information.
Time threshold of the time-based
reporting protocol.
Distance threshold of the distance-based
reporting protocol.
Average number of messages transmitted
per second between source
and server.
Maximum deviation between the location
information the server returns
as result of a query and the
actual position of the mobile object.
davg Average deviation.
Table
2: Variables used in the analysis.
dard, where the distance between two locations can easily
be calculated. Symbolic location information (e.g., the name
of a room) returned by some of the positioning systems can
easily be converted to geometric coordinates. The geometric
coordinate for a region described by a certain symbolic
name is given by the center of the region, while the spatial
accuracy is the distance from the center to the farthest point
in the region.
A location sighting can have a temporal as well as a
spatial accuracy. The temporal accuracy is given by the
time that has elapsed since the location sighting has been
acquired, while the spatial accuracy is defined by the maximum
distance between the position reported by the sighting
and the actual position of the mobile object. For many
location-aware applications the spatial accuracy of a sighting
is more important, because the applications are concerned
with the spatial relationship between (mobile) objects. The
uncertainty u l (t) of a certain location sighting l describes
the spatial accuracy at a given time t - t l .
At the time of the sighting the uncertainty is determined
by the accuracy up of the sensor system. The uncertainty at
a later time t can be estimated by the distance the mobile
object may have traveled during the time . If a maximum
bound for the velocity of the mobile object (vmax) ex-
ists, the maximum uncertainty of the location sighting can
be calculated by adding the distance the object can have
traveled to the uncertainty of the sensor system (see Figure
4). This is described by the following equation:
For example, the maximum velocity of a car can be set to
300 km/h (to be on the safe side) and the maximum velocity
locationsighting
uncertainty
Figure
4: Uncertainty of location information depending on
the accuracy of the sensor system and the elapsed time.
of a person to 36 km/h. By evaluating the history of the
location sightings of a mobile object, it is also possible to
determine a maximum velocity separately for each object.
In many cases, however, the location sighting will be
more accurate than the uncertainty given by this equation,
as the mobile object will not be moving at its maximum
speed or not in a straight line. A person in an office will usually
remain relatively stationary at a certain location (e.g.,
his office or a conference room) for a longer interval of time,
while moving at a comparatively high speed between these
locations. If the uncertainty does not need to be limited by
an upper bound or the maximum velocity is not known, an
assumed velocity vasd (e.g., the average velocity vavg of the
mobile object) can be used to predict the uncertainty instead
of the maximum velocity vmax . In some cases this will lead
to an actual deviation, which is greater than the predicted
one. This error will be worse for the sporadic movement of a
person in an office, compared to the more steady movement
of a traveling car.
5.2 Basic Protocols
The equations for an approximate calculation of the number
of transmitted messages as well as for the maximum and average
uncertainty of the location information are shown next
for the basic querying and reporting protocols. We have
not yet performed the analysis for the dead-reckoning pro-
tocol, because it depends to a great extent on the movement
characteristics of the mobile object and we did not want to
assume prior knowledge about the route of the object. In
general the dead-reckoning protocol can be expected to behave
similar to the distance-based reporting protocol.
Simple querying protocol: In the simple querying protocol,
which is presented here only for reasons of comparison, the
number of exchanged messages is equal to the number of
queries as every query is forwarded to the source.
If we do not consider the communication delay, the location
information presented to the applications has the same
accuracy as the location information of the source.
Cached querying protocol: The cached querying protocol
uses Formula 1 to estimate the uncertainty of the location
information stored on the server and if accurate enough returns
it without contacting the source. For the speed of the
mobile object used in this formula it can take a pessimistic
approach with vmax (as shown in Formula 1), or an optimistic
approach with vavg instead of vmax . In the following
considerations we represent the assumed speed of the mobile
object by vasd , which is then replaced by the speed used in
a concrete version of the protocol. Compared to the simple
protocol, the caching approach eliminates all messages
where the query falls into the period of time in which the
cached copy of the location information is considered accurate
enough, (derived from Formula 1).
The number of messages transmitted between source and
server is therefore the total number of queries, multiplied
by the fraction of queries that can not be answered from the
cache, which is approximately
The maximum uncertainty of the returned location information
is given by the time \Deltat the cached copy is considered
accurate, multiplied with the maximum speed of the mobile
object. To this the initial uncertainty of the location
information of the primary copy has to be added. The average
uncertainty can be approximated by the uncertainty
of the sensor system, if the location information has to be
requested from the source. Otherwise, the average uncertainty
is half the distance that the mobile object can have
traveled at average speed during the time in which a cached
copy is considered valid. The corresponding Formula 7 is
shown in a simplified form.
If the assumed speed vasd of the mobile object is set to its
maximum speed vmax , the uncertainty of the location information
presented to the querying application is limited by
uq (substituting the variables in Formula 6). The protocol
can therefore in this case guarantee the accuracy requested
by the applications.
Time-based reporting protocol: As the time-based protocol
sends a location update periodically, the number of messages
depends only on the time threshold T . To achieve a given
uncertainty us for the secondary copy, T has to be set to the
time, the mobile object needs to cover the distance given by
us minus the uncertainty of the primary copy at maximum
The maximum deviation can be calculated by adding the
distance that the object may have traveled during time T
to the uncertainty of the location information at the source.
For the average deviation the average speed is used, instead
of the maximum one.
Distance-based reporting protocol: The number of messages
transmitted with the distance-based protocol is also independent
of the number of queries. To guarantee a given
uncertainty us of the location information on the server, the
distance threshold D is set to us \Gamma up . The average number
of messages per second can then be calculated by the
time interval that the mobile object requires to cover this
distance at average speed.
us \Gamma up
If no messages are lost due to problems with the network
connection (compare Section 4), the distance-based protocol
achieves the requested maximum uncertainty us for the
secondary copy on the server. On average the uncertainty
is half of it.
us (12)
us
5.3 Combined Protocol
The combined protocol comprises elements of the distance-based
reporting protocol and the pessimistic cached querying
protocol, described in the previously. Therefore, it also
combines elements of their behavior. The transmitted messages
are the updates sent to keep the secondary copy up-
to-date as well as the requests for the location information
on the source sent by the server, if the secondary copy is
not accurate enough. The number of updates can be calculated
similar to the number of messages in the distance-based
reporting protocol. The number of requests is the
number of messages in the cached querying protocol, where
the query rate is reduced by the probability that the uncertainty
demanded in a query is lower than the accuracy
of the location information already stored in the secondary
copy, P (u
us ). The probability distribution depends
on how the location information is queried and used by the
applications.
us \Gamma up
Because the combined protocol queries the source whenever
the location information stored in the server is less accurate
than the accuracy demanded in a query, it can always return
the desired accuracy similar to a cached querying protocol.
The maximum uncertainty returned is therefore the uncertainty
demanded in the queries. The average uncertainty is
again a combination of the average accuracy of the reporting
protocol, in case the accuracy requested in a query can be
met by the secondary copy, and of the average accuracy of
the querying protocol, otherwise.
us
The behavior of the combined protocol can be controlled
through the uncertainty of the secondary copy. If it is set to
a low value, the protocol behaves like the distance-based reporting
protocol, if it is set to infinity, the combined protocol
can be made to behave like a cached querying protocol.
5.4 Discussion
To compare the properties of the protocols, we first look
at their efficiency, that is the number of messages that are
transmitted between source and server. These are shown in
Figure
5 for the querying and reporting protocols depending
on the number of queries per second. For the other parameters
we have assumed values taken from GPS traces that
we have obtained from a Differential GPS sensor during a
car ride and which are described in more detail in the next
section. The average and maximum speed for the mobile
object is m/s. The uncertainty
of the primary copy up is that of the sensor system
and is set to 5 m. For the queries we have assumed a fixed
demanded uncertainty of
messages
per
second
queries per second
simple querying
pessimistic cached querying
optimistic cached querying
time-based reporting
distance-based reporting
Figure
5: Analytical results: A comparison of the number
of messages transmitted with the querying and reporting
protocols for a given query rate.
Generally, a distance-based reporting protocol performs
better than the time-based one and the optimistic cached
querying protocol better than the pessimistic one. While
the properties of the reporting protocols are independent
from the query rate, the number of messages increases with
a querying protocol with the number of queries. If the query
rate is low, a querying protocol is therefore better than a reporting
protocol. For very low query rates a simple protocol
is sufficient. If the query rate is higher, the distance-based
reporting protocol requires fewer messages than the pessimistic
cached querying protocol, which is in many cases to
be preferred to the optimistic protocol as it can guarantee a
maximum uncertainty of the returned location information.
The query rate at which the performance of the reporting
protocol becomes better than that of the querying protocol
is given by the following inequation:
us \Gammau p
If vavg is low compared to vmax , which is the case for
mobile objects with sporadic movements, the limit for the
query rate in Formula 17 approaches 0. For such objects,
the distance-based reporting protocol is always better than
the cached querying one. If vavg approaches vmax , the limit
for the query rate approaches infinity. In this case, the
cached querying protocol always performs better. However,
the number of messages for high query rates is only a little
higher with the reporting than with the querying protocol.
The other aspect of the update protocols, which is discussed
in this paper, is their effectiveness, that is to what
degree the server can fulfill the accuracy demanded in a
query. The maximum and average uncertainty (dmax and
davg) of the location information returned by the server is
shown separately for the two cached querying and the two
reporting protocols in Figure 6. The uncertainty is shown
depending on the speed ratio between the average and the
maximum speed of the mobile object (vavg=vmax ), which
gives a good indication of its mobility characteristics. A
mobile object with a low ratio moves sporadic, an object
with a ratio approaching 1 moves steadily. For the graphs
we have assumed a query rate q of 0:1 queries per second.
The pessimistic cached querying approach can meet the
required accuracy independently from the mobility of the
object. For a low speed ratio it also has a very low average
uncertainty. In comparison, the optimistic cached querying
protocol, which is much more efficient, results in an almost
constant average uncertainty, a little below the uncertainty
requested by the client. However, for a low speed ratio the
maximum uncertainty can be much higher than the one demanded
by the client. This protocol is therefore not suitable
for objects with sporadic movement, if the querying application
can not tolerate variations in the uncertainty.
Both reporting protocols can meet a fixed uncertainty
demanded by the client. The time-based protocol has a low
average uncertainty for a small speed ratio, compared to
the distance-based protocol, which offers a constant average
uncertainty for all types of mobile objects. As the former
requires more messages, the later is to be preferred. The
reporting protocols, however, can only return the location
information with the accuracy currently stored on the server.
They can not meet the demand of applications which query
the information with a lower requested accuracy, u
us .
From the viewpoint of their effectiveness, the distance-based
reporting protocol is equal to the cached querying
protocol if only a fixed requested accuracy is considered (al-
though, the later has a better average uncertainty, especially
for a low speed rate). The reporting protocols are not suit-
able, if the location server allows the client to flexibly specify
the requested accuracy and it is important to meet these requirements
As mentioned before, the performance of the combined
protocol depends on the uncertainty with which the secondary
copy is updated as well as on the query rate. In
Figure
7, the number of transmitted messages is shown for
the combined protocol depending on the uncertainty of the
secondary copy and the query rate. For the uncertainty demanded
in the queries we have assumed a Gaussian distribution
with an expected value of and a standard
deviation of 20 m. All other parameters have the same values
as before.
Figure
7 indicates an optimal value for the uncertainty
of the secondary copy for higher query rates, whereas for
lower query rates the number of messages is lowest, if the
uncertainty is set to infinity. It is therefore possible to use
Formula 14 to decide, whether it is useful to update a secondary
copy at all and to find an optimal uncertainty value
for it. The uncertainty value can either be calculated with
the necessary parameters set to the average values determined
for a certain environment, the protocol is going to
be used in. Or it can be adjusted dynamically according to
changes in the environment.
For comparison with the other protocols, Figure 8 shows
the number of messages transmitted with the combined protocol
depending on the query rate. Optimal values for the
uncertainty of the secondary copy have been taken from Fig-
uncertainty
of
returned
location
information
in
meters
ratio between average and maximum speed of mobile object
pessimistic cached querying
maximum uncertainty
average uncertainty101000
uncertainty
of
returned
location
information
in
meters
ratio between average and maximum speed of mobile object
optimistic cached querying
maximum uncertainty
average uncertainty101000
uncertainty
of
returned
location
information
in
meters
ratio between average and maximum speed of mobile object
time-based reporting
maximum uncertainty
average uncertainty101000
uncertainty
of
returned
location
information
in
meters
ratio between average and maximum speed of mobile object
distance-based reporting
maximum uncertainty
average uncertainty
Figure
Analytical results: Maximum and average uncertainty of the location information on the server for the optimistic
and pessimistic cached querying protocols and the time-based and distance-based reporting protocols.
ure 7.
The combined protocol integrates the positive features
of the more simple querying and reporting protocols. Al-
though, for a higher query rate it is less efficient than the
distance-based reporting protocol, it requires much less messages
for a low query rate, similar to the querying protocols.
Unlike the reporting protocols, it is also able to meet an arbitrary
requested accuracy. Its disadvantages are that it is
more complicated to implement, because an optimal value
for the uncertainty of the secondary has to be found, and
that communication errors are more difficult to handle.
In summary, the combined protocol is suitable for most
cases, especially if a protocol is needed that performs equally
well in different environments or even can adapt to them. Of
the querying and reporting protocols the pessimistic cached
querying protocol and the distance-based protocol are to
be preferred, because they combine an upper bound for the
spatial accuracy of the returned location information with a
good efficiency. Of these two, the former is decidedly better
for objects with sporadic movements and for higher query
rates, but does not allow the accuracy of the location information
to be requested on application-level.
6 Simulation Results
For the update protocols discussed in Section 5, we have
performed various simulation runs based on ten actual GPS
traces. To this end we have developed a simple simulator,
which implements a location source with a primary copy
and a location service with a secondary copy for the location
information of one mobile object. The information on
the source is updated from the GPS trace, while the server
receives randomly created location queries with an exponentially
distributed time interval and a fixed or, in case of the
combined protocol, a Gaussian distributed accuracy. The
mean value for the exponential distribution of the time interval
between queries is the inverse of the query rate q.
The fixed accuracy requested in the queries is 100 m for the
basic protocols. The Gaussian distributed accuracy for the
combined protocol has a mean value of 100 m and a standard
deviation of 20 m. Into this simulation environment
different update protocols can be inserted that specify, how
the source and server react to incoming updates or queries
and how the location information is transmitted. As in the
analysis, the delays for transmitting the messages are not
considered.
The ten GPS traces used in our simulations have been acquired
on a typical car ride in the commuting traffic around
the city of Stuttgart. These traces have an average length
of about 28 minutes and an average speed of 44.68 km/h. A
Differential GPS sensor with an accuracy between 2 and 5
meters has been used to determine the location information,
which is written to a file every second.
For each trace we have performed various simulation
runs, where the number of transmitted messages has been
calculated depending on a given query rate. Figure 9 shows
the results of these simulation runs as the mean values of 100
separate simulations. The parameter values for the protocols
(e.g., the average and maximum speed) have been taken
speed ratio pessimistic optimistic distance-based time-based combined
cached querying cached querying reporting reporting
max. avg. max. avg. max. avg. max. avg. max. avg.
Table
3: Simulation results: Maximum and average accuracy of the location information for the different update protocols.
combined protocol
uncertainty of secondary copy in meters
queries per second0.40.6
messages per second
Figure
7: Analytical results: Number of messages transmitted
with the combined protocol depending on the number
of queries and the uncertainty of the secondary copy on the
server.
from the respective trace.
In general, these simulation results confirm the assumptions
we have made for the analysis. The number of messages
for the cached querying protocols is a little higher than
in the analysis. One reason for this is that the location information
queried at the source is not determined exactly when
queried, as we have assumed there. Instead, it has already
an average age of Tp=2 where Tp is the update interval of the
sensor system, in our case 1 second. Therefore, the location
information on the server has to be updated a little sooner
than calculated. Also, the maximum velocity of the mobile
object is sometimes difficult to obtain from the GPS traces,
because the uncertainty of the positioning systems can have
a great influence on the distance of two neighboring entries.
We therefore take the average of 5 seconds to determine the
maximum speed. It happens a number of times that the the
flow of location information from the DGPS sensor is interrupted
for a short time, which may also lead to variances in
the behavior of the protocols.
For the combined protocol, we have again determined the
message count depending on the uncertainty value for the
secondary copy as well as on the query rate. The results of
this simulation are shown in Figure 10. Although the results
are again a little higher than the values determined in our
analysis, the analysis reflects their characteristics nicely.
For five GPS traces with different speed ratios ranging
from 0.26 to 0.354 the maximum and average resulting accuracies
are depicted in Table 3. The query rate has been
set to 0.1, as the results tend to vary more for higher rates,
while the other parameters have the same values as before.
For the accuracies, as compared to the number of transmitted
messages, the results depend more on the characteristics0.011100
messages
per
second
queries per second
combined
Figure
8: Analytical results: Number of messages transmitted
with the combined protocol depending on the number
of queries. For the uncertainty of the secondary query the
optimal values taken from Figure 7 are used.
of a certain trace. Because we have averaged the maximum
speed over 5 seconds, the apparent speed of two neighboring
entries in the trace may be higher than the one we have
assumed for the parameters of our protocols. This can lead
to a maximum accuracy that is greater than the requested
one (100 m), when using a cached querying or the combined
protocol.
7 Conclusion and Future Work
In this paper, we have described different protocols for transmitting
location information and have compared them according
to their effectiveness and efficiency. These protocols
may be used, wherever location information is queried or
updated continuously. With the help of the analysis a suitable
protocol can be found for a given environment. Fur-
thermore, the analysis gives an estimation for the expected
network load and the average uncertainty of the transmitted
location information, as well as an upper bound for its
maximum uncertainty. Based on the querying and reporting
protocols, we have proposed a combined protocol that
integrates most of the advantageous properties of the basic
protocols. Here, the analysis can give optimal parameter
settings for a certain environment.
For our future work, we plan to run further simulations
with different types of mobile objects, for example a person
while window-shopping in a city or riding a bicycle, to
look at various movement characteristics. The results will
then be used, to further improve the analysis, where nec-
essary. We also plan to extend the combined protocol by
adding a mechanism that allows it to adapt to changes in
messages
per
second
queries per second
simple querying
pessimistic cached querying
optimistic cached querying
time-based reporting
distance-based reporting
combined
Figure
9: Simulation results: Number of messages transmitted
with the querying, reporting and combined protocols
determined by simulation.
combined protocol
uncertainty of copy in meters
queries per second0.40.60.8
messages per second
Figure
10: Simulation results: Number of messages transmitted
with the combined protocol determined by simulation
depending on uncertainty of secondary copy as well as
on the query rate.
the environment, dynamically. This mechanism will have
to monitor critical parameters (e.g., the average speed of
the mobile object) and to adjust the uncertainty of the secondary
copy or to stop updating it at all, accordingly. Such
a mechanism can increase the efficiency of the protocol in a
dynamic environment. It can also be the basic mechanism
for an adaptive location service, which is able to adjust its
whole architecture.
Because we wanted to look at the protocols from a general
viewpoint, we have not examined the dead reckoning
protocols in more detail, as they work best, when they have
some knowledge about the future movement of their users.
Nevertheless, they can increase the efficiency of a location
service to a great deal. The prediction of a mobile object's
future movements can be based on four possible sources:
much further effort, a simple protocol could use the
current speed and direction of the mobile object to predict
its future movements. Also, information about the route
of the mobile object can come from the user or an application
program, for example a car navigation system (com-
pare [WSCY99]). In a more flexible solution, the route can
be predicted based on the former movements of a mobile
object, as for example a person will mostly use the same
route when commuting to his/her office (compare [BD99]).
Finally, a map-based approach can find the street a user is
moving on and predict his future movements according to
the course of the street, possibly also considering the usual
movement pattern of mobile objects on this street. We plan
to integrate a dead-reckoning protocol into our comparison
of update protocols and to implement a map-based protocol
for the planned location service.
Our main goal is the development of a universal distributed
location service, as it has been described shortly in
Section 3. We have already developed a prototype for a centralized
service, and are currently looking at and comparing
different architectures for distributing this service efficiently.
Future work includes aspects of efficiently managing the location
data and of creating a security mechanism, which
allows a user to control in detail who and to what degree
has access to the information about his location.
--R
An information-theoretic approach to track mobile users in PCS networks
Mobile users: To update or not to update?
IEEE Computer Society LAN MAN Standards Committee.
A distributed location system for the active office.
Global Positioning System: Theory and Practice.
DoD World Geodetic System
Supporting Location-Awareness in Open Distributed Systems
An architecture for a universal
The GSM System for Mobile Communications.
IP mobility support.
Fundamental challenges in mobile computing.
Providing location information in a ubiquitous computing environment.
Disseminating active map information to mobile hosts.
The active badge location system.
Updating and querying databases that track mobile units.
--TR
--CTR
Reynold Cheng , Kam-Yiu Lam , Sunil Prabhakar , Biyu Liang, An efficient location update mechanism for continuous queries over moving objects, Information Systems, v.32 n.4, p.593-620, June, 2007 | location-awareness;location update protocols;location service |
593003 | Organized Terminode Routing. | We consider the problem of routing in a wide area mobile ad hoc network called Network. Routing in this network is designed with the following objectives. First, it should scale well in terms of the number of nodes and geographical coverage; second, routing should have scalable mechanisms that cope with the dynamicity in the network due to mobility; and third, nodes need to be highly collaborative and redundant, but, most of all, cannot use complex algorithms or protocols. Our routing scheme is a combination of two protocols called Routing (TLR) and Terminode Remote Routing (TRR). TLR is used to route packets to close destinations. TRR is used to route to remote destinations. The combination of TLR and TRR has the following features: (1) it is highly scalable because every node relies only on itself and a small number of other nodes for packet forwarding; (2) it acts and reacts well to the dynamicity of the network because as a rule multipath routing is considered; and (3) it can be implemented and run in very simple devices because the algorithms and protocols are very simple and based on high collaboration. We performed simulations of the TLR and TRR protocols using the GloMoSim simulator. The simulation results for a large, highly mobile ad hoc environment demonstrate benefits of the combination of TLR and TRR over an existing protocol that uses geographical information for packet forwarding. | Introduction
We focus on the problem of routing in a large
mobile ad-hoc network that we call terminode net-
work. We call nodes in a terminode network,
terminodes, because they act as network nodes
and terminals at the same time. Our routing solution
is designed with three requirements in mind:
rstly, it should scale well in a very large mobile
ad-hoc network; secondly, it should cope with dynamically
changing network connectivity owing to
mobility; and thirdly terminodes need to be highly
collaborative and redundant, but, most of all, cannot
use complex algorithms or protocols. For the
rst requirement, our solution is designed such that
a terminode relies only on itself and a small number
of other terminodes for packet forwarding. The
second requirement, uncertainty in the network
due to mobility, is addressed in our work by considering
multipath routing as a rule, and not as an
exception.
We note that the target of our work is dierent
from MANET[10] proposals that focus on networks
consisting of up to several hundreds of nodes.
Each terminode has a permanent End-system
Unique location-dependent
address (LDA). The LDA is simply a
triplet of geographic coordinates (longitude, lati-
tude, altitude) obtained, for example, by means of
the Global Positioning System (GPS) or the GPS-free
positioning method[5]).
In this paper, we concentrate on the problem
of unicast packet forwarding, assuming that the
source terminode knows or can obtain the LDA of
the destination. A packet sent by a source terminode
contains, among other elds, the destination
LDA and EUI, and possibly some source routing
information, as mentioned later. Mobility management
in a terminode network may be performed by
a combination of the following functions. Firstly,
a location tracking algorithm is assumed to exist
between communicating terminodes; this allows a
terminode to predict the location (LDA) of corresponding
terminodes. Secondly, LDA manage-
ment, which is based on the distributed location
database, allows a terminode A to obtain a probable
location of terminode B (LDAB ) that A is not
tracking by the previous method. Mobility management
is out of scope of this paper, (see for example
[7],[9]).
Here we assume that nodes move with the speed
that corresponds to pedestrian or car speed, so
that we can obtain (with the mobility manage-
ment) the destination LDA with the precision of
approximately one transmission range and validity
of about ten seconds. We also assume that terminode
network is mainly connected, although temporary
partitions can occur. Even if our protocol
uses geographical locations, it is independent from
the physical infrastructure (i.e, it does not assume
directional antennae) and from the physical underlying
layer. We performed simulations with IEEE
802.11 MAC protocol, because it is a commonly
used MAC protocol. We anticipate that our routing
protocol would have the similar results with
other MAC protocols.
We further assume that multipath routing is acceptable
for the transport protocol. However, with
the current TCP this is not acceptable since there
are problems with managing a large number of
timers due to many paths. We envision either to
bring enhancements to the current TCP, or to use
of multiple description coding techniques. In this
latter case, the source data is encoded and sent
over multiple paths in order to provide better load
balancing and path failure protection.
We use a combination of two routing protocols:
Routing (TLR) and Terminode
Remote Routing (TRR). TLR is a mechanism that
allows to reach destinations in the vicinity of a terminode
and does not use location information for
making packet forwarding decisions. In contrast,
TRR is used to send data to remote destinations
and uses geographic information; it is the key element
for achieving scalability and reduced dependence
on intermediate systems.
TRR consists of the following elements:
Anchored Geodesic Packet Forwarding (AGPF)
is a method that allows for data to be sent
to remote terminodes. AGPF is solely based
on locations. AGPF sends data along the anchored
path. An anchored path denes a rough
shape of the path from the source to the destination
and is given with a list of anchors. Anchors
are points described by geographical co-ordinates
and do not, in general, correspond to
any terminode location. A good anchored path
should avoid obstacles and terminode \deserts"
from the source to the destination. Between anchors
geodesic packet forwarding is performed;
this is a greedy method that follows successively
closer geographic hops to an anchor or the nal
destination.
Friend Assisted Path Discovery (FAPD) is the
path discovery method used to obtain anchored
paths. A terminode keeps a list of other termin-
odes, that it calls friends, to which it maintains
one or several good path(s). In FAPD, a terminode
may contact its friends in order to nd
an anchored path to the destination of interest.
FAPD is based on the concept of small world
Path Maintenance is a method that allows a terminode
to improve acquired paths, and delete
obsolete or mal-functioning paths.
Multipath Routing. A terminode normally attempts
to maintain several anchored paths to
any single destination of interest. In a highly
mobile environment, anchored paths can be broken
or become congested. A path that worked
well suddenly can deteriorate. As a response
to such uncertainty in the network, TRR uses
multipath routing.
TRR is used to send data to a remote destina-
tion. However, when a packet gets close to the
destination, if only locations are used for making
packet forwarding decisions, positional errors
and inconsistent location information can result
in routing errors and loops. This happens if the
destination has considerably moved from the location
that is known at the source. In order to
cope with this problem, in our approach when close
to destination, the packet forwarding method becomes
TLR. TLR does not use location informa-
tion. Once a packet has been forwarded with TLR,
the \use TLR" bit is set within the packet header,
and downstream terminodes should not use TRR
again. This avoids loops due to the combination of
the two routing methods.
The rest of this paper is organized as follows.
The following section gives a short overview of
some existing mobile ad-hoc routing protocols that
are relevant for our work. In Section 3 we give a
complete description of TLR and TRR . This is followed
by the description of the simulation results
in Section 4. Finally, we give some conclusions.
2. Related Work
Many routing protocols have been proposed for
mobile ad-hoc networks. A recent overview can be
found for instance in [15]. The existing routing
protocols can be classied either as proactive or
reactive.
Proactive protocols attempt to maintain routes
continuously, so that the route is already available
when it is needed for a packet to be forwarded.
In those protocols, routing tables are exchanged
among neighbouring nodes each time a change occurs
in the network topology. As a consequence,
proactive protocols are not suitable when the mobility
rate in the network is high.
An attempt to overcome these limitations is to
look for a route only on demand. This is the
basic idea of reactive protocols such as DSR[4],
TORA[11] and AODV[12]. In reactive protocols
a control message is sent to discover a route to a
given destination.
In DSR, when a source S needs a route to a
destination node D, S rst checks if some of its
neighbours possesses the route in question. If this
is not the case, S
oods the network with a route
request for the destination node. When the request
reaches the destination, the destination returns a
route reply to the request's originator. The reply
message contains the list of all intermediate nodes
from S to D. Then S uses source routing with the
acquired source route to send packets to D. Several
methods are proposed for limiting the propagation
of requests. One of these is that nodes cache the
route that they learn or overhear, so that intermediate
nodes can reply on behalf of the destination
if the route to the destination is known.
Reactive protocols have smaller control tra-c
overhead than proactive protocols. However, since
a route has to be discovered before the actual transmission
of the data, these protocols can have a
longer delay. Further more, due to mobility, the
discovered route may be unusable since some links
of the route may be broken.
ZRP[13] is a protocol that combines both a
proactive and reactive approach. Every node
proactively maintains routes to other nodes whose
distance is less than a certain number of hops (its
zone). Within a zone, an arbitrary proactive routing
scheme can be applied. For inter-zone routing,
on demand routing is used. ZRP avoids
ooding
the network in order to nd routes and routing protocol
overhead is limited. However, the on-demand
solution for inter-zone routing poses the latency
problem typical to on-demand routing schemes.
There are a number of proposed geographical
routing protocols that use location information to
reduce propagation of control messages, to reduce
intermediate system functions or for making packet
forwarding decisions.
Geographical routing allows nodes in the net-work
to be nearly stateless; the information that
nodes in the network have to maintain is about
their one-hop neighbours.
Location Aided Routing (LAR)[19] in an optimization
of DSR where the knowledge of the destination
location is used to limit the propagation of
route request control packets. Those packets are
propagated to the geographical region around the
last known destination location. LAR does not use
location for data packet forwarding. With LAR,
end-to-end routes are still DSR's source routes.
Location Distance Routing Eect Algorithm for
Mobility (DREAM)[2] is a routing protocol in
which the information about location and speed
of the destination is used to obtain the direction of
the destination. A node that has a packet to send
determines the direction of the destination. Then
it forwards data to all one hop neighbours in the
calculated direction of the destination. DREAM
proposes how to disseminate location information
in the network in the scalable way.
In Geographical Routing Algorithm (GRA)[22],
every node has only a partial knowledge of a net-
work. It knows about its immediate neighbors and
a small number of remote nodes to which it has
discovered a path. When an intermediate node receives
a packet to forward, it checks which of the
nodes that it knows is closest to the destination.
Then the packet is forwarded to the neighbour that
is next hop towards the node that is closest to the
destination. Each node thus forwards the packet
in the similar way till the packet reaches the des-
tination. If it happens that some node S does not
know about any node that is closer to the destination
D than itself, a route discovery method is
invoked. This method nds an acyclic path from
S to D and all intermediate nodes on update their
routing tables with the next hop information in
order to reach D.
GEDIR[16], GPSR[8] and GFG[21] routing protocols
are very important to this paper, and we
present them in more detail. These protocols propose
to use a greedy method for making packet
forwarding decisions. Packet forwarding decisions
are made using only information about a node's
immediate neighbours and the location of destina-
tion; packet is forwarded to the neighbour that is
closest to destination. The GEDIR paper proves
that packet forwarding is loop-free provided that
location information is accurate.
However, a packet may reach a node that does
not have any neighbours closer than itself to the
ultimate destination. This situation indicates that
there is a hole in the geographic distribution of
nodes. As a solution to this situation, GPSR and
GFG use a planar subgraph of the wireless net-
work's graph to route around the perimeter of a
hole. This method is rst proposed by Bose et
al. in [20]. Packet forwarding for such a packet
is switched from greedy to perimeter mode. The
knowledge of identities and locations of its one-hop
neighbours is su-cient for a node to determine
the edges of the planar subgraph. Packets
that are in perimeter mode are forwared using a
simple planar graph traversal. A perimeter-mode
packet is forwarded on progressively closer to destination
faces of the planar graph. As soon as a
packet reaches the node that is closer to destination
than the node that initiated perimeter mode
forwarding, a packet is then forwarded in a greedy
way. In a dense network, packets are normally forwarded
in greedy way, and the perimeter mode is
used occasionally when a packet is stuck when a
node does not have a one-hop neighbour that is
closer to the destination. Then a packet is for-
wared in perimeter mode for only a very few (2-3)
hops, before a node closer than the point of entry
into perimeter mode is reached, and then greedy
forwarding resumes. On sparser networks, perimeter
mode tends to be used for longer sequences of
hops.
routing does not maintain strict
source routes. Dierently from DSR, in terminode
routing, there is no need for
ooding of the
whole network to discover the route or react when
some link is broken. FAPD is a way to discover
loose source paths without
ooding of the network.
When a path with anchors is known, AGPF is used.
AGPF is a greedy method that uses locations for
packet forwarding, and recovers from a link failure
relaying only on terminodes' local information. If
there is a hole in nodes's distribution, GPSR uses
routing around the perimeter of a hole. In our ap-
proach, if anchors are correctly set, AGPF avoids
holes in terminodes distribution and uses perimeter
method only occasionally. As it is discussed in
the introduction, if only geographical locations are
used for making packet forwarding decisions, this
may result in looping problems due to positional
errors and inconsistent location information. In
our design we use TLR in order to alleviate looping
problems.
3. Terminode Routing
routing uses geographical information
in making routing decisions. However, when
the packet gets close to the destination, packet forwarding
uses local routing tables that every terminode
proactively maintains for its close terminodes
Our routing scheme is a combination of two pro-
tocols, Terminode Local Routing (TLR) and Terminode
Remote Routing (TRR).
TLR determines a route to destination D when
D is in the local routing table (of a source or of
an intermediate terminode). Otherwise, TRR uses
mainly the locations of S and D to discover a path
from S to D.
Below we describe elements of terminode routing
in more details.
3.1. Terminode Local Routing (TLR)
Routing (TLR) is used by terminodes
to build their local routing tables, and for
forwarding packets to destinations in their vicinity.
The idea of TLR was inspired by the intrazone
routing protocol (IARP) in ZRP[13].
We say that terminode D is TLR-reachable for
has a means to reach D with the
TLR protocol. The TLR-reachable area of S includes
the terminodes whose minimum distances
in hops from S are at most equal to local radius.
The local radius is a measure, in number of hops,
of the TLR-reachable area. In the current implementation
of TLR, the local radius is set to two
hops.
Building of local routing tables In order to build
its local routing table, every terminode proactively
maintains the identity (EUI) and location 1 (LDA)
of the terminodes that are no more than two hops
away. This is done by means of HELLO messages
that every terminode periodically broadcasts at the
MAC layer.
A terminode announces in a HELLO message its
own EUI and LDA, as well as EUIs of its immediate
neighbours. Upon reception of a HELLO mes-
sage, a node updates its local routing table with
EUI and LDA of its one-hop and two-hop distant
terminodes. For two-hop distant terminodes, a terminode
also keeps in its table the next hop terminode
via which a two-hop distant terminode can be
reached. If a node does not hear from its neighbour
for some amount of time, it removes from the
routing table the entry that corresponds to the lost
neighbour, as well as all entries that correspond to
two-hop distant terminodes that were reachable via
the lost neighbour.
TLR packet forwarding TLR uses a simple distance
vector routing protocol to send data to TLR-
reachable destinations. The only addressing information
used by TLR is the EUI of the destination.
When the source, or an intermediate node, has
to forward a packet to the destination that is TLR-
reachable, the \use TLR" bit in the packet header
is set, if not already set. If the destination is two-hop
away, the packet is sent to the next hop ter-
minode, as from the routing table. Otherwise, the
packet is sent directly to the destination.
It is also possible to use a local radius larger
than two. However, this would increase the TLR
overhead because of the update tra-c required for
every node to maintain its TLR-reachable area. In
1 The LDA information is not used for TLR, but it is added
because it is used by TRR, as explained below.
addition, for a larger local radius, the slow convergence
problem, typical to distance vector routing
protocol, would aect TLR.
3.2. Terminode Remote Routing (TRR)
Remote Routing (TRR) allows data
to be sent to non TLR-reachable destinations.
TRR primarily forwards packets on anchored paths.
In contrast with traditional routing algorithms, an
anchored path does not consist of a list of nodes
to be visited to reach the destination. An anchored
path is a list of xed geographical points,
called anchors. In traditional paths made of lists of
nodes, if nodes move far from the location they had
at the time when the path was computed, the path
cannot be used to reach the destination. Given
that geographical points do not move, the advantage
is that an anchored path is always \valid".
In order to forward packets along an anchored
path, TRR uses the method called Anchored
Geodesic Packet Forwarding (AGPF). With AGPF
the packet is sent in the direction of an anchor, thus
trying to reach some terminode in proximity of this
anchor. Thereon, the packet is forwarded in the direction
of the next anchor on the anchored path.
Anchored paths are obtained by the source with
the method called Friend Assisted Path Discovery
(FAPD). If the source does not have an available
anchored path to the destination, it uses a default
method called Geodesic Packet Forwarding (GPF).
3.2.1. Geodesic Packet Forwarding (GPF)
GPF is a simple method for sending data in the
direction of a geographical point. This point can
be an anchor (see AGPF below) or the destination
location. Unlike TLR, GPF is based solely on lo-
cations. A similar method is used in GFG[21] and
in GPSR [8].
Source S can use GPF to send data to remote
destination D in the following way. At rst, S acquires
some approximate value of the D's LDA.
Then S sends packets by GPF in the greedy man-
ner: the packet is sent to some neighbour X within
a transmission range of S where the distance to D
is the most reduced. In turn, X checks whether D
is TLR-reachable. If this is not the case, X sends
the packet to its neighbour that is closest to the
destination. Otherwise, X uses TLR to forward
the packet.
In this simplest form, GPF will often not work.
If there is no connectivity along the shortest line
due to obstacles or a terminode desert, then the
method fails. The packet may be \stuck" at some
terminode that does not have a neighbour that is
closer to the destination. One possible solution
to this problem is to use the method of a planar
graph traversal, where a packet is routed around
the perimeter of the region where there are no terminodes
closer to the destination (this solution is
proposed in GFG and GPSR). In this way, a packet
is routed until it arrives at the terminode that reduces
the distance to the destination, and thereon
the packet is forwarded in a greedy manner, as described
above.
GPF works well when there is a good connectivity
along the shortest line from the source to the
destination. However, this may not always work.
In order to circumvent holes in terminodes distribution
in a large area mobile ad-hoc network, we
introduce the method called AGPF.
3.2.2. Anchored Geodesic Packet Forwarding
(AGPF)
The key element of the AGPF is anchored path.
Anchors are computed by source nodes, using
the path discovery method called FAPD, as
presented below. A source terminode adds to
the packet the anchored path that is used as
loose source routing information. With AGPF the
packet is forwarded such that it loosely follows an
anchored path. The sequence of intermediate terminodes
on the way to the destination depends on
the actual terminode distribution.
AGPF works as follows. At the source, the
packet is sent in the direction of the rst anchor
(AP1) on the anchored path by applying geodesic
packet forwarding: the source sends data to its immediate
7neighbour that has the minor distance to
AP1. When an intermediate terminode receives a
packet with the anchored path, it checks whether
geographically falls within its transmission
range. If so, it deletes AP1 from the anchored path
and sends the packet in the direction of the next
anchor (AP2). This is repeated until all anchor
points are deleted from the anchored path. Then
the packet is sent in direction of the nal destination
by using GPF as described in the previous
section.
If the anchors are correctly set, then there is a
high probability that the packet will arrive at the
destination. This is veried in our simulations (see
Section 4.2). A good anchored path directs packets
along regions with good terminode connectiv-
ity. Occasionally, when there is a hole in terminode
distribution between two anchors, routing around
the perimeter of a hole is used. Figure 1 presents
an example of AGPF.
3.2.3. How to expedite termination of TRR
With TRR the packet gets closer to the desti-
nation. TRR is used until some intermediate node
nds that the destination can be reached by means
of TLR. In this case the \use TLR" bit in the
packet header is set. Thereon, TLR can be only
used for packet forwarding. Termination of TRR is
important in order to avoid loops that may happen
if packet forwarding from TLR reverts to TRR.
However, if accuracy of location management is
low or if the packet has been delayed due to congestion
or bad paths, it may happen that the condition
to set \use TLR" bit is never met and a packet may
start looping. Our approach is to discover such
loops and to drop looping packets. We recognize a
possible loop when a terminode nds that the destination
location written in the packet header is
within its transmission range, but the destination
is not TLR-reachable. In order to address this case,
a terminode X performs the following action: if
than the transmission
range of X, and D is not TLR-reachable for X,
X sets the TTL eld within a packet header to the
Figure
1. The gure presents how AGPF works when a terminode
with EUIS has some data to send to a terminode
with EUID , and there is no connectivity along the shortest
line from S to D. S has a path to D given by a list
of geographical locations called anchors: fAP1, AP2g.
First, geodesic packet forwarding in the direction of AP1
is used. After some hops the packet arrives at a terminode
A that nds that AP1 falls within its transmission range.
At A, the packet is forwarded by using geodesic packet
forwarding in the direction of AP2. Second, when the
packet comes to B, that is close to AP2, it starts sending
the packet towards D. Last, when the packet comes to C
it nds that D is TLR-reachable and forwards the packet
to D by means of TLR.
value equal to min(term loop; TTL). term loop is
a xed value, which indicates that a loop due to
destination location inaccuracy is always limited
to term loop 2 hops.
3.2.4. Path Discovery
Friend Assisted Path Discovery (FAPD) is a
method to obtain anchored paths. It is based on
the concept of small world graphs[18]. Small world
graphs are very large graphs that tend to be sparse,
clustered, and have a small diameter. The small-world
phenomenon was inaugurated as an area of
experimental study in social science through the
work of Stanley Milgram in the 60's. These experiments
have shown that the acquintanceship graph
connecting the entire human population has a diameter
of six or less; small world phenomenon al-
In our current implementation of TRR term loop is equal
to 3.
lows people to speak of the \six-degrees of separa-
tion".
We view a terminode network as a large graph,
with edges representing the \friend relationship".
B is a friend of A if (1) A thinks that it has a good
path to B and (2) A decides to keep B in its list
of friends. A may have a good path to B because
A can reach B by applying TLR, or by geodesic
packet forwarding, or because A managed to maintain
one or several anchored paths to B that work
well. Every terminode has a knowledge of a number
of close terminodes in its TLR-reachable re-
gion; this makes a graph highly clustered. In ad-
dition, every terminode has a number of remote
friends to which it maintains a good path(s). We
conjecture that this graph has the properties of a
small world graph. In a small world graph, roughly
speaking, any two vertices are likely to be connected
through a short sequence of intermediate
vertices. This means that any two terminodes are
likely to be connected with a small number of intermediate
friends.
With FADP, each terminode keeps the list of
its friends with the following information: location
of friend, path(s) to friend and potentially some
information about the quality of path(s).
FAPD is composed by two elements: Friends
Assisted Path Discovery Protocol (FAPDP) and
Friends Management (FM).
Friends Assisted Path Discovery Protocol
FAPDP is a distributed method to nd an anchored
path between two terminodes in a terminode
network. When a source S wants to discover a
path to destination D, it requests assistance from
some friend, let's say F . If F is in condition to col-
laborate, it tries to provide S with some path to
D (it can have it already or try to nd it, perhaps
with the help of its own friends). Figures 2 and 3
present FAPDP in pseudocode at the source and
at an intermediate friend.
When source S, which has some data to send to
if (S has a friend F1 where dist(F1,D)<dist(S,D) )
{S sets "F" bit in the packet header; send a packet to F1;}
else if (S has a friend F3 such that dist(S, F3) < max_dist )
{S sets "F" bit in the packet header;
send the packet to F3;}
else apply geodesic packet forwarding to D;
Figure
2. Friend Assisted Path Discovery Protocol at the
source
F1 is intended receiver of a path discovery packet needs a path to D
if path reply with fapd_anchored_path to S;}
else if (F1 has a path to D)
append this path in fapd_anchored_path and send the packet to D;
else if (tabu_index > 0 ) //packet in tabu mode
{
if ( F1 has a friend F2 where dist(F2, D) < min_dist)
{tabu_index=0; send the packet to F2}
else if (tabu_index < 2 and F1 has a friend F3 such that dist(F1, F3) < max_dist )
{ tabu_index++; send a packet to F3}
else // tabu_index reached the maximum value
{send a packet to D by geodesic packet forwarding}
else //packet not in tabu mode
{
if (F1 has a friend F2 where dist(F2,D)<dist(F1,D) )
send a packet to F2;
else if (F1 has a friend F3 such that dist(F1, F3) < max_dist )
{tabu_index=1; min_dist=dist(F1,D); send a packet to F3}
else apply geodesic packet forwarding to D;
Figure
3. Friend Assisted Path Discovery Protocol at the
intermediate friend and at the destination
D, has some friends that are closer to D than S
itself, it selects friend F1 that is closest to D, and
starts FAPDP with F 1. S sends the data packet to
F1 according to the existing path that S maintains
to F1 because F1 is a friend of S. S sets, within
the data packet header, \F" bit 3 . This denotes
that the corresponding packet is a path discovery
packet.
When F1 receives this packet it recognizes
the packet as a request of a path to D. The
fapd anchored path eld inside the path discovery
packet progressively contains anchor points from S
to D. If S has an anchored path to F 1, S simply
put anchors of this path in fapd anchored path
eld (S sends data to F1 with AGPF). Otherwise,
S leaves this eld empty (in this case S sends to F1
with geodesic packet forwarding). Upon reception
of the path discovery packet, F1 puts its geographical
location inside fapd anchored path eld as one
anchor. If F1 has an anchored path to D, F1 appends
this path into fapd anchored path eld and
3 \F" bit is not reset before reaching D
sends the packet to D by AGPF. If F1 does not
have a path to D, it recursively uses FAPDP. In
this case, F1 checks if it has a friend F2 closer to
D, and then it performs the same steps as S. This
is repeated until the packet is received by some intermediate
node that nds D to be TLR-reachable
and it forwards the packet to D by TLR.
However, there are situations where the source
or an intermediate friend does not have a friend
closer to the destination. In some topologies with
obstacles, at some point, going in the direction opposite
from the destination may be the only way
to reach the destination. FAPDP permits that
some terminode T (the source or an intermediate
friend) sends a path discovery packet to a friend
even though the packet is not getting closer to the
destination. However such a friend must not be distant
from T more than distance dist 4 . Here is
where \tabu mode" mechanism of FAPDP starts.
With the tabu mode mechanism, the packet can be
sent in direction opposite to D for a limited number
of times. Tabu mode is denoted at T by setting
the tabu index eld inside the packet to 1 (default
value of tabu index is 0).
Tabu mode mechanism uses a eld called min dist,
where the terminode that started tabu mode puts
its distance to the destination. When an intermediate
friend F1 receives the path discovery
packet, which is in tabu mode, it rst checks if it
has a friend whose distance to D is smaller than
min dist. If this is the case, the packet is sent to
such a friend, and tabu index is reset to 0. Other-
wise, F1 may forward the packet to its friend F2
whose distance to D is more than min dist and F2
increments tabu index. In FAPDP, the number of
times that the packet is forwarded to a friend that
is further from D than min dist is limited to two
(i.e, the value of tabu index must not be larger
than two). Tabu mode mechanism stops either
because a friend that is distant from D less than
min dist is found, or because tabu index is equal
4 we use max dist equal to ve times the transmission range
of a terminode
to 2. In the second case the packet is forwarded
directly to D by geodesic packet forwarding.
Finally, when D receives the packet with \F"
bit equal to one, D must send back to S a \path
reply" control packet with the acquired anchored
path from S to D. This packet is sent to S by
reverting the anchored path and applying AGPF.
Once S receives from D a packet with the anchored
path, S stores this path in its route cache.
If S does not receive a anchored path within
some time, or if S wants more paths to D, S starts
FAPDP with some other friend.
FAPDP is illustrated with two examples. The
rst example, presented in Figure 4 shows the case
where the path from S to D is found by using two
intermediate friends. The second example, in Figure
5 illustrates the tabu mode of FAPDP.
Friends Management
Friends Management (FM) is a set of procedures
for selecting, monitoring and evaluating friends.
For each node A, FM maintains a (xed-size) set
of nodes: the set of friends. The set of friends contains
the nodes that are contacted with FAPDP
for discovering paths. These nodes are periodically
evaluated in order to assure their availability
and their validity as friends. For that reason, the
Friends Monitoring component of FM keeps under
control, for a node A, a set of parameters for each
friend of A. These parameters ranges from technical
characteristics (as, for example, the active
time, the average distance, etc.) to more \social"
information (as being at disposal for supporting
FAPDP or forwarding packets). Based on these
parameters, the Friends Evaluation component periodically
evaluates whether it is benecial to keep
a node in the friend set or it is better to discard it.
It is the responsibility of Friend Selection to
identify a set of nodes that are suitable to act as
friends. A node B can be selected to become a
friend of a node A because there are frequent communications
between A and B, because B is often
in a strategic position for A's communications, be-
Figure
4. The gure presents how FAPDP works when
source S, has a friend F1 that is closer to D than S.
sends data packet to F1 and sets \F" bit in the
packet header in order to denote that this is a \path
discovery packet". Upon reception of the path discovery
packet, F1 puts its geographical location inside the
fapd anchored path eld of the path discovery packet as
one anchor. In this example F1 does not have path to
D, but has a friend F2 whose distance to D is smaller
than the distance from F1 to D. F1 sends path discovery
packet to F2. Once F2 receives the packet, it nds out
that D is TLR-reachable and F2 forwards the packet to
D by TLR. When D receives the packet with set \F" bit,
it should send back to S a \path reply" control packet
with the acquired anchored path from S to D. Assuming
that the path from S to F1 and from F1 to F2 does not
contain any anchors, the anchored path from S to D is
thus a list of anchors (LDAF1 ; LDAF2 ).
cause B is supposed to be helpful for discovering
good paths or for some other reasons.
Once a potential friend has been identied, it
will be evaluated by the Friend Evaluation com-
ponent, and included in the set of friends if there
is still space in set or if the node's evaluation is
better than the one of some other node of the set.
FM is critical in the initial phase (bootstrapping).
When a node bootstraps, it does not have any information
of (possible) friends. In this phase, the
Friend Selection component will use the HELLO
messages for identifying possible friends (that is, in
the initial phase, will be limited to 1-2 hops neigh-
bours). At run-time, these initial friends will dis-
Figure
5. The gure presents how FAPDP works when
source S does not have a friend that is closer to D
than itself. S contacts its friend F1 that is farther
from D in geometrical distance than S is, but such that
dist. As in the previous example, S
sends data packet to F1 with \F" bit set. In addition S
sets the tabu index eld to 1 and thus starts the tabu
mode of FAPDP. S puts dist(S; D) within min dist eld.
Upon reception of the path discovery packet, F1 nds
out that it does not have a friend whose distance to D
is smaller than min dist. F1 forwards the path discovery
packet to its friend F2 where dist(F
and sets tabu index to 2. Upon reception of the packet,
F2 checks that tabu index is equal to its maximum value
equal to 2, and F2 cannot forward the packet to its friend
that does not reduce the distance min dist. In our exam-
ple, F2 has a friend F3 whose distance to D is smaller
than min dist and forwards the packet to it. At F3,
tabu index is reset to 0. This means that FAPDP is not
longer in tabu mode. From F3 packet is forwarded to its
friend F4 and from there to D by using the TLR protocol.
The anchored path from S to D is thus a list of anchors
appear very likely, for being substituted by more
valid friends as described above.
3.2.5. Path Maintenance
Every terminode normally attempts to maintain
multiple anchored paths to the destinations that it
communicates with. Multipath routing is a way
to cope with uncertainty in a terminode network;
the paths that a source has acquired by FAPDP
can deteriorate due to mobility and packets can be
lost. We advocate that the source data is encoded
and sent over multiple independent paths in order
to provide better load balancing and path failure
protection. Diversity of paths is essential for taking
advantage of multipath routing [14].
Path maintenance consists of three main func-
tions: independent path selection, path simplica-
tion, path monitoring and deletion and congestion
control.
independent path selection A terminode analyzes
all acquired paths to a destination. Then
its selects a set of independent paths. They are
paths that are as diverse as possible in geographical
points (anchors) that they consist of.
path simplication One method consists in approximating
an existing path with a path with
fewer anchors. Such an approximation yields a
candidate path, which may be better or worse
than the old one. We use a heuristic based on
curve tting.
path monitoring and deletion A terminode constantly
monitors existing paths in order to collect
necessary information to give the value to
the path. The value of the path is given in
terms of congestion feedback information such
as packet loss and delay. Other factors like ro-
bustness, stability and security are also relevant
to the value of a path.
This allows a terminode to improve paths,
and delete mal-functioning paths or obsolete
paths (e.g, the path that corresponds to two terminodes
that do not communicate any more).
congestion control The value of the path given
in terms of congestion feedback information is
used for a terminode to decide how to split the
tra-c among several paths that exist to the des-
tination. A terminode gives more load to paths
that give least congestion feedback information.
4. Performance Evaluation
We simulated the terminode routing protocol in
GloMoSim[17]. GloMoSim is a scalable simulation
environment for wireless network systems. It
is based on the parallel, discrete-event simulation
language PARSEC[1].
The IEEE 802.11 Medium Access Control(MAC)
protocol is used; it implements the Distributed Co-ordination
Function (DCF)[6]. In all simulations,
radio range is the same for every terminode, and
is equal to 250 meters. The channel capacity is
2Mbits/sec.
In order to build its local routing table, in our
implementation, every terminode sends a HELLO
message every 1 second. Each entry in the neighbour
table expires after 2 seconds if it is not up-
dated. To avoid synchronization of HELLO mes-
sages, a terminode jitters each HELLO message
transmission by 50% of the period of a HELLO
message. 802.11 MAC layer noties when a unicast
packet exceeds the maximum number of retransmissions
and the acknowledgement has not arrived.
This means that the intended neighbour has left
the sender's transmission range and that the entry
that corresponds to that neighbour is invalid and
can be removed from a sender's neighbour table.
In our implementation such a packet is sent back
to the routing layer where a new neighbour to send
a packet is chosen.
In this section we evaluate both components of
the terminode routing, namely TLR and TRR.
4.1. Evaluation of TLR
To assess the relevance of TLR, we analyze
a performance of terminode routing when TLR
is used and when TLR is not used. We performed
simulations in a scenario where geodesic
packet forwarding towards the destination works
well, and there is no need for the AGPF technique.
We wanted to evaluate solely the performance of
geodesic packet forwarding with TLR, against the
case when TLR is not used.
Geodesic packet forwarding (GPF) uses destination
location for making packet forwarding de-
cisions. Therefore, it is important that the source
knows this information accurately enough. We recall
that in our proposal, once the communication
has begun, terminodes are assumed to use location
tracking to exchange their current locations. This
is enough to assure valid location information in
several situations. However, there are situations
where location tracking is not able to give regular
periodic location information (e.g, when GPS
is temporary unavailable or when location tracking
packets are lost).
In these cases, we expect TLR to perform better
than when TLR is not used. The rst simulation
case study is when packets are forwarded towards
the destination based only on the destination loca-
tion. Every intermediate node forwards the packet
to its neighbour, which reduces the distance to the
nal destination. This is performed until the destination
is reached.
In the second simulation study case, TLR is
used. Every terminode keeps a list of its TLR-
reachable destinations. Similar to the rst case,
the packet is forwarded to the neighbour closer
to the destination. But, when some intermediate
node nds that the destination is TLR-reachable,
it uses the TLR to send the packet to the destina-
tion. Note that TLR is used in two-hop neighborhood
and does not need additional routing overhead
compared to the case when TLR is not used.
The only requirement for TLR is that all terminodes
keep in their routing tables information not
only about immediate neighbours, but also about
their two-hop neighbours.
We assume that the source can not know an exact
destination location all the times. In our sim-
ulations, the source learns a destination location
and uses this information for the time that we call
location information lifetime. After this time, the
source again acquires an exact destination location
and uses it for another location information life-time
interval.
In our simulations we used network of 600 ter-
minodes. The simulation area is a rectangle of the
size 5400m X 1000m. The simulated network is
quite dense; in this case we veried that geodesic
packet forwarding is working well. It is very rare
situation where packets are stuck at some node be-
Location information lifetime
Packet
delivery
fraction
without TLR
with TLR
Figure
6. Demonstration of TLR utility
cause it has no closer neighbour to the destination.
We simulated
ows. Each CBR
ow
sends at 2Kbps and uses 256-byte packets. Terminodes
are moving according to to the \random way-
point"[4] model. In the \random waypoint" mobility
model, a node chooses one random destination
in the simulation area. Then it moves to that destination
at a speed distributed uniformly between
0 and some maximum speed. Upon reaching its
destination, the node pauses for the pause time,
selects another random destination inside the simulation
area, and proceeds as previously described.
In our simulations a maximum speed is 20m/s and
the pause time is 10s. In the performed simula-
tions, we veried that the average end-to-end of
data packets in less than 1s. The two study cases
(geodesic packet forwarding with TLR and without
TLR) are evaluated according to packet delivery
fraction. This is the ratio of the data packets
delivered to the destinations to data packets generated
by the CBR sources. We evaluate this metric
under various location information lifetimes. We
simulated ve dierent randomly generated motion
patterns. Figure 6 presents an average of packet
delivery fraction for ve simulation runs. This g-
ure shows that for smaller location information life-times
(less than 20s), the packet delivery fraction
is similar with TLR and without TLR. However,
for higher location information lifetimes (lower precision
of location information) routing with TLR
gives better delivery fraction than without TLR.
Therefore, we conclude that when using TLR in
addition to geodesic packet forwarding, routing is
more robust in the case of positional errors and
inconsistent location information.
Moreover, TLR can be the only possible packet
forwarding method in small ad-hoc networks,
where it could be di-cult to obtain location infor-
mation. In this case all nodes are TLR-reachable,
and geographical positioning is not needed.
4.2. Evaluation of TRR
We analyze AGPF by comparing a performance
of TRR when AGPF is used and when AGPF is
not used.
Before presenting the simulation and simulations
results, we introduce the new mobility model
called \restricted random waypoint" that is used
in evaluation of TRR.
Mobility Model
In the most recent papers about mobile ad-hoc
networks simulations, nodes in the simulation move
according to the \random waypoint" model as described
in Section 4.1.
We nd this model unrealistic for a wide area
mobile ad-hoc network such as a terminode net-
work. In this network, terminodes are small personal
devices that are distributed geographically
within a very large area. It is less probable that
for each movement a terminode selects a random
destination within a very large geographical area.
On the contrary, the random destination is selected
within a small area for a number of movements,
and then a movement is made over a long distance.
This better represents the fact that most people
move for a certain period within one area, and
then they move away to another distant area. We
have implemented a new mobility model that we
call \restricted random waypoint". This model is
town
town 2
town 3
Figure
7. Model of the simulation area with four towns
closer to a real-life situation for a wide-area mobile
ad-hoc network than the random waypoint model.
For the restricted random waypoint mobility
model, we introduce the topology based on towns
and highways. Towns are areas that are connected
with highways. Inside town areas, terminodes
move with the random waypoint mobility model.
After a certain number of movements in the same
town, a terminode moves to another town. Terminodes
that are moving between the town areas,
simulate highways between towns. The model of
the simulated area that consists of four towns is
presented in Figure 7. In our simulations, we dene
inside the conguration le, the pairs of towns
that are connected by highways. For example in
Figure
7 those pairs are (town 0, town 1), (town 0,
town 2), and (town 1, town 3). This information
is used by terminodes when they move from one
town to another.
We distinguish two types of restricted mobility
that represent the \ordinary terminode" and the
\commuter terminode".
At the beginning of the simulation, terminodes
are placed at randomly chosen locations inside one
of four towns. An \ordinary terminode" begins the
simulation by selecting at random one destination
inside the town where it is placed. Then it moves
to that destination at the speed distributed uniformly
between 0 and some maximum speed. Upon
reaching that destination, the ordinary terminode
pauses for the pause time, selects another destination
within the same town, and proceeds as previously
described. Thus, the ordinary terminode's
movement inside a town is the random waypoint
mobility model. It repeats such movements for a
number of times set by the stay in town parameter.
Then a terminode selects at random a destination
within a new town and move there (the new town is
randomly chosen from a list of towns that are connected
with the current town by a highway). Once
it reaches the new location, a terminode applies inside
the new town the random waypoint mobility
model for another stay in town time.
There are also a number of terminodes that frequently
commute from one town to another. Those
termnodes are called \commuters" and they insure
the connectivity between towns. The commuter's
movement model is the restricted random waypoint
where stay in town parameter is equal to one. A
commuter selects a random destination within one
town area and moves to that destination with a
speed distributed uniformly between some minimum
speed and some maximum speed. Once this
destination is reached, a commuter pauses for a
pause time that is smaller than ordinary termin-
odes' pause time. Then it selects at random another
town (such that is connected with the current
town) and the random destination inside the chosen
town, and moves to this destination. It pauses
in the new town for a small interval of time and
then again moves to another town.
An example of a network that comes out when
terminodes are moving according to the restricted
random waypoint mobility model is presented in
Figure
7. In such a network, not all town areas are
connected with a highway (e.g, town 2 and town
3).
Scenario Characteristics
A source terminode normally tries to acquire
several anchored paths to the destination of interest
by means of FAPD. In our simulations, we do
not implement FAPD.
In order to obtain anchored paths without using
FAPD, in our simulation model based on \towns
and highways", we assume that a high level geographical
view of the network is available at every
terminode. This means that each terminode has a
knowledge of a map of towns. A map denes town
areas and existence of highways between towns.
Thus, for example, the map of towns presented
in
Figure
7 denes those towns that are directly
connected by highways as well as towns' areas. In
our simulations, a town area is a square around the
town center with the given width around the town
center.
When source S has some data to send to destination
D, S rst determines the \destination town"
(DT ). This is the town in which area D's location
falls. If D is not inside any town area, then the
destination town is the town whose center is closest
to D's location. Similarly, S determines the
\source town" (ST ), the town where S is situated,
or the closest town to S if S is on the highway.
Once S determines DT and ST , S contacts the
map of towns to check if DT and ST are the same,
or they are directly connected with a highway. If
so, then geodesic packet forwarding (GPF) towards
D has a good chance of working. Then, S does not
add to the packet an achored path and S sends a
packet using GPF.
Otherwise, if there is no highway from ST to
DT , S nds out from the map, those town areas
that a packet has to pass in order to reach D. Then
S adds to the packet the anchor path. This anchored
path is given by a list of centers of towns
that the packet has to pass. Then S starts AGPF
in order to deliver the packet.
For example, it S is in the area of town 2 and
D is the area of town 3, then anchors on the anchored
path are centers of town 0 and town 1. In
this case, AGPF works as follows: the packet is
rst forwarded in the direction of the rst anchor
(the center of town 0). Once the packet arrives
at some terminode that nds that the rst anchor
falls within its transmission range, the packet is
then forwarded in the direction of the second anchor
(the center of town 1). As before, when a
packet comes to a terminode that is close to the
second anchor, the packet is then forwarded in the
direction of D's location.
Assuming that there are terminodes to ensure
network connectivity in town areas and on high-
ways, the packet is forwarded with AGPF mostly
in the greedy way: packets are forwarded to terminodes
that are always progressively closer to an
anchor point or the destination. If however, occasionally
there are regions of the network where such
a greedy path does not exist (i.e, it is required that
the packet moves temporarily farther away from an
anchor or destination), we use the approach proposed
in GPSR[8]. With this approach a packet
is forwarded in perimeter mode: a packet traverses
successively closer faces on a planar subgraph of
the full network connectivity graph, until reaching
a node closer to an anchor or the destination and
then greedy forwarding resumes.
Given the simplicity of the network topology
based on four towns, in our simulations we do not
use multipath routing. We only have one path from
source to destination. Thus, in our simulations,
TRR uses GPF towards D if ST and DT are the
same or they are connected by a highway. Other-
wise, AGPF is used.
In order to assess the relevance of AGPF, we use
simulations to evaluate packet forwarding in two
cases: the rst case corresponds to when both GPF
and AGPF are used, while the second case is when
only GPF towards the destination is used. The
only dierence between GPSR and GPF is as fol-
lows: GPSR uses the destination location for making
packet forwarding decisions for the whole way
until the packet arrives at the destination; with
GPF, an intermediate node switches to TLR if the
destination is TLR-reachable.
We illustrate packet forwarding when both GPF
and AGPF are used, and when only GPF is used
in the example presented in Figure 8. Here, S is in
town 0 and D is town 3. In the case of AGPF,
S sets the anchored path to consist of one an-
Figure
8. Figure presents the path of the packet from
source S to destination D in case of two routing protocols:
GPF that does not use anchors and AGPF with anchors.
AGPF gives shorter path than GPF.
chor: center of town 1. AGPF forwards the packet
along the path that goes to town 1. Once the
packet is close to the center of town 1, the packet
is forwarded towards D by using GPF. Packet forwarding
is almost always in greedy mode; however,
there are cases where perimeter mode is used for a
very few (2-3) hops, before greedy forwarding resumes
Geodesic packet forwarding (GPF) without anchors
uses a much longer path across town 2. Figure
8 illustrates that the packet is rst forwarded in
the greedy mode toward D until it reaches terminode
starts because P1
does not have neighbour closer than itself to D.
The packet is thus forwarded in perimeter mode
until greedy mode resumes at node G1 (G1 that
is closer to D than P 1). At P 2, packet forwarding
starts again perimeter mode. In this mode,
a packet is forwarded from town 2 back to town
0, and from there through town 1 and town 3. Fi-
nally, when the packet arrives at G2, which is closer
to D then P2 (where perimeter mode is started),
greedy mode resumes until the packet is received
by D.
Figure
8 clearly illustrates the case where usage
of anchors gives shorter paths than when anchors
are not used.
Simulation Results
In order to evaluate TRR, we conducted simulations
of 500 terminodes forming an ad-hoc network.
The size of the simulated area is 3000m x 2500m.
Terminodes move between 4 towns inside the
simulation area (see Figure 7). Centers of four
towns have coordinates: (550 m, 550 m), (2500
m, 500 m), (1000 m, 2000 m) and (2500 m, 2000
m) respectively. The town area is a square around
the town center with the width of 500 m from the
town center. There are 200 ordinary terminodes
and 300 commuters.
The mobility model is the restricted waypoint
mobility model. An ordinary terminode begins its
journey from a random location inside the random
town. As described above, it moves stay in town
times inside the same town and then selects another
random town to move. For each movement,
a terminode takes a random speed that is uniformly
distributed between 0-20m/s; before each move-
ment, a terminode pauses for some pause time.
We ran simulations with dierent pause times and
dierent stay in town parameter of ordinary ter-
minode. These parameters dene dierent degrees
of ordinary terminode mobility. A longer pause
time means that ordinary terminodes are less mo-
bile. For a xed pause time, a larger stay in town
means that a terminode is staying longer within
a geographical region that corresponds to a single
town. We consider dierent mobility rates of ordinary
terminodes because this is set of nodes where
all tra-c sources and destinations come from. In
our simulations, commuters are moving faster than
ordinary terminodes. For their movements they
take a random speed that is uniformly distributed
between 10-20m/s. The pause time for commuter
terminodes is equal to 1 second; once they reach a
town, another random destination inside a dier-
ent town is chosen for the subsequent movement.
We checked by simulations that if terminodes move
following restricted the random waypoint mobility
Packet
delivery
fraction
sources, stay in town=10
sources, stay in town =10
95% confidence interval
Figure
9. Packet Delivery Fraction with 40 sources;
stay in town parameter is 10
model, there is good network connectivity (Figure
7).
Tra-c sources are continuous bit rate (CBR).
The source-destination pairs are spread randomly
over the network. All CBR sources send at 2kbps,
and uses 256-byte packets. All communication patterns
are peer-to-peer, and CBR connections are
started at times uniformly distributed between 400
and 500 seconds, and they last until the end of sim-
ulation. All simulations last for 1200 seconds. All
source destination pairs are chosen from the group
of ordinary terminodes.
We carried out a performance study of two routing
protocols for the network in Figure 7. The
rst protocol is TRR with both elements: geodesic
packet forwarding (GPF) and anchored geodesic
packet forwarding (AGPF). The second protocol
uses only GPF.
Below we present the simulation results for
packet delivery fraction. Each data point presents
an average of at least ve simulations with identical
tra-c models, but dierent randomly generated
movements patterns. We evaluated the two
protocols by varying mobility and tra-c load lev-
els. In order to examine the performance of the
routing protocol under dierent degrees of conges-
tion, we varied the number of CBR sources in the
network.
The rst set of experiments (Figure shows
packet delivery fraction when there are 40 CBR
Pause time
Packet
Delivery
Fraction
AGPF&GPF, 50 sources, stay in town =10times
GPF, 50 sources, stay in town =10times
95% confidence interval
Figure
10. Packet Delivery Fraction with 50 sources;
stay in town parameter is 10
Packet
Delivery
Fraction
AGPF&GPF, 50 sources, stay in town =2 times
GPF, 50 sources, stay in town =2 times
95% confidence interval
Figure
11. Packet Delivery Fraction with 50 sources;
stay in town parameter is 2
sources. The stay in town parameter is set to 10
for ordinary terminodes (CBR sources and sinks).
Dierent degrees of mobility are obtained for dier-
ent pause times of ordinary terminodes. For higher
pause times, since stay in town is high, ordinary
terminodes for most of the simulation time move
inside the same town area. For smaller pause times
they perform moving to dierent town areas more
frequently. Figure 9 shows that the combination
of GPF and AGPF delivers about 20 percent more
packets compared to the case where only GPF is
used. This result is explained as follows. GPF
can give complex and long paths for those source-destination
pairs that are situated in towns not
connected with a highway (Figure 8). For those
packets there is a higher probability to be dropped.
Keeping in mind that in this experiment CBR
sources and destinations do not frequently change
town areas, there are several
ows where GPF loses
most of the packets, while there AGPF have a
higher success.
We have also observed end-to-end delays for the
two routing protocols. It includes all possible de-
lays: queuing at the interface queue, retransmission
delays at the MAC, and the propagation and
transfer times. However, we found unfair to compare
average delay of packets delivered by GPF
to the ones delivered by AGPF. The reason is that
GPF has lower packet delivery fraction than AGPF
and then average delay counts only for delivered
packets. We observed that with GPF a large number
of the packets that take long paths are dropped,
and that most of the packets that are received at
the destination experienced short paths, with consequent
short delays.
A packet delivery fraction of the second set of
experiments is presented in Figure 10. It diers
from the previous example in that the number of
CBR sources in the network is increased to 50. We
observe that the combination of AGPF and GPF
again delivers more packets than when only GPF is
used. However, AGPF decreases its delivery fraction
compared to the previous case when there are
sources. Indeed in this experiment, we observed
an increased level of congestion in the region
of the network between town 0 and town 1. Since
AGPF directs most of its anchored paths across
this region, that result in congestion and increased
packet drops. GPF performs as in the previous
experiment with smaller number of sources. We
explain this on the example in Figure 8. Unlike
AGPF, GPF does not directly forward the packet
from S in direction of town 1. Firstly, GPF forwards
it to town 2 and than back to town 0 where
the packet is forwarded in direction of town 1. Provided
that the packet is not lost during the journey
between towns 0 and 2, it contributes in the congestion
along the highway between town 0 and town
1. However, in our simulations we have observed
that there are many packets that are lost before
taking this highway. Thus this explains why GPF
is less susceptible to the increased number of CBR
sources than AGPF.
Here is where multipath routing for AGPF
would be benecial. In our simple network topology
based on four towns, AGPF uses only one anchored
path to the destination. If, however, there
were several paths over which packets can be sent,
this would result in load balancing. It is left for future
work to investigate mechanisms for choosing
routes in the network so that data tra-c is more
evenly distributed in the network.
The last set of experiments is presented in Figure
11. Here there are 50 CBR sources, but ordinary
terminodes are moving more frequently from
one town area to another. Here stay in town parameter
is set to 2. We observe that GPF delivers
more packets than in the previous two experiments.
This can be explained: with increased mobility,
those source-destination pairs for which GPF gives
a small fraction delivery in the previous two cases
can move to towns where GPF gives a better path.
In this way bad situations, where GPF gives long
complex paths, do not last for the whole duration
of the simulation. This is especially true for lower
pause times. For higher pause times, again we observe
GPF decreases in the packet delivery fraction
We conclude that AGPF results in higher packet
delivery fraction than GPF in all our experiments.
However, we observe that the improvement of
AGPF over GPF is more important when nodes
stay in single town areas or close to these areas for
most of the simulation time. Keeping in mind that
AGPF is intended for large area mobile ad-hoc net-
works, we believe that this assumption would there
be satised. We performed our simulations for a
relatively small simulation area and small number
of nodes. We believe that within a larger area, the
benets of good anchored paths over complex, long
GPF paths will be more evident. Anchors dene a
rough shape of a path from the source to the des-
tination. The source should monitor all anchored
paths it is using, and react if the value of a path is
deteriorated.
Finally, we discuss about routing overhead of the
terminodes routing. Routing overhead is the total
number of routing packets transmitted during
the simulation. Terminodes routing generates two
types of protocol packets. TLR uses HELLO mes-
sages, whereas TRR uses control messages that are
needed for FAPD.
Every terminode proactively generates HELLO
messages every second and those messages are received
but not forwarded by its neighbours. Overhead
due to HELLO messages is independent of
the mobility rate of terminodes and the number of
tra-c
ows. As the size of the network increases,
the network-wide count of HELLO messages in-
creases. However, at a constant terminode density,
the size of the network does not have an eect on
TLR overhead per node, since HELLO messages
are not propagated beyond a single hop.
One possible optimization to reduce the HELLO
message overhead is that nodes that have some
data to forward defer the sending of HELLO mes-
sages. Then a sender piggybacks in every data
packet the information it would send via a HELLO
message. This is possible when the network interface
is used in a promiscuous mode, and a node
receives all packets from all terminodes within its
transmission range. This optimization has not
been implemented so far.
for our simulations we have not implemented
FAPD, we have not evaluated FAPD over-
head. This is task left for further work.
5. Conclusions
We focused on the problem of routing in a wide
area mobile ad-hoc network called
work. Routing in this network is designed with the
following objectives. First, it should scale well in
terms of the number of nodes and geographical cov-
erage. Second, routing should have scalable mechanisms
that cope with load balancing and the dynamicity
in the network due to mobility. Our routing
scheme is a combination of two protocols called
Routing (TLR) and Terminode
Remote Routing (TRR). TRR is activated when
the destination D is remote and uses the location
of the destination obtained either via location management
or by location tracking. TLR acts when
the packet gets close to the destination and uses
routing tables built with hello messages. The use of
TRR results in a scalable solution that reduces dependence
on the intermediate systems, while TLR
allows us to reduce problems of loops due to location
inaccuracy. Anchor Geodesic Packet Forwarding
(AGPF) is a component of TRR that provides
paths when there are holes in terminodes distribution
and the source can not reach the destination
over the direct geodesic path. We performed
simulations to assess relevance and performance
improvements when TLR and AGPF are
used. In our simulations, we introduced the topology
based on four towns where nodes move between
towns according to the mobility model that we
called \restricted random waypoint". Our simulation
results demonstrate improvements obtained
with TLR and AGPF over GPSR that uses geographical
information for packet forwarding.
--R
PARSEC: A Parallel Simulation Environment for Complex Systems.
A performance comparison of multi-hop wireless ad hoc network routing protocols
IEEE Computer Society LAN MAN Standards Com- mittee
Towards Mobile Ad-Hoc WANs: Terminodes
GPSR: Greedy Perimeter Stateless Routing for Wireless Networks.
A Highly Adaptive Distributed Routing Algorithm for Mobile Wireless Net- works
Determining the Optimal Con
On the impact of alternate path routing for load balancing in mobile ad hoc networks.
A Review of Current Routing Protocols for Ad-Hoc Mobile Wireless Networks
A Scalable Network Simulation Environment.
In Small Worlds
Routing with guaranteed delivery in ad hoc wireless networks Workshop on Discrete Algorithms and Methods for Mobile Computing and Communications (DialM'99)
Internal node and shortcut based routing with guaranteed delivery in wireless networks
Geographical Routing Using Partial Information for Wireless Ad Hoc Networks
--TR
--CTR
Christian Lochert , Martin Mauve , Holger Fler , Hannes Hartenstein, Geographic routing in city scenarios, ACM SIGMOBILE Mobile Computing and Communications Review, v.9 n.1, January 2005
Karim Seada , Ahmed Helmy , Ramesh Govindan, Modeling and analyzing the correctness of geographic face routing under realistic conditions, Ad Hoc Networks, v.5 n.6, p.855-871, August, 2007
Wook Choi , Sajal K. Das, Design and performance analysis of a proxy-based indirect routing scheme in ad hoc wireless networks, Mobile Networks and Applications, v.8 n.5, p.499-515, October
Silvia Giordano , Ivan Stojmenovic, Position-based ad hoc routes in ad hoc networks, The handbook of ad hoc wireless networks, CRC Press, Inc., Boca Raton, FL,
Niklas Carlsson , Derek L. Eager, Non-Euclidian geographic routing in wireless networks, Ad Hoc Networks, v.5 n.7, p.1173-1193, September, 2007
Xiaojing Xiang , Xin Wang , Zehua Zhou, An Efficient Geographic Multicast Protocol for Mobile Ad Hoc Networks, Proceedings of the 2006 International Symposium on on World of Wireless, Mobile and Multimedia Networks, p.73-82, June 26-29, 2006
Ljubica Blazevic , Jean-Yves Le Boudec , Silvia Giordano, A Location-Based Routing Method for Mobile Ad Hoc Networks, IEEE Transactions on Mobile Computing, v.4 n.2, p.97-110, March 2005
Laura Galluccio , Giacomo Morabito , Sergio Palazzo, Spontaneous group management in mobile Ad Hoc networks, Wireless Networks, v.10 n.4, p.423-438, July 2004
Badri Nath , Drago Niculescu, Routing on a curve, ACM SIGCOMM Computer Communication Review, v.33 n.1, p.155-160, January
Seungjoon Lee , Bobby Bhattacharjee , Suman Banerjee, Efficient geographic routing in multihop wireless networks, Proceedings of the 6th ACM international symposium on Mobile ad hoc networking and computing, May 25-27, 2005, Urbana-Champaign, IL, USA
Anchor-based Routing Protocol for Mobile Ad Hoc Networks, Wireless Personal Communications: An International Journal, v.42 n.2, p.277-300, July 2007
Dragos Niculescu , Badri Nath, Trajectory based forwarding and its applications, Proceedings of the 9th annual international conference on Mobile computing and networking, September 14-19, 2003, San Diego, CA, USA | self organized routing;mobile;wide-area network;ad hoc |
593175 | A Controlled Skip Parser. | Real-world natural language sentences are often long and complex, and contain unexpected grammatical constructions. They even include noise and ungrammaticality. This paper describes the Controlled Skip Parser, a program that parses such real-world sentences by skipping some of the words in the sentence. The new feature of this parser is that it controls its behavior by finding out which words to skip, without using domain-specific knowledge. The parser is a priority-based chart parser. By assigning appropriate priority levels to the constituents in the chart, the parsers behavior is controlled. Statistical information is used for assigning priority levels. The statistical information (n-grams) can be thought of as a generalized approximation of the grammar learned from past successful experiences. The control mechanism gives a great speed-up and reduction in memory usage. Experiments on real newspaper articles are shown, and our experience with this parser in a machine translation system is described. | Introduction
Parsing real-world natural language text is a difficult task. The difficulty comes from several
sources. One is that a real-world sentences are long and complex, especially in newspaper articles.
The average length of a sentence is 20 to 30 words, and it often exceeds 100 words. The sentence
structure is complex and syntactically ambiguous due to the frequent usage of relative clauses,
appositives, disjunctions, and other constructions. Also, there are always unexpected syntactic
phenomena in real-world texts, which are beyond the formal grammar's coverage. Another difficulty
comes from noise and ill-formedness of the input, typically in spoken language. Interjected words
(ah, well ), false starts (I'd like to do you have any flights from .), or errors in speech recognition
devices make parsing with a rigid grammar impossible. This kind of noise and ill-formedness is also
seen in written text, for example, misspelled words, unbalanced parentheses, incorrect punctuation,
characters, and special formatting characters which fail to be filtered by text preprocessing
modules.
One extreme way to deal with these difficulties is to abandon syntactic analysis completely,
instead relying purely on statistics for machine translation [Brown, et al. 1990], or using template
matching for information extraction [Jackson, et al. 1991]. With these methods, no grammar rules
are used, and no analysis of syntactic and semantic structure of sentences is performed. Target
translation or extracted information is directly obtained from the surface input, using context sensitive
word-by-word translation statistics or target-dependent database templates. These approaches,
however, cannot fully utilize the semantic and pragmatic knowledge even when the syntactic structure
is easy to parse.
When domain-specific semantic and pragmatic knowledge is available, a certain level of loose
syntactic analysis has been shown to be useful, such as in [McDonald 1992], [Hobbs, et al. 1992],
[Seneff 1992], and [Stallard and Bobrow 1993]. In these systems, a regular parser first attempts to
parse a sentence, and when the parser fails, the parse fragments, which represent syntactic structure
of parts of the sentence, are combined together using domain-specific semantics and pragmatics.
The upper tree is the result of parsing with two words skipped. The lower trees are from a non-skipping
producing 10 fragments. The meaning of those fragments (from left) are; 1. According to a
source near the president, 2. on 14th, to the parliament, 3. in advance (skipped), 4. being sent, 5. the
presidential message is, 6. domestic and foreign policy, 7. comma (skipped), 8. inserted-marker, 9.
consists of six chapters by category such as economics, 10, period.
Figure
1: Skip Parsing versus Non-skip Parsing
Further, if domain-specific lexical and syntactic knowledge is available, grammar rule can be designed
to create parse fragments which can be easily combined and used, as in [Ayuso, et al. 1994].
However, these methods, which rely heavily on domain-specific knowledge, are useful only when
such knowledge is available. When such knowledge is not available, or in systems which need to
handle texts in any domain, domain independent syntactic methods are more useful. For example,
[Mellish 1989] shows how to enhance chart-based techniques for parsing ill-formed sentences. In his
method, when bottom-up chart parsing fails, top-down predictions, derived from grammar rules,
make hypotheses to add/delete/substitute words to parse the sentence. [Lavie and Tomita 1993]
show an extension to the GLR (Tomita) parser, which skips words by allowing shift operations at
inactive states.
Skipping words in the input sentence to obtain a complete parse is effective in processing
spoken language with noise. As mentioned above, noise is also seen in written text. Moreover,
some unexpected grammatical constructions can be parsed by skipping words. Figure 1 is one
example of skip-parsing a Japanese sentence in a newspaper article. In this example, a complete
parse (shown as an upper tree in the figure) is obtained by skipping an adverb and a comma.
skipping these two words, the parser is left with six major parse fragments (shown as
lower trees in the figure).
This example is taken from the parser described in this paper. This parser is used in a broad-coverage
Japanese-to-English machine translation system [Knight, et al. 1995]. Because this system
operates across domains, it is impossible to rely on domain-specific semantic and pragmatic knowledge
to complete a parse. Syntax-only domain-independent mechanism for unparsable sentence is
the most effective method for a broad-coverage system.
There is another reason for using a skip parser. In the early stage of the development, we wanted
to have a simple general fallback mechanism which absorbs the inadequacy of text preprocessing
module and low coverage of grammar rules. Text formatting of the input can be arbitrary. It is
difficult to have a preprocessing module which perfectly filters out symbol characters and special
formatting characters, especially in the early stage of development. 1 It takes several months or
even years to build sufficiently many grammar rules. 2 Skip parsing is a convenient way to absorb
the immaturity of text preprocessing and grammar rules.
The basic idea of a skip parser is very simple; just allow the parser to create a syntactic
constituent with a gap. But the naive implementation would make it practically unusable. Consider
the English noun phrases noun noun . These word sequences often
appear in English texts. Notice that most of the noun + "of"+ noun sequences would still be
grammatically correct even if the word "of"were skipped. The parser wastes time and space in
processing all the possible skips. In other examples, skipping a certain word is locally grammatical
but will not lead to a complete successful parse.
Due to undesirable or unsuccessful skipping, a practical implementation of a skip parser has to
deal with time and space limitations. In other words, the exhaustive search must be avoided by
using efficient technique for reducing the search space.
[Lavie and Tomita 1993] reduce the search space by using beam-search which limits the number
of active nodes. Although this is a heuristic and is not guaranteed to find a optimal skipping, it is
reported to be useful. Following this idea, we investigated more powerful heuristics for controlling
the search space: using statistics of past successful parses. The statistics are a form of knowledge
generalized from past experiences.
The heuristics and mechanism of the parser are described in the next section. Our experimental
results are shown in Section 3. Discussion and conclusions follow.
2.1 Skip Control using N-gram
To avoid grammatically correct but undesirable skipping, we use N-gram information obtained from
past successful parsing. As we saw in the last section, it is generally fruitless to try skipping the
preposition of between two nouns. To get this kind of knowledge, we feed our parser thousands of
unannotated sentences, select sentences which are successfully parsed, and record which sequences
of words can be parsed. The frequency statistics of the sequences of words are called N-gram. Note
that we select parsable sentences using our own grammar and parser (without skipping), because
we need knowledge about which word sequences can be parsed under the current grammar, to find
out which words should be skipped for unparsable sentences.
The N-gram information obtained from past successful parsing is a handy measure to guess
which words are good candidates to be skipped. Normally N-gram frequency information records
how often two or more words appear adjoining. We use a variant of N-gram information. As is
seen in the previous example, it is enough to know the sequence noun + "of"+ noun is likely
to be parsed successfully. Therefore, for content words such as nouns, adjectives, and verbs, the
Also, word skipping can work well with markers inserted by a preprocessing module. We use a separate pre-
parsing module which inserts phrase boundaries and noun compound markers for efficient parsing (examples are
shown in Figure 1). Since this module is not always accurate, the markers must be treated only as hints. The
mechanism of skip parsing works as a hint handling facility. It skips the marker if the parse fails and does the parsing
without the marks.
Word skipping can give good feedback to the grammar writer. By knowing which words are skipped, a grammar
writer can easily identify an error or a missing rule in the grammar.
grammatical category name is used as an N-gram index. Then, the preposition "of"in noun
"of"+ noun is guessed not to be skipped, estimated by the N-gram value of noun
The N-gram can be also thought as an approximation of the grammar rules. This approximation
can be seen as generalized knowledge learned from past successful experiences. Although long-distance
syntactic relations and global phrase structures cannot be captured by the N-grams, intra-
phrase local constraints and specific patterns at phrase boundaries can be approximated.
2.2 Extension to Chart Parser
We applied this idea of controlled skip parsing on our bottom-up chart parser. A bottom-up
chart parser ([Kay 1980]) builds up larger constituents by concatenating adjoining constituents
as prescribed by grammar rules. By recording created constituents in a chart, a parse fragment
(constituent) is shared by multiple different parse trees, avoiding repetition of the analysis of the
same part of the input sentence.
Two extensions are needed to the standard chart parser to be able to skip words using the
ranking information provided by an N-gram model. One is controlling the order of parsing by the
cost (ranking) information, and another is extending lexical constituents to skip words.
Each constituent in the chart is given a cost value. If the cost is lower, the parser gives
precedence to it, and delays the processing if the cost is higher. The N-gram information is one of
the costs used for controlling skip parser. Other factors such as the total number of words skipped,
and the isolation factor (described later), are also considered and single cost as an integer value is
assigned to each constituent in the chart.
The cost is cumulative. When a new constituent is created from several children, the sum
of each child's cost (with an adjustment function) is assigned to the new constituent. 3 If it is
a normal (non-skipping) one, the cost is assigned zero. Thus, if the parser can parse the input
without skipping a word, the final parse tree has a cost of zero.
If the normal parsing fails, skipped lexical constituents are created, by extending normal lexical
constituents. A normal lexical constituent corresponds to one word in the input sentence. By extending
it, it covers more than a two-word span, then words under the extended span are effectively
skipped. 4
Skipped lexical constituents are assigned non-zero costs. A value from the N-gram database
and other factors decide the cost. The cost for extended lexical constituents are decided only when
the such constituents are created, and the cost of non-lexical constituents is just the sum of the
cost of its children.
2.3 Cost assignment
The following two subsections describe the details of how the cost is assigned. There are two
kinds of cost assignments; one is the initial cost assignment, and another is the compositional
3 It is possible to use a complicated function rather than summing the childrens' cost. In our implementation, we
only adjust the value when skipping a pair of brackets in the input sentence to treat it as if only one word is skipped.
Generally, just a simple summing of childrens' cost is enough, because recalculating the cost of each constituent is
costly.
4 A normal lexical constituent can be extended leftward or rightward, but to skip a word, only either left or right
word should be extended. It may be possible to extend non-lexical constituents for efficiency, though we have not
done tests. See Discussion.
Initial cost :=
if normal lexical constituent then 0
else /* skipped lexical constituent */
number-of-words-skipped
Compositional cost :=
if the skip broke newly balanced brackets then 9999
else sum-of-its-children - number-of-balanced-pair-of-new-brackets * 100
Figure
2: Cost Assignment
cost assignment. The initial cost assignment is for a newly created lexical (normal and skipped)
constituent, and the compositional cost assignment is for a newly created non-lexical constituent.
These costs assignment changes the total behavior of the skip parser.
Our particular implementation is shown in Figure 2. This implementation enforces parsing
without skipping first, then if it fails, trying to skip one word. 5 If it still fails, it tries skipping two
words, and it tries successively until maximum cost (determined by the length of the sentence) is
reached. 6 A total cost of zero means no skipping has been attempted. A total cost of 1 to 100
means one word was skipped, a total cost of 101 to 200 means two words were skipped, and so on. 7
We use an N-gram value which is normalized, quantized, and applied an transformation function.
The detail is described in the next subsection.
The chart isolation factor is given by the variable part-of-bigger-constit?. It takes a value of
0 or 1. If there is a bigger constituent whose span covers the word, it becomes 1. This roughly
means that the word successfully becomes a part of a bigger constituent, so that it seems bad idea
to skip the word. The variable becomes 0 when a word cannot attach to other constituents due to
a grammar problem, and becomes an isolated constituent in the chart.
The variable non-skipping-words? prevents the skipping of some important words. Currently,
dummy words START-OF-TEXT and END-OF-TEXT are set not to be skipped.
2.4 N-gram construction
We next describe assigning costs derived from N-grams, which is a part of initial cost assignment.
The N-gram information is important for spotting which words to skip. Effective and efficient
construction of N-gram information is one of the key points for the controlled skip parser.
First, we mentioned that the grammatical category name is enough for indexing open-class
words in the N-grams, as seen in the example noun + "of"+ noun . However, using just the
category name is sometimes too coarse. For example, our grammar is an unification-based feature
grammar. Following the trend of contemporary linguistics, fewer grammatical categories are used
and complicated variations are expressed using a feature representation. In this setting, N-gram
information from the sequence of grammatical categories would not be useful enough to control
5 A pair of balanced brackets is considered as one word, and skipping only one of a pair is prohibited by a high
cost. These brackets are dummy words inserted by the pre-parsing bracketing module, and are not parentheses or
quotation marks in the original input sentence. As mentioned before, these brackets are inserted as hints for the
parser, and are sometimes wrong. The skip parser effectively removes those wrong hint marks.
6 It also has a limit of total CPU time and a limit of the number of constituents in the chart.
7 This is not strictly true. For example, if there are four part-of-bigger-constit words skipped in the constituent,
the cost will be greater than 130 lowest five-word skipped one. But we usually do not allow
five words to be skipped, and practically we do not need strict cost calculation.
skipping. Therefore, in our implementation, some of the syntactic features are used to index open-class
words in addition to the category name. 8 For closed-class words such as particles and affixes,
we used the surface form and the grammatical category. 9
Second, the collected N-gram counts (how many such sequences of words, grammatical cate-
gories, or features appear in parsable sentences), should be normalized and quantized. The purpose
of normalization is to make the N-gram count independent of the sampling size. To do this, the
raw N-gram count is divided by the maximum count, so that the range of normalized count is zero
to one. Quantization is done for efficiency at run time. Floating point data is converted to integer
data for speed. A transformation function is applied at the same time. Since the N-gram count
does not linearly correspond to the parsing cost, some transformation is necessary. The function
is arbitrary. In our implementation, we use a step function with five thresholds 0, 1/1000, 1/100,
1/20, and 1/10. The range values are 0, 1, 2, 5, 8, and 10.
Finally, but most importantly, we describe how to mimic N-grams by just bigrams (N=2). Since
obtaining arbitrary length of N-gram is costly in terms of computation and preparing sample data,
we only use bigrams. A bigram value is obtained for an adjacent pair of words. This value is
assigned to the word boundary of the two words. Note that if the words have multiple part-of-
speech tags, there are multiple possible bigram values at the boundary. If two words have N tags
and M tags, the possible number of bigram value is N * M. We select the maximum of these possible
values and assign it as the bigram value at the boundary. This value shows how frequently those
two words appeared in the past successful parsing. Therefore, the existence of an unseen tagging
sequence, which has low value, is irrelevant if there is a more frequently seen tagging sequence.
This justifies the use of the maximum of possible bigram values.
When assigning cost to a skipped lexical constituent, the parser must decide the cost for the
skipped word, using the word boundary bigram value. The minimum of right adjacent boundary
value and left adjacent boundary value is used as a cost for skipping the word. A low bigram value
at a boundary means that the words either the left or right of the boundary should be skipped. To
select one of the two, each word's opposite boundary value can be used. If the word fits well in the
sentence, the opposite side's value are likely to be high, which justifies the use of minimum value
of the right and left adjacent boundary value.
3 Experiments
3.1 Coverage
We have gathered performance data during the development of a large-scale Japanese grammar.
The grammar and the parser was built as a part of JAPANGLOSS Japanese-to-English machine
8 For Japanese nouns, we have eight syntactic subcategories, which are represented in a subcategory feature. For
Japanese verbs, we put the inflectional form as a feature. These feature values together with its grammatical category
are used for an index to the N-gram database.
9 Multiple part-of-speech tags (grammatical category) and multiple parse trees must be handled properly. We use
JUMAN ([Matsumoto, et al. 1993]) part-of-speech tagger before parsing. Unlike other English part-of-speech taggers,
it gives multiple possible tags. Recall that we collect N-gram information from sentences which can be parsed by
the current grammar. When a sentence is parsed with multiple different parse trees due to multiple part-of-speech
tagging of a word, the N-gram value must be discounted by the number of trees. For example, a specific word in a
sentence has three possible part-of-speech tags and each tag assignment leads to two parse trees, (thus obtaining six
parse trees), each word sequence involving such tag must be counted 1/6 times. The same treatment has to be done
for a disjunctive feature if such a feature is used for indexing N-grams.
sentences parsed without skip parsed with skip Total parsed sentences
Table
1: Coverage of Skip Parsing
translation system [Knight, et al. 1995].
Table
1 is the summary of the performance as the raw grammar coverage expanded from around
40% to 60%, as seen in the third column of the table, which shows the number of sentences parsable
without skipping. The fourth column shows sentences which were parsed only by skipping, and the
rightmost column shows the total number of parsed sentences. In other words, the second column
indicates the raw grammar coverage, and the rightmost column is the coverage of the skip parser.
Five hundred test sentences were randomly 10 taken from actual Japanese newspapers. 11 Bi-grams
were collected from four thousand parsable sentences from the same corpus (not overlapping
with the test sentences). The average sentence length was 22.4 words (86.4 bytes). The longest
sentence was 199 words (696 bytes) long. 12 On Test4n, 13 the average number of skipped words
among the sentences which were parsed only by skipping was 1.67 words. The maximum number
of words skipped was limited to five words.
As the raw grammar coverage grew from 41.3% to 59.0%, the number of sentences parsed by
skipping declined from 49.1% to 29.4%, while the total parsed sentences still grew from 90.0%
to 96.2%. This shows that some of the sentences parsed by skipping became covered as the raw
coverage expanded. Also some sentences which were not parsed even by skipping became
parsable as those sentences became easy to parse by skipping. Since the skip parser skips practically
only two or three words at most, if the original sentence had three or more problems, it would not
be parsed even by skipping until the problems uncovered by the raw grammar had become one or
two.
3.2 Correctness
Although the coverage of the skip parser is satisfactorily high, the practical question is how good
the output of skipped parse is. Skipping a word such as adverb or symbol character is almost
harmless for the whole translation, but skipping an important noun or verb would be disastrous.
We investigated what kind of words were skipped in the skipped parse in Test4n. The results is
shown in Table 2.
There were 147 sentences which were parsed by skipping one or more words. The total number
of skipped words were 246 words. 14 The first column of the table shows the category of skipped
It even included sentences from an article which only consisted of listings of upcoming events.
We used the same 500 test sentences for all the tests. Test2 and Test3 failed to test some of the sentences due
to some system trouble. The percentages for those two tests are calculated by dividing by the number of sentences
which didn't have system trouble (458 for Test2, and 482 for Test3).
This number ignores markers inserted by the preprocessing chunker module. If the markers were included, the
average was 35.3 words and the longest was 248 words.
13 Test4 and Test4n used the same grammar, but Test4n had a stricter limit on the number of constituents. The
detailed analysis in the following sections was done on Test4n.
14 A pair of brackets and chunker marks are counted as one word.
Category correct almost wrong Total
verb
particle 15 11 15 41
other categories 3 1 7 11
parenthesis
chunker marker
segment error 0 0 11 11
Total
(in percentage) (49.4%) (11.1%) (39.4%) (100.0%)
Table
2: Correctness of word skipping
words. A human reader rated the skip correctness subjectively (correct, almost, or wrong).These
are shown in the second to the fourth column of the table.
As expected, if the skipped word was a noun or a verb, most of the sentences were broken.
However, for particles, skipping those words worked well in some cases. It included particle "no"
used as subject marker, which was relatively a rare case. The next row "other categories" includes
adverbs, pronouns, and affixes.
Symbol character and parenthesis were usually safe to be skipped. Those symbol characters
included a dot or a small circle at the beginning of a sentence, or a pair of parentheses enclosing an
entire sentence. Chunker markers inserted by a pre-parsing module were always safe to be skipped,
because these were just optional markers for the parser. On the other hand, if the front-end word
segmentation module, which broke a sentence into a sequence of words 15 , made an error, it was
almost always no help skipping some of the words from a erroneously segmented sequence.
The overall correctness is shown in the bottom row, indicating how percentage of skipped words
were marked as correct, almost, or wrong, in total. It shows 49.4% of the skipping was correct, and
39.4% was wrong. This means that about half of the skipping did not harm seriously in carrying
out the syntactic analysis of the sentence.
Even though more than half of the correct skipped words were symbol characters, parentheses,
and chunker markers, this does not mean that skip parsing mainly works as a compensation of bad
preprocessing effects. Symbol characters and parentheses are vital part of our grammar even in
the early stage of the development. Newspaper articles make extensive use of commas for lexical,
phrasal, and sentential conjunctions, and small dots and other symbol characters often appear in
compound nouns or phrasal itemizations. It is very difficult to exhaustively enumerate these non-alphabetic
usage as grammar rules, since these are not well studied in linguistic theory, and the
variations are diverse. Fortunately, some of the non-alphabetic parts of a sentence are optional,
and the skip parser works with them very well. However, these are not totally optional. Human
readers benefit from comma and other symbol characters when they read long texts. Similar thing
applies to chunker markers. These markers are completely optional in theory, but without them,
the CPU and memory usage would be enormous and many newspaper sentences, which tend to
be long, are practically unparsable. Therefore, skip parsing not only works as a compensation of
wrong but indispensable preprocessing (as in chunker marking), but also works really well for the
gaps that the grammar rules could not fill (as in commas and symbol characters, as well as adverbs
and particles).
15 There are no overtly marked boundaries between words in Japanese.
The results observed in our experiment are satisfactory. As expected, we experienced the good
effect of skip parser when the grammar was being developed, and it boosted the grammar coverage
from about 60% to 90%. And about half of the extra coverage, the skipping was reasonable.
The heuristics presented here are more powerful than beam-search as in [Lavie and Tomita 1993]
or than top-down prediction as in [Mellish 1989], yet our method is still simple, efficient and domain-
independent. Using the N-gram as the primary heuristic is a convenient way to approximate
rules, generalized from past successful experiences. Note that using N-grams is not a
method dependent on the parsing mechanism. This method can be applied to virtually all parsers.
It is further possible to enhance it by creating constituents with skipped holes from non-lexical
larger constituents. In our implementation, we only extend lexical constituents and re-build larger
constituents with skipped words. This will save the cost of creating larger constituents from scratch,
although bookkeeping of constituents might become complicated.
Another possible extension is to use more complicated N-grams, such as collecting data for N=3
or more, or using finer-grained grammatical categories and features for indexing open-class words.
Using variable length N-grams and more generalized N-grams as in [Pereira, et al. 1995] would be
an interesting extension.
Skipping words in a sentence means some kind of loss of information unless the skipped words
are noise. However, since human language has some redundancy and all the information in a
sentence is not equally important, parsing by skipping words gives reasonably good results if the
skipped words are not particularly important. An important direction of further research is to find
a way to identify an unreasonable skipping after parsing. One possible strategy is to reject a parse
which skipped words with rich content information in the dictionary. Ultimately, it would be best
handled by semantic and pragmatic level. [Lavie 1994] uses semantic coherence for ranking N-best
results of his skip parser.
5 Conclusion
We presented a controlled skip parser, which selectively skips words to parse an unparsable sentence.
The control information comes from heuristics obtained by statistical information. The statistical
information (N-grams) can be seen as generalized knowledge learned from past successful parses. We
presented a parsing algorithm based on extending a standard bottom-up chart parser. Experiments
show that it significantly improves the grammar coverage, and the result of skipping is satisfactory.
This method is very useful for a system which cannot utilize domain-specific knowledge, such as a
broad-coverage machine translation system.
6
Acknowledgments
We would like to thank Eduard Hovy and Kevin Knight for their support of this work. We would
also thank all the JAPANGLOSS machine translation group.
In fact, we first experimented the first version of the controlled skip parser by writing a program surrounding our
original non-skipping parser.
--R
"Pattern Matching in a Linguistically-Motivated Text Understanding System"
"A Statistical Approach to Machine Translation"
"Robust Processing of Real-World Natural Language Texts"
"A Template Matcher for Robust NL Interpretation"
"Algorithm Schemata and Data Structures in Syntactic Processing"
"Filling Knowledge Gaps in a Broad-Coverage Machine Translation System"
"An Integrated Heuristic Scheme for Partial Parse Evaluation"
"GLR* - An Efficient Noise-skipping Parsing Algorithm For Context Free Grammars"
"Japanese Morphological Analysis System JUMAN Manual"
"An Efficient Chart-based Algorithm for Partial-Parsing of Unrestricted Texts"
"Some Chart-based Techniques for Parsing Ill-formed Input"
"Beyond Word N-grams"
"A Relaxation Method for Understanding Spontaneous Speech Utterances"
"The Semantic Linker - A New Fragment Combining Method"
--TR | skip parser;n-grams;bigrams;syntactic parser;statistical natural language processing;robust processing |
593299 | How to Determine the Expressive Power of Constraints. | Some constraint languages are more powerful than others because they allow us to express a larger collection of problems. In this paper, we give a precise meaning to this concept of expressive power for constraints over finite sets of values. The central result of the paper is that the expressive power of a given set of constraint types is determined by certain algebraic properties of the underlying relations. These algebraic properties can be calculated by solving a particular constraint satisfaction problem, which we call an indicator problem. We discuss the connection between expressive power and computational complexity, and show that indicator problems provide a simple method to test for tractability. | Introduction
Some constraint languages are more powerful than others because they allow us to
express a larger collection of problems. For example, if we are dealing with applications
involving real-valued variables, then it is possible to express more numerical
relationships using arbitrary polynomial equations than if we were restricted to
using just linear equations. Similarly, if we are dealing with applications involving
Boolean variables, then it is possible to express more logical relationships using
ternary clauses than if we were restricted to using just binary clauses.
Of course, the penalty for increased expressive power is generally an increase in
computational complexity. For example, the satisfiability problem with ternary
clauses is NP-complete [6], whereas the satisfiabiliy problem involving only binary
clauses can be solved in polynomial time [6]. More generally, the finite constraint
satisfaction problem with arbitrary constraints is known to be NP-complete [13],
whereas many families of restricted constraints have been identified which give rise
to tractable subproblems [3, 9, 10, 11, 14, 17, 18]. For any given application, it
therefore pays to select a constraint system which has sufficient expressive power
to express the desired constraints, but is sufficiently restrictive to allow an efficient
solution technique.
In this paper, we focus on problems with finite sets of possible values and examine
how the expressive power of a given set of constraint types may be defined. The
central result of the paper is that the expressive power of a given set of constraint
types is determined by certain algebraic properties of the corresponding relations.
We also show how these algebraic properties can be calculated by solving a particular
constraint satisfaction problem, which we call an 'indicator problem'. Finally,
we discuss the connection between expressive power and computational complexity,
and show that indicator problems provide a simple method to test for tractability.
The paper is organised as follows. In Section 2 we give the basic definitions,
and describe a general form of algebraic closure property for a set of relations. In
Section 3 we describe how to calculate these closure properties and in Section 4
we establish the close link between closure properties and expressive power. In
Section 5 we discuss the relationship between expressive power and tractability.
Finally, we summarise the results presented and indicate some directions for future
research.
2. Definitions
2.1. The constraint satisfaction problem
A central notion in the study of constraints and constraint satisfaction problems is
the idea of a relation, so we will make extensive use of the following notation.
Notation 1 For any set D and any natural number n, we denote the set of all
n-tuples of elements of D by D n . For any tuple t 2 D n and any i in the range 1 to
n, we denote the value in the ith coordinate position of t by t[i]. The tuple t will be
written in the form ht[1];
Definition 1. A subset of D n is called an n-ary relation over D.
Example 1 We now describe four relations which will be used as examples through-out
the paper.
Each of these relations is a set of tuples of elements from the set
as defined below:
In order to manipulate and combine relations, we will make use of the following
standard operations from relational algebra [2]:
Definition 2. We define the following operations on relations.
ffl Let R 1 be an n-ary relation over a set D and let R 2 be an m-ary relation over
D. The Cartesian product R 1 \Theta R 2 is defined to be the (n m)-ary relation
ffl Let R be an n-ary relation over a set D. Let 1 - n. The equality selection
oe i=j (R) is defined to be the n-ary relation
oe
ffl Let R be an n-ary relation over a set D. Let i be a sequence of indices
chosen from the values n. The projection -
(R) is defined to be the
k-ary relation
We now define the (finite) constraint satisfaction problem which has been widely
studied in the Artificial Intelligence community [12, 13, 14].
Definition 3. An instance of a constraint satisfaction problem consists of
ffl a finite set of variables,
ffl a finite set of values, D;
ffl a set of constraints fC g.
Each constraint C i is a pair (s i list of variables of length
called the constraint scope, and R i is an m i -ary relation over D, called the
constraint relation.
The tuples of the constraint relation R i indicate the allowed combinations of simultaneous
values for the variables in the corresponding scope s i . The length of these
tuples will be called the arity of the constraint. In particular, unary constraints
specify the allowed values for a single variable, and binary constraints specify the
allowed combinations of values for a pair of variables.
Notation 2 For any set of relations, \Gamma, the class of all constraint satisfaction
problem instances in which the constraint relations are elements of \Gamma will be denoted
CSP(\Gamma).
Example be the set of four relations, fR 1 as defined in
Example 1.
One element of CSP(\Gamma) is the constraint satisfaction problem instance, P, which
has 6 variables and 3 constraints, defined as follows:
ffl The set of variables is
ffl The set of values is
ffl The set of constraints is fC
The structure of this problem instance is illustrated in Figure 1. 2
oe
ae
x
x
x
x
x
x
Figure
1. The CSP instance defined in Example 2
A solution to a constraint satisfaction problem is a function from the variables
to the values such that the combination of values assigned to the variables in each
constraint scope is allowed by the corresponding constraint. For any given problem
instance we may wish to:
ffl decide whether a solution exists; or
ffl find one solution, if any exist; or
ffl count the number of solutions; or
ffl find all solutions.
Each of these tasks may have a different complexity, so it is important to be precise
about which version of the problem we are trying to solve.
It is often convenient to view the solutions to a constraint satisfaction problem as
tuples in a relation, as illustrated in the next example. This relation is the largest
relation, S, such that the projection of S onto each constraint scope is a subset of
the corresponding constraint relation.
Example 3 The solutions to the constraint satisfaction problem instance P defined
in Example 2 are functions from the set of variables V to the set of values D
which satisfy all of the constraints.
There are four such functions, which may be expressed in tabular form, as follows:
Variables
Solution
Solution
Solution
Solution
This set of solutions may also be viewed as a relation, S, of arity 6, which has four
tuples, corresponding to the four rows in the table. 2
2.2. Expressive power of constraints
In any constraint satisfaction problem instance some of the constraints are explicit,
whilst others are generally present only as implicit constraints. For any instance in
CSP(\Gamma), the explicit constraint relations must be elements of \Gamma, but there may be
implicit constraints on some subsets of the variables for which the corresponding
relations are not elements of \Gamma. These implicit constraints result from the combined
effects of the explicit constraints, and so are said to be 'derived' from these explicit
constraints.
We now define exactly what it means to say that a constraint relation can be
derived from other constraint relations, and what is meant by 'expressive power'.
Definition 4. A relation R can be derived from a set of relations \Gamma if it is equal
to some projection of the set of solutions to some constraint satisfaction problem
instance in CSP(\Gamma).
Example 4 Reconsider the set of solutions S for the constraint satisfaction problem
instance P, defined in Example 2, as described in Example 3.
Note that - 1;2 binary relation can be derived
from g. 2
One way to view Definition 4 is as follows. For any relation R of arity r, and
any collection of r variables, R can be derived from \Gamma if and only if it is possible to
construct a constraint satisfaction problem instance in CSP(\Gamma) which imposes the
relation R on the values of those variables. In other words, R can be derived from
precisely when there is some combination of the relations in \Gamma that can be used
to 'express' a constraint with relation R.
Definition 5. The set of all relations that can be derived from \Gamma will be called
the expressive power of \Gamma.
We now show that the notion of a derived relation corresponds precisely to the
notion of a relation which may be obtained using the operations described in Definition
2.
be a set of relations over a finite set D.
A relation R can be derived from \Gamma if and only if R can be obtained from the
elements together with the unary relation D 1 , using some finite sequence of
Cartesian product, equality selection, and projection operations.
Proof:
We first need to show that if R is a projection of the set of solutions to some
instance 1 in CSP(\Gamma), then R can be obtained from \Gamma [ using some finite
sequence of Cartesian product, equality selection, and projection operations.
It is shown in [7] that the set of solutions to any constraint satisfaction problem
instance can be obtained by performing a relational join operation on the
constraint relations (see Definition 2.8 of [7]). For any instance in CSP(\Gamma) the
relations to be joined will either be elements of \Gamma, or the unary relation D 1 (in
the case of variables with no explicit constraint specified).
Furthermore, it is a standard result of relational database theory [2] that the
join operation can be calculated by performing a sequence of Cartesian product,
equality selection and projection operations.
Hence R can be obtained using the specified relational operations.
Conversely, if R can be obtained from \Gamma [fD 1 g using some sequence of Cartesian
product, equality selection, and projection operations, then we need to show
that R is equal to some projection of the set of solutions to some instance in
CSP(\Gamma).
To establish this, we first note that, for each of the specified operations, it
is straightforward to construct an associated constraint satisfaction problem
instance P in CSP(\Gamma) such that the result of that operation is equal to some
projection of the set of solutions to P. (The effect of the equality selection
operation is achieved by identifying the corresponding variables in P.)
By combining these constructions we can derive R from \Gamma.
In view of this result, it will be convenient to introduce the following notation.
Notation 3 Let \Gamma be a set of relations over a set D.
The set of all relations which may be obtained from \Gamma, together with the unary
relation D 1 , using some finite sequence of Cartesian product, equality selection, and
projection operations, will be denoted
states that the set of relations \Gamma precisely equal to the expressive
power of \Gamma, as defined above.
2.3. Closure properties of relations
We will show in Section 4 that the set of relations \Gamma + is determined by certain
algebraic properties of \Gamma. In order to describe these properties, we need to consider
arbitrary operations on a set D, in other words, arbitrary functions from D k to D,
for arbitrary values of k.
Any such operation on D may be extended to an operation on tuples over D
by applying the operation in each coordinate position separately (i.e., pointwise).
Hence, any operation defined on a set may be used to define an operation on the
tuples in a relation over that set, as follows:
Definition 6. Let R be an n-ary relation over a set D, and
any k-ary operation on D.
For any collection of k tuples, t necessarily all distinct) the
defined as follows:
Using this definition, we now define the following closure property of relations.
Definition 7. Let R be a relation over a set D, and
D be a k-ary
operation on D.
R is said to be closed
under\Omega if, for all (not necessarily all
distinct),\Omega
Example 5 Let 4 denote the ternary operation which returns the first repeated
value of its three arguments, or the first value if they are all distinct.
The relation R 2 , defined in Example 1, is closed under 4, since applying the 4
operation to any 3 elements of R 2 yields an element of R 2 . For example,
The relation R 1 , defined in Example 1, is not closed under 4, since applying the
4 operation to the last 3 elements of R 1 yields a tuple which is not an element of
positive integer m, and any positive integer i - m, let
denote the operation of arity m which returns the value of its
ith argument. In other words, for all d
Every relation R over D is closed under @ m;i for all values of m and i, since
applying the @ m;i operation to any m elements of R simply returns the ith one. 2
For any set of relations \Gamma, and any
operation\Omega , if every R 2 \Gamma is closed under
\Omega , then we shall say that \Gamma is closed
under\Omega . The next lemma indicates that the
property of being closed under some operation is preserved by each of the operations
on relations described in Definition 2.
R and R 0 be relations which are closed
under\Omega , for some operation
\Omega .
The following relations are also closed
1. the Cartesian product, R \Theta R 0 ;
2. any projection of R or R 0 ;
3. any equality selection from R or R 0 .
Proof: Follows immediately from the definitions.
Relations which are closed under the same operations have many common proper-
ties, so we introduce the following notation.
Notation 4 Let \Gamma be a set of relations over a set D.
The set of all relations over D which are closed under all of the operations under
which \Gamma is closed will be denoted \Gamma.
3. Calculating Closure Operations
In view of the results presented later in this paper, it is important to be able to
calculate the closure operations for a given set of relations. In this section, we show
that it is possible to obtain these operations, for each possible arity, by obtaining
all solutions to a single constraint satisfaction problem instance.
First note that, for any set of relations \Gamma over a set D, the operations under which
\Gamma is closed are simply mappings from D k to D, for some k, which satisfy certain
conditions, as described in Definition 7. This suggests that it should be possible to
define a constraint satisfaction problem in which the variables are the elements of
and the constraints impose the necessary conditions to ensure that the solutions
are closure operations. This is the motivation for the idea of an 'indicator problem'
which is defined as follows.
Definition 8. Let \Gamma be a set of relations over a finite set D.
For any natural number m ? 0, the indicator problem for \Gamma of order m is defined
to be the constraint satisfaction problem instance IP (\Gamma; m) with
ffl set of variables D m ;
ffl set of values D;
ffl set of constraints fC g, such that for each R 2 \Gamma, and for each
sequence of tuples from R, there is a constraint C
is the arity of R and
Note that for any set of relations \Gamma over a set D, IP (\Gamma; m) has jDj m variables and
constraints.
Example 7 Consider the relation R 1 over defined in Example 1.
The indicator problem for fR 1 g of order 1, IP(fR 1 g; 1), has 3 variables and 4
constraints. The set of variables is
and the set of constraints is
The indicator problem for fR 1 g of order 2, IP(fR 1 g; 2), has 9 variables and 16
constraints. The set of variables is
and the set of constraints is
Example 8 Consider the relation R 2 over defined in Example 1.
The indicator problem for fR 2 g of order 1, IP(fR 2 g; 1), has 3 variables and 3
constraints. The set of variables is
and the set of constraints is
The indicator problem for fR 2 g of order 2, IP(fR 2 g; 2), has 9 variables and 9
constraints. The set of variables is
and the set of constraints is
Consider the relations R 1 and R 2 over defined in Example
1.
The indicator problem for fR 1 of order 1, IP(fR 1
and 7 constraints. The set of variables is
and the set of constraints is equal to the union of the set of constraints of IP(fR 1
as defined in Example 7, and the set of constraints of IP(fR 2 g; 1), as defined in
Example 8.
The indicator problem for fR 1 of order 2, IP(fR 1
and 25 constraints. The set of variables is
and the set of constraints is equal to the union of the set of constraints of IP(fR 1
as defined in Example 7, and the set of constraints of IP(fR 2 g; 2), as defined in
Example 8. 2
Solutions to the indicator problem for \Gamma of order k are functions from D k to D,
or in other words, k-ary operations on D. We now show that they are precisely the
k-ary operations under which \Gamma is closed.
Theorem 1 For any set of relations \Gamma over a set D, the set of solutions to IP (\Gamma;
is equal to the set of k-ary operations under which \Gamma is closed.
Proof: By Definition 7, we know that \Gamma is closed under the k-ary
operation\Omega
if and only
if\Omega satisfies the condition
for each possible
choice of R (not necessarily all distinct). By Definition 8,
this is equivalent to saying
satisfies all the constraints in IP (\Gamma; k), so the
result follows.
Example 10 Consider the relation R 1 over defined in Example 1.
The indicator problem for fR 1 g of order 1, defined in Example 7, has 2 solutions,
which may be expressed in tabular form as follows:
Variables
Solution
Solution
Hence, by Theorem 1, fR 1 g is closed under precisely two unary operations: the
constant operation with value 0, and the identity operation.
The indicator problem for fR 1 g of order 2, defined in Example 7, has 4 solutions,
which may be expressed in tabular form as follows:
Variables
Solution
Solution
Solution
Solution
Hence, by Theorem 1, fR 1 g is closed under precisely four binary operations. 2
Example 11 Consider the relation R 2 over defined in Example 1.
The indicator problem for fR 2 g of order 1, defined in Example 8, has 3 solutions,
which may be expressed in tabular form as follows:
Variables
Solution
Solution
Solution
Hence, by Theorem 1, fR 2 g is closed under precisely three unary operations.
The indicator problem for fR 2 g of order 3, has a very large number of solutions,
including the operation 4, defined in Example 5. Hence fR 2 g is closed under this
ternary operation, as well as a large number of others. 2
4. Closure Operations and Expressive Power
We have so far defined two sets of relations which are associated with a given set
\Gamma: the set of relations which can be derived from \Gamma, denoted and the set of
relations which share the same closure operators as \Gamma, denoted \Gamma.
In this section, we will show that these two sets of relations, which are defined in
very different ways, are actually identical.
Theorem 2 For any set of relations, \Gamma, over a finite set D,
Proof: By Lemma 2, we know that the property of being closed under any operation
is preserved by Cartesian product, projection, and selection operations. It
follows immediately that
To obtain the reverse inclusion, let any relation in \Gamma.
Construct the indicator problem for \Gamma of order m, IP (\Gamma; m), and let S be the
set of solutions to IP (\Gamma; m), viewed as a relation. Since every constraint relation
in IP (\Gamma; m) is an element of \Gamma, we know that S can be derived from \Gamma, and hence
We claim that R can be obtained as a projection of S, and hence R also belongs
which gives the result.
To establish this claim, let r be the arity of R, and let c
Each c j is an element of D m , and hence corresponds to some
variable of IP (\Gamma; m), and hence to some coordinate position, p j , of S. Let
(S).
By the construction of T , each tuple of T is equal to the result of applying one
solution of IP (\Gamma; m) to the sequence of tuples belongs to \Gamma,
we know that R is closed under all solutions of IP (\Gamma; m), by Theorem 1, so each
tuple in T must belong to R. Hence, T ' R.
Conversely, it was shown in Example 6 that every relation is closed under the
operations @ m;i , for m. Hence, by Theorem 1, each @ m;i is a solution
of IP (\Gamma; m), and so gives rise to a tuple in T . By the construction of T , and the
definition of @ m:i , this tuple is equal to t i . Hence, R ' T .
Hence which establishes the claim.
Combining this result with Lemma 1, we have shown that the expressive power
of a set of relations is determined by the corresponding set of closure operations.
Corollary 1 A relation R can be derived from a set of relations \Gamma over a finite
set D if and only if R is closed under all of the operations under which \Gamma is closed.
Example 12 Reconsider the relations R 1 and R 2 over defined in
Example 1.
It was shown in Examples 10 and 11 that R 1 is not closed under all the operations
under which R 2 is closed. Hence, by Corollary 1, R 1 cannot be derived from R 2 .
Similarly, the results given in Examples 10 and 11 also establish that R 2 cannot
be derived from R 1 . 2
5. Expressive Power and Complexity
We have seen that the expressive power of a set of relations is determined by their
closure operations. To illustrate one application of these results, we now examine
how they can be used to obtain information about the complexity of the class of
problem instances involving a given set of constraint types.
Deciding whether or not a given constraint satisfaction problem instance has a
solution is NP-complete in general [13] even when the constraints are restricted to
binary constraints. In this section, we shall consider how restricting the allowed
constraint relations to some fixed subset of all the possible relations affects the
complexity of this decision. We shall therefore regard CSP(\Gamma) as a decision problem
in which the question to be decided in each instance is the existence of a solution.
If there exists an algorithm which decides every instance in CSP(\Gamma) in polynomial
time, then we shall say that \Gamma is a tractable set of relations.
Example 13 The binary inequality relation over a set D, denoted 6= D , is defined
as
Note that CSP(f6=D g) corresponds precisely to the Graph jDj-Colorability
problem [6]. This problem is tractable when jDj - 2 and NP-complete when
The relation R 4 , defined in Example 1, is equal to the relation 6= D for
2g. Hence, CSP(\Gamma) is NP-complete for any set of relations \Gamma which contains
R 4 . 2
It turns out that certain special operations play a major role in distinguishing
tractable and intractable sets of relations. These operations are the 'essentially
unary operations', which are defined as follows.
Definition 9. An
called essentially unary if there
exists some non-constant unary operation f : D ! D and some i in the range 1 to
k such
If f is a permutation,
then\Omega is called essentially permuting.
Example 14 The operations @ m;i , defined in Example 6, are all essentially unary
operations. 2
Note that constant functions are excluded from Definition 9, and so are not essentially
unary.
Theorem 3 Let \Gamma be a set of relations over a finite set D.
If every operation under which \Gamma is closed is essentially unary, then CSP(\Gamma) is
NP-complete.
Proof: Assume that \Gamma is only closed under essentially unary operations.
First, we note that if \Gamma is closed under some essentially unary
operation\Omega , then
it is also closed under the corresponding (non-constant) unary operation f .
Let f 0 be a unary operation under which \Gamma is closed such that jf 0 (D)j is minimal.
\Gammag. By the choice of f 0 , and the assumption
about \Gamma, it follows that f 0 (\Gamma) is only closed under essentially permuting operations.
\Gamma is not closed under any constant operation (by assumption), we know
that jf 0 (D)j ? 1. There are 2 cases to consider.
ffl In the case where jf 0 2, we consider the ternary 'not-all-equal' relation,
N , over D, (i.e., the relation containing all 3-tuples over D in which the 3
values are not all equal). The relation N is closed under all essentially permuting
operations on D, which means that N 2 f 0 (\Gamma). By Theorem 2 and
Lemma 1, this implies that N may be derived from f 0 (\Gamma). Hence, CSP(fNg)
may be reduced to CSP(f 0 (\Gamma)) in polynomial time. Now, CSP(fNg) is equivalent
to the Not-All-Equal Satisfiability problem, which is known to be
NP-complete [6, 15], so it follows that CSP(f 0 (\Gamma)) is also NP-complete.
ffl In the case where jf 0 (D)j ? 2, we consider the binary disequality relation,
, defined in Example 13. The relation 6= f0(D) is closed under all essentially
permuting operations on D, which means that 6= f0(D) 2 f 0 (\Gamma). By
Theorem 2 and Lemma 1, this implies that 6= f0(D) may be derived from f 0 (\Gamma).
Hence, CSP(f6= f0(D) g) may be reduced to CSP(f 0 (\Gamma)) in polynomial time.
is equivalent to the jf 0 (D)j-Colorability problem,
which is known to be NP-complete when jf
Finally, any instance in CSP(f 0 (\Gamma)) has a solution if and only if the corresponding
instance in CSP(\Gamma) has a solution, because \Gamma is closed under f 0 . Hence CSP(f 0 (\Gamma))
is reducible to CSP(\Gamma) in polynomial time, which establishes that CSP(\Gamma) is also
NP-complete.
If we assume that NP-complete problems do not have polynomial-time algorithms,
then this result provides a necessary condition for tractability: a tractable set of
relations must be closed under some operation which is not essentially unary.
In fact, it was shown in [9] that all the currently known examples of tractable
constraint types can be characterised as sets of relations which are closed under
particular non-unary operations, even in those cases where they were originally
defined using very different criteria. For example, the '0/1/all' relations 2 , first
described in [3, 11], can be characterised as the set of all relations closed under
the operation 4, defined in Example 5. As a second example, the various sets of
'max-closed' relations, first described in [10], can each be characterised as the set
of relations closed under a particular binary associative, commutative, idempotent
operation [9].
We may sharpen the result of Theorem 3 a little further by bounding the possible
arity of the closure operations on \Gamma which we need to consider, as the next result
shows.
Theorem 4 For any set of relations \Gamma over a finite set D, if \Gamma is closed under
some
operation\Omega which is not essentially unary, then it is also closed under some
operation
-\Omega of arity at most maxf3; jDjg, which is not essentially unary.
Proof: (This proof is adapted from the proof of Lemma 1.14 in [16]). Let \Gamma be
a set of relations which is closed under some
operation\Omega which is not essentially
unary. Let
-\Omega be an operation of the smallest possible arity, such that \Gamma is closed
under
-\Omega and
-\Omega is not essentially unary, and let k be the arity of
-\Omega . If k - 3, then
the result holds, so we only need to consider the case where k - 4.
Now consider the operations which are obtained from
-\Omega by identifying two arguments
(i.e., requiring them to have the same value). Since \Gamma is closed under these
operations, which have a lower arity than
-\Omega , they must all be essentially unary.
Hence, if we identify the first two arguments we have
z -
for some non-constant unary operation f 12 and some i 2 kg. Similarly, if
we identify the third and fourth arguments we have
z -
for some non-constant unary operation f 34 and some j 2 kg. This means
that
z -
z -
for all possible choices of x which implies that either i 62 f1; 2g
or j 62 f3; 4g. It follows from this that we can permute the order of the arguments
of
-\Omega to obtain a function \Phi which satisfies the identity
z-
for some non-constant unary operation f . In particular, we have
distinct pairs of indices we know that the
is an essentially unary function. Since we have just shown that for the case x
the value of this function is equal to f(x 1 ), we know that it must
equal cases.
Similarly, for all indices
is an essentially unary function. When the remaining arguments all have the same
value, then this function is equal to f(x), by the arguments above. Hence it must
be equal to f(x) in all cases.
there are more arguments than values, so at least one
argument value must be repeated somewhere, and in all such cases we have shown
that just
-\Omega with the order of the arguments
permuted, we have contradicted the fact that
-\Omega is not essentially unary. This means
that we must have k - jDj, and the result follows.
In order to use Theorem 3 to draw conclusions about the tractability of a set of
constraints we need to be able to distinguish closure operations which are essentially
unary from those which are not. By Definition 9, this means examining each
solution to the appropriate indicator problem to check whether the value of the
solution at each variable is determined by a single coordinate position in the tuple
describing that variable. For an operation of arity m, this checking may be carried
out in mjDj m steps.
Alternatively, the next result shows that the number of solutions to certain indicator
problems provides a sufficient condition for establishing NP-completeness,
without needing to examine the individual solutions in detail.
be a set of relations over a set D, let S 1 be the set of non-constant
solutions to IP (\Gamma; 1), and let Sm be the set of solutions to IP (\Gamma; m), where
then CSP(\Gamma) is NP-complete.
Proof: By Theorem 3 and Theorem 4, we know that either CSP(\Gamma) is NP-
complete, or \Gamma is closed under some operation which is not essentially unary, and
which has arity at most m.
By Theorem 1, Sm is the set of all m-ary operations under which \Gamma is closed. By
Definition 9, the number of operations in Sm which are essentially unary is equal to
the number of non-constant unary operations under which \Gamma is closed, multiplied
by m. By Theorem 1, this number is mjS 1 j. Hence, jS m j - mjS 1 j in all cases.
In the limiting case, when jS we know that every element of Sm
is essentially unary, so \Gamma is not closed under any m-ary operation which is not
essentially unary. It follows that \Gamma is not closed under any operation of arity
lower than m which is not essentially unary, so CSP(\Gamma) must be NP-complete.
Corollary 2 establishes NP-completeness for many sets of constraints without the
need for individually constructed, ad-hoc reduction arguments, as the following
examples illustrate.
Example 15 Consider the relations R 1 and R 2 over defined in
Example 1.
The indicator problem for fR 1 of order 1, defined in Example 9, has 1 solu-
tion, corresponding to the identity operation.
The indicator problem for fR 1 of order 3, has 3 solutions (which are all
essentially unary).
Hence is NP-complete, by Corollary 2.
On the other hand, it was shown in Example 10 that R 1 is closed under a constant
operation, so CSP(fR 1 g) is tractable, by Proposition 9 of [9]. In fact, any problem
in CSP(fR 1 g) has the solution which assigns the value 0 to each variable, so this
class of problems is trivial.
Furthermore, it was shown in Example 11 that R 2 is closed under the operation
4, defined in Example 5. Hence, CSP(fR 2 g) is tractable, by Theorem 13 of [9]. 2
Example Consider the relations R 1 defined
in Example 1.
By counting the solutions to the indicator problems of order 1 and order 3 for each
relation and each pair of distinct relations in this set, we are able to complete the
analysis of the complexity of CSP(\Gamma) for each possible subset \Gamma of these relations.
Relations # Solutions # Solutions Complexity
(Corollary
(Corollary
(Corollary
For all larger sets of relations we have that \Gamma contains at
least one of the pairs of relations shown in the table, and so CSP(\Gamma) is NP-complete.How practical is the test proposed here in general? For small values of jDj, the
relevant indicator problems have very few variables, and the solutions may be found
easily. This remains true even when the arity of the relations in \Gamma is large.
In the simplest case, when 2, the constraint satisfaction problem corresponds
to the classical Satisfiability problem [6], for which all possible tractable
sets of relations are known, and are fully described in [15]. The only non-trivial examples
in this case are the sets of Boolean relations which can be expressed by Horn
clauses, or the duals of Horn clauses, or clauses containing at most two literals, or
linear equations over the two-element field [15]. It has been shown that any set of
relations that is closed under an operation which is not essentially unary belongs
to one of these tractable classes [8]. Hence the condition described in Corollary 2
is both necessary and sufficient for NP-completeness in this case (assuming that
P is not equal to NP). It follows from this that solving the indicator problems of
order 1 and order 3 provides a simple and complete test for tractability of any set
of relations over any set with 2 elements. This provides a very practical answer to a
question posed by Schaefer in 1978 [15] concerning the existence of an efficient test
for tractability in the Generalized Satisfiability problem. Note that carrying
out the test requires finding the number of solutions to a constraint satisfaction
problem with just 8 Boolean variables.
As the size of D increases, the size of the relevant indicator problems increases
rapidly, and it may become impractical to compute all solutions, or even to calculate
the number of solutions, as required by Corollary 2. On the other hand,
for cases of interest, it may be possible to establish from known properties of the
constraints that the relevant indicator problems will have particular types of solu-
tion, without carrying out a complete solution algorithm. This question is currently
being investigated.
6. Conclusion
In this paper we have shown how the algebraic properties of relations can be used
to determine the expressive power of a set of possible constraint types.
Furthermore, we have proposed a method for determining these algebraic properties
by solving a particular form of constraint satisfaction problem, which we have
called an indicator problem.
Finally, we have shown that there are simple algebraic properties which distinguish
between sets of relations which give rise to tractable constraint satisfaction
problems and those which give rise to NP-complete problems. We have used these
results to obtain a sufficient condition for NP-completeness, which we have shown
is widely applicable and easy to test.
For problems where the set of possible values contains just two elements these
results provide a necessary and sufficient condition for NP-completeness (assuming
that P is not equal to NP), and an efficient test to distinguish the tractable sets of
relations.
We are now investigating the application of these results to particular problem
types, such as temporal problems involving subsets of the interval algebra. We
are also attempting to determine how the presence of particular algebraic closure
properties in the constraints may be used to derive appropriate efficient algorithms
for tractable problem classes.
Acknowledgments
We are grateful to Victor Dalmau for helpful discussions which greatly simplified
the proof of Theorem 2
Notes
1. Since D is finite, and hence there are only finitely many possibilities for R at each arity, we
may assume, without loss of generality, that this instance contains only a finite number of
constraints.
2. Also called 'implicational' relations [11].
--R
"Constraint Satisfaction From a Deductive Viewpoint"
"A Relational Model of Data for Large Shared Databanks"
"Characterizing tractable constraints"
"Structure identification in relational data"
"A sufficient condition for backtrack-bounded search"
Computers and intractability: a guide to NP-completeness
"Decomposing constraint satisfaction problems using database techniques"
"An algebraic characterization of tractable constraints"
"A unifying framework for tractable constraints"
"Tractable constraints on ordered domains"
"Fast parallel constraint satisfaction"
"On binary constraint problems"
"Consistency in networks of relations"
"Networks of constraints: fundamental properties and applications to picture processing"
"The complexity of satisfiability problems"
Clones in Universal Algebra
"On the Minimality and Decomposability of Row-Convex Constraint Net- works"
"A generic arc-consistency algorithm and its specializations"
--TR
--CTR
Peter Jeavons , David Cohen , Justin Pearson, Constraints and universal algebra, Annals of Mathematics and Artificial Intelligence, v.24 n.1-4, p.51-67, 1998
Lane A. Hemaspaandra, SIGACT news complexity theory column 43, ACM SIGACT News, v.35 n.1, March 2004
Richard Gault , Peter Jeavons, Implementing a Test for Tractability, Constraints, v.9 n.2, p.139-160, April 2004
Peter Jonsson , Andrei Krokhin, Recognizing frozen variables in constraint satisfaction problems, Theoretical Computer Science, v.329 n.1-3, p.93-113, 13 December 2004
David A. Cohen , Martin C. Cooper , Peter G. Jeavons , Andrei A. Krokhin, The complexity of soft constraint satisfaction, Artificial Intelligence, v.170 n.11, p.983-1016, August 2006 | constraint satisfaction problem;complexity;NP-completeness;relational algebra;indicator problem |
593308 | A Methodological View of Constraint Solving. | Constraints are an effective tool to define sets of data by means of logical formulae. Our goal here is to survey the notion of constraint system and to give examples of constraint systems operating on various domains, such as natural, rational or real numbers, finite domains, and term domains. We classify the different methods used for solving constraints, syntactic methods based on transformations, semantic methods based on adequate representations of constraints, hybrid methods combining transformations and enumerations. The concepts and methods are illustrated via examples. We also discuss applications of constraints to various fields, such as programming, operations research, and theorem proving. | Introduction
Constraints allow to define sets of data by means of logical formulae. For example,
the set of even numbers y given in extension as the set f0; 2; can be described
in comprehension by the formula fy stating that there
exists a natural number x such that y is twice x. In this formula, the subformula
x is the constraint, and N is its domain of interpretation. Constraints
have become very successful in computer science and operation research. There are
several reasons for this, some of which are listed below.
A convenient notation. Constraints provide a compact, simple, and familiar
representation of possibly infinite sets, which is a first reason for their success.
Expressivity. A second reason proceeds from a more pragmatic argument: constraints
allow to express and manipulate large sets of data that could not be
reasonably handled if given in extension.
Describing the infinite set of even numbers in extension means to give a procedure
than can enumerate this set by outputing the value 2n upon input n.
Defining the set of multiples of 3 can be done in the same manner. The intersection
of the two sets can now be computed by enumerating them both al-
ternatively, and outputing the common values: 6; 12; There is a deadly
risk, of course, when the intersection is empty. In contrast to this procedural
style, constraints are declarative: they allow to state properties independently
of an actual computation mechanism, called solving. In the above example, the
set of triples is specified as 9z z with N for domain of interpretation.
The intersection of the two sets can be simply expressed by accumulating both
constraints, resulting in 9x z. Constraints are indeed
targetted at specifying set-theoretic properties.
Efficiency. Declarative languages are often considered as inefficient. A third important
reason why constraints are so useful, is that they reconcile declarativeness
with efficiency. A constraint is solved in a given domain of interpretation,
hence very efficient algorithms can be chosen for this purpose and can in practice
be fetched from a library. Other declarative languages would use instead a
general purpose solving algorithm called search. For example, a standard Prolog
implementation would solve a system of linear equations over the rationals
by using SLD resolution, while a language allowing for rational constraints can
call Gaussian elimination, and therefore be much more efficient.
Easy combination. There is yet a fourth reason for the success of constraints:
they can be very easily combined with other computation models. For example,
combining logic programming and constraints is achieved by replacing the unification
component of a logic programming language by constraint solving algo-
rithms. In this combination, the logic programming computation produces new
constraints which are consumed by the constraint solving algorithms, which in
turn produces new inputs for the logic programming computation. The ability
to efficiently compute with sets of constraints which evolve along a computation
is a last major property of constraints called incrementality.
Constraints play a key role since the work of Alan Colmerauer [6], their abstract
formulation by Joxan Jaffar and Jean-Louis Lassez [26], and the introduction of
finite domain constraints in CHIP [16].
So far, we have not explained a major aspect of constraints, directly related to
the title of this paper. There are (in general infinitely) many ways to represent a
set of data by means of constraints. For example, the set of even numbers could
have been defined as the set of non-odd natural numbers z, that is by the constraint
This is of course a more complicated equivalent
but what does more complicated mean? There is no definite answer to this
question, unless the formula we are interested in defines the empty set. Indeed, it is
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING 3
a major problem to avoid useless computations by efficiently checking constraints
for emptiness.
To summarize, a constraint system comes in three parts:
1. The syntax in which the logical formulae are expressed. In most cases, it is a
first-order language, or a fragment thereof closed under the conjunction operator
&. Very common are the existential fragment, which is free of universal
quantifier, and the positive fragment, for which negation and disjunction are
not allowed. Constraints without logical connectives are called atomic.
A typical example consists in the conjunctions of linear equations over rational
numbers, such as
2. The structure in which the formulae are interpreted, composed of a domain
of values on one hand, and, on the other hand, of operations and relations
interpreting all symbols in the syntax.
In our example, the domain of values is the set of rational numbers, with the
usual operations.
A solution of a constraint assigns its free variables to values of the domain in
such a way that the formula evaluates to True. In the above example, there is
only one solution: x := 27; y := 36.
3. A constraint solving algorithm takes as input a constraint C and returns as
output a particular representation of the set of all its solutions. As an important
particular case, this algorithm allows to decide whether C has at least one
solution, this is called constraint satisfaction. A more general algorithm is often
needed, called constraint entailment, which decides whether the set of solutions
of a constraint C is included into the set of solutions of a constraint C 0 .
Gaussian elimination is one algorithm used to solve linear equations over rational
numbers.
We describe later in detail constraints on finite domains, which pop up in many
application areas. Such constraints are NP-hard, which makes it impossible to
deal with large application problems. As a consequence, practice sometimes favors
incomplete algorithms, which may sometimes fail to detect that a given constraint
has no solution. On the other hand, a constraint solving algorithm must always be
sound: it should not pretend that there is no solution when there is some.
So far, all our examples deal with numbers. Indeed, constraints over numbers or
Booleans have many industrial applications as operations research and hardware
verification. But, there are also applications to computer science, for which the
domain is itself made of expressions, called terms in this context. A typical example
is the problem of solving equations over terms, called unification, which is at the
heart of logic programming. We call symbolic, constraints over terms.
Symbolic constraints have been used for years in computer science in order to:
ffl represent sets of formulae. A constrained formula is a pair (OE j C) which stands
for the set of instances of OE by the solutions of C. Consider arithmetic expressions
built over the addition + and the multiplication as they are found in
4 H. COMON, M. DINCBAS, J.-P. JOUANNAUD, C. KIRCHNER
programming languages. The subset of these expressions which are sums of two
different expressions can be expressed as the formula 9xy
Here, x 6= y means that x and y stand for two syntactically different expres-
sions. This example shows the expressive power of constraints, since the above
set cannot be defined by finite automata operating on trees, as the ones used
later in this article.
ffl avoid useless processing of identical subterms by sharing them. This is used in
most interpreters or compilers under the name of an environment binding the
variables. For example, may be a very large expression.
the structure used by most implementations of logic
programming languages. For example, the infinite list of zeros can be represented
by the constraint interpreted in the domain of lists of
natural numbers.
ffl express search strategies, as in automated deduction, allowing to prune further
the search space.
The need for more complex combined constraints involving several domains of
interpretation arises in many situations. For example, integers are often used to
describe parameterized families of terms, by indicating the repetition of a given
subexpression. Constraints operating on such terms are then made of two compo-
nents, an integer constraint, and a symbolic constraint. Another example, that we
will work out in more detail in the sequel, is provided by bibliographic data bases.
Querying the data base for all titles containing a given word can be expressed as an
entailment problem over a language combining feature constraints for expressing
record definitions, with word constraints for expressing the search of a given word.
Our goal in this paper is to describe the different methods on which constraint
solving algorithms are based. We distinguish among: (complete) syntactic methods,
which do not commit to any particular representation of the problem domain or the
set of solutions; (complete) semantic methods, which rely on a particular representation
of the problem domain as well as of the set of solutions; hybrid methods which
combine (incomplete) syntactic or semantic steps together with non-deterministic
steps based on a partial enumeration of the set of solutions. These three methods
are described respectively in sections 2, 3, 4. Applications areas are then considered
in section 5.
2. Syntactic Transformations
2.1. The general setting
Syntactic methods are based on a very simple principle: to repeatedly transform
a constraint into an equivalent one until a so-called solved form is obtained. Most
computations can be seen as such a rewriting process. However, we insist here on
the fact that our transformation rules are applied on the formulas themselves, as
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING 5
opposed to some coding of them: the rules simply match the (sub)formulas against
some given patterns and replace them with simpler formulas. We will see some
techniques which do not fall in this category in the next two sections.
Assume that I have twice the age you had when I had the age you have. Since I'm
not 48, and you are not 38, how old are we? This can be expressed by the following
constraint over rational numbers:
The transformation proceeds as you expect, by choosing a variable, say x and
replacing it within the other equations, yielding the new equivalent system, that is
having the same set of solutions:
The system is then simplified according to elementary rational number theory,
resulting in:
We now proceed by eliminating t together with its existential quantifier:
which is in solved form. Hence, there are solutions, such as, e.g.
Figure
1. What is their age?
Figure
these concepts by developping an example of solving linear
constraints over rationals. This technique is attributed to Gauss, the celebrated
German mathematician of the 19th century, but was actually in use before that.
A different problem is obtained by using inequalities instead of equalities. This
problem can be reduced to the first by adding the so-called slack variables which
express the difference between the two sides of the equation. For example, the
constraint x - y is equivalent to the constraint 9z x This is of
course another formula transformation. With linear programming comes a more
difficult problem, in which a linear function must be optimized with respect to
the set of solutions of a constraint of the above form. An example is described in
figure 2, with the general principles of Dantzig's simplex algorithm [14]. Although
exponential, it is often prefered to more recent polynomial algorithms such as the
"interior point methods" [32] for two main reasons: it performs quasi linearly in
the average, and has an efficient incremental version.
Our examples show the ingredients of the transformation method. The constraint
is a logical formula. Each rule transforms a constraint into an equivalent one, the
6 H. COMON, M. DINCBAS, J.-P. JOUANNAUD, C. KIRCHNER
Vincent Mongeard-Mugneret, wine maker in Burgundy, just bought 20 acres of
good soil at Vosne Roman'ee, planted with red pinot. He has two options, which
cannot be changed once they are chosen. By bringing manure from his friend's
farm, his investment per acre-year will be equal to $1000, and will rise up to $3000
if he uses chemical fertilizer. One acre of the first kind will produce 1000 bottles a
year sold $25 dollars each, while the second will produce 50% more sold $20 each.
His investment for the next 5 years is limited to $200000. How many acres should
be fertilized with chemicals, and how many with manure in order to maximize the
profit?
Let us take x 1 for the number of acres cultivated with manure, x 2 for the number of
acres cultivated with chemicals, z 1 (number of non-cultivated acres) and z 2 (unused
are the slack variables. All variables are positive.!
The process repeats the following steps: (i) choose one distinct variable per equa-
tion, (ii) solve the system with respect to the choosen variables, (iii) replace the
left-hand side variables in the profit function. The choice of the variables at step
(i) must ensure that the right-hand side constants in the equations obtained at step
(ii) are all positive, and the constant in the profit function obtained at step (iii)
has not decreased.!
Pivoting on x 1 and x 2 yields!
The profit function is clearly maximized by taking z since their coefficients
are negative. This yields a profit of $255000 1 .
Figure
2. How good is your Vosne Roman'ee?
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING 7
equivalence proof relying on some algebraic property of the constraint domain.
Then each rule comes with some conditions on its application, which is supposed
to ensure the termination of the overall transformation process. The rules are not
necessarily deterministic: it may happen that several rules can be applied to the
same constraint, or it may happen that two distinct instances of the same rule can
be applied at the same time. For example, solving systems of linear equations,
at each step we may choose to eliminate any (unsolved) variable, while keeping
the termination property. This non-determinacy is quite different from e.g. non-determinism
in PRLOG programs: this is a "don't care'' non-determinism. We can
commit to any choice, without taking care of other possible transformations. Then,
an actual implementation has to consider in addition a strategy which restores the
determinism. For instance, in the case of linear equation solving, the strategy will
specify an ordering on the pivoting variables. This distinction between the strategy
and the rules themselves is important as it allows to reuse the same set of rules (and
the same termination proof) together with distinct strategies, which yield efficient
implementations depending on the particular properties of the constraints. For
example, the ordering on variables to be eliminated may depend on the form of the
system.
Finally, a particular set of constraints called solved forms has to be specified.
Such solved forms are supposed to have some additional properties. For example,
in the case of a system of linear equations, a solved form is a system of equations
such that every left member is a variable not occurring anywhere else. Strategies
should be designed in such a way that they are complete, i.e. every irreducible
constraint should be in solved form.
Formalizing this approach, the following steps are necessary:
1. Choose a set of solved forms, that is a set of formulae that have no solution
if and only if they are syntactically equal to the formula ?, standing for the
empty set.
2. Design a set of transformation rules and show that it has the following properties
(A) Correctness: applying a rule from the set to an arbitrary input constraint
results in a new constraint which has the same set of solutions. Proving
correctness is usually manageable since it breaks down into elementary correctness
proof for each transformation rule.
given an arbitrary constraint, every sequence of transformation
originating from it results in an irreducible constraint after a finite
number of steps. This property may be hard to prove.
3. Design a strategy which yields a deterministic set of rules and having the following
property:
(C) Completeness: there are enough rules, that is, for each constraint
which is not a solved form, at least one rule applies. Therefore, the
8 H. COMON, M. DINCBAS, J.-P. JOUANNAUD, C. KIRCHNER
algorithm never fails to detect that a given constraint has no solution.
This property is usually simple to prove and easy to enforce.
As part of its conceptual simplicity, an important advantage of this approach is
to provide a systematic guide for constraints solving. When it applies, this method
yields an algorithm which is inherently incremental, since new constraints can always
be added (by using conjunction) to a solved form, yielding a new constraint
equivalent to the conjunction of the starting constraint and the new one.
2.2. Unification and its extensions
The approach described in the previous section was indeed successfully used for a
variety of problems, starting with J. Herbrand [24] who was interested in solving
equations over terms, for automated deduction purposes. This now classical abstract
formulation of the well known unification algorithm was rediscovered in the
late 70's by Martelli and Montanari [37], who formulated it from a more operational
point of view. The presentation of the unification transformation rules given
in figure 3, is inspired from [6] and [28].
This general approach has been applied in a systematic way since the beginning
of the eighties in two different directions which both show the power of the
to reformulate existing constraint solving algorithm; to generalize the
unification algorithm in a number of directions. Let us mention now some of these
generalizations.
Equational unification consists in solving equations over terms when the function
symbols considered satisfy certain equational axioms. The problem here is that
using the Decompose rule is no longer complete. For example, if the head symbol f
in the rule is commutative (i.e. the order of its two arguments is irrelevant), then the
equation should be splited in the two possibilities: either s
Although it is still correct in this particular case,
the Check rule is no more correct in general. Many investigations in equational
unification were motivated by the practical need of building equational knowledge
in the resolution inference rule of theorem provers. This is the case, for example, of
commutativity and associativity which occurs in many useful algebraic structures,
or distributivity (unification modulo distributivity has been shown recently to be
decidable [45]). But automated deduction is not the only application area where
these techniques are eventually used. Let us mention among many: - a theory
arising in the context of library search, related to the axiomatization of cartesian
closed categories; - a theory originating from type inference for records in object
oriented functionnal languages; - the theory of Boolean rings, which study was
motivated by harware verification problems.
Roughly speaking, unification constraints are formulae where quantifier and negation
do not appear. Quantifiers occur of course naturally in the expression of
various problems, hence more general constraints arise in many applications. Arbitrary
first-order constraints built upon the equality predicate interpreted over
terms are called equational constraints [7]. For example, a method for building
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING 9
The unification transformation rules are parameterized by the vocabulary used for
building expressions, called terms. We use f and g for arbitrary function sym-
bols, x and y for variables, and s and t for arbitrary terms. Conjunctions
of equations between terms are called unification constraints. Solved forms are
chosen to be assignements of terms to variables, that is constraints of the form
in which any of the variables x i occurs exactly once
(see [28] for other choices). To obtain a solved form from an arbitrary unification
constraint, several transformation rules are needed, among which two are most im-
portant: decomposition simplifies an equation whose left and right hand side terms
are rooted by the same function symbol; elimination propagates when necessary
the value of a variable to the rest of the unification constraint. The whole set of
transformation rules for unification is the following:
Delete
Decompose
Conflict
Check
if x occurs in the non-variable term s
Eliminate
which x is replaced by s
if x does not occur in s and occurs in P
if x is a variable, s is not a variable
In the above rules, the conjunction & is supposed to be associative and commuta-
tive, allowing us to single out any equation from the constraint. As an example of
use, the unification constraint f(x; g(a; can be transformed
as follows:
which is in solved form. The associated assignment called
a most general unifier of the starting unification constraint. Any other assigment
solution of the constraint can indeed be obtained from a most general unifier by an
appropriate specialization.
Figure
3. Unification constraints
counter examples in theorem proving uses equational constraints with quantifiers
and negations [4]. Jouannaud and Kounalis method for inductive theorem proving
[30] uses equational constraints with universal quantifiers and negation (see [7]).
Equational constraints also appear in learning from examples and counter-examples
as described by Lassez and Marriott [35]. Equational constraints can be reduced to
a solved form, as shown independenlty by Comon and Maher [11, 36]. These solved
forms are purely existential, hence quantifier elimination rules become necessary.
Although there is still a limited amount of negations in these solved forms, there are
also negation elimination rules. And indeed, it has been an important problem in
this area, whether negations could always be eliminated when an equivalent negation
solved form existed. A positive answer has been given by Tajine [48] to this
important problem which has applications to compilation of pattern-matching def-
initions, and also to inductive inference from both examples and counter-examples.
Of course, some operators may again satisfy certain axioms, and again associativity
and commutativity are important for applications. Unfortunately, it is undecidable
to know whether an arbitrary equational constraint has solutions in this particular
case [52], and this is true as well for most algebraic structures.
2.3. Some other constraint systems
There are other important predicates in practice. Term orderings, for example, surface
naturally in mechanizing deduction since they allow reducing the search space
by eliminating those inferences which do not satisfy certain ordering conditions
(see [9, 31, 41, 12] among others for term ordering constraint solving). Membership
predicates are important in typed languages where they are interpreted as set
membership (see e.g. [10] for constraint solving). Set predicates have been used for
defining and computing partial interpretations of logic programs (see [23]. Again,
the problem becomes more difficult, in general undecidable, when some operators
additionally satisfy certain equational axioms.
First-order terms (that we have used up to now) lack the possibility to bind
(possibly functional) variables as in higher-order logic and functional program-
ming. Unfortunately, even unification constraints become undecidable in this set-
ting. However, they are semi-decidable, and it turns out that Huet's semi decision
procedure [25] is used in most proof development systems. An important decidable
subcase, called pattern unification [39], is used in the language -PROLOG, a
powerful extension of ordinary PROLOG.
Function symbols have a fixed number of arguments. It is sometimes convenient
to represent a term as a record, by using numeric keys for retrieving subterms, as
in f(1 expressions have been used for quite some time in
natural language processing [44], and more generally in knowledge representation,
under the name of features. They have also been used together with subtyping
mechanims in the area of programming languages and data bases to model inheritance
[?]. The figure 4 describes a possible syntax for feature constraints, and
suggests how the unification rules may be adapted to this case. The area of feature
constraints has been very active in the last 10 years, and resulted in a complete
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING 11
constraint solver for first-order features on one hand [3, 53], and in many prototype
implementations of feature-based languages on the other hand [2, 46]. We refer to
[53] for more information on feature constraints.
Finally let us note that most of the efforts in symbolic constraint solving are
surveyed in [28, 7] See also [29, 42] for more recent works.
3. Semantic Methods
Semantic methods, as opposed to syntactic ones, do not operate directly on the
constraint syntax. Instead, they use another representation of the constraint and
of its solutions, so that constraint solving relies then on the use of a specific data
structure.
3.1. Automata techniques
A typical example is the use of automata. The idea, which goes back to B-uchi
in the early sixties, consists in associating with each formula defining a constraint
an automaton recognizing the solutions of the constraint (see e.g. [49, 8]). An
automaton is a very simple finite transition system which reads a string of input
symbols sequentially, and upon each reading, moves from one state to another
depending on its current state. A word is recognized if the automaton ends up in
a distinguished final state.
Once an automaton has been associated with each atomic constraint, the construction
proceeds by replacing logical operations on constraints by set operations
on automata: conjunction yields intersection, disjunction yields union, negation
yields complement, existential quantification yields projection. This is so because
logical operations on constraints correspond to set operations on their solution sets.
For instance, the solutions of a conjunction of two constraints C 1 and C 2 are in
the intersection set of the solutions of C 1 and C 2 respectively. Since automata are
closed under set operations, the automaton associated with
A 1 and A 2 accept the solutions of C 1 and C 2 respectively. Projection has to be
explained a little bit further: the automata have to recognize tuples with as many
elements as the number of free variables in the constraint. Projection consists in
forgetting one of the components of the tuple, while keeping the same control in
the automaton.
Once an automaton A is associated with the constraint C, the satisfaction problem
for C is equivalent to the emptiness decision problem for A that is: C has at least
a solution iff A accepts at least one word (or tree or graph). The automaton A is
then a representation of the set of solutions. It can be cleaned, which corresponds
to reduce it to a solved form, and reused for further computations: this method is
incremental.
We did not precise so far on which objects the automata are working, which
depends on the representation of the constraints domain values by words, trees or
graphs. The idea is the same in each case: the class of automata has to possess
several closure properties and emptiness should be decidable. Several automata
12 H. COMON, M. DINCBAS, J.-P. JOUANNAUD, C. KIRCHNER
Features are constructed from three given sets, a S set of sorts (also called basic
types), a set K of keys (also called features), and a set X of sort variables. The
set F of feature expressions (or terms) follows the syntax given in the form of the
following
For example the feature term person(age is meant to represent the
set of all persons whose age is the natural number X . For our purpose, feature
constraints will be conjunctions of equalities between feature terms. For example,
one can specify as a constraint the set of all persons who have blue eyes, and are
married with a person of the same age:
Unlike ordinary trees, feature terms may have an arbitrary number of subterms
for each sort name. Still, feature terms unification looks pretty much like ordinary
unification. Let us give the decomposition and conflicting rules only:
Decompose
x(Key
KeyConflict
if Key 1 and Key 2 are different
SortConflict
if s and s 0 are different sort names
In these rules, x; stand for constants or variables of the appropriate
categories. For example, x may be the sort person and y the variable X above. As
an example of use, the constraint:
X(age
Decompose
confines X to describe a set X of persons having the same age.
Figure
4. Feature constraints
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING
Once we read a 0, then we know that the number (which is written in base 2) is
even. Hence we enter a final state marked with a double circle. Then, whatever we
read, the number will be even and we stay in that final state.
Figure
5. An automaton accepting even numbers
have been designed in the literature, each solving some particular kind of constraint.
Let us mention the classical finite state automata on words, the finite tree automata,
the automata with equality and disequality constraints, the tree automata with
free variables, the tree matching automata,. All possess the appropriate closure
properties by set operations (see e.g. [8] for more details).
The efficiency of automata techniques will follow directly from the efficiency of
operations on automata and emptiness decision. To get an idea of the computational
complexity, let us recall that, for classical word automata, union is computed
in constant time, intersection in quadratic time, projection in linear time
and complement in linear time for deterministic automata and exponential time for
non-deterministic ones. Emptiness decision is linear. This behaviour can be found
again in most automata classes: determinization and complement are usually the
most expensive steps.
Let us give a few examples of constraint solving using automata. Presburger
arithmetic consists in first-order formulae over the atomic formulae
where s; t are built using constants (0; addition and multiplication by a
constant. The interpretation domain is the set of natural numbers. For instance,
defines the set of even numbers. Assume now that the natural numbers
are written in base two, from right to left. For example, the number thirteen will
be written 1011. With each formula can be associated a word automaton. For
example, 9x associated with the automaton of figure 5. In general,
the construction might be a bit more complicated because some formulae may have
In such a case, the n-uples of numbers are encoded as words
over f0; 1g n . For example, the pair (thirteen, four) will be represented by the word1011 : reading from right to left the lower word we find thirteen in base 2 and
reading from right to left the upper word we find four. The height of the stack of
numbers is the number of free variables.
With such a convention, it is possible to build the automaton accepting the pairs of
numbers which satisfy and the set of triples x; y; z of numbers
14 H. COMON, M. DINCBAS, J.-P. JOUANNAUD, C. KIRCHNER
The only possible transitions are those which are labeled with pairs of identical
symbols.
Figure
6. An automaton for the formula
1The two states correspond to "no carry" (the final state) and "carry" the non-final
state. Initially we enter without carry. Since reading
the triples1
1 , we stay in the final state.
the transition by1
0 to the state carry. All other transitions are built in the same
way.
Figure
7. An automaton for the formula
such that z (see figure 7). Now, combining these two automata, by
intersection and projection (this last operation simply forgets a component of the
tuples), we get back the automaton of figure 5.
Automata techniques have been used for a large variety of constraints, but few of
them are really used in actual software, either because of their high computational
complexity or because of their relatively recent discovery. A simple example is the
use of tree automata in membership constraints, which express typing properties;
the formulae consist in combinations of atomic formulae t 2 i where i is recognized
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING 15
by a finite tree automaton. For example, we might want to restrict to integers
the values that a given variable x can take. Assuming that we have the function
int, . We can express the typing
condition using a constraint x 2 int where int is interpreted as the set of trees
recognized in the state int by the above specified automaton. This will include
is a real value, but not t E(t). Such constraints are used,
e.g. in the constraint concurrent logic programming language Oz [47], developed
at DFKI in Saarbr-ucken. Typing constraints can also be inferred at compile time
in a logic programming language, taking advantage of the structure of the program
[19]. Then automata techniques can be devoted to this particular piece of program,
which yields more efficient execution. The first-order theory of typing (also called
membership) constraints has been proved decidable by H. Comon and C. Delor [10].
Related to typing constraints, set constraints have been introduced by Mishra in
84 [40] in the area of program analysis. Set constraints are combinations of formulae
are set expressions using e.g. intersection, union, complement,
application of a function symbol, etc. They are interpreted as (possibly infinite)
subsets of the set of all terms. The contribution of the French school in this area was
to demonstrate that some kind of tree automata (tree automata with free
are adequate for the representation of solutions and for constraint solving [15], [22,
21, 51]. Set constraints can also be used as part of a constraint logic programming
language and there are other techniques than tree automata to solve them [34, 5]
3.2. Other algebraic representations
Besides automata techniques there are other (complete) constraints methods which
extensively use the representation of the constraints. A first example is equational
unification as already introduced in section 2, and we will consider here the case
where there are associative and commutative function symbols. An alternative to
the syntactic methods already described is to associate a semi-ring 2 with the equational
axioms, and then to reduce unification constraints to the solving of equations
in the semi-ring. Let us also mention an old semantic algorithm by L-owenheim for
Boolean ring unification which has been rediscovered by Martin and Nipkow [38].
Another example of importance concerns the linear diophantine equations that
consist of linear polynoms with integer coefficients. They are used in particular
in another constraint solving problem, which again uses semantic methods: solving
equations between terms in presence of associative and commutative function
symbols.
A typical example of diophantine equations is the system:
ae
where we are searching only the positive integer solutions. We have seen already
that this can be solved by means of automata. However, in this particular situation,
specific methods can be more efficient. The idea of Contejean and Devie [13] is to
represent the solutions as vectors in the real space of dimension n (the number of
@
@
@ @R
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Gamma\Psi
Figure
8. vectors
equations, 2 in our example). The constraint solving algorithm then consists of
starting from the origin and repeat the addition of one of the default vectors until
we reach back the origin. Default vectors are computed from the equation system
as the values of the two left members of the equations on the vector basis. In our
example, the default vectors are represented on figure 8. After the first step, the
addition of default vectors d to the current vector v is only considered when the
scalar product d \Delta v is negative. Then the process is shown to be always terminating
and complete, in the sense that every solution of the system will be a combination
of the solutions obtained in this way. For example, figure 9 shows how the solution
(4,2,1,0) is reached by the algorithm. 4 is the number of times we have added the
default vector a(e 1 ), 2 is the number of times we have added the default vector
the number of times we have added the default vector a(e 3 ), 0 is the
number of times we have added the default vector a(e 4 ).
Other semantic methods have been proposed for linear Diophantine equations
solving; see e.g. [1, 18, 17, 43, 50].
4. Hybrid Methods
As we have seen in the previous sections, solving a constraint consist in finding
some "canonical representation" of it. It is canonical in the sense that all unsatisfiable
constraints have a unique representation. This corresponds to what we call
complete constraint solvers. The completeness is not really required in many sit-
uations. Consider for instance applications of constraints in automated deduction
or logic programming. Constraints allow to represent (in an efficient way) sets of
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING 17
@@
@@
@@
@@
@ @
@ @
@ @-
O
@
@
@
@
@
@
@
@
@
@ @R
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta \Thetaffi
\Gamma\Gamma\Psi
\Gamma\Psi
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta
\Theta \Thetaffi
@
@
@ @
\Gamma\Psi
@
@
@ @
@
@
@ @
Figure
9. Computation of the solution (4,2,1,0) of the system
formulas. Then inferences take constrained formulas as premisses and yield constrained
formulas as conclusion. As long as the proof is not completed, or as soon
as a contradiction is not found (the empty clause in logic programming), it does
not matter for the deduction process whether or not the constraint of a formula is
satisfiable or not. Of course, not checking for satisfiability may yield a huge number
of junk formulas. But, on the other hand, checking satisfiability can be quite
expensive in time. That is why in most constraint logic programming languages or
constraint automated deduction systems do not solve the constraints eagerly; there
is a trade-off between time efficiency and space efficiency. Usually some constraint
simplifications are performed eagerly and the complete constraint solving is performed
only when the empty clause is generated (or, more generally when a proof
is obtained).
As a typical example, the incomplete solver checks, at each step of the computa-
tion, a relaxed version of the set of constraints, an idea quite common in Operations
Research, where the name of relaxation comes from. In practice, rather than checking
a conjunction of a large number n of elementary constraints, a possibility is
to check all possible combinations of conjunctions of two elementary constraints, a
technique known as local consistency. Since local consistency does not imply the
existence of solutions, this technique is usually used in combination with an enumeration
procedure operating on locally consistent constraints in order to restore
the completeness of the whole constraint solving process. Enumeration should be
taken here in a broad sense: relations as well as values may be enumerated.
A hybrid method is therefore a constraint solving technique which comes in two
parts: one syntactic constraint solving technique, which is incomplete in general,
and a (syntactic or semantic) technique which completes the first part of the constraint
solving. While the first simplification is performed eagerly, the second part
of the constraint solving is performed only when necessary.
Hybrid methods are actually used in all applications of constraints in automated
deduction and logic programming, as soon as the constraint solving is expensive. In
logic programming, a typical example is the finite domain constraints. In automated
deduction, this is the case of ordering constraints [20]. Combination mechanisms
can also be seen as an instance of this scheme. Let us consider now these constraints
in more detail.
4.1. Finite domains
Finite domain constraints are described in figure 10, together with a constraint
solving method based on local consistency checking. These techniques are at the
root of the success of Constraint Programming environments like CHIP [?] or Ilog
Solver [?] for solving combinatorial problems. In practice, the efficiency of these
hybrid methods for finite domains heavily depends on the enumeration procedure
for which various heuristics can be used. Although some of them work pretty well,
such as the first-fail principle for variables and domain-splitting for values in the
context of finite domains constraints, there is no best strategy applicable for all
types of problems.
Finite domain constraints as they are defined in figure 10 do not allow to easily
specify and solve complex problems in areas like planning, scheduling, packing and
placement. To this end, new predicates (like 6=) and logical connectives (like negation
and disjunction) can be introduced to the price of efficiency problems. More-
over, these particular predicates are too low-level to allow modelling problems in an
easy and natural way. An alternative, first explored in CHIP with the cumulative
constraint, is to introduce the so called global constraints to reach more expressivity
by means of high-level abstractions. The cumulative constraint generalises the
disjunctive constraints in order to model finite capacity scheduling problems for
which there may be several copies of each given kind of resource or these resources
can be shared. The second goal of these global constraints is to take advantage of
the interactions among different constraints at runtime in order to reach a better
pruning of the search tree. Instead of just using values or bound propagation as in
the previous method, global constraints take into account structural properties of
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING 19
We consider here a structure FD whose domain is the set N of natural numbers,
hence variables will range over N . In this setting, Finite domain constraints
are existential positive formulae built up with the five predicates =; ?; -
interpreted in N , and infinitely many membership predicates 2 [a b], one for each
finite interval [a b] of N . The precise syntax is given by the following grammar:
where x denotes a variable ranging over N , a and b natural numbers. The atomic
constraint x 2 [a b] is interpreted by the empty set when b ! a. The atomic
constraints a and x 2 [a a] are identified. Solving finite domain constraints is
both NP-complete and very important for practice, which has therefore favored the
use of a practically efficient technique, constraint propagation, described here in the
form of a set of transformation rules: each atomic ordering or equality constraint
C between the variables in whose domains are defined by
membership constraints x new restrictions on these domains,
resulting in new membership constraints. We call reduced domain RD(x j ; C) of
the variable x j for C, the smallest interval [a 0
in N such that
the constraint obtained by substituting x j by m in C & (& i=n
satisfiable in FD.
Forward Checking x 2 [a
Look Ahead x 2 [a
Eliminate ag
Falsity
Enumerate x 2 [a ag or x 2 [a
if no other rules applies
Using the Forward Checking rule is easy: since x is its only variable, C can be
solved which modifies the original domain of x and allows to eliminate C. There
are several uses of the Look Ahead rule whose principle is to lift the constraint from
the variables to their domain. For example, the constraint cx 1 ! dx 2 +e entails the
relation ca 1 ! db 2 +e. We can therefore choose for b 0
2 the largest natural number m
such that cm ! db Consider now the constraint:
Continued on Figure 11
Figure
10. Finite domains: 1/2
20 H. COMON, M. DINCBAS, J.-P. JOUANNAUD, C. KIRCHNER
Continued from Figure 10
Now, we enumerate, and we obtain first (the or must be understood as a non-deterministic
which again needs applying Enumerate until we get the solution:
5:
We can see the crucial role of enumerations, and it is the case here that enumerating
from the largest values would speed up the process. A popular schema, Domain
splitting, is similar to binary search.
Figure
11. Finite domains: 2/2
the constraints in order to deduce and propagate more information. This is usually
done via a semantic representation of the constraints based on graphs. While
simple arithmetic and logic knowledge is used in the former methods, deeper finite
mathematics, graph theory and operations research knowledge is required and used
in the latter. Other global constraints, like "diffn", a generalization of disequality
constraint to n-dimensional objects, have been recently introduced in CHIP [?]
which permitted to solve quite difficult placement problems.
4.2. Ordering constraints
Symbolic constraints also may use enumerations in the form of a domain splitting
rule since the Herbrand domain is usually infinite. This is the case with ordering
constraints, conjunctions of atomic constraints of the form s ? t or t. They
have been studied by Comon [9], Jouannaud and Okada [31], and Nieuwenhuis
[41]. In this context, simplification rules are obtained by expressing the recursive
definition of the ordering on terms as a set of transformation rules operating on
atomic constraints, while enumeration rules linearize the constraint considering all
possible orderings between the componebts. SATURATE, a system developed by
Nieuwenhuis and Ganzinger [20], implements constraints solving mechanism of this
form, with a lazy enumeration rule.
4.3. Combination techniques
Another kind of hybrid method arises when an application uses complex constraints
operating on several computational domains, each of them being supposed to have
its own syntax and constraint solving method. Such problems are called combina-
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING 21
tion problems. In this case, the constraint syntax is of course built with different
pieces coming from the different constraints involved in the combination. And, of
course, it is desirable to modularly derive a constraint solving algorithm for the
combination from the algorithms already known for the elementary constraints. It
turns out that this problem was thoroughly investigated for the unification case,
since it was actually the main difficulty of associative commutative unification:
when there are associative commutative function symbols, the problem can be seen
as a combination of several unification algorithms, one for each of these symbols.
Querying a bibliographic data base for articles satisfying certain constraints is
an interesting practical example of application for this kind of techniques. Assume
each item in the data base records information about a particular article, the au-
thors, the title, the affiliation, etc., as in the bibtex format. Each item can be
represented by a so called feature term, and the whole (finite) data base becomes a
(big) conjunction \Phi of feature terms. Note that it will be easy to augment the data
base, by adding a new element in the conjunction. Querying the data base for a
particular entry, for example all papers containing the word "unification" in their
title, will be expressed as an entailment problem of the form \Phi entails OE, if OE represents
the query. The problem here is that the feature terms are not homogeneous,
since they contain subexpressions which are strings over a certain vocabulary, which
involves solving associative pattern matching constraints, see figure 12.
Solving a constraint over an heterogeneous domain starts with a variable abstraction
consisting in purifying the constraints: the goal is to get a conjunction of
constraint systems each of which is homogeneous. Then each constraint solving
algorithm can be applied to the pure parts. Still, interactions between the homogenous
parts have to be considered. This can be done through an enumeration
procedure which, roughly, guesses the shared variables dependencies.
5. Application Contexts
Because constraints are a natural way to specify mathematical problems, there are
a number of potential applications of the ideas presented in this paper. Numerical
constraints are used in Operations Research, in Robotics, and more generally in
the area of applied mathematics, physics and mechanical engineering. Symbolic
constraints arise naturally in computer science applications like type verification
and inference, abstract interpretations, logic programming, deduction, and artificial
intelligence. We concentrate briefly now on two main applications of the tools
presented in this paper: constraints for deduction and constraints for computations.
The use of constraints in deduction has recently developed into a new promising
field of research, of which constraint logic programming is a specific instance.
Constraints are of particular importance in theorem proving for two main reasons.
Constraints allow to (possibly exponentially) reduce the number of formulae resulting
from a single deduction step, by packing them all in a constrained formula. For
example, automated deduction techniques require solving equations between terms
possibly involving associative and commutative operators, as subgoals of a given
logical deduction. But, an equation as simple as x
22 H. COMON, M. DINCBAS, J.-P. JOUANNAUD, C. KIRCHNER
We will use the syntax of features as defined in figure 4. Our sorts (or types) will
be the elements set farticle; person; identity; university; addressg, augmented by
"built-in types", list-of[], string and Nat. Using a set of keys that are clear from
the context, here is the syntax of our basic types:
authors
adr
postalcode
name
first last
When implicit, we do not recall the constant sorts in a feature term. We now
consider the query:
title
authors
where the letters A, X, Y, Z, U denote variables of the appropriate types. The
solutions of this query are all the values for A, X, Y, Z, U for which the constraint
above is entailed by the data base expression. Of course, this entailment problem
will cause an enumeration of all elementary formulas in the data base corresponding
to the various bibliographical data, allowing then to resolve the entailment problem
for each bibliographical datum in turn. Assume now that the bibliographical data
base is the one at the end of this paper and thus contains the following entry:
title ) An Efficient Unification Algorithm;
authors
last
last
In order to make the variables match the appropriate information, the constraint
will first be split into homogeneous pieces, that is pieces of a given domain. Here,
there are three domains, feature terms, strings, and natural numbers. We therefore
obtain the new constraint:
title Unification Algorithm
authors authors
[person(name
last
person(name
last
which in turn is decomposed in:
by using an appropriate string matching algorithm.
Figure
12. Bibliographic search
A METHODOLOGICAL VIEW OF CONSTRAINT SOLVING 23
has over 30 billions of incomparable solutions. It is of course not realistic to engage
current computers in such a number of further deductions. The remedy, keeping
the equation as a constraint for the further deductions, was initiated in [33]. Constraints
allow also to record information on the computation as a component of
the deduced formulae, hence they permit to formulate inference rules which reason
about this information for efficiently pruning the search space.
Constraint solving techniques have found their first key application within the
Constraint Logic Programming framework, especially for solving Combinatorial
Search Problems [26]. As examples of these problems occurring in different economical
areas, we can mention project management, production scheduling, crew
assignment, tour planning, etc. Not only are these problems NP-hard in general,
they are also hard to model and therefore hard to program. Constraint Logic Programming
brings an ideal solution to this problem by supporting different types
of constraint systems (symbolic and numeric), and by allowing the use of powerful
constraint solving algorithms combined with domain-oriented heuristic search.
Several successful industrial applications have been developed in these areas, which
are described in this volume. An overview of Constraint Logic Programming can be
found in [27], where are also described applications to circuit design (symbolic ver-
ification, test pattern generation, logic synthesis, diagnosis) and decision problems
in management (option trading analysis, portfolio management).
Acknowledgments
This work was partly supported by Vincent Mongeard-Mugneret, 21700 Vosne Ro-
man'ee, France, Fax: 33-80-62-35-75 and by the ESPRIT BRA CCL. We thank
Carlos Castro for his comments on earlier version of this paper.
Notes
1. Vincent Mongeard-Mugneret actually prefers supreme quality to big profit, hence uses manure
only. We recommand his Clos Vougeot Grand Cru. 88, 89 and 90 are extremely good years.
Feel free to use the 3rd author's recommandation.
2. A semi-ring is a structure which has the same properties as a ring, except that there might be
no inverse for addition. (N; +; \Theta; 0; 1) is a typical example of a semi-ring.
--R
General solutions of systems of linear diophantine equations and inequations.
A complete and recursive feature theory.
A method for simultaneous search for refutations and models by equational constraint solving.
Some notes on rational spaces.
Disunification: a survey.
Tree automata techniques and applications.
Solving symbolic ordering constraints.
Equational formulae with membership constraints.
Equational Problems and Disunification.
Ordering constraints on trees.
An efficient algorithm for solving systems of diophantine equations.
Linear Programming and Extensions.
Rewriting and tree automata.
The constraint logic programming language CHIP.
Outils pour la d'eduction automatique dans les th'eories associatives- commutatives
A fast method for finding the basis of nonnegative solutions to a linear Diophantine equation.
Logic programs as types for logic programs.
The Saturate System
Solving systems of set constraints with negated subset relationships.
Solving systems of set constraints using tree automata.
based program analysis.
Recherches sur la th'eorie de la d'emonstration.
R'esolution d
Constraint logic programming.
Constraint logic programming: A survey.
Solving equations in abstract algebras: a rule-based survey of unification
First International Conference on Constraints in Computational Logics
Automatic proofs by induction in theories without constructors.
Satisfiability of systems of ordinal notations with the subterm property is decidable.
A new polynomial-time algorithm for linear programming
Deduction with symbolic con- straints
Set constraints in logic programming.
Explicit representation of terms defined by counter examples.
Complete axiomatizations of the algebras of finite
An efficient unification algorithm.
Boolean unification.
A logic programming language with lambda-abstraction
Towards a theory of types in prolog.
Simple LPO constraint solving methods.
Constraint Programming: Basics and Trends
Minimal solutions of linear diophantine systems
A complete logical calculus for record structures representing linguistic information.
The oz programming model.
A foundation for higher-order concurrent constraint programming
The negation elimination from syntactic equational formulas is decidable.
Automata on infinite objects.
Solving linear diophantine equations using the geometric structure of the solution space.
Automates et contraintes ensemblistes.
A new method for undecidability proofs of first order theories.
Feature trees over arbitrary structures.
--TR | constraint solving;rule based solving;constraint satisfiability;unification |
593311 | Localizer. | Local search is a traditional technique to solve combinatorial search problems which has raised much interest in recent years. The design and implementation of local search algorithms is not an easy task in general and may require considerable experimentation and programming effort. However, contrary to global search, little support is available to assist the design and implementation of local search algorithms. This paper describes the design and implementation of Localizer, a modeling language for implementing local search algorithms. Localizer makes it possible to express local search algorithms in a notation close to their informal descriptions in scientific papers. Experimental results on Boolean satisfiability, graph coloring, graph partitioning, and job-shop scheduling show the feasibility of the approach. | Introduction
Most combinatorial search problems are solved through global or local search. In global
search, a problem is divided into subproblems until the subproblems are simple enough to
be solved directly. In local search, an initial configuration is generated and the algorithm
moves from the current configuration to a neighborhood configuration until a solution (deci-
sion problems) or a good solution (optimization problems) has been found or the resources
available are exhausted. The two approaches have complementary strengths, weaknesses,
and application areas. The design of global search algorithms is now supported by a variety
of tools, ranging from modeling languages such as AMPL [2] and Numerica [10] to constraint
programming languages such CHIP, Ilog Solver, CLP(!), Prolog-IV, and Oz
to name only a few. In contrast, little attention has been devoted to the support of local
search, despite the increasing interest in these algorithms in recent years. (Note however
there are various efforts to integrate local search in CLP languages, e.g., [9]). The design
of local search algorithms is not an easy task however. The same problem can be modeled
in many different ways (see for instance [4]), making the design process an inherently
experimental enterprise. In addition, efficient implementations of local search algorithms
often require maintaining complex data structures incrementally, which is a tedious and
error-prone activity.
Localizer [5] is a domain-specific language for the implementation of local search al-
gorithms, combining aspects of declarative and imperative programming, since both are
important in local search algorithms. Localizer makes it possible to write local search
algorithms in a notation close to the informal presentation found in scientific publications,
while inducing a reasonable overhead over special-purpose implementations. Localizer
offers support for defining traditional concepts like neighborhoods, acceptance criteria, and
restarting states. In addition, Localizer also introduces the declarative concept of invariants
in order to automate the most tedious and error-prone aspect of local search procedures:
incremental data structures. Invariants provide a declarative way to specify what needs to
be maintained to define the neighborhood and the objective function.
This paper is a progress report describing the status of Localizer as of February 1998.
Its main focus is on the language and its implementation. 1 It is not intended as a final
word on the language, since new, higher-level, extensions are currently under evaluation.
The paper however describes the core of Localizer which will probably not evolve in
significant ways. The paper is organized in four main parts. Section 2 gives readers a quick
tour of Localizer. Section 3 describes the language in more detail. Section 4 describes the
implementation of invariants which are the cornerstone of Localizer. Section 5 summarizes
some experimental results from several applications. Finally, Section 6 concludes the paper.
A Tour of Localizer
This section gives an overview of the main features of Localizer. It starts by reviewing
the computational model of Localizer and the general form of Localizer statements. It
then considers the two main contributions of Localizer: invariants and neighborhoods.
2.1 The Computation Model
To understand statements in Localizer, it is best to consider the underlying computational
model first. Figure 1 depicts the computational model of Localizer for decision problems.
The model captures the essence of most local search algorithms. The algorithm performs
a number of local searches (up to MaxSearches and while a global condition is satisfied).
Each local search consists of a number of iterations (up to MaxTrials and while a local
condition is satisfied). For each iteration, the algorithm first tests if the state is satisfiable,
in which case a solution has been found. Otherwise, it selects a candidate move in the
neighborhood and moves to this new state if this is acceptable. If no solution is found after
MaxTrials or when the local condition is false, the algorithm restarts a new local iteration
in the state restartState(s). The computation model for optimization problems is similar,
except that line 5 needs to update the best solution so far if necessary, e.g. in the case of a
minimization,
5.1 bestBound := value(s);
5.2 best := s;
companion paper for the Operations Research community is oriented around applications and modeling aspects.
The optimization algorithm of course should initialize f properly and return the best
solution found at the end of the computation.
procedure Localizer
begin
2 for search := 1 to MaxSearches while Global Condition do
3 for trial := 1 to MaxTrials while Local Condition do
5 return s;
6 select n in neighborhood(s);
7 if acceptable(n) then
9 s := restartState(s);
Figure
1: The Computation Model of Localizer
2.2 The Structure of Localizer Statements
The purpose of a Localizer statement is to specify, for the problem at hand, the instance
data, the state, and the generic parts of the computation model (e.g., the neighborhood
and the acceptance criterion). A Localizer statement consists of a number of sections
as depicted in Figure 2. The instance data is defined by the Type, Constant, and Init
sections, using traditional data structures from programming languages. The state is defined
as the values of the variables. The neighborhood is defined in the Neighborhood section,
using objects from previous sections. The acceptance criterion is part of the definition of
the neighborhood. The initial state is defined in section Start. The restarting states are
defined in section Restart, the parameters (e.g. MaxTrials) are given in the Parameter
section, and the global and local conditions are given in sections Global Condition and
Local Condition. Note that all the identifiers in boldface in the description of computation
model (e.g., search and trial), are in fact keywords of Localizer.
As mentioned previously, the most original aspects of Localizer are in the specifications
of the neighborhood and the acceptance criterion. Of course, some of the notations are
reminiscent of languages such as AMPL and Claire at the syntactical level but the underlying
concepts are fundamentally different. In the rest of this section, we describe the most
original aspects of Localizer without trying to be comprehensive.
2.3 The Running Example
This overview mostly uses Boolean satisfiability to illustrate the concepts of Localizer.
A Boolean satisfiability problem amounts to finding a truth assignment for a first-order
boolean formula expressed in disjunctive normal form. The input is given as a set of clauses,
Model i ::= [solve j optimize]
hObjective Functioni]
Figure
2: The Structure of Localizer Statements
each clause consisting of a number of positive and negative literals. As is traditional, a literal
is simply an atom (positive atom) or the negation of an atom (negative atom). A clause is
satisfied as soon as at least one of its positive atoms is true or at least one of its negative
atoms is false. The local search model considered for Boolean satisfiability is based on the
GSAT algorithm by Selman et al. in [8], where the local search moves consist of flipping
the truth value of an atom.
A local improvement model for Boolean satisfiability is described in Figure 3. In the
model, atoms are represented by integers 1 to n and a clause is represented by two sets:
the set of its positive atoms p and the set of its negative atoms n. This data representation
is specified in the Type section. A problem instance is specified by an array of m clauses
over n variables. The instance data is declared in the Constant section and initialized in
the Init section which is not shown. The state is specified by the truth values of the atoms
and is captured in the array a of variables in the Variable section. Variable a[i] represents
the truth value of atom i. The Invariant section is the key component of all Localizer
statements: it describes, in a declarative way, the data structures which must be maintained
incrementally. Invariants are reviewed in detail in Section 2.4. In the model depicted in
Figure
3, they maintain the number of true literals nbtl[c] in each clause c and the number
of satisfied clauses nbClauseSat. The Satisfiable section describes when the state is a
solution (all clauses are satisfied), while the Objective Function section describes the
objective function (maximize the number of satisfied clauses) used to drive the search. The
Neighborhood section describes the actual neighborhood and the acceptance criterion.
The neighborhood consists of all the states which can be obtained by flipping the truth
value of an atom and a move is accepted if it improves the value of the objective function.
The Neighborhood section is another important part of Localizer and is reviewed in
Solve
Type:
Constant:
cl: array[1.m] of clause = .;
Variable:
a: array[1.n] of boolean;
Invariant:
in 1.m] of int = sum(i in cl[i].p) a[j] + sum(j in cl[i]:n) !a[j];
Satisfiable:
Objective Function:
maximize nbClauseSat;
Neighborhood:
move a[i] := !a[i]
where i from f1.ng
accept when improvement;
Start:
forall(i in 1.n) a[i] := random(ftrue,falseg);
Restart:
forall(i in 1.n) a[i] := random(ftrue,falseg);
Figure
3: A Local Improvement Model for Boolean Satisfiability
more detail in Section 2.5. The Start and Restart sections describe how to generate an
initial state and a new state when restarting a search. They both use a simple random
generation in the model.
It is interesting at this point to stress the simplicity of the model, since it is difficult to
imagine a more concise formal statement of the algorithm.
2.4 Invariants
Invariants are probably the most important tool offered by Localizer to support the design
of local search algorithms. They make it possible to specify what needs to be maintained
incrementally without considering how to do so. Informally speaking, an invariant is an
expression of the guarantees that, at any time during the
computation, the value of variable v of type t is the value of the expression exp (also of type
t of course). For instance, the invariant
in 1.m] of int = sum(i in cl[i].p) a[j] + sum(j in cl[i]:n) !a[j];
in the Boolean satisfiablity model specifies that nbtl[c] is equal to the sum of all true
positive atoms and all false negative atoms in clause c, for all clauses in 1::n. Localizer
uses efficient incremental algorithms to maintain these invariants during the computation,
automating one of the tedious and time-consuming tasks of local search algorithms. For
instance, whenever a value a[k] is changed, nbtl[c] is updated in constant time.
Localizer allows a wide variety of invariants over complex data structures. The invariant
(also from the Boolean satisfiability model)
illustrates the use of relations inside an invariant. A relation, when used inside an expression,
is considered a 0-1 integer, i.e., the relation evaluated to 1 when true and 0 otherwise. The
excerpt
C: array[1.n] of int = distribute(x,1::n,1.n);
select i from 1.n where
select i from 1.n where size(C[i]) ? 0g;
unused
Candidates
B: array[k in 1.n] of
select i from C[k] & select j from C[k] where A[i; j]
is taken from a graph-coloring model implementing an algorithm in [4]. The graph-coloring
problem amounts to finding the smallest number of colors to label a graph such that that
adjacent vertices have different colors. For a graph with n vertices, the algorithm considers
n colors which are the integers between 1 and n. Color class C i is the set of all vertices
colored with i and the bad edges of C i , denoted by B i , are the edges whose vertices are
both colored with i. The main idea of the algorithm is to minimize the objective function
whose local minima are valid colorings. To minimize the function,
the algorithm chooses a vertex and chooses a color whose color class is non-empty or one of
the unused colors. It is important to consider only one of the unused colors to avoid a bias
towards unused colors. The invariant
B: array[k in 1.n] of
select i from C[k] & select j from C[k] where Adj[i; j]
that B[k] is the set of edges obtained by selecting two adjacent vertices in color
class k. It illustrates that Localizer can maintain queries over sets varying in time (since
evolves during the local search). The invariant
C: array[1.n] of int = distribute(x,1::n,1.n);
is equivalent to, but more efficient than,
C: array[i in 1.n] of int select i from 1.n where
This primitive function is provided, since it is useful in a large variety of applications. The
invariant
select i from 1.n where size(C[i]) ? 0g;
defines the non-empty classes. Note that here the set 1.n does not vary but the condition
Once again, it is important to emphasize the significant support provided by Localizer
with invariants. These invariants maintain complex data structures incrementally, but users
only have to specify them in a declarative way.
2.5 The Neighborhood
Many strategies such as local improvement, simulated annealing, and tabu search have been
proposed in the last decades for local search algorithms. This section reviews how they are
modeled in the neighborhood section, which is the other fundamental tool provided by
Localizer.
2.5.1 Local Improvement and Local Nondegradation
The model depicted in Figure 3 uses a stochastic local improvement approach. The neighborhood
section
Neighborhood:
move a[i] := !a[i]
where i from f1.ng
accept when improvement;
specifies the following strategy: select a value i in 1::n (i.e., select an atom), flip a[i], and, if
the resulting state improves the value of the objective function, take the move. If the state
does not improve the value of the objective function, the move is not taken and Localizer
proceeds to the next iteration of the innermost loop in the computational model. This
strategy illustrates the structure of the neighborhood definition in Localizer. The move
part specifies a state transformation: it uses traditional imperative constructs to show how
to transform a state into another state. The where part specifies the set of objects used to
specify the state transformation. The accept part describes when to accept the move.
The local improvement strategy can be made greedy by adding the keyword best in
front of the move instruction, as in
Neighborhood:
best move a[i] := !a[i]
where i from f1.ng
accept when improvement;
Solve
Type:
Constant:
cl: array[1.m] of clause = .;
Variable:
a: array[1.n] of boolean;
Invariant:
in 1.m] of int = sum(i in cl[i].p) a[j] + sum(j in cl[i]:n) !a[j];
Satisfiable:
Objective Function:
maximize nbClauseSat;
Neighborhood:
best move a[i] := !a[i]
where i from f1.ng
accept when noDecrease;
Start:
forall(i in 1.n) a[i] := random(ftrue,falseg);
Restart:
forall(i in 1.n) a[i] := random(ftrue,falseg);
Figure
4: A GSAT-based Model for Boolean Satisfiability
This excerpt specifies the following strategy: consider each value i in 1::n which, when
flipped, produces an improvement and select the one with the best improvement. Note that
this strategy explores the neighborhood in a systematic way, while the previous strategy
was selecting a random move and testing it for improvement. The neighborhood section
Neighborhood:
first move a[i] := !a[i]
where i from f1.ng
accept when improvement;
is another approach that explores the neighborhood systematically until a move improving
the value of the objective function is found. It should be contrasted with the random walk
strategy presented previously.
Sometimes it is important to allow more flexibility in the local search and to allow moves
which may not improve the objective function. The neighborhood
Neighborhood:
best move a[i] := !a[i]
where i from f1.ng
accept when noDecrease;
accepts the best move which does not decrease the value of the objective function. The
resulting model, depicted in Figure 4, captures the essence of the GSAT algorithm.
2.5.2 Simulated Annealing
Simulated annealing is a well-known stochastic strategy to enhance a local improvement
search. It is easily expressed by the Localizer neighborhood
Neighborhood:
move a[i] := !a[i]
where i from f1.ng
accept
when improvement ! ch++;
cor noDecrease;
The key novelty here is that the accept statement may have a number of acceptance conditions
which are tried in sequence until one succeeds or all fail. In addition, each acceptance
condition can be associated with an action. The simulated annealing neighborhood specifies
that a move is accepted when it improves the objective function, when it does not decrease
the objective function, or with the standard probability of simulated annealing, which depends
on a temperature parameter and the variation delta of the objective function. Note
that the variable ch is incremented when there is an improvement or a decrease in the
objective function. The complete model is given in Figure 5.
The model illustrates also several new features of Localizer. The Operator section
describes two procedures which are used subsequently in the Start and Restart sections.
Operators in Localizer uses traditional constructs from imperative programming languages
(e.g., loops and conditions) as well as some new primitives for randomization. These
features are once again described in more detail in Section 3. Note also the variables t (the
temperature) and ch (the change counter) which are used in various places in the model.
2.5.3 Tabu Search
Tabu search is another strategy to escape local optima which, in contrast to simulated
annealing, does not resort to stochastic moves. The neighborhood
Neighborhood:
best move a[i] := !a[i]
where i from f1.ng such that !tabu(i)
accept when always ! t[v] := trial;
Solve
Type:
Constant:
cl: array[1.m] of clause = .;
Variable:
a: array[1.n] of boolean;
t: real;
Invariant:
in 1.m] of int = sum(i in cl[i].p) a[j] + sum(j in cl[i]:n) !a[j];
Operator:
void
forall(i in 1.n) x[i] := random(ftrue,falseg);
ch := 0;
void lowTemp() f
ch := 0;
Satisfiable:
Objective Function:
maximize nbClauseSat;
Neighborhood:
move a[i] := !a[i]
where i from f1.ng
accept
when improvement ! ch++;
cor noDecrease
Start:
Restart:
lowTemp();
Figure
5: A Simulated Annealing Model for SAT
indicates how a simple tabu search can be expressed in Localizer. The key idea here is to
select an atom which is not tabu. The where clause is generalized to include this condition.
All the moves so-defined are accepted and the model also keeps track of when an atom was
last flipped by using the keyword trial. An atom is then tabu if it has been flipped recently,
which can be expressed as
f
return
where tl is a parameter specifying the time an atom stays on the tabu list. The complete
model is described in Figure 6. Of course, more complicated tabu search algorithms (e.g.,
using aspiration criteria to overwrite the tabu status or a tabu list whose size varies over
time) can be implemented easily.
2.5.4 Composing Neighborhoods
Localizer makes it also possible to compose neighborhoods. For instance, the following
neighborhood
try
move
where
i from OccurInUnsatClause
accept when
default:
best move
where
i from f1.ng
accept when noDecrease;
implements the random walk/noise strategy of GSAT. Here, Localizer flips an arbitrary
variable in an unsatisfied clause with a probability of 0.1 and applies the standard strategy
with a probability of 0.9. Note that Localizer simply goes to the next iteration if the
selected neighborhood is empty, since other neighborhoods may be non-empty.
2.5.5 Incrementality Issues
In the models presented so far, Localizer needs to simulate the move to find out how
the objective function evolves. This simulation can become very expensive when few moves
are accepted. In practice, local search implementations often try to evaluate the impact
Solve
Type:
Constant:
cl: array[1.m] of clause = .;
Variable:
a: array[1.n] of boolean;
t: array[1.n] of int;
tl: int;
Invariant:
in 1.m] of int = sum(i in cl[i].p) a[j] + sum(j in cl[i]:n) !a[j];
Operator:
void
tl := 10;
forall(i in 1.n) x[i] := random(ftrue,falseg);
forall(i in 1.n) t[i] := -tl;
return
Satisfiable:
Objective Function:
maximize nbClauseSat;
Neighborhood:
best move a[i] := !a[i]
where i from f1.ng such that !tabu(i)
accept when always ! t[v] := trial;
Start:
Restart:
Figure
Model for Boolean Satisfiability
of the move in the current state. Localizer supports this practice by allowing to specify
acceptance criteria which are evaluated in the current state. For instance, the neighborhood
definition
Neighborhood:
first move a[i] := !a[i]
where i from f1.ng
accept when in current state
evaluates the condition gain[i] ?= 0 in the current state to determine whether to take the
move. Of course, this requires to generalize the invariants to maintain gain[i] incrementally.
The invariants now become
Invariant:
nbtl: array[ i in 1.m ] of int = sum(i in cl[i]:p) a[j] + sum(j in cl[i]:n) !a[j];
The informal meaning of the new invariants are the following. g01[i] represents the change
in the number of satisfied clauses when changing the value of atom i from false to true,
assuming that atom i is currently false. Obviously, the flip produces a gain for all unsatisfied
clauses where atom i appears positively. It also produces a loss for all clauses where i
appears negatively and is the only atom responsible for the satisfaction of the clause. g10[i]
represents the change in satisfied clauses when changing the value of atom i from true
to false, assuming that atom i is currently true. It is computed in a way similar to g01.
gain[i] represents the change in satisfied clauses when changing the value of atom i. It is
implemented using a conditional expression in terms of g01[i], g10[i], and the current value
of atom i. No simulation is necessary in the resulting model.
The GSAT model can be made even more incremental. Since GSAT only selects the move
with the best objective value, it is possible to maintain these candidate moves incrementally.
The only change is to add the two invariants
Candidates
select i from 1.n where
Here maxGain is simply the maximum of all gains and Candidates describes the set of
candidates for flipping as the set of atoms whose gain is positive and maximal. Once the
invariants have been described, the neighborhood is defined by flipping one of the candidates.
There is no need to use the keyword best or a noDecrease acceptance criteria, since they
are already enforced by the invariants. The complete model is depicted in Figure 7. Of
course, the same transformation can be performed for the tabu search model.
Solve
Data Type:
Constant:
cl: array[1.m] of clause = .;
po: array[ i in 1.n] of fintg :=
select c from 1.m where i in cl[c]:p
no: array[ i in 1.n] of fintg :=
select c from 1.m where i in cl[c]:n
Variable:
a: array[1.n] of boolean;
Invariant:
nbtl: array[ i in 1.m ] of int = sum(i in cl[i]:p) a[j] + sum(j in cl[i]:n) !a[j];
gain: array[ i in 1.n ] of int = if a[i] then g10[i] else g01[i];
Candidates
select i from 1.n where
Satisfiable:
Neighborhood:
move a[i] := !a[i]
where i from Candidates;
Start:
forall(i in 1.n)
Restart:
forall(i in 1.n)
Figure
7: A More Incremental Model of GSAT
3 The Language
As mentioned previously, Localizer is an hybrid language embedding aspects of declarative
programming within an imperative language. The main declarative tool is, of course,
the concept of invariants which specify expressions whose values must be maintained in-
crementally. Imperative constructs are mostly used to specify state transformations and
the starting and restarting states. This section reviews Localizer in more detail and is
essentially organized along the textual ordering of Localizer statements.
3.1 The Type Section
The Type section of Localizer is used to define record types. Records within Localizer
are identical to records found in conventional imperative languages like Pascal or C. They
aggregate a number of named fields, possibly of different types. For instance, the excerpt
declares a record type Edge consisting of two integers (the origin and destination nodes),
while the excerpt
declares a record type clause with the two fields pl and nl of type "sets of integers".
3.2 Constants
The Constant section declares the input data and, possibly, some derived data which are
useful in stating the model. All constants are typed, read only (i.e., they cannot be modified
by assignments), and are initialized. As shown later on, there are various ways to initialize
data in Localizer.
3.2.1 Data Types
Basic Data Types The basic data types supported by Localizer are integers, booleans
and floats. The excerpt
declares an integer n whose value is 10, a float whose value is 3:14, and a Boolean. Integers
can range from \Gamma2 floats are double-precision floating-point numbers.
Arrays Localizer supports multi-dimensional arrays of arbitrary types. The declara-
tion
defines a one-dimensional array a of integers which is initialized by the vector [6,1,4,5,7].
The declaration
declares a matrix of integers.
Records As mentioned previously, records can be used in Localizer to cluster together
related data. For instance, the declaration
of Edge := [!
defines p as an array of 3 edges. Each edge is initialized with a tuple. A tuple is compatible
with a record type if it has the same number of fields and the type of each field is compatible
with the type of the corresponding field.
Sets Finally, Localizer supports sets of arbitrary types. For instance, the declaration
declares and initializes a set of edges.
3.2.2 Inline and Offline Initializations
Constants can be initialized inline as in all previous examples. They can also be initialized
offline in the Init section to separate the model from the instance data, which is usually a
good practice. The excerpt
declares a float f whose initialization is given in the Init section. The Init section consists
of a set of pairs (identifier,value) and, of course, the type of the initializationmust match the
type of the declaration. Offline initializations can be used for arbitrary types. For instance,
the Boolean satisfiability models may contain an initialization section of the form
Init:
cl
Here, cl is initialized with a vector of 11 tuples. Each tuple is a pair of sets. The first set
of each pair is associated with the first field of the record of type clause and denotes the
set of positive literals in that clause. The second set is matched with the second field of the
record and denotes the negative atoms of the clause.
3.2.3 Generic Data
Localizer also supports the concepts of generic data which was introduced in Numerica
[10]. The basic idea here is to initialize the data using an expression which may depend
on parameters of the declaration. Genericity is especially attractive to define derived data
which are then used to simplify the model. In the case of the fully incremental version of
GSAT (see Figure 7, it is important to know the clauses where an atom i appears positively
(and negatively). This information is derived from the data cl using the generic declarations
Constant:
po: array[i in 1.n] of fintg select c from 1.m where i in cl[c]:pg;
no: array[i in 1.n] of fintg select c from 1.m where i in cl[c]:ng;
There are a couple of important points to stress here. First, the declarations use parameters
which range over the index sets of the array. For instance, parameter i ranges over 1::n, the
set of atoms. Second, these parameters are used in the expression defined on the right-hand
side of := to specify the value of the array at the given position. In the GSAT example, po[i]
is defined as the set of clauses where atom i appears positively. The expressions allowed for
the right-hand side are very general and their syntax is given in Figure 8. Figure 9 describes
the signature of the primitive functions which have the obvious meanings.
3.3 Variables
Variables are of course fundamental in Localizer, since they define the state of the com-
putation. Variables are declared in the same ways as constants, except that they are not
initialized. They are generally given an initial value in the Start section and modified in the
Neighborhood and Restart sections. As should be clear from the examples, Localizer
has an assignment operator, whose right-hand side is an expression.
3.4 Invariants
Invariants are the key concept provided by Localizer to support the design of local search
algorithms. Syntactically, invariants are simply generic data. However, invariants are not
static since they may contain variables and/or other invariants. As a consequence, the
values of invariants are state-dependent and Localizer is responsible to update them after
each state transition. The following excerpt illustrates invariants from a graph-coloring
model where C[i] refers to another invariant whose type is fintg (set of integers).
constant literal
::= hexpri . hidentifieri
hSet Bodyi ::= hexpri . hexpri j hexpri
::= hexpri . hexpri
select hidentifieri from hrangei [ where hexpri
select hidentifieri from hexpri [ where hexpri
hrangei ::= hexpri . hexpri
Figure
8: Expression syntax
Arithmetic Set related Output
min2(int,int)!int size(fTg)!int print(.)!void
max2(int,int)!int random(fTg)!T println(.)!void
floor(float)!int minof(fTg)!T
ceil(float)!int insert(fTg,T)!void
round(float)!int remove(fTg,T)!void
exp(float)!float
time()!int
Figure
9: Primitive Functions
select i from 1.n where size(C[i])=0g;
in 1.n] of fEdgeg select i from C[k]
select j from C[k]
In addition to the standard expressions, invariants can also be defined in terms of distribute
and dcount. They take as input a one-dimensional array of integers A and two sets I and
O. I must be a subset of the index set of A. The result type of a distribute expression is
one-dimensional array of set of integers B whose index set is O. fintg.
The result type of a dcount expression is one-dimensional array of integers whose index
set is O. Their meanings are given by the following equivalences:
These expressions were introduced because of their ubiquity in practical applications. It is
important to stress that the data declared by invariants cannot appear in left-hand sides of
assignment statements.
Operators
The Operator section contains function definitions. Functions in Localizer are essentially
similar to functions in C and use traditional assignment, conditional, and iterative
statements, as well as recursion. In addition, Localizer provides some constructs which
are useful for local search algorithms. The syntax of statements in Localizer is sketched in
Figure
10. The forall instruction provides a convenient way of iterating over the elements
of a set. The choose instruction can be used to select an element from a set, in a (don't
care) nondeterministic way. It is possible to filter elements of the given set or to select
an element optimizing a function. The following examples illustrate the various forms of
choose statements:
choose i from A;
choose i from A minimizing D[i];
choose i from A such that gain[i] ? 0;
choose i from A such that gain[i] ? 0 maximizing D[i];
The entire state, including constants, variables, and invariants, are accessible to functions.
However, only variables and locals can be modified by assignments. Note that functions and
imperative constructs can be used in the Start and restart sections, in the specification
of the state transformation of the neighborhood, in the actions associated with specific
acceptance criteria, and in the from instructions that appear in the where clause of the
move instruction. Typical examples of functions were introduced in the models of Figures
5 and 6.
while hexpri do hstatementi
return hexpri
choose hidentifieri from hexpri [ hoptClausei
hoptClausei ::= minimizing hexpri
maximizing hexpri
::= such that hexpri [minimizing hexpri [with hletBlocki
::= such that hexpri [maximizing hexpri [with hletBlocki
Figure
10: The Syntax of Statements
3.6 Neighborhood
The neighborhood is specified in Localizer with a move instruction of the form:
move
where
from
xn from Sn
This instruction uses both declarative and procedural components. The first part of the
statement specifies, with the imperative code the transformation of the current
state into one of its neighbors. The second part starting with the where keyword
specifies the objects used in the imperative code. The modeling effort is primarily devoted
to the definition of the sets S i
and the invariants they are based on. The syntax of move
instructions is depicted in Figure 11.
Once an element of the neighborhood has been selected, Localizer determines if it is
an appropriate move. The acceptance criterion lists boolean conditions that are to be tried
in sequence. As soon as the state satisfies one of the conditions, it is accepted and the state
transformation is performed. The criterion is build according to the syntax
where
::= hidentifieri from f hexpr 1
::= hidentifieri from f hidentifieri : htypei j hselect 1
::= hidentifieri from hlvaluei [ hoptClausei
Figure
11: The Syntax of move Instructions
::= in resulting state hAcceptanceStatementi
::= in current state hAcceptanceStatementi
improvement
noDecrease
::= hAcceptanceConditioni and hAcceptanceConditioni
::= hAcceptanceConditioni or hAcceptanceConditioni
::= not hAcceptanceConditioni
Acceptance criteria are, by default, evaluated in the new state. This new state must be
constructed, which induces the update of all invariants. It is also possible to specify that
the acceptance criterion should be evaluated in the current state by using the keywords
in current state. Using the current state to evaluate moves may produce significant
improvements in efficiency.
3.7 The Objective Function
The objective function is stated in a separate section and is used to assess the "quality"
of a given state. The objective function can in fact be viewed as an invariant which is
maintained by Localizer and used to evaluate moves. Note that the objective function is
optional and is only used when the acceptance criteria are evaluated in the resulting state.
3.8 Termination Criteria
Termination is handled via several sections and depends on the nature of the problem. Each
model starts with a keyword that is either solve or optimize to specify either a decision
or an optimization problem.
The Satisfiable Section The (optional) satisfiable section is used to specify whether
a state is a solution. In decision problems, Localizer terminates whenever this is the
case. In optimization problems, Localizer updates the best solution whenever the state
is a solution which improves the best bound found so far. When the section is omitted,
Localizer assumes that every state is a solution.
The Local and Global Conditions These sections, which are optional, specify Boolean
predicates which are used to control the innermost and outermost loops of the computation
model. For instance, a simulated annealing model can use the local condition to implement
a cutOff strategy that terminates the innermost loop and drops the temperature whenever
the evaluation function has been updated sufficiently many times.
The Parameter Section This section, also optional, is used to override the default values
of some parameters of the system. Typical uses redefine the maxSearches and maxTrials
parameters of the computation model.
Implementation
This section reviews the implementation of invariants which are the cornerstone of Local-
izer. Informally speaking, invariants are implemented using a planning/execution model.
The planning phase generates a specific order for propagating the invariants, while the execution
phase actually performs the propagation. This model makes it possible to propagate
only differences between two states and mimics, to a certain extent, the way specific local
search algorithms are implemented.
The planning/execution model imposes some restrictions on the invariants. These restrictions
intuitively, makes sure that there is an order in which the invariants can be
propagated so that a pair (variable,invariant) is considered at most once. Various such
restrictions can be imposed. Static invariants can be ordered at compile time and are thus
especially efficient. However, static invariants rule out some interesting models for scheduling
and resource allocation problems. Dynamic invariants still make it possible to produce
an ordering so that a pair (variable,invariant) is considered at most once. However, dynamic
invariants require to interleave the planning and execution phases. Dynamic invariants seem
to be a good compromise between efficiency and expressiveness.
The rest of this section is organized as follows. The algorithms use normalized invariants
and Section 4.1 reviews the normalization process. Section 4.2 describes static invariants
and their implementation. This should give readers a preliminary understanding of the
implementation. Section 4.3 describes dynamic invariants and their implementation. This
section only considers arithmetic invariants but it is not difficult to generalize these results
to invariants over sets.
4.1 Normalization
The invariants of Localizer are rewritten into primitive invariants by flattening expressions
and arrays. The primitive invariants are of the form:
x := y \Phi z
where c is a constant, x; are variables, \Phi is an arithmetic operator such as
and or an arithmetic relation such as -; ? and =, and Q is an aggregate operator such as
sum, prod, max, and min. Relations return 1 when true and 0 otherwise. An invariant
assigns to x the element in position e in the list [x last invariant is useful
for arrays which are indexed by expressions containing variables.
At any given time, Localizer maintains a set of invariants I over variables V . Given an
invariant I 2 I of the form x := e (where e is an expression), def(I) denotes x while exp(I)
denotes e. Given a set of invariants I over V and x 2 V , invariants(x; I) returns the subset
of invariants fI i
' I such that x occurs in exp(I i ). The set of variables V nfdef(I)jI ' Ig
are the variables which are the parameters of the system of invariants. These variables only
can be modified in the neighborhood definitions. Note also that a variable x can be defined
by at most one invariant. i.e. there exist at most one I ' I such that
4.2 Static Invariants
The basic assumption behind Localizer implementation is that invariants only change
marginally when moving from one state to one of its neighbors. Consequently, the goal of
the implementation is to run in time proportional to the amount of changes. More precisely,
the implementation makes sure that a pair (variable; invariant) is considered at most once,
i.e., when the variable is updated, the invariant is updated but it will never be reconsidered
because of that variable.
To achieve this goal, the implementation uses a planning/execution model where the
planning phase determines an ordering for the updates and the execution phase actually
performs them. The existence of a suitable ordering is guaranteed by the restrictions imposed
on the invariants by the system. Note also that planning/execution models are often
in graphical constraint systems (e.g., [1]).
This section describes static invariants which impose a static restriction. Although
this restriction may seem strong, it accommodates many models for applications such as
satisfiability and graph coloring to name a few. The main practical limitation is that
elements of arrays cannot depend on other elements in the same array. This restriction is
lifted by dynamic invariants. Note, however, that static invariants have the nice property
that the planning phase can be entirely performed at compile time.
4.2.1 The Planning Phase
The basic idea behind static invariants is to require the existence of a topological ordering
on the variables. This topological ordering is obtained by associating a topological number
t(x) with each variable x. The topological number of an invariant I is simply t(def(I)).
The topological numbers are obtained from constraints derived from the invariants.
1 The topological constraints of invariant I are defined as follows:
Definition 2 The topological constraints of a set of invariants I denoted by tc(I) is
I2I
tc(I).
Definition 3 A set of invariants I over t is static if there exists an assignment
such that t satisfies tc(I).
The planning phase for static invariants consists of finding the topological assignment. The
planning phase can be performed at compile time since the topological constraints do not
depend on the values of the variables in a given state.
4.2.2 The Execution Phase
The execution phase is given a set of variables M which have been updated and a topological
assignment t. It then propagates the changes according to the topological ordering. The
algorithm uses a queue which contains pairs of the form hx; Ii. Intuitively, such a pair
means that invariant I must be reconsidered because variable x has been updated. The
main step of the algorithm consists of popping the pair hx; Ii with the smallest t(I) and to
propagate the change, possibly adding new elements to the queue. The algorithm is shown
in
Figure
12.
procedure execute(I,M,t)
begin
while do
endwhile
function POP(Q,t)
pre: Q is not empty
post:
Figure
12: The Execution Phase for Static Invariants
4.2.3 Propagating the Invariants
To complete the description of the implementation of static invariants, it remains to describe
how to propagate the invariants themselves. The basic idea here is to associate two values
x with each variable x. The value x represents the value of variable x at the
beginning of the execution phase, while the value x c represents the current value of x. At
the beginning of the execution phase, x of course. By keeping these two values,
it is possible to compute how much a variable has changed and to update the invariants
accordingly. For instance, the propagation of the invariant
is performed by a procedure
procedure propagate(x i ,x := sum(x 1
begin
The procedure updates x c according to the change of x i . Note that, because of the topological
has reached its final value. Note also that x c is not necessarily final after
this update, because other pairs hx may need to be propagated.
4.3 Dynamic Invariants
Static invariants are attractive since the planning phase can be performed entirely at compile
time. However, there are interesting applications in the areas of scheduling and resource
allocation where sets of invariants are not static. This section introduces dynamic invariants
to broaden the class of invariants accepted by Localizer. Dynamic invariants are updated
by a series of planning/execution phases where the planning phase takes place at execution
time.
4.3.1 Motivation
The main restriction of static invariants comes from the invariant
The static topological constraint for this invariant is
and it prevents Localizer from accepting expressions where some elements of an array
may depend on some other elements of the same array. This constraint is strong, because
the value of e is not known at compile time. In fact, it may not even be known before the
start of the execution phase since some invariants may update it.
However, there are many applications in scheduling or resource allocation where such
invariants occur naturally. For instance, a scheduling application may be modeled in terms
of an invariant
start[3] := max(end[prec[3]]; end[disj[3]]);
where start[i] represents the starting date of task i, prec[i] the predecessor of the task in
the job and disj[i], the predecessor of task i in the disjunction. Variable disj[i] is typically
updated during the local search and the above invariant is normalized into a set of the form:
start 3 := max(p; d)
Of course, such an application has also invariants of the form
implying that the resulting set of invariants is not static.
4.3.2 Overview of the Approach
The basic idea behind dynamic invariants is to evaluate the invariants by levels. Each
invariant is associated with one level and, inside one level, the invariants are static. Once a
level is completed, planning of the next level can take place using the values of the previous
levels since lower levels are never reconsidered. With this computation model in mind, the
topological constraint associated with an invariant
can be reconsidered. The basic idea is to require that e be evaluated before x (i.e. the level
of x is the level of e Once e is updated, then it is easy to find a weaker topological
constraint since the value of e is known. The invariant can be simplified to
The planning phase is thus divided in two steps. A first step, which can be carried out
at compile time, partitions the invariants in levels. The second step, which is executed at
runtime, topologically sorts the invariants within each level whenever the invariants at the
lower level have been propagated.
4.3.3 Formalization
The basic intuition is formalized in terms of two assignments l
of two sets of constraints.
Definition 4 The level constraints associated with an invariant I and denoted by lc(I) are
defined as follows:
))g
The level constraints are not strong except for the invariant element where the level of x
is strictly greater than the level of e. Informally, it means that e must be evaluated in an
earlier phase than x.
Definition 5 The level constraints associated with a set of invariants I and denoted by
l(I) is simply S
I2I
Definition 6 A set of invariants I is serializable if there exists an assignment l
satisfying lc(I).
A serializable set of invariants can be partitioned into a sequence ! I
the invariants in I i have level i. This serialization can be performed at compile-time. The
second step consists of ordering the invariants inside each partition. This ordering can only
take place at runtime, since it is necessary to know the values of some invariants to simplify
the element invariants.
Definition 7 Let S be a computation state and let S(x) denote the value of x in S. The
static constraints associated with an invariant I wrt to S, denoted sd(I ; S) is defined as
follows:
Definition 8 The static constraints associated with a set of invariants I wrt to a state S,
denoted by sd(I; S) is simply S
I2I
Definition 9 A set of invariants I is static wrt to a state S if there exists an assignment
The main novelty of course is in the invariant element where the topological constraint
can ignore e since its value is known. In addition, since the final value of e is known, the
topological constraints can be made precise since the element y e c that x depends upon is
known.
be a computation state. A set of invariants I is dynamic wrt S 0 if
1. I is serializable and can be partitioned into a sequence ! I
2. I i is static wrt S i where S i (i ? 0) is the state obtained by propagating the invariants
I i\Gamma1 in S i\Gamma1 .
Of course, dynamic invariants cannot be recognized at compile-time and may produce an
execution error at runtime when Localizer is planning a level.
4.3.4 The Execution Algorithm
The new execution algorithm is a simple generalization of the static algorithm and is shown
in
Figure
13. Note the planning step which is called for each level.
procedure execute(I,M)
begin
do
endfor
Figure
13: The Execution Algorithm for Dynamic Invariants
5 Experimental results
This section summarizes some preliminary results on the implementation of Localizer
(about 35,000 lines of C++). The goal is not to report the final word on the implementation
but rather to suggest that Localizer can be implemented with an efficiency comparable
to specific local search algorithms. To demonstrate practicability, we experimented with
Localizer on several problems: GSAT, graph coloring, graph partitioning, and job-shop
scheduling.
5.1 GSAT
GSAT is generally recognized as a fast and very well implemented system. The experimental
results were carried out as specified in [8]. Table 1 gives the number of variables (V ), the
number of clauses (C), and MaxTrials (I) for each size of benchmarks as well as the CPU
times in seconds of Localizer (L), the CPU times in seconds of GSAT (G) as reported
in [8], and the ratio L=G. The times of GSAT are given on a SGI Challenge with a 70
MHz MIPS R4400 processor. The times of Localizer were obtained on a SUN SPARC-
scaled by a factor 1.5 to account for the speed difference between the two
machines. Localizer times are for the incremental model presented in Section 2. Note
that this comparison is not perfect (e.g., the randomization may be different) but it is
sufficient for showing that Localizer can be implemented efficiently.
5.2 Graph Coloring
Graph coloring was the object of an extensive experimental evaluation in [4] and this section
reports on experimental results along the same lines. The experiments were conducted on
graphs of densities 10, 50, and 90 and of sizes 125, 250, and 500. They were also conducted on
so-called "cooked" graphs. Because of the nature of the experimental results reported in [4],
it is not easy to compare the efficiency of Localizer to the efficiency of their algorithm. As
a consequence, a very efficient C implementation of their algorithm was built from scratch
by a graduate student who was closely supervised to obtain a very efficient incremental
algorithm. As far as we can judge, the timings and the quality of this algorithm seem
5 200 860 2000 873.11 168.00 5.20
Av. 3.38
Table
1: GSAT: Experimental Results
consistent with those in [4]. In addition, this algorithm is the most efficient implementation
built by a graduate student in the combinatorial optimization class at Brown (CS-258)
in the last three years (for the given model of course). In the following, we discuss the
development time of the two implementations, the quality of the solutions obtained (to
make sure that the algorithms are comparable in quality), and the efficiency.
Development Time The C implementation of the algorithm is about 1500 lines long
and required a full week. The Localizer model is about one page long.
Quality of the Solutions Table 2 describes the quality of the coloring found by Lo-
calizer. These results agree with those of the C implementation and with those reported
in [4]. Each set of rows corresponds to a class of graphs and to 100 executions of Localizer
on graphs from this class. The rows in each set report on the various values found
by Localizer on these graphs and their frequencies. The columns report the number of
vertices, the density of the graph, the size factor sf used in the experiments, the number of
colors found by some solution, and the frequency of colorings of this quality. For instance,
the first set of rows reports that, on graphs of 125 vertices and density of 50%, 92% of the
executions led to a coloring with 19 colors and 8% of the executions led to a coloring with
colors. The results are given both for random and cooked graphs and the frequencies
are similar for both Localizer and the C implementation.
Efficiency Table 3 compares the efficiency of Localizer with the C implementation on
the same problems. Each row reports the average time of the two implementations for the
100 graphs in each class and computes the slowdown of Localizer. The experiments were
performed on a SUN Sparc Ultra-1 running Solaris 5.5.1 and the standard C++ compiler.
The average slowdown is 4.82, while minimum and maximum slowdowns are respectively
3.56 and 5.54. On these problems, the average slowdown is slightly higher than a machine
generation but it remains reasonable given the preliminary nature of the implementation.
This slowdown should also be contrasted with the substantial reduction in development
time.
Vertices Density Size Factor (sf) Colors Frequency
random 125 50 3 19 92
random 250 50 4
43
34 44
random 500 50 4
random 125 90 1 - 44 7
random
random 500 90 1 - 143
144 22
cooked 125 4 9 100
cooked
cooked 500 2 25 71
Table
2: Graph Coloring: Quality of the Solutions
Vertices Density Size Factor (sf) Localizer (L) C Implementation (C) L/C
random 125 50 3 78.3 18.9 4.50
random 250 50 4 82.8 18.4 4.50
random 500 50 4 633.7 123.4 5.10
random 125 90 1 16.18 4.53 3.56
random
random 500 90 1 162.7 29.6 4.88
cooked 125 4 22.09 4.18 5.28
cooked
cooked 500 2 240.3 49.9 4.80
average 4.82
Table
3: Graph Coloring: Efficiency of Localizer
5.3 Graph Partitioning
The problem has been studied experimentally in [3] and, once again, the experiments reported
here are based on a similar setting. Table 4 depicts the experimental results of
Localizer. The first row gives the setting of our parameters: T is the starting tempera-
ture, TF is the percentage of reduction of the temperature, SF is the size factor and the
remaining two were described previously.
Table
5 compares Localizer with the results reported in [3].
5.4 Job-Shop Scheduling
To conclude, we report some preliminary results on job-shop scheduling. Localizer has
been evaluated on a set of 28 classic benchmarks. The model used for these experiment
implements the neighborhood, commonly referred to as N1, which considers the reversal of
exactly one edge on the critical path. N1 has a number of nice properties: It preserves the
satisfiability of the solution and the transition graph induced by the neighorhood is such
that the optimal solution is reachable from all nodes of the graph. The experiments were
conducted in a fashion similar to what is reported in [6]. The parameters were defined as
ffl The maximal number of searches (maxSearches) is 1
ffl The maximal number of iterations for the inner loop (maxTrials) is 12000.
ffl The tabu list has a varying length constrained in between 5 and 30. Moreover, the
length is varied according to the rule of [6].
ffl Contrary to [6], the model does not use a restarting strategy.
Graph Results
Class V ertices Density SB F req: Localizer
random 124 2 11-13 14-16 17-19 33 38 29 2.22
random 4 55-59 60-65 66-77
random 8 159-174 175-190 191- 23 53 24 3.24
random
random
random 2 92-106 107-121 122-131 12 42 36 5.10
random 4 324-343 344-363 364-380 38 43 19 6.50
random 8 828-877 878-927 928- 37 40 23 9.98
random 500 0.5 48-54 55-59 60-66 15 43 42 10.08
random 4 1661-1701 1702-1741 1742-1824 22 58 20 20.67
random 1000 0.25 90-103 104-118 119-126 41 52 7 19.99
random 0.5 439-455 456-475 476-503 36 43 21 22.62
geom. 500 5 4-13 14-23 24-37 7 58
geom. 20 148-246 247-346 347-450 41 44 15 11.40
geom. 1000 5 24-43 44-63 64-78 37 57 6 18.70
geom. 20 196-399 400-599 600-816
28
Table
4: Graph Partitioning: Experimental Results
Graph Results
Class V ertices Density L:Best L:Time J:Best J:T ime Ratio
random 124 2 11 2.22 13 85.4 38.5
random
random 500 0.5 47 10.08 52 379.8 37.7
random 1000 0.25 90 19.99 102 729.9 36.5
Table
5: Graph Partitioning: Comparison Results
Table
6 reports the preliminary results. These results cannot be really compared with
the results of [6], since the neighborhood used in their experiment is (RN1 [ RN2) while
the model used here relies on N1 alone. The time reported correspond to the algorithm
termination (once the 12000 iterations are spent), not the time required to produce the
best or the optimal solution for the first time. Note also that the the value of the optimal
solution was not used as a stopping criterion. If this condition was to be used, the running
time would vary a lot more. For instance, LA01 usually produce the optimum solution in
about 0:5 seconds. Interestingly enough, even the simple neighborhood N1 does quite well
and finds the optimum solution for benchmarks (out of 28 benchmarks). The table also
reports a coarse histogram that summarizes the frequencies of apparition for the solutions.
These frequencies were obtained based on a serie of 100 experiment for each benchmark.
In summary, the results seem to indicate that Localizer will also compare well on
scheduling application.
6 Conclusion
The main contribution of this paper is to show that local search can be supported by modeling
languages to shorten the development time of these algorithms substantially, while
preserving the efficiency of special-purpose algorithms. To substantiate this claim, we presented
a progress report on the domain-specific language Localizer, introduced in [5].
Localizer statements are organized around the traditional concepts of local search and
may exploit the special structure of the problem at hand. The main conceptual tool underly-
Benchmark Results (MD=12000,MS=1,Neighborhood=N1)
Name Job M: Opt Ranges F req: Loc Avg:sol:
Table
ing Localizer is the concept of invariants which make it possible to specify complex data
structures declaratively. These data structures are maintained incrementally by Local-
izer, automating one of the most tedious and error-prone parts of local search algorithms.
Experimental results indicate that Localizer can be implemented to run with an efficiency
comparable to specific implementations.
Our current research focuses on building higher-level data structures to simplify the
design of invariants which are the cornerstone of the language. Extending the strategies to
accommodate dynamic k-opt [7], genetic algorithms, constraint techniques are also contem-
plated. Longer term research will explore how Localizer can be turned into a programming
language library to guarantee extensibility and wide applicability for expert users,
while preserving the right level of abstraction.
Acknowledgments
This paper is dedicated to the memory of Paris C. Kanellakis who
kept on gently pressuring us to pursue this topic. Thanks to D. McAllester and B. Selman for
many discussions on this research and to Costas Bush for implementing the graph-coloring
algorithm in C. This research was supported in part by an NSF NYI Award.
--R
The Programming Language Aspects of ThingLab
AMPL: A Modeling Language for Mathematical Programming.
Optimization by Simulated Annealing: An Experimental Evaluation
Optimization by Simulated Annealing: An Experimental Evaluation
Modeling Language for Local Search.
Marco Trubian Mauro Dell'Amico.
Combinatorial Optimization: Algorithms and Complexity.
A New Method for Solving Hard Satisfiability Problems.
Models for Using Stochastic Constraint Solvers in Constraint Logic Programming.
Numerica: a Modeling Language for Global Optimization.
--TR
--CTR
Simon de Givry , Laurent Jeannin, A unified framework for partial and hybrid search methods in constraint programming, Computers and Operations Research, v.33 n.10, p.2805-2833, October 2006
Pascal Hentenryck , Laurent Michel , Liyuan Liu, Contraint-Based Combinators for Local Search, Constraints, v.10 n.4, p.363-384, October 2005
Irit Katriel , Laurent Michel , Pascal Hentenryck, Maintaining Longest Paths Incrementally, Constraints, v.10 n.2, p.159-183, April 2005
Pascal Hentenryck , Laurent Michel, Control Abstractions for Local Search, Constraints, v.10 n.2, p.137-157, April 2005
Laurent Michel , Pascal Van Hentenryck, A constraint-based architecture for local search, ACM SIGPLAN Notices, v.37 n.11, November 2002
Marco Cadoli , Toni Mancini, Combining relational algebra, SQL, constraint modelling, and local search, Theory and Practice of Logic Programming, v.7 n.1-2, p.37-65, January 2007
Laurent Michel , Pascal Van Hentenryck, Comet in context, Proceedings of the Paris C. Kanellakis memorial workshop on Principles of computing & knowledge: Paris C. Kanellakis memorial workshop on the occasion of his 50th birthday, p.95-107, June 08-08, 2003, San Diego, California, USA | incremental algorithms;modeling language;local search |
593313 | Ordering Constraints over Feature Trees. | Feature trees are the formal basis for algorithms manipulating record like structures in constraint programming, computational linguistics and in concrete applications like software configuration management. Feature trees model records, and constraints over feature trees yield extensible and modular record descriptions. We introduce the constraint system FEAT of ordering constraints interpreted over feature trees. Under the view that feature trees the relation \leq corresponds to the information ordering (carries less information than). We present two algorithms in cubic time, one for the satisfiability problem and one for the entailment problem of FEAT. We show that FEAT has the independence property. We are thus able to handle negative conjuncts via entailment and obtain a cubic algorithm that decides the satisfiability of conjunctions of positive and negated ordering constraints over feature trees. Furthermore, we reduce the satisfiability problem of Drres weak subsumption constraints to the satisfiability problem of FEAT and improve the complexity bound for solving weak subsumption constraints from O(n^5) to O(n^3). | Introduction
Feature constraints have been used for describing records in constraint programming
[2, 24, 23] and record like structures in computational linguistics [13, 12, 20, 18, 19].
Following [3, 5, 4] we consider feature constraints as predicate logic formulae that are
interpreted in the structure of feature trees.
A feature tree is a possibly infinite tree with unordered labeled edges and with possibly
labeled nodes. Edge labels are functional; i.e., the labels of the edges departing
from the same node must be pairwise different. Under the view that feature trees represent
symbolic information, the feature tree t 1 represents less information than the feature
tree t 2 if t 1 has fewer edges and node
labels than t 2 . The relation - that we define
corresponds to the information ordering
in precisely this sense. Algebraically,
there is a homomorphic embed-
wine
red
color -
wine
red 1997
color year
ding from t 1 to t 2 (i.e., a mapping from nodes in t 1 to nodes in t 2 under which the node
labeling is invariant). An example is given in the picture.
We introduce the constraint system FT- of information ordering constraints over feature
trees. The system FT- is obtained by adding ordering constraints to the constraint
system FT [3]. The syntax of FT- constraints j is defined by
where x and x 0 are variables and a is a label. The semantics of FT- is given by the
interpretation over feature trees where the symbol - is interpreted as information ordering
on feature trees. The semantics of x[a]y and a(x) are defined as in FT . For in-
stance, both trees depicted above are possible values for x in solutions of the constraint
It is clear that FT- is more expressive than FT since the information ordering is antisymmetric
(i.e., As we show in the paper, FT- is
strictly more expressive than FT . For instance, no constraint in FT can be equivalent to
x-x 0 . Also, we do not know of any formula over FT (even with existential quantifiers)
equivalent to 9x(x 1 -x- x 2 -x)-9x(x 1 -x- x 3 -x); this FT- formula expresses that x 1
is unifiable with both x 2 and x 3 (but does not imply unifiability of x 2 and x 3 ).
We show that the satisfiability problem of conjunctions of positive and negative FT-
constraints j-:j 1 -:j n is decidable in O(n 3 ). This result includes a decision
procedure for the entailment problem of the form j 0
if and only if the formula j 0 -:j is unsatisfiable. To establish our result, we prove that
FT- has the fundamental independence property (similar to its relatives RT [6], FT [3],
and CFT [24]).
We reduce the satisfiability problem of D-orre's weak-subsumption constraints [7] over
feature algebras linearly to the one in FT- . Thereby, our algorithm improves on the best
known satisfiability test for weak subsumption constraints which uses finite automata
techniques and has an O(n 5 )-complexity bound [7].
Plan of the Paper. Section 2 surveys related work. Section 3 defines FT- . Section 4
presents the satisfiability test for FT- constraints. Section 8 contains the completeness
proof. Section 5 presents the entailment test for FT- constraints, and proves the independence
property of FT- . Section 6 defines weak subsumption constraints and reduces
their satisfiability problem to the one of FT- constraints. Section 7 shows that FT- is
strictly more expressive than FT .
Related Work
Ines Constraints. In previous work [17], we have introduced the constraint system
INES of inclusion constraints over non-empty sets of trees and a cubic satisfiability test.
The satisfiability test for FT- is inspired by and subsumes the one for INES. However, the
entailment problems for FT- and INES constraints are different. The entailment problem
of INES constraints is coNP-hard [16]. Intuitively, the entailment problem of FT- is less
expressive than the one of INES because an FT- constraint j cannot uniquely describe a
single feature tree (in absence of arity constraints); in contrast, INES constraints (which
are inclusions between first-order terms with an implicit arity restriction) can uniquely
describe a constructor tree as a singleton set. For instance, the INES constraint x'a
describes the singleton fag. As a consequence, the entailment proposition x'a-a'y
x'y holds in INES. No similar entailment phenomenon exists for FT- .
Feature Constraints. The constraint system CFT [24] extends FT by arity constraints
of the form xf f saying that the denotation of x has subtrees exactly at the features
rational tree constraint system RT [6]
but provides finer-grained constraints. The system EF [25] extends CFT by feature
constraints x[y]z, providing for first-class features. Complete axiomatizations for FT
and CFT have been given in [5] and [4], respectively. The satisfiability of EF constraints
is shown NP-hard in [25]. The system FT- (sort) extends FT- by allowing a
partial order on labels [15].
Subsumption Constraints. Subsumption is an ordering on the domain of feature alge-
bras. Subsumption constraints have been considered in the context of unification-based
grammars to model coordination phenomena in natural language [9, 7, 21]. There, one
wants to express that two feature structures representing different parts of speech share
common properties. For example, the analysis of "programming" and "linguistics" in
the phrase
Feature constraints for [ NP programming] and [ NP linguistics]
should share (but might refine differently) the information common to all noun phrases.
Since the satisfiability of subsumption constraints is undecidable [9], D-orre proposed
subsumption as an decidable approximation of subsumption. As we show, the
information ordering over feature trees (as investigated in this paper) coincides with the
subsumption ordering interpreted over (the algebra of) feature trees.
Independent Constraint Systems. A constraint system has the fundamental independence
property if negated conjuncts are independent from each other, or: its constraints
cannot express disjunctions (we will give a formal definition later). Apart from the mentioned
tree constraint systems RT , FT , CFT [6, 1, 24, 3], constraint systems with the
independence property include linear equations over the real numbers [14], or infinite
boolean algebras with positive constraints [10].
3 Syntax and Semantics of FT-
The constraint system FT- is defined by a set of constraints together with an interpretation
over feature trees. We assume an infinite set of variables ranged over by x;y;z,
and an infinite set L of labels ranged over by a;b.
Feature Trees. A path p is a finite sequence of labels. The empty path is denoted by e
and the free-monoid concatenation of paths p and p 0 as pp 0 ; we have
Given paths p and q, p 0 is called a prefix of p if
domain is a non-empty prefix closed set of paths. A feature tree t is a pair (D; L)
consisting of a tree domain D and partial labeling function L : D * L . Given a feature
tree t, we write D t for its tree domain and L t for its labeling function. The set of all
feature trees is denoted by F . A feature tree is called finite if its tree domain is finite,
and infinite otherwise.
Syntax. An FT- constraint j is defined by the following abstract syntax.
An FT- constraint is a conjunction of basic constraints which are either inclusion
constraints x-y, labeling constraints a(x), selection constraints x[a]y, or compatibility
constraints x-y. Compatibility constraints are needed in our algorithm and can be
expressed by first-order formulae over inclusion constraints (see Proposition 1). We
identify to associativity and commutativity of conjunction, i.e.,
we view j as a multiset of inclusion, labeling, selection, and compatibility constraints.
We write j in j 0 if all conjuncts in j are contained in j 0 . The size of a constraint j is
defined as the number of label and variable occurrences in j.
Semantics. We next define the structure F over feature trees in which we interpret
constraints. The signature of F contains the binary relation symbols - and - and
for every label a a unary relation symbol a() and a binary relation symbol [a]. In F
these relation symbols are interpreted
is a partial function (on D t 1
Let F denote first-order formulae built from FT- constraints with the usual first order
connectives. We call F satisfiable (valid) if F is satisfiable (valid) in the structure F .
We say that F entails F 0 , written F is valid, and that F is equivalent
to F 0 if F 1 $F 2 is valid. We denote with V (F) the set of variables occurring free in F
and with L(F) the set of labels occurring in F.
Proposition 1. The formulae x-y and 9z(x-z- y-z) are equivalent in F .
Proof. Let s be a variable assignment into F which also is a solution of the formula
9z(x-z- y-z). Since L s(x) [L s(y) ' L s(z) and L s(z) is a partial function, L s(x) [L s(y) is
also a partial function. Hence s is a solution of x-y. Conversely, if s is a solution of x-y
then L s(x) [L s(y) is a partial function. Thus, the pair
is a feature tree and the variable assignment s 0 defined by s 0
for x 6= z is a solution of x-z- y-z. 2
4 Satisfiability Test
We present a set of axioms valid for FT- and then interpret these axioms as an algorithm
that solves the satisfiability problem of FT- . The axioms and the algorithm are inspired
by the ones for INES constraints presented in [17].
Table
contains five axiom schemes F1 - F5 that we regard as sets of axioms. The
union of these sets of axioms is denoted by F, i.e., For instance, an
axiom scheme x-x represents the infinite set of axioms obtained by instantiation of the
meta variable x. An axiom is either a constraint j, an implication between constraints
or an implication
Proposition 2. The structure F is a model of the axioms in F.
F1 x-x and x-y- y-z ! x-z
false for a 6= b
Table
1. Satisfiability of FT- Constraints.
Proof. By a routine check. For illustration, we prove the statement for the second rule
in F3, namely x-y- y-y . The following implications hold:
The Algorithm F. The set of axioms F induces a fixed point algorithm F that, given an
input constraint j, iteratively adds logical consequences of F [fjg to j. (Observe that
actually only constraints of the form x-y and x-y are derived). More precisely, in every
step F inputs a constraint j and terminates with false or outputs a constraint
Termination with false takes place if there exists j 00 in j such that j 00 ! false 2 F.
Output of j-j 0 is possible if j 0 2 F or there exists j 00 in j with
Example 1. Inconsistency can be due to incompatible upper bounds. Consider:
false for a 6= b
We may add x-z by F3:1, then z-x via F3:3, then y-x with F3:2, and finally terminate
with false via F5.
Example 2. We need F4 for deriving the unsatisfiability of the constraint:
Algorithm F may add x-y after several steps as shown in Example 1. Then it may
proceed with x-y 0 via F4 and terminate with false via F5.
Termination. The fixed point algorithm F terminates when reflexivity of inclusion
x-x is restricted to variables x 2 V (j). Given a subset F of F, a constraint j is
called F-closed if algorithm F under this restriction and w.r.t. the axioms in F cannot
proceed on j. Note that false is not F-closed since it is not a constraint by definition.
Example 3. Our control takes care of termination in presence of cycles like x[a]x. For
instance, the following constraint is F-closed.
In particular, F2 and F4 do not loop through the cycle x[a]x infinitely often. This example
also illustrates why the fixed point algorithm would not be terminating if based in
the axiom x[a]x
Proposition 3. If j is a constraint with m variables then algorithm F with input j
terminates under the above control in at most 2
Proof. Since F does not introduce new variables, it may add at most m 2 non-disjointness
constraints x-y and m 2 inclusions x-y. 2
Proposition 4. Every F-closed constraint j is satisfiable over FT- .
Proof. See Section 8. 2
Theorem 5. The satisfiability of FT- constraints can be decided in time O(n 3 ) (offline
and online;see [11]) where n is the constraint size.
Proof. Proposition 2 shows that j is unsatisfiable if F started with j terminates with
false. Proposition 4 proves that j is satisfiable if F started with j terminates with a
constraint. Since F terminates for all input constraints under the above control (Prop.
this yields a effective decision procedure. The main idea of the complexity proof is
that one needs at most O(n 2 ) steps (Prop. 3) each of which can be implemented in
time O(n). The implementation can be organized incrementally by exploiting that algorithm
F leaves the order unspecified in which the axioms are applied. Hence, we obtain
that off-line and on-line complexity are the same. The implementation details and the
complexity proof are omitted here, since they are similar to those presented in [17]. 2
5 Entailment, Independence, Negation
In this section, we give a cubic algorithm testing entailment j 0
We then prove the independence property of FT- . Hence we can solve
conjunctions of positive and negative FT-constraints j-:j
A basic constraint - is a conjunction free constraint j, i.e., given by the following
abstract syntax:
The entailment j 0 is equivalent to the fact that the entailment j j=- holds for all
basic constraints - in j.
Next we characterize entailment problems j 0 syntactically. We say that a constraint
syntactically contains -, written j ' -, if one of the following holds:
exist x 0 , y 0 such that x 0 [a]y 0 in j;
We say that a first-order formula F syntactically contains -, F ' -, if
some j and F 0 such that j ' -.
Lemma 6. Given a F-closed constraint j, we can compute a representation of j in
linear time that allows to test syntactic containment j ' - for all - in time O(1).
Proof. Simple. 2
It is easy to see that syntactic containment is semantically correct, i.e., j ' - implies
-. For deciding entailment, we have to show that our notion of syntactic containment
is semantically complete, i.e., if j 6' - then j 6j= - (Proposition 13). The idea is to
construct a satisfiable extension of j (its saturation) which syntactically and simultaneously
contradicts all - not syntactically contained by j (Lemma 12).
Saturation is defined in terms of two operators G 1 and G 2 on constraints. The operator G 2
is such that G 2 (j) contradicts all - of the form x-y, x-y, and a(x) (i.e., no selection
constraints) which are not syntactically contained in j (Lemma 10). The operator G 1
serves for contradicting selection constraints. For instance, consider j
y-y. In this case, G 1 (j) enforces the existence of the feature a in the denotation
of x by adding to j the constraint x[a]v xa for a fresh variable v xa . Now G 2 (G 1 (j))
is such that it contradicts either y-v xa or v xa -y. (see Example 4). In this sense, G 1 is a
"preprocessor" for G 2 .
Definition 7. Let j be a constraint, v 1 and v 2 distinct fresh variables, and l 1 and l 2
distinct labels. Furthermore, for every pair of variables x; y 2 V (j), and label every
label a 2 L(j) let l x and l xy be fresh labels and v xa a fresh variable. We define G 1 (j)
and G 2 (j) in dependence of
Example 4. Consider the constraint which is F-closed up to trivial
constraints and which does not entail x[a]y. In order to contradict x[a]y we compute
the F-closure of G 1 (j 0 ) which is G 0
v xa -x-x-v xa -y-v xa and observe that it does not v xa -y. By definition of G 2 , G 2 (G 0
contradicts v xa -y. Hence, G 2 (G 0
x[a]y.
Lemma 8. Let j be an F-closed (and hence satisfiable) constraint. Then G 1 (j) is satisfiable
and its F closure G 0
satisfies the following two properties for all basic constraints
-:
1. If j 6' - and V (-) 'V (j), then G 0
2. If j 6' x[a]y then G 0
Proof. The F-closure G 0
1 (j) of G 1 (j) has the following form up-to trivial constraints
and symmetry of compatibility constraints.
exist
exist
exist
instance note that v xa -x 0 - x 0 -v xa in G 0
by clauses (4.2, 4.3) and
reflexivity). All constraints in G 0
either belong to G 1 (j) or a derived from it by
axioms in F. The F-closedness of G 0
1 (j) can be proved by a somewhat tedious case
distinction. The same holds for the two additional properties of G 0
Lemma 9. If j is F-closed then G 2 (j) is satisfiable.
Proof. It is not difficult to show that the constraint part of G 2 (j) is F-closed up to
trivial constraints (x-x and x-x) and symmetric compatibility constraints. The critical
bit is to check that the negated selection constraints added in clause (1) of G 2 (j) are
consistent. Let :9y 0 (y[l x ]y 0 ) in G 2 (j). We must show that G 2 (j) 6j= 9y 0 (y[l x ]y 0 ). Assume
the converse, G 2 (j) by Corollary 27 in Section 8, there exist z and
z 0 such that G 0
By definition of G 2 (j) we know that z = x. However,
(by definition of G 2 clause (1) does not apply.
Thus :9y 0 (y[l x ]y 0 ) cannot be contained in G 2 (j), in contradiction to our assumption. 2
Lemma 10. Let j be an FT-constraint and let - be a basic constraint of the form x-y,
x-y, or a(x) (i.e., not a selection constraint). Then G 2 (j)
Proof. By inspection of the definition of G 2 (j). Clause (1) contradicts entailment of
x-y by j by forcing x to have a feature l x which y must not have. Clause (2) contradicts
x-y by forcing x and y to have a common feature l xy such that the subtrees of x and y
at l xy are incompatible. Clause (3) contradicts a(x) for any label by forcing x to be
unlabeled (i.e., compatible with at least two trees with distinct label). 2
Definition 11 Saturation. Let j be an F-closed constraint and G 0
1 (j) the F-closure of
exists according to Lemma 8. The saturation of j is the formula Sat(j)
given by
Lemma 12. Let j be an F-closed constraint For all - such that V (-) ' V (j), j 6' -
implies
Proof. Let G 0
1 (j) the F-closure of G 1 (j) such that
- is not a selection constraint, then G 2 (G 0
by Lemma 10. Otherwise, let
Lemma 8.2. By Lemma 10, either G 2 (G 0
holds.
In both cases, G 2 (G 0
Proposition 13. The notions of entailment and of syntactic containment coincide for
basic constraints: If j is F-closed and - a basic constraint then j
Proof. We assume j (The converse is correctness of syntactic con-
tainment.) If V (-) 6' V (j) then - is of the form x-x or x-x such that j ' -. Otherwise,
since Sat(j) contains j. Moreover, Sat(j) is
satisfiable (Lemmas 8 and 9) such that Sat(j) 6j= :-. Hence, j ' - by Lemma 12. 2
Theorem 14 Entailment. Entailment problems of the form j 0 can be tested in
cubic time.
Proof. Let n be the size of j 0 -j. To decide j 0 first test whether j 0 is satisfiable.
By Theorem 5 this can be done by computing the F-closure -
this test fails then the entailment test is trivial. Otherwise, from Lemma 12 we obtain
and hence that -
j. There are O(n) such -
and -
0 is of size O(n 2 ), hence, by Lemma 6, this is decidable in time O(n). The overall
complexity sums up to O(n 3
Theorem 15 Independence. The constraint system FT- has the independence prop-
erty; i.e., for every n - 1 and constraints j;j
Proof. Assume
unsatisfiable we are done. Also, if
satisfiable for some j, then j
is. Now let j and j-j i be
satisfiable for all i and let j be F-closed (wlog. by Prop. 2). If there exists i with
for all - syntactically contained by j i , then j and we are done. Otherwise, for all i
there exists - i such that j 6' - i . Lemma 12 yields Sat(j)
satisfiable (Lemma 8) and entails j, this contradicts our assumption that j
Corollary Negation. The satisfiability of conjunctions of positive and negative FT-
constraints j-:j 1 -:j k can be tested in time O(n 3 ) where n is the size of the
given conjunction.
Proof. If j is non-satisfiable then j- n
trivially non-satisfiable. By Proposition
5, satisfiability of j is decidable in time O(n 3 ). Now assume j to be satisfiable. By
the Independence Theorem 15, j- n
nonsatisfiable if and only if j
some i. By Lemma 12 this is equivalent to the existence of i such that for all - if
-. Overall, there are O(n 2 ) candidates - to be tested for syntactic containment
and O(n) possible can be tested in time O(1) such that the total
complexity sums up to time O(n 3
6 Weak Subsumption Constraints
We next introduce weak subsumption constraints that are used in computational linguistics
We show that their satisfiability problem is subsumed by the one for FT- .
Syntax. We assume given a set C of constants c and a set D of features d. We consider
the set of labels subsumption constraint h is a FT- constraint of
the following form.
Note that compatibility constraints do not occur in [7]. We add them here to simplify
our comparison.
Semantics. We interpret weak subsumption constraints over the whole class of feature
algebras with the induced weak subsumption ordering, which we will define below.
A feature algebra A over C and D consists of a set dom A that is called the domain of A ,
a unary relation c() A on dom A for every constant c 2 C , and a binary relation [d] A on
dom A for every feature d 2 D, which satisfy the following properties for all a;a 0 ; a 00 2
dom A , constants c; c
1: if a[d] A a 0 and a[d] A a 00 then a
2: if c 1 (a) A and c 2 (a) A then c
In the literature [22, 7] a slightly different notion of feature algebras with constants has
been considered. We will give a formal comparison between the two notions at the end
of the present section.
Proposition 17. The structure F over L is a feature algebra over C and D.
Proof. The above properties follow from the axioms in F and the antisymmetry of the
information ordering in FT- (x-y- y-x ! x=y). 2
Given a feature algebra A , we define the weak subsumption ordering - A as follows. A
simulation for A is a binary relation D on the domain of A that satisfies the following
properties for all elements a 1 , a 2 , a 0
2 of A's domain:
1: if a 1
2: if a 1 Da 2 ; a 1 [d] A a 0
2 then a 0
subsumption ordering - A of A is the greatest simulation relation for A . The
subsumption relation on A induces a compatibility relation - A :
exists a such that a 1 - A a and a 2 - A a
A feature algebra A induces a structure with the same signature as F , in which - is
interpreted as weak subsumption ordering - A , - as - A , c() as c() A , and [d] as [d] A .
Proposition [8]. The structure F coincides with the structure induced by the
feature algebra defined by F .
Proof. It is sufficient to prove that the weak subsumption relation of the feature algebra
defined by F coincides with the information ordering on F . The proof in the case for
feature algebras with constants can be found in [8] on page 24 (Satz 6 and Satz 7).
There the algebra of feature trees has been called algebra of path functions. A direct
proof (additional 5 lines) is omitted for lack of space. 2
Theorem 19. A weak subsumption constraint h is satisfiable (over F ) if and only if h
is satisfiable over the structure induced by some feature algebra A .
Proof. If h is satisfiable then it is satisfiable over the structure induced by the feature
algebra defined by F . Conversely, every structure induced by a feature algebra is a
model of the axioms in F. Thus, if h is satisfiable over one such structure then it is
equivalent to an F-closed constraint (and not false) and hence satisfiable over F . 2
Alternative Notions of Feature Algebras. In the literature [22, 7] a restricted notion
of feature algebra has been considered that we call feature algebra with constants in the
sequel. The focus on feature algebras with constants leads to a restricted satisfiability
problem. This shows that the presented results properly extend the results in [7].
A feature algebra with constants is a feature algebra with the additional property that
if c(a) A then not a[d] A a 0 (1)
In order to handle the new property we consider the following mapping of weak subsumption
constraints over C and D to weak subsumption constraints over C [ flabelg
and D where label is a new constant not contained in C .
Proposition 20. A constraint h is satisfiable in some feature algebra if and only if [
is satisfiable in some feature algebra with constants.
Proof. If [
is satisfiable over a feature algebra A with constants C and features D [
flabelg then h is satisfiable over the feature algebra F with labels C [D. Given a
solution s 0 of [
over A a solution s of h over F can be defined as follows:
exists a in domain of A : s 0 (x)[p] A a and p 2 D g
exists a in domain of A : s 0 (x)[plabel] A a and c(a) A g
Conversely, let h be satisfiable in a feature algebra A . Then h is satisfiable in F by
Theorem 19. We consider the following feature algebra with constants F and show
that [
is satisfiable over F . The constants and features of F are C and D[flabelg,
respectively. The domain of F contains all feature trees t without labeled internal
nodes where a labeled internal node of t is a path p such that p 2 D t , exists c with
not exists d with pd 2 D t . The selection and labeling relations of F
are those of FT- restricted to trees without internal labels. Obviously, F satisfies all
three axioms of a feature algebra with constants. Now let s be an A-solution of h. Then
the variable assignment s 0 mapping x on s 0 (x) as given below is an F -solution of [
exists a
7 Expressiveness
We show that FT- is strictly more expressive than FT but that FT- cannot express an
constraint. An FT constraint h is of the form x=y, a(x), x[a]y, or h-h 0 , and an
arity constraint of the form xfa g. An arity constraint xfa holds if x
denotes a tree with subtrees at exactly a 1 through a n .
Proposition 21. There is no FT- constraint which expresses that a variable x denotes
the empty feature tree, i.e., if a 6= b then there is no constraint equivalent to
Proof. If j were such a FT- constraint, then j as well as its finite F-closure would
entail x-y for all variables y. This contradicts Proposition 13 for all those y such that
(j)). Such a variable y
exists since V (j) is finite. 2
Lemma 22. Let h be an FT constraint. Then h
Proof. The FT constraint h is equivalent to the FT- constraint j obtained from h by
replacing all equalities x=y by inequalities x-y- y-x. Hence, x-y in j iff y-x in j,
and since algorithm F preserves this invariant it also holds for the F-closure of j. The
claim follows from Proposition 13. 2
Proposition 23. If x 6= y then there is no FT constraint h equivalent to x-y.
Proof. This follows immediately from Lemma 22 and Proposition 13. 2
8 Completeness of the Satisfiability Test
Proposition 4. Every F-closed constraint j is satisfiable over FT- .
The proof is based on the notion of path reachability and covers the rest of the sec-
tion. We proceed as follows. We first define path reachability, then give two Lemmas,
and finally compose the proof of Proposition 4 from these Lemmas.
For all paths p and constraint j, we define a binary relation j
"y is reachable from x over path p in j":
a y if x[a]y in j;
a meaning that "a can be reached from x over path p in j":
For example, if j is the constraint x-y - a(y) - x[a]u - x[b]z - z[a]x - b(z) then the
following reachability propositions hold: y j
y, x j
as x j
Definition 24 Path Consistency. We call a constraint j path consistent if the following
two conditions hold for all x, y, p, a, and b.
1. If x j
2. If x j
Lemma 25. Every F1-F2-closed and path consistent constraint is satisfiable.
Proof. Let j be F1-F2-closed and path consistent. We define the variable assignment
trees as follows:
ag
The path consistency of j condition 1 implies that L min j (x) is a partial function. Thus
is a feature tree. We now verify that min j is a solution of j.
- Let x-y in j. For all x 0 , if y j
by the definition of path reachability.
Thus, D min j (y) 'D min j (x) . For all a if y j
a by the definition of path
reachability. Thus, L min j (y) ' L min j (x) , i.e., min j (y)-min j (x).
Consider x[a]y in j. We have to prove for all p, z, and b the equivalences
The first equivalence is equivalent to D min j and the second
one to L min g. We start proving the first equivalence.
If y j
ap z since x[a]y in j. Suppose x j
ap z. By definition of path
reachability there exists x 0 and y 0 such that
The F1-closedness of j and x j
imply x-x 0 in j. The F2-closedness ensures
y-y 0 in j such that y j
holds. We now prove the second equivalence above. If
ap b then there exists z such that x j
ap z and b(z). The first equivalence implies
z and thus y j
b. The converse is simple.
- Let a(x) in j. Reflexivity (F1:1-closedness) implies x-x in j. Thus x j
e a such
that (e; a) 2 L x .
- Let x-y in j. We have to show that the set L min j (x) [L min j (y) is partial function. If
a and y j
b. The path consistency
of
Lemma 26. Every F3;F4;F5-closed constraint is path consistent.
Proof. Let j be F3;F4;F5-closed. Condition 1 of Definition 24 follows from condition
2 of Definition 24 and F3:1-closedness. The proof of condition 2 is by induction
on paths p. We assume x, y, a, and b such that x j
in j, and x j
e,
then there exist n;m - 0, x
F3-closedness implies that x n -ym in j (F3:2 yields x-y 1 in in j. Therefore
y m-x in j by F3:3-closedness, and hence y m-x 1 in
closedness.) Hence, F5-closedness implies a = b.
In the case there exists there exist x 0 , y 0 , -
y
x in
y in
Since x-x 0 in j we have x 0 -y 0 in j by F3-closedness (as above). Thus, F4-closedness
implies -
x-
y in j such that a=b holds by induction hypothesis. 2
Proof of Proposition 4. If j is F-closed then j is path consistent by Lemma 26 and
thus satisfiable by Lemma 25. 2
Corollary 27. Let j be an F-closed constraint. Then j only if there
are variables x 0 and y 0 such that j ' x 0 [a]y 0 and j ' x 0 -x.
Proof. Assume holds for the minimal solution min j of an
F-closed constraint that a 62 L min j (y) . Hence j 6j= 9y(x[a]y). 2.
Acknowledgments
. We would like to thank Jochen D-orre, Gert Smolka, and Ralf
Treinen for discussions on the topic of this paper. We would also like to acknowledge
many helpful remarks of the referees. The research reported in this paper has been
supported by the the Esprit Working Group CCL II (EP 22457) the SFB 378 at the
Universit?t des Saarlandes.
--R
A Complete Axiomatization of a Theory with Feature and Arity Constraints.
A complete and recursive feature theory.
In 2 nd Future Generation Computer Systems
On Subsumption and Semiunification in Feature Algebras.
Constraint logic programming: A survey.
Functional Grammar.
Applications of a Canonical Form for Generalized Linear Con- straints
Ordering Constraints over Feature Trees with Ordered Sorts.
Entailment for Set Constraints is not Feasible.
Inclusion Constraints over Non-Empty Sets of Trees
Feature Logics.
An Introduction to Unification-based Approaches to Grammar
Parsing and Type Inference for Natural and Computer Languages.
Feature constraint logics for unification grammars.
The Oz Programming Model.
Records for Logic Programming.
Feature constraints with first-class features
--TR
--CTR
Franois Pottier, A versatile constraint-based type inference system, Nordic Journal of Computing, v.7 n.4, p.312-347, Winter 2000
Jens Palsberg , Tian Zhao , Trevor Jim, Automatic discovery of covariant read-only fields, ACM Transactions on Programming Languages and Systems (TOPLAS), v.27 n.1, p.126-162, January 2005
Ernst Althaus , Denys Duchier , Alexander Koller , Kurt Mehlhorn , Joachim Niehren , Sven Thiel, An efficient graph algorithm for dominance constraints, Journal of Algorithms, v.48 n.1, p.194-219, August
Michael Benedikt , Leonid Libkin , Frank Neven, Logical definability and query languages over ranked and unranked trees, ACM Transactions on Computational Logic (TOCL), v.8 n.2, p.11-es, April 2007 | weak subsumption;feature constraints;complexity;tree orderings;satisfiability;entailment |
593316 | Solving Various Weighted Matching Problems with Constraints. | This paper studies the resolution of (augmented) weighted matching problems within a constraint programming (CP) framework. The first contribution of the paper is a set of techniques that improves substantially the performance of branch-and-bound algorithms based on constraint propagation and the second contribution is the introduction of weighted matching as a global constraint ( WeightedMatching), that can be propagated using specialized incremental algorithms from Operations Research. We first compare programming techniques that use constraint propagation with specialized algorithms from Operations Research, such as the Busaker and Gowen flow algorithm or the Hungarian method. Although CP is shown not to be competitive with specialized polynomial algorithms for pure matching problems, the situation is different as soon as the problems are modified with additional constraints. Using the previously mentioned set of techniques, a simpler branch-and-bound algorithm based on constraint propagation can outperform a complex specialized algorithm. These techniques have been applied with success to the Traveling Salesman Problems [5], which can be seen as an augmented matching problem. We also show that an incremental version of the Hungarian method can be used to propagate a WeightedMatching constraint. This is an extension to the weighted case of the work of Rgin [19], which we show to bring significant improvements on a timetabling example. | Introduction
Constraint Logic Programming (CLP) and more generally Constraint-based
Programming (CP), has become an interesting approach for solving combinatorial
optimization problems [VH 89]. For instance, on problems such as jobshop
scheduling it has shown to be as efficient as more traditional approaches based on
Operations Research (OR) [CL 94] while delivering more flexibility (i.e. it is easy to
adapt the algorithm to a slightly customized problem with additional constraints). Our
goal is to investigate the advantages and drawbacks of constraint programming
compared to classical combinatorial optimization on the maximum weight matching
problem in a bipartite graph and see how these techniques may be combined.
Bipartite matching is interesting and important for three reasons. First, it is a well-understood
problem, for which many polynomial algorithms ranging from simple to
really elaborate (e.g., [GT 89]) are available. Therefore, the performance of the
constraint satisfaction algorithm can be assessed against a rigorous gauge. Second,
many real-life problems are either matching or "extended" matching with one or a few
additional constraints. It is, therefore, a perfect domain to see where the boundary
between flexibility and efficiency should lay. Moreover, many such matching
problems are optimization problems with weights, and it may be more indicated to
use weighted matching algorithms than to use generic optimization methods with non-weighted
techniques. Third, matching is often a part of more complex problems and
the efficient propagation of matching constraints is a basic building block of a modern
constraint satisfaction system. By looking carefully into matching algorithms, we
derive ideas that will be of use to designers of constraint solvers.
The paper is organized as follows. Section 2 describes a "naive" approach to
matching and a few improvements that can be implemented easily. We then move on
to more complex heuristics and cutting rules and show how they can be used to
handle larger problems. Section 3 compares the previous results with two well-known
algorithms, the Hungarian (weighted) method and the Busaker & Gowen flow
algorithm. We show that the constraint satisfaction approach does not really compare
with these specialized algorithms when the problem is to find an optimal matching.
On the other hand, it is a plausible approach for finding a set of "very good" solutions.
This leads to Section 4, where we look at two extended matching problems: in the
first case, we allow the substitution of a new cost matrix for a few (k) edges
(machine-task allocation problem with renewal of k machines); in the second case, we
study the resolution of two simultaneous matching problem (e.g., in a machine-task
allocation problem, maximize production within a bounded energy consumption). For
these two variations of the problem, the original algorithms are adapted and
compared. Last, we apply in Section 5 the various techniques that were presented in
this paper to a time-tabling problem. We show that we can use weighted matching as
a global constraint, which captures hard and soft constraints at the same time,
enabling a more efficient resolution.
2. Constraint based programming
Formally, the matching problem can be described as follows : Let G=(V,E) be a
bipartite graph, the vertex set V can be parted in two shores such that all
edges link V 1 to V 2 . A matching is a set of edges M - E such that no two of them are
adjacent. A perfect matching is a matching covering all vertices. We consider the case
which a perfect matching corresponds to an assignment
(such matchings frequently arise in production planning, for the
assignment of jobs to machines or tasks to technicians). Moreover, we consider the
case of a weighted graph and define the weight of a matching as the sum of the
weights of its edges. The purpose is then to find, when it exists, a perfect matching of
maximal weight (or of minimal weight if all weight w ij are replaced by A- w ij ), for
some large constant A).
2.1. Naive CLP
A natural way to see this problem as a constraint program is to think of the vertices
in V 1 as variables and to those in V 2 as values. A vertex in V 1 is linked to the set of
values in V 2 which form its domain. A matching corresponds to an assignment for the
variables such that different variables are always assigned different values. The
problem consists in finding an assignment of maximal weight. This constraint
(AllDifferent) [R-94] is offered as a built-in in most CLP languages. Propagation is
often performed by arc-consistency [Ma77], [MM 88]. when a value is assigned to a
variable, it is taken out of the domains of the other variables. When a contradiction
occurs (because a domain becomes empty), the system backtracks to the previous
variable assigned and tries the next possible assignment. For optimization, the
algorithm is a classical branch and bound scheme : a variable is selected and all
possible values are recursively tried. Once a solution M of weight W has been found,
the constraint weight > W is added to the system to help pruning subtrees of the search
space using simple upper bounds for weight.
At any time during the search, two upper approximations of the maximal matching
are maintained : the sum s + for all variables of their best possible assignment (for
each variable v, we define the value best(v) as the maximal value weight(v,x) for all
possible values x) and reciprocally the sum s - for all values of their best possible
inverted assignment.
Instead of computing these sums explicitly for each node in the search tree, they are
maintained incrementally. Each time a value x is removed from the domain of a
variablev, if weight(x,v)=best(x) then best(x) is re-computed and the difference
between the old and the new value is subtracted from s + . Similar updates are
performed on best(v) and s - if weight(x,v)=best(v). Whenever one of the bounds s
or s - becomes strictly smaller than the goal, one can predict that the upcoming
solutions will have a smaller weight than the best one found so far, so this branch of
the tree can be cut off.
This propagation algorithm is widespread among the implementations of the
alldifferent constraint. In a CLP system, the selection of the node on which to branch
is usually done with the first-fail principle : one selects a variable with the smallest
domain. Assignments are usually tried in decreasing order of weight to drive the
search towards matchings with heavy weights (best first principle, greedy heuristic).
As shown in table 1, this naive algorithm solves problems up to 2x20 nodes within
seconds but requires unreasonable amounts of time for larger problems. Although it
may not be the case for all implementations of the alldifferent constraint, taking both
upper bounds is important. The program which just considers s + as
upper bound is 10 times slower on 10x10 instances and cannot solve 20x20 problems
within reasonable times. This fact gives us a hint of the progress that a symmetrical
view of the problem can bring to a constraint approach.
The next two sections (2.2 and 2.3) describe improvements that can be made to the
propagation scheme and the heuristics (first fail, best first) in order to improve
performance. 1 All the experiments reported in this paper have been done with the
CLAIRE programming language 2 .
1 For programmers using a blackbox constraint system with no access to the propagation and
search engine (as many CLP systems), these changes could only be encoded within the solver:
this allows to state the problem with the single command alldifferent, but the changes can only
be written by an expert of the constraint system. For programmers using an open constraint
system with access to the solver and the propagation engine, the program is a little longer but
any user can program these changes.
2 available at http://www.dmi.ens.fr/~laburthe/claire.html
2.2. Adding symmetry and regret
Many improvements can be made on this algorithm to make it scale up for larger
problems. The first idea suggested by the importance of the symmetrical upper
bounds is to have a fully symmetrical description of the problem. The model that
considers vertices of V 1 as variables and vertices of V 2 as values is an arbitrary
breech to the symmetry of the problem (although perfectly valid). A way around this
is to add the redundant model where V 2 is seen as the set of variables and V 1 as the
set of values. Branching both on vertices from V 1 and V 2 implies some overhead (an
inverse of the domain relation must be maintained), but it avoids missing evident
decisions (for instance, when a value is in only one domain, it needs to be assigned to
that variable). Hence, the matching is done from both sides at the same time. This is
very similar to the use of symmetric redundant models for the n-queens problem [Jo
95], as would be expected since the n-queens is a customized matching problem
(without weights).
Moreover, the first-fail heuristic for the selection of the vertex on which to branch
is not a panacea : The notion of regret gives a more acute description of the crucial
vertices. The regret is usually defined as the difference between the optimal choice
and the second best. In our case, if v is a vertex from V 1 and x is a value such that
best(v)=weight(v,x), we define regret(x) as the difference between best(v) and the
maximum of weight(v,x') for all values x'-x. Focusing on regret is justified by the fact
that problem solutions do not change if a constant is added to all edges incident to one
vertex (thus, only relative values matter, as opposed to absolute ones).
The regret is actually the change that will be made to the upper bound if the best
assignment for this vertex is discarded. Selecting the vertex with the largest
regret as a branching point is an entropic choice in the sense that we try to maximize
the impact of this decision. As described in [CL 94], entropic heuristics are a powerful
tool for proofs of optimality since they limit the size of the tree by forcing much
propagation to happen at each node. To avoid a real slow down of the algorithm at
each node, the regret and the best assignment for each node are memorized and
updated incrementally.
Another idea would be to somehow re-break the symmetry. At any time, two upper
bounds for the matching, s are available. As soon as one of them becomes
less than the goal, the branch can be cut. Selecting vertices in V 1 with large regret
decreases conversely. In cases when one of the bounds is
clearly better than the other, it could seem worthwhile to encourage this dissymmetry
in the choice of the branching node. We implemented this by giving a bonus (or
penalty, depending of the situation) during the selection of the branching vertex,
proportional to s to the vertices in V 1 . This heuristic is denoted as "balance" in
table 1.
The table below illustrates the effect of these techniques on randomly generated
instances for 2- 20 and 2 - each vertex being typically connected to 5 to 8
edges, with weight a random number between 1 and 100. The entries of the table
show the number of backtracks (b.) in the search process (1kb.=1000b.) and the
running times (on a Pentium Pro 200) for finding an optimal solution and giving the
proof of optimality. The naive approach (arc consistency and first fail) behaves
poorly, the addition of regret and symmetry brings a gain of a factor 10. The idea of
the balance does not really pay off.
Naive Propagation
1.2 s.
52 kb.
500 s.
5 kb.
9 kb.
198 kb.
b.
800 b.
3,5 kb.
800 b.
1.2 s.
9.5 s.
2,7 Mb.
Basic
900 b.
3,5 kb.
900 b.
43 kb.
2.5 s.
1,1 Mb.
Table
programs
2.3 Finer tuning of the algorithm
One of the aspects of the algorithm that can be sharpened is propagation. In
addition to upper bound evaluation and domain reduction due to edge selection, we
can also do some domain reduction because of the upper bound. As a matter of fact,
we can dynamically remove all illegal edges. An edge uv is illegal as soon as (best(u)
- weight(u,v)) is greater than the available slack (goal - s
goal is the objective weight (goal is subsequently decreased to
time an admissible solution M is found). We call this technique
dynamic cut and report its behavior in table 2. The interest of dynamic cut is two-
folds. On the one hand we detect some failures a little earlier (a rather small benefit).
On the other hand, we maintain smaller and more relevant domains, which may
improve the efficiency of the first-fail principle. Removing meaningless values
produces more rapidly the domains with very small cardinals (1 to 3) that first-fail
tells us to examine. If we want to re-introduce some of the first-fail behavior into our
choice heuristic based on regret, we can use a simple trick (used in [CGL93]): select
the vertex that will minimize the lexicographic pair
where par is a fixed parameter. The effect is to select vertices by largest regret
while there are still domains with cardinal more than par and to select them by first
fail when all domains are smaller than par. This strategy yields some improvements,
but only for small values of par (3).
The search tree, as described now has many branches per node. Actually, it may be
a waste of time to wonder what edge should be selected for a vertex, once we know
that it will not be the best one, since these edges may well look alike and be
numerous. The search tree can be constructed differently with a single alternative at
each node : either the best edge is the selected one, or it is not. The tree becomes
narrower (binary), maybe deeper, but in practice, it prevents the algorithm from
wasting time in irrelevant choices. This new branching scheme is reported in table 2
as binary branching.
The other tuning that can be done concerns the upper bound that is used for cutting
branches of the search tree. Our formula that sums all best choices
estimation of the best assignment. Indeed, if v -V 1 is the favorite choice of p vertices
in V 2 , we know that we will have to take into account the regret for atleast p-1 of
them (because they cannot all be matched to their common favorite vertex).
Therefore, it is possible to tighten the bound by subtracting from s + a conservative
estimate of the regrets that will occur (this is an application of the lookahead principle
because we try to forecast the evolution of the bounds). For each vertex v -V 1 , we
consider the previous set of vertices x from V 2 such that best(x). To this
set of p vertices, we associate the sum of all regrets but the highest one, that we call
look(v). s + . can be replaced by
This strategy which estimates the difference between the simple bound and the
actual choice is called lookahead in table 2. Note that the estimation s corresponds
to a relaxation of the matching problem. This could suggest to use Lagrangean
relaxation by affecting weights to nodes. In fact, this lookahead strategy uses similar
ideas by affecting weights to nodes that are related to several others ones in the
preference graph (these nodes which prevent the solution of the relaxed problem to be
a matching). Moreover, the Hungarian method which associates weights to nodes can
also be seen as related to Lagrangean relaxation.
basic
1.2 s.
9.5 s.
2,7 Mb.
dynamic cuts 24 kb.
1,5 Mb.
2.2 Mb.
new branching
1.2 s.
95 kb.
6.5 s.
lookahead 4,5 kb.
1.2 s.
6 s.
Table
A few remarks can be made from these results. First, the lookahead heuristic works
well, although its benefits (obvious from the numbers of backtracks) only pay off
when the size of the problem is large enough. On the other hand, both the dynamic cut
and binary branching schemes produce unstable results and it is difficult to measure
any significant improvement.
These techniques (propagation, branching, bouding, heuristics) have been
succesfully applied to the Traveling Salesman Problem (TSP) which can be
represented as a weighted matching problems (trying to match each node with its
direct successor in the cycle) coupled with a subtour elimination constraint. As
described in [CL97], these improvements enable constraint programs to solve 30-city
tours instead of 15-city tours (more complex techniques are also given for larger
problems).
3. Traditional algorithmic approaches
Matchings have been widely studied by the Operations Research community for
years ([CoL 86], [Ge 94]). The two methods presented here do not pretend to be the
best ones available today. We made a compromise by limiting ourselves to algorithms
which were simple enough to be understood and implemented in a reasonable amount
of time, not out of proportion with the implementation times of constraint-based
programs
. The algorithm of Busaker and Gowen (described in [GM 79], [VL 90])
embeds the matching problem into a flow problem by adding a source linked to all
vertices in V 1 and a sink linked to all vertices in V 2 . In this case, the capacities on all
edges are set to 1. It is an adaptation of the well-known Ford&Fulkerson maximum
flow algorithm to the case of a network with weighted edges. It starts with a null flow
and augments it by saturating it along augmenting paths until no augmenting path can
be found, meaning that the flow is maximal. This polynomial algorithm runs in
is the number of edges and N the number of nodes. However,
unlike the Ford&Fulkerson it is not incremental in the sense that it cannot complete
any partial flow into a minimal cost maximal flow (it requires the partial flow to be of
maximal stream for its cost).
. The Hungarian method is an algorithm of the class of primal-dual algorithms
often associated to problems stated as linear programs [PS 82]. The primal program
consists in finding a maximal matching of minimal weight. The dual program consists
in finding positive weights p u associated to vertices u such that for all edges uv,
and such that the sum of the p u is maximal. The algorithm
constructs incrementally the weights p u , starting with all p u equal to 0, and
constructing the graph G p formed by the edges uv verifying p u . The
algorithm alternatively works in the dual model (updating the p u in order to add new
edges to the graph G p ) and the primal model (finding augmenting paths in G p ). In
the end, the matching in G p is a minimal weight maximal matching in G. This
polynomial algorithm runs in O(N 3 ). Its major interest compared to the flow algorithm
is its incrementality. When one wants to remove an edge uv from the graph and
recompute the optimal solution, one just sets weight uv to a large positive constant and
remove uv from G p . It takes then only one iteration to complete the optimal
matching.
3.1. Comparison with CLP
For finding an optimal solution to a pure matching program, CP is not competitive
with these OR techniques. CP solves reasonably well problems with up to 2 - 40 or
nodes, whereas the Hungarian method scales up to problems well over 2 - 100
nodes (on our examples, solved in 70 or 80 000 backtracks and approximately
200 s. by our best constraint programs, the flow algorithm takes 1 s. and the
Hungarian method takes 0,3 s. However, if one no longer considers the problem of
finding one optimal solution, but all optimal solutions (or rather all solutions within a
given distance of the optimum), then CLP becomes a plausible competitor. Table 3
reports this experiment: four programs are compared:
. The first one is just a straightforward adaptation of our previous constraint
program basic. Instead of stopping at the first solution, we explore the whole tree.
. The second is a similar branch and bound exploration where the flow
algorithm is used to evaluate the optimal matching at each node instead of using an
upper bound estimate. The flow algorithm is actually only triggered when one of the
edges of the current "optimal" matching is removed from this dynamic graph.
. The third program is similar with a different branching scheme. For each edge
of the original optimal solution we explore two branches : either the edge is part of the
matching or it is removed from the dynamic graph.
. The fourth program is a branch and bound algorithm similar to the third one,
except that the Hungarian method is used instead of the flow algorithm. We here take
advantage of the incrementality of the Hungarian method (its ability to recompute the
optimal matching in a single iteration when an edge is discarded at a node of the
search tree).
For this exploration, the bottleneck is the amount of computation performed at each
node of the search tree. The incremental Hungarian method is the best algorithm since
it explores very small search trees (all explored branches lead to an admissible
solution), however, the constraint algorithm is a fair competitor because it performs
much less work per node.
1%
4 sol.
2%
9 sol.
5%sol.
0,5%.
3 sol.
1%
8 sol.
2,5%
sol.
Basic 1249 b.
b.
8000 b.
14 kb.
1.1 s.
38 kb.
2s.
140kb.
Flow algorithm 137 b.
9 s.
224 b.
2000 b.
100 s.
100 b.
26 s.
172 b.
215 b.
48 s.
1,5kb.
200 s.
Flow algorithm
with new branching
57 b.
136 b.
b.
34 b.
b.
22 s.
195 b.
Hungarian
matching
b.
58 b.
b.
b.
b.
b.
b.
Table
finding all solutions
Hence for the problem of finding all near-optimal perfect matchings, the constraint
program behaves better than our basic Operations Research program (the adaptation
of the flow algorithm) and not as well as our smarter O.R. program (incremental
Hungarian method). The big advantage of the constraint program is it simplicity: it is
indeed much easier to implement than both of the O.R. algorithms (naive and smart).
It seems therefore to be good candidate for real-life matching problems involving a
few additional constraints (and which thus require more exploration of the space of
solutions than the pure problem).
4. Complex matching
In this section, we address the case of two real-life variations of the matching
problem. Ad-hoc algorithms could also probably be specially designed for these
variations of the problem. However, from a methodological point of view, we decided
to consider only adaptations of the original solutions that could be implemented in a
reasonable amount of times (since the constraints programs are adapted in a matter of
minutes).
4.1 Replacing k machines
Suppose that in a plant, the manager has the funds to replace k machines among the
n, by newer ones. We want to find an optimal assignment (maximum
bringing maximal production) of tasks to machines, given that newer machines are
more efficient than older ones. This means that the matching problem is extended
with the additional choice of those k vertices in V 1 for which we prefer to use a
different weight matrix (say weight' instead of weight). For the sake of comparison,
we implemented three solutions for this problem, one using constraint propagation
and two O.R. solutions, a basic adaptation of the flow algorithm and a smart
adaptation of the Hungarian method:
. The first one is a straightforward adaptation of our constraint-based program
basic. The principle is to postpone the choice of the k "new" vertices as much as
possible, but to take them into account with a modified upper bound estimate. Instead
of taking the sum of the best choices for all nodes, we add to this sum s
the sum of the k heaviest edges in the "difference graph" (defined by the gain in the
production function between new and old machines, i.e. considering weight'(uv) -
weight(uv) as the weight of the edge uv). Like the bounds s
can be maintained incrementally.
. The second program is based on the flow algorithm. It goes through a search
tree where the nodes at depth i correspond to the choice of the i th machine to replace.
All branches are explored. Whenever a decision of replacement is made, the
production function is updated (i.e., the second weight function is used for the i th
machine). At each node, the upper bound (computed for pruning) is the sum of the
optimal solution for a matching in the original graph (where i of the k decisions have
been made) and of the optimal solution for a matching of cardinal k-i in the difference
graph.
. The third program is based on the Hungarian method. The algorithm goes
through the same search tree as the program looking for all near optimal solutions (cf
section 3.3) : at each node a vertex v from V 1 selected and each branch
matches one of the vertices x of by removing all edges vx' for x' -
x. The first branch explored corresponds to the current assignment of v in the solution
given by the Hungarian method. The upper bound is the sum of the best possible
matching (given by the Hungarian method) with an estimate of a sub-matching of size
k in the "difference graph" (same estimate as for the constraint algorithm)
Constraints 266b
0,1s
433b
0.1s.
735b
0.1s.
19kb
2.1 s.
26kb
9.9 s.
4,4Mb
700 s.
Flow 5 s.
Hungarian
Matching
20b.
22b.
31b.
30b.
30b.
34b.
40b.
71b.
107b.
Table
replacing k machines
Figure
4 shows these three strategies on a few problems. The constraint-based
approach performs better than the approach based on the flow algorithm but not as
well as the algorithm using the Hungarian method. The constraint approach is much
faster than this smart O.R. algorithm for n=10, a little faster for n=20, somewhat
slower for n=30 and much slower for n=40 (which is anyway the upper limit for the
constraint-based approaches on pure matching problems). Its main advantage is its
simplicity (it took a few simple lines of code to modify the upper bound in the
original constraint algorithm) compared to both O.R. algorithms. This makes the
constraint approach a good solution for small and mid-sized problems (even for
values of k up to 10), while the solution based on the incremental Hungarian method
is well adapted to large problems.
4.2. Bi-matching
This second problem addresses the case of the combination of two matching
problems (with two distinct weight matrices), where one problem is used for
satisfiability and the other one for optimization (in a task-to-machine assignment, this
amounts to maximizing production while keeping the energy consumption below a
certain level). The difficulty varies according to the role played by the passive
matching problem : if the value chosen for the maximal energy consumption is low or
high, the energy matching is dominating the problem or is marginal. On the other
hand, intermediate values make the problem much harder, because the shape of the
solution space is equally affected by both matching problems. This implies that the
distribution of feasible solutions in the search tree is no longer concentrated in one or
a few areas, but is more dispersed. From a linear programming perspective, a bi-
matching problem is made of three components: the matching constraints (shared by
the two matching problems), the energy consumption constraint and the cost function
that represent the optimization on production. A classical approach in such a situation
is to use Lagrangean relaxation to push the energy constraint into the cost function.
Here again, we implemented several solutions that find the maximal production for
a matching which consumption is less than a given constant
. The first one is also a straightforward adaptation of our basic constraint
program. The search is guided by the optimization on the production. The
consumption constraint is only used for pruning: Two lower bounds of the
consumption are estimated by the sum of the edges of least consumption
for each vertex set. Moreover, instead of considering the regret for the production
function, we consider the sum of the regrets for both the production and the energy
function. Therefore, this program is obtained by a simple replication of a few lines
from the original basic program, where energy is substituted to production.
. The second algorithm is a branch and bound algorithm using twice the
(incremental) Hungarian method. Two Hungarian matchings are constructed: one of
maximal production and one of minimal consumption. Branching is based on the
Hungarian matching of maximal solutions. Both these matchings are used to prune: a
branch can be cut off when the minimal consumption is strictly greater than E or
when the maximal production is less than the best one found so far.
. The third one and fourth are based on Lagrangean relaxation with Busaker's
flow algorithm and the Hungarian method. The general principle of this method is to
put some constraints in the objective function with a certain coefficient, and to vary
the value of this coefficient [Re 93], assuming that the relaxed problem (i.e., without
the constraint that was pushed into the cost function) is simpler to solve. Here, If we
"push" the energy constraint into the cost function, we obtain a simple matching
problem that we solve with the flow algorithm. The objective function becomes the
total weight of the matching with the following weight function on the edges:
weight l (u,
Let us call f(l) the value of the maximum matching for weight l By construction,
f(l) (for l - 0) is an upper bound for the original problem since the energy
consumption has to be smaller than E. Now, if we compute the value F which is the
minimal value for f(l) when l varies (l - 0), F is also an upper bound (that can be
found through a dichotomic search). This provides us with an upper bound of high
quality, and also, while varying the value of l, a possible lower bound (if one of the
l yields an admissible energy). These bounds are computed at each node of the search
tree, and branching is made on the edges of the matching of the optimal flow, as was
indicated in the third approach in the previous section. The third program is a
straightforward implementation of the Lagrangean relaxation with the flow algorithm,
the fourth one is an implementation of the Lagrangean relaxation with the Hungarian
method, that tries to be as incremental as possible (trying to keep part of the dual
solution for similar values of l)
(inc. Hung. Match.)
2.4kb
2.6kb
7.1 s.
3.2 kb
140kb
500 s.
900 s
14kb.
Lagragean Relaxation
with the flow algorithm
20b.
31b.
102b.
22b.
107b.
31b.
72 s.
197b.
87b.
Lagragean Relaxation
with the Hung. Match.
14b.
5.1 s.
64b.
80b.
28b.
86b.
50 s.
28b.
180b.
296b.
Constraints (Basic) 1kb.
28kb.
1.2 s.
30kb.
1.3 s.
2kb.
900kb
43 s.
Table
bi-matching
Table
5 compares all four algorithms on two problems where the cost and weight
functions are randomly generated with values ranging from 1 to 100. There is a
balance between optimization on the cost and feasibility on energy : they both can cut
the search tree. If E is small (close to the value of a minimal energy consumption
matching), the energy is responsible for all the pruning and the program behaves like
a simple matching one. Symmetrically, if E is large, the problem is almost
unconstrained and looks like a simple maximal production matching program. The
hardest situation is when energy and cost are both responsible for pruning the search
tree. This situation corresponds to E@ 550 and E @ 900 in our examples. Lagrangean
relaxation pays off for large problems, when no criterion dominates the other.
However, it seems that for real life problems a criterion most often dominates the
other. From this point of view, the constraint approach is much more efficient.
Here again, the constraint program performs better than the simple O.R.
algorithm (with the two incremental Hungarian matchings). But it also performs better
(except for the balanced situation for n=30) than the complex LR program. In fact, the
Hungarian method is only mildly incremental for the Lagrangean relaxation scheme.
The dual solution cannot be easily repaired after a change of weight function.
5. Application
In the previous section we have shown the strenghts of the constraint-propagation
approach compared with more specialized algorithms. We shall now see that these
techniques should be combined and not opposed. We consider a time-tabling problem
which consists of filling a weekly schedule with a set of lessons (of duration 1 to 4
hours). Each lesson is given a set of possible start times and a set of preferred start
times. The schedule is made of 10 half-days of 4 hours and lessons should not be
interrupted. This section illustrates how weighted matching techniques can be applied
to such a problem and provide significant improvement. We notice that if all lessons
were of duration 1, this problem would indeed be a matching problem. This suggests
a straightforward relaxation where we consider lessons to be interruptible. Second,
preferences can be encoded using weights so that the minimum weight matching
corresponds to the assignment using as many preferred start times as possible.
In the rest of the paper, we consider m lessons l 1 . l m , and a schedule with n time
slots of length 1 hour 4). For each lesson, we are given two lists of time
slots (integers between 1 and n) that represent respectively the set of possible and
preferrred start times. The goal is to find a start time for each lesson so that
. no two lessons overlap. This is the ususal disjunctive scheduling constraint: for all
pairs of lessons l,l' either start(l') - start(l)
. each lesson fits into a half day. So within a half day (says the i th half-day, covering
the time units {4i+1, 4i+2, 4i+3, 4i+4}), lessons of duration 4 can only start at the
first unit (4i+1), lessons of size 3 can only start at units 4i+1 and 4i+2 , etc.
. the number of defaults, defined by the number of lessons which are assigned a
start time outside the set of preferred times, is minimal
This problem is very dependent on the range of input data. The problem can be
seen as the combination of a satisfiablility problem (filling the schedule) and an
optimization problem (an assignment problem). When the lessons are large, if there
are enough of them, the problem may look like a bin-packing, where the preference
optimization is almost irrelevant. On the other hand, with smaller lessons, the packing
is much easier and the optimisation problem dominates. Similarly, the difficulty of the
preferences (i.e., the tightness of the preference sets) will augment the importance of
the optimization component of the problem. We have picked three problems that are
representative of different situations: Problem 1 uses rather short lessons (such as in a
high-school schedule) with complex preferences (the optimum is 6 defaults). Problem
2 is similar (from a lesson size point of view) but has simpler preferences (the
optimum is 1). The last problem uses larger lessons to explore how the algorithm
would react to a problem where satisfiability is an issue.
In order to exploit the matching relaxation, we decompose each lesson of duration k
into k units of 1 hour. The total number U of units is, therefore, the sum of the
durations of the lessons. The matching that we need to build associates its start time (a
time slot) to each unit. For a unit u associated to a lesson l, and a time slot i, we give a
weight to each edge (u,i) as follows:
cannot happen at i because it would imply an illegal start
time for the lesson l,
if u can happen at i but this implies a start time outside the
preferred set,
happens at i when the lesson l starts at one of its
preferred time.
We can now define MinWeightAllDifferent({start(u 1 ), ., start(u U )}, w) as the
minimum weight matching for this graph. Recall that this value can be computed
efficiently with the Hungarian matching, and that it can also be maintained
incrementally throughout the search procedure (section 3. described how to
recompute this value when a few edges have been removed in the graph). Since the
lesson l has k units, it is straightforward to check that an optimal solution of our time-tabling
problem will correspond to a minimum weight matching. For each schedule
with D defaults, the value of the matching is 1000 * U - 12 * D. Thus, if we search for
a solution with less than D defautlts, we can use the redundent constraint :
To solve the three problems, we have used a branch-and-bound algorithm that
minimizes the number of defaults. Branching is done on the starting time of a lesson,
trying all perefered values first. The lesson on which to branch is picked using the
first-fail heuristics. Each start time decision is propagated as follows:
. We discard values from other lessons that could cause an overlap with the lesson
that has been assigned.
. The start time of the units composing the lessons are set accordingly.
. When the number of default reaches the upper bound, all edges that are not
preferred are removed.
. We use a redundent constraint to detect when it becomes impossible to place large
lessons. For each value d of duration that is strictly larger than a half-day (for
example 3 hours), we compute the set of lessons lessons(d) with this duration and
the union of all possible half days for these lessons possible(d). we then check that
possible(d) - lessons(d). Finally, we check that possible({4,3,2}) -
2.
Problem 1
(24 lessons 39h)
Problem 2
(26 lessons 40h)
Problem 3
(14 lessons 39h)
1. simple propagation 189 kb. 1541 s. 286 kb. 1040 s. 43 kb. 246 s.
2. matching cut 31 kb. 177 s. 269 kb. 1008 s. 27 kb. 160 s.
3. Regin's filter 31 kb. 197 s. 269 kb. 1243 s. 27 kb. 160 s.
4. weighted matching cut 3511 b. 29 s. 234 b. 2.6 s. 17 kb. 120 s.
5. global consistency 1206 b.
shaving - 382 b. 96 s. 183 b. 11 s. 5888 b. 314 s.
Table
Applying various weighted matching techniques to a time-tabling problem
Table
6 gives the result obtained with the following approaches :
1. The first method only performs constraint propagation.
2. The second method checks that the underlying matching problems (for the units)
is still feasible (i.e., there exists a perfect matching).
3. The third method removes all edges that do not belong to at least one perfect
matching using Regin's algorithm [R-94].
4. The fourth method uses our new global constraint MinWeightAllDifferent (1)
which is propagated as explained earlier using the incremental Hungarian method.
5. The fifth method uses a look-ahead consistency check trying for each un-assigned
lesson l to discard all prefererred (respectively non-preferred) edges. - Trying -
here means to detect if the removal of the values would create a contradiction
through the propagation of the constraints. If a contradiction is detected, we
deduce that the lesson l must start at a preferred (resp. non-preferred) time.
6. The sixth method applies a global consistency technique which consists of trying
each possible start time and removing those who produce a contradiction. This is
similar to the shaving technique that is used for jobshop scheduling [CL96].
A few conclusions can be drawn from these experiments.
. First, our global constraint MinWeightAllDifferent brings a serious improvement
over standard propagation (local consistency). For problem 2, the number of
backtracks is divided by a factor of 1000. Moreover, the overhead for keeping the
value of the minimal weight matching up to date with the incremental Hungarian
method is very reasonable, compared to the the cost of simple matching propagation
and bounding for defaults. Indeed, with the addition of the MinWeightAllDifferent the
average time per backtrack over the three instances goes from 4,1 ms. to 7,3 ms.
Therefore, the gain in search tree sizes turns into a real speedup.
. Second, the propagation of the unweighted matching constraint (the difference
constraint), which can be done very efficiently with the filtering algorithm proposed
in [R- 94], has a marginal impact on the resolution of the problem compared to the
propagation of the weighted matching constraint.
. Third, it seems a good idea to check global consistency by performing a limited
breadth-first exploration of the search tree (limited to depth one). This seems to work
better for branching decisions based on satisfaction of lessons (method 5) rather than
for actual assignements of time slots to lessons (method 6). This is due to the fact that
the complexity of method 5 is smaller than that of method 6. Moreover, these global
consistency techniques work best for time-tables with large blocks (lessons with
duration 3 and 4), rather than on problems with small lessons, where the matching
relaxation is more accurate.
6. Conclusion
A first conclusion might be that constraint propagation is not a competitive
technique for pure weighted matching problems. Specialized algorithms are simple
enough and should be used appropriately. On the other hand, constraint propagation is
a more plausible approach to augmented matching problems. Depending on the
complexity of additional constraints and the size of the problem, the performances
obtained (easily) with a CP approach range from reasonable to excellent, compared to
more specialized approaches. In the few cases where this is not good enough, the best
approach is to incorporate some of the weighted matching techniques into a constraint
based branch and bound search.
The first contribution of this paper is a set of generic techniques that improve the
performance of constraint-based branch-and-bound algorithms for such problems,
namely a binary branching scheme based on regret, the use of the implicit symmetry
and the look-ahead bounding functions. These techniques may be applied to any
augmented matching problem and were actually applied with success to the Traveling
Salesman Problem [CL97].
Our second contribution is to show that indeed a weighted matching can be
considered as a global constraint (MinWeightAlldifferent), since we know how to
propagate it efficiently using the incremental version of the Hungarian algorithm. This
is a very useful global constraint, as we have shown with our time-tabling example. A
constraint solver that offers this feature will be able to solve problems with hard and
soft constraints at the same time, taking advantage of the weights, whereas a system
that relies on simple matching only will implement soft constraints as a second layer,
in a much less efficient way. We must also notice that this feature allows us to
combine the best of both worlds for the two augmented problems that we studied in
Part 4: we keep the simplicity and flexibility of the constraint-based approach, while
ensuring the robustness of the underlying matching algorithm.
Acknowledgments
We would like to thank an anonymous referee for his helpful comments and
suggestions on an earlier version of this paper.
--R
A Deductive and Object-Oriented Approach to a Complex Scheduling Problem
Improved CLP Scheduling with Tasks Intervals.
Cumulative Scheduling with Task Intervals.
Solving small TSPs with Constraints.
Introduction to Algorithms.
Matching. in Handbook in Operations Research and Management Science (Networks)
Faster Scaling algorithms for network problems.
Concurrence et coop-ration de mod-les multiples
Consistency in networks of relations.
Running efficiently arc consistency
Combinatorial Optimization.
A Filtering Algorithm for Constraints of Difference in CSPs
Modern Heuristic techniques for combinatorial problems.
Constraint satisfaction in Logic Programming.
Graph Algorithms.
--TR | weighted matching;resource allocation;global constraint;hungarian method |
593353 | A Constraint-Based Interactive Train Rescheduling Tool. | In this paper, we report the design and implementation of a constraint-based interactive train rescheduling tool, a project in collaboration with the International Institute for Software Technology, United Nations University (UNU/IIST), Macau. We formulate train rescheduling as constraint satisfaction and describe a constraint propagation approach for tackling the problem. Algorithms for timetable verification and train rescheduling are designed under a coherent framework. Formal correctness properties of the rescheduling algorithm are established. We define two optimality criteria for rescheduling that correspond to minimizing the number of station visits affected and passenger delay respectively. Two heuristics are then proposed to speed up and direct the search towards optimal solutions. The feasibility of our proposed algorithms and heuristics are confirmed with experimentation using real-life data. | Introduction
The PRaCoSy (People's Republic of China Railway Computing System)
project [10] is undertaken by the International Institute for Software Technol-
ogy, United Nations University (UNU/IIST). The aim of the project is to develop
skills in software engineering for automation in the Chinese Railways. A
specific goal of the project is the automation of the preparation and updating
of the running map 1 , for dispatching trains along the 600 kilometer long railway
line between Zhengzhou and Wuhan in the People's Republic of China.
The Zhengzhou to Wuhan section has been chosen as a case study because it
is along the busy Beijing-Guangzhou line, the arterial north-south railway in
China. The rate of running trains, both goods and passengers, of this section is
high and present management procedures are not adequate with the dramatic
development of domestic economy.
A running map [9] contains information regarding the topology of the railway,
train number and classification, arrival and departure time of trains at each sta-
tion, arrival and departure paths, etc. A computerized running map tool should
read in stations and lines definition from a descriptor file, allow segments (sub-
sets of all stations) and time intervals to be defined, allow train timetable to
running map is a method of monitoring the movement of trains and rescheduling
their arrivals and departures to satisfy operational constraints.
be read, and finally display graphically the projection of the timetable against
a given segment and a given interval. A sample running map is shown in figure
6. Train dispatchers, users of the tool, have to modify the timetable when
trains in some sections cannot run according to the map, possibly due to accidents
and/or train delays. The modification to the map should be performed in
such a way that certain scheduling rules (laid down by the local railway bureau)
are not violated. Therefore, a computer running map tool should check users'
modifications against possible violation of scheduling rules, and warn users of
such violations. In addition, the tool should also assist the user in repairing,
either automatically or semi-automatically, an infeasible timetable so that the
least train service disruption is made. We call this process rescheduling . Scheduling
and rescheduling are different in two aspects. First, while scheduling creates
a timetable from scratch, rescheduling assumes a feasible timetable and user
modifications, which may introduce inconsistencies to the timetable, as input.
Second, optimality criteria used in scheduling, such as minimum operating cost,
are usually defined in the absolute sense. In rescheduling, however, the quality
of the output is measured with respect to the original timetable.
The PRaCoSy project has resulted in a running map tool capable of train
timetable verification [7]. Our task at hand is to enhance the PRaCoSy tool
to perform automatic rescheduling, which can be considered as constraint re-
satisfaction. A major problem with the PRaCoSy implementation is that constraints
are used only passively to test possible violation of scheduling rules. In
view of this limitation, we decided to re-create the running map tool from scratch
using a constraint programming approach. In this paper, we give algorithms for
timetable verification and train rescheduling used in our tool, and show that constraint
programming allows us to perform constraint checking and solving (or
propagation) in a coherent framework. We study two notions of optimality for
the rescheduled timetable with respect to the original timetable. These notions
provide a measure of the quality of the rescheduling operation. We also present
two heuristics that direct and speed up the search towards optimal rescheduled
timetables.
The rest of the paper is organized as follows. Section 2 defines basic terminology
and discusses related work. Section 3 explains the timetable verification
algorithm. In section 4, we show how to formulate train rescheduling as a constraint
satisfaction problem and give an associated algorithm. We also discuss
two heuristics that help to direct and speed up the search towards optimal solu-
tions. In section 5, we describe our prototype implementation and sample runs
of the tool. We summarize our contribution and shed light on future work in
section 6.
Preliminaries
In the following, we provide informal definitions of necessary terminology according
to [9] to facilitate subsequent discussions. Names not defined should be
self-explanatory or clear from the context. Interested readers can refer to [9] for
formal definitions of the same terminology.
The topology of a railway system is defined by a collection of named stations
and identified lines. We differentiate between the lines within a station and those
connecting two stations by referring the former as lines and the latter as tracks.
A train journey is a sequence of visits to connected stations. Each visit to a
station is represented by the arrival time and the departure time of the train. A
timetable is an association from trains to journeys to be made. Scheduling rules
is a set of temporal constraints to restrict the arrival time and departure time of
each visit in order to prevent such undesirable events as train crash. A timetable
is valid (or feasible) if no scheduling rules are violated under the associations.
Otherwise, the timetable is invalid (or infeasible).
Given a feasible timetable with n station visits, which is represented by a
set of assignments (or equality constraints) of the form AT
where AT i and DT i denote the arrival and departure time respectively, for 1 -
modifications that we can make to the timetable are to replace some
assignments
(or t d
ng. In other words, we can only delay the arrival time
or departure time of visits. Given an infeasible timetable, rescheduling is the
process of modifying the timetable so as to make the timetable feasible.
2.1 Problem Statement
There are six types of scheduling rules [9] in our railway system: the speed rule,
the station occupancy rule, the station entry rule, the station exit rule, the line
time rule, and the stopover rule. Let there be two trains 1 and 2 and two adjacent
stations A and B. The variables ATXY and DTXY denote train Y 's arrival and
departure time at/from station X respectively. The above scheduling rules can
be formulated as the following types of scheduling constraints.
The Speed Constraint
The constant lng denotes the distance between station A and station B. This
constraint enforces that the average train speed traveling between the two stations
cannot exceed sp.
The Station Occupancy Constraint
This constraint enforces that there is at least ctr time units between two trains
occupying a track.
The Station Entry Constraint
This constraint enforces that there is at least cen time units between two trains
entering a station via a line.
The Station Exit Constraint
This constraint enforces that there is at least cex time units between two trains
departing from a station via a line.
The Line Time Constraints
The line time rule is split into two constraints. The first constraint enforces that
no train overtakes another train if they are traveling in the same direction on a
line. The second constraint enforces that if there are two journeys on a line in
opposing directions, the line must be unoccupied for at least cenx time units.
The Stopover Constraint
cst
This constraint enforces that a train will stay in a station for at least cst time
units.
Given the topology of a railway system with a valid train timetable, due to
unexpected events, the users of the running map tool may want to modify the
timetable. Our work is to first check the feasibility of the modified timetable.
If it is feasible, the previous timetable is replaced by the modified one. Other-
wise, we reschedule the infeasible timetable to generate a new feasible timetable.
Note that efficiency should be a critical concern in designing the verification
and rescheduling algorithms since in real-life situations, rescheduling must be
performed in a timely manner. The notion of "efficiency" may vary according to
situations. Ten minutes, however, should be a tolerable bound in general [2].
Optimal solutions are not required usually. In most cases, it is impractical
to generate optimal solutions within a given (usually small) time bound. Criteria
for optimality, however, should be defined. Such definitions can serve as
guidelines for designing various variable-ordering and value-ordering heuristics
to generate "good" answers. A precise notion of optimality also enables us to
measure the "quality" of the rescheduled timetable. In the following, we present
two optimality criteria.
A rescheduled timetable is minimum-changes optimal with respect to the
original timetable if the least number of station visits are modified. This criterion
can be satisfied easily in general since in most cases, we can simply delay the
trains in question to the latest possible time. The resulting timetable, however,
may introduce unreasonable long delay to some train visits. Thus this criterion
should usually be applied with other criteria limiting the maximum delay.
A rescheduled timetable is minimum-delay optimal with respect to the original
timetable if the longest delay among all train visits is minimum. Let the
denote the infeasible
and the rescheduled timetable respectively. The goal of this criterion is
to minimize the following expression:
The aims of the two criteria could contradict one another and represent the
extremes of a spectrum of other possible definitions of optimality.
2.2 Related Work
Rescheduling is different from traditional scheduling in the sense that the possible
solutions of rescheduling are restricted by the original schedule. Zweben et
al [11] tackle this problem using constraint-based iterative repair with heuristics.
The resultant GERRY scheduling and rescheduling system is applied to coordinate
Space Shuttle Ground Processing. Our work is based on a propagation-
based constraint solver.
Somewhat related to our work is train scheduling. Komaya and Fukuda [5]
propose a problem solving architecture for knowledge-based integration of simulation
and scheduling. Two train scheduling systems are designed in this ar-
chitecture. Fukumori et al [3] use the tree search and constraint propagation
technique with the concepts of time belt in their scheduling system. This approach
is claimed to be suitable for double-track line and continuous time unit.
Recently, Chiang and Hau [1] attempt to combine repair heuristic with several
search methods to tackle scheduling problems for general railway systems.
There are two on-going projects that aim at automating train scheduling for
real-life railway ministries. Our work is a direct outgrowth of the PRaCoSy
project [10] at UNU/IIST. The latest PRaCoSy running map tool prototype
uses constraints only passively to test for constraint violation in their verification
engine. The Train Scheduling System (TSS) designed for Taiwan Railway Bureau
(TRB) [6] is a knowledge-based interactive train scheduling system incorporating
both an automatic and a manual schedulers. Users and the computer system are
thus able to bring complementary skills to the scheduling tasks.
3 Timetable Verification
In the following, we describe a timetable verification algorithm, which examines if
a given timetable is valid with respect to a set of scheduling constraints. Violated
scheduling rules (or constraints) in an invalid timetable will be located and
displayed to the user. The algorithm, shown in figure 1, assumes the existence
of a propagation-based constraint solver [8] propagate().
The timetable T can be viewed as a set of constraints for all variables in
either the form AT
i or DT
is an arrival time and DT i
is a departure time. After all variables become ground (line 5), we post the
scheduling constraints one by one (lines 7-13). Having all variables ground, the
propagate() engine performs essentially constraint checking. It is easy to check
violated constraints */
3 /* Initialization */
4 I / fg
Constraint store S is initialized to T */
6 /* Constraint Verification */
7 for each c 2 C
9 if inconsistency found
I / I [ fcg
Retract c from the constraint network */
endfor
14 end
Fig. 1. The Timetable Verification Algorithm
that a constraint is violated under the given timetable if inconsistency is found
after the constraint is told to the store. Violated constraints are retracted so
that the algorithm can proceed to check for other possible constraint violations.
Again, the groundness of all variables allows us to retract a constraint by simply
removing the undesirable constraint from the constraint store.
4 Rescheduling as Constraint Satisfaction
Scheduling is an instance of constraint satisfaction problem. In the following,
we show the same for rescheduling. Given a timetable T . Users modify T by
adjusting its arrival and departure times, obtaining T 0 , which can be valid or
invalid. If T 0 is invalid, the rescheduling process should attempts to repair T 0 to
make it feasible. By repairing, we mean adjusting the value of the non-modified
variables so that (1) the timetable becomes valid again and (2) the new timetable
should be reasonably "close" to the original timetable T . By being close to T , we
mean that the new timetable should create the least service disruptions. Example
optimality criteria are given in section 2. Note that user modified variables must
be kept fixed during the rescheduling process since the modifications represent
dispatcher requirements.
In order to formulate rescheduling as constraint satisfaction, we have to determine
the variables of the problem, the domains associated with the variables,
and the constraints of the problem. In rescheduling, the variables are the arrival
and departure time of the timetable. Every variable share the integer domain
. There are three types of constraints in the rescheduling problem.
1. Scheduling constraints: The scheduling constraints set forth in section 2.
2 There are 1440 minutes in 24 hours.
2. Modification constraints: For each arrival or departure time X which is modified
by the user to new value t, we have the equality constraint t. This
constraint enforces the user modifications to stay fixed during rescheduling.
3. Forward-labeling constraints: For each non-modified variable X with value
t in the original timetable T , we have the constraint X - t. This constraint
is necessary to ensure that we can only delay arrival or departure time.
Rescheduling now becomes finding a solution to the above constraint satisfaction
problem. A solution is optimal if the solution is "closest" to the original
timetable.
We are now ready to present the rescheduling algorithm, shown in figures 2
and 3. The algorithm can be divided into three phases. In phase one (line 4), we
timetable */
3 /* Initialization */
Save a copy of the constraint store after
5 propagating constraints in C */
6 /* Rescheduling */
7 while true
8 Read in user modifications U /* U is in the same form as T */
9 modify(T , S0 , U , R)
timetable */
11 Prompt error messages
else
rescheduled timetable if necessary */
14 endif
Fig. 2. The Train Rescheduling Algorithm
post and propagate all scheduling constraints to prune infeasible values in the
variables. The pruned constraint network is then saved in S 0 . Since the scheduling
constraints are the same for any timetable T and user modifications U , the
same store S 0 will be reused in every rescheduling step. In real-life situation,
rescheduling has to be performed repeatedly for different timetables and user
modifications, this saving operation helps to avoid unnecessary invocations of
constraint relaxation.
Actual rescheduling takes place in the procedure modify() (lines 16-46). In
the second phase (lines 19-35) of rescheduling, information is extracted from user
modifications and the original timetable to post and propagate the modification
constraints (lines 23-27) and the forward-labeling constraints (lines 28-35). If
inconsistency is found, rescheduling is halted and failure is reported. In the third
phase (lines 36-46), variables that are not modified by the users (extracted by
the vars() function) are enumerated or labeled using some form of variable-
procedure modify(in T , S0 , U , out R)
previous feasible timetable, S0 : saved constraint network state,
user modifications, R: rescheduled timetable */
19 /* Initialization */
O /
Assignment constraints associating with user-modified variables */
22 /* Post all user modifications */
First and second type of constraints */
inconsistency found /* User modifications are inconsistent */
26 return
28 /* Prune infeasible values: can only delay arrival & departure time */
29 for constraint
Third type of constraints */
inconsistency found
return
34 endif
36 /* Rescheduling */
of variables for rescheduling */
Appropriate variable- and value-ordering should be used.
40 The function labeling() returns either fg or a set of equality
constraints (or bindings) for each variable X
43 R / fail
44 else
Fig. 3. The Train Rescheduling Algorithm (cont.)
and value-ordering heuristics, which are embedded in the labeling() function,
to speed up and direct the search towards a near-optimal solution.
There are two situations in which user modifications lead to a timetable T 0
that is non-repairable. First, the user modifications are self conflicting. Since
user modified variables must be kept fixed during rescheduling, it is impossible
to repair other variables to make the timetable valid. Second, user modifications
are not self conflicting but there is no room for other variables to adjust to make
the timetable valid. Constraint propagation algorithms are well-known to be
incomplete [8]. Thus, phase two of the rescheduling algorithm can detect some,
but not all, of this kind of conflicts. Theoretically speaking, the enumerating
procedure in phase three can guarantee to detect inconsistency but it would
usually take impractically long to do so. In cases when the rescheduling algorithm
fails to return an answer within a few minutes, users are advised to abort the
current computation, re-adjust the modifications, and restart the rescheduling
process.
In the rest of this section, we present two variable labeling heuristics, which
are designed to yield rescheduled timetables in the minimum-delay and the
minimum-change optimal sense respectively.
Smallest-First Principle Variables are ordered in the ascending order of the
lower bound of their domains. Values in the variable domains are also enumerated
in ascending order. This principle is founded on the assumption that a
short delay on a train visit will cause short delay on the subsequent one, which
means that delays propagate in a monotonic fashion. Experimental results confirm
that, using actual timetables from PRaCoSy, this heuristic usually helps
to generate solutions that are minimum-delay optimal efficiently. We construct
below an unrealistic artificial example that defeats the heuristic.
Figure
4 (a) shows a small segment of four journeys on a railway running
(a) Before Rescheduling (b) After Rescheduling
Fig. 4. A Non-Optimal Solution by Smallest-First Heuristic
map. The three journeys A, B, and C share the same track in the Nanjing
station, while the two journeys C and D take the same line in traveling from
Nanjing to Longtan. The journeys A and D are fixed (indicated by thick lines)
by the users. Suppose the station occupancy and the station exit rules enforces
that at least ten minutes among each of the three points A,B, and C, and sixty
minutes between the points C and D respectively. The modified timetable is thus
infeasible due to the insufficient long distance between the points A and B.
Figure
4 (b) shows the rescheduled timetable obtained using the smallest-
first principle. The rescheduling starts from moving point B ahead in time to
achieve the ten-minute requirement between points A and B. The movement in
turn causes another conflict between points B and C. Point C is thus forced to
move. However, there is no feasible location for point C to move between points
B and D since point D is fixed by user. Therefore, we have to move point C
one-hour ahead of point D. The maximum delay in this case is two hours. This
solution is not optimal since a better solution can be obtained by simply moving
point B twenty minutes ahead in time, as shown in figure 5.
Fig. 5. A Smallest-Changes-Optimal Solution
Consistent-Assignment-First Principle This heuristic suggests to instantiate first
those variables that can be instantiated with its time value in the original
timetable. We call these variables non-conflicting . The other variables are conflicting
. Therefore, the labeling of the non-conflicting variables will be backtracked
into last. Again values in the variable domains are enumerated in ascending
order. The idea is to maintain as many variables with its original value
as possible. This heuristic direct searching towards a minimum-change optimal
solution. Note that a non-conflicting variable may be instantiated with a value
other than its original value eventually if the conflicting variables have tried all
possible combination of time values and no solution is found.
For efficiency reason, we further classify the non-conflicting variables into two
group. The first group contains variables that share journeys with one of conflicting
variables. The second group contain the rest of the non-conflicting variables.
Our heuristic suggest to label first the second group of non-conflicting variables.
This ordering is essential since the labeling of variables sharing journeys with
conflicting variables have a higher chance of being backtracked into.
We apply this heuristic to reschedule the infeasible timetable in figure 4 (a).
Recall that the points A and D are fixed by users. We classify the variables
associated with point B and point C as conflicting and non-conflicting respec-
tively. Thus point C is labeled first to retain its original position in the map and
point B is forced to move until it reaches the location ten-minute ahead point
C. In this specific case, the minimum-change optimal solution coincides with the
minimum-delay optimal solution. This example also shows that, in general, the
two heuristics give different first solution.
5 Prototype Implementation
In order to demonstrate the feasibility of our algorithms, we have re-constructed
and enhanced the PRaCoSy running map tool prototype [7] with rescheduling
capability. The prototype consists of a constraint-based scheduler and a user-
interface. The former is implemented in C++ with ILOG Solver library 2.0 [4]
while the latter is built using Microsoft Visual Basic 3.0.
In the following, an overview of the running map tool is presented. We then
give a sample session of our tool using a segment (from Nanjingxi to Shanghai)
of the China railway which amounts to 3005 constraints and 596 variables. The
rescheduled timetables generated by the two heuristics are explained. We conclude
this section by showing two examples to which our tool fails to respond in
a timely manner.
The running map display (figure consists of six columns (regions). Column
one and column four show the abbreviated identifiers of stations. Column two
shows the number of arrival and departure lines of stations. Column three is the
main window for presenting the graphical representation of a timetable, with
time and locations as the X and Y axes respectively. Column five shows the cumulative
distance from the first station. Column six shows the distance between
the current station and the previous station. In the cases where a timetable is
too large to fit into the main window, two scrollbars will be enabled.
Fig. 6. The Running Map Tool
A user can click-and-drag any lines to modify the corresponding train visits
on the map. The modified timetable will be validated using the verification
algorithm when the "Check" button is pressed. If it is infeasible, a warning
window, such as that shown in figure 7, will pop up to display all constraint
violations. At this point, the user can either invoke the rescheduling algorithm
by pressing the "Reschedule" button, correct the modifications manually, or
restore the original feasible timetable.
Figure
8 (a) shows a segment of a China railway timetable. Due to an acci-
Fig. 7. A Warning Window
(a) Original Feasible Timetable (b) Modified Infeasible Timetable
Fig. 8. A Comparison of Two Heuristic
dent, we have to delay the train departuring from Zhenjiang at 1:05 to 3:30, yielding
the map shown in figure 8 (b). The user-modified departure time (pointed
by an arrow) and all the subsequent train visits on the journey (the highlighted
segment) are then fixed immediately by the running map tool. This user movement
incurs seven constraint violations between the modified journey and its left
adjacent journey. We reschedule the infeasible timetable with our two heuristics.
Both of them succeed in generating a feasible timetable within a few seconds.
Figure
9 (a) and figure 9 (b) show the rescheduled timetable generated using the
smallest-first principle and the consistent-assignment-first principle respectively.
(a) Smallest-First Principle (b) Consistent-Assignment-First Principle
Fig. 9. A Comparison of Two Heuristic (cont.)
Applying the smallest-first principle, we process all visits on the map from
the left (earliest) to the right (latest). For each visit, if its associated arrival
(or departure) time does not violate any scheduling constraints, we preserve
the current value. Otherwise, we move the time ahead as little as possible to
eliminate the inconsistencies. Thus some visits on a journey may be modified
while others remain unchanged. This explains why, visually, a journey is not only
shifted right horizontally, but can also be "bent" by the rescheduling process.
The movement propagates in the above fashion from left to right. Whenever no
further movements are possible, backtracking takes place.
Instead of massaging several journeys to produce a feasible timetable, the
consistent-assignment-first principle suggests to modify as few station visits as
possible. This goal can be well approximated by first locating station visits that
can remain unchanged with respect to the user modifications. These station visits
will labeled first. The conflicting variables, having to change their original values,
will be labeled last. Our experiments reveal that, in many cases, this heuristic
produces timetable which is "almost identical" to the original timetable. As seen
in figure 9 (b), most of the journeys retain their original locations. Even for the
right-shifted journey, its shape is mostly preserved.
Experimental results confirm that rescheduling can usually be completed
within seconds. This is not always the case. Figure 10 (a) and figure 10 (b)
provide two such examples. The infeasible timetable in figure 10 (a) can be
rescheduled using the consistent-assignment-first principle in a few seconds, but
the smallest-first principle fails to return an answer within five minutes. Figure
(b) is simply a non-repairable timetable. Neither heuristics can return
promptly to confirm the unsolvability of the problem.
(a) Infeasible Timetable 1 (b) Infeasible Timetable 2
Fig. 10. Poor Performance Example
6 Concluding Remarks
The contribution of this paper is three-fold. First, we define formally train
rescheduling as a constraint satisfaction problem. Two algorithms for railway
timetable verifications and rescheduling are then derived based on a propagation-
based constraint solver. We define two optimality criteria, which are used to
measure the "quality" of the rescheduled timetable. It is important to note that
the optimality criteria are defined with respect to the original timetable. Sec-
ond, based on the domain knowledge learned from domain analysis, we propose
two heuristics to speed up and direct the search towards minimum-delay optimal
and minimum-change optimal solutions respectively. The feasibility of our
proposed algorithms and heuristics are confirmed with experimentation using
real-life data. Third, we have re-constructed and enhanced the PRaCoSy running
map tool prototype.
It would be an interesting future work to study different stochastic methods
for train rescheduling. Work is also in progress to experiment our rescheduling
method on larger-scale real-life railway timetables.
Acknowledgement
We acknowledge, with pleasure, the interaction we have had with Fellows and
Staff of UNU/IIST, the United Nations University, International Institute for
Software Technology, Macau. In particular, we are indebted to Prof. Dines Bj-rner
for inviting our participation in the PRaCoSy project. We also had numerous
fruitful discussion and working sessions with S-ren Prehn, Chris George, Yulin
Dong, Liansuo Liu, and Dong Yang. Last but not least, we thank the anonymous
referees for their constructive comments, which help to improve the final version
of the paper.
--R
Railway scheduling system using repair-based ap- proach
The Zhengzhou
Fundamental algorithm for train scheduling based on artificial intelligence.
Solver Reference Manual Version 2.0
A knowledge-based approach for railway scheduling
An interactive train scheduling workbench based on artificial intelligence.
A simple running map display tool.
Consistency in networks of relations.
A railway running map design.
An executive overview.
Scheduling and rescheduling with iterative repair.
--TR | search heuristics;constraint propagation;train rescheduling |
593354 | Fourier Elimination for Compiling Constraint Hierarchies. | Linear equality and inequality constraints arise naturally in specifying many aspects of user interfaces, such as requiring that one window be to the left of another, requiring that a pane occupy the leftmost 1/3 of a window, or preferring that an object be contained within a rectangle if possible. For interactive use, we need to solve similar constraint satisfaction problems repeatedly for each screen refresh, with each successive problem differing from the previous one only in the position of an input device and the previous state of the system. We present an algorithm for solving such systems of constraints using projection. The solution is compiled into very efficient, constraint-free code, which is parameterized by the new inputs. Producing straight-line, constraint-free code of this sort is important in a number of applications: for example, to provide predictable performance in real-time systems, to allow companies to ship products without including a runtime constraint solver, to compile Java applets that can be downloaded and run remotely (again without having to include a runtime solver), or for applications where runtime efficiency is particularly important. Even for less time-critical user interface applications, the smooth performance of the resulting code is more pleasing than that of code produced using other current techniques. | Introduction
Constraints are a natural tool for user interface toolkits and other kinds of interactive
graphical systems. Some important uses in this application area include
specifying layout and other geometric information, maintaining consistency between
application data and a view of that data, and maintaining consistency among multiple
views. It is important to be able to express preferences as well as requirements
in interactive constraint systems. One important use is to express a desire for stability
when moving parts of an image: things should stay where they were unless
there is some reason for them to move. A second use is to process potentially invalid
user inputs in a graceful way. For example, if the user tries to move a gure outside
of its bounding window, it is reasonable for the gure just to bump up against the
side of the window and stop, rather than signalling an error. A third use is to balance
con
icting desires, for example in laying out a graph. The constraints needed
to specify and maintain layout information are typically linear equalities and inequalities
over the real numbers. 2 Inequality constraints in particular are needed
to express relationships such as \inside," \above," \left-of," and \overlaps." For
example, we can express the requirement that window1 be to the left of window2 as
the constraint window1.rightSide window2.leftSide. Some of these layout
constraints will be requirements, and others preferences.
For interactive systems, a typical requirement is to re-satisfy the constraints repeatedly
as the user moves some part of a gure|each time the screen is refreshed
the constraints must be re-satised. Each of these constraint satisfaction problems
diers from the previous ones only in the values of some of the constants in
the constraints (for example, the mouse position). One strategy for achieving the
required interactive response times is to compile a constraint satisfaction plan: a
block of code that can be executed repeatedly to re-solve the constraints with different
input parameters. (We can view this as a kind of partial evaluation of the
constraint solving algorithm.) This has long been done for local propagation solvers
(e.g. [1]), and more recently for simultaneous linear equations [4] and for acyclic
sets of inequality constraints [2]. However, there have not been any systems that
can compile plans for systems of constraints including a cyclic set of simultaneous
equalities and inequalities. That lack is addressed here.
The original motivation for this work was constraint solving for user interface
toolkits and other kinds of graphical interactive systems. The technique is useful for
two reasons: rst, it produces code that requires no runtime support for constraint
solving; second, the code is very e-cient. The technique should also be useful in
other applications where either of these considerations is a factor.
The ability to get rid of runtime support is important in many real software tasks.
One example of this sort is a constraint-based authoring environment for producing
Java applets, where the behaviour of the applet is partially specied using
constraints. After the applet is written and tested in the authoring environment,
the constraint compiler is used to produce straight Java code that can be shipped
over the net and run on a remote machine, without requiring a runtime constraint
solver on the remote machine. Some preliminary work on such an application has
been done [6], and we have used the constraint compiler to produce Java code for
several applets. These include an interactive demonstration of a geometric theorem,
and an abacus simulation, which were then included in web documents. As a second
example, when building an embedded real-time engine controller, predictable
performance is needed: compiled code can provide that, but calls to runtime constraint
solvers generally cannot. Finally, in developing a product, a company might
use constraints in developing the application and not want to ship a proprietary
constraint solving package with that application [8].
The compiled code is also very e-cient|our measurements show speeds from 5
to 20 times faster than the same test cases performed using a runtime solver based
on the simplex algorithm [7]. The runtime solver is reasonably e-cient as well,
and in many applications the constraint solving time is dominated by the graphics
refresh time for either technique. However, in some cases the simplex solver has
markedly varying response times|much of the time it is extremely fast, but when
a succession of pivots are required it slows down considerably, giving rise overall to
a more jerky quality to the interaction. (People prefer uniform response times to
varying ones.) The additional speed could be important in other cases as well, for
example when the compiled code is to be run on a slower processor.
In this paper we show how we can use Fourier elimination to compile heirarchical
constraint solving. 3 In Section 2, we introduce the notion of solving constraints by
projection, and show how it can be used to produce compiled code. We review the
notion of constraint hierarchies for expressing preferential constraints in Section 3,
before showing how to adapt the projection algorithm to handle hierarchical constraints
in Section 4. In Section 5, we address the issue of redundancy management.
In Section 6, we discuss some extensions to the algorithm. We examine some of the
compile-time and run-time properties of our prototype implementation in Section 7,
while in Section 8 we present some theoretical complexity results for the algorithm.
Finally, in Section 9 we conclude.
2. Solving constraints using projection
In this section we brie
y illustrate how projection can be used to nd solutions to
linear equality and inequality constraints. For the moment we will ignore preferential
constraints, and also ignore issues of compilation.
A primitive constraint in this context is a linear inequality or equality. A constraint
is a set of primitive constraints. We assume every primitive constraint is
written in a simplied form so that no variable appears twice in the same primitive
constraint. Let vars(C) denote the set of variables appearing in constraint
C, and similarly let vars(c) denote the set of variables appearing in equation or
inequality c. We denote by 9W F the existential quantication of all variables in F
except W , that is the formula 9v 1 9v 2 9v k F , where W is a set of variables and
For each variable x 2 vars(C) we can partition C in the following way. Let C 0
x
be the set of primitive constraints c 2 C where x 62 vars(c). Let
x be the set
of equations c 2 C where x 2 vars(c). Let C
x be the set of inequalities c 2 C
such that c is equivalent to an inequality of the form x e, where e is a linear
expression not involving x. Finally, let C x be the set of inequalities c 2 C such
that c is equivalent to an inequality of the form e x, again where e is a linear
expression not involving x.
The projection algorithm in Figure 1 eliminates a variable x from constraint C
and returns constraint D $ 9xC using either Gaussian elimination or Fourier
elimination.
To solve constraints we project out each variable in turn using project until no
variables remain. The resulting constraint C 0 is equivalent to 9 ; C. None of the
primitive constraints in C 0 involve any variables and hence we can straightforwardly
determine whether C 0 is satisable or not. This answers the satisability question
if exists c 2
x where c
with every occurrence of x replaced by e
else
for each c 2 C
for each c 2 C x where c e x
end for each
end for each
return D;
Figure
1. Combined Fourier-Gaussian projection
x l0 100
Figure
2. A simple constrained picture
for C. We can then use the intermediate constraints C i produced after i 1 applications
of project, as well as the variables x in their order of elimination,
to build a solution to C. For 1 i n it is the case that vars(C i g.
So Cn only contains variable xn and hence only contains constraints of the form
satisable we can nd a valuation for xn
which is a solution of Cn .
We can extend a solution of C i+1 to a solution
of C i as follows. Consider each of the constraints in C i that involve x i . If one is
an equation equivalent to x e, where e is an expression only involving variables
then we can let d contains inequalities
containing x i . These can be written in the form x i e j or e k x i , where e j
or e k is an expression only involving variables fx g. Using valuation
we can determine the minimum u of the e j and maximum l of the e k . Any
value for d i between l and u gives a valid solution of C i . The new solution is thus
g.
Figure
3. Constraint projection example
We now give an example of constraint solving using projection, using the illustration
in Figure 2. The constraints are as follows: xm is constrained to be the
midpoint of the line from x l to x r , x l is constrained to be at least 10 to the left of
x r , and all variables must lie in the range 0 to 100.
We can represent this using the constraint C 1 shown in Figure 3. To solve this
constraint using variable elimination, we start with C 1 , select a variable and project
it out, and continue until no variables remain. Suppose we rst select x l . We can
project it out using the equation yielding the constraint C 2 , and then
project out x r , yielding the constraint C 3 (where we have eliminated some simple
redundancy). Finally, eliminating xm we obtain C 4 , which is clearly satisable.
We now show how to construct a solution from these constraints. By inspecting
know we can pick any value between 5 and 95 for xm , say 50. Next we examine
the constraints in C 2 involving x r . These are fxm
100g. Given
100g. We can thus pick any value for x r
in the range [55::100], say 70. Finally, examining the constraints in C 1 , there is an
equation involving x l , namely x so we can use this equation directly
to set x l to 30.
We now use this information to compile a sequence of statements that constructs
a solution to the constraints, and returns it as a triple, illustrated in Figure 4. As
it stands this sequence of statements isn't very interesting, since it only solves one
problem. However, in Section 4 we show how to use a similar technique to compile
code parameterized by appropriate inputs.
3. Constraint hierarchies
As discussed earlier, for interactive graphics applications, it is important to be able
to express preferences as well as requirements in the constraint system; in particular
a desire for minimizing change as a gure is manipulated. We use constraint
hierarchies [5] for specifying the desired solutions to a collection of required and
preferential constraints independent of the particular algorithm involved.
x l
x u
choose xm 2 [x l
x l
x u
r := min f 2xm, 100
choose x r 2 [x l
r ::x u
r
return
Figure
4. Code to solve the constraints of Figure 2, obtained by Fourier elimination
A labelled primitive constraint is a primitive constraint labelled with a strength,
written sc, where s is a strength and c is a primitive constraint. Strengths are non-negative
integers. For clarity, we give symbolic names to the dierent strengths
of primitive constraints. Strength 0, with the symbolic name required, is always
reserved for required constraints. For the purposes of this paper we shall use the
following symbolic names for strengths: strong = 1,
but in general the approach works for any number of strength levels. Note that a
higher integer \strength" indicates a weaker constraint.
A constraint hierarchy is a multiset of labelled primitive constraints. Given a constraint
denotes the multiset of required primitive constraints in H,
with their labels removed. In the same way, we dene the multisets H
for strengths
Since we are now dealing with non-required constraints, valuations of interest
may not satisfy all constraints. Hence we need to be able to measure the degree
to which a constraint is satised. We assume that for each primitive constraint c
we have an error function e(c) that returns a non-negative real number indicating
how nearly the primitive constraint c is satised for a valuation . In the work
described here, the domain is the reals, and the error function returns a value that
varies depending on how nearly the constraint is satised. For example, the error
while the error for x y is max(0; x y).
The set S of solutions to the hierarchy is dened as follows. S 0 is the set of
valuations such that all the H 0 constraints hold; from this we form S by eliminating
all potential valuations that are worse than some other potential valuation using
the comparator predicate better.
For now we assume the use of local comparators for better, which compare two
solutions primitive constraint by primitive constraint. (In Section 6, we will look
at how we can extend our approach to certain kinds of global comparators.) A
valuation is locally-better than another valuation if, for each of the primitive
(a) (b) (c) (d)
Figure
5. Demonstrating a theorem about quadrilaterals
constraints through to some strength level k 1, the error after applying is equal
to that after applying , and at level k the error is strictly less for at least one
primitive constraint and less than or equal for all the rest.
locally-better
A locally-better comparator with such an error function is known as locally-error-
better.
A traditional demonstration of constraint-based graphics is the Quadrilateral Theorem
illustrated in Figure 5. The screen snapshots are taken from our Smalltalk
implementation, which uses the code produced by the projection algorithm. Each
side of the quadrilateral is bisected, and lines are drawn between the midpoints
(these inner lines always form a parallelogram). This is expressed as a constraint
on each midpoint that it lie halfway between the endpoints of its line.
In addition, all points are constrained to be at least 10 pixels from the sides of
the window, the north vertex is constrained to be at least 30 pixels above the south
vertex, and the east vertex is constrained to be at least 30 pixels to the right of the
west vertex (the latter two so that the quadrilateral cannot collapse to a point).
Taken together, these constraints are too di-cult for most UI constraint solvers,
since they involve cyclic equality and inequality constraints.
In
Figure
5(a) we have picked up one of the midpoints with the mouse and begun
to move it by temporarily adding an edit constraint equating the position of the
midpoint and the mouse. This constraint is strongly preferred but not required|we
will violate it if necessary. The corner points are weakly constrained to stay where
they are by stay constraints. The constraint heirarchy representing the quadilateral
problem is shown in Figure 6, where (n x are
the coordinates for the north, east, south and west vertices, respectively. The
coordinates of the midpoints are (ne x ; ne y ), (se x ; se y ), (sw x ; sw y ) and (nw x ; nw y ).
(Mouse x ; Mouse y ) are the current coordinates of the mouse, and old(n x ), old(n y ),
required 2ne
required 2ne
required 2se
required 2se
required 2sw
required 2sw
required 2nw
required 2nw
required n y s y
required e x w x
required
required
strong se
strong se
Figure
6. Constraint heirarchy representing the quadrilateral problem
etc. give the old coordinates of the points (where we want them to stay). The strong
edit constraints ensure that the south east midpoint tries to follow the mouse, while
the weak stay constraints try to maintain the corner points in their old positions.
In
Figure
5(b) the mouse has been moved to the right, and to keep the midpoint
constraint satised the east vertex moved as well. We continue moving
to the right. In Figure 5(c) the east vertex has run into the imaginary wall resulting
from the constraint that it be at least 10 pixels from the window boundary, and
can move no further. As a result, in order to maintain the midpoint constraint, the
south vertex moving instead. Finally, in Figure 5(d) the mouse
has moved beyond the permitted region for the midpoint. The midpoint has moved
as close to the mouse as possible, thus causing the two endpoints of its line to be
pressed against the boundary as well.
Formally, the stay and edit constraints from this example are simply constraints
of the form constant b. However, when we come to compile
code for repeatedly solving a collection of constraints, it will be important to handle
these constraints e-ciently, since the value of b will change for each solution: for
the stay constraints, it will be the value of v on the previous step; for the edit
constraints, it will come from some external input. The other constraints will
remain unaltered for each step.
4. Compiling projection for hierarchies
We can now describe the complete algorithm for compiling code that can repeatedly
nd a locally-error-better solution to a constraint hierarchy given a series of input
values. We assume the constraint hierarchy is in hierarchical normal form. In this
form, the only kind of preferential constraints are ones of the form
variable v and constant b; all other constraints are required (i.e. we must satisfy
them in any solution). In practice the original problem will usually already be in
this form. If not, it is easy to transform an arbitrary linear constraint hierarchy
into this form by adding error variables. For example, strong(e b), where e is a
linear expression, becomes required(e b e is a new
error variable.
Recall that a hierarchical constraint H can be separated into parts H i , each of
which contain the primitive constraints of strength i. If H is in hierarchical normal
form, then for i 1 H i will contain only equations of the form
a variable and b is a constant. We can use this information to build a strength
partitioning of the variables. Let V i be dened as follows:
contains those variables whose strongest non-required primitive constraint
is of strength i. For simplicity, we assume that every variable is involved in a non-required
constraint. This will normally be the case in constraint-based graphics
applications. (If not, we can add a very weak stay constraint|weaker than any of
the existing constraints|to any variable not otherwise involved in a non-required
constraint. Any locally-error-better solution to the new hierarchical constraint will
also be a locally-error-better solution to the original constraint.)
Consider solving the constraints for Figure 2 augmented with the preferential
constraints strong(x
and H g. The strength partitioning of the variables gives
g.
Now we can use the projection algorithm to build code for solving hierarchical
normal form constraints, where each problem diers from the others only in the
values of the constants b in the non-required primitive constraints. Each problem
corresponds to a solution of the constraint heirarchy required to determine the
positions of objects for a screen refresh during the manipulation of the diagram.
We apply the projection algorithm to eliminate all variables in the set V j before
eliminating any variables in V i where i < j. A total ordering x 1 x 2 xn
on the variables x in a hierarchical normal form constraint H respects the
hierarchy if
Returning to our example of solving the constraints on Figure 2 augmented with
l ), an ordering that respects the
heirarchy is xm x r x l .
The full algorithm for generating code takes an ordering of variables
and the required constraint C. To solve the constraint C in
conjunction with H 1 , H 2 , . , H k , for each variable x l we select a constraint
that is, we arbitrarily choose one of the highest strength non-required
constraints on x i to determine the value b i . Making such a choice is
correct because of the locally-error-better comparator: minimising the error of one
of the strongest non-required constraints will always give a locally-error-better so-
for
end for
for i := n to 1
if exists c 2 C i where c x
else
minset := ;; maxset := ;;
for each primitive constraint c 2 C i where x
if c e x i then
minset
else if c x i e then
maxset
end for each
emit( else if b i x l
end for
emit( return
Figure
7. Code generation algorithm
lution. (By choosing a dierent constraint of the same strength, we would compute
a dierent but still valid locally-error-better solution.)
The code produced by the algorithm in Figure 7 will either set x i to b i if this is
a legitimate choice given the solution determined so far, or set x i to its lower or
upper bound, whichever is closest to the value b i .
Theorem 1 (Correctness of code generate) Let C be a constraint with variables
g. Given a variable ordering x 1 x 2 xn for variables
in constraint C, the solution (d returned by the code produced by
code will be a locally-error-better solution for the constrain
is the same as or
weaker than strength s i ).
Proof: The value for each variable is chosen from the available range of values
for that variable as determined by Fourier-Gaussian elimination. Thus, by the correctness
of Fourier-Gaussian elimination, the algorithm always produces solutions
that satisfy the required constraints in C. It remains to show that the solution
produced is also locally-error-better.
Assume to the contrary that (d not a locally-error-better solution to
the constraints. Then there exists another solution (d 0
n ) that is locally-error-
better than (d be the largest index where d 0
We examine
the selection of the value of the variable x j . By the correctness of Fourier-Gaussian
elimination,
9 fx j ;:::;x ng C
ng C)
Given that the variables x take the values d respectively, then
clearly the only solutions of x j in C j are in the range [x l
. Hence the error for the equation
is greater for the solution (d 0
means
n ) is not locally-error-better than (d since it has a greater error
in the equation x has the same error for every non-required
equation of higher strength.
Otherwise, if b j < x l
j and so d 0
j must be in the
range [x l
]). Again the error for the constraint x is greater for (d 0
than for (d which implies that (d 0
n ) is not locally-error-better than
The remaining case of b j > x u
j is similar.
Continuing with our running example of compiling the constraints for Figure 2
augmented with strong(x l ), the resulting
code is shown in Figure 8. Note the very high similarity of this code with that of
Figure
4.
Suppose the midpoint of the line is selected by the mouse to move to position
60, and the remaining points are constrained to stay where they are
and x 70). This then imposes constraints strong(x
which the code in Figure 8 generates the answer (60; 70; 50).
If the mouse now moves to position 70, the edit and stay constraints translate as
and the code generates the answer
(70; 75; 65). If the mouse now moves to position 0, the code generates the answer
(5; 10; 0).
5. Redundancy management
One of the problems with Fourier elimination is that a large number of constraints
can be produced (potentially an exponential number), many of which are redundant.
For a constraint compiler based on Fourier elimination to succeed, it is crucial
x l
x u
else
xm := x l
else xm := x u
x l
x u
r := min f 2xm, 100
r ::x u
r
else if b r < x l
r
x r := x l
else x r := x u
return
Figure
8. Code for the midpoint example constraints
that the issue of redundant constraints be addressed. Detecting and eliminating all
redundancy is not very practical, but there are a number of types of redundancy that
are cheap to detect, while still being eective at keeping the number of redundant
constraints down.
One of these is quasi-syntactic redundancy. A primitive constraint
is quasi-syntactically redundant with respect to
or c 2 a 1 x
this is the case c 1 can be dropped without aecting the result. This
test is inexpensive, O(n log n) for testing n primitive constraints, yet allows us to
get rid of a signicant number of redundant constraints.
The other main class of redundancy which we detect and eliminate targets the output
constraints. During the projection process, the best known (constant) bounds
are maintained for each variable. Then when a variable (say x) is to be eliminated,
the constraints that are to yield upper and lower bounds for x are examined. Any
constraint that can be shown to be redundant with respect to another, by using
the bounds information accumulated earlier, is discarded. Doing this redundancy
elimination at this point can drastically reduce the size of the cross-product formed
during the elimination of x, and also directly reduces the number of compiled constraints
The bounds information is used by evaluating the minimum and maximum values
an expression can take, subject to the known bounds. Best use is made of this by
examining the expressions for, say, the upper bounds on x in a pairwise fashion, and
evaluating the dierence between the expressions. If the minimum possible value
of the dierence is non-negative, the rst expression is guaranteed to be no smaller
than the second; if the maximum value is non-positive, it is guaranteed to be no
larger. In both of these cases, one of the constraints may be discarded as redundant;
otherwise, no redundancy information can be deduced. By evaluating the dierence
of the constraints in this fashion, rather than each constraint individually, one is
able to obtain much more redundancy information. For example, suppose we have
bounds on x of x 2y, x y + 10, and we know that 5 y 5. For the rst
bound, we can deduce that it lies between 10 and 10; for the second it is between
5 and 15. Since 5 < 10, we cannot guarantee that the rst constraint will always
be tighter than the second. However, if we look at the dierence (y 10), we can
work out that it lies between 15 and 5, and thus can guarantee that the rst
constraint will always be tighter than the second, and so can discard the latter as
redundant.
The second main approach to managing redundancy is to try to minimise the
number of redundant constraints generated in the rst place. This can be done by
being clever about the order in which variables are eliminated. The algorithm as
it stands leaves us reasonable freedom in the choice of which variable to eliminate
(we can choose variables at the same strength in any order we like). Some simple
heuristics about which variable to eliminate next can make a substantial dierence
to the number of constraints generated. An obvious and useful heuristic is to
choose a variable appearing in an equation, so that Gaussian elimination can be
used rather than Fourier. If there are no such variables, choosing x that minimises
x jjC x j can work well (this minimises for the next step the sum of the number of
output constraints and the number of constraints remaining, prior to redundancy
elimination). The actual heuristic we use counts the number of linear terms in
the constraints, rather than the number of constraints, since this discourages the
formation of constraints with many terms, which are particularly problematic for
Fourier elimination.
We have based a more reasoned approach to selecting which variable to eliminate
next on the results of Theorem 4 (see Section 8). This often allows us to process
relatively small groups of variables and constraints at any given time, which limits
the scope for producing redundant constraints. In practice, this approach seems to
work well.
6. Renements
In this section we discuss some renements to the solver that would appear to
increase the class of problems it can solve, but can be implemented simply by
altering the input to the main algorithm.
required
required
required x l 0
required xm 0
required xr 0
required x l 100
required xm 100
required xr 100
strong x
Figure
9. Midpoint example|local comparator version
6.1. Optimising a function
Rather than just returning any solution satisfying the input constraints, it is possible
to optimise a linear objective function. This can be done by introducing a new
variable representing the value of the objective function, plus a required constraint
relating it to the variables it depends on. Then a constraint of an appropriate
strength can try to set the value of the objective function to some suitably large
or small (minimise) value. 4
Note that one can actually have as many objective functions at as many dierent
strengths as one wants. For instance, one could optimise a particular function
subject to only the required constraints, then optimise another subject to the rst
remaining optimal, then add some non-required constraints on the values of some
variables, and then apply a nal optimisation: all by assigning appropriate strengths
to each. Note that normally an objective function would not share its strength
with anything else. For example, if two objective functions were assigned the same
strength, the solver would be free in its choice of which to optimise rst. Allowing
such a choice would not usually make sense unless the objective functions were
independent of each other.
6.2. Global comparators
In Sections 3 and 4, we assumed that we were working with local comparators.
However, it is possible to achieve an eect equivalent to using any linear global
comparator. The way this is done is similar to the introduction of an objective
above, except that this time the function is in terms of error variables.
This may require the introduction of extra error variables which were not needed
before, as well as some required non-negativity constraints on the error variables.
required
required
required x l 0
required xm 0
required xr 0
required x l 100
required xm 100
required xr 100
strong x
required x l
l
required xm
required xr
r
required e
l 0
required e l 0
required e
required e m 0
required e
required e r 0
required e
l
Figure
10. Midpoint example|global comparator version
Consider the simple midpoint example again, where we have added weak stay
constraints on x l , xm and x r , plus a strong constraint on x l . These constraints
are shown in Figure 9. Suppose we wish to minimise the sums of the errors in the
constraints, with medium strength. The error in the weak constraint x
is jx r Rj. We cannot encode this error directly using a linear constraint due
to the modulus. Instead, we introduce a pair of new variables to represent the
error: one for when the dierence is negative, and one for when it is positive. If
each of these variables is then constrained to be non-negative, their sum can be
used to represent the error. 5 Thus we have x r
r , with e
r 0 and
e r 0. Taking into consideration all the weak constraints, the global error is then
l
g. To minimise this, we also add, with medium
strength, The nal result is shown in Figure 10. Note that we have kept the
stay constraints, to ensure that the variables are set to particular values.
As can be seen, and not too surprisingly, using global comparators comes at a
cost, in terms of the size and number of the constraints to be compiled.
7. Computational results
The projection-based compilation algorithm has been implemented and tested. Our
prototype implementation is in Mercury [14], and includes a module that is easily
adapted to generate code for dierent target languages. The current implementation
produces Smalltalk code, which is stored in a le. Then, in the Smalltalk
environment, the code is loaded and incorporated into a graphics application for
execution. The advantages of using Smalltalk are that Smalltalk includes an extensive
graphics library, making it easy to test interactive graphical programs, and
also that we have a Smalltalk implementation of Cassowary, a simplex-based solver,
which allows a head-to-head comparison of the run times of the two algorithms.
We have investigated the performance of our algorithm for several medium-sized
examples of constraints for interactive graphics.
The boxcars benchmark has a number of boxes in a horizontal row. Each box is
constrained to be to the right of the previous one, and all are constrained to stay
within a specied horizontal range.
The binary tree benchmark is a complete binary tree of a given height. Each pair
of children are constrained to be at the same height, both must be at least some
minimum distance below their parent, and they must be separated from each other
by some minimum distance. All parent nodes must be centred over their children,
and nally every node must lie within a certain bounding box. This formulation has
some redundancy|we could have specied only that the left child be the minimum
distance below the parent, rather than both the left and right children, since the
children are at the same height. However, this redundancy arises naturally in the
specication.
The grid benchmark is an n n grid of points where every point is constrained
to be on an imaginary vertical line through the points above and below it, and on
a horizontal line through the points to the left and right. No point can be within
a given distance of its neighbours, and all points lie within a given box. Again this
specication leads to redundancy in the constraints.
The compilation results are shown in Table 1. For each benchmark we give the
following information:
the number of variables in the original formulation;
the number of primitive constraints in the original formulation;
the typical number of primitive constraints in the compiled code (that is, the
number of inequalities used for minset and maxset calculations, plus the equations
used to emit calculation code, for a typical choice of edit variable(s));
and
the typical CPU time required for the Mercury program to produce the Smalltalk
code
The compilations were done on a DEC AlphaServer 8400 with eight 300 MHz 21164
processors.
The compiled versions did not suer from an exponential blow-up in the number
of primitive constraints, and indeed all contain fewer constraints than were in the
input, the reduction being due to the redundancy elimination performed during
projection.
The code produced is extremely e-cient, and also has predictable performance
irrespective of the input values. Table 2 gives some measurements of the execution
speed of the compiled code as compared with the execution speed of the Cassowary
constraint solver [7], which uses an e-cient simplex-based algorithm specically
adapted for repeatedly solving constraints arising in interactive graphics applica-
tions. All timings were done using OTI Smalltalk Version 4.0, running on an IBM
Thinkpad 760EL laptop computer.
Table
1. Compilation statistics
Problem size variables primitive compiled time
constraints constraints (secs)
boxcars 50 50 149 100 0.7
100 100 299 200 1.4
200 200 599 400 4.5
binary tree 5 62 199 111 0.5
9 1022 3319 1910 46.2
Table
2. Runtime statistics
Problem Time (milliseconds) Avg. # of pivots
Fourier Cassowary Graphics (Cassowary only)
50 boxcars 1.0 5.0 38.0 0.11
(infrequent collisions)
50 boxcars 1.0 16.0 38.0 0.51
(frequent collisions)
depth 5 tree 5.3 68.6 46.0 1.55
(frequent collisions)
depth 5 tree 5.3 124.5 46.0 3.77
(v. frequent collisions)
The times shown are the average number of milliseconds to perform one update,
i.e. to solve the constraint problem with a new value for the mouse position. The
Fourier and Cassowary times are both without graphics refresh; the additional
refresh time is shown in the \Graphics" column. Finally, for Cassowary, the last
column gives the average number of simplex pivots per update. There are two
dierent runs given for the boxcars example, one with the input varying slowly, so
that collisions between the boxcars are relatively infrequent, and another with more
rapidly varying input, causing more collisions. The time to run the Fourier code
is the same for both cases; however, with frequent collisions the Cassowary time
per update increases substantially. The reason is that a collision generally requires
a pivot in the simplex tableau, which is expensive; when there is no collision, the
tableau can be updated very e-ciently with no pivoting required. There are also
two runs for the tree example. We used a tree with the node displays closely spaced,
so that there were many collisions (a moving node bumping into a stationary one)
in both cases; the second run involved moving the mouse more quickly to generate
even more collisions.
For these examples the Fourier code is approximately 5 to 20 times faster than
the runtime simplex solver. For the relatively simple constraints of the boxcars
example, the graphics refresh time is substantially more than the time required to
satisfy the constraints in any of the tests. However, when using the simplex solver
for the tree example, the constraint solving time becomes signicant compared to
the graphics refresh time. In addition, the simplex solver has variable solving time,
which is quite apparent when the mouse is moved very quickly on this example|
often the update is extremely fast, but when numerous pivots are needed it slows
down, giving a less pleasant jerky quality to the interaction. In fairness to the
simplex approach, it should be possible to extrapolate the current direction of the
mouse movement and pre-solve some of the pivots; but this has not been done in any
of the current systems. In addition, for use with real-time systems the predictable
response provided by the compiled Fourier code is essential.
8. Complexity analysis
Most variable elimination algorithms have bad worst case complexities. Projecting
one variable from a system of m linear inequalities produces O(m 2 ) inequalities in
the worst case. Hence eliminating n variables from m primitive constraints can
be O(m 2 n
However, our empirical results so far have shown quite reasonable
performance for practical problems. In this section we attempt to analyse the
situation and point out reasons for this.
One major factor in the reasonable performance of our algorithm is that in many
practical problems each primitive constraint only involves a small number of vari-
ables, and hence the worst case does not arise. There are also a number of restricted
cases that do have much more reasonable worst case complexities. One
such restricted case is when each constraint involves at most 2 variables. The grid
benchmark above falls into this category. The following result is due to Nelson [12].
Theorem 2 Let C be a set of m inequalities involving n variables where each inequality
involves at most 2 variables. Fourier elimination is O(mn d2 log ne+3 log n).
Another example where the worst case phenomena cannot occur is when almost
all of the constraints are equations.
Theorem 3 Let C be a constraint involving n variables, m linearly independent
equations, and l inequalities. Then there is a choice of variable elimination order
where Fourier elimination is O(nm(m
Proof: Use the equations to eliminate m variables, leaving l inequalities in n m
variables. The result follows.
It also appears that, in many practical constraint problems in interactive graph-
ics, the constraints are not tightly connected. We examine a class of constraint
graph which is not tightly connected. A constraint graph for a constraint C is
an undirected graph constructed as follows. There are nodes for each variable in
and each primitive constraint c 2 C. There is an edge between variable
node v and primitive constraint node c if v 2 vars(c). Two nodes x and y in a
graph G are bi-connected if there exist two node-distinct paths in G from x to y. A
bi-connected component of a graph G is a maximal set of nodes N such that each
bi-connected in G. A constraint graph G is k-bi-connected if
there are no bi-connected components of G with more than k variable nodes. The
binary tree benchmark is an example where the constraint graph is 3-bi-connected.
Theorem 4 Let C be a constraint involving n variables and m primitive constraints
whose constraint graph is k-bi-connected. Then there is a choice of variable
elimination order where a slightly modied Fourier elimination algorithm with
quasi-syntactic redundancy elimination is O(nm 2 k
Proof: We start by forming each bi-connected component of the graph into a
cluster. These clusters form a tree (or a forest, if the original graph was not fully
connected). We proceed to eliminate the clusters one at a time, starting at the
leaves.
A leaf cluster will be connected to the rest of the tree via a single node. If
that node represents a variable, say x, our task is easy. We simply project all the
constraints in the cluster onto x. The only possible resultant constraints on x are
bounds, and using quasi syntactic redundancy there can be at most two: l x and
x u. These bounds are added to the parent cluster.
If, on the other hand, the connecting node represents a constraint, we introduce a
temporary variable t and split the constraint rst. Let the constraint be of the form
where op is either or =, e 1 is a linear expression containing only
variables included in the cluster, and e 2 is a linear expression containing no variables
from the cluster. Then the constraint is split into e 1
the former being added to the current leaf cluster, the latter replacing the original
constraint, and the variable t being added to the parent cluster. We then project
all the constraints in the current leaf cluster onto t, and add the resulting bounds
to the parent cluster, as before.
Note that the introduction of temporary variables can increase the number of
variable nodes in a cluster. Each temporary variable appears in exactly one equation
and at most two bounds constraints, though we note that more than one temporary
variable may appear in the same equation (if the original constraint was a cut
node where several bi-connected components met). If we eliminate the temporary
variables rst, it is easy to see that each equation involving temporary variables
yields at most two inequalities involving the remaining variables, and that this
elimination is O(l), where l temporary variables were involved. This then leaves a
cluster with at most k variables to which the standard Fourier elimination will be
applied.
Eliminating the variables in a leaf cluster never adds more constraints to the
parent cluster than were eliminated in the leaf; hence the maximum number of
constraints in any cluster at any given time is m. The maximum number of variables
eliminated in any cluster when the standard algorithm is applied is k. Hence
processing one cluster with the standard algorithm is O(m 2 k ). There are at most
n clusters in the tree, and thus at most n temporary variables introduced. Hence
the complexity result holds.
Theorem 4 in particular constrains the order in which variables can be elimi-
nated. In interactive graphics problems there are typically two variables with edit
constraints (the x and y coordinates of a point being moved). These variables must
be eliminated last. This is compatible with the ordering required by the theorems
if the x and y constraints are independent (as is the case in all our examples, and
in many other cases as well). However, if the problem includes constraints relating
the x and y coordinates (e.g. that a shape be a square), then we may be unable to
use the complexity guarantees provided by the theorems.
9. Conclusions
Fourier elimination can be used to generate very fast, constraint-free code to solve
problems arising in interactive graphical applications. The approach is useful for
applications such as real-time systems which need predictable performance, for
smoothing the response time in an interactive system, for producing applications
that can be run without employing a runtime constraint solver, and when execution
speed is very important.
The same approach of compiling constraint solving by projection can be applied
to any constraint domain that has a variable elimination function that projects
one variable out of a constraint, along with a method for nding solutions of a
conjunction of constraints in one variable. Constraint domains that meet these
requirements include Boolean constraints, unit two variable per inequality (integer)
constraints [11], and partial order constraints.
The current algorithm is a batch one. A direction for future research is the design
of an incremental version, which would reuse part of a previous solution when
accommodating changes in the constraint (beyond simply changing the constants
in the
Some previous work has involved hybrid constraint solving algorithms, which partition
a set of constraints into regions that can then be turned over to an appropriate
sub-solver for that class of constraint and constraint topology [3]. Compilation
based on Fourier elimination is a promising candidate for use in this architecture,
to handle cyclic collections of linear equality and inequality constraints.
Theorem 4 is particularly interesting, because it shows how the structure of the
constraints to be solved can be exploited to make the actual solving more e-cient.
Sabin and Freuder [13] have also studied how the structure of the constraint graph
can be exploited; in their case, they demonstrate substantial improvements in the
solving time of random binary CSPs, by identifying (an approximation of) the
cycle cutset of the constraint graph. This seems a very interesting area to explore
further.
Acknowledgements
This project has been funded in part by the National Science Foundation Grant
IIS-9975990, Australian Research Council Large Grant A10017012. Alan Borning's
visit to the University of Melbourne was sponsored in part by a Fulbright award.
Notes
1. Current address wh@icparc.ic.ac.uk, IC-Parc, William Penney Laboratory, Imperial College,
Exhibition Road, London SW7 2AZ, United Kingdom
2. Note that while user interface objects will be mapped to particular pixel locations on the
display, and thus their coordinates should, in theory, be integral, in practice this is usually
not necessary (or desirable). For most applications, rounding real coordinates to the nearest
integer point is quite appropriate, so locations on the screen are treated as reals to make the
constraint solving easier. In this work we assume coordinates are reals. We note that non-linear
constraints do arise in user interface applications for such attributes as areas and angles,
and nite domain constraint also arise in handling fonts. In such cases more sophisticated
techniques are required (e.g. [9]).
3. An earlier version of this paper appears as [10].
4. MAXFLOAT or similar should be su-cient for most applications, but if not, it would be trivial
to change the solver to implement this feature directly.
5. Strictly, their sum is only an accurate representation of the error when at least one of the
variables is zero, but this will be guaranteed by minimising the global error.
--R
The programming language aspects of ThingLab
Indigo: A local propagation algorithm for inequality constraints.
The OTI constraint solver: A constraint library for constructing interactive graphical user interfaces.
Ultraviolet: A constraint satisfaction algorithm for interactive graphics.
Constraint hierarchies.
Constraints for the web.
Solving linear arithmetic constraints for user interface applications.
Object Technology International
Compiling constraint solving using projection.
An n log n algorithm for the two-variable-per-constraint linear programming satis ability problem
Understanding and improving the MAC algorithm.
The execution algorithm of Mer- cury: an e-cient purely declarative logic programming language
--TR
--CTR
Jakob Mauss , Frank Seelisch , Mugur Ttar, A constraint solver for model-based engineering, AI Communications, v.17 n.2, p.75-92, April 2004 | linear arithmetic constraints;fourier elimination algorithm;user interfaces;hierarchical constraints;constraint compilation |
593358 | Consistency Techniques in Ordinary Differential Equations. | This paper takes a fresh look at the application of interval analysis to ordinary differential equations and studies how consistency techniques can help address the accuracy problems typically exhibited by these methods, while trying to preserve their efficiency. It proposes to generalize interval techniques into a two-step process: a forward process that computes an enclosure and a backward process that reduces this enclosure. Consistency techniques apply naturally to the backward (pruning) step but can also be applied to the forward phase. The paper describes the framework, studies the various steps in detail, proposes a number of novel techniques, and gives some preliminary experimental results to indicate the potential of this new research avenue. | Introduction
Differential equations (DE) are important in many scientific applications in areas such as physics, chemistry,
and mechanics to name only a few. In addition, computers play a fundamental role in obtaining solutions to
these systems.
The Problem A (first-order) ordinary differential equation (ODE) system O is a system of the form
un
In the following, we use the vector representation u simply, Given
an initial condition assuming existence and uniqueness of solution, the solution of O is a
function s O and the initial condition s . Note that differential equations
of order p (i.e. f(t; u; u can always be transformed into an ODE by introduction of new
variables. Although an ODE system can potentially be transformed into autonomous ODE
the addition of a new function un+1 (t) (with u 0
prefer to keep the time
variable explicit for a clearer presentation of some of our novel techniques. However, the autonomous form
is more appropriate for some treatment such as automatic differentiation.
There exist different mathematical methods for proving the existence and uniqueness of a solution of an
ODE system with initial value. But, in practice, a system is generally required, not only to prove existence,
but also to produce numerical values of the solution s (t) for different values of variable t. If, for some classes
of ODE systems, the solution can be represented in closed form (i.e. combination of elementary functions), it
is safe to say that most ODE systems cannot be solve explicitly [Hen62]. For instance, the innocent-looking
equation cannot be solved in terms of elementary functions!
Discrete variable methods aim to approximate the solution s (t) of any ODE system, not over a continuous
range of t, but only at some points t methods include one-step methods (where
is approximated from the approximation methods (where s
? Proceedings of the Fourth International Conference on Principles and Practice of Constraint Programming, LNCS,
1998.
approximated from the approximation In general, these methods
do not guarantee the existence of a solution within a given bound and may suffer from traditional numerical
problems of floating-point systems.
Interval Analysis in ODE Interval techniques for ODE systems were introduced by Moore [Moo66]. (See
[BBCG96] for a description and a bibliography of the application of interval analysis to ODE systems.) These
methods provide numerically reliable enclosures of the exact solution at points t To achieve
this result, they typically apply a one-step Taylor interval method and make extensive use of automatic
differentiation to obtain the Taylor coefficients [Moo79, Ral80, Ral81, Cor88, Abe88]. The major problem of
interval methods on ODE systems is the explosion of the size of resulting boxes at points t There
are mainly two reasons for this explosion. On the one hand, step methods have a tendency to accummulate
errors from point to point. On the other, the approximation of an aribitrary region by a box, called the
wrapping effect, may introduce considerable imprecision after a number of steps. One of the best systems in
this area is Lohner's AWA [Loh87, Sta96]. It uses the Picard iteration to prove existence and uniqueness and
to find a rough enclosure of the solution. This rough enclosure is then used to compute correct enclosures
using a mean value method and the Taylor expansion on a variational equation on global errors. It also
applies coordinate transformations to reduce the wrapping effect.
Goal of the Paper This paper mainly serves two purposes. First, it provides a unifying framework to
extend traditional numerical techniques to intervals. In particular, the paper shows how to extend explicit
and implicit, one-step and multi-step, methods to intervals. Second, the paper attempts to take a fresh look
at the traditional problems encountered by interval techniques and to study how consistency techniques may
help. It proposes to generalize interval techniques into a two-step process: a forward process that computes an
enclosure and a backward process that reduces this enclosure. In addition, the paper studies how consistency
techniques may help in improving the forward process and the wrapping effect.
The new techniques proposed in this paper should be viewed as defining an experimental agenda to be
carried out in the coming years. The techniques are reasonably simple mathematically and algorithmically
and were motivated by the same intuitions as the techniques at the core of the Numerica system [VHLD97].
In this respect, they should complement well existing methods. But, as it was the case for Numerica, only
extensive experimental evaluation will determine which combinations of these techniques is useful in practice
and which application areas they are best suited for. Very preliminary experimental results illustrate the
potential benefits.
The rest of this paper is organized as follows. Section 2 provides the necessary background and notations.
Section 3 presents the generic algorithm that can be instantiated to produce the various methods. Section 4
describes how to find bounding box. Section 5 describes the step methods used in the forward phase. Section
6 describes the backward pruning based on box-consistency. Section 7 discusses the wrapping effect. Section
presents some experimental results. Section 9 concludes the paper.
Background and Definitions
This paper uses rather standard notations of interval programming. F denotes the set of F-numbers, D the
set of boxes ' ! n whose bounds are in F , I the set of intervals ' ! whose bounds are in F , and D (possibly
subscripted) denotes a box in D. Given a real r and a subset A of ! n , -
r denotes the smallest interval in
I containing r and 2A the smallest box in D containing A. If g is a function, -
and G denote interval
extensions of g. We also use g i (x) and G i (D) to denote the i th component of g(x) and G(D).
The solution of an ODE system can be formalized mathematically as follows.
Solution of an ODE System with Initial Value. A solution of an ODE system O with
initial conditions u(t 0 O and the initial conditions s
In this paper, we restrict attention to ODE systems that have a unique solution for a given initial value.
Techniques to verify this hypothesis numerically are given in the paper. Moreover, in practice, as mentioned,
the objective is to produce (an approximation of) the values of the solution function s of the system O
at different points t . It is thus useful to adapt the definition of a solution to account for this
practical motivation.
Solution of an ODE System. The solution of an ODE system O is a function
such that s(t is the solution of O with initial conditions u(t 0
The solution of an ODE system O can be used to obtain the solution of O at any point for any initial value.
It is useful to extend our definition to sets of values.
Solution of an ODE System. Let s be the solution of an ODE system O. The set
solution O at t 1 wrt t 0 and D is the set s(t
The interval techniques presented in this paper aim at approximating set solutions as tightly as possible.
The next definition introduces the concept of bounding box that is fundamental to prove the existence and
the uniqueness of a solution to an ODE system over a box and to bound the errors.
Bounding Box. Let s be the solution of an ODE system O. A box B is a bounding box of s
in
Informally speaking, a bounding box is thus an enclosure of the solution on the whole interval
following theorem is an interesting topological property of solutions.
Theorem 5. Let O be an ODE system u s be the solution of O (i.e. existence and
uniqueness), and let F r be the frontier of D. Then,
1. closed set;
2. is the frontier of s(t
Proof. (Sketch) Under the given hypothesis, s 2 C [Har64]. It can then be shown that a point in D n F r
cannot belong to the frontier of s(t
As a consequence, s(t can be computed by considering the frontier of D j only.
3 The Generic Algorithm
The interval methods described in this paper can be viewed as instantiations of a generic algorithm. It
is useful to present the generic algorithm first and to describe its components in detail in the rest of the
paper. The generic algorithm is parametrized by three procedures: a procedure to compute a bounding box,
since bounding-boxes are fundamental in obtaining enclosures, a step procedure to compute forward, and a
procedure to prune by using step procedures backwards. Procedure BoundingBox computes a bounding
box of an ODE system in an interval for a given box. Procedure Step computes a box approximating the
value of s (t j ) given the approximations of s and the bounding boxes
Procedure Prune prunes the boxes D j at t j using the box D j \Gamma1 at . The intuition underlying the basic
step of the generic algorithm is illustrated in Figure 1. The next three sections review these three components.
Note however that it is possible to use several step procedures, in which case the intersection of their results
is also an enclosure.
begin
forall(j in 1::n)
begin
Fig. 1. Computing correct enclosures of the solution
4 The Bounding Box
This section considers how to obtain a bounding box for an ODE system. As will become clear later on,
bounding boxes are fundamental to obtain reliable solutions to ODE systems. The traditional interval techniques
to obtain bounding boxes are based on Picard operator [Har64, Moo79].
Theorem6 (Picard Operator). Let D 0 and B be two boxes such that D 0 ' B, let
O be an ODE system u continuous and has a Jacobian (i.e first-order
partial derivatives) over \Phi be the transformation (Picard Operator)
where F be an interval extension of f .
If \Phi(B) ' B, then 1. The O system with initial value u(t has a unique solution s;
2. \Phi(B) is a bounding box of s in [t
Theorem 6 can be used for proving existence and uniqueness of a solution and for providing a bounding box
[Loh87, Cor95]. A typical algorithm starts from an approximation B applies Picard operator.
If \Phi(B 0 ) 6' B, the algorithm widens B 0 into B 1 (e.g., by doubling its size) and iterates the process. The
algorithm can also narrow the step size. Note that the existence of Jacobian(f) can be checked numerically
by evaluating its interval extension over the box. Note also that the Picard operator uses a Taylor expansion
of order 1. It can be generalized for higher orders, which is interesting to increase the step sizes.
5 The Step Methods
This section describes the step methods. The step methods are presented in isolation. However, as mentioned
previously, they can be used together, since the intersection of their results is also a step method.
5.1 Explicit One-Step Methods
This section considers one-step methods: It first describes traditional numerical methods, moves to traditional
interval methods, and proposes improvements which can be obtained from consistency techniques.
Traditional Numerical Methods To understand traditional interval methods, it is useful to review
traditional numerical methods. In explicit one-step methods, the solution s of an ODE system O is viewed
as the summation of two functions:
where the function sc can always be computed while the function e cannot. As a consequence, a traditional
numerical method based on an explicit one-step method is an algorithm of the form
forall(i in 1::n)
This algorithm tries to approximate the solution s (t) for an initial value u(t
Example 1 Taylor Method. The Taylor method is one of the best known explicit one-step methods where the
function sc is given by the Taylor expansion of a given order p, i.e.,
Interval Methods The key idea underlying (explicit or implicit) one-step interval methods is to define
an extension of the interval solution s. 3
Interval Solution of an ODE System. Let s be the solution of an ODE system O. An
interval solution of O is an interval extension S of s, i.e.
As a consequence, a traditional interval method based on an one-step method is an algorithm of the form
forall(i in 1::n)
This algorithm provides safe intervals for s (t 1
Direct Interval Extensions Traditionally, interval solutions are often constructed by considering an
explicit one-step function s(t by taking an interval extension SC of sc
and by using a bounding box to bound the error function e to obtain a function of the form S(t
Direct Explicit One-Step Interval Extension. Let s be an explicit one-step solution of
an ODE system O of the form
A direct explicit one-step interval extension of s is an interval solution S of the form
where SC is an interval extension of sc, B 0 is a bounding box of s in [t is an interval
extension of e.
3 As usual, interval solutions could also be defined on particular subsets of F and D.
Example 2 Taylor Interval Solution. The Taylor Interval Solution of order p of an ODE system O is defined
as
bounding box of s in [t and the interval functions F (j) are interval
extensions of functions f (j) inductively defined as follows [Moo66] (f (j) is the "total j th derivative of f wrt
(j \Gamma1)
@t
1-m-n
(j \Gamma1)
@um
More information on automatic generation of the value of these functions can be found in [Moo79, Ral80,
Piecewise Interval Extensions Direct interval techniques propagate entire boxes through interval solu-
tions. As a consequence, errors may tend to accummulate as computations proceed. This section investigates
a variety of techniques inspired by, and using, consistency techniques that can be proposed to reduce the
accummulation of errors. The main idea, which is used several times in this paper and was inspired by
box-consistency, is to propagate small boxes as illustrated in Figure 2.
u2
Fig. 2. A Piecewise Interval Solution
s be a solution to an ODE system
O of the form
A piecewise explicit one-step interval extension of s is a function S(t defined as
where SC is an interval extension of sc, B 0 is a bounding box of s in [t is an interval
extension of e.
Piecewise interval extensions of an ODE system are not only a theoretical concept: they can in fact also
be computed. The basic idea here is to express piecewise interval extension as unconstrained optimization
problems.
Let s be a solution to an ODE system O of the form
A piecewise explicit one-step interval extension of s is a function S(t defined as
where SC is an interval extension of sc, B 0 is a bounding box of s in [t is an interval
extension of e.
Note that these minimization problems must be solved globally to guarantee reliable solutions. The implementation
section discusses how a system like Numerica may be generalized to solve these problems. The
efficiency of the system of course depends on the step size, on the size of D 0 , and on the desired accuracy. It
is interesting to observe that the function SC does not depend on the error term and hence methods that are
not normally considered in the interval community (e.g., Runge-Kutta method) may turn beneficial from a
computational standpoint. It is of course possible to sacrifice accuracy for computation time by using projec-
tions, the fundamental idea behind consistency techniques. For instance, interval methods are generally very
fast on one-dimensional problems, which partly explains why consistency techniques have been successful to
solve systems of nonlinear equations.
s be a solution to an ODE
system O of the form
A box-piecewise explicit one-step interval extension of s wrt dimension i is a function S i defined as
where SC is an interval extension of sc, B 0 is a bounding box of s in [t is an interval
extension of e. The box-piecewise explicit one-step interval extension of s wrt E and B is the function
Each of the interval solutions reduces to a one-dimensional (interval) unconstrained optimization problem.
The following property is a direct consequence of interval extensions.
Solution. The piecewise and
box-piecewise one-step interval extensions are interval solutions.
In essence, box-optimal solutions safely approximate a multi-dimensional problem by the intersection of
many one-dimensional problems. Of course, it is possible, and probably desirable, to define notions such as
box(k)-piecewise interval solutions where projections are performed on several variables. Finally, notice that
optimal interval solutions were defined with respect to a given bounding box. More precise interval solutions
could be obtained if local bounding boxes were considered in the above definitions. It is easy to generalize
our definitions to integrate this idea.
5.2 Implicit One-Step Methods
This section considers implicit one-step method. It first reviews traditional numerical methods and shows
how they can be generalized to obtain interval methods. The presentation essentially follows the same lines
as the previous section.
Traditional Numerical Methods In implicit one-step methods, the solution of ODE O is viewed as the
solution of an equation.
solution to an ODE system O is a function
of the form s(t is the solution of an equation
Since the error term cannot be computed in general, the above equation is replaced in practice by its
approximation As a result, an implicit one-step method is an algorithm of the form
forall(i in 1::n)
where solve(S) returns an element x in Solution(S), the set of solutions of S.
Example 3 Trapezoid Method. The trapezoid method is an implicit-one step method that consists of solving,
at each step, an equation of the form u
Interval Methods We now show how to generalize implicit one-step methods to intervals. The basic idea
is to replace the search for a solution to a system of equations by a search for the solutions of a set of interval
equations. The resulting interval solution can then be used as in explicit methods.
Direct Implicit One-Step Interval Extension. Let s(t is the
solution of the equation be an implicit one-step interval solution of an
ODE system O. Let SC be an interval extension of sc and E be an interval extension of e. A direct implicit
one-step interval extension of s is an interval function S(t
and B 0 is a bounding box of s in [t
Note that this definition amounts to finding all solutions of an "interval equation" in a box. The definition
uses the bounding box as the initial search space. However, any step method can be used instead to provide
a smaller search space.
Example 4 Trapezoid Interval Method. The trapezoid interval extension of the trapezoid method requires the
solving of the system of interval-valued equations
is an interval extension of f , and B 0 is a bounding box of s in [t
It is possible to improve this result by incorporating the idea of piecewise interval extension proposed earlier.
Coarser extensions can be defined in a similar way as well.
is the
solution of the equation be an implicit one-step interval solution of an
ODE system O. Let SC be an interval extension of sc and E be an interval extension of e. A piecewise
implicit one-step interval extension of s is an interval function S(t
are canonical g
and B 0 is a bounding box of s in [t
4 The interval relation - is an interval extension of equality, i.e.,
5.3 Multi-Step Methods
Some methods for solving ODE are multistep methods that compute the value at point from values at
point 1). Obviously, the value at points t must be computed by
some other method. In order to define interval extensions of such methods, we extend our definition of
solution and interval solution. We use the following notations
Multistep Solution of an ODE System. Let s be the solution of an ODE system O. The
multistep solution of O at t k wrt ~ t; ~
D is the set
Solution of an ODE System. Let ms be the multistep solution of
an ODE system O. A multistep interval solution of O is an interval extension S of ms, i.e.
Explicit Multi-Step Methods In explicit multi-step methods, the solution s of ODE O is decomposed
as
These methods can be generalized to intervals in a way similar to one-step methods. For brevity, we only
give an example of such an interval method.
Example 5 Adams-Bashforth Interval Solution (Order 4). Let h be t 4. The Adams-Bashforth
interval solution of order 4 is the multi-step interval solution
where
and B is a bounding box of s in [t . Notice that F (4) ([t can be approximated by
is a bounding box of s in
Implicit Multistep Methods Implicit multi-step methods can be defined in a similar fashion. Let u
The value of u k is the solution of the equation :
Example 6 Adams-Moulton Implicit Multi-Step Interval Solution. Let 3. The
Adams-Moulton implicit multi-step interval solution is the function defined as
where
& D is canonical & B is a bounding box of s in [t
5.4 Mean Value Form Step Methods
It can be observed that, in all our explicit interval solutions S,
indicating that the intervals are thus growing. Mean value forms have been proposed to use contraction
characteristics of functions and may return smaller intervals. From Equation 1, we may apply the mean
value theorem on variable u) to obtain
for some - between u and m. As a consequence, any interval solution of s, may serve as a basis to define a
new interval solution.
Let D be a box hI be the center of I i , and EM be an interval
solution of an ODE system O. The MVF solution of O in D wrt SCM , denoted by - is the
interval function
d
In the above definiton, the interval function
d
can be evaluated by automatic differentiation, during
the evaluation of SC(t The definition also generalizes to multistep interval extensions.
Implementation Issues
Several of the novel techniques proposed in this section can be reduced to unconstrained optimization prob-
lems. In general, interval techniques for unconstrained optimization problems require the function to satisfy
a stability requirement (i.e., the optimum is not on the frontier of the box defining the search space). This
requirement is not guaranteed in this context since, by Theorem 5, we know that the minimum of function
s is on the frontier of D 0 , and we minimize function sc, an approximation of s.
min-stability. A function g is min-stable for box there exists
with
be a box and be a function to minimize in K. Here are some
necessary conditions for a point d in K to be a minimum when the function is not min-stable.
@g
is in the interior of K i
@g
@g
Traditional interval algorithms for unconstrained minimization can be generalized to include the interval
meta-constraints
d
d
d
with
d
an interval extension of
, and i. The search can also be restricted to the
frontier by adding the redundant constraint
1-i-n
and applying techniques such as constructive disjunction [VHSDar]. Note that combining these two necessary
conditions require some extra care to preserve correctness.
6 Backwards Pruning: Box-Consistency for ODE
This section proposes another technique to address the growth of intervals in the step methods. The fundamental
intuition here is illustrated in Figure 3. We know that all the solutions at are in D j \Gamma1 . If, in D j ,
there is some box H such that then we know that the box H is not part of the
solution at t j . In other words, it is possible to use the step methods backwards to determine whether pieces
of the box can be pruned away. This section formalizes this idea in terms of box-consistency.
Fig. 3. Pruning
consistency aims at reducing a box D j at t j given that the solution at are known to be in D j \Gamma1 .
Interval Projection of an ODE System. An interval projection ODE hS; ii is the association
of an interval solution S and of an index i (1 - i - n).
Consistency of an ODE System. Let S be an interval solution of an ODE system
O. An interval projection ODE hS; ii is box-consistent at
I
where solution is box-consistent at its projections are
box-consistent at
Proposition22. Let D projection ODE hS; ii is box-consistent
at
and, when l
Traditional propagation algorithms can now be defined to enforce box-consistency of ODE systems.
7 The Wrapping Effect
The wrapping effect is the name given to the error resulting from the enclosure of a region (which is not a
box) by a box. It only occurs for multidimensional function. In one dimension, a perfect interval extension
of a continuous function g always yields the correct interval. However, a perfect interval extension of a
multidimentional function g introduces overestimations in the resulting box, because the set
Dg is not necessarily a box. This effect is especially important when the enclosure is used for finding a new
region which is also enclosed by a box. The wrapping effect is thus central in interval methods for ODE. The
following classical example, due to Moore [Moo66] and explained in [Cor95] , illustrates this problem :
0:9 1:1
The trajectories of individual point-valued solutions of this ODE are circles in the ((u) 1 ; (u) 2 )-phase space.
The set of solution values is a rotated rectangle. Figure 4 shows that the resulting boxes at
Moore shows that the width of the enclosures grow exponentially even if the stepwise converges to
zero. The wrapping effect can be reduced by changing the coordinate system at each step of the computation
process. The idea is to choose a coordinate system more appropriate to the shape of
reducing the overestimation of the box representation of this set, as illustrated in Figure 5.
Fig. 4. The Wrapping Effect
(u)(u)Fig. 5. Reducing the Overestimation by Coordinate
Transformation
An appropriate coordinate system has to be chosen at each step. Assuming that such coordinate systems are
given by mean of (invertible) matrices M j , a naive approach, based on an explicit one-step method, would
consist of computing
where D 0
j and D 0
are the boxes at t j and t j \Gamma1 in their local coordinate system. This approach is naive
since it introduces three wrapping effects: in
to restore the original coordinate system needed to
compute S, in the computation of S, and in the computation of M \Gamma1
to produce the result in the new
coordinate system. To remedy this limitation, more advanced techniques (see, for instance, [Loh87, Ste71,
DS76]) have been proposed but they are all bound to a specific step procedure. For instance, Lohner merges
the two naive steps together using a mean value form and use associativity in the matrix products to try
eliminating the wrapping effect. More precisely, the key term to be evaluated in his step method is of the
and the goal is to choose M \Gamma1
j so that M \Gamma1
is close to an identity matrix.
Piecewise interval extensions, however, reduce the wrapping effect in the naive method substantially,
as illustrated in Figure 6. The overestimations of
on ffl-boxes introduce wrapping
Fig. 6. Coordinate transformation on ffl-boxes
Taylor Piecewise Taylor Exact solution
2.0 [-7.388637 , 7.388637] 5359.51% [-0.135783 , 0.135783] 0.33% [-0.135335 , 0.135335]
2.5 [-12.181631 , 12.181631] 14740.26% [-0.082424 , 0.082424] 0.41% [-0.082085 , 0.082085]
Table
1. ODE u
effects that are small compared to the overall size of the box and to the benefits of using piecewise interval
extensions. In addition, this reduction of the wrapping effect is not tailored to a specific step method. The
basic idea is thus (1) to find a linear approximation of
to compute the matrix
j from the linear relaxation; (3) to apply the naive method on ffl-boxes. Step (1) can be obtained by
using, for instance, a Taylor extension, while Step (2) can use Lohner's method that consists of obtaining a
QR factorization of the linear relaxation. Lohner's method has the benefit of being numerically stable.
8 Experimental Results
This section compares some standard techniques with piecewise interval extensions. This goal is to show that
consitency techniques can bring substantial gain in precision. The results were computed with Numerica with
a precision of 1e-8, using optimal bounding boxes.
Consider the ODE u for an initial box [-1,1] at t compares the results obtained
by an interval Taylor method of order 4 with step size 0:5, the results obtained by the piecewise interval
extension of the same method, and the exact solutions. Relative errors on the size of the boxes are also
given. As can be seen, the intervals of the traditional Taylor method grow quickly, although this function is
actually contracting. The piecewise interval extension, on the other hand, is close to the exact solutions and
is able to exploit the contraction characteristics of the function.
Consider now the ODE u for an initial box [0:1; 0:4] at t compares the results
obtained by a mean value form of a Taylor method of order 4, the results obtained by the piecewise interval
extension of the Taylor method of order 4, and the exact solutions. Once again, it can be seen that the
standard method leads to an explosion of the size of the intervals, while the piecewise interval extension is
close to the exact results. Note that the Taylor method of order 4 also behaves badly on this ODE.
Taylor MVF Piecewise Taylor Exact solution
2.5
Table
2. ODE u
Taylor Piecewise Taylor Exact solution
Table
3. ODE u 0
Consider now the system ae u 0
for an initial box ([5.9,6.1],[3.9,4.1]) at t compares the results obtained by an interval Taylor
method of order 4, the results obtained by the piecewise interval extension of the same method, and the
exact solutions. Once again, similar results can be observed.
9 Conclusion
This paper studied the application of interval analysis and consistency techniques to ordinary differential
equations. It presented a unifying framework to extend traditional numerical techniques to intervals showing,
in particular, how to extend explicit and implicit, one-step and multi-step, methods to intervals. The paper
also took a fresh look at the traditional problems encountered by interval techniques and studied how
consistency techniques may help. It proposed to generalize interval techniques into a two-step process: a
forward process that computes an enclosure and a backward process that reduces this enclosures. In addition,
the paper studied how consistency techniques may help in improving the forward process and the wrapping
effect. Very preliminary results indicate the potential benefits of the approach. Our current work focuses
on the full implementation and experimental evaluation of the techniques proposed in this paper in order
to determine which combinations of these techniques will be effective in practice. Future work will also be
devoted to the application of consistency techniques to ODE systems with boundary values, since interval
analysis and consistency techniques are particularly well-adapted when compared to traditional methods (as
observed by several members of the community).
Acknowledgment
Many thanks to Philippe Delsarte and Jean Mawhin for fruitfull discussions. This research is partially
supported by the Actions de recherche concert'ees (ARC/95/00-187) of the Direction g'en'erale de la Recherche
Scientifique - Communaut'e Fran-caise de Belgique and by an NSF NYI award.
--R
Precise Numerical Analysis.
Computational Differen- tiation: Techniques
Applications of differentiation arithmetic.
Theory of Numerics in Ordinary and Partial Diffential Equations (W.
Consistency Techniques in Ordinary Differential Equa- tions
Guaranteed Error Boubds for the Initial Value problem Using Polytope Arithmetic.
Ordinary Differential Equations.
Discrete Variable Methods in Ordinary Differential Equations.
Enclosing the solutions of ordinary initial and boundary value problems.
Interval Analysis.
Methods and Applications of Interval Analysis.
Applications of software for automatic differentiation in numerical computation.
Automatic Differentiation: Techniques and Applications
Enclosing Solutions of Ordinary Differential Equations.
A Heuristic to Reduce the Wrapping Effect in the Numerical Solution of ODE.
Modeling Language for Global Optimization.
The Design
--TR
--CTR
Marco Kletting , Andreas Rauh , Harald Aschemann , Eberhard P. Hofer, Consistency tests in guaranteed simulation of nonlinear uncertain systems with application to an activated sludge process, Journal of Computational and Applied Mathematics, v.199 n.2, p.213-219, 15 February 2007 | differential equations;consistency;continuous problems |
593360 | Excluding Symmetries in Constraint-Based Search. | We introduce a new method, called i>symmetry excluding search (SES), for excluding symmetries in constraint based search. To our knowledge, it is the first declarative method that can be applied to i>arbitrary symmetries. The SES-method is based on the notion of symmetric constraints, which are used in our modification of a general constraint based search algorithm. The method does not influence the search strategy. Furthermore, it can be used with either the full set of symmetries, or a subset of all symmetries.We proof correctness, completeness and symmetry exclusion properties of our method. Then, we show how to apply the SES-method in the special case of geometric symmetries (rotations and reflections) and permutation symmetries. Furthermore, we give results from practical applications. | Introduction
In many search problems, one is faced with the existence of symmetries. Symmetries
give rise to many dierent solutions found by the search procedure, which
are all considered to be "similar". Often, one is not interested in also getting all
the symmetric solutions to every found solution. Without exclusion of symme-
tries, whenever a solution is found or proven to be inconsistent with the search
problem, the search algorithm still considers all symmetric solutions. Those symmetries
will then give rise to an (often exponential) amplication of the search
space. Hence, symmetry exclusion promises to eciently prune the search tree.
E.g., consider constraint problems, where nite domain variables have a geometric
interpretation such as in the N-queens problem or the square-tiling problem
(where set of squares of given sizes must t exactly into a xed square).
A more complex, real-world problem is the lattice protein structure prediction
problem. In [2], it is shown how to nd solutions for this problem using constraint
programming techniques. In this case, dierent solutions are symmetric if they
can be generated using re
ections or rotations. In other problems, symmetric
solutions can be generated by performing permutations on variables valuations
(like in the map coloring (or graph coloring) problem).
In the following, we consider search problems that stems from constraint satisfaction
problems (CSP). A common approach is to transform (problem specif-
ically) a CSP C 1 into a CSP C 2 that excludes at least some of the symmetries
of the original problem C 1 .
Unfortunately, symmetry exclusion was often not straightforward to imple-
ment. Even then, it had to be redesigned for every special problem or enumeration
strategy. This leaded to an in
exibility in the program structure once it
was introduced. Thus, the widespread usage of symmetry exclusion was strongly
hindered by its complexity. Often symmetry exclusion was not done at all or
only for a small set of symmetries. In other cases, where symmetry exclusion
was implemented it distracted the programmers attention from more important
tasks.
In this paper, we will present a new approach for symmetry exclusion, which
works by modifying the search algorithm. The technique of modifying the search
algorithm to exclude symmetries was already used in the literature. In contrast
to the known approaches, our approach is (to our knowledge) the rst declarative
method that can be applied to arbitrary symmetries that can be dened declar-
atively. Furthermore, it does not restrict the search strategy (i.e., the symmetry
exclusion can be done independently of the search strategy). This is important
since in many constraint problems, major part of the knowledge of the problem
is encoded in the search strategy.
We have implemented our method in the concurrent constraint programming
language Oz [10] using the programmable search engine described in [9]. But
the method can be implemented in any system that handles implication (via
and allows to modify the search procedure such that additional
constraints are added in one branch of a branching step.
Related Work Previous work on symmetry exclusion by modifying the search
algorithm handled only restricted forms of symmetries. In [7], the notion of
interchangeable values is introduced. Two values a and b are interchangeable for
a variable V i for every solution that maps V to a, the corresponding valuation
that maps V to b is also a solution.
The method in [3] handles only permutations of domain values in the case
of binary constraints (thus, e.g., the all-distinct constraint has to be translated
into binary inequalities, which implies that ecient propagation methods for all-
distinct cannot be applied). Furthermore, it works by introducing a symmetry
excluding form of constraint propagation, which is a modied form of domain
propagation (thus, the method cannot make use of interval propagation).
[1] and [4] consider only propositional calculus. The symmetries there are
permutations of Boolean variables. These methods do not apply to general constraint
satisfaction problems.
The symmetry exclusion algorithm presented in [8] is essentially an implementation
and application of our method to solve practical problems, which will
be compared in greater detail in Section 3.
An example of a symmetry exclusion method that works by a (not problem
specic) transformation of the constraint satisfaction problem is [5]. They introduce
symmetry breaking predicates, which are true only for the smallest solution
within an equivalence class (where the ordering is xed in advance). Thus, if the
search strategy encounters a non-minimal (according to the pre-xed ordering)
solution rst, then it will be excluded by the symmetry breaking predicates. This
implies that not every search strategy is possible given the pre-xed ordering.
In contrast, there is no prexed ordering in which symmetrical solutions will
be excluded by our method. This implies that we respect used-dened search
strategies as much as possible. 1
Overview of the paper We start with an introductory example explaining the
basic ideas of our method. After some preliminaries, we present the formal de-
nition as wells as completeness and correctness proofs in Section 3. Additionally,
we show that our method guarantees to exclude all specied symmetries. The
proofs indicate that a subset of all symmetries can be enough to exclude the
complete symmetry group. In Section 4, we treat geometric symmetries. We
show how to dene symmetric constraints and present the results of applying
the problem to a complex problem. In Section 5, we consider symmetries which
are generated by permuting the values of the variables. E.g., such symmetries
occur in the graph coloring problem. We proof, that in this case, it is sucient
to exclude the subset of transposition in order to exclude all permutations. Fur-
thermore, we present the results of applying the method to random instances of
graph coloring.
Introductory Example We start with a simple example to explain the main
concepts. Consider the N-queens problem, where we have an array Q[1::N ],
whose elements can take values from 1::N . states that there is a queen
at position (i; j). Now consider the symmetry corresponding to the re
ection at
the axis
2 , which is parallel to the x-axis (in the sequel denoted by Rx).
Clearly, for every solution of the N-queens, the the Rx-symmetric version is also
a solution of N-queens. Hence, we want to exclude these symmetric solutions.
To use our method, we have rst to introduce symmetric versions of the
constraints which are inserted by the search procedure. One kind of constraint
is j. If we have any distribution of queens on the board satisfying
j, then the Rx-symmetric distribution will satisfy j. Hence, the
constraint is the Rx-symmetric version of the constraint
Similarly, we get that the Rx-symmetric constraint of Q[i] j is Q[i] N j.
In the following, we write S Rx (c) to denote the Rx-symmetric constraint to c.
Our method works by adding additional constraints at the right branches of
the search tree, which exclude the symmetric solutions that are encountered in
the right branch. Consider the following search tree for the 10-queens problem,
where we indicate the constraints added by symmetry exclusion via frames:
Clearly, if the search strategy depends on the constraint store, then any method of
symmetry exclusion that prunes the search tree must in
uence the way solutions are
encountered (since the constraint store is changed by the symmetry exclusion).
This can be interpreted intuitively as follows. In the topmost branch, if we search
for a solution in the right branch satisfying Q[1] > 5, then the Rx-symmetric
solution will satisfy Q[1] < 5. Hence, the symmetric solution was already encountered
earlier in the left branch (under Q[1] 5), which is the reason that
we can close the topmost right branch. For the second right branch labeled
Q[2] 6= 3, we want again to exclude the Rx-symmetric solutions found in the
right branch. Hence, we would like to add the constraint :S Rx to the
right branch. But this would exclude too many solutions. The prerequisite of the
Rx-symmetric solution to be found in the right branch is that both the solution
and its Rx-symmetric version satises Q[1] 5. Now the only solutions that
satisfying this conditions are solutions that satisfy 5. Hence, we can add
under the condition that 5. But this is exactly the eect
that we achieve by adding at the second right
branch (since the constraint store contains already Q[1] 5).
Preliminaries
We x a rst-order signature including the equality :
with a set of variables
. Constraints are literals, and constraint formulae are quantier-free formulae
over . We identify
t. C denotes the set of all constraints. A
set of constraints C C is interpreted as the conjunction of the constraints
contained in C, and we will freely mix set notation and conjunction. The set of
free variables of C is denoted by V(C).
We x a standard interpretation A with domain D A , which describes our
constraint theory. In the following, we assume a xed constraint set C Pr describing
the problem to be solved. An assignment in A is a partial function
We say that an (possible partial) assignment satises (short
there is a total assignment 0 with A; 0 j= . We write
for every we have . A constraint set C (syntactically) determines
a set of variables X to an assignment i for all x 2 X exists a t such that
x
In many problems, one is interested in only a subset of all variables, whose
valuations uniquely determine the valuation of the other (auxiliary) variables.
This is captured by the denition of solution variables.
Denition 1 (Solution Variables). Let X V be a set of variables. X is a
solution variables set for C if
where 9!() ('exists a unique satisfying ()') is short for
solution variables set X , we say that is a X -solution
for C if we denote the set of X -solutions
of C.
In the following, we x X . Hence, we use the term 'solution' as short for
'X -solution for C', and we write kCk as short for kCk X .
Denition 2 (Symmetry). A symmetry s for C Pr is a bijective function
A symmetry set S for C Pr is a set of symmetries operating on kC Pr k. A symmetry
group S is a symmetry set for C Pr which is a group.
Note that for every symmetry s for C Pr , also s 1 is a symmetry for C Pr . We
denote the identity function on kC Pr k with id CPr (which is a symmetry by def-
inition). Clearly, the set of all symmetries for C Pr is a group. But many cases,
we do not want to consider all symmetries, since either there are too many of
them, or some of them do not have an intuitive characterization. In this case,
we consider only a subset of all symmetries, which may not be a group.
3 Symmetry Excluding Search Trees
Now we have to dene the notion of a search tree as we need it for the symmetry
exclusion. We describe the eects of applying a constraint solver to a constraint
set C by a function P (C), which returns the closure of C under constraint
propagation. Clearly, we have P (C) j=j C.
Usually, a search tree is a labeled tree, where the nodes are labeled with the
constraints in the constraint store, and the edges are labled by constraints or
negated constraints. A single node v is of the form
c
C store
The root node is labeled with P (C Pr ). Additionally, we need for the symmetry
exclusion to store at a node v the positive and negative constraints that have
been used along the path from the root to v to generate the node v.
Denition 3 (Search Tree). Let t be a nite, binary, rooted and ordered tree,
whose egdes are labeled by literals, and whose nodes are labeled by triples of
constraint sets. The tree t is a search tree for C Pr if the following conditions are
1. The root node has the label (;; ;; P (C Pr )),
2. every binary node has the form
store
c :c
store
with C l
store
store
Intuitively, the reason for distinguishing between positive and negative constraints
is just that Cn describes the previously found solutions, i.e.
Here, we denote with t the partial ordering of nodes induced by t.
Note that we do not force C l
store (resp. C r
store ) to be equivalent to C store ^
c (resp. C store ^ :c). The reason is that we do have to add some additional
constraints during search for excluding symmetries. Since C store describes all
constraints valid at some node v, we set for a node v in t with
label
We now state general properties of search tree in the presence of symmetries.
Denition 4 (Expanded, C Pr -Complete and S-Reduced Trees).
The search tree t is completely expanded if every unary node
either determines X to . A search tree t
is C Pr -complete if for every 2 kC Pr k there is a leaf v in t with
S be a symmetry set for C Pr . A search tree is C Pr -complete w.r.t. S if for every
there is a leaf v for such that
A search tree is S-reduced if for every leaf v with
Note that (1) is equivalent to 8s 2 S 8v 0
S is closed under inversion.
Before we can show how to produce a S-reduced search tree that is C Pr -
complete w.r.t S, we rst have to dene how symmetries operate on constraints.
In the following, we will assume that for every constraint c and every s, there
is a constraint c 0 such that s s on sets of C Pr -
solutions by s Ag. For every c, there are usually dierent
constraints c 0 with s k. Hence, x a function s con on constraints such
that
ks con (c)k:
In the next sections, we give examples of how to construct this function.
Proposition 1. Let s con be dened as before. Then s con distributes over the
Boolean operators, i.e., s (kc^c 0 ks con (c)^s con ks con (c)_
ks con (:c)k.
Hence, we identify s con with its homomorphic extension to constraint sets
and arbitrary formulae. Now we can state a general mechanism for generating a
search tree that is S-reduced.
Denition 5 (S-excluding). Let S be a symmetry set. A search tree for C Pr
is S-excluding if every binary node v has the form
store
c :c
store
with C l
Before we prove S-reducedness and C Pr -completeness w.r.t S of S-excluding
search trees, we state a proposition to precise the eect of adding the implications
in denition 5 to C r
store . For convenience, we write C v
store to access
store in the label (C store ) of v. For a binary node v we refer
to its left child as v l and to its right child as v r .
Proposition 2. Let S be a symmetry set and t a S-excluding search tree. For
every symmetry s 2 S and for every node v of t we have C v
store
s con (C v
For notational convenience we introduce the notation C path
C Pr . A good intuition is to think of C path (v) describing the constraint store of
v in a simple not symmetry excluding search tree.
Reducedness and completeness will be essentially corollaries to the following
proposition.
Lemma 1. Let S be a symmetry set. Every S-excluding search tree t for C Pr
satises for every node v
where A v
Proof. We proof this by tree induction. For the root this is valid, since A v
and (v)k. Assume that we have proven the claim for a
binary node v:
store
c :c
store
For the left child v l the claim follows immediately from the induction hy-
potheses, since A v l
S .
For v r , we have to show kv r
S . Note that A vr
subdivides into its two subsets A v
S and
)k)g. Further according to
our denitions C path (v r ) is equivalent to C path (v) ^ :c.
To show that kv r k kC path (v) ^ :ck A vr
then we
have to show for every v 0 t v that
The rst case is v 0 t v. Let 2 kC path (v 0 )k. Then s() 62 kvk by induction
hypotheses. Since kv r k kvk, this immediately implies s() 62 kv r k.
The second case is (v 0 6 t v) and v 0 t v r , i.e., v 0 is a subnode of v l . Let
k. From 2 kv l k we have
s con (C p ^c). That's a contradiction, because from denition of S-excluding search
tree s()
It remains to be shown that kv r k kC path (v r )k A vr
S Let 62 kv r k. We have
to show
62 kC path (v r )k A vr
We have the following cases:
1. 62 kC path (v r )k. Then (3) follows immediately.
2. 2 kC path (v r )k and 62 kvk. We have to show 2 A vr
S .
Now 2 kC path (v r )k implies 2 kC path (v)k and henceforth 2 A v
by induction hypotheses.
3. 2 kC path (v r )k and 2 kvk. We will show that
Since
store , there is at least one s 2 S with 6j=
(c) by the denition of an S-excluding tree. Fix one of these
symmetries s. Then
by Proposition 2, we get
Hence, s 1 (), which exists by denition of symmetries, satises s 1 ()
that C path
with we have a valuation such that 2 kC path (v l )k and
which shows that is in the set dened by (4).
Theorem 1. Let S be a symmetry set. Every S-excluding search tree t for C Pr
is S-reduced.
Proof. Fix a symmetry s 2 S, let v be a leaf of t with fg. We have to
show for every node v 0 of t with v 0 t v that kv 0
v 0 to be a node of t with v 0 t v and kv It follows
and from this the contradiction
62 kvk by Lemma 1.
By now we understand that an S-excluding search tree may exclude more
symmetries than actually declared by S directly. Hence, we have to investigate
the completeness property of S-excluding search trees.
Theorem 2. Let S be a symmetry set. Every S-excluding search tree t for C Pr
is C Pr -complete w.r.t S 0 , where S 0 is the closure of S under composition and
inversion.
Proof. We have to show that t is C Pr -complete w.r.t. to S 0 , where S 0 is the
closure under composition of S, i.e. for every 2 kC Pr k there is a leaf v with
Hence x an 2 kC Pr k. Then there exists a leaf v 0 in t with 2 kC path (v 0 )k
from denition 5. There are two cases.
1. 2 kv 0 k. This yields immediately kv and (5) is proven.
2. 62 kv 0 k. By Lemma 1 follows 2 A v 0
there is a s 1 2 S and a
path (v 00 )k: By induction we get
a sequence of symmetries s
for a leaf v (n+1) of t. Since S 0 is the closure of S, claim (5) follows.
We will given an example for symmetry excluding search trees in Secion 5,
where the symmetrie group of permutation are excluded by the subset of all
transpositions (as indicated by the above theorem).
Now we are able to give a more detailed comparison with [8]. The SBDS-
method therein is essential our symmetry exclusion restricted to the case where
the search tree branches over constraints of the form V ar al. In this case, the
constraint collected in C p is of the form V ar
C p is a partial assignment A. For the restricted SBDS-method, consider the case
that a symmetry S is dened by a permutation rst. Then S
al n at some node v of
the search tree, which branches over V ar al. Then the constraint added by
our method for excluding the symmetry S is S (V ar
which is by the denition of S the same as
ar
Now the antecedence is nothing else than a test whether S leaves C p (i.e.,
the partial assignment at the node v) unchanged. Thus, the entailment will be
evaluated and removed directly at the right subnode of v. The restricted SBDS-
method essentially replaces the entailment test by the test whether the symmetry
leaves the assignment unchanged. Only those symmetries are excluded, where
the test can be decided at the node the corresponding implication would be
integrated by our method (even if the corresponding implication would delay
this test to a later point).
Note on implementation For the symmetry exclusion we have to add implications
of the form s con (C v
during the search procedure. Hence, one has
to change the search procedure for implementing the symmetry exclusion. The
antecedents of these implications can be computed during the search eciently,
using the observation that the antecedences of the added implications of ancestor
nodes are prexes of the ones added in their ospring. To be more precise, let
v be a node, which branches over the constraint c, and let v l (resp. v r ) its left
(resp. right) daughter. Now
s con (C v l
For
Therefore the computation of the condition
s con (C p ) can be done incrementally. We maintain Boolean variables for this reason
in our implementation. We need one variable for each symmetry s, containing
the values for s con (C p ).
4 Geometric Symmetries
We will give now a concrete example for symmetries, namely geometry symme-
tries. We will treat the special case where we have points in Z d , although our
method is not restricted to this case. We will exemplify the symmetry constructions
in two dimensions, and give an example for the exclusion of additional
symmetries as indicated by Theorem 2.
Denition of Geometric Symmetries There are many problems where one encodes
the two-dimensional position of an object i using nite domain integer
variables . Examples are the N-queens and the tiling problem. A more
complex and realistic example (in three dimensions) is the lattice protein structure
prediction problem [2].
The symmetries for Z 2 have exactly the same structure as for the general
case Z d . They are dened by ane mappings
that map Z d onto Z d . I.e., the matrix AS is an orthogonal matrix
with the property that the set of columns fv of AS equals fe j
e is a unit-vector of Z d g: E.g., for Z 2 , the matrix 0 1
denotes the rotation
by 90 . For Z 2 , we have 8 symmetries consisting of the identity, the 4 re
ections
(at x- and y-axis, and the two diagonals) and the 3 rotations by 90 , 180 and
270 . For Z 3 , we have 48 symmetries including the identity.
By now, the vector v S is not yet xed. There are two dierent approaches
for xing the symmetry. We will consider Z 2 as an example. The methods work
for all other dimensions as well.
The rst case is that every possible solution lies within a xed square (in the
general case, within a hypercube). 2 This is equivalent to the proposition that
there are integers xmin such that for all 2 kC Pr k we have
2 The technique can be extended to the case that the hypercube is not xed in advance.
Thus, the minimal square around the position of all objects is dened by the
points in every solution. We call this the frame
of the problem C Pr . In the N-queens problem, this is just the board.
Now knowing the frame of a problem C Pr , we can x the vector v S for all
symmetries. Consider as an example a problem whose frame is dened by (0;
and (3; 2). Furthermore, consider the three symmetries re
ection at the y-axis,
rotation by 90 and rotation by 180 , which we will name S 1 , S 2 and S 3 in the
following. The corresponding mappings are dened by S i
where the matrices AS1 ; AS2 and AS3 are dened by
The corresponding mappings of the frame are
A symmetry S is compatible with the above dened frame if the frame is mapped
to itself, i.e., if fv j (0; 2)g. For a
given matrix AS , there exists a v S such that
condition if and only if AS satises
AS (3;
For the matrices AS1 , AS2 and AS3 , we get ( 3; 2), ( 2; 3) and ( 3; 2), which
excludes the symmetry characterized by AS2 . We nally get
The second case is that we know a point should remain
unchanged under the symmetries. In that case, we know that the symmetries
are dened by S i
(p).
The remaining part is to dene symmetric constraints. We use a specic example
where we leave the point (5; 5) x. Consider the two symmetries re
ection
at the y-axis and rotation by 90 . By what we have said above, the corresponding
mappings are
Now suppose that we have modeled points using variables
and we want to dene S Ry
con and S 90
con for the constraints of the
other kind of constraints c, the denition S con (c) is analo-
gous). Now the symmetric constraints S Ry
con
con must
express the constraint valid for S Ry () (resp. S 90
for every possible with
does not restrict the valuation of (Y i ), we know that S Ry
con
is
con Analagously, we get that S Ry
con
is and that S 90
con Note that S Ry (c) has the same
type as c (i.e., both have the same variable). This does not hold for c and S 90
(c).
We will now turn to an example where we exclude only one symmetry, but
the exclusion method excludes compositions of this symmetry. This shows that
there are cases where the symmetry exclusion method excludes more than the
symmetries contained in the symmetry set S (as indicated by Theorem 2). We
will use an articial example to show the existence of such a case.
Example 1. Let C Pr be a geometric constraint problem over the variables X;Y ,
where X and Y have the domain [0::10] associated. Furthermore, suppose that
C Pr has (6; 6) as a solution that we can apply the rotational symmetries with x
point (5; 5). This implies, that (4; 4), (4; are also solutions of C Pr .
Now consider the following S-excluding search tree for
(where
the constraints added by the symmetry exclusion are in a framed box):
Then the solution (4; (which is (6; rotated by 90 ) is excluded by the symmetry
exclusion in t 1 . But furthermore, the solution (4; is excluded in t 2 by
our symmetry exclusion method. This is (6; rotated by 180 . Hence, although
contains only S 90
, the symmetry S 180
(which is just S 90
excluded by our method. Note that (6; 4) (which is (6; rotated by 270 ) is not
excluded and may be found in t 2 .
Clearly, in the case of geometric symmetries, the full symmetry group is
usually small enough that we can include all symmetries. But we wanted to
show the eects of excluding only a subset of the full symmetry group using
the above simple example. In the next section on permutation, we will give an
example where the exclusion of transpositions allows to exclude all permutations.
Results We have applied the method to the lattice protein structure prediction
[2], which is a hard combinatorical problem. The following table shows the
number of solutions, search steps and runtimes for nding all minimal energy
structures for 4 sequences, in the rst case without symmetry exclusions, and
with symmetry exclusion in the second part:
without sym. excl. with sym. excl. ratio
seq. length #noex nnoex tnoex #ex nex tex #noex
#ex
nnoex
nex
ex
We have added simple exclusion methods in both cases, which is the reason that
we have only 16 (instead of 48) symmetries left in S1; S2 and S 6 . As one can see
from the table, we have a nearly linear speedup in number of search steps, and
a close to linear speedup in runtime. In S3, the simple exclusion does not apply,
which gives rise to 48 symmetries. Furthermore, the optimal conformations and
the symmetric ones are very similar, which implies that we have less speedup
(since detecting the symmetric solution is harder).
Permutation symmetries
In the following, we consider nite domain integer problems, where the variables
have the domain D N associated. In the following, we denote with Perm(D)
the set of all permutations of D, and with Trans(D) the set of all transpositions
of D (i.e., those permutations, which exchange just two elements of D). With
Perm(D) , we denote the set of all symmetries that permute the values of the
variables in X .
Denition 6. Let X be the set of solution variables. The set of all value permutations
of X is dened as the symmetry set
The subset of all transposition symmetries S X
is dened analogously.
Now we consider search trees that branch over constraints having one single
constraints of the forms
The interesting part is that if a search tree branches over constraints that have
one single
Trans(D) -excluding tree is even S X
reduced. Thus, we need to exclude only the quadratically many transpositions
to exclude the exponentially many permutations in this case.
Theorem 3. Let C Pr be a problem which has S X
Perm(D) as a symmetry group. Let
t be a S X
Trans(D) -excluding search tree such that for every branch v, the constraint
c used at this branch has one free variable out of X . Then t is S X
Perm(D)
-reduced.
Proof (sketch). Consider a permutation and the corresponding symmetry S .
Now consider any node
l
c(x)
we know that ((x)) must be dierent
from (x). Now let be the transposition such that
let S be the corresponding symmetry. Then the exclusion of all transposition
would exclude the solution if we can show that in the node considered above,
we have that S 1 S () 2 kv l k. But this can be shown under the assumption
that the search tree uses only constraints that have one
Graph Coloring As noted above the graph coloring is an example for a problem
with value permutations as symmetries. The graph coloring problem is as follows.
Given a graph E) and a set of colors. An admissible coloring c of G, is
a mapping of the vertices V to the set of colors, satisfying the constraint that
for all (v What is the minimal set of colors, where we
still can nd an admissible coloring.
In this problem colorings are considered to be symmetric, if they are just
permuted in colors to each other.
We compare two implementations of a solver for this problem. The rst one
is a naive implementation that uses a simple rst fail heuristic. This implementation
does not have symmetry exclusion. The second implementation with full
exclusion of symmetries is just a simple extension of the rst one, where we
added our symmetry exclusion mechanism. Note that, due to the above theo-
rem, it suces to handle only the set of transpositions instead of handling the
group of all permutations to get the full symmetry exclusion.
We give the results for some randomly generated problem instances of dier-
ent problem sizes.
problem size with symmetry excl. without symmetry excl. ratio
verts edges colors cloned failed time cloned failed time cloned time
6 Conclusion and Future Work
We have introduced the rst method that can exclude arbitrary symmetries in
constraint-based search. In contrast to many other methods that can be found
in the literature, the method does not restrict the search strategy.
The method is based on a declarative description of the symmetries in the
form of symmetric constraints, which usually can be obtained easily. We have
given completeness and correctness proofs as well as the proof, that the method
exclude all considered symmetries. In the case that the full symmetry group is
too large, our method can handle arbitrary subsets of the full symmetry group.
We have shown for the case of permutation symmetries that it is sucient to exclude
the (quadratically many) transposition to exclude all (exponentially many)
permutations.
The method can be implemented in any (constraint-based) search machinery
that handles implications and allows to introduce additional, user-dened
constraints during search. This holds for the most modern constraint programming
systems. Since the method is very general, we plan to investigate in which
other (logic-based) search methods our symmetry exclusion can be used. Fur-
thermore, we intend to investigate more general conditions under which a subset
of the full symmetry group allows to exclude all symmetries (as it is the case for
the permutations).
--R
Alfonso San Miguel Aguirre.
Constraint techniques for solving the protein structure prediction problem.
Study of symmetry in constraint satisfaction problems.
Tractability through symmetries in propositional calculus.
Symmetry breaking predicates for search problems.
Thierry Boy de la Tour.
Eliminating interchangeable values in constraint satisfaction prob- lems
Symmetry breaking during search in constraint programming.
The Oz programming model.
--TR
--CTR
Y. C. Law , J. H. Lee, Symmetry Breaking Constraints for Value Symmetries in Constraint Satisfaction, Constraints, v.11 n.2-3, p.221-267, July 2006
Rolf Backofen , Sebastian Will, A Constraint-Based Approach to Fast and Exact Structure Prediction in Three-Dimensional Protein Models, Constraints, v.11 n.1, p.5-30, January 2006 | geometric symmetries;permutation symmetries;symmetry excluding search SES;symmetry exclusion;constraint-based search |
593397 | Design of Extensible Component-Based Groupware. | Tailoring is identified as a key requirement for CSCW applications. One major tailoring mechanism is the extension of an application at run-time to change its behavior.This article shows how synchronous CSCW component-based applications can be designed to be extensible at run-time. We propose to split the act of tailoring into two steps: the design-time customization of new components in visual builder tools and their insertion into the running application. Thus the customization tool is not required to be part of the application.This article presents a new design pattern for extensibility and gives several examples based on that pattern. With the help of the pattern extensible application frameworks can be systematically created from a non-extensible application design. The different possibilities to place insertion points into the application design are discussed with respect to flexibility and ease of deployment. Finally, we present the advantages and limitations of this approach. | Introduction
Human beings interact in different situations and their cooperative
actions depend on the context. Rather than following a predefined
schedule of events, people tend to act spontaneously in creative phases.
In general, it is not foreseeable how people work together; therefore, it is
not always possible to define in advance which artifacts are adequate to
support their cooperative process. A CSCW system that reflects these
observations must allow the creation and insertion of new cooperative
modules and artifacts.
Inserting new functionality into a running application is an act of
tailoring. Tailoring is recognized in the CSCW literature as the key
requirement for a system to adapt to different cooperative contexts
(Malone et al., 1995; Trigg and B-dker, 1994). For Bentley and Dourish
(1995), "support for customization is support for innovation".
This article focuses on one important subset of tailoring: the ability
to insert new functionality into an application and thus to change the
behavior of the system. New functionality can be discovered by an
extensible application at initialization time. It is harder to design applications
that can be extended at run-time. Even harder is the design of
c
Publishers. Printed in the Netherlands.
extensibility at run-time in distributed interactive applications, such as
synchronous groupware. This article presents a general design pattern
to solve the latter problem.
Component-based frameworks are currently being investigated as a
means to gain reusability on all layers and to adapt to change. Until
recently, software engineering has focused on the development of code,
which is reusable and extensible during the design phase. That focus has
evolved towards the development of finished modules of code which can
be reused and customized by the end-user. System modifications and
extensions which were once strictly in the domain of the programmer
are now being shifted into the domain of the end-user. This article applies
the findings of framework research to the construction of tailorable
CSCW systems, which allow the insertion of extensions on demand by
the end-user. The code of the extensions is distributed on demand to
every participant of the group; thus the extensions do not need to
be pre-installed. Our approach provides the possibility to extend an
application without terminating an ongoing cooperation.
The goal of this article is to demonstrate how component technology
supports an efficient way of constructing extensible CSCW applica-
tions. Component models allow one to reason on different levels of
abstraction depending on the composition level (Stiemerling and Cre-
mers, 1998). We focus on the component model Java Beans and its
supporting integrated development tools (IDE), which let the user
create and customize components visually. The user may assemble
components into larger composite components using the visual representation
provided by an IDE rather than writing lines of code.
Programmers can design the components and accompany them with
special customizers to facilitate customization at design-time. In the
extreme case, a new component can be assembled by only using drag
and drop operations, so that even end-users can accomplish the task of
creating new components.
By using only the standard and widely used Java and Java Beans
technologies for their realization, our concepts become applicable and
usable by other groupware developers.
If not otherwise stated, we will refer throughout the article to tailoring
as the activities by the end-user to modify and extend the application
at run-time. In contrast we use the term design-time customization
to denote modifications at design-time.
The tailoring support for extending a running program is split into
two different support-systems, the customization and the insertion support
Figure
our approach. In the first step, an end-user
uses an off-the-shelf visual builder tool to customize a component at
design-time. This component is then, in a second step, inserted into the
Running CSCW application Running CSCW application
A
Figure
1. The two-step approach to tailor a CSCW application.
running distributed CSCW application. Decoupling the customization
tool for the components from the actual CSCW application has the
following advantages for the developer:
\Gamma The product can be earlier delivered, because the tailoring functionality
is not built into the product.
\Gamma The developer can save resources, because a proprietary tailoring
tool needs not to be developed.
General off-the-shelf IDEs are continuously improved by third party
vendors.
The end-users profit from the decoupling as well. They can use their
favorite builder tool for that component model and do not need to
accustom to a new tool for every application. We will show that standard
visual programming tools can be used efficiently by end-users to
perform tailoring of CSCW applications.
2. Relevant Previous Work
The work described in this article is based and influenced by the re-search
in different domains. Relevant for this work are the publications
about tailorability in general and its significance for CSCW; about
framework design, component technology and design pattern evolving
from object-oriented software engineering; but also about new organizational
forms by the business science and coordination theory under the
umbrella of "virtual organizations". All approaches have in common
that they focus on evolving systems; they differ from their points of
view. This paper tries to synthesize some of the findings.
2.1. Tailoring
Tailoring is defined as the activity of modifying the appearance and
behavior of an application at run-time by the end-user (Malone et al.,
1995; M-rch, 1997; Trigg and B-dker, 1994). Tailoring support is normally
built into the application, so that the user does not need a
separate tool. In contrast to this definition, this article proposes a
two-step approach, which uses customization at design-time to gain
tailorability at run-time.
Before explaining our approach in greater detail, we give a brief
overview of tailoring. M-rch (1997) distinguishes three levels of tailor-
ing. The levels are classified by the design distance which is experienced
by the end-user during tailoring. The first level, customization at run-
time, allows to modify the appearance of presentation objects and
to change their attributes. The second level allows the integration of
new components or commands by composition of existing functionality
within the application. The third level allows the extension of an application
by adding new code. Generally speaking, with an increasing
level the tailoring possibilities for a user increase, but also become more
complex. To overcome the design distance, M-rch (1995) proposes to
use so called "application units". Application units consist of three
parts: a presentation-object, which is the user-interface, a rationale
that provides meta-information about the intended use, and the actual
implementation.
Tailoring beyond the first level involves end-user programming. End-user
programming facilities can be offered by the application framework
itself, such as in the "radically tailorable" tool for CSCW, Oval (Malone
et al., 1995). The end-user can write small scripts, which are interpreted
by the application, as in applications of the Microsoft Office suite
(Solomon, 1995). But end-user programming can also be separated from
the application and done in a general purpose language. Afterwards,
the written functionality is inserted into the application at anticipated
hooks. Since programming in a general purpose language is regarded as
being hard for an end-user, she or he must be supported by high level
tools for this task. Visual builder tools like IBM's Visual Age for Java
offer an even higher abstraction than scripting languages and are thus
usable by end-users (Weinreich, 1997). We will follow this approach.
On the level of programming languages, the possibility to reflect
and introspect code is viewed as enabling technology to write tailorable
software; reflection in component models is used to support
self-representation (Stiemerling and Cremers, 1998). Reflection can also
be viewed as a design pattern (Buschmann et al., 1996). Dourish proposes
a reflective model for collaborative systems (Dourish, 1995) and
implemented the toolkit Prospero for CSCW (Dourish, 1996) using
this model to express meta-information and to allow the change of
the behavior of the underlying toolkit. Component models, such as
JavaBeans and DCOM, offer reflection capabilities and meta-data on
components (Krieger and Adler, 1998); our approach uses these capabilities
to automate interface negotiation and to offer the end-user
an easy-to-handle user-interface to tailor components within a visual
builder tool.
2.2. Frameworks: Towards extensible applications
A framework is a skeleton of cooperating classes that forms a reusable
implementation. An application framework defines the overall architecture
of the applications that are created by adapting the framework.
Framework-based applications are adapted by extending the framework
at explicit hooks also known as "hot spots" (Pree, 1994).
Frameworks are currently successfully employed for general purpose
software units, such as graphical user interfaces, system infrastruc-
ture, and middleware integration frameworks; also application domain
specific frameworks are emerging.
Frameworks are distinguished into white-box and black-box frameworks
and Schmidt, 1997). Object-oriented white-box frameworks
use inheritance to offer the developer extension facilities. To
insert extensions into white-box frameworks the developer must understand
the class hierarchy and derive new classes which have to be
relinked with the framework. Black-box frameworks use object composition
and delegation instead. Black-box frameworks anticipate extensions
by defining interfaces and providing hooks to insert new objects.
Applications that can be extended at run-time need hooks like black-box
frameworks. Unfortunately, designing frameworks - and especially
black-box frameworks - is substantially harder than designing an ap-
plication. However, the hot spots for a framework can be designed and
implemented stepwise by a sequence of generalization transformations
(Schmid, 1997). Since applications using a framework must conform to
the framework's design and model of collaboration, the framework encourages
developers to follow specific design patterns (Johnson, 1997).
In the other direction, developers can use design patterns to generalize
an object-oriented application into a framework (Schmid, 1995).
2.3. Component Technology
In the field of software engineering, component based software development
is seen as a major factor to facilitate reuse. Components
can be purchased from third party vendors, customized and assembled
within a component model. Examples for major component models are
Microsoft's Distributed Component Object Model (DCOM) and SUN's
component model for Java JavaBeans (JavaSoft, 1996). The component
technology is predicted to acquire a significantly increasing importance
(Kiely, 1998). Furthermore distributed component platforms are
emerging, which allow interaction between components across system
boundaries (Krieger and Adler, 1998).
A component is an independent "unit of software that encapsulates
its design and implementation and offers interfaces to the outside, by
which it may be composed with other components to form a larger
whole" (D'Souza and Wills, 1998). Frameworks provide a reusable context
for components (Johnson, 1997). Components become most powerful
within black-box frameworks, where they can be used to extend
the hot spots.
2.3.1. Java Beans
The examples in this article are implemented using JavaBeans, the
component standard for Java.
The specification for JavaBeans outlines that "a Java Bean is a
reusable software component that can be manipulated visually in a
builder tool" (JavaSoft, 1996). Beans are self-descriptive Java classes
that follow design patterns that let builder tools or applications introspect
a bean. Properties reflect the accessible state of a bean. The Java
Beans component model uses an event mechanism to interconnect the
beans. A bean sends an event to all beans that have registered their
interest in that event. The standard distinguishes two extraordinary
states in the life-cycle of a bean: A bean can be manipulated in an IDE
at design-time or behave like an ordinary object during run-time.
Properties and events can be manipulated within visual builder
tools. The JavaBeans standard offers additional associated classes for
each bean, which contain meta-information about the bean including
special customizers and property editors to support a more intuitive
interaction with the developer.
The component-based approach together with visual integrated development
environments (IDEs) directly support our goal to be able
to customize an existing application at design-time and to be able
to build new similar applications by reusing the components. Beans
with associated customizers allow even non-programmers to customize
applications in an intuitive way. The easy grasp is achieved by the use
of graphical and form-based editors within the IDEs.
2.4. Design Patterns
Design patterns help one to reason about recurring design problems.
Object-oriented design patterns describe "communicating objects and
classes that are customized to solve a general design problem in a
particular context" (Gamma et al., 1994). Patterns abstract from the
used programming language and provide a basis for reusable design
building blocks: "Design patterns are the micro-architectural elements
of frameworks" (Johnson, 1997).
Design patterns are surprisingly useful to detect the hot-spots in an
application design and to transform it into a domain-specific frame-work
design (Schmid, 1995). Actually, the idea of hot spots was first
introduced as a meta-pattern for framework design (Pree, 1994). In
the domain of CSCW and user-interface design some patterns are well-
known, such as the distributed versions of the Model-View-Controller
and Presentation-Abstraction-Control patterns (Buschmann et al., 1996).
Syri (1997) describes the use of the Mediator pattern to design tailorable
cooperation support in CSCW systems.
To design CSCW applications that are tailorable by extension, the
hot spots must be discovered in the design phase and then implemented.
To ease the implementation we will introduce a design pattern which
can be used to insert those hooks into the application. The pattern
focuses on the ability to insert new code at run-time that conforms to
an interface. By applying this pattern, one thus designs a black-box
framework for a specific CSCW problem.
2.5. Virtual Organizations
This work is also influenced by recent publications about virtual organization
(Mowshowitz, 1997; Turoff, 1997). The idea of virtual organization
stems from virtual constructs, such as virtual memory and circuit
routing, and generalizes their concepts toward an integrating theory.
One common concept in the virtual constructs is that the mapping
between an abstract requirement and a possible concrete satisfier is
dynamic. The mapping has to adapt as well to evolving requirements
as to changing satisfiers.
The ability of virtual organized systems to dynamically adapt to
environmental changes led us to think about how the dynamic exchange
of software components could enhance CSCW systems.
In this context, this paper provides a technical basis to insert new
satisfiers into a running groupware application when a new requirement
arises. Changes to requirements for CSCW applications can be a result
of evolving cooperative work patterns, for example when users become
more familiar with a CSCW product or the context and goal of a work
group changes (Mark et al., 1997).
3. Enabling Technologies for Extending CSCW Applications
This section introduces a design pattern, which is used to insert hot
spots in the design of applications. Since CSCW applications are inherently
distributed, the pattern is accompanied with components that
allow the distribution of arbitrary events to a group. By using the
event mechanism and encapsulating code within an event, we place an
event receiver in the pattern to allow the simultaneous extension of
synchronous CSCW applications at run-time. Finally, we investigate
the applicability of inserting code at run-time.
3.1. Design Pattern for Extensibility
In a component model, applications are developed by interconnecting
and customizing components. The components themselves are composed
of other, smaller components. The design pattern for extensi-
bility, which will be introduced here, can be encapsulated into one
component.
The Extensibility pattern 1 is intended to be used to provide a default
behavior, which can be changed at run-time. To change the behavior a
new class can be inserted at a hook, which can either add new functionality
or replace an existing class. The application sees only the specified
behavior of a Proxy class.
The structural representation of a pattern is given by the relationship
between the used classes. Figure 2 shows the structure of the
Extensibility pattern in the UML notation 2 . This pattern consists of a
Proxy, which extends the interface of a Subject that may be inserted
at run-time. 3 Inside the Proxy exists a Creator, which is responsible
We follow the convention to use an initial upper-case letter to name patterns,
to use bold names for classes and to use italic names for beans and events.
Fowler (1997) provides a good overview on the UML notation.
3 In this pattern, the Proxy extends the Subject interface to be conform with
the Proxy pattern. However, for the framework developer it is only important that
Figure
2. Structure of the Extensibility pattern.
to create a new object of an arbitrary class Real Subject conforming
with the interface Subject. Actually this pattern is a combination of
the Proxy and the Factory Method patterns from Gamma et al. (1994).
Figure
3 shows the interaction between the objects. At initialization
time, the Creator object passes a reference to a default Real Subject
to the Proxy. Any event that the Proxy receives is delegated to the
default Real Subject. When the Creator receives an event (how that
happens will be discussed soon) to create a new Real Subject it
instantiates the respective class and sets the reference in the Proxy
to the newly created object. The Proxy now forwards all subsequent
events to this object, unless the Creator changes the reference to a
Real Subject again.
A slight variation of the pattern allows to add instances of new
classes instead of replacing the old objects. This can be easily accomplished
by letting the Proxy store a set of all Real Subjects.
All incoming events are then forwarded to all instantiated Real Sub-
jects. This variation is useful if new functionality is added, which is
independent in the application logic from the already existing objects.
3.2. Remote Events
In an event based component model, events are the means to communicate
state changes between components. The event mechanism
the definition of the Proxy remains stable, while the developer of the pluggable
components (the Real Subjects) relies on a stable definition of Subject. The
Proxy class does not need to extend the same interface and may act as Adapter or
Bridge. Proxy, Adapter, and Bridge are described in Gamma et al. (1994).
C rea tor
in it in it
ins tan tia te de fau lt Sub je c t
hand leEven
hand leEven t
ins tan tia te new Sub jec t
hand leEven
hand leEven t
c rea te
new Sub jec t
Figure
3. Interaction diagram for the Extensibility pattern.
follows the publisher-subscriber pattern (Buschmann et al., 1996). The
Java Beans component model uses such an event mechanism. We will
concentrate here on Java Beans, because it is the component model
we have chosen for our implementation. The design of group communication
components does not rely on this particular component model,
since event mechanisms are a common property of component models.
Since the Java Beans component model defines only the interaction
between beans in the same virtual machine, we developed group
communication beans, which act as access points for the distribution of
events over process barriers (figure 4). The group communication beans
follow the publisher-subscriber pattern for a distributed platform. The
group communication beans expose the event model to the developer
for remote event communication. Two types of beans are necessary: The
GroupSender forwards events to all GroupReceivers , which are configured
with the same group name. The group name is a property of the
beans and can be easily set within visual builder tools for beans, and the
events can be visually connected to and from these beans. Both beans
can be specialized for any event by simple object-oriented subclassing
and implementing the register and handler methods for that event type.
Thus the group communication beans form a white-box framework for
distributed event communication. Although the definition of new events
is considered as a programming activity, which goes beyond the usual
GS
group
communication
GR
GR
GR
group name
group name
event
event
event
event
components
backbone
Figure
4. Group communication beans: The GroupSender (GS) distributes an event
to all subscribed GroupReceivers (GR).
capabilities of an end-user, the implementation is automated within
most IDEs, thus nearly no source coding is required by the developer.
3.3. Distributing and Inserting Components
Readers who ask themselves how the Creator in the Extensibility
pattern is triggered, will get their answers here. The Creator encapsulates
a GroupReceiver that subscribes to a group on which events may
arrive that carry the classes to be instantiated. Since Java provides a
platform-independent byte-code, we can directly associate the classes
with the events. In other implementations, objects would have to be
called remotely (by using CORBA for instance). We decided to actually
distribute code, since it is a more general solution than calling remote
objects. For example, a remote object would have difficulties to access
system dependent resources to show a new graphical user interface.
New Class Event insert
new class
choose
new class GS GR New Class Event
Chooser Loader
Figure
5. Distribution of a NewClass event.
The distribution of a new component is handled by our design as the
distribution of a NewClass event by the beans for group communication
(figure 5). The bean, which acts as a Chooser , selects the class, which
should be inserted in the distributed application. Often a Chooser is
embedded in the user-interface to let the user decide, which class should
be inserted. Eventually, the Chooser fires a NewClass event. The event
is simply passed by the Chooser to a bean that is derived from a
GroupSender , which publishes it to the configured group. The event is
then received by all beans that extend a GroupReceiver for this event
type and are subscribed on that group. The GroupReceiver passes the
event to a Loader , which instantiates the class. The resulting object can
then be used by the Creator to replace or add a new Real Subject.
The combination of the Extensibility pattern with the group communication
beans can be used to extend well specified hot spots in
distributed applications; the specification is the interface Subject. If
a hot spot defines a lot of methods, each component has to implement
these methods, before it could be used to extend the hot spot. Some-
times, however, it is not feasible to be constrained by an interface.
In the case of truly independent components, such as applications, it
would be needed to write an adapter (Gamma et al., 1994) to insert
them. On the other side, even such components may use some of the
available information by the loading component. Instead of using the
static information provided by the interface, a variation of our pattern
uses the reflection mechanisms of Java and Java Beans to connect to
the available hooks.
Figure
6 illustrates this concept. A NewClass event arrives at the
loader (a). Upon arriving, the loader loads the class and instantiates
it (b). Since the loader does not know at this time the features of
the arrived bean, it uses introspection to discover the events, which
can be fired by the new bean. For the events it is interested in, the
new class event
(a)
(a) (b) (b) (c) (c)
event listener
event source
loader loader loader
Figure
6. A loader receives a new class (a) and instantiates it (b); then the loader
and the new object can register mutually (c).
loading bean adds its interest by calling the discovered registration
methods (c). Now, the loading bean can receive events from the new
bean. If the loading bean provides itself events and has discovered by
introspection that the new bean implements the appropriate method
to connect itself, it invokes that method. Then the loaded bean uses
the same mechanism to subscribe itself to the events it is interested in.
The NewClass event may additionally carry the name of a start
method. If the new class is not a bean, no events are connected, but the
start method will still be called. Thus it is possible to pass arbitrary
Java programs and start them remotely. The newly loaded code can
interact with the loading application by means of two mechanisms: by
mutual registration for the provided events that are discovered during
initialization and by the presented group communication beans. The
latter are also used to communicate with other remote applications.
3.4. Applicability
Extensibility of CSCW applications can be introduced on various levels
of granularity, varying from the one extreme, where only new applications
can be started, to the other extreme, where every component may
be extended. The place and number of hot spots in the design determine
the extensibility of the application framework. But, the number of hot
spots does not only worsen the performance of the application, but it
increases also the necessary effort of maintenance.
Figure
7 shows how the level of extensibility relates with the granularity
of components that can be inserted and the understandability
and maintainability for the end-user. The MBone tools (Eriksson, 1994)
may serve as an example for very small but successful extensibility:
the user can click in the session directory (sdr) on a session, which
starts the needed tools to join the audio and video session. The tools
are stand-alone applications, which are started in a different process.
Medium extensibility is granted by domain specific frameworks with
Figure
7. Trade-off between application extensibility, component granularity, and
understandability for the end-user.
some hot spots; TeamWave (Roseman and Greenberg, 1997) is a groupware
application, which uses a custom made component model on top
of GroupKit (Roseman and Greenberg, 1996) to offer extensibility and
tailoring support. The highest level of extensibility would be the usage
of the Extensibility pattern for every component in a system.
If extensibility is only provided by means of starting applications in
new processes, the original and the new application must use a protocol
to exchange data, which is normally different from local interaction.
Therefore, inserting components into a running application has the
advantage that they can be integrated seamlessly; the new components
become part of the application. The components can interact locally
and use same the interaction protocol of the component model.
Our experiments with our pattern and component based CSCW
applications suggest that most extensions of groupware applications
happen at anticipated places. If the application uses design patterns,
some hot spots can be found during the design phase (Schmid, 1997).
However, it remains an art rather than pure engineering to design
extensible applications. We will give some examples in the next sec-
tion, how extensibility can be designed and implemented in CSCW
applications.
4. Examples
This section gives some examples, how the Extensibility pattern is used
to design extensible CSCW applications. The first example presents
a minimal CSCW component, which is used to distribute and start
other cooperative components. We use a chat component as example to
demonstrate the application of the Extensibility pattern. The insertion
of a voting component during a chat session highlights the use of the
Extensibility pattern to support unforeseen cooperation modes. Finally,
we summarize our experience of using the Extensibility pattern in tele-teaching
components.
4.1. Design of a minimally extensible CSCW application
An example for a minimally extensible CSCW application is a loader
that offers the functionality to distribute and insert coarse grained
components, which are actually CSCW applications themselves. When
the user selects a new component for insertion, the code is distributed
to all participants of the group and started within their instances of
the loader.
Figure
8. The loader application in a visual IDE.
Figure
8 shows the composition of the loader within a visual IDE 4 .
The user interface consists of two beans to enter the participant and
the group name and a button to insert a new component. When the
user presses the button, a file dialog pops up, which lets the user select
a component. After choosing the component an event is passed to a
non-visual Controller bean, which generates a NewClass event and
passes it to a GroupSender , which is configured with the group name.
All loaders of the group members will eventually receive the NewClass
event and start the associated component by the Creator . The Creator
for the loader is configured to add every received component and to use
the reflection capabilities to register for available events. The loaded
component can query the properties of the loader via reflection - in
this case it finds the participant and group name.
In the presented form, the loader supports the insertion of symmetric
CSCW applications, i.e. applications that are executed at each partic-
ipant. For example, the loader can be used to insert the components
of the next examples: a chat and a voting component. We have also
developed a loader component for asymmetric groupware, which supports
the local insertion of a server component, and distributes clients
for this component to all other participants.
4.2. Design for functional extensions
A well-known example for a synchronous CSCW application is a chat.
A chat allows the exchange of textual messages between all members
4 This and all subsequent examples are built with IBM's Visual Age for Java.
A puzzle piece denotes a non-visual bean, a puzzle piece in brackets a variable, an
arrow a connection between an event and a method, and a dotted line a connection
between two properties.
Figure
9. The design of an extensible input component (right) for a chat tool (left).
The this variable gives access to the methods and variables of the defining bean
(here: the input component).
of a group. This example will focus on the design of an extensible chat
and present a component that can be inserted at run-time to support
a simple floor control policy.
Figure
9 shows a running chat application, and the component composition
at design-time for the input part of the chat. A new message
is distributed by a Chat event to all participants; the output part
of the chat component eventually receives the event and shows it to
the user. The reaction on user input is performed within the bean
ChatInputControlProxy , which has access to the input field and some
environment properties. Whenever the proxy generates a new Chat
event, it is distributed by a GroupSender for this event (ChatGS) to
all participants. In this example, the user-interface additionally offers
a button to insert a new component into the running application.
Figure
10. The design of the ChatInputControlProxy.
Figure
11. User-interface for insertion of a new component and its implementation.
Figure
shows the internals of the proxy, which allows the replacement
of the default strategy. The BeanCreator can receive new beans
that implement the interface ChatInputControlI ; it takes as default the
component ChatInputControl . The input field and the current instance
of the input control are associated with a variable of the type ChatIn-
putControlI . Depending on the actual input control bean, a Chat event
is fired to the proxy, which forwards it to the GroupSender .
This example implements a very simple mechanism to plug a new
component into the running system (see figure 11). When the user
clicks on the "Insert component" button of the chat application, a
dialog box pops up and the user selects the hot spot to extend. Then
the user chooses from a list of available components. The actual design
and implementation for the selection uses the same components as the
simple loader, which was previously described. As will be discussed
later, a more sophisticated mechanism should be used in real-world
applications.
To add a floor control mechanism, the default implementation of
ChatInputControl (figure 12, left) can be replaced by ChatInputFloor-
Control (figure 12, right) during run-time. The new component displays
an additional simple user-interface to request the token for input; the
input field of the chat bean is only enabled, if the user has the token.
It also uses GroupSenders to request and release 5 a token. The newly
5 This implementation implicitly releases the token after a user has sent a
message. The server for the floor control is not shown here.
Figure
12. The ChatInputControlProxy is configured by default with the bean Chat-
InputControl (left); it can be replaced by ChatInputFloorControl (right) to support
a token based floor control policy.
inserted component interacts seamlessly with the existing components,
since it implements the same interface ChatInputControlI .
The design of the chat components follows a simplified Model-View-
Controller pattern (Buschmann et al., 1996). To insert components,
which provides new behavior, we designed the controller of the chat
input component to be exchangeable; the design uses the presented
Extensibility pattern. The other chat components are designed in a
similar way. Another hot spot is designed in the chat output component;
a possible extension would be to add a component to write a log file of
the discussion.
The chat example has shown the applicability of the Extensibility
pattern to change the component's behavior at specially defined hot
spots. It is thus classified in the medium level of granularity.
4.3. Design of a second application for insertion
The loader can be used to start more than one cooperative tool for all
group members. For example, the chat tool is inserted for a discussion
in a meeting with remote participants. After a while, a decision must
be made about the discussed topics. The chair decides to create a list of
the topics, and each participant has to vote for one item on the list. So,
the chair uses an IDE to customize a voting component to be inserted
and distributed using the loader. The voting component is shown to
each participant; after a participant has submitted his vote, a separate
frame shows all arriving votes from the others.
The design-time customization of a vote component is a very easy
task: A question component is dropped on the vote panel within a visual
Figure
13. A voting component (left) and the associated customizer (right).
IDE (figure 13). The vote panel has an associated customizer to add
new questions, to manipulate them, and to provide different language
features. The customizer offers the user a graphical interface to hide
all details of programming. The end-user only performs drag-and-drop
operations and fills in text fields. The customizer constructs a new
voting component with this information, which can then be inserted
by the loader to be distributed to all participants.
This example has shown the applicability of the Extensibility pattern
for coarse grained components to support the insertion of new
cooperation forms. It also has validated the approach to use off-the-
shelf visual builder tools to let the end user build a new component
by design-time customizing existing beans, which are then distributed
and inserted into the running CSCW system.
4.4. Other examples
We have redesigned some of our earlier developed remote education
components to offer extensibility. As an example, we placed the Extensibility
pattern in remote tutoring components (Hummes et al., 1998b)
to allow the insertion of arbitrary components supporting cooperation
among the students and tutors. The tutoring components allow students
to contact a tutor, if they want assistance in a remote laboratory
course. The tutor gives peer-to-peer advice by using cooperation beans.
In the original implementation the components for cooperation could
be changed only at design-time; the new implementation can use several
cooperation forms by inserting them at run-time. The tutor can now
also distribute questionnaires (Hummes et al., 1998a) to all students
at the end of a laboratory course to monitor their learning progress.
The tutor has prepared the questionnaire during the laboratory course
based on the issues that have been discussed with the students. The
creation of such a questionnaire is highly supported by customizers
within a visual IDE. The presented customizer for the vote panel is
actually a reused component for multiple choice questions from this
tele-exam framework.
5. Discussion
The examples have shown the applicability of the Extensibility pattern
within component based CSCW applications. By using the pattern
one actually designs domain specific application frameworks. These
application frameworks can be extended at run-time by inserting new
components. The new components can be created by the end-user
outside the application within visual IDEs.
The examples have used the Extensibility pattern to insert coarse
and medium grained components. The placement of the hot spots with
the pattern in the examples is based on the anticipation of possible
extensions. This leads to the question whether a rule can be given
where the hot spots should be located.
The main problem is that a conflict exists between the level of extensibility
and the level of understandability (cfg. section 3.4). If each
component was made extensible, the design and implementation would
become unnecessary complex. Even, if the performance affected by the
added complexity could be improved (for example with the Flyweight
pattern (Gamma et al., 1994)), the maintainability criteria still limits
the amount of hot spots. On the other hand, too few hot spots limits
the extensibility of the application. So, a compromise must be found
depending on the domain of the application.
We found that the design of cooperation offers a good starting-point
to insert hot spots in CSCW applications. Components that are
triggered by user actions and perform operations depending on these
actions are candidates to be extended. If the design of an application
that uses design patterns, the location of potential hot spots can be
derived from the design (Schmid, 1997). In the case of CSCW appli-
cations, patterns used for cooperation must be examined. In the often
used Model-View-Controller pattern, a potential hot spot for extension
in each application is located in the Controller, while the View would
be a candidate for being extended only locally. Cooperations that can
use different strategies, can change their strategies by placing the Extensibility
pattern within the Strategy pattern (Gamma et al., 1994).
A good example for adding a new strategy component would be a
new algorithm for video encoding and decoding in conference systems.
The Mediator pattern (Gamma et al., 1994) can be used to design tailorable
1CSCW systems by attaching cooperation enablers (Syri, 1997)
to cooperative artifacts. By placing the Extensibility pattern within
the Mediator new enablers could be introduced in the running system.
While we have presented here a non exhaustive list of potential loca-
tions, where hot spots could be useful, it is still up to the groupware
designer to decide, where hot spots will eventually be placed. Her or
his analysis will be oriented on the domain of the application.
New components can be inserted on the demand of other components
or on the demand of the end-user. In the latter case, the end-user
must be supported by a user-interface to select the appropriate hot-spot
and component to obtain a certain behavior by his extension.
We have used a simple file chooser in our examples. A more sophisticated
approach would present the user the potential plug-points and
a list of available components that are available to extend each one.
By introspecting the selected component, such a list can be created
automatically. Additionally, the user should also get a description of
the intent, effects and possible side-effects for each component.
The presented implementation to insert components at run-time
uses code distribution. To inform remote applications to insert a new
component, we used group communication beans that can distribute
arbitrary events. The needed information about the new components
is encapsulated in an event. So, the implementation is coherent with
the Java Beans event model. Thus it is supported by visual builder
tools for Java Beans.
The distribution of code has the advantage that components have access
to the local system properties. Thus user-interface components can
also be distributed. Another advantage lays in increased performance
compared with remote object communication if the inserted component
is often used. The biggest advantage in a cooperative environment is
that the component which should be inserted in the running application
needs not be installed at the remote machines before the application is
started.
The operation of loading and instantiating classes via the network
opens severe security risks. Since Java is a network language, these
risks are well-known and methods for protection exist. Java code can
be signed. A signature authenticates the creator of the code. If code is
manipulated after signing, this can be detected. Although signed code
allows one to only accept code by trustworthy sources, the problem
of who to trust remains. In a cooperative environment, this question
is hard to answer. Even if all persons that are allowed to distribute
new code are trustworthy, failures in the distributed code can cause
damage (Zhang, 1997). The problem can be partly solved by giving
explicit rights for customizing code (Stiemerling and Cremers, 1998).
Another barrier can be inserted by granting new classes only the rights
they need to function. If, however, a class claims to need full rights and
is created by a person of full trust, the problem remains. This problem
can not be generally solved.
6. Conclusion
This article has focused on the insertion of new components into running
synchronous CSCW applications to tailor their behavior. We have
proposed to split the act of tailoring into the steps of the design-time
customization of new components within visual IDEs and their insertion
into the running application. This decoupling leads to a shorter
development cycle of applications. Furthermore, the end-user needs
only to accustom to one IDE to tailor different applications. When
IDEs will be delivered as components, our approach can be taken to
extend CSCW applications with those pluggable builder tools.
We have presented a design pattern which is focused on modeling
insertion points at hot spots in a general way. Since CSCW applications
are inherently distributed, we have developed components that are used
to distribute arbitrary events across process boundaries to a configurable
group of receivers. These group communication components are
used by our examples for all remote event communication. Extensions
are implemented as Java beans and distributed through remote events.
They are then automatically inserted at the provisioned hot spots.
Once inserted, the new components are seamlessly integrated within the
running application. Independent coarse grained components that function
also without information about their environment can be inserted
without conforming to a predefined interface. Nevertheless they can
query their environment via reflection to register for events or to read
and write properties. Thus arbitrary applications can be distributed
and started remotely. The presented examples have shown the use of
the Extensibility pattern to create hot spots within component based
applications.
This article has discussed the tension between extensibility and understandability
in the design. Increasing the extensibility increases also
the complexity of the design and thus decreases the understandability.
This leads to the conclusion that a design is not reasonable where all
components are extensible or exchangeable during run-time. So, we
have revisited the design patterns, which were used in the examples,
to find the locations where hot spots have been inserted. The located
places have been compared with some design patterns in the literature.
Thus we have shown, where the Extensibility pattern is most useful
in the design of CSCW applications. However, it remains still a task
for the application designers to identify the hot spots from their ex-
pertise. Once potential insertion points are recognized, the developer
can uniformly design the hot spots using the introduced Extensibility
pattern.
One problem, which should be addressed by further work, is how the
extensibility can be presented to the end-user. The presentation should
include the hot spots of an application and their possible extensions.
Such a presentation must find means for an intuitive graphical user-interface
to insert components at the right places.
7.
Acknowledgments
We want to thank David Turner for proof-reading earlier versions of this
article. Arnd Kohrs has provided valuable Java hints in various discussions
and without his help most of our components for remote tutoring
would never have been implemented. Last, but not least, we want to
acknowledge the detailed comments by the anonymous reviewers.
The described work is part of the ACOST research project, which
is funded by the research institute CNET Lannion of France Telecom.
--R
Communications of the ACM 40(10)
UML distilled
Design Patterns - Elements of Reusable Object-Oriented Software
Kluwer Academic Publishers.
http://www.
Developing applications with Microsoft Office: strategies for de- signing
--TR
--CTR
Yang , Du Li, Separating data and control: support for adaptable consistency protocols in collaborative systems, Proceedings of the 2004 ACM conference on Computer supported cooperative work, November 06-10, 2004, Chicago, Illinois, USA
Jrgen P. Bansler , Erling Havn, Sensemaking in Technology-Use Mediation: Adapting Groupware Technology in Organizations, Computer Supported Cooperative Work, v.15 n.1, p.55-91, February 2006
Yang , Du Li, Supporting Adaptable Consistency Control in Structured Collaborative Workspaces, Computer Supported Cooperative Work, v.14 n.5, p.469-503, October 2005
P. Barthelmess , C. A. Ellis, The Neem Platform: An Evolvable Framework for Perceptual Collaborative Applications, Journal of Intelligent Information Systems, v.25 n.2, p.207-240, September 2005 | java beans;tailoring;customization;design pattern;extensibility |
593444 | Mathematical Programming in Data Mining. | Mathematical programming approaches to three fundamental problems will be described: feature selection, clustering and robust representation. The feature selection problem considered is that of discriminating between two sets while recognizing irrelevant and redundant features and suppressing them. This creates a lean model that often generalizes better to new unseen data. Computational results on real data confirm improved generalization of leaner models. Clustering is exemplified by the unsupervised learning of patterns and clusters that may exist in a given database and is a useful tool for knowledge discovery in databases (KDD). A mathematical programming formulation of this problem is proposed that is theoretically justifiable and computationally implementable in a finite number of steps. A resulting k-Median Algorithm is utilized to discover very useful survival curves for breast cancer patients from a medical database. Robust representation is concerned with minimizing trained model degradation when applied to new problems. A novel approach is proposed that purposely tolerates a small error in the training process in order to avoid overfitting data that may contain errors. Examples of applications of these concepts are given. | Introduction
Mathematical programming, that is optimization subject to constraints, is a broad discipline that
has been applied to a great variety of theoretical and applied problems such as operations research
[29, 54], network problems [60, 53], game theory and economics [71, 35], engineering mechanics
[57, 37] and more recently to machine learning [3, 61, 23, 48, 46]. In this paper we describe three
recent mathematical-programming-based developments that are relevant to data mining: feature
selection [45, 10], clustering [11] and robust representation [67]. We note at the outset that we
do not plan to survey either the fields of data mining or mathematical programming, but rather
highlight some recent and highly effective applications of the latter to the former. We will, however,
point out other approaches that are mostly not based on mathematical programming.
The fundamental nonlinear programming problem [6, 44] consists of minimizing an objective
function subject to inequality and equality constraints and is typically written as follows
f(x) subject to g(x) - 0;
where x is an n-dimensional vector of real variables, f is a real-valued function of x, g and h
are finite dimensional vector functions of x. If all the functions f , g and h are linear then the
problem simplifies to a linear program [15, 52, 69] which is the classical problem of mathematical
Mathematical Programming Technical Report 96-05, August 1996 - Revised November 1996 & March 1997. This
material is based on research supported by National Science Foundation Grant CCR-9322479.
y Computer Sciences Department, University of Wisconsin, 1210 West Dayton Street, Madison, WI 53706, email:
programming. If x is two-dimensional, a linear program can be thought of as the problem of finding
a lowest point (not necessarily unique) on a tilted plane surrounded by a piecewise-linear fence.
Extremely efficient algorithms exist for the solution of linear programs. Thus reducing a problem
to a single or finite sequence of linear programs is tantamount to solving the problem.
Another reason for emphasizing mathematical programming in this work is the very broad
applicability of the optimization-under-constraints paradigm. A great variety of problems from
many fields can be formulated and effectively solved as mathematical programs. According to the
great eighteenth century mathematician Leonhard Euler: "Nothing happens in the universe that
does not have a sense of either certain maximum or minimum" [68, p 1]. From the point of view
of applicability to large-scale data mining problems, the proposed algorithms employ either linear
programming (Sections 2 and 3) which is polynomial-time-solvable [36, 69], or convex quadratic
programming (Section 4) which is also polynomial-time-solvable [69]. Extremely fast linear and
quadratic programming codes [14] that are capable of solving linear programs with millions of
variables [8, 40] and very large quadratic programs, make the proposed algorithms easily scalable
and effective for solving a wide range of problems. One limitation however is that the problem
features must be real numbers or easily mapped into real numbers. If some of the features are
discrete and can be represented as integers, then the techniques of integer programming [24, 55, 14]
can be employed. Integer programming approaches have been applied for example to clustering
problems [64, 1], but will not be described here, principally because the combinatorial approach is
fundamentally different than the analytical approach of optimization with real variables. Stochastic
optimization methods based on simulated annealing have also been used in problems of inductive
concept learning [50].
The problems considered in this paper are:
1. Feature Selection The feature selection problem treated is that of discriminating between
two finite point sets in n-dimensional feature space by a separating plane that utilizes as few
of the features as possible. The problem is formulated as a mathematical program with a
parametric objective function and linear constraints [10]. A step function that appears in
the objective function is approximated by a concave exponential on the nonnegative real line
instead of the conventional sigmoid function of neural networks [28]. This leads to a very fast
iterative linear-programming-based algorithm for solving the problem that terminates in a
finite number of steps. On the Wisconsin Prognosis Breast Cancer (WPBC) [72, 51] database
the proposed algorithm reduced cross-validation error on a cancer prognosis database by
while reducing problem features from to 4.
2. Clustering The clustering problem considered in this paper is that of assigning m points
in the n-dimensional real space R n to k clusters. The problem is formulated as that of
determining k centers in R n such that the sum of distances of each point to the nearest
center is minimized. Once the cluster centers are determined by a training set, a new point
is assigned to the cluster with the nearest cluster center. If a polyhedral distance (such
as the 1-norm distance) is used, the problem can be formulated as that of minimizing a
piecewise-linear concave function on a polyhedral set which is shown to be equivalent to a
bilinear program: minimizing the product of two linear functions on a set determined by
satisfying a system of linear inequalities [11]. Although a bilinear program is a nonconvex
optimization problem (i.e. minimizing a function that is not valley-like), a fast finite k-Median
Algorithm consisting of solving few linear programs in closed form leads to a stationary point.
Computational testing of this algorithm as a KDD tool [18] has been quite encouraging. On
the Wisconsin Prognosis Breast Cancer Database (WPBC), distinct and clinically important
survival curves were discovered from the database by the k-Median Algorithm, whereas the
traditional k-Mean Algorithm [32, 64], which uses the square of the 2-norm distance, thus
emphasizing outliers, failed to obtain such distinct survival curves for the same database. On
four other publicly available databases each of the k-Median and k-Mean Algorithms did best
on two of the databases.
3. Robust Representation This problem deals with modeling a system of relations within a
database in a manner that preserves, to the extent possible, the validity of the representation
when the data on which the model is based changes. This problem is closely related to the
generalization problem of machine learning of how to train a system on a given training set
so as to improve generalization on a new unseen testing set [39, 63, 73]. We use here a simple
linear model [67] and will show that if a sufficiently small error - is purposely tolerated in
constructing the model, then for a broad class of perturbations the model will be a more
accurate representation than one obtained by a conventional zero error tolerance. A simple
example demonstrates this result.
1.1 Notation
We summarize below notation and background material used in this paper.
ffl All vectors will be column vectors unless transposed to a row vector by a superscript T .
ffl For a vector x in the n-dimensional real space R n , jxj will denote a vector of absolute values
of components x of x.
ffl The base of the natural logarithm will be denoted by ", and for y \Gammay will denote a
vector in R m with component " \Gammay
ffl For x 1, the norm kxk p will denote the p-norm, that is (
.
ffl The notation A 2 R m\Thetan will signify a real m \Theta n matrix. For such a matrix, A T will denote the
transpose, A i will denote row i and A I will denote those rows A i such that i 2 I ae
for a given subset I of
ffl A vector of ones in a real space of arbitrary dimension will be denoted by e. A vector of zeros
in a real space of arbitrary dimension will be denoted by 0.
ffl If x and y are vectors in R n , the notation minfx; yg will denote the vector in R n of componentwise
minimum of x i and y i ,
ffl The notation arg min
f(x) will denote the set of minimizers of f(x) on the set S. Similarly
arg vertex min
f(x) will denote the set of vertex minimizers of f(x) on a polyhedral set S.
ffl A polyhedral set S in R n is the the intersection of a finite number of closed halfspaces in R n .
ffl A vertex of a polyhedral set S is a boundary point of S that lies on the intersection of n
linearly independent planes constituting the boundary. Typically
is a vertex of S if for some subset I of
A I I and A I 2 R n\Thetan is nonsingular.
ffl A separating plane, with respect to two given point sets A and B in R n , is a plane that
attempts to separate R n into two halfspaces such that each open halfspace contains points
mostly of A or B:
ffl Alternatively, a separating plane can be interpreted as a classical perceptron [62, 43] with a
threshold determined by the distance of the plane to the origin, and the incoming arc weights
of the perceptron determined by the components of the normal vector to the plane.
Feature Selection
Feature selection (or extraction) attempts to use the simplest model to describe the essence of a
phenomenon. Hence it can be considered as an application of Occam's ``law of parsimony'', also
known as Occam's Razor [65, 9], which states: "What can be done with fewer [assumptions] is done
in vain with more". There are statistical [22], machine learning [39, 33] as well as mathematical
programming [12, 45, 10] approaches to the feature selection problem. In this work we shall deal
principally with the latter because of the novelty of the approach and it effectiveness.
The problem that we shall address is the binary classification problem, i.e. the problem of
discriminating between two given point sets A and B in the n-dimensional real space R n by using
as few of the n dimensions of the space as possible. For example in the medical application
described at the end of this section, we attempt to discriminate, with as few of the features as
possible, between breast cancer patients that had a recurrence of the disease within two years of
diagnosis and those who had not. The model that we shall adopt will be that of a perceptron or
linear threshold unit (LTU) that employs as few of the features of the given problem as possible.
Extensions to more complex models leading to compact and accurate decision trees have also been
made [12]. Geometrically our approach corresponds to constructing a plane in R n defined by
with normal w 2 R n and distance jflj
to the origin, while suppressing as many of the components
of w as possible. In addition, the set A must lie, to the extent possible, in the open halfspace
and the set B in the open halfspace
This corresponds to an LTU with a threshold fl and and incoming arc weights w 2 R n , with as
many of the weights as possible set to zero. If we represent the set A by the matrix A 2 R m\Thetan and
the set B by the matrix B 2 R k\Thetan , then the problem is to find fl 2 R and w 2 R n , with as many
components equal to zero as possible, such that the following inequalities are satisfied in some best
sense:
where e is a vector of ones. Because linear programming cannot handle strict inequality constraints
we rescale (5) as follows. We divide the variables (w; fl) by the positive quantity
min
and call the rescaled variables (with notational economy in mind and a slight abuse of notation)
(w; fl) again, then (5) is equivalent to:
e: (6)
Since these inequalities may not have a solution in general, one resorts to satisfying them in some
best approximate sense by minimizing an average sum of their violations. This leads to the following
Robust Linear Programming formulation [4]:
RLP min
w;fl;y;z
Robustness here refers to the fact that the useless null vector (w = 0) is naturally excluded as
a solution of (7), which is not the case in other linear programming formulations of this problem
[41, 66, 26, 25]. Note that because of the constraints of the problem, the variables y and z will
satisfy the following conditions:
Hence minimizing e T
will force the satisfaction in some best sense of (6), and equivalently
(5), by minimizing the average violations of (6):m
which will be zero if and only if (6), or equivalently (5), is exactly satisfied. The linear programming
formulation (7) which has a number of natural theoretical properties including robustness is also
very effective computationally [4, 49]. However it does not address the problem of suppressing
irrelevant features. In order suppress such features, the objective function of (7), which merely
measures the average sum of the violations of the inequalities (6), is modified so as to also suppress
as many of the components of the weight vector w as possible. This is achieved by weighting the
original objective of (7) by weighting by - an exponential function
approximation of the absolute value v of the weight vector w. This exponential function, e T
approximates the 1-norm of a step function of v and leads to the following mathematical
program with a concave objective function and linear constraints:(Feature Selection Concave)
the problem degenerates to the robust (that is w 6= linear program of (7) which
obtains a plane P (2) that separates the sets A and B in an optimal fashion without regard to
feature suppression. When - ? 0, then in addition to the objective of separating A and B, we
attempt to suppress as many of the components of w as possible by minimizing an exponential
smoothing of the step function on the nonnegative real line for each
where " is the base of the natural logarithms, and v is the absolute value of w. In most our
applications a value of sufficient to make the exponential a good approximation of
the step function to force suppression of unnecessary components of w. As described below in
Algorithm 2.1 the parameter - is chosen to give the best cross-validated error. For small values
of - it can be shown theoretically [47] that the minimization problem (8) picks that solution of
the Robust Linear Program (7) that minimizes the exponential term of (8), and hence solves the
RLP (7) while suppressing redundant components of w. Because the objective function of (8) is
a concave function bounded below by zero on the nonempty polyhedral set of (8), it follows that
it has a vertex solution if the feasible region does not contain lines extending to infinity in both
directions [59, Corollaries 32.3.3, 32.3.4]. (Excluding such lines can be readily accomplished by a
simple transformation of the variables (w; fl) into the nonnegative variables (w 1 using the
standard transformation . For the sake of simplicity and because it is
not needed computationally, we shall forgo this transformation here.) A fast, finitely-terminating
successive linear programming algorithm has been proposed for solving this problem [10] as follows.
Algorithm 2.1 Successive Linearization Algorithm (SLA) for FSV (8). Choose - 2 [0; 1).
Start with a random (w Having (w determine the next iterate by
solving the linear program:
(w
Stop when
(v
Comment: The parameter ff was set to 5. The parameter - was chosen in the set f0, 0.05,
with the desired - being the one achieving the best cross-validated separation.
It has been shown [45, Theorem 4.2] that this algorithm terminates in a finite number of steps,
typically five or six, at a global solution or a stationary point satisfying a necessary optimality
condition.
This algorithm was tested on the 32-feature Wisconsin Prognostic Breast Cancer (WPBC)
database [72, 51] which was collected from 28 patients for which cancer recurred within two years,
and 119 patients for which cancer did not recur within two years. Thus in the terminology of our
formulation 28 and 118. For this problem the separating plane obtained
by the Successive Linearization Algorithm 2.1 with used only 4 features out of 32, while
increasing tenfold cross-validation correctness by 35.4% [10]. If other values of the parameter - are
used in the Successive Linearization Algorithm 2.1, then the number of features that determine the
separating plane will vary between 1 and 32. The effect of using a different number of features is
shown in Figure 1 which shows a plot of tenfold cross-validation correctness corresponding to the
number of features used. As just indicated, Figure 1 shows that the best tenfold correctness occurs
at four features.
Number of Nonzero Elements of w
Test
Correctness
Figure
1: Feature Selection in the Prognosis Problem: Tenfold cross-validation correctness versus
number of features selected by the Successive Linearization Algorithm 2.1
3 Clustering via Mathematical Programming
The unsupervised assignment of elements of a given set into groups or clusters of like points, is
the objective of cluster analysis. There are many approaches to this problem, including statistical
[32], machine learning [20], integer and mathematical programming approaches [64, 1, 58, 11]. We
shall describe here the recent approach of [11] that utilizes a fast bilinear programming
minimizing the product of two linear functions on a set defined by linear inequalities. A principal
motivation behind our mathematical programming approach is a precise and concise statement of
the clustering problem as a concave minimization problem (11) which has not been given before. We
note that a concave minimization problem which involves minimizing a concave function (mountain-
like function) on a polyhedral set S is more difficult than minimizing a convex function (valley-like
function) on S because the former may have many local minima at vertices of S that are not
global minima, whereas for the latter each local minimum is a global minimum. Nevertheless for
our clustering application the concave formulation is very effective in discovering well separated
survival curves by determining k cluster centers such that the sum of the 1-norm distances of each
point in a given database to the nearest cluster center is minimized. A new point is then assigned
to the cluster with center nearest to the point. This simple formulation can be restated as a bilinear
program (12) that leads to a fast k-Median Algorithm 3.1. A reformulation of (11) using the square
of the 2-norm instead of the 1-norm, leads to the k-Mean Algorithm [32, 64]. Although it is not
the intention here to carry out a detailed comparative study of these two clustering algorithms,
the k-Median Algorithm, as described below, does give well separated survival curves for breast
cancer patients whereas the k-Mean algorithm does not. On four other publicly available databases,
each of the k-Median and k-Mean Algorithms did best on two of the databases. This indicates the
potential of the k-Median Algorithm as a KDD tool. We describe the mathematical programming
approach now.
For a given set A of m points in R n represented by the matrix A 2 R m\Thetan and a number k
of desired clusters, we formulate the clustering problem as follows. Find cluster centers C
such that the sum of the minima over ' 2 of the 1-norm distance between
each point A and the cluster centers C specifically
we need to solve the following mathematical program:
minimize
C;D
min
subject to \GammaD i' - A T
Here D i' 2 R n , is a dummy variable that bounds the components of the difference A T
between point A T
i and center C ' , and e is an n \Theta 1 vector of ones in R n . Hence e T D i' bounds
the 1-norm distance between A i and C ' . We note that just as in the case of robust regression
[31],[27, pp 82-87], the use of the 1-norm here to measure the error criterion leads to insensitivity
to outliers such as those resulting from distributions with pronounced tails. We also note that
since the objective function of (11) is the minimum of k linear (and hence concave) functions, it
is a piecewise-linear concave function [44, Corollary 4.1.14]. This is not the case for the 2-norm or
p-norm, p 6= 1. Although (11) is NP-hard, it can be reformulated as the following bilinear program
which can be solved effectively by using a k-Median Algorithm that consists of solving a succession
of simple linear programs in closed form. We state the bilinear programming formulation and
k-Median Algorithm for solving the clustering problem.
Proposition 3.1 Clustering as a Bilinear Program The clustering problem (11) is equivalent
to the following bilinear program:
minimize
subject to \GammaD i' - A T
This essentially obvious result [11, Proposition 2.2] can be seen from the fact that, for a fixed i,
setting all the components of T i' equal to zero except one corresponding to a smallest
e T D i' , with respect to ', equal to 1, leads to the objective function of (11) from that of (12). Note
that the constraints of (12) are uncoupled in the variables (C; D) and the variable T . Hence the
Uncoupled Bilinear Program Algorithm UBPA [5, Algorithm 2.1] is applicable. Simply stated, this
algorithm alternates between solving a linear program in the variable T and a linear program in the
variables (C; D). The algorithm terminates in a finite number of iterations at a stationary point
satisfying the minimum principle necessary optimality condition for problem (12) [5, Theorem 2.1].
We note however, because of the simple structure the bilinear program (12), the two linear programs
can be solved explicitly in closed form. This leads to the following algorithmic implementation.
Algorithm 3.1 k-Median Algorithm Given the cluster centers C j
k at iteration j, compute
k by the following two steps:
(a) Cluster Assignment: For each A T
determine '(i) such that C j
'(i) is closest to
A T
i in the one norm.
(b) Cluster Center Update: For choose C j+1
' as a median of all A T
i assigned to
Stop when C j+1
' . Assign each point to a cluster whose center is closest in the 1-norm to the
point.
Although the k-Median Algorithm is similar to the k-Mean Algorithm wherein the 2-norm distance
is used [64, 22], it differs from it computationally, and theoretically. In fact, the underlying
problem (12) of the k-Median Algorithm is a concave minimization on a polyhedral set while the
corresponding problem for a two- or p-norm, p 6= 1, is:
minimize
C;D
min
subject to \GammaD i' - A T
This is not a concave minimization on a polyhedral set, because the minimum of a set of convex
functions is not in general concave. We also note that the k-Mean Algorithm finds a stationary
point not of problem (13) with but of the same problem except that kD i' k 2 is replaced
by kD i' k 2
2 and thus favoring outliers. Without this squared distance term, the subproblem of the
k-Mean Algorithm becomes the considerably harder Weber problem [56, 13] which locates a center
in R n closest in sum of Euclidean distances (not their squares!) to a finite set of given points. The
Weber problem has no closed form solution. However, using the mean as a cluster center of points
assigned to the cluster, as done in the k-Mean Algorithm, minimizes the sum of the squares of the
distances from the cluster center to the points.
Because there is no guaranteed way to ensure global optimality of the solution obtained by
either the k-Median or k-Mean Algorithms, different starting points can be used to initiate the
algorithm. Random starting cluster centers or some other heuristic can be used such as placing k
initial centers along the coordinate axes at densest, second densest intervals on the
axes. The latter heuristic was used in our computational results.
To test the effectiveness of the k-Median Algorithm it was used as a KDD tool [18] to mine the
Breast Cancer Database (WPBC) in order to discover medical knowledge. For
such medical databases, extracting well-separated survival curves provides an essential prognostic
tool. Survival curves [34, 38] give expected percent of surviving patients as a function of time. The
k-Median Algorithm was applied to WPBC to extract such curves. Survival curves were constructed
for 194 patients using two clinically available features for each patient: tumor size and number of
cancerous lymph nodes excised. Using the k-Median Algorithm separated the points into
3 clusters. The survival curve for each cluster is depicted in Figure 2(a). The key observation
to make here is that curves are well separated, and hence the clusters can be used as prognostic
indicators to assign a survival curve to a patient depending on the cluster into which the patient
falls. By contrast, the k-Mean Algorithm obtained poorly separated survival curves as shown in
Figure
2(b), and hence are not useful for prognosis.
Another comparison of the k-Median and k-Mean Algorithms was performed on databases with
known classes. Correctness was measured by the ratio of the sum of the number of majority points
in each cluster to the total number of points m in the data set. Table 1 shows results averaged over
ten random starts for four databases from the Irvine repository of databases [51]. We note that for
two of the databases the k-Median gave better correctness than the k-Mean and for the other two
the k-Mean was better.
Months
Percent
Disease-Free
Survival Curves for 3 Clusters Using (Tumor,Lymph) (k-Median)
(a) k-Median
Percent
Disease-Free
Survival Curves for 3 Clusters Using (Tumor,Lymph) (k-Mean)
(b) k-Mean
Figure
2: Survival curves for the 3 clusters of 194 cancer patients obtained by the k-Median and
k-Mean Algorithms
Algorithm # Database ! WDBC Cleveland Votes Star/Galaxy-Bright
Unsupervised k-Median 93.2% 80.6% 84.6% 87.6%
Unsupervised k-Mean 91.1% 83.1% 85.5% 85.6%
Table
1 Training set correctness using the unsupervised k-Median
and k-Mean Algorithms and the supervised Robust LP on four databases
Robust Representation
We consider now the problem of how to generate a robust representation of a system so that the
model remains valid under a class of data perturbation. This problem is closely related to the
generalization problem of machine learning of how to train a system on a given training set so as
to improve generalization on a new unseen testing set [39, 63, 73]. We shall concentrate on some
recent results [67] obtained for a simple linear model and which make essential use of mathematical
programming ideas. These ideas, although rigorously established for a simple linear model here, are
likely to extend to more complex systems. In a somewhat related approach Vapnik has proposed a
quadratic program for constructing a plane to obtain a smallest probability of error for separating
two point sets [70, Section 5.4]. Bennett and Bredensteiner [2] have formulated a similar problem
using linear programming. Vapnik [70, Section 5.9] also makes use of Huber's robust regression
ideas [30] and extends the latter's robust regression loss function [70, p 152] by adding an ffl-
insensitive zone to it. This ffl-insensitive zone is similar to our -tolerance zone (see (17) and (18)
below) wherein errors are disregarded if they fall within the band [\Gamma- ]. Another similarity with
Vapnik's work is the presence of a regularization term fflkxk 2
2 in our minimization (17) problem
(introduced here in order to make the solution unique and to rigorously derive our generalization
theorems) and Vapnik's bounding his weight vector in order to control the VC dimension [70, p 128,
Theorem 5.1]. However, what our approach provides here that is novel, are precise deterministic
conditions (Propositions 4.1 and 4.2 below) under which tolerating a -insensitivity zone will give
better generalization results than the conventional zero-tolerance that is used in an ordinary least
squares approach.
The model that we shall consider here consists of the training set fA; ag where A is a given
m \Theta n real matrix and a is a given m \Theta 1 real vector. A vector x in R n is to be "learned" such that
the linear system
which does not have an exact solution, is satisfied in some approximate fashion, and such that the
error in satisfying
for some unseen testing set (C; c) 2 R k\Thetan \Theta R k , is minimized. Of course, if we disregard the testing
set error (15), the problem becomes the standard least-norm problem:
min
where k\Deltak is some norm on R m . However with an eye to possible perturbations in the given training
set fA; ag, we pose the following motivational question: If the vector a of the training set is known
only to an accuracy of - , where - is some small positive number, does it make sense to attempt
to drive the error to zero as is done in (16), or is it not better to tolerate errors in the satisfaction
of a up to a magnitude of -? In other words, instead of (14), we should try to satisfy the
following system of inequalities, in some best sense:
To do that, we solve the following regularized quadratic program for some nonnegative - and a
small positive ffl:
minimize x;y;z2
2subject to \Gammaz \Gamma e- Ax \Gamma a - e-
Here y and z are the errors in satisfying the inequalities of (17) and ffl is a small fixed positive
regularization constant that ensures the uniqueness of the x component of the solution. Although
ffl was held fixed in our computational experiments, it is possible to optimize its value by cross-validation
on a tuning set in order to obtain better generalization. We note immediately, that if
degenerates to the regularized classical least squares problem:
min
x2R
The key question to ask here, is this: Under what conditions does a solution x(-) of (18), for
some - ? 0 give a smaller error than x(0) on a testing set? We are able to give an answer to
this question and corroborate it computationally [67], by considering a general testing set (C; c) 2
R k\Thetan \Theta R k for the problem (15) as well as a simpler testing set, where only the right side of (14)
is perturbed. We first restrict ourselves to the latter and simpler perturbation, that is:
where p is some arbitrary fixed perturbation in R m , and consider the following associated error
In particular we would like to know when is f(0) not a local minimum of f(-) on the set f- j - 0g.
In fact we are only interested in the -interval [0; - ], where -
- is defined by
because the minimum value of (18) approaches zero, for -
- , as ffl approaches zero. The following
proposition gives a sufficient condition which ensures that solving (18), for some positive - , produces
an x(-) that generalizes better on the system (20) than that obtained by solving a plain regularized
least squares problem (19), that is f(-
Proposition 4.1 Robust Representation of [67]. For a solution x(-)
of (18) the testing set error function f(-) of (21) has a strict local maximum at 0 and a global
minimum on [0; -], where - is defined by (22), at some - ? 0, whenever
for some - 2 (0; ~ - ], for some sufficiently small ~
- .
410121416Tolerance
Test
Figure
3: A computational example of Proposition 4.1. The bottom curve depicts a decreasing
test error f(-) of (21) for the perturbed system (23). The top
curve demonstrates an increasing error effect of violating (23) for sufficiently small ffl.
Computational results carried out in [67] have corroborated the improved generalization results
of Proposition 4.1 above. We depict in Figure 3 a simple numerical example that uses the training
model (14), where the vector x is learned with various error tolerances - (18) and is then tested
on the perturbed system p. In the learning situation depicted by the bottom curve of
Figure
makes an acute angle with in the neighborhood of
Hence, as - increases, the test error in satisfying decreases. In the upper curve, we
show a perturbation for which the angle is reversed: the testing model is using the
same perturbation p. Here the testing error goes up as - increases away from zero.
We conclude this section by extending Proposition 4.1 to a more general testing model
where C 2 R k\Thetan and c 2 R k are chosen arbitrarily. To do this we define a corresponding error
function g(-) to (21) which measures the error in satisfying (24) by the x(-) learned by solving the
regularized quadratic program (18). We thus have the error
ck 2
For this very general formulation we are able to give the following result that tells us when tolerant
training does lead to improved generalization.
Proposition 4.2 Improved generalization with positive tolerance for testing model
Let x(-) be defined by the tolerant training of Ax = a by the regularized quadratic
program (18) with tolerance - 0. Let g(-) denote the error generated by x(-) in the testing model
defined by (25). The zero-tolerance error g(0) is a local maximum of g(-) over the set
f- 0g whenever
where r(-) is the residual vector defined by
Furthermore, the testing set error function g(-) of (25) has a global minimum on [0; -
-], for -
defined by (22), at some - ? 0, whenever condition (26) holds and -
5 Conclusion
A number of ideas based on mathematical programming have been proposed for the solution of
the fundamental problems of feature selection, clustering and robust representation. Examples of
applications of these ideas have been given to show their effectiveness. We discuss now some issues
associated with these approaches.
All the methods here use real variables. Even though the class of problems falling in this
category is quite broad, this requirement imposes a restriction on the type of problems that can
be handled. Nevertheless the proposed methods can be applied to problems with discrete variables
if one is willing to use the techniques of integer and mixed integer programming [55, 21] which
are more difficult. In fact one of the proposed algorithms, the k-Median Algorithm, whose finite
termination is established for problems with real variables, is directly applicable with no change to
problems with ordered discrete variables such as integers. How well it performs on such problems
would be an interesting problem to examine.
Another important practical issue is scalability. As mentioned earlier, since linear programs with
millions of variables can be solved with present day state-of-the-art methods, large-scale databases
are amenable to the proposed linear-programming-based methods. In addition there is a large
body of literature on the parallel solution and decomposition of large scale mathematical programs
[7, 16, 17, 19] where for many of the algorithms only part of the data is loaded into memory at a
time. Such parallel and decomposition algorithms extend further the applicability of the proposed
methods to very large scale databases.
From a numerical standpoint, mathematical programming codes, and especially linear and
quadratic programming codes, are reliable and robust codes that have been in a constant state of
improvement over last fifty years. The well-understood polynomial-time finite termination of linear
and quadratic programming interior methods has led to very powerful and reliable commercial
software such as CPLEX [14] that can easily and reliably implement all the proposed algorithms.
Finally we point out that although a linear model was used for both the feature selection and
robust representation models, nonlinear models that are linear in their parameters, e.g. quadratic
surfaces, can be easily transformed into a linear system, as was done for example in [41] where
quadratic separation was achieved by linear programming. However in some inherently nonlinear
problems where for example the parameters of a separating surface appear nonlinearly, one may
have to resort to nonlinear models and the theory and algorithms of nonlinear programming [42, 6].
This would again be a promising problem to pursue.
We conclude with the hope that the problems solved demonstrate the theoretical and computational
potential of mathematical programming as a versatile and effective tool for solving important
problems in data mining and knowledge discovery in databases.
--R
A Tabu search approach to the clustering problem.
Geometry in learning.
Neural network training via linear programming.
Robust linear programming discrimination of two linearly inseparable sets.
Bilinear separation of two sets in n-space
Nonlinear Programming.
Parallel and Distributed Computation.
Very large-scale linear programming: a case study combining interior point and simplex methods
Occam's razor.
Feature selection via mathematical pro- gramming
Clustering via concave minimization.
Feature minimization within decision trees.
On the Fermat-Weber problem with convex cost functionals
CPLEX Optimization Inc.
Linear Programming and Extensions.
Serial and parallel solution of large scale linear programs by augmented Lagrangian successive overrelaxation.
The KDD process for extracting useful knowledge from volumes of data.
Parallel variable distribution.
Knowledge acquisition via incremental conceptual clustering.
Fundamentals and Applications (Topics in Chemical Engineering.
Statistical Pattern Recognition.
Convergence properties of backpropagation for neural nets via theory of stochastic gradient methods.
Integer Programming.
Improved linear programming models for discriminant analysis.
Mathematical methods for pattern classification.
Fundamentals of Artificial Neural Networks.
Introduction to the Theory of Neural Computation.
Introduction to Operations Research.
Robust estimation of location parameter.
Robust Statistics.
Algorithms for Clustering Data.
Irrelevant features and the subset selection problem.
Nonparametric estimation from incomplete observations.
Mathematical Methods and Theory in Games
A new polynomial time algorithm for linear programming.
Mathematical programming in contact problems.
Survival Analysis.
Optimal brain damage.
Linear and nonlinear separation of patterns by linear programming.
Nonlinear Programming.
Mathematical programming in neural networks.
Nonlinear Programming.
Machine learning via polyhedral concave minimization.
Mathematical programming in machine learning.
Nonlinear perturbation of linear programs.
Serial and parallel backpropagation convergence via nonmonotone perturbed minimization.
Breast cancer diagnosis and prognosis via linear programming.
Combinatorial optimization in inductive concept learning.
UCI repository of machine learning databases.
Linear Programming.
Network Programming.
Operations Research.
John Wiley
A quadratically convergent method for minimizing a sum of euclidean norms.
Inequality Problems in Mechanics and Applications.
analysis and mathematical programming.
Convex Analysis.
Network Flows and Monotropic Optimization.
A polynomial time algorithm for the construction and training of a class of multilayer perceptrons.
Parallel Distributed Processing.
Overfitting avoidance as bias.
Readings in Machine Learning.
Pattern classifier design by linear programming.
Improved generalization via tolerant training.
Foundations of the Theory of Learning Systems.
Linear Programming: Foundations and Extensions.
The Nature of Statistical Learning Theory.
Theory of Games and Economic Behavior.
WPBC: Wisconsin Prognostic Breast Cancer Database.
The Mathematics of Generalization
--TR
--CTR
Bernardete Ribeiro, Learning adaptive kernels for model diagnosis, Design and application of hybrid intelligent systems, IOS Press, Amsterdam, The Netherlands,
M. A. Goberna , V. Jeyakumar , N. Dinh, Dual Characterizations of Set Containments with Strict Convex Inequalities, Journal of Global Optimization, v.34 n.1, p.33-54, January 2006
Sanjeev Arora , Prabhakar Raghavan , Satish Rao, Approximation schemes for Euclidean
Carlotta Orsenigo , Carlo Vercellis, Accurately learning from few examples with a polyhedral classifier, Computational Optimization and Applications, v.38 n.2, p.235-247, November 2007
V. F. Demyanov , A. M. Bagirov , A. M. Rubinov, A method of truncated codifferential with application to some problems of cluster analysis, Journal of Global Optimization, v.23 n.1, p.63-80, May 2002
P. S. Bradley , O. L. Mangasarian , J. B. Rosen, Parsimonious Least Norm Approximation, Computational Optimization and Applications, v.11 n.1, p.5-21, Oct. 1998
scalable decision tree system and its application in pattern recognition and intrusion detection, Decision Support Systems, v.41 n.1, p.112-130, November 2005
Jong-Shi Pang, Guest Editorial, Computational Optimization and Applications, v.13 n.1-3, p.5-12, April 1999
Jong-Shi Pang, Guest Editorial, Computational Optimization and Applications, v.12 n.1-3, p.5-12, Jan. 1999
Tapas Kanungo , David M. Mount , Nathan S. Netanyahu , Christine Piatko , Ruth Silverman , Angela Y. Wu, The analysis of a simple
Gentile, A new approximate maximal margin classification algorithm, The Journal of Machine Learning Research, 2, 3/1/2002
Tapas Kanungo , David M. Mount , Nathan S. Netanyahu , Christine D. Piatko , Ruth Silverman , Angela Y. Wu, An Efficient k-Means Clustering Algorithm: Analysis and Implementation, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.24 n.7, p.881-892, July 2002
Gunnar Rtsch , Sebastian Mika , Bernhard Schlkopf , Klaus-Robert Mller, Constructing Boosting Algorithms from SVMs: An Application to One-Class Classification, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.24 n.9, p.1184-1199, September 2002
Balaji Padmanabhan , Alexander Tuzhilin, On the Use of Optimization for Data Mining: Theoretical Interactions and eCRM Opportunities, Management Science, v.49 n.10, p.1327-1343, October
Sudipto Guha , Adam Meyerson , Nina Mishra , Rajeev Motwani , Liadan O'Callaghan, Clustering Data Streams: Theory and Practice, IEEE Transactions on Knowledge and Data Engineering, v.15 n.3, p.515-528, March | robust representation;mathematical programming;clustering;feature selection |
593449 | Discovery of Frequent Episodes in Event Sequences. | Sequences of events describing the behavior and actions of users or systems can be collected in several domains. An episode is a collection of events that occur relatively close to each other in a given partial order. We consider the problem of discovering frequently occurring episodes in a sequence. Once such episodes are known, one can produce rules for describing or predicting the behavior of the sequence. We give efficient algorithms for the discovery of all frequent episodes from a given class of episodes, and present detailed experimental results. The methods are in use in telecommunication alarm management. | Introduction
Most data mining and machine learning techniques are adapted towards the
analysis of unordered collections of data. However, there are important application
areas where the data to be analyzed consists of a sequence of events.
Examples of such data are alarms in a telecommunication network, user interface
actions, crimes committed by a person, occurrences of recurrent ill-
nesses, etc. Recently, interest in knowledge discovery from sequential data
has increased: see, e.g., [5, 8, 17, 19, 24].
Abstractly, such data can be viewed as a sequence of events, where each
event has an associated time of occurrence. An example of an event sequence
is represented in Figure 1. Here A; B;C;D;E; and F are event types, e.g.,
dioeerent types of alarms from a telecommunication network, or dioeerent types
of user actions, and they have been marked on a time line.
One basic problem in analyzing such a sequence is to -nd frequent epis-
odes, i.e., collections of events occurring frequently together. For example,
in the sequence of Figure 1, the episode iE is followed by Fj occurs several
times, even when the sequence is viewed through a narrow window. Epis-
odes, in general, are partially ordered sets of events. From the sequence in
the -gure one can make, for instance, the observation that whenever A and
occur (in either order), C occurs soon.
When discovering episodes in a telecommunication network alarm log,
the goal is to -nd relationships between alarms. Such relationships can then
be used in an on-line analysis of the incoming alarm stream, e.g, to better
explain the problems that cause alarms, to suppress redundant alarms, and
to predict severe faults.
In this paper we consider the following problem. Given a class of episodes
and an input sequence of events, -nd all episodes that occur frequently
in the event sequence. We describe the framework and formalize the know-
time
EDF A BCEF C D BAD C EFC BEAECF A D
Figure
1: A sequence of events.
ledge discovery task in Section 2. Algorithms for discovering all frequent
episodes are given in Section 3. Thery are based on the idea of -rst -nding
small frequent episodes, and then progressively looking for larger frequent
episodes. Additionally, the algorithms use some simple pattern matching
ideas to speed up the recognition of occurrences of single episodes. Section 4
outlines an alternative way of approaching the problem, based on locating
minimal occurrences of episodes. Experimental results using both approaches
and with various data sets are presented in Section 5. We discuss extensions
and review related work in Section 6. Section 7 is a short conclusion.
2 Event sequences and episodes
Our overall goal is to analyze sequences of events, and to discover recurrent
combinations of events, which we call frequent episodes. We -rst formulate
the concept of event sequence, and then look at episodes in more detail.
2.1 Event sequences
We consider the input as a sequence of events, where each event has an
associated time of occurrence. Given a set E of event types, an event is a
is an event type and t is an integer, the (occurrence)
time of the event. The event type can actually contain several attributes; for
simplicity we consider here the event type as a single value.
An event sequence s on E is a triple (s; T
EDF A BCEF C D BAD C EFC BEAECF A D
Figure
2: The example event sequence and two windows of width 5.
is an ordered sequence of events such that A i 2 E for all
are integers, T s is
called the starting time and T e the ending time, and T s -
Example 1 Figure 2 presents graphically the event sequence
where
Observations of the event sequence have been made from time 29 to just
before time 68. For each event that occurred in the time interval [29; 68), the
event type and the time of occurrence have been recorded.
In the analysis of sequences we are interested in -nding all frequent episodes
from a class of episodes. To be considered interesting, the events of
an episode must occur close enough in time. The user de-nes how close is
close enough by giving the width of the time window within which the episode
must occur. We de-ne a window as a slice of an event sequence, and
we then consider an event sequence as a sequence of partially overlapping
windows. In addition to the width of the window, the user speci-es in how
many windows an episode has to occur to be considered frequent.
Formally, a window on event sequence is an event sequence
consists of those pairs (A; t)
from s where t s - . The time span t e \Gamma t s is called the width of the
window w, and it is denoted width(w). Given an event sequence s and an
integer win, we denote by W(s; win) the set of all windows w on s such that
By the de-nition the -rst and last windows on a sequence extend outside
the sequence, so that the -rst window contains only the -rst time point of
the sequence, and the last window contains only the last time point. With
this de-nition an event close to either end of a sequence is observed in equally
many windows to an event in the middle of the sequence. Given an event
sequence window width win, the number of windows in
W(s; win) is
Example 2 Figure 2 shows two windows of width 5 on the sequence s of
the previous example. A window starting at time 35 is shown in solid line,
and the immediately following window, starting at time 36, is depicted with
a dashed line. The window starting at time 35 is
Note that the event (F; 40) that occurred at the ending time is not in the
window. The window starting at 36 is similar to this one; the dioeerence is
that the -rst event (A; 35) is missing and there is a new event (F; 40) at the
end.
The set of the 43 partially overlapping windows of width 5 constitutes
W(s; 5); the -rst window is (;; 25; 30), and the last is (h(D;
Event (D; 67) occurs in 5 windows of width 5, as does, e.g., event (C; 50).
2.2 Episodes
Informally, an episode is a partially ordered collection of events occurring
together. Episodes can be described as directed acyclic graphs. Consider,
for instance, episodes ff, fi, and fl in Figure 3. Episode ff is a serial episode:
it occurs in a sequence only if there are events of types E and F that occur
ff
A
A
Figure
3: Episodes ff; fi, and fl.
in this order in the sequence. In the sequence there can be other events
occurring between these two. The alarm sequence, for instance, is merged
from several sources, and therefore it is useful that episodes are insensitive
to intervening events. Episode fi is a parallel episode: no constraints on the
relative order of A and B are given. Episode fl is an example of non-serial
and non-parallel episode: it occurs in a sequence if there are occurrences of
A and B and these precede an occurrence of C; no constraints on the relative
order of A and B are given. We mostly consider the discovery of serial and
parallel episodes.
We now de-ne episodes formally. An episode ff is a triple (V; -; g) where
V is a set of nodes, - is a partial order on V , and mapping
associating each node with an event type. The interpretation of an episode
is that the events in g(V ) have to occur in the order described by -. The
size of ff, denoted jffj, is jV j. Episode ff is parallel if the partial order - is
trivial (i.e., x 6- y for all x; y 2 V such that x 6= y). Episode ff is serial if the
relation - is a total order (i.e., x - y or y - x for all
is injective if the mapping g is an injection, i.e., no event type occurs twice
in the episode.
Example 3 Consider episode Figure 3. The set V contains
two nodes; say x and y. The mapping g labels these nodes with the event
types that are seen in the -gure: An event of type
is supposed to occur before an event of type F , i.e., x precedes y, and we
have x - y. Episode ff is injective, since it does not contain duplicate event
types; in a window where ff occurs there may, however, be multiple events
of types E and F .
We next de-ne when an episode is a subepisode of another; this relation
is used extensively in the algorithms for discovering all frequent episodes. An
there exists an injective mapping
all
ff is a superepisode of fi if and only if fi - ff. We write fi OE ff if fi - ff and
ff 6- fi.
Example 4 From Figure 3 we see that fi - fl since fi is a subgraph of fl.
In terms of the de-nition, there is a mapping f that connects the nodes
labeled A with each other and the nodes labeled B with each other, i.e.,
both nodes of fi have (disjoint) corresponding nodes in fl. Since the nodes in
episode fi are not ordered, the corresponding nodes in fl do not need to be
Consider now what it means that an episode occurs in a sequence. The
nodes of the episode need to have corresponding events in the sequence such
that the event types are the same and the partial order of the episode is
respected. An occurs in an event sequence
if there exists an injective mapping ng from nodes to events,
such that
Example 5 The window (w; 35; 40) of Figure 2 contains events A; B; C;
and E. Episodes fi and fl of Figure 3 occur in the window, but ff does not.
odes, a window width win, a frequency threshold min-fr, and a con-dence
threshold min-conf.
Output: The episode rules that hold in s with respect to win, min-fr, and
min-conf.
1. /* Find frequent episodes (Algorithm 2): */
2. compute F(s; win; min-fr);
3. /* Generate rules: */
4. for all ff 2 F(s; win; min-fr) do
5. for all fi OE ff do
6. if fr(ff)=fr(fi) - min-conf then
7. output the rule fi ! ff and the con-dence fr(ff)=fr(fi);
We de-ne the frequency of an episode as the fraction of windows in
which the episode occurs. That is, given an event sequence s and a window
width win, the frequency of an episode ff in s is
occurs in wgj
Given a frequency threshold min-fr, ff is frequent if fr(ff; s; win) -
min-fr. The task we are interested in is to discover all frequent episodes
from a given class E of episodes. The class could be, e.g., all parallel episodes
or all serial episodes. We denote the collection of frequent episodes with
respect to s, win and min-fr by F(s; win; min-fr).
Once the frequent episodes are known, they can be used to obtain rules
that describe connections between events in the given event sequence. For
example, if we know that the episode fi of Figure 3 occurs in 4.2 % of the
windows and that the superepisode fl occurs in 4.0 % of the windows, we can
estimate that after seeing a window with A and B, there is a chance of about
0.95 that C follows in the same window. Such rules show the connections
between events more clearly than frequent episodes alone. Algorithm 1 shows
how rules and their con-dences can be computed from the frequencies of
episodes, a window width win, and a frequency threshold min-fr.
Output: The collection F(s; win; min-fr) of frequent episodes.
1. compute C 1 := fff
2. l :=
3. while C l 6= ; do
4. /* Database pass (Algorithms 4 and 5): */
5. compute F l := fff 2 C l j fr(ff; s; win) - min-frg;
7. /* Candidate generation (Algorithm 3): */
8. compute C l := fff l and for all fi 2 E such that fi OE ff and
9. l we have fi 2 F jfij
10. for all l do output F l ;
episodes. Note that indentation is used in the algorithms to specify the
extent of loops and conditional statements.
Algorithms
Given all frequent episodes, the rule generation is straightforward. We now
concentrate on the following discovery task: given an event sequence s, a
set E of episodes, a window width win, and a frequency threshold min-fr,
-nd F(s; win; min-fr): We give -rst a speci-cation of the algorithm and
then exact methods for its subtasks. We call these methods collectively the
algorithm.
3.1 Main algorithm
Algorithm 2 computes the collection F(s; win; min-fr) of frequent episodes
from a class E of episodes. The algorithm performs a levelwise (breadth-rst)
search in the episode lattice spanned by the subepisode relation. The search
starts from the most general episodes, i.e., episodes with only one event. On
each level the algorithm -rst computes a collection of candidate episodes,
and then checks their frequencies from the event sequence database. The
crucial point in the candidate generation is given by the following immediate
lemma.
Lemma 6 If an episode ff is frequent in an event sequence s, then all subepis-
odes fi - ff are frequent.
The collection of candidates is speci-ed to consist of episodes such that
all smaller subepisodes are frequent. This criterion safely prunes from consideration
episodes that can not be frequent. More detailed methods for the
candidate generation and database pass phases are given in the following
subsections.
3.2 Generation of candidate episodes
We present now a candidate generation method in detail. The method can
be easily adapted to deal with the classes of parallel episodes, serial episodes,
and injective parallel and serial episodes.
Algorithm 3 computes candidates for parallel episodes. In the algorithm,
an represented as a lexicographically sorted array of
event types. The array is denoted by the name of the episode and the items
in the array are referred to with the square bracket notation. For example,
a parallel episode ff with events of types A; C; C; and F is represented as an
array ff with . Collections of
episodes are also represented as lexicographically sorted arrays, i.e., the ith
episode of a collection F is denoted by F [i].
Since the episodes and episode collections are sorted, all episodes that
share the same -rst event types are consecutive in the episode collection. In
particular, if episodes F l [i] and F l [j] of size l share the -rst l \Gamma 1 events,
then for all k with we have that F l [k] shares also the same
Algorithm 3
Input: A sorted array F l of frequent parallel episodes of size l.
Output: A sorted array of candidate parallel episodes of size l + 1.
1. C l+1 := ;;
2. k := 0;
3. if l = 1 then for h := 1 to jF l j do F l :block-start[h] :=
4. for i := 1 to jF l j do
5. current-block-start
6. for (j :=
7. /* F l [i] and F l [j] have l \Gamma 1 -rst event types in common,
8. build a potential candidate ff as their combination: */
9. for x := 1 to l do ff[x] := F l [i][x];
11. /* Build and test subepisodes fi that do not contain ff[y]: */
12. for y := 1 to l \Gamma 1 do
13. for x := 1 to y \Gamma 1 do fi[x] := ff[x];
14. for x := y to l do fi[x] := ff[x
15. if fi is not in F l then continue with the next j at line 6;
16. /* All subepisodes are in F l , store ff as candidate: */
18. C l+1 [k] := ff;
19. C l+1 :block-start[k] := current-block-start;
events. A maximal sequence of consecutive episodes of size l that share the
-rst events is called a block. Potential candidates can be identi-ed by
creating all combinations of two episodes in the same block. For the eOEcient
identi-cation of blocks, we store in F l :block-start [j] for each episode F l [j]
the i such that F l [i] is the -rst episode in the block.
Algorithm 3 can be easily modi-ed to generate candidate serial episodes.
Now the events in the array representing an episode are in the order imposed
by a total order -. For instance, a serial episode fi with events of types
C; A; F; and C, in that order, is represented as an array fi with
replacing line 6 by
for (j := F l :block-start[i]; F l
Algorithm 3 generates candidates for serial episodes.
There are further options with the algorithm. If the desired episode class
consists of parallel or serial injective episodes, i.e., no episode should contain
any event type more than once, simply insert line
continue with the next j at line 6;
after line 6.
The time complexity of Algorithm 3 is polynomial in the size of the collection
of frequent episodes and it is independent of the length of the event
sequence.
Theorem 1 Algorithm 3 (with any of the above variations) has time complexity
O(l 2 jF l j 2 log jF l j).
Proof The initialization (line j). The outer loop (line
is iterated O(jF l j) times and the inner loop (line times. Within the
loops, a potential candidate (lines 9 and 10) and l \Gamma 1 subcandidates (lines 12
to are built in time O(l importantly, the
subsets need to be searched for in the collection F l (line 15). Since
F l is sorted, each subcandidate can be located with binary search in time
O(l log jF l j). The total time complexity is thus O(jF l j
l log jF l
In practical situations the time complexity is likely to be close to
O(l 2 jF l j log jF l j), since the blocks are typically small.
3.3 Recognizing episodes in sequences
Let us now consider the implementation of the database pass. We give algorithms
which recognize episodes in sequences in an incremental fashion.
For two windows 1), the
sequences w and w 0 of events are similar to each other. We take advantage of
this similarity: after recognizing episodes in w, we make incremental updates
in our data structures to achieve the shift of the window to obtain w 0 .
The algorithms start by considering the empty window just before the
input sequence, and they end after considering the empty window just after
the sequence. This way the incremental methods need no other special actions
at the beginning or end. When computing the frequency of episodes,
only the windows correctly on the input sequence are, of course, considered.
3.3.1 Parallel episodes
Algorithm 4 recognizes candidate parallel episodes in an event sequence. The
main ideas of the algorithm are the following. For each candidate parallel
episode ff we maintain a counter ff:event-count that indicates how many
events of ff are present in the window. When ff:event-count becomes equal
to jffj, indicating that ff is entirely included in the window, we save the
starting time of the window in ff:inwindow . When ff:event-count decreases
again, indicating that ff is no longer entirely in the window, we increase the
-eld ff:freq-count by the number of windows where ff remained entirely in
the window. At the end, ff:freq-count contains the total number of windows
where ff occurs.
To access candidates eOEciently, they are indexed by the number of events
of each type that they contain: all episodes that contain exactly a events of
type A are in the list contains(A,a). When the window is shifted and the
contents of the window change, the episodes that are aoeected are updated.
If, for instance, there is one event of type A in the window and a second
one comes in, all episodes in the list contains(A,2) are updated with the
information that both events of type A they are expecting are now present.
Algorithm 4
Input: A collection C of parallel episodes, an event sequence
a window width win, and a frequency threshold min-fr.
Output: The episodes of C that are frequent in s with respect to win
and min-fr.
1. /* Initialization: */
2. for each ff in C do
3. for each A in ff do
4. A:count := 0;
5. for i := 1 to jffj do contains(A; i) := ;;
6. for each ff in C do
7. for each A in ff do
8. a := number of events of type A in ff;
9.
10. ff.event-count := 0;
11. ff.freq-count := 0;
12. /* Recognition: */
13. for start := T s do
14. /* Bring in new events to the window: */
15. for all events (A; t) in s such that
16. A:count := A:count
17. for each ff 2 contains(A; A:count) do
18. ff:event-count := ff:event-count
19. if ff:event-count = jffj then ff:inwindow := start ;
20. /* Drop out old events from the window: */
21. for all events (A; t) in s such that
22. for each ff 2 contains(A; A:count) do
23. if ff:event-count = jffj then
24. ff:freq-count := ff:freq-count
25. ff:event-count := ff:event-count \Gamma A:count ;
26. A:count := A:count \Gamma
27. /* Output: */
28. for all episodes ff in C do
29. if ff:freq-count=(T
3.3.2 Serial episodes
Serial candidate episodes are recognized in an event sequence by using state
automata that accept the candidate episodes and ignore all other input. The
idea is that there is an automaton for each serial episode ff, and that there
can be several instances of each automaton at the same time, so that the
active states reAEect the (disjoint) pre-xes of ff occurring in the window.
Algorithm 5 implements this idea.
We initialize a new instance of the automaton for a serial episode ff every
time the -rst event of ff comes into the window; the automaton is removed
when the same event leaves the window. When an automaton for ff reaches
its accepting state, indicating that ff is entirely included in the window, and
if there are no other automata for ff in the accepting state already, we save
the starting time of the window in ff:inwindow . When an automaton in the
accepting state is removed, and if there are no other automata for ff in the
accepting state, we increase the -eld ff:freq-count by the number of windows
where ff remained entirely in the window.
It is useless to have multiple automata in the same state, as they would
only make the same transitions and produce the same information. It suOEces
to maintain the one that reached the common state last since it will be
also removed last. There are thus at most jffj automata for an episode ff.
For each automaton we need to know when it should be removed. We can
thus represent all the automata for ff with one array of size jffj: the value
of ff:initialized [i] is the latest initialization time of an automaton that has
reached its ith state. Recall that ff itself is represented by an array containing
its events; this array can be used to label the state transitions.
To access and traverse the automata eOEciently they are organized in the
following way. For each event type A 2 E, the automata that accept A
are linked together to a list waits(A). The list contains entries of the form
(ff; x) meaning that episode ff is waiting for its xth event. When an event
enters the window during a shift, the list waits(A) is traversed. If an
automaton reaches a common state i with another automaton, the earlier
entry ff:initialized [i] is simply overwritten.
The transitions made during one shift of the window are stored in a list
transitions. They are represented in the form (ff; x; t) meaning that episode
Algorithm 5
Input: A collection C of serial episodes, an event sequence
window width win, and a frequency threshold min-fr.
Output: The episodes of C that are frequent in s with respect to win
and min-fr.
1. /* Initialization: */
2. for each ff in C do
3. for i := 1 to jffj do
4. ff:initialized[i] := 0;
5. waits(ff[i]) := ;;
6. for each ff 2 C do
7. waits(ff[1]) := waits(ff[1]) [ f(ff; 1)g;
8. ff.freq-count := 0;
9. for t :=
10. /* Recognition: */
11. for start := T s do
12. /* Bring in new events to the window: */
13. beginsat(start
14. transitions := ;;
15. for all events (A; t) in s such that
16. for all (ff; do
17. if
19. transitions := transitions [ f(ff;
20. else
21. transitions := transitions [ f(ff;
24. ff:initialized
25.
26. for all (ff; j; t) 2 transitions do
27. ff:initialized[j] := t;
28. beginsat(t) := beginsat(t) [ f(ff; j)g;
29.
30. /* Drop out old events from the window: */
31. for all (ff; l) 2 beginsat(start \Gamma 1) do
33. else waits(ff[l
34. ff:initialized[l] := 0;
35. /* Output: */
36. for all episodes ff in C do
37. if ff:freq-count=(T
ff got its xth event, and the latest initialization time of the pre-x of length x
is t. Updates regarding the old states of the automata are done immediately,
but updates for the new states are done only after all transitions have been
identi-ed, in order to not overwrite any useful information. For easy removal
of automata when they go out of the window, the automata initialized at
time t are stored in a list beginsat(t).
3.3.3 Analysis of time complexity
For simplicity, suppose that the class of event types E is -xed, and assume
that exactly one event takes place every time unit. Assume candidate episodes
are all of size l, and let n be the length of the sequence.
Theorem 2 The time complexity of Algorithm 4 is O((n
Proof Initialization takes time O(jCj l 2 ). Consider now the number of the
operations in the innermost loops, i.e., accesses to ff:event-count on lines
and 25. In the recognition phase there are O(n) shifts of the window. In
each shift, one new event comes into the window, and one old event leaves
the window. Thus, for any episode ff, ff:event-count is accessed at most
twice during one shift. The cost of the recognition phase is thus O(n jCj).
In practice the size l of episodes is very small with respect to the size
n of the sequence, and the time required for the initialization can be safely
neglected. For injective episodes we have the following tighter result.
Theorem 3 The time complexity of recognizing injective parallel episodes
in Algorithm 4 (excluding initialization) is O( n
win
Proof Consider win successive shifts of one time unit. During such sequence
of shifts, each of the jCj candidate episodes ff can undergo at most 2l changes:
any event type A can have A:count increased to 1 and decreased to 0 at most
once. This is due to the fact that after an event of type A has come into the
window, A:count - 1 for the next win time units. Reading the input takes
time n.
This time bound should be contrasted with the time usage of a trivial
non-incremental method where the sequence is pre-processed into windows,
and then frequent sets are searched for. The time requirement for recognizing
jCj candidate sets in n windows, plus the time required to read in n windows
of size win, is O(n jCj l larger by a factor of win.
Theorem 4 The time complexity of Algorithm 5 is O(n jCj l):
Proof The initialization takes time O(jCj l +win). In the recognition phase,
again, there are O(n) shifts, and in each shift one event comes into the
window and one event leaves the window. In one shift, the eoeort per an
ff depends on the number of automata accessed; there are a maximum
of l automata for each episode. The worst-case time complexity is thus
(note that win is O(n)).
In the worst case the input sequence consists of events of only one event
type, and the candidate serial episodes consist only of events of that particular
type. Every shift of the window results now in an update in every
automaton. This worst-case complexity is close to the complexity of the
trivial non-incremental method O(n jCj l In practical situations,
however, the time requirement is considerably smaller, and we approach the
savings obtained in the case of injective parallel episodes.
Theorem 5 The time complexity of recognizing injective serial episodes in
Algorithm 5 (excluding initialization) is O(n jCj):
Proof Each of the O(n) shifts can now aoeect at most two automata for
each episode: when an event comes into the window there can be a state
A
A
Figure
4: Recursive composition of a complex episode.
transition in at most one automaton, and at most one automaton can be
removed because the initializing event goes out of the window.
3.4 General partial orders
So far we have only discussed serial and parallel episodes. We next discuss
brieAEy the use of other partial orders in episodes. The recognition of an
arbitrary episode can be reduced to the recognition of a hierarchical combination
of serial and parallel episodes. For example, episode fl in Figure 4
is a serial combination of two episodes: a parallel episode ffi 0 consisting of
A and B, and an episode ffi 00 consisting of C alone. The occurrence of an
episode in a window can be tested using such hierarchical structure: to see
whether episode fl occurs in a window one checks (using a method for serial
whether the subepisodes ffi 0 and ffi 00 occur in this order; to check the
occurrence of ffi 0 one uses a method for parallel episodes to verify whether A
and B occur.
There are, however, some complications one has to take into account.
First, it is sometimes necessary to duplicate an event node to obtain a decomposition
to serial and parallel episodes. Duplication works easily with
injective episodes, but non-injective episodes need more complex methods.
Another important aspect is that composite events have a duration, unlike
the elementary events in E.
A practical alternative is to handle all episodes basically like parallel
episodes, and to check the correct partial ordering only when all events are
in the window. Parallel episodes can be located eOEciently; after they have
been found, checking the correct partial ordering is relatively fast.
4 An alternative occurrence
4.1 Outline of the approach
In this section we describe an alternative approach to the discovery of epis-
odes. Instead of looking at the windows and only considering whether an
occurs in a window or not, we now look at the exact occurrences of
episodes and the relationships between those occurrences. One of the advantages
of this new approach is that focusing on the occurrences of episodes
allows us to more easily -nd rules with two window widths, one for the left-hand
side and one for the whole rule, such as iif A and B occur within 15
seconds, then C follows within
The approach is based on minimal occurrences of episodes. Besides the
new rule formulation, the use of minimal occurrences gives raise to the following
new method, called Minepi, for the recognition of episodes in the input
sequence. For each frequent episode we store information about the locations
of its minimal occurrences. In the recognition phase we can then compute
the locations of minimal occurrences of a candidate episode ff as a temporal
join of the minimal occurrences of two subepisodes of ff. In addition to being
simple and eOEcient, this formulation has the advantage that the con-dences
and frequencies of rules with a large number of dioeerent window widths can
be obtained quickly, i.e., there is no need to rerun the analysis if one only
wants to modify the window widths. In the case of complicated episodes,
the time needed for recognizing the occurrence of an episode can be signi-c-
ant; the use of stored minimal occurrences of episodes eliminates unnecessary
repetition of the recognition eoeort.
We identify minimal occurrences with their time intervals in the following
way. Given an episode ff and an event sequence s, we say that the interval
occurrence of ff in s, if (1) ff occurs in the window
e ) on s, and if (2) ff does not occur in any proper subwindow on
i.e., not in any window w
e ) on s such that t s - t 0
s
e
width(w). The set of (intervals of) minimal occurrences of an
episode ff in a given event sequence is denoted by mo(ff):
occurrence of ffg:
Example 7 Consider the event sequence s in Figure 2 and the episodes in
Figure
3. The parallel episode fi consisting of event types A and B has
four minimal occurrences in s:
The partially ordered episode fl has the following three minimal occurrences:
An episode rule is an expression fi [win 1 are
episodes such that fi - ff, and win 1 and win 2 are integers. The informal
interpretation of the rule is that if episode fi has a minimal occurrence at
interval occurs at interval [t s
for some t 0
e
such that t 0
e
. Formally this can be expressed in the
following way. Given win 1 and fi, denote mo win 1
and an interval [u s ; u e ), de-ne occ(ff; [u s ; u e
true if and only if there exists a minimal occurrence [u 0
s
and
e
- u e . The con-dence of an episode rule fi [win 1
is now
Example 8 Continuing the previous example, we have, e.g., the following
rules and con-dences. For the rule fi [3] ) fl [4] we have
in the denominator and jf[35; 38)gj in the nu-
merator, so the con-dence is 1=3. For the rule fi [3] ) fl [5] the con-dence
is 1.
Note that since fi is a subepisode of ff, the rule right-hand side ff contains
information about the relative location of each event in it, so the inewj events
in the rule right-hand side can actually be required to be positioned, e.g.,
between events in the left-hand side. There is also a number of possible
de-nitions for the temporal relationship between the intervals. For instance,
rules that point backwards in time can be de-ned in a similar way. For
brevity, we only consider this one case.
We de-ned the frequency of an episode as the fraction of windows that
contain the episode. While frequency has a nice interpretation as the probability
that a randomly chosen window contains the episode, the concept is
not very useful with minimal occurrences: (1) there is no -xed window size,
and (2) a window may contain several minimal occurrences of an episode.
Instead of frequency, we use the concept of support, the number of minimal
occurrences of an episode: the support of an episode ff in a given event sequence
s is jmo(ff)j. Similarily to the a frequency threshold, we now use a
threshold for the support: given a support threshold min-sup, an episode ff
is frequent if jmo(ff)j - min-sup.
The current episode rule discovery task can be stated as follows. Given
an event sequence s, a class E of episodes, and a set W of time bounds, -nd
all frequent episode rules of the form fi [win 1
4.2 Finding minimal occurrences of episodes
In this section we describe informally the collection Minepi of algorithms
that locate the minimal occurrences of frequent serial and parallel episodes.
Let us start with some observations about the basic properties of episodes.
Lemma 6 still holds: the subepisodes of a frequent episode are frequent. Thus
we can use the main algorithm (Algorithm 2) and the candidate generation
(Algorithm We have the following results about the
minimal occurrences of an episode also containing minimal occurrences of its
subepisodes.
Lemma 9 Assume ff is an episode and fi - ff is its subepisode. If
mo(ff), then fi occurs in [t s ; t e ) and hence there is an interval [u s ;
such that t s -
ff be a serial episode of size k, and let [t
there are subepisodes ff 1 and ff 2 of ff of size
for some t 1
Lemma 11 Let ff be a parallel episode of size k, and let [t
Then there are subepisodes ff 1 and ff 2 of ff of size
e
s
and t
e
g.
The minimal occurrences of a candidate episode ff are located in the
following way. In the -rst iteration of the main algorithm, mo(ff) is computed
from the input sequence for all episodes ff of size 1. In the rest of the
iterations, the minimal occurrences of a candidate ff are located by -rst
selecting two suitable subepisodes ff 1 and ff 2 of ff, and then computing a
temporal join between the minimal occurrences of ff 1 and ff 2 , in the spirit of
To be more speci-c, for serial episodes the two subepisodes are selected
so that ff 1 contains all events except the last one and ff 2 in turn contains all
except the -rst one. The minimal occurrences of ff are then found with the
following speci-cation:
such that t s ! u
For parallel episodes, the subepisodes ff 1 and ff 2 contain all events except
one; the omitted events must be dioeerent. See Lemma 11 for the idea of how
to compute the minimal occurrences of ff.
The minimal occurrences of a candidate episode ff can be found in a linear
pass over the minimal occurrences of the selected subepisodes ff 1 and ff 2 . The
time required for one candidate is thus O(jmo(ff
which is O(n), where n is the length of the event sequence. To optimize
the running time, ff 1 and ff 2 can be selected so that jmo(ff 1 )j
minimized.
The space requirement of the algorithm can be expressed as
jmo(ff)j, assuming the minimal occurrences of all frequent episodes
are stored, or alternatively as
jmo(ff)j), if only the current
and next levels of minimal occurrences are stored. The size of P
is bounded by n, the number of events in the input sequence, as each event
in the sequence is a minimal occurrence of an episode of size 1. In the second
iteration, an event in the input sequence can start at most jF 1 j minimal occurrences
of episodes of size 2. The space complexity of the second iteration
is thus O(jF 1 jn).
While minimal occurrences of episodes can be located quite eOEciently,
the size of the data structures can be even larger than the original database,
especially in the -rst couple of iterations. A practical solution is to use in the
beginning other pattern matching methods, e.g., similar to the ones given for
in Section 3, to locate the minimal occurrences.
Finally, note that Minepi can be used to solve the task of Winepi.
Namely, a window contains an occurrence of an episode exactly when it
contains a minimal occurrence. The frequency of an episode ff can thus be
computed from mo(ff).
4.3 Finding con-dences of rules
We now show how the information about minimal occurrences of frequent
episodes can be used to obtain con-dences for various types of episode rules
without looking at the data again.
Recall that we de-ned an episode rule as an expression fi [win 1
ff [win 2 ]; where fi and ff are episodes such that fi - ff, and win 1 and win 2 are
integers. To -nd such rules, -rst note that for the rule to be frequent, the
episode ff has to be frequent. So rules of the above form can be enumerated
by looking at all frequent episodes ff, and then looking at all subepisodes fi
of ff. The evaluation of the con-dence of the rule fi [win 1
be done in one pass through the structures mo(fi) and mo(ff), as follows.
For each locate the minimal occurrence
of ff such that t s - u s and [u s ; u e ) is the -rst interval in mo(ff) with
this property. Then check whether u
The time complexity of the con-dence computation for a given episode
and given time bounds win 1 and win 2 is O(jmo(fi)j jmo(ff)j). The con-
-dences for all win in the set W of time bounds can be found, using
a table of size jWj 2 , in time O(jmo(fi)j For reasons of
brevity we omit the details.
The set W of time bounds can be used to restrict the initial search of minimal
occurrences of episodes. Given W, denote the maximum time bound by
In episode rules, only occurrences of at most win
units can be used; longer episode occurrences can thus be ignored already in
the search of frequent episodes. We consider the support, too, to be computed
with respect to a given win max .
5 Experiments
We have run a series of experiments using Winepi and Minepi. The general
performance of the methods, the eoeect of the various parameters, and the
scalability of the methods are considered in this section. Consideration is
also given to the applicability of the methods to various types of data sets.
The experiments have been run on a PC with 166 MHz Pentium processor
and main memory, under the Linux operating system. The sequences
resided in a AEat text -le.
5.1 Performance overview
For an experimental overview we discovered episodes and rules in a telecommunication
network fault management database. The database is a sequence
of 73679 alarms covering a time period of 7 weeks. There are 287 dioeerent
types of alarms with very diverse frequencies and distributions. On the average
there is an alarm every minute. However, the alarms tend to occur in
bursts: in the extreme cases there are over 40 alarms in one second.
We start by looking at the performance of the Winepi method described
in Section 3. There are several performance characteristics that can be used
to evaluate the method. The time required by the method and the number
of episodes and rules found by the method, with respect to the frequency
threshold or the window width, are possible performance measures. We
present results for the two opposite extreme cases of the complexity: serial
episodes and injective parallel episodes.
Tables
-nding frequent episodes
in the alarm database with various frequency thresholds. The number
of frequent episodes decreases rapidly as the frequency threshold increases.
With a given frequency threshold, the numbers of serial and injective parallel
episodes may be fairly similar, e.g., a frequency threshold of 0.002 results in
Frequency Candidates Frequent Iterations Total
threshold Episodes time
Table
1: Performance characteristics for serial episodes with
database, window width
Frequency Candidates Frequent Iterations Total
threshold Episodes time
Table
2: Performance characteristics for injective parallel episodes with
serial episodes or 93 parallel episodes. The actual episodes are, however,
very dioeerent, as can be seen from the number of iterations: recall that each
iteration l produces episodes of size l. For the frequency threshold of 0.002,
the longest frequent serial episode consists of 43 events (all candidates of the
last iteration were infrequent), while the longest frequent injective parallel
episodes have 3 events. The number of iterations equals the number of candidate
generation phases. The number of database passes equals the number
of iterations, or is smaller by one when there were no candidates in the last
iteration.
Episodes
Window width
Figure
5: Number of frequent serial (solid line) and injective parallel (dotted
line) episodes as a function of the window width; Winepi, alarm database,
frequency threshold 0:002.
The eoeect of the window width on the number of frequent episodes is
represented in Figure 5. For each window width, there are considerably fewer
frequent injective parallel episodes than frequent serial episodes. With the
alarm data, the increase in the number of episodes is fairly even throughout
the window widths that we considered. However, we will later show that this
may depend heavily on the type of data we are using.
Figure
6 represents the number of serial and injective parallel episodes
found by the method, and Figure 7 the total processing time required, as
the frequency threshold increases. Both curves decrease steeply with the
increasing frequency threshold. The time requirement is much smaller for
parallel episodes than for serial episodes with the same threshold. There
are two reasons for this. The parallel episodes are considerably shorter (see
Tables
1 and 2) and hence, fewer database passes are needed. The complexity
of recognizing injective parallel episodes is also smaller.
Episodes
Frequency threshold
Figure
Number of frequent serial (solid line) and injective parallel (dotted
line) episodes as a function of the frequency threshold with
database, window width
Time
Frequency threshold
Figure
7: Processing time for serial (solid line) and injective parallel (dot-
ted line) episodes as a function of the frequency threshold; Winepi, alarm
database, window width
5.2 Quality of candidate generation
We now take a closer look at the candidates considered and frequent episodes
found during the iterations of the procedure. As an example, let us look at
what happens during the -rst iterations. Statistics of the -rst ten iterations
Episode Episodes Candidates Frequent Match
size episodes
Table
3: Number of candidate and frequent serial episodes during the -rst
ten iteration phases with Winepi; alarm database, frequency threshold 0:001,
window width
of a run with a frequency threshold of 0.001 and a window width of 60 s is
shown in Table 3.
The three -rst iterations dominate the behavior of the method. During
these phases, the number of candidates is large, and only a small fraction
(less than 20 per cent) of the candidates turns out to be frequent. After the
third phase the candidate generation is eOEcient, few of the candidates are
found infrequent, and although the total number of iteration phases is 45,
the last 35 iterations involve only 1-3 candidates each. Thus we could safely
combine several of the later iteration steps, to reduce the number of database
passes.
If we take a closer look at the frequent episodes, we observe that all
frequent episodes longer than 7 events consist of repeating occurrences of
two very frequent alarms. Each of these two alarms occurs in the database
more than 12000 times (16 per cent of the events each).
Support Candidates Frequent Iterations Total
threshold Episodes time
50 12732 2735 83 28
500 813 138
1000 589 92 48 14
2000 405 64
Table
4: Performance characteristics for serial episodes with Minepi; alarm
database, maximum time bound 60 s.
Support Candidates Frequent Iterations Total
threshold Episodes time
100 4376 1755 71 20
500 633 138
1000 480 89 48 12
2000 378 66
Table
5: Performance characteristics for parallel episodes with Minepi; alarm
database, maximum time bound 60 s.
5.3 Comparison of algorithms Winepi and Minepi
Tables
4 and 5 represent performance statistics for -nding frequent episodes
with Minepi, the method using minimal occurences. Compared to the corresponding
-gures for Winepi in Tables 1 and 2, we observe the same general
tendency for a rapidly decreasing number of candidates and episodes, as the
support threshold increases.
The episodes found by Winepi and Minepi are not necessarily the same.
If we compare the cases in Tables 1 and 4 with approximately the same
number of frequent episodes, e.g., 151 serial episodes for Winepi and 138 for
Time
Support threshold
Figure
8: Processing time for serial (solid line) and injective parallel (dotted
line) episodes with Minepi; alarm database, maximum time bound 60 s.
Minepi, we notice that they do not correspond to the same episodes. The
sizes of the longest freuquent episodes are somewhat dioeerent (43 for the
original, 48 for the minimal occurrence method). The frequency threshold
corresponds, at the minimum, to about 150 instances of the
episode, while the support threshold used for Minepi is 500. The dioeerence
between the methods is very clear for small episodes. Consider an episode ff
consisting of just one event A. Winepi considers a single event A to occur in
windows of width 60 s, while Minepi sees only one minimal occurrence.
On the other hand, two successive events of type A result in ff occuring in
61 windows, but the number of minimal occurrences is doubled from 1 to 2.
Figure
8 shows the time requirement for -nding frequent episodes with
Minepi. The processing time for Minepi reaches a plateau when the size of
the maximal episodes no longer changes (in this case, at support threshold
500). The behavior is similar for serial and parallel episodes. The time
requirements of Minepi should not be directly compared to Winepi: the
episodes discovered are dioeerent, and our implementation of Minepi works
entirely in the main memory. With very large databases this might not be
Varying support threshold,
four time bounds
Support Distinct Rule gen.
threshold rules time
50 50470 149
1000 1221 15
2000 1082 14
4000 1005 14
Varying number of time bounds,
support threshold 1000
Number of All Rule gen.
time bounds rules time
Table
Number of rules and rule generation time with Minepi; alarm data-
base, serial episodes, support threshold 1000, maximum time bound 60 s,
con-dence threshold 0.
possible during the -rst iterations; either the minimal occurrences need to
be stored on the disk, or other methods (e.g., variants of Algorithms 4 and
must be used.
5.4 Rules
The methods can easily produce very large amounts of rules. Recall that rules
are constructed by considering all frequent episodes ff as the right-hand side
and all subepisodes fi - ff as the left-hand side of the rule. Additionally,
considers variations of these rules with all the time bounds in the
given set W.
Table
6 represents results with serial episodes. The initial episode generation
with Minepi took around 14 s, and the total number of frequent episodes
was 92. The table shows the number of rules obtained by Minepi with con-
-dence threshold 0 and with maximum time bound 60 s. On the left, with
a varying support threshold, rules that dioeer only in their time bounds are
excluded from the -gures; the rule generation time is, however, obtained by
generating rules with four dioeerent time bounds.
Rules
Confindence threshold
Figure
9: Total number of distinct rules found by Minepi with various con-
-dence thresholds; alarm database, maximum time bound 60 s, support
threshold 100.
The minimal occurrence method is particularly useful, if we are interested
in -nding rules with several dioeerent time bounds. The right side of Table 6
represents performance results with a varying number of time bounds. The
time requirement increases slowly as more time bounds are used, and the
time increases slowlier than the number of rules.
The amount of almost 80000 rules, obtained with may
seem unnecessarily large and unjusti-ed. Remember, however, that there are
only 1221 distinct rules. The rest of the rules present dioeerent combinations
of time bounds, in this case down to the granularity of one second. For
the cost of 43 s we thus obtain very -ne-grained rules from our frequent
episodes. Dioeerent criteria can then be used to select the most interesting
rules from these. Figure 9 represents the eoeect of the con-dence threshold to
the number of distinct rules found by Minepi. Although the initial number of
rules may be quite large, it decreases fairly rapidly if we require a reasonable
con-dence.
Data set Events Event Supp. Max Conf. Freq. Rules
name types thr. time b. thr. epis.
alarms 73679 287 100
protein
Table
7: Characteristic parameter values for each of the data sets and the
number of episodes and rules found by Minepi.
5.5 Results with dioeerent data sets
In addition to the experiments on the alarm database, we have run Minepi
on a variety of dioeerent data collections to get a better view of the usefulness
of the method. The data collections that were used, some typical parameter
values for them, and some results are presented in Table 7.
The WWW data is part of the WWW server log from the Department of
Computer Science at the University of Helsinki. The log contains requests
to WWW pages at the department's server; such requests can be made by
WWW browsers at any host in the Internet. We consider the WWW page
fetched as the event type. The number of events in our data set is 116308,
covering three weeks in February and March, 1996. In total, 7634 dioeerent
pages are referred to. Requests for images have been excluded from consideration
Suitable support thresholds vary a lot, depending on the number of events
and the distribution of event types. A suitable maximum time bound for the
device generated alarm data is one minute, while the slower pace of a human
user requires using a larger time bound (two minutes or more) for the WWW
log. By using a relatively small time bound we reduce the probability of
unrelated requests contributing to the support. A low con-dence threshold
for the WWW log is justi-ed since we are interested in all fairly usual patterns
of usage, not only in the dominating ones. In the WWW server log we found,
e.g., long often used paths of pages from the home page of the department
to the pages of individual courses. Such behavior suggests that rather than
using a bookmark directly to the home page of a course, many users quickly
navigate there from the departmental home page.
The two text data collections are modi-cations of the same English text.
Each word is considered an event, and the words are indexed consecutively
to give a itimej for each event. The end of each sentence causes a gap
in the indexing scheme, to correspond to a longer distance between words
in dioeerent sentences. We used text from GNU man pages (the gnu awk
manual). The size of the original text (text1) is 5417 words, and the size of
the condensed text -le (text2), where noninformative words such as articles,
prepositions, and conjunctions, have been stripped ooe, is 2871 words. The
number of dioeerent words in the original and the condensed text is 1102,
resp. 905.
For text analysis, there is no point in using large time bounds, since it
is unlikely that there is any connection between words that are not fairly
close to each other. This can be clearly seen in Figure 10 which represents
the number of episodes found on various window widths using Winepi. This
-gure reveals behavior that is distinctively dioeerent from the corresponding
Figure
5 for the alarm database. We observe that for the text data, the
window widths from 24 to 50 produce practically the same amount of serial
episodes. The number of episodes will only increase with considerably larger
window widths. For this data, the interesting frequent episodes are smaller
than 24, while the episodes found with much larger window widths are noise.
The same phenomenon can be observed for parallel episodes.
Only few rules can be found in text using a simple analysis like this.
The strongest rules in the original text involve either the word igawkj, or
Episodes
Window width
Figure
10: Number of serial (solid line) and injective parallel (dotted line)
episodes as a function of the window width; Winepi, compressed text data
(text2), frequency threshold 0:02.
common phrases such as
the, value [2] ) of [3] (con-dence 0.90)
meaning that in 90 % of the cases where the words ithe valuej are consec-
utive, they are immediately followed by the preposition iofj. These rules
were not found in the condensed text since all prepositions and articles have
been stripped ooe. The few rules in the condensed text contain multiple occurrences
of the word igawkj, or combinations of words occurring in the
header of each man page, such as ifree softwarej.
We performed scale-up tests with 5, 10, and 20 fold multiples of the
compressed text -le, i.e., sequences of approximately 2900 to 58000 events.
The results in Figure 11 show that the time requirement is roughly linear
with respect to the length of the input sequence, as could be expected.
Finally, we experimented with protein sequences. We used data in the
database [1] of the ExPASy WWW molecular biology server of the
Geneva University Hospital and the University of Geneva [11]. PROSITE
contains biologically signi-cant DNA and protein patterns that help to
Time
Relative size of database
r
r
r
r
Figure
11: Scale-up results for serial (solid line) and injective parallel (dotted
line) episodes with Minepi; compressed text data, maximum time bound 60,
threshold 10 for the smallest -le (n-fold for the larger -les).
identify to which family of protein (if any) a new sequence belongs. The
purpose of our experiment is to evaluate our algorithm against an external
data collection and patterns that are known to exist, not to -nd patterns
previously unknown to the biologists. We selected as our target a family of
7 sequences (iDNA mismatch repair proteins 1j, PROSITE entry PS00058).
The sequences in the family are known to contain the string GFRGEAL of seven
consequtive symbols. We transformed the data in a manner similar to the
English text: symbols are indexed consecutively, and between the protein
sequences we place a gap. The total length of this data set is 4941 events,
with an alphabet of 22 event types. The method could be easily modi-ed to
take several separage sequences as input, and to compute the support of an
ff, e.g., as the number of input sequences that contain a (minimal)
occurrence of ff of length at most the maximum time bound.
The parameter values for the protein database are chosen on purpose to
reveal the pattern that is known to be present in the database. The window
width was selected to be 10, i.e., slightly larger than the length of the pattern
that we were looking for, and the support threshold was set to 7, for the
seven individual sequences in the original data. With this data, we are only
interested in the longest episodes (of length 7 or longer). Of the more than
20000 episodes found, 17 episodes are of length 7 or 8. As expected, these
contain the sequence GFRGEAL that was known to be in the database. The
longer episodes are variants of this pattern with an eighth symbol fairly near,
but not necessarily immediately subsequent to the pattern (e.g., GFRGEAL*S).
These types of patterns belong to the pattern class used in PROSITE but, to
our suprise, these longer patterns are not reported in the PROSITE database.
6 Extensions and related work
The task of discovering frequent parallel episodes can be stated as a task
of discovering all frequent sets, a central phase of discovering assocation
rules [2], the rule generation methods are also basically the same for association
rules and Winepi. The levelwise main algorithm has also been used
successfully in the search of frequent sets [3].
Technical problems related to the recognition of episodes have been researched
in several -elds. Taking advantage of the slowly changing contents
of the group of recent events has been studied, e.g., in arti-cial intelligence,
where a similar problem in spirit is the many pattern/many object pattern
match problem in production system interpreters [9]. Also, comparable
strategies using a sliding window have been used, e.g., to study the locality
of reference in virtual memory [7]. Our setting dioeers from these in that
our window is a queue with the special property that we know in advance
when an event will leave the window; this knowledge is used by Winepi in
the recognition of serial episodes. In Minepi, we take advantage of the fact
that we know where subepisodes of candidates have occurred.
The recent work on sequence data in databases (see [21]) provides interesting
openings towards the use of database techniques in the processing of
queries on sequences. A problem similar to the computation of frequencies
occurs also in the area of active databases. There triggers can be speci-ed
as composite events, somewhat similar to episodes. In [10] it is shown how
-nite automata can be constructed from composite events to recognize when
a trigger should be -red. This method is not practical for episodes since the
deterministic automata could be very large.
The methods for matching sets of episodes against a sequence have some
similarities to the algorithms used in string matching (e.g., [12]). In par-
ticular, recognizing serial episodes in a sequence can be seen as locating all
occurrences of subsequences, or matches of patterns with variable length
don't care symbols, where the length of the occurrences is limited by the
window width. Learning from a set of sequences has received considerable
interest in the -eld of bioinformatics, where an interesting problem is the
discovery of patterns common to a set of related protein or amino acid se-
quences. The classes of patterns dioeer from ours; they can be, e.g., substrings
with -xed length don't care symbols [15]. Closer to our patterns are those
considered in [24]. The described algorithm -nds patterns that are similar
to serial episodes; however, the patterns have a given minimum length, and
the occurrences can be within a given edit distance. Recent results on the
pattern matching aspects of recognizing episodes can be found in [6].
The work most closely related to ours is perhaps [4]. There multiple
sequences are searched for patterns that are similar to the serial episodes
with some extra restrictions and an event taxonomy. Our methods can be
extended with a taxonomy by a direct application of the similar extensions to
association rules [13, 14, 22]. Also, our methods can be applied on analyzing
several sequencies; there is actually a variety of choices for the de-nition of
frequency of an episode in a set of sequencies. More recently, the pattern
class of [4] has been extended with windowing, some extra time constraints,
and an event taxonomy [23]. - For a survey on patterns in sequential data,
see [17].
In stochastics, event sequence data is often called a marked point process
[16]. It should be noted that traditional methods for analyzing marked
point processes are ill suited for the cases where the number of event types
is large. However, there exists an interesting combination of techniques: frequent
episodes are discovered -rst, and then the phenomena they describe
are analyzed in more detail with methods for marked point processes.
There are also some interesting similarities between the discovery of frequent
episodes and the work done on inductive logic programming (see,
e.g., [20]); a noticeable dioeerence is caused by the sequentiality of the underlying
data model, and the emphasis on time-limited occurrences. Similarly,
the problem of looking for one occurrence of an episode can be viewed as a
constraint satisfaction problem.
The class of patterns discovered can be easily modi-ed in several direc-
tions. Dioeerent windowing strategies could be used, e.g., considering only
windows starting every win 0 time units for some win 0 , or windows starting
from every event. Other types of patterns could also be searched for, e.g.,
substrings with -xed length don't care symbols; searching for episodes in
several sequences is no problem. A more general framework for episode discovery
has been presented in [18]. There episodes are de-ned as combinations
of events satisfying certain user speci-ed unary of binary conditions.
Conclusions
We presented a framework for discovering frequent episodes in sequential
data. The framework consists of de-ning episodes as partially ordered sets
of events, and looking at windows on the sequence. We described an al-
gorithm, Winepi, for -nding all episodes from a given class of episodes that
are frequent enough. The algorithm was based on the discovery of episodes
by only considering an episode when all its subepisodes are frequent, and
on incremental checking of whether an episode occurs in a window. The
implementation shows that the method is eOEcient. We have applied the
method in the analysis of the alarm AEow from telecommunication networks,
and discovered episodes have been embedded in alarm handling software.
We also presented an alternative approach, Minepi, to the discovery of
frequent episodes, based on minimal occurrences of episodes. This approach
supplies more power for representing connections between events, as it produces
rules with two time bounds.
Both rule formalisms have their advantages. While the rules of Minepi
are often more informative, the frequencies and con-dences of the rules of
have nice interpretations as probabilities concerning randomly chosen
windows. For a large part the algorithms are similar, there are signi-cant
dioeerences only in the computation of the frequency or support. Roughly,
a general tendency in the performance is that Winepi can be more eOEcient
in the -rst phases of the discovery, mostly due to smaller space requirement.
In the later iterations, Minepi is likely to outperform Winepi clearly. The
methods can be modi-ed for cross-use, i.e., Winepi for -nding minimal occurrences
and Minepi for counting windows, and for some large problems -
whether the rule type of Winepi or Minepi - a mixture of the two methods
could give better performance than either alone.
Interesting extensions to the work presented here are facilities for rule
querying and compilation, i.e., methods by which the user could specify the
class in high-level language and the de-nition would automatically
be compiled into a specialization of the algorithm that would take advantage
of the restrictions on the episode class. Other open problems include the
combination of episode techniques with marked point processes and intensity
models.
--R
Mining association rules between sets of items in large databases.
Fast discovery of association rules.
Mining sequential patterns.
Testing complex temporal relationships involving multiple granularities and its application to data mining.
The working set model of program behavior.
Situation recognition: Representation and algorithms.
A fast algorithm for the many pattern/many object pattern match problem.
Composite event speci-ca- tion in active databases
Geneva University Hospital and University of Geneva
Simple and eOEcient string matching with k mismatches.
Discovery of multiple-level association rules from large databases
A perspective on databases and data mining.
Finding AEexible patterns in unaligned protein sequences.
The Statistical Analysis of Failure Time Data.
Identifying and using patterns in sequential data.
Discovering generalized episodes using minimal occurrences.
An algebraic formulation of temporal knowledge for reasoning about recurring events.
Inductive Logic Programming.
Mining generalized association rules.
Mining sequential patterns: Generalizations and performance improvements.
Combinatorial pattern discovery for scienti-c data: Some preliminary results
--TR
--CTR
Srivatsan Laxman , P. S. Sastry , K. P. Unnikrishnan, Discovering Frequent Episodes and Learning Hidden Markov Models: A Formal Connection, IEEE Transactions on Knowledge and Data Engineering, v.17 n.11, p.1505-1517, November 2005
Jia-Wei Han , Jian Pei , Xi-Feng Yan, From sequential pattern mining to structured pattern mining: a pattern-growth approach, Journal of Computer Science and Technology, v.19 n.3, p.257-279, May 2004
Sandra de Amo , Daniel A. Furtado, First-order temporal pattern mining with regular expression constraints, Data & Knowledge Engineering, v.62 n.3, p.401-420, September, 2007
Tomoyuki Morita , Yasushi Hirano , Yasuyuki Sumi , Shoji Kajita , Kenji Mase, A pattern mining method for interpretation of interaction, Proceedings of the 7th international conference on Multimodal interfaces, October 04-06, 2005, Torento, Italy
S. Parthasarathy , M. J. Zaki , M. Ogihara , S. Dwarkadas, Incremental and interactive sequence mining, Proceedings of the eighth international conference on Information and knowledge management, p.251-258, November 02-06, 1999, Kansas City, Missouri, United States
Jian Pei , Jiawei Han , Wei Wang, Mining sequential patterns with constraints in large databases, Proceedings of the eleventh international conference on Information and knowledge management, November 04-09, 2002, McLean, Virginia, USA
Jiawei Han , Jian Pei , Behzad Mortazavi-Asl , Qiming Chen , Umeshwar Dayal , Mei-Chun Hsu, FreeSpan: frequent pattern-projected sequential pattern mining, Proceedings of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.355-359, August 20-23, 2000, Boston, Massachusetts, United States
Mohammed J. Zaki, Sequence mining in categorical domains: incorporating constraints, Proceedings of the ninth international conference on Information and knowledge management, p.422-429, November 06-11, 2000, McLean, Virginia, United States
Ann Devitt , Joseph Duffin , Robert Moloney, Topographical proximity for mining network alarm data, Proceeding of the 2005 ACM SIGCOMM workshop on Mining network data, August 26-26, 2005, Philadelphia, Pennsylvania, USA
Liping Ji , Kian-Lee Tan , Anthony K. H. Tung, Mining frequent closed cubes in 3D datasets, Proceedings of the 32nd international conference on Very large data bases, September 12-15, 2006, Seoul, Korea
Zdenk Tronek, Episode directed acyclic subsequence graph, Nordic Journal of Computing, v.11 n.1, p.35-40, Spring 2004
Roy Villafane , Kien A. Hua , Duc Tran , Basab Maulik, Knowledge Discovery from Series of Interval Events, Journal of Intelligent Information Systems, v.15 n.1, p.71-89, JulyAug. 2000
Katharina Morik, Applications of knowledge discovery, Proceedings of the 18th international conference on Innovations in Applied Artificial Intelligence, p.1-5, June 22-24, 2005, Bari, Italy
Ming-Yen Lin , Suh-Yin Lee, Interactive sequence discovery by incremental mining, Information SciencesInformatics and Computer Science: An International Journal, v.165 n.3-4, p.187-205, 19 October 2004
Kenji Yamanishi , Yuko Maruyama, Dynamic syslog mining for network failure monitoring, Proceeding of the eleventh ACM SIGKDD international conference on Knowledge discovery in data mining, August 21-24, 2005, Chicago, Illinois, USA
Heikki Mannila , Christopher Meek, Global partial orders from sequential data, Proceedings of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.161-168, August 20-23, 2000, Boston, Massachusetts, United States
Ming-Yen Lin , Suh-Yin Lee, Efficient mining of sequential patterns with time constraints by delimited pattern growth, Knowledge and Information Systems, v.7 n.4, p.499-514, May 2005
Anthony K.H. Tung , Hongjun Lu , Jiawei Han , Ling Feng, Breaking the barrier of transactions: mining inter-transaction association rules, Proceedings of the fifth ACM SIGKDD international conference on Knowledge discovery and data mining, p.297-301, August 15-18, 1999, San Diego, California, United States
Helen Pinto , Jiawei Han , Jian Pei , Ke Wang , Qiming Chen , Umeshwar Dayal, Multi-dimensional sequential pattern mining, Proceedings of the tenth international conference on Information and knowledge management, October 05-10, 2001, Atlanta, Georgia, USA
Minghua Zhang , Ben Kao , David W. Cheung , Kevin Y. Yip, Mining periodic patterns with gap requirement from sequences, Proceedings of the 2005 ACM SIGMOD international conference on Management of data, June 14-16, 2005, Baltimore, Maryland
Ke Wang , Yabo Xu , Jeffrey Xu Yu, Scalable sequential pattern mining for biological sequences, Proceedings of the thirteenth ACM international conference on Information and knowledge management, November 08-13, 2004, Washington, D.C., USA
Robert Gwadera , Mikhail J. Atallah , Wojciech Szpankowski, Reliable detection of episodes in event sequences, Knowledge and Information Systems, v.7 n.4, p.415-437, May 2005
Alberto Apostolico , Mikhail J. Atallah, Compact recognizers of episode sequences, Information and Computation, v.174 n.2, p.180-192, May 1 2002
Gong Chen , Xindong Wu , Xingquan Zhu, Mining sequential patterns across time sequences, New Generation Computing, v.26 n.1, p.75-96, January 2008
Foto Afrati , Aristides Gionis , Heikki Mannila, Approximating a collection of frequent sets, Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, August 22-25, 2004, Seattle, WA, USA
Kuo-Yu Huang , Chia-Hui Chang, SMCA: A General Model for Mining Asynchronous Periodic Patterns in Temporal Databases, IEEE Transactions on Knowledge and Data Engineering, v.17 n.6, p.774-785, June 2005
Ahmed Metwally , Divyakant Agrawal , Amr El Abbadi, Using association rules for fraud detection in web advertising networks, Proceedings of the 31st international conference on Very large data bases, August 30-September 02, 2005, Trondheim, Norway
Mohammad El-Ramly , Eleni Stroulia , Paul Sorenson, Recovering software requirements from system-user interaction traces, Proceedings of the 14th international conference on Software engineering and knowledge engineering, July 15-19, 2002, Ischia, Italy
Jian Pei , Jiawei Han , Wei Wang, Constraint-based sequential pattern mining: the pattern-growth methods, Journal of Intelligent Information Systems, v.28 n.2, p.133-160, April 2007
Chang-Shing Lee , Yuan-Fang Kao , Yau-Hwang Kuo , Mei-Hui Wang, Automated ontology construction for unstructured text documents, Data & Knowledge Engineering, v.60 n.3, p.547-566, March, 2007
R. B. V. Subramanyam , A. Goswami, A fuzzy data mining algorithm for incremental mining of quantitative sequential patterns, International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, v.13 n.6, p.633-652, December 2005
Wei Wang , Jiong Yang , Philip S. Yu, Mining patterns in long sequential data with noise, ACM SIGKDD Explorations Newsletter, v.2 n.2, p.28-33, Dec. 2000
Jian Pei , Jiawei Han , Behzad Mortazavi-Asl , Jianyong Wang , Helen Pinto , Qiming Chen , Umeshwar Dayal , Mei-Chun Hsu, Mining Sequential Patterns by Pattern-Growth: The PrefixSpan Approach, IEEE Transactions on Knowledge and Data Engineering, v.16 n.11, p.1424-1440, November 2004
Andrzej Skowron , Piotr Synak, Reasoning in information maps, Fundamenta Informaticae, v.59 n.2-3, p.241-259, February 2004
Gregory Buehrer , Srinivasan Parthasarathy , Amol Ghoting, Out-of-core frequent pattern mining on a commodity PC, Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, August 20-23, 2006, Philadelphia, PA, USA
Hewijin Christine Jiau , Yi-Jen Su , Yeou-Min Lin , Shang-Rong Tsai, MPM: a hierarchical clustering algorithm using matrix partitioning method for non-numeric data, Journal of Intelligent Information Systems, v.26 n.2, p.185-207, March 2006
Andrzej Skowron , Piotr Synak, Reasoning in Information Maps, Fundamenta Informaticae, v.59 n.2-3, p.241-259, April 2004
Dong Xin , Jiawei Han , Xifeng Yan , Hong Cheng, On compressing frequent patterns, Data & Knowledge Engineering, v.60 n.1, p.5-29, January, 2007
Jiawei Han , Jian Pei , Yiwen Yin, Mining frequent patterns without candidate generation, ACM SIGMOD Record, v.29 n.2, p.1-12, June 2000
Jochen Hipp , Ulrich Gntzer , Gholamreza Nakhaeizadeh, Algorithms for association rule mining a general survey and comparison, ACM SIGKDD Explorations Newsletter, v.2 n.1, p.58-64, June, 2000
Jiawei Han , Jian Pei , Yiwen Yin , Runying Mao, Mining Frequent Patterns without Candidate Generation: A Frequent-Pattern Tree Approach, Data Mining and Knowledge Discovery, v.8 n.1, p.53-87, January 2004
Jian Pei , Jiawei Han , Laks V. S. Lakshmanan, Pushing Convertible Constraints in Frequent Itemset Mining, Data Mining and Knowledge Discovery, v.8 n.3, p.227-252, May 2004
Aristides Gionis , Teija Kujala , Heikki Mannila, Fragments of order, Proceedings of the ninth ACM SIGKDD international conference on Knowledge discovery and data mining, August 24-27, 2003, Washington, D.C.
Dong Xin , Jiawei Han , Xifeng Yan , Hong Cheng, Mining compressed frequent-pattern sets, Proceedings of the 31st international conference on Very large data bases, August 30-September 02, 2005, Trondheim, Norway
Valery Guralnik , Jaideep Srivastava, Event detection from time series data, Proceedings of the fifth ACM SIGKDD international conference on Knowledge discovery and data mining, p.33-42, August 15-18, 1999, San Diego, California, United States
Gabriela Guimares , Lus Moniz Pereira, Inferring definite-clause grammars to express multivariate time series, Proceedings of the 18th international conference on Innovations in Applied Artificial Intelligence, p.332-341, June 22-24, 2005, Bari, Italy
Yves Bastide , Rafik Taouil , Nicolas Pasquier , Gerd Stumme , Lotfi Lakhal, Mining frequent patterns with counting inference, ACM SIGKDD Explorations Newsletter, v.2 n.2, p.66-75, Dec. 2000
Yida Wang , Ee-Peng Lim , San-Yih Hwang, Efficient mining of group patterns from user movement data, Data & Knowledge Engineering, v.57 n.3, p.240-282, June 2006
Anthony K. H. Tung , Hongjun Lu , Jiawei Han , Ling Feng, Efficient Mining of Intertransaction Association Rules, IEEE Transactions on Knowledge and Data Engineering, v.15 n.1, p.43-56, January
Tu-Bao Ho , Canh-Hao Nguyen , Saori Kawasaki , Si-Quang Le , Katsuhiko Takabayashi, Exploiting temporal relations in mining hepatitis data, New Generation Computing, v.25 n.3, p.247-262, January 2007
Chin-Chen Chang , Chih-Yang Lin , Henry Chou, Perfect hashing schemes for mining traversal patterns, Fundamenta Informaticae, v.70 n.3, p.185-202, April 2006
Ming-Yen Lin , Suh-Yin Lee, Incremental update on sequential patterns in large databases by implicit merging and efficient counting, Information Systems, v.29 n.5, p.385-404, July 2004
R. Anderson , Pedro Domingos , Daniel S. Weld, Personalizing web sites for mobile users, Proceedings of the 10th international conference on World Wide Web, p.565-575, May 01-05, 2001, Hong Kong, Hong Kong
Richard Relue , Xindong Wu , Hao Huang, Efficient runtime generation of association rules, Proceedings of the tenth international conference on Information and knowledge management, October 05-10, 2001, Atlanta, Georgia, USA
Mohammad El-Ramly , Eleni Stroulia , Paul Sorenson, From run-time behavior to usage scenarios: an interaction-pattern mining approach, Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, July 23-26, 2002, Edmonton, Alberta, Canada
Gregory Buehrer , Srinivasan Parthasarathy , Shirish Tatikonda , Tahsin Kurc , Joel Saltz, Toward terabyte pattern mining: an architecture-conscious solution, Proceedings of the 12th ACM SIGPLAN symposium on Principles and practice of parallel programming, March 14-17, 2007, San Jose, California, USA
Akihiro Inokuchi , Takashi Washio , Hiroshi Motoda, Complete Mining of Frequent Patterns from Graphs: Mining Graph Data, Machine Learning, v.50 n.3, p.321-354, March
Jiong Yang , Wei Wang , Philip S. Yu , Jiawei Han, Mining long sequential patterns in a noisy environment, Proceedings of the 2002 ACM SIGMOD international conference on Management of data, June 03-06, 2002, Madison, Wisconsin
Jun Wook Lee , Ok Hyun Paek , Keun Ho Ryu, Temporal moving pattern mining for location-based service, Journal of Systems and Software, v.73 n.3, p.481-490, November-December 2004
Carl H. Mooney , John F. Roddick, Marking time in sequence mining, Proceedings of the fifth Australasian conference on Data mining and analystics, p.129-134, November 29-30, 2006, Sydney, Australia
Wenke Lee , Salvatore J. Stolfo , Kui W. Mok, Algorithms for mining system audit data, Data mining, rough sets and granular computing, Physica-Verlag GmbH, Heidelberg, Germany, 2002
Jiong Yang , Wei Wang , Philip S. Yu, Mining Asynchronous Periodic Patterns in Time Series Data, IEEE Transactions on Knowledge and Data Engineering, v.15 n.3, p.613-628, March
Jian Pei , Jiawei Han, Constrained frequent pattern mining: a pattern-growth view, ACM SIGKDD Explorations Newsletter, v.4 n.1, June 2002
Jiawei Han , Jian Pei, Mining frequent patterns by pattern-growth: methodology and implications, ACM SIGKDD Explorations Newsletter, v.2 n.2, p.14-20, Dec. 2000
Joo B. D. Cabrera , Lundy Lewis , Xinzhou Qin , Wenke Lee , Raman K. Mehra, Proactive Intrusion Detection and Distributed Denial of Service AttacksA Case Study in Security Management, Journal of Network and Systems Management, v.10 n.2, p.225-254, June 2002
Tamas Abraham, Event sequence mining to develop profiles for computer forensic investigation purposes, Proceedings of the 2006 Australasian workshops on Grid computing and e-research, p.145-153, January 16-19, 2006, Hobart, Tasmania, Australia
Wei-Guang Teng , Ming-Syan Chen , Philip S. Yu, A regression-based temporal pattern mining scheme for data streams, Proceedings of the 29th international conference on Very large data bases, p.93-104, September 09-12, 2003, Berlin, Germany
Gerhard Widmer , Simon Dixon , Werner Goebl , Elias Pampalk , Asmir Tobudic, In search of the Horowitz factor, AI Magazine, v.24 n.3, p.111-130, September
Magnus Lie Hetland , Pl Strom, Evolutionary Rule Mining in Time Series Databases, Machine Learning, v.58 n.2-3, p.107-125, February 2005
Gosta Grahne , Jianfei Zhu, Fast Algorithms for Frequent Itemset Mining Using FP-Trees, IEEE Transactions on Knowledge and Data Engineering, v.17 n.10, p.1347-1362, October 2005
Theodore Johnson , Laks V. S. Lakshmanan , Raymond T. Ng, The 3W Model and Algebra for Unified Data Mining, Proceedings of the 26th International Conference on Very Large Data Bases, p.21-32, September 10-14, 2000
Jian Pei , Guozhu Dong , Wei Zou , Jiawei Han, Mining condensed frequent-pattern bases, Knowledge and Information Systems, v.6 n.5, p.570-594, September 2004
Gui-Rong Xue , Hua-Jun Zeng , Zheng Chen , Wei-Ying Ma , Hong-Jiang Zhang , Chao-Jun Lu, Implicit link analysis for small web search, Proceedings of the 26th annual international ACM SIGIR conference on Research and development in informaion retrieval, July 28-August 01, 2003, Toronto, Canada
Yen-Liang Chen , Shih-Sheng Chen , Ping-Yu Hsu, Mining hybrid sequential patterns and sequential rules, Information Systems, v.27 n.5, p.345-362, July 2002
Mika Klemettinen , Heikki Mannila , Hannu Toivonen, Rule Discovery in Telecommunication AlarmData, Journal of Network and Systems Management, v.7 n.4, p.395-423, 7
Amol Ghoting , Gregory Buehrer , Srinivasan Parthasarathy , Daehyun Kim , Anthony Nguyen , Yen-Kuang Chen , Pradeep Dubey, Cache-conscious frequent pattern mining on a modern processor, Proceedings of the 31st international conference on Very large data bases, August 30-September 02, 2005, Trondheim, Norway
Yen-Liang Chen , Ya-Han Hu, Constraint-based sequential pattern mining: the consideration of recency and compactness, Decision Support Systems, v.42 n.2, p.1203-1215, November 2006
Shao-Shin Hung , Ting-Chia Kuo , Damon Shing-Min Liu, An Efficient Mining and Clustering Algorithm for Interactive Walk-Through Traversal Patterns, Proceedings of the 2004 IEEE/WIC/ACM International Conference on Web Intelligence, p.356-362, September 20-24, 2004
Usama Fayyad, Knowledge discovery in databases: An overview, Relational Data Mining, Springer-Verlag New York, Inc., New York, NY, 2001
Yun Chi , Richard R. Muntz , Siegfried Nijssen , Joost N. Kok, Frequent Subtree Mining - An Overview, Fundamenta Informaticae, v.66 n.1-2, p.161-198, January 2005
E. Boros , V. Gurvich , L. Khachiyan , K. Makino, On Maximal Frequent and Minimal Infrequent Sets in Binary Matrices, Annals of Mathematics and Artificial Intelligence, v.39 n.3, p.211-221, November
Alexandros Nanopoulos , Dimitrios Katsaros , Yannis Manolopoulos, A Data Mining Algorithm for Generalized Web Prefetching, IEEE Transactions on Knowledge and Data Engineering, v.15 n.5, p.1155-1169, September
Taneli Mielikinen , Evimaria Terzi , Panayiotis Tsaparas, Aggregating time partitions, Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, August 20-23, 2006, Philadelphia, PA, USA
van der Aalst , Ton Weijters , Laura Maruster, Workflow Mining: Discovering Process Models from Event Logs, IEEE Transactions on Knowledge and Data Engineering, v.16 n.9, p.1128-1142, September 2004
Heikki Mannila , Hannu Toivonen, Levelwise Search and Borders of Theories in KnowledgeDiscovery, Data Mining and Knowledge Discovery, v.1 n.3, p.241-258, 1997
Jiong Yang , Wei Wang , Philip S. Yu, Mining Surprising Periodic Patterns, Data Mining and Knowledge Discovery, v.9 n.2, p.189-216, September 2004
Amol Ghoting , Gregory Buehrer , Srinivasan Parthasarathy , Daehyun Kim , Anthony Nguyen , Yen-Kuang Chen , Pradeep Dubey, Cache-conscious frequent pattern mining on modern and emerging processors, The VLDB Journal The International Journal on Very Large Data Bases, v.16 n.1, p.77-96, January 2007
Zhiping Zeng , Jianyong Wang , Lizhu Zhou , George Karypis, Out-of-core coherent closed quasi-clique mining from large dense graph databases, ACM Transactions on Database Systems (TODS), v.32 n.2, p.13-es, June 2007
David Al-Dabass , Evtim Peytchev , Mohamed Khalil , Manling Ren, Scalability issues in urban traffic systems, Proceedings of the 1st international conference on Scalable information systems, p.31-es, May 30-June 01, 2006, Hong Kong
Klaus Julisch , Marc Dacier, Mining intrusion detection alarms for actionable knowledge, Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, July 23-26, 2002, Edmonton, Alberta, Canada
W. M. P. van der Aalst , A. J. M. M. Weijters, Process mining: a research agenda, Computers in Industry, v.53 n.3, p.231-244, April 2004
Ling Feng , Jeffrey Xu Yu , Hongjun Lu , Jiawei Han, A template model for multidimensional inter-transactional association rules, The VLDB Journal The International Journal on Very Large Data Bases, v.11 n.2, p.153-175, October 2002
Qing Li , Ling Feng , Allan Wong, From intra-transaction to generalized inter-transaction: landscaping multidimensional contexts in association rule mining, Information SciencesInformatics and Computer Science: An International Journal, v.172 n.3-4, p.361-395, 9 June 2005
Luc Dehaspe , Hannu Toivonen, Discovery of frequent DATALOG patterns, Data Mining and Knowledge Discovery, v.3 n.1, p.7-36, March 1999
Taneli Mielikinen, Frequency-based views to pattern collections, Discrete Applied Mathematics, v.154 n.7, p.1113-1139, 1 May 2006
Jos L. Balczar , Gemma C. Garriga, Horn axiomatizations for sequential data, Theoretical Computer Science, v.371 n.3, p.247-264, March, 2007
Xingquan Zhu , Xindong Wu , Ahmed K. Elmagarmid , Zhe Feng , Lide Wu, Video Data Mining: Semantic Indexing and Event Detection from the Association Perspective, IEEE Transactions on Knowledge and Data Engineering, v.17 n.5, p.665-677, May 2005
Jiawei Han , Laks V. S. Lakshmanan , Jian Pei, Scalable frequent-pattern mining methods: an overview, Tutorial notes of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining, August 26-29, 2001, San Francisco, California
Vipin Kumar , Mohammed Zaki, High performance data mining (tutorial PM-3), Tutorial notes of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.309-425, August 20-23, 2000, Boston, Massachusetts, United States | frequent episodes;event sequences;sequence analysis |
593450 | Adaptive Fraud Detection. | One method for detecting fraud is to check for suspicious changes in user behavior. This paper describes the automatic design of user profiling methods for the purpose of fraud detection, using a series of data mining techniques. Specifically, we use a rule-learning program to uncover indicators of fraudulent behavior from a large database of customer transactions. Then the indicators are used to create a set of monitors, which profile legitimate customer behavior and indicate anomalies. Finally, the outputs of the monitors are used as features in a system that learns to combine evidence to generate high-confidence alarms. The system has been applied to the problem of detecting cellular cloning fraud based on a database of call records. Experiments indicate that this automatic approach performs better than hand-crafted methods for detecting fraud. Furthermore, this approach can adapt to the changing conditions typical of fraud detection environments. | Introduction
In the United States, cellular fraud costs the telecommunications industry hundreds
of millions of dollars per year (Walters and Wilkinson 1994; Steward 1997). One
kind of cellular fraud called cloning is particularly expensive and epidemic in major
cities throughout the United States. Cloning fraud causes great inconvenience to
customers and great expense to cellular service providers. Existing methods for
detecting cloning fraud are ad hoc and their evaluation is virtually nonexistent.
We have embarked on a program of systematic analysis of cellular call data for the
purpose of designing and evaluating methods for detecting fraudulent behavior.
Cloning fraud is one instance of superimposition fraud, in which fraudulent usage
is superimposed upon (added to) the legitimate usage of an account. Other
examples are credit card fraud, calling card fraud and some forms of computer in-
trusion. Superimposition fraud typically occurs when a non-legitimate user gains
illicit access to the account or service of a legitimate user. Superimposition fraud
is detectable if the legitimate users have fairly regular behavior that is generally
distinguishable from the fraudulent behavior.
This paper presents a framework, and a corresponding system, for automatically
generating detectors for superimposition fraud. We have applied the system in the
domain of cellular cloning fraud. Under the framework, massive amounts of cellular
call data are analyzed in order to determine general patterns of fraud. These patterns
are then used to generate a set of monitors, each of which watches customers'
behavior with respect to one discovered pattern. A monitor profiles each customer's
typical behavior and, in use, measures the extent to which current behavior is abnormal
with respect to the monitor's particular pattern. Each monitor's output is
provided to a neural network, which weights the values and issues an alarm when
the combined evidence for fraud is strong enough.
This article is organized as follows. We first describe the problem of cellular
cloning fraud and some existing strategies for detecting it. We then describe the
framework in detail using examples from the implemented system. We present
experimental results comparing the system against other known methods for detecting
fraud. Finally, we discuss the evaluation and describe issues in the future
of automatic fraud detection.
2. Cellular Communications and Cloning Fraud
Whenever a cellular phone is on, it periodically transmits two unique identification
numbers: its Mobile Identification Number (MIN) and its Electronic Serial Number
(ESN). These two numbers together specify the customer's account. These numbers
are broadcast unencrypted over the airwaves, and they can can be received, decoded
and stored using special equipment that is relatively inexpensive.
2.1. Cloning Fraud
Cloning occurs when a customer's MIN and ESN are programmed into a cellular
telephone not belonging to the customer. When this second telephone is used,
the network sees the customer's MIN and ESN and subsequently bills the usage
to the customer. With the stolen MIN and ESN, a cloned phone user (whom we
shall call a bandit) can make virtually unlimited calls, whose charges are billed to
the customer. The attraction of free and untraceable communication makes cloned
phones very popular in major metropolitan areas.
If the fraudulent usage goes undetected, the customer's next bill will include
the corresponding charges. Typically, the customer then calls the cellular service
provider (the carrier) and denies the usage. The carrier and customer then determine
which calls were made by the "bandit" and which were legitimate calls. The
fraudulent charges are credited to the customer's account, and measures are taken
to prohibit further fraudulent charges. In certain cases, the fraudulent call records
will be referred to a law enforcement agency for prosecution.
There are two primary motivations for cloning fraud. Obviously, cloning fraud
allows low-cost communications. A bandit is not charged for calls, which are usually
worth far more (in retail dollars) than the cost of the cloned phone. Less
obviously, cloning fraud allows untraceable communications because the bandit's
identity cannot be tied to the cloned account. This second aspect is very important
to criminals (DeMaria and Gidari 1996).
Cloning fraud is detrimental in many ways. First, fraudulent usage congests cell
sites, causing service to be denied to legitimate customers. Second, most cellular
calls are to non-cellular destinations, so fraud incurs land-line usage charges. Third,
cellular carriers must pay costs to other carriers for usage outside the home territory.
Because these are retail costs, they constitute a considerable financial burden to
the customer's carrier. Fourth, the crediting process is costly to the carrier and
inconvenient to the customer; the customer is more likely to switch to another
carrier ("customer churn") if the other is perceived to be less susceptible to fraud.
For these reasons, cellular carriers have a strong interest in reducing cloning fraud.
2.2. Strategies for dealing with cloning fraud
There are two classes of methods for dealing with cloning fraud. Pre-call methods
try to identify and block fraudulent calls as they are made. Post-call methods try
to identify fraud that has already occurred on an account so that further fraudulent
usage can be blocked.
2.2.1. Pre-call methods Pre-call detection methods involve validating the phone
or its user when a call is placed. A common method is requiring that a Personal
Number (PIN) be entered before every call. A PIN serves as a password
that is validated by the switch prior to allowing the call into the network.
PINs are in use throughout many metropolitan areas in the United States. Unfor-
tunately, like MIN-ESN pairs, PINs are broadcast over the airwaves unencrypted.
For technical reasons, PINs are more difficult to receive and decode, but with more
sophisticated equipment PIN cracking is possible (Herzog 1995). Although PINs
make cloning fraud more difficult, they do not prevent it.
Other methods of prevention include RF Fingerprinting and Authentication (Red-
den 1996). RF Fingerprinting is a method of identifying cellular phones by their
transmission characteristics. Authentication is a reliable and secure private-key
encryption method that imposes no inconvenience on the customer. It has been
predicted that authentication will eliminate cloning fraud eventually. However,
authentication requires changes in hardware: both phones and switches must be
capable of processing authentication requests. Currently about thirty million non-
authenticatable cell phones are in use in the United States alone, and their replacement
will not be immediate (Steward 1997). In the meantime, cloning fraud will
continue to be a problem and the industry will rely on post-call fraud detection
methods.
2.2.2. Post-call methods Post-call methods periodically analyze call data on each
account to determine whether cloning fraud has occurred. One such method, collision
detection, involves analyzing call data for temporally overlapping calls. Since
a MIN-ESN pair is licensed to only one legitimate user, any simultaneous usage is
probably fraudulent. A closely related method, velocity checking (Davis and Goyal
1993), involves analyzing the locations and times of consecutive calls to determine
whether a single user could have placed them while traveling at reasonable speeds.
For example, if a call is made in Los Angeles 20 minutes after a call is made on the
same account in New York, two different people are likely using the account.
Date & Time Day Duration Origin Destination Fraud
mins Brooklyn, NY Stamford,CT
1/05/95 14:53:27 Fri 5 mins Brooklyn, NY Greenwich,CT
1/08/95 09:42:01 Mon 3 mins Bronx, NY White Plains, NY
1/08/95 15:01:24 Mon 9 mins Brooklyn, NY Brooklyn, NY
1/09/95 15:06:09 Tue 5 mins Manhattan, NY Stamford, CT
1/09/95 16:28:50 Tue 53 sec Brooklyn, NY Brooklyn, NY
1/10/95 01:45:36 Wed 35 sec Boston, MA Chelsea, MA bandit
1/10/95 01:46:29 Wed 34 sec Boston, MA Yonkers, NY bandit
1/10/95 01:50:54 Wed 39 sec Boston, MA Chelsea, MA bandit
1/10/95 11:23:28 Wed 24 sec White Plains, NY Congers, NY
1/11/95 22:00:28 Thu 37 sec Boston, MA East Boston, MA bandit
East Boston, MA bandit
Figure
1. Call records of a sample frauded account
Collisions and velocity checks are both believed to be accurate, but they share
the disadvantage that their usefulness depends upon a moderate level of legitimate
activity. Low-usage subscribers (for example, people who only use cellular phones
in emergencies) will rarely cause collisions or velocity alarms with bandits.
Another post-call method, dialed digit analysis, mines call data to build up a
database of telephone numbers called by bandits during periods of fraudulent ac-
tivity. For detection, this database is matched against the numbers called by cus-
tomers, and alarms are produced when the number of hits is above a threshold
("dialed digit hits").
2.2.3. User profiling User profiling methods constitute a special class of post-call
methods. They involve analyzing calling behavior in order to detect usage anomalies
suggestive of fraud. Profiling often works well with low-usage subscribers because
unusual behavior is very prominent. For this reason, profiling is a good complement
to collision and velocity checking because it covers cases the others might miss.
Figure
shows some chronological call data from an example (fabricated) frauded
account (the fields shown are just a sample; our call data contain many more
attributes than shown here). The column at the far right indicates whether the call
is fraudulent or not; that is, whether the call was placed by the customer or the
bandit. A fraud analyst looking at this account would quickly be able to recognize
the two classes of calls:
1. The legitimate user calls from the metro New York City area, usually during
working hours, and typically makes calls lasting a few minutes.
2. The bandit's calls originate from a different area (Boston, Massachusetts, about
200 miles away), are made in the evenings, and last less than a minute.
Ideally, a fraud detection system should be able to learn such rules automatically
and use them to catch fraud.
This paper addresses the automatic design of user profiling methods. User profiling
methods are attractive because they do not depend upon any special hardware
capability, as authentication does, nor do they require that the customer replace
or upgrade existing equipment. Moreover, the ability to generate such detectors is
domain independent: such a system should be able to generate fraud detectors for
any domain with superimposition fraud.
2.3. The Need to be Adaptive
There are a number of commercially available expert systems for fraud detection
that include user profiling. Fraud analysts or system administrators can tune the
techniques by adjusting parameters, or by entering specific patterns that will trigger
alarms. Unfortunately, determining which potential patterns will be useful is a time-consuming
process of trial-and-error. Moreover, the patterns of fraud are dynamic.
Bandits constantly change their strategies in response to new detection techniques
or new cellular hardware capabilities. By the time a system is manually tuned, the
fraudulent behavior may have changed significantly.
The environment is dynamic in other ways as well. The level of fraud changes
dramatically month-to-month because of modifications to work practices (both the
carrier's and the bandits'). Also, the costs of missing fraud or of dealing with false
alarms change with intercarrier contracts, and because of fraud analyst workforce
issues.
For all these reasons, it is important that a fraud detection system adapt easily
to new conditions. It should be able to notice new patterns of fraud. It should also
be able to modify its alarm generation behavior, for example, as the level of fraud
or the cost of dealing with a false alarm changes. Such adaptability can be achieved
by generating fraud detection systems automatically from data, using data mining
techniques.
3. Automatic Construction of Profiling Fraud Detectors
One approach to building a fraud detection system is to classify individual trans-
actions, calls in our case, as being fraudulent or legitimate. Classification has been
well explored, e.g., in machine learning and statistics, so this would seem to be a
straightforward application of existing techniques.
We have not had success using standard machine learning techniques to construct
such a classifier. Some specific results are discussed in Section 6.3. In general, there
are two problems that make simple classification approaches infeasible.
call that would be unusual for one customer would be typical for
another. For example, a call placed from Brooklyn is not unusual for a subscriber
who lives there, but might be very strange for a Boston subscriber.
6 FAWCETT AND PROVOST
Thus, it is necessary (i) to discover indicators corresponding to changes in behavior
that are indicative of fraud, rather than absolute indicators of fraud, and
(ii) to profile the behavior of individual customers to characterize their normal
behavior.
If there were available substantial information about an account's context, we
could possibly ameliorate this problem. Context information would comprise
behavior information such as what the phone is used for, what areas it is used
in, what areas/numbers it normally calls, what times of day, and so on. Context
information is not available, 1 so our solution is to derive it from historical data
specific to each account. The discovery of context-sensitive fraud indicators and
the profiling of individual accounts comprise two of the three major elements
of the learning problem.
At the level of the individual call, the variation in calling behavior
is large, even for a particular user. Legitimate subscribers occasionally make
calls that look suspicious. As far as we have been able to determine, it is not
possible to achieve simultaneously the high degree of accuracy and high level
of coverage necessary to classify individual calls effectively. Any classifier that
fires on a significant number of defrauded accounts produces unacceptably large
numbers of false alarms. Therefore, decisions to take corrective action cannot
be made with confidence on the basis of individual calls. Instead, it is necessary
to aggregate customer behavior, smoothing out the variation, and watch for
coarser-grained changes that have better predictive power. This is the third
major element of the learning problem; in the experiments we describe later,
we aggregate customer behavior into account-days.
In sum, the learning problem comprises three questions, each of which corresponds
to a component of our framework.
1. Which call features are important? Which features or combinations of features
are useful for distinguishing legitimate behavior from fraudulent behavior?
2. How should profiles be created? Given an important feature, how should we
characterize/profile the behavior of a subscriber with respect to the feature, in
order to notice important changes?
3. When should alarms be issued? Given the results of profiling behavior based on
multiple criteria, how should they be combined to be effective in determining
when fraud has occurred?
Each of these issues corresponds to a component of our framework.
4. The Detector Constructor Framework
Our Detector Constructor framework is illustrated in Figure 2. Under the frame-
work, a system first learns rules that serve as indicators of fraudulent behavior. It
Monitor
Construction
Monitor
templates
Rules
Fraud
Detector
Call data
Mn
Training
and Selection
Rule Learning
Classifier
Profiling
monitors
Figure
2. The framework for automatically constructing fraud detectors.
then uses these rules, along with a set of templates, to create profiling monitors
These monitors profile the typical behavior of each account with
respect to a rule and, in use, describe how far each account is from its typical be-
havior. Finally, the system learns to weight the monitor outputs so as to maximize
the effectiveness of the resulting fraud detector.
Figure
3 shows how such a detector will be used. The monitors are provided with
a single day's calls from a given account, and each monitor generates a number indicating
how unusual that account-day looks for the account. The numeric outputs
from the monitors are treated as evidence and are combined by the detector. When
the detector has enough evidence of fraudulent activity on an account, based on
the indications of the monitors, it generates an alarm.
We now discuss each step of the framework in detail, illustrated by the particular
choices made in our first implemented system, as applied to the problem of cloning
fraud detection. The first Detector Constructor system is called DC-1. The call
data used for detecting cloning fraud are chronological records of calls made by
each subscriber, organized by account. These data describe individual calls using
attributes such as DATE, FROM-STATE, DURATION and CELL-SITE.
Account-Day
Day Time Duration Origin Destination
mins Bronx, NY Miami, FL
Tue 10:05 3 mins Scarsdale, NY Bayonne, NJ
Tue 11:23 24 sec Scarsdale, NY Congers, NY
Tue 14:53 5 mins Tarrytown, NY Greenwich, CT
Tue 15:06 5 mins Manhattan, NY Westport, CT
Tue 16:28 53 sec Scarsdale, NY Congers, NY
Tue 23:40 17 mins Bronx, NY Miami, FL
BRONX at night
# calls from
exceeds
daily threshold
Airtime from
BRONX at night
SUNDAY airtime
exceeds
daily threshold1 0
Value normalization
and weighting
FRAUD ALARM
Combining
Evidence >= q
Profiling
Monitors
Figure
3. A DC-1 fraud detector processing a single account-day of data.
4.1. Learning Fraud Rules
The first stage of detector construction, rule learning, involves searching the call
data for indicators of fraud. In the DC-1 system, the indicators are conjunctive
rules discovered by a standard rule-learning program.
As discussed above, an obvious way of mining fraud indicators is to create an
example set consisting of all frauded calls and all legitimate calls, and apply a rule
learning algorithm to the example set. However, this approach loses context information
about the normal behavior of the account in which the fraud occurred.
To illustrate the importance of context, consider a situation in which half the subscribers
live in New York and half in Los Angeles. When cloned, the New York
accounts are used in Los Angeles and the Los Angeles accounts are used in New
York. Applying rule learning to the combined set of call records would uncover no
fraud rules based on call origin; in other words, knowing that a call originated in
New York says nothing about how likely it is to be fraud. In fact, this conclusion
would be wrong: in this scenario a New York account with Los Angeles calls is
much more likely to have been cloned than if it had only New York calls. This fact
is missed when using a combined example set, because in combining examples all
account context information is lost.
In light of the need to maintain context information, rule learning is performed in
two steps. Rules are first generated locally based on differences between fraudulent
and normal behavior for each account, then they are combined in a rule selection
step.
4.1.1. Rule generation DC-1 uses the RL program (Clearwater and Provost
1990; Provost and Aronis 1996) to generate indicators of fraud in the form of
classification rules. Similar to other MetaDENDRAL-style rule learners (Buchanan
and Mitchell 1978; Segal and Etzioni 1994; Webb 1995), RL performs a general-
to-specific search of the space of conjunctive rules. This type of rule-space search
is described in detail by Webb (Webb 1995). In DC-1, RL uses a beam search for
rules with certainty factors above a user-defined threshold. The certainty factor we
used for these runs was a simple frequency-based probability estimate, corrected
for small samples (Quinlan 1987). In order to deal with the very large numbers of
values for some of the attributes used to describe calls (more than 10,000 values in
total), RL also used breadth-first marker propagation techniques, so that the algo-
rithm's time complexity does not depend on the number of attribute values (Aronis
and Provost 1997). (RL's time complexity is linear in the number of attributes and
the number of examples.)
The call data are organized by account, with each call record labeled as fraudulent
or legitimate. When RL is applied to an account's calls it produces a set of rules that
serve to distinguish, within that account, the fraudulent calls from the legitimate
calls. As an example, the following rule would be a relatively good indicator of
Certainty
This rule denotes that a call placed at night from The Bronx (a Borough of New
York City) is likely to be fraudulent. The Certainty means that,
within this account, a call matching this rule has an 89% probability of being
fraudulent.
From each account, RL generates a "local" set of rules describing the fraud on
that account. Each rule is recorded along with the account from which it was
generated. The covering heuristic typically used by RL was disabled, so that all
of the (maximally general) rules with probability estimates above threshold would
be generated. This option was chosen because rule generation in DC-1 is local and
decisions about coverage should not be made locally. The next step, rule selection,
incorporates information about coverage and generality.
4.1.2. Rule Selection After all accounts have been processed, a rule selection
step is performed. The purpose of this step is to derive a set of rules that will serve
as fraud indicators.
A rule selection step is necessary because the rule generation step typically generates
tens of thousands of rules in total, most of which are specific only to single
accounts. The system cannot know a priori how general each rule will be. For
example, from one account RL may generate the rule:
Given:
Accts: set of all accounts
Rules: set of all fraud rules generated from Accts
Number of rules required to cover each account.
Taccts : (parameter) Number of accounts in which a rule must have been found.
Output:
S: Set of selected rules.
1. /* Initialization */
2.
3. for (a 2 Accts) do
4. for (r 2 Rules) do
5. Number of accounts in which r occurs */
of accounts generating r */
7. end for
8. /* Set up Occur and AcctsGen */
9. for (a 2 Accts) do
set of rules generated from a;
11. for (r 2 Ra ) do
12. Occur[r] := Occur[r]
13. add a to AcctsGen[r];
14. end for; end for
15. /* Cover Accts with Rules */
16. for (a 2 Accts) do
17. list of rules generated from a;
18. sort Ra by Occur;
19. while (Cover[a] ! T rules ) do
20. r := highest-occurrence rule from Ra
21. Remove r from Ra
22. if
23. add r to
24. for (a2 2 AcctsGen[r]) do
25.
26. end for; end if
27. end while; end for
Figure
4. Rule selection and covering algorithm used by DC-1
This rule is probably specific only to the account from which it was generated,
but there is no a priori way to know a rule's generality in the generation step,
which processes a single account at a time. If this rule is found in ("covers") many
accounts, it is probably worth using; if it was only found in a single account, it is
probably not a general indicator of fraudulent behavior. Even if the same account
ADAPTIVE FRAUD DETECTION 11
is cloned again, it will not be defrauded in exactly the same way. Note that DC-1's
notion of coverage is slightly different from the standard notion, because of the
multiple levels of granularity; in particular, DC-1 selects a set of rules that covers
the accounts, as opposed to typical classifier learning, in which a set of rules is
selected that covers the examples (in this case, the calls).
The rule selection algorithm is given in Figure 4. The algorithm identifies a small
set of general rules that cover the accounts. Two parameters control the algorithm.
T rules is a threshold on the number of rules required to "cover" each account. In
the selection process, if an account has already been covered by T rules rules, it will
not be examined. T accts is the number of accounts a rule must have been found in
(i.e., mined from) in order to be selected at all.
For each account, the list of rules generated by that account is sorted by the
frequency of occurrence in the entire account set. The highest frequency unchosen
rule is selected. An account is skipped if it is already sufficiently covered. The
resulting set of rules is used in construction of monitors.
4.2. Constructing Profiling Monitors
Rule learning produces a set of rules characterizing changes that commonly occur
when an account is cloned. These rules are not universal: for a given account, we
do not know to what extent that account's normal behavior already satisfies the
rule. For example, the "Bronx-at-night" rule, mentioned above, may be very useful
for someone living in Hartford, Connecticut, but it may cause many false alarms
on a subscriber living in the Bronx. A fraud detection system should distinguish
the two. In the latter case the system should inhibit the rule from firing, or at least
require a much higher level of activation.
Sensitivity to different users is accomplished by converting the rules into profiling
monitors. Each monitor has a Profiling step and a Use step. Prior to being used on
an account, each monitor profiles the account. In the Profiling step, the monitor is
applied to a segment of an account's typical (non-fraud) usage in order to measure
the account's normal activity. Statistics from this profiling period are saved with
the account. In the monitor's Use phase, the monitor processes a single account-day
at a time. The monitor references the normalcy measures calculated in Profiling,
and generates a numeric value describing how abnormal 2 the current account-day
is.
Profiling monitors are created by the monitor constructor, which employs a set of
templates. The templates are instantiated by rule conditions. Given a set of rules
and a set of templates, the constructor generates a monitor from each rule-template
pair. Two monitor templates are shown in Figure 5. At the top is a template that
creates threshold monitors. Such a monitor yields a binary feature corresponding
to whether the user's behavior was above threshold for the given day. The bottom
of
Figure
5 shows a template for a standard deviation monitor. In the Profiling
period, such monitors measure the mean (-) and standard deviation (oe) of typical
usage; in the Use period, they produce a continuous output representing how many
standard deviations above the mean an account-day is.
Threshold monitors
ffl Given: Rule conditions from a fraud rule.
ffl Profiling: On a daily basis, count the number of calls that satisfy rule con-
ditions. Keep track of the maximum as daily threshold.
ffl Use: Given an account-day, let C be the set of all calls on that day that
satisfy rule conditions.
daily threshold
Standard deviation monitors
ffl Given: Rule conditions from a fraud rule.
ffl Profiling: On a daily basis, sum the airtime of all calls satisfying rule con-
ditions. At the end of the training period, record the mean (-) and standard
deviation (oe) of the samples.
ffl Use: Given an account-day, let C be the set of all calls on that day that
satisfy rule conditions. Let
Call2C
airtime(Call)
Airtime if
Airtime\Gamma-
oe if Airtime ? -
Figure
5. Two templates for creating monitors from rules. A threshold monitor learns a threshold
on maximum use and outputs a 1 whenever daily usage exceeds the threshold. A standard
deviation monitor outputs the number of standard deviations over the mean profiled usage.
As an example, assume the Bronx-at-night rule mentioned earlier was used with
the template shown in Figure 5b. Assume that, on some account, the subscriber
called from the Bronx an average of five minutes per night with a standard deviation
of two minutes. At the end of the Profiling step, the monitor would store the values
(5,2) with that account. In Use on that account, if the monitor processed a day
USED
USED
Std. Deviation
Mean
Std. Deviation
Mean
Use
Profiling Use Profiling
Figure
6. Using mean and standard deviation in profiling.
containing three minutes of airtime from the Bronx at night, the monitor would emit
a zero; if the monitor saw 15 minutes, it would emit (15 5. This value
denotes that the account is five standard deviations above its average (profiled)
usage level.
Standard deviation monitors are sensitive both to the expected amount of activity
on an account and to the expected daily variation of that activity. Figure 6 illustrates
the difference, showing one monitor applied to two accounts. The account on
the left has low variation in the Profiling period so its standard deviation is lower.
Consequently the erratic behavior in its Use period will produce large values from
the monitor. The account on the right has the same mean but exhibits much larger
variation in Profiling period, so the standard deviation is higher. The variations in
behavior during the Use period will not produce large values from the monitor.
4.3. Combining Evidence from the Monitors
The third stage of detector construction learns how to combine evidence from the
monitors generated by the previous stage. For this stage, the outputs of the monitors
are used as features to a standard learning program. Training is done on
account data, and monitors evaluate one entire account-day at a time. In training,
the monitors' outputs are presented along with the desired output (the account-
day's correct class: fraud or non-fraud). The evidence combination weights the
monitor outputs and learns a threshold on the sum so that alarms may be issued
with high confidence.
Many training methods for evidence combining are possible. We chose a simple
Linear Threshold Unit (LTU) (Nilsson 1965; Young 1984) for the experiments reported
below. An LTU is simple and fast, and enables a good first-order judgment
of the features' worth.
14 FAWCETT AND PROVOST
A feature selection process is used to reduce the number of monitors in the final
detector. Some of the rules do not perform well when used in monitors, and some
monitors overlap in their fraud detection coverage. We therefore employ a sequential
forward selection process (Kittler 1986) which chooses a small set of useful monitors.
Empirically, this simplifies the final detector and increases its accuracy.
The final output of DC-1 is a detector that profiles each user's behavior based on
several indicators, and produces an alarm if there is sufficient evidence of fraudulent
activity. Figure 3 shows an example of a simple detector evaluating an account-day.
Before being used on an account, the monitors each profile the account. They
are applied to a profiling segment (thirty days in our experiments) during which
they measure unfrauded usage. In our study, these initial thirty account-days were
guaranteed free of fraud, but were not otherwise guaranteed to be typical. From
this initial profiling period, each monitor measures a characteristic level of activity.
4.4. Summary of the Detector Construction Process
In sum, DC-1 begins by examining the call records of defrauded accounts. The call
records are expressed in terms of a set of base level attributes with thousands of
possible values. From these data, the system generates rules characterizing fraudulent
calls within accounts, then selects a smaller set of general rules as indicators
of fraudulent behavior.
These rules are used as the basis from which to build a set of profiling monitors,
each of which examines behavior based on one learned rule. A monitor learns the
typical behavior of an account by scanning an initial sequence of the account's
calls (its "profiling period") and saving some statistics. Subsequently, the monitor
examines chunks of calls (in our experiments, account-days). The monitor
subsequently examines each chunk (day) of each account's behavior and outputs a
number indicating how far away from normal the behavior is.
In order to construct a high-confidence detector, DC-1 must then learn to combine
the outputs of the monitors effectively. To do this, it trains a classifier on a sample
of account-days. Each account-day is a training instance expressed as a vector of
monitor outputs for that day, and labelled as either containing fraud or not. After
training, the system has a classifier that is able to combine the monitors effectively.
The final output of the system is a set of monitors and a trained classifier for
combining their outputs. In order to be applied to a new account, the monitors
must see a profiling period of days from that account.
The next sections describe our cellular call data and the experiments we have
performed on the system.
5. The Data
The call data used for this study are records of cellular calls placed over four months
by users in the New York City area-an area with high levels of fraud. Each call
is described by thirty-one attributes, such as the phone number of the caller, the
duration of the call, the geographical origin and destination of the call, and any
long-distance carrier used. Because of security considerations, we are unable to
disclose all the features used in the system.
To these thirty-one attributes are added several derived attributes that incorporate
knowledge we judged to be potentially useful. One such attribute is a categorical
TIME-OF-DAY variable representing the time segment of the day in which a
call is placed. Its values are MORNING, AFTERNOON, TWILIGHT, EVENING
and NIGHT. Another derived attribute is TO-PAYPHONE, a binary flag indicating
whether the call terminated at a payphone. Note that any number of additional
features could be added to encode relevant domain knowledge.
Each call is also give a class label of legitimate or fraudulent. This is done by
cross referencing a database of all calls that were credited as being fraudulent for
the same time period.
5.1. Data Cleaning
Like all real-world data, our cellular call data contain errors and noise from various
sources. For example, calls are marked as fraudulent based on a process called
block crediting. In this process, the customer and the carrier representative together
establish the range of dates during which the fraud occurred, and the calls within
the range are credited. The customer is usually not asked about each individual
call. The block crediting process uses heuristics to discard obvious non-fraudulent
calls from the credited block, but these heuristics are fallible. Also, if there is
a disagreement about the fraud span, the customer service representative usually
concedes, in the customer's favor, to a wider date span. Any erroneously credited
calls constitute noise in our data.
Because of these noise sources, we cleaned the data in several ways.
ffl Each account's calls were scanned automatically to eliminate credited calls to
numbers that had been called outside of the credited block. In other words, the
program looked for credited calls made to a phone number that also had been
called by the legitimate subscriber; in this case, the crediting may have been a
mistake, so the call is discarded completely.
ffl An account-day was classified as fraudulent only if five or more minutes of
fraudulent usage occurred. Days including one to four minutes of fraudulent
usage were discarded. This policy eliminated a small number of "gray area"
account-days probably mislabelled due to small amounts of noise. For example,
the database of credits due to fraud occasionally included credits for other
reasons, such as wrong numbers.
ffl Within any time period there will be fraud that has not yet been detected.
We assumed that some genuinely fraudulent calls would not be marked as such
because of this time lag. We attempted to minimize this noise by delaying the
data retrieval by two weeks.
ffl In preliminary experiments, rule learning uncovered some unusual attribute
values (e.g., that seemed to be very strong indicators of fraud.
Discussions with the database providers led us to conclude that these suspicious
values were artifacts of the crediting process: in some circumstances, crediting
would erase or replace certain fields. Because the values appeared primarily
in credited records, data mining had extracted them as high-confidence fraud
rules. We found five or six such misleading values and eliminated from the
database all records containing them.
In addition, the start times of calls had been recorded in local time with respect
to the switch of origin. The calls were normalized to Greenwich Mean Time for
chronological sorting.
5.2. Data Selection
The call data were separated carefully into several partitions for rule learning,
account profiling, and detector training and testing. Once the monitors are created
and the accounts profiled, the system transforms raw call data into a series of
account-days using the outputs of the monitors as features.
Rule learning and selection used 879 accounts comprising over 500,000 calls.
About 3600 accounts were selected for profiling, training, and testing. The only
condition used to select these 3600 accounts was that they be guaranteed to have at
least thirty fraud-free days of usage before any fraudulent usage. The initial thirty
days of each account were used for profiling. The remaining days of usage were used
to generate approximately 96,000 account-days. Using randomly selected accounts,
we generated sets of 10,000 account-days for training and 5000 account-days for
testing. Training and testing accounts were distinct, so their account-days were
not mixed between training and testing. 3 Each set of account-days was chosen to
comprise 20% fraud and 80% non-fraud days.
6. Experiments and Evaluation
Rule learning generated 3630 rules, each of which applied to two or more accounts.
The rule selection process, in which rules are chosen in order of maximum account
coverage, yielded a smaller set of 99 rules sufficient to cover the accounts. Each of
the 99 rules was used to instantiate two monitor templates, yielding 198 monitors.
The final feature selection step reduced this to eleven monitors, with which the
experiments were performed.
6.1. The Importance of Error Cost
In this domain, different types of errors have different costs. A realistic evaluation
should take misclassification costs into account. Classification accuracy, a standard
metric within machine learning and data mining, is not sufficient.
A false positive error (a false alarm) corresponds to wrongly deciding that a
customer has been cloned. Based on the cost of a fraud analyst's time, we estimate
the cost of a false positive error to be about $5. A false negative error corresponds
Table
1. Accuracies and costs of various detectors.
Detector Accuracy (%) Cost (US$) Accuracy at cost (%)
Alarm on All 20 20000 20
Alarm on None 80 18111 \Sigma 961 80
Collisions Velocities
High Usage 88 \Sigma :7 6938 \Sigma 470 85 \Sigma 1:7
State of the Art (SOTA) 90 \Sigma :4 6557 \Sigma 541 88 \Sigma :9
detector 92 \Sigma :5 5403 \Sigma 507 91 \Sigma :8
to letting a frauded account-day go undetected. Rather than using a uniform cost
for all false negatives, we estimated a false negative to cost $.40 per minute of
fraudulent airtime used on that account-day. This figure is based on the proportion
of usage in local and non-local ("roaming") markets, and their corresponding costs.
Because LTU training methods try to minimize errors but not error costs, we
employed a second step in training. After training, the LTU's threshold is adjusted
to yield minimum error cost on the training set. This adjustment is done by moving
the decision threshold from -1 to +1 in increments of .01 and computing the resulting
error cost. After the minimum cost on training data is found, the threshold is
clamped and the testing data are evaluated.
6.2. DC-1 Compared with Alternative Detection Strategies
Table
1 shows a summary of results of DC-1 compared against other detectors. The
name of each detector is shown in the left-most column. Classification accuracy averages
and standard deviations are shown in the second column. The third column
shows the mean and standard deviations of test set costs. The right-most column,
"Accuracy at cost," is the corresponding classification accuracy of the detector
when the threshold is set to yield lowest-cost classifications.
Each detector was run ten times on randomly selected training and testing ac-
counts. For comparison, we evaluated DC-1 along with other detection strategies.
ffl Alarm on All represents the policy of alarming on every account every day.
The opposite strategy, Alarm on None, represents the policy of allowing fraud
to go completely unchecked. The latter corresponds to the maximum likelihood
accuracy classification. Note that the cost of Alarm on None does not take
into account the inhibitory effect of fraud detection, without which fraud levels
would likely continue to rise.
ffl Collisions and Velocities is a detector using collision and velocity checks
described in Section 2.2.2. DC-1 was used to learn a threshold on the number of
collision and velocity alarms necessary to generate a fraud alarm. It is surprising
that Collisions and Velocity Checks, commonly thought to be reliable indicators
of cloning, performed poorly in our experiments.
The performance of collisions and velocity checks was originally worse than
reported here because of false alarms. Manual inspection of false alarms revealed
a few synchronization problems; for example, some apparent collisions were
caused when a call was dropped then quickly re-established in a neighboring
cell whose clock did not agree with the first cell's. Some such conditions could
be caught easily, so we patched the detection algorithms to check for them. The
results in this paper are for the improved detectors.
Investigation of confusion matrices revealed that the collision and velocity check
detectors' errors were due almost entirely to false negatives. In other words,
when the detectors fired they were accurate, but many fraud days never exhibited
a collision or velocity check.
ffl Some fraud analysts believe that cloning fraud is usually accompanied by large
jumps in account usage, and sophisticated mining of fraud indicators is probably
unnecessary since most fraud could be caught by looking for sudden increases
in usage. We created the High Usage detector to test this hypothesis. It
generates alarms based only on amount of usage. It is essentially a standard
deviation monitor (see Figure 5) whose rule conditions are always satisfied. The
threshold of this detector was found empirically from training data.
Note that the evaluation of cost for the high usage detector may be overly
optimistic, due to inadequacies in our cost model. In particular, a trained high
usage detector learns to optimally "skim the cream," without regard to the fact
that the errors it makes will involve annoying the best customers. In these cases,
the cost of a false alarm may be much higher than the fixed cost we assigned.
ffl The Best Individual DC-1 Monitor was used as an isolated detector. This
experiment was done to determine the additional benefit of combining monitors.
The best individual monitor was generated from the rule:
Rule learning had discovered (in 119 accounts) that the sudden appearance of
evening calls, in accounts that did not normally make them, was coincident with
cloning fraud. The relatively high accuracy of this one monitor reveals that this
is a valuable fraud indicator.
Our TIME-OF-DAY attribute has five possible values: MORNING, AFTER-
NOON, TWILIGHT, EVENING and NIGHT. Although EVENING is by far
the most frequent value implicated in fraud, rule learning generated fraud rules
involving each of these values. This suggests that any time-of-day change in a
subscriber's normal behavior may be indicative of fraud, though the other shifts
may not be predictive enough to use in a fraud monitor.
ffl The DC-1 detector incorporates all the monitors chosen by feature selection.
We used the weight learning method described earlier to determine the weights
for evidence combining.
ADAPTIVE FRAUD DETECTION 19
ffl The Of The Art") detector incorporates thirteen hand-crafted
profiling methods that were the best individual detectors identified in a previous
study. Each method profiles an account in a different way and produces a
separate alarm. Weights for combining SOTA's alarms were determined by our
weight-tuning algorithm. Details on the detectors comprising are given
in
Appendix
A.
The results in Table 1 demonstrate that DC-1 performs quite well. In fact, DC-
outperforms in terms of both accuracy and cost. 4 In our experiments,
lowest cost classification occurred at an accuracy somewhat lower than optimal. In
other words, some classification accuracy can be sacrificed to decrease cost. More
sophisticated methods could be used to produce cost sensitive classifiers, which
would probably produce better results.
Finally, the monitors of SOTA and DC-1 were combined into a hybrid detector.
The resulting detector exhibits no increase in classification
accuracy, but does show a slight improvement in fraud detection cost.
In this work we have dealt with differing costs of false positive and false negative
errors. However, we have still glossed over some complexity. For a given account,
the only false negative fraud days that incur cost to the company are those prior to
the first true positive alarm. After the fraud is detected, it is terminated. Thus, our
analysis overestimates the costs slightly; a more thorough analysis would eliminate
such days from the computation.
6.3. Fraudulent Call Classifiers
Section 4.1 asserted that account context is important in the rule learning step:
a global example set taken from all accounts would lose information about each
account's normal behavior. In order to test this hypothesis, two such call classifiers
were created from global example sets.
Applying standard classification algorithms to the call data was difficult for several
reasons. First, the description language is very detailed because many thousands
of attribute values appear in the data. Because of this, the volume of data
necessary was relatively large for desktop platforms; the use of fewer than 100,000
examples led to erratic classification behavior. Furthermore, in order to achieve high
coverage of calls, massively disjunctive concept descriptions had to be learned-
there were no simple classifiers that performed well.
After trying many approaches, we chose two classifiers learned in the following
manner. A set of 100,000 training examples was sampled from the accounts set
aside for rule learning. The sample was random, but stratified to achieve a 50/50
class distribution. RL was applied to these data, with parameters set so that it
learned massively disjunctive rule sets. The two classifiers, CC 1054 and CC 1861,
comprise 1054 and 1861 rules, respectively. 5 Each of these rule sets covered around
60% of the calls in a 92212 example test set, with an accuracy of about 75% on the
calls it covered. We observed a clear and graceful tradeoff between accuracy and
coverage: as the coverage increased, the accuracy decreased.
Table
2. A comparison of DC-1 to two global call classifiers
Detector Accuracy (%) Cost (US$) Accuracy at cost (%)
detector 92 \Sigma :5 5403 \Sigma 507 91 \Sigma :8
In order to achieve a competitive comparison, the call classifiers were then given
the advantage of profiling and monitoring. A standard deviation airtime monitor
was created from each. Specifically, instead of instantiating the monitor template
with a single rule, the template was instantiated with the entire classifier. The
resulting monitor profiled each account's normal behavior with respect to the clas-
sifier's output. The call classifier monitor learns if a particular customer's legitimate
behavior typically triggers a positive output. Furthermore, each call classifier
monitor was inserted into the DC-1 weight-training framework in order to find an
"optimal" output threshold for accuracy maximization or cost minimization.
The results are shown in Table 2. The two call classifiers perform similarly, and
outperforms both by a considerable margin. Indeed, we were surprised that
the the call classifier monitors perform as well as they do.
6.4. Shifting Distributions of Fraud
As discussed in Section 2.3, a fraud detection system should be able to adapt to
shifting fraud distributions. For example, each month the relative amount of fraud
changes slightly, and it is rarely possible to predict the level of fraud far into the
future. Thus, unless it is adaptive, even a well-tuned detection system will begin
to lose its edge.
To illustrate this point, we simulated the effects of changing fraud distributions
on detector performance. One DC-1 detector was trained on a fixed distribution of
account-days (80% non-fraud, 20% fraud) and tested against several other distributions
(ranging from 75% to 99% non-fraud account-days), to simulate a well-tuned
but non-adaptive detection system. Another DC-1 detector was allowed to adapt
to each distribution; its LTU threshold was re-trained for minimum predicted cost
on a training set with the new distribution.
The results are shown in Figure 7. The X-axis is the percentage of non-fraud
account-days, and the Y-axis is the cost per account day. This figure shows that
the second detector, which is allowed to adjust itself to each new distribution, is
consistently more cost effective than the fixed detector. This difference increases
as the testing distribution becomes more skewed from the distribution upon which
the fixed detector was trained.
We close by noting that these experiments illustrated changes in fraud detection
performance with respect to fairly simple changes in fraud distribution (changing
ADAPTIVE FRAUD DETECTION 210.20.611.4
Cost
Percentage of non-fraud
Trained for 80/20
Adapted to each distribution
Figure
7. The effects of changing fraud distributions
fraud volume). The patterns of fraud also change, particularly in reponse to detection
methods. Thus the ability to use data mining to discover new patterns
amplifies the benefit of adaptability.
6.5. Discussion
It is difficult to evaluate DC-1 against existing expert systems for fraud detection.
Fraud detection departments carefully protect information about how much fraud
they have and how effective their detection strategies are. Likewise, vendors of fraud
detection systems protect details of their systems' operation that may constitute
trade secrets. Little performance data on fielded systems are available, and what
data do exist are insufficient for careful evaluation.
For these reasons, we evaluated DC-1 against individual known fraud detection
techniques, as well as against a collection of techniques representing the state of
the art as we understand it. Results in the previous sections show that the DC-
detector performs better than the high-usage alarm and the collision/velocity
alarm. DC-1 also out-performs the detector, consisting of a collection of the
best fraud detection techniques known to us, trained by DC-1's evidence combining
method.
22 FAWCETT AND PROVOST
DC-1's framework has three main components, and is more complex than other
approaches. Our experiments were designed not only to evaluate the overall performance
of the system, but also to analyze the contribution of the individual
components. In particular:
ffl The High Usage detector profiles with respect to undifferentiated account usage.
Comparison with DC-1's performance demonstrates the benefit of using rule
learning to uncover specific indicators of fraudulent calls.
ffl The Call Classifier detectors represent rule learning without the benefit of account
context. Comparison with DC-1's performance demonstrates the value
of DC-1's rule generation step, which does preserve account context.
ffl Comparison of DC-1 with the single best individual DC-1 monitor demonstrates
the benefit of combining evidence from multiple monitors.
ffl Experiments with shifting fraud distributions indicate the benefit of making
evidence combination sensitive to fraud distributions.
In each of these cases, the composite DC-1 system out-performed the detector in
which a significant piece was missing. These results suggest that each component
contributes critically to the performance of the entire detector.
Our system uses a Linear Threshold Unit to combine evidence from the monitors.
Other methods of evidence combination are possible. We performed some experiments
with multi-layer neural networks, but found that adding units to a hidden
layer did not improve performance. These networks produced higher training accu-
racies, but lower accuracies on the test sets; such behavior is symptomatic of data
overfitting. Additional experimentation might yield better-performing networks,
but we have not pursued this. It is possible that, because the neural network is
applied far along in the fraud detection process as a means of combining evidence,
non-linear combinations of the evidence contribute little to fraud detection performance
By increasing the expressiveness of the language used for inductive learning, it
may be possible to learn more general patterns of fraudulent behavior, reducing
the need for highly disjunctive class descriptions. The caveats mentioned earlier
about the inability to procure background knowledge for context notwithstanding,
it may be possible to provide additional context by linking call and account data to
geographic and demographic databases. Furthermore, it may be possible to learn
context in one stage, and then apply relational learning approaches in a later stage.
One such possibility is to make use of inductive learners that learn concept descriptions
in first-order logic, such as FOIL (Quinlan 1990) or ILP methods (D-zeroski
1996). Given the appropriate context information, it is possible that more expressive
methods could learn general relational rules such as the following, which
indicates fraud when a user calls from an abnormal location.
Another possibility is to use a learner that forms propositional rules, but can take
advantage of relational background knowledge in the process (Aronis, Provost, and
Buchanan 1996). We have not explored the use of relational learning to any great
extent. We have linked the data to knowledge about the geographic locations of
telephone numbers (Aronis and Provost 1997), which does produce useful generalizations
of the areas to which calls are placed.
Finally, it is important to point out additional limitations to the evaluation of
learned classifiers on real-world problems. For the work described in this paper, we
made use of techniques to deal with skewed class distributions, viz., stratified sam-
pling, and to deal with nonuniform misclassification costs, viz., empirical threshold
adjustment. We also ensured that our evaluation include cost effectiveness in addition
to accuracy. However, because of the complexity and dynamics of real-world
domains, determining precisely the target cost and class distributions is often im-
possible. As noted above, levels of fraud and costs change monthly. It is important
to be able to compare competing classification methods under imprecision in these
distributions. The investigation and design of such techniques is an important area
for future research (Provost and Fawcett 1997).
7. Related Work
Fraud detection is related to intrusion detection, a field of computer security concerned
with detecting attacks on computers and computer networks (Frank 1994;
Sundaram 1996; Kumar 1995). Many forms of intrusion are instances of superimposition
fraud, and thus candidates for systems built with our framework. Within
the intrusion detection community, anomaly detection systems try to characterize
behavior of individual users in order to detect intrusions on that user's account
via anomalies in behavior. Existing anomaly detection systems typically examine
audit trails of user activities, which fill the same roll as cellular call records in DC-
1. DC-1 would be considered a statistical anomaly detection system. Sundaram
An open issue with statistical approaches in particular, and anomaly
detection systems in general, is the selection of measures to monitor and
the choice of metrics. It is not known exactly what the subset of all possible
measures that accurately predicts intrusive activities is.
DC-1's framework directly addresses this problem. Its rule learning step examines
large numbers of fraud episodes in order to generate features (measures) that
distinguish fraudulent from legitimate behavior. To the best of our knowledge, no
published anomaly detection system does this.
Calling card fraud and credit card fraud are other forms of superimposition fraud.
A system built by Yuhas (1993, 1995) examines a set of records representing calling-
card validation queries to identify queries corresponding to fraudulent card usage.
Yuhas transformed the problem into a two-class discrimination task and trained
several machine learning models on the data. All three models had comparable
performance on the test sets. His system must be provided with appropriate fea-
tures; it neither mines the data for fraud indicators nor measures typical customer
usage. Stolfo et al. (1997) address credit card fraud detection. They also transform
the problem into a two-class discrimination task, and do not use customer-specific
information in detection. Specifically, they predict whether individual transactions
are fraudulent. In our domain, we found that DC-1 significantly improves detection
performance over systems that use transaction classification alone. It would
be interesting to determine whether a system like DC-1 could improve performance
on these other superimposition fraud tasks.
Ezawa and Norton (1995, 1996) have addressed the problem of uncollectible debt
in telecommunications services. They use a goal-directed Bayesian network for clas-
sification, which distinguishes customers who are likely to default from those who
are not. As with our work, Ezawa and Norton's work faces problems with unequal
error costs and skewed class distributions. However, it does not face the problem
of determining the typical behavior of individual customers so as to recognize superimposed
fraudulent behavior. Mining the data to derive profiling features is not
necessary.
Because fraud happens over time, methods that deal with time series are relevant
to this work. However, traditional time series analysis (Chatfield 1984; Farnum
and Stanton 1989) in statistics strives either to characterize an entire time series
or to forecast future events in the series. Neither ability is directly useful to fraud
detection.
Hidden Markov Models (Rabiner and Juang 1986; Smyth 1994) are concerned
with distinguishing recurring sequences of states and the transitions between them.
However, fraud detection usually only deals with two states (the "frauded" and
"un-frauded" states) with a single transition between them. Yuhas (1995) mentions
the possibility of recognizing "at home" and "travel" states in order to distinguish
frauded states more effectively. This differentiation could be useful for reducing
false alarms. We are aware of no work pursuing this idea.
8. Conclusion
The detection of cellular cloning fraud is a relatively young field. Fraud behavior
changes frequently as bandits adapt to detection techniques, and fraud detection
systems should be adaptive as well. However, in order to build usage monitors we
must know which aspects of customers' behavior to profile. Historically, determining
such aspects has involved a good deal of manual work, hypothesizing useful
features, building monitors and testing them. Determining how to combine them
involves much trial-and-error as well.
We have presented and demonstrated a framework that automates the process of
generating fraud detectors. This framework is not specific to cloning fraud, but may
be applied to superimposition fraud problems in any domain. Prime candidates are
toll fraud, computer intrusion and credit-card fraud. For example, in credit-card
fraud, data mining may identify locations that arise as new hot-beds of fraud.
The constructor would then incorporate monitors that notice if customers begin to
charge more than they usually do from these specific locations.
Even with relatively simple components, DC-1 is able to exploit mined data to
produce a detector whose performance exceeds that of the state-of-the-art. The
system took several person-months to build; the DC-1 detector took several
CPU-hours. Furthermore, DC-1 can be retrained at any time as necessitated by
the changing environment.
Such adaptability is beneficial in many ways. It can save effort in time-consuming
manual feature identification and detector tuning. It can save on monetary losses
that would occur during the manual identification and tuning process. It can save on
less quantifiable damage done due to higher fraud, such as lower customer opinion
(or even customer churn). Finally, it can act to prevent fraud; a system that quickly
adapts to new patterns will be avoided by bandits in favor of easier prey.
Acknowledgments
This work was sponsored by NYNEX Science and Technology. The views and
conclusions in this paper are those of the authors and do not represent official
policy.
We thank Nicholas Arcuri and the Fraud Control Department at Bell Atlantic
NYNEX Mobile for many useful discussions about cellular fraud and its detection.
We also thank Usama Fayyad, Andrea Danyluk and our anonymous referees for
comments on drafts.
In developing DC-1 we made extensive use of many freely-available software pack-
ages. We wish to thank the generous authors, developers and maintainers of the following
software: The Perl programming language and many of its user-contributed
modules, Donald Tveter's Backprop program, numerous GNU packages including
Emacs and GCC, the GMT geographic information system, Gnuplot and the
processing system.
Appendix
State of the Art (SOTA) detector
The Of The Art") detector incorporates thirteen profiling methods.
Each method profiles an account in a different way and produces a separate alarm.
Some of the monitors were designed by hand, but those that employ weights used
DC-1's weight tuning methods. Specifically, SOTA contains the following monitors:
ffl Two collision detectors, which scan for call collisions of greater than
and
ffl Two velocity detectors, using velocity thresholds of 400 and 600 miles per hour,
respectively.
ffl Three "dialed digits" monitors. We created a dialed digit database as follows.
We scanned through accounts reserved for rule learning and recorded how many
26 FAWCETT AND PROVOST
distinct accounts called a given number both legitimately and in a fraud period.
A phone number was discarded if any legitimate subscriber called it; otherwise,
a count was saved of the number of times it was called from a cloned phone.
Because we did not know an ideal threshold on the number of "hits" required,
we created three monitors each with a different threshold.
ffl Two daily standard deviation usage monitors. One counted the number of calls
on that account-day, one measured total airtime on that account-day.
ffl Four "bad cellsite" indicators. It is commonly believed that certain cellsites
are the locus for higher than average amounts of fraud, so calls originating
from those cellsites might be suspicious. To test this strategy, we tallied the
frauded accounts calling each of the cellsites in our region, then computed the
percentage of frauded accounts using each cellsite. The twenty worst cellsites
were extracted from this list. Using this cellsite list, we created four detectors
that counted hits to these "bad cellsites" each in a different way.
Notes
1. In fact, because many cellular phones belong to large corporate accounts, often even basic user
information such as home town and work location is unavailable.
2. Technically, the numeric value only describes how much above normal the account is. Behavior
levels below normal are not considered.
3. If account-days from a single account appear in both training and testing sets, the performance
evaluation can be deceptively optimistic. Fraudulent behavior within a specific cloning episode
is more similar than fraudulent behavior between episodes. When deployed, the monitors will
be used to search for previously unseen cloning episodes.
4. Earlier work (Fawcett and Provost 1996) reported a higher accuracy for SOTA than is shown
here. Further development of SOTA revealed that some of its component methods, developed
in a prior study, had been built from account data that overlapped data used to test the
methods. When a strict separation was enforced, performance declined slightly to the
figures shown here.
5. To learn CC 1861 (1054) RL tried to cover the example set with rules each of which covered
at least 50 (100) examples and had a Laplace estimate greater than or equal to 0.95, using a
beam width of 5000.
--R
Increasing the efficiency of data mining algorithms with breadth-first marker propagation
Exploiting background knowledge in automated discovery.
The analysis of time series: An introduction (third edition).
Inductive logic programming and knowledge discovery in databases.
Quantitative forecasting methods.
Combining data mining and machine learning for effective user profiling.
Feature selection and extraction.
edu/pub/COAST/kumar-phd-intdet
Learning machines.
Scaling up inductive learning with massive parallelism.
Analysis and visualization of classifier performance: Comparison under imprecise class and cost distributions.
Learning logical definitions from relations.
Generating production rules from decision trees.
IEEE ASSP Magazine 3 (1)
Learning decision lists using homogeneous rules.
Hidden markov models for fault detection in dynamic systems.
JAM: Java agents for meta-learning over distributed databases
OPUS: An efficient admissible algorithm for unordered search.
Recursive estimation and time-series analysis
Foster Provost has been a researcher in machine learning and data mining at NYNEX Science and Technology since
--TR
--CTR
Tom E. Fawcett , Foster Provost, Fraud detection, Handbook of data mining and knowledge discovery, Oxford University Press, Inc., New York, NY, 2002
Jiawei Han , Russ B. Altman , Vipin Kumar , Heikki Mannila , Daryl Pregibon, Emerging scientific applications in data mining, Communications of the ACM, v.45 n.8, August 2002
Zhaohui Zheng , Xiaoyun Wu , Rohini Srihari, Feature selection for text categorization on imbalanced data, ACM SIGKDD Explorations Newsletter, v.6 n.1, June 2004
Taeho Jo , Nathalie Japkowicz, Class imbalances versus small disjuncts, ACM SIGKDD Explorations Newsletter, v.6 n.1, June 2004
Padhraic Smyth, Task and method selection: selection of tasks, Handbook of data mining and knowledge discovery, Oxford University Press, Inc., New York, NY, 2002
Signature-Based Methods for Data Streams, Data Mining and Knowledge Discovery, v.5 n.3, p.167-182, July 2001
Tom Fawcett , Peter A. Flach, A response to Webb and Ting's on the application of ROC analysis to predict classification performance under varying class distributions, Machine Learning, v.58 n.1, p.33-38, January 2005
Saharon Rosset , Uzi Murad , Einat Neumann , Yizhak Idan , Gadi Pinkas, Discovery of fraud rules for telecommunicationschallenges and solutions, Proceedings of the fifth ACM SIGKDD international conference on Knowledge discovery and data mining, p.409-413, August 15-18, 1999, San Diego, California, United States
Tom E. Fawcett, Industry: adaptive fraud detection, Handbook of data mining and knowledge discovery, Oxford University Press, Inc., New York, NY, 2002
Kenji Yamanishi , Jun-ichi Takeuchi, Discovering outlier filtering rules from unlabeled data: combining a supervised learner with an unsupervised learner, Proceedings of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining, p.389-394, August 26-29, 2001, San Francisco, California
Wenke Lee , Salvatore J. Stolfo , Kui W. Mok, Mining in a data-flow environment: experience in network intrusion detection, Proceedings of the fifth ACM SIGKDD international conference on Knowledge discovery and data mining, p.114-124, August 15-18, 1999, San Diego, California, United States
Chris Drummond , Robert C. Holte, Explicitly representing expected cost: an alternative to ROC representation, Proceedings of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.198-207, August 20-23, 2000, Boston, Massachusetts, United States
Nilesh Dalvi , Pedro Domingos , Mausam , Sumit Sanghai , Deepak Verma, Adversarial classification, Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, August 22-25, 2004, Seattle, WA, USA
David Jensen , Matthew Rattigan , Hannah Blau, Information awareness: a prospective technical assessment, Proceedings of the ninth ACM SIGKDD international conference on Knowledge discovery and data mining, August 24-27, 2003, Washington, D.C.
data mining approach for database intrusion detection, Proceedings of the 2004 ACM symposium on Applied computing, March 14-17, 2004, Nicosia, Cyprus
Jennifer Neville , zgr imek , David Jensen , John Komoroske , Kelly Palmer , Henry Goldberg, Using relational knowledge discovery to prevent securities fraud, Proceeding of the eleventh ACM SIGKDD international conference on Knowledge discovery in data mining, August 21-24, 2005, Chicago, Illinois, USA
Michael H. Cahill , Diane Lambert , Jos C. Pinheiro , Don X. Sun, Detecting fraud in the real world, Handbook of massive data sets, Kluwer Academic Publishers, Norwell, MA, 2002
Albert Orriols , Ester Bernad-Mansilla, The class imbalance problem in learning classifier systems: a preliminary study, Proceedings of the 2005 workshops on Genetic and evolutionary computation, June 25-26, 2005, Washington, D.C.
Foster Provost , Ron Kohavi, Guest Editors Introduction: On Applied Research in MachineLearning, Machine Learning, v.30 n.2-3, p.127-132, Feb./ March, 1998
Hang , Honghua Dai, Applying both positive and negative selection to supervised learning for anomaly detection, Proceedings of the 2005 conference on Genetic and evolutionary computation, June 25-29, 2005, Washington DC, USA
Tom Fawcett, ROC graphs with instance-varying costs, Pattern Recognition Letters, v.27 n.8, p.882-891, June 2006
F. Bonchi , F. Giannotti , G. Mainetto , D. Pedreschi, A classification-based methodology for planning audit strategies in fraud detection, Proceedings of the fifth ACM SIGKDD international conference on Knowledge discovery and data mining, p.175-184, August 15-18, 1999, San Diego, California, United States
Tom Fawcett , Foster Provost, Activity monitoring: noticing interesting changes in behavior, Proceedings of the fifth ACM SIGKDD international conference on Knowledge discovery and data mining, p.53-62, August 15-18, 1999, San Diego, California, United States
Mukund Narasimhan , Paul Viola , Michael Shilman, Online decoding of Markov models under latency constraints, Proceedings of the 23rd international conference on Machine learning, p.657-664, June 25-29, 2006, Pittsburgh, Pennsylvania
Wenke Lee , Salvatore J. Stolfo , Kui W. Mok, Adaptive Intrusion Detection: A Data Mining Approach, Artificial Intelligence Review, v.14 n.6, p.533-567, December 1, 2000
Fabrizio Angiulli , Stefano Basta , Clara Pizzuti, Detection and prediction of distance-based outliers, Proceedings of the 2005 ACM symposium on Applied computing, March 13-17, 2005, Santa Fe, New Mexico
Fisher , Daryl Pregibon , Anne Rogers, Hancock: a language for extracting signatures from data streams, Proceedings of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.9-17, August 20-23, 2000, Boston, Massachusetts, United States
Tom Fawcett, An introduction to ROC analysis, Pattern Recognition Letters, v.27 n.8, p.861-874, June 2006
Information mining platforms: an infrastructure for KDD rapid deployment, Proceedings of the fifth ACM SIGKDD international conference on Knowledge discovery and data mining, p.327-331, August 15-18, 1999, San Diego, California, United States
Markus M. Breunig , Hans-Peter Kriegel , Raymond T. Ng , Jrg Sander, LOF: identifying density-based local outliers, ACM SIGMOD Record, v.29 n.2, p.93-104, June 2000
Rakesh Agrawal , Sridhar Rajagopalan , Ramakrishnan Srikant , Yirong Xu, Mining newsgroups using networks arising from social behavior, Proceedings of the 12th international conference on World Wide Web, May 20-24, 2003, Budapest, Hungary
P. Janeja , Vijayalakshmi Atluri , Ahmed Gomaa , Nabil Adam , Christof Bornhoevd , Tao Lin, DM-AMS: employing data mining techniques for alert management, Proceedings of the 2005 national conference on Digital government research, May 15-18, 2005, Atlanta, Georgia
Perlich , Foster Provost, Distribution-based aggregation for relational learning with identifier attributes, Machine Learning, v.62 n.1-2, p.65-105, February 2006
Jennifer Neville , David Jensen, Relational Dependency Networks, The Journal of Machine Learning Research, 8, p.653-692, 5/1/2007
Gang Wu , Edward Y. Chang, KBA: Kernel Boundary Alignment Considering Imbalanced Data Distribution, IEEE Transactions on Knowledge and Data Engineering, v.17 n.6, p.786-795, June 2005
Tamas Abraham, Event sequence mining to develop profiles for computer forensic investigation purposes, Proceedings of the 2006 Australasian workshops on Grid computing and e-research, p.145-153, January 16-19, 2006, Hobart, Tasmania, Australia
Miroslav Kubat , Robert C. Holte , Stan Matwin, Machine Learning for the Detection of Oil Spills in Satellite Radar Images, Machine Learning, v.30 n.2-3, p.195-215, Feb./ March, 1998
Weng-Keen Wong , Andrew Moore , Gregory Cooper , Michael Wagner, What's Strange About Recent Events (WSARE): An Algorithm for the Early Detection of Disease Outbreaks, The Journal of Machine Learning Research, 6, p.1961-1998, 12/1/2005
Fisher , Daryl Pregibon , Anne Rogers , Frederick Smith, Hancock: A language for analyzing transactional data streams, ACM Transactions on Programming Languages and Systems (TOPLAS), v.26 n.2, p.301-338, March 2004
Klaus Julisch , Marc Dacier, Mining intrusion detection alarms for actionable knowledge, Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, July 23-26, 2002, Edmonton, Alberta, Canada
Ting Liu , Andrew W. Moore , Alexander Gray, New Algorithms for Efficient High-Dimensional Nonparametric Classification, The Journal of Machine Learning Research, 7, p.1135-1158, 12/1/2006
Chris Drummond , Robert C. Holte, Cost curves: An improved method for visualizing classifier performance, Machine Learning, v.65 n.1, p.95-130, October 2006
Clifton Phua , Damminda Alahakoon , Vincent Lee, Minority report in fraud detection: classification of skewed data, ACM SIGKDD Explorations Newsletter, v.6 n.1, June 2004
Maarten Van Someren , Tanja Urbani, Applications of machine learning: matching problems to tasks and methods, The Knowledge Engineering Review, v.20 n.4, p.363-402, December 2005
Foster Provost , Tom Fawcett, Robust Classification for Imprecise Environments, Machine Learning, v.42 n.3, p.203-231, March 2001
Sofus A. Macskassy , Foster Provost, Classification in Networked Data: A Toolkit and a Univariate Case Study, The Journal of Machine Learning Research, 8, p.935-983, 5/1/2007
Gediminas Adomavicius , Alexander Tuzhilin, Expert-Driven Validation of Rule-Based User Models in Personalization Applications, Data Mining and Knowledge Discovery, v.5 n.1-2, p.33-58, January-April 2001
Yongwon Lee , Bruce G. Buchanan , John M. Aronis, Knowledge-Based Learning in Exploratory Science: Learning Rules to Predict Rodent Carcinogenicity, Machine Learning, v.30 n.2-3, p.217-240, Feb./ March, 1998
Klaus Julisch, Clustering intrusion detection alarms to support root cause analysis, ACM Transactions on Information and System Security (TISSEC), v.6 n.4, p.443-471, November
Foster Provost , Venkateswarlu Kolluri, Data mining tasks and methods: scalability, Handbook of data mining and knowledge discovery, Oxford University Press, Inc., New York, NY, 2002
Predrag Radivojac , Nitesh V. Chawla , A. Keith Dunker , Zoran Obradovic, Classification and knowledge discovery in protein databases, Journal of Biomedical Informatics, v.37 n.4, p.224-239, August 2004
M. A. Maloof , P. Langley , T. O. Binford , R. Nevatia , S. Sage, Improved Rooftop Detection in Aerial Images with Machine Learning, Machine Learning, v.53 n.1-2, p.157-191, October-November
Jianping Fan , Hangzai Luo , Jing Xiao , Lide Wu, Semantic video classification and feature subset selection under context and concept uncertainty, Proceedings of the 4th ACM/IEEE-CS joint conference on Digital libraries, June 07-11, 2004, Tuscon, AZ, USA
Foster Provost , Venkateswarlu Kolluri, A Survey of Methods for Scaling Up Inductive Algorithms, Data Mining and Knowledge Discovery, v.3 n.2, p.131-169, June 1999
Darse Billings , Lourdes Pea , Jonathan Schaeffer , Duane Szafron, Learning to play strong poker, Machines that learn to play games, Nova Science Publishers, Inc., Commack, NY, 2001 | rule learning;constructive induction;intrusion detection;profiling;fraud detection;applications |
593453 | Parallel Algorithms for Discovery of Association Rules. | Discovery of association rules is an important data mining task. Several parallel and sequential algorithms have been proposed in the literature to solve this problem. Almost all of these algorithms make repeated passes over the database to determine the set of frequent itemsets (a subset of database items), thus incurring high I/O overhead. In the parallel case, most algorithms perform a sum-reduction at the end of each pass to construct the global counts, also incurring high synchronization cost.In this paper we describe new parallel association mining algorithms. The algorithms use novel itemset clustering techniques to approximate the set of potentially maximal frequent itemsets. Once this set has been identified, the algorithms make use of efficient traversal techniques to generate the frequent itemsets contained in each cluster. We propose two clustering schemes based on equivalence classes and maximal hypergraph cliques, and study two lattice traversal techniques based on bottom-up and hybrid search. We use a vertical database layout to cluster related transactions together. The database is also selectively replicated so that the portion of the database needed for the computation of associations is local to each processor. After the initial set-up phase, the algorithms do not need any further communication or synchronization. The algorithms minimize I/O overheads by scanning the local database portion only twice. Once in the set-up phase, and once when processing the itemset clusters. Unlike previous parallel approaches, the algorithms use simple intersection operations to compute frequent itemsets and do not have to maintain or search complex hash structures.Our experimental testbed is a 32-processor DEC Alpha cluster inter-connected by the Memory Channel network. We present results on the performance of our algorithms on various databases, and compare it against a well known parallel algorithm. The best new algorithm outperforms it by an order of magnitude. | Introduction
With recent progress in automated data gathering, and the availability of cheap
storage, a lot of businesses have routinely started collecting massive amounts of
data on various facets of the organization. The eventual goal of this data gathering
is to be able to use this information to gain a competitive edge, by discovering previously
unknown patterns in the data, which can guide the decision making. Such
high-level inference process may provide a host of useful information on customer
groups, buying patterns, stock trends, etc. This process of automatic information
inferencing is commonly known as Knowledge Discovery and Data mining (KDD).
We look at one of the central KDD tasks - mining for associations. Discovery of
association rules is an important problem in database mining. The prototypical
application is the analysis of sales or basket data (Agrawal et al. 1996). Basket
data consists of items bought by a customer along with the transaction identifier.
Besides the retail sales example, association rules have been shown to be useful in
domains such as decision support, telecommunications alarm diagnosis and predic-
tion, university enrollments, etc.
1.1. Problem Statement
The problem of mining associations over basket data was introduced in (Agrawal,
Imielinski, & Swami 1993). It can be formally stated as: Let I be
a set of m distinct attributes, also called items. Each transaction T in the database
D of transactions, has a unique identifier, and contains a set of items, called itemset,
such that T ' I, i.e. each transaction is of the
itemset with k items is called a k-itemset. A subset of length k is called a k-subset.
An itemset is said to have a support s if s% of the transactions in D contain the
itemset. An association rule is an expression A ) B, where itemsets A; B ae I,
and ;. The confidence of the association rule, given as
B)=support(A), is simply the conditional probability that a transaction contains
B, given that it contains A. The data mining task for association rules can be
broken into two steps. The first step consists of finding all frequent itemsets, i.e.,
itemsets that occur in the database with a certain user-specified frequency, called
minimum support. The second step consists of forming conditional implication
rules among the frequent itemsets (Agrawal & Srikant 1994). The second step is
relatively straightforward. Once the support of frequent itemsets is known, rules
of the form are generated for all frequent itemsets
, provided the rules meet a desired confidence. On the other hand the problem
of identifying all frequent itemsets is hard. Given m items, there are potentially
frequent itemsets, which form a lattice of subsets over I. However, only a small
fraction of the whole lattice space is frequent. Discovering the frequent itemsets
requires a lot of computation power, memory and disk I/O, which can only be
provided by parallel computers. Efficient parallel methods are needed to discover
the relevant itemsets, and this is the focus of our paper.
1.2. Related Work
Sequential Algorithms Several algorithms for mining associations have been
proposed in the literature. The Apriori algorithm (Mannila, Toivonen, & Verkamo
1994; Agrawal & Srikant 1994; Agrawal et al. 1996) was shown to have superior
performance to earlier approaches (Agrawal, Imielinski, & Swami 1993; Park, Chen,
et al. 1995; Houtsma & Swami 1995) and forms the core
of almost all of the current algorithms. Apriori uses the downward closure property
of itemset support to prune the itemset lattice - the property that all subsets of a
PARALLEL ASSOCIATION RULES 3
frequent itemset must themselves be frequent. Thus only the frequent k-itemsets
are used to construct candidate 1)-itemsets. A pass over the database is made
at each level to find the frequent itemsets among the candidates. For very large
disk resident databases, these algorithms incur high I/O overhead for scanning it
in each iteration. The Partition algorithm (Savasere, Omiecinski, & Navathe 1995)
minimizes I/O by scanning the database only twice. It partitions the database into
small chunks which can be handled in memory. In the first pass it generates the
set of all potentially frequent itemsets (any itemset locally frequent in a partition),
and in the second pass their global support is obtained. Another way to minimize
the I/O overhead is to work with only a small random sample of the database
(Toivonen 1996; Zaki et al. 1997a). We recently proposed new algorithms (Zaki
et al. 1997b) which scan the database only once, generating all frequent itemsets.
These new algorithms were shown to outperform previous Apriori based approaches
by more than an order of magnitude (Zaki et al. 1997b). The performance gains
are obtained by using effective itemset clustering and lattice traversal techniques.
This paper presents efficient parallel implementations of these new algorithms.
Parallel Algorithms There has been relatively less work in parallel mining of
associations. Three different parallelizations of Apriori on a distributed-memory
machine (IBM SP2) were presented in (Agrawal & Shafer 1996). The Count Distribution
algorithm is a straight-forward parallelization of Apriori. Each processor
generates the partial support of all candidate itemsets from its local database parti-
tion. At the end of each iteration the global supports are generated by exchanging
the partial supports among all the processors. The Data Distribution algorithm
partitions the candidates into disjoint sets, which are assigned to different proces-
sors. However to generate the global support each processor must scan the entire
database (its local partition, and all the remote partitions) in all iterations. It
thus suffers from huge communication overhead. The Candidate Distribution algorithm
also partitions the candidates, but it selectively replicates the database,
so that each processor proceeds independently. The local database portion is still
scanned in every iteration. Count Distribution was shown to have superior performance
among these three algorithms (Agrawal & Shafer 1996). Other parallel
algorithms improving upon these ideas in terms of communication efficiency, or aggregate
memory utilization have also been proposed (Cheung et al. 1996b; 1996a;
Han, Karypis, & Kumar 1997). The PDM algorithm (Park, Chen, & Yu 1995b)
presents a parallelization of the DHP algorithm (Park, Chen, & Yu 1995a). How-
ever, PDM performs worse than Count Distribution (Agrawal & Shafer 1996). In
recent work we presented the CCPD parallel algorithm for shared-memory machines
(Zaki et al. 1996). It is similar in spirit to Count Distribution. The candidate itemsets
are generated in parallel and are stored in a hash structure which is shared
among all the processors. Each processor then scans its logical partition of the
database and atomically updates the counts of candidates in the shared hash tree.
CCPD uses additional optimization such as candidate balancing, hash-tree balancing
and short-circuited subset counting to speed up performance (Zaki et al. 1996).
We also presented a new parallel algorithm Eclat (Zaki, Parthasarathy, & Li 1997)
on a DEC Alpha Cluster. Eclat uses the equivalence class itemset clustering scheme
along with a bottom-up lattice traversal. It was shown to outperform Count Distribution
by more than an order of magnitude. This paper will present parallelization
results on new clustering and traversal techniques.
1.3. Contribution
The main limitation of all the current parallel algorithms (Park, Chen, & Yu 1995b;
Zaki et al. 1996; Agrawal & Shafer 1996; Cheung et al. 1996b; 1996a) is that
they make repeated passes over the disk-resident database partition, incurring high
I/O overhead. Furthermore, the schemes involve exchanging either the counts of
candidates or the remote database partitions during each iteration. This results in
high communication and synchronization overhead. The previous algorithms also
use complicated hash structures which entails additional overhead in maintaining
and searching them, and typically suffer from poor cache locality (Parthasarathy,
Our work contrasts to these approaches in several ways. We present new parallel
algorithms for fast discovery of association rules based on our ideas in (Zaki,
Parthasarathy, & Li 1997; Zaki et al. 1997b). The new parallel algorithms are characterized
in terms of the clustering information used to group related itemsets, and
in terms of the lattice traversal schemes used to search for frequent itemsets. We
propose two clustering schemes based on equivalence classes and maximal uniform
hypergraph cliques, and we utilize two lattice traversal schemes, based on bottom-up
and hybrid top-down/bottom-up search. The algorithms also use a different
database layout which clusters related transactions together, and the work is distributed
among the processors in such a way that each processor can compute the
frequent itemsets independently, using simple intersection operations. An interesting
benefit of using simple intersections is that the algorithms we propose can be
implemented directly on general purpose database systems (Holsheimer et al. 1995;
Houtsma & Swami 1995). These techniques eliminate the need for synchronization
after the initial set-up phase, and enable us to scan the database only two times,
drastically cutting down the I/O overhead. Our experimental testbed is a 32-
processor DEC Alpha SMP cluster (8 hosts, 4 processors/host) inter-connected by
the Memory Channel (Gillett 1996) network. The new parallel algorithms are also
novel in that they utilize this machine configuration information, i.e., they assume a
distributed-memory model across the 8 cluster hosts, but assume a shared-memory
model for the 4 processors on each host. We experimentally show that our new algorithms
outperform the well known Count Distribution algorithm. We also present
extensive performance results on their speedup, sizeup, communication cost and
memory usage.
The rest of the paper is organized as follows. We begin by providing more details
on the sequential Apriori algorithm. Section 3 describes some of the previous
Apriori based parallel algorithms. We then present the main ideas behind our
new algorithms - the itemset and transaction clustering, and the lattice traversal
techniques, in section 4. Section 5 describes the design and implementation of the
PARALLEL ASSOCIATION RULES 5
new parallel algorithms. Our experimental study is presented in section 6, and our
conclusions in section 7.
2. Sequential Apriori Algorithm
In this section we will briefly describe the Apriori algorithm (Agrawal et al. 1996),
since it forms the core of all parallel algorithms (Agrawal & Shafer 1996; Cheung
et al. 1996b; 1996a; Han, Karypis, & Kumar 1997; Park, Chen, & Yu 1995b;
Zaki et al. 1996). Apriori uses the downward closure property of itemset support
that any subset of a frequent itemset must also be frequent. Thus during each
iteration of the algorithm only the itemsets found to be frequent in the previous
iteration are used to generate a new candidate set. A pruning step eliminates any
candidate at least one of whose subsets is not frequent. The complete algorithm
is shown in table 1. It has three main steps. The candidates for the k-th pass
are generated by joining L k\Gamma1 with itself, which can be expressed as: C
and denotes the i-th item, and X [i : j] denotes
items at index i through j in itemset X . For example, let L
BC, BD, BE, DEg. Then C
BDEg.
Table
1. The Apriori Algorithm
1. ffrequent 1-itemsets
2. for
3.
4. for all transactions t 2 D
5. for all k-subsets s of t
7.
8. Set of all frequent itemsets =
Before inserting an itemset into C k , Apriori tests whether all its
are frequent. This pruning step can eliminate a lot of unnecessary candidates. The
candidates, C k , are stored in a hash tree to facilitate fast support counting. An
internal node of the hash tree at depth d contains a hash table whose cells point
to nodes at depth d + 1. All the itemsets are stored in the leaves. The insertion
procedure starts at the root, and hashing on successive items, inserts a candidate
in a leaf. For counting C k , for each transaction in the database, all k-subsets of
the transaction are generated in lexicographical order. Each subset is searched in
the hash tree, and the count of the candidate incremented if it matches the subset.
This is the most compute intensive step of the algorithm. The last step forms L k
by selecting itemsets meeting the minimum support criterion. For details on the
6 ZAKI, PARTHASARATHY, OGIHARA AND LI
performance characteristics of Apriori we refer the reader to (Agrawal & Srikant
1994).
3. Apriori-based Parallel Algorithms
In this section we will look at some previous parallel algorithms. These algorithms
assume that the database is partitioned among all the processors in equal-sized
blocks, which reside on the local disk of each processor.
The Count Distribution algorithm (Agrawal & Shafer 1996) is a simple parallelization
of Apriori. All processors generate the entire candidate hash tree from
Each processor can thus independently get partial supports of the candidates
from its local database partition. This is followed by a sum-reduction to obtain the
global counts. Note that only the partial counts need to be communicated, rather
than merging different hash trees, since each processor has a copy of the entire
tree. Once the global L k has been determined each processor builds C k+1 in par-
allel, and repeats the process until all frequent itemsets are found. This simple
algorithm minimizes communication since only the counts are exchanged among
the processors. However, since the entire hash tree is replicated on each processor,
it doesn't utilize the aggregate memory efficiently. The implementation of Count
Distribution used for comparison in our experiments differs slightly from the above
description and is optimized for our testbed configuration. Only one copy of the
hash tree resides on each of the 8 hosts in our cluster. All the 4 processors on each
host share this hash tree. Each processor still has its own local database portion
and uses a local array to gather the local candidate support. The sum-reduction
is accomplished in two steps. The first step performs the reduction only among
the local processors on each host. The second step performs the reduction among
the hosts. We also utilize some optimization techniques such as hash-tree balancing
and short-circuited subset counting (Zaki et al. 1996) to further improve the
performance of Count Distribution.
The Data Distribution algorithm (Agrawal & Shafer 1996) was designed to utilize
the total system memory by generating disjoint candidate sets on each processor.
However to generate the global support each processor must scan the entire database
(its local partition, and all the remote partitions) in all iterations. It thus suffers
from high communication overhead, and performs very poorly when compared to
Count Distribution (Agrawal & Shafer 1996).
The Candidate Distribution algorithm (Agrawal & Shafer 1996) uses a property
of frequent itemsets (Agrawal & Shafer 1996; Zaki et al. 1996) to partition the
candidates during iteration l, so that each processor can generate disjoint candidates
independent of other processors. At the same time the database is selectively
replicated so that a processor can generate global counts independently. The choice
of the redistribution pass involves a trade-off between decoupling processor dependence
as soon as possible and waiting until sufficient load balance can be achieved.
In their experiments the repartitioning was done in the fourth pass. After this the
only dependence a processor has on other processors is for pruning the candidates.
Each processor asynchronously broadcasts the local frequent set to other processors
PARALLEL ASSOCIATION RULES 7
during each iteration. This pruning information is used if it arrives in time, otherwise
it is used in the next iteration. Note that each processor must still scan its
local data once per iteration. Even though it uses problem-specific information, it
performs worse than Count Distribution (Agrawal & Shafer 1996). Candidate Distribution
pays the cost of redistributing the database, and it then scans the local
database partition repeatedly, which will usually be larger than jjDjj=P .
4. Efficient Clustering and Traversal Techniques
In this section we present our techniques to cluster related frequent itemsets together
using equivalence classes and maximal uniform hypergraph cliques. We then
describe the bottom-up and hybrid itemset lattice traversal techniques. We also
present a technique to cluster related transactions together by using the vertical
database layout. This layout is able to better exploit the proposed clustering and
traversal schemes. It also facilitates fast itemset support counting using simple
intersections, rather than maintaining and searching complex data structures.
4.1. Itemset Clustering
Lattice of Subsets of {1,2,3,4,5}
Border of
Frequent Itemsets
Lattice of Subsets of {1,2,3,4}
Lattice of Subsets of {3,4,5}
Sublattices Induced by Maximal Itemsets
Figure
1. Lattice of Subsets and Maximal Itemset Induced Sub-lattices
We will motivate the need for itemset clustering by means of an example. Consider
the lattice of subsets of the set f1; 2; 3; 4; 5g, shown in figure 1 (the empty set has
been omitted in all figures). The frequent itemsets are shown with dashed circles
and the two maximal frequent itemsets (a frequent itemset is maximal if it is not a
proper subset of any other frequent itemset) are shown with the bold circles. Due
to the downward closure property of itemset support - the fact that all subsets of a
frequent itemset must be frequent - the frequent itemsets form a border, such that
all frequent itemsets lie below the border, while all infrequent itemsets lie above it.
The border of frequent itemsets is shown with a bold line in figure 1. An optimal
association mining algorithm will only enumerate and test the frequent itemsets,
i.e., the algorithm must efficiently determine the structure of the border. This
structure is precisely determined by the maximal frequent itemsets. The border
corresponds to the sub-lattices induced by the maximal frequent itemsets. These
sub-lattices are shown in figure 1.
Given the knowledge of the maximal frequent itemsets we can design an efficient
algorithm that simply gathers their support and the support of all their subsets in
just a single database pass. In general we cannot precisely determine the maximal
itemsets in the intermediate steps of the algorithm. However we can approximate
this set. Our itemset clustering techniques are designed to group items together so
that we obtain supersets of the maximal frequent itemsets - the potential maximal
frequent itemsets. Below we present two schemes to generate the set of potential
maximal itemsets based on equivalence classes and maximal uniform hypergraph
cliques. These two techniques represent a trade-off in the precision of the potential
maximal itemsets generated, and the computation cost. The hypergraph clique
approach gives more precise information at higher computation cost, while the
equivalence class approach sacrifices quality for a lower computation cost.
4.1.1. Equivalence Class Clustering Let's reconsider the candidate generation
step of Apriori. Let L
f ABC, ABD, ABE, ACD, ACE, ADE, BCD, BCE, BDEg. Assuming that L k\Gamma1
is lexicographically sorted, we can partition the itemsets in L k\Gamma1 into equivalence
classes based on their common prefixes, i.e., the equivalence class
a 2 L k\Gamma2 , is given as:
Candidate k-itemsets can simply be generated from itemsets within a class by
joining all
pairs, with the the class identifier as the prefix. For our example
we obtain the equivalence classes:
fEg. We observe that itemsets produced by
the equivalence class [A], namely those in the set fABC, ABD, ABE, ACD, ACE,
ADEg, are independent of those produced by the class [B] (the set fBCD, BCE,
BDEg). Any class with only 1 member can be eliminated since no candidates can be
generated from it. Thus we can discard the class [D]. This idea of partitioning L
into equivalence classes was independently proposed in (Agrawal & Shafer 1996;
Zaki et al. 1996). The equivalence partitioning was used in (Zaki et al. 1996) to
parallelize the candidate generation step in CCPD. It was also used in Candidate
Distribution (Agrawal & Shafer 1996) to partition the candidates into disjoint sets.
PARALLEL ASSOCIATION RULES 9
At any intermediate step of the algorithm when the set of frequent itemsets, L k for
- 2, has been determined we can generate the set of potential maximal frequent
itemsets from L k . Note that for with the entire item universe as the
maximal itemset. However, For any k - 2, we can extract more precise knowledge
about the association among the items. The larger the value of k the more precise
the clustering. For example, figure 2 shows the equivalence classes obtained for
the instance where 2. Each equivalence class is a potential maximal frequent
itemset. For example, the class [1], generates the maximal itemset 12345678.
4.1.2. Maximal Uniform Hypergraph Clique Clustering Let the set of items I denote
the vertex set. A hypergraph (Berge 1989) on I is a family
of edges or subsets of I, such that E i 6= ;, and [ n
simple hypergraph
is a hypergraph such simple graph is a simple hyper-graph
each of whose edges has cardinality 2. The maximum edge cardinality is
called the rank, j. If all edges have the same cardinality, then H
is called a uniform hypergraph. A simple uniform hypergraph of rank r is called a
r-uniform hypergraph. For a subset X ae I, the sub-hypergraph induced by X is
given as, ng. A r-uniform complete hypergraph with m
vertices, denoted as K r
, consists of all the r-subsets of I. A r-uniform complete
sub-hypergraph is called a r-uniform hypergraph clique. A hypergraph clique is
maximal if it is not contained in any other clique. For hypergraphs of rank 2, this
corresponds to the familiar concept of maximal cliques in a graph.
Given the set of frequent itemsets L k , it is possible to further refine the clustering
process producing a smaller set of potentially maximal frequent itemsets. The
observation used is that given any frequent m-itemset, for m ? k, all its k-subsets
must be frequent. In graph-theoretic terms, if each item is a vertex in
the hypergraph, and each k-subset an edge, then the frequent m-itemset must
form a k-uniform hypergraph clique. Furthermore, the set of maximal hypergraph
cliques represents an approximation or upper-bound on the set of maximal potential
frequent itemsets. All the "true" maximal frequent itemsets are contained in the
vertex set of the maximal cliques, as stated formally in the lemma below.
HLk be the k-uniform hypergraph with vertex set I, and edge set L k .
Let C be the set of maximal hypergraph cliques in H, i.e.,
let M be the set of vertex sets of the cliques in C. Then for all maximal frequent
itemsets f , 9t 2 M , such that f ' t.
An example of uniform hypergraph clique clustering is given in figure 2. The
example is for the case of L 2 , and thus corresponds to an instance of the general
clustering technique, which reduces to the case of finding maximal cliques
in regular graphs. The figure shows all the equivalence classes, and the maximal
cliques within them. It also shows the graph for class 1, and the maximal
cliques in it. It can be seen immediately the the clique clustering is more accurate
than equivalence class clustering. For example, while equivalence class clustering
produced the potential maximal frequent itemset 12345678, the hypergraph clique
12, 13, 14, 15, 16, 17, 18, 23, 25, 27, 28, 34, 35, 36, 45, 46, 56, 58, 68, 78
Frequent 2-Itemsets
Equivalence Class Graph
Maximal Cliques For Equivalence Class 1
Maximal Cliques per Class
Equivalence Classes
Figure
2. Equivalence Class and Uniform Hypergraph Clique Clustering
clustering produces a more refined set f1235; 1258; 1278; 13456; 1568g for equivalence
class [1]. The maximal cliques are discovered using a dynamic programming
algorithm. For a class [x], and y 2[x], y is said to cover the subset of [x], given
by For each class C, we first identify its covering set, given as
fy 2 Cjcov(y) 6= ;; and cov(y) 6' cov(z); for any z 2 C; z ! yg. We recursively
generate the maximal cliques for elements in the covering set for each class. Each
maximal clique from the covering set is prefixed with the class identifier (eliminat-
ing any duplicates) to obtain the maximal cliques for the current class (see (Zaki
et al. 1997c) for details). For general graphs the maximal clique decision problem
is NP-Complete (Garey & Johnson 1979). However, the equivalence class graph
is usually sparse and the maximal cliques can be enumerated efficiently. As the
edge density increases the clique based approaches may suffer. Some of the factors
affecting the edge density include decreasing support and increasing transaction
size. The effect of these parameters was presented in (Zaki et al. 1997b).
PARALLEL ASSOCIATION RULES 11
4.2. Lattice Traversal
The equivalence class and uniform hypergraph clique clustering schemes generate
the set of potential maximal frequent itemsets. Each such potential maximal item-set
induces a sub-lattice of the lattice of subsets of database items I. We now
have to traverse each of these sub-lattices to determine the "true" frequent item-
sets. Our goal is to devise efficient schemes to precisely determine the structure of
the border of frequent itemsets. Different ways of expanding the frequent itemset
border in the lattice space are possible. Below we present two schemes to traverse
the sublattices. One is a purely bottom-up approach, while the other is a hybrid
top-down/bottom-up scheme.16 13 14 12
Support
Potential Maximal Frequent Itemset (123456)
Sort Itemsets by Support
Top-Down Phase
True Maximal Frequent Itemsets: 1235, 13456
HYBRID TRAVERSAL
Figure
3. Bottom-up and Hybrid Lattice Traversal
4.2.1. Bottom-up Lattice Traversal Consider the example shown in figure 3. It
shows a particular instance of the clustering schemes which uses L 2 to generate the
set of potential maximal itemsets. Let's assume that for equivalence class [1], there
is only one potential maximal itemset, 123456, while 1235 and 13456 are "true"
maximal frequent itemsets. The supports of 2-itemsets in this class are also shown.
Like figure 1, the dashed circles represent the frequent sets, the bold circles the
maximal such itemsets, and the boxes denote equivalence classes. The potential
maximal itemset 123456 forms a lattice over the elements of equivalence class
16g. We need to traverse this lattice to determine the "true" frequent
itemsets.
A pure bottom-up lattice traversal proceeds in a breadth-first manner generating
frequent itemsets of length k, before generating itemsets of level k 1, i.e., at each
intermediate step we determine the border of frequent k-itemsets. For example, all
pairs of elements of [1] are joined to produce new equivalence classes of frequent
3-itemsets, namely (producing the maximal itemset 1235),
6g. The next step yields the frequent class,
producing the maximal itemset 13456). Most current algorithms use this approach.
For example, the process of generating C k from L k\Gamma1 used in Apriori (Agrawal et
al. 1996), and related algorithms (Savasere, Omiecinski, & Navathe 1995; Park,
1995a), is a pure bottom-up exploration of the lattice space. Since this
is a bottom-up approach all the frequent subsets of the maximal frequent itemsets
are generated in intermediate steps of the traversal.
4.2.2. Hybrid Top-down/Bottom-up Search The bottom-up approach doesn't
make full use of the clustering information. While it uses the cluster to restrict
the search space, it may generate spurious candidates in the intermediate steps,
since the fact that all subsets of an itemset are frequent doesn't guarantee that the
itemset is frequent. For example, the itemsets 124 and 126 in figure 3 are infre-
quent, even though 12, 14, and 16 are frequent. We can envision other traversal
techniques which quickly identify the set of true maximal frequent itemsets. Once
this set is known we can either choose to stop at this point if we are interested in
only the maximal itemsets, or we can gather the support of all their subsets as well
(all subsets are known to be frequent by definition). In this paper we will restrict
our attention to only identifying the maximal frequent subsets.
One possible approach is to perform a pure top-down traversal on each cluster
or sublattice. This scheme may be thought of as trying to determine the border of
infrequent itemsets, by starting at the top element of the lattice and working our
way down. For example, consider the potential maximal frequent itemset 123456
in figure 3. If it turns out to be frequent we are done. But in this case it is
not frequent, so we then have to check whether each of its 5-subsets is frequent.
At any step, if a k-subset turns out to be frequent, we need not check any of its
subsets. This approach doesn't work well in practice, since the clusters are only an
approximation of the maximal frequent itemsets, and a lot of infrequent supersets
of the "true" maximal frequent itemsets may be generated. In our example we
would generate 10 infrequent itemsets - 123456, 12345, 12346, 12356, 12456, 1234,
1245, 1236, 1246, and 1256 - using the pure top-down scheme, instead of only two
infrequent itemsets generated in the pure bottom-up approach - 124, and 126. We
therefore propose a hybrid top-down and bottom-up approach that works well in
practice.
PARALLEL ASSOCIATION RULES 13
The basic idea behind the hybrid approach is to quickly determine the "true"
maximal itemsets, by starting with a single element from a cluster of frequent k-
itemsets, and extending this by one more itemset till we generate an infrequent
itemset. This comprises the top-down phase. In the bottom-up phase, the remaining
elements are combined with the elements in the first set to generate all the
additional frequent itemsets. An important consideration in the top-down phase is
to determine which elements of the cluster should be combined. In our approach we
first sort the itemsets in the cluster in descending order of their support. We start
with the element with maximum support, and extend it with the next element in
the sorted order. This approach is based on the intuition that the larger the support
the more the likely is the itemset to be a part of a larger itemset. Figure 3 shows an
example of the hybrid scheme on a cluster of 2-itemsets. We sort the 2-itemsets in
decreasing order of support, intersecting 16 and 15 to produce 156. This is extended
to 1356 by joining 156 with 13, and then to 13456, and finally we find that 123456
is infrequent. The only remaining element is 12. We simply join this with each of
the other elements producing the frequent itemset class [12], which generates the
other maximal itemset 1235. The bottom-up and hybrid approaches are contrasted
in figure 3, and the pseudo-code for both schemes is shown in table 3.
4.3. Transaction Clustering: Database Layout
The KDD process consists of various steps (Fayyad, Piatetsky-Shapiro, & Smyth
1996). The initial step consists of creating the target dataset by focusing on certain
attributes or via data samples. The database creation may require removing unnecessary
information and supplying missing data, and transformation techniques for
data reduction and projection. The user must then determine the data mining task
and choose a suitable algorithm, for example, the discovery of association rules.
The next step involves interpreting the discovered associations, possibly looping
back to any of the previous steps, to discover more understandable patterns. An
important consideration in the data preprocessing step is the final representation
or data layout of the dataset. Another issue is whether some preliminary invariant
information can be gleaned during this process. There are two possible layouts of
the target dataset for association mining - the horizontal and the vertical layout.
4.3.1. Horizontal Data Layout This is the format standardly used in the literature
(see e.g., (Agrawal & Srikant 1994; Mannila, Toivonen, & Verkamo 1994;
Agrawal et al. 1996)). Here a dataset consists of a list of transactions. Each
transaction has a transaction identifier (TID) followed by a list of items in that
transaction. This format imposes some computation overhead during the support
counting step. In particular, for each transaction of average length l, during iteration
k, we have to generate and test whether all \Gamma l
k-subsets of the transaction
are contained in C k . To perform fast subset checking the candidates are stored in a
complex hash-tree data structure. Searching for the relevant candidates thus adds
additional computation overhead. Furthermore, the horizontal layout forces us to
14 ZAKI, PARTHASARATHY, OGIHARA AND LI
ITEMS
TIDS
ITEMS
TIDS
Horizontal Layout Vertical Layout
Figure
4. Horizontal and Vertical Database Layout
scan the entire database or the local partition once in each iteration. Both Count
and Candidate Distribution must pay the extra overhead entailed by using the
horizontal layout. Furthermore, the horizontal layout seems suitable only for the
bottom-up exploration of the frequent border. It appears to be extremely complicated
to implement the hybrid approach using the horizontal format. An alternative
approach is to store all the potential maximal itemsets and all their subsets in a
data structure with fast look-up, (e.g., hash-trees (Agrawal et al. 1996)). We can
then gather their support in a single database scan. We plan to explore this in a
later paper.
4.3.2. Vertical Data Layout In the vertical (or inverted) layout (also called the
decomposed storage structure (Holsheimer et al. 1995)), a dataset consists of a list
of items, with each item followed by its tid-list - the list of all the transactions
identifiers containing the item. An example of successful use of this layout can
be found in (Holsheimer et al. 1995; Savasere, Omiecinski, & Navathe 1995; Zaki,
Parthasarathy, & Li 1997; Zaki et al. 1997b). The vertical layout doesn't suffer from
any of the overheads described for the horizontal layout above due to the following
three reasons: First, if the tid-list is sorted in increasing order, then the support of a
candidate k-itemset can be computed by simply intersecting the tid-lists of any two
data structures need to be maintained. We don't
have to generate all the k-subsets of a transaction or perform the search operations
on the hash tree. Second, the tid-lists contain all relevant information about an
itemset, and enable us to avoid scanning the whole database to compute the support
count of an itemset. This layout can therefore take advantage of the principle of
locality. All frequent itemsets from a cluster of itemsets can be generated, before
PARALLEL ASSOCIATION RULES 15
moving on to the next cluster. Third, the larger the itemset, the shorter the tid-
lists, which is practically always true. This results in faster intersections. For
example, consider figure 4, which contrasts the horizontal and the vertical layout
(for simplicity, we have shown the null elements, while in reality sparse storage is
used). The tid-list of A, is given as 4g. Then
the tid-list of AB is simply, T 4g. We can immediately determine the
support by counting the number of elements in the tid-list. If it meets the minimum
support criterion, we insert AB in L 2 . The intersections among the tid-lists can be
performed faster by utilizing the minimum support value. For example let's assume
that the minimum support is 100, and we are intersecting two itemsets - AB with
support 119 and AC with support 200. We can stop the intersection the moment
we have 20 mismatches in AB, since the support of ABC is bounded above by 119.
We use this optimization, called short-circuited intersection, for fast joins.
The inverted layout, however, has a drawback. Examination of small itemsets
tends to be costlier than when the horizontal layout is employed. This is because
tid-lists of small itemsets provide little information about the association among
items. In particular, no such information is present in the tid-lists for 1-itemsets.
For example, a database with 1,000,000 (1M) transactions, 1,000 frequent items,
and an average of 10 items per transaction has tid-lists of average size 10,000.
To find frequent 2-itemsets we have to intersect each pair of items, which requires
operations. On the other hand, in the horizontal format we
simply need to form all pairs of the items appearing in a transaction and increment
their count, requiring only \Gamma
There are a number of possible solutions to this problem:
1. To use a preprocessing step to gather the occurrence count of all 2-itemsets.
Since this information is invariant, it has to be performed once during the
lifetime of the database, and the cost can be amortized over the number of
times the data is mined. This information can also be incrementally updated
as the database changes over time.
2. To store the counts of only those 2-itemsets with support greater than a user
specified lower bound, thus requiring less storage than the first approach.
3. To use a small sample that would fit in memory, and determine a superset of the
frequent 2-itemsets, L 2 , by lowering the minimum support, and using simple
intersections on the sampled tid-lists. Sampling experiments (Toivonen 1996;
Zaki et al. 1997a) indicate that this is a feasible approach. Once the superset
has been determined we can easily verify the "true" frequent itemsets among
them.
Our current implementation uses the pre-processing approach due to its simplicity.
We plan to implement the sampling approach in a later paper. The solutions
represent different trade-offs. The sampling approach generates L 2 on-the-fly with
an extra database pass, while the pre-processing approach requires extra storage.
For m items, count storage requires O(m 2 ) disk space, which can be quite large for
large values of m. However, for used in our experiments this adds only
Memory Channel
Address
Receive
Transmit
Transmit
Receive
Receive
Figure
5. Memory Channel space. The lined region is mapped for both transmit and receive
on node 1 and for receive on node 2. The gray region is mapped for receive on node 1 and for
transmit on node 2.
a very small extra storage overhead. Using the second approach can further reduce
the storage requirements, but may require an extra scan if the lower bound on
support is changed. Note also that the database itself requires the same amount of
memory in both the horizontal and vertical formats (this is obvious from figure 4).
5. New Parallel Algorithms: Design and Implementation
5.1. The DEC Memory Channel
Digital's Memory Channel (MC) network (Gillett 1996) provides applications with
a global address space using memory mapped regions. A region can be mapped
into a process' address space for transmit, receive, or both. Virtual addresses for
regions map into physical addresses located in I/O space on the MC's PCI
adapter. Virtual addresses for receive regions map into physical RAM. Writes into
transmit regions are collected by the source MC adapter, forwarded to destination
MC adapters through a hub, and transferred via DMA to receive regions with the
same global identifier (see figure 5). Regions within a node can be shared across
different processors on that node. Writes originating on a given node will be sent
to receive regions on that same node only if loop-back has been enabled for the
region. We do not use the loop-back feature. We use write-doubling instead, where
each processor writes to its receive region and then to its transmit region, so that
processes on a host can see modification made by other processes on the same host.
Though we pay the cost of double writing, we reduce the amount of messages to
the hub.
In our system unicast and multicast process-to-process writes have a latency of 5.2
-s, with per-link transfer bandwidths of MB/s. MC peak aggregate bandwidth
is also about 32 MB/s. Memory Channel guarantees write ordering and local cache
PARALLEL ASSOCIATION RULES 17
coherence. Two writes issued to the same transmit region (even on different nodes)
will appear in the same order in every receive region. When a write appears in a
receive region it invalidates any locally cached copies of its line.
5.2. Initial Database Partitioning
We assume that the database is in the vertical format, and that we have the support
counts of all 2-itemsets available locally on each host. We further assume that the
database of tid-lists is initially partitioned among all the hosts. This partitioning
is done off-line, similar to the assumption made in Count Distribution (Agrawal &
Shafer 1996). The tid-lists are partitioned so that the total length of all tid-lists in
the local portions on each host are roughly equal. This is achieved using a greedy
algorithm. The items are sorted on their support, and the next item is assigned to
the least loaded host. Note that the entire tid-list for an item resides on a host.
Figure
6 shows the original database, and the resultant initial partition on two
processors.
5.3. New Parallel Algorithms
We present four new parallel algorithms, depending on the clustering and lattice
traversal scheme used:
ffl Par-Eclat: uses equivalence class clustering and bottom-up lattice traversal.
ffl Par-MaxEclat: uses equivalence class clustering and hybrid traversal.
ffl Par-Clique: uses maximal uniform hypergraph clique clustering and bottom-up
lattice traversal.
ffl Par-MaxClique: uses maximal uniform hypergraph clique clustering and hybrid
traversal.
The algorithms using the bottom-up lattice traversal, namely Par-Eclat and Par-
Clique, generate all frequent itemsets, while those using the hybrid traversal, namely
Par-MaxEclat and Par-MaxClique, generate only the maximal frequent itemsets. As
noted earlier, it is trivial to modify the hybrid traversal algorithms to generate all
frequent itemsets. But here we are interested in examining the benefits of quickly
identifying the maximal elements for the hybrid scheme. Below we present the parallel
design and implementation issues, which are applicable to all four algorithms.
5.4. Parallel Design and Implementation
The new algorithms overcome the shortcomings of the Count and Candidate Distribution
algorithms. They utilize the aggregate memory of the system by partitioning
the itemset clusters into disjoint sets, which are assigned to different processors. The
dependence among the processors is decoupled right in the beginning so that the
Equivalence Classes Equivalence Class Weights
[1]: 6
Equivalence Class Assignment
P1: [2], [3]
Partitioned Database
Original Database: Tid-Lists After Tid-List Communication
Sublattices for P1: [2], [3]
Sublattice for P0: [1]
Sublattice Induced by L2
Figure
6. Database Partitioning and Cluster Scheduling
PARALLEL ASSOCIATION RULES 19
Table
2. Pseudo-code for the New Parallel Algorithms
1. Begin ParAssociation:
2. /* Initialization Phase*/
3. Form L2 from 2-itemset support counts
4. Generate Clusters from L2 using:
5. Equivalence Classes or Uniform Hypergraph Cliques
6. Partition Clusters among the processors P
7. Scan local database partition
8. Transmit relevant tid-lists to other processors
9. Receive tid-lists from other processors
10. /* Asynchronous Phase */
11. for each assigned Cluster, C2
12. Compute Frequent Itemsets: Bottom-Up(C2) or Hybrid(C2)
13. /* Final Reduction Phase*/
14. Aggregate Results and Output Associations
15. End ParAssociation
redistribution cost can be amortized by the later iterations. Since each processor
can proceed independently, there is no costly synchronization at the end of each
iteration. Furthermore the new algorithms use the vertical database layout which
clusters all relevant information in an itemset's tid-list. Each processor computes
all the frequent itemsets from one cluster before proceeding to the next. The local
database partition is scanned only once. In contrast Candidate Distribution must
scan it once in each iteration. These algorithms don't pay the extra computation
overhead of building or searching complex data structures, nor do they have to
generate all the subsets of each transaction. As the intersection is performed an
itemset can immediately be inserted in L k . Notice that the tid-lists also automatically
prune irrelevant transactions. As the itemset size increases, the size of the
tid-list decreases, resulting in very fast intersections. There are two distinct phases
in the algorithms. The initialization phase, responsible for communicating the tid-
lists among the processors, and the asynchronous phase, which generates frequent
itemsets. The pseudo-code for the new algorithms is shown in table 2.
5.4.1. Initialization Phase The initialization step consists of three sub-steps.
First, the support counts for 2-itemsets from the preprocessing step are read, and
the frequent ones are inserted into L 2 . Second, applying one of the two clustering
schemes to L 2 - the equivalence class or maximal hypergraph clique clustering - the
set of potential maximal frequent itemsets is generated. These potential maximal
clusters are then partitioned among all the processors so that a suitable level of
load-balancing can be achieved. Third, the database is repartitioned so that each
processor has on its local disk the tid-lists of all 1-itemsets in any cluster assigned
to it.
Scheduling We first partition the L 2 into equivalence classes using the
common prefix as described above. If we are using equivalence class clustering then
we already have the potential maximal itemsets. However, if we are using the clique
clustering, we generate the maximal cliques within each class (see section 4). We
next generate a schedule of the equivalence classes on the different processors in a
manner minimizing the load imbalance and minimizing the inter-process commu-
nication. Note that it may be necessary to sacrifice some amount of load balancing
for a better communication efficiency. For this reason, whole equivalence classes,
including all the maximal cliques within them, are assigned to the same processor.
Load balancing is achieved by assigning a weighting factor to each equivalence class
based on the number of elements in the class. Since we have to consider all pairs
for the next iteration, we assign the weight
to a class with s elements. Once the
weights are assigned we generate a schedule using a greedy heuristic. We sort the
classes on the weights, and assign each class in turn to the least loaded processor,
i.e., one having the least total weight at that point. Ties are broken by selecting
the processor with the smaller identifier. These steps are done concurrently on all
the processors since all of them have access to the global L 2 . Figure 6 shows an
example along with the equivalence classes, their weights, and the assignment
of the classes on two processors. Notice how an entire sublattice induced by a
given class is assigned to a single processor. This leads to better load balancing,
even though the partitioning may introduce extra computation. For example, if
234 were not frequent, then 1234 cannot be frequent either. But since these belong
to different equivalence classes assigned to different processors, this information is
not used. Although the size of a class gives a good indication of the amount of
work, better heuristics for generating the weights are possible. For example, if we
could better estimate the number of frequent itemsets that could be derived from
an equivalence class we could use this estimation as our weight. We believe that de-coupling
processor performance right in the beginning holds promise, even though
it may cause some load imbalance, since the repartitioning cost can be amortized
over later iterations. Deriving better heuristics for scheduling the clusters, which
minimize the load imbalance as well as communication, is part of ongoing research.
Tid-list Communication Once the clusters have been partitioned among the
processors each processor has to exchange information with every other processor
to read the non-local tid-lists over the Memory Channel network. To minimize
communication, and being aware of the fact that in our configuration there is only
one local disk per host (recall that our cluster has 8 hosts, with 4 processors per
host), only the hosts take part in the tid-list exchange. Additional processes on
each of the 8 hosts are spawned only in the asynchronous phase. To accomplish
the inter-process tid-list communication, each processor scans the item tid-lists in
its local database partition and writes it to a transmit region which is mapped
for receive on other processors. The other processors extract the tid-list from the
PARALLEL ASSOCIATION RULES 21
receive region if it belongs to any cluster assigned to them. For example, figure 6
shows the initial local database on two hosts, and the final local database after the
tid-list communication.
Table
3. Pseudo-code for Bottom-up and Hybrid Traversal
1. Input: C equivalence
2. class or maximal clique
3. clustering of k-itemsets.
4. Output: Frequent itemsets 2 C k
5.
6. for all I i 2 C k do
7. C
8. for all I do
9.
10. if N.sup - minsup then
11. C
12. end;
13. if C k+1
14. Bottom-Up(C k+1 );
15. end;
1.
2. /* Top-Down Phase */
3.
4. for all I
5.
6. if N.sup - minsup then
7.
8. else break;
9. end;
11. /* Bottom-Up Phase */
12. for all I i 2 S2 ,do
13.
15. if C3
16. end;
5.4.2. Asynchronous Phase At the end of the initialization step, the relevant
tid-lists are available locally on each host, thus each processor can independently
generate the frequent itemsets from its assigned maximal clusters, eliminating the
need for synchronization with other processors. Each cluster is processed in its
before moving on to the next cluster. This step involves scanning the local
database partition only once. We thus benefit from huge I/O savings. Since each
cluster induces a sublattice, depending on the algorithm, we either use a bottom-up
traversal to generate all frequent itemsets, or we use the hybrid traversal to generate
only the maximal frequent itemsets. The pseudo-code of the two lattice traversal
schemes is shown in table 3.
Note that initially we only have the tid-lists for 1-itemsets stored locally on disk.
Using these, the tid-lists for the 2-itemset clusters are generated, and since these
clusters are generally small the resulting tid-lists can be kept in memory. In the
bottom-up approach, the tid-lists for 2-itemsets clusters are intersected to generate
3-itemsets. If the cardinality of the resulting tid-list exceeds the minimum support,
the new itemset is inserted in L 3 . Then we split the resulting frequent 3-itemsets,
equivalence classes based on common prefixes of length 2. All pairs of
3-itemsets within an equivalence class are intersected to determine L 4 , and so on
22 ZAKI, PARTHASARATHY, OGIHARA AND LI
till all frequent itemsets are found. Once L k has been determined, we can delete
We thus need main memory space only for the itemsets in L k\Gamma1 within one
maximal cluster. For the top-down phase of the hybrid traversal only the maximal
element seen so far needs to be memory-resident, along with the itemsets not yet
seen. The new algorithms are therefore main memory space efficient. Experimental
results on the memory usage of these algorithms are presented in the next section.
Pruning Candidates Recall that both Count and Candidate Distribution use a
pruning step to eliminate unnecessary candidates. This step is essential in those
algorithms to reduce the size of the hash tree. Smaller trees lead to faster support
counting, since each subset of a transaction is tested against the tree. However,
with the vertical database layout we found the pruning step to be of little or no
help. This can be attributed to several factors. First, there is additional space and
computation overhead in constructing and searching hash tables. This is also likely
to degrade locality. Second, there is extra overhead in generating all the subsets
of a candidate. Third, there is extra communication overhead in communicating
the frequent itemsets in each iteration, even though it may happen asynchronously.
Fourth, because the average size of tid-lists decreases as the itemsets size increases,
intersections can be performed very quickly with the short-circuit mechanism.
At the end of the asynchronous phase we accumulate all the results from each
processor and print them out.
5.5. Salient Features of the New Algorithms
In this section we will recapitulate the salient features of our proposed algorithms,
contrasting them against Count and Candidate Distribution. Our algorithms differ
in the following respect:
ffl Unlike Count Distribution, they utilize the aggregate memory of the parallel
system by partitioning the candidate itemsets among the processors using the
itemset clustering schemes.
ffl They decouple the processors right in the beginning by repartitioning the database,
so that each processor can compute the frequent itemsets independently. This
eliminates the need for communicating the frequent itemsets at the end of each
iteration.
ffl They use the vertical database layout which clusters the transactions containing
an itemset into tid-lists. Using this layout enables our algorithms to scan the
local database partition only two times on each processor. The first scan for
communicating the tid-lists, and the second for obtaining the frequent itemsets.
In contrast, both Count and Candidate Distribution scan the database multiple
times - once during each iteration.
ffl To compute frequent itemsets, they performs simple intersections on two tid-
lists. There is no extra overhead associated with building and searching complex
hash tree data structures. Such complicated hash structures also suffer from
poor cache locality (Parthasarathy, Zaki, & Li 1997). In our algorithms, all the
PARALLEL ASSOCIATION RULES 23
available memory is utilized to keep tid-lists in memory which results in good
locality. As larger itemsets are generated the size of tid-lists decreases, resulting
in very fast intersections. Short-circuiting the join based on minimum support
is also used to speed this step.
ffl Our algorithms avoid the overhead of generating all the subsets of a transaction
and checking them against the candidate hash tree during support counting.
6. Experimental Evaluation
Table
4. Database properties
Database T I D1 D1 Size D4 D4 Size
All the experiments were performed on a 32-processor (8 hosts, 4 processors/host)
Digital Alpha cluster inter-connected via the Memory Channel network (Gillett
1996). In our system unicast and multicast process-to-process writes have a latency
of 5.2 -s, with per-link transfer bandwidths of 30MB/s. Each Alpha processor runs
at 233MHz. There's a total of 256MB of main memory per host (shared among the
4 processors on that host). Each host also has a 2GB local disk attached to it, out of
which less than 500MB was available to us. All the partitioned databases reside on
the local disks of each processor. We used different synthetic databases, generated
using the procedure described in (Agrawal & Srikant 1994). These have been used
as benchmark databases for many association rules algorithms (Agrawal & Srikant
1994; Holsheimer et al. 1995; Park, Chen, & Yu 1995a; Savasere, Omiecinski, &
Navathe 1995; Agrawal et al. 1996). Table 4 shows the databases used and their
properties. The number of transactions is denoted as D r , where r is the replication
factor. For all the databases are roughly 90MB in size. Except for the
sizeup experiments, all results shown are on databases with a replication factor of
We could not go beyond a replication factor of 6 (used in sizeup
experiments) since the repartitioned database would become too large to fit on disk.
The average transaction size is denoted as jT j, and the average maximal potentially
frequent itemset size as jI j. The number of maximal potentially frequent itemsets
2000, and the number of items We refer the reader to (Agrawal
Srikant 1994) for more detail on the database generation. All the experiments
were performed with a minimum support value of 0.25%. For a fair comparison,
all algorithms discover frequent k-itemsets for k - 3, using the supports for the
2-itemsets from the preprocessing step.
Execution
Time
(sec)
Count Distribution
Par-Eclat
Execution
Time
(sec)
Par-Eclat
Par-Clique
Par-MaxEclat
Par-MaxClique
Figure
7. Parallel Performance on T10.I4.D2048K
6.1. Performance Comparison
In this section we will compare the performance of our new algorithms with Count
Distribution (henceforth referred to as CD), which was shown to be superior to
both Data and Candidate Distribution (Agrawal & Shafer 1996). In all the figures
the different parallel configurations are represented as Hx:Py:T z, where
denotes the number of hosts, the number of processors per host, and
z, the total number of processors used in the experiments. Figures 7, 8,
and 9 show the total execution time for the different databases and on different
parallel configurations. The configurations have been arranged in increasing order
of T . Configurations with the same T are arranged in increasing order of H . The
first column compares Par-Eclat with CD, and the second column compares the
new algorithms, so that the differences among them are more apparent. It can be
clearly seen that Par-Eclat out-performs CD for almost all configurations on all
the databases, with improvements as high as a factor of 5. If we look at the best
new algorithm from the second column, we see an improvement of about an order
of magnitude. Even more dramatic improvements are possible for lower minimum
support (Zaki, Parthasarathy, & Li 1997). An interesting trend in the figures is that
the performance gap seems to decrease at larger configurations, with CD actually
performing better at H8.P4.T32 for T10.I4.D2084K and T15.I4.D1471K. To see
why consider figure 10 a, which shows the total number of frequent itemsets of
different sizes for the different databases. Also from figure 11, which shows the
initial database repartitioning and tid-list communication cost as a percentage of
PARALLEL ASSOCIATION RULES 25
the total execution time of Par-Eclat, it becomes clear that there is not enough work
for these two databases, to sufficiently offset the communication cost, consequently
more than 70% of the time is spent in the initialization phase. For T20.I6.D1137K,
which has more work, Par-Eclat is still about twice as fast as CD. The basic
argument falls on the classic computation versus communication trade-off in parallel
computing. Whenever this ratio is high we expect Par-Eclat to out-perform CD.
We also expect the relative improvements of Par-Eclat over CD to be better for
larger databases. Unfortunately due to disk space constraints we were not able to
test the algorithms on larger databases. In all except the configurations, the
local database partition is less than available memory. For CD, the entire database
would be cached after the first scan. The performance of CD is thus a best case
scenario for it since the results do not include the "real" hit CD would have taken
from multiple disk scans. As mentioned in section 5.5, Par-Eclat was designed to
scan the database only once during frequent itemset computation.
Execution
Time
(sec)
Count Distribution
Par-Eclat
Total
Execution
Time
(sec)
Par-Eclat
Par-Clique
Par-MaxEclat
Par-MaxClique
Figure
8. Parallel Performance on T15.I4.D1471K
The second column in figures 7, 8, and 9 shows the differences among the new
algorithms for different databases and parallel configurations. There are several
parameters affecting their performance. It can be seen that in general Par-Clique
and Par-MaxClique, perform better than Par-Eclat and Par-MaxEclat, respectively.
This is because they use the maximal hypergraph clique approach, which generates
more precise clusters. On the other axis, in general Par-MaxClique, and Par-
MaxEclat, out-perform Par-Clique and Par-Eclat, respectively. This is because the
hybrid lattice traversal scheme only generates maximal frequent itemsets, saving
on the number of intersections. The results are also dependent on the number
26 ZAKI, PARTHASARATHY, OGIHARA AND LI
Execution
Time
(sec)
Count Distribution
Par-Eclat
Execution
Time
(sec)
Par-Eclat
Par-Clique
Par-MaxEclat
Par-MaxClique
Figure
9. Parallel Performance on T20.I6.D1137K
of frequent itemsets. The larger the number of frequent itemsets, the more the
opportunity for the hybrid approach to save on the joins. For example, consider
which shows the total number of tid-list intersections performed for the
four algorithms on the three databases. For T20.I6.D1137K, which has the largest
number of frequent itemsets (see figure 10 a), Par-MaxClique cuts down the number
of intersections by more than 60% over Par-Eclat. The reduction was about 20%
for Par-MaxEclat, and 35% for Par-Clique. These factors are responsible for the
trends indicated above. The winner in terms of the total execution time is clearly
Par-MaxClique, with improvements over Par-Eclat as high as 40%.
6.2. Memory Usage
Figure
12 shows the total memory usage of the Par-Eclat algorithm as the computation
of frequent itemsets progresses. The mean memory usage for the tid-lists is
less than 0.7MB for all databases, even though the database itself is over 360MB.
The figure only shows the cases where the memory usage was more than twice the
mean. The peaks in the graph are usually due to the initial construction of all the
2-itemset tid-lists within each cluster. Since the equivalence class clusters can be
large, we observe a maximum usage of 35MB for Par-Eclat, which is still less than
10% of the database. For the other algorithms, we expect these peaks to be lower,
since the maximal clique clustering is more precise, resulting in smaller clusters,
and the hybrid traversal doesn't need the entire cluster 2-itemsets initially.
PARALLEL ASSOCIATION RULES 271000300050007000
Number
of
Frequent
Itemsets
Frequent Itemset Size (k)
Frequent Itemsets at
Number
of
Intersections
Par-Eclat
Par-MaxEclat
Par-Clique
Par-MaxClique
Figure
10. a) Number of Frequent k-Itemsets; b) Number of Intersections
Communication
Communication
Communication
Figure
11. Communication Cost in Par-Eclat
6.3. Sensitivity Analysis
Figures 13, 14, and 15 (first column) show the speedup on the different
databases and parallel configurations. Due to disk constraints we used a replication
28 ZAKI, PARTHASARATHY, OGIHARA AND LI246810Memory
Usage
2Mean
Time
T10.I4.D2084K: Memory Usage (Mean=0.55MB)
Par-Eclat12345Memory
Usage
2Mean
Time
T15.I4.D1471K: Memory Usage (Mean=0.43MB)
Par-Eclat5152535Memory
Usage
2Mean
Time
T20.I6.D1137K: Memory Usage (Mean=0.69MB)
Par-Eclat
Figure
12. Memory Usage in Par-Eclat (H1.P1.T1)1.52.53.5H1.P1.T1 H1.P2.T2 H2.P1.T2 H1.P4.T4 H2.P2.T4 H4.P1.T4 H2.P4.T8 H4.P2.T8 H8.P1.T8 H4.P4.T16 H8.P2.T16 H8.P4.T32
Relative
T10.I4.D2084K: Speedup
Par-Eclat
Par-MaxEclat
Par-Clique
Total
Execution
Time
(sec)
Replication Factor
T10.I4.D2084K: Sizeup
Par-Eclat
Par-MaxEclat
Par-Clique
Par-MaxClique
Figure
13. T10.I4.D2048K: Speedup and Sizeup(H4.P1.T4)
factor of 4, for database sizes of approximately 360MB. The speedup numbers are
PARALLEL ASSOCIATION RULES 291.52.53.54.5
Relative
T15.I4.D1471K: Speedup
Par-Eclat
Par-MaxEclat
Par-Clique
Par-MaxClique50150250350
Total
Execution
Time
(sec)
Replication Factor
T15.I4.D1471K: Sizeup
Par-Eclat
Par-MaxEclat
Par-Clique
Par-MaxClique
Figure
14. T15.I4.D1471K: Speedup and Sizeup(H4.P1.T4)
not as impressive at first glance. However, this is not surprising. For example, on
the largest configuration H8.P4.T32, there's only about 11MB of data per processor.
Combined with the fact that the amount of computation is quite small (see figure
a), and that about 50% to 70% of the time is spent in tid-list communication
(see figure 11), we see a maximum speedup of about 5. Another reason is that the
communication involves only the 8 hosts. Additional processes on a host are only
spawned after the initialization phase, which thus represents a partially-parallel
phase, limiting the speedups. If we take out the communication costs we see a
maximum speedup of 12 to 16. An interesting trend is the step-effect seen in
the speedup graphs. For the configurations which have the same number of total
processors, the ones with more hosts perform better. Also, for configurations with
more total processors, with 4, the configurations immediate preceding it,
with only 1 processor per host, performs better. In both the cases, the reason is
that increasing the number of processors on a given host, causes increased memory
contention (bus traffic), and increased disk contention, as each processor tries to
access the database from the local disk at the same time.
Sizeup: For the sizeup experiments we fixed the parallel configuration to H4.P1.T4,
and varied the database replication factor from 1 to 6, with the total database size
ranging from about 90MB to 540MB. Figures 13, 14, and 15 (second column)
show the sizeup for the four algorithms on the different databases. The figures
indicate an almost linear sizeup. The slightly upward bend is due to the relative
computation versus communication cost. The larger the database the more the
time spent in communication, while the intersection cost doesn't increase at the
Relative
Par-Eclat
Par-MaxEclat
Par-Clique
Total
Execution
Time
(sec)
Replication Factor
Par-Eclat
Par-MaxEclat
Par-Clique
Par-MaxClique
Figure
15. T20.I6.D1137K: Speedup and Sizeup(H4.P1.T4)
same pace. Moreover, the number of frequent itemsets remains constant (since
we use percentages for minimum support, as opposed to absolute counts) for all
replication factors.
7. Conclusions
In this paper we proposed new parallel algorithms for the discovery of association
rules. The algorithms use novel itemset clustering techniques to approximate the
set of potentially maximal frequent itemsets. Once this set has been identified,
the algorithms make use of efficient traversal techniques to generate the frequent
itemsets contained in each cluster. We propose two clustering schemes based on
equivalence classes and maximal hypergraph cliques, and study two lattice traversal
techniques based on bottom-up and hybrid search. We also use the vertical
database layout to cluster related transactions together. The database is also selectively
replicated so that the portion of the database needed for the computation
of associations is local to each processor. After the initial set-up phase, the
algorithms do not need any further communication or synchronization. The algorithms
minimize I/O overheads by scanning the local database portion only two
times. Once in the set-up phase, and once when processing all the itemset clusters.
The algorithms further use only simple intersection operations to compute frequent
itemsets and don't have to maintain or search complex hash structures. An added
benefit of using simple intersections is that the algorithms we propose can be im-
PARALLEL ASSOCIATION RULES 31
plemented directly on general purpose database systems (Holsheimer et al. 1995;
Using the above techniques we presented four new algorithms. The Par-Eclat
(equivalence class, bottom-up search) and Par-Clique (maximal clique, bottom-up
algorithms, discover all frequent itemsets, while the Par-MaxEclat (equiv-
alence class, hybrid search) and Par-MaxClique (maximal clique, hybrid search)
discover the maximal frequent itemsets. We implemented the algorithms on a
processor DEC cluster interconnected with the DEC Memory Channel network, and
compared it against a well known parallel algorithm Count Distribution (Agrawal
1996). Experimental results indicate that a substantial performance improvement
is obtained using our techniques.
Acknowledgments
This work was supported in part by an NSF Research Initiation Award (CCR-
9409120) and ARPA contract F19628-94-C-0057.
--R
Parallel mining of association rules.
Fast algorithms for mining association rules.
Fast discovery of association rules.
Mining association rules between sets of items in large databases.
Hypergraphs: Combinatorics of Finite Sets.
A fast distributed algorithm for mining association rules.
Efficient mining of association rules in distributed databases.
The KDD process for extracting useful knowledge from volumes of data.
Computers and Intractability: A Guide to the Theory of NP-Completeness
Memory channel: An optimized cluster interconnect.
Scalable parallel data mining for association rules.
In ACM SIGMOD Conf.
A perspective on databases and data mining.
In 11th Intl.
Efficient algorithms for discovering association rules.
An effective hash based algorithm for mining association rules.
Efficient parallel data mining for association rules.
In ACM Intl.
An efficient algorithm for mining association rules in large databases.
Sampling large databases for association rules.
Parallel data mining for association rules on shared-memory multi-processors
Evaluation of sampling for data mining of association rules.
New algorithms for fast discovery of association rules.
New algorithms for fast discovery of association rules.
A localized algorithm for parallel association mining.
Srinivasan Parthasarathy is currently a doctoral student at the University of Rochester.
Wei Li received his Ph.
--TR
--CTR
Jennifer Seitzer , James P. Buckley , Yi Pan, INDED: A Distributed Knowledge-Based Learning System, IEEE Intelligent Systems, v.15 n.5, p.38-46, September 2000
Sukomal Pal , Aditya Bagchi, Association against dissociation: some pragmatic considerations for frequent itemset generation under fixed and variable thresholds, ACM SIGKDD Explorations Newsletter, v.7 n.2, p.151-159, December 2005
A fast algorithm for mining sequential patterns from large databases, Journal of Computer Science and Technology, v.16 n.4, p.359-370, 7/1/2001
Eui-Hong (Sam) Han , George Karypis , Vipin Kumar, Scalable Parallel Data Mining for Association Rules, IEEE Transactions on Knowledge and Data Engineering, v.12 n.3, p.337-352, May 2000
Mohammed J. Zaki, Parallel and Distributed Association Mining: A Survey, IEEE Concurrency, v.7 n.4, p.14-25, October 1999
Congnan Luo , Anil L. Pereira , Soon M. Chung, Distributed Mining of Maximal Frequent Itemsets on a Data Grid System, The Journal of Supercomputing, v.37 n.1, p.71-90, July 2006
Jiawei Han , Laks V. S. Lakshmanan , Jian Pei, Scalable frequent-pattern mining methods: an overview, Tutorial notes of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining, August 26-29, 2001, San Francisco, California
Chenyong Hu , Benyu Zhang , Yongji Wang , Shuicheng Yan , Zheng Chen , Qing Wang , Qiang Yang, Learning quantifiable associations via principal sparse non-negative matrix factorization, Intelligent Data Analysis, v.9 n.6, p.603-620, November 2005
Yang , Srinivasan Parthasarathy , Sameep Mehta, A generalized framework for mining spatio-temporal patterns in scientific data, Proceeding of the eleventh ACM SIGKDD international conference on Knowledge discovery in data mining, August 21-24, 2005, Chicago, Illinois, USA
Gregory Buehrer , Srinivasan Parthasarathy , Shirish Tatikonda , Tahsin Kurc , Joel Saltz, Toward terabyte pattern mining: an architecture-conscious solution, Proceedings of the 12th ACM SIGPLAN symposium on Principles and practice of parallel programming, March 14-17, 2007, San Jose, California, USA
Assaf Schuster , Ran Wolff , Dan Trock, A high-performance distributed algorithm for mining association rules, Knowledge and Information Systems, v.7 n.4, p.458-475, May 2005
Shengnan Cong , Jiawei Han , Jay Hoeflinger , David Padua, A sampling-based framework for parallel data mining, Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming, June 15-17, 2005, Chicago, IL, USA
Mohammed J. Zaki, Scalable Algorithms for Association Mining, IEEE Transactions on Knowledge and Data Engineering, v.12 n.3, p.372-390, May 2000
Aleksandar Lazarevic , Zoran Obradovic, Boosting Algorithms for Parallel and Distributed Learning, Distributed and Parallel Databases, v.11 n.2, p.203-229, March 2002
Mohammed J. Zaki , Neal Lesh , Mitsunori Ogihara, PlanMine: Predicting Plan Failures Using Sequence Mining, Artificial Intelligence Review, v.14 n.6, p.421-446, December 1, 2000
John D. Holt , Soon M. Chung, Parallel mining of association rules from text databases, The Journal of Supercomputing, v.39 n.3, p.273-299, March 2007
Vipin Kumar , Mohammed Zaki, High performance data mining (tutorial PM-3), Tutorial notes of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.309-425, August 20-23, 2000, Boston, Massachusetts, United States
Petr Hjek , Martin Holena, Formal logics of discovery and hypothesis formation by machine, Theoretical Computer Science, v.292 n.2, p.345-357, 27 January
Andrzej Skowron , Jan Komorowski , Zdzislaw Pawlak , Lech Polkowski, Rough sets perspective on data and knowledge, Handbook of data mining and knowledge discovery, Oxford University Press, Inc., New York, NY, 2002
Andrzej Skowron, Rough sets and boolean reasoning, Granular computing: an emerging paradigm, Physica-Verlag GmbH, Heidelberg, Germany, 2001
A. Maniatty , Mohammed J. Zaki, Systems support for scalable data mining, ACM SIGKDD Explorations Newsletter, v.2 n.2, p.56-65, Dec. 2000 | lattice traversal;parallel data mining;maximal hypergraph cliques;association rules |
593455 | High Performance OLAP and Data Mining on Parallel Computers. | On-Line Analytical Processing (OLAP) techniques are increasingly being used in decision support systems to provide analysis of data. Queries posed on such systems are quite complex and require different views of data. Analytical models need to capture the multidimensionality of the underlying data, a task for which multidimensional databases are well suited. Multidimensional OLAP systems store data in multidimensional arrays on which analytical operations are performed. Knowledge discovery and data mining requires complex operations on the underlying data which can be very expensive in terms of computation time. High performance parallel systems can reduce this analysis time.Precomputed aggregate calculations in a Data Cube can provide efficient query processing for OLAP applications. In this article, we present algorithms for construction of data cubes on distributed-memory parallel computers. Data is loaded from a relational database into a multidimensional array. We present two methods, sort-based and hash-based for loading the base cube and compare their performances. Data cubes are used to perform consolidation queries used in roll-up operations using dimension hierarchies. Finally, we show how data cubes are used for data mining using Attribute Focusing techniques. We present results for these on the IBM-SP2 parallel machine. Results show that our algorithms and techniques for OLAP and data mining on parallel systems are scalable to a large number of processors, providing a high performance platform for such applications. | Introduction
On-line Analytical Processing (OLAP) [1] systems enable analysts and managers to gain insight into the
performance of an enterprise through a wide variety of views of data organized to reflect the multidimensional
nature of the enterprise data. OLAP gives insight into data through fast, consistent, interactive access to a
wide variety of possible views of information. In contrast to traditional databases, it answers questions like
"what if ?" and "why ?" in addition to "who ?" and "what ?". OLAP is used to build decision support
systems which help in extracting knowledge from data.
OLAP is used to summarize, consolidate, view, apply formulae to, and synthesize data according to multiple
dimensions. Queries posed on such systems are quite complex and require different views of data. Traditionally,
a relational approach (relational OLAP) has been taken to build such systems. Relational databases are used
to build and query these systems. A complex analytical query is cumbersome to express in SQL and it might
not be efficient to execute. More recently, multidimensional database techniques (multidimensional OLAP)
have been applied to decision-support applications. Data is stored in multidimensional arrays which is a more
natural way to express the multi-dimensionality of the enterprise data and is more suited for analysis. A "cell"
in multidimensional space represents a tuple, with the attributes of the tuple identifying the location of the
tuple in the multidimensional space and the measure values represent the content of the cell.
Data mining can be viewed as an automated application of algorithms to detect patterns and extract
knowledge from data [2]. An algorithm that enumerates patterns from, or fits models to, data is a data mining
algorithm. Data mining is a step in the overall concept of knowledge discovery in databases (KDD). Large
data sets are analyzed for searching patterns and discovering rules. Automated techniques of data mining can
make OLAP more useful and easier to apply in the overall scheme of decision support systems. Data mining
techniques like Associations, Classification, Clustering and Trend analysis [2] can be used together with OLAP
to discover knowledge from data.
An approach to data mining called Attribute Focusing targets the consumer by using algorithms that
lead the user through the analysis of data. Attribute Focusing has been successfully applied in discovering
interesting patterns in the NBA [5] and other applications. Earlier applications of this technique were to
software process engineering [4]. Since data cubes have aggregation values on combinations of attributes
already calculated, the computations of attribute focusing are greatly facilitated by data cubes. We present a
parallel algorithm to calculate the "interestingness" function used in attribute focusing on the data cube.
Typically, large amounts of data are analyzed for OLAP and data mining applications. Ad-hoc analytical
queries are posed by analysts who expect the system to provide real-time performance. Parallel computers can
be used in such a scenario for a variety of reasons. Scalable solutions can build a highly accurate data mining
model quicker. Mining large databases and constructing complex models take a large amount of computing
power which can take hours of valuable time. Scalable parallel systems can reduce this wait time to minutes
or even seconds, thus increasing productivity and better understanding of the knowledge discovery process.
The use of many processors enables the use of more memory and a larger database can be handled in the
main memory attached to the processors. We have currently considered main-memory databases. Extensions
to disks using parallel I/O will be future work.
In this article we present scalable parallel algorithm and techniques for OLAP in multidimensional databases.
Parallel construction and maintenance of data cubes and their use for OLAP queries is shown. Results show
that our implementations are scalable to a large number of processors. Consolidation queries make use of hi-
Category Examples
Distributive Sum(), Count(), Minimum(), Maximum()
Algebraic Average(), Standard Deviation(), MaxN()(N largest values),
smallest values), Center of Mass()
Holistic Median(), MostFrequent()(i.e. Mode()), Rank()
Table
1: Categories of aggregate functions
erarchies on dimensions to make OLAP queries possible at different levels of detail. We show the performance
of these algorithms on the OLAP council benchmark [15] which models a real OLAP environment on a IBM
parallel machine. The IBM SP-2 is a network of RS/6000 workstations connected together on a high
speed communication switch, which is fast getting popular as a parallel computing platform. We show the
use of data cubes to perform data mining by using attribute focusing to find two-way associations between
attributes. These can easily be extended to n-way associations. To the best of our knowledge, this is the first
effort on high performance parallel computation of data cubes for MOLAP and data mining using them.
The rest of the paper is organized as follows. Section 2 gives an overview of the data cube and its operators.
The model of parallel computation we have used is given in Section 3. Section 4 presents the issues in data
cube construction. Section 5 presents parallel data cube construction for MOLAP. Section 6 gives results for
a OLAP council benchmark suite on the IBM-SP2 parallel machine. Section 7 presents consolidation queries
that use hierarchies defined on the various dimensions. Section 8 describes data mining on data cubes with
results on the IBM-SP2. Section 9 concludes the article.
2 Data Cube
The Data cube operator was introduced recently by Gray et. al [7] to support multiple aggregates. Data cube
computes aggregates along all possible combinations of dimensions. This operation is useful for answering
OLAP queries which use aggregation on different combinations of attributes. Data can be organized into a
data cube by calculating all possible combinations of GROUP-BYs. For a data set with k attributes this
would lead to 2 k GROUP-BY calculations. In this article we present algorithms for calculating the data cube
using multidimensional arrays on a distributed memory parallel computer.
The cube treats each of the k aggregation attributes as a dimension in k-space. An aggregate of a particular
set of attribute values is a point in this space. The set of points form a k-dimensional cube. Aggregate functions
are classified into three categories as shown in Table 1. Distributive functions allow partitions of the input
set to be aggregated separately and later combined. Algebraic functions can be expressed in terms of other
distributive functions, e.g. average() can be expressed as the ratio of sum() and count(). Holistic functions,
such as median() cannot be computed in parts and combined.
2.1 Operations on the Data Cube
Data Cube operators generalize the histogram, cross-tabulation, roll-up, drill-down and sub-total constructs
required by financial databases. The following operations can be defined on the data cube.
ffl Pivoting: This is also called rotating and involves rotating the cube to change the dimensional
orientation of a report or page on display. It may consist of swapping the two dimensions (row and
column in a 2D-cube) or introducing another dimension instead of some dimension already present in
the cube.
Slicing-dicing : This operation involves selecting some subset of the cube. For a fixed attribute value
in a given dimension, it reports all the values for all the other dimensions. It can be visualized as slice
of the data in a 3D-cube.
dimensions have a hierarchy defined on them. Aggregations can be done at different
levels of hierarchy. Going up the hierarchy to higher levels of generalization is known as roll-up. For
example, aggregating the dimension up the hierarchy (day ! month ! quarter::) is a roll-up operation.
ffl Drill-down: This operation traverses the hierarchy from lower to higher levels of detail. Drill-down
displays detail information for each aggregated point.
ffl Trend analysis over sequential time periods
Product
Date
Supplier
d2
p3
d5
d4
d3
Figure
1: Example database of sales data
Figure
1 shows a multidimensional database with product, date, supplier as dimensions and sales as a
measure. Partitioning a data set into dimensions and measures is a design choice. Dimensions usually have
a hierarchy associated with them, which specify aggregation levels and the granularity of viewing data. For
example day ! month ! quarter ! year is a hierarchy on date.
An aggregate of an attribute is represented by introducing a new value ALL. The right hand side table in
Figure
2 illustrates a data cube for the set of tuples given in the left hand side [7].
2.2 OLAP Alternatives
Traditionally, OLAP systems have been build on top of a relational database system. These are referred to as
relational OLAP (ROLAP). An OLAP engine is built on top of a relational database. This generates analytical
queries in SQL which may become cumbersome for complex queries and affect performance. Relational
systems have to embed a multidimensional view on the underlying data. Alternatively, multidimensional
OLAP (MOLAP) systems have appeared only recently. These use multidimensional databases modeled as
Model Year Color Sales
Chevy 1990 Red 5
Chevy 1990 Blue 87
Ford 1990 Green 64
Ford 1990 Blue 99
Ford 1991 Red 8
Ford 1991 Blue 7
Model Year Color Sales
Chevy 1990 Blue 87
Chevy 1990 Red 5
Chevy 1990 ALL 92
Chevy ALL Blue 87
Chevy ALL Red 5
Chevy ALL ALL 92
Ford 1990 Blue 99
Ford 1990 Green 64
Ford 1990 ALL 163
Ford 1991 Blue 7
Ford 1991 Red 8
Ford 1991 ALL 15
Ford ALL Blue 106
Ford ALL Green 64
Ford ALL Red 8
ALL 1990 Blue 186
ALL 1990 Green 64
ALL 1991 Blue 7
ALL 1991 Red 8
Ford ALL ALL 178
ALL 1990 ALL 255
ALL 1991 ALL 15
ALL ALL Blue 193
ALL ALL Green 64
ALL ALL Red 13
ALL ALL ALL 270
Figure
2: Data cube Illustration using a relation
multidimensional arrays for OLAP operations. An intuitive view of data provides a sophisticated analytical
functionality and support for complex queries. Data relationships are modeled more naturally and intuitively.
Spatial databases [8] represent and model geometric objects (points, lines, polygons etc.) in multidimensional
space. MOLAP data can be considered as points in the multidimensional space of attributes and benefit
from some spatial database techniques. The operations in OLAP although different from the operations, such
as overlap, containment etc., used in spatial databases can benefit from the spatial indexing structures developed
for spatial databases.
3 Communication Costs
Distributed Memory Parallel Computers (shared-nothing machines) consist of a set of processors (tens to a
few hundred) connected through an interconnection network. The memory is physically distributed across the
processors. Interaction between processors is through message passing. Popular interconnection topologies are
2D meshes (Paragon, Delta), 3D meshes (Cray T3D), hypercubes (nCUBE), fat tree (CM5) and multistage
networks (IBM-SP2).
Most of these machines have cut-through routed networks which will be used for modeling the communication
cost of our algorithms. For a lightly loaded network, a message of size m traversing d hops of a
cut-through (CT) routed network incurs a communication delay given by
represents the handshaking costs, t h represents the signal propagation and switching delays and t w represents
the inverse bandwidth of the communication network. The startup time t s is often large, and can be several
Primitive Running time on p processors
Broadcast O((ts
Reduce O((ts
Parallel Prefix O((ts
Gather O(ts log
All-to-All Communication O((ts log p)
Table
2: Running times of various parallel primitives on a multi-staged network
hundred machine cycles or more. The per-word transfer time t w is determined by the link bandwidth. t w is
often higher (an order to two orders of magnitude is typical) than t c , the time to do a unit computation on
data available in the cache.
Parallelization of applications requires distributing some or all of the data structures among the processors.
Each processor needs to access all the non-local data required for its local computation. This generates
aggregate or collective communication structures.
Several algorithms have been described in the literature for these primitives and are part of standard
textbooks [12]. The use of collective communication provides a level of architecture independence in the
algorithm design. It also allows for precise analysis of an algorithm by replacing the cost of the primitive
for the targeted architecture. Table 2 provides a complexity analysis of these operations on a multi-staged
network. These costs are used in the analysis of the algorithms presented in the next section.
1. Broadcast. In a Broadcast operation, one processor has a message of size m to be broadcast to all
other processors.
2. Reduce. Given a vector of size m on each processor and a binary associative operation, the Reduce
operation computes a resultant vector of size m and stores it on every processor. The i th element of
the resultant vector is the result of combining the i th element of the vectors stored on all the processors
using the binary associative operation.
3. Parallel Prefix. Suppose that x are p data elements with processor P i containing x i . Let
\Omega be a binary associative operation. The Parallel Prefix operation stores the value of x
on processor P i .
4. Gather. Given a vector of size m on each processor, the Gather operation collects all the data and
stores the resulting vector of size mp in one of the processors.
5. All-to-All Communication. In this operation each processor sends a distinct message of size m to
every processor.
4 Data Cube Construction
The data cube operator is the n-dimensional generalization of the group-by operator. Consider the following
query which uses the cube operator.
SELECT Model, Year, Color, SUM(sales) AS Sales
FROM Sales
WHERE Model in 'Ford', 'Chevy'
AND Year BETWEEN 1990 AND 1992
GROUP BY CUBE(Model, Year, Color);
aggregate calculations are needed for a N-dimensional data cube. For example,
are calculated for the above query: fModel, Year, Colorg, fModel, Yearg, fModel, Colorg, fYear, Colorg,
fModelg, fYearg, fColorg and ALL, as shown in Figure 2.
ABCD
ALL
# of GROUP-BYs44431
Figure
3: Lattice for cube operator
Several optimizations can be done over the naive method of calculating each aggregate separately from the
initial data [7]. Optimizations 1 and 2 are normally considered for a uniprocessor model. Optimization 3 is an
added and important consideration for a parallel implementation to reduce the overheads from communication
costs.
1. Smallest Parent: For computing a group-by this selects the smallest of the previously computed
group-bys from which it is possible to compute the group-by. Consider a four attribute cube (ABCD).
Group-by AB can be calculated from ABCD, ABD and ABC. Clearly sizes of ABC and ABD are
smaller than that of ABCD and are better candidates. The actual choice will be made by picking the
smaller of ABC and ABD.
2. Effective use of Cache: This aims at using the cache effectively by computing the group-bys in such an
order that the next group-by calculation can benefit from the cached results of the previous calculation.
This can be extended to disk based data cubes by reducing disk I/O and caching in main memory. For
example, after computing ABC from ABCD we compute AB followed by A. In MOLAP systems the
sizes of the intermediate levels are fixed and the order can be determined easily.
3. Minimize inter-processor Communication: Communication is involved among the processors to
calculate the aggregates. The order of computation should minimize the communication among the
processors because inter-processor communication costs are typically higher than computation costs.
For example, have a higher communication cost to first aggregate along B and then divide
C among the processors in comparison to CD ! C where a local aggregation on each processor along
D will be sufficient.
A lattice framework to represent the hierarchy of the group-bys was introduced in [11]. This is an elegant
model for representing the dependencies in the calculations and also to model costs of the aggregate
calculations. A scheduling algorithm can be applied to this framework substituting the appropriate costs of
computation and communication. A lattice for the group-by calculations for a four-dimensional cube (ABCD)
is shown in Figure 3. Each node represents an aggregate and an arrow represents a possible aggregate calculation
which is also used to represent the cost of the calculation.
Calculation of the order in which the GROUP-BYs are created depends on the cost of deriving a lower
order (one with a lower number of attributes) group-by from a higher order (also called the parent) group-by.
For example, between ABD ! BD and BCD ! BD one needs to select the one with the lower cost. Cost
estimation of the aggregation operations can be done by establishing a cost model. This is described later in
the section on aggregation.
We assume that the total available memory on the processors is large enough to hold the data sets in
memory. This is a reasonable assumption since most parallel machines these days have 128-256 MB main
memory per node. With 16 nodes we can handle databases of size 2GB and larger data sets can be handled
by increasing the number of processors. Hence, it is important to develop scalable algorithms to handle larger
databases. In this article we develop in-memory algorithms to calculate the data cube. External algorithms
are also being explored as part of this research.
5 Parallel Data Cube Construction for MOLAP
We assume that data is provided as a set of tuples stored in a file and the number of distinct elements are
given for each attribute. For illustration purposes, let A; B; C and D be the attributes in a data set with
D a ; D b ; D c and D d as the number of their distinct values, respectively. We assume that the number of distinct
values in each dimension is known. However, the values are determined from the database by the algorithm.
Without loss of generality, let D a D b D c D d . If this is not the case, it can be made true by a simple
renaming of the attributes. Let p be the number of processors, numbered N be the number
of tuples.
Figure
4 shows the various steps in the data cube construction algorithm. Each step is explained in the
next few subsections.
Algorithm 1 Parallel data cube construction and operations
Step 1. Partition tuples between processors (Partitioning)
Step 2. Load tuples into multidimensional array (Loading)
Step 3. Generate schedule for order of group-by calculations
Step 4. Perform aggregation calculations (Aggregation)
Step 5. Redistribute/Assign sub-cubes to processors for query processing
Step 6. Define local and distributed hierarchies on all dimensions
Figure
4: Steps in parallel data cube construction
First, the tuples are partitioned on p processors in a partitioning step. The partitioning phase is followed
by a loading phase in which a multidimensional array is loaded on each processor from the tuples acquired
after the partitioning phase. This creates the base cube. Loading can either be done by a hash-based method
or a sort-based method. We have implemented both and have compared their scalability properties. This is
followed by a aggregation phase which calculates the various aggregate sub-cubes. We describe each phase in
the next few subsections.
5.1 Partitioning
A sample based partitioning algorithm is used to partition the tuples among the processors. Attribute A is
used in this partitioning. This is done to ensure the partitioning of data at the coarsest grain possible. This
divides A nearly equally onto the processors and also establishes an order on A. If A x 2 P i and A y 2 P j then
A x A y for In fact, in the partitioning scheme used here, tuples end up being sorted locally on each
processor. The algorithm is illustrated in Figure 5 with communication steps shown in bold.
Algorithm 2 Sample based partitioning
- Number of processors.
Step 1. Sort tuples on attribute A locally on each processor
Step 2. Pick up a sample of size p of attribute A from each processor. Gather the sample on processor 0 and sort it locally.
Step 3. Pick up splitters from this list on processor 0 and Broadcast them.
Step 4. Using the splitters each processor divides it's tuples into p sorted partitions with all values of attribute A in a lower
partition being lower than a higher numbered partition.
Step 5. Using All-to-All communication each partition is sent to its destination processor.
Step 6. Each processor merges the sorted partitions obtained from other processors resulting in a set of tuples sorted
globally on attribute A.
Figure
5: Sample based partitioning
5.2 Loading
Once tuples are partitioned on processors, they are loaded into a multidimensional array (md-array). The size
of the md-array in each dimension is the same as the number of unique values for the attribute represented in
that dimension. A tuple is represented as a cell in the md-array indexed by the values of each of the attributes.
Hence, each measure needs to be loaded in the md-array from the tuples. We describe two methods to perform
this task, a hash based method and a sort-based method.
5.2.1 Hash-based method
Figure
6 describes the hash-based cube loading algorithm. Each attribute is hashed to get a hash table of
unique values for it. A sort on the attribute's hash table will index the dimension of the base cube corresponding
to that attribute. These hash tables are then probed to fill in the measure values in the base cube. Hashing
techniques are known to provide good performance on the average, though it heavily depends on the choice
of a good hash function.
5.2.2 Sort-based method
Figure
7 describes the sort-based cube loading algorithm. This method provides regularity of access over
the sorted hash tables since the attributes probing them are sorted, unlike the hash-based method, where
Algorithm 3 Hash-based data cube loading Algorithm
number of attributes(dimensions)
Step 1. For each tuple, hash each of the attributes into a separate hash table, one for each attribute. k hash tables are
created as a result of this. (hash phase)
Step 2. Compress and sort each hash table.
Step 3. Update the index of the hash table with its order in the corresponding sorted list.
Step 4a. Pick up each tuple and probe the hash tables for each of its attributes to obtain the indices in each
dimension. (probe phase)
Step 4b. Update the cell at the index in the md-array with the measure values of the tuple.
Figure
Hash-based Algorithm for multidimensional data cube Loading
accesses in the hash table have no order. The sorted hash-tables are scanned only in one direction for all the
tuples which have the same value for all the attributes in dimensions which come earlier, i.e have more unique
values, since the order in which the attributes are sorted is with respect to their number of unique values. For
example, for two consecutive records (a table for D is scanned from the
current position to get the index. However, for (a tables for both C and
D need to be scanned from the beginning.
Algorithm 4 Sort-based data cube loading Algorithm
- Number of attributes(dimensions)
Step 1. Sort tuples locally on each processor in such a way that B is sorted for each unique value of A, C is sorted for
each unique value of B and so on. Note that A is already sorted on each processor.
Step 2. For each tuple hash each of the attributes into a separate hash table, one for each attribute. k hash tables are
created as a result of this. (hash phase)
Step 3. Compress and sort each hash table.
Step 4. Pick up each tuple and calculate the indices of each attribute in the md-array in the following way. (Assume that
the sorting order is A, B and C)
Step 4a. Pick up the attribute at the innermost level of the sort and linearly scan the sorted hashed list for it to pick up the
index.
Step 4b. As long as the values at higher levels are the same, scan past the point where the scan stopped last, to find the
index. If a attribute value changes, scan the sorted hash lists from the start for all inner attributes.
Step 4c. Update the cell at the index in the md-array with the measure values of the tuple.
Figure
7: Sort-based Algorithm for multidimensional data cube Loading
5.3 Aggregation
An example of a base cube is shown in Figure 8 with 2. Hence
each processor has Da
portion of A. We illustrate the costs of calculating the various GROUP-BYs from
the base cube for a three attribute (or 3D) cube in Table 3. Let t op be the cost of an addition, t copy the
cost of a copying a byte. Communication is modeled by collective communication operations as described in
the previous section. These costs are then used by a scheduling algorithm, which generates a schedule for
calculating the various group-bys.
Some calculations are local and some are non-local and need multiple processors to exchange data leading
to communication among processors. An example of a local aggregate calculation, ABCD ! ABD, is shown
in
Figure
9. Even with local calculations the costs can differ depending on how the calculation is made.
Calculating AC from ABC requires summing on the B dimension and calculating AC from ACD requires
aggregation on D. Depending on how the multidimensional array is stored these costs could be different since
the stride of the access can affect the cache performance. From the cost calculations shown in Table 3, we see
that the cost of calculating aggregates from a parent are lower if the order of the attributes in the aggregate
is a prefix of the parent. Calculating ABC ! AB ! A is a local calculation on each node. Each cube is
distributed across the processors since dimension A is distributed. The intermediate cubes, resulting from
aggregation of parent cubes are also distributed among the processors. This results in good load balancing
among the processors. Calculations involving multiple cubes can also be distributed across processors as a
result of this. The first attribute in the aggregate cube is always distributed among processors. As a result,
A is distributed in ABCD, ABC, AB and A, B is distributed in BCD, BC and B, and C is distributed in CD
and C and D is distributed. Figure 8 shows A as distributed in ABCD.
Source Target Cost
Table
3: Calculation of GROUP-BYs for a three attribute data cube (D a \Theta D b \Theta D c ), on p processors
Figures
and 11 illustrate a global aggregate calculation of calculating ABCD ! BCD. First a local
aggregation is done along dimension A (Figure 10). This is followed by a Reduce operation on BCD (Figure
11). Each processor then keeps the corresponding portion of BCD, distributing B evenly among processors.
Clearly, as can be observed from the aggregation calculations shown in the table above, there are multiple
ways of calculating a GROUP BY. For calculating the aggregate at a level where aggregates can be calculated
from multiple parents, we need to pick up an assignment such that the cost is minimized. In [13], this is solved
by posing it as a graph problem and using minimum cost matching in a bipartite graph. We have augmented
it by our cost model and the optimizations needed. Again, refer to Figure 3. Suppose we want to calculate
aggregates at a level k from the parent at level k + 1. A bipartite graph E) is defined as
follows. A group of nodes X is the nodes at level k. Clearly jX Another group of nodes jY j is the nodes
at level k . The edges connecting the nodes at level k and k belong to E. The edge
weights are the costs of calculating the particular aggregate at level k from the parent at level k + 1. Costs
described in Table 3 are used here. A node at level k possibly calculate
aggregates at level
k. Hence the nodes are replicated these many times at level k these are added to Y . We seek a match
d2
A: 1,2,3,4,5,6,7,8
B: b1,b2,b3,b4
C: c1,c2
Figure
8: Basecube for 4 attributes on 4 processors
A: 1,2
B: b1,b2,b3,b4
C: c1,c2
d2
d2
ABCD
ABD
op
op
Figure
9: Local aggregation calculation, ABCD ! ABD on processor P0
ABCD BCD
A: 1,2,3,4,5,6,7,8
B: b1,b2,b3,b4
C: c1,c2
d2
Figure
10: Global aggregation calculation, local phase, ABCD ! BCD
A: 1,2,3,4,5,6,7,8
B: b1,b2,b3,b4
C: c1,c2
ABCD BCD
Reduce Operation
d2
d2 d2
d2 d2
Figure
11: Global aggregation calculation, global phase, ABCD ! BCD
between nodes from level k level k which minimizes the total edge costs. Figure 12 shows an example
of calculating level 2 from level 3 of the lattice of Figure 3. This is done for each level and the resulting order
of calculations at each level is picked up. This creates a directed acyclic graph which is then traversed, from
the base cube as the root, to each child in a depth first search manner, calculating each aggregation. This
results in preserving all of the three optimizations for multiple group-bys described in an earlier section.
AD
AC BD CD
ABD -> AB 15
BD
AD
AD
AC BD CD
BD
Figure
12: A minimum cost matching for calculation of Level 2 aggregates from Level 3
6 Results
We have implemented the algorithms presented in the previous section using 'C' and message passing using
the Message Passing Interface (MPI) on the IBM SP-2 parallel machine. Each node of the SP-2 is a RS/6000
processor, with 128MB memory. The interconnection network is a multistage network connected through a
high speed switch. The use of C and MPI makes the programs portable across a wide variety of parallel
platforms with little effort.
6.1 Data sets
We have used the OLAP council benchmark [15] which simulates a realistic On-Line Analytical Processing
business situation. The data sets have attributes taken from the following set of attributes: Product (9000),
Customer (900), Time (24), Channel (9) and Scenario (2). The values in brackets following each attribute
are the number of unique values for that attribute. These are taken to be the size of the dimensions in the
resulting multi-dimensional arrays in the sub-cubes of the data cube. For the History Sales data, we have
picked out 1000, 101, 100 and 10 distinct values for its 4 attributes from the benchmark data and generated
the records by picking out each attribute randomly from the set of distinct values for that attribute. Product,
Customer and Channel are character strings with 12 characters each. Time is an integer depicting year and
month (e.g. 199704 is April 1997) and Scenario is a 6 character string showing if it is an "Actual" or a
"Budget" value. The measure stored in each cell of the array is a float value depicting the sales figure for the
particular combination of the attributes. This can potentially contain many more values. We have used the
Sum() function to compute the aggregates in the results presented here. The characteristics of the data sets
are summarized in Table 4.
Data Set Dimensions Number of records Base cube dimensions Data size
Shipping Cost Customer, Time, Scenario 27000 900 \Theta 24 \Theta 2 1MB
Production Cost Product, Time, Scenario 270,000 9000 \Theta 24 \Theta 2 10MB
Current Sales Product, Customer, Channel 81000 and 608866 9000 \Theta 900 \Theta 9 320MB
Budget Product, Customer, Time 951,720 9000 \Theta 900 \Theta 12 420MB
History Sales Product, Customer, Time, Channel 1,010,000 1000 \Theta 101 \Theta 100 \Theta 10 500 MB
Table
4: OLAP benchmark data sets used for data cube construction
6.2 Data cube Construction
We present results for the different phases of data cube construction for all the data sets described above.
Figure
13 shows the performance of hash-based and sort-based methods for the Shipping Cost data with 27000
records. We observe that the algorithm scales well for this small data size. Each individual component scales
well also. The two methods take almost the same time for the data cube construction.
Processors0.030.080.120.18Time
(sec)
Shipping Cost (Customer, Scenario, Time)
Partition
Hash
Load
Aggregate
Total
Processors0.030.080.120.18Time
(sec)
Shipping Cost (Customer, Scenario, Time)
Partition
Hash
Load
Aggregate
Total
Figure
13: Various phases of cube construction using (a) hash-based (b) sort-based method for Shipping Cost
data
Production Cost data contains 270,000 records and the performance of the two methods on this data set is
shown in Figure 14. Again, as we increase the number of processor, each of the component in the construction
algorithm scales well resulting in good overall scalability for both methods.
Figure
15 shows the performance of hash-based and sort-based methods for the Current Sales data with
81000 records. This data has a density of 0.11%.
The aggregation time is the main component in the total time because of the large cube size for this data
set.
Figure
shows the performance of hash-based and sort-based methods for the Current Sales data with
records. This data has a density of 0.84%. All the individual components have increased except the
aggregation component. The number of tuples has increased in this data set which affects the components till
the loading phase. Aggregation times are dependent on the cube size, which has not changed.
Figure
17 gives the performance on Budget data with nearly a million records for 8, 16, 32, 64 and 128
processors. It can be observed that for large data sets the methods perform well as we increase the number of
processors.
Processors0.20.81.21.82.2
Time
(sec)
Production Cost (Product, Scenario, Time)
Partition
Hash
Load
Aggregate
Total
Processors0.20.81.21.82.2
Time
(sec)
Production Cost (Product, Scenario, Time)
Partition
Hash
Load
Aggregate
Total
Figure
14: Various phases of cube construction using (a) hash-based (b) sort-based method for Production
Cost data (N= 270,000 records,
Processors0.51.52.53.54.55.56.57.5Time
(sec)
hash-based
Current Sales (Customer, Product, Channel)
Partition
Hash
Load
Aggregate
Total
Processors1.03.05.07.09.0
Time
(sec)
sort-based
Current Sales (Customer, Product, Channel)
Partition
Hash
Load
Aggregate
Total
Figure
15: Various phases of cube construction using (a) hash-based (b) sort-based method for Current Sale
data
Processors1.03.05.07.09.011.013.0
Time
(sec)
hash-based
(Customer, Product, Channel)
Partition
Hash
Load
Aggregate
Total
Processors1.03.05.07.09.011.013.0Time
(sec)
sort-based
(Customer, Product, Channel)
Partition
Hash
Load
Aggregate
Total
Figure
Various phases of cube construction using (a) hash-based (b) sort-based method for Current Sale
data
Processors1.03.05.07.09.0
Time
(sec)
Budget (Product, Customer, Time)
Partition
Hash
Load
Aggregate
Total
Processors1.03.05.07.09.0
Time
(sec)
Budget (Product, Customer, Time)
Partition
Hash
Load
Aggregate
Total
Figure
17: Various phases of cube construction using (a) hash-based (b) sort-based method for Budget data
Figure
gives the performance on History Sales data containing 4 attributes (4 dimensional base cube)
with more than a million records for 8, 16, 32 and 64 processors. The density of the cube is 1%. The hash-based
method performs better than the sort-based method for this case. The addition of a dimension increases
the stride factor for accesses for the sort-based loading algorithm, deteriorating the cache performance. The
hash-based method has no particular order of reference in the multidimensional array and benefits from a
better cache performance. It can be observed that for large data each component in cube construction scales
well as we increase the number of processors.
Processors1.03.05.07.09.011.0
Time
(sec)
HistSale(Product, Customer, Time, Channel)
Partition
Hash
Load
Aggregate
Total
Processors1.03.05.07.09.011.0
Time
(sec)
HistSale(Product, Customer, Time, Channel)
Partition
Hash
Load
Aggregate
Total
Figure
Various phases of cube construction using (a) hash-based (b) sort-based method for History Sales
data
Next, we compare the effect of density of the data sets on the data cube construction algorithm. The size
of the multi-dimensional array is determined by the number of unique values in each of the dimensions. Hence
the aggregation costs, which use the multi-dimensional array are not affected by the change in density as can
be seen from Figure 19 and Figure 20. The other phases of the data cube construction deal with the tuples
and the number of tuples increase as the density of the data set increases. The costs for partition, sort, hash
and the load phases increase because the number of tuples on each processor increases. The scalability for
both densities, and both hash-based and sort-based methods is good as observed from the figures.
Comparing the sort-based methods and the hash-based methods, we observe that the hash-based method
performs slightly better for 3D cubes but a lot better for the 4D case. We have used a multi-dimensional
Partition Hash Load Aggregate Total1.03.05.07.09.011.013.0
Time
(sec)
Current Sales,
(Customer, Product, Channel)
Partition Hash Load Aggregate Total1.03.05.07.0
Time
(sec)
Current Sales,
(Customer, Product, Channel)
Partition Hash Load Aggregate Total0.51.52.53.5Time
(sec)
Current Sales,
(Customer, Product, Channel)
Figure
19: Comparison of cube construction components for two different densities for the hash based method
Partition Sort Hash Load Aggregate Total1.03.05.07.09.011.013.015.0
Time
(sec)
Current Sales,
(Customer, Product, Channel)
Partition Sort Hash Load Aggregate Total0.51.52.53.54.55.56.57.5Time
(sec)
Current Sales,
(Customer, Product, Channel)
Partition Sort Hash Load Aggregate Total0.51.52.53.54.5
Time
(sec)
Current Sales,
(Customer, Product, Channel)
Figure
20: Comparison of cube construction components for two different densities for the sort based method
array and the outermost dimension of the array (the one changing the slowest) does not match the inner-most
sorted-dimension. The inner-most dimension is used for the attribute with the largest number of unique
values to make the aggregate calculations efficient. The sort-based loading algorithm starts with the inner-most
attribute in the sorted order which is also the smallest dimension. This also happens to be the outermost
dimension of the array having the maximum stride. This is done to make the accesses during the aggregate
calculation regular in the largest dimension, which is the innermost dimension. Chunking of arrays [14] can
make the memory accesses for the sort-based method more regular since it does not favor any particular
dimension for contiguous storage.
7 Aggregate Query Processing
Most data dimensions have hierarchies defined on them. Typical OLAP queries probe summaries of data
at different levels of the hierarchy. Consolidation is a widely used method to provide roll-up and drill-down
functions in OLAP systems. Hierarchies can be used for data mining at multiple levels in attribute oriented
approaches as discussed in a later section. Attribute-oriented induction [9] is performed for association rule
discovery by ascending a predefined concept hierarchy. Each dimension in a cube can potentially have a
hierarchy defined on it. This hierarchy can be applied to all the sub-cubes of the data cube. We discuss each
of these in the following subsections.
7.1 Hierarchies
Figure
shows an example of a hierarchy for a 3D base cube with (Location, Time, Person) as the attributes
(dimensions). Assume that hierarchies (City, Quarter, Group) are defined on these dimensions. Each dimension
represents an attribute and each value in that dimension is a distinct value for that attribute. A
hierarchy describing the grouping of some of the attribute values is defined in a dimension hierarchy. A hierarchy
can have several levels. Figure 21 defines a first level hierarchy on each dimension where (a
(b on. The distributed dimension can have its hierarchy distributed over a
processor boundary. A global index of the hierarchy is maintained at each processor. For example, cities in C3
are distributed across P 0 and P 1 in the figure, containing the indices for (a 7 ; a 8 ; a 9 ). A consolidation operation
would need a inter-processor communication if the consolidated value of C3 is required. Hierarchy at higher
levels can be defined similarly. Support for roll up operations using consolidation can then be provided along
each dimension. Drill downs can use them to index into the appropriate dimension index to provide a higher
level of detail.
A hierarchy is defined over a dimension in the base cube. Hence the sub-cubes of the data cube can use
the same hierarchy, since the dimensions in the sub-cubes are a subset of the dimensions in the base cube.
Additionally, more dimensions can get distributed over the processors, and a distributed hierarchy needs to
be maintained for these dimensions as well. In our example, in the cube (Time, Person) a 2D cube calculated
from (Location, Time, Person), Time is a distributed dimension on which a distributed hierarchy needs to be
maintained. As a result, each dimension has two hierarchies for it, one local and one distributed. Queries will
choose the appropriate hierarchies when performing operations on these cubes.
a a a a a
Person
a a a
c
c
c
c
a a a a a a a
c
c
c
c
C3 C4 C5
Q3
Q3
Location
Time
Figure
21: An example hierarchy defined on the dimensions for a two processor case
7.2 Consolidation
Consolidation provides an aggregate for the hierarchies defined on a dimension. For example, if it is desired to
report the value for group G1 for a city C1 in the quarter Q1, then the corresponding values are aggregated
by using the dimension hierarchy defined in the previous section. Some consolidation operations are local, as
in they can be performed at a single processor, like C4 in the figure. However, some operations are non-local,
like the values for city C3 in any quarter will need the aggregates values from both the processors as shown in
Figure
22. A inter-processor communication is needed to further aggregate the data to get the correct result.
local
Q3
Q3
Location
Time
Person
non-local
Figure
22: Consolidation for a level 1 hierarchy defined on the cube in Figure 21
7.3 Results
We again use the OLAP council benchmarks described earlier and define some sample hierarchies on each
dimension. Table 5 defines a sample hierarchy for the first two levels. For our experiments we have divided the
Dimension Hierarchy
Level 1 Level 2
Customer 9 4
Product 8 3
Channel
Time 8 2
Table
5: Sample level 1 and level 2 number of groups for hierarchies defined on the dimensions
size of a dimension equally among the number of groups defined for the hierarchy at that level. The allocation
of actual attribute values to the groups at a higher level is contiguous for these experiments. However, these
can be arbitrarily assigned, if desired.
Figure
23 shows the times for performing consolidation operation using the hierarchies on the dimensions.
For Current Sales we have used the level 1 hierarchy on Product and Customer. For History Sales data, the
hierarchy is used for all the dimensions, i.e. Product, Customer, Time and Channel. The figure for Budget
also includes hierarchies along all dimensions, Product, Customer and Time. We see good scaling properties
for each data set as the number of processors is increased.
Comparing the consolidation time for Current Sales and Budget, we observe that the time for Budget data
is lower even though their base cubes are similar in size. The presence of a hierarchy along the Time dimension,
which is the outermost dimension in the multi-dimensional array, improves the cache performance. Chunks of
size d 12
9 \Theta 9000
8 , from outermost to innermost dimension, are consolidated for Budget, whereas chunks
of size 9 \Theta 900
9 \Theta 9000
8 are consolidated for Current Sales. However, both scale well as the number of processors
is increased.
Time
(sec)
CurrSale
Consolidation Query
Time
(sec)
HistSale
Consolidation Query
Processors0.120.380.620.881.12Time
(sec)
Budget
Consolidation Query
Figure
23: Time for consolidation query using the hierarchies defined in Table 5 for Current Sales, History
Sales and Budget data sets
8 Data Mining on Data Cubes
Data mining techniques are used to discover patterns and relationships from data which can enhance our
understanding of the underlying domain. A data mining tool can be understood along the following components
data, what is analyzed ; statistics, the kind of patterns that are searched for by the tool; filtering, how many
of those patterns are to be presented to the user and the selection of those patterns; visualization, the visual
representation used to present the patterns to the user; interpretation, what should the user think about
when studying the pattern; exploration, in what order should the patterns be considered by the user; process
support, how does one support data mining as a process as opposed to an exercise done only once. Attribute
focusing(AF) is a data mining method that has most of these but in particular relies on exploration and
interpretation [5].
Discovery of quantitative rules is associated with quantitative information from the database. The data
cube represents quantitative summary information for a subset of the attributes. Attribute-oriented approaches
[5] [9] [10] to data mining are data-driven and can use this summary information to discover association rules.
Transaction data can be used to mine association rules by associating support and confidence for each rule.
Support of a pattern A in a set S is the ratio of the number of transactions containing A and the total number
of transactions in S. Confidence of a rule A ! B is the probability that pattern B occurs in S when pattern A
occurs in S and can be defined as the ratio of the support of AB and support of A. The rule is then described
as A ! B[support; confidence] and a strong association rule has a support greater than a pre-determined
minimum support and a confidence greater than a pre-determined minimum confidence. This can also be taken
as the measure of "interestingness" of the rule. Calculation of support and confidence for the rule A ! B
involve the aggregates from the cube AB, A and ALL. Additionally, dimension hierarchies can be utilized to
provide multiple level data mining by progressive generalization (roll-up) and deepening (drill-down). This is
useful for data mining at multiple concept levels and interesting information can potentially be obtained at
different levels.
Attribute Focusing calculates associations between attributes by using the notion of percentages and sub-
populations. The overall distribution of an attribute is compared with its distribution in various subsets of
data. If a certain subset of data has a characteristically different distribution for the focus attribute, then that
combination of attributes are marked as interesting.
An event, E is a string in which x j is a possible value for some attribute and x k is
a value for a different attribute of the underlying data. E is interesting to that x j 's occurrence depends on
the other x i 's occurrence. The ``interestingness'' measure is the size I j (E) of the difference between:
(a) the probability of E among all such events in the data set and,
(b) the probability that x 1 occurred independently. The condition of interestingness
can then be defined as I j (E) ? ffi, where ffi is some fixed threshold.
Another condition of interestingness, in attribute focusing depends on finding the optimal number of attribute
values, n formally described as I j (En
AF seeks to eliminate all but the most interesting events by keeping E only if the number of attribute values,
n, is just right. Eliminate one or more x i 's and I j decreases, include one ore more new x i 's to the string and
I j gets no larger. The convergence to n removes patterns like En\Gamma1 and En+1 which are less interesting than
En and have information already contained by En . Hence, as a result of this the user does not have to drill
down or roll up from a highlighted pattern, since the event descriptions returned are at their most interesting
level.
8.1 Attribute Focusing on data cubes
In this section we present an algorithm to compute the first measure of interestingness of the attribute focusing
method using data cubes. Figure 24 shows the algorithm.
Algorithm 5 Calculation of interestingness using data cubes
Step 1. Replicate each single attribute sub-cubes on all processors using a Gather followed by a Broadcast.
Step 2. Perform a Reduce operation of ALL (0D cube) followed by a Broadcast to get the correct value of ALL on all
processors.
Step 3. Take the ratio of each element of the AB sub-cube and ALL to get P (AB). Similarly calculate P (A) and P (B) using
the replicated sub-cubes A and B.
Step 4. For each element i in AB calculate jP compare it with a threshold ffi, setting AB[i] to 1 if it is
greater, else set it to 0.
Figure
24: Algorithm for calculating interestingness between attributes A and B with data cubes
Consider a 3 attribute data cube with attributes A, B and C, defining showing 2-way
associations, we will calculate the interestingness function between A and B, A and C and finally between B
and C. When calculating associations between A and B, the probability of E, denoted by P (AB) is the ratio
of the aggregation values in the sub-cube AB and ALL. Similarly the independent probability of A, P (A) is
obtained from the values in the sub-cube A, dividing them by ALL. P (B) is similarly calculated from B. The
calculation threshold ffi, is performed in parallel. Since the cubes AB and
A are distributed along the A dimension no replication of A is needed. However, since B is distributed in
sub-cube B, and B is local on each processor in AB, B needs to be replicated on all processors. AB and A cubes
are distributed, but B is replicated on all processors. Figure 25 shows a sample calculation of P(AB), P(A)
and P(B) on three processors. A sample calculation is, highlighted in the figure,
which is greater than ffi values from 0.001 to 0.01, and the corresponding attribute values are associated within
that threshold.
A A A
Figure
25: Use of aggregate sub-cubes AB, A and B for calculating "interestingness" on three processors
8.2 Results
We have used a few data sets from the OLAP council benchmark. In particular, Current Sales (3D), Bud-
get(3D) and History Sales (4D)(as described in previous sections).
We perform 2-way association calculations by performing attribute focusing for all combinations of two
attributes. For example, for a 3D cube, ABC, interestingness measure will be calculated between A and
B, A and C and between B and C. Typically, a few different ffi values are used for analysis of data, to
vary the degree of association between the attributes. We run each calculation for 20 different ffi values,
ranging from 0.001 to 0.02 in steps of 0.01. Figure 26 shows the time for these calculations on Current Sales
data on 4, 8, 16 and 32 processors. We observe good speedups as the number of processors is increased.
Also, communication time increases as the number of processors is increased. Replication of the 1D cubes
involve communication, and with larger number of processors, the terms involving p in the complexity of
the collective communication operations (refer to Table 2) increase. However, since communication time is
marginal compared to computation times, the increase does not affect the overall scalability.
Processors1.03.05.07.09.011.0Time
(sec)
CurrSale
Attribute Focusing
Processors2.06.010.014.0
Time
(msec)
CurrSale
Communication time for AF
Figure
26: Time for (a) attribute focusing time for 20 different ffi values for Current Sales data, (b) associated
communication cost (in milliseconds) on 4, 8, 16 and processors
Figure
shows the attribute focusing calculation time for the History Sales data. The associated communication
time is slightly higher in this case since 4 1D arrays are replicated, instead of 3 in the 3D case. The
communication time (which is shown in milliseconds) is still at least an order of magnitude smaller than the
computation time. The size of the cubes is smaller than the Current Sales data and hence the magnitudes of
time are much smaller. Hence, the speedups are more modest as we increase the number of processors.
Processors0.030.080.120.18Time
(sec)
HistSale
Attribute Focusing
Processors2.06.010.014.018.0Time
(msec)
HistSale
Communication Time for AF
Figure
27: Time for (a) attribute focusing for 20 different ffi values for History Sales data, (b) associated
communication cost (in milliseconds) on 8, 16 and processors
Figure
28 shows the speedups we observe for the Budget data for attribute focusing calculations. The
communication costs are similar to the ones observed in the Current Sales data since they involve similar sized
arrays.
Processors0.501.502.503.504.505.506.50Time
(sec)
Budget
Attribute Focusing Time
Processors1.03.05.07.09.011.013.015.017.019.021.0
Time
(msec)
Budget
Communication Time for AF
Figure
28: Time for (a) attribute focusing for 20 different ffi values for Budget data, (b) associated communication
cost (in milliseconds) on 8, 16, 32 and 64 processors
9 Conclusions
On-Line Analytical Processing is fast gaining importance for business data analysis using large amounts
of data. High performance computing is required to provide efficient analytical query processing in OLAP
systems. Aggregations are an important function of OLAP queries and can benefit from the data cube operator
introduced in [7]. Multidimensional databases have recently gained importance since they model the multi-dimensionality
of data intuitively and are easy to visualize. They provide support for complex analytical queries
and are amenable to parallelization. Most data to be analyzed comes from relational data warehouses. Hence
multidimensional databases need to interface with relational systems. In this article, we presented algorithms
and techniques for constructing multidimensional data cubes on distributed memory parallel computers and
perform OLAP and data mining operations on them. The two methods for base cube loading, sort-based
and hash-based, perform equally well on small data sets but the hash-based method is better for larger data
sets and with increase in number of dimensions. We would expect the sort-based method to outperform the
hash-based method for large amounts of data due to the regularity of accesses that cube loading from sorted
data provides. The mismatch in the order of the dimensions when using a multidimensional array does not
make the memory usage of the sort-method very efficient. Sort-based method is expected to be better for
external memory algorithms because it will result in reduced disk I/O over the hash-based method. Since
OLAP operations frequently require information at varying degree of detail, we have developed methods to
perform consolidation queries by defining levels of hierarchies on each dimension. Our results show that these
techniques are scalable for a large number of processors. Finally, we have shown a implementation of scalable
data mining algorithm using attribute focusing. Our techniques are platform independent and are portable
across a wide variety of parallel platforms without much effort.
We are currently investigating efficient sparse methods for multidimensional sparse arrays, disk-based
algorithms and techniques that apply parallel I/O optimizations to perform OLAP and data mining.
Acknowledgments
We would like to thank Inderpal Bhandari of IBM T.J Watson Research Center for discussions and helpful
comments.
--R
"Providing OLAP to user-analysts : An IT mandate"
"From data mining to knowledge discovery: An overview"
"Advanced Scout: Data Mining and Knowledge Discovery in NBA Data"
"A case study of software process improvement during development"
"Attribute Focusing: Data mining for the layman"
"Parallel Data Cube Construction for High Performance On-Line Analytical Process- ing"
"Data Cube: A Relational Aggregation Operator Generalizing Group-By, Cross-Tab, and Sub-Totals"
"An Introduction to Spatial Databases"
Discovery of Multiple-Level Association Rules from Large Databases
"Implementing Data Cubes Efficiently"
"Introduction to Parallel Computing: Design and Analysis of Algorithms"
"On Computing the Data Cube"
"Efficient Organization of Large Multidimensional Arrays"
"OLAP Council Benchmark"
"On the Performance of an Array-Based ADT for OLAP Workloads"
--TR
--CTR
Sanjay Goil , Alok Choudhary, High performance multidimensional analysis of large datasets, Proceedings of the 1st ACM international workshop on Data warehousing and OLAP, p.34-39, November 02-07, 1998, Washington, D.C., United States
Sanjay Goil , Alok Choudhary, High performance multidimensional analysis and data mining, Proceedings of the 1998 ACM/IEEE conference on Supercomputing (CDROM), p.1-2, November 07-13, 1998, San Jose, CA
Raymond T. Ng , Alan Wagner , Yu Yin, Iceberg-cube computation with PC clusters, ACM SIGMOD Record, v.30 n.2, p.25-36, June 2001
Muto , Masaru Kitsuregawa, A dynamic load balancing strategy for parallel datacube computation, Proceedings of the 2nd ACM international workshop on Data warehousing and OLAP, p.67-72, November 02-06, 1999, Kansas City, Missouri, United States
Ying Chen , Frank Dehne , Todd Eavis , Andrew Rau-Chaplin, Parallel ROLAP Data Cube Construction on Shared-Nothing Multiprocessors, Distributed and Parallel Databases, v.15 n.3, p.219-236, May 2004
Lixin Fu , Joachim Hammer, CubiST: a new algorithm for improving the performance of ad-hoc OLAP queries, Proceedings of the 3rd ACM international workshop on Data warehousing and OLAP, p.72-79, November 06-11, 2000, McLean, Virginia, United States
Ying Chen , Frank Dehne , Todd Eavis , Andrew Rau-Chaplin, PnP: sequential, external memory, and parallel iceberg cube computation, Distributed and Parallel Databases, v.23 n.2, p.99-126, April 2008
Frank Dehne , Todd Eavis , Susanne Hambrusch , Andrew Rau-Chaplin, Parallelizing the Data Cube, Distributed and Parallel Databases, v.11 n.2, p.181-201, March 2002
Hammer , Lixin Fu, CubiST++: Evaluating Ad-Hoc CUBE Queries Using Statistics Trees, Distributed and Parallel Databases, v.14 n.3, p.221-254, November
Frank Dehne , Todd Eavis , Andrew Rau-Chaplin, The cgmCUBE project: Optimizing parallel data cube generation for ROLAP, Distributed and Parallel Databases, v.19 n.1, p.29-62, January 2006
Alex A. Freitas, Understanding the Crucial Role of AttributeInteraction in Data Mining, Artificial Intelligence Review, v.16 n.3, p.177-199, November, 2001 | high performance;attribute focusing;data mining;parallel computing;data cube |
593470 | A Microeconomic View of Data Mining. | We present a rigorous framework, based on optimization, for evaluating data mining operations such as associations and clustering, in terms of their utility in decision-making. This framework leads quickly to some interesting computational problems related to sensitivity analysis, segmentation and the theory of games. | Introduction
Data mining is about extracting interesting patterns from raw data. There is some agreement
in the literature on what qualifies as a "pattern" (association rules and correlations [1, 2, 3, 5,
6, 12, 20, 21] as well as clustering of the data points [9], are some common classes of patterns
but only disjointed discussion of what "interesting" means. Most work on data
mining studies how patterns are to be extracted automatically, presumably for subsequent
human evaluation of the extent in which they are interesting. Automatically focusing on the
"interesting" patterns has received very limited formal treatment. Patterns are often deemed
"interesting" on the basis of their confidence and support [1], information content [19], and
unexpectedness [14, 18]. The more promising concept of actionability -the ability of the
pattern to suggest concrete and profitable action by the decision-makers [15, 17, 18], and on
the sound of it very close to our concerns in this paper- has not been defined rigorously or
elaborated on in the data mining literature.
We want to develop a theory of the value of extracted patterns. We believe that the
question can only be addressed in a microeconomic framework. A pattern in the data is
interesting only to the extent in which it can be used in the decision-making process of the
enterprise to increase utility. 1 Any enterprise faces an optimization problem, which can
generally be stated as
where D is the domain of all possible decisions (production plans, marketing strategies, etc.),
and f(x) is the utility or value of decision x 2 D. Such optimization problems are the object
of study in mathematical programming and microeconomics. 2
The feasible region D and the objective f(x) are both comparably complex components
of the problem -and classical optimization theory often treats them in a unified way via
Lagrange multipliers and penalty functions [7]. However, from our point of view there is
a major difference between the two: We assume that the feasible region D is basically
endogenous to the enterprise, while the objective function f(x) is a function that reflects the
enterprise's interaction with a multitude of other agents in the market (customers, suppliers,
To quote [8], "merely finding the patterns is not enough. You must be able to respond to the patterns, to
act on them, ultimately turning the data into information, the information into action, and the action into
value."
2 There is such an optimization problem associated with virtually every enterprise; however in real life
such problems are so involved and complex, that often nobody knows exactly their detailed formulation.
The decision-makers of the enterprise base their decisions on a very rough, approximate, and heuristic
understanding of the nature and behavior of the underlying optimization problem.The fact that the details
of the optimization problem being solved are nebulous and unknown to the decision-makers does not make
the problem less real -or its mathematical study less useful. In fact, economic theory during this century
has flourished on models such as these, in which the precise nature of the functions involved is essentially
unknowable; the mathematical insights derived from the abstract problem are still valuable as heuristic
guides in decision-making.
employees, competitors, the rest of the world). That is, at a first approximation the objective
function can be rewritten as
where C is a set of agents or other factors influencing the utility of the enterprise. We shall be
calling elements of C "customers." We shall be deliberately vague on what they are. There
are two different possible views here: On a concrete level, we can think of them as profiles of
customers and other relevant agents, about whom we have gathered relevant information by
a first stage of data mining; it is this first stage that our point of view seeks to influence and
direct. A more abstract, but potentially equally useful, point of view is that, alternatively,
we can also think of the elements of C as rows of the raw table being mined -customers,
transactions, shipments, and so on.
What makes this relevant to data mining is the following crucial assumption: We assume
that the contribution of customer i to the utility of the enterprise under decision x, f i (x), is
in fact a complicated function of the data we have on customer i. Let y i denote the data we
have on customer i (the ith row of the table); then f i (x) is just g(x; y i ), some fixed function
of the decision and the data. Hence, our problem is to
The conventional practice in studying such problems is to replace
y is some aggregate value 3 of the customers' data (aggregate demand of a product,
aggregate consumer utility function, etc. Such aggregation is well-known to be inaccurate,
resulting in suboptimal decisions, because of non-linearities (non-zero second partial deriva-
tives) in the function g(x; y i ). Aggregation had been tolerated in traditional microeconomics
because (1) the computational requirements otherwise would be enormous, and (2) it is difficult
to obtain the data y i . The point in data mining, in our view, is that we now have the
computational power and wealth of data necessary to attack the unaggregated optimization
problem, to study the intricate ways in which correlations and clusters in the data affect the
enterprise's optimal decisions.
Our goal in this paper is to study certain aspects of data mining from these perspectives
data mining in the context of economically motivated optimization problems, with a
large volume of unaggregated data. The framework and models that we develop from these
perspectives touch on a range of fundamental issues in combinatorial optimization, linear
programming, and game theory; we feel that they suggest some of the first steps in a research
agenda aimed at assessing quantitatively the utility of data mining operations.
3 We use "aggregate" in its microeconomics usage - summary of a parameter over a large population -
which is related but not identical to its technical meaning in databases.
Structure of the rest of the paper
In Section 2 we present three examples which illustrate our point of view, and identify and
explore its various aspects: We show by a simple example how nonlinearity is an essential
aspect of interestingness; we point out that the important operations of clustering and market
segmentation are affected (and in fact defined) by microeconomic considerations; and we
indicate ways in which such considerations can affect the relational semantics of the mined
database. Motivated by the second of these examples, in Section 3 we introduce a novel and
interesting genre of problems, called segmentation problems, which capture in a crisp and
stylized form the clustering aspect of data mining. One can define a segmentation problem
(in fact, several versions) for any conventional optimization problem; we focus on a few
natural ones with obvious data-mining flavor and interest. We show that even some of the
simplest possible segmentation problems are NP-complete; however, they can be solved in
time linear in the number of customers. In the Section 4 we show how optimization theory
(in particular, linear programming sensitivity analysis) can be employed to develop tangible
criteria of "interestingness" for data mining operations.
Up to this point in the paper, we consider a single enterprise interested in mining its
data to derive value. In Section 5, we turn to the problem of two competing enterprises each
trying to segment a common market, adopting a set of policies to the segments they target.
Building on the classical setting of game theory, we develop a notion of segmented matrix
games to model this setting. This quickly leads to a number of novel (and largely unsolved)
issues in computational game theory.
In related work [13] in the area of discrete algorithms and complexity theory 4 , we have
studied approximation algorithms for some of the most basic segmentation problems that
arise from our framework. This leads to interesting connections with classical problems of
combinatorial optimization - such as facility location and the maximization of submodular
functions - and to settings in which one can concretely analyze the power of methods such
as random sampling and greedy iterative-improvement algorithms. We refer the reader to
[13] for further details.
Three examples
We pointed out above that aggregation is especially unsatisfactory and inaccurate when the
cost function g(x; y i ) is nonlinear in y i . The next two anecdote-based examples illustrate
certain interesting and common kinds of nonlinearities. The third example, based on the
first, illustrates some of the more subtle ways in which the semantics of the underlying
database can affect our objective in searching for correlations and nonlinearities.
Example 1: Beer and Diapers. 5 Suppose that a retailer stocks two products in quantities
4 Or, as we might say, targeted at the complexity segment of the readership!
5 The correlation between the amount of beer and the amount of diapers bought by consumers is one of
the amounts to be stocked are the only decision variables, bounded above
by capacity: c. The profit margins in the two products are m 1 and m 2 . We have
a table with 0-1 values (y 1;i ; y i;2 ) for each customer indicating whether the customer
will buy a unit of each of the products. That is, in this toy example demand is known
deterministically.
In the first scenario, customers arrive in random order, and buy whatever part of their
desired basket is available. The revenue of the enterprise is in this case a function of x 1 , x 2 ,
and the aggregate demands Y
\Deltay i;2 . Aggregation would
not distort the optimal decision, and data mining is moot.
But suppose that the customers arrive in random order, and buy their desired basket
in an all-or-nothing fashion; if not all items are available, the customer buys nothing. The
expected profit for the enterprise from customer i is now of the form
. Because of the nonlinear term, associations between the y 1;i and the y i;2 columns
are now important, and the optimum decision by the enterprise depends critically on them.
Aggregation will no longer do the trick, and data mining is desirable, even necessary.
We propose that associations and correlations between attributes in a table are interesting
if they correspond to nonlinear terms in the objective function of the enterprise, that is,
for the cost function g and some attributes y This sheds an interesting
and novel light on data mining activities, and begs the development of a quantitative
mathematical theory of "interestingness", based on mathematical programming. We start
on this path in Section 4.
Example 2: Market Segmentation. Telephone companies in the U.S.A. have divided
their customers into two clusters: residence and business customers; they offer different terms
and prices to the two. How good is this segmentation? And are there automatic ways to
discover such profitable segmentations of a market?
Suppose that an enterprise has decided to subdivide its market into two segments, and
apply a different marketing strategy to each segment. 6 For the purpose of the present
discussion, it is not necessary to determine in detail what such a strategy consists of - the
enterprise may offer different terms and prices to each segment, or send a different catalog
to each segment. Thus, the decision space of the enterprise is now D 2 , where D is the set of
all possible strategies. For each customer i and decision x 2 D, the enterprise reaps a profit
of c i \Delta x; i.e. for simplicity, we are assuming the profit is linear. For each pair of
strategies adopted, the enterprise subdivides the set C of its customers into those i for which
whom the enterprise will apply strategy x 1 ), and the rest. That is, the
function f i (x) is now
the delightful nuggets of data mining lore.
6 This can of course generalized to k segments, or to an undetermined number of segments but with a
fixed cost associated with the introduction of each segment; see Section 3.
which is an interesting form of non-linearity. The enterprise adopts the pair of policies
Instead of experimenting with arbitrary plausible clusterings of the data to determine if
any of them are interesting and profitable, the enterprise's data miners arrive at the optimum
clustering of C into two sets - those presented with strategy x 1 and those presented
with x 2 - in a principled and systematic way, based on their understanding of the enter-
prise's microeconomic situation, and the data available on the customers. We further explore
segmentation, and the computational complexity of the novel problems that it suggests in
Section 3, and from the standpoint of approximability in [13].
Example 3: Beer and Diapers, Revisited. 7 Let us now formulate a more elaborate
data-mining situation related to that of Example 1. Suppose that a retailer has a database
of past transactions over a period of time and over many outlets, involving the sales of several
items. Suppose further that the database is organized as a relation with these attributes:
transaction(location, dd, mm, yy, tt, item1, location
is the particular outlet where the sale occurred, dd, mm, yy, tt records the day and time
the sale occurred, and itemi is the amount of item i in the transaction. We wish to data
mine this relation with an eye towards discovering correlations that will allow us to jointly
promote items. Analyzing correlations between columns over the whole table is a central
current problem in data mining (see, for example, [12]). However, in this example we focus
on a more subtle issue: Correlations in horizontal partitions of the table (i.e., restrictions of
the relation, subsets of the rows).
In a certain rigorous sense, mining correlations in subsets of the rows is ill-advised: there
are so many subsets of rows that it is very likely that we can find a subset exhibiting strong
correlations between any two items we choose! Obviously, we need to restrict the subsets
of rows for which correlations are meaningful. We posit that defining the right restrictions
must take explicitly into account the ways in which we plan to generate revenue by
exploiting the mined correlations. For example, suppose that the actions we contemplate
are joint promotions of items at particular stores. Then the only restrictions that are legitimate
are unions of ones of the form transaction[location = 'Palo Alto']. If, in
addition, it is possible to make to target promotions at particular times of the day, then
restrictions of the form transaction[location = 'Palo Alto' and 12 !tt] are legiti-
mate. If we can target promotions by day of the week, then even more complex restrictions
such as transaction[location= 'Palo Alto' and
'Monday'] may be allowed. The point is that the sets of rows on which it is meaningful
to mine correlations -the targetable restrictions of the relation- depend very explicitly on
actionability considerations.
7 This example and the research issues it suggests are the subject of on-going joint work with Rakesh
Agrawal.
Furthermore, the actions necessary for exploiting such correlations may conflict with each
other. For example, it may be impossible to jointly promote two overlapping pairs of items, or
we may have a realistic upper bound on the number of joint promotions we can have in each
store. Or we may have a measure of the expected revenue associated with each correlation
we discover, and these estimates may in fact interact in complex ways if multiple actions
on correlations are discovered. We wish to find a set of actions that generates maximum
revenue. This point of view leads to interesting and novel optimization problems worthy of
further study in both complexity and data mining.
3 Market Segmentation
Consider any optimization problem with linear objective function
c \Delta x:
Almost all combinatorial optimization problems, such as the minimum spanning tree prob-
lem, the traveling salesman problem, linear programming, knapsack, etc., can be formulated
in this way. Suppose that we have a very large set C of customers, each with his/her own
version c i of the objective vector. We wish to partition C into k parts C so that we
maximize the sum of the optima
Problem (3) captures the situation in which an enterprise wishes to segment its customers into
clusters, so that it can target a different marketing strategy - e.g. a different advertising
campaign, or a different price scheme - on each cluster. It seems a very hard problem, since
it requires optimization over all partitions of C, and therefore computation exponential in n.
Consider now the problem in which we wish to come up with k solutions x
so as to maximize the quantity
In contrast to problem (3), problem (4) can be solved exhaustively in time O(nm k ), where
m is the number of solutions; despite its exponential dependence on k, and its dependence
on m which is presumably substantial, it is linear in n, which is assumed here to be the
truly large quantity. As we shall see in Section 3.2 the exponential dependence on k and
the dependence on m seems inherent, even when the underlying optimization problem is
extremely simple.
It is easy to see that problems (3) and (4) are equivalent. The intuitive reason is that
they are max-max problems, and therefore the maximization operators commute. That is, in
order to divide the customers in k segments, all we have to do is come up with k solutions, and
then classify each customer to one of k segments, depending on which solution is maximum
for this customer. The computational implications of this observation are very favorable,
since O(m k n), the time naively needed for (4), is much better than O(m2 nk ).
There is another variant of the general segmentation problem, arguably more realistic, in
which we are seeking to choose k solutions x of our choice,
to minimize
where fl is the cost of adding another solution and segment. Like problem (4), problem (5)
can be solved exhaustively in time that is linear in n, with a larger dependence on m and k.
Problems (3) (or (4)) and (5) constitute a novel genre of problems, which we call segmentation
problems. These problems are extremely diverse (we can define one for each classical
optimization problem). We believe that they are interesting because they capture the value
of clustering as a data mining operation. Clustering is an important problem area of algorithmic
research that is also of significant interest to data mining -which it predates.
One of the main motivations of clustering has been the hope that, by clustering the data in
meaningfully distinct clusters, we can then proceed to make independent decisions for each
cluster. To our knowledge, this is the first formalism of clustering that explicitly embodies
this motivation.
3.1 Specific problems
There is no end to the problems we can define in this way: The minimum spanning tree
segmentation problem, the TSP segmentation problem, the linear programming
segmentation problem, and so on -and at least three variants of each. There are
a few of these problems, however, that seem especially natural and compelling, in view of
the data-mining motivation (we only give the fixed k version of
hypercube segmentation: Given n vectors in c and an integer k,
find a set of k vectors x to maximize the sum
This problem captures the situation in which we know the preferences of n customers on
d components of a product, for which there is a binary choice for each component. We wish
to develop k semi-customized versions of the product, so as to maximize the total number
of customer-component pairs for which the customer likes the component of the variant he
or she chooses.
Another interesting segmentation problem is
catalog segmentation: Given n vectors in c find
a set of k vectors x each with exactly r ones, to maximize the sum
In this case, we know the interests of each customer, and we wish to mail k customized
catalogs, each with r pages, to maximize total hit (i.e. the total number of pages of interest
to customers).
3.2 Complexity
Even the most trivial optimization problems (e.g., maximizing a linear function over the d-dimensional
whose ordinary version can be solved by aligning the solution with the cost
vector) become NP-complete in their segmentation versions. We summarize the complexity
results below:
Theorem 3.1 The segmentation problems (all three versions) corresponding to the following
feasible sets D are NP-complete: (1) The d-dimensional unit ball, even with
d-dimensional unit L 1 ball; (3) the r-slice of the d-dimensional hypercube (the catalog
segmentation problem), even with the d-dimensional hypercube, even with
the set of all spanning trees of a graph G, even with 2.
Notice that the optimization problems underlying these problems are extremely
easy: The one underlying (1) can be solved by aligning the solution with the cost vector, the
one for (2) has only 2d vertices, the one for (3) can be solved by choosing the r most popular
elements, and the one for (4) by simply picking the vertex that coordinate-wise agrees in
sign with the cost vector. Since (2) has 2d vertices it can be solved in O((2d) k n) time, which
is polynomial when k is bounded.
The NP-completeness reductions are surprisingly diverse: (1) is proved by a reduction
from max cut, (2) from hitting set, (3) from bipartite clique, and (4) from maximum
satisfiability with clauses that are equations modulo two. Finally, for spanning tree
segmentation we use a reduction from hypercube segmentation (the latter problem is
essentially a special case of the former, in which the graph is a path with two parallel edges
between each pair of consecutive nodes).
Here we sketch only the proof of (1). Suppose that we have a graph direct its
edges arbitrarily, and consider the node-edge incidence matrix of G (the jV j \Theta jEj matrix with
the (i; th entry equal to 1 if the j th edge enters the i th node, \Gamma1 if the j th edge leaves the i th
node, and 0 otherwise). Let the jV j rows of this matrix define the cost vectors fv
of the segmentation problem. Thus, we seek to divide these jV j vectors into two sets, S 1 and
choose an optimal solution for each set. Let oe i denote the sum of the vectors in the
set S i , for 2. Since D is the unit ball, an optimal solution for S i is simply the unit
vector in the direction of oe i , and hence the value of the solution associated with
simply the sum of the Euclidean norms, koe However, it is easy to see that for any
partition of the vertices, koe is twice the square root of the number of edges
in the cut (S 1 (because in the two sums the only entries that do not cancel out are the
ones that correspond to edges in the cut); hence, solving the segmentation problem is the
same as finding the maximum cut of the graph. 2
When the problem dimension is fixed, most of these problems be solved in polynomial
time:
Theorem 3.2 Segmentation problems (2-5) in the previous theorem can be solved in linear
time when the number of dimensions is fixed. Problem (1) (the unit ball) can be solved in
time O(n 2 in two dimensions, and is NP-complete (for variable k) in three dimensions.
When the number of dimensions is a fixed constant d, the number of extreme
solutions in each problem (2-5) is constant (2d,
r
Thus the
number of all possible sets of k solutions is also a bounded constant, call it c; obviously, such
problems can be solved in time proportional to cn. For (1), the 2-dimensional algorithm is
based on dynamic programming, while the NP-completeness proof for is by a reduction
from a facility location problem. 2
4 Data Mining as Sensitivity Analysis
The field of sensitivity analysis in optimization seeks to develop principles and methodologies
for determining how the optimum decision changes as the data change. In this section we give
an extensive example suggesting that many common data mining activities can be fruitfully
analyzed within this framework.
To fix ideas, we shall consider the case in which the optimization problem facing the
enterprise is a linear program [10, 16], that is, we have an m \Theta n matrix A (the constraint
n), an m-vector b (the resource bounds), and an n-row vector c (the objective
function coefficients), and we seek to
c \Delta x: (1)
The columns of A -the components of x- are called activities, and the rows of A are
called constraints. Extensions to non-linear inequalities and objectives are possible, with the
Kuhn-Tucker conditions [7] replacing the sensitivity analysis below.
We assume, as postulated in the introduction, that the entries of A and b are fixed and
given (they represent the endogenous constraints of the enterprise), while the coefficients
of c depend in complex ways on a relation, which we denote by C (we make no distinction
between the relation C, and its set of rows, called customers). The ith tuple of C -the ith
customer- is denoted y i , and we assume that c j is just
is a function
mapping the product of the domains of C to the reals. We noted in the introduction that the
desirability of data mining depends on whether the functions f j are "non-linear;" we shall
next formalize what exactly we mean by that.
Suppose that the function f j (y
linear, and thus appropriate single-attribute aggregates (in particular, averages) of the table
fy i g will accurately capture the true value of c j . For example, if f
all we need in order to compute c j is the average values of the first two columns of C. If
then we say that f j is nonlinear.
Assume that all attributes of the relation C are real numbers in the range [0; 1], and
that f j depends on two attributes, call them k j and ' j (extending to more general situations
is straightforward, but would make our notation and development less concrete and more
cumbersome). We also assume that we have an estimate D j - 0 on the absolute value of the
derivative
. means that f j is nonlinear. We investigate under what circumstances
it is worthwhile to measure the correlations of the pair of attributes corresponding
to the coefficient c j -that is to say, to data mine the two attributes related to the jth
activity. Without data mining, the coefficient c j will be approximated by the function f j of
the aggregate values of the attributes k j and ' j .
Suppose that we have solved the linear program (1) of the enterprise, based on the
aggregate estimation of the c j 's. This means that we have chosen a subset of m out the n
activities, set all other activities at zero level, and selected as the optimum level of the kth
chosen activity the kth component of the vector B
here by B we denote the square nonsingular submatrix of A corresponding to the m chosen
activities, and by c B the vector c restricted to the m chosen activities. It is the fundamental
result in the theory of linear programming that, if a square submatrix B is nonsingular and
satisfies these two inequalities, and only is the optimum. Matrix B
the simplex tableau, a matrix maintained by the simplex algorithm. The important question
for us is the following: Under what changes in the c j 's will the chosen level of activities
continue to be optimal?
The theory of sensitivity analysis of linear programming [10, 16] answers this question
precisely: If the c j 's are changed to new values c 0
, then the optimal solution remains the same
if and only if the condition c 0 \Gammac 0
A is the simplex tableau.
That is, if each coefficient c j is changed from its value c j , calculated based on aggregated
data, to its true value c 0
based on raw data, the optimum decision of the enterprise remains
the same under the above conditions. This suggests the following quantitative measure of
"interestingness" vis 'a vis data mining of the jth activity:
Definition 4.1 For each activity j, define its interestingness I j as follows:
I
where the c i 's are defined as above. Notice that both terms in I j may be infinite; our convention
is that, if D I j is zero.
The larger I j is, the more likely it is that mining correlations in the attributes k j and ' j
will reveal that the true optimum decision of the enterprise is different from the one arrived
at by aggregation. To put it qualitatively:
An activity j is interesting if the function f j has a highly non-linear cross-term, and either
c j is small, or the jth row of the tableau has large positive coefficients at columns with small
's.
As the above analysis suggests, our point of view, combined with classical linear programming
sensitivity analysis, can be the basis of a quantitative theory for determining
when data mining can affect decisions, ultimately a theory for predicting the value of data
mining operations.
5 Segmentation in a Model of Competition
So far we have considered the data mining problems faced by a single enterprise trying to
optimize its utility. But it is also natural to consider data mining in a setting that involves
competition among several enterprises; to indicate some of the issues that arise, we consider
the classical framework of two-player games. Recall that in classical game theory, such a
game involves two players: I with m strategies and II with n strategies. The game is defined
in terms of two m \Theta n matrices A; B, where A ij 2 R is the revenue of Player I in the case
that I chooses strategy i and II chooses strategy j; the matrix B is defined similarly in terms
of Player II. Such games have been studied and analyzed in tremendous depth in the area
of game theory [4].
To add a data mining twist to the situation, suppose that two corporations I and II each
have a fixed set of m and n marketing strategies, respectively, for attracting consumers.
Each combination of these strategies has a different effect on each consumer, and we assume
that both corporations know this effect. Thus, the set C of customers can be thought of as a
set of , where the (i; th entry
of A k is the amount won by I if I chooses strategy i and II chooses strategy j with respect to
customer k; similarly for B k and II.
The two corporations are going to come up with segmented strategies. Player I partitions
the set of customers C into k sets, and chooses a row-strategy for each set; similarly, Player II
partitions C into ' sets, and chooses a column-strategy for each set. Thus, the strategy space
of the players is the set of all partitions of the N customers into k and ' sets, respectively.
The classical theory of games tells us that there is in general a mixed equilibrium, in which
each player selects a linear combination (which can be viewed as a probability distribution)
over all possible segmentations of the market. Under these choices, each player is doing "the
best he can": neither has an incentive to alter the mix of strategies he has adopted. This can
be viewed as an existential result, a definition of rational behavior, rather than a concrete
and efficient computational procedure for determining what each player should do.
Example 4: Catalog Wars. Suppose that the strategy space of Player I consists of all
possible catalogs with p pages to be mailed, and similarly for Player II, where each corporation
has a different set of alternatives for each page of the catalog. Each corporation knows which
alternatives each given customer is going to like, and a corporation attracts a customer if the
corporation's catalog contains more pages the customer likes than the competitor's catalog
For each customer, we will say that the corporation that attracts the customer has a payoff
of +1, while the competitor has a payoff of \Gamma1; the payoff will be zero in the case of a tie.
Thus, in this hypothetical case, each individual customer is a zero-sum game between the
corporations.
Each corporation is going to mail out a fixed number k of versions of the catalog, with
each customer getting one version from each. The overall zero sum game has as strategy
space for each player the set of all possible k-tuples of catalogs. The payoff for Player I of
each pair of k-tuples, in the set-up above, is the number of customers who like more pages
from some of the k catalogs of Player I than from any of the catalogs of Player II, minus the
corresponding number with the roles of Players I and II interchanged.
There are many game-theoretic and computational issues suggested by such market segmentation
games. Under what conditions is the existence of a pure Nash equilibrium guar-
anteed? What is the computational complexity of finding a mixed equilibrium?
6 Conclusions and Open Problems
We are interested in a rigorous framework for the automatic evaluation of data mining
operations. To this end, we have proposed a set of principles and ideas, and developed
frameworks of four distinct styles. Our framework of optimization problems with coefficients
depending nonlinearly on data, and our definition of interestingness within this framework
(Section 4), should be seen as an example of the kinds of theories, methodologies, and tools
that can be developed; we have refrained from stating and proving actual results in that
section exactly because the potential range of interesting theorems that are straightforward
applications of these ideas is too broad. The segmentation problems we study in Section 3
are also meant as stylized and abstract versions of the kinds of computational tasks that
emerge in the wake of our point of view. The more database-theoretic concept of targetable
restrictions of databases introduced in Example 3 needs further exploration. Finally, we
have only pointed out the interesting models and problems that arise if segmentation is seen
in a context involving competition.
The technical and model-building open problems suggested by this work are too many
to list exhaustively here. For example: What interesting theorems can be stated and proved
within the sensitivity analysis framework of Section 4? Are there interesting and realistic
segmentation problems that are tractable, or for which fast and effective heuristics can
be developed? How does one model temporal issues within this framework (we can view
problem faced by the enterprise as a Markov Decision Process [11]), and what insights result?
More importantly, what new ideas are needed in order to apply our framework in realistic
situations, in which the precise nature of the enterprise's decision problem is murky, and the
data on customers incomplete, unreliable, and only very implicitly containing information on
the parameters of interest (such as revenue resulting from each possible marketing strategy)?
Finally, we have focused on data mining as an activity by a revenue-maximizing enterprise
examining ways to exploit information it has on its customers. There are of course many
important applications of data mining - for example, in scientific and engineering contexts
- to which our framework does not seem to apply directly. However, even in these applications
it is possible that insight can be gained by identifying, articulating quantitatively, and
taking into account the goals and objectives of the data mining activity.
--R
"Mining association rules between sets of items in a large database."
"Fast discovery of association rules."
Fast algorithms for mining association rules.
Handbook of Game Theory
"Dynamic itemset counting and implication rules for market basket data"
"Beyond Market Baskets: Generalizing Association Rules to Correlations."
Nonlinear Programming: Analysis and Methods.
Data Mining Techniques.
"Data mining: An overview from a database perspective."
Finite State Markov Decision Processes.
"Data mining, hypergraph transversals, and machine learning"
"Segmentation problems,"
"Post-analysis of learned rules."
"A comparison of approaches for maximizing business payoff of prediction models"
Combinatorial Optimization: Algorithms and Complexity (second edition).
"The interestingness of deviations."
"What makes patterns interesting in knowledge discovery systems ."
"Rule induction using information theory."
Mining generalized association rules.
Sampling large databases for finding association rules.
--TR
--CTR
Martin Ester , Rong Ge , Wen Jin , Zengjian Hu, A microeconomic data mining problem: customer-oriented catalog segmentation, Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, August 22-25, 2004, Seattle, WA, USA
Tom Brijs , Bart Goethals , Gilbert Swinnen , Koen Vanhoof , Geert Wets, A data mining framework for optimal product selection in retail supermarket data: the generalized PROFSET model, Proceedings of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.300-304, August 20-23, 2000, Boston, Massachusetts, United States
Ali Amiri, Customer-oriented catalog segmentation: effective solution approaches, Decision Support Systems, v.42 n.3, p.1860-1871, December 2006
Jon Kleinberg , Christos Papadimitriou , Prabhakar Raghavan, Segmentation problems, Journal of the ACM (JACM), v.51 n.2, p.263-280, March 2004
Jianying Hu , Aleksandra Mojsilovic, High-utility pattern mining: A method for discovery of high-utility item sets, Pattern Recognition, v.40 n.11, p.3317-3324, November, 2007
Hong Yao , Howard J. Hamilton, Mining itemset utilities from transaction databases, Data & Knowledge Engineering, v.59 n.3, p.603-626, December 2006
Heikki Mannila, Theoretical frameworks for data mining, ACM SIGKDD Explorations Newsletter, v.1 n.2, January 2000
Tom Brijs , Gilbert Swinnen , Koen Vanhoof , Geert Wets, Building an Association Rules Framework to Improve Product Assortment Decisions, Data Mining and Knowledge Discovery, v.8 n.1, p.7-23, January 2004
Tom Brijs , Gilbert Swinnen , Koen Vanhoof , Geert Wets, Using association rules for product assortment decisions: a case study, Proceedings of the fifth ACM SIGKDD international conference on Knowledge discovery and data mining, p.254-260, August 15-18, 1999, San Diego, California, United States
Dharmendra S. Modha , W. Scott Spangler, Feature Weighting in k-Means Clustering, Machine Learning, v.52 n.3, p.217-237, September
Cuiping Li , Beng Chin Ooi , Anthony K. H. Tung , Shan Wang, DADA: a data cube for dominant relationship analysis, Proceedings of the 2006 ACM SIGMOD international conference on Management of data, June 27-29, 2006, Chicago, IL, USA
Raymond Chi-Wing Wong , Ada Wai-Chee Fu , Ke Wang, Data Mining for Inventory Item Selection with Cross-Selling Considerations, Data Mining and Knowledge Discovery, v.11 n.1, p.81-112, July 2005
Inderjit S. Dhillon , Dharmendra S. Modha, Concept Decompositions for Large Sparse Text Data Using Clustering, Machine Learning, v.42 n.1-2, p.143-175, January-February 2001
Ioannis N. Kouris , Christos H. Makris , Athanasios K. Tsakalidis, Using information retrieval techniques for supporting data mining, Data & Knowledge Engineering, v.52 n.3, p.353-383, March 2005 | clustering;optimization;market segmentation |
593484 | Parallel Formulations of Decision-Tree Classification Algorithms. | Classification decision tree algorithms are used extensively for data mining in many domains such as retail target marketing, fraud detection, etc. Highly parallel algorithms for constructing classification decision trees are desirable for dealing with large data sets in reasonable amount of time. Algorithms for building classification decision trees have a natural concurrency, but are difficult to parallelize due to the inherent dynamic nature of the computation. In this paper, we present parallel formulations of classification decision tree learning algorithm based on induction. We describe two basic parallel formulations. One is based on Synchronous Tree Construction Approach and the other is based on Partitioned Tree Construction Approach. We discuss the advantages and disadvantages of using these methods and propose a hybrid method that employs the good features of these methods. We also provide the analysis of the cost of computation and communication of the proposed hybrid method. Moreover, experimental results on an IBM SP-2 demonstrate excellent speedups and scalability. | Introduction
Classification is an important data mining problem. A classification problem has
an input dataset called the training set which consists of a number of examples
each having a number of attributes. The attributes are either continuous, when
the attribute values are ordered, or categorical, when the attribute values are un-
ordered. One of the categorical attributes is called the class label or the classifying
attribute. The objective is to use the training dataset to build a model of the class
label based on the other attributes such that the model can be used to classify
new data not from the training dataset. Application domains include retail target
marketing, fraud detection, and design of telecommunication service plans. Several
classification models like neural networks [17], genetic algorithms [11], and decision
trees [20] have been proposed. Decision trees are probably the most popular since
they obtain reasonable accuracy [9] and they are relatively inexpensive to compute.
Most current classification algorithms such as C4.5 [20], and SLIQ [18] are based
on the ID3 classification decision tree algorithm [20].
In the data mining domain, the data to be processed tends to be very large.
Hence, it is highly desirable to design computationally efficient as well as scalable
algorithms. One way to reduce the computational complexity of building a decision
tree classifier using large training datasets is to use only a small sample of the
training data. Such methods do not yield the same classification accuracy as a
decision tree classifier that uses the entire data set [24, 5, 6, 7]. In order to get
reasonable accuracy in a reasonable amount of time, parallel algorithms may be
required.
Classification decision tree construction algorithms have natural concurrency, as
once a node is generated, all of its children in the classification tree can be generated
concurrently. Furthermore, the computation for generating successors of a
classification tree node can also be decomposed by performing data decomposition
on the training data. Nevertheless, parallelization of the algorithms for construction
the classification tree is challenging for the following reasons. First, the shape
of the tree is highly irregular and is determined only at runtime. Furthermore,
the amount of work associated with each node also varies, and is data dependent.
Hence any static allocation scheme is likely to suffer from major load imbalance.
Second, even though the successors of a node can be processed concurrently, they
all use the training data associated with the parent node. If this data is dynamically
partitioned and allocated to different processors that perform computation
for different nodes, then there is a high cost for data movements. If the data is not
partitioned appropriately, then performance can be bad due to the loss of locality.
In this paper, we present parallel formulations of classification decision tree learning
algorithm based on induction. We describe two basic parallel formulations. One
is based on Synchronous Tree Construction Approach and the other is based on Partitioned
Tree Construction Approach. We discuss the advantages and disadvantages
of using these methods and propose a hybrid method that employs the good features
of these methods. We also provide the analysis of the cost of computation and
communication of the proposed hybrid method. Moreover, experimental results on
an IBM SP-2 demonstrate excellent speedups and scalability.
2. Related Work
2.1. Sequential Decision-Tree Classification Algorithms
Most of the existing induction-based algorithms like C4.5 [20], CDP [1], SLIQ [18],
and SPRINT [21] use Hunt's method [20] as the basic algorithm. Here is a recursive
description of Hunt's method for constructing a decision tree from a set T of training
cases with classes denoted fC 1
g.
Case 1 T contains cases all belonging to a single class C j . The decision tree for
T is a leaf identifying class C j .
Case 2 T contains cases that belong to a mixture of classes. A test is chosen,
based on a single attribute, that has one or more mutually exclusive outcomes
On g. Note that in many implementations, n is chosen to be 2 and
this leads to a binary decision tree. T is partitioned into subsets T
contains all the cases in T that have outcome O i of the chosen test.
The decision tree for T consists of a decision node identifying the test, and one
Outlook Temp(F) Humidity(%) Windy? Class
sunny
sunny
sunny 85 85 false Don't Play
sunny 72 95 false Don't Play
sunny 69 70 false Play
overcast 72 90 true Play
overcast 83 78 false Play
overcast
overcast 81 75 false Play
rain 71 80 true Don't Play
rain
rain
rain 68 80 false Play
rain 70 96 false Play
Table
1. A small training data set [Qui93]
Play
Dont' Play Play
Play
Play Dont' Play Dont' Play Play
sunny
overcast rain
Outlook
sunny
overcast
rain
Play
Outlook
Humidity
non-leaf node
expandable leaf node
non-expandable leaf node
(a) Initial Classification Tree (b) Intermediate Classification Tree (c) Final Classification Tree
Figure
1. Demonstration of Hunt's Method
branch for each possible outcome. The same tree building machinery is applied
recursively to each subset of training cases.
Case 3 T contains no cases. The decision tree for T is a leaf, but the class to be
associated with the leaf must be determined from information other than T .
For example, C4.5 chooses this to be the most frequent class at the parent of
this node.
Attribute Value Class
Play Don't Play
overcast 4 0
Table
2. Class Distribution Information of Attribute Outlook
Attribute Value Binary Test Class
Play Don't Play
Table
3. Class Distribution Information of Attribute Humidity
Table
1 shows a training data set with four data attributes and two classes. Figure
1 shows how Hunt's method works with the training data set. In case 2 of
Hunt's method, a test based on a single attribute is chosen for expanding the current
node. The choice of an attribute is normally based on the entropy gains of
the attributes. The entropy of an attribute is calculated from class distribution
information. For a discrete attribute, class distribution information of each value
of the attribute is required. Table 2 shows the class distribution information of
data attribute Outlook at the root of the decision tree shown in Figure 1. For a
continuous attribute, binary tests involving all the distinct values of the attribute
are considered. Table 3 shows the class distribution information of data attribute
Humidity. Once the class distribution information of all the attributes are gath-
ered, each attribute is evaluated in terms of either entropy [20] or Gini Index [4].
The best attribute is selected as a test for the node expansion.
The C4.5 algorithm generates a classification-decision tree for the given training
data set by recursively partitioning the data. The decision tree is grown using
depth-first strategy. The algorithm considers all the possible tests that can split
the data set and selects a test that gives the best information gain. For each discrete
attribute, one test with outcomes as many as the number of distinct values of the
attribute is considered. For each continuous attribute, binary tests involving every
distinct value of the attribute are considered. In order to gather the entropy gain
of all these binary tests efficiently, the training data set belonging to the node in
consideration is sorted for the values of the continuous attribute and the entropy
gains of the binary cut based on each distinct values are calculated in one scan of
the sorted data. This process is repeated for each continuous attribute.
Recently proposed classification algorithms SLIQ [18] and SPRINT [21] avoid
costly sorting at each node by pre-sorting continuous attributes once in the begin-
ning. In SPRINT, each continuous attribute is maintained in a sorted attribute list.
In this list, each entry contains a value of the attribute and its corresponding record
id. Once the best attribute to split a node in a classification tree is determined,
each attribute list has to be split according to the split decision. A hash table, of
the same order as the number of training cases, has the mapping between record
ids and where each record belongs according to the split decision. Each entry in
the attribute list is moved to a classification tree node according to the information
retrieved by probing the hash table. The sorted order is maintained as the entries
are moved in pre-sorted order.
Decision trees are usually built in two steps. First, an initial tree is built till the
leaf nodes belong to a single class only. Second, pruning is done to remove any
overfitting to the training data. Typically, the time spent on pruning for a large
dataset is a small fraction, less than 1% of the initial tree generation. Therefore,
in this paper, we focus on the initial tree generation only and not on the pruning
part of the computation.
2.2. Parallel Decision-Tree Classification Algorithms
Several parallel formulations of classification rule learning have been proposed re-
cently. Pearson presented an approach that combines node-based decomposition
and attribute-based decomposition [19]. It is shown that the node-based decomposition
(task parallelism) alone has several probelms. One problem is that only a few
processors are utilized in the beginning due to the small number of expanded tree
nodes. Another problem is that many processors become idle in the later stage due
to the load imbalance. The attribute-based decomposition is used to remedy the
first problem. When the number of expanded nodes is smaller than the available
number of processors, multiple processors are assigned to a node and attributes
are distributed among these processors. This approach is related in nature to the
partitioned tree construction approach discussed in this paper. In the partitioned
tree construction approach, actual data samples are partitioned (horizontal parti-
tioning) whereas in this approach attributes are partitioned (vertical partitioning).
In [8], a few general approaches for parallelizing C4.5 are discussed. In the Dynamic
Task Distribution (DTD) scheme, a master processor allocates a subtree of
the decision tree to an idle slave processor. This scheme does not require communication
among processors, but suffers from the load imbalance. DTD becomes
similar to the partitioned tree construction approach discussed in this paper once
the number of available nodes in the decision tree exceeds the number of processors.
The DP-rec scheme distributes the data set evenly and builds decision tree one node
at a time. This scheme is identical to the synchronous tree construction approach
discussed in this paper and suffers from the high communication overhead. The
DP-att scheme distributes the attributes. This scheme has the advantages of being
both load-balanced and requiring minimal communications. However, this scheme
does not scale well with increasing number of processors. The results in [8] show
that the effectiveness of different parallelization schemes varies significantly with
data sets being used.
Kufrin proposed an approach called Parallel Decision Trees (PDT) in [15]. This
approach is similar to the DP-rec scheme [8] and synchronous tree construction
approach discussed in this paper, as the data sets are partitioned among proces-
sors. The PDT approach designate one processor as the "host" processor and the
remaining processors as "worker" processors. The host processor does not have any
data sets, but only receives frequency statistics or gain calculations from the worker
processors. The host processor determines the split based on the collected statistics
and notify the split decision to the worker processors. The worker processors
collect the statistics of local data following the instruction from the host processor.
The PDT approach suffers from the high communication overhead, just like DP-rec
scheme and synchronous tree construction approach. The PDT approach has an
additional communication bottleneck, as every worker processor sends the collected
statistics to the host processor at the roughly same time and the host processor
sends out the split decision to all working processors at the same time.
The parallel implementation of SPRINT [21] and ScalParC [13] use methods for
partitioning work that is identical to the one used in the synchronous tree construction
approach discussed in this paper. Serial SPRINT [21] sorts the continuous
attributes only once in the beginning and keeps a separate attribute list with
record identifiers. The splitting phase of a decision tree node maintains this sorted
order without requiring to sort the records again. In order to split the attribute
lists according to the splitting decision, SPRINT creates a hash table that records
a mapping between a record identifier and the node to which it goes to based on
the splitting decision. In the parallel implementation of SPRINT, the attribute
lists are split evenly among processors and the split point for a node in the decision
tree is found in parallel. However, in order to split the attribute lists, the full size
hash table is required on all the processors. In order to construct the hash table,
all-to-all broadcast [16] is performed, that makes this algorithm unscalable with
respect to runtime and memory requirements. The reason is that each processor
requires O(N) memory to store the hash table and O(N) communication overhead
for all-to-all broadcast, where N is the number of records in the data set. The
recently proposed ScalParC [13] improves upon the SPRINT by employing a distributed
7hash table to efficiently implement the splitting phase of the SPRINT. In
ScalParC, the hash table is split among the processors, and an efficient personalized
communication is used to update the hash table, making it scalable with respect
to memory and runtime requirements.
Goil, Aluru, and Ranka proposed the Concatenated Parallelism strategy for efficient
parallel solution of divide and conquer problems [10]. In this strategy, the
mix of data parallelism and task parallelism is used as a solution to the parallel
divide and conquer algorithm. Data parallelism is used until there are enough sub-tasks
are genearted, and then task parallelism is used, i.e., each processor works
on independent subtasks. This strategy is similar in principle to the partitioned
tree construction approach discussed in this paper. The Concatenated Parallelism
strategy is useful for problems where the workload can be determined based on the
size of subtasks when the task parallelism is employed. However, in the problem of
classificatoin decision tree, the workload cannot be determined based on the size of
data at a particular node of the tree. Hence, one time load balancing used in this
strategy is not well suited for this particular divide and conquer problem.
3. Parallel Formulations
In this section, we give two basic parallel formulations for the classification decision
tree construction and a hybrid scheme that combines good features of both of these
approaches. We focus our presentation for discrete attributes only. The handling
of continuous attributes is discussed in Section 3.4. In all parallel formulations,
we assume that N training cases are randomly distributed to P processors initially
such that each processor has N=P cases.
3.1. Synchronous Tree Construction Approach
In this approach, all processors construct a decision tree synchronously by sending
and receiving class distribution information of local data. Major steps for the
approach are shown below:
1. Select a node to expand according to a decision tree expansion strategy (eg.
Depth-First or Breadth-First), and call that node as the current node. At the
beginning, root node is selected as the current node.
2. For each data attribute, collect class distribution information of the local data
at the current node.
3. Exchange the local class distribution information using global reduction [16]
among processors.
4. Simultaneously compute the entropy gains of each attribute at each processor
and select the best attribute for child node expansion.
5. Depending on the branching factor of the tree desired, create child nodes for
the same number of partitions of attribute values, and split training cases accordingly
Class Distribution Information
Class Distribution Information
Figure
2. Synchronous Tree Construction Approach with Depth-First Expansion Strategy
6. Repeat above steps (1-5) until no more nodes are available for the expansion.
Figure
2 shows the overall picture. The root node has already been expanded
and the current node is the leftmost child of the root (as shown in the top part of
the figure). All the four processors cooperate to expand this node to have two child
nodes. Next, the leftmost node of these child nodes is selected as the current node
(in the bottom of the figure) and all four processors again cooperate to expand the
node.
The advantage of this approach is that it does not require any movement of the
training data items. However, this algorithm suffers from high communication cost
and load imbalance. For each node in the decision tree, after collecting the class
distribution information, all the processors need to synchronize and exchange the
distribution information. At the nodes of shallow depth, the communication overhead
is relatively small, because the number of training data items to be processed
is relatively large. But as the decision tree grows and deepens, the number of
training set items at the nodes decreases and as a consequence, the computation
of the class distribution information for each of the nodes decreases. If the average
branching factor of the decision tree is k, then the number of data items in a child
node is on the average 1
th of the number of data items in the parent. However, the
size of communication does not decrease as much, as the number of attributes to be
considered goes down only by one. Hence, as the tree deepens, the communication
overhead dominates the overall processing time.
The other problem is due to load imbalance. Even though each processor started
out with the same number of the training data items, the number of items belonging
to the same node of the decision tree can vary substantially among processors. For
example, processor 1 might have all the data items on leaf node A and none on leaf
node B, while processor 2 might have all the data items on node B and none on
node A. When node A is selected as the current node, processor 2 does not have
any work to do and similarly when node B is selected as the current node, processor
1 has no work to do.
This load imbalance can be reduced if all the nodes on the frontier are expanded
simultaneously, i.e. one pass of all the data at each processor is used to compute
the class distribution information for all nodes on the frontier. Note that this
improvement also reduces the number of times communications are done and reduces
the message start-up overhead, but it does not reduce the overall volume of
communications.
In the rest of the paper, we will assume that in the synchronous tree construction
algorithm, the classification tree is expanded breadth-first manner and all the nodes
at a level will be processed at the same time.
3.2. Partitioned Tree Construction Approach
In this approach, whenever feasible, different processors work on different parts
of the classification tree. In particular, if more than one processors cooperate to
expand a node, then these processors are partitioned to expand the successors of
this node. Consider the case in which a group of processors Pn cooperate to expand
node n. The algorithm consists of following steps:
Processors in Pn cooperate to expand node n using the method described
in Section 3.1.
Once the node n is expanded in to successor nodes,
the processor group Pn is also partitioned, and the successor nodes are assigned
to processors as follows:
Case 1: If the number of successor nodes is greater than jP n j,
1. Partition the successor nodes into jP n j groups such that the total number
of training cases corresponding to each node group is roughly equal.
Assign each processor to one node group.
2. Shuffle the training data such that each processor has data items that
belong to the nodes it is responsible for.
3. Now the expansion of the subtrees rooted at a node group proceeds
completely independently at each processor as in the serial algorithm.
Case 2: Otherwise (if the number of successor nodes is less than jP n j),
1. Assign a subset of processors to each node such that number of processors
assigned to a node is proportional to the number of the training
cases corresponding to the node.
Data Item
Data Item
Figure
3. Partitioned Tree Construction Approach
2. Shuffle the training cases such that each subset of processors has training
cases that belong to the nodes it is responsible for.
3. Processor subsets assigned to different nodes develop subtrees inde-
pendently. Processor subsets that contain only one processor use the
sequential algorithm to expand the part of the classification tree rooted
at the node assigned to them. Processor subsets that contain more than
one processor proceed by following the above steps recursively.
At the beginning, all processors work together to expand the root node of the classification
tree. At the end, the whole classification tree is constructed by combining
subtrees of each processor.
Figure
3 shows an example. First (at the top of the figure), all four processors
cooperate to expand the root node just like they do in the synchronous tree construction
1approach. Next (in the middle of the figure), the set of four processors
is partitioned in three parts. The leftmost child is assigned to processors 0 and 1,
while the other nodes are assigned to processors 2 and 3, respectively. Now these
sets of processors proceed independently to expand these assigned nodes. In par-
ticular, processors 2 and processor 3 proceed to expand their part of the tree using
the serial algorithm. The group containing processors 0 and 1 splits the leftmost
child node into three nodes. These three new nodes are partitioned in two parts
(shown in the bottom of the figure); the leftmost node is assigned to processor 0,
while the other two are assigned to processor 1. From now on, processors 0 and 1
also independently work on their respective subtrees.
The advantage of this approach is that once a processor becomes solely responsible
for a node, it can develop a subtree of the classification tree independently without
any communication overhead. However, there are a number of disadvantages of
this approach. The first disadvantage is that it requires data movement after each
node expansion until one processor becomes responsible for an entire subtree. The
communication cost is particularly expensive in the expansion of the upper part of
the classification tree. (Note that once the number of nodes in the frontier exceeds
the number of processors, then the communication cost becomes zero.) The second
disadvantage is poor load balancing inherent in the algorithm. Assignment of nodes
to processors is done based on the number of training cases in the successor nodes.
However, the number of training cases associated with a node does not necessarily
correspond to the amount of work needed to process the subtree rooted at the node.
For example, if all training cases associated with a node happen to have the same
class label, then no further expansion is needed.
3.3. Hybrid Parallel Formulation
Our hybrid parallel formulation has elements of both schemes. The Synchronous
Tree Construction Approach in Section 3.1 incurs high communication overhead as
the frontier gets larger. The Partitioned Tree Construction Approach of Section 3.2
incurs cost of load balancing after each step. The hybrid scheme keeps continuing
with the first approach as long as the communication cost incurred by the first
formulation is not too high. Once this cost becomes high, the processors as well as
the current frontier of the classification tree are partitioned into two parts.
Our description assumes that the number of processors is a power of 2, and that
these processors are connected in a hypercube configuration. The algorithm can
be appropriately modified if P is not a power of 2. Also this algorithm can be
mapped on to any parallel architecture by simply embedding a virtual hypercube
in the architecture. More precisely the hybrid formulation works as follows.
ffl The database of training cases is split equally among P processors. Thus, if
N is the total number of training cases, each processor has N=P training cases
locally. At the beginning, all processors are assigned to one partition. The root
node of the classification tree is allocated to the partition.
ffl All the nodes at the frontier of the tree that belong to one partition are processed
together using the synchronous tree construction approach of Section 3.1.
ffl As the depth of the tree within a partition increases, the volume of statistics
gathered at each level also increases as discussed in Section 3.1. At some point,
a level is reached when communication cost become prohibitive. At this point,
the processors in the partition are divided into two partitions, and the current
set of frontier nodes are split and allocated to these partitions in such a way
that the number of training cases in each partition is roughly equal. This load
balancing is done as described as follows:
- On a hypercube, each of the two partitions naturally correspond to a sub-
cube. First, corresponding processors within the two sub-cubes exchange
relevant training cases to be transferred to the other sub-cube. After this
exchange, processors within each sub-cube collectively have all the training
cases for their partition, but the number of training cases at each processor
can vary between 0 to 2\LambdaN
. Now, a load balancing step is done within each
sub-cube so that each processor has an equal number of data items.
ffl Now, further processing within each partition proceeds asynchronously. The
above steps are now repeated in each one of these partitions for the particular
subtrees. This process is repeated until a complete classification tree is grown.
ffl If a group of processors in a partition become idle, then this partition joins up
with any other partition that has work and has the same number of processors.
This can be done by simply giving half of the training cases located at each
processor in the donor partition to a processor in the receiving partition.
Computation Frontier at depth 3
Figure
4. The computation frontier during computation phase
A key element of the algorithm is the criterion that triggers the partitioning of the
current set of processors (and the corresponding frontier of the classification tree
If partitioning is done too frequently, then the hybrid scheme will approximate
the partitioned tree construction approach, and thus will incur too much data
movement cost. If the partitioning is done too late, then it will suffer from high
cost for communicating statistics generated for each node of the frontier, like the
synchronized tree construction approach. One possibility is to do splitting when the
accumulated cost of communication becomes equal to the cost of moving records
around in the splitting phase. More precisely, splitting is done when
Partition 1 Partition 2
Figure
5. Binary partitioning of the tree to reduce communication costs
(Communication MovingCost LoadBalancing
As an example of the hybrid algorithm, Figure 4 shows a classification tree frontier
at depth 3. So far, no partitioning has been done and all processors are working
cooperatively on each node of the frontier. At the next frontier at depth 4, partitioning
is triggered, and the nodes and processors are partitioned into two partitions
as shown in Figure 5.
A detailed analysis of the hybrid algorithm is presented in Section 4.
3.4. Handling Continuous Attributes
Note that handling continuous attributes requires sorting. If each processor contains
N=P training cases, then one approach for handling continuous attributes is
to perform a parallel sorting step for each such attribute at each node of the decision
tree being constructed. Once this parallel sorting is completed, each processor can
compute the best local value for the split, and then a simple global communication
among all processors can determine the globally best splitting value. However, the
step of parallel sorting would require substantial data exchange among processors.
The exchange of this information is of similar nature as the exchange of class distribution
information, except that it is of much higher volume. Hence even in this
case, it will be useful to use a scheme similar to the hybrid approach discussed in
Section 3.3.
A more efficient way of handling continuous attributes without incurring the
high cost of repeated sorting is to use the pre-sorting technique used in algorithms
SLIQ [18], SPRINT [21], and ScalParC [13]. These algorithms require only one pre-sorting
step, but need to construct a hash table at each level of the classification
tree. In the parallel formulations of these algorithms, the content of this hash
table needs to be available globally, requiring communication among processors.
definition
Total number of training samples
Total Number of processors
Number of processors cooperatively working on tree expansion
A d Number of categorical attributes
C Number of classes
Average number of distinct values in the discrete attributes
Present level of a decision tree
t s Start up time of communication latency [KGGK94]
t w Per-word transfer time of communication latency [KGGK94]
Table
4. Symbols used in the analysis.
Existing parallel formulations of these schemes [21, 13] perform communication
that is similar in nature to that of our synchronous tree construction approach
discussed in Section 3.1. Once again, communication in these formulations [21, 13]
can be reduced using the hybrid scheme of Section 3.3.
Another completely different way of handling continuous attributes is to discretize
them once as a preprocessing step [12]. In this case, the parallel formulations as
presented in the previous subsections are directly applicable without any modification
Another approach towards discretization is to discretize at every node in the tree.
There are two examples of this approach. The first example can be found in [3]
where quantiles [2] are used to discretize continuous attributes. The second example
of this approach to discretize at each node is SPEC [23] where a clustering
technique is used. SPEC has been shown to be very efficient in terms of runtime
and has also been shown to perform essentially identical to several other widely
used tree classifiers in terms of classification accuracy [23]. Parallelization of the
discretization at every node of the tree is similar in nature to the parallelization
of the computation of entropy gain for discrete attributes, because both of these
methods of discretization require some global communication among all the processors
that are responsible for a node. In particular, parallel formulations of the
clustering step in SPEC is essentially identical to the parallel formulations for the
discrete case discussed in the previous subsections [23].
4. Analysis of the Hybrid Algorithm
In this section, we provide the analysis of the hybrid algorithm proposed in Section
3.3. Here we give a detailed analysis for the case when only discrete attributes
are present. The analysis for the case with continuous attributes can be found in
[23]. The detailed study of the communication patterns used in this analysis can
be found in [16]. Table 4 describes the symbols used in this section.
4.1. Assumptions
ffl The processors are connected in a hypercube topology. Complexity measures for
other topologies can be easily derived by using the communication complexity
expressions for other topologies given in [16].
ffl The expression for communication and computation are written for a full binary
tree with 2 L leaves at depth L. The expressions can be suitably modified when
the tree is not a full binary tree without affecting the scalability of the algorithm.
ffl The size of the classification tree is asymptotically independent of N for a particular
data set. We assume that a tree represents all the knowledge that can
be extracted from a particular training data set and any increase in the training
set size beyond a point does not lead to a larger decision tree.
4.2. Computation and Communication Cost
For each leaf of a level, there are A d class histogram tables that need to be com-
municated. The size of each of these tables is the product of number of classes and
the mean number of attribute values. Thus size of class histogram table at each
processor for each leaf is:
Class histogram size for each
The number of leaves at level L is 2 L . Thus the total size of the tables is:
Combined class histogram tables for a processor = C A d M 2 L
At level L, the local computation cost involves I/O scan of the training set, initialization
and update of all the class histogram tables for each attribute:
Local Computation cost = '(
A d N
where t c is the unit of computation cost.
At the end of local computation at each processor, a synchronization involves a
global reduction of class histogram values. The communication cost 1 is :
Per level Communication cost
(2)
When a processor partition is split into two, each leaf is assigned to one of the
partitions in such a way that number of training data items in the two partitions
is approximately the same. In order for the two partitions to work independently
of each other, the training set has to be moved around so that all training cases
for a leaf are in the assigned processor partition. For a load balanced system, each
processor in a partition must have N
training data items.
This movement is done in two steps. First, each processor in the first partition
sends the relevant training data items to the corresponding processor in the second
partition. This is referred to as the "moving" phase. Each processor can send or
receive a maximum of N
data to the corresponding processor in the other partition.
Cost for moving phase 2
After this, an internal load balancing phase inside a partition takes place so that
every processor has an equal number of training data items. After the moving phase
and before the load balancing phase starts, each processor has training data item
count varying from 0 to 2\LambdaN
. Each processor can send or receive a maximum of N
training data items. Assuming no congestion in the interconnection network, cost
for load balancing is:
Cost for load balancing phase 2
A detailed derivation of Equation 4 above is given in [23]. Also, the cost for
load balancing assumes that there is no network congestion. This is a reasonable
assumption for networks that are bandwidth-rich as is the case with most commercial
systems. Without assuming anything about network congestion, load balancing
phase can be done using transportation primitive [22] in time 2 N
Splitting is done when the accumulated cost of communication becomes equal to
the cost of moving records around in the splitting phase [14]. So splitting is done
(Communication Cost) Moving Cost Balancing
This criterion for splitting ensures that the communication cost for this scheme will
be within twice the communication cost for an optimal scheme [14]. The splitting
is recursive and is applied as many times as required. Once splitting is done, the
above computations are applied to each partition. When a partition of processors
starts to idle, then it sends a request to a busy partition about its idle state. This
request is sent to a partition of processors of roughly the same size as the idle
partition. During the next round of splitting the idle partition is included as a part
of the busy partition and the computation proceeds as described above.
4.3. Scalability Analysis
Isoefficiency metric has been found to be a very useful metric of scalability for a
large number of problems on a large class of commercial parallel computers [16].
It is defined as follows. Let P be the number of processors and W the problem
size (in total time taken for the best sequential algorithm). If W needs to grow as
to maintain an efficiency E, then fE (P ) is defined to be the isoefficiency
function for efficiency E and the plot of fE (P ) with respect to P is defined to be
the isoefficiency curve for efficiency E.
We assume that the data to be classified has a tree of depth L 1
. This depth
remains constant irrespective of the size of data since the data "fits" this particular
classification tree.
Total cost for creating new processor sub-partitions is the product of total number
of partition splits and cost for each partition split (='( N
using Equations 3 and
4. The number of partition splits that a processor participates in is less than or
equal to L 1
- the depth of the tree.
Cost for creating new processors partitions L 1 '(
Communication cost at each level is given by Equation 2 (= '(log P )). The
combined communication cost is the product of the number of levels and the communication
cost at each level.
Combined communication cost for processing attributes L 1 '(log P
The total communication cost is the sum of cost for creating new processor partitions
and communication cost for processing class histogram tables, the sum of
Equations 5 and 6.
Total Communication cost
Computation cost given by Equation 1 is:
Total computation
Total parallel run time (Sum of Equations 7 and 8)= Communication time Computation
time.
Parallel run
In the serial case, the whole dataset is scanned once for each level. So the serial
time is
To get the isoefficiency function, we equate P times total parallel run time using
Equation 9 to serial computation time.
Therefore, the isoefficiency function is Isoefficiency is '(P log P )
assuming no network congestion during load balancing phase. When the transportation
primitive is used for load balancing, the isoefficiency is O(P 3 ).
5. Experimental Results
We have implemented the three parallel formulations using the MPI programming
library. We use binary splitting at each decision tree node and grow the tree in
breadth first manner. For generating large datasets, we have used the widely used
synthetic dataset proposed in the SLIQ paper [18] for all our experiments. Ten classification
functions were also proposed in [18] for these datasets. We have used the
function 2 dataset for our algorithms. In this dataset, there are two class labels and
each record consists of 9 attributes having 3 categoric and 6 continuous attributes.
The same dataset was also used by the SPRINT algorithm [21] for evaluating its
performance. Experiments were done on an IBM SP2. The results for comparing
speedup of the three parallel formulations are reported for parallel runs on 1, 2, 4,
8, and 16 processors. More experiments for the hybrid approach are reported for
up to 128 processors. Each processor has a clock speed of 66.7 MHz with 256 MB
real memory. The operating system is AIX version 4 and the processors communicate
through a high performance switch (hps). In our implementation, we keep
the "attribute lists" on disk and use the memory only for storing program specific
data structures, the class histograms and the clustering structures.
First, we present results of our schemes in the context of discrete attributes only.
We compare the performance of the three parallel formulations on up to 16 processor
IBM SP2. For these results, we discretized 6 continuous attributes uniformly.
Specifically, we discretized the continuous attribute salary to have 13, commission
to have 14, age to have 6, hvalue to have 11, hyears to have 10, and loan to have
equal intervals. For measuring the speedups, we worked with different sized
datasets of 0.8 million training cases and 1.6 million training cases. We increased
the processors from 1 to 16. The results in Figure 6 show the speedup comparison
of the three parallel algorithms proposed in this paper. The graph on the left shows
the speedup with 0.8 million examples in the training set and the other graph shows
the speedup with 1.6 million examples.
The results show that the synchronous tree construction approach has a good
speedup for 2 processors, but it has a very poor speedup for 4 or more processors.
There are two reasons for this. First, the synchronous tree construction approach
incurs high communication cost, while processing lower levels of the tree. Second,
a synchronization has to be done among different processors as soon as their communication
buffer fills up. The communication buffer has the histograms of all the
discrete variables for each node. Thus, the contribution of each node is independent
of its tuples count, the tuple count at a node being proportional to the computation
to process that node. While processing lower levels of the tree, this synchronization
is done many times at each level (after every 100 nodes for our experiments). The
distribution of tuples for each decision tree node becomes quite different lower down
in the tree. Therefore, the processors wait for each other during synchronization,
and thus, contribute to poor speedups.
The partitioned tree construction approach has a better speedup than the synchronous
tree construction approach. However, its efficiency decreases as the number
of processors increases to 8 and 16. The partitioned tree construction approach
Processors
Speedup for 0.8 million examples, partitioned -", hybrid -o-", synchronous -x-"
Processors
Speedup for 1.6 million examples, partitioned -", hybrid -o-", synchronous -x-"
Figure
6. Speedup comparison of the three parallel algorithms.
suffers from load imbalance. Even though nodes are partitioned so that each processor
gets equal number of tuples, there is no simple way of predicting the size of
the subtree for that particular node. This load imbalance leads to the runtime being
determined by the most heavily loaded processor. The partitioned tree construction
approach also suffers from the high data movement during each partitioning phase,
the partitioning phase taking place at higher levels of the tree. As more processors
are involved, it takes longer to reach the point where all the processors work on
their local data only. We have observed in our experiments that load imbalance and
higher communication, in that order, are the major cause for the poor performance
of the partitioned tree construction approach as the number of processors increase.
The hybrid approach has a superior speedup compared to the partitioned tree
approach as its speedup keeps increasing with increasing number of processors.
As discussed in Section 3.3 and analyzed in Section 4, the hybrid controls the
communication cost and data movement cost by adopting the advantages of the
two basic parallel formulations. The hybrid strategy also waits long enough for
splitting, until there are large number of decision tree nodes for splitting among
processors. Due to the allocation of decision tree nodes to each processor being
randomized to a large extent, good load balancing is possible. The results confirmed
that the proposed hybrid approach based on these two basic parallel formulations
is effective.
We have also performed experiments to verify our splitting criterion of the hybrid
algorithm is correct. Figure 7 shows the runtime of the hybrid algorithm with
different ratio of communication cost and the sum of moving cost and load balancing
cost, i.e.,
(Communication Cost)
Moving Cost
log2(Splitting Criteria Ratio), x=0 -> ratio=1
Runtimes
Runtimes for splitting at different values of ratio, 8 processors, 0.8 million examples
10100300500log2(Splitting Criteria Ratio), x=0 -> ratio=1
Runtimes
Runtimes for splitting at different values of ratio, 16 processors, 1.6 million examples
Figure
7. Splitting criterion verification in the hybrid algorithm.
The graph on the left shows the result with 0.8 million examples on 8 processors and
the other graph shows the result with 1.6 million examples on processors. We
proposed that splitting when this ratio is 1.0 would be the optimal time. The results
verified our hypothesis as the runtime is the lowest when the ratio is around 1.0. The
graph on the right with 1.6 million examples shows more clearly why the splitting
choice is critical for obtaining a good performance. As the splitting decision is made
farther away from the optimal point proposed, the runtime increases significantly.
The experiments on 16 processors clearly demonstrated that the hybrid approach
gives a much better performance and the splitting criterion used in the hybrid approach
is close to optimal. We then performed experiments of running the hybrid
approach on more number of processors with different sized datasets to study the
speedup and scalability. For these experiments, we used the original data set with
continuous attributes and used a clustering technique to discretize continuous attributes
at each decision tree node [23]. Note that the parallel formulation gives
almost identical performance as the serial algorithm in terms of accuracy and classification
tree size [23]. The results in Figure 8 show the speedup of the hybrid
approach. The results confirm that the hybrid approach is indeed very effective.
To study the scaleup behavior, we kept the dataset size at each processor constant
at 50,000 examples and increased the number of processors. Figure 9 shows
the runtime on increasing number of processors. This curve is very close to the
ideal case of a horizontal line. The deviation from the ideal case is due to the
fact that the isoefficiency function is O(P log P ) not O(P ). Current experimental
data is consistent with the derived isoefficiency function but we intend to conduct
additional validation experiments.
Number of processors
Speedup curves for different sized datasets
million examples
1.6 million examples
3.2 million examples
6.4 million examples
12.8 million examples
25.6 million examples
Figure
8. Speedup of the hybrid approach with different size datasets.
Number of Processors
Total
Run
Time
Runtimes of our algorithm for 50K examples at each processor
Figure
9. Scaleup of our algorithm
6. Concluding Remarks
In this paper, we proposed three parallel formulations of inductive-classification
learning algorithm. The Synchronous Tree Construction Approach performs well if
the classification tree remains skinny, having few nodes at any level, throughout.
For such trees, there are relatively large number of training cases at the nodes at
any level; and thus the communication overhead is relatively small. Load imbalance
is avoided by processing all nodes at a level, before synchronization among the
processors. However, as the tree becomes bushy, having a large number of nodes
at a level, the number of training data items at each node decrease. Frequent
synchronization is done due to limited communication buffer size, which forces
communication after processing a fixed number of nodes. These nodes at lower
depths of the tree, which have few tuples assigned to them, may have highly variable
distribution of tuples over the processors, leading to load imbalance. Hence, this
approach suffers from high communication overhead and load imbalance for bushy
trees. The Partitioned Tree Construction Approach works better than Synchronous
Tree Construction Approach if the tree is bushy. But this approach pays a big
communication overhead in the higher levels of the tree as it has to shuffle lots
of training data items to different processors. Once every node is solely assigned
to a single processor, each processor can construct the partial classification tree
independently without any communication with other processors. However, the
load imbalance problem is still present after the shuffling of the training data items,
since the partitioning of the data was done statically.
The hybrid approach combines the good features of these two approaches to
reduce communication overhead and load imbalance. This approach uses the Synchronous
Tree Construction Approach for the upper parts of the classification tree.
Since there are few nodes and relatively large number of the training cases associated
with the nodes in the upper part of the tree, the communication overhead is
small. As soon as the accumulated communication overhead is greater than the cost
of partitioning of data and load balancing, this approach shifts to the Partitioned
Tree Construction Approach incrementally. The partitioning takes place when a
reasonable number of nodes are present at a level. This partitioning is gradual and
performs randomized allocation of classification tree nodes, resulting in a better
load balance. Any load imbalance at the lower levels of the tree, when a processor
group has finished processing its assigned subtree, is handled by allowing an idle
processor group to join busy processor groups.
The size and shape of the classification tree varies a lot depending on the application
domain and training data set. Some classification trees might be shallow and
the others might be deep. Some classification trees could be skinny others could be
bushy. Some classification trees might be uniform in depth while other trees might
be skewed in one part of the tree. The hybrid approach adapts well to all types of
classification trees. If the decision tree is skinny, the hybrid approach will just stay
with the Synchronous Tree Construction Approach. On the other hand, it will shift
to the Partitioned Tree Construction Approach as soon as the tree becomes bushy.
If the tree has a big variance in depth, the hybrid approach will perform dynamic
load balancing with processor groups to reduce processor idling.
Acknowledgments
A significant part of this work was done while Anurag Srivastava and Vineet Singh
were at IBM TJ Watson Research Center. This work was supported by NSF grant
ASC-9634719, Army Research Office contract DA/DAAH04-95-1-0538, Cray Re-search
Inc. Fellowship, and IBM partnership award, the content of which does not
necessarily reflect the policy of the government, and no official endorsement should
be inferred. Access to computing facilities was provided by AHPCRC, Minnesota
Supercomputer Institute, Cray Research Inc., and NSF grant CDA-9414015.
Notes
1. If the message size is large, by routing message in parts, this communication step can be done
constant k0 . Refer to [16] section 3.7 for details.
--R
Database mining: A performance perspective.
CLOUDS: Classification for large or out-of-core datasets
Megainduction: Machine Learning on Very Large Databases.
Experiments on multistrategy learning by met- alearning
Metalearning for multistrategy learning and parallel learning.
Concatenated parallelism: A technique for efficient parallel divide and conquer.
Genetic Algorithms in Search
Use of contextual information for feature ranking and discretization.
A new scalable and efficient parallel classification algorithm for mining large datasets.
Unstructured tree search on simd parallel computers.
Decision trees on parallel processors.
Introduction to Parallel Computing: Algorithm Design and Analysis.
An introduction to computing with neural nets.
SLIQ: A fast scalable classifier for data mining.
A coarse grained parallel induction heuristic.
SPRINT: A scalable parallel classifier for data mining.
Experiments on the costs and benefits of windowing in ID3.
--TR
--CTR
Amir Bar-Or , Daniel Keren , Assaf Schuster , Ran Wolff, Hierarchical Decision Tree Induction in Distributed Genomic Databases, IEEE Transactions on Knowledge and Data Engineering, v.17 n.8, p.1138-1151, August 2005
Robert Grossman , Yike Guo, Data mining tasks and methods: parallel methods for scaling data mining algorithms to large data sets, Handbook of data mining and knowledge discovery, Oxford University Press, Inc., New York, NY, 2002
Doina Caragea , Adrian Silvescu , Vasant G. Honavar, Analysis and synthesis of agents that learn from distributed dynamic data sources, Emergent neural computational architectures based on neuroscience: towards neuroscience-inspired computing, Springer-Verlag New York, Inc., New York, NY, 2001
Olcay Taner Yldz , Onur Dikmen, Parallel univariate decision trees, Pattern Recognition Letters, v.28 n.7, p.825-832, May, 2007
Vipin Kumar , Mohammed Zaki, High performance data mining (tutorial PM-3), Tutorial notes of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.309-425, August 20-23, 2000, Boston, Massachusetts, United States
Raymond T. Ng , Alan Wagner , Yu Yin, Iceberg-cube computation with PC clusters, ACM SIGMOD Record, v.30 n.2, p.25-36, June 2001
S. Ruggieri, Efficient C4.5, IEEE Transactions on Knowledge and Data Engineering, v.14 n.2, p.438-444, March 2002
Massimo Coppola , Marco Vanneschi, Parallel and distributed data mining through parallel skeletons and distributed objects, Data mining: opportunities and challenges, Idea Group Publishing, Hershey, PA,
Aleksandar Lazarevic , Zoran Obradovic, Boosting Algorithms for Parallel and Distributed Learning, Distributed and Parallel Databases, v.11 n.2, p.203-229, March 2002
Vipin Kumar , Mohammed Zaki, High performance data mining (tutorial PM-3), Tutorial notes of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.309-425, August 20-23, 2000, Boston, Massachusetts, United States
Massimo Coppola , Marco Vanneschi, High-performance data mining with skeleton-based structured parallel programming, Parallel Computing, v.28 n.5, p.793-813, May 2002
Jack Dongarra , Ian Foster , Geoffrey Fox , William Gropp , Ken Kennedy , Linda Torczon , Andy White, References, Sourcebook of parallel computing, Morgan Kaufmann Publishers Inc., San Francisco, CA, | data mining;classification;scalability;decision trees;parallel processing |
593486 | Effect of Data Distribution in Parallel Mining of Associations. | Association rule mining is an important new problem in data mining. It has crucial applications in decision support and marketing strategy. We proposed an efficient parallel algorithm for mining association rules on a distributed share-nothing parallel system. Its efficiency is attributed to the incorporation of two powerful candidate set pruning techniques. The two techniques, distributed and global prunings, are sensitive to two data distribution characteristics: data skewness and workload balance. The prunings are very effective when both the skewness and balance are high. We have implemented FPM on an IBM SP2 parallel system. The performance studies show that FPM outperforms CD consistently, which is a parallel version of the representative Apriori algorithm (Agrawal and Srikant, 1994). Also, the results have validated our observation on the effectiveness of the two pruning techniques with respect to the data distribution characteristics. Furthermore, it shows that FPM has nice scalability and parallelism, which can be tuned for different business applications. | Introduction
Association rule discovery has attracted a lot of attention from the research and business communities [1, 2, 4].
An association rule is a rule which implies certain association relationships among a set of objects (such as "occur
together" or "one implies the other") in a database. The intuitive meaning of an association
Y are set of items, is that transactions of the database which contain X tend to contain Y . A classical example is
that 98% of customers that purchase tires and automobile accessories in a department store also have automotive
services carried out. This example is a typical association in a basket database which sounds like common sense
knowledge; however, there could be a lot of associations among the data which may not be able to deduce from
common knowledge. Therefore, efficient automated technique to discover this type of rules is a very important area
of research in data mining [2, 7, 8, 15, 17]. Applications of association rule mining range from decision support to
product marketing and consumer behavior prediction.
Previous studies examined efficient mining of association rules from many different angles. An influential association
rule mining algorithm, Apriori [2], has been developed for rule mining in large transaction databases. The
scope of the study has also been extended to efficient mining of sequential patterns [20], generalized association rules
[19], multiple-level association rules [9], quantitative association rules [21], constrainted association rules [14] etc.
Although these studies are on sequential data mining techniques, algorithms for parallel mining of association rules
have also been proposed [3, 16, 22, 23].
The development of parallel systems for mining of association rules has its unique importance - databases or
data warehouses [18] have been used more often to store a huge amount of data; data mining in such databases
require substantial processing power, and parallel system is a possible solution. This observation motivates us to
study efficient parallel algorithms for mining association rules in large databases. In this work, we study the problem
on parallel system with distributed share-nothing memory such as the IBM SP2 [11]. In this model, the database
is partitioned and distributed across the local disks of the processors; and the processors communicate via a fast
network.
It has been well studied that the major cost of mining association rules is the computation of the set of large
itemsets (i.e., frequently occurring sets of items, see Section 2.1) in the database [1, 2]. An itemset (a set of items)
is large if the percentage of transactions that containing all these items is greater than a given threshold. The most
representative parallel algorithm for mining association rules is the CD algorithm (Count Distribution), which is
designed for share-nothing parallel systems [3]. It extends directly the basic technique of Aprori to parallel system.
Our proposed algorithm, FPM (Fast Parallel Mining), has the following distinct feature in comparison with CD :
FPM has explored an important property between locally large itemsets (those that are large with respect to the
partition of a processor) and globally large itemsets (those that are large with respect to the entire database) to
develop two powerful pruning techniques, distributed pruning and global pruning, which can reduce the number of
candidate sets at each individual processor. Since the number of candidate sets is a dominant parameter of the
computation cost, with a substantially smaller candidate sets, FPM performs much better than CD.
Another contribution of this work is the discovery that the effectiveness of the two aforementioned pruning
techniques, and hence the performance of the parallel mining, depends on the data distribution characteristics in the
database partitioning. We have captured the distribution characteristics in two factors : data skewness and workload
balance. These two factors are orthogonal properties. Intuitively, a partitioned database has high data skewness if
most globally large itemsets are locally large only at a very few partitions. On the other hand, a partitioned database
has a high workload balance if all the processors have similar number of locally large itemsets in their partitions.
(More precise definitions of skewness and workload balance will be given in Sections 3 & 4.) We have defined metrics
to measure data skewness and workload balance. We found out that both the distributed and global prunings have
super performance in the best case of high data skewness and high workload balance. The combination of high
balance with moderate skewness is the second best case. On the other hand, the high skewness, moderate balance
combination only provide moderate improvement over CD, while the combination of low skewness and low balance
is the worst case in which only marginal improvement can be found.
We have implemented FPM on an IBM SP2 parallel machine with processors. Extensive performance studies
have been carried out. The results confirm our observation on the relationship between pruning effectiveness and
data distribution.
The rest of this paper is organized as follows. Section 2 overviews the parallel mining of association rules. The
techniques of distributed and global prunings, together with the FPM algorithm are described in Section 3. In the
same section, we have also investigated the relationship between the effectiveness of the prunings and the two data
distribution characteristics of data skewness and workload balance. In section 4, we define metrics to measure data
skewness and workload balance of a data partition. Section 5 reports the result of an extensive performance study.
In Section 6, we discuss a few issues including possible extensions of FPM to enhance its scalability. Section 7 is the
conclusion.
2 Parallel Mining of Association Rules
2.1 Sequential Algorithm for Mining Association Rules
be a set of items. Let D be a database of transactions, where each transaction T consists
of a set of items such that T ' I . Given an itemset X ' I , a transaction T contains X if and only if X ' T . An
association rule is an implication of the form X [2]. The association rule
holds in D with confidence c if the probability of a transaction in D which contains X also contains Y is c.
The association rule X ) Y has support s in D if the probability of a transaction in D contains both X and Y is
s. The task of mining association rules is to find all the association rules whose support is larger than a minimum
support threshold and whose confidence is larger than a minimum confidence threshold.
For an itemset X , its support is the percentage of transactions in D which contains X , and its support count,
denoted by X :sup , is the number of transactions in D containing X . An itemset X is large (or more precisely,
frequently occurring) if its support is no less than the minimum support threshold. An itemset of size k is called a
k-itemset. It has been shown that the problem of mining association rules can be reduced to two subproblems [1]:
(1) find all large itemsets for a given minimum support threshold, and (2) generate the association rules from the
large itemsets found. Since (1) dominates the overall cost of mining association rules, the research has been focused
on developing efficient methods to solve the first subproblem [2].
An interesting serial algorithm, Apriori [2], has been proposed for computing large itemsets at mining association
rules in a transaction database, which is outlined as follows [2].
The large itemsets are computed through iterations. At each iteration, Apriori scans the database once and
finds all the large itemsets of the same size. At the k-th iteration, Apriori creates the set of candidate sets C (k)
by applying the candidate set generating function Apriori gen on L (k\Gamma1) , where L (k\Gamma1) is the set of all large
1)-itemsets found at the (k \Gamma 1)-st iteration, and Apriori gen generates only those k-itemset candidates
whose every 1)-itemset subset is in L (k\Gamma1) .
2.2 Count Distribution Algorithm for Parallel Mining
CD (Count Distribution) is a parallel version of Apriori. It is one of the earliest proposed and representative parallel
algorithms for mining of association rules [3]. We describe here briefly its steps for comparison purpose. The database
D is partitioned into distributed across n processors. The program fragment of CD at processor
k-th iteration is outlined in Figure 1. (For convenience, we use X :sup(i) to represent the local
support count of an itemset X in partition D i .) In step 1, every processor computes the same candidate set C k by
applying the aprior gen function on L k\Gamma1 , which is the set of large itemsets found at the (k \Gamma 1)-th iteration. In
step 2, local support counts (support in D i ) of candidates in C k are found. In steps 3 & 4, local support counts are
exchanged with all other processors to get global support counts (support in D) and globally large itemsets (large
with respect to D) L k are computed independently by each processor. CD repeats steps 1 - 4 until no more candidate
is found. We have implemented CD on an IBM SP2 using the MPI (Message Passing Interface) [13].
scan partition D i to find the local support count X :sup(i) for all
with all other processors to get global support counts X :sup , for all
Figure
1: Count Distribution Algorithm
Pruning Techniques and the FPM Algorithm
3.1 Distributed Pruning
It is important to observe some interesting properties related to large itemsets in a parallel environments since such
properties may substantially reduce the number of candidate sets. (The preliminary form of the results in this section
have been developed in [6] and extended here.) First, there is an important relationship between large itemsets and
the processors in the database: every globally large itemsets must be locally large at some processor(s). If an itemset
X is both globally large and locally large at a processor p i , X is called gl-large at processor p i . The set of gl-large
itemsets at a processor will form a basis for the processor to generate its own candidate sets.
Second, a gl-large itemset at a processor has the following monotonic subset relationship property: if an itemset
is gl-large at a processor p i , all of its subsets are also gl-large at p i . Combining these two properties, we have the
following results.
Lemma 1 If an itemset X is globally large, there exists a processor n), such that X and all its subsets
are gl-large at processor p i . 1
We use GL i to denote the set of gl-large itemsets at processor p i , and GL i(k) to denote the set of gl-large k-itemsets
at processor p i . It follows from Lemma 1 that if X 2 L (k) , then there exists a processor p i , such that all its
are gl-large at processor p i , i.e., they belong to GL i(k\Gamma1) .
In a straightforward adaptation of Apriori, the set of candidate sets at the k-th iteration, denoted by CA (k) ,
which stands for size-k candidate sets from Apriori, would be generated by applying the Apriori gen function on
L (k\Gamma1) . That is,
At each processor p i , let CG i(k) be the set of candidates sets generated by applying Apriori gen on GL i(k\Gamma1) , i.e.,
where CG stands for candidate sets generated from gl-large itemsets. Hence CG i(k) is generated from GL i(k\Gamma1) .
Since GL i(k\Gamma1) ' L (k\Gamma1) , CG i(k) is a subset of CA (k) . In the following, we use CG (k) to denote the set [ n
Theorem 1 For every k ? 1, the set of all large k-itemsets L (k) is a subset of CG
This result is stronger than that in [17] - the result there states that a globally large itemset is locally large in some partition; while
states that all its subsets must be locally large together at the same partition.
Proof. Let It follows from Lemma 1 that there exists a processor n), such that all the
subsets of X are gl-large at processor p i . Hence X 2 CG i(k) . Therefore,
indicates that CG (k) , which is a subset of CA (k) and could be much smaller than CA (k) , can be taken
as the set of candidate sets for the size-k large itemsets. In effect, the set of candidates in CA (k) has been pruned
down to those in CG (k) - we called this technique distributed pruning. This result forms a basis for the reduction of
the set of candidate sets in the algorithm FPM. First the set of candidate sets CG i(k) can be generated locally at each
processor p i at the k-th iteration. After the exchange of support counts, the gl-large itemsets GL i(k) in CG i(k) can
be found at the end of that iteration. Based on GL i(k) , the candidate sets at processor p i for the 1)-st iteration
can then be generated according to Theorem 1. According to our performance studies, the number of candidate sets
generated by distributed pruning can be substantially reduced to about of that generated in CD.
Example 1 illustrates the effectiveness of the reduction of candidate sets using distributed pruning.
Example 1 Assuming there are 3 processors in a parallel system in which the database D has been partitioned into
Suppose the set of large 1-itemsets (computed at the first iteration) L G; Hg,
in which A; B, and C are locally large at processor p 1 , B; C, and D are locally large at processor p 2 , and E; F; G, and
H are locally large at processor p 3 . Therefore, GL G; Hg.
Based on Theorem 1, the set of size-2 candidate sets at processor p 1 is CG
fAB;BC;ACg. Similarly, CG EG;EH;FG;FH;GHg. Hence, the set
of candidate sets for large 2-itemsets is CG candidates.
However, if Apriori gen is applied to L (1) , the set of candidate sets CA would have 28
candidates. This shows that it is very effective to apply distributed pruning to reduce the candidate sets. 2
3.2 Global Pruning
As a result of the count exchange, the local support counts X :sup(i) , for all processor are also
available at every processor. With this information, another powerful pruning technique called global pruning can
be developed. Let X be a candidate k-itemset. At each partition D i , X :sup(i) - Y :sup(i) , if Y ae X . Therefore the
local support count of X , X :sup(i) , is bounded by the value minfY 1g. Since the global
support count of X , X :sup , is the sum of its local support count at all the processors, the value
is an upper bound of X :sup . If X :maxsup ! minsup \Theta jDj, then X can be pruned away. This technique is called global
pruning. Note that global pruning requires no additional information except the local support counts resulted from
count exchange in the previous iteration.
Table
1 gives an example to show that global pruning can pruning away candidates which cannot be pruned by
distributed pruning. Suppose the global support count threshold is 15 and the local support count threshold at each
local support at processor 1 13
local support at processor 2 3 3 12 34 1 4
local support at processor 3
global support
gl-large at processor 1
\Theta \Theta
gl-large at processor 2 \Theta \Theta
gl-large at processor 3 \Theta \Theta \Theta \Theta
Table
1: High data skewness and high workload balance case
processor is 5. Distributed pruning cannot prune away CD, as C and D are both gl-large at processor 2. Whereas
global pruning can prune away CD, as CD
can also be pruned, because EF would survive global
pruning. From this example, it is clear that global pruning is more effective than distributed pruning, i.e., what can
pruned away by distributed pruning will be pruned away by global pruning. The three pruning techniques, the one
in apriori gen, the distributed and global prunings, have increasing pruning power, and the latter ones subsume the
previous one.
3.3 Fast Parallel Mining Algorithm (FPM)
We present the FPM algorithm in this section. It is an enhancement of CD. The simple support counts exchange
scheme in CD is retained in FPM. The main difference is the incorporation of both the distributed and global
prunings in FPM to reduce the candidate set size.
The first iteration of FPM is the same as CD. Each processor scans its partition to find out local support counts
of all size-1 itemsets and use one round of count exchange to compute the global support counts. At the end of the
1-st iteration, in addition to L 1 , each processor also finds out the gl-large itemsets GL 1(i) , for
For the k-th iteration of FPM, k ? 1, the program fragment executed at processor i, 1 - i - n, is described in
Figure
2.
compute candidate sets CG
(distributed pruning)
prune candidates in CG k by global pruning;
scan partition D i to find the local support count X :sup(i) for all remaining candidates
with all other processors to get global support counts X :sup , for all
return
Figure
2: The FPM Algorithm
Similar to CD, FPM is also implemented by collective communication operations of MPI on the SP2.
In order to compare the effects of distributed and global pruning, we have also implemented a variant FNG (FPM
with no global pruning) of FPM. FNG does not perform the global pruning, i.e., it's procedure is the same as that
in
Figure
2, except step 2 is removed.
4 Data Skewness and Workload Balance
In a database partition, two data distribution characteristics, data skewness and workload balance, have orthogonal
effects on prunings and hence performance of FPM.
Intuitively, the data skewness of a partitioned database is high if the supports of most large itemsets are clustered
in a few partitions. It is low if the supports of most large itemsets are distributed evenly across the processors. In
Table
1, it is clear that all the itemsets have high skewness.
For a partition with high skewness, even though the support of each large itemset is clustered at a few processors,
the clusterings of different large itemsets may be distributed evenly across the processors or concentrated on a few of
them. In the first case, the clusterings of the large itemsets are distributed evenly among the processors; hence, each
processor would have similar number of locally large itemsets. We characterise this case as high workload balance. In
the second case, the clusterings would be concentrated on a few processors; hence some processors would have much
more locally large itemsets than the others. This is the low workload balance case. For example, the itemsets in
Table
1 not only have high skewness, it also has a good workload balance; because A, B are locally large at processor
1, and C, D at processor 2, whereas E, F at processor 3.
It follows from our discussion of the pruning techniques that high data skewness would increase the chance of
candidate sets pruning; however, it is not the only factor, workload is another critical factor. In the following, we will
see that given a good data skewness, if the distribution of the clusterings amount the processors are not even, then
the pruning effects would be reduced significantly, and, to aggravate the problem more, the work of computing the
large itemsets would be concentrated on a few processors which is a very troublesome issue for parallel computation.
Example 2 As explained above, Table 1 is a case of high data skewness and high workload balance. The supports of
each itemset are distributed mostly in one partition; hence, the skewness is high. On the other hand, every partition
has the same number of locally large itemsets; therefore, the workload balance is also high. In this case, CD will
generate
candidates in the second iteration. Whereas, the distributed pruning will generate only three
candidates AB, CD and EF , which shows that the pruning has good effect for this distribution.
local support at processor 1 13 33 12 34 2 1
local support at processor 2
local support at processor 3
global support
gl-large at processor 1
gl-large at processor 2 \Theta \Theta \Theta \Theta \Theta \Theta
gl-large at processor 3 \Theta \Theta \Theta \Theta
Table
2: High data skewness and low workload balance case
Table
2 is an example of high data skewness but low workload balance. The thresholds are the same as that in
Table
1, i.e., the global support threshold is 15 and the local support threshold at each processor is 5. The support
count distribution of each item is the same as that in Table 1 except that items A; B; C and D are now locally
large together at processor 1 instead of distributed between processors 1 and 2. In this lower workload balance case,
distributed pruning will generate 7 size-2 candidates, namely AB, AC, AD, BC, BD, CD and EF , while CD will
still have 15 candidates. Thus, the distributed pruning remains to be very effective, but not as good as that in the
high workload balance case (Table 1).
local support at processor 1 6 12 4 13 5 12
local support at processor 2 6 12 5 12 4 13
local support at processor 3
global support
gl-large at processor 1
\Theta
gl-large at processor 2
\Theta
gl-large at processor 3 \Theta
Table
3: Low data skewness and high workload balance case
Table
3 is an example of low data skewness and high workload balance. The support counts of the items A,
B, C, D, E and F are almost equally distributed over the 3 processors. Hence, the data skewness is low. On the
other hand, the workload balance is high, because the number of locally large itemsets in each processor is almost
the same. In this case, both CD and distributed pruning generate the same 15 candidate sets; hence, if we restrict
pruning to the distributed pruning, then it has no advantage over CD in this case. However, global pruning can
prune away the candidates AC, AE and CE. In other words, FPM still has a 20% of improvement over CD in this
pathological case of low skewness and high balance. 2
Following Example 2, it is observed that global pruning is more effective than distributed pruning and can perform
significant candidates reduction even in the moderate data skewness or low workload balance cases. As a note, low
skewness and low balance cannot occur together. Also, according to our analysis, distributed pruning can prune away
almost
n (n is the number of partitions) of all the size-2 candidates generated by CD in the high data skewness
and high workload balance case.
In summary, distributed pruning is very effective when a database is partitioned with high skewness and high
balance. On the other hand, in the worst cases of high skewness with low balance or high balance with low skewness,
the effect of distributed pruning is degraded to the level in CD, however, global pruning may still perform better than
CD. To strengthen our studies, we investigated the problem of defining metrics to measure skewness and balance.
4.1 Data Skewness Metric
We have developed a skewness metric based on the well established notion of entropy [5]. Given a random variable
entropy is a measurement on how even or uneven its probability distribution is over its values. If a database
is partitioned over n processors, the value pX
X:sup can be regarded as the probability of occurrence of an
itemset X in partition D i , n). The entropy
log(p X (i))) is a measurement of the
distribution of the local supports of X over the partitions. For example, if X is skewed completely into a single
partition D k , (1 - k - n), i.e., it only occurs in D k , then pX k. The value of
is the minimal in this case. On the other hand, if X is evenly distributed among all the partitions, then pX
the value of log(n) is the maximal in this case. Therefore the following metric can be used
to measure the skewness of a data partition.
Table
local count at processor 1 13
local count at processor 2 1 3 12 34 1 4 0.348
high local count at processor 3
data skewness S(X) 0.452 0.633 0.429 0.697 0.429 0.586
high TS(D) 0.494
workload balance TB(D) 0.999
Table
local count at processor 1 13 33 12 34 2 1 0.601
local count at processor 2
high local count at processor 3
data skewness S(X) 0.452 0.633 0.429 0.697 0.429 0.586
low TS(D) 0.494
workload balance TB(D) 0.789
Table
3 local count at processor 1 6 12 4 13 5 12 0.329
local count at processor 2 6 12 5 12 4 13 0.329
low local count at processor 3
data skewness S(X) 0.015 0.001 0.012 0.001 0.012 0.001
high TS(D) 0.005
workload balance TB(D) 0.999
Table
4: Data Skewness and Workload Balance
Given a database partition D i , (1 - i - n), the skewness S(X) of an itemset is defined by
log(n).
The skewness S(X) has the following properties:
the skewness is at its lowest value when X is distributed
evenly in all partitions.
such that pX the skewness is at its
highest value when X occurs only in one partition.
in all the other cases.
It follows from the property of entropy that S(X) increases with respect to the skewness of X ; hence, it is a
suitable metric for the skewness of an individual itemset. Table 4 shows the skewness of the large itemsets in Tables 1,
2 and 3.
In addition to measuring the skewness of an itemset, we also need a metric to measure the skewness of the
database partition. We define the skewness of a database partition as a weighted sum of the skewness of all the large
itemsets. In other words, the skewness of a partition is a measurement of the total skewness of all the large itemsets.
Given a database partition D i , (1 - i - n), the skewness TS(D) of the partition is defined by
X2LS S(X) \Theta w(X), where LS is the set of all the large itemsets,
Y 2I S
Y:sup
is the weight of
the support of X over all the large itemsets in LS , and S(X) is the skewness of X.
TS(D) has some properties similar to S(X).
when the skewness of all the itemsets are at its minimal value.
when the skewness of all the itemsets are at its maximal value.
in all the other cases.
In
Table
4, the skewness TS(D) of the partitions for the three situations have computed. (For illustration purpose,
we only have computed TS(D) with respect to the skewness of all the size-1 large itemsets.) Note that we have
ignored the small itemsets in the computation of the skewness of a partition. Since the purpose of our task is to
investigate the effect of data skewness on candidate sets pruning, and this only involves large itemsets, this restriction
would in fact make the metric more relevant to candidate set pruning.
4.2 Workload Balance Metric
Workload balance is a measurement of the distribution of the support clusterings of the large itemsets over the
partitions at the processors. Based on the definition of w(X) in Definition 2 and that of pX (i) in Definition 1, we
define
X2Ls w(X) \Theta pX (i) to be the itemset workload in a partition D i , where L s is the set of all the large
itemsets. Intuitively, the workload W i in partition D i is the ratio of the total supports of the large itemsets in D i
over all the partitions. Note that
A partition has high workload balance if W i are the same for all partitions D i , On the other hand,
if distribution of W i over the partitions are very uneven, then the workload balance is low. As has been pointed
out, the workload balance has important bearing on the pruning and performance of parallel mining. In parallel to
the metric for data skewness, we also define a metric workload balance factor to measure the workload balance of a
partition, which is based also on entropy.
Definition 3 For a database partition D i , database D, the workload balance factor TB(D) of the
partition is given by
log(n) .
The metric TB(D) has the following properties:
when the workload across all processors are the same;
when the workload is concentrated on one processor;
in all the other cases.
In
Table
4, the workload W i of the first and last cases (Tables 1 and 3) have a high balance, and the values of
are almost equal to 1. In the second case (Table 2), the workload at processor 2 has been shifted to processor
1, and hence created an unbalance case; the value of TB(D) thus has been reduced to 0.789, which indicates a
moderate workload balance.
The data skewness metric and workload balance factor are not independent. Theoretically, each one of them
could have values range from 0 and 1. However, some combinations of their values are not admissable. First, let us
consider some boundary cases.
Theorem 2 Let be a partition of a database D.
1. If then the admissable values of TB(D) range from 0 to 1. If
2. If then the admissable values of TS(D) range from 0 to 1. If
Proof:
1. By definition 0 - TB(D) - 1. What we need to prove is that the boundary cases are admissable when
implies that large itemsets X. Therefore, each large itemset is large
at one and only one processor. If all the large itemsets are large at the same processor i, (1 - i - n), then
On the other hand, if each processor
has the same number of large itemsets, then W
then large itemsets X . This implies that W i are the same for all 1 - i - n. Hence
2. It follows from the first result of this theorem that both are admissable when
1. Therefore the first part is proved. Furthermore, if there exists a partition D i ,
This implies that all large itemsets are locally
large at only D i . Hence shown in Theorem 2 that not all possible combinations
are admissable. In general, the admissable combinations will be a subset of the unit square such as the one in Figure 3.
It always contains the two segments Figure 3) and Figure 3), but not the
After defining the metrics and studying their characteristics, we can validate our observation
on the relationship between data skewness, workload balance and candidates pruning effect in our performance
studies.
Performance Studies
In order to confirm our analysis that the proposed FPM is an efficient algorithm for mining associations in a parallel
system, we have implemented all the algorithms on an IBM SP2 and carried out a substantial performance evaluation
and comparison.
We have the following three goals in our studies: (1) to verify that FPM is faster than the representative algorithm
CD, and confirm that the major performance gain is from the two pruning techniques; (2) to confirm the observation
that both data skewness and workload balance are two critical factors in the performance of FPM; (3) to demonstrate
that FPM has good parallelism and scalability as a parallel algorithm.
We implemented FPM, its variant FNG, and CD. The IBM SP2 parallel system we used has
processors (66.7MHz) with 64 MB main memory, running the AIX operating system. Communication between
Figure
3: Admissable Combinations of Skewness(S) and Balance(B)
processors are through a high performance switch with an aggregated peak bandwidth of 40 MBps and a latency of
about 40 microseconds. Data was allocated to the local disk in each processor, and the database partition on each
node is about 100MB in size.
In order to be able to control the experiments to test different data distributions and scenarios, many works
[2, 3, 9, 15, 16] in mining association rules have adopted the standard technique introduced in [2] to generate the
database. We have enhanced the technique for the generation of database partitions and introduced parameters to
control the skewness and workload balance. Table 5 is a list of the parameters used in our synthetic databases.
Details of the data generation technique is in the appendix.
D number of transactions in each partition
average size of the transactions
I average size of the maximal potentially large itemsets
L number of maximal potentially large itemsets
N number of items
partition skewness
n number of partitions
Table
5: Synthetic Database Parameters
5.1 Relative Performance
In order to compare the performance between FMP, FNG, and CD, a databases and twenty data sets have been
generated. The data sets generated and their skewness and balance factors are listed in Table 6. The number of
partitions in each case is and the size of each partition is about 100MB. The name of a partition is
denoted by Dx.Ty.Iz.Sr.Bl, where x is the number of transactions in each partitions, y is the average size of the
transactions, z is the average size of the itemsets. The two parameters Sr and Bl are two important parameters
used to control the skewness and workload balance in the data generation. (The Bl values are listed separately in
the table.) In Table 6, we have also computed the measured skewness TS(D) and the balance factor TB(D) of the
partitions generated. It is important to note that these measured skewness and workload are very close to the values
of the controlled parameters, i.e., the values of S and B are good approximations of values of TS(D) and TB(D).
In addition, they cover a wide range of skewness and balanace. Thus, our synthesized data partitions are good
simulation of data partitions of various distribution characteristics. We believe this is technically valuable because
even real data may not be general enough to cover all possible distributions.
Name
Table
Attributes of Synthetic Databases
We ran FPM, FNG and CD on the database partitions in Table 6. The minimum support threshold is 0.5%. The
improvement of FPM and FNG over CD in response time are recorded in Table 7, and the result is very encouraging.
FPM and FNG are consistently faster than CD in all cases. In the following, we analyze the performance gain
of FPM and FNG in three aspects: (1) improvement when the workload balance is high, and the skewness varies
from high to moderate; (2) improvement when the skewness is high, and the workload balance varies from high to
moderate; (3) desirable and undesirable combinations of skewness and workload balance values.
Response Time FPM/CD FNG/CD
Table
7: Performance Improvement of FPM and FNG over CD
Figure
4 is the relative performance between FPM, FNG and CD on partitions with different skewness and a high
balance value performs much better than CD when the skewness is relatively high (s ? 0:5). On the
Response
time(sec.)
Relative Performance-D3278K.T5.I2.S?.B100(n=16, minsup=0.5%)
CD
Figure
4: Relative Performance on Databases with High Balance and Different Skewness
other hand, FPM outperforms CD significantly even when the skewness is in the moderate range, (0:1 - s - 0:5).
When B=90, the result in Table 7 shows that FPM is again much faster than CD. This demonstrates that FPM
outperforms CD consistently given a high workload balance and at least a moderate skewness.1000300050000 0.1 0.3 0.5 0.7 0.9 1
Response
time(sec.)
Relative Performance-D3278K.T5.I2.S90.B?(n=16, minsup=0.5%)
CD
Figure
5: Relative Performance on Databases with High Skewness and Different Workload Balance
Figure
5 is the relative performance given a high skewness different workload balance. Both FPM
and FNG perform much better than CD when the workload balance is relatively high (B ? 0:5); however, the
improvement in the range of moderate balance, (0:1 - B - 0:5), is marginal. This confirms our observation that
workload balance is an essential requirement. It shows that a high skewness has to accompany by a high workload
balance. The effect of a high skewness with a moderate balance may not be as good as that of a high balance with
a moderate skewness.
In
Figure
6, we vary both the skewness and balance together from a low value range to a high value range. The
Response
time(sec.)
Skewness and Balance(S,B)
Relative Performance-D3278K.T5.I2.S?.B?(n=16, minsup=0.5%)
CD
Figure
Relative Performance on Databases when both Skewness and Balance change
trend shows that the improvement of FPM over CD increases faster when both values approach the high value range.
Combining the observations in the above three cases together with the results in Table 7, we can divide the area
covering all the admissable combinations of skewness and balance in our experiments into four performance regions
as shown in Figure 7. Region A is the most favorable region in which the balance is high and the skewness varies
from high to moderate. FPM in general is 50% to 100% faster than CD. In region B, the workload balance value has
degraded moderately and the skewness remains high; in this case, the gain in FPM over CD is around 50%. Region
covers combinations that have very low workload balance; the gain in FPM falls into a moderate range of about
30%. Region D contains the most undesirable combinations; FPM only has marginal performance gain.
Figure
8 provides us another view to understand the candidates pruning effects. It shows the ratio on the number
of candidate sets between FPM (FNG) and CD for the same experiments in Figure 4. The reduction ratios for
the runs in the database D3278K.T5.I2.Sr.B100, are in the first graph. When the skewness
is high, distributed pruning has a 79.2% of reduction in candidate sets comparing with CD, and global
pruning has a 93.9% reduction. When the skewness is low, distributed pruning only has a 6.6% reduction,
but global pruning has a 30.7% reduction. This confirm our observation on the effect of high balance combined with
high or moderate skewness.
5.2 Scalability and Parallelism : Speedup and Scaleup
In order to study the efficiency of FPM as a parallel algorithm, we investigate its speedup and scaleup against CD.
Speedup is the reduction in response time vs the number of processors, given that the total size of the database
remains unchanged. The more processors are used, the faster the computation should be. The ideal speedup is
a linear function on the number of processors. Scaleup is the performance vs the number of processors when the
database size is scaled up proportional to the number of proccesors. If the algorithm has high efficiency and low
overhead, its performance would maintain uniform when both the number of processors and the size of the database
scaled up proportionally.
In the speedup experiment, we execute the algorithms on a fixed size database with various number of processors
* A
Figure
7: Performance regions (FPM/CD) in the admissible combinations of skewness and workload
on
number
of
candidate
sets
Pruning Effect-D3278K.T5.I2.S?.B100(n=16, minsup=0.5%)
Apriori_gen(no pruning)
Distributed Pruning/Apriori_gen
Global Pruning/Apriori_gen
Figure
8: Pruning Effect on Databases in Figure 4
Response
time(sec.)
Number of processors
CD
FPM14122028
Number of processors
Relative Speedup-D3278K.T5.I2.S90.B100
CD
Figure
9: Speedup on a Database
and partitions. We selected the database with high skewness and balance as a presentative to perform the study.
The database is listed in Table 8. It has a total size of 1.6GB, and was first divided into 16 partitions. Subsequently,
we combined the partitions to form databases with 8, 4, 2, and zero partitions.
Figures
9 is the execution times and speedups of FPM, FNG, and CD on the databases. The speedups are also
shown in Table 8. FNG had a linear speedup and FPM achieved a remarkable superlinear speedup. The reason
behind FPM's superlinear speedup is the increase in the skewness when the number of partitions increases.
In the scaleup experiment, both the database size and the number of processors are scaled up proportionally.
The number of processors involved were increased from 1 to 16, and the sizes of the databases were increased
correspondingly from 100MB to 1.6GB. Each database were partitioned according to the number of processors such
that every partition is maintained at the size of 100MB. We performed the experiment based on the database
D3278K.T5.I2.S90.B100, i.e., the databases are generated with the same parameters. Figure 10 shows the result of
the experiment. Surprisingly, both FPM and FNG not only can maintain the performance, their response time in
Databases Speedup of FPM Speedup of FNG Speedup of CD
Table
8: Speedup on five databases with different distribution characteristics
fact had gone down when the database was scaled up. The prime reason for this is the increase in pruing capability
when the number of partitions increases.
6 Discussion
To restrict the search of large itemsets in a small set of candidates is essential to the performance of mining association
rules. The pruning techniques we proposed are theoretically interesting, because they have effect only in the parallel
case but not the serial case. Both distributed and global pruning provide significant amount of pruning power, in
particular, when the data distribution is in a favorable situation, i.e. when workload balance is high and the skewness
is at least at a moderate level. It is important to study partition techniques that can deliver a good data distribution.
Random approaches in general will deliver partitions which have good balance. However, the skewness would be
difficult to guarantee together with good workload balance. Clustering technique such as the k-means algorithm [12]
will give good skewness. It remains an open problem how to modify clustering technique to generate partitions which
have good skewness and also good workload balance.
7 Conclusion
A parallel algorithm FPM for mining association rules has been proposed. A performance study carried out on
an IBM SP2 shared-nothing memory parallel system shows that FPM consistently outperforms CD. It also has
nice scalability in terms of speedup and scaleup. The gain in performance in FPM is due mainly to the pruning
techniques incorporated. It was discovered that the effectiveness of the pruning techniques depend highly on the
data distribution characteristics, which can be measured by two data skewness and workload balance. Our
analysis and experiment results show that the pruning techniques are very sensitive to workload balance, though
good skewness will also have important positive effect. The techniques are very effective in the best case of high
balance and high skewness. The combination of high balance and moderate skewness is the second best case. In the
worst case of low balance and low skewness, FPM can only deliver the performance close to that of CD. Since mining
associations has many interesting applications, important future works would include fine tuning of the proposed
parallel techniques on real business cases.
--R
Mining Association Rules between Sets of Items in Large Databases.
Fast algorithms for mining association rules.
Parallel mining of association rules: Design
Dynamic itemset counting and implication rules for market basket data.
Elements of information theory.
A fast distributed algorithm for mining association rules.
Maintenance of Discovered Association Rules in Large Databases: An Incremental Updating Technique.
Advances in Knowledge Discovery and Data Mining.
Discovery of Multiple-level association rules from large databases
Scalable parallel data mining for association rules.
Scalable POWERparallel Systems
Some methods for classification and analysis of multivariate observations
Message Passing Interface Forum.
Exploratory Mining and Pruning Optimizations of Constrainted Association Rules.
An effective hash-based algorithm for mining association rules
Efficient Parallel Data Mining for Association Rules.
An efficient algorithm for mining association rules in large databases.
Database Achievements and Opportunities Into the 21st Century.
Mining generalized association rules.
Mining sequential patterns: Generalizations and performance improvements.
Mining quantitative association rules in large relational tables.
Hash based parallel algorithms for mining association rules.
Parallel data mining for association rules on shared-memory multi-processors
--TR
--CTR
Frans Coenen , Paul Leng, Partitioning strategies for distributed association rule mining, The Knowledge Engineering Review, v.21 n.1, p.25-47, March 2006
Vipin Kumar , Mohammed Zaki, High performance data mining (tutorial PM-3), Tutorial notes of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.309-425, August 20-23, 2000, Boston, Massachusetts, United States | data skewness;data mining;workload balance;parallel mining;association rules;parallel computing |
593499 | Scalable Techniques for Mining Causal Structures. | Mining for association rules in market basket data has proved a fruitful area of research. Measures such as conditional probability (confidence) and correlation have been used to infer rules of the form the existence of item A implies the existence of item B. However, such rules indicate only a statistical relationship between A and B. They do not specify the nature of the relationship: whether the presence of A causes the presence of B, or the converse, or some other attribute or phenomenon causes both to appear together. In applications, knowing such causal relationships is extremely useful for enhancing understanding and effecting change. While distinguishing causality from correlation is a truly difficult problem, recent work in statistics and Bayesian learning provide some avenues of attack. In these fields, the goal has generally been to learn complete causal models, which are essentially impossible to learn in large-scale data mining applications with a large number of variables.In this paper, we consider the problem of determining casual relationships, instead of mere associations, when mining market basket data. We identify some problems with the direct application of Bayesian learning ideas to mining large databases, concerning both the scalability of algorithms and the appropriateness of the statistical techniques, and introduce some initial ideas for dealing with these problems. We present experimental results from applying our algorithms on several large, real-world data sets. The results indicate that the approach proposed here is both computationally feasible and successful in identifying interesting causal structures. An interesting outcome is that it is perhaps easier to infer the lack of causality than to infer causality, information that is useful in preventing erroneous decision making. | Introduction
In this paper we consider the problem of determining casual relationships, instead of mere as-
sociations, when mining market basket data. We discuss ongoing research in Bayesian learning
where techniques are being developed to infer casual relationships from observational data, and
we identify one line of research in that community which appears to hold promise for large-scale
data mining. We identify some problems with the direct application of Bayesian learning ideas to
mining large databases, concerning both the issue of scalability of algorithms and the appropriateness
of the statistical techniques, and introduce some ideas for dealing with these problems. We
present experimental results from applying our algorithms on several large, real-world data sets.
The results indicate that the approach proposed here is both feasible and successful in identifying
interesting causal structures. A significant outcome is that it appears easier to infer the lack of
causality, information that is useful in preventing erroneous decision making. We conclude that the
notion of causal data mining is likely to be a fruitful area of research for the database community
at large, and we discuss some possibilities for future work.
Let us begin by briefly reviewing the past work involving the market basket problem, which
involves a number of baskets, each of which contains a subset of some universe of items. An
alternative interpretation is that each item has a boolean variable representing the presence or
absence of that item. In this view, a basket is simply a boolean vector of values assigned to these
variables. The market basket problem is to find "interesting" patterns in this data. The bulk of
past research has concentrated on patterns that are called association rules, of the type: "item Y
is very likely to be present in baskets containing items
A major issue in mining association rules has been that of finding appropriate definitions of
"interest" for specific applications. An early approach, due to Agrawal, Imielinski, and Swami [2],
was to find a pair of items that occur together often (that is, have high support), and also have
the property that one item often occurs in baskets containing the other item (that is, have high
confidence). 1 In effect, this framework chooses conditional probability as the measure of interest.
Many variants of this interest measure have been considered in the literature, but they all have
a flavor similar to conditional probability. These measures were critiqued by Brin, Motwani, and
Silverstein [9], who proposed statistical correlation as being a more appropriate interest measure
for capturing the intuition behind association rules.
In all previous work in association rules and market basket mining, the rules being inferred,
such as "the existence of item A in a basket implies that item B is also likely to be present in
that basket," often denoted as A ) B, indicate only the existence of a statistical relationship
between items A and B. They do not, however, specify the nature of the relationship: whether
the presence of A causes the presence of B, or the converse, or some other phenomenon causes
both to appear together. The knowledge of such causal relationships is likely to be useful for
enhancing understanding and effecting change; in fact, even the knowledge of the lack of a casual
relationship will aid decision making based on data mining. We illustrate these points in the
1 The support-confidence definition easily extends beyond pairs of items to incorporate sets of arbitrary size.
following hypothetical example.
Consider a supermarket manager who notes that his meat-buying customers have the following
purchasing pattern: buy hamburgers 33% of the time, buy hot dogs 33% of the time, and buy both
hamburgers and hot dogs 33% of the time; moreover, they buy barbecue sauce if and only if they buy
hamburgers. Under these assumptions, 66% of the baskets contain hot dogs and 50% of the baskets
with hot dogs also contain barbecue sauce. The manager will find that the association rule hot-
dogs ) barbecue-sauce has both high support and confidence. (Of course, the rule hamburger
) barbecue-sauce has even better confidence, but that is an obvious association.)
A manager who has a deal on hot dogs may choose to sell them at a large discount, hoping to
increase profit by simultaneously raising the price of barbecue sauce. However, the correct causal
model (that the purchase of hamburgers causes the purchase of barbecue sauce) tells us that this
approach is not going to work. In fact, the sales of both hamburgers and barbecue sauce are likely
to plummet in this scenario, as the customers buy more hot dogs and fewer hamburgers, leading to
a reduction in sales of barbecue sauce. If the manager could infer the correct causal model, or even
infer that "hot-dogs causes barbecue-sauce" is not part of any possible causal model, he could
avoid a pricing fiasco.
A basic tenet of classical statistics ([6], [20]) is that correlation does not imply causation. Thus,
it appears impossible to infer causal relationships from mere observational data available for data
mining, since we can only infer correlations from such data. In fact, it would seem that to infer
causal relationships it is essential to collect experimental data, in which some of the variables are
controlled explicitly. This experimental method is neither desirable nor possible in most applications
of data mining.
Fortunately, recent research in statistics and Bayesian learning communities provide some avenues
of attack. Two classes of technique have arisen: Bayesian causal discovery, which focuses on
learning complete causal models for small data sets [8, 12, 14, 15, 16, 17, 21, 22, 23, 25, 26, 27], and
an offshoot of the Bayesian learning method called constraint-based causal discovery, which use the
data to limit - sometimes severely - the possible causal models [11, 26, 24]. While techniques in
the first class are still not practical on very large data sets, a limited version of the constraint-based
approach is linear in the database size and thus practical on even gigabytes of data. We present a
more flexible constraint-based algorithm, which is linear in the number of records (baskets) in the
database, though it is cubic in the number of items in each record. Despite the cubic time bound,
the algorithm proves to be practical for databases with thousands of items.
In this paper, we explore the applicability of a constraint-based causal discovery to discovering
causal relationships in market basket data. Particularly, we build on ideas presented by Cooper [11],
using local tests to find a subset of the causal relationships. In the rest of this section, we discuss
causality for data mining in the context of research into causal learning. We begin, in Section 2 with
a particular constraint-based algorithm, due to Cooper [11], upon which we build the algorithms
This example is borrowed from a talk given by Heckerman.
presented in this paper. We then enhance the algorithm so that for the first time causality can be
inferred in large-scale market-basket problems.
ffl Section 2 introduces "CCU" inferences, a form of causal structure not used by [11].
ffl Section 3 discusses weaknesses of the Cooper algorithm, notably a susceptibility to statistical
error, and how power statistics such as correlation can be used to mitigate these problems.
ffl In Section 4 we describe in detail the algorithms we developed for discovering causal relation-
ships, and we also discuss discovery of noncausal relationships, an important technique that
filters many statistically unlikely inferences of causality.
ffl For the first time, we are able to run causality tests on real, large-scale data. In Section 5
we test this algorithm on a variety of real-world data sets, including census data and text
data. In the former data sets we discover causal relationships (and nonrelationships) between
census categories such as gender and income. In the text data set we discover relationships
between words.
ffl Finally, in Section 6, we discuss possible directions for future research.
1.1 Previous Research in Causality
As we have mentioned, there has been significant work in discovering causal relationships using
Bayesian analysis. A Bayesian network is a combination of a probability distribution and a structural
model that is a directed acyclic graph in which the nodes represent the variables (attributes)
and the arcs represent probabilistic dependence. In effect, a Bayesian network is a specification
of a joint probability distribution that is believed to have generated the observed data. A causal
Bayesian network is a Bayesian network in which the predecessors of a node are interpreted as
directly causing the variable associated with that node.
In Bayesian learning techniques, the user typically specifies a prior probability distribution over
the space of possible Bayesian networks. These algorithms then search for that network which
maximizes the posterior probability of the data provided. In general, they try to balance the
complexity of the network with its fit to the data.
The possible number of causal networks is severely exponential in the number of variables, so
practical algorithms must use heuristics to limit the space of networks. This process is helped
by having a quality prior distribution, but often the prior distribution is unknown or tedious to
specify, particularly if the number of variables (i.e., items) is large. In this case, an uninformative
prior is used. Even when informative priors are available, the goal of finding a full causal model is
aggressive, and Bayesian algorithms can be computationally expensive. While improved heuristics,
and the use of sampling, may make Bayesian algorithms practical, this has yet to be demonstrated
for data sets with many variables.
In our view, inferring complete causal models (i.e., causal Bayesian networks) is essentially
impossible in large-scale data mining applications with thousands of variables. For our class of
applications, the so-called constraint-based causal discovery method [24, 26] appears to be more
useful. The basic insight here, as articulated by Cooper [11], is that information about statistical
independence and dependence relationships among a set of variables can be used to constrain
(sometimes significantly) the possible causal relationships among a subset of the variables. A simple
example of such a constraint is that if attributes A and B are independent, then it is clear that
there is no causal relationship between them. It has been shown that, under some reasonable set
of assumptions about the data (to be discussed later), a whole array of valid constraints can be
derived on the causal relationships between the variables.
Constraint-based methods provide an alternative to Bayesian methods. The PC and FCI algorithms
[26] use observational data to constrain the possible causal relationships between variables.
They allow claims to be made such as "X causes Y ," "X is not caused by Y ," "X and Y have a
common cause," and so on. For some pairs, they may not be able to state the causal relationship.
These constraint-based algorithms, like the Bayesian algorithms, attempt to form a complete
causal model and therefore can take exponential time. (Due to the complexity of their causal tests,
they may also be less reliable than simpler algorithms.) Cooper [11] has described an algorithm
called LCD that is a special case of the PC and FCI algorithms and runs in polynomial time. Since
our algorithm is based on Cooper's, we discuss it in some detail in Section 2.
1.2 Causality for Market Basket Analysis
Finding causality in the context of data mining is particularly difficult because data sets tend to be
large: on the order of megabytes of data and thousands of variables. While this large size poses a
challenge, it also allows for some specializations and optimizations of causal algorithms, holding out
promise that algorithms crafted particularly for data mining applications may yield useful results
despite the large amount of data to be processed. This promise holds particularly true for market
basket data, which is an even more specialized application. Below, we note some issues involved
with finding causality in the market basket case.
ffl Market basket data is boolean. This may allow for added efficiency over algorithms that work
with discrete or continuous data. As we shall see in Section 3.1, some statistical tests that are
essential to constraint-based causal discovery have pleasant properties in the boolean case.
ffl The traditional market basket problem assumes there is no missing data: that is, for a given
item and basket it is known whether or not the item is in the basket. This assumption
obviates the need for complex algorithms to estimate missing data values.
ffl Because market basket data is usually voluminous, algorithms that need a large amount of
data to develop a causal theory are well suited to this application.
ffl With thousands of items, there are likely to be hundreds of thousands of causal relation-
ships. While an optimal algorithm might find all these relationships and output only the
"interesting" ones (undoubtedly using another data mining algorithm as a subroutine!), it
is acceptable to find and output only a small number of causal relationships. Selection may
occur either due to pruning or due to an algorithm that finds only causal relationships of a
certain form. Algorithms that output a small number (possibly arbitrarily decided) of causal
relationships may not be useful outside a data mining context. Data mining, however, is
used for exploratory analysis, not hypothesis testing. Obviously, a technique for finding all
causal relationships and somehow picking "interesting" ones is superior to one that chooses
relationships arbitrarily, but even techniques in the latter category are valuable in a data
mining setting.
ffl Again, for market basket applications with thousands of items, finding a complete causal
model is not only expensive, it is also difficult to interpret. We believe isolated causal rela-
tionships, involving only pairs or small sets of items, are easier to interpret.
ffl For many market basket problems, discovering that two items are not causally related, or
at least not directly causally related (that is, one may cause the other but only through
the influence of a third factor), may be as useful as finding out that two items are causally
related. While complete causal models illuminate lack of causality as easily as they illuminate
causality, algorithms that produce partial models are more useful in the market basket setting
if they can discover some noncausal relationships as well as causal relationships.
These aspects of discovering causality for market basket data drove the development of the
algorithms we present in Section 4. Many of these issues point to constraint-based methods as
being well suited to market basket analysis, while others indicate that tailoring constraint-based
methods - for instance by providing error analysis predicated on boolean data and discovering
lack of causality - can yield sizable advantages over using generic constraint-based techniques.
2 The LCD Algorithm
The LCD algorithm [11] is a polynomial time, constraint-based algorithm. It uses tests of variable
dependence, independence, and conditional independence to restrict the possible causal relationships
between variables. The crux of this technique is the Markov condition [26].
A be a node in a causal Bayesian network, and let B be
any node that is not a descendant of A in the causal network. Then the Markov condition holds if
A and B are independent, conditioned on the parents of A.
The intuition of this condition is as follows: If A and B are dependent, then B must either be
a (possibly indirect) cause of A or (possibly indirectly) caused by A. In the second case, B is a
descendant of A, while in the first B is an ancestor of A and has no effect on A once A's immediate
parents are fixed.
Assuming the Markov condition, we can make causal claims based on independence data. For
instance, suppose we know, possibly through a priori knowledge, that A has no causes. Then if B
is dependent on A, B must be caused by A, though possibly indirectly. If we have a third variable
C dependent on both A and B, then the three variables lie along a causal chain. Variable A, since
it has no causes, is at the head of the chain, but we don't know whether B causes C or vice versa.
If, however, A and C become independent conditioned on B, then we conclude by the Markov
condition that B causes C.
In the discussion that follows, we denote by B ! C the claim that B causes C. Note that,
contrary to normal use in the Bayesian network literature, we do not use this to mean that B is
a direct cause of C. Because we have restricted our attention to only three variables, we cannot
in fact say with assurance that B is a direct cause of C; there may be a confounding variable D,
or some hidden variable, that mediates between B and C. A confounding variable is a variable
that interacts causally with the items tested, but was not discovered because it was not included in
the tests performed. A hidden variable represents an effect that interacts causally with the items
tested, but is not captured by any variable in the data set.
Even with hidden and confounding variables, we can say with assurance that A is a cause of B
and B a cause of C. We can also say with assurance that A is not a direct cause of C, since its
causality is mediated by B, at the minimum.
If we drop the assumption that A has no causes, then other models besides A
consistent with the data. In particular, it may be that A / C. In this case,
it is impossible, without other knowledge, to make causality judgments, but we can still say that
A is not a direct cause of C, though we do not know if it is an indirect cause, or even caused by C
instead of causing C.
We summarize these observations in the CCC rule, so named since it holds when A, B, and C
are all pairwise correlated. 3
Rule 1 (CCC causality) Suppose that A, B, and C are three variables that are pairwise depen-
dent, and that A and C become independent when conditioned on B. Then we may infer that one
of the following causal relations exists between A, B, and C:
Now suppose two variables B and C are independent, but each is correlated with A. Then B
and C are not on a causal path, but A is on a causal path with both of them, implying either both
are ancestors of A or both are descendants of A. If B and C become dependent when conditioned
on A, then by the Markov condition they cannot be descendants of A, so we can conclude that B
and C are causes of A. This observation gives rise to the CCU rule, so named since two variable
pairs are correlated and one is uncorrelated.
Rule 2 (CCU causality) Suppose A, B, and C are three variables such that A and B are corre-
lated, A and C are correlated, and B and C are uncorrelated, and that B and C become correlated
when conditioned on A. Then we may infer that B and C cause A.
Again we cannot say whether hidden or confounding variables mediate this causality.
3 Here correlation indicates dependence and not a specific value of the correlation coefficient. While use of the
term "correlation" we intend should be clear from context.
Algorithm: LCD
Input: A set V of variables. w, a variable known to have no causes. A data set D. Tests
for dependence, independence, and conditional independence (D, I, and CI respectively).
Output: A list of causal relationships supported by the data.
For all variables x 6= w
If D(x; y)
For all variables y 62 fx; wg
If D(x; y) and D(y; w) and CI(x;
output 'x causes y'
Table
1: The LCD algorithm.
The LCD algorithm uses the CCC rule (but not the CCU rule) to determine causal relation-
ships. It looks at triples of items, where one item is known a priori to have no cause. In this way
it can disambiguate the possible causal models. The algorithm assumes tests for dependence and
conditional independence. It is shown in Table 1.
The LCD algorithm depends on the correctness of the statistical tests given as input. If one
test wrongly indicates dependence or conditional independence, the results will be invalid, with
both false positives and false negatives. An additional assumption, as has already been stated,
is in the applicability of the Markov condition. We list some other assumptions, as described by
Cooper [11], and their validity for market basket data.
Database Completeness The value of every variable is known for every database record. This
is commonly assumed for market basket applications.
Discrete Variables Every variable has a finite number of possible values. The market basket
problem has boolean variables.
Causal Faithfulness If two variables are causally related, they are not independent. This is a
reasonable assumption except for extraordinary data sets, where, for instance, positive and
negative correlations exactly cancel.
Markov Condition This condition is reasonable if the data can actually be represented by a
Bayesian network, which in turn is reasonable if there is no feedback between variables.
Bias The probability distribution over the data set is equal to the probability distribution
over the underlying causal network. The reasonableness of this assumption depends
on the specific problem: if we only collect supermarket data for customers who use a special
discount card, there is likely to be selection bias. If we collect data for all customers, or
random customers, selection bias is unlikely to be a problem.
Valid Statistical Testing If two variables are independent, then the test of independence will say
so. If they are dependent, the test of dependence will say so. This assumption is unreasonable,
since all tests have a probability of error. When many tests are done, as is the case for the
LCD algorithm, this error is an even bigger concern (see Section 3.1).
A criticism of the LCD algorithm is that it finds only causal relationships that are embedded
in CCC triples, presumably a small subset of all possible causal relationships. Furthermore, this
pruning is not performed on the basis of a goodness function, but rather because of the exigencies
of the algorithm: these are the causal relationships that can be discovered quickly. While this trait
of the LCD algorithm is limiting in general, it is not as problematic in the context of data mining.
As we mentioned in Section 1.2, data mining is used for exploratory analysis, in which case it is
not necessary to find all, or even a small number of specified, causal relationships. While not ideal,
finding only a small number of causal relationships is acceptable for data mining.
3 Determining Dependence and Independence
Cooper [11] uses tests for dependence and independence as primitives in the LCD algorithm, and
also proposes Bayesian statistics for these tests. In our approach, we use instead the much simpler
refer to [9] for a discussion on using the chi-squared tests in market basket applications.
The necessary fact is that if two boolean variables are independent, the - 2 value is likely to exceed
the threshold value - 2
ff with probability at most ff. There are tables holding - 2
ff for various values of
ff. 4 We say that if the - 2 value is greater than - 2
ff , then the variables are correlated with probability
We extend this definition to the market basket problem by adding the concept of support,
which is the proportion of baskets that a set of items occurs in.
be a support threshold and c 2 (0; 1) be a confidence
threshold. An itemset S ' I is said to be (s; c)-correlated (hereafter, merely correlated) if the
following two conditions are met:
1. The value of support(S) exceeds s.
2. The - 2 value for the set of items S exceeds the - 2 value at significance level c.
Typical values for the two threshold parameters are then we
would expect that, for 5% of the pairs that are actually uncorrelated, we would claim (incorrectly)
they are correlated.
Support is not strictly necessary; we use it both to increase the effectiveness of the chi-squared
test and to eliminate rules involving infrequent items.
Intimately tied to the notion of correlation is that of uncorrelation, or independence. Typically,
uncorrelation is defined as the opposite of correlation: an itemset with adequate support is uncorrelated
if the - 2 value does not support correlation. In effect, the chi-squared test is being applied
as a one-tailed test.
4 In the boolean case the appropriate row of the table is the one for 1 degree of freedom.
This definition is clearly problematic: with sets with a - 2 value just below the
cutoff will be judged uncorrelated, even though we judge there is almost a 95% chance the items
are actually correlated. We propose, instead, a two-tailed test, which says there is evidence of
dependence if
ff and evidence of independence if
ff 0 . The following definition is based
on this revised test.
be a support threshold and c 2 (0; 1) be a confidence
threshold. An itemset S ' I is said to be (s; c)-uncorrelated (hereafter, merely uncorrelated) if the
following two conditions are met:
1. The value of support(S) exceeds s.
2. The - 2 value for the set of items S does not exceed the - 2 value at significance level c.
then we would expect that, for 5% of the pairs that are actually uncorrelated, we would
fail to say they are uncorrelated. Note that we would not necessarily say they are correlated: a pair
of items may be neither correlated nor uncorrelated. Such a pair cannot be part of either CCC
causality or CCU causality.
We can use the chi-squared test not only for dependence and independence, but also for conditional
dependence and conditional independence. Variables A and B are independent conditioned
on C if p(AB j C). The chi-squared test for conditional independence looks
at the statistic - 2 (AB j is the chi-squared value
for the pair A; B limited to data where As with standard correlation, we use a two-tailed
chi-squared test, using different thresholds when testing for conditional dependence as opposed to
conditional independence.
For example, suppose everybody over both drives and votes, but nobody under does
either. Then driving and voting are dependent - quite powerfully, since driving is an excellent
predictor of voting, and vice versa - but they are independent conditioned on age. To see this, note
that if we know somebody's age, knowing whether they drive yields no extra insight in predicting
whether they vote.
Note that both the correlation and the uncorrelation tests bound the probability of incorrectly
labeling uncorrelated data, but do not estimate the probability of incorrectly labeling correlated
pairs. This is a basic problem in statistical analysis of correlation: while rejecting the null hypothesis
of independence requires only one test, namely that the correlation is unlikely to actually be 0,
rejecting the null hypothesis of dependence requires an infinite number of tests: that the correlation
is not 0:5, that the correlation is not 0:3, and so on. Obviously, if the observed correlation is 0:1,
it is likelier that the actual correlation is 0:3 than that it is 0:5, giving two different probabilities.
It is unclear what number would capture the concept that the pair is "correlated." One solution
to this problem is to define correlation as "the correlation coefficient is higher than a cutoff value."
For boolean data, this is equivalent to testing the chi-squared value as we do above; see Section 3.1
and
Appendix
A for details.
3.1 Coefficient of Correlation
The LCD algorithm can perform the tests for dependence and independence tens of thousands of
times on data sets with many items. Though the individual tests may have only a small probability
of error, their frequent use means there will be hundreds of errors in the final result. This problem
is exacerbated by the fact a single erroneous dependence judgment could form the basis of up to
rules.
This problem is usually handled in the statistical community by lowering the tolerance value
for each individual test, so that the total error rate is low. In general, with thousands of tests the
error rate will have to be set intolerably low. However, for boolean data even a very low tolerance
value is acceptable because of a connection between the probability of error and the strength of
correlation, presented in the following theorem. This proof of this theorem, along with the concept
of correlation coefficient at its heart, can be found in Appendix A.
Theorem 1 Let X and Y be boolean variables in a data set of size n, with correlation coefficient
ae. will fail to be judged correlated only if the confidence
level for the correlation test is below that for - 2
Because of this relationship, by discarding rules that are more likely to be erroneous, we are
at the same time discarding rules with only a weak correlation. Weak rules are less likely to be
interesting in a data mining context, so we are at the same time reducing the probability of error
and improving the quality of results.
4 Algorithms for Causal Discovery
In the following discussion we shall use the following terminology: A pair of items constitutes a
C-edge if they are correlated according to the correlation test, and they constitute a U-edge if they
are uncorrelated according to the uncorrelation test. (Note that an item pair may be neither a
C-edge nor a U-edge.) We denote the number of items by m, the number of baskets by n, and the
degree of node A - that is, the number of C- and U - edges involving item A - by \Delta A . When
necessary, we shall also refer to \Delta C
A and \Delta U
A , which are the degree of A when restricted to C- and
U-edges, respectively. Let \Delta be the maximum degree, that is, maxA are defined
similarly.
We consider the performance of algorithms with respect to three factors: memory use, running
time, and number of passes required over the database. Since our techniques look at triples of items,
memory is enough to store all the count information needed for our algorithms. Because
of this, machines with O(m 3 ) memory require only one pass over the database in all cases. The
algorithms below assume that m is on the order of thousands of items, so caching the required
database information in this way is not feasible. However, we consider O(m memory to be
available. Situations where less memory is available will have to rely on the naive algorithm, which
requires only O(1) memory.
4.1 The Naive Algorithm
Consider first the brute force search algorithm for determining all valid causal relations from market
basket data. Effectively, we iterate over all triples of items, checking if the given triple satisfies the
conditions for either CCC or CCU causality. This requires a conditional independence test, which
requires the count nABC . Thus, the brute force algorithm requires O(m 3 ) passes over the database,
and this alone takes time O(nm 3 ). However, the algorithm requires only O(1) memory. If M words
of memory are available, we can bundle count requests to reduce the number of database passes to
O(m 3 =M ).
4.2 The CC-path Algorithm
The naive algorithm can be speeded up easily if O((\Delta C memory is available: Consider each
item A in turn, determine all items connected to A via C-edges, and for each pair B and C of
these C-neighbors check if either causality rule applies to ABC. This approach requires that we
examine instead of O(m 3 ). More importantly, it requires only n passes over the
database, since in the pass for item A, we can use the space to store counts for all ABC
in which B and C are connected to A by a C-edge. The running time of the resulting algorithm
is accurately, the running time is O(n
accurately still, it
is O(n
A
m)), since it takes O(nm) time just to calculate which neighbors of A are
correlated. In the future, we ignore such fine distinctions.) This algorithm has the same worst-case
running time as the naive algorithm, but unless \Delta C
A is very large it is faster than performing the
naive algorithm and bundling n 2 count requests.
4.3 The CU-path Algorithm
The CC-path algorithm is so named because it looks at (with A as the joint) and then
checks for the existence of the third, uncorrelated, edge. Another approach, appropriate only for
finding CCU causality, is to look for C \Gamma U paths and check if the third edge is correlated. This
algorithm is superior when \Delta U
A for most A. Let \Delta
A \Delta U
A g (in general, this will
be less than \Delta C \Delta U ). The CU-path algorithm requires O(\Delta CU ) memory,
O(m) passes over the database. Again, there is the tighter but more complicated time bound of
O(n
A \Delta U
A ).
4.4 The CU-path Algorithm with Heuristic
The CU-path algorithm allows for a heuristic that is not available for the CC-path algorithm. It
follows from the fact every CCU triple has two C \Gamma U paths but only one Therefore,
for every U edge there is a choice, when looking for C \Gamma U paths, of whether to look at one endpoint
or the other. From a computational point of view it makes sense to pick the endpoint that abuts
fewer C-edges. As a result there will be fewer C \Gamma U paths to process. (One way to think of it
is this: there are C \Gamma U paths that are part of CCU triples, and those that are not. The former
Theoretical Theoretical clari Theoretical clari
Algorithm Space Time Time DB passes DB passes
naive O(1) O(nm 3
CC-path
CU-path
CU-path with heuristic
Table
2: Summary of running time and space for finding CCU causal relationships, in both theory
and practice on the clari data set (Section 5.4). This data set has
Time is in seconds of user time. To improve running time, the algorithm grouped items together
to use the maximum memory available on the machine. Thus, a comparison of memory use is not
helpful. The naive algorithm was not run on this data set.
we must always look at, but the latter we can try to avoid.) This heuristic has proven extremely
successful, particularly when the number of C-edges is large. For the clari data set (Section 5.4),
the CU-path heuristic cut the running time in half. The improvement in the smaller clari.world
data set (Section 5.2 was percent.
Optimizations are possible. For instance, the algorithms described above check twice whether a
pair of items share an edge, once for each item in the pair. It would be faster, memory permitting,
to determine all correlated and uncorrelated edges once as a pre-processing step and store them in
a hash table. Even better would be to store edges in an adjacency list as well as in the hash table,
to serve as a ready-made list of all C- and U-edges abutting the "joint" item. In experiments, this
improvement in data structures halved the running time. Caching as many triple counts as will fit
in main memory will also improve the running time by a constant factor.
4.5 Comparison of Performance
Table
2 holds a summary of the algorithms we consider and their efficiencies. Note that the number
of database passes is not the same for all algorithms. This is because if an item lacks a correlated
(or uncorrelated) neighbor, we need not perform a database pass for that item. For the clari
data set (Section 5.4), there are 316295 C-edges but only 5417 U-edges. This explains the superior
performance of the CU-path algorithm, both in terms of time and database passes.
When the data is very large, we expect the I/O cost - the cost of moving data between main
and secondary memory - to dominate, rather than processing cost. However, there is really no
difference, for these algorithms, between processor and I/O costs. In justification, for a fixed amount
of main memory, the number of passes over the data that we need is proportional to the number
of DB passes times the space required in each pass. The reason is that we may process in parallel
the passes for just as many items as can have their needed space in main memory simultaneously.
If we look at Table 2, we see that the time required for each algorithm is n times the product of
the space and DB passes. Thus, "time" is proportional to I/O cost for the algorithms we consider,
moved-last-5yrs male support A
never-married employed car/cab ? \Gamma0:0497 \Gamma0:0138 0:2672
householder 20-40K native-amer A / B / C 0:2205 \Gamma0:0111 \Gamma0:0537
military pay govt ? 0:1350 \Gamma0:0795 \Gamma0:5892
Table
3: Some of the 25 causal CCC relationships found in census data. The causal relationship
is given when it can be disambiguated using a priori information. ae is the coefficient of correlation
between the pair of items, and is positive when the two items are found often together, and negative
when they are rarely found together.
A and B each cause C ae AC ae BC
black and nograd-HS each cause car/cab \Gamma0:0207 \Gamma0:1563
asian and laborer each cause !20K 0:0294 \Gamma0:0259
asian and laborer each cause 20-40K \Gamma0:0188 0:0641
employed and military each cause under-43 \Gamma0:0393 \Gamma0:2104
employed and military each cause never-married \Gamma0:0497 \Gamma0:0711
sales and householder each cause nograd-HS \Gamma0:0470 \Gamma0:0334
Table
4: Some of the 36 causal CCU relationships found in census data. The causal relationship
is uniquely determined. ae is the coefficient of correlation between the pair of items. It is not given
for the AB pair because this pair is uncorrelated.
and henceforth we shall only consider processor time in our comparisons.
5 Experimental Results
We use two data sets for our analysis, similar to the ones used by Brin, Motwani, and Silverstein [9].
One holds boolean census data (Section 5.1). The other data set is a collection of text data from
UPI and Reuters newswires (Section 5.2). We actually study two newsgroup corpora, one of which
is significantly larger than the other.
In the experiments below, we used a chi-squared cutoff
edges. We use the definition of support given by Brin, Motwani, and Silverstein [9]. All experiments
were performed on a Pentium Pro with a 166 MHz processor running Solaris x86 2.5.1, with 96
Meg. of main memory. All algorithms were written in C and compiled using gcc 2.7.2.2 with the
-O6 compilation option.
5.1 Census Data
The census data set consists of binary items; it is a 5% random
sample of the data collected in Washington state in the 1990 census. The items are listed in
Appendix
B. To simplify the pinterpretation of many items, we discarded responses of those under
and over 60 years old. 5 Census data has categorical data that we divided into a number of boolean
variables. Thus, for marital status we have several items: married, divorced, separated,
widowed, never-married. Every individual has true for one of these variables and false for
the rest.
The test for CCU causality took 3 seconds of user CPU time to complete, while the test for
CCC causality took 35 seconds of user CPU time. This indicates the census data has many more
C edges than U edges, which is not surprising since all variables derived from the same census
question are of necessity correlated.
In
Table
3 we show some of the results of finding CCC causality. Since several variables (such as
male and under-43) cannot have causes, census data fits well into Cooper's LCD framework, and
it is often possible to determine the direction of causation. Because of the possibility of confounding
and hidden variables however, we cannot determine direct causality. The CCC test, however, allows
us to rule out direct causality, and this in itself yields interesting results.
Intuitively, an apparent relationship between two variables is explained by a third variable. For
example, being in a support position is correlated with having moved in the past five years. This
may lead one to believe that support personnel are unusually unlikely to move around. However,
when we condition on being white, the apparent relationship goes away. From this, we can guess
that being white causes one to move frequently, and also causes one not to be in support. Notice
that in any case the correlation between support and moving is very weak, indicating this rule is
not powerful.
Another CCC rule shows that if people who are never married are less likely to drive to work,
it is only because they are less likely to be employed. (The conditional is used here because we
cannot be sure of the causal relationship: are the unmarried less likely to have jobs, or are the
unemployed less likely to get married?)
Table
4 shows some of the CCU causal relationships discovered on census data. While the causal
relationship is uniquely determined, confounding and hidden variables keep us from determining if
causality is direct. For instance, in the first row of Table 4, we can say not having graduated high
school causes one not to drive to work, but we do not know if this is mediated by the fact high
school dropouts are less likely to have jobs. A causal rule such as nograd-HS ! employed may
exist, but if so neither the CCC nor CCU causality tests found it. As we see, these algorithms are
better at exploratory analysis than hypothesis testing.
Note that both CCC and CCU causality tests discovered a causal relationship between being
employed and never having been married. The CCU result can be used to disambiguate among
the possible causal relationships found from the CCC test. A danger of this if that if the CCU
result is inaccurate, due to statistical error, using it to disambiguate the CCC result propagates
the error.
As it is, an improper uncorrelation judgment can cause many erroneous causal inferences. For
instance, the uncorrelated edge sales-householder is the base of 10 CCU judgments, causing
5 For instance, one choice for marital status is, "Never married or under 15 years old," while the question regarding
means of transportation to work conflates being unemployed and being under 16.
causal inferences. If this edge was marked uncorrelated incorrectly, all 20 causal inferences are
unjustified. In fact, our a priori knowledge would lead us to believe there is a correlation between
being in sales and being the head of a household. Causal inferences based on this U-edge, such
as the last entry in Table 4 are clearly false - dropping out of high school is temporally prior to
getting a job or a house, and thus cannot be caused by them - leading us to question all causal
inferences involving the sales-householder edge.
5.2 Text Data
We analyzed 3056 news articles from the clari.world news hierarchy, gathered on 13 September
1996, comprising megabytes of text. For the text experiments, we considered each article to
be a basket, and each word 6 to be an item. These transformations result in a data set that looks
remarkably different from the census data: there are many more items than baskets, and each
basket is sparse. To keep the number of items to a reasonable level, we considered only words that
occurred in at least 10 articles. We also removed commonly occurring "stop words" such as "the,"
"you," and "much." We were left with 6723 distinct words.
Since we have no a priori knowledge to distinguish between the possible causal models returned
by the CCC algorithm, we ran only the CCU algorithm on the text data. The algorithm returned
73074 causal relationships. To study these, we sorted them by (the absolute value of) their correlation
coefficient. We would expect the very top pairs to be obvious causal relationships, and indeed
we see from Figure 5 that this is the case. To explore more interesting causal relationships, we also
show some results from 5% down the list of correlations.
Even the first set of causal relationships, along with its obvious relationships such as "united"
causing "states," has some surprises. One is in the relationships "quoted" causes "saying," probably
part of the set phrase, ". was quoted as saying ." Though this may not illuminate the content
of the corpus, it does lend insight into the writing style of the news agency.
Another interesting property is the frequency of causal relationships along with their converse.
For instance, "prime" causes "minister" and "minister" causes "prime." The probable reason is
that these words are usually found in a phrase and there is therefore a deterministic relationship
between the words; that is, one is unlikely to occur in an article without the other. When words
are strongly correlated but not part of a phrase - "iraqi" and "iraq" are an example - then we
only see the causal relationship in one direction. This observation suggests a somewhat surprising
use of causality for phrase detection. If words that always occur together do so only as part of a
phrase, then we can detect phrases even without using word location information, just by looking
for two-way causality. Presumably, incorporating this strategy along with conventional methods of
phrase detection would only improve the quality of phrase identification.
The causal relationships at the 5% level are as intriguing as those at the top of the list. The
causal relationship "infiltration" ! "iraqi" points to an issue that may bear further study. Other
6 A word was defined to be a series of alphanumeric characters. However, we allowed a word to have a single internal
punctuation mark, which we removed. We also lower-cased all words. Thus the sentence "It'll cost you one-no,
two-pence for that pince-nez" has the words itll, cost, you, one, no, two, pence, for, that, and pincenez.
Causal relationships - 2 value ae Causal relationships - 2 value ae
united ! states 1691:0389 0:7439 forces ! company 70:5456 \Gamma0:1519
states ! united 1691:0389 0:7439 company ! forces 70:5456 \Gamma0:1519
prime
prime 1288:8601 0:6494 commitment ! peace 70:2756 0:1516
quoted ! saying 866:6014 0:5325 british ! perry 70:2082 0:1516
news ! agency 718:1454 0:4848 support ! states 70:1291 0:1515
agency ! news 718:1454 0:4848 states ! support 70:1291 0:1515
Table
5: Causal relationships from the top and 5% mark of the list of causal relationships for words
in the clari.world news hierarchy. The list is sorted by (the absolute value of the) correlation
coefficient (last column). The - 2 value measures the confidence that there is a causal relationship;
all these - 2 values indicate a probability of error of less than 0:0001. The ae value measures the
power of the causality.
relationships, such as "saturday" ! "state," seem merely bizarre. Note also how quickly the
correlation coefficients drop for this data set; only 2:3% of the causal relationships have ae ? 0:2.
A final note about the causal relationships is they seem to disproportionately concern Iraq.
While Iraq was much in the news during September 1996, the news hierarchy includes articles
concerning all parts of the world, from Latin America to Africa to Oceania. However, there were
a diffuse set of issues relating to these areas, each with its own vocabulary. Only Iraq seemed to
have the large number of cohesive articles necessary to pass the support and confidence thresholds.
Whether this is a feature of the causal algorithm 7 or a bug depends on the individual application.
5.3 Comparing Causality with Correlation
A question naturally arises: what is the advantage of causal discovery over merely ranking correlated
item pairs? In Figure 6 we show the top 10 correlations, as measured by the correlation coefficient.
These results are directly comparable to the top portion of Figure 5. Two difference are immediately
noticeable. One is the new item pairs. Some of them, like "iraq" and "warplanes," seem like
significant additions. Others, like "hussein" and "northern," have plausible explanations (the U.S.
flight zone is restricted to the Northern and Southern bands of the Iraq) but do not seem to belong
so high on the list; other, more perspicuous, causal relationships have a lower correlation coefficient.
The other noticeable difference is that, since correlation is symmetric, there is no case of a pair
and its converse both occurring. Insofar as asymmetric causalities yield extra understanding of the
data set, identifying causal relationships yields an advantage over identifying correlations.
A third difference, not noticeable in the figure, is that there are many more correlation rules
7 Actually, since support and confidence are concepts used to identify C- and U-edges, this is a concern not only
for causal discovery but for any methodology based on a similar definition of correlation.
reuter - upi 2467:2895 \Gamma0:8985
states - united 1691:0389 0:7439
minister - prime 1288:8601 0:6494
quoted - saying 866:6014 0:5325
agency - news 718:1454 0:4848
hussein - northern 678:5580 0:4712
Table
Correlations from the top of the list of correlations, sorted by (the absolute value of the)
correlation coefficient (last column). This list is a superset of the list of top causal relationships
Figure
5). The - 2 value measures the confidence that there is a correlation; all these - 2 values
indicate a probability of error of less than 0:0001. The ae value measures the power of the causality.
than causal rules. While there are around 70 thousand causal relationships in this data set, there
are 200 thousand correlated pairs.
5.4 Performance on a Large Text Data Set
While the clari.world hierarchy is somewhat homogeneous, which as we have seen is an advantage
when pruning, at megabytes it is a small dataset. We therefore repeated the text experiments
on the entire clari hierarchy, a larger, more heterogeneous news hierarchy that covers sports,
business, and technology along with regional, national, and international news. This data set was
gathered on 5 September 1997. While clari.world is logically a subtree of the clari hierarchy,
the clari.world database is not a subset of the clari database since the articles were collected on
different days. The clari data set consists of 27803 articles and 186 megabytes of text, and is thus
ten times larger than the clari.world data set. However, the number of items was kept about the
same - the larger data set, at 6303 items, actually has fewer items than the clari.world data
set - due to the pruning of infrequent words. In both cases, words were pruned that occurred
in fewer than 0:3% of all documents; for the clari data set this worked out to an 84 document
minimum.
As in the smaller data set, the terms with the highest correlation come from a coherent subset
of documents from the collection. Unfortunately, the coherent subset of the clari collection is a
large mass of Government postings soliciting bids for automotive supplies, and most of the words
used in these posts are abbreviations of technical terms. Thus, the top causalities are "recd" causes
"solnbr" and "desc" causes "solnbr"; we must go down 25 lines before we find causality involving
two English words. Even then, the relationship - "office" causes "contact" - involves words from
the procurement articles.
The causal relationships found 5% down the list are a little more interesting. Some are shown
Causal relationships - 2 value ae
cause ! company 558:2142 0:1417
constitutes ! number 557:8370 0:1416
modification
today
people ! update 556:6686 0:1415
28 556:1250 0:1414
Table
7: Causal relationships from the list of causal relationships for words in the clari news
hierarchy, starting from 5% down the list when the list is sorted by (the absolute value of the)
correlation coefficient (last column). The - 2 value measures the confidence that there is a causal
all these - 2 values indicate a probability of error of less than 0:0001. The ae value
measures the power of the causality.
in
Figure
7. Note that, as in the smaller text data set, the correlation coefficient rapidly becomes
rather low.
6 Conclusion and Further Research
In data mining context, constraint-based approaches promise to find causal relationships with the
efficiency needed for the large data sets involved. The size of the data mining data sets mitigate some
of the weaknesses of constraint-based approaches, namely that they sometimes need large amounts
of data in order to make causal judgments, and instead of finding all causal relationships, they only
find a subset of these relationships. For data mining, which seeks to explore data rather than to test
a hypothesis, finding only a portion of the causal relationships is acceptable. Furthermore, with
large data sets, the number of actual causal relationships is likely to be so large that algorithms
that return only a small portion of the relationships are likely to yield interesting results. Another
weakness of constraint-based algorithms, the error inherent in repeated use of statistical tests, is
mitigated in boolean data by using a power statistic to reduce the probability of error without
discarding powerful causal relationships.
We developed a series of algorithms, based on techniques used in Cooper's LCD algorithm, that
run in time linear in the size of the database and cubic in the number of variables. For large data
sets with thousands of variables, these algorithms proved feasible and returned a large number of
causal relationships and, equally interesting, not-directly-causal relationships. This feasibility came
from heuristics and algorithmic choices that improved on both the time and memory requirements
of the naive cubic-time algorithm.
Finding causal relationships is useful for a variety of reasons. One is that it can help in visualizing
relationships among variables. Another is that, unlike correlation, causation is an asymmetric
concept. In contexts where it is possible to intervene on the variables (for instance, when a manager
can choose not to stock certain food items) causality can help predict the effect of the intervention,
whereas a correlation analysis cannot. In the context of text analysis, causation can help identify
phrases.
There are still a variety of unresolved and unexplored issues in the area of mining for causal
relationships. We briefly list some of them below.
Choosing Thresholds Is there a way to determine optimal values for the correlation and uncor-
relation cutoffs for a given data set? Better yet, is it possible to replace cutoff values with
estimates of the probability of correlation efficiently?
Disambiguation We mentioned in Section 5.1 that, at the risk of propagating error, we can use
known causal rules to disambiguate the CCC causality rule. However, we have seen that
both may occur in data. Is there a principled way to resolve bidirectional
causality for disambiguation? Can we then devise efficient algorithms for using incremental
causal information to perform disambiguation?
Hidden Variables Bidirectional causality may indicate deterministic relationships (as in text
phrases), error in statistical tests, or the presence of hidden variables. Under what situations
can we be confident hidden variables are the cause? What other techniques can we use to
discover hidden variables?
Heuristics for Efficiency How can we make the above algorithm even more efficient? The largest
speedups could be obtained by avoiding the need to check all triples. Can we determine when
the conditional independence test will fail on triples without explicitly testing them? Can we
reduce the number of items, perhaps by collapsing items with similar distributions?
Acknowledgments
We would like to thank the members of the Stanford Data Mining research group, particularly Lise
Getoor, for their useful comments and suggestions. We would also like to thank Greg Cooper and
David Heckerman for fruitful discussions.
--R
Inferring structure in semistructured data.
Mining association rules between sets of items in large databases.
Database mining: a performance perspective.
Fast discovery of association rules.
Fast algorithms for mining association rules in large databases.
Categorical Data Analysis.
A Survey of exact inference for contingency tables.
Probabilistic evaluation of counterfactual queries.
Beyond market baskets: Generalizing association rules to correlations.
Dynamic itemset counting and implication rules for market basket data.
A simple constraint-based algorithm for efficiently mining observational databases for causal relationships
A Bayesian method for the Induction of Probabilistic Networks from Data.
Advances in Knowledge Discovery and Data Mining.
A Bayesian approach to learning causal networks.
Bayesian networks for data mining.
Learning Bayesian networks: The combination of knowledge and statistical data.
A Bayesian approach to causal discovery.
A definition and graphical representation of causality.
Mathematical Statistics with Applications.
From Bayesian networks to causal networks.
Causal diagrams for empirical research.
Graphical models for probabilistic and causal reasoning.
A theory of inferred causation.
An algorithm for fast recovery of sparse causal graphs.
Causal inference in the presence of latent variables and selection bias.
Mining generalized association rules.
Sampling large databases for finding association rules.
Correlation and causation.
--TR
--CTR
Stefano Ceri , Francesco Di Giunta , Pier Luca Lanzi, Mining constraint violations, ACM Transactions on Database Systems (TODS), v.32 n.1, p.6-es, March 2007
Pedro Domingos , Matt Richardson, Mining the network value of customers, Proceedings of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining, p.57-66, August 26-29, 2001, San Francisco, California
Zhiping Zeng , Jianyong Wang , Lizhu Zhou , George Karypis, Out-of-core coherent closed quasi-clique mining from large dense graph databases, ACM Transactions on Database Systems (TODS), v.32 n.2, p.13-es, June 2007
Man Leung Wong , Shing Yan Lee , Kwong Sak Leung, Data mining of Bayesian networks using cooperative coevolution, Decision Support Systems, v.38 n.3, p.451-472, December 2004
Ling Feng , Jeffrey Xu Yu , Hongjun Lu , Jiawei Han, A template model for multidimensional inter-transactional association rules, The VLDB Journal The International Journal on Very Large Data Bases, v.11 n.2, p.153-175, October 2002
Qing Li , Ling Feng , Allan Wong, From intra-transaction to generalized inter-transaction: landscaping multidimensional contexts in association rule mining, Information SciencesInformatics and Computer Science: An International Journal, v.172 n.3-4, p.361-395, 9 June 2005
Ioannis Tsamardinos , Laura E. Brown , Constantin F. Aliferis, The max-min hill-climbing Bayesian network structure learning algorithm, Machine Learning, v.65 n.1, p.31-78, October 2006 | data mining;association rules;text mining;causality;market basket |
593514 | Scaling Kernel-Based Systems to Large Data Sets. | In the form of the support vector machine and Gaussian processes, kernel-based systems are currently very popular approaches to supervised learning. Unfortunately, the computational load for training kernel-based systems increases drastically with the size of the training data set, such that these systems are not ideal candidates for applications with large data sets. Nevertheless, research in this direction is very active. In this paper, I review some of the current approaches toward scaling kernel-based systems to large data sets. | Introduction
Kernel-based systems such as the support vector machine (SVM) and
Gaussian processes (GP) are powerful and currently very popular approaches
to supervised learning. Kernel-based systems have demonstrated
very competitive performance on several applications and data
sets. Kernel-based systems also have great potential for KDD appli-
cations, since their degrees of freedom grow with training data size,
and they are therefore capable of modeling an increasing amount of
detail with increasing data set size. Unfortunately, there are at least
three problems when one tries to scale up these systems to large data
sets. First, training time increases dramatically with the size of the
training data set; second, memory requirements increase with data;
and third, prediction time is proportional to the number of kernels,
which is equal to (or at least increases with) the size of the training
data set. A number of researchers have approached these issues and
have developed solutions for scaling kernel-based systems to large data
sets. I will review these approaches in this paper, where focus will be
on the computational complexity of training.
The paper is organized as follows. Section 2 is a brief introduction
to kernel-based systems and implementation issues. Section 3 presents
various approaches to scaling kernel-based systems to large data sets.
First, in Section 3.1, I will present approaches based on the idea of com-
2001 Kluwer Academic Publishers. Printed in the Netherlands.
Volker Tresp
mittee machines. Section 3.2 covers data compression approaches. Here,
the kernel systems are applied to compressed or sub-sampled versions
of the original training data set. Section 3.3 discusses e-cient methods
for the linear SVM based on modications of the optimization problem
to be solved. Some training regimes for kernel-based systems require
the solution of a system of linear equations the size of the training data
set. Section 3.4 presents various approaches to e-ciently solving this
system of equations. In Section 3.5, projection methods are discussed.
The solutions here are based on a nite-dimensional approximation to
the kernel system. Section 4 provides conclusions.
2. Kernel-Based Systems for Supervised Learning
2.1. Kernel-based System
In kernel-based systems, the response ^
f(x) to an input x is calculated
as a superposition of kernel functions K(x;
Here, w i is the weight on the i-th kernel. Kernels are either dened for
all input patterns D
or for a subset of the training data, as
in the case of the SVM. Sometimes a bias term b is included, and
In regression, ^
corresponds to an estimate of
the regression function, and in (binary) SVM classication, the estimated
class label is the sign of ^
In some cases,
the kernel functions K(x; are required to be positive denite func-
tions. Typical examples are linear kernels K(x; x
positive integer q, and Gaussian
kernels are a special case, since here the equivalent linear representation
with weight vector computationally more e-cient if the
input dimension is smaller than the size of the training data set. The
rows of the design matrix A are the input vectors of the training data
set. Kernel-based systems dier in how the weights w i are determined
based on the training data.
Scaling Kernel-Based Systems 3
2.2. Gaussian Process Regression (GPR)
In GPR, one assumes a priori that a function f(x) is generated from an
innite-dimensional Gaussian distribution with zero mean and covariance
dened at input points x i and x j . Furthermore,
we assume a set of training data
where targets are
generated according to
where i is independent additive Gaussian noise with variance 2 . The
optimal regression function ^
f(x) takes on the form of Equation 1, where
the kernel
is determined by the covariance function. Based on our assumptions,
the maximum a posterior (MAP) solution for
the cost function2 w
(w y) 0 (w y) (4)
where , with is the N N Gram ma-
trix. 1 The optimal weight vector is the solution to a system of linear
equations, which in matrix form becomes
Here is the vector of targets and I is the N
N-dimensional unit matrix. MacKay (1997) provides an excellent introduction
to Gaussian processes.
2.3. Generalized Gaussian Process Regression (GGPR)
Gaussian processes can nd a wider range of applications by permitting
a more
exible measurement process. In particular, we might assume
that y i 2 f0; 1g is the class label of the i-th pattern and that
is the posterior probability for Class 1. The corresponding cost function
log
be the the values of f at the location of the training data. Using
this identity, the cost function can also be written as2 (f m
4 Volker Tresp
In this case, the optimal weights are found iteratively using an iterated
re-weighted least squares algorithm. The approach can be generalized
to any density from the exponential family of distributions. Discussion
of GGPR can be found in Tresp (2000b), Williams and Barber (1998),
and Fahrmeir and Tutz (1994).
2.4. Support Vector Machine (SVM)
The SVM classies a pattern according to the sign of Equation 2. The
most commonly used SVM cost function is2 w
Here, D is an NN-dimensional diagonal matrix with ones and minus
ones on the diagonal (corresponding to the class label of the respective
patterns), e is an N-dimensional vector of ones, C 0 is a constant
negative components of the vector within the bracket
to zero. Note the similarity between the SVM and the GGPR cost
function. The dierence is that the measurement process for the SVM
is not derived from the exponential family of distributions as it is for
the GGPR.
More common is the following equivalent denition with a dieren-
tiable cost function and constraints. The weights in the SVM minimize
the cost function 1
are the slack variables with i 0 subject to
the constraint that
Here and in the rest of the paper is meant to be applied component-
wise. By introducing an N-dimensional vector of Lagrange multipliers
for enforcing the constraints, one obtains the dual problem:
Maximize
with the constraints
The weights w and the Lagrange multipliers are related via
The optimal weight vector is sparse | that is the weight w i for
many kernels is zero after training. The remaining kernels with nonzero
weights dene the support vectors. It can be shown that the solution
minimizes a bound on the generalization error (Vapnik, 1998). Vapnik
Scaling Kernel-Based Systems 5
(1998), Scholkopf, Burges and Smola (1999), Christianini and Shawe-Taylor
(2000), and Muller, Mika, Ratsch, Tsuda, and Scholkopf (2001)
are excellent sources of information about the SVM.
2.5. Training
Solving the system of linear equations (Equation 5) for GPR requires
operations. The iterated re-weighted least squares algorithm
used for training the GGPR typically requires that systems of similar
linear equations must be solved repeatedly.
For the support vector machine, the dual optimization problem requires
the solution of a quadratic programming (QP) problem with linear
constraints. Due to the large dimension of the optimization problem,
general QP routines are unsuitable even for relatively small problems (a
few hundred data points): the common interior point methods require
repeated solution of linear equations with the dimensionality of the
number of variables.
To solve the high-dimensional QP problems for the SVM, special
algorithms have been developed. The most important ones are chunk-
ing, decomposition, and sequential minimal optimization (SMO). All
methods iteratively solve smaller QP problems. Both chunking and
decomposition require a QP solver in their inner loops. Decomposition
scales better with the size of the training data set since the dimensionality
of the QP problem is xed, whereas for the chunking algorithm, this
dimensionality increases until it reaches the number of support vectors.
Chunking was one of the earliest approaches used for optimizing the
SVM machine. Decomposition was introduced by Osuna, Freund, and
Girosi (1997) and further developed by Joachims (1998). The SMO is
an extreme case of a decomposition algorithm since only two variables
(Lagrange multipliers) are optimized at a time. This can be done ana-
lytically, so that the SMO does not require a QP optimizer in its inner
loop. Decomposition and the SMO are in general faster than chunking.
Experimental evidence suggests that the computational complexity for
both decomposition and the SMO scales approximately to the square
of size of the training data set.
As an alternative to QP, several gradient optimization routines have
been developed. In addition, Perez-Cruz, Alarcon-Diana, Navia-Vazquez,
and Artes-Rodr iguez (2001) used a fast iterated re-weighted least squares
procedure recently to train the SVM.
6 Volker Tresp
2.6. More Kernels: Regularization Networks, Smoothing
Splines, the Relevance Vector Machine and Kernel
Fisher Discriminant
It is not possible to discuss all currently popular kernel-based learning
systems in detail in the limited space allowed here. The regularization
networks of Poggio and Girosi (1990) are essentially identical to
GPR. Here, the kernels are Green's functions derived from the appropriate
regularization problem. Similarly, smoothing splines are closely
related (Wahba, 1990). The relevance vector machine (Tipping, 2000)
achieves sparseness by pruning away dimensions of the weight vector
using an evidence framework. Finally, the kernel Fisher discriminant is
the well-known linear Fisher discriminant approach transformed into a
high-dimensional feature space by means of kernel functions (Muller et
al., 2001).
3. Scaling Kernel-Based Systems to Large Data Sets
This section is the heart of the paper. In it, I discuss various approaches
toward scaling kernel-based systems to large data sets.
3.1. Committee Machines
3.1.1.
Introduction
In committee machines, dierent data sets are assigned to dierent
committee members (i.e., kernel systems) for training, and the predictions
of the committee members are combined to form the prediction of
the committee. Here, I want to discuss two committee approaches that
are particularly suitable for (and have been applied to) kernel-based
systems.
3.1.2. A Bayesian Committee Machine (BCM)
In the BCM approach (Tresp, 2000a), the data are partitioned into
M data sets (of approximately same size) and M
learning systems are trained on their respective training data set. The
BCM calculates the unknown responses at a number of test points at
the same time. Let f
NQ ) be the vector of these response
variables at the NQ test points.
The underlying assumption of the BCM is that
Under this assumption, data sets are independent given f q . This is a
good assumption if f q contains many points, since these points dene
Scaling Kernel-Based Systems 7
the map and make all data independent. The approximation also improves
if the number of data in each set D i is large, which increases
their independence from the other data sets on average.
Based on the assumption, one obtains
A practical algorithm is obtained if we assume that all probability
distributions are approximately Gaussian. Then P (f q jD) is also approximately
Gaussian with
E(f q
and
Here, qq is the NQ NQ prior covariance matrix at the test points.
Equation 8 has the form of a committee machine where the predictions
of the committee members at all NQ inputs are used to form the prediction
of the committee at those inputs. The prediction of each module
i is weighted by the inverse covariance of its prediction. An intuitive
appealing eect is that by weighting the predictions of the committee
members by the inverse covariance, modules that are uncertain about
their predictions are automatically weighted less than modules that are
certain about their predictions.
I applied the BCM to GPR in Tresp (2000). For GPR, the mean and
the covariance of the posterior Gaussian densities are readily computed.
Subsequently, the BCM was applied to GGPR (Tresp, 2000b) and to
the SVM (Schwaighofer and Tresp, 2001). For both the GGPR and
the SVM, the posterior distributions are only approximately Gaussian.
In Tresp (2000), it was shown that NQ , the dimension of f q , should
be at least as large as the eective number of parameters. 2 If this
is the case, the BCM and its generalizations give excellent results.
furthermore, it is possible to derive online Kalman lter versions of
the BCM, which only require one pass through the data set and the
storage of a matrix of the dimension of the number of test points (Tresp,
2000a). After training, the prediction at additional test points requires
resources dependent on the number of test points but is independent
2 Since the latter is closely related to the kernel bandwidth, there is also a close
connection between the kernel bandwidth and NQ .
8 Volker Tresp
of the size of the training data set. On several data sets I found no
dierence in performance between the BCM approximation and the
optimal GPR prediction based on the inversion of the full covariance
matrix. The BCM was applied to training data sets of size
where the full inversion is clearly unfeasible.
3.1.3. Boosting
In boosting, committee members are trained sequentially and the training
of a particular committee member is dependent on the training and
the performance of previously trained members. Boosting can reduce
both variance and bias in the prediction. The reason is that in training
a committee member, more weight is put on data that are misclassied
by previously trained committee members.
Schapire (1990) developed the original boosting approach, boosting
by ltering. Here, three learning systems are used and the existence
of an oracle that can produce an arbitrary quantity of training data
is assumed. The rst learning system is trained on K training data.
Then the second learning system is trained on the same quantity of
data but these training data are generated so that half of them are
classied correctly and half of them are classied incorrectly by the
rst learning system. The third learning system is trained only on data
about which learning systems one and two disagreed. A majority vote
of the three learning systems determines the classication. Note that
the second learning system obtains 50% of patterns for training that
are di-cult for the rst learning system, and that the third learning
system only obtains critical patterns in the sense that learning the rst
and second learning systems disagree on those patterns. This original
boosting algorithm is particularly useful for large data sets, since a
large number of training data are ltered out and are not directly used
for training. In recent years, the focus of interest has shifted toward
boosting algorithms that can also be applied to smaller data sets:
boosting by resampling and boosting by reweighting. Recently, Pavlov,
Mao, and Dom (2000) used a form of boosting by resampling, Boost-
SMO, in the context of training the SVM with large data sets. They
used a small fraction of data (2 { 4%) to train a committee member
using the SMO algorithm. To train a subsequent committee member,
they chose those data with a higher probability which were di-cult for
the previous committee member to classify. In this way, only a portion
of the complete training data set is used for training. The overall prediction
is then a weighted combination of the predictions of the committee
members. In some experiments, Boost-SMO was faster by a factor of 10
than SMO while providing essentially the same prediction accuracy. In
their implementation, the probability of the data are reweighted prior
Scaling Kernel-Based Systems 9
to the training of a new committee member, so multiple passes through
the data are required. Nevertheless, online versions of this approach are
also conceivable.
3.2. Data Compression
Data compression is a generally applicable solution to dealing with large
data sets. The idea is to train the learning system on a smaller data set
that is either generated by subsampling or by preclustering the data.
In the latter case, the cluster centers are used as training patterns. The
idea of preclustering data has been extended in an interesting direction
by applying the concept of squashing to training a linear SVM (Pavlov,
Chudova, and Smyth, 2000). For training, the SMO algorithm is used.
Clustering is performed using a metric derived from the likelihood prole
of the data. First, a small percentage of the original training data
set are randomly chosen as cluster centers. Then, for a linear SVM,
(typically 50{100) random weights v and an oset b are generated
following their prior distributions (a probabilistic version of the SVM
is used). For each data point the log-likelihood for each weight vector is
calculated, producing an L-dimensional vector (likelihood prole) for
each data point. A data point is then assigned to the cluster center
with the closest likelihood prole. Finally, the weight for each cluster
center is proportional to the number of data assigned to a cluster. This
procedure leads to a considerable reduction in training data by taking
into account the statistical properties of the data. The training time
using the SMO with squashing was comparable to the training time of
Boost-SMO (see previous section) by providing a comparable prediction
accuracy.
3.3. Fast Algorithms for Linear SVMs
The SVM was originally formulated as a linear classier; kernels were
introduced in order to be able to obtain nonlinear classication bound-
aries. Training the linear SVM is considerably faster than training the
kernel SVM. The following section discusses approaches that lead to
even faster training algorithms for the linear SVM by modifying the
cost function.
3.3.1. Active Support Vector Machine (ASVM)
The ASVM was developed by Mangasarian and Musicant (2001). Here,
the optimization problem of the SVM is reformulated. The modied
cost function is2 (v
with constraints
where A is the design matrix. In the design matrix, the input vectors
of the training data set are represented as rows. Note that the cost
function contains the square of the bias b such that the margins with
respect to both orientation v and location relative to the origin b are
maximized. furthermore, the 2-norm of the slack vector is minimized.
Based on these modications, a dual problem is formulated that contains
non-negativity constraints but no equality constraints. Due to
these modications, a very simple iterative optimization algorithm was
derived. At each iteration step, a system of linear equations the size
of the input dimension plus one needs to be solved. The number of
iteration steps is nite. As an example, a data set with 7 million points
required only 5 iterations and needed 95 CPU minutes.
3.3.2. Lagrange Support Vector Machine (LSVM)
A variation on the ASVM is the LSVM (Mangasarian and Musicant,
2000). It is based on the same reformulation of the optimization problem
and leads to the same dual problem. The dierence is that the
LSVM works directly with the Karush-Kuhn-Tucker necessary and
su-cient optimality condition for the dual problem. The algorithm re-
quires, prior to the optimization iterations, the inversion of one matrix
Q of the size of the input dimension plus one. The iteration has the
simple form
where i is the vector of Lagrange multipliers at step i, and is a
positive constant.
The LSVM and the ASVM are comparable in speed although the
ASVM is faster on some problems. The great advantage of the LSVM
is denitely the simplicity of the algorithm. The LSVM can also be
applied to nonlinear kernels, but a matrix of the size of the number
of data points needs to be inverted. For more examples of fast linear
SVM-variants, see Mangasarian and Musicant (1999).
3.4. Approximate Solutions to Systems of Linear Equations
Gaussian processes and some variants of the SVM (see Section 3.3.2)
require the solution of a large system of linear equations.
Scaling Kernel-Based Systems 11
3.4.1. Method by Skilling
For Gaussian processes and also for some variants of the SVM, it is
necessary to solve a linear system of equation of the form
with some matrix M . The solution to this linear set of equations is
identical to the minimum of
This cost function is minimized iteratively using the conjugate gradient
method in O(k N 2 ) steps where k is the number of iterations of the
conjugate gradient procedure. Often k can be set to be much smaller
than N without a signicant loss in performance, particularly when M
has a large number of small eigenvalues. This approach is due to Skilling
and was one of the earliest approaches to speeding up the training of
GPR systems (Gibbs and MacKay, 1997). Note that the computational
complexity of this approach is quadratic in the size of training data set
and this approach is therefore not well suited for massive data sets.
3.4.2. The Nystrom Method
The Nystrom method was introduced by Williams and Seeger (2001),
and it is applicable in particular to GPR. Let's assume a decomposition
of the Gram matrix of the form = UU 0 where is a diagonal matrix
and U is an N m matrix with typically m << N . In this case, we
can solve the system of linear equations (see Equation 5) using the
Woodbury formula (Press, Teukolsky, Vetterling, and Flannery, 1992)
and obtain
In this form, only a matrix of size mm needs to be inverted, and w
still has the dimension of the number of training data N .
An example of an appropriate decomposition of the Gram matrix
would be an eigenvalue decomposition. The computational complexity
of a full eigenvalue decomposition scales as O(N 3 ), so not much is
gained unless the Gram matrix has a large number of small eigenvalues.
A particularly interesting approximation was introduced by (Williams
and Seeger, 2001). They performed an eigendecomposition of a (ran-
domly chosen) m m submatrix of . Based on p eigenvectors and
eigenvalues of the decomposition of the smaller matrix, the corresponding
decomposition of the larger matrix can be approximated using the
Nystrom method. The Nystrom method is a method for numerically
solving integral equations. The computational complexity of this approach
is O(m 2 N) such that this approach scales linear in N . The
authors veried the excellent quality of this approximate method using
a training set size of 7291 and obtained very good results with
The approach is applicable to both regression and
classication.
3.5. Projection Methods Leading to a Finite-Dimensional
Representation
In general, the degrees of freedom of a kernel system grow with the
number of kernels (i.e., data points). The approaches discussed in this
section project the basically innite-dimensional problem on a nite-
dimensional representation. The problem then reduces to estimating
the parameters in this nite-dimensional problem. In all approaches,
the solution assumes the form of a system with xed basis functions.
The BCM approach in Section 3.1.2 can also be considered to be a
specic projection approach in which the basis functions are the kernels
dened by the test points.
3.5.1. Optimal Projections
The problem formulation is: Given that both the input data distributions
P (x) and the size of training data N are known, what is the
best linear combination of an m-dimensional set of basis functions that
provides the best approximation to a GPR kernel-based system. In
projected Bayes regression (Zhu, Williams, Rohwer, Morciniec, 1998),
this problem is solved based on an innite-dimensional principle component
analysis for N !1. The result is that one should use the rst
m eigenfunctions of the covariance function describing the Gaussian
process asymptotically. The computational complexity is O(Nm 2 ).
Trecate, Williams, and Opper (1998) described an improved variational
approximation for nite data size. Their approach has a smaller
test set error if compared to projected Bayes regression, and the computational
complexity scales as O(N 2 m). This approach is quadratic
in N , whereas projected Bayes regression is linear in N , because the
representation increases with data size. Csato and Opper (2001) presented
an online variant based on these ideas, which leads to a sparse
representation by limiting the representation to a small number of well
chosen kernel functions.
3.5.2. Projection on a Subset of Kernels
Let's select a subset of the training data set of size m < N and let m;m
denote the corresponding kernel matrix. We can now approximate
Scaling Kernel-Based Systems 13
is the vector of covariances between the functional values
at x i and the data in the subset. This approximation is an equality
if either x i or x j are elements of the subset and is an approximation
otherwise. With this approximation, the regression function is a
superposition
of only m kernel functions and the optimal weight vector minimizes the
cost
where N;m contains the covariance terms between all N training data
and the subset of data chosen to be kernel functions.
Although we only used a xed number of kernels, all training data
contributed to determine the weight vector w. The methods described
in the following subsections are based on this decomposition. The connection
between the decomposition of the Gram matrix in this section
and the BCM approximation is discussed in the Appendix.
3.5.3. Reduced Support Vector Machines (RSVM)
The RSVM (Lee and Mangasarian, 2000) uses a nonstandard SVM cost
function of the form2
(w
If we compare this equation with the original SVM cost function of
Equation 6, we notice that the cost term for the weights is simplied.
As in the previous section, w denotes the kernel weights for m randomly
selected kernels and, as in the case of the ASVM (Section 3.3.1), the
square of the bias b is included. Here, the 2-norm of a transformed slack
variable is included with
where N;m is dened as in the previous subsection and where
log(1 +exp(
x)) is applied component-wise. The function g() is
a \soft" twice-dierentiable version of
is typically a large
positive number. The advantages of these modications are that (a)
no constraints are needed (as in the formulation in Equation 6); (b)
due to the modications of the cost function, a quadratically converging
Newton algorithm can be used for training; and (c) due to the
projection on the nite number of kernels, the time complexity of the
optimization routine scales linearly in the number of data points. In an
14 Volker Tresp
experiment using the adult data set 3 with N=32600 training data and
the RSVM needed 16 minutes, whereas the SMO
algorithm needed more than two hours. Surprisingly, on some smaller
data sets the RSVM performed even better than the full SVM. This
was explained by a smaller tendency toward overtting of the RSVM.
Experimental results showed that the random selection of the training
data did not signicantly increase the variance in the prediction.
3.5.4. Sparse Greedy Matrix Approximation
In the previous two subsections an expansion in terms of a nite number
of kernels dened at a random subset of the training data was sought. In
contrast, in the BCM approximation the kernels are dened by the test
points. In Smola and Scholkopf (2000), the expansion is based on a sub-set
of the training data, but here, the kernels are not selected randomly:
The goal is to nd the m kernels that can best represent the N kernels
of all training data where proximity is dened in the Reproducing Kernel
Hilbert Space (i.e., the feature space). This simplies calculations
drastically since the inner product of two kernels dened for x i and
x j is simply equal to K(x The authors describe a \greedy" algorithm
in which at each step the best kernel out of randomly selected
candidate kernels is added to the set of already selected kernels.
The computational cost of this version is O(L m N 2 ), where N
is the total number of training data and m is the size of the selected
subset of training data. In Smola and Scholkopf's paper,
motivated by theoretical considerations. The authors showed that the
approximation based on m kernels is very close to the approximation
based on the optimal m basis vectors. The optimal m should also be
closely related to the eective number of parameters, as discussed in
Section 3.1.2, and is therefore dependent on the kernel bandwidth. A
variant of this approach applicable to GPR is described in Smola and
Bartlett (2001). In their paper, they derived a stopping criterion and
bounds on the approximation error. Using a training data set of size
the authors demonstrated that, with less than 10% of the
training data used as kernels, they obtained statistically insignicant
dierences in performance between GPR based on the inversion of the
full covariance matrix and their approximation.
4. Conclusions
I have summarized the most important approaches for scaling up kernel-based
systems to large data sets. For nonlinear kernels, various authors
3 Retrievable from: http://www.ics.uci.edu/ mlearn.
Scaling Kernel-Based Systems 15
have achieved a considerable reduction in training time which makes
nonlinear kernel systems applicable to data sets of maybe a few 100,000
data points. All approaches assume that a representation based on a
nite subset of the training data (respectively the kernels) is su-cient
which is a reasonable assumption if the kernel bandwidth is low. Nev-
ertheless, the goal stated in the introduction, of being able to model an
increasing amount of detail when su-cient data become available would
require that the kernel bandwidth be scaled up with increasing data
size, thus increasing the degrees of freedom appropriately. This is only
possible to a limited degree with the methods presented. Combining
kernel-based systems with a hierarchical partitioning of the map or
local algorithms might be an interesting direction for future research.
Finally, for kernel systems using linear kernels, training time is considerably
faster than for kernel systems using nonlinear kernels. Here,
systems with more than a few million data points have been trained
witin a reasonable time.
Appendix
Let's assume that one is interested in the prediction at a set of query
points, dened as a subset of the training data as in Section 3.5.2 or as
the test data, as in Section 3.1.2. Let f q denote the unknown functional
values at those query points. Let f w be the expansion in terms
of the kernel functions dened at the query points. Here, q;q is the
covariance matrix dened for this subset of points. Then, the weight
vector which leads to the optimal predictions at the subset of points
Here,
is the covariance of the training data given f q . Also, N;q is the covariance
between the training data and the query points and N;N is the
covariance matrix dened for the training data.
Note that the inverse of cov(yjf q ) needs to be calculated which is
an N N matrix. The approximation used in Section 3.5.2 simply
sets cov(yjf q I where I is the unit matrix. The BCM uses a block
diagonal approximation of cov(yjf q ), and the calculation of the optimal
weight vector w requires the inversion of matrices of the block size. The
approximation improves if few blocks are used (then a smaller
number of elements are set zero) and when the dimension of f q is large,
Volker Tresp
since then the two terms on the right side of Equation 11 cancel and
more detailed discussion can be found in Tresp and
Schwaighofer (2001).
Acknowledgements
Salvatore Ingrassia from the Universita della Calabria and Stefano Ricci
from the Universita di Pavia provided me with extensive comments on
an earlier version of this paper. Their comments helped improve the
paper considerably. In addition, valuable discussions with Alex Smola,
Chris Williams, John Platt, Lehel Csato, and Anton Schwaighofer are
gratefully acknowledged.
--R
Support vector machines.
Multivariate statistical modeling based on generalized linear models.
Making large-scale support vector machine learning practical
RSVM: reduced support vector ma- chines
Introduction to Gaussian processes.
Massive support vector regression.
Lagrangian support vector machine.
Active support vector machine classi
Scaling support vector machines using boosting algorithm.
Towards scalable support vector machines using squashing.
Fast training of support vector classi
Fast training of support vector machines using sequential minimal optimization.
Networks for approximation and learning.
Numerical recipes in C.
The strength of weak learnability.
The Bayesian committee support vector machine.
Sparse greedy Gaussian process regression.
The relevance vector machine.
Scalable kernel systems.
Statistical learning theory.
Spline models for observational data.
Bayesian classi
Gaussian regression and optimal
--TR
--CTR
Paul Bradley , Johannes Gehrke , Raghu Ramakrishnan , Ramakrishnan Srikant, Scaling mining algorithms to large databases, Communications of the ACM, v.45 n.8, August 2002
Navneet Panda , Edward Y. Chang , Gang Wu, Concept boundary detection for speeding up SVMs, Proceedings of the 23rd international conference on Machine learning, p.681-688, June 25-29, 2006, Pittsburgh, Pennsylvania
Daniel Schneega , Steffen Udluft , Thomas Martinetz, Kernel rewards regression: an information efficient batch policy iteration approach, Proceedings of the 24th IASTED international conference on Artificial intelligence and applications, p.428-433, February 13-16, 2006, Innsbruck, Austria
Jian-Tao Sun , Ben-Yu Zhang , Zheng Chen , Yu-Chang Lu , Chun-Yi Shi , Wei-Ying Ma, GE-CKO: A Method to Optimize Composite Kernels for Web Page Classification, Proceedings of the 2004 IEEE/WIC/ACM International Conference on Web Intelligence, p.299-305, September 20-24, 2004
Ying Lu , Jiawei Han, Cancer classification using gene expression data, Information Systems, v.28 n.4, p.243-268, June | gaussian processes;support vector machine;massive data sets;kernel-based systems;committee machines |
593526 | Adaptive Sampling Methods for Scaling Up Knowledge Discovery Algorithms. | Scalability is a key requirement for any KDD and data mining algorithm, and one of the biggest research challenges is to develop methods that allow to use large amounts of data. One possible approach for dealing with huge amounts of data is to take a random sample and do data mining on it, since for many data mining applications approximate answers are acceptable. However, as argued by several researchers, random sampling is difficult to use due to the difficulty of determining an appropriate sample size. In this paper, we take a sequential sampling approach for solving this difficulty, and propose an adaptive sampling method that solves a general problem covering many actual problems arising in applications of discovery science. An algorithm following this method obtains examples sequentially in an on-line fashion, and it determines from the obtained examples whether it has already seen a large enough number of examples. Thus, sample size is not fixed a priori; instead, it i>adaptively depends on the situation. Due to this adaptiveness, if we are not in a worst case situation as fortunately happens in many practical applications, then we can solve the problem with a number of examples much smaller than required in the worst case. We prove the correctness of our method and estimates its efficiency theoretically. For illustrating its usefulness, we consider one concrete task requiring sampling, provide an algorithm based on our method, and show its efficiency experimentally. | Introduction
Scalability is a key requirement for any knowledge discovery and data mining algorithm.
It has been previously observed that many well known machine learning algorithms do
not scale well. Therefore, one of the biggest research challenges is to develop new methods
that allow to use machine learning techniques with large amount of data.
Once we are facing with the problem of having a huge input data set, there are
typically two possible ways to address it. One way could be to redesign known algorithms
so that, while almost maintaining its performance, can be run e-ciently with much larger
input data sets. The second possible approach is random sampling. For most of the
data mining applications, approximate answers are acceptable. Thus, we could take a
random sample of the instance space and do data mining on it. However, as argued by
some researchers (see, for instance, [17]) this approach is less recommendable due to the
di-culty of determining appropriate sample size needed. In this paper, we advocate for
this second approach of reducing the dimensionality of the data through random sampling.
For this, we propose a general problem that covers many data mining problems and a
general sampling algorithm for solving it.
A typical task of knowledge discovery and data mining is to nd out some \rule" or
\law" explaining a huge set of examples well. It is often the case that the size of possible
candidates for such rules is still manageable. Then the task is simply to select a rule
among all candidates that has certain \utility" on the dataset. This is the problem we
discuss in the paper, and we call it General Rule Selection. More specically, we are
given an input data set X of examples, a set H of rules, and a utility function U that
measures \usefulness" of each rule on X. The problem is to nd a nearly best rule h,
more precisely, an h satisfying U(h) (1 )U(h ? ), where h ? is the best rule and is a
given accuracy parameter. Though simple, this problem covers several crucial topics in
knowledge discovery and data mining as shown in Section 4.
We would like to solve the General Rule Selection problem by random sampling. From
a statistical point of view, this problem can be solved by taking rst a random sample S
from the domain X and then selecting h 2 H with the largest U(h) on S. If we choose
enough number of examples from X randomly, then we can guarantee that the selected
h is nearly best within a certain condence level. We will refer this simple method as a
batch sampling approach.
One of the most important issues when doing random sampling is choosing proper
sample size, i.e., the number of examples. Any sampling method must take into account
problem parameters, an accuracy parameter, and a condence parameter to determine
appropriate sample size needed to solve the desired problem.
Non theoretically sound sampling methods, like taking a xed fraction of the data set,
while widely used in empirical machine learning research, are not appropriate for data
mining where the amount of data available is huge. Moreover, these methods do not take
into account any accuracy or condence considerations and therefore we do not discuss
them here.
Widely used and theoretically sound tools to determine appropriate sample size for
given accuracy and condence parameters are the so called concentration bounds or large
deviation bounds like the Cherno or the Hoeding bounds. They are commonly used in
most of the theoretical learning research (see [7] for some examples) as well as in many
other branches of computer science [13]. For some examples of sample size calculated with
concentration bounds for data mining problems, see, e.g.,[8], [15] and [18]. While these
bounds usually allow us to calculate sample size needed in many situations, it is usually
the case that resulting sample size is immense to obtain a reasonable good accuracy and
condence. Moreover, in most of the situations, to apply these bounds, we need to assume
the knowledge of certain problem parameters that are unknown in practical applications.
It is important to notice that, in the batch sampling approach, the sample size is
calculated a priori and thus, it must be big enough so that it will work well in all the
situations we might encounter. In other words, the sample size provided by the above
theoretical bounds for the batch sampling approach should be the worst case sample size
and thus, it is overestimated for most of the situations. This is one of the main reasons
why researchers have found that, in practice, these bounds are overestimating necessary
sample size for many non worst-case situations; see, e.g., the discussion of Toivonen for
sampling for association rules discovery [15].
For overcoming this problem, we propose in this paper to do the sampling in an
on-line sequential fashion instead of batch. That is, an algorithm obtains the examples
sequentially one by one, and it determines from those obtained examples whether it has
already received enough examples for issuing the currently best rule as nearly the best
with high condence. Thus, we do not x sample size a priori. Instead sample size will
depend adaptively in the situation at hand. Due to this adaptiveness, if we are not in a
worst case situation as fortunately happens in most of the practical cases, we may be able
to use signicantly much less examples than in the worst case. Following this approach,
we propose a general algorithm | AdaSelect | for solving the General Rule Selection
problem, which provides us with e-cient tools for many knowledge discovery applications.
This general algorithm evolves from our preliminary works on on-line adaptive sampling
for more specic problems related to model selection and association rules done in [3, 4].
The idea of adaptive sampling is quite natural, and various methods for implementing
this idea have been proposed in the literature. In statistics, in particular, these methods
have been studied in depth under the name \sequential test" or \sequential analysis" [16].
However, their main goal has been to test statistical hypotheses. Thus, even though some
of their methods are applicable for some instances of the General Rule Selection problem,
as far as the authors know, there has been no method that is as reliable and e-cient as
AdaSelect for the General Rule Selection problem. By using a simple example, we explain
in the next section the dierences and advantages of AdaSelect over related algorithms
including the one following the batch sampling approach.
The paper is organized as follows. In the next section, we explain still at some intuitive
level the advantage of our algorithm over other random sampling methods. In Section 3,
we present our problem and algorithm, and prove theorems concerning its reliability and
complexity. In Section 4, we describe several applications of our algorithm to particular
data mining problems. Further improvements that might be useful to study particular
situations are described in Section 5. We conclude in Section 6 highlighting future work.
Related Work
The idea of determining the number of necessary examples adaptively and thereby reducing
the average number of examples is quite natural, and methods for implementing this
idea have been proposed in the literature. In statistics these methods are called \sequential
test" or \sequential analysis". Since A. Wald published a pioneer 1 textbook on sequential
analysis [16], many researchers have studied sequential analysis methods in depth. Their
main goal has been, however, to test statistical hypotheses. Thus, even though some of
their methods are applicable for our purpose, that is, for evaluating and/or comparing
the value of a given function on a given huge dataset, there has been no method, as far
as the authors know, that is as reliable, e-cient and general as our algorithm AdaSelect.
To illustrate the dierence between AdaSelect and other methods, let us consider the
following very simple problem, for which we only need a very simple utility function.
The problem is to test whether the probability p ? that a given condition C holds in a
1 According to the Wald's textbook, the idea of a sequential test procedure goes back to H.F. Dodge
and H.G. Romig [2].
database X is more than 1=2 or not. If C held exactly in 1=2 of the transactions in
X, then we would have to check all the database to notice it; thus, let us suppose that
Intuitively, if the condition holds in many or
very few transactions (for instance, 90% or 10% of the database) then just sampling a
small number of transactions should be enough to gure out that the answer is positive
or negative. On the other hand, the closer to 50% of the transactions that the condition
holds the more di-cult it should be to test through sampling what is the correct answer.
We can use AdaSelect to solve this problem as follows. We keep two functions, h 1 and
h 2 that map transactions into 0=1 values. Given one transaction x, h 1 (x) outputs 1 if the
transaction x satises the condition C; otherwise, h 1 (x) outputs 0. On the other hand,
h 2 is the negation of h 1 . For the utility function, we use U(h
that is, the dierence (positive or negative) from half of the proportion of transactions.
For our purpose, the algorithm needs to detect whether U(h 1 ) is positive (in which case
negative). Thus, we just need to x to any number less than 1. If we run
our algorithm under this setting, we would be able to determine, with high condence,
whether the condition C occurs with more than 50% of the transactions in X.
Notice that the above application of AdaSelect always solves the problem, no matter
how small is
? as far as it is not 0. On the other hand, its sample complexity (the number
of necessary examples) depends on
? , and hence, the algorithm might require a lot of
transactions when
? is small. More specically, the number of transactions need to be
sampled from the database is O((1=? ) ln(1=
(ignoring the factor depending on the
condence parameter). Therefore, the closer the value of
? to 0 (and thus, p ? to 1=2),
the larger the number of examples needed will be.
A batch sampling approach is also applicable for this problem. For any
, by using an
appropriate large deviation bound, e.g., the Cherno bound, we can determine the number
of examples su-cient to detect, with high condence, whether the condition holds more
than
of X. Notice here that we have to choose appropriate
since the high
condence of this algorithm is guaranteed only if
. On the other hand, the number
of examples needed is O(1=
Therefore, we have to use
that is smaller than
? , but
if we underestimate
? , then the sample complexity becomes large. In other words, this
batch sampling approach has to be always big enough to cover all possible values of
bigger than
and thus, it depends on
since in the worst case
? might be equal to
. On
the other hand, AdaSelect depends on the case at hand and thus, its sample size depends
on
? . Moreover, for practical applications it might be unrealistic to assume that we can
assume the knowledge of a lower bound
on the quantity
? that we want to estimate.
So we can clearly see here the advantage of our algorithm over the simple batch sampling.
A more sophisticated way to solve the above problem could be the following. Instead
of using the Cherno bound (that provides an estimate that is within a multiplicative
error from the probability being estimated and thus adequate for our purposes, but which
cannot be used unless a lower bound on
? is known) we can use the Hoeding bound,
also usually referred as the additive version of the Cherno bound. The sample size
provided by this bound is independent of the probability being estimated and thus, we
do not need to assume the knowledge of any lower bound on
? . On the other hand, the
estimate is only guaranteed to be within an additive error from the value being estimated.
Therefore, in general, it is impossible to use just one single sample to guarantee that our
problem is solved. Instead, we can do the following. Suppose that we run a batch
sampling calculating the appropriate size with the Hoeding bound for
we obtain an estimate p 1 for p ? . Then with high probability, p 1 should satisfy that
1=4. Thus, if p 1 is greater than 3=4, then we can determine (with
high condence) that p ? is greater than 1=2; on the other hand, if p 1 is less than 1=4,
then we can again determine that p ? is less than 1=2. However, if p 1 is not in that range,
that is, 1=4 p 1 3=4, then we cannot conclude anything about whether p ? is above or
below 1=2. This last situation does not occur if we choose small enough, but then the
sample complexity becomes large if we underestimate . One way to solve this problem
is to iterate an execution of the algorithm with a smaller accuracy parameter when the
obtained estimate is not in a safe range. In the above case, for example, we can run the
algorithm again with . Continue this process until the obtained estimate
after the ith iteration is not in the range [1=2 2 (i+1) ; 1=2+2 (i+1) ]. Suppose that the
algorithm always gives an i -close estimate of p ? . Then routine calculations show that the
algorithm terminates after log(1=
iterations. This approach uses O(1= 2 ) examples for
obtaining an -close estimate (ignoring the factor depending on the condence parameter)
at every step. Hence, altogether we need O((1=?
which gives the
same order as AdaSelect. In fact, very roughly speaking, this is the idea of AdaSelect.
On the other hand, in AdaSelect the iteration phase is naturally incorporated, and thus,
AdaSelect has better sample complexity. Furthermore, it is now easy to generalize the
technique for estimating and/or comparing more general function values.
This method of sampling just described is referred in classical statistics as multiple
sampling [1], and it was one of the earlier works of sequential sampling methods [16].
More recent work on adaptive sampling comes from the database community and it is
due to Lipton et.al. [9, 10]. There the following problem is discussed 2 . Given a database
and a query over the databases (for instance, a selection or a joint), we want to estimate the
query size, that is, the number of transactions associated with the query in the database,
up to a certain error and condence level. They designed algorithms for this task. Below
we refer their algorithms as Adaptive Estimator. More specically, for a given database
X, a condition C, an accuracy parameter , and a condence parameter -, Adaptive
Estimator estimates (through random sampling) the probability p ? that transactions in
up to a multiplicative error . That is, with probability at least 1 -, the
algorithm yields estimate p of p ? such that (1 )p ? p (1 . For achieving this
task, Adaptive Estimator collects examples from the database sequentially at random
while checking whether collected examples are su-cient for terminating the execution
with the current estimate. The number of examples used by the algorithm depends on
-. The correctness of the algorithm is proved by using large deviation tools,
in particular, using the central limit theorem. Thus, in other words, Adaptive Estimator
is a sequential version of the multiplicative Cherno bound. However, it is important to
notice that Adaptive Estimator only works for estimating the total probability. In our
example, it provides us with a multiplicative estimate for p ? but not for
? .
Our approach is quite similar to the Adaptive Estimator. The algorithm AdaSelect
we propose also collects examples from a given database sequentially at random while
checking whether collected examples are su-cient. Furthermore, we also use one of the
large deviation tools in order to guarantee the correctness, i.e., the reliability of the output
of the algorithm. Thus, one may think supercially that AdaSelect diers from Adaptive
Estimator only on the point that it enable us to estimate a more general value, i.e.,
the value of a user dened utility function. In fact, this is why we could estimate the
advantage
? instead of p ? in the above example. Note that this dierence is essential.
For our example problem, Adaptive Estimator has exactly the same problem as the batch
sampling method with the Hoeding bound and thus, it cannot be used only once in
general. It must be used iteratively as we described before. Also we remark that the
choice of the utility function U is important. If we use U(h
for the
above problem, then the execution of AdaSelect becomes essentially the same as Adaptive
Estimator. Technically, due to our generalization, the stopping condition of the sampling
algorithm is not monotone, which requires more careful probability analysis.
2 In order to keep the explanation at an intuitive level we explain with some typical algorithm and
omit the details and the dierences of their algorithms. See the papers cited above for more details.
The algorithm AdaSelect presented in this paper evolves from our previous work on
hypothesis selection [3] and sampling for association rules [4]. In fact, the two cases
treated there are very simple cases of the more general utility function introduced in this
paper. The algorithm in the present paper greatly generalizes the adaptive algorithms
provided there so that it can be use to attack several other problems.
3 The Adaptive Sampling Algorithm
In this section we will formally describe the problem we would like to solve; then we
present our algorithm and investigate its reliability and complexity.
We begin introducing some notation. Let be a (large) set of
examples and let be a (nite, not too large) set of n functions such
that can be thought as a function that can be evaluated
on an example x producing a real value y as a result. Intuitively, each h 2 H
corresponds to a \rule" or \law" explaining examples, which we will call below a rule,
and y measures the \goodness" of the rule on x. (In the following, we identify
h with its corresponding rule, and we usually call h a rule.) For example, if the task is to
predict a particular Boolean feature of example x in terms of its other features, then we
could set y the feature is predicted correctly by h, and y predicted
incorrectly. We also assume that there is some xed real-valued and nonnegative utility
function U(h), measuring some global \goodness" of the rule (corresponding to) h on the
set X. More specically, for any S X, U(h; S) is dened as
where F is some function IR 7! IR and avg( ) denotes taking the arithmetic average, i.e.,
i2I a i )=jIj. Then U(h) is simply dened as U(h; X). In Section 4 we
will describe several applications of our framework and how U is instantiated to specic
functions; then its meaning will become more clear. Now we are ready to state our
problem.
General Rule Selection
Given: X, H, and , 0 < < 1.
Goal: Find h 2 H such that U(h) (1
be the rule with maximum value of U(h ? ).
Remark 1: (Accuracy Parameter )
Intuitively, our task is to nd some h 2 H whose utility is reasonably high compared with
the maximum U(h ? ), where the accuracy of U(h) to U(h ? ) is specied by the parameter
. Certainly, the closer U(h) is to U(h ? ) the better. However, depending on the choice of
U , the accuracy is not essential in some cases, and we may be able to use a large . The
advantage of our algorithm becomes clear in such cases. (Recall the example discussed in
Section 2. See also the discussion at the end of this section.)
Remark 2: (Condence Parameter -)
We want to achieve the goal above by \random sampling", i.e., by using examples randomly
selected from X. Then there must be some chance of selecting bad examples that
make our algorithm to yield unsatisfactory h 2 H. Thus, we introduce one more parameter
specifying condence and require that the probability of such error is
bounded by -.
Remark 3: (Condition on H)
In order to simplify our discussion, we assume in the following that the value of y h;x
(= h(x)) is in [0; d] for some constant d > 0. (From now on, d will denote this constant.)
Remark 4: (Condition on U)
Our goal does not make sense if U(h ? ) is negative. Thus, we assume that U(h ? ) is positive.
Also in order for (any sort of) random sampling to work, it cannot happen that a single
example changes drastically the value of U ; otherwise, we would be forced to look at all
examples of X to even approximate the value of U(h). Thus, we require that the function
F that denes U is smooth. Formally, F need to be c-Lipschitz for some constant c 0,
as dened below. (From now on, c will denote the Lipschitz constant of F .)
Denition. 1 Function F : IR 7! IR is c-Lipschitz if for all x; y it holds jF (x) F (y)j
c jx yj. The Lipschitz constant of F is the minimum c 0 such that F is c-Lipschitz
(if there is any).
Observe that all Lipschitz functions are continuous, and that all dierentiable functions
with a bounded derivative are Lipschitz. In fact, if F is dierentiable, then by Mean
Value Theorem, the Lipschitz constant of F is max x jF 0 (x)j. As we will see in Section 4
all natural functions used in the applications we describe satisfy this condition for some
c. Also note that from the above conditions, we have cd U(h) cd for any h 2 H.
Remark 5: (Minimization Problem)
In some situations, the primary goal might not be to maximize some utility function over
the data but to minimize some penalty function P . That is, we want to nd some h such
that P (h) (1 can solve the General Hypothesis Selection Problem by an
algorithm and analysis very similar to the one we present here. (End Remarks.)
One trivial way to solve our problem is evaluating all functions h in H over all examples
x in X, hence computing U(h) for all h, and then nding the h that maximizes this value.
Obviously, if X is large, this method might be extremely ine-cient. We want to solve
this task much more e-ciently by random sampling. That is, we want to look only at a
fairly small, randomly drawn subset S X, nd the h that maximizes U(h; S), and still
be sure with probability 1 - that this h we output satises U(h) (1 ) U(h ? ).
One can easily think of the following simple batch sampling approach. Obtain a
random sample S from X of a priori xed size m and output the function from H that has
the highest utility in S. There are several statistical bounds to calculate an appropriate
number m of examples. In this paper, we choose the Hoeding bound, which has been
widely used in computer science (see, e.g., [7, 13]). One can use any reasonable bound
here, and choosing which one to use should be determined by considering reliability and
e-ciency. The reason that we choose the Hoeding bound is that basically no assumption
is necessary 3 for using this bound to estimate the error probability and calculate the
sample size. On the other hand, other bounds, for example, the central limit theorem
might be appropriate for some practical situations, since it behaves better although being
slighlty less reliable. It is easy to modify our algorithm for analyze it with these alternative
bounds. Roughly, for any sample size and error value , the Hoeding bound provides
us with an upper bound on the probability that an estimate calculated from a randomly
drawn sample is apart from its real value by . Thus, by using this bound, we can
determine sample size m that guarantees that the batch sampling yields a rule satisfying
the requirement of the problem with probability at least 1 -.
While the batch sampling solves the problem, its e-ciency is not satisfactory because
it has to choose sample size for the worst case. For overcoming this ine-ciency, we
take a sequential sampling approach. Instead of statically decide the sample size, our
new algorithm obtains examples sequentially one by one and it stops according to some
condition based on the number of examples seen and the values of the functions on the
examples seen so far. That is, the algorithm adapts to the situation at hand, and thus
if we are not in the worst case, the algorithm would be able to realize of that and stop
3 The only assumption is that we can obtain samples that are independently obtained from the same
distribution, a natural assumption that holds for all the problems considered here.
Algorithm
repeat
x randomly drawn example from X;
Where < 1 is some constant close to 1 (see the proof of Theorem 3).
output h 2 H with the largest U(h; S t );
Figure
1: Pseudo-code of our on-line sampling AdaSelect.
Figure 1 shows a pseudo-code of the algorithm we propose, called AdaSelect, for
solving the General Rule Selection problem.
Now we provide two theorems discussing the reliability and the complexity of the
algorithm AdaSelect. In the proofs we will make use of the following lemma.
Lemma. 2 Let S X be a set of size t obtained by independently drawing t elements
from X at random. For any h 2 H and 0,
Proof. Let G be the value avg(y hx : x 2 X), and g be the random variable avg(y
S). Observe that using the fact that
F is c-Lipschitz,
Prf jg E(g)j =c g:
But g is the average of t independent random variables with range bounded by d. By the
Hoeding bound, this probability is less than 2 exp
, as claimed. (End Proof)
We rst prove the reliability of Algorithm AdaSelect.
Theorem. 3 With probability 1 -, AdaSelect(X; H; ; -) outputs a function h 2 H such
that U(h) (1 )U(h ? ).
Proof. For a xed > 0, dene H g. We show that
the function output by AdaSelect(X; H; ; -) is in H bad with probability less than -. That
is, we want to bound the following error probability P error by -.
Here we regard one repeat-loop iteration as a basic step of the algorithm and measure
the algorithm's running time in terms of the number of repeat-loop iterations. We use
t to denote the number of executed repeat-loop iterations. In particular, let t 0 be the
integer such that the following inequalities hold.
Note that t is strictly decreasing as a function of t; hence, t 0 is uniquely determined.
As we will see below, the algorithm terminates at the t 0 th step (i.e., just after the t 0 th
repeat-loop iteration) with high probability.
For deriving the bound, we consider the following two cases: (Case 1) Some h 2 H bad
satises the stopping condition of the repeat-loop before the t 0 th step, and (Case
does not satisfy the stopping condition during the rst t 0 steps. Clearly, whenever the
algorithm makes an error, one of the above cases certainly occurs. Thus, by bounding the
probability that either (Case 1) or (Case 2) occurs, we can bound the error probability
P error of the algorithm.
First we bound that the probability of (Case 1). Let h bad be the rule in H bad with
the largest utility.
(Case 1) holds g
Prf h satises the stopping condition of AdaSelect at the tth step g
the stopping condition of AdaSelect at the tth step g
Here g.
For any t, 1 t t 0 , this P 1 (t) is bounded as follows.
where we have used the fact that for any t t 0 , t > U(h ? )(=2) and that U(h ? )(1
U(h bad ). Then by Lemma 2, we have
Thus, we estimate
(Case 1) holds g
2n exp
Next consider (Case 2). Clearly, (Case 2) implies U(h ?
(2= 1). Thus,
the probability of (Case 2) is bounded by the following
For bounding P 2 , we rst estimate t 0
where we let b
. Here by using the assumption that t 0 +1 U(h ? )(=2)
and the fact that U(h) cd, we
Hence, we may consider that b
1. Therefore, if b
, then P 2 is bounded as follows.
2nt
In summary, if b
then the probability that either (Case 1) or (Case
holds is bounded by -. (End Proof)
Next we estimate the running time of the algorithm. As above we regard one repeat-
loop iteration as a basic step of the algorithm and measure the algorithm's running time
in terms of the number of repeat-loop iterations that is exactly the number of required
examples. In the above proof, we have already showed that the probability that the
algorithm does not terminate within t 0 steps, that is, (Case 2) occurs, is at most -. Thus,
the following theorem is immediate from the above proof.
Theorem. 4 With probability 1 -, AdaSelect(X; H; ; -) halts within t 0 steps (in other
words, AdaSelect(X; H; ; -) needs at most t 0 examples), where t 0 is the largest integer
such that t 0
Let us express t 0 in a more convenient form. Recall that 1. Then, since approximately
if we approximate x y ln x by x y ln y., we have
cd
Let us discuss the meaning of this formula. Since both n and - are within the log func-
tion, their in
uence to the complexity is small. In other words, we can handle a relative
large number of rules and require a very high condence without increasing too much the
sample size needed. The main terms in the above formula are 1= and (cd)=U(h ? ). (Recall
that U(h) cd for any h 2 H; hence, both 1= and (cd)=U(h ? ) are at least 1.) Depending
on the choice of U , in some cases we may assume that (cd)=U(h ? ) is not so large; or,
in some other cases, we may not need small , and thus, 1= is not so large. AdaSelect
performs well in the latter case. More specically, AdaSelect shows its advantage most
when U is chosen so that (1) relatively large is su-cient, and (2) though (cd)=U(h ? ) is
not bounded in general, it is not so large in lucky cases, which happen more often than
the bad cases. As we will see in Section 4, a clever choice of U might allow us to choose
a large so that the overall number of examples might not be very large.
4 Examples of Applications
In this section we will describe two domains where an instance of our algorithm can be used
to solve a particular problem. The two domains studied are model or hypothesis selection
and induction of decision trees. Due to space limitations we cannot further describe other
possible applications but for problems like association rules mining (which we have already
studied in [4]) or subgroup discovery, where batch sampling methods based on large
deviation methods have already been proposed to speed up the computational process
(see for instance, [15]and [18]) our algorithm can also be applied.
In order to instantiate our framework to a particular problem we need to specify what
is the meaning of the functions class H, what is the utility function U , and how conditions
the conditions on U are satised. We will do so for the following problems.
Model or hypothesis selection.- This is the most typical application of our framework.
The class of functions H can be seen as a xed set of hypotheses or models. This set
could be obtained, for instance, from dierent runs of rival learning algorithms, or the
same learning algorithm but with dierent input parameters or architecture, or it could
contain several dierent memory-based hypothesis or be just xed to a certain restricted
model space as a consequence of a design decision. Notice that this later the case is the case
of algorithms that try to select a hypothesis from a simple and small class of hypotheses
(for instance, decision stumps) and then amplify its precision using voting methods like
boosting [5]. Thus, in the rest of the discussion, we will assume that the class H is xed,
nite and of tractable size. The utility function should capture the criterion of \goodness"
of the hypothesis, the typical one being the prediction error. In order to keep the discussion
at simple level we will assume that the hypotheses are binary and that the \goodness"
criteria is the prediction error. For this case, one might naively set the utility function to
be just the identity function, that is, U(h;
Notice, however, that the worst possible prediction error is 1/2, which is the same as
answering by
ipping a random coin. Hence, more precisely speaking, for the \goodness"
of hypothesis h, we should measure its advantage from from random guessing. Thus, we
want our algorithm to output a hypothesis whose advantage from random guessing is
close to the best possible advantage in the class. In fact, this setting ts particularly
well with voting methods like AdaBoost [5] where typically one just needs to obtain a
hypothesis that is better than random guessing at every step. For this purpose, we should
set U(h; In particular, for selecting
a hypothesis for voting methods, the choice of may not be so important; we can set it
to any constant smaller than 1.
A similar setting was previously studied by Maron and Moore in [11] where they
proposed an algorithm called Hoeding races to accelerate model selection. Their idea
was to discard hypotheses when there are clearly not going to be among the best ones.
They criteria for discarding them was based on inverting the Hoeding bound, we refer
the reader to their paper for details. We can clearly add this feature to our algorithm
without compromising its reliability and complexity and possibly accelerating the total
running time. Notice that combining Hoeding races with our algorithm does not reduce
much the number of examples needed since it depends logarithmically on the number of
models n while it might greatly reduce the computation time that depends linearly on n.
In a follow up research, Moore and Lee [12] developed a more e-cient version of
Hoeding races based on a Bayesian approach under the assumption that the the models
accuracies over the dataset are normally distributed. Furthermore, they also introduce a
modication for discarding models that are almost indistinguishable to others and thus,
allowing the race to output a model that is not the best in the class. Notice that this is
also what we are doing through our accuracy parameter .
Our framework allows one to use more complicated utility functions that could incorporate
size or smoothness considerations together with prediction error or for the case of
real-valued functions we could also consider for instance mean square error.
Decision tree induction.- Algorithms for decision tree induction typically work by
choosing a test for the root from certain node function class (and subsequently, for the
root of each subtree) by exploring the training data and choosing the one that is the best
according to certain splitting criteria like the entropy measure or the Gini index. In a
large dataset it could be possible to reduce the training time by choosing the split based
only on a subsample of the whole data. Musick, Catlett, and Russell [14] described an
algorithm that implements this idea and chooses the sample based on how di-cult is the
decision at each node. Typically, their algorithm uses a small sample at the root node
and it enlarges it progressively as the tree grows. Here, we propose an alternative way to
select the appropriate sample size needed at every node by using an instantiation of our
algorithm that we describe in the following. We will follow the notation from [6].
For simplicity, we assume that we want to construct a decision tree that approximates
and unknown function using a training data set S X. Furthermore, we
assume that the class of node functions F is xed a priori and it is nite and small, for
instance just the input variables and its negations 4 . In fact, this is the class commonly
used by standard software packages as C4.5 or CART. Finally, we denote by G : [0;
[0; 1] the splitting criteria used by the top-down decision tree induction algorithm. A
typical example of this function is the binary entropy
Let T be any decision tree whose internal nodes are labeled by functions in F and its
nodes labeled by values f0; 1g and let l the leaf of T where we want to make a new internal
node substituting leaf l by a function h from F . Our goal is to choose a function h such
that the value of G in the original tree T (that is, the sum of the values of G in every
leaf weighted by the probability of reaching that leaf) decreases by substituting l by h in
4 This assumption makes sense if all the attributes are discrete or have been discretized a priori.
T and labeling the new labels l 0 and l 1 according to the majority class of the instances
reaching l 0 and l 1 respectively. More formally, let ^
S S be the set of instances that reach
l. For any x in ^
S and any h in F , we denote by p 1; the probability that f(x) is 1, by
p ;1 the probability that h(x) is 1, by p 1;1 the probability that both h(x) and f(x) are 1,
and by p 0;1 the probability that h(x) is 0 but f(x) is 1. Notice that these probabilities
are taken from the distribution induced on ^
S from the initial distribution on the training
set S which is typically assumed to be the uniform distribution. Thus, for given T and
leaf l from T , and for a given S, our goal is to nd the function h that has the maximum
value (T; l; h), where (T; l; denoted by h ? this
function.
As we mentioned, if we have a large dataset, a more e-cient way to attack this
problem is the following. For a given tree T and leaf l, take a sample from X and output
the function h that has the highest value (T; l; h) in the sample. If the sample size
is chosen appropriately, the value of (T; l; h), where h is the function output by this
algorithm, is close to (T; l; h ? ). We can apply our algorithm to use the appropriate
amount of data as follows. We use F for H and (T; l; h) for U(h; X) 5 . It only remains
to determine the constant c for the Lipschitz condition on U . Notice that U is just the
addition of three G functions over dierent inputs. Thus, if G is Lipschitz for certain
constant c so it is U . Here we just state how to obtain the Lipschitz constant for G and
leave to the reader the calculation of the appropriate constant for the whole function U .
If G(q) is the Gini index, then its derivative is G 0
4. Thus, by the Mean Value Theorem, the Lipschitz constant is 4. If G(q) is
the binary entropy H(q) or the improved splitting criterion
presented
in [6], its derivatives are not bounded in the [0; 1] range and therefore it cannot be a
xed constant that works for all the possible values. However, suppose that we ignore
the input values very close to 0 or 1 and we consider, for instance, the interval [0:05; 0:95]
then both functions have Lipschitz constant 5 in that interval. Notice that the inputs for
the function G are estimated in the sample. Thus, the above assumption makes sense
since we have to admit certain error for those values. Thus, we can now run our algorithm
with inputs H, U , d as discussed above and the desired accuracy and condence level
-; then the algorithm outputs, with probability larger than 1 -, a node function h such
that (T; l; h) (1 )(T; that again, the crucial point is in the choice
5 Precisely speaking, (T ; l; h) does not t to our denition of U(h; X), but it is easy to see that our
algorithm also works for this situation.
of U . Moreover, according to the results in [6], any h such that (T; l; h) (T;
should su-ce to reduce the overall error of the whole tree after adding the new internal
node; thus, we can x to be just 1=2.
We now informally described another possible application of our algorithm to a problem
in decision tree induction, the problem of nding a good cutting point for a continuous
attribute in order to discretize it. In this case, every function in H should represent a
possible cutting point. Even though the total number of cutting points is innite, notice
that we only need to consider cutting points that appears in the dataset set considered;
thus, there are at most k of them, where k is the size of X. Although X might be very
big, notice that the bound given in Theorem 4 depends only logarithmically in the size of
H. Thus, for this particular application, the size of X gives us an upper bound on the size
of H. Furthermore, notice that for running our algorithm we do not need to have all the
functions in H a priori. So every time that a new example reveals a new possible cutting
point, we can just add that new function to the class and calculate its utility function on
the examples seen so far. The utility function in this case is the splitting criterion used
to compare splitting functions as described above. Thus, our algorithm for this problem
would choose an almost optimal, with respect to some splitting criterion, cutting point
for a particular continuous attribute. Once this is done we can use that attribute as a
discrete attribute to decide which attribute is used to label the node we are building.
5 Further Improvements
In this section we describe some improvements that can be incorporated into the main
algorithm AdaSelect. Some of these have a completely rigorous justication; others seem
intuitively clear but harder to capture in a form of theorem.
Use (multiplicative) Cherno bounds instead of (additive) Hoeding bounds.-
We have developed algorithm AdaSelect using the Hoeding bound, in which the deviation
from the average value appears additively. In some cases, it is also possible to use
Cherno's bound, in which the deviation appears multiplicatively. The proof is slightly
more involved, because applying Cherno seems to require previous knowledge of the expected
value of the utility function, which is precisely what we re trying to estimate, but
some careful, also adaptive, application lets us circumvent this problem for some utility
functions. In particular, this can be done for the case where F is the identity function
plus or minus a constant in [0; 1], as in the problem of model or hypothesis selection. In
this case, using Cherno has a clear advantage for the case of small probabilities. More
precisely, we can then bound the number of examples by O(1=
the dependence on 1=U(h ? ) to linear instead of quadratic). Although this seems asymptotically
better, the hidden constant is bigger (precisely, we had 1=2 and now we have
and thus, it happens to be better for U(h ? ) < 1=6.
Considering the variance.- In some cases, it may not be true that the values of y hx
always are in [0; d] for a moderate d, just so with large probability. There are versions of
Hoeding, the so called Berstein bounds, that, instead of this assumption, incorporate the
variance of the y hx into the bound. When estimates of these variances are known, plugging
them into AdaSelect may give quite an advantage over using a worst-case constant d.
Adapting to the local Lipschitz constant.- Our bound depends on the constant c,
which is the global Lipschitz constant of F . However, in many regions a much smaller
constant may be enough to bound the growth rate of F . Consider for example the entropy-
style functions discussed for decision-tree induction. We saw there that an appropriate
choice for c is around 4 or 5, for probabilities near 0 and 1. However, for probabilities
near 1=2, a quite common case, these functions are almost
at, i.e., a c much closer to 0
should su-ce. In practice, one should probably use at each step the worst-case Lipschitz
constant within the uncertainty interval of U(h), i.e., [U(h; S t It is
di-cult to give a rigorous analysis of this new version, but it is intuitively clear that this
may result in a signicant improvement while essentially not aecting reliability.
6 Concluding Remarks
We have presented a new methodology for sampling that, while keeping all the theoretical
guarantees of previous ones, it is applicable in a wider setting and moreover, it is very
likely that it is useful in practice. The key point was that, rather than deciding a priori
the sample size and obtain it in batch, our algorithm performs sampling sequentially and
maintains a stopping condition that depends on the problem at hand. In future work,
we should verify the advantage of our approach experimentally. Although the theorem
provided in this paper suggests that our algorithm might be e-ciently applicable in several
domains, there is still plenty of work to test whether this assertion is true or not. On one
hand, our algorithm will take prot of non being in a worst case situation, and therefore,
it is very likely that it will outperform the usual batch sampling approach. On the other
hand, asymptotics alone do not guarantee practicality since a huge constant might spoil all
the advantage of sampling over using all data, even if the most e-cient sampling algorithm
is used. We have tested this second point in our preliminary work [3, 4] using synthetic
data so we could test a wide range of values and the results are very promising. The
sample size used by our method greatly outperform the one used by the batch approach.
Moreover, the sample size was, in many cases, reasonable small so that it suggested that
reducing the data size through sampling with our algorithm might allows us to improve
the overall running time. The experimental results in [10], although in a dierent context,
are also very encouraging. In any case, it remains to do experiments using real world data
to test the real practicality of our algorithm.
Furthermore, we have pointed our several improvements that one might perform when
applying the algorithm for a particular situation. Due to the generality of our approach,
every application deserves an individual and deeper study to see the possible enhancements
that one can do for a particular setting.
Acknowledgments
We would like to thank Heikki Mannila for pointing us the work in sampling for database
query estimation and for encouraging us to follow up our previous research on adaptive
sampling. We would also like to thank Chris Watkins for telling us about Hoeding races
and Pedro Domingos for pointing us to several related machine learning papers.
--R
Multiple Sampling with Constant Probability.
A Method of Sampling Inspection.
Ricard Gavald
Ricard Gavald
A decision-theoretic generalization of on-line learning and an application to boosting
On the boosting ability of top-down decision tree learning algorithms
An Introduction to Computational Learning Theory.
The power of sampling in knowledge discovery.
and Je
Randomized Algorithms.
Decision Theoretic Subsampling for Induction on Large Databases.
Sampling large databases for association rules.
Sequential Analysis.
Bala Iyer and Je
An algorithm for multi-relational discovery of subgroups
--TR
--CTR
Geoff Hulten , Pedro Domingos, Mining complex models from arbitrarily large databases in constant time, Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining, July 23-26, 2002, Edmonton, Alberta, Canada
Szymon Jaroszewicz , Tobias Scheffer, Fast discovery of unexpected patterns in data, relative to a Bayesian network, Proceeding of the eleventh ACM SIGKDD international conference on Knowledge discovery in data mining, August 21-24, 2005, Chicago, Illinois, USA
Osamu Watanabe, Sequential sampling techniques for algorithmic learning theory, Theoretical Computer Science, v.348 n.1, p.3-14, 2 December 2005
Huan Liu , Hiroshi Motoda, On Issues of Instance Selection, Data Mining and Knowledge Discovery, v.6 n.2, p.115-130, April 2002
Jaekyung Yang , Sigurdur Olafsson, Optimization-based feature selection with adaptive instance sampling, Computers and Operations Research, v.33 n.11, p.3088-3106, November 2006
Pierre-Alain Laur , Richard Nock , Jean-Emile Symphor , Pascal Poncelet, Mining evolving data streams for frequent patterns, Pattern Recognition, v.40 n.2, p.492-503, February, 2007 | data mining;concentration bounds;scalability;adaptive sampling;knowledge discovery |
593551 | A Discrete Event Systems Approach for Protocol Conversion. | A protocol mismatch occurs when heterogeneous networks try to communicate with each other. Such mismatches are inevitable due to the proliferation of a multitude of networking architectures, hardware, and software on one hand, and the need for global connectivity on the other hand. In order to circumvent this problem the solution of protocol conversion has been proposed. In this paper we present a systematic approach to protocol conversion using the theory of supervisory control of discrete event systems, which was partially first addressed by Inan. We study the problem of designing a converter for a given mismatched pair of protocols, using their specifications, and the specifications for the channel and the user services. We introduce the notion of converter languages and use it to obtain a necessary and sufficient condition for the existence of protocol converter and present an effective algorithm for computing it whenever it exists. | Introduction
There is a growing need for global communication over networks of computers. However,
the heterogeneity of existing networks does not allow direct and consistent communication
and results in mismatch of protocols. Such mismatches are inevitable due to the proliferation
of differing hardware, software and networking standards, and the desired urgency towards
global connectivity. While a possible solution to such differing standards or protocol mis-matches
would be to standardize networking protocols, such a move may not be practical,
and in any case will take years to be agreed upon worldwide, resulting in connectivity problems
for the present. As a result, the alternative method of protocol conversion has been
proposed. These alternative measures of developing protocol converters will be the only form
of solution available until such time when everybody adheres to a global standard.
Green [21] argues that protocol conversion is a necessity that cannot be ignored citing
reasons that it is a little too late to standardize architectures. An established base of DECnet,
ARPAnet, IBM SNA, TCP/IP and X.25 users will find it difficult to switch to an open and
global standard simply because of the sheer effort involved, as well as rendering obsolete
many existing hardware and software solutions by numerous vendors. Different protocols
and architectures also tend to serve different communities of users, with the need to maintain
contact with the external world still being of great importance.
In
Figure
consists of the sending end protocol P 0 and the receiving end
protocol P 1 . Similarly, the protocol Q is composed of Q 0 and Q 1 . A protocol mismatch
occurs when the sending end protocol P 0 of P tries to communicate with the receiving end
protocol Q 1 of Q, and similarly also when Q 0 tries to communicate with P 1 .
Protocol mismatch Protocol mismatch
Figure
1: Protocol configuration
A practical solution to such a protocol mismatch is to interpose a translator or a converter
between the two protocols so that it traps all messages being sent from one system to the
other and translates the messages of the sender system in such a manner that the receiver
system can understand them without loss in consistency. This is depicted in Figure 2, where
denotes one of the protocols, Q 1 the other of the mismatched protocols, and C denotes
the converter. The resulting protocol conversion system has to adhere to the user service
specification, which defines the properties of the protocol system as needed by the users.
user
Figure
2: Interposing a protocol converter
Tanenbaum [28] provides a classification for such converters depending on the layer of the
protocol stack at which they are used. Repeaters are used at the physical layer; bridges are
used at the link layer; routers or gateways are used at the network layer; and finally protocol
converters are used at the transport layer.
The events that occur at the user interface are called the external events; the remaining
events are called the internal events. Let G denote the composition of P 0 and Q 1 , and K
denote the user service specification. Then G is a system that evolves over external as well as
internal events, whereas K is a formal language defined only over the external events. The
composition of G with a converter C, denoted GkC, implements the service specification
K if certain safety and progress properties hold. Safety captures the notion that nothing
illegal should happen, i.e., the event traces of GkC should correspond to those allowed by
K. Progress captures the notion that the composition should not block the occurrence of an
external event whenever it is feasible in the specification K, i.e., whenever the specification
does not "block" it.
The role of the converter C is to restrict the behavior of G so that GkC implements K.
However, it must do so under its limited control and observation capabilities. In other words,
certain events are controllable-their enablement/disablement can be controlled by C (the
remaining are uncontrollable); similarly, certain events are observable-their occurrence can
be sensed by C (the remaining are unobservable). Thus the design of protocol converters
can be studied in the framework of supervisory control of discrete event systems pioneered
by Ramadge and Wonham [23] and subsequently extended by other researchers (refer to the
survey articles [24, 29], and the book [12]). This is the motivation for the work presented
here.
The problem of protocol conversion has been studied by some researchers and the paper
by Calvert and Lam [2] provides a nice survey. One of the first approaches to protocol
conversion is the bottom-up approach taken by Okumura [20] and by Lam [17]. The bottom-up
approaches are heuristic in nature and may not be able to determine a converter even
when one exists. The top-down approach of Calvert and Lam [2] is algorithmic in nature.
However, the converter they design is a state machine that evolves over the set of internal
events, which implies that the set of internal events is treated as the set of controllable as
well as the set of observable events for the converter. This is unrealistic, since the converter
can observe only those events that occur at its interface, i.e., its "input" and "output"
events, and it can control only its output events. So in general these event sets are different.
This is further illustrated in the example below. The top-down approach or the algorithmic
approach is also known as the quotient approach since C can be viewed as the "quotient of
G and K".
The protocol conversion problem was first treated by Inan in the supervisory control
framework as an important application example in [8], in further depth in [9], and the theoretical
foundation on which this application is based was given in [10]. However, these
work of Inan only address the safety constraint of the protocol conversion problem which
requires that the projected language of the supervised system should equal the given specification
language. The additional progress constraint, which requires that the supervised
system never block an external event that is not blocked by the specification itself, was also
considered as part of the protocol conversion problem in the work of Calvert-Lam [2]. We
treat both the safety and progress constraints in the work presented here. The existence of
converter requires controllability and observability conditions together with extra safety and
progress conditions implying that the work presented here also requires the generalization of
the conventional supervisory control. Rudie-Wonham [25] have also applied the supervisory
control techniques for deriving a missing portion (either sender or receiver portion) of the
protocol assuming some knowledge of it. This problem is quite similar to that of protocol
conversion but again considers safety specification only.
In a recent work, Kumar-Fabian [11] show that the progress constraint may be expressed
using a type of nonblocking property with respect to a family of marked languages-one for
each external event. This nonblocking property differs from the conventional one used in
supervisory control [3] in two ways: first, nonblocking with respect to a family of markings
(as opposed to a single marking) is needed, and second, each type of marking depends, in
a very specific manner, on the entire closed-loop behavior (as opposed to being just those
traces of the closed-loop behavior that are marked in the open-loop behavior).
In this paper we derive a converter using the formal techniques from supervisory control of
discrete event systems. The supervisory control framework provides necessary and sufficient
conditions for the existence of supervisors (in the present setting converters) for a given plant
(in the present setting composition of the two mismatched protocols) so that the closed-loop
system (in the present setting composition of converter and the mismatched protocols) meets
a desired specification (in the present setting the user service specification). However, since
the user service specification is a partial specification, i.e., it is defined only on the subset
consisting of the external events (as opposed to the entire event set which is customary in
the supervisory control framework), the supervisory control theory results cannot be applied
directly, and appropriate extensions have been obtained in the paper.
We introduce the notion of converter languages and show that the existence of a converter
is equivalent to the existence of a converter language contained in the language of G. The
set of converter languages is closed with respect to union. So a supremal converter language
exists, and we provide an effective algorithm for computing it. The test for the existence of a
converter reduces to the test of non-emptiness of the supremal converter language. Moreover,
the generator for the supremal converter language serves as a choice for the converter. No
converter exists if the supremal converter language is empty, in which case the given service
specification may be minimally altered so that a converter exists. This problem has recently
been addressed by Takai-Takae-Kodama [27] and Kumar-Fabian [11].
We illustrate our work by the example of two incompatible protocols namely the Alternating
Bit protocol and the Nonsequenced protocol [28]. These two are obviously incompatible
because the alternating bit protocol labels all data packets with sequence numbers 0 or 1,
while the nonsequenced protocol does not work with labeled data packets. Abridged versions
of the work presented here first appeared in [14, 15].
Motivating Example
For the example we assume that the converter is collocated with the receiving end. So, as
shown in Figure 3, the sending end P 0 is the composition of the sender protocol P s and the
sender's channel P c , whereas the receiving end Q 1 consists of only the receiver protocol Q r . In
s
-A Qls
tm
del
acc
Figure
3: A typical protocol conversion system
general Q 1 is also a composition of Q r and the receiver's channel. The mismatched protocol
components for the example are the Alternating Bit protocol sender (P s ), Alternating Bit
channel (P c ), and the Nonsequenced protocol receiver (Q r ). The state machines for each of
these along with that for the service specification are presented in this section. Thus in this
example
The events occurring at various interfaces for the present example are indicated in Figure
3. The external event set consists of the accept event (acc) and the deliver event (del).
Lower (respectively, upper) case letters are used for internal events occurring at the sender
(respectively, receiver) end. An event label having a negative (respectively, positive) sign
as its prefix represents a transmit (respectively, receipt) event of a protocol. However, the
sign convention for the channel is the opposite since a receipt event of the channel is a
transmit event of the adjoining protocol and vice-versa. So the receipt events of the channel
are prefixed with negative signs, whereas the transmit events of the channel are prefixed
with positive sign. Since the converter is interposed between the channel and the receiver
protocol, this fixes the events that occur at the converter interface. Thus, for instance, -di
represents a transmit event of a data packet with label i (where at the sender
protocol (and a receipt event of the same data packet at the channel), whereas -A represents
a transmit event of an acknowledgment at the receiver protocol (and a receipt event of the
same acknowledgment at the converter). Other events include the timeout event (tm) and
the channel loss event (ls).
Thus in the above example the event set \Sigma consists of the following:
A subset of \Sigma consisting of the events
occur at the converter interface. These constitute the set of observable events, whereas all
the remaining events are unobservable. Part of the observable events are the output events
for the converter, and their occurrence can be controlled. So the converter output events
constitute the set of controllable events, which are:
All the other events are uncontrollable to the converter. Note that the set of controllable
events for the converter is contained in the set of its observable events. We exploit this
property when we design the converter. Also, note that the set of controllable events and
the set of observable events are both different from the set of internal events. This distinction
is not noted in the work of Calvert and Lam [2].
The Alternating Bit sender depicted in Figure 4 has six states. The initial state is the
state 0, where it is in a position to accept data from the user. The data is transmitted
with label 0. The next data is accepted from the user after an acknowledgment with the
correct label 0 is received. Otherwise, when either the wrong acknowledgment with label
1 is received or the sender times out (due to loss of data or acknowledgment), the data is
retransmitted with label 0. This procedure is repeated after each accept event, except that
the label used alternates between 0 and 1.
acc
Figure
4: Alternating Bit sender
The Alternating Bit channel shown in Figure 5 has six states. The channel initially
receives a data packet (events -di), which it may either lose (event ls) sending it back
to its initial state, or may successfully transmit (events +di) sending it to the state where
ls
ls
Figure
5: Alternating Bit channel
it receives an acknowledgment packet (events -ai). Acknowledgments may either get lost
(event ls) or it may get successfully transmitted (events +ai) sending the channel back to
its initial state in either case.
The Nonsequenced receiver is shown in Figure 6. This is a very simple state machine,
which on receiving a data delivers it to the user and sends an acknowledgment to the sender.
Since no labels are present data packets labeled by the Alternating Bit sender cannot be
interpreted consistently by the Nonsequenced receiver resulting in a protocol mismatch.0+D -A
del
acc
del
Figure
Nonsequenced receiver and Service specification
Finally, the protocol system should provide the service of loss free transmission over the
lossy channel which is accomplished by requiring that the accept and deliver events should
alternate. This service specification is depicted in Figure 6. Weaker service specifications of
the type "the order of accepted and delivered message sequences be identical" can also be
considered. However, more complex protocols will be needed to offer such a service.
3 Notation and Preliminaries
We use \Sigma to denote the universe of events. \Sigma denotes the set of all finite length event
sequences, called traces, including the zero length trace, denoted ffl. A subset of \Sigma , i.e., a
collection of traces, is called a language. For a language H, the notation pr(H), called the
prefix closure of H, is the set of all prefixes of traces in H. H is said to be prefix closed if
Given a trace s 2 \Sigma and a subset of events -
the projection of s on -
denoted s" -
\Sigma, is the trace obtained by erasing the events not belonging to -
\Sigma from s.
State machines [7] are used for representing untimed behavior of discrete event systems
(such as protocol and channel systems) as well as for representing qualitative or logical
specifications (such as user service specifications). Formally, a state machine P is a quadruple
denotes the set of states, \Sigma denotes the finite set of events,
is the partial transition function, and x is the initial state.
A triple (x; oe; x 0 is called a transition of P if x 0 2 ff(x; oe); it is said
to be an epsilon-transition if
denotes the set of states reachable by execution of zero or more events in -
\Sigma from state x in
and the notation -
denotes the set of events in -
\Sigma that are executable at x in
. The transition function is extended from events to traces ff in an obvious
way. The generated language of P is the set of all traces that it can execute starting from
its initial state, i.e.,
P is called a deterministic state machine if the transition function is a partial function
of the X. The completion of a deterministic state machine P , denoted
is the state machine obtained by "completing" the transition
function of P by adding a new state, a "dump" state, x d , and adding transitions from each
state x of P to the dump state on those events that are not defined at x in P . Formally,
defined
x d otherwise
Note that L(P
Synchronous composition [6] of state machines is used to represent concurrent operation
of component systems. Given two deterministic state machines P := (X
composition of P and Q denoted PkQ := (X; \Sigma; ff; x 0 ), is defined
as:
undefined otherwise
Thus when P and Q are composed, their common events occur synchronously, while the
other events occur asynchronously. The generated language of the composition is given by:
Note that when \Sigma since all events must occur
synchronously. Also note that although the state set for PkQ is X P \Theta XQ , many of the
states remain unreachable in PkQ. We adopt the convention that by writing PkQ we mean
its reachable or trim component [7].
In supervisory control of discrete events systems, synchronous composition of an uncontrolled
plant, modeled as a state machine G, and a supervisor, modeled as a state machine
S having an identical event set as the plant, is used as a control mechanism. A certain
sublanguage H ' L(G) represents the desired behavior of the plant, and the control objective
is to design a supervisor S such that the controlled plant behavior L(GkS) equals
H. The supervisor to be designed has limited control and observation capabilities in the
sense that (i) it cannot prevent the occurrence of certain uncontrollable events, and (ii) it
can only observe the occurrence of certain observable events. Letting \Sigma u ' \Sigma denote the set
of uncontrollable events and \Sigma denote the set of observable events, the following result
from supervisory control theory states a necessary and sufficient condition for the existence
of such a supervisor:
Theorem 1 [23, 18] Given a plant G, a desired behavior H ' L(G), the set of uncontrollable
events \Sigma u , and the set of observable events \Sigma o , there exists a supervisor S (compatible with
control and observation capabilities) such that only if
Prefix closure and Non-emptiness:
Controllability: pr(H )\Sigma
The controllability condition requires that extension of any prefix of H by an uncontrollable
event that is feasible in the plant should also be a prefix of H. This is because the
occurrence of uncontrollable events cannot be prevented. A pair of traces is called indistinguishable
if each trace in the pair has identical projection on the set of observable events.
The observability condition requires that extensions of a pair of indistinguishable prefixes
of H by a common feasible event should either both or neither be prefixes of H. This is
because identical control action must be taken following an indistinguishable pair of traces.
Note that H is controllable (respectively, observable) if and only if pr(H) is controllable
(respectively, observable). Tests for controllability and observability conditions are known
when G has finitely many states and H is a regular language so that it admits a finite state
machine representation. In fact if G has m states and H has a state machine representation
with n states, then controllability can be tested in O(mn) time, whereas the observability
can be tested in O(mn 2 In case the desired behavior H fails to satisfy any
of the required conditions, a maximally permissive supervisor is designed that achieves a
maximal sublanguage of H satisfying the required conditions. It is known that controllability
is preserved under union so that a unique maximal controllable sublanguage, called
supremal controllable sublanguage of a given language exists [22]; however, observability is
not preserved under union, so maximal observable sublanguages are not unique [18]. Hence
sometimes normal sublanguages instead of observable sublanguages are considered [18]:
Normality requires that traces of G that are indistinguishable from a prefix of H must
themselves be prefixes of H. Normality is preserved under union so that the supremal
normal sublanguage of a given language exists [18, 1, 13] and it can be tested in O(mn 2 )
time [12, p. 103]. Moreover, normality implies observability, and the converese holds in the
presence of controllability when the controllable events are also observable:
Theorem 2 [9, Proposition 4.2] Given G and H ' L(G), if
controllable and observable if and only if it is controllable and normal.
A similar result also appeared in [12, Theorem 4.3] and in the timed setting in [19, Proposition
4].
4 Existence and Computation of Converter
In this paper we are interested in solving a slightly different supervisory control problem,
where the objective is to obtain a supervisor, which we refer to as a converter in this context,
so that the closed-loop system implements a given service specification defined on the subset
of external events.
Given P := (X; \Sigma; ff; x 0 ), a set of external events \Sigma e ' \Sigma and a service
specification K ' \Sigma
e , P implements K if the following hold:
Safety: L(P )"\Sigma
Progress:
Safety requires that each generated trace of P should correspond to a prefix of the specifi-
cation, i.e., no "illegal" traces should occur in P . Since K is a partial specification (defined
only on the external event set), there may exist more than one trace of P that correspond
to the same prefix of K. Progress requires that if an external event is possible after such a
prefix of K, then it should also be possible "eventually", i.e., after occurrence of zero or more
internal events following each corresponding trace of P . Note that safety only guarantees
that such an external event is eventually possible following at least one (and not all) of the
corresponding traces of P .
Remark 1 The definition of "implements" given above is equivalent to that given in [2]
but is stated differently for simplicity. For example the definition of safety given in [2] uses
containment instead of equality. However, containment can be replaced by equality since
the reverse containment follows from progress. Similarly, the definition of progress given in
[2] uses a "state characterization" instead of a "language characterization". This is because
in [2] P is represented as a nondeterministic state machine over only external events by
replacing each transition on an internal event by an epsilon-transition. So a language based
characterization of progress is not possible and a state based characterization is used. In our
case P is a state machine over both external and internal events.
In the following theorem we provide a necessary and sufficient condition for the existence
of a converter for a given pair of mismatched protocols and a given service specification. We
first introduce the notion of converter languages. As described above the notation G is used
to denote the composition of the mismatched protocols, and K is used to denote the service
specification.
Given a pair of mismatched protocols G, a service specification K ' \Sigma
e , a
set of uncontrollable events \Sigma u , and a set of observable events \Sigma
called a converter language if the following hold:
Controllability: pr(H )\Sigma
Safety: pr(H)"\Sigma
Progress:
Note that H ' L(G) is a converter language if and only if its prefix closure is also
a converter language. Using the result of Theorem 1 we next show that a necessary and
sufficient condition for the existence of a converter is the existence of a nonempty converter
language.
Theorem 3 Given a pair of mismatched protocols G, a service specification K ' \Sigma
e , a set
of uncontrollable events \Sigma u , and a set of observable events \Sigma o , there exists a converter C
(compatible with control and observation capabilities) such that GkC implements K if and
only if there exists a nonempty converter language.
Proof: We first prove the necessity. Suppose there exists a converter C such that GkC
implements K. We claim that H := L(GkC) is the the required converter language. Since
C is control and observation compatible, from the necessity part of Theorem 1 it follows
that H is nonempty, prefix closed, controllable and observable. Furthermore since GkC
implements K, it follows from Definition 1 that the safety and
progress properties of Definition 2. Thus H is a nonempty converter language.
In order to see the sufficiency, suppose there exists a nonempty converter language H '
L(G). Then pr(H) is nonempty, controllable and observable. So from the sufficiency of
Theorem 1 it follows that there exists C which is control and observation compatible such that
pr(H). Furthermore, since H is a converter language, it follows from Definition 2
that it satisfies the safety and progress properties, which implies GkC implements K as
desired.
Since the set of controllable events for a converter is a contained in the set of its observable
events, i.e., it follows from Theorems 2 and 3 that a language is a converter
language if and only if it satisfies the properties of controllability, normality, safety, and
progress. This fact can be used to obtain the following corollary which states that the set of
converter languages is closed under union so that a supremal one exists. Define the following
set of converter sublanguages of L(G) which implement the specification K:
Conv(G; K) := fH ' L(G) j H is a converter languageg:
e , the supremal converter language
sup Conv(G; K) exists.
Proof: First note that since ; is a converter sublanguage, Conv(G; K) 6= ;. Let be an
indexing set such that for each - 2 , H - ' L(G) is a converter language. We claim that
-2 H - is also a converter language, i.e., it satisfies the conditions of controllability, normal-
ity, safety, and progress. The first two properties follow from the fact that controllability and
normality are preserved under union. Safety follows from the following series of equalities:
where we have used the fact that prefix closure and projection operations commute with
arbitrary union, and each H - satisfies safety. Finally, to see progress, pick s 2 pr(
pr(K). Then there exists - 2 such that
Also, since H- is a converter language, it satisfies progress. So there exists
The following theorem provides a concrete condition for the existence of a converter and
forms a basis for the test developed in this paper. It also specifies a choice for a prototype
converter.
Theorem 4 Let G; K; \Sigma e ; \Sigma be as in Theorem 3. Then there exists a converter C such
that GkC implements K if and only if sup Conv(G; K) is nonempty, in which case C can be
chosen to be a generator of sup Conv(G; K).
Proof: In order to see the necessity suppose there exists a converter. Then from the
necessity part of Theorem 3 there exists a nonempty converter language H 2 Conv(G;
which implies sup Conv(G; K) is nonempty. Sufficiency follows from the sufficiency part of
Theorem 3 since sup Conv(G; K) is a converter language and it is given to be nonempty.
Finally, let C be any generator of sup Conv(G; K), i.e.,
where the last equality follows from the fact that sup Conv(G; K) ' L(G). Consequently,
satisfies the safety and progress properties of Definition 2, which implies GkC
implements K.
From Theorem 4 the task of checking the existence of a converter as well as that of designing
one when it exists reduces to the task of computing the supremal converter language and
verifying its non-emptiness. We next present an algorithm for computing sup Conv(G; K)
assuming that G has finitely many states, say m, and K is a regular language so that it
admits a finite state machine representation say S states. For
the motivating example, the state machine representation for K consists of only two states
as shown in Figure 6.
As with the computation of the supremal controllable sublanguage given in [13], the
algorithm for the computation of sup Conv(G; K) has two steps: In the first step it constructs
a sufficiently "refined" version of the state machine G; 1 and in the next step, it removes
certain "bad" states from this refined state machine.
Initially certain states which correspond to traces that violate safety are marked "bad",
i.e., these are the states that are reachable by execution of traces whose projection on external
event set are not prefixes of K. If there are no such bad states, then sup Conv(G; K) equals
L(G). Otherwise, a converter must be designed to restrict the behavior of G so that only
those "good" states remain reachable which correspond to traces that also satisfy progress,
controllability, and normality conditions.
Progress requires that the set of external events that can be executed following the
execution of zero or more internal events from a certain good state should contain the set of
external events executable at the corresponding point in K. If a good state fails to satisfy the
progress, it is marked bad. Controllability requires that no bad state should be reachable
from a good state on an uncontrollable event, since execution of an uncontrollable event
cannot be prevented and the system can uncontrollably reach a bad state from a good state.
So in order to compute sup Conv(G; K) if there exists an uncontrollable transition from a
good state to a bad one, then that good state is marked bad. Finally, normality requires
that the states corresponding to a set of indistinguishable traces should either be all good
or all bad. So if a good state and a bad state can be reached by the execution of pair
of indistinguishable traces, then that good state is marked bad. The algorithm terminates
when there are no more additional bad states to be marked. Then sup Conv(G; K) consists
of traces corresponding to the remaining good states, and it is nonempty if and only if the
set of good states is nonempty.
It is clear that the state machine representation of G needs to be sufficiently refined
so that the states corresponding to the traces violating either of the conditions can be
unambiguously identified. First in order to deal with safety, progress and controllability
conditions we refine the machine G by composing it with the state machine S obtained by
completing the transition function of S. For the motivating example, the state machine S is
shown in Figure 7, in which the dump state is explicitly depicted. Note that
e as
expected, and given a trace s 2 \Sigma
only if its execution does not
result in the dump state in S. Let G 1 := SkG, then since \Sigma e ' \Sigma, we have
where the last equality follows from the fact that
e . For notational simplicity let
fy d g) \Theta X, where y d is the dump state of S, denotes the state
Given two state machines G i
is said to be a refined version of G 2 if
there exists a function
and oe 2 \Sigma.
dump
del
acc
del acc
acc, del
Figure
7: Completion of service specification
set of G 1 , Z is the transition function, and z is the initial state.
Note that given a trace s 2 its execution leads to a state z = (y d ; x) in G 1 if
and only if s"\Sigma e 62 pr(K).
Next in order to deal with the normality condition we further refine G 1 . First we obtain
a nondeterministic state machine G 2 that generates all traces that are indistinguishable from
the traces of G 1 . Since a trace remains indistinguishable when unobservable events are either
inserted or erased, the following construction yields the desired G
Algorithm 1 Given G 1 := SkG, add transitions in G 1 to obtain G 2 as follows:
1. For each z 2 Z and oe 2
2. For each transition (z; oe; z 0 ) of G 1 such that z 6= z 0 and oe 2 add an epsilon-
transition (z; ffl; z 0 ).
in the algorithm has the effect of inserting (respectively, erasing)
unobservable events.
Remark 2 Note that if z is reachable by execution of a trace s in G 1 , then z is also reachable
by execution of all traces that are indistinguishable from s in G 2 . So if s trace
indistinguishable from s and if z 0 is reachable by execution of s 0 in G 1 , then z 0 is also reachable
by execution of s in G 2 (since s is indistinguishable from s 0 ). In fact the set of states reachable
by execution of s in G 2 is the set of states that are reachable in G 1 by execution of those
traces in G 1 that are indistinguishable from s.
Next using the power-set construction [7] we obtain a deterministic state machine G 3
with the same language as L(G 2 ). Finally we construct the machine G 4 := G 1 kG 3 . Since
show below that G 4
is a sufficiently refined version of G. We first outline the construction of G 4 in the following
algorithm:
Algorithm 2 Given G := (X; \Sigma; ff; x 0 ) and a deterministic generator S := (Y; \Sigma e ; fi; y 0 ) of
1. Obtain S by adding a dump state and completing the transition function of S. (Then
e .)
2. Obtain G 1 := SkG. (Then L(G 1 and the state set of G 1 is denoted Z.)
3. Obtain the nondeterministic state machine G 2 by adding transitions in G 1 as described
in Algorithm 1. (Then and the state set of G 2 is Z.)
4. Obtain G 3 by "determinizing" G 1 using the power set construction. (Then L(G 3
and the state set of G 3 is 2 Z .)
5. Obtain G 4 as G 1 kG 3 . (Then L(G 4 and the state set of G 4 is Z \Theta 2 Z .)
Clearly, G 4 is a refined version of G. For notational simplicity, let G 4 := (R; \Sigma; ffi; r 0 ),
Z is the state set for G 4 . Note that each state r in G 4 is of the form
Z), where z 2 Z and -
denotes the transition function of G 4 .
The initial state of G 4 is r In the following lemma we list
some of the properties of G 4 which demonstrate that it is a sufficiently refined version of G.
We first define the concept of a matching pair of states.
Definition 3 A pair of states r
are said to be a matching
Lemma 1 The following hold for G 4 which is the state machine constructed in Algorithm 2:
1.
2. Consider s 2 L(G 4 ); then s"\Sigma e 2 pr(K) if and only if
is such
that y 6= y d .
3. If
is a state of G 4 , then z 2 -
Z.
4. Consider a matching pair of states r
Proof: The first part follows from the construction and is proved above. In order to see the
second part, consider s
execution of s"\Sigma e
in S results in the state y of S. Since the assertion follows from the fact that
only if y 6= y d .
In order to see the third part, let s 2 L(G 4 ) be such that ffi(r
Z). Then
execution of s results in the state z in G 1 and state -
Z in G 3 . Since G 3 is obtained by
"determinizing" the state machine G 2 , this implies that execution of s results in each state
Z in G 2 . (Recall that G 2 is nondeterministic.) Since G 2 is obtained by adding transitions
in G 1 , z is one such state. Hence z 2 -
Z.
Finally in order to see the fourth part, consider a matching pair of states r
Z),
2. From the third part we have that z 1
Z. Consider s 1 2 L(G 4 ) such that
execution of s 1 results in state z 1 in G 1 , and each state -
Z in G 2
(including the states z 1 and z 2 ). Then from Remark 2 concerning G 2 , there exists a trace
indistinguishable from s 1 , i.e., s 2 "\Sigma such that its execution results in
the state z 2 in G 1 . (If no such trace exists, then z 2 cannot be reached by execution of s 1 in
.) Finally, since s 2 is indistinguishable from s 1 , its execution in G 2 also results in the set
of states -
Z. So the execution of s 2 results in the state r
Z) in G 4 as desired.
We are now ready to present the algorithm that iteratively marks bad states in G 4 , and
upon termination yields a generator for sup Conv(G; K). The notation R k
b ' R is used to
denote the set of bad states at the kth iteration.
Algorithm 3 Consider G 4 := (R; \Sigma; ffi; r 0 ) obtained in Algorithm 2.
1. Initialization step:
2. Iteration step:
R k+1
b := R k
r
3. Termination step:
If R k+1
and go to step 2.
The algorithm initially sets the iteration counter marks a state
R to be a bad state if its first coordinate is the dump state, i.e., if . This is because if
any trace such that ffi(r then from the second part of Lemma 1,
violates the safety condition. The set of bad states at the kth iteration
is denoted by R k
b .
In the kth iteration step, a good state
b is marked bad if any of
the following hold: (i) If there exists an uncontrollable event from r to a bad state. This
is because if s 2 L(G 4 any trace such that ffi(r then s violates the
controllability condition. (ii) If there exists a matching bad state r 0 2 R k
b . This is because if
any trace such that ffi(r then from the fourth part of Lemma 1,
there exists a trace s 0 indistinguishable from s such that ffi(r violates the
normality condition. (iii) If the set of external events that are executable at state y in S is
not contained in the set of external events that are executable from those good states that
are reached by the execution of zero or more internal events from r in G 4 . This is because if
any trace such that ffi(r then s violates the progress condition.
The algorithm terminates if no additional bad states are marked in the kth iteration;
else, the iteration counter is incremented by one and the iteration step is repeated. Note
that since G 4 has finitely many states, the algorithm is guaranteed to terminate in a finite
number of iterations. Also, since the algorithm marks a state to be a bad state if and only
if all traces that lead to it violate either safety, progress, controllability, or normality, the
state machine obtained by the removal of the terminal set of bad states (and all transitions
leading towards or away from them) from G 4 generates the language sup Conv(G; K). Hence
we obtain the following result stating the correctness of the algorithm.
Theorem 5 Given a finite state machine G and a regular language K ' \Sigma
e , Algorithm 3
terminates in a finite number of steps, and the state machine obtained by removal of the
states R
b ' R from G 4 generates sup Conv(G; K), where R
b denotes the set of bad states at
the termination of the algorithm.
be the number of states in G and n be the number of states in the
state machine representation of K. Then the computational complexity of Algorithm 3 is
since the number of states in G 4 is O(mn2 mn ), which implies that there are
O(mn2 mn ) number of iterations with equally many computations in each iteration. Also,
no algorithm of polynomial complexity exists. This follows from the fact
that in the special case when \Sigma the converter design problem reduces to the standard
supervisory control problem under partial observation with the desired behavior constraint
specified as a range of languages, which is known to be an NP-complete problem [30].
5 Implementation Issues and Example Converters
Since the computation of sup Conv(G; K) is intractable, a computationally tractable
heuristic approach to converter design is desirable. We propose two heuristics and utilize
each to design a converter for the motivating example.
Since the computational intractability arises due to the presence of partial observa-
tion, one possibility is to first compute the supremal sublanguage of L(G) satisfying safety,
progress, and controllability, and next verify whether it is also normal, each of which can
be done in polynomial time. In case the language is also normal, then it equals the desired
supremal converter language and we are successful in computing it in polynomial time.
We next outline a polynomial time computation of the supremal sublanguage of L(G)
satisfying safety, progress, and controllability. Clearly, this language equals sup Conv(G; K)
when all events are observable (so that normality trivially holds). Note that when all events
are observable, G 2 equals G 1 , i.e., no transitions are added when Algorithm 1 is invoked, so
G 4 also equals G 1 . Hence the following modification of Algorithm 3 computes the desired
supremal sublanguage of L(G) satisfying safety, progress, and controllability.
Algorithm 4 Given G := (X; \Sigma; ff; x 0 ) and a deterministic generator S := (Y; \Sigma e ; fi; y 0 ) of
1. Initialization step:
2. Iteration step:
3. Termination step:
If Z k+1
and go to step 2.
Using the fact that G 1 has O(mn) states, the computational complexity of Algorithm 4
can be determined to be O(m 2 n 2 ). The algorithm computes the supremal sublanguage of
L(G) that satisfies safety, progress, and controllability (but may violate normality). The
test whether this language is also normal (with respect to the given set of observable events)
can be performed in O(m(mn) 2 In case the test for normality
fails, then as in the work of Cho-Marcus on iterative computation of supremal controllable
and normal sublanguage [4], we can iterate between the supremal normal sublanguage computation
and the computation of the supremal language that meets safety, progress, and
controllability until a fixed point is reached, which however will result in an exponential
computational complexity. This is outlined in the following algorithm:
Algorithm 5 Given G and K ' \Sigma
e , compute the sup Conv(G; K) as follows:
2. Compute the supremal sublanguage -
H k of H k satisfying safety, progress, and controllability
using Algorithm 4. If -
H k is normal, then sup Conv(G;
go to step 3.
3. Compute the supremal normal sublanguage H k+1 of -
H k . If H k+1 satisfies safety and
progress (Algorithm 6 given below provides a test for safety and progress), then
sup Conv(G; replace G by the generator of H k+1 , set
and go to step 2.
Remark 4 Note that in the above algorithm we do not need to check the controllability of
H k+1 in step 3 since it is known that the supremal normal computation preserves controllability
[5, Proposition 3.9]. Also, in step 3 if H k+1 does not satisfy safety and progress, then
we need to compute its supremal sublanguage satisfying safety and progress. We can use
Algorithm 4 for doing this (although in this case the controllability trivially holds). How-
ever, we need to replace G by the generator of H k+1 since Algorithm 4 only computes the
supremal sublanguage of L(G) satisfying safety, progress, and controllability.
We have written a C-program for Algorithm 5 (and the associated Algorithm 4) that
utilizes a finite state machine library originally developed for supervisory control [26]. Using
the program for Algorithm 4 we first computed the supremal sublanguage of L(G) satisfying
controllability, safety, and progress for the example. The state machine G, which is the
composition of Alternating Bit sender, Alternating Bit channel, and Nonsequenced receiver
contains 66 states. The composition of G with S (which has three states) contains 198 states.
The initial iteration of the safety check disqualified 66 states. The next iteration which
performs controllability and progress checks disqualified additional 34 states. No additional
states were disqualified in the next iteration of controllability and progress checks. This
resulted in a test converter with states. The test converter also passed
the normality test; thus qualifying it as a valid converter.
A second possible heuristic is to guess a test converter C and verify its correctness by
checking whether L(GkC) is a converter language, which as we show below can be done in
polynomial time. First note that it is not difficult to guess a converter; a simple possibility is
to design a system that emulates the missing portions of the mismatched protocols, i.e., the
receiver protocol P r of P and the sending protocol Q s of Q. For the motivating example the
"guess converter" we consider below emulates the functions of the Alternating Bit receiver
and the Nonsequenced sender.
In order to test whether L(GkC) is a converter language, we must check whether it satisfies
controllability, normality, safety, and progress. Polynomial time tests for controllability
and normality can be found in [12, pp. 75, 103]. Here we present a polynomial time test for
safety and progress. For notational simplicity let G 5 := GkC and let its state set be \Phi. We
first refine G 5 by composing it with S. For notational simplicity, let G 6 := SkG 5 and let its
state set be \Theta := (Y [ fy d g) \Theta \Phi. Note that since \Sigma e ' \Sigma,
where the last equality follows from the fact that
e . Also, given a trace s 2 L(G 6
execution leads to a state
to satisfy safety, no state ' of G 6 should be of the form (y d ; OE). Also for L(G 5 ) to satisfy
progress, the set of external events that can be executed following the execution of zero or
more internal events from each state should contain the set of external
events executable at the corresponding state y in S. So we have the following algorithm for
checking safety and progress:
Algorithm 6 Consider the composition of mismatched protocols G, a test converter C, and
a deterministic generator S of pr(K).
1. Construct G 5 := GkC, and denote its state set by \Phi.
2. Construct G 6 := SkG 5 , and denote its state set by \Theta.
3. Then L(GkC) satisfies safety and progress if and only if
If the number of states in the converter is p, then the computational complexity of the algorithm
is O(m has O(mnp) states and equally many reachability computations
need to be performed.
A test converter for the motivating example is shown in Figure 8. The converter adopts
+D -A
-A
Figure
8: A test converter
the following simple conversion strategy. Initially when one or more data packets with label
arrive (event +d0), it removes the label and forwards a single data packet to the receiver
(event +D). No action is taken at this point if more copies of the same data packet arrive
(due to a sender timeout). When the receiver transmits an acknowledgment (event -A),
the converter attaches the label 0 and puts it onto the sender's channel (event -a0). The
procedure is repeated when data packets with a different label arrive (except for the difference
in the label used). However, if another data packet with the same label arrives (due to a
sender timeout or a loss of acknowledgment in the channel), then the same acknowledgment
is retransmitted.
We have verified that L(GkC) (where
lability, and normality, i.e., it is a converter language. Since L(GkC) is obviously nonempty,
it follows from Theorem 3 that C is indeed a valid converter.
6 Conclusion
In this paper we have studied the problem of designing protocol converters that need
to be interposed between a pair of mismatched protocols. Our approach is systematic and
is based on the recent theory of supervisory control of discrete event systems. The work
presented here provides a new framework for protocol converter designers on one hand, and
serves as an application for the supervisory control theorists on the other hand. The basic
concepts of controllability, observability, normality, and computation of supremal languages
from supervisory control, and safety, and progress from protocol design play important role
in the protocol conversion problem. The converter that we derive is maximally permissive
in the sense that any other converter will further restrict the behavior of the entire system.
However, the maximally permissive converter may not have a minimal number of states.
Design of such minimal converters is an interesting problem for future research.
--R
Formulas for calculating supremal controllable and normal sublanguages.
Formal methods of protocol conversion.
Dealing with blocking in supervisory control of discrete event systems.
On supremal languages of class of sublanguages that arise in supervisor synthesis problems with partial observations.
Supervisory control of discrete event processes with partial observation.
Communicating Sequential Processes.
Introduction to Automata Theory
Supervisory control and formal methods for distributed systems.
Supervisory control: Theory and application to the gateway synthesis prob- lem
Nondeterministic supervision under partial observations.
On supervisory control of partial specification arising in protocol conversion.
Modeling and Control of Logical Discrete Event Systems.
On controllability and normality of discrete event dynamical systems.
Design of protocol converters: A discrete event systems approach.
Protocol conversion using supervisory control techniques.
Protocol conversion.
On observability of discrete-event systems
Supervisory control of timed discrete event systems under partial observation.
A formal protocol conversion method.
Protocol conversion.
On the supremal controllable sublanguage of a given language.
Supervisory control of a class of discrete event processes.
The control of discrete event systems.
Supervisory control of communicating processes.
A software library for discrete event systems and other finite state machine based applications.
The extremal languages arising in supervisory control for service specifications.
Computer Networks.
Logical aspects of control of discrete event systems: a survey of tools and techniques.
On the control of discrete event dynamical systems.
--TR
--CTR
Nina Yevtushenko , Tiziano Villa , Robert K. Brayton , Alex Petrenko , Alberto L. Sangiovanni-Vincentelli, Solution of parallel language equations for logic synthesis, Proceedings of the 2001 IEEE/ACM international conference on Computer-aided design, November 04-08, 2001, San Jose, California
Young Moo Lee , Kyu Ho Park, A protocol converter for nonblocking protocols, Integration, the VLSI Journal, v.33 n.1, p.71-88, December 2002
Khaled El-Fakih , Nina Yevtushenko , Sergey Buffalov , Gregor V. Bochmann, Progressive solutions to a parallel automata equation, Theoretical Computer Science, v.362 n.1, p.17-32, 11 October 2006
Nina Yevtushenko , Tiziano Villa , Robert K. Brayton , Alex Petrenko , Alberto L. Sangiovanni-Vincentelli, Compositionally Progressive Solutions of Synchronous FSM Equations, Discrete Event Dynamic Systems, v.18 n.1, p.51-89, March 2008 | observability;controllability;protocol conversion;discrete event systems;progress;normality;supervisory control;synchronous composition;safety |
593691 | Structuring Acyclic Petri Nets for Reachability Analysis and Control. | The incidence matricesfrom places to transitions and vice versaof an acyclic Petri net can obtain a block-triangular structure by reordering their rows and columns. This allows the efficient solution of some reachability problems for acyclic Petri nets. This result is further used in supervisory control of Petri nets; supervisors for Petri nets with uncontrollable transitions are constructed by extending the method of Yamalidou et al. (1996) to Petri nets where transitions can be executed simultaneously. A large class of Petri nets with uncontrollable transitions is given for which the maximally permissive supervisor can be realized by a Petri net. The original specification is algorithmically transformedby using the results for acyclic Petri netsinto a new specification to take the presence of uncontrollable transitions into account. The supervisor is obtained by simple matrix multiplications and no linear integer programs need to be solved. Furthermore, a class of Petri nets is given for which the supervisor can be realized by extending the enabling rule with OR-logic. | on-line computations for implementing the feedback controller are reduced signicantly and properties
of the closed-loop system can be studied using standard techniques for Petri nets. For Petri nets in
which all transitions are controllable and observable, and legal markings have to satisfy a conjunction
of linear inequalities, the controller design problem was solved by Yamalidou et al. (1996) using place
invariants (Giua et al. (1992) obtained the same result using a dierent methodology). The controller
is found by simple matrix multiplication.
When some transitions in the Petri net are uncontrollable, the construction of maximally permissive
Petri net supervisors becomes much more dicult. This problem was studied by Giua et al. (1992) and
Giua et al. (1993). A class of systems for which a maximally permissive supervisor can be realised by
a Petri net was obtained by Li and Wonham (1994) based on a linear integer programming approach.
In (Moody and Antsaklis, 1998) eorts were made to extend the supervisor design of Yamalidou et
al. (1996) to Petri nets with uncontrollable transitions. However, they do not specify a class of Petri
nets and of legal sets for which a maximally permissive Petri net supervisor can be constructed.
The goal of this paper is two-fold. In the rst part we study acyclic Petri nets and in the second
part we construct maximally permissive Petri net supervisors for a large class of Petri nets with
uncontrollable transitions. Our motivation for studying acyclic Petri nets |which form by themselves
a very restricted class of Petri nets| is that a lot of Petri nets have an acyclic uncontrollable part. We
partition the set of places and the set of transitions of an acyclic Petri net. This partition indicates how
tokens
ow through the net and is used to order rows and columns such that both the incidence matrix
from places to transitions and the incidence matrix from transitions to places obtain a block-triangular
structure. This allows us to give a direct proof for the necessary and sucient condition for point to
point reachability which was given by Ichikawa and Hiraishi (1987) and by Li and Wonham (1994).
It also shows that in an acyclic Petri net every reachable marking can be reached in as many steps as
there are sets in the partition of the transitions set. Moreover, it overcomes the problem studied by
Kostin (1997) of not knowing in which order transitions should be executed when one already has a
solution of the Petri net state equation. Also, a new algorithm for checking point to point reachability
in acyclic Petri nets is presented.
In the second part of the paper we construct supervisors for Petri nets. By using a dierent
technique we show that the result of Yamalidou et al. (1996) also holds for Petri nets in which several
transitions can be executed simultaneously and one transition can be executed more than once at
the same time. A class of Petri nets is specied for which a maximally permissive supervisor can be
realised by a Petri net even when uncontrollable transitions are present in the Petri net. This class
is more general than the one of Li and Wonham (1994). The Petri nets obtained by applying the
supervisory control reduction result of Stremersch and Boel (1999) to Petri nets belonging to this
class have an acyclic uncontrollable part. The block-triangular structure of its incidence matrices
|obtained in the rst part of the paper| is used to obtain an algorithm transforming the legal set
into a specication which takes the presence of uncontrollable transitions into account without loss
of maximal permissiveness, i.e. without becoming more restrictive than necessary. Then we apply
the supervisor design method of Yamalidou et al. (1996) to the new specication. The Petri net
supervisor is obtained by simple matrix multiplication and no linear integer programmes need to be
solved. Finally, a class of Petri nets is given for which the supervisor can be realised by extending the
standard enabling rule for Petri nets with OR-logic.
The outline of the paper is as follows. Section 2 introduces Petri net denitions and notations. In
Sections 3 and 4 the incidence matrices of an acyclic Petri net are structured and some reachability
issues for acyclic Petri nets are studied respectively. Section 5 generalises the result of Yamalidou
et al. (1996), discusses conditions under which maximally permissive Petri net supervisors can be
constructed when not all transitions are controllable and reviews the reduction result of Stremersch
and Boel (1999). A class of Petri nets for which a maximally permissive supervisor can be realised
by a Petri net is given in Section 6. This class is made more general in Section 7. Supervisors with
OR-logic in their enabling condition are studied in Section 8. Final conclusions are given in Section 9.
denitions
A Petri net is a tuple are disjoint, nite sets of places and
transitions respectively. Further, are the incidence
functions from transitions to places and from places to transitions respectively. Each transition
corresponds to an event in the discrete event system.
For each is the set of input (output)
places of t: Similarly, denotes the set of input
(output) transitions of p 2 P: Analogous denitions are used for sets of transitions and sets of places.
Dene the incidence matrices F (from transitions to places) and F (from places to transitions) as
Further dene F
A marking is a function M be the set of all markings. It can be identied with
bag for short| is a function as the set of all transition
bags. A bag 2 is state-enabled under The set of state-enabled bags under
is denoted by m : The marking of N evolves in the following way. If m is the marking, then
a bag 2 m can be executed and the marking changes to m when is executed. It is
said that m 0 is reached from m by the execution of : This is denoted by m Note that this
notation implies that From the denition of it follows that transitions are allowed to be
executed simultaneously and that the same transition is allowed to be executed more than once at the
same time. This assumption is referred to as the transition bag assumption (see also (Peterson, 1981)
and (Ushio, 1990)).
Denition 1 introduces for each k 2 N and m 2 M the set R k (m) M: It contains the markings
reachable from m in at most k successive executions of transition bags.
Denition
The innite sequence (R i
0 is non-decreasing. Consequently, R1 (m) is well dened for each m:
For subsets M 0 of M dene R k
A path in N is a nite, nonempty sequence of places (2 P ) and transitions (2 T ) such that for
each two consecutive elements a and b in ; b 2 a (Desel and Esparza, 1995). Let be the set of all
paths in N . A path 2 from a 2 P [T to b 2 P [T is a cycle if no element occurs more than once
in and a 2 b : A Petri net is called acyclic if it does not contain any cycles.
3 Structural analysis of acyclic Petri nets
In this section it is shown in a constructive manner that by properly ordering the rows and columns
of the incidence matrices F + and F of an acyclic Petri net these matrices obtain a block-triangular
structure.
1 For a set X; ]X denotes its cardinality. Both markings and transition bags can also be written as column matrices.
Both notations will be used interchangeably. Except for column and row matrices, matrices are set bold. The notation
is used for the subset and for the proper subset relation.
Denition 2 For an acyclic Petri net recursively dene for all k 2 N n f0g the
mutually disjoint sets of transitions T k T and sets of places P k
The set T 1 is the set of source transitions |transitions without input places (Murata, 1989)| of N :
The set P 1 is the set of places of which the set of input transitions is a subset of In particular, all
places without input transitions are in
Lemma 1 For each acyclic Petri net it holds that
Proof. (i) Assume that T Denition 2 this implies that
or, equivalently, that
As
holds that
(Denition 2) or that
This argument can be repeated for t 1 (see (3)). As [ k 1
in this way one can construct an
arbitrarily long path Consequently contains at least ]T +1 transitions
and thus at least two of them will be equal. Hence, and N contain a cycle. This contradicts N
being acyclic.
(ii) The proof is analogous to that of part (i). 2
For the result of Lemma 1(i) is that, if T 1 6= T then T 2 6= ;: For the innite sequence
mutually disjoint sets of transitions one can dene s.t. T k
and can be empty. If T 1 6= ;; resp.
sets. For the result of Lemma 1(ii) is that, if P For the
innite sequence mutually disjoint sets of places one can dene
partitioned into 0 sets.
Proposition 1 For an acyclic Petri net N it holds that
Proof. From Denition 2 it follows that for each k 2 N
Together with the denition of and 0 this nishes the proof.
Corollary 1 For an acyclic Petri net it holds for each k 2 that
and for each k 0 that
Corollary 2 Every path in an acyclic Petri net, with
and
; is
such that
Similar properties for paths beginning or ending in a transition follow immediately. Note that for every
pair of places (transitions) belonging to the same set P i (T i ); there exists no path which connects these
two places (transitions).
Next the consequences of the partitioning of P and T for the matrices F (from transitions to
places) and F (from places to transitions) are studied. For simplicity of notation assume that T 1
and that rows (columns) in F + and F are ordered such that places (transitions) in P 1
places (transitions) in P 2 (T 2 ) and so forth, then F + and F have the following
Figure
1: Petri net of Example 1.
block-triangular structure (see Corollary 1):
1;1 O 1;2 O
. O
O 1;1 F 1;2
O 2;1 O 2;2 F
O
. F
O
The matrices F
i;j and F i;j are in N ]P i ]T j and the matrices O i;j are zero matrices of dimension ]P i
The i-th row of block matrices (i corresponds to places in
i-th column of block matrices (i corresponds to transitions in T
The denitions of the sets P i and T i imply that each row in F
i;i with i > 1 contains at least one
nonzero element (if not the corresponding place would belong to a set P i 0 with i 0 < i) and each column
in F i 1;i with i > 1 contains at least one nonzero element (if not the corresponding transition would
belong to a set T i 0 with
then the last row (rst column) of F + and F has to be left out.
Example 1. For the acyclic Petri net of Figure 1 in which all arcs have weight 1,
When bringing rows and columns in the order the
Reachability issues for acyclic Petri nets
Reachability issues for acyclic Petri nets are studied in this section. Theorem 1 which gives a necessary
and sucient condition for a marking to be reachable from a given marking in an acyclic Petri net
can be found in (Ichikawa and Hiraishi, 1987). Here a constructive proof is given based on the results
of Section 3. In (Li and Wonham, 1994) this theorem was also proven. The present proof is in the
same spirit, but is written out in detail because it allows to formulate useful reachability properties
for acyclic Petri nets and to construct Petri net supervisors in Sections 6, 7 and 8.
For such that
0: (7)
Theorem 1 Given an acyclic Petri net It holds that
there exists a 2 such that
Proof. The 'only if'-part follows from the state evolution of a Petri net. For the 'if'-part, (8) implies
that
Partition P and T as in Section 3. We prove that (see (6)-(7)) is a valid sequence of transition
bags starting from the initial marking This is equivalent to
which in turn follows from
We prove (11) by induction on i: Because 1 holds that
for each p 2 or that induction hypothesis is that
To prove that
one has to check that (see (6) and (7))
Equation (12) implies that (see (6) and (7) for the second equality)
From Corollary 1 we have that ( T i
Consequently,
If this is substituted in (13), it is left to check that
This follows from (9). As
for each t 2 T (see (6) and (7)) it holds that m
(10).
For each T 0 T dene R T 0
k (m) as the set of markings which are reachable from m in at most k
successive executions of transition bags with a zero image on T n T only transitions in T 0 are
executed. It is clear that R T
From the proof of Theorem 1 one immediately
obtains the following important result.
Corollary 3 For an acyclic Petri net holds that
(R
(R
Starting from a given marking m 0 in an acyclic Petri net, every reachable marking m f can be reached
in at most successive executions of transition bags in the order T that only depends
on the structure of the Petri net, i.e. only on F + and F ; and is independent of both the initial and
the nal marking. Corollary 3 solves the problem studied by Kostin (1997) in which, starting from
a solution of (8), an algorithm is constructed for deciding in which order transitions have to be
executed to reach m f from one can do one step better than the result in Corollary 3,
i.e. every reachable marking can be reached in at most 1 successive executions of transition bags.
Proposition 2 Given an acyclic Petri net marking
(R T3
(R T1[T2
Proof. By using the notation of (6)-(7) and of the proof of Theorem 1 we prove that if
Because of using (6)-(7) for suces to show that
From (10) we have that
It follows that
As ( the second term in the left hand side of (15) is equal to zero. This implies (14).
Note that if T i.e. if there are no source transitions, then For the Petri net in Figure 1
it holds that P each reachable marking can be reached in at most two executions of transition
bags.
The results presented so far are for the transition bag assumption (see Section 2). More restrictive
assumptions were dened by Holloway et al. (1997). Under the concurrency assumption multiple
transitions are allowed to be executed simultaneously but each transition not more than once, i.e.
is the set of binary valued functions on Under the no concurrency assumption only one transition
at a time can be executed, i.e. is the set of binary functions on T for which at most one transition
has image 1. It is clear that Theorem 1 also holds in case these assumptions are used by decomposing
the transition bags in (10) in components which satisfy these limitations.
Proof. As 1 it is clear that 1 From its denition, 2 2 ~
~
From
it follows that ~
Consequently, we have
together with
If satises (8), then under the concurrency assumption m f can be reached in
steps and under the no concurrency assumption in
t2T (t) steps (see also (Li and Wonham, 1994)).
Note that both these numbers |in contrast with the result of Corollary 3| depend on and thus
also on m 0 and on m f : Proposition 3 gives a necessary and sucient condition for the set of reachable
markings in an acyclic Petri net to be nite.
Proposition 3 In an acyclic Petri net N in which every source transition has at least one output
place (to rule out trivial cases), the set of reachable markings R1 (m) is nite for each m 2 M; i
there are no source transitions in N ; i.e. i
Proof. 'If'-part: As T we have that (R T 2(m)) ) (see Proposition 2) and
that the set of transition bags which are zero on T n T 2 and state-enabled under m is nite. This
also holds for all sets of transition bags which are zero on T n T i+1 and state-enabled under m i with
(R T 2(m)) Together with the fact that is nite this nishes the
proof.
'Only if'-part: By contraposition. Assume T 1 6= ;: As each source transition has at least one output
place the marking of these places can grow unbounded.
Thus, if there are no source transitions in an acyclic Petri net, then the set of reachable markings is
nite and reachability questions can be answered via enumeration. The enumeration process can be
structured by using the result of Proposition 2.
The results presented so far only solve the problem of ordering events for a given solution of (8).
Propositions 4 and 5 give an alternative for checking if a system of linear equalities has a nonnegative
integer valued solution to decide whether m f is reachable from m 0 in an acyclic Petri net.
Proposition 4 Consider an acyclic Petri net. If ~
(R
and there exists a place
(R T i+1
m))
Proof. As each place p in [ i
its input transitions in [ i
holds for each marking m in
R T
(R T i+1
m)) ) that m(p) ~
Thus, if there exists a place p in [ i
then we have for this p that m(p) < m f (p); from which the result follows.
Intuitively this result follows from the fact that when executing transition bags as in (10) the marking
of a place increase or remain constant until the execution of i and thereafter will decrease
or remain constant.
Dene for each the natural number
All input and output transitions of a place p in P i belong to [ !(p)
Proposition 5 Consider an acyclic Petri net. If ~
(R T 1(m 0
and if there exists a place
(R T i+1( ~
m))
Proof. If
(R T i+1
m)) ) it holds that
~
Together with ~
this nishes the proof.
Propositions 4 and 5 can be used in a branch and bound algorithm for checking wether m f is reachable
from m 0 in the case First construct the set R T 2
which are reachable from m 0 by the execution of one transition bag with transitions in T 2 and which
are not rejected by Propositions 4 and 5. Analogously, the set R T 3
(R T 2
procedure is repeated until m f is found, until for the set R T j
(R T 2
empty or until m f is not found in R T (R T 1
(R T 2
The usefulness of this approach will
depend on the values of !(p) i with Proposition 5) and the number of choice places. An
example where this approach is benecial is when all but the matrices F
i;i and F i 1;i
with
are zero. The generalised tree structure of Li and Wonham (1994) belongs to this class of
acyclic Petri nets. This tree structure is dened with the additional constraint that none of its places
has more than one output transition.
5 Petri net supervisors
In the second part of this paper we design maximally permissive supervisors for a class of Petri nets
containing uncontrollable transitions. Consider a Petri net which we refer to as
the Petri net plant. The control goal is that |by dynamically disabling controllable transitions|
the marking of the Petri net plant can never leave a given legal set A M; which is dened by an
inequality with integer coecients: 2
Intersections of sets of this type are handled by successively applying the method of this paper. Assume
that A is a nonempty proper subset of M: Legal sets which are unions of sets of this type are discussed
in Section 8.
When all transitions in the Petri net plant are controllable and observable this problem was solved
by Yamalidou et al. (1996) by a method based on place invariants. They used the no concurrency
assumption: only one transition can be executed at a time. By using a dierent technique, it is shown
in x5.1 that their result also holds under the more general transition bag assumption. In x5.2 we
discuss Petri net supervisors for Petri nets with uncontrollable transitions and in x5.3 the reduction
result of Stremersch and Boel (2000) for supervisory control of Petri nets is reviewed.
5.1 All transitions controllable and observable
Consider the legal set A as in (17) and an initial marking m 0 2 A; i.e. Am 0 b: For the supervisor to
allow the execution of 2 under m 0 ; not only A(m+F) b should hold but also A(m+F 0
for each 0 2 with This is because the supervisors considered here cannot force events to
they can only disable them. Thus 2 can be allowed if and only if
Dene the row matrix B 2 Z 1]T as: 3
Because of 0 0 and 0 ; (19) is equivalent to
As b Am 0 0 and B 0 this condition is in the standard form of the Petri net enabling condition.
Thus, to guarantee that (18) holds the condition B b Am 0 is added to F This can be
seen as an extra place p c with marking b Am 0 and outgoing arcs As the above reasoning can
be repeated for m 1 the marking of p c evolves to:
when the plant's marking changes from m 0 to contains the outgoing arcs
of Consequently, the incidence matrices of the closed-loop Petri net (plant and supervisor) are@ F
The supervisor is obtained via a simple matrix multiplication. Because (18) and (21) are equivalent,
this supervisor only disables transition bags if this is necessary in order to achieve the control goal A;
i.e. it is maximally permissive. It is clear that supervisors for legal sets dened by the intersection of
a nite number of sets as in (17) can be designed by successively applying this method. In x5.2 we
3 For is the element of X which corresponds to t 2 T:
discuss how this result can be generalised to Petri net plants with uncontrollable transitions.
5.2 Some transitions uncontrollable
as the set of uncontrollable (controllable) transitions. If uncontrollable
transitions are present in the Petri net plant and the marking has always to be in some set A (not
necessarily dened as in (17)), the control specication has to be changed from A to its subset (see
(Holloway and Krogh, 1990))
A :=
in order to avoid that a marking outside A could be reached via the execution of a sequence of
uncontrollable transition bags. As dened above, the set R T u
1 (m) is the set of markings which can be
reached from m by any nite sequence of bags containing only uncontrollable transitions.
As shown in x5.1, when A can be described by the intersection of linear inequalities then the
supervisor for A can be realised by a Petri net. In general, even if A is as in (17), this will not
be the case. This problem was studied in (Giua et al., 1992) and (Giua et al., 1993). In (Li and
Wonham, 1994) Petri net supervisors were constructed in the presence of uncontrollable transitions
by using linear integer programmes.
In Sections 6 and 7 we will dene a class of Petri nets |more general than the one in (Li and
Wonham, 1994)| for which the supervisor for A can be realised by a Petri net. To construct this
supervisor no linear integer programmes need to be solved.
5.3 Reduction result for supervisory control
In this section we review the supervisory control reduction result of Stremersch and Boel (1999) and
Stremersch and Boel (2000). Note that the following results are valid for general legal sets A: Introduce
for every p in P the order relation p in M:
Denition in M and p in
For every p in partially ordered set.
Let (X; ) be a partially ordered set and X 0 X: Then X 0 is an up-set (down-set) in (X; ) if
(Davey and Priestley, 1990). Dene O " (X;
the set of all up-sets (down-sets) in (X;
Denition 4 For A M dene the sets of places
The sets of Denition 4 are mutually disjoint and their union is equal to P:
A path in N is uncontrollable if all transitions in are uncontrollable, i.e. if all transitions in it
belong to T as the set of all uncontrollable paths in N : For all
the rst (last) element of :
Dene for each p 2 P the sets (p) := fp
In words, (p) is the set of places belonging to
uncontrollable paths ending in p; (p) is the set of uncontrollable input transitions of (p) and (p) is
the set of input places of uncontrollable output transitions of p together with the singleton fpg (fpg is
added to guarantee p 2 (p) in case p \T ;). For each holds that p 2 (p) (the sequence
which only consists of p is an uncontrollable path).
Next, we dene for each of the sets set of places and a set of uncontrollable
transitions.
Denition 5 Dene for each A M the sets
I
I d := [
U d := [ p2P d
Proposition 6 8A
Dene the sets
I := I # [ I " [ I d and
Theorem 2 formulates the reduction result.
Theorem 2 8A M;8m
Thus, we get from (22) and Theorem 2 that
U
If
then it is easier to construct A with (27) than with (22). To check whether R
only transitions in
U are needed. To decide whether transitions in
U are state-enabled the marking
of places in
U is needed and to check whether
the marking of places in
needed. The union of these two sets is
I (see
Proposition 6). The set of places
I; the set of transitions
U and the functions f
A
U
I and
f A := f j
I
U form the Petri net NA := (
I ;
which is a sub-Petri net of N : Note that all
transitions in NA are uncontrollable. The structure of NA will determine the class of Petri nets with
uncontrollable transitions for which a Petri net supervisor can be obtained. To avoid confusion in the
remainder of the paper all sets of input and output places (transitions) of transitions (places) in
U
I) are taken in the original net N and not in the subnet NA :
6 Design of a Petri net supervisor
In this section we will dene a class of Petri nets (x6.1) for which the maximally permissive supervisor
can be realised by a Petri net. It is constructed in x6.2.
6.1 A class of Petri nets with uncontrollable transitions
In this section, A is dened by a linear inequality with integer coecients as in (17).
Proposition 7 Consider A as in (17). If A 6= ; and A 6= M; then we have for the sets of Denition 4
that
Proof. See Appendix A.
Thus I
Introduce the following three hypotheses:
(H1) NA is acyclic,
When hypotheses (H1) to (H3) hold, we will construct in x6.2 for A as in (17) a row matrix A 2 Z 1]P
and a number b 2 Z such that A Thus, the supervisor for the Petri net
plant N with set of uncontrollable transitions T u can then be realised by a Petri net (see x5.2). From
it follows that 0 This implies that I
(25) and (26)). In Section 7 conditions (H2) and (H3) will be further weakened.
Reorder rows and columns in F + and F such that places in
I and transitions in
U come rst.
Consequently, F + and F can be written as
where both F
A ; which contains arcs from transitions in
U to places in
I; and F A ; which contains arcs
from places in
I to transitions in
are in N ] I ]
The matrix F 2 ; which contains arcs from places
in P n
I to transitions in
U ; is zero because of
I (see Proposition 6).
Because of (H1) we can |following the procedure of Section 3| partition the set of places
I in
nonempty sets and the set of transitions
U in nonempty sets T
implies that there are no source transitions in NA ). Assume rst that It will be shown in
Remark 1 that the conclusions also hold for
A and F A such that
places (transitions) in P 1 places (transitions) in P 2 (T 3 ) and so forth.
Because of the partitions of
I and
U and because of (H2), F
A and F A obtain the following block
structure:
O 1;2 O
O
O 1;C C C C C C C A
F 1;2
O
O 2;2 F
O
As was pointed out in Section 3, the i-th row (column) of block matrices with
A and F A corresponds to places (transitions) in P i (T i+1 ). The denitions of the sets P i and
imply that each row in F
i;i with 2 i 1 contains at least one nonzero element, and that each
column in F i;i+1 with 1 i 1 contains at least one nonzero element.
p3
c
p6
c
Figure
2: The Petri net of Example 2.
Moreover, because of (H2), (H3) and the denition of NA in x5.3, each column in F A is zero, apart
from one element in F i 1;i
which is equal to 1. This implies that the (unique) input place of t 2
is an element of P i 1 and that all output transitions of which belong to
U are in T
Example 2. Consider the Petri net in Figure 2. Controllable and uncontrollable transitions have a
label 'c' and 'u' respectively. The legal set is
Hence,
I
The sub-net NA is indicated in Figure 2. Since NA is acyclic, one can partition
into sets explained in Section 3:
and
into sets T
By bringing rows and columns respectively in the order
we obtain from (31) that
Compare the structure of these matrices with (28)-(30). 4
Lemma 3 will be used in Theorem 3.
Lemma 3 Given integers c positive integers d and a nonnegative integer c: If 4 d
for each i 2
i2f1;:::;kg
Proof. As the set described by the linear inequalities 5
is a polytope in R k and each of its vertices has integer valued coordinates. Therefore,
The left hand side of (34) is a linear programme over a polytope. If c > 0; then this polytope
vertices. With each of them corresponds a candidate optimal solution X
4 If a nonzero integer a divides an integer b; this is denoted as a j b: On the other hand, a does not divide b is denoted
as a - b:
5 R is the set of real numbers.
c
Consequently,
c
c
i2f1;:::;kg
both the left and the right hand side of (32) are equal to zero.
Corollary 4 is a direct generalisation of the necessary and sucient condition for reachability in acyclic
Petri nets of Theorem 1.
Corollary 4 Given a Petri net If the
sub-Petri net N
a 2 with j TnT
6.2 Construction of a Petri net supervisor
From (H1) and a direct generalisation of Proposition 2, we can rewrite A in (27) by using the
partitions of
I and
U as:
(R T 1
(R
Introduce the set A
recursively dene the sets A
i as
A
g: (36)
It is immediately clear that
and that A
When hypotheses (H1) to (H3) hold, we will prove by induction on i that there exists for each
holds because A
I : The induction hypothesis is that there exists a
matrix A
Based on A
construct a matrix A
such that A
From (36), a marking m belongs to A
Using the induction hypothesis this
is equivalent to
A
As
) is an acyclic sub-Petri net of NA (see Proposition 6 and
(H1)), (38) is equivalent to (see Corollary 4):
By using the structure of F + and F (see (28)-(30)), it holds for each 2 with j TnT i
denote the elements of j T i
Then, (39) is equivalent to (recall that A
for each
I
A
I
A
For
I A
Because of (H3), (41) is equivalent to
I
A
Because of (H2), it holds for dierent places p 1 and p 2 in
I that p \ p \
Therefore, (42) is
equivalent to
I
A
Applying Lemma 3 for each we see that (43) is equivalent to
I
A
b; (44)
I
A
A
b:
This can be written as
A
A
where A
I n P
A
Consequently, we have obtained a matrix A
such that A
Bringing the results for all holds for
A
Theorem 3 states the main result of this section.
Theorem 3 If conditions (H1) to (H3) hold, then the row matrix A 2 Z 1]P with
A
U
I A (p
U
is such that A
Remark 1. The result in Theorem 3 also covers the case
Remark 2. If the legal set A is equal to
then the presented theory can be applied successively if for each of the subnets NA i
(as dened in
hypotheses (H1)-(H3) hold.
Example 2 (continued). Consider again the Petri net in Figure 2. Using the result of Theorem 3 one
obtains:
A (p 7
A (p 8
A (p 5
A (p 6
A (p 2
A (p 3
A (p 1
Therefore,
and the supervisor is
The closed-loop system can be found in Figure 3. The supervisor consists of one control place p c and
the arcs connected to it. Note that none of the uncontrollable transitions has an incoming arc from
the control place. 4
Because legal sets which are down-sets in (M;) form an important class of specication sets, we
formulate Proposition 8.
c
c
Figure
3: Closed-loop Petri net of Example 2.
Proposition 8 If 0 A and A 6= 0; then 0 < A j
Proof. As 0 A it is true that Proposition 7) and thus
As A 6= 0 it is
true that P # 6= ; and thus also that
I
I: From the denition of I # and of (:) it follows
that for each p 2
I we have p \
I 6= ;: Since NA is acyclic, one can construct
an uncontrollable path in N such that
\
It is clear that will be less than ]P: As p 2
I and p
\
holds that A (p
Next, we prove by induction that A (p then we prove
A (p i ) > 0: From Theorem 3,
A (p i
U
I
A (p
I
A (p
7 Weaker hypotheses for the construction of a Petri net supervisor
7.1 Hypothesis (H2): source transitions in NA
In this section condition (H2) is replaced by the weaker condition (H2')
In contrast to (H2) source transitions, these are transitions with an empty set of input places, are now
allowed in
as the set of source transitions in N ; i.e. T s :=
can be applied to A to obtain from (27) that
(R
Dene the set A ] as
A
By using Theorem 3 a matrix A can be constructed such that A
From (46) and (47) it follows that A
It follows immediately that
If there exists a t 2
U \ T s such that 0 < In particular, this is the case if
Proposition 8). On the other hand, if for each
7.2 Hypothesis (H3)
In this section it is shown that it is possible to weaken hypothesis (H3). In (43), we used Lemma 3 with
all d i 's, i.e. all f (p; t) with
I and t 2 p \
equal to 1. Next, we study conditions under which
Lemma 3 can be used when more general arc weights occur. Going through the proof of Theorem 3
again, the summand of the second term in the left hand side of (43) is then
I
A
To be able to apply Lemma 3 we should have that
U
U
Figure
4: Diagram for
I when NA is acyclic.
U
We introduce hypothesis (H3b) because (H3a) should also hold for each m which can be
reached from m by the closed-loop system, i.e. the original system synchronised with the supervisor.
The condition (H3b) is not only sucient but also necessary if each output and each input transition
of p is executed at least once in one of the possible trajectories of the closed-loop system.
U in (H3b), then f because NA is acyclic and (H3b) implies
that
For
I with p \
U as the integer which is equal to f (p; t); 8t 2 p \
U . The
conjunction of conditions (48) and (49) is equivalent to (H3b):
I
Consider the diagram for
I in
Figure
4. It holds that p \ p \ T This is because for each
I; it holds that p\T u
U or p \T u
U (see (23)-(26)). Thus, p\p \T u would contradict
NA being acyclic. Therefore, together with the denition of f p ; (49) is equivalent to the conjunction
of the following three conditions
There are two cases to consider:
Case 1. If in (52) f imply that
Consequently the discrete event system modeled by N with initial marking m can be modeled by the
simpler controlled Petri net
f ) with initial marking
m; where
and
Hypothesis (H3) holds for the new model
Consequently, the results of Section 6 can be used to
construct a supervisor for it.
Case 2. If in (52) f a generalisation of hypothesis (H3) is obtained: it can
be replaced by the conjunction of (H3a) and (H3b). The construction of the row matrix A is done in
a similar way as above.
8 Petri net supervisors with OR-logic
8.1 Unions of linear inequalities as a legal set
For Petri nets with all transitions controllable and observable it was discussed in x5.1 how for legal sets
described by the conjunction of linear inequalities the corresponding maximally permissive supervisor
can be realised by a Petri net. However if the legal set is described by the disjunction of linear
inequalities, it is necessary to extend the Petri net enabling condition with OR-logic as was pointed
out by Li and Wonham (1994).
Consider a legal set
where for each i 2
Consider an initial marking m 0 2 A; i.e. it satises
As discussed in x5.1, for the
supervisor to allow the execution of 2 under m 0 ; not only should
hold but
also
should hold for each 0 2 with Transforming this condition to a
simpler one |as was done in x5.1| is in general very dicult or even impossible under the transition
bag assumption. Hence, we adopt the no concurrency assumption in this section: we only consider
's in noc Moreover, we assume that
the Petri net does not contain any self-loops. Then, the enabling condition F m is equivalent to
To allow 2 noc it should hold that
_
Because of the denition of noc and because m 0 2 A; this is equivalent to
_
Condition (61) should be added to the enabling condition 0 m+ F: This supervisor is maximally
permissive because (60) and (61) are equivalent. The closed-loop system is no longer a Petri net.
8.2 Not all transition controllable
In this section not all transitions are controllable. Here, the legal set is
where for each i 2
and any of the sets A i is redundant. (Note that, in contrast to (58)-(59), 0 A i and 0 b i :) For
these legal sets we dene a class of Petri nets with uncontrollable transitions for which a closed-form
description of A is given. This extends the result of Li and Wonham (1994) to Petri nets of which
the (acyclic) uncontrollable part does not have a generalised tree structure.
Dene for each i 2
i as those of Denition 4 for A i in (63).
From (63) and Propositions 12 and 13 in Appendix B it follows that A i
Together with Proposition 7 it follows that P #
Proposition 9 Consider A as in (62)-(63). If
for each i 2 holds for the sets of Denition 4 that P
Proof. See Appendix B.
For the sets P the sub-Petri net NA can be built as in x5.3. Theorem 4 gives conditions
under which A can be written in a form as in (62)-(63).
Theorem 4 Given a legal set A as in (62)-(63). If
(i) NA is acyclic,
then the following proof species an algorithm for constructing row matrices A
numbers b
In contrast to the conditions (H1)-(H3) of Section 6 now there can be synchronisations in NA : Hypothesis
(H4) is related to the precedence path condition in (Holloway and Krogh, 1990) and (Holloway
et al., 1996).
Proof. Assume that NA does not contain any source transitions, i.e. ;: The case T 1 6= ; is treated
as in x7.1. Because the sets of reachable markings under the transition bag assumption and under the
no concurrency assumption are equal, we can use the transition bag assumption to construct A :
Because of (i), one can partition
U in sets T
Introduce the notation
such that t 0
k (m) as shorthand for R ftg
k (m): For
each m 2 M; it follows directly from Corollary 3 and Lemma 2 that
R
U
(R t 1(m))
Recursively dene for the sets of markings A
A
where A
(see (63)). For each we
will construct by induction matrices A
and numbers b
such that
A
A
I
A
From (62),(63) and Proposition 9, it is clear that the assertion holds for 0: The induction hypothesis
is that this is true for i:
From (66), m 2 A
By the induction hypothesis, this is equivalent to
_
A
Because
is an acyclic sub-Petri net of NA (see (i)) and
because of (iv) and Corollary 4, (70) is equivalent to (F(t i ) is the column of F which corresponds
to t i )
_
A
Next, we prove that A
Because of (69) a sucient condition is
that for each p 2
As NA is acyclic, it is true that F(p; t i
it is true that t i
I (see Proposition 6(i)), thus p 2
I: Because of (iii),
it holds that t k 1
This implies that p 62 [
also have that p 62
I
thus A
Consequently, (71) is equivalent to
_
A
And this can be rewritten as:
_
A
where
A
I
A
The proof suggests a more direct method for constructing the set A : For each marking m in M a
marking mm can be dened in the following way
with for each
The validity of the sequence in (74) follows from the proof of Theorem 4. For
+)-polynomial 6 in the marking m of places in
I (see also (Boel et al., 1998)). Moreover, m 2 A
From which one obtains the result of the theorem.
From the invariance property (this follows directly from (74)-(76))
U
it follows that transitions in
U do not have to be observed by the supervisor.
Example 3. Consider the Petri net in Figure 5 with legal set
From Proposition 9 it follows that P
We have that
and
g: The sub-Petri net NA is acyclic with
the marking mm is constructed as
6 In (min; +)-algebra ordinary addition is replaced by the minimum operation, and ordinary multiplication is replaced
by the ordinary addition.
c
c
p6
c
p3
c
c
Figure
5: Petri net of Example 3.
in (74)-(76):
with other elements in 2 and 3
are zero. One obtains
This also results from mm j
inserting mm in (77) it follows that A
Remark 3. For legal sets of the form
rst Petri net supervisors with OR-logic as above can be constructed for each of the specications
These controllers are then to be combined: the enabling rule for the controller part is
described by the conjunction of the enabling rules for each of the A i -supervisors.
9 Conclusion
We have structured the incidence matrices of acyclic Petri nets. This has resulted in a new proof for the
well-known necessary and sucient condition for reachability in these Petri nets, and in the solution
of other reachability issues. This result was further used to construct maximally permissive Petri net
supervisors which guarantee that the marking of the original Petri net never leaves a given set. For a
large class of Petri nets the method based on place invariants wass extended to Petri nets in which not
all transitions are controllable. The original specication was algorithmically transformed into a new
specication which takes the presence of uncontrollable transitions into account. Moreover, a class of
systems was dened for which the maximally permissive supervisor can be realised by extending the
standard Petri net enabling condition with OR-logic.
Acknowledgement
This paper presents research results of the Belgian Programme on Interuniversity Poles of Attraction,
initiated by the Belgian State, Prime Minister's Oce for Science, Technology and Culture. The
scientic responsibility rests with its authors. This work was partially supported by the European
Community Esprit-LTR Project 26270 VHS (Verication of Hybrid Systems). R.K. Boel is supported
by the Flemish Foundation for Scientic Research as Senior Research Associate.
--R
Introduction to lattices and order.
Free choice Petri nets.
Generalized mutual exclusion constraints on nets with uncontrollable transitions.
Petri net supervisors for generalized mutual exclusion constraints.
A survey of Petri net methods for controlled discrete event systems.
A generalization of state avoidance policies for controlled Petri nets.
Analysis and control of discrete event systems represented by Petri nets.
The novel algorithm for determining the reachability in acyclic Petri nets.
Control of vector discrete-event systems|Part 2: controller syn- thesis
Petri net supervisors for DES with uncontrollable and unobservable transitions.
Petri nets: properties
Petri Net Theory and the Modelling of Systems.
Controlled Petri nets and general legal sets.
Reduction of the supervisory control problem for Petri nets.
ieee Transactions on Automatic Control.
Maximally permissive feedback and modular control synthesis in Petri nets with external input places.
Feedback control of Petri nets based on place invariants.
--TR | uncontrollable transitions;acyclic Petri net;petri net;supervisory control |
593697 | Regular Ordering and Applications in Control Policies. | In this paper we introduce the notion of regular ordering for periodic sequences based on the gaps between the entries. We define the notion of regular preserving functions using Schur convexity. This is used to extend some optimization results in queuing control problems. In particular, we show that the maximal traveling time in a stochastic event graph as well as the transmission times in a channel with redundancy, decrease (in the stochastic sense) when the input sequence becomes more regular. | Introduction
A classical problem in the control of queues is to compute the optimal routing policy of a stream
of incoming customers into several queues in parallel. Often, the goal is to minimize the average
waiting time of the customers or the average load of the system.
When the number of queues is not larger than two, then the problem has been solved in several
cases. In the Markovian case, the optimal policy is a threshold policy and can be computed using
dynamic programming (see [20]). When the system is not Markovian, the optimal policy is a
Sturmian sequence as shown in [2] and te exact computation of the optimal policy has been done
in the deterministic case in [17].
However, when the number of queues in parallel is larger than two, then the problem becomes
more dicult. One of the reasons for this \three queue hiatus" is that Sturmian sequences in
dimension three or more do not exist in most cases (see [2]). The only case where this problem
has been solved so far is when the system is fully loaded and deterministic (see [22]).
Here, we will deal with the problem of routing customers in several queues in parallel using a softer
approach. We will not try to compute the optimal policy, which seems to be a very hard task.
Instead, we will introduce a partial order on the routing sequences called the regular ordering.
The main result of the paper is the following:
If the routing sequence s is more regular than the routing sequence s 0 , then the maximal waiting
times under s are smaller than the maximal waiting times under s 0 , for the stochastic order.
The work of this author was partially supported by the special year on networking at Dimacs, Piscataway, NJ.
This statement deserves several comments.
First, the notion of regularity is close the the notion of balance in the sense that a balanced sequence
is the most regular sequence possible (see Section 2.2). An integer sequence is balanced
if its partial sums over two arbitrary windows of the same length diers by at most one. They
have been extensively investigated in the past [24, 19] and lead to fruitful results in several elds
such as theoretical physics [25], combinatorics [10, 9] as well as control theory [21, 16]. In a recent
paper, [3], it is shown under rather general assumptions that balanced sequences minimize several
cost functions in discrete event systems. This result relies on the following theorem.
are multimodular functions, then the Cezaro limit lim N!1N
is minimized by a balanced sequence.
Second, majorization and Schur convex functions seem to be the right notions to use when comparing
the dispersion of nite sequences [23]. However, majorization does not take into account
the initial positions in the sequences to be compared since it is left invariant by the group of all
permutations.
It is often desirable to take the initial positions into account. For many systems, the input sequence
certainly induces a dierent behavior than the input sequence (1; 0; which
looks more balanced. However, these two sequences cannot be compared by using the classical
majorization technique because the former is a permutation of the latter. To overcome this dif-
culty, we introduce the notion of gap sequences (similar to partial sums, already used in [13])
that takes into account the initial positions in the sequence. This will narrow the gap between the
notion of Schur convexity and multimodularity as shown in Appendix B.
Finally, the usual performance measure in queuing networks is the average waiting time. However,
in communication models where real time constraints are important (such as voice and video traf-
c) the maximal waiting time (or sojourn time) are more important than the average. In Section
3, we show that for FIFO stochastic event graphs, the maximal waiting time (or sojourn time)
is regular preserving. As for computational issues, nding good allocation patterns (i.e. very
regular sequences), is possible via a mathematical programming problem with convex objective
functions as in corollary B.3. A similar procedure for minimizing the average waiting time has
been used by Combe and Boxma [15] and in [14] for dierent performance measures.
The rest of the paper is organized as follows. In section 2, we introduce the notion of gap sequences
and balanced sequences and the regular ordering.
In section 3, we introduce a model of a controlled queue with periodic inter-arrival sequences and
stationary service times. We show that the maximum waiting time is regular preserving w.r.t. the
inter-arrival time as well as w.r.t the service times. Section 3.6 extends the result to a routing
problem between several queues. Finally we show in Section 4, that the transmission rate on a
link with redundancy is also regular preserving.
Preliminaries
This section is devoted to the denition of gap sequences, balanced sequences and to the introduction
of the notion of regularity.
2.1 Gap Sequences
We use the notation for the set of all non-negative integers and we consider the
set P(T ; n) of all non-negative integer sequences size T which sum exactly
to n. Let s 2 P(T ; n). We call (p s the positions in s of all its partial sums.
We dene the vector d i (s) of the gaps of order i > 1 in the sequence s, by:
When the sequence s is in f0; 1g T , then the gaps are never null and measure the size of the number
of elements in the sequence s between the ones. This is illustrated in Figure 1.
Figure
1: Gaps of order one and two for a sequence s in P(9; 3).
2.2 Balanced Sequences
Denition 2.1. A sequence s is balanced if for all j, k and n,
6 1:
Theorem 2.2 ([24]). If a sequence s in P(T ; n) is balanced, then there exists 2 [0; 1] such that
for all j > 0,
Proof. The proof comes from [24] adapted to the nite case.
If s is a balanced sequence then the associated gap sequences have the following property.
Lemma 2.3. If s is a balanced sequence in P(T ; n), then for all j; i, d i
eg.
Proof. By denition, d i
By denition of p j , we have:
jg. Therefore,
This implies that
Similarly, we have:
As for d i
j , we get by subtracting the two previous equations
The following lemma in the converse of Lemma 2.3.
Lemma 2.4. Let s be a sequence such that for all i, all the gaps of order i, d i
dier by at most
one. Then, s is balanced.
Proof. Assume that s is not balanced. There exist two intervals of the same length, l. w 1 and
w 2 such that the sum in w 1 , denoted n 1 is larger than the sum in w 2 , denoted n 2 , plus two:
2. This means that there exists j 1 and j 2 such that d n1
j1 6 l and d n1
2.
Lemma 2.5. A sequence s 2 P(T ; n) is balanced if and only if d 1 (s) is balanced.
Proof. The \only if" assertion: we consider the sequence d 1 (s). Let w
kg be two windows of length k. Then the sums over w 1 of the sequence d 1 are
of the form d 1
and the sums over w 2 are d 1
By lemma 2.3, then these two quantities dier by at most one.
The \if" assertion: d 1 (s) is balanced means that there exists such that for all j, d 1
This means that
Therefore, for any order i, the gaps of order i dier by at most one. By applying Lemma 2.4, s is
balanced.
Remark 2.6. Note however, that the gaps of order higher than one in a balanced sequence may
not be balanced. For example, if d 1 (which is balanced), then d 2
(5; 6; 5; 5; 6; 6; 5) which is not balanced because it contains two consecutive 5 (which sum up to 10)
and also two consecutive 6 (which sum up to 12).
2.3 Regularity and Schur Convexity
If x 2 R n , then we denote by the components of x arranged in decreasing
order. For x; y 2 R n , we say that x (resp. strictly) majorizes y (denoted x y) (resp. x y) if
y [i] and
(resp. with strict inequality for at least one m).
A function f : R n ! R is (resp. strictly) Schur convex if x y
f(x) > f(y)). For more details on the theory of majorization, see [23].
Denition 2.7. If s; s 0 2 P(T ; n), then s 0 is more regular than s (denoted s
Lemma 2.8. The balanced sequences are the minimal sequences in P(T ; n) for the regularity
order. Moreover, if s is balanced, then for all s
Proof. This result is a consequence of Lemma 2.4. Indeed, if n divides iT , then for a balanced
sequence , d i
n , which is minimal. If n does not divide iT , then for the balanced sequence,
c; d iT
eg and is also minimal.
Balanced sequences in P(T ; n) will also be called the \most regular" sequences in P(T ; n) in the
following.
Example 2.9. Let us compare three sequences in P(6; 3): s
and s using the regular ordering. The respective gap sequences are:
Using majorization, it is not dicult to check that
According to the denition of the regular ordering, this means that s 3 Actually, s 3 is
balanced and is the most regular sequence in P(6; 3).
Denition 2.10 (regular-preserving functions). A function f : N T ! R is regular-preserving
(r.p.) if x
Lemma 2.11. A function f : N T ! R is regular-preserving if and only if it can be written under
the form:
is increasing in all coordinates and H are Schur convex.
Proof. The only if assertion is a direct consequence of Lemma 2.8. As for the if assertion, then f
is necessarily Schur convex in all d i . Now, the combination of all these arguments for all i shows
that f is of the form given in the lemma.
Note that if f is regular preserving on the set P(T ; n) then it reaches its minimal value for the
balanced sequences.
Remark 2.12. (Regularity without using the gap sequences)
The denition of regularity, as well as regular preserving functions, can be done in a similar fashion
by using the partial sum sequences of the original sequence s instead of the partial sums of its
order one gap sequence.
All the results given in this paper are still true in this new framework.
The passage from one framework to the other is simply done through Equations (1) and (A.4).
Application 1: Maximal Waiting Times in Networks
In this part, we show that the maximum waiting time in a queuing system with general stationary
inter-arrival and service times is a regular preserving function.
3.1 The D/D/1 Model
First, we consider a slotted D/D/1 queue where the arrival sequence s is periodic with n customers
arriving every T time slots (each of unit length). Therefore, s 2 P(T ; n) ! . By denition, the
number of customers arrivibg at time i is s i . The i-th customer arrives at time p i (s) and brings
a workload of in the system.
We will also denote by C load brought by n consecutive customers.
We nally require that the queue is initially empty and that the customers are served in a FIFO
order (this last assumption can be relaxed to a non-idling server assumption in some cases).
let us consider the waiting time W i of the ith customer that enters the system. We have
f
We dene M(s;
Theorem 3.1. The function M(s) is regular preserving.
Proof. First, let us remark that if C > T , then W
In the rest of the proof, we will only consider the case where C 6 T . In that case, note that after a
transient period of length n, the waiting times are periodic: W Also note that
since the system is initially empty, the maximum waiting time is not reached during the initial
transient period. So we have
f
Equation (2) follows from the fact that C 6 T . Equation (3) comes from Equation (18). Changing
the order of the two max operators yields Equation (4).
Now, the function d j 7! max n
i Tg is Schur convex for each j and the function
M is increasing in d j for all j, and thus satises the conditions of Lemma 2.11. This means that
M is regular preserving.
Corollary 3.2. Among all inter-arrival sequences in P(T ; n), the balanced sequence minimizes
the maximum waiting time in the system. Moreover, for two sequences s; s
Remark 3.3. The function M(s) is multimodular (see Appendix B). This is a direct consequence
of Corollary B.3.
3.2 Characterization using regular preserving functions
The function M when plays an important role. Indeed, we have the following result giving
yet another characterization of balanced sequences.
Theorem 3.4. If
balanced.
Proof. When
Note that jT=n is the average value of d j
(s). Using Lemmas 2.3 and 2.4, s is balanced is equivalent
to the fact that M(s) < 1
3.3 The average waiting time is not regular preserving
In this section, we will show that unlike for the maximal waiting time, the average waiting time
in a stable D/D/1 queue is not regular preserving through an example.
Consider in P(16; 5) the sequences s and s 0 with the respective one-order gaps,
It is immediate to check that s D s 0 . However, if one computes the average waiting time in both
cases, when the load brought by each customer is equal to 3, one gets:
Remark 3.5. The function W is multimodular (see [1]). Therefore, it is minimized by a balanced
sequence in P(16; 5): W if u is a sequence such that d 1
3.4 The G/G/1 Model
Here, we generalize the previous model. The deterministic arrival process is replaced by a stochastic
process with stationary interarrival times: f i g i2N . The load carried by the k-th customer is
denoted by k . The sequence f k g k2N , is stationary and independent of the arrival times. We
denote by i (s) the time elapsed between the arrival of customer i and customer i +1 for sequence
s,
ps (i+1)
j=ps (i)+1
Using Lindley's equation, the waiting time of the i-th customer satises
f
If we consider the maximal waiting time within on period, starting with customer m+ 1, we dene
In a similar fashion as with the D/D/1 case, we dene
f
Intuitively, n
r;m is constructed by going back in time for r customers only, while n
goes back to
time
Note that if the queue has emptied during the last r arrivals, then both quantities coincide.
We assume that the queuing system is stable, that is TE( 1 generalizes the
previous assumption, C 6 T to the stochastic case). Under this stability condition, the queue
empties almost surely in nite time. Therefore, taking r large enough will ensure that n
r;m and
will coincide. More precisely,
n
an;an
an
Now, we have,
an;an
k=i an
k=i an
Lemma 3.6. Let us assume that s and s 0 are two sequences in P(T ; n) such that s E s 0 . Then,
an;an st n
an;an
Proof. For a given pair (i; ng f1; ang, we know by denition of the regular
ordering that there exits ng such that d j
Now, we dene a coupling of the service sequence as well as of the arrival sequence such that
N. Note that the coupled sequences have
the same probability distributions as the original ones because of stationarity and independence
between them and because the sequences and are independent of s and s 0 .
Using this coupling, and considering Equation (8), we have directly
i+an X
Since during a periods, the total number of arrivals under s and s 0 is the same and using the
coupling, we have
i+an 1
ps (i+an) X
p=ps (i)+1
ps (i)+Ta X
p=ps (i)+1
Finally, using the fact that d j
ps (i+j)
p=ps (i)+1
ps (i)+d j
p=ps (i)+1
Using these three relations,
an
i+an X
i+an 1
This is true for all i, and therefore also for the maximum over all possible i from 1 to an. Using
the fact that under the coupling, the sequences 0 and 0 are in a \typical" situation, we get
an;an st n
an;an
Now, the stationary version of the queue is considered. Using a backward coupling argument and
Lemma 3.6, we obtain the following theorem.
Theorem 3.7. Let W i be the stationary waiting time in a stable G/G/1 queue. Then for two
sequences s; s
3.5 The Event Graph Model
We further generalize the previous model in several ways.
Networks assumptions. We replace the single queue by a network made of Q servers (tran-
sitions) and P buers (places) forming a FIFO stochastic event graph with a single entry.
(see [7] for more details on this class of networks. In particular, this class includes all queues
in tandem with general blocking.
Stochastic assumptions. The service time at node j for the k-th customer is denoted by j
k .
The sequence f j
k g k2N;j2Q is stationary and independent of the arrival sequence. However
no independence assumption among the service times is required.
Initial state assumptions. We assume that initially, the event graph is empty, in the sense
that there is not any customer in any buer. (this is a generalization of the empty queue
assumption). Without loss of generality, we can further assume that each buer contains at
most one customer initially.
To any stochastic event graph, we can associate a family of matrices, A('), of size QQ. The entry
(i; in matrix A(') is the maximum over all the sums of the service times of the '-th customer,
' , in all the nodes k on any path from node j to node i with no initial tokens, except at node j,
and is 1 otherwise.
In the following, we will be using the (max; +) notation, where stands for max
and
for +.
Matrix operations are dened accordingly. For more details on (max,+) notations and its use in
event graphs, see for example [7].
The matrices A(') exist and are nite whenever the network cannot reach a deadlock state (see
[7]). In that case, let X q (n) be the epoch when the n-th customer completes its service in server
q. Then the vector the following recurrence equation:
Let Wn be a vector , with its q-th component equal can be
seen as the traveling time for customer n between its entrance in the system and its passage in
server q.
Lemma 3.8 ([1]). Wn satises the following equation:
where D(h) is the diagonal matrix with h on the diagonal and 1 everywhere else, and B(n) is
a vector which describes the input connection.
Equation 9 can be seen as a vectorial form of the Lindley's equation. Its solution is similar to the
solution of the scalar case.
O
If we dene as previously, n
O
We get by a similar technique as in the G/G/1 case (with a vectorial notation),
n
an;an
an
provided the event graph is stable (see [6]).
The quantity n
an;an can be transformed using the fact that diagonal matrices commute with
everything.
an;an
O
O
O
an
O
B(an j
i+an 1
O
an
O
B(an j
i+an 1
O
O
Lemma 3.9. Let us assume that s and s 0 are two sequences in P(T ; n) ! such that s E s 0 . Then,
an;an st n
an;an
Proof. The proof is similar to the single queue case, using a coupling argument and the denition
of the regular ordering.
For a given pair (i; ng f1; ang, we know by denition of the regular ordering
that there exits ng such that d j
Now, we dene a coupling of the service sequence such that for each queue q, 0 q
k+i . As
for the interarrival sequence, we set 0
Note that the coupled sequences have the same probability distributions as the original ones
because of stationarity and independence between them and because the sequences and are
independent of s and s 0 .
Using this coupling, we have by denition of A(k),
i+an 1
O
B(an
O
B(an
During a consecutive periods, the total number of arrivals with s and s 0 is the same. Therefore,
we have using the fact that D( k (s)) are diagonal matrices,
i+an 1
O
ps (i+an) O
p=ps (i)+1
ps (i)+Ta O
p=ps (i)+1
O
O
As for the last term,
O
ps (i+j)
O
p=ps (i)+1
ps (i)+d j
O
p=ps (i)+1
O
O
These three relations are true for all i and j, therefore, considering Equation (14), n
an;an st
an;an
Finally, we obtain the following extension of Theorem 3.7.
Theorem 3.10. In a stochastic event graph, the maximum traveling time M(s) over one period
of the admission sequence is a regular preserving function (in the stochastic sense).
3.6 Routing Problem
Now, we consider a network of K identical queues in parallel. Customers enter a system composed
by K queues in parallel. The routing of the customers is controlled by a sequence of vectors fS i g,
with
means that the i-th customer is routed to queue j. Note
that S is a feasible admission sequence as long as
Customers arrive in the system at each time unit and each customer brings a constant load of .
Figure
2 displays the model we are considering.
3.6.1 The Constrained Case
We consider periodic routing policies S satisfying the following constraint:
are xed with
In other words, S We denote this ste of policies
by
Figure
2: Routing of customers in a multiple queue system
Now, we dene I(S) to be the maximum waiting of any customer in the system, for S 2
is the maximum waiting time in queue j.
We say that the vector (n 1 ; ; nK ) is balanceable if there exists S 2 A(n 1 ; ; nK ) such that for
all j, S j is balanced. See [2] for a more detailed discussion on balanceable vectors. From Lemma
2.8 and 3.1, we get,
Lemma 3.11. If (n 1 ; ; nK ) is balanceable then I(S) is minimized by a routing policy S such
that each S j is balanced.
Proof. This result is a direct consequence of Lemmas 2.8 and 3.1.
This result is similar to some extend to the results proved in [2] where multimodularity of the
waiting times in each queue is used. However, we get a new result here which follows directly from
the previous lemma and which holds for all (n necessarily balanceable).
Theorem 3.12. If such that for all j, S j D U j , then I(S) > I(U).
3.6.2 The Unconstrained Case
Now, we do not x the number of customers sent to each queue.
We want to consider all admission sequences S in the set
Lemma 3.13. The function I(S) is minimized on A for some balanced S
Proof. First, note that if n
(see [2] for a proof). Let b be a vector with such a property. Second, note that if not all n j 2
dT=Keg, then at least one of then is larger than dT=Ke. Finally, note that if s is a
balanced sequence in P(T
Now, the proof goes like this. By Theorem 3.12, I is minimized on A(b) by a balanced sequence
S(b). Moreover, there is some j such that dT=Ke. For any U
which is not in A(b), then there exists k such that n k > dT=Ke.
This nishes the proof
3.7 Computational Problems
For the constrained problem, we can compute the best sequence using a procedure similar to the
one used in [13] with quadratic programming techniques.
As for the unconstrained case, from Lemma 3.13, it is easy to see that when T=K 2 N, then the
best routing policy (which minimizes the function I) is the round robin policy. Similar results can
be found in [2].
However, when T=K 62 N, then little was know before. Here, we can come up with the optimal
routing sequence using the following procedure.
First, we compute the optimal sequence using Lemma 3.13. This sequence is
unique up to a permutation. Note that by symmetry of the cost function, all those permutation
will perform the same. Moreover, since all balanced sequences with the same number of appearance
in the routing sequence are shifts of each other, then for all j such that n dT=Ke, all the waiting
times are equal.
The construction of S j (b) for any j can be done by any known method to construct balanced
sequence, as for example, by using the Beaty construction (see [11]) or the iterative formula given
in Theorem 2.2.
3.8 Development of an example
Let us assume that we want to route customers into three parallel event graphs
dierent service times. For some reason, the proportions of customers sent to must be
1=2; 1=3 and 1=6 respectively. This is a case where the routing policy is constrained to stay in the
set A(3; 2; 1) with a period equal to
The proportions 1=2; 1=3; 1=6 are not balanceable. Therefore, it is not possible to nd a routing
sequence which is balanced for each event graph. However, we can use the regular ordering to
compare several policies.
If we consider the sequence of customers sent in E 1 we get S
In example 2.9, we showed that S 0
If we consider the sequence of customers sent in E 2 we get S
(0; 0; 2; 0; 0; 2). The sequence S 0
2 is balanced. Therefore, S 0
Finally, if we consider the sequence of customers sent in E 2 we get S
which are equal.
Since the sequence S 0 is more regular than S for all the event graphs, then the maximal waiting
time under S 0 is smaller than the maximal waiting time under S (in the stochastic sense). This is
true for all the distributions of the service times in the three event graphs.
However, if we consider S
1 but S 0
. The routing sequences
are not comparable for the regularity ordering. For some distributions of the service
times in the three event graphs then S 0 will be better than S 00 and for some other distributions,
S 00 will be better than S 0 .
Application 2: Assignment to one-buer queues with re-
dundancy
In this section, we present an example of optimal control of admission into a single buer queue
with redundancy.
{ Transmission opportunities occur at time T At each transmission opportunity, a
controller can decide to actually transmit a packet, or not. If transmission occurs, we assume that
it is instantaneous. Dene
{ At a down link node in the network a packet that has been transmitted is buered in a single
buer till its service there is completed. The duration of the service is exponentially distributed
and it has expectation 1 . We assume that the delay between the transmitter and the down link
node is zero (the results of this paper do not change if we take this time to be any other constant
period).
{ If a packet is transmitted before the previous packet has completed its service time then it is
lost.
A model that can be used to solve this problem was introduced and studied in [5]. Here, we further
focus on the following problem arising from higher layer network considerations. We consider the
problem of redundancy of packet transmission: each packet is retransmitted at K consecutive
transmission opportunities, which we call a frame, so as to decrease the probability of losses.
Thus, only if all the K packets in a frame are lost then the frame, or equivalently the original
information packet, is considered to be lost.
Our goal, roughly speaking, is to obtain a control with two objectives: on one hand it maximizes
the average throughput, and on the other it minimizes the loss probabilities of frames. Since the
throughput is the acceptance rate minus the losses, the problem can be formulated as maximization
of the average number of accepted packets, on one hand, and minimizing the loss probabilities of
frames, on the other.
We now formulate more precisely our problem. We dene a control policy as a sequence fs i g,
a transmission is scheduled at the ith transmission opportunity, and it is 0
otherwise. We consider here the case where the controller has no information on the state of the
buer (nor on which packet is the beginning of a frame).
. The actual kth transmission occurs at times p s (k) (see Denition 1). We
dene the process X k to be the number of packets in the buer just prior to time p s (k). Dene
as
where is a negative constant. We consider the problem of minimizing G over all sequences s.
Note that D(N)=N is the acceptance rate, whereas the second term is the average number of
frames lost among the rst N ones. The cost thus contains a term responsible for maximizing
the throughput and a term for minimizing the loss rates. The parameter can be viewed as a
Lagrange multiplier related to a constrained problem; indeed, in [5] a similar problem (for the case
studied where the loss rate is to be minimized subject to a constraint on the rate of
acceptance of packets.
Next, we focus on the cost G(s). We shall restrict to policies s that are periodic. (Recent techniques
in [12] can be used to show that restricting to periodic policies is without loss of optimality.)
Our main result, stated below, is that G(s) is regular-preserving. (This allows us to conclude, in
particular, that there exists an optimal sequence which is balanced.)
Theorem 4.1. Assume that k are stationary and that the service times are i.i.d. exponentially
distributed, and independent of the sequence k . Let s 2 P(T ; n) ! . Then
(i) G can be rewritten as
where d k
i is dened in (1).
(ii) G(s) is regular-preserving for n > K .
Proof. (i) Let n denote the length of the time interval that started when the (n K+1)th packet
was transmitted, and ended when the nth packet is transmitted. fn
only if there has been no service completion during n , and is otherwise 1. Thus, the
expectation of fn (s) equals the probability that an exponential random variable with parameter
is greater than or equal to n . Using the periodicity of s, this yields (i).
(ii) This follows directly from Theorem B.2. Note that since g 0 is convex in x,
A Appendix: properties of the gap sequences
This appendix gives several properties of the gap sequences which have some interest by their own.
The two following lemmas are straightforward consequences of the denition of the gaps.
Lemma A.1. The gap sequences satisfy the following properties:
Proof. The proof is a straightforward consequence of the denition of the gaps.
Lemma A.2. Let s and s 0 be two sequences in P(T ; n). If s 0 is a shift of s or a mirror of s (i.e.
j+k or s
Proof. The proof also follows directly from the denition of the gaps.
Remark A.3. The converse of Lemma A.2 is false in general, as shown by the following counter
example choose s and s 0 such that d 1
s 0 is not a mirror nor a shift of s. However, for all order i, we have fd i )g. We will
prove in the following (see Remark A.6) that the converse of Lemma A.2 is true in the special case
of balanced sequences.
Lemma A.4. If s 2 P(T ; n), then d 1 is a shift of s.
Proof. By using Equation (17), then d 1 be a shift of s such that
and such that d 1 We will show that d 1 (d 1
ig. Now we compute
We can construct the dierent gaps by computing in the set Z[X ]=(X n 1). Indeed, from the set
(s), we can dene the polynomial
Note that by denition, we have P i
Lemma A.5. Let i > 1. The original sequence s can be retrieved from d i (s) if and only if i and
are relatively prime.
Proof. There is a one to one correspondence between s and d 1 (s). Therefore, we rather show
that the knowledge of d i enables one to compute d 1 (s) if and only if i and n are relatively
prime. If i and n are relatively prime, then the polynomials X n 1 and X are
relatively prime. Using the Bezout equality, there are two polynomials u(X) and v(X) in Z[X]
and a non-zero integer k such that 1). Therefore,
This counter example was provided to the authors by Jer^ome Galtier
by multiplying by P 1
s (X), we get kP 1
s (X)u(X) mod (X n 1). The knowledge of P 1
induces the knowledge of d 1 (s), which in turn gives all gaps by using Equation (16).
On the other hand, if i and n are not relatively prime, then gcd((X
and if we denote by q(X) 4
1). Therefore, two dierent gap sequences of
order one are compatible with the gap sequence of order i.
Remark A.6. Note that if for a sequence s, all the gaps of all order i dier by at most one and
are balanced by lemma 2.4. On the other hand, all
balanced sequences are shift of each other (see Theorem 2.2) (It is interesting to see that in this
case, all mirror transformations are also shifts). This is an answer to the question asked in Remark
A.3 in the case where the gap sequences are all formed by two consecutive numbers.
relations between regularity and multimodu-
larity
Multimodularity is a notion of discrete convexity which has been introduced in [21]. It has been
used extensively in the context of the admission control of queues [3, 1, 2, 4, 18]. Therefore, it is
interesting to see if regular preserving functions have some kind of discrete convexity properties.
In this appendix we will show that all regular preserving functions are multimodular in some sense
whereas the reverse is not true.
denote the vector with all components equal to 0 except the i-th component which is
equal to 1. Dene b g.
Since we deal with sequences which sums are xed to n, we use an adapted version of the denition
of multimodularity.
Denition B.1. A function f on P(T ; n) is multimodular with respect to F if for all
This is not the classical denition given by Hajek in [21], which considers arbitrary sequences
in N T . However, both denitions are closely related. One can show that the projection of a
multimodular function (in the sense of Hajek) on P(T ; n) is multimodular according to Denition
B.1. (see [3] as well as [8] for a deeper insight on the denition given here.)
Theorem B.2. Let f(s) be a function that only depends on d i (s), which is also denoted by
can be put under the from
is a convex function,
then it is is multimodular on P(T ; n).
Proof. According to the denition of multimodularity, we need to check the inequality (19) for all
First note that for all 1 6 k 6 T , there exists j k such that:
Now, for any 1 6 k; l 6 pn+i such that j k 6= j l i, then b l and b k modify dierent gaps. Therefore,
For
This is positive since g is convex.
The following corollary covers the case when several gap orders are used.
Corollary B.3. If for all
are convex functions, then
dene the function
where c i are non negative constants. Then f is multimodular.
Proof. For all i, the function f i positive linear combination of
multimodular functions is multimodular.
Remark B.4. Note that the functions f i a \characteristic set" of regular preserving
in the same way sums of convex functions play an important role among Schur convex functions
([23]).
Remark B.5. Functions of the form (21) have been used in [13] as a criterion to test regularity of
a sequence. In that paper, the minimization problem of functions of this form is written as under
quadratic assignment formulation. This makes computations possible for small n and T and can
be used for optimization purposes.
In order to prove that a balanced sequence minimizes a function f as in (21) ( f(s) is regular
preserving and multimodular), one can choose two dierent methods. First, one can try to use the
fact that f(s) is multimodular in N T . By referring to a general (complicated) theorem proved in
[21, 3], f(s) will be minimized by a balanced sequence and then use the fact that if s is balanced,
then s is a balanced sequence in P(T ; n).
Another way to prove the same result, it by using the fact that f(s) is regular preserving directly.
This second proof is easier and has a clear advantage on the previous approach since it provides
a more precise result. It says that if s D s 0 , then f(s) > f(s 0 ).
This fact will be illustrated in the following section, where we show that a given cost function is
ri. The minimization will then derive directly from Lemma 2.8 as well as the comparison between
several policies.
Remark B.6. Finally, one may remark that regular preserving functions constitute an essential
class among multimodular functions. Indeed, as shown in Section 3.2, if a given sequence in
possible regular preserving functions, then this sequence in balanced.
--R
Admission control in stochastic event graphs.
Balanced sequences and optimal routing.
Multimodularity, convexity and optimization proper- ties
Optimal open-loop control of vacations
Optimal admission
Towards a uni
Complexity of trajectories in rectangular billiards.
The book of L
Mots, chapter Trac
Optimal routing problems and multimodularity.
Optimization of template-driven scheduling mechanisms
Optimization of template-driven scheduling mechanisms
Optimal allocation sequences of two processes sharing a resource.
Optimal routing policy in two deterministic queues.
Monotone optimal control of permutable gsmps.
Covering the positive integers by disjoint sets of the form f
Optimal control of two interacting service stations.
Extremal splitting of point processes.
Dinard Van Der Laan.
Theory of Majorization and Its Applications
Symbolic dynamics II- Sturmian trajectories
Quasicrystals and geometry.
--TR | admission control;regular ordering balanced sequences;schur convexity;plus algebra |
593969 | Fusion Via a Linear Combination of Scores. | We present a thorough analysis of the capabilities of the linear combination (LC) model for fusion of information retrieval systems. The LC model combines the results lists of multiple IR systems by scoring each document using a weighted sum of the scores from each of the component systems. We first present both empirical and analytical justification for the hypotheses that such a model should only be used when the systems involved have high performance, a large overlap of relevant documents, and a small overlap of nonrelevant documents. The empirical approach allows us to very accurately predict the performance of a combined system. We also derive a formula for a theoretically optimal weighting scheme for combining 2 systems. We introduce dthe difference between the average score on relevant documents and the average score on nonrelevant documentsas a performance measure which not only allows mathematical reasoning about system performance, but also allows the selection of weights which generalize well to new documents. We describe a number of experiments involving large numbers of different IR systems which support these findings. | Introduction
In the past, neural network models which have been
applied to the Information Retrieval problem have typ-
Research was supported by UC Senate Bridge Grant #RW252G/B.
ically used the very large feature vectors (document and
query vectors) which are traditionally used in IR systems
(see for example, [Crestani, 1994], [Wong et al.,
1993], [Boughanem et al., 1993]). Unfortunately, the
2 Vogt and Cottrell
resulting large networks generally require large numbers
of training examples, a rare commodity in the IR
setting. Although work using Latent Semantic Indexing
[Deerwester et al., 1990] to reduce the number of
features has met with some success [Vogt et al., 1997a],
LSI is itself computationally expensive.
Perhaps a wiser approach can be found in fusion,
where the results from multiple IR systems are combined
to generate a single (hopefully better) list of
potentially relevant documents in response to presentation
of a single query to a number of component
systems. Fusion allows a significant reduction in the
number of features, often to just one feature per system
- typically the system's estimate of the document's
probability of relevance. As such, a fusion neural net-work
model can be much smaller than a traditional
one based on document vectors. Fusion also allows
leveraging of the component systems in several ways
by exploiting a number of effects (from [Diamond,
ffl The Skimming Effect happens when "retrieval
approaches that represent their collection items
differently retrieve different relevant items, so that
a combination method that takes the top-ranked
items from each of the retrieval approaches will
push non-relevant items down in the ranking."
ffl The Chorus Effect occurs "when several retrieval
approaches suggest that an item is relevant to a
query.this tends to be stronger evidence for relevance
than a single approach doing so."
ffl The Dark Horse Effect in which "a retrieval approach
may produce unusually accurate (or inac-
curate) estimates of relevance for at least some
items, relative to the other retrieval approaches."
It should be noted that when choosing how to combine
the results from different IR systems, the Dark Horse
Effect is at odds with the Chorus Effect. Likewise, a
large Chorus Effect cuts into the possible gain from
the Skimming Effect. These phenomena argue for a
sophisticated fusion model which is able to predict
when these effects will occur and take advantage of
them. Furthermore, the expansion of the Word Wide
Web has spawned a proliferation of search engines.
Combining them would allow one to exploit the above
effects.
Such simple neural network fusion models may allow
easier training, but their simplicity inflicts a penalty
- they lack expressive power. Thus, it seems likely that
the improvement in performance possible from these
models would be limited. In this article, we examine in
detail one such fusion model: the linear combination
of scores (LC). The LC model has been used by many
researchers with varying degrees of success [Bartell
et al., 1994], [Kantor, 1995], [Knaus et al., 1995], [Sel-
berg and Etzioni, 1996], [Shaw and Fox, 1995], and
Fusion Via a Linear Combination of Scores 3
[Vogt et al., 1997b]. Our analysis of the model reveals
what types of systems the model works best with and
explores techniques for training the model.
This article has the following format. First we describe
the model and the specific problems we are ex-
amining, along with the data we use and assumptions.
Next, we both empirically and mathematically derive
explanations for when it makes sense to use the LC
model. This also leads to hard limits on the performance
of an LC fusion system. Finally, we describe
experiments in training the LC model, and describe a
technique which generalizes to large numbers of systems
as well as more complicated models. Through
these analyses we gain insight into why and when the
LC model works well.
2. Background
2.1. The LC Model
The linear combination model calculates the real-valued
relevance ae of a document x to a query q based
on the weights given to each individual
system and their estimates of relevance:
ae(w;
systems
This value is then used to rank the documents. For
only two IR systems, this simplifies to:
However, all that really matters is the ranking given
by the combined system. Thus, for the case of two
systems, only the ratio of the two weights and the
relationship of the signs on the weights are important,
and equation (1) can be replaced by one using a single
weight:
ae(w;
The LC model is more flexible than others which
have been tried in the past. Most of these consist of a
single choice of parameters, such as the sum of scores
or the maximum score, or a fixed weighting based
on individual system performance (see [Belkin et al.,
1995], [Shaw and Fox, 1995], [Kantor, 1995]). The
difference here is that we will use a search procedure to
optimize the weights. The LC model is also equivalent
to the simplest kind of neural network, a single layer
net. The addition of a squashing function on the output
unit does not add any power, as it would not change
the ranking induced by the combined system.
2.2. The Data
Our study of fusion necessitates the availability of a
large number of IR systems. We have chosen to use
the entries to the TREC5 adhoc track [Harman, 1997].
TREC (Text REtrieval Conference) is an annual conference
sponsored by the National Institute of Standards
and Technology, in which participants are given
very large text corpora and submit the results of their
4 Vogt and Cottrell
retrieval techniques in a sort of contest. Specifically,
in the adhoc track, each participant submits the top
1000 documents returned by their system in response
to 50 queries supplied by NIST, and each participant
can submit up to 4 runs. 61 runs were submitted, for
a total of 3050 lists of 1000 documents, each of which
we treat as a separate IR "system." Although most of
our work involves examining the routing problem, we
choose the adhoc entries because there are far more of
them than routing entries.
One issue arises when combining such lists of top-ranked
documents - what score should be given to
documents returned by one system but not the other?
We have assumed that for such documents, the system
which did not return them gave them a score of zero. In
so doing, we also had to eliminate any negative scores
for documents, because otherwise the unreturned documents
would get ranked above those with negative
scores. We did this by adding the absolute value of the
lowest score to all documents for any system which had
negative scores. We believe that zero scores for unseen
documents is a reasonable choice - the vast majority
of documents are not relevant, and most systems give
a zero score to nonrelevant documents.
2.3. Problems Addressed
A common dichotomy used by fusion researchers is
the difference between data fusion and collection fu-
sion. The former takes place in a setting when all
of the IR systems involved have access to the same
text collection. The latter is used when the collections
searched by all IR systems are disjoint. Because of our
use of TREC entries, our work necessarily falls under
the label of data fusion, but it is not data fusion in the
purest sense, since we do not have scores for all of the
documents in the corpus.
Another distinction is in the type of IR problem
solved. TREC distinguishes two main problems: ad-hoc
and routing. Adhoc retrieval occurs when the text
collection is relatively static, and new queries are constantly
being submitted by users. In contrast, routing
has a standing query, and new documents are arriving
which need to be filtered according to that query.
The difference between these two tasks is important
in the context of the LC model. For the routing task,
a new set of weights can be trained for each standing
query. However, for the adhoc task, one set of weights
must be applied for all queries. Clearly, the routing
task should be easier to solve using this model, since
the weights can be tuned on a per-query basis.
3. Limitations of the LC Model
Using the LC model does not always result in an improvement
in performance. Previous work using the
TREC data has shown that even on the training set, significant
improvement is achievable for less than half of
the possible combinations [Vogt and Cottrell, 1998a].
Fusion Via a Linear Combination of Scores 5
Why is it that it works sometimes and not others?
When does the LC model work?
In this section we use two techniques, one empirical
and one analytical, to determine the source of the LC
model's power. In the process, we gain a deeper understanding
of why it works, its limitations, and which
systems can be successfully combined using the LC
model.
3.1. Empirical Analysis
We introduce here a technique for analyzing the behavior
of fusion models and applied it to the LC model.
The technique involves measuring various properties of
the component IR systems, and using them in a linear
regression to predict the performance of the combination
[Vogt and Cottrell, 1998a]. By examining how
the measures are weighted by the regression, we gain
an intuitive feel for when using the model pays off.
Our technique works surprisingly well - the resulting
regression can predict the performance of unseen combinations
very accurately (on the test set, r
3.1.1. Method Our data set is all 61 TREC5 entries
on the first 20 queries - 1220 lists of up to 1000 docu-
ments. We begin by making a number of measures of
all 36,600 pairs of systems/queries. These measures
are meant to indicate either how well each system performs
or how similar the two systems are to each other.
The performance measures include average precision
(indicated by P) and a statistical measure of rank correlation
between the system and the relevance judgments
(J) [Bartell et al., 1994]. J is defined as:
ae(w;
indicates the user prefers document x to
document x 0 on query q. Note that J has a maximum
value of 1 when the numerator and denominator are the
same (i.e., the IR system ranks documents exactly as
the user would), and a minimum value of -1 when the
opposite is true. These two measures are subscripted
a for the better of the two systems and b for the worse.
The pairwise similarity measures include:
ffl Guttman's Point Alienation (GPA) - a measure
of how similar two rankings are to each other and
which is calculated as:
ffl the number of documents in the intersection of the
two lists of returned documents (")
ffl the correlation coefficient from a linear regression
of the scores of documents in the intersection of
the two systems (C)
ffl the number of relevant documents returned by one
system but not the other divided by the total num-
6 Vogt and Cottrell
ber of relevant documents returned by that system
(U for uniqueness),
ffl Lee's [Lee, 1997] overlap measures, O rel and
O nonrel , which measure the proportion of relevant
and nonrelevant documents in the intersection of
the two lists. These two measures are calculated
as:
O
O
where R i is the number of relevant documents
returned by system i, and N i is the number of
nonrelevant.
Also, because it seemed likely that measuring the similarity
of the two systems on nonrelevant documents
is less important than on relevant ones, the first three
measures were also calculated using only relevant doc-
uments, and are denoted: GPA rel rel . One
last measure, GPA ni (for "not irrelevant") is the GPA
using pairs of documents where at least one is relevant.
After normalizing the scores for each system on each
query by dividing by their respective means we found
the optimal combination for each possible pair. For
each query and each pair of systems, the single weight
w was chosen by optimizing average precision using
golden section search [Press et al., 1995], and the best
w was used to generate a combined system (of 1000
documents) according to equation (2). Because systems
were combined on a per-query basis, this experimental
setup most accurately simulated the routing
task.
We then performed a multiple linear regression using
the aforementioned measures as predictor variables and
the average precision of the optimal combination as the
target. 80% of the pairs (29,280 total - the "training
were used in the regression.
3.1.2. Results Table 1 presents the results of the
multiple regression. Measures are sorted by decreasing
F value, indicating roughly how important each
measure is in predicting the average precision of the
optimally combined system. All measures above the
horizontal line in the table contribute to some degree
(as indicated by F values much larger than 1). The
indicates that the fit of the model is
very accurate. Furthermore, the model generalizes extremely
well to new data - when the remaining 20% of
the pairs (the "test set") were plugged into the model,
Positive regression coefficients in Table 1 can be interpreted
as meaning that the correponding measures
should be maximized in order to maximize the performance
of the combined system. Likewise, measures
with negative coefficients should be minimized. This
leads to the following conclusions: the better system
should have high performance (P a and J a have large
positive coefficients), whereas the performance of the
Fusion Via a Linear Combination of Scores 7
Table
1. Results of Linear Regression
Normalized
Regression
Measure Coefficient F
Pa 0.8993 129141.5501
Ua -0.1202 405.5097
Ja 0.0431 346.1357
GPA rel -0.0359 220.1937
O rel -0.0519 55.8835
C rel 0.0125 35.8910
O nonrel -0.0427 20.9289
" rel 0.0088 17.5199
GPA ni -0.0099 8.9850
Results of a linear regression for predicting the combination's average
precision (r 2 =0.94). Positive coefficients indicate the measure
should be maximized, negative coefficients indicate it should be
minimized.
worse system may or may not be good (Pb and Jb have
opposite signs). The positive coefficients on GPA and
C rel indicate that the two systems should generally
rank documents in their intersection similarly and the
distribution of scores by both systems should be similar
to each other. On the other hand, the negative
coefficients on GPA rel and GPA ni indicate that each
system should rank relevant documents differently than
the other system. Finally, the negative coefficient on
O nonrel means that the two systems should retrieve
different sets of nonrelevant documents.
The table leads to conflicting conclusions about the
overlap of relevant documents. The negative coefficients
for U a and U b indicate that both systems should
not return unique relevant documents, whereas the negative
coefficient on O rel indicates they should. As it
turns out, the negative coefficient on O rel is inaccurate
because O rel is directly related to U a and U b by2O rel
. The regression simply accounted
for the effect of uniqueness using U a and U b
alone.
In fact, by repeating the regression using only
O rel and O nonrel , we can predict the combined
system's precision with nearly the same accuracy
as the original regression (r
2). This table shows that the following three conclusions
about when it makes sense to use the LC model
are strongest, namely when:
ffl at least one exhibits good performance,
ffl both return similar sets of relevant documents, and
ffl both return dissimilar sets of nonrelevant documents
8 Vogt and Cottrell
Table
2. Results of Linear Regression on a Subset of Predictors
Normalized
Regression
Measure Coefficient F
Pa 0.9366 191543.1029
O rel 0.1021 2249.4031
O nonrel -0.0581 975.4101
3.2. Mathematical Analysis
The conclusions in the previous section were arrived at
empirically, and give little insight into why they may
be true. We now provide a mathematical justification
for these hypotheses. Furthermore, we mathematically
derive an equation for the optimal weighting and
from this derivation arrive at an equation for the performance
of an LC model. As in the empirical case,
we concentrate on the routing problem only.
3.2.1. d as a Performance Measure Our analysis
hinges on the use of d as a performance measure. d
is equal to the difference between the mean score on
all positive examples (relevant documents) -
p and the
mean score on all negative examples (nonrelevant doc-
As such, d is most easily applied to evaluating
the routing task, where documents need to be
placed in one of two categories. Without loss of gen-
erality, we assume the scores have been normalized
to the interval [0; 1], to make values of d comparable
across systems. d is equal to the numerator of d 0 from
signal detection theory [Swets, 1996]. d 0 divides this
difference by the standard deviation of the negative example
score distribution (d
oe N
A variation of
called the Swets measure has been examined before
in the information retrieval setting ([van Rijsbergen,
1979], p.157):
However, despite their statistically based theoretical
attractiveness and the excellent argument put forth by
Swets, neither d 0 nor S have ever caught on as a basis
for performance evaluation in IR. We now justify our
use of d as a performance measure by relating it to d 0 .
First we note that IR systems typically distribute
scores according to an exponential distribution. Figure
1 shows the empirical distribution of two typical IR
systems from TREC5 after scores have been normalized
to [0; 1]. Note that these distributions are summed
over all 50 queries for each system. Over 60% of the 61
entries have distributions similar to these two. Figure
shows two atypical distributions. The typical distribution
not only has the appearance of an exponential,
but as
Figure
3 shows, it also has the property that its
mean is approximately equal to its standard deviation
- a property of all exponential distributions. Note that
this property is stronger for the negative score distribu-
Fusion Via a Linear Combination of Scores 920060010001400
Relevant Scores - Cor5A1se
Nonrelevant Scores - Cor5A1se20060010001400
Relevant Scores - vtwnB1
Nonrelevant Scores - vtwnB1
Fig. 1. Smoothed Histogram of Typical Relevant and Nonrelevant Score Distributions (from entries Cor5A1se and vtwnB1)
Relevant Scores - INQ301
Nonrelevant Scores - INQ30120060010001400
Relevant Scores - uwgcx0
Nonrelevant Scores - uwgcx0
Fig. 2. Smoothed Histogram of Atypical Relevant and Nonrelevant Score Distributions (from entries INQ301 and uwgcx0)
Fusion Via a Linear Combination of Scores 112610-0.6 -0.4 -0.2 0 0.2 0.4 0.626101418
Fig. 3. Histograms of the difference between the mean and the standard deviation for positive example scores (-p \Gamma oe P , left) and negative
example scores (-n \Gamma oe N , right) on the 61 TREC entries. Note that both are centered around 0 and the negative score histogram has smaller
variance.
tions (the negative score histogram has lower variance),
indicating that it is closer to an exponential.
Because of the aforementioned properties, it is reasonable
to substitute the mean of the negative score
distribution for the standard deviation in the equation
for
We note that maximizing
d is the same as maximizing this approximation to
a measure which has already been well defended
for use in IR [van Rijsbergen, 1979], [Swets, 1996].
To see this, simply take the logarithm of both sides of
the approximation after ignoring the subtraction of a
log(-n).
We further justify the use of d bynoting that on the 61
entries and 50 queries from TREC5, a linear regression
of d to predict average precision yields an r
Figure
4 shows this relationship. Furthermore, as we
will show later, optimizing d has effects similar to
optimizing average precision directly.
3.2.2. An Equation for d Our first step is to derive
an equation for d when combining two systems. We
use the following notation: the letters a and b are
used to indicate the two systems being combined. The
set of relevant documents returned only by system a
are indicated P a (P for positive example), those by
are P b and those returned by both are P ab , with
their sizes shown as P , so that P a = jP a j, etc. The
corresponding sets of nonrelevent documents and their
sizes are indicated using N and N .
We proceed by deriving an expression for - p in terms
of -
p a and -
b , and then likewise for - n. As in our empirical
study, we are trying to predict the performance of
the combined system based on the performance (and
other variables) of the component systems.
ae min be the lowest score produced by the combined
system before normalization, and r be the range
of scores (ae These quantities are used to
12 Vogt and Cottrell
-0.4
d
Average Precision
Fig. 4. Average Precision versus d for the 3050 TREC5 Entries
normalize the scores of the combined system to [0; 1].
Then, by definition,
ab
sin(w) (ae a (x)\Gammaae min )
r
x2Pa sin(w) (ae a (x)\Gammaae min )
r
r
Or,
sin(w)
sin(w)
\Theta P
ab
ae a
x2Pa ae a (x)
cos(w)
\Theta P
Now, note that for system a
ab
ae a
x2Pa ae a (x)
Or,
p a
ab
ae a
x2Pa
ae a (x)
And likewise for system b. Substituting this into the
equation for - p yields:
By a similar series of steps, it can be shown that:
sin(w)(-n a \Gamma ae min )(N ab +N a )
r(N ab +N a +N b )
r(N ab +N a +N b )
Fusion Via a Linear Combination of Scores 13
After introducing the following shorthand for the relative
ratios of relevant and nonrelevant documents returned
by both systems:
N a +N ab
ab +N a +N b
ab +N a +N b
We have,
d =r
3.2.3. Maximizing d Because we have a formula
for d (the performance of the combined system), we
can find its maximum via calculus. Differentiating
with respect to w and setting it equal to 0 yields:
Or,
For simplicity, define ffi a as the numerator of this expression
and ffi b as the denominator so that tan(w opt
. Then the equation for the optimal weight could
equivalently be written:
sin(w opt
a
Recall from trigonometry that:
Using this fact, and the relationship between sin(w)
and cos(w) noted above, we get the following expression
for the performance of the optimally combined
system:
d opt =r4
At this point we make the simplifying assumption
that both systems have positive weight, a realistic one
if both systems perform reasonably well. Then the
above equation simplifies to:
3.2.4. Support for the 3 Hypotheses The final equation
from the previous section indicates that to maximize
d opt , we need to maximize both ffi a and ffi b . Remember
that,
ab )(-n a \Gamma ae min )
ab +N a +N b
Or, using shorthand,
14 Vogt and Cottrell
It is easy to show that since 0 - ff
ffi a is optimal when ff Similarly,
when -
a is maximal (i.e., when
d a is maximized). Similar arguments hold for
We are now in a position to address the three hy-
potheses: Linear combination is warranted when,
1. at least one system exhibits good performance,
2. both systems return similar sets of relevant documents
3. both systems return dissimilar sets of nonrelevant
documents.
The first point follows directly from the fact that ffi a and
are maximal when d a and d b are maximal. The second
two points can be concretely supported as follows.
Recall that ffi a is optimal when ff
Pa+P b +P ab
, it is equal to 1 when P
Likewise, are
optimal when both systems return no unique relevant
documents (i.e., they maximize the overlap of relevant
documents). Conversely, since ff
Na+N b +N ab
, it
goes to 0 as N b ! 1. The same argument holds for
are optimal when both systems are
retrieving different sets of nonrelevant documents.
3.2.5.
Summary
We have provided mathematical
support for our empirically derived conclusions about
when to use the linear model. Namely, when at least
one system exhibits good performance, both systems
return similar sets of relevant documents, and both systems
return dissimilar sets of nonrelevant documents.
These conclusions basically state that the LC model
primarily exploits only the Chorus Effect. We have
also derived a formula for the optimal weighting as
well as a formula for the performance of the combined
system assuming the optimal weighting.
4. Training the LC Model
We now turn to the practical side of things. In the previous
section we derived an optimal weighting for two
systems according to d. However, using this weighting
is not a practical technique for several reasons. First,
it is not general, in that it does not cover the case of
more than two systems. Second, it would be more satisfying
if we could choose a weight which optimizes a
more traditional IR performance measure, such as average
precision or exact precision. Finally, the optimal
weights used in the previous section were not tested
for generalization to new data. In this section, we describe
a series of experiments in which we compare
two different techniques for choosing the weights of
an LC model.
Fusion Via a Linear Combination of Scores 15
4.1. Advantages of Using d as an Optimization Cri-
terion
Recent work [Vogt and Cottrell, 1998b] has argued
in favor of using d 0 as an optimization measure for
ranking problems such as those seen in IR. The list of
reasons to prefer d 0 also apply to d. Namely,
ffl it is differentiable with respect to model parame-
ters, thus it can be applied to more complex models
(via gradient based techniques) than optimizing
precision directly, which has no gradient,
ffl it may be suitable for online learning,
ffl it is roughly correlated with other well-known
measures of performance like average precision,
ffl it is generally cheaper to calculate than rank-order
statistics, such as J [Bartell et al., 1994],
ffl it has an intuitive meaning: as a measure of how
well the scores on positive examples are separated
from those on negative examples.
Below we show that optimizing d to select a weighting
scheme for combining two IR systems works nearly
as well (as measured by average precision) as optimizing
average precision itself. It is important that we
distinguish between an optimization criterion and a
performance measure. Often, the same function plays
both roles. However, in the following experiments we
may choose the weights by optimizing either d or average
precision (P), but we will always evaluate the
resulting combined system using P.
4.2. Training a Model for the Routing Problem
As previously noted, the routing problem should be
easier for the LC model (or any parameterized model)
because a separate model can be trained for each query,
assuming enough training data. For this reason, we
begin by examining the routing problem.
4.2.1. Method We examined all 61 submissions to
the TREC5 adhoc track. For each of the possible
pairs, on each of the 50 TREC5 adhoc queries, and
70% of all possible documents, we chose w in one of
two ways:
ffl using a golden section search [Press et al., 1995]
to optimize P directly, or
ffl using a golden section search to optimize d directly
Golden section search does not require a gradient,
hence it is useful in both of these cases. Although
we are able to calculate the optimal weight for d using
equation (3), we use the golden section technique
because in the future we would like to be able to apply
the technique of optimizing d to models with more
than one parameter, for which an equation will not be
derivable.
We did not use a hold out set to stop training since the
LC model has only one parameter and thus is unlikely
to overfit the training data. We tested each of the trained
combinations on the remaining 30% of the documents,
evaluating each combination using P.
4.2.2. Results and Discussion For each of the
pair/query triples, we calculated
the difference between the value of average precision
on the test set as determined by the weight being trained
on d and the weight being trained on P. That is, we
are looking at the the quantity PP \Gamma P d . This measures
how much better training on P is than training on
d.
Figure
5 displays the histogram of this difference.
The average difference is -0.009. This means that on
average, training using d gives better generalization
when P is the measure of performance. Although an
ANOVA shows that the PP and P d distributions are
different (p ! 0:0001), to interpret whether or not this
is really a meaningful difference, consider a query that
has 75 relevant documents (the median for a TREC5
query). Then a difference of 0.009 in Pmeans that only
one or fewer more relevant documents are returned. It
is also interesting to note that there are a significant
number of combinations where training on d is better
than on P (differences less than zero).
Table
3 gives some idea as to the amount of improvement
gained by using the LC model. As noted
previously, the LC model is not always capable of
improving over the two component systems. Of the
91500 pair/query triples, 80324 (88%) saw improvement
on the training set over both of the component
systems when trained using P. Of those 80324, 32493
(36% of the total) also saw improvementon the test set.
The table also shows that over the 80324 combinations
which saw improvement on the training set, the average
degradation on the test set over the better of the two
component systems was 14%, a significant drop. The
fact that the LC model tends to degrade performance
for most pairs of systems should not be surprising -
recall the results of the previous section, which indicate
that the LC model should only be used in certain
situations. Apparently, training using d allows better
discrimination of when these situations arise. While
training on d results in fewer systems which see improvement
on the training set, it allows for much better
generalization when those weights are used on the test
data - in fact, it allows for an improvement in most
cases!
4.3. Training a Model for the Adhoc Problem
All of our analysis thus far has focused on the routing
problem. One can certainly argue that the adhoc
problem, where new queries are constantly being submitted
to the IR system, is also an important problem,
especially for the World Wide Web. The following
experiments explore this aspect of IR.
4.3.1. Method For the routing case we were able to
examine the full set of all the TREC5 queries. How-
ever, for the adhoc problem, we reduce the space of
Fusion Via a Linear Combination of Scores 1750001500025000-1 -0.8 -0.6 -0.4 -0.2 0
Fig. 5. Histogram of PP \Gamma P d on the Routing Test Set for 91500 TREC5 Combinations.
Table
3. Training Results for Routing
Training Test Combos Avg Degradation or
Method Improved Improved Improvement on Test
d 37661 (41%) 21028 (23%) +15%
Number of pair/query triples (out of 91500) which achieved better performance (as measured by P) than both component systems on the routing
problem. Average improvement on the test set is over all combinations counted in the first column.
combinations by only examining three subsets of the
total 61 systems. The first subset, labeled "chorus",
consists of 10 systems (see Table 4). These systems
were chosen because many of the 45 possible pairings
have a high overlap of relevant documents and low
overlap of nonrelevant documents, and thus are theoretically
able to exploit the linear combination model.
The second subset, labeled "diverse," was chosen to
maximize the differences between the systems in the
Table
4. Subsets Used in Adhoc Experiments
Subset Systems
chorus KUSG2 KUSG3 anu5man4 anu5man6 gmu96ma1
diverse CLTHES DCU961 anu5aut1 anu5man6 brkly17
random CLCLUS Cor5M2rf DCU961 ETHas1 ETHme1
subset. These differences were simply the average of
all the pairwise measures used our empirical analysis
above after they had all been normalized to z-scores.
Recall that these pairwise measures included the correlation
of scores, similarity of rank order as measured
by Guttman's point alienation statistic, and the size
of the intersection of the documents returned by both
systems. The third subset of ten systems was chosen
randomly from the 61 entries.
For each subset and each of the possible 45 pairs of
systems from that subset, w was chosen using golden
section search to maximize either -
d (P or d when
averaged over 35 randomly chosen queries). We then
tested each of the trained combinations on the 13 of the
remaining queries, evaluating each combination using
P.
4.3.2. Results and Discussion Once again, we use
d on the test set as our comparison metric.
Figure
6 displays histograms of this difference for the
chorus and random subsets (the diverse histogram is
similar to the one for chorus). The average difference
for the chorus subset is 0.012, diverse is 0.011, and
random is 0.006. This means that on average, training
using -
d gives worse generalization when -
P is the
measure of performance, just the opposite effect as
observed for routing. Once again, although these differences
are statistically significant, it is doubtful that
they are practically different.
Table
5 confirms that training the adhoc problem
using -
P is better than using -
d, since more pairs of
systems are able to successfully generalize and overall
degradation is less, although the difference is slight.
The table also confirms the hypothesis that adhoc is
harder to train than routing, since on average, there is a
degradation in performance. However, for a significant
number of combinations (16% or 23%) there was an
improvement. In future work, we would like to apply
techniques similar to those we used in our empirical
work for routing in order to predict when improvement
is achievable for the adhoc task.
5. Conclusions
Our analysis of the linear combination of scores fusion
model has revealed a number of important points.
The LC model has severe limitations, both in scope
and power. Its effective use is limited to situations
where the systems involved have high overlap of rel-
Fusion Via a Linear Combination of Scores 1951525
Fig. 6. Histogram of -
d on the Adhoc Test Set for the chorus (left) and random (right) subsets
Table
5. Training Results for Adhoc
Training Test Combos Avg Degradation
Subset Method Improved Improved on Test
chorus -
diverse -
random -
Total/average
chorus -
d 19 (42%) 5 (11%) -15%
diverse -
d
random -
d
Total/average 61 (45%) 21 (16%) -10%
Number of system pairs (out of 45) which achieved better performance (as measured by -
P) than both component systems on the adhoc problem.
Average degradation on the test set is over all combinations counted in the first column.
evant documents and low overlap of nonrelevant doc-
uments. Luckily, we have also developed a technique
which can very accurately (r predict when
improvement is possible for the routing problem.
Our analysis has also revealed several advantages
and disadvantages to using d as a performance crite-
20 Vogt and Cottrell
rion. Despite the facts that it fails to take into account
recall, and its correlation with average precision
is weak, its simple algebraic form has allowed us to
mathematically support conclusions about the model
which previously were only empirically based, and to
derive theoretically optimal weightings for pairs of IR
systems. Furthermore, when used as an optimization
criterion for the routing problem, d selects weights
which generalize much better than those chosen by
optimizing average precision, resulting in an average
improvement of 15% versus an average degradation of
14% when training average precision directly. Further-
more, on the adhoc problem, training d works about
as well as training average precision. Because d is
also differentiable and cheap to calculate, it is also a
likely candidate for use in gradient based optimization
procedures, which will be necessary for combinations
of more than two systems or for other parameterized
models (e.g., neural nets).
--R
Automatic combination of multiple ranked retrieval sys- tems
Combining evidence of multiple query representations for information retrieval.
A neural network model for documentary base self-organising and querying
Comparing neural and probabilistic relevance feedback in an interactive information retrieval system.
Indexing by latent semantic analysis.
Information retrieval using dynamic evidence combination.
The Third Text REtrieval Conference (TREC-3)
The Fifth Text REtrieval Conference (TREC-5)
Decision level data fusion for routing of documents in the TREC3 context: A best case analysis of worst case results.
SIGIR 93:
Analyses of multiple evidence com- bination
Numerical Recipes in C: The Art of Scientific Computing.
Combination of multiple searches.
Signal detection theory and ROC Analysis in Psychology and Diagnostics.
Information Re- trieval
Computation of term associations by a neural network.
--TR
--CTR
Javed A. Aslam , Mark Montague, Bayes optimal metasearch: a probabilistic model for combining the results of multiple retrieval systems (poster session), Proceedings of the 23rd annual international ACM SIGIR conference on Research and development in information retrieval, p.379-381, July 24-28, 2000, Athens, Greece
Elmrio Gomes Dutra, Jr. , Jose Valdeni de Lima, Supplement of partial ranks to the data fusion, Proceedings of the 12th Brazilian symposium on Multimedia and the web, November 19-22, 2006, Natal, Rio Grande do Norte, Brazil
Shengli Wu , Fabio Crestani, Methods for ranking information retrieval systems without relevance judgments, Proceedings of the ACM symposium on Applied computing, March 09-12, 2003, Melbourne, Florida
Anselm Spoerri, Using the structure of overlap between search results to rank retrieval systems without relevance judgments, Information Processing and Management: an International Journal, v.43 n.4, p.1059-1070, July, 2007
Holger Billhardt , Daniel Borrajo , Vctor Maojo, Using genetic algorithms to find suboptimal retrieval expert combinations, Proceedings of the 2002 ACM symposium on Applied computing, March 11-14, 2002, Madrid, Spain
Eui-Hong Han , George Karypis , Doug Mewhort , Keith Hatchard, Intelligent metasearch engine for knowledge management, Proceedings of the twelfth international conference on Information and knowledge management, November 03-08, 2003, New Orleans, LA, USA
M. Elena Renda , Umberto Straccia, Web metasearch: rank vs. score based rank aggregation methods, Proceedings of the ACM symposium on Applied computing, March 09-12, 2003, Melbourne, Florida
David Lillis , Fergus Toolan , Rem Collier , John Dunnion, Probabilistic data fusion on a large document collection, Artificial Intelligence Review, v.26 n.1-2, p.23-34, October 2006
Shengli Wu , Fabio Crestani, Shadow document methods of resutls merging, Proceedings of the 2004 ACM symposium on Applied computing, March 14-17, 2004, Nicosia, Cyprus
Paul Ogilvie , Jamie Callan, Combining document representations for known-item search, Proceedings of the 26th annual international ACM SIGIR conference on Research and development in informaion retrieval, July 28-August 01, 2003, Toronto, Canada
Holger Billhardt , Daniel Borrajo , Victor Maojo, Learning retrieval expert combinations with genetic algorithms, International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, v.11 n.1, p.87-113, February
Kui Lam Kwok , Sora Choi , Norbert Dinstl, Rich results from poor resources: NTCIR-4 monolingual and cross-lingual retrieval of korean texts using chinese and english, ACM Transactions on Asian Language Information Processing (TALIP), v.4 n.2, p.136-162, June 2005
Dmitri Roussinov , Weiguo Fan, Discretization based learning approach to information retrieval, Proceedings of the conference on Human Language Technology and Empirical Methods in Natural Language Processing, p.153-160, October 06-08, 2005, Vancouver, British Columbia, Canada
Sally McClean, Performance prediction of data fusion for information retrieval, Information Processing and Management: an International Journal, v.42 n.4, p.899-915, July 2006
David Lillis , Fergus Toolan , Rem Collier , John Dunnion, ProbFuse: a probabilistic approach to data fusion, Proceedings of the 29th annual international ACM SIGIR conference on Research and development in information retrieval, August 06-11, 2006, Seattle, Washington, USA
Kui-Lam Kwok , Laszlo Grunfeld , Peter Deng, Employing web mining and data fusion to improve weak ad hoc retrieval, Information Processing and Management: an International Journal, v.43 n.2, p.406-419, March 2007
Mark Montague , Javed A. Aslam, Relevance score normalization for metasearch, Proceedings of the tenth international conference on Information and knowledge management, October 05-10, 2001, Atlanta, Georgia, USA
B. Uygar Oztekin , George Karypis , Vipin Kumar, Expert agreement and content based reranking in a meta search environment using Mearf, Proceedings of the 11th international conference on World Wide Web, May 07-11, 2002, Honolulu, Hawaii, USA
D. Lillis , F. Toolan , A. Mur , L. Peng , R. Collier , J. Dunnion, Probability-based fusion of information retrieval result sets, Artificial Intelligence Review, v.25 n.1-2, p.179-191, April 2006
D. Frank Hsu , Isak Taksa, Comparing Rank and Score Combination Methods for Data Fusion in Information Retrieval, Information Retrieval, v.8 n.3, p.449-480, May 2005
Yu-Ting Liu , Tie-Yan Liu , Tao Qin , Zhi-Ming Ma , Hang Li, Supervised rank aggregation, Proceedings of the 16th international conference on World Wide Web, May 08-12, 2007, Banff, Alberta, Canada
Steven M. Beitzel , Eric C. Jensen , Abdur Chowdhury , David Grossman , Ophir Frieder , Nazli Goharian, Fusion of effective retrieval strategies in the same information retrieval system, Journal of the American Society for Information Science and Technology, v.55 n.10, p.859-868, August 2004
Weiguo Fan , Ming Luo , Li Wang , Wensi Xi , Edward A. Fox, Tuning before feedback: combining ranking discovery and blind feedback for robust retrieval, Proceedings of the 27th annual international ACM SIGIR conference on Research and development in information retrieval, July 25-29, 2004, Sheffield, United Kingdom
Fabio Crestani , Shengli Wu, Testing the cluster hypothesis in distributed information retrieval, Information Processing and Management: an International Journal, v.42 n.5, p.1137-1150, September 2006
Weiguo Fan , Michael D. Gordon , Praveen Pathak, A generic ranking function discovery framework by genetic programming for information retrieval, Information Processing and Management: an International Journal, v.40 n.4, p.587-602, May 2004
Javed A. Aslam , Mark Montague, Models for metasearch, Proceedings of the 24th annual international ACM SIGIR conference on Research and development in information retrieval, p.276-284, September 2001, New Orleans, Louisiana, United States
Sally McClean, Result merging methods in distributed information retrieval with overlapping databases, Information Retrieval, v.10 n.3, p.297-319, June 2007
Cai-Nicolas Ziegler , Sean M. McNee , Joseph A. Konstan , Georg Lausen, Improving recommendation lists through topic diversification, Proceedings of the 14th international conference on World Wide Web, May 10-14, 2005, Chiba, Japan
Sally McClean, Improving high accuracy retrieval by eliminating the uneven correlation effect in data fusion, Journal of the American Society for Information Science and Technology, v.57 n.14, p.1962-1973, December 2006
Mark Montague , Javed A. Aslam, Condorcet fusion for improved retrieval, Proceedings of the eleventh international conference on Information and knowledge management, November 04-09, 2002, McLean, Virginia, USA
Weiguo Fan , Michael Gordon , Praveen Pathak, On linear mixture of expert approaches to information retrieval, Decision Support Systems, v.42 n.2, p.975-987, November 2006
Wai-Kit Lo , Helen Meng , P. C. Ching, Cross-language spoken document retrieval using HMM-based retrieval model with multi-scale fusion, ACM Transactions on Asian Language Information Processing (TALIP), v.2 n.1, p.1-26, March
Jacques Savoy, Comparative study of monolingual and multilingual search models for use with asian languages, ACM Transactions on Asian Language Information Processing (TALIP), v.4 n.2, p.163-189, June 2005
Weiyi Meng , Clement Yu , King-Lup Liu, Building efficient and effective metasearch engines, ACM Computing Surveys (CSUR), v.34 n.1, p.48-89, March 2002 | routing;fusion;performance evaluation;neural networks;linear combination |
593983 | Simple Bayesian Model for Bitmap Compression. | Bitmaps are a useful, but storage voracious, component of many information retrieval systems. Earlier efforts to compress bitmaps were based on models of bit generation, particularly Markov models. While these permitted considerable reduction in storage, the short memory of Markov models may limit their compression efficiency. In this paper we accept the state orientation of Markov models, but introduce a Bayesian approach to assess the state; the analysis is based on data accumulating in a growing window. The paper describes the details of the probabilistic assumptions governing the Bayesian analysis, as well as the protocol for controlling the window that receives the data. We find slight improvement over the best performing strictly Markov models. | Introduction
This paper continues a series of papers (Bookstein et al. 1992, 1994, 1997) that
apply advanced statistical models to compress bitmaps. The earliest models assumed
that the 1-bits of a bitmap occur independently (Bookstein et al. 1992).
In several environments, however, the independence assumption is not valid. For
example, consider a concordance built to allow access to a large textual database.
In the concordance, each term occurring in the text is associated with a bitmap,
and each bit-site to a region of the text obtained by partitioning the text into
logically coherent units. The bitmap representing a term has a 1-bit at the positions
where the corresponding segment contains the word. Within the text, discussions
of specific subjects are clustered, and this imposes a clustering tendency on the
1-bits within the bitmaps belonging to the terms associated with these subjects.
Since bit encoding is determined by the probability of its having a given value (for
example, using arithmetic coding (Witten et al. 1994)), we expect more accurate
modeling to result in improved compression. In this paper we focus on the problem
of modeling the clustering rather than on the details of generating codewords.
Our first attempts to represent this clustering involved the use of a variety of
Markov Models (Feller 1957). Although significant improvement resulted from using
even simple Markov models with a small number of states (Bookstein et al. 1997),
ultimately we were limited by the finite memory of such models. We now test an
alternative approach, based on the principles of Bayesian statistical analysis (Press
1989), that may correct for this limitation. We continue with the assumption made
in our earlier papers that bits are generated within two states, a cluster state,
which tends to produce a high density of 1-bits, and a between-cluster state, which
produces 1-bits more sparingly. However, we no longer model the state transitions.
Instead, we use Bayesian reasoning to assess the likelihood of being in either state,
given the data. The data is gathered within a growing window, which is closed
when we decide a state transition was likely. The probability of the next bit taking
Simple Bayesian model for bitmap compression 3
a value is determined by the data currently in the window, and the bit encoded
accordingly.
In the next section we describe, in general, the model on which the remainder
of the paper is based. We illustrate these ideas by means of a simple version of the
Bayesian model, which we then elaborate. In subsequent sections we describe the
protocol used to control the window in which data is collected, as well as describe
the experiments used to test the models.
2 . Bayesian Modeling
We conceptualize a bitmap of length D bits as having been generated in a manner
similar to that of the hidden Markov model described in Rabiner (1989). At any
site in the bitmap, the generator is assumed to be in one of two states: a cluster
state C or a between-cluster state B. These states determine the probability of
generating a 1-bit. We diverge from the Markov assumption by no longer modeling
state transitions. Rather, we collect data as we scan the bitmap, and use the data
to guess the probability of being in either state, and hence the probability of a 1-bit
being generated.
Our overall strategy is to encode bits using a dynamic window to accumulate the
data. We begin with a window that contains zero bits. As we scan, and encode, bits,
the window grows. As we accumulate data in a window, we use Bayesian methods
to improve our estimate of the probability of a 1-bit being generated. If at any point
we sense a state change, we close the window and begin the process anew.
Suppose then that we are just opening a window. Taking a Bayesian approach,
we try to determine the probability distribution of the parameter governing data
generation within the window. The parameter here is p, the probability of a 1-
bit. We do this by starting with a prior distribution for p, based on not having
4 Bookstein, Klein and Raita
any information, and then improve the distribution as the window grows and more
information accrues.
In this problem, the uncertainty in p before developing the window is primarily
the result of our not knowing which state we are in, though also, possibly, each
state may allow a range of probabilities. Most generally, we assume that in the
cluster state C, the distribution of probabilities is given by f C (p), and that the
corresponding distribution in the between-cluster state is denoted by f B (p). We
further assume that ' is the a priori probability of being in a cluster state.
When we begin a new window, we have no data on which to base our esti-
mate, and use the prior, unconditional, distribution of p, P 0 (p). Given the above
assumptions, we have:
As we accumulate data in the current window, we want to integrate the information
it contains to improve our estimate of P 0 (p). We denote this density function
by P (pjW ), indicating that the density function incorporates information about
the window W we are scanning. To derive the updated distribution, we use Bayes'
formula to get,
But the probability of the occurrence of a certain window, for a fixed p, is simply
are, respectively, the number of 1's and the number of zeros in
W , which now contains N 0 +N 1 values.
We can now estimate the probability of a 1-bit, given the evidence W in the
R
integral is simply, -
p, the expected value of p, conditional on the evidence in W :
Simple Bayesian model for bitmap compression 5
To proceed, we have to specify the state based distributions. Below we consider
two models of increasing complexity.
2.1. Sharp probability distribution
In the simple first model, we assume that the probability is fully determined by the
state; that is, we let p C be the probability of seeing a 1 while in a cluster, and p B
the probability of seeing a 1 while between clusters. Note this allows us to see 1's
even if not in the cluster state, and vice versa. Since the probability is determined
by the state, we have
and
Here ffi(x) is the Dirac ffi-function, defined as 0 everywhere but whose
integral satisfies,
Z
In other words, ffi(p \Gamma p C ) is a probability distribution that asserts that
equation 1, the prior, unconditional, distribution of p, is given by,
which is a mixture of two Dirac ffi-functions.
As we develop the current window, we want to integrate the data it contains,
as prescribed by equation 2. We now apply equation 4 to evaluate -
p, the expected
6 Bookstein, Klein and Raita
value of the posterior distribution P (p j W
R 1['
R 1['
Special values
As a check on the reasonableness of the model, it is useful to examine several
limiting values.
For example, if
in such cases,
the state is known, and the formula gives the appropriate probability of producing
a 1-bit.
We also find that if, as the window grows, the value of N 1 increases indefinitely
while the value of N 0 remains fixed, then (assuming
That is, as
grows relative to N 0 , the evidence becomes increasingly strong that we are in
the C state, and the appropriate probability is approached.
Next we find that if
While initially surprising, a little
thought shows this result is correct. First note that p N 1
, and hence -
p, is undefined
we must be in
a cluster state, the only state that permits a 1-bit. Similarly, if p
p is defined
only if N 0 ? 0; but then we must be in a between-cluster state, requiring -
p to be
as is indeed the case. Similar comments could be made for the cases
but these are unrealistic given what these probabilities represent.
Finally, if
That is, there is in effect a single state,
and the probability of a 1 being generated is the common probability.
Simple Bayesian model for bitmap compression 7
2.2. Beta-Distributed Model
If we relax the requirement that the state completely determines the probability
parameter, we can create much more flexible models; doing this transcends in
principle the Hidden Markov Model (HMM) used in our earlier papers. In the model
we now examine, we still conceptualize the generator as being in one of two states.
The state now influences, but doesn't fully determine, the probability of generating
a 1-bit. We gain this additional flexibility by admitting as probability distributions,
density functions f C (p) and f B (p) with some dispersion.
The beta-distribution (Johnson et al. 1970) offers a class of models that allows
a great deal of flexibility in controlling the shape of the distribution, while at the
same time being relatively convenient analytically. We include this model as an
example of how the Bayes approach allows us to reach well beyond the Markov
framework: we now recognize the possibility that not all clusters are identical, and
that in some clusters, the probability of a one-bit is greater than in others. A similar
comment could be made for the non-cluster state, although a hybrid model, using a
beta-model for the cluster state and a delta-function for the between-cluster state,
is possible.
In the beta-distributed model we assume, for parameters ff C ? 0 and fi C ? 0
where,
a parallel distribution defines f B (p; ff (Note that here the factorial operator,
for non-integer values of its argument, is defined in the usual way in terms of the
Substituting the beta-functions for f C and f B in equation 4, we find after integration
8 Bookstein, Klein and Raita
The result is analytically complex, and must be evaluated numerically. We must
adjust the parameters, ff C , ff B , fi C , fi B and ' to optimize compression efficiency.
However, it is easier to interpret the values of these parameters if we note that
the expected value of the Beta-distribution is given by (suppressing the subscripts
on the ff, fi parameters) E(p) j -
fi), and the variance by V
reminiscent of the binomial distribution, with
ff successes, fi failures, but M j ff tries. It is in terms of -
and M that the
model is most understandingly parameterized, the former indicating the probability
of a 1-bit, the latter, our confidence in the parameter. That is, for large M , our
model approaches the sharp model described above. Thus, the parameter -
a role parallel to that of p C for the sharp distribution, and similarly for -
Experiments will indicate whether the benefit of flexible probabilities within and
between clusters justify the extra effort and the need for an extra two parameters.
3 . Window Dynamics
In the preceding section, we have assumed we are in a region where the state is
fixed, but that we do not know what the state is. The parameters ' and the beta-
distribution parameters allow us to make an information free guess of the likelihood
of being in either state, and thereby the probability of the next bit taking the value
0 or 1. We then modify the probability estimate in accordance with the accretion
of data as the window grows. In the preceding section, we indicated how to use the
data within a window to estimate the probability of a 1-bit being generated. But as
the bitmap is generated, we are shifting between states. To take this into account,
Simple Bayesian model for bitmap compression 9
we must use a protocol that defines how the window grows and when it should be
closed.
We begin with a window of size 0, and with the initial probability estimate
of eqn 1. Then, as bits are scanned, we upgrade the probability. In principle, we
should let the window grow indefinitely. But doing so would put us at a severe
disadvantage when the state changes. Thus we introduce a parameter, W max , and
when the window-size reaches W max we stop growing the window. That is, at this
point we begin shifting the window, dropping bits at the end while introducing bits
at the front. In practice, a finite W max limits the size of the codeword when a bit
inconsistent with the current state is scanned; we choose a value that optimizes
performance during compression.
But if at some site an unexpected bit value (or two) is scanned, it suggests that
the state may have changed and that the estimate of probabilities should begin
again - that is, that the old window may no longer be informative. At this point
the old window is closed, and a new one is grown. It may be possible to estimate
W max and the start-over point theoretically.
The ideal way to assess the predictive power of the current window would be to
actually look ahead and evaluate how well we are able to compress the next several
bits (that is, the bits following those already in the window), given the information
within the window. (The performance expected if the probability prediction
mechanism is valid could be computed using information theoretic arguments as
discussed in Cover et al. (1991) and Hamming (1980).) If the performance is less
than expected, then it indicates we should close the window and begin again.
However, the decoder would not be able to follow the same decision procedure,
because it does not know the next, incoming bits. This situation is inherent to
many adaptive processes (see, e.g. Vitter (1987) and Welch (1984)), and requires
that we use a less efficient, delayed update strategy.
The method we adopted is to simulate this strategy retrospectively: after each bit
has been encoded, it is appended to the window W and we run a consistency check
Next bit to
be encoded
Tail T
History bits
(do not have an effect
on the representation
of the unencoded bits)Full window
Figure
1. Schema of window structure.
of the bits recently encoded. We backtrack, in turn, one, two,
the maximum number of bits we can backtrack, is a parameter of our model. Every
time we backtrack, we ask whether the bits being reviewed are more consistent with
the current window than they are with a new window. If the reviewed bits pass this
test for each backtracking step, then we continue, encoding the following bit as an
extension of the current window. Otherwise we start a new window. Though the
reviewed bits for which the model retrospectively fails have already been encoded
as if they were part of the preceding window (which is necessary for the decoder),
they are considered as data for the new window. For example, if the first window is
closed on the basis of its being inconsistent with the last three bits, those bits act
as information for the new window when the next bit is encoded.
We now describe our decision rule for opening a new window. For the purpose
of this calculation, after backtracking, we consider the (retrospectively) "current"
window, now called to contain the data up to the point the backtracked data
begins; we treat the backtracked data, T , at the tail of the current window as "new"
data, available to both the encoder and decoder. This is illustrated is Figure 1.
We examine the data in W 1 , and consider whether, with hindsight, we should
have continued extending W 1 , or begun a new window, W 2 . Suppose, looking for-
ward, we see T consists of n 1-bits and m 0-bits. On the basis of W 1 we estimate
a probability -
while the corresponding probability for W 2 is -
. For
Simple Bayesian model for bitmap compression 11
simplicity, we consider these probabilities to be unchanged as we see successively
the bits of T .
We can now use the standard Bayesian argument to estimate the probabilities
of W 1 or W 2 being the correct window, given that T follows, where one of the two
windows is assumed to be correct. The probability that W 1 is correct is given by:
the probability for W i . Thus the odds in favor of a new window, P (W 2 )=P (W 1 )
is given by
Equation 7, which expresses the evidence infavor of a new window in terms of
an odds ratio, can be used directly if the !'s can be properly assessed. This can be
tricky. But notice that the !'s are fixed, and the evidence actually influenced by
T is fully expressed by the other two factors. Thus we can empirically determine
a threshold, and change the window provided the product of the two right-hand
factors exceeds this threshold.
It is instructive to rewrite equation 7 as:
Note that the value n+m, which is just the number of bits observed while looking
ahead, is fixed. Only the term in the brackets actually depends on the evidence,
and this, in isolation, can serve as a measure of how strong is the claim to start a
new window. The factor
is the value of the odds favoring a
new window, provided all the bits being tested are zero. Suppose this would result
in one of the windows, say W being selected. Each 1-bit then modifies this by
a factor of the odds ratio (-p 2
collectively this doesn't
compensate for the initial weight, we use W i , else we use the other window.
To estimate p 1 we used the last probability estimate made from the evidence in
before the new evidence was evaluated. A few reasonable options are available
for estimating p 2 . For example, we can use the a priori probability, to assess whether
the evidence in the window is at this point any better than no evidence at all. An
opposite bias can be obtained by estimating p 2 from the actual evidence itself, to
see if this high-value estimate is sufficiently larger than that based on W 1 to justify
opening a new window.
In principle, the window update procedure could be applied recursively to the
resulting tail T , perhaps allowing an even better (and shorter) basis for estimating
the probabilities of the upcoming bits. However, since we restricted the length of T
just to 6 bits at most, the recursive procedure was not applied in the experiments.
We next illustrate the window update protocol by an example. Suppose we just
encoded bit b 511 , and that W now consists of bits b 500 . Next we must
test for the goodness of the window. We do this in stages:
First stage: For our first consistency check, W 1 will consist of bits b 500
and T of the single bit, b 511 . On the basis of W 1 , we compute -
of a 1-bit, given W 1 , and the size of the codeword for b 511 . Get the corresponding
quantity for an empty window, and call it -
Evidence for closing the window is
given by -
else it is given by
This is equation 7,
ignoring the !'s. We close the window if the ratio is larger than some threshold
value fl, beginning a new window with b 511 . If the ratio is smaller than fl, we go to
next stage.
Second stage: First we backtrack, redefining W 1 as b 500
the probability of a 1-bit, given the reconstituted W
again is the probability of a 1-bit given the empty window. We now use equation 7
to get the weight for a new window, based upon the evidence of T . If the evidence is
large enough, we close the current window, and repeat the process beginning with
Simple Bayesian model for bitmap compression 13
the window consisting of bits b 510 ; b 511 . Else we continue with the third stage (which
we suppose, for this example, to be the last).
Stage three: We now compute -
p 1 on basis of the new W
assuming the null window. We then compute the weight favoring a new window
based on the evidence of the new T , consisting of the bit sequence b 509
as given by equation 7. If the weight supports opening a new window, we close
the current window, and begin the cycle again starting with the window made
up of bits b 509 ; b 510 ; b 511 . Else we accept the old window, make bits b 501 511 the
current window, and continue. If additional stages are desired, we continue as above.
Figure
2. Example of window development.
An actual detailed example of window development, taken from the experiment
described below, appears as Figure 2. The numbers on top of the figure denote
bit positions of the specific bitmap we are studying and the actual bits are shown
beneath. The maximal length of the window, W max , is set to 10 and the figure
depicts the window dynamics during the encoding of bits At the start,
the window contains the 1-bits at indices This run of 1-bits gives a high
probability for the upcoming 1-bit at index 111. The bit is encoded and inserted
into the window. In the update procedure, we notice that the window W 1 is always
a better predictor for the corresponding tail T than an empty window, so only one
14 Bookstein, Klein and Raita
change is made: we discard the oldest bit from the window to prevent an overflow.
For the next two bits at indices 112 and 113, the same is repeated. When the 0-bit at
index 114 has been encoded, we note that the threshold value used in the consistency
check allows one spurious bit inside a run of 1-bits, so again, only the oldest bit is
discarded. However, the next 0-bit gives already enough evidence about the end of
the run of ones. This is noticed at stage two of the update process: the eight 1-bits
in W 1 are not consistent with the pair of zeroes in the tail T , so we open a new
window and initialize it with the contents of T . In this way, the update procedure
captures the essential features of the bit sequence: if there are only a few 0-bits in
a 1-bit cluster (or vice versa), we are satisfied with it, since the overall tendency
is clear. Also, when we are scanning a truly heterogeneous bitmap region, there is
no reason to change the window radically (see e.g. the situation when the encoding
of the bit at index 144 commences). This implies that the change of the state is
performed only when necessary, i.e. at the boundaries where the characteristics of
the bit string change considerably.
4 . Experiments
In order to compare the new technique with previous methods, we used the same
test databases as in our earlier papers, namely: the King James Version of the
Bible in English (its chapters acting as documents); and a subset of the
Tr'esor de la Langue Fran-caise (TLF). The TLF is a database of 680 MB of French
language texts (112 million words) of the 17 th -20 th centuries (see Bookstein et al.
(1992) for more details of the collection), whose uncompressed concordance spans
about 345 MB (excluding references to the 100 most frequent words, considered
as stop-words). The subset used in this study consisted of the the 35070 terms
belonging to the (lexicographic) range between elle and flaube.
The models we are developing are intended for terms that show a considerable
degree of clustering. But clustering strength is determined both by the nature of the
Simple Bayesian model for bitmap compression 15
word and the choice of what we define as a document, which is represented as a single
bit in our bitmaps. In our investigation of the TLF, we chose as the document the
level immediately below the "book" level in the TLF hierarchy, resulting in bitmaps
of length bits. The chosen unit is convenient for the construction of the
concordance, but may obscure some of the underlying clustering because of its large
size.
Our first task is to estimate the parameters which give the best compression,
that is, which minimize the function \Gamma
log -
We here use the fact that we
can encode a bit with log -
the encoding is based on -
being the probability
that the i-th bit of the bitmap takes the value it does; this probability is determined
by the evidence in the window.
Performing this minimization analytically is hard, so we reverted to search methods
that may yield sub-optimal parameter values. The parameters divide into two
sets: the model parameters (', p B , and p C for the sharp model); and three window
parameters: the maximum window size W max , the maximal backtracking length b
in the update process, and the threshold fl that controls when we should restart
the window. For the Beta-model, we need
. (Recall that the
ff's and fi's of the Beta distribution can be expressed in terms of the -
p's and M 's
in a straightforward way.)
To simplify our task of finding optimal values for our parameters, we note that,
is the number of 1-bits in the map, the sharp model requires that:
yielding as the value for
For the Beta-model, there is no fixed probability for bit generation, but we can use
the above formula, with (-p
substituted for (p C as an initial estimate of '.
It reasonable to expect that n 1 =D, the frequency of occurrence of 1-bits, satisfies
the constraint -
implies that 0 - 1.
For each set of terms tested, we chose manually several combinations of parameter
values obeying the restrictions above, and then searched for local optima. The
large number of optimization runs performed showed, that the overall shape of the
function is 'rippling' and with high probability, it does not have large minima or
maxima. Due to this, we can safely fix most of the input parameters without a
notable loss in compression efficiency. Some tuning may be appropriate, however,
if the 1-bit densities or clumping properties change considerably from bitmap to
bitmap.
Table
descriptive statistics for the tested files and summarizes the compression
performance of the various models tested. For the Bible, only words appearing
in at least 60 chapters, and thus occurring in between 60 and 929 chapters,
were considered; for TLF, the terms (bitmaps) were partitioned into three classes
according to the density of 1-bits. The threshold values were 78, 388 and 1162.
Table
I. Statistics and compression results
Bible TLF
terms 623 2032 619 381
occurrences 131874 352522 402890 1387698
independent 2.683 9.09 7.26 4.02
best 4-state 2.544 8.48 6.65 3.48
Bayes-Beta 2.523 8.38 6.55 3.42
Bayes-Sharp 2.556 8.44 6.65 3.52
Simple Bayesian model for bitmap compression 17
The upper part of Table 1 shows, for each class, the number of different terms,
and their total number of occurrences. The lines of the lower part correspond
to various bitmap compression methods. The independence model is the 1-state
Markov model used in Bookstein et al. (1992); this is a very simple model that
does not take clustering into account and therefore performs relatively poorly. In
Bookstein et al. (1997) we studied the performance of different Markov models; the
values cited here correspond to choosing, for each class, the model giving the best
compression among all traditional 4-state Markov models. The line entitled HMM
gives the compression figures of Bookstein et al. (1997) for the hidden Markov
model. The omission of a HMM result is due to the enormous execution time needed
for the run to produce this figure. The last lines correspond to the Bayesian models
described herein.
To understand the values in the table, recall that we are representing the top
level of the concordance as follows: for each term, we list sequentially the documents
in which the term occurs. This list can be conceptualized as a bitmap, D bits in
length, with a 1-bit for each document in which the term occurs. As our measure
of compression for the list corresponding to a term, we compute the number of bits
needed to encode this list with our methods, and divide this value by the number
of documents in which the term occurs. The table gives the average of this quantity
for all the terms in a class. In other words, it is the average, per 1-bit within an
uncompressed bitmap, of the number of bits needed to encode the 1-bits of all the
bitmaps in this class.
As in our earlier studies (Bookstein et al. (1997)), we have not included the cost
of storing the necessary parameters, which is negligible in most of the cases. Since
it seems that varying W max and the threshold value fl does not have a large effect
on the results, they were fixed throughout the experiments, leaving only three or
five parameters for the sharp and Beta models, respectively, as compared to four
parameters for each of the HMM and 4-state models. Since only the high frequency
terms are to be compressed, the average number, per term occurrence, of added
bits caused by this overhead, is very small.
The parameter values -
define the
generating model. For about 45% of the bitmaps we were able to set ' equal to
zero, implying that a single beta-distribution suffices for the majority of terms.
Note, however, that this does not invalidate an underlying multi-state generating
process. Rather, the intrinsic variability of the beta-distribution seems adequate to
represent the impact of the various states.
For the other 55% of the terms, it was useful to incorporate the services of a
second beta-distribution. However, for both the cluster and between cluster distri-
butions, the probability of a 1-bit was low: the average value for -
0.144. The average standard deviations were 0.010 and 0.096, respectively. Thus,
for these cases, the spread was comparable to the size of the values themselves.
As can be seen, in all our tests, the Bayesian model outperformed the best
4-state models by 1-2%. Surprisingly, the new approach even improved upon the
compression obtained by the highly CPU-intensive HMM model in one of the cases.
We thus conclude that the Bayesian technique described in this paper gives a good
time/space tradeoff, compressing better than the faster 4-state models, and using
significantly less processing time than the HMM.
5 . Conclusion
Bitmaps can be very convenient when representing concordances. But in realistic
applications, they are large, and storing them is expensive. The simplest techniques
for compressing bitmaps, based on models that represent bitmap generation as a
sequence of independent events, in fact work quite well. But when dealing with
large databases, even a small percent improvement in cost can yield large absolute
benefits. Our investigations were directed to those applications for which the size
of the database justifies the additional complexity.
Simple Bayesian model for bitmap compression 19
As is typical in the design of optimal systems, we found that added complexity
tends to improve overall performance, but with each increment in complexity yielding
diminishing returns. For example, the best 4-state models in fact come quite
close to the performance of the Hidden Markov Models, which are very flexible, and
very expensive, models that we considered as a bound on our ability to improve
performance using the route of simple probabilistic models.
In this paper, we were interested in assessing whether alternatives to Markov
modeling, that relieved the constraint of the Markov model's short memory, could
match or improve performance. We used an underlying state model, but applied
Bayesian reasoning, rather than Markov transition probabilities, to assess the state.
Our results were comparable to that of the HMM, and at comparably little cost.
The convergence towards the performance of the HMM, and the agreement of two
rather different approaches on two very different databases, leads us to expect that
striking compression improvement is unlikely without a radical increase in model
complexity. However, we examined only one application - that of representing the
concordance of a textual database. Other applications, in which clustering is more
pronounced, may lead to quite different results, and for which the variety of models
we developed could be more strongly differentiated.
6 .
--R
Model based concordance compression.
In: Storer J.
Markov models for clusters in concordance compression.
A systematic approach to compressing a full text retrieval system.
Elements of Information Theory.
An Introduction to Probability Theory and Its Applications
Coding and Information Theory.
Distributions in Statistics: Continuous Univeriate Distributions-2
Exploiting Clustering in Inverted File Compres- sion
Bayesian statistics
A tutorial on hidden Markov models and selected applications in speech recognition.
Design and analysis of dynamic Huffman codes.
A technique for high performance data compression.
Managing Gigabytes
Address for Offprints: Timo Raita Dept.
--TR
--CTR
Justin Zobel , Alistair Moffat, Inverted files for text search engines, ACM Computing Surveys (CSUR), v.38 n.2, p.6-es, 2006 | markov modelling;bitmap compression;concordances;IR models |
593994 | Matching Index Expressions for Information Retrieval. | The INN system is a dynamic hypertext tool for searching and exploring the WWW. It uses a dynamically built ancillary layer to support easy interaction. This layer features the subexpressions of index expressions that are extracted from rendered documents. Currently, the INN system uses keyword based matching. The effectiveness of the INN system may be increased by using matching functions for index expressions. In the design of such functions, several constraints stemming from the INN must be taken into account. Important constraints are a limited response time and storage space, a focus on discriminating (different notions of) subexpressions for index expressions, and domain independency. With these contextual constraints in mind, several matching functions are designed and both theoretically and practically evaluated. | Introduction
Searching large and dynamic information spaces is a di-cult task. Many authors have opted for an
approach combining browsing and searching in a hypertext environment (see e.g. [12, 21, 5]). The
motivated renements. In this overview, the hyperindex, navigation is used for query formulation.
After formulation, the query (an index expression) is used to render relevant documents. The INN
currently uses existing search engines for rendering, utilising only the terms (keywords) in the query.
Thus, relations between terms, as modeled in the query, largely get lost. Exploiting similarity measures
for index expressions in rendering, e.g. in re-ranking the documents, would alleviate this problem.
The intended use of the similarity measures in the INN poses a number of constraints on their
design. The documents that are rendered by the search engines are likely to contain (most of) the
required keywords from the query. However, inter-term relations, as modeled in index expressions,
do not have to be satised since matching is keyword-based. This may be repaired by re-ranking
the rendered set of documents according to similarity measures that go beyond keywords. Thus,
the similarity measures should focus on inter-term relations and, consequently, on the hierarchical
composition of index expressions.
The WWW contains documents on a very wide range of topics. Therefore, the INN has been
designed as a domain independent exploration and search tool. This means that domain dependent
approaches, such as conceptual IR ([13]) and coordinated concepts ([20]), which make heavy use of
domain specic knowledge bases, are not adequately general for our purposes.
The use of thorough (linguistic) analysis is not viable for the INN due to the need for quick responses
and a limited amount of available memory. Since the INN runs on a web server, it potentially serves
many users which may cause an explosion of the required memory. This especially holds if considerable
(linguistic) knowledge is used, for instance in detailed parsing. Similarity values have to be computed
real time, next to rendering documents form search engines, locating and extracting index expressions
from these documents and parsing them. We thus focus on matching of basic syntactic renement
structure of phrases, as captured in index expressions. In turn, this means that not all ambiguities
encountered in content analysis can be resolved.
The renements in the hyperindex directly stem from a particular view on the decomposition of
index expressions, or, a notion of subexpressions. For instance, the order of subexpressions may be
deemed relevant in computing the renements of the hyperindex. In addition, there are dierent views
on embedding of index expressions. It is envisaged that the user may select his preferred notion of
subexpression for constructing the hyperindex. Otherwise, the preferred notion may be derived by
analysing the (types of) renements the user makes during navigational query formulation. In order
to render documents consistent with the user's preferences, the similarity measure used for re-ranking
should be in accordance with the preferred notion of subexpressions.
The presented topic overview in the INN is based on a small subset (10-100 documents) of the
complete collection. Statistics thus only apply to a very small part of the information space. As a
consequence, (domain dependent) collection statistics cannot be globally computed. In addition, term
weights for the query are not supplied by the INN system. In this article, therefore, we focus on the
core function of our similarity, the structure of index expressions and provide abstract functions for
comparing terms.
The goal of this article is the design of (relatively simple and e-cient) similarity measures that
focus on the structure of index expressions. In particular, the order of subexpressions and dierent
notions of embedding are to be modeled in the similarity measures.
The structure of this article is as follows. In section 2, our approach is put in the context of
other work on linguistically motivated indexing and structural matching. Section 3 introduces two
representations of index expressions. In section 4, elaborates several topics concerning the contents
and structure of index expressions. These topics lead to the design of several similarity measures
for index expressions in section 5. Section 6 provides an experimental evaluation of the proposed
measures. Finally, section 7 provides concluding remarks and directions for further research.
Related Work
2.1 Obtaining Index Expressions from Text
Currently, the INN system directly extracts index expressions from the titles of the rendered doc-
uments. This produces acceptable results since titles are often in a form which permits a ready
transformation to index expressions. A similar point of departure is taken in a closely resembling sys-
tem, the hyperindex browser ([10]). A simple parsing method based on a two-level priority scheme for
connectors ([4]) is used. All allowed connectors are listed together with their priority. All other words
encountered are interpreted as terms (keywords). A stoplist (list of stopwords) lters out unwanted
words like, for instance, articles and determiners. During parsing, the priority of the connector at
hand determines if the already parsed part of the index expression has to be broadened or deepened.
Thus, no (explicit) linguistic grammar is used by the parser. The parser results in one parse tree only,
thus possibly neglecting dierent interpretations. A test on the CACM document collection showed
that this parsing method was accurate in approximately 90 percent of the cases.
additional sources of linguistic knowledge are used in the INN. Although our approach is
rather simplistic and although "syntax by itself cannot resolve the many ambiguities that complicate
the content analysis task" ([16]), in our view, the advantages oered by the INN system, augmented
with similarity measures for index expressions, produce a workable balance between keyword based
approaches and sophisticated linguistic analysis.
A more general approach to indexing documents with index expression could make use of a part-
of-speech (POS) tagger and an extractor. For closely related descriptors, called phrase frames, this
approach is described in ([1]). Phrase frames are head-modier structures in which connectors are
(eventually) omitted. After preprocessing the documents, ltering non-textual parts and moulding
the text into acceptable format, the POS tagger labels words with their part of speech. A well
performing POS tagger is described in [3]. The extractor, which is applied next, uses the POS labels
in identifying the linguistic constructs that should be parsed as index expressions. The extractor uses
pattern matching with regular expressions. An extractor for index expressions would constitute a
subset of the patterns used for phrase frames, albeit augmented with connectors. Finally, the same
parser as above can be used, although more sophisticated parsers are available. This is, however, not
in the scope of this article.
The general architecture of an NLP-IR system advocated by [19] also includes a stemmer. Normalisation
at term level (e.g. stemming) is largely orthogonal to our approach, so possible to include,
but not considered in this article. However, we provide abstract similarity functions for terms and
connectors that could be instantiated by measures that do take, for instance, stemming into account.
Regularisation or syntactical normalisation at phrase level aims at recall enhancement by reducing
syntactical variation ([19]). For phrase frames, syntactic normalisation is described in ([1]). This
approach can, mutatis mutandis, also be applied for index expressions since phrase frames closely
resemble index expressions. However, this requires the use of additional linguistic knowledge. We do
not elaborate on this issue here.
Instead of normalising descriptors, systematically generating (all) linguistically motivated alternative
variants ([18]) has a similar aim. Semantic linguistic knowledge is exploited not to generate invalid
variants. Although this restricts the number of generated variants, this number may explode, especially
for complex composed descriptors. Matching is done via translation of the generated variants
into a Boolean query. Due to the need for e-cient matching in the INN system, we do not generate
all variants of index expressions.
The Constituent Object Parser ([14]) also uses syntactic structure for matching descriptors. It
produces binary dependency trees, which indicate (directed) dependency and scope of relationships
between terms. Many dierent syntactic forms are represented by this single dependency relation.
As a result, ambiguities are retained in the representation ([19]). A comparable approach is that of
using tree structured analytics ([17]). Both approaches use external sources of linguistic knowledge
and oer at best reasonable e-ciency. Index expressions make a distinction between the "types" of
dependency, as given by connectors. Not taking the actual (contents of) connectors into account,
e.g. by allowing wildcard connectors, in matching normalised index expressions eectuates a similar
(directed) notion of dependency. An intermediate form of dependency, colliding connectors of the
same type, is described in section 4.1.2.
The CLARIT system ([7, 6]) integrates several NLP techniques with the vector space retrieval
model. These techniques include morphological analysis, robust noun-phrase parsing, and automatic
construction of rst order thesauri. Construction of the thesauri, used to support the selection of
appropriate terms, requires a substantial (minimally 2 GB) sample of documents about a certain topic.
Because of limited response times and available memory, we expect this approach too demanding for
our application.
2.2 Comparing Structured Descriptors
The similarity measures for index expressions described in section 5 focus on the structure of index
expressions, i.e., on the way subexpressions are nested. Three similarity measures are provided:
skeleton content, full-product, and a twig-based measure. These measures represent dierent views
on the order of subexpressions and embedding. Headedness, or concept modication in head-modier
structure, is considered as well.
In [11], a language for querying structured text based on tree inclusion is described. Their approach,
which exploits inclusion patterns to ensure preservation of binary properties between nodes, takes both
structure and content into account. Example inclusion patterns are L for labels, A for ancestorship,
and O for (left-to-right) ordered tree inclusion.
Our skeleton-content approach resembles their fLAOg-embedding. That is, ancestorship and
ordering are preserved and labels are taken into account. However, our approach does not require
labels to be equal but supports approximate matching by oering abstract similarity functions for
terms and connectors. In the introduction of the mentioned article the authors indicate that, indeed,
such "standard IR techniques should be added to the language". Our similarity measures for index
expressions capture both aspects by approximation: they are sensitive to both structure and, by using
abstract term comparison functions, content.
Our skeleton-content approach thus 'preserves' labels by taking into account their similarity. Essen-
tially, it searches for the best fL 0 AOg-embedding and delivers the degree of embedding. A similar line
of reasoning shows that our full product approach computes the degree of fLAg-embedding. Since
in the full product measure the order of subexpressions is considered irrelevant, the corresponding
inclusion pattern O is not satised.
In [1], an approach to compare head-modier structures is described. Lexico-semantical relations
are used in computing the similarity between their binary terms. Our set based similarity measures
for twigs do not explicitly make use of a semantical network. However, this may be incorporated
in our abstractly modeled comparison functions for terms and connectors. In addition, twigs are
tertiary structures, also including information on the type of connection between head and modier.
Furthermore, we focus on similarities between sets of twigs, rather than on their individual similarities.
own advantages and disadvantages. We use the inductive and the structural representations. These
representations describe the same language of index expressions but dier in denotational properties.
adjectives, gerunds, and attribute values. Connectors denote relations between terms in the form
of prepositions (showing place, position, time, or method) and some present participles (e.g. using,
having, and being).
3.1 Inductive Representation
The inductive representation, as described in denition 3.1, is used since it most basically describes the
(de)composition of index expressions. The underlying idea is that index expressions can be augmented
with subexpressions through connectors, as illustrated in gure 1. An advantage of such an elementary
representation is that it allows several auxiliary functions to be readily designed.
c
I
Figure
1: Basic setup of inductive representation.
Denition 3.1
Let T be a nonempty set of terms and C be a set of connectors such that T Then, the
language of non-empty index expressions is dened as:
1. if t 2 T , then t is a non-empty index expression, and
2. if I and J are non-empty index expressions and c 2 C is a connector, then add(I; c; J) is
also a non-empty index expression, and
3. no other non-empty index expressions exist.Example 3.1
Single word queries or document representations are modeled by terms. Example terms are con-
ference, biology, and Holland. Composed index expressions can be constructed through the add
operator. This also exploits connectors, such as in, with, and on. For instance, the composed
index expression add(conference; on; biology) represents information on a conference on biology.
As a more complex example, consider add(add(conference; on; biology); in; Holland) denoting information
on a conference on biology held in Holland. The semantics of index expressions depends
on their structure. That is, dierences in nested subexpressions may cause dierences in se-
mantics. As an example of this, compare the last index expression with the slightly dierent
Holland)). The last one denotes a conference about biology as
far as it is practiced in Holland. 2
Conns(add(I; c;
Figure
2: Auxiliary functions on index expressions.
Three auxiliary functions on index expressions are introduced in gure 2. These functions are used
in dening similarity measures. The denitions are formulated in terms of the inductive denition of
index expressions. The functions result in the terms of an index expression, its connectors, and its
head, respectively.
3.2 Structural Representation
The inductive representation provides a horizontal decomposition of index expressions: subexpressions
are added on the right. Another representational formalism for index expressions, called the structural
representation, serves better if all subexpressions at a certain depth have to be addressed at the same
time. The structural representation provides a vertical decomposition of index expressions, allowing
a direct and clear look on their structure. The structural representation is exploited in cases where
the order of subexpressions is to be taken into account. In the structural representation, a composed
index expression is denoted by
where h is the head and the k subexpressions I i are connected with the head by connectors c i .
The subexpressions are denoted by the structural representation as well. The composition operator
provides a notational shorthand.
I 1 I k
Figure
3: Structural representation
Figure
3 gives a schematic view on the structural representation.
Example 3.2
The two last mentioned index expressions of example 3.1 are denoted in the structural representation
as conference on (biology) in (Holland) and conference on (biology in (Holland)), respectively.
Note that in the structural representation the dierences in semantics are modeled by brackets.4 Issues concerning Semantics
The index expression
can be seen as a description of a concept named h being further rened by relations called
and concepts I
As a consequence, comparison of both concepts names (contents) as well as the rening mechanism
(structure) will be important issues when matching index expressions. This section presents several
topics concerning contents and structure that rene the abovementioned view on the semantics of
index expressions.
The contents of index expressions is given by their terms and connectors.
4.1.1 Terms
In order to match index expressions, their terms should be compared. Therefore, we assume a similarity
function between terms, denoted sim [0::1]. The expression sim T (t; t 0 ) denotes the similarity
between the concepts referred to by terms t and t 0 .
The similarity between terms can be obtained in several ways. For instance, it can be computed
by string comparison algorithms such as n-grams, the overlapping substrings of terms of length n.
Furthermore, additional lexico-semantical knowledge can be used taking, for instance, hypernyms and
synonyms into account. In IR, stemming is often performed to reduce morphological variance. We
abstract from the particular techniques used in computing the similarity and concentrate on using this
in computing similarity between index expressions.
4.1.2 Connectors
Similar to terms, we also assume a similarity function sim connectors. This
similarity expresses the strength of the relation between connectors.
The similarity function for connectors can take several aspects into account. For instance, it can
be based on the types of connectors as identied by Farradane (see [8] and [9]). In this approach,
called relational indexing, connectors model the relationships between terms. Connectors that model
the same relationship could be given a high similarity value. Furthermore, the priority of connectors
within index expressions can be exploited. In addition, occurrence-frequencies of connectors could be
used. Again, we abstract from the dierent approaches and focus on exploiting similarity between
connectors for matching index expressions.
4.2 Structure
The structure of index expressions partly determines their semantics and should, therefore, be taken
into account in matching. Three issues concerning structure are considered in this article: the order
of subexpressions, embedding, and headedness.
4.2.1 Order of Subexpressions
An important question considering the semantics of index expressions is whether the order of subexpressions
is relevant. Consider for example the following index expressions.
hiking in mountains with friends
hiking with friends in mountains
One may argue that their meaning is equivalent. In other situations, however, there may be cases
in which the order of subexpressions is relevant, i.e., causes a dierent meaning. For instance, if the
sequential order of paragraphs in a text is represented in an index expression.
The notion of order of subexpressions is formalised by the relation EqOrder as follows.
Denition 4.1
We call two index expressions I =
denoted by EqOrder(I; J), i
1.
2. there exists a projection of [1::k] to [1::l] such that for all 1 i k it holds that c
and EqOrder(I i ; J (i) ).Two index expressions are equal modulo order i their heads are equal and (recursively) the
subexpressions of the rst are equal modulo order to one of the subexpressions of the second. The
second criterion holds, for instance, for index expressions of which the subexpressions (recursively)
are a permutation of the other's. In addition, it holds for index expressions which contain several
copies of the same subexpressions. This is, for instance, illustrated by the index expressions retrieval
of information and retrieval of (information) of (information). Furthermore, equality modulo order is
re
exive. Later in this article, we describe a matching strategy that computes maximal similarity for
index expressions that are equal modulo order.
4.2.2 Embedding
Embedding or containment plays a prominent role in IR. For example, an often applied strategy to
query-document matching is: if the query is contained or embedded in a document, then the document
is deemed relevant to the query.
Dierent notions of embedding exist. The subexpression relation for index expressions, for example,
denes a connected variant of embedding: a subexpression is a connected part of its superexpressions.
For instance, surng in Holland is a subexpression of surng in Holland in November but not a subexpression
of surng in sunny Holland. The subexpression relation (see [23]) is denoted by 4. The expression
I 4 J means that index expression I is a subexpression of J .
In the abovementioned case, sunny modies the last term Holland of the path expression sunny
Holland. In our view, surng in Holland is therefore embedded in surng in sunny Holland. To cater for
these cases, we exploit a slightly more liberal version of embedment.
Connectedness can, in the context of subexpressions, be described by direct ancestorship, or,
parenthood. This means that for all terms in an index expression I, their parent must also be their
parent in index expressions in which I is embedded. Instead of direct ancestorship we use the notion
of (general) ancestorship. This means that index expression I is embedded in J i for all terms in I
their ancestors in I are also ancestors in J .
These considerations are re
ected in our notion of embedding of index expressions which is formalised
by an embedment relation as follows.
Denition 4.2
Embedding of index expressions is captured in the binary relation , where I J means that
I is embedded in J , which is dened as:
I add(J; c; K) if I J or I K
I K and J L
(Stop) no other cases applyTerms are embedded in themselves, as described by case Same of denition 4.2. Case Sub states
that an index expression is embedded in a composed one add(J; c; K), if it is embedded in either
subexpression J or K. The third case Split shows that a composed index expression add(I; c; J) is
embedded in another composed index expression add(K; d; L) if their connectors are equal, the leftmost
subexpression I is embedded in the other leftmost subexpression K, and a similar argument holds for
the rightmost subexpressions J and L.
4.2.3 Headedness
The head of an index expression is considered to be its most important part. We will address this
notion, implemented by head-modier pairs in ([19]), as headedness. The subexpressions modify the
main concept stated in the head. Consequently, the lower terms occur, i.e., deeper with respect
to nested expressions, the less important they are. This can be taken into account in matching by
exploiting the depth of terms. Multiplying by a factor that is inversely proportional to the depth gives
the desired result. We will indicate how each similarity function described below can be equipped
with such a depth factor.
5 Similarity Measures for Index Expressions
In this section, several similarity measures for index expressions are designed. They vary from simple
measures that only consider the content of index expressions (section 5.1) to more comprehensive
measures that consider both content and structure (section 5.2).
Measuring the similarity between index expressions by sets of terms and connectors considers only
provide similarity measures for (the contents of) index expressions. Example set measures are the Dice,
Cosine, and Jaccard measures (see e.g. [15]). These measures do not use similarity functions for terms
and connectors as described in sections 4.1.1 and 4.1.2, respectively. Instead, they use set primitives as
union, disjunction, and cardinality which use equality of elements (terms and connectors). The Dice
measure, which normalizes the intersection A \ B with the sum of constituents, the Cosine measure,
relating the overlap of both sets to their geometric average, and the Jaccard measure, expressing the
degree of overlap between two sets as the proportion of the overlap from the whole, are dened as
in case the denominator does not equal zero. In case it does, the measures return similarity value
zero.
By considering the (sets of) terms and connectors of index expressions, the set based measures
can be exploited for index expressions. As an example, consider the similarity measure for index
expressions based on the Dice coe-cient as shown in gure 4.
Dice (I;
Figure
4: Dice's similarity measure for index expressions.
The factor determines the relative in
uence of terms and connectors on the similarity value. For
only terms are considered and for only connectors are taken into account. Note that a
depth factor cannot be taken into account directly since no information about structure is available
in sets of terms.
We say a measure is maximal for certain index expressions if maximal similarity is returned for the
descriptors. The Dice measure is not maximal for embedded index expressions nor for subexpressions.
Consider, for example, index expression surng in Holland and its subexpression Holland. Since the sets
of terms and connectors are dierent, the Dice measure is not maximal for these index expressions.
5.2 Contents and Structure
This section provides three similarity measures that take both content and structure of index expressions
into account. The rst measure, coined full product, adheres to the idea that the order of
subexpressions is irrelevant for the meaning of index expressions. On the contrary, the second mea-
sure, called embedded content, deems the order relevant. In addition, embedded content is based on
non contiguous embedding. Finally, the twigs measure is based on decomposing index expressions into
elementary connections called twigs.
5.2.1 Full Product
The full product similarity measure computes the degree to which an index expression is equal modulo
order with another one. This means that the order of subexpressions is considered irrelevant. Since
the structural representation appears most appropriate in this case, the full product measure, denoted
by FP, is specied by it as depicted in gure 5.
FP(h
FP(h
jTerms(h
Figure
5: Full product algorithm
The full product algorithm, as shown in gure 5, consists of four cases. They can be readily
translated to a functional algorithm using pattern matching. The rst case Terms computes the
similarity between single terms. In case Top, the embedment of a single term t in a composed index
expression
computed by comparing t with head h since both occur at the same depth.
The third case Tall computes the similarity between two composed index expressions. Correspondingly
to denition 4.1, this is the product of the similarity between the heads and the maximum
similarity values of the subexpressions of I with some subexpression of J .
The nal case Toll gives a penalty for the fact that a composed index expression cannot be equal
modulo order with a term. The returned similarity value is smaller if the mismatch in size (number
of terms) is larger.
Note that the full product measure computes a similarity value layer by layer. That is, only terms
and connectors that occur at the same depth are compared. The full product similarity measure is
maximal for index expressions that are equal modulo order, as shown in the following theorem.
Theorem 5.1 EqOrder(I; J) ) FP(I;
Proof:
The proof is done by structural induction to index expressions. We only investigate the (inter-
esting) case of composed index expressions. Suppose I =
are
equal modulo the order of their subexpressions. This means that for each
value
1.
2. for each 1 i k there exists a 1 j l such that d
that sim C by the induction hypothesis, FP(I
This means that, for the j of case (2), sim T (h; 1. The total
similarity measure then comes down to 1
As a direct consequence of theorem 5.1, we conclude that the full product similarity measure is
maximal for equal arguments, i.e. that FP(I; I) = 1. In addition, full product computes maximal
similarity for index expressions of which the subexpressions (recursively) are a permutation of the
other's or occur multiple times.
The full product measure is not maximal for embedded index expressions. Consider, for example,
index expressions surng in Holland and surng in sunny - Holland. Since the full product measure
computes similarity values layer by layer and the keyword Holland resides at dierent depths, the
given index expressions are not maximally similar. In addition, the full product measure is not
maximal for subexpressions. Illustrating this, consider Holland and surng in Holland. Since the heads
of both index expressions are unequal, the full product measure is not maximal.
FP d
sim d;T
(1)
The depth factor d can be incorporated in the full product algorithm (gure 5) by replacing case
Tall by equation (1). Note that it is only shown how the depth factor is to be correctly computed in this
case. Multiplying each case by a factor inversely proportional to this depth factor takes headedness
into account.
5.2.2 Embedded Content
The embedded content measure (see gure computes the best way in which an index expression can
be embedded (as dened in denition 4.2) in another one. This means that the order of subexpressions
is considered relevant. This eases the use of the inductive representation of index expressions and thus
enables an elementary decomposition of index expressions.
Figure
Embedded content algorithm.
The cases considered by the embedded content measure are the same as for the full product
measure. The case Terms of gure 6 is exactly the same as for full product and calls the similarity
function for terms sim T . The second case Top states that the degree to which a term t is embedded in a
composed index expression add(I; c; J) is equal to the maximal similarity to one of the subexpressions
I and J . Case Tall computes the strength of embedding of a composed index expression add(I; c; J)
in another one add(K; d; L). It computes the maximum similarity of the following three cases: (1)
add(I; c; J) is completely embedded in the leftmost subexpression K, (2) it is completely embedded
in the rightmost subexpression L, and (3) subexpression I is embedded in K, subexpression J is
embedded in L, and connectors c and d are similar. As before, case Toll gives a penalty for mismatch
since composed index expressions can never be embedded in terms.
The embedded content measure is maximal for embedded index expressions, as stated more formally
in the next theorem.
Theorem 5.2 I J
Proof:
The theorem is proven by induction on the structure of index expressions. Suppose I J .
Basis. Suppose I is a term t. Only the rst two cases of denition 4.2 of embedded content,
Same and Sub, are to be examined since the third case Split cannot apply (I cannot be
composed).
Same: Suppose this case of denition 4.2 applies. Then, consequently
Sub: Suppose this case applies which means that J is composed, say add(K; c; L) and thus
that t K or t L. Combining this with the induction hypothesis implies that
1. This means that, by case Top of the embedded content
algorithm, EC(I;
Induction step. Suppose I is a composed index expression, say add(K; c; L). Furthermore,
without loss of generality, let only cases Sub and Split of denition
4.2 need to be examined. Both result in EC(I;
Sub: Here, we have (1) I M implying EC(I; or (2) I N which means that
case Tall of the algorithm is applied, which computes the maximum
of these cases, both options cause EC(I;
Split: In this case, we have that . By the induction hypothesis,
this implies that Together with sim C
causes case Tall of the embedded content algorithm to compute EC(I;
We have shown that in all possible cases in which I is embedded in J the embedded content
measure computes EC(I;
The embedded content measure is also maximal for subexpressions. This stems from the observation
that every index expression that is a subexpression of another is also embedded in it. This, in
turn, follows from the observation that in the subexpression relation, direct ancestorship is preserved,
which is stricter than the general ancestorship which is preserved by the embedment relation. In
addition, the embedded content measure is maximal for equal arguments, since every index expression
is embedded in itself, i.e. embedment is re
exive.
The embedded content measure is not maximal for index expressions that are equal modulo order.
Consider, for example, the following pair of index expressions that are equal modulo the order of their
subexpressions: conference on (biology) in (Holland) and conference in (Holland) on (biology).
Since in the embedded content measure the order of subexpressions is relevant, index expressions I
and J are not maximally similar.
EC d
(add(I; c; J); add(K; d;
d) EC d+1
The depth factor d can be incorporated in the inductive representation by the scheme of equation
(2). Note that the rightmost subexpressions J and L reside one layer deeper than the head.
5.2.3 Twigs
The twigs (see [2]) of an index expression are its subexpressions that consist of exactly two terms
and one connector. Twigs are the elementary connections in the concept graph which is formed by
an index expression. Twigs have essentially the same structure as the head-modier pairs described
in [19], except that they also contain a connector. Twigs enable us to form a global picture about
similarity while focusing in on the elementary renements.
To denote subexpressions of size two, we use the subexpression relation as described in section
4.2.2.
Twigs can be dened constructively in terms of the inductive representation of index expressions.
This shows that the twigs of an index expression can be produced by a straightforward syntactic
process. Below, twigs are accompanied by their depth factor, modeled by a positive integer. Since
the head of an index expression is assigned depth one, the expression twigs(I; 1), according to the
denition below, computes the twigs of I with their correct depths.
Single terms do not contain subexpressions of size two and thus have no twigs. Composed index
expressions add(I; c; J) lead to at least one twig: Head(I) c Head(J ). Additional twigs may result from
the subexpressions, as modeled by the recursive calls.
As observed in [2], twigs conserve most of the structure of index expressions. In fact, if all terms
are dierent the complete structure can be correctly reconstructed without any additional information.
For twigs with depth factor, this can be relieved further to all terms at the same depth should be
dierent.
Twigs of index expressions seem to resemble tri-grams for strings. Considerations similar to tri-grams
are therefore expected to hold for twigs. For instance, an advantage of the use of twigs over
equality-matching is their robustness for 'spelling variations'. For example, if to index expressions are
equal modulo order, then their twigs are the same, as stated in the following lemma.
Lemma 5.1 EqOrder(I; J)
Set-based approaches, described for terms in section 5.1, can also be equipped with twigs. Instead
of calling the set based approaches with sets of terms or connectors as arguments, the (sets of) twigs
are used. This yields similarity measures using twigs. As an example, the Dice measure for twigs is
dened as
The Dice measure for twigs is maximal for index expressions that are equal modulo order and for
identical index expressions, since their twigs are equal.
The Dice measure for twigs is not maximal for embedded index expressions nor for subexpressions.
This is illustrated by, for instance, index expressions surng in Holland and Holland.
6 Experimental Evaluation
Subexpressions are the basic notion on which the hyperindex is generated. The INN system thus
heavily uses subexpressions. We therefore evaluate how the dierent similarity measures behave in
the context of subexpressions. A number of experiments, described in this section, give insight in this
matter.
retrieval
workshop
Amsterdam
holidays
during on
in
of for by
agents
information thesis
on
disk
in
Java classification
for
November
Similarity
Subexpressions
Dice-twigs
Dice (terms)
Figure
7: (a) Index expression used for experiments. (b) Overview of similarity measures.
The experiments exploit a non-trivial index expression (see gure 7(a)) consisting of 11 terms
nested in subexpressions of dierent forms. The similarity between this index expression and all its
subexpressions was computed, according to the dierent similarity measures. Both contiguous and
non-contiguous (e.g. workshop during November) subexpressions were generated from the original. In
total, the experiment featured 439 such subexpressions. Similar tests may be performed with other
notions of subexpressions. For instance, the order of subexpressions may be varied.
Figure
7(b) gives an overview of the dierent similarity measures. The graphs provided in this
gure serve as reference for the next sections. Not all set-based measures are provided; the Dice
measure (for terms and twigs) is given as representative. For several reasons, the subexpressions
on the x-axis are sorted according to their similarities such that non-increasing graphs are obtained.
Sorting similarities non-increasingly and therefore grouping together subexpressions that are equally
similar to the original index expression in intervals, clearly shows the results of the similarity measures.
For instance, without the sorting, dierent measures in the same graph would be hard to distinguish.
Furthermore, since subexpressions within the same interval have the same similarity value, intervals
rather than the positions on the x-axis should serve as indication of the ordering. For instance, the
number of intervals gives an indication of the granularity of the measure. We therefore compare
similarity measures by examining dierences between their intervals. The order of subexpressions
on the x-axis may be dierent for dierent similarity measures since we sort non-increasingly per
measure. The dierent orders per measure are not explicitly visualised in the graphs. Therefore, our
examination used detailed information, as kept in the test results, next to the graphs. The dierences
between the measures are examined in the rest of this section.
In our experiments, we examine dierences between similarity measures by imposing the order of
one similarity measure (the so called dominant measure) onto other similarity measures (the subordinate
measures). That is, the order of subexpressions on the x-axis is set to conform to the non
increasing order of the dominant measure. According to this ordering, the subordinate measures are
plotted. In this way, the dierences in ordering are visualised.
plateau 10.60.2
Subordinate measure1.0
100 200 300 400
Subexpressions
Similarity
Dominant measure
Figure
8: Generic sketch of results.
Figure
8 gives a generic sketch of the graphs that resulted from the experiments. In this gure,
the solid line depicts the similarity values of the dominant measure. In later gures, where actual
similarity measures are used, the line of the dominant measure equals its similarity graph of gure
7(b): the subexpressions on the x-axis are sorted such that a non-increasing line for the dominant
measure is obtained. According to this dominant ordering, the subordinate measures are plotted. Note
that the example dominant measure has three horizontal plateaus, i.e. intervals of subexpressions that
all receive the same similarity value, or, which are not discriminated by the dominant measure. For
subexpressions out of the same plateau, the dierences in positions on the x-axis are thus irrelevant
to the dominant measure. However, a subordinate measure may assign dierent similarity values to
subexpressions out of the same dominant plateau. Therefore, we re-sort subexpressions per dominant
plateau according to subordinate measures. In this way, we obtain non-increasing graphs for the
subordinate measures per dominant plateau. Note that the number of subordinate plateaus may
dier per dominant plateau. However, this number at most equals the number of plateaus in the
original graph of the subordinate measure of gure 7(b). As a result of sorting non-increasingly, all
peaks in subordinate graphs occur at the beginning of dominant plateaus. The form of actual graphs
later conforms to the generic sketch of gure 8 but has much ner granularity because of
more and smaller plateaus.
We rst compare the measures that use both content and structure: the full product, embedded
content, and set based measure for twigs. In sections 6.1 and 6.2, respectively, the full product and
embedded content are used as primary measure. Set-based measures for twigs are compared in section
6.3.
6.1 Full Product
The results of imposing the full product ordering onto the embedded content and Dice's measure for
twigs are shown in Figure 9. The three measures dene dierent orderings, as can be concluded from
the many peaks (embedded content) and drops (Dice-twigs) with respect to their original lines in
gure 7(b).
The ordering imposed by full product is related to the removal of leaves starting at maximal
depth, or, a layer by layer (bottom up) defoliation. Thus, the full product measure scores high if
the heads are (recursively) equal. In other words, a subexpression that equals a topmost (layer by
layer) part of the original gets a high score. Full product thus demands the main concepts to be equal
and is less sensitive for modication of the most specic (maximal depth) modiers. The gradually
decreasing graph of the full product measure combined with its high granularity implies that this
measure delicately distinguishes most subexpressions.
The rightmost interval of full product is a large zero-plateau. In this large interval, the subordinate
measures resemble their original graphs of gure 7(b). Inspection of the test results showed that the
subexpressions in this plateau, compared to the original, either have a dierent head or contain a single
subexpression that has a dierent head. For comparing index expressions that represent dierent main
concepts, the full product measure is thus inadequate.0.20.61
Similarity
Subexpressions
Dice-twigs
Figure
9: Full product order imposed.
In general, each full product interval shows a peak for embedded content and a drop for the Dice
measure for twigs. By examining which subexpressions cause these drops and peaks, the dierences
between the measures are studied.
Basically, two types of subexpressions cause the peaks for the embedded content measure. Of both
types, a stereotypical example is investigated. Consider, for instance, the peak in gure 9 that occurs
at position 43, having similarity value 0:5. The subexpression causing this peak consists of 10 terms,
missing only the depth two leaf Amsterdam. However, full product favours subexpressions which are
obtained by removing leaves at larger depth. The many possibilities to construct subexpressions in this
way makes that full product has many higher scoring subexpressions. As concluded from analysing
the test results, embedded content would have placed it in the interval at positions 2-5 of gure 7(b).
The removal of the highest leaf (i.e. Amsterdam) is, to embedded content, similar to removing a leaf
at largest depth, such as disk. Similar subexpressions cause the peaks at positions 17, 80, 101, and
171. Thus, when the in
uence of concept modication is desired to gradually decrease with depth,
full product is a better measure than embedded content.
Another type of subexpression causes the peak at position 277, which is visually somewhat obscured
by a simultaneous drop in the graph of the Dice-twig measure. This peak of similarity value 0:25 is
surrounded by values of 0:09. It is caused by an index expression that does not have workshop as head,
but has a large embedded subexpression consisting of 7 terms. Since the main concepts are dierent,
full product scores it low. However, embedded content scores it higher and resorts it to the beginning
of the value zero interval. Embedded content, by its own order, would have placed it in the interval
at positions 2-5. Thus, full product, more strongly than embedded content, targets at equal main
concepts.
The drop in Dice's graph at position 68 to similarity value 0:375 is caused by a non-contiguous
subexpression, ve of whose six twigs do occur in the original. Full product, by its layer by layer
computation, does not favour non-contiguous (layer skipping) subexpressions. A similar argument
applies to the drops at positions 133, 214 and 263. Twig based measures thus are more robust for
slightly diering non-contiguous subexpressions than full product.
Dice's drop to the x-axis at position 271 is caused by the single term workshop which consists of
the head of the original index expression only. As stated before, single terms have no twigs and Dice's
twig measure thus returns value zero.
6.2 Embedded Content
The second experiment imposes the embedded content order onto the full product and Dice measure
for twigs. The results are given in gure 10. Consider the line of the embedded content measure.
A striking feature is the large rightmost plateau, stemming from the following. We computed the
embedment of the original index expression in its subexpressions, not the other way around since this
would result in maximal embedment for all subexpressions. Thus, the embedding of the original is
computed in (the components of) the subexpressions. For many subexpressions, this eventually results
in the embedding of the original in the single terms of the subexpression. This, in turn, results in a
constant value which is inversely proportional to the size of the original. As a consequence, embedded
content is in this context best used for discriminating between highly similar subexpressions.0.20.61
Similarity
Subexpressions
Dice-twigs
Figure
10: Embedded content order imposed.
In general, the order imposed by embedded content is relative to the removal of terms, irrespective
of their depth. For instance, removing Amsterdam or disk results in equally similar subexpressions.
Thus, embedded content makes no distinction to the specicity (depth) of the removed term. As a
consequence, it is not so sensitive for the removal or addition of a complete modication (subexpres-
sion). This makes the embedded content measure suitable for matching queries with rich document
characterisations.
After position 88, the graphs of full product and Dice-twigs seem to equal their original graphs of
gure 7(b). This is caused by the large dominant plateau, starting at that position, which, by resorting
the subordinate measures, ensures that all the subexpressions are in the same order as in their original
graph. Dierences with their original graphs are caused by subexpressions that are placed in the last
interval by the dominant measure but not by the original order of the subordinate measure, or vice
versa.
A number of stepwise drops occur in the line of full product in gure 10. For instance, full product
drops to zero at positions 22, 23, and 84-87. This is caused by subexpressions with dierent heads.
As was also observed for the rst experiment, embedded content is more robust to changes in the
main concept. The downward steps towards value zero are caused by subexpressions that miss several
terms, but preserve other parts of subexpressions.
Dice's twig measure shows a clear drop at position 65, which is caused by a (rather small) non-contiguous
subexpression which has only a few twigs in common with the original. However, embedded
content, being more robust to non-contiguous subexpressions, ranks it relatively high. A similar
argument holds for the drops at positions 22 and 87. Thus, highly non-contiguous subexpressions are
still recognised as relevant by embedded content.
6.3 Set-based Twig Similarity
In the nal experiment, we compared set-based approaches for terms with those for twigs. In particular,
the Dice measure for terms is used as baseline for comparison with the Dice, Jaccard, and Cosine
measures for twigs. Figure 11 provides an overview of the used set-based measures, each measure
being non increasingly ordered as was done for the other measures in gure 7(b).0.20.61
Similarity
Subexpressions
Dice (terms, 0.5)
Dice (terms, 1.0)
Cosine-twigs
Dice-twigs
Jaccard-twigs
Figure
11: Set-based approaches for terms and twigs.
In our experiments, twig based measures have ner granularity than term based measures. This is
concluded from the number of intervals imposed by these measures. The set based measures divide the
subexpressions in classes (intervals) corresponding to the number of constituents in common with the
original. As can be seen from gure 11, the Dice measure for terms has 10 intervals for
connectors considered) and 20 for 0:5. The measures for twigs each have 26 intervals. This number
directly depends on the number of dierent twigs that can be generated from the subexpressions. Since
we included non-contiguous subexpressions in our experiment, new twigs are introduced that are not
in the original. The original index expression has 10 twigs thus leaving room for newly introduced
twigs. This suggests that twig based measures should be favoured over term based measures if delicate
matching is required.
The lines for the twig-based measures eventually drop to zero whereas the term-based measure
does not. The reason for this is that single terms do not result in twigs although every (non-empty)
subexpression has a minimal overlap of at least one term with the original. Clearly, twig based
measures should thus not be used for matching single terms. The minimal similarity value according
to Dice for terms (for
0:167.
In order to further compare the set-based approaches, the Jaccard ordering for twigs was imposed
on the others. Figure 12 shows the results. Dice and Jaccard for twigs impose the same ordering:
they have exactly the same intervals. As can thus be concluded from the denitions of these measures
(see section 5.1), in comparing two subexpressions, no distinction (in terms of the ordering) is made
Similarity
Subexpressions
Dice (terms)
Cosine-twigs
Dice-twigs
Jaccard-twigs
Figure
12: Jaccard (twigs) order imposed.
between the sum of twigs and the number of dierent twigs. Their similarity values, however, dier in
size. This basically means that, practically, the dierences between both measures can be overcome
by using rightly set thresholds. The Cosine measure for twigs has closely resembling intervals: of its
26 intervals, only six dier slightly (maximally nine subexpressions).
There is a big dierence between set-based approaches for terms and those for twigs, since terms
do not capture structure. The peaks in the line of Dice's term measure (gure 12) are caused by
non-contiguous subexpressions, not having many twigs in common. Irrespective of their structure,
however, they share terms with the original. Clearly, when the structure of descriptors is to be taken
into account, twig based measures are more suitable than term based measures.
The experiments illustrated characteristics of the dierent similarity measures. A number of
conclusions can be drawn. First, approaches only using terms should be avoided if the structure of
descriptors is relevant. This is what one would expect, as well as that set based measures using terms
provide less granularity than those using twigs. Second, the dierent criteria about subexpressions
resulted in similarity measures with distinct properties. The layer by layer computation of the full
product measure, derived from the idea of headedness, favours descriptors that only dier in their
most specic subexpressions. However inadequate for comparing index expressions that represent
dierent main concepts, it naturally supports delicate discrimination of most subexpressions and a
gradual notion of concept modication. The embedded content measure is not sensitive to the depth
of the deleted subexpression. Furthermore, since it is based on embedding, it is more robust to non-contiguous
subexpressions. Embedded content is, in the context of our experiments, best used for
discriminating highly similar subexpressions. Twig based measures fall somewhere in between. They
are somewhat sensitive to non-contiguous subexpressions: this introduces new twigs, but may preserve
other twigs. There is little dierence between twig based measures themselves. It appears mainly a
matter of thresholds, viz size of the similarity values, to distinguish between them.
Conclusions
In this article, we devised several similarity measures for index expressions aiming at use in a dynamic
hypertext system, the INN system. This envisaged application implied our focus on dierent notions
of subexpressions for index expressions and several constraints concerning high e-ciency, domain
independency, and restricted memory. These constraints prohibit the use of sophisticated natural
language processing techniques. However, several issues on the semantics of index expressions and
corresponding notions of subexpressions were formulated in criteria. These issues were the order of
subexpressions, non contiguous embedding, and headedness. The devised similarity measures were
both theoretically and experimentally evaluated showing their suitability for the mentioned criteria.
Although the experiments described in this article are rather small, they illustrate some of the essential
characteristics of the similarity values.
Future research can be directed towards augmenting index expressions with wildcards and the design
of corresponding matching functions. This could aim at using the structure of index expressions
for fact nding and the generation of partly specied overviews. In the augmented language, descriptors
like
ying from Tasmania to * can be used to nd all documents that deal with air transport from
the island of Tasmania to any destination.
Furthermore, it would be interesting to see if our approach is also viable for other retrieval related
tasks such as clustering, routing, and ltering. This would enable an augmentation of the functionality
of the INN system. For instance, the INN system could then present grouped results or it could work
o-line by using stable information needs in the case of ltering.
It is also interesting to investigate dierent instantiations of the abstract term and connector
comparison functions. For instance, stemming could be included by computing the similarity of
stems. In addition, connectors can be grouped by their function type. In matching, connectors with
the same function could be given higher similarity.
Including term weights potentially increases the eectiveness of matching. We did not focus on
this issue here since it is not primarily concerned with the structure of index expressions. However, it
seems a valuable extension worth further research.
Acknowledgment
The authors kindly acknowledge the valuable remarks of the referees.
--R
Navigational Query Construction in a Hypertext Environment.
Some advances in rule-based part of speech tagging
Relational Indexing Part I.
Relational indexing part II.
The open information locator project.
Information Retrieval from Hypertext: An Approach using Plausible Inference.
Retrieval Performance in FERRET.
The Constituent Object Parser: Syntactic Structure for Information Retrieval.
Information Retrieval.
On the Application of Syntactic Methodologies in Automatic Text Indexing.
Using Morpho-Syntactic Language Analysis in Phrase Matching
Automatic Search Term Variant Generation.
Natural Language Information Retrieval.
Integrated Information Access via Structure.
INdex Navigator for Searching and Exploring the WWW.
Nesting and Defoliation of Index Expressions for Information Retrieval.
--TR | matching;index expressions;similarity;information retrieval |
593997 | Skeleton Trees for the Efficient Decoding of Huffman Encoded Texts. | A new data structure is investigated, which allows fast decoding of texts encoded by canonical Huffman codes. The storage requirements are much lower than for conventional Huffman trees, O(log^2 n) for trees of depth O(log n), and decoding is faster, because a part of the bit-comparisons necessary for the decoding may be saved. Empirical results on large real-life distributions show a reduction of up to 50% and more in the number of bit operations. The basic idea is then generalized, yielding further savings. | Introduction
The importance and usefulness of Data Compression for Information Retrieval (IR) Systems is
today well-established, and many authors have commented on it [1, 17, 31, 27]. Large full-text
IR Systems are indeed voracious consumers of storage space realtive to the size of the raw
textual database, because not only the text has to be kept, but also various auxiliary files like
dictionaries and concordances, which are usually adjoined to the system to make the retrieval
process efficient. Moreover, certain data structures, such as decoding tables or trees, have to
be resident in RAM, so that large systems require more and more powerful machines. It is
therefore quite natural that efforts have been made to compress the text and other necessary
files, thereby reducing the demand for storage or RAM, or equivalently, for a fixed machine
with given resources, effectively increasing the size of the data base that can still be handled
efficiently.
Most of the popular compression methods are based on the works of Lempel and Ziv
[29, 30], but these are adaptive methods which are not always suitable for IR applications. In
the context of full-text retrieval, a large number of small passages is accessed simultaneously,
e.g., when producing a KWIC (Key-Word-In-Context) index in response to a submitted query,
and all these text fragments should be decodable, regardless of their exact location. When
an adaptive coding method has been used, this would then force us to start the decoding
at the beginning of the text or the logical block that contains the retrieved passage. So we
would either decode much more than needed, which may imply increased processing time, or
prepare a priori smaller blocks, which would cost us compression efficiency. In both cases,
the advantage of using adaptive methods, which often yield better compression than static
ones, may be lost.
Huffman coding [14] is still one of the best known and most popular static data compression
methods. While for certain applications, such as data transmission over a communication
channel, both coding and decoding ought to be fast, for other applications, like the IR scenario
we focus on in this paper, compression and decompression are not symmetrical tasks.
Compression is done only once, while building the system, whereas decompression is needed
during the processing of every query and directly affects response time. There is thus a special
interest in fast decoding techniques (see e.g., [15]).
The data structures needed for the decoding of a Huffman encoded file (a Huffman tree or
lookup table) are generally considered negligible overhead relative to large texts. However, not
all texts are large, and if Huffman coding is applied in connection with a Markov model [2],
the required Huffman forest may become itself a storage problem. Moreover, the "alphabet"
to be encoded is not necessarily small, and may, e.g., consist of all the different words in the
text, so that Huffman trees with thousands and even millions of nodes are not uncommon [23].
We try, in this paper, to reduce the necessary internal memory space by devising efficient ways
to encode these trees. In addition, the new suggested data structure also allows a speed-up of
the decompression process, by reducing the number of necessary bit comparisons.
The manipulation of individual bits is indeed the main cause for the slow decoding of
Huffman encoded text. A method based on large tables constructed in a pre-processing stage
is suggested in [5], with the help of which the entire decoding process can be performed using
only byte oriented commands (see also [26]). However, the internal memory required for the
storage of these tables may be very large. Another possibility to avoid accessing individual bits
is by using 256-ary instead of the optimal binary Huffman codes. This obviously reduces the
compression efficiency, but de Moura et al. [6] report that the degradation is not significant.
In the next section, we recall the necessary definitions of canonical Huffman trees as they
are used below. Section 3 presents the new suggested data structure and includes experimental
results. In Section 4, the main idea is then extended, yielding yet smaller trees and even faster
decoding.
2. Canonical Huffman codes
Figure
1: Canonical
Huffman code for
For a given probability distribution, there might be quite a large number
of different Huffman trees, since interchanging the left and right subtrees
of any internal node will result in a different tree whenever the two
subtrees are different in structure, but the weighted average path length
is not affected by such an interchange. There are often also other optimal
trees, which cannot be obtained via Huffman's algorithm. One may
thus choose one of the trees that has some additional properties. The
preferred choice for many applications is the canonical tree, defined by
Schwartz and Kallick [25], and recommended by many others (see, e.g.,
[15, 27]).
Denote by (p
we assume that be the length in bits
of the codeword assigned by Huffman's procedure to the element with
probability is the depth of the leaf corresponding to p i in the
Huffman tree. A tree is called canonical if, when scanning its leaves
from left to right, they appear in non-decreasing order of their depth
(or equivalently, in non-increasing order, as in [22]). The idea is that
Huffman's algorithm is only used to generate the lengths f' i g of the
codewords, rather than the codewords themselves; the latter are easily
obtained as follows: the i-th codeword consists of the first ' i bits immediately
to the right of the "binary point" in the infinite binary expansion
of
Many properties of canonical codes
are mentioned in [15, 3].
The following will be used as a running example in this paper.
Consider the probability distribution implied by Zipf's law, defined by
the weights
is the n-th harmonic number. This law is believed to govern the distribution
of the most common words in a large natural language text
[28]. A canonical code can be represented by the string hn 1
called a source, where k denotes, here and below, the length of the longest codeword (the
depth of the tree), and n i is the number of codewords of length k. The source
corresponding to Zipf's distribution for 74i. The code is
depicted in Figure 1.
We shall assume, for the ease of description, that the source has no "holes", i.e., there
are no three integers This is true for many
real-life distributions, and in particular for all the examples below. On the other hand, the
distribution of one of the alphabets used for compressing a set of sparse bitmaps in [8] is
All the techniques suggested herein can be easily adapted
to the general case using a vector succ(i), giving for each codeword length i, the next larger
codeword length j for which But to make the exposition clearer, we shall suppress
reference to succ(i), since for all distributions without holes,
One of the properties of canonical codes is that the set of codewords having the same length
comprises the binary representations of consecutive integers. For example, in our case, the
codewords of length 9 bits are the binary integers in the range from 110011100 to 111011010.
This fact can be exploited to enable efficient decoding with relatively small overhead: once a
codeword of ' bits is detected, one can get its relative index within the sequence of codewords
of length ' by simple subtraction.
The following information is thus needed: let be the length of the
shortest codeword, and let base(i) be the integer value of the first codeword of length i. We
then have
denote the standard s-bit binary representation of the integer k (with leading zeros,
if necessary). Then the j-th codeword of length i, for
Let seq(i) be the sequential index of the first codeword of length i:
Suppose now that we have detected a codeword w of length '. If I(w) is the integer value of the
binary string w (i.e., is the relative index of w within the
block of codewords of length '. Thus seq(') is the relative index of w within
the full list of codewords. This can be rewritten as I(w) \Gamma diff('), for
Thus all one needs is the list of integers diff('). Table 1 gives the values of n i , base(i), seq(i)
and diff(i) for our example.
9
Table
1: Decode values for canonical Huffman code for Zipf-200
We suggest in the next section a new representation of canonical Huffman codes, which
not only is space-efficient, but may also speed up the decoding process, by permitting, at
times, the decoding of more than a single bit in one iteration.
3. Skeleton trees for fast decoding
The following small example, using the data above, shows how such savings are possible.
Suppose that while decoding, we detect that the next codeword starts with 1101. This information
should be enough to decide that the following codeword ought to be of length 9 bits.
We should thus be able, after having detected the first 4 bits of this codeword, to read the
following 5 bits as a block, without having to check after each bit if the end of a codeword
has been reached. Our goal is to construct an efficient data-structure, that permits similar
decisions as soon as they are possible. The fourth bit was the earliest possible in the above
example, since there are also codewords of length 8 starting with 110.
3.1 Decoding with sk-trees
The suggested solution is a binary tree, called below an sk-tree (for skeleton-tree), the structure
of which is induced by the underlying Huffman tree, but which has generally significantly fewer
nodes. The tree will be traversed like a regular Huffman tree. That is, we start with a pointer
to the root of the tree, and another pointer to the first bit of the encoded binary sequence.
This sequence is scanned, and after having read a zero (resp., a 1), we proceed to the left
right) child of the current node. In a regular Huffman tree, the leaves correspond to full
codewords that have been scanned, so the decoding algorithm just outputs the corresponding
item, resets the tree-pointer to the root and proceeds with scanning the binary string. In our
case, however, we visit the tree only up to the depth necessary to identify the length of the
current codeword. The leaves of the sk-tree then contain the lengths of the corresponding
codewords.
f
tree pointer /\Gamma root
start
length of string
f
if string
else tree pointer /\Gamma right (tree pointer)
if value (tree pointer) ? 0
f
codeword string [start
output
tree pointer /\Gamma root
start
else
Figure
2: Decoding procedure using sk-tree
The formal decoding process using an sk-tree is depicted in Figure 2. The variable start
points to the index of the bit at the beginning of the current codeword in the encoded string,
which is stored in the vector string [ ]. Each node of the sk-tree consists of three fields: a left
and a right pointer, which are not null if the node is not a leaf, and a value-field, which is
zero for internal nodes, but contains the length in bits of the current codeword, if the node
is a leaf. In an actual implementation, we can use the fact that any internal node has either
zero or two children, and store the value-field and the right-field in the same space, with
serving as flag for the use of the right pointer. The procedure also uses two tables:
table giving the j-th element (in non-increasing order of frequency) of the
encoded alphabet; and diff [i] defined above, for i varying from m to k, that is from the length
of the shortest to the length of the longest codeword.
The procedure passes from one level in the tree to the one below according to the bits of
the encoded string. Once a leaf is reached, the rest of the current codeword can be read in
one operation. Note that not all the bits of the input vector are individually scanned, which
yields possible time savings.
9 91010
Figure
3: sk-tree for Zipf-200 distribution
Figure
3 shows the sk-tree corresponding to Zipf's distribution for 200. The tree is
tilted by 45 ffi , so that left (right) children are indicated by arrows pointing down (to the right).
The framed leaves correspond to the last codewords of the indicated length. The sk-tree of
our example consists of only 49 nodes, as opposed to 399 nodes of the original Huffman tree.
An idea similar to the sk-tree, but based on tables rather than on trees, has been suggested
by Moffat and Turpin [22]. Instead of identifying roots of subtrees in which all codewords
have the same depth, they essentially form a complete tree to a fixed depth no less than the
depth of the code tree (by extending any shorter branches), and examine the code tree nodes
at that depth to determine the minimum codeword length in each subsidiary subtree. To find
the length of a codeword, a fixed-sized window of the compressed bitstream, considered as a
binary value, is compared with left-justified base values in a sequence of hard-coded cascading
if-statements. Each such comparison is equivalent to a transition to a left or right child of the
sk-tree, and the replacement of bit comparisons by equivalent byte or word based comparisons
is reminiscent of a mechanism suggested in [5].
3.2 Construction of sk-trees
While traversing a standard canonical Huffman tree to decode a given codeword, one may
stop as soon as one gets to the root of any full subtree of depth h, for h - 1, i.e., a subtree of
depth h that has 2 h leaves, since at this stage it is known that exactly h more bits are needed
to complete the codeword. One way to look at sk-trees is therefore as standard Huffman trees
from which all full subtrees of depth h - 1 have been pruned. A more direct and much more
efficient construction is as follows.
The one-to-one correspondence between the codewords and the paths from the root to the
leaves in a Huffman tree can be extended to define, for any binary string
path P (S) induced by it in a tree with given root r 0 . This path will consist of e
e, where for i ? 0, r i is the left (resp. right) child of r
For example, in Figure 3, P(111) consists of the four nodes represented as bullets in the top
line. The skeleton of the sk-tree will consist of the paths corresponding to the last codeword
of every length. Let these codewords be denoted by L are, for our example,
etc. The idea is that P (L i ) serves as "demarcation line": any node
to the left (resp. right) of P (L i ), i.e., a left (resp. right) child of one of the nodes in P (L i ),
corresponds to a prefix of a codeword with length -
As a first approximation, the construction procedure thus takes the tree obtained by
(there is clearly no need to include the longest codeword L k , which is always a
string of k 1's), and adjoins the missing children to turn it into a complete tree in which each
internal node has both a left and a right child. The label on such a new leaf is set equal to
the label of the closest leaf following it in an inorder traversal. In other words, when creating
the path for L i , one first follows a few nodes in the already existing tree, then one branches
off creating new nodes; as to the labeling, the missing right child of any node in the path will
be labeled (basing ourselves on the assumption that there are no holes), but only the
missing left children of any new node in the path will be labeled i.
A closer look then implies the following refinement. Suppose a codeword L i has a zero in
its rightmost position, i.e., L string ff of length i \Gamma 1. Then the first codeword
of length It follows that only when getting to the i-th bit one can decide if the
length of the current codeword is i or i + 1. But if L i terminates in a string of 1's, L
with a ? 0 and jfij then the first codeword of length so the length
of the codeword can be deduced already after having read the bit following fi. It follows that
one does not always need the full string L i in the sk-tree, but only its prefix up to and not
including the rightmost zero. Let L
prefix. The revised version of the above
procedure starts with the tree obtained by
The nodes of this tree are depicted
as bullets in Figure 3. For each path P (L
there is a leaf in the tree, and the left child of
this leaf is the new terminal node, represented in Figure 3 by a box containing the number i.
The additional leaves are then filled in as explained above.
3.3 Space complexity
To evaluate the size of the sk-tree, we count the number of nodes added by path P (L
k. Since the codewords in a canonical code, when ordered by their corresponding
frequencies, are also alphabetically sorted, it suffices to compare L i to L i\Gamma1 . Let
empty string, and for i ? m, let fl(i) be the longest common prefix of L i and L
is the string 10 in our example. Then the number of nodes in the sk-tree is given by:
since the summation alone is the number of internal nodes (the bullets in Figure 3).
The maximum function comes to prevent an extreme case in which the difference might
be negative. For example, if L then the longest common prefix
is but since we consider only the bits up to and not including the rightmost zero,
we have L
In this case, indeed, no new nodes are added for P (L
An immediate bound on the number of nodes in the sk-tree is O(min(n; k 2 )), since on the
one hand, there are up to
2, but on the other hand, it
cannot exceed the number of nodes in the underlying Huffman tree, which is 2n \Gamma 1. To get
a tighter bound, consider the nodes in the upper levels of the sk-tree belonging to the full
binary tree F with leaves and having the same root as the sk-tree. The depth of F is
1)e, and all its leaves are at level d or d \Gamma 1. The tree F is the part of the
sk-tree where some of the paths P (L
must be overlapping, so we account for the nodes in F
and for those below separately. There are at most 2k \Gamma 1 nodes in F ; there are at most k \Gamma 1
disjoint paths below it, with path P (L
extending at most
F , for log This yields as bound for the number of nodes in the sk-tree:
There are no savings in the worst case, e.g., when there is only one codeword of each
length (except for the longest, for which there are always at least two). More generally, if
the depth of the Huffman tree is \Omega\Gamma n), the savings might not be significant. But such trees
are optimal only for some very skewed distributions. In many applications, like for most
distributions of characters or character pairs or words in most natural languages, the depth
of the Huffman tree is O(log n), and for large n, even the constant c, if the depth is c log 2 n,
must be quite small. For suppose the Huffman tree has a leaf on depth d. Then by [16,
Theorem 1], the probability of the element corresponding to this leaf is
F j is the j-th Fibonacci number, and we get from [18, Exercise 1.2.1-4], that
5)=2 is the golden ratio. Thus if d ? c log 2 n, we have
To give a numeric example, in Section 4 below one of the Huffman trees corresponds to the
different words in English, with leaves. The probability for a tree of this size
to have a leaf at level 3 log 2 n is less than 4:4 \Theta 10 \Gamma12 , meaning that such a word occurs only
once every 4400 billion words; the existence of such a rare word then puts a lower limit on the
size of the text, which in our case must be large enough to fill about 35,000 CD-Roms! For
all the distributions given in Table 2 in the experiments below, the ratio of the depth of the
Huffman tree to log 2 n is between 1.31 and 2.61. But even if the original Huffman tree would
be deeper, it is sometimes convenient to impose an upper limit of O(log n) on the depth,
which often implies only a negligible loss in compression efficiency [10]. In any case, given a
logarithmic bound on the depth, the size of the sk-tree is about
log n (log
3.4 Time complexity
When decoding is based on a standard Huffman tree, the average number of comparisons
per codeword is the sum, taken over all the leaves i, of the depth of i in the tree times the
probability to get to i. A similar sum holds for sk-trees, with the difference that a leaf does
not correspond to a single element, but to several consecutive codewords of the same length.
Let w be the prefix of a codeword corresponding to a leaf of the sk-tree labeled
and denote codewords corresponding to this leaf of the sk-tree are
correspond, using the notations of Section 2, to indices in the range from
diff('). The average number of comparisons per codeword using
the sk-tree can thus be evaluated as:
i2fleaves in sk-treeg@ d i
where w i is the binary string corresponding to the leaf i, d is the depth of i in the tree,
' i is a shortcut for label(i), and Prob(j) is the probability of the element with index j.
As an approximation, we assume that the probability of an element on level i in the tree
is 2 \Gammai . This corresponds to a dyadic probability distribution, where all the probabilities are
integral powers of 1. There cannot be too great a difference between the actual probability
distribution and this dyadic one, since they both yield the same Huffman tree (see [20] for
bounds on the "distance" between such distributions). Given this model, eqn. (2) becomes
i2fleaves in sk-treeg
A similar sum, but taken over all the leaves of the original Huffman tree gives the average
codeword length for a dyadic distribution. There are therefore large savings whenever the
number of nodes in the sk-tree is much smaller than in the underlying full Huffman tree.
3.5 Experimental Results
To test the effectiveness of the use of sk-trees, the following real-life distributions were used.
The data for French was collected from the Tr'esor de la Langue Fran-caise, a database of
680 MB of French language texts (115 million words) of the 17 th -20 th centuries [4]; for English,
the source are 500 MB (87 million words) of the Wall Street Journal [24]; and for Hebrew,
a part of the Responsa Retrieval Project , 100 MB of Hebrew and Aramaic texts (15 million
words) written over the past ten centuries [7]. The first set of alphabets consists of the bigrams
in the three languages (the source for English for this distribution was [13]); for the next set,
the elements to be encoded are the different words, which yields very large "alphabets"; and
the final set contains the distribution of trigrams in French. For completeness, the Zipf-200
distribution used in the above examples was also added.
total average number of average relative
Source k number of codeword nodes in number of savings in #
elements length sk-tree comparisons comparisons
bigrams French 29 2192 7.784 285 4.620 40.6%
Hebrew 24 743 8.037 127 4.183 48.0%
English 26 289101 11.202 425 5.726 48.9%
words French 27 439191 10.473 443 5.581 46.7%
Hebrew
trigrams French 28 25781 10.546 381 5.026 52.3%
Table
2: Time and Space requirements for real-life distributions
Table
2 displays the results. The first three columns give some statistics about the various
distributions: the depth k of the Huffman tree, the size n of the encoded alphabet, and the
weighted average length of a codeword, measured in bits, which equals the average number of
comparisons if the standard Huffman tree is used. The next two columns bring the number
of nodes in the sk-tree, as given in eqn. (1), and the average number of comparisons per
codeword when decoding is based on the sk-tree, as given in eqn. (2). The final column shows
the relative savings in the number of comparisons, measured in percent. We see that for large
distributions, roughly half of the comparisons may be saved. Note that these savings are in
spite of the fact that the high-probability symbols with short codewords have relatively few
bits in common. The weighted average takes this into account: few bits are saved for the
shorter codewords, and the savings are multiplied by higher probabilities; more bits are saved
for the longer codewords, but even if their probabilities are very small, their large number
have a cumulative effect. Note also that the cost of storing the sk-tree is only several percent
of the cost for the full Huffman tree.
4. Reduced sk-trees
We now wish to explore what might be gained by pruning the sk-tree at some internal node:
one would thus get to leaves at which it is not yet possible to deduce the length of the
current codeword, but at which some partial information is already available. For example,
in
Figure
3, if the bits already processed were 111 (corresponding to the internal node in the
rightmost upper corner), we know already that the length of the current codeword is either 9
or 10. We therefore need only one more comparison to know the exact length: concatenate
the following seven bits with the three already processed to get a 10-bit string w; if the binary
value of w is smaller than base(10), the next codeword must be of length 9, otherwise it is of
length 10. If we had used the original sk-tree as explained in the previous section, we would
have had at least one more comparison, possibly even more, e.g., if the bits after 111 were
0110, we would have performed four more comparisons and still not know if the length is 9 or
This reflection leads to the idea of a reduced sk-tree, which is obtained from the sk-tree by
pruning some of its branches. On the one hand, this reduced tree is obviously smaller, on the
other, as we saw, it may also decrease the number of comparisons. More formally, define for
each node v of the sk-tree two values lower(v) and upper(v) by:
if v is a leaf lower(v)
if v is an internal node lower(v) = lower(left(v))
that is, for each node v, the codewords corresponding to leaves of the sub-tree rooted by v
have their lengths in the interval [lower(v); upper(v)]. In terms of our earlier notation we have
We define the reduced sk-tree as the smallest sub-tree
of the sk-tree for which all the leaves w correspond to a range of at most two consecutive
codeword lengths, i.e.,
5-6
Figure
4: Reduced sk-tree for Zipf-200 distribution
Figure
4 is the reduced sk-tree obtained from the sk-tree of Figure 3. Leaves are now
also indicated as bullets, with the corresponding range underneath. Recall that the original
Huffman tree had 399 nodes, and the sk-tree 49; in the reduced sk-tree we are left with only
13. Note that all the leaves of the original sk-tree are deleted, but also entire sub-trees. The
nodes corresponding to the part of P (L
which is not overlapping with P (L
eqn. (3), but since we seek the minimal tree, for each such path, only the node highest up in
the tree need be kept, so the rest of this branch and its offsprings are pruned.
A generalized view of both regular and reduced sk-trees would be as follows: consider a
full canonical Huffman tree and assign to each node the values lower and upper. Delete now
some of the nodes, starting at any leaf and proceeding to the parent nodes, until you get to the
smallest tree for which every leaf w satisfies lower(w) = upper(w), i.e., all the corresponding
codewords have the same length; this is the sk-tree. If the process is continued and more
nodes are deleted until the codewords corresponding to the new leaves have lengths i or
for some i, we get the reduced sk-tree. We henceforth adopt the notation sk 1 -tree and sk 2 -tree
for the original and the reduced sk-trees, respectively, the subscript referring to the maximal
size of the set of codeword-lengths associated with each of the leaves of the tree.
We cannot use equality in eqn. (3), which would impose a range of exactly two codeword
lengths for each leaf of the sk 2 -tree. In the example of Figure 4 all the leaves do have equality
Last elements
of codeword blocks
5-6 6-7
12Corresponding sk 2 -tree
Figure
5: Example of sk 2 -tree with special leaves
in eqn. (3), but for other examples, leaves may exist, the parent nodes of which correspond
already to ranges of 3 or more codeword lengths. In this case, the original leaf of the sk 1 -
tree must be kept. Let us call such leaves in the sk 2 -tree special leaves. For the example
distributions above, special leaves exist only for the distribution of the Hebrew bigrams, the
first few elements of the source being h0; 0; 0; 0; In the left
part of Figure 5, the last codewords L i for the codeword lengths up to 13 are listed, and the
right part of Figure 5 is the corresponding section of the sk 2 -tree. The special leaves w are
indicated as rectangles, containing the value lower(w) (which is equal to upper(w)), the other
leaves are depicted as bullets as above.
For example, we see that only codewords of length 8 can have the prefix 011, but the
parent node of the corresponding leaf is associated with the prefix 01, which may be extended
to codewords of lengths 6, 7 or 8. Similarly, a prefix 11110 implies the codeword length 11,
but 1111 is the prefix of codewords of lengths 11 to 24.
The decoding procedure for sk 2 -trees is similar to that of the sk 1 -trees given in Figure 2,
and only the if-block has to be replaced by the one in Figure 6. We now use a f lag field for
each leaf w, with f otherwise. The value
field of w stores lower(w) if w is a leaf, and 0 if w is an internal node.
if value (tree pointer) ? 0
f
len /\Gamma value (tree pointer)
codeword string [start
if f lag (tree
f
codeword string [start
len
output
tree pointer /\Gamma root
start
Figure
Decoding using sk 2 -tree
When a leaf w is reached, the current codeword is initialized as having length lower(w).
This is the correct setting if w is a special leaf or if the next codeword has indeed length
lower(w). When w is not a special leaf (f lag(w) = 1), we check if by appending a zero at the
right end of the codeword, we get an integer value larger or equal to that of the first codeword
of length lower(w) + 1. If so, we update the current codeword to include also the following
bit.
The construction of sk 2 -trees is similar to that of the underlying sk 1 -tree. We again consider
the paths of nodes
only those nodes that appear in at least two different
paths; these are the internal nodes of the sk 2 -tree. The leaves are then added by filling in the
missing left and right children, some of which may be special leaves.
As to the space complexity of sk 2 -trees, note that in principle, several special leaves may
emanate from a single branch P (L
leaves the upper bound for the number of nodes
at O(min(n; k 2 )) as for sk 1 -trees. But in practice, special leaves are rare, because they appear
only in the very particular case when P (L
contained in either P (L
In the former case, the special leaves are right children of nodes in P (L
in the latter they are
left children. For example, referring to the tree in Figure 5, L
is a prefix of L
and generates a special leaf as a right child, whereas L
contains L
as a prefix and generates special leaves as left children. If for a given Huffman tree, there are
no special leaves in its associated sk 2 -tree, as was the case in all our examples beside the one
of
Figure
5, then the number of nodes is clearly there is exactly one
leaf for each range and the sk 2 -tree is a complete tree, i.e., each internal
node has exactly two children.
The sizes of the sk 2 -trees for our earlier example distributions are listed in Table 3. As can
be seen, even for huge Huffman trees with hundreds of thousands of nodes, this size is reduced
to several tens, and there is a 70-90% reduction even relative to the sizes of the sk 1 -trees.
number of Savings average Savings
Source nodes in rel. to number of rel. to
sk2 -tree sk1 -tree comparisons sk1 -tree
English 15 78% 3.444 18.0%
bigrams French 47 84% 3.757 18.7%
Hebrew
English 41 90% 4.842 15.4%
words French 41 91% 4.725 15.3%
Hebrew 33 90% 4.715 17.2%
trigrams French 43 89% 4.157 17.3%
Table
3: Time and Space requirements for sk 2 -trees
To evaluate the average number of comparisons, we take a sum similar to eqn. (2) over
all the leaves of the sk 2 -tree. For the special leaves, the formula of eqn. (2) applies. For
the others, let w be the prefix of the corresponding codeword, assume the leaf is labeled ',
jwj. Then the codewords corresponding to this leaf of the sk 2 -
tree are w0 . The first few of them are of length ' and the following ones of length
'+1. The exact cutoff point is not important, as the codewords correspond to the consecutive
indices in the range from I(w0 t 1). The probability of each
of these codewords should be multiplied by the number of necessary comparisons to detect
them, which is jwj + 1, since we need an additional comparison to decide if the length is ' or
1. This yields, using the same notations as for eqn. (2), the following formula:
i2fleaves in sk-treeg@ d
Table
3 gives the resulting averages for our examples. For the real-life examples, they give
a reduction of 50-64% relative to the regular Huffman decoding algorithm, and of 15-19%
relative to the algorithm using sk 1 -trees.
5. Final remarks
If pruning the skeleton tree turned out to be profitable in terms of both time and space,
shouldn't we climb up even higher and define sk d -trees accordingly, for d ? 2?
We can associate a value range-size with each node v of the sk 1 -tree, giving the size of
the set of the corresponding codeword lengths. The leaves of the sk 1 -tree have all range-size
those of the sk 2 -tree have range-size - 2. Consider a path that starts at any leaf of the
moves through parent pointers towards the root. The range-size values of the
nodes in this path form a non-decreasing sequence, the first value being 1, followed possibly
by several 2's, etc. Fixing, for all such paths, the last node with value 2 (if it exists) as a new
leaf yields the sk 2 -tree. Similarly, proceeding even further up to the last node with value 3
would yield an sk 3 -tree, etc.
However, the savings incurred by passing from the sk 1 -tree to the sk 2 -tree were caused
by the fact that several consecutive nodes on these paths had the range-size value 2, so that
the new leaves were several levels higher, and accordingly several comparisons could be saved.
But if the parent node of a node with range-size value 3 has also range-size value 3, the other
child of this parent node must have range-size value 1, which means that it is a special leaf.
We argued earlier that such cases are rare. Therefore, whenever no special leaf is involved,
passing from the lowest node with range-size value 2 to the lowest node with range-size value
3 would just let us climb one level and save one comparison. On the other hand, we need now
an additional comparison within the range of 3 values, so that in all these cases, nothing is
gained.
Of course, for the price of two additional comparisons, we could process, using binary
search, ranges of size 4 and not just 3. More generally, we need only r additional comparisons
after reaching a leaf of an sk 2 r -tree. Pushing this idea to its extreme with
would be no skeleton-tree at all, and we would find the correct length of a codeword using
a sequence of binary search steps in the list of first (or last) codewords for every codeword
length, as suggested in [22]. But with standard binary search, the search in a code with
maximal codeword length k takes exactly dlog 2 ke comparisons, which would be 4 or 5 for
our example distributions. Note that while the average number of comparisons with sk 1 -trees
is above that threshold for all the examples (Table 2), all the corresponding values for the
are below it (Table 3). It does therefore not seem necessarily worthwhile to pass to
sk d -trees, for d ? 2.
Moffat and Turpin [22] further suggest to use a biased binary search, since the probability
distribution of the codeword lengths is itself very skewed. For the first few bits of any code-
word, this approaches then a linear search. The skeleton-trees introduced in this paper are a
convenient data structure to perform a similar search efficiently.
--R
Is Huffman coding dead?
Ziff D.
Perl Y.
Fast searching on compressed text allowing errors
All about the Responsa Retrieval Project you always wanted to know but were afraid to ask
Rabinowitz J.
Moore E.
Information Retrieval
A method for the construction of minimum redundancy codes
Nemetz T.
The Art of Computer Programming
An application of informational divergence to Huffman codes
On the implementation of minimum redundancy prefix codes
Text compression for dynamic document databases
Kallick B.
Fast decoding of the Huffman codes
The Psycho-Biology of Language
A universal algorithm for sequential data compression
Compression of individual sequences via variable-rate coding
Adding compression to a full-text retrieval system
--TR
--CTR
Dana Shapira , Ajay Daptardar, Adapting the Knuth-Morris-Pratt algorithm for pattern matching in Huffman encoded texts, Information Processing and Management: an International Journal, v.42 n.2, p.429-439, March 2006 | canonical Huffman codes;skeleton trees;huffman trees;decoding |
594016 | Measuring Search Engine Quality. | The effectiveness of twenty public search engines is evaluated using TREC-inspired methods and a set of 54 queries taken from real Web search logs. The World Wide Web is taken as the test collection and a combination of crawler and text retrieval system is evaluated. The engines are compared on a range of measures derivable from binary relevance judgments of the first seven live results returned. Statistical testing reveals a significant difference between engines and high intercorrelations between measures. Surprisingly, given the dynamic nature of the Web and the time elapsed, there is also a high correlation between results of this study and a previous study by Gordon and Pathak. For nearly all engines, there is a gradual decline in precision at increasing cutoff after some initial fluctuation. Performance of the engines as a group is found to be inferior to the group of participants in the TREC-8 Large Web task, although the best engines approach the median of those systems. Shortcomings of current Web search evaluation methodology are identified and recommendations are made for future improvements. In particular, the present study and its predecessors deal with queries which are assumed to derive from a need to find a selection of documents relevant to a topic. By contrast, real Web search reflects a range of other information need types which require different judging and different measures. | Introduction
Publication of accurate and meaningful evaluation of the quality of results returned by public Web
search engines not only enables informed consumer choice but also assists and encourages search
engine operators to improve their standard of service. Since many search engines claim to be using
novel techniques, effectiveness comparisons between these engines and systems employing published
methods are potentially of interest to the Information Retrieval (IR) research community.
It is known that some search engine operators already perform extensive internal evaluations,
but it is not clear that these evaluations have the properties (blindness, independence, reproducibil-
ity) which would normally be expected of published studies in IR. On the other hand, it is possible
that the model of the user retrieval task implicit in these evaluations more accurately represents
everyday Web search than do the models assumed in much published IR work.
Countless evaluations of text retrieval systems eg. [16, 18] have measured the effectiveness of
relevance ranking schemes in the context of a well-defined static document collection for which
sufficiently complete relevance information is available. Such evaluations are reproducible and can
provide accurate measurements of recall (the proportion of all relevant documents which have been
retrieved so far) as well as precision (the proportion of retrieved documents which are relevant).
Early test collections, such as those described in [4] and [16] were small enough to permit
relevance judgments for every document against every request. Exhaustive judging is infeasible
with collections the size of TREC [18] and "almost complete" judgments are collected by assessing
only the pool of documents retrieved by a large and diverse set of retrieval methods. All unjudged
documents are assumed to be irrelevant.
TREC is subject to continual evolution and now models some specific features of Web search.
For example, in TREC-8, the Large Web Task involved blind effectiveness evaluations of retrieval
systems operating over 18.5 million pages crawled from the Web [11]. Each participant was required
to process 10,000 queries taken from Web search engine logs and return the top 20 ranked documents
for each. Approximately 50 queries were selected post hoc for relevance assessment using binary
measures. The large number of queries and the size of the data set served to rule out the use of
unrealistically inefficient algorithms.
Here, we report on the application of an extended TREC-8 Large Web task methodology to
the effectiveness evaluation of 20 public search engines. When evaluating public search engines
without the knowledge or cooperation of their operators, there is no fixed test collection and it is
consequently necessary to evaluate crawling and document retrieval algorithms in combination.
Finally, we present an analysis of the extent to which characteristics of Web search have been
captured by this experiment and argue for further methodological developments both to improve
the applicability of evaluation results and to reduce the cost of obtaining them.
2 Relationship to other studies
Gordon and Pathak [8] distinguish between two types of search engine evaluation: testimonials,
encompassing informal and impressionistic appraisals and feature-list comparisons; and shootouts,
which correspond more closely to traditional IR effectiveness experiments. Here, only the latter
are considered.
Gordon and Pathak present a table 1 of twelve earlier shootout studies but identify only three
(including their own) which make use of "appropriate experimental design and evaluation." Of
these, that of Gordon and Pathak is the most comprehensive and most recent. Ding and Marchionini
Table
1, p. 148.
[5] evaluated three engines on only five topics in 1996 and found no statistically significant difference
between effectiveness means. In 1997 2 Leighton and Srivastava [14] compared five engines using
topics and found that three of the engines were superior to the other two, using a new measure
based on precision at cutoff 20, but assigning different weights to the top three, next seven and
next ten results.
Leighton and Srivastava constructed a set of topics from a variety of sources which were intended
to model the information needs of undergraduate students. They themselves generated queries from
the topics. Seven queries were simple "bag of words" queries, seven were structured in some way
and one attempted to locate information about a person. Leighton and Srivastava used automatic
scripts to submit queries to the engines and fetch results. After suppressing information about
which engine had retrieved each page, they judged relevance themselves using four categories of
relevance. They also identified dead links and duplicate pages. They analysed their data several
times using different relevance thresholds and with and without penalising duplicates.
Gordon and Pathak obtained 33 real information needs from volunteers among the faculty
members in a university business school. These were recorded in considerable detail and passed to
skilled search intermediaries who were given the task of generating near-optimal queries for each of
eight search engines by an interactive, iterative process. The top 20 live results generated by each
of the engines in response to the final queries were then printed and returned to the originating
faculty member for assessment on a four point relevance scale. They found that search effectiveness
was generally low, that there were significant differences between engines and that the ranking of
engines was to some extent dependent upon the strictness of the relevance criterion.
The characteristics of the Leighton and Srivastava and Gordon and Pathak studies are compared
with the present experiment in Table 1. We compare our results with those of Gordon and Pathak
in Section 4.3.
2.1 Evaluation philosophy
Gordon and Pathak 3 present a list of seven evaluation features which they claim should be present
to maximise accuracy and informativeness of evaluation. Paraphrasing for brevity, these are:
1. Searches should be motivated by genuine user need.
2. If a search intermediary is employed, the primary searcher's information need should be as
fully captured as possible and transmitted in full to the intermediary.
3. A large number of search topics must be used.
4. Most major search engines should be included.
5. The most effective combination of specific features of each search engine should be exploited.
Ie. the queries submitted to the engines need not be the same.
6. Relevance judgments must be made by the individual who needs the information.
7. Experiments should be well designed and conducted.
Features 3 and 7 are essential features of a useful scientific study and Feature 2 is certainly
desirable (when applicable). However, the value of Feature 4 is dependent upon the goals of the
evaluation. For general-purpose evaluation, we propose an additional feature:
2 the work was not formally published until 1999
3 p. 146
8. The search topics should represent the range of information needs both with respect to subject
and to type of results wanted. (See Section 6 below.)
The remainder of the features in the original Gordon and Pathak list merit detailed discussion.
Restricting searches to genuine user needs (Feature 1) and requiring that the person with the
original need should evaluate the results (Feature must inevitably limit the scope of evaluations.
For example, the Gordon and Pathak study itself was limited to the information needs of faculty
members in a business school.
We acknowledge that judgments of relevance vary from person to person and from time to time.
However, there is empirical evidence that retrieval system rankings remain stable across different
sets of relevance judgments[21]. We would prefer to say that searches should be representative
of genuine user need and that relevance judging across the aggregated search results should be
consistent (one judge should evaluate all responses to a topic in as short a time as possible.)
Feature 5 is quite contentious. All well-known public search engines are designed to produce
a list of results when a set of query words (without operators or special syntax) is typed into the
search box provided. It is therefore perfectly reasonable to compare the quality of results produced
by search engines given identical input queries in this form. Furthermore, such queries are far more
typical of Web search than are sophisticated queries exploiting advanced query language features.
Analyses of query logs ([17] for example) show that typical search engine users very rarely use any
form of query operator and, when they do, they frequently make errors.
Measures obtained by studies which adopt the approach of trying to find the best query formulation
for each search engine (Feature 5) are certainly interesting, particularly if they indicated
that these "near-optimal" queries performed dramatically better than simple queries. However,
the Gordon and Pathak study did not compare the performance of the highly tuned queries with
simpler versions such as the initial Boolean queries supplied by the search originators or simple
word lists.
Unfortunately, in order to achieve the fifth desideratum within their own study, Gordon and
introduced a set of confounding variables due to the introduction of skilled search intermediaries
charged with converting user topic specifications into near-optimal queries for each engine.
What they have evaluated is in fact a set of combinations of human intermediary and search engine,
with all the human variability that that entails.
The use of human intermediaries also seems somewhat inconsistent with the reasoning behind
requiring relevance assessments to be conducted by the originator of the information need (Feature
6). In order to form queries from the original user's topic statement, and to judge which variant of
a query performs best, the intermediary must make the same type of interpretations which would
need to be made by relevance judges other than the topic originator.
3 The experiment
We applied TREC-style methodology to the evaluation of Web search engines, as they operated on
September 20, 1999. Because we used queries taken from real query logs, our study exhibits all of
the eight features listed in the preceding section, except for those numbered 2 (not applicable), 5
and 6. As discussed in the preceding section, we feel that there are strong reasons not to adopt
Feature 5 and reasons why Feature 6 may not necessary.
Table
1: Comparison of the present experiment with the two most closely related previous studies. Notes:
a - including stopwords. b - Subject to the result page changeover bug for some engines (see text). c - The
operation of the RAT (Relevance Assessment Tool) is described in the text. d - plus duplicate and dead link
categories.
Detail Gordon and Leighton and The present
Number of search engines 8 5 20
Number of topics 33 15 54
No. relevant found per topic 5-125, mean 42.2 not stated 2-255, mean 88.5
Date queries submitted 1998 early 1997 20 Sep. 1999
Information needs
presumed
originators faculty members library clients anonymous searchers
- length of topic statement approx. 100 wds 4.9 wds 5.9 wds
- range of subjects business broad broad
- types of answer required selection of rel. pages selection of rel. pages a variety
Queries
How generated? human intermediary by experimenter from from Web logs
verbal requests (verbatim)
Average number of words not stated 4.9 5.9 a
Used query operators yes some no
- How many results judged top 20 live top 20 top 20 live b
How were pages judged?
- by whom inquirers experimenters research assistants
- by topic originator yes no no
- result lists merged? yes yes yes
- blind judging yes yes yes
- follow hyperlinks no no no
images both raw HTML rendered text
presentation printed paper EMACS text editor browser
page truncation after ten pages no no
- order of presentation random not stated increasing length
- auto. search aids for judging none not stated RAT c
Relevance categories 4 4 d 2
Measures reported
- P@20 in graphs weighted yes b
- P@15-20 yes no no
average P@1-5 yes no yes
Prec. based on strict rel. yes yes no
- MRR1 no no yes
- relative recall @ 20 yes no no
TREC-style ave. prec. no no yes
3.1 What was evaluated?
Most current Web search engines consist of two key components. One is a crawler [12] whose job
it is to create a Web snapshot 4 " by identifying, selecting and fetching documents and the other is
a text retrieval system (TRS) operating over the snapshot collection.
The quality of search results clearly depends upon the performance of both search engine com-
ponents. Relevant document documents may fail to be retrieved either because they were not
fetched by the crawler or because the TRS failed to rank them appropriately. There is evidence
[10] which suggests that precision at fixed cutoff increases with collection size.
We evaluated both components in combination. This is a necessary extension of conventional
evaluation methodology, in which there is a static, well-defined test collection and only the TRS is
evaluated.
3.2 Which search engines?
Lawrence and Giles[13] report measurements taken in February 1999, of the coverage and freshness
of indexes maintained by Web search engines. These measurements relate principally to the
performance of the crawler rather than the TRS. They found that none of the most popular search
engines covered more than 16% of their estimated total of 800 million indexable web pages 5 .
To add an extra dimension to the data presented by Lawrence and Giles, we measured the
result-list precision of all eleven engines considered in their study: Northern Light, Snap, AltaVista,
HotBot, Microsoft, Infoseek, Google, Yahoo, Excite, Lycos and Euroseek. We added:
1. Two metasearch engines: MetaCrawler (mentioned but not studied by Lawrence and Giles
and accessing About.com, AltaVista, DirectHit, Excite, GoTo.com, Infoseek, Looksmart,
Lycos, Thunderstone, WebCrawler and Yahoo) and Inquirus (operated by Lawrence and
Giles on a limited-access basis and accessing AltaVista, DirectHit, Euroseek, Excite, Fast,
Google, Hotbot, Infoseek, Lycos, NorthernLight, Open Directory, Snap, Thunderstone, Yahoo
and Yahoo/Inktomi). Metasearchers do not index documents themselves but rather forward
queries to a number of primary search engines and form a composite result list.
2. FAST (also known as "AllTheWeb", a new large search engine which aims to index the whole
of the Web;
3. EuroFerret, another Europe-focused search service we wished to compare with EuroSeek;
4. DirectHit, a system which takes page popularity (in terms of access frequency) into account
when ranking pages;
5. Three search engines providing search within the Australia and New Zealand area: ANZwers,
ExciteAus, and Web Wombat;
6. A directory service (LookSmart Australia). This service presents Australian results first but
then appends results from its Looksmart Worldwide counterpart.
Note that several of these services are not fully automatic and generate responses at least
partially on the basis of classifications made and stored by human editors. Prominent examples
include the Yahoo, Lycos and LookSmart Australia directory services. Given that these services
4 This term captures the intention but not the long-drawn-out and incomplete nature of actual crawls.
5 Any item accessible via the Web is conventionally called a Web page. When printed, a Web page may cover many
pages or just a few lines.
accepted queries and presented results in a fashion which appeared to be ordered, we considered that
it was reasonable to evaluate them alongside search services whose degree of manual intervention
is less.
Our list of twenty engines included all of those in the Gordon and Pathak [8] study except for
OpenText and Magellan. The overlap between the two studies therefore comprises six engines:
AltaVista, Excite, Infoseek, Hotbot, Lycos and Yahoo. Leighton and Srivastava [14] studied the
first five of these, but did not report comparable measures.
3.3 Queries and result lists.
We started with two sets of 100,000 single-sentence "natural language" queries from logs supplied
to us by Alta Vista [1] and Electric Monk. [7] We used natural language queries because we believed
that it would be easier for our judges to interpret what it was that the inquirer was actually seeking.
We merged the two sets and filtered out queries which were either likely to be offensive to some
people or which contained fewer than two non-stopwords 6 . We then randomly selected queries from
the merged set and asked an experienced judge to decide whether she and her colleagues would be
able to interpret what it was the inquirer was seeking and be able to judge the relevance of results
returned. She rejected 719.
who are the current supreme court justices?
historic preservation
where can i find gif files?
where can i find film reviews?
how do i create a web site?
where can i find the best jokes?
where can i find information on russia?
how does a digital camera work?
thalidomide and multiple sclerosis
slobadan milosevic
hindenburg disaster
old japanese science fictions movies
where can i find information on school violence?
what are some psychological principles and attitudes for advertising
why do feet smell?
armstrong louis
where can i find statistics for education in the united states?
methodist sermons
egyptian history
wall street journal
how to start business
find information about american anarchists
reasons for studying marketing
where can i find the saints and the catholic church?
show me a list of vegetarian restaurants in new york city.
Figure
1: A sample of the queries used in the experiments.
6 A stopword is a functional word like "the", "and", "of ", and "but".
A total of 59 queries were accepted but due to a pair of near-duplicate queries and problems of
assessor availability, 57 were judged for the TREC Large Web track and a subset of 54 for the search
engines. A sample of the judged queries is shown in Figure 1. We did not correct typographical
errors in the queries (such as "slobadan" in the figure). They were submitted to the search engines
exactly as shown.
We used scripts to present each of the queries to each search engine. The first 20 "live" results
from each engine for each query were retrieved and merged into a single pool of pages to be judged.
To enable fair comparison with TREC systems, "dead" or inaccessible results were ignored and
engines were not penalised for returning them.
3.4 Relevance assessment
We employed a team of six judges, each of them an Australian with a University degree, but with
no specific expertise in Computer Science or Information Retrieval, and no allegiance to any search
engine or retrieval system. We asked them to judge whether documents were relevant to particular
queries. The pages retrieved by all search engines were combined into a single pool for each query
and presented to the judges without indication of which search engine(s) had retrieved them. The
documents were rendered using a text-only browser (Lynx, [15]) and images or sounds were not
presented. Hyperlinks were presented as numbered references, eg. [4], but the judges could not
follow them.
We asked judges to imagine that they themselves had submitted the queries and to evaluate the
answers on that basis. However, we also instructed them to judge each document independently of
the others and to score as relevant any page which included material which was "on-topic" and which
contributed information not contained in the query. We asked them not to make any judgment
about the correctness of information given and not to require that pages returned in response to
a question were in the form of an answer. In line with past TREC methodology, judgments were
binary and made on the basis of textual content alone. Either a document contained relevant
content and was judged relevant or it was judged irrelevant.
To ensure consistency of results, all the documents retrieved for a query were judged by the
same person. Each document retrieved in response to a query was judged by only one judge, as
earlier work ([9] and [21]) failed to demonstrate any particular benefit of multiple judgments.
Our Relevance Assessment Tool
We used special relevance judging software known as the RAT (Relevance Assessment Tool) which
was developed by Jason Haines and Paul Thistlewaite in 1996 for use in the TREC Very Large
Collection and Web tracks. Since then it has been maintained by Nick Craswell. Figure 2 shows a
screen snapshot of the RAT in action.
Before commencing judgments for a new query, each judge was required to enter concepts they
would use in evaluating relevance and a criterion of relevance. For example, the concepts for
the last query in Figure 1 were "vegetarian", "restaurants" and "new york" and the criterion of
relevance was the conjunction of all concepts.
We encouraged judges to accumulate lists, using RAT facilities, of words, phrases and part-
words which in their view constituted evidence for the presence of each concept. For example,
"ny", "yc" 7 , "manhattan" and "new york city" as well as "New York" constituted evidence for the
presence of the "New York City" concept. Judges entered evidence either by typing into an add
evidence box or by selecting text from presented pages.
7 We don't know why this was chosen.
Figure
2: A screenshot of the Relevance Assessment Tool (RAT) used in the present experiments. Coloured
rectangles representing the concepts are at the top. (In this case, Concept 0 was a dummy entry created
by the assessor because she didn't like the colour assigned to it!) The list of documents seen so far is
shown at top left, and the text of the current document (with highlighting of concept evidence) on the right.
The bottom left panel includes the text of the current query as a heading but is otherwise unused. The
description and narrative fields would be filled in if TREC ad hoc topics were being judged. A judgment for
the current document is recorded by clicking on the appropriate icon at the far top right of the screen. Once
the judgment has been made, the Next document button is enabled unless this is the last document for the
topic, in which case the Next topic button is enabled. At any point within a topic, the judge may revisit
previously seen documents (which will be displayed with all the concept evidence currently available) and,
if desired, change their judgment.
The RAT displays concept and criterion information throughout the judging process as an aid
to maintaining consistency. However, the information was provided for assistance only and judges
were free to make judgments regardless of whether criteria were actually satisfied or not 8 .
As shown in Figure 2, occurrences of evidence were highlighted in each document by the RAT in
the colour associated with the concept, enabling the judge to easily spot multi-coloured, potentially
relevant sections in long documents. A hypothetical document containing the sentence, "Luigi's
pasta restaurant at 2301 7th Avenue, Manhattan caters for both vegetarians and vegans." would
thus show highlighting in all three colours. The judge could instantly home in on the sentence, and
decide that the document is relevant. He or she might also decide to save the part-word "vegan"
as additional evidence for the vegetarian concept.
Over the 54 topics, the number of concepts defined per topic by the judges ranged from 1 to 8
(mean 3.7) and the average number of pieces of evidence defined (for all concepts combined) was
30.9.
The order of presentation of documents for judging has been shown to affect the judgments
made [6]. When we first used the RAT in TREC-5 (1996), we compared three different presentation
orders: ascending length, descending length and random.
We found that descending length was impractical because judges felt that they needed to read
all of a long document in order to be sure that sections of it were not relevant. In the most extreme
case, a judge spent more than six hours on a single document 9 .
By contrast, judges found that working from the shortest documents first enabled them to
accumulate sufficient evidence to be confident that when they reached a very long document, they
could use scrolling to quickly locate the paragraphs which contained potentially relevant material
with a low probability of missing relevant material.
We concluded that presentation in ascending length order increased the probability that short
relevant sections in long documents would be identified by maximising the highlightable evidence
available. Accordingly, we have used this presentation order in all judging since 1996.
In the Eisenberg and Barry study, the documents had already been assessed on a multi-level relevance
scale. They found that when documents were presented in relevance order, either increasing
or decreasing, subjects tended to "hedge" on the first documents seen by allocating scores closer
to the mean than they would have otherwise. It seems very unlikely that this effect was present in
our experiment as:
1. Hedging is not possible when there are only two possible relevance values.
2. Our judges were free to reassess previously judged documents if they felt that they had been
too harsh or too lenient.
3. The association between document length and relevance is unlikely to be strong. The judge
would have no reason to expect that the first document would or would not be relevant.
4. Order effects would only have confounded our comparative results if certain engines tended
to disproportionately return very short or very long documents.
8 The RAT does have a mode in which relevance of documents is automatically determined using the concepts,
criteria and evidence supplied by the judge. Any discrepancies between the automatic and the manual judgments
result in an alert, which requires the judge to either accept the automatic judgment or to override it and record a
reason. This mode was not used in the present experiments.
9 NIST judges working with documents from the same TREC collections judge several hundred documents per day
on average.
3.6 Measures used
Judgment of the first 20 live results allows calculation of a range of precision-oriented measures
including precision at n 20 documents retrieved (P@n), mean reciprocal rank of first relevant
document (MRR1) and TREC-style average precision (TSAP) 10 .
Unfortunately, data analysis long after the data was collected revealed a bug in the scripts
used to send queries and fetch result lists and documents. This meant that for some engines (nine
altogether) where the queries contained a question-mark (29 out of 54), the script failed to move
to the second page of ten results 11 meaning that some results lists were artificially truncated. For
the engines affected by this bug, P@n (10 ! n 20) would certainly be underestimated. It is also
likely that comparison of engines on precision at earlier cutoff (10, 9, .) would be unfair because
dead links in the first ten results were replaced with live ones for the engines not subject to the
bug.
Available evidence suggests that most Web users generally look at very few results indeed.
Silverstein et al [17, Table 7, p. 10] report that for a sample of over half a billion queries submitted
to Alta Vista, 85.2% requested only a single result page. Accordingly, and to completely avoid
the effects of the bug, our main analysis is based on the first seven live results. However, we
acknowledge that precision at very early cutoff is likely to result in less stable system rankings (see
Buckley and Voorhees [3]), and statistical significance is likely to be harder to achieve than for later
cutoffs.
For compatibility with Gordon and Pathak's study, we performed our principal analyses on
P@1-5, the average of the precisions at cutoffs 1.5. We also present results for P@1, MRR1, and
TSAP and plot P@n against n separately for the groups of engines affected and not affected by the
bug.
Unlike Gordon and Pathak, we did not measure recall, since the meaningfulness of the recall
values depends heavily upon the accuracy of estimates of how many relevant documents there really
are.
Our main results are presented in Table 2 and in Figures 3 to 9.
As shown in Figure 3 the range of values recorded for P@1-5 was quite large. A multiple analysis
of variance (MANOVA 12 ) of the P@5 data, confirms that there is a significant difference in the
performance of the search engines, F (19;
In TREC, average precision for a topic is based only on precision values at each point in the ranking where a
relevant document is retrieved. Average precision is obtained by dividing the sum of these values by the number of
relevant documents in the collection. Here, it is unknown how many relevant documents there really are and rankings
are cut off at 7 rather than 1000. Accordingly, here the sum is divided in each case by 7 and the result is called
TREC-style average precision at cutoff 7. TSAP is an average of precisions and unlike the true TREC measure does
not include a recall component.
A system for which all 7 documents retrieved for a query were judged relevant would score 1.0 on this measure;
One for which only one retrieved document was relevant would score between 1=7 and 1=49, depending upon the
position of the relevant document in the ranking.
Note that although for each individual topic TSAP scores are a constant multiple of what the TREC average
precision would have been at the same cutoff, the multiplier varies from topic to topic. Consequently, across-topic
averages of the two measures are not simply related.
11 For some engines we requested a generous number of results in a single page. For other engines we didn't know
the necessary URL syntax to do this and requested results page by page.
12 In this MANOVA, the repeated factor was Queries, the independent group factor was Search Engines and the
dependent measure was P@1-5. A multiple rather than a univariate model was selected as the latter is sensitive to
violations in sphericity which are common in repeated measures designs.
NorthernLight Inquirus Google InfoSeek AltaVista Microsoft LookSmart MetaCrawler HotBot EuroFerret Lycos Snap Fast Excite DirectHit Yahoo Exciteaus WebWombat ANZwers EuroSeek
Search engines as at 20 Sep 19990.20.40.6
Srch. Eng. Types
General
Metasearcher
European
Australia/NZ
Figure
3: The 20 public search engines compared on the basis of precision averaged across cutoffs 1-5 (P@1-
5). The type of search engine (general, metasearch, or regional) is color-coded according to the key at top
right. Each horizontal black line gives the corresponding performance for a 1999 TREC system. See Section
4.2 and
Table
4 for details.
Table
2: Summary of results for the twenty search engines. These are based on the first seven live results.
TSAP means TREC-style average precision, MRR1 is the mean reciprocal rank of first relevant document
and P@n means precision at n documents retrieved. P@1-5 is the average of precision values at each ranking
cutoff from 1 to 5.
Run TSAP MRR1 P@1 P@5 P@1-5
ANZwers 0.1111 0.2673 0.1852 0.1667 0.1787
AltaVista 0.3714 0.582 0.5 0.4519 0.4691
EuroFerret 0.284 0.5553 0.4444 0.3704 0.4043
Excite
Exciteaus
Fast
Google 0.3939 0.6133 0.463 0.4889 0.4848
HotBot 0.3064 0.5705 0.463 0.4111 0.4196
InfoSeek
Inquirus 0.404 0.5833 0.463 0.4963 0.4965
LookSmart
MetaCrawler 0.3075 0.5764 0.4259 0.4222 0.4329
WebWombat
Northern Light is the top ranked engine on the basis of P@1-5 but differences between it and
the next nine engines are not statistically significant. Differences between NorthernLight and the
engines below EuroFerret (Lycos, SNAP, Fast, Excite, DirectHit, etc.) are all significant,
All 190 pairwise correlations between the engines were positive, Pearson r values ranging from
0.066 to 0.885. Of these, 155 of the correlations achieved significance (p ! 0:05). Four pairs
exhibited correlations in excess of 0.7. They were (Looksmart, AltaVista), (Microsoft, AltaVista),
(SNAP, Hotbot) and (Microsoft, Looksmart). It is understood that at the time of the evaluation,
that SNAP and Hotbot both used Inktomi search technology and that there were commercial
relationships between (Microsoft, Looksmart), (Microsoft, AltaVista) and (AltaVista, Looksmart).
Table
2 shows that the search engine rated by Lawrence and Giles as having the largest coverage
(NorthernLight) also scored highest on all of the measures except TSAP. However, the FAST engine
which claimed a coverage nearly 50% larger than NorthernLight, performed relatively poorly. Figure
4 shows a scatter plot of coverage against P@5 for the Lawrence and Giles engines. The correlation
between P@5 and coverage is not statistically significant.
The two metasearch engines performed creditably, but not as well as the best individual engines.
A metasearcher works by broadcasting incoming queries to a large number (11 and 14 in these two
examples) of primary search engines and merging their results lists. Metasearchers therefore achieve
a very high effective coverage.
Not surprisingly, given the general nature of the test queries, the unrestricted-domain search
engines generally achieved better results than those restricted to European and Australasian domains
Figure
5 shows the mean reciprocal rank of first relevant document (counted as zero if no relevant
document appeared in the first 7 results). If the first relevant document appears in the second
position, the reciprocal rank is 0.5. Figure 6 compares performance on the TSAP measure(explained
in Section 3.6).
Figure
7 compares performance on the basis of P@1, which is equivalent to the probability
that the first result is relevant. A nonparametric test revealed a highly significant difference in the
performance of the engines on this measure, Cochran
There are many more tied scores on P@1 than on P@20, reflecting quantisation due to the fact
that there are only 54 possible scores in the former case and 1080 in the latter. Note that Euroseek
did not find a single relevant document at rank 1 and scored zero on this measure.
Figure
8 documents the variation of P@n as n varies from 1 to 20 for the search engines not
affected by the result changeover bug. Figure 9 shows the variation in P@n for the remaining
enginges over the range of n which was not affected by the bug. Ignoring fluctuations at small
exhibited a very gradual decline in P@n across the range studied. This general
pattern was also found for all of the engines shown in the corresponding Gordon and Pathak figure
Figure
1, p. 156), except OpenText (not studied here.) DirectHit and Yahoo in the present study
were also exceptions. For them, P@n declined more sharply.
4.1 Inter-correlation of measures
Table
3 shows the Pearson r intercorrelations between four different measures, based on the top 7
results. All are significantly inter-correlated (p ! 0:01). Similar, and in some cases even higher,
intercorrelations were observed for the combined TREC and search engine groups.
Considering only the eleven engines not affected by the result-page bug, there is a correlation
of 0.965 (p ! 0:01) between P@5 and P@20 and of 0.868 between P@1 and P@20 (p ! 0:01)
4.2 How do search engines compare with 1999 TREC systems?
The performance of groups participating in the TREC-8 Large Web Task is reported in detail in
[11] and summarised in Table 4. The queries judged in the Large Web Task were a slightly larger
superset of the queries used in the present study. TREC results reported here have been re-analysed
to take into account only the data for the 54 queries judged for both the TREC systems and the
search engines.
These TREC results are also represented as horizontal black lines in Figure 3, 5 and 7. Instead
of crawling their own data from the current web, these runs used the first 18.5 million pages
(100 gigabytes) of a crawling run carried out in early 1997. Each TREC run thus simulates the
operation of a search engine with small and out-of-date coverage (comparable to the size estimated
by Lawrence and Giles for Lycos).
Documents for the TREC systems were judged in a separate batch from the search engine
documents but the judges assigned to each query were the same, the presentation of documents
was identical and all other conditions were held constant. The TREC batch was judged first,
with judging of the search engine batch following immediately afterward. Concepts and evidence
accumulated with the Relevance Assessment Tool (RAT, see Section 3.5) during the TREC judging
was carried over to the search engine batch. The number judged was 11,654 of which 25.8% (3008)
13 The Cochran Q test is a non-parametric test for determining if a series of related samples differ in circumstances
where data is based on a nominal or dichotomised ordinal scale of measurement. The P@1 data was of the latter
type as P@1 scores for individual queries must be either 1 or 0. A related samples test was appropriate because each
query was sent to each of the 20 engines.
coverage (% of Web)
Figure
4: The relationship between coverage (percentage of estimated publicly indexable Web, as reported
by Lawrence and Giles) and P@5, for the eleven Lawrence and Giles engines plus FAST, whose claimed size
was known at the time of the experiments. The Pearson R coefficient of correlation was 0.370, which is not
significant at the 0.05 level(two-tailed.)
Table
3: Intercorrelation of various measures for the twenty search engines. TSAP means TREC-style
average precision, MRR1 is the mean reciprocal rank of first relevant document and P@n means precision
at n documents retrieved.
Measure TSAP MRR1 P@1 P@5
NorthernLight Google Microsoft InfoSeek Inquirus AltaVista MetaCrawler HotBot LookSmart EuroFerret Lycos Snap Excite Fast
Exciteaus DirectHit Yahoo WebWombat ANZwers EuroSeek
mean
recip.
rank
of
first
rel.
page
Search engines as at 20 Sep 19990.20.40.6Srch. Eng. Types
General
Metasearcher
European
Australia/NZ
Figure
5: The 20 public search engines compared on the basis of mean reciprocal rank of the first relevant
page found. Engines scored zero for a query if no relevant document was found in the first 7 results. Colors
identify the type of search engine. Each horizontal black line gives the corresponding performance for a 1999
TREC system.
Table
4: Summary of results for the participating groups in the TREC-8 Large Web task. The results
presented are the averages of all the runs submitted by each group. TSAP means TREC-style average
precision, MRR1 is the mean reciprocal rank of first relevant document and P@n means precision at n
documents retrieved.
Run TSAP MRR1 P@1 P@5 P@1-5
UMass 0.3927 0.5698 0.463 0.4741 0.4741
ACSys
AT&T Research 0.507 0.7074 0.6111 0.6074 0.6178
Microsoft Research 0.4561 0.6528 0.5741 0.5333 0.5449
MSR/City Univ. 0.457 0.6582 0.5926 0.5259 0.5512
Inquirus Google NorthernLight AltaVista InfoSeek LookSmart Microsoft MetaCrawler HotBot Fast Snap Lycos EuroFerret Excite DirectHit Exciteaus Yahoo WebWombat ANZwers EuroSeek
TREC-Style
Average
Precision
Search engines as at 20 Sep 19990.20.4Srch. Eng. Types
General
Metasearcher
European
Australia/NZ
Figure
The 20 public search engines compared on the basis of TREC-style average precision, based on
top 7 rankings. Colors identify the type of search engine. Each horizontal black line gives the corresponding
performance for a 1999 TREC system.
NorthernLight AltaVista Microsoft Inquirus HotBot LookSmart Google EuroFerret InfoSeek MetaCrawler DirectHit Fast Excite Lycos Exciteaus Yahoo Snap
WebWombat ANZwers EuroSeek
Probability
that
first
result
is
relevant
Search engines as at 20 Sep 19990.20.40.60.8
TREC systems
General
Metasearcher
European
Australia/NZ
Figure
7: The 20 public search engines compared on the basis of P@1. Colors identify the type of search
engine. Each horizontal black line gives the corresponding performance for a 1999 TREC
P@n
Inquirus
Google
EuroFerret
Metacrawler
DirectHit
Excite
Lycos
ANZwers
Figure
8: The variation of P@n with n for the engines not affected by the bug (ranked on P@1).
were judged relevant. The number relevant per query ranged from 1 - 136, with a mean of 55.7.
The maximum achievable mean P@5, based on total known relevant pages, was 0.9259.
The group of TREC systems was compared with the group of search engines using separate
Mann-Whitney U 14 tests for each of the following measures averaged across queries: P@1, P@5,
P@1-5, MRR1 and TSAP. On each measure the TREC systems are significantly better (p !! 0:05
in all cases).
4.3 How do the present results relate to those of Gordon and Pathak?
Figure
compares P@1-5 scores (lenient cutoff) obtained by Gordon and Pathak with the corresponding
scores for the same engines obtained in the present study. As shown the results are
highly correlated.
In
Figure
a line of best fit which passes through the origin has a slope of about 1.5. In other
words, our P@1-5 scores tended to be 50% higher than those observed by Gordon and Pathak
(based on their lenient encoding), despite the advantage presumably conferred by use of highly
tuned queries and advanced query syntax. This may be explained either by a systematic difference
in topic difficulty, or by a difference in judging standards.
Our main findings are as follows:
1. There was a high correlation (0.89) between the P@1-5 scores from this study and those
reported by Gordon and Pathak for their experiment conducted a year earlier than ours.
This was surprising because we expected that updating of indexes and improvements to
algorithms would have caused much more volatility. Furthermore, there were considerable
differences in the way the two studies were conducted.
2. We found no significant correlation between index coverage and early precision (P@5). (Figure
4.) Provided that coverage is sufficient to include enough relevant documents for the chosen
topics, the ranking algorithm seems to be the determining factor. Coverage would become
more critical if the queries had very few relevant answers or if the task were different (for
example, if it involved locating obscure known items, or locating ALL documents matching
a specification).
3. In the present experiment, TREC Large Web systems as a group outperformed the search
engines. However, the performance of the best search engines approached (and in one case
surpassed) the median performance of the participants in the TREC-8 Large Web Task.
Figures
5, 6 and 7.) This suggests that some search engines are indeed using reasonably
good retrieval methods. However, it should be noted that the Large Web collection was
only a small fraction of the size of the data indexed by NorthernLight and Google. Previous
work [10] shows that precision at fixed cutoff tends to increase as collection size increases.
Furthermore, TREC participants almost certainly sacrificed some of the effectiveness of their
methods in order to achieve speed of processing and are therefore not fully representative of
TREC state-of-the-art. There is still room for improvement.
The VLC2 content was nearly three years out of date with respect to the Web at the time of
our experiments. More importantly, we believe it was out-of-date with respect to the query
14 The Mann-Whitney is a non-parametric test of the difference between two independent groups. A non-parametric
test was selected because of the small sample size of the TREC group.
P@n
Alta Vista
HotBot
Looksmart
Infoseek
Fast
ExciteAus
Yahoo!
WebWombat
EuroSeek
Figure
9: The variation of P@n with n for the search engines which were affected by the bug (ranked on
(present
study)
P@1-5 (Gordon and Pathak)
Figure
10: The 6 public search engines included in both the Gordon and Pathak study and the present
experiment. The correlation coefficient of the scores is 0.89 which is significant at the 0.05 level (two-tailed).
set as well. It is not known precisely when the queries employed were originally submitted but
they were obtained from the search engine companies in late 1998 and early 1999. However,
none of the queries seem to relate to subjects which would have been well covered on the Web
in 1997 but not in 1999. Any slight bias due to the age of the VLC2 crawl is likely to have
operated in favour of the search engines rather than against them.
4. For the great majority of engines, P@n declined very slowly with increasing n. (Figures 8
and 9.)
5. A very high intercorrelation of measures was observed. (Section 4.1.) P@20 for the engines
with complete result lists is very strongly predicted by P@5 and almost as strongly predicted
by P@1.
6. Despite very large effective coverage, the metasearchers did not outperform the best individual
engines. We have calculated that a hypothetical metasearcher which broadcast queries to all
20 engines in this study could achieve a P@5 score of 0.9741 on the test queries if it had
used an ideal merging algorithm 15 . Its precision would be less than perfect because of the 3
queries for which the total number of relevant pages returned by all engines was less than 5.
The large gap between actual and potential performance of metasearchers suggests a possibly
fruitful avenue for the improvement of search engine quality. Given that some metasearchers
(such as Inquirus) perform merging by downloading all the result documents and reranking
on the basis of their content, it may be possible to find merging methods which are capable
of substantially narrowing the gap.
5.1 Reliability of results
How subject are the above search engine evaluations to the vagaries of human judgment? It is known
that agreement between human relevance judges is less than perfect. Voorhees and Harman [20,
p.8] reported a 71.7% rate of unanimous agreement between three assessors over 14,968 documents.
However, as previously noted, Voorhees [21] found that, while substituting relevance judgments
made by different human assessors changed the magnitude of scores, it had almost no effect on the
rank order of systems.
5.2 Representativeness of queries
Three potential biases affected our method for selecting queries (Section 3.3). The 200,000 queries
constituting the initial pool were taken from the query logs of two different search engines. They
may have been biased by user perceptions of the characteristics of the two particular engines, by the
client demographics of those engines, and by the fact that the queries were in both cases submitted
to a "natural language" interface. We introduced further biases by excluding adult-content queries
and by allowing a single judge to select queries which she felt that she and her colleagues would be
able to judge.
To what extent are these biases compatible with desirable features of search engine evaluation,
particularly our own modification and extension (Figure 11) of Gordon and Pathak's list? Against
Feature 1, we can be reasonably confident that most of the judged queries were submitted as a result
of some real information need. Apparently flippant queries such as, "who are you?", and empty or
incomplete queries are occasionally found in the logs but no obvious examples were accepted for
An ideal merging algorithm is one capable of producing a merged list in which all relevant documents in the
primary results lists appear first.
judging. Some queries may have been submitted for testing purposes (as in our own study) but
the proportion is almost certainly negligible.
Feature 4 suggests that queries should be representative of the full range of information needs
over which it is desired to draw conclusions, both with respect to subject and to type of results
wanted. As can be seen from Figure 1, the queries we employed covered a very broad range of
subjects, including politics, history, psychology, music, medicine, religion, humour, technology,
geography, science and finance.
However, all our queries appear to be at the "general-knowledge" level. Our results may not, in
general, accurately predict the performance of search engines when queries are posed and evaluated
by subject experts, despite the fact that they are correlated with the Gordon and Pathak results
for expert queries.
Despite the selection biases identified above, we are fairly confident that our results would
predict search engine performance reasonably well for general, non-adult-content queries, provided
the same evaluation methodology were employed.
In our view, the major limitation of our study (and most of its predecessors) lies in our failure
to represent the range of result types wanted and to apply appropriate evaluation for the different
types. Performance on a "find a range of relevant pages" task may not predict at all well the
performance on a "find a homepage" task. This issue is discussed in detail below.
5.3 Effect of spelling errors
As noted earlier, some of the test queries contained spelling errors. These errors were not corrected
for use in TREC-8 Large Web. This was something of a departure from convention for TREC
participants because TREC ad hoc topics are almost free of such errors.
Judges looked for documents satisfying the apparent intent of the query, rather than literal
matches. Accordingly, systems able to detect and correct spelling errors may have been at a small
advantage relative to others. We have no information about which systems (if any) employed
spelling correction.
6 Future Web search evaluation
Unfortunately, in the absence of a standardised Web test collection with complete relevance judgments
and a willingness of search engine companies to use it, there is little prospect of reproducible
Web search engine evaluation. Nonetheless, search engine effectiveness evaluation is necessary. Future
Web search evaluations should adhere to sound experimental methods, such as blind judging
and statistical significance testing while improving on the methodology adopted by the present
study and its predecessors.
There are a number of ways in which future Web search evaluations could more accurately
model Web search.
1. Future evaluations should recognise that retrieval corresponding to different types of information
need require different evaluation techniques. Searcher information needs may be broadly
classified on the basis of the type of answer expected:
A. A very short (eg. single sentence) answer to a question. For example, "The melting
point of lead is 210C." Evaluation techniques for this type of information need were
considered in the TREC-8 Question and Answer Track. [19, various papers]
B. A single document. For example, the home page for the Information Retrieval journal,
or the current timetable for the Washington Metro Red Line, or a directory of accommodation
in Athens, Greece. This type subsumes traditional known-item search. However,
Web searchers often deduce that a particular document, such as a company homepage
or a bus timetable, ought to exist without having previously seen it, a situation more
accurately described as suspected-item search.
Sometimes, no single document matching the information need exists and the searcher
must synthesize the required information from a group of documents. On the other
hand, there may be several matching documents. For example, there may unexpectedly
be several homepages for the same individual.
C. A selection of documents. These documents might be sought for research purposes (for
example a range of documents relating to US policy on North Korea) or in order to
access on-line services (for example on-line auction sites or sites which allow download
of recorded music.)
D. Every document matching a criterion. For example, every document which discusses
orbital engines. Evaluation against this type of need is obviously related to coverage,
but also to the sophistication of the engine in expanding the query so as to find documents
which do not literally match the query but do match one which is semantically
equivalent, for example "Sarich engine", "motor developed by Ralph Sarich" etc. Another
complication arises from the expression of needs in terms of explicit or implicit
document metadata, such as "all documents authored by Doug Engelbart". Blair and
Maron [2] discuss retrieval effectiveness in a high-recall legal application.
In each of the first two types, evaluation requires access to only very few documents. In Type
B, relevance, even strong relevance, is usually not sufficient and evaluation must be based
on asessment of whether a document is the one sought. In these cases, performance can be
evaluated on the basis of the position of the desired document in the ranking and it makes
little sense to talk of "relevance". To illustrate this point, the Australian National University
intranet contains thousands of documents which are relevant to the topic of libraries and one
of the most common queries submitted to its search engine is library. In the cases where
the submitter of this query was looking for the library homepage or the library catalogue, the
ability of the engine to retrieve pages which merely talk about libraries is unlikely to correlate
well with searcher satisfaction.
In Type C, evaluation may be limited to the first 10 or 20 results, as most users would expect
to find the information they require in fewer than this number of documents. However, it is
important that the documents presented in a result list should not repeat the same material
and evaluation methodology for this type of information need should take this into account.
Evaluation of recall-oriented 16 information needs (Type D) is difficult, given limited assessment
resources. It must inevitably rely on sampling techniques.
Classification of information needs is notoriously difficult. The above four-way classification
illustrates the need for a range of evaluation paradigms, but is still a gross over-simplification.
Information needs are highly dynamic and are conditioned by preliminary results. For ex-
ample, someone searching for a complete timetable may find that no such single document
can be found and be forced to seek multiple individual timetables which together provide the
needed information. A Type B search for a single homepage may or may not transform into
a Type D search when it becomes clear that multiple home pages exist.
Note that high precision is also required.
Within any of the above types there may be a need for a range of judging instructions and a
need for a range of different measures.
In the case of Type C(reseach) needs it is probably preferable to use multi-valued relevance
judgments, as Gordon and Pathak did, as it may be possible to exploit the additional relevance
information. We note, however, that Gordon and Pathak do not report any results relying
on the distinction between irrelevant and highly irrelevant. They also convert four-value
relevance judgments into binary in order to compute their measures.
By contrast, in the case of Type C(services) needs, the judgment to be made is not whether
the page is relevant or not but rather whether the page allows direct access to a service of
the right type. For example, whether the page allows downloading of MP3 files, as opposed
to discussing the topic of downloading MP3 files.
A defect of the present study is that we treated all queries as though they corresponded to
Type C(reseach) information needs. The problem is not that we may have misinterpreted the
intention of the searchers who submitted these particular queries. What is important is that
the ability of search engines to process queries of other types was not evaluated.
In the Web context, it may be desirable to accord partial scores to retrieved documents which
contain no useful content but which link to it. A number of issues in indirect relevance are
canvassed in the discussion of the TREC-8 Small Web Task [11].
2. Evaluations should be carried out at frequent intervals to maintain an up-to-date picture of
relative performance and to smooth out performance "glitches."
3. The cost of evaluations based on Type C queries is largely attributable to assessor salaries.
Consequently, it is desirable to maximize the value of assessments made. Potentially, the
high correlation between different measures, might be used to limit how many pages per
topic need be judged. There may be greater value in judging fewer documents per topic for
a larger number of topics, particularly as measures derived from the very top of the ranking
may be the best predictors of user satisfaction for certain information need types.
4. In comparing performance from one evaluation to the next, a normalising baseline is needed.
The median performance of a large number of engines could be used in this role but would be
unable to detect a general increase or decline in performance. Use of a standard set of queries
in each evaluation does not solve this problem because of variations in a human's judgments
over time and because of the possibility that search engine companies would tune their results
for these queries. The only possibility we have been able to identify involves including a
known, unchanging engine, operated by the evaluators in each successive evaluation and
using its (rejudged) performance as a normalising baseline.
5. The present study did not penalise search engines for returning defunct pages in the results
list to enable fair comparison with the TREC systems. Future evaluations which do not
compare against TREC should treat a dead link as a worthless answer. However, it may be
considered necessary to make several attempts to access the page, in case inaccessibility is
only temporary.
6. Considerable care is needed in writing scripts for automatically posing queries to search
engines and retrieving results. The format of result pages changes from time to time and
may cause errors. Thorough sanity checks should be applied to all results obtained by such
automatic means.
1. Search topics should be representative of genuine user need.
2. If a search intermediary or third-party relevance judge is employed, the primary searcher's
information need should be as fully captured as possible and transmitted in full.
3. A large number of search topics should be used.
4. If the purpose of the study is to enable informed consumer choice, the study should aim to
include most major search engines.
5. If the study seeks to compare maximal as opposed to typical effectiveness of search engines,
it is appropriate to exploit the full range of features of each engine and to do so may require
the use of skilled search intermediaries.
6. The search topics should represent the full range of information needs over which it is desired
to draw conclusions, both with respect to subject and to type of results wanted. (See type
categories in Section 6.)
7. Result judging should be appropriate to the type of result sought. (See Section 6.)
8. Judging should be consistent within a topic. All judgments for a topic should be made by
the same person and within a short period of time.
9. Judging should be blind and be conducted by the person with the need for information or by
independent judges.
10. Documents should be presented for judging in the same way that they would have been seen
by a real Web searcher, ie. rendered by a browser. Images should be viewable and it should
be possible to follow links. However, careful instruction may be necessary to ensure that
judges remain on task and do not waste time on fruitless link following.
11. For general comparisons of search engines, dead links should count as useless answers.
12. Experiments should be well designed and conducted.
Figure
11: Summary of desirable features of future Web search evaluations. Based on Gordon and Pathak's
list, extended and modified.
7. In presenting documents for assessment, it is important to do so in a way which simulates
normal Web search. See point 10 in Figure 11.
Figure
11 summarises the features which we believe should be present in future Web search
evaluations.
7 Conclusions and Future Work
We have performed a Web search engine evaluation using appropriate scientific methodology on
a larger scale than previously published studies. This evaluation shows that choice of search
engine makes a difference, that early precision (P@5) is not significantly correlated with index
coverage, and that the best search engines are now using algorithms approaching the effectiveness
(on relevance based tasks) of those used by TREC-8 Large Web task participants. We found an
unexpectedly high correlation between P@1-5 results obtained by us and those obtained by a study
conducted by others a year earlier. There were very high inter-correlations between four different
measures derivable from the top 7 live results.
Further work is needed to refine the classification of information need types in Web search
and to identify the appropriate evaluation paradigms for each type. User studies to determine
the effectiveness measures which best correlate with searcher satisfaction ratings would be very
valuable. User studies will also be required to determine the proportion of Web queries which are
derived from each information need type, as inspection of query logs frequently fails to reveal the
searchers' intentions.
In order to present a complete picture of search engine performance, future studies should
include queries derived from range of commonly expressed information need types and use appropriate
judgments and measures for each type. To reduce the multi-dimensional results from such a
study to a single index of effectiveness will require that each dimension be weighted by frequency
of occurrence of the corresponding information need type.
--R
Alta Vista web page.
An evaluation of retrieval effectiveness for a full-text document-retrieval system
Evaluating evaluation measure stability.
The Cranfield tests on index language devices.
Comparative study of web search service performance.
Order effects: A study of the possible influence of presentation order on user judgments of document relevance.
Electric Knowledge LLC.
Finding information on the world wide web: The retrieval effectiveness of search engines.
Overview of TREC-6 Very Large Collection Track
Scaling up the TREC Collection.
Overview of TREC- 8 Web Track
The web robots pages.
Accessibility of information on the web.
First 20 precision among world wide web search services (search engines).
Computer evaluation of indexing and text processing.
Analysis of a very large web search engine query log.
Overview of the fifth Text Retrieval Conference (TREC- 5)
Variations in relevance judgments and the measurement of retrieval effec- tiveness
--TR
--CTR
Eric C. Jensen , Steven M. Beitzel , Ophir Frieder , Abdur Chowdhury, A framework for determining necessary query set sizes to evaluate web search effectiveness, Special interest tracks and posters of the 14th international conference on World Wide Web, May 10-14, 2005, Chiba, Japan
Steven M. Beitzel , Eric C. Jensen , Abdur Chowdhury , David Grossman , Ophir Frieder, Using manually-built web directories for automatic evaluation of known-item retrieval, Proceedings of the 26th annual international ACM SIGIR conference on Research and development in informaion retrieval, July 28-August 01, 2003, Toronto, Canada
Mathias Gry, Non-linear reading for a structured web indexation, Proceedings of the 25th annual international ACM SIGIR conference on Research and development in information retrieval, August 11-15, 2002, Tampere, Finland
Fazli Can , Rabia Nuray , Ayisigi B. Sevdik, Automatic performance evaluation of web search engines, Information Processing and Management: an International Journal, v.40 n.3, p.495-514, January 2004
Judit Bar-Ilan, Comparing rankings of search results on the web, Information Processing and Management: an International Journal, v.41 n.6, p.1511-1519, December 2005
Liwen Vaughan , Mike Thelwall, Search engine coverage bias: evidence and possible causes, Information Processing and Management: an International Journal, v.40 n.4, p.693-707, May 2004
Yves Rasolofo , David Hawking , Jacques Savoy, Result merging strategies for a current news metasearcher, Information Processing and Management: an International Journal, v.39 n.4, p.581-609, July
King-Lup Liu , Weiyi Meng , Jing Qiu , Clement Yu , Vijay Raghavan , Zonghuan Wu , Yiyao Lu , Hai He , Hongkun Zhao, AllInOneNews: development and evaluation of a large-scale news metasearch engine, Proceedings of the 2007 ACM SIGMOD international conference on Management of data, June 11-14, 2007, Beijing, China
Paul Thomas , David Hawking, Evaluation by comparing result sets in context, Proceedings of the 15th ACM international conference on Information and knowledge management, November 06-11, 2006, Arlington, Virginia, USA
Ayman Farahat , Geoff Nunberg , Francine Chen, AuGEAS: authoritativeness grading, estimation, and sorting, Proceedings of the eleventh international conference on Information and knowledge management, November 04-09, 2002, McLean, Virginia, USA
Liwen Vaughan, New measurements for search engine evaluation proposed and tested, Information Processing and Management: an International Journal, v.40 n.4, p.677-691, May 2004
Peter Bailey , Nick Craswell , David Hawking, Engineering a multi-purpose test collection for web retrieval experiments, Information Processing and Management: an International Journal, v.39 n.6, p.853-871, November
Thanh Tin Tang , Nick Craswell , David Hawking , Kathy Griffiths , Helen Christensen, Quality and relevance of domain-specific search: A case study in mental health, Information Retrieval, v.9 n.2, p.207-225, March 2006
Ziv Bar-Yossef , Maxim Gurevich, Random sampling from a search engine's index, Proceedings of the 15th international conference on World Wide Web, May 23-26, 2006, Edinburgh, Scotland
Steven M. Beitzel , Eric C. Jensen , Abdur Chowdhury , David Grossman, Using titles and category names from editor-driven taxonomies for automatic evaluation, Proceedings of the twelfth international conference on Information and knowledge management, November 03-08, 2003, New Orleans, LA, USA
Michael P. Evans , Richard Newman , Timothy Putnam , Diana J. M. Griffiths, Search Adaptations and the Challenges of the Web, IEEE Internet Computing, v.9 n.3, p.19-26, May 2005
Theodora Tsikrika , Mounia Lalmas, Combining evidence for Web retrieval using the inference network model: an experimental study, Information Processing and Management: an International Journal, v.40 n.5, p.751-772, September 2004
Judit Bar-Ilan , Mazlita Mat-Hassan , Mark Levene, Methods for comparing rankings of search engine results, Computer Networks: The International Journal of Computer and Telecommunications Networking, v.50 n.10, p.1448-1463, 14 July 2006
Caroline M. Eastman , Bernard J. Jansen, Coverage, relevance, and ranking: The impact of query operators on Web search engine results, ACM Transactions on Information Systems (TOIS), v.21 n.4, p.383-411, October
Jaroslaw Baliski , Czeslaw Daniowicz, Re-ranking method based on inter-document distances, Information Processing and Management: an International Journal, v.41 n.4, p.759-775, July 2005
Bernard J. Jansen , Paulo R. Molina, The effectiveness of web search engines for retrieving relevant ecommerce links, Information Processing and Management: an International Journal, v.42 n.4, p.1075-1098, July 2006
Robert M. Losee , Lewis Church Jr., Information Retrieval with Distributed Databases: Analytic Models of Performance, IEEE Transactions on Parallel and Distributed Systems, v.15 n.1, p.18-27, January 2004
I. S. Nekrestyanov , N. V. Panteleeva, Text Retrieval Systems for the Web, Programming and Computing Software, v.28 n.4, p.207-225, July-August 2002 | evaluation;search engines;web search |
594035 | Some Formal Analysis of Rocchio''s Similarity-Based Relevance Feedback Algorithm. | Rocchio's similarity-based Relevance feedback algorithm, one of the most important query reformation methods in information retrieval, is essentially an adaptive supervised learning algorithm from examples. In spite of its popularity in various applications there is little rigorous analysis of its learning complexity in literature. In this paper we show that in the binary vector space model, if the initial query vector is 0, then for any of the four typical similarities (inner product, dice coefficient, cosine coefficient, and Jaccard coefficient), Rocchio's similarity-based relevance feedback algorithm makes at least i>n mistakes when used to search for a collection of documents represented by a monotone disjunction of at most i>k relevant features (or terms) over the i>n-dimensional binary vector space {0, 1}i>n. When an arbitrary initial query vector in {0, 1}i>n is used, it makes at least (i>n mistakes to search for the same collection of documents. The linear lower bounds are independent of the choices of the threshold and coefficients that the algorithm may use in updating its query vector and making its classification. | Introduction
Research on relevance feedback in information retrieval has a long history
(Baeza-Yates and Ribeiro-Neto, 1999; Frakes and Baeza-Yates,
1992; Ide, 1971b; Ide, 1971a; Raghavan and Wong, 1986; J.J. Rocchio,
Salton, 1989). It is regarded as the most popular query reformation
strategy (Baeza-Yates and Ribeiro-Neto, 1999). The central idea
of relevance feedback is to improve search performance for a particular
query by modifying the query step by step, based on the user's
judgments of the relevance or irrelevance of some of the documents
retrieved. In the vector space model (Salton, 1989; Salton et al., 1975),
The extended abstract of this paper was published in Proceedings of the Eleventh
International Symposium on Algorithms and Computation (ISAAC'00), Lecture
Notes in Computer Science 1969, pages 108-119, Springer-Verlag, December, 2000.
c
2001 Kluwer Academic Publishers. Printed in the Netherlands.
Z. Chen and B. Zhu
both documents and queries are represented as vectors in a discretized
vector space. In this case, relevance feedback is essentially an adaptive
supervised learning algorithm: A query vector and a similarity are used
to classify documents as relevant and irrelevant; the user's judgments of
the relevance or irrelevance of some the classied documents are used as
examples for updating the query vector as a linear combination of the
initial query vector and the examples judged by the user. Especially,
when the inner product similarity is used, relevance feedback is just a
Perceptron-like learning algorithm (Lewis, 1991). It is known (J.J. Roc-
chio, 1971) that there is an optimal way for updating the query vector
if the sets of relevant and irrelevant documents are known. Practically
it is impossible to derive the optimal query vector, because the full sets
of the relevant and irrelevant documents are not available.
There are many dierent variants of relevance feedback in information
retrieval. However, in this paper we only study Rocchio's similarity-based
relevance feedback algorithm (J.J. Rocchio, 1971; Ide, 1971a;
Salton, 1989). In spite of its popularity in various applications, there
is little rigorous analysis of its complexity as a learning algorithm in
literature. This is the main motivation for us to investigate the learning
complexity of Rocchio's similarity-based relevance feedback algorithm.
Wong, Yao and Bollmann (Wong et al., 1988) studied the linear structure
in information retrieval. They designed a very nice gradient descent
procedure to compute the coe-cients of a linear function and analyzed
its performance. In order to update the query vector adaptively, their
gradient descent procedure must know the user preference which is in
practice the unknown target to be learned by an information retrieval
system. More discussions of their gradient descent procedure will be
given in section 5.1.
The main contribution of our work in this paper is that linear lower
bounds on classication mistakes are proved for the algorithm when
any of the four typical similarities (inner product, dice coe-cient,
cosine coe-cient, and Jaccard coe-cient) listed in (Salton, 1989) is
used. Technically, our work in this paper is enlightened by the work
in (Kivinen et al., 1997) on lower bounds of the Perceptron algorithm.
Precisely, we borrow the method developed in (Kivinen et al., 1997) for
constructing an example sequence with pairwise constant inner prod-
ucts. We extend the method to cope with other similarities besides inner
product. We also design a new method for selecting trial sequences and
prove in a uniform way our lower bounds for Rocchio's similarity-based
relevance feedback algorithm.
It should be pointed out that the lower bounds established in this
paper for Rocchio's similarity-based relevance feedback algorithm is
based on the following worst case considerations: The user acts as an
Some Formal Analysis of Rocchio's Algorithm 3
adversary to the algorithm; the algorithm is required to precisely search
for the collection of all documents relevant to the given search query;
and the algorithm is allowed to receive one document example judged
by the user as relevance or irrelevant at each step 1 . In practical applications
, in contrast to the above worst case considerations, the user in
general may not act as an adversary to the algorithm; the algorithm
is usually required to search for a short list of top ranked documents
relevant to the given search query; and at each step of the similarity-based
relevance algorithm, the user may judge a few documents as
relevance feedback to the algorithm. In other words, the appropriate situation
in real-world information retrieval applications would be a kind
of \sympathetic oracle" model, where the user is not an adversary to the
information retrieval system but a \sympathetic judge" who provides
the most useful possible information in order to help the system help
him/her to accomplish his/her work. Hence, our lower bounds proved in
this paper for Rocchio's similarity-based relevance feedback algorithm
may not aect the algorithm's eective applicability to the real-world
problems despite of their theoretical signicance. The formal analysis
of the algorithm helps us understand the nature of the algorithm well
so that we may nd new strategies to improve its eectiveness or design
new algorithms for information retrieval. Recently, we have made
some progress along this line in (Chen, 2001). We have designed two
types of multiplicative adaptive algorithms for user preference retrieval
with provable better performance: One has better performance than
Rocchio's algorithm in learning a class of linear classiers over non-binary
vector space. The other boosts the usefulness of an index term
exponentially, while the gradient descent procedure in (Wong et al.,
1988) boosts the usefulness of an index term linearly.
We refer the readers to the work of (Salton and Buckley, 1990;
Lewis, 1991) for discussions of the Perceptron-like learning nature of the
similarity-based relevance feedback algorithm. It was stated in (Lewis,
1991) that the most important future direction for research in information
retrieval is likely to be machine learning techniques which can
combine empirical learning with the use of knowledge bases.
This paper is organized as follows. In section 2, we give a formal presentation
of Rocchio's similarity-based relevance feedback algorithm.
In section 3, we prove several technical lemmas based on the techniques
developed in (Kivinen et al., 1997). In section 4, we prove linear
lower bounds for Rocchio's similarity-based relevance feedback algorithm
with any of the four typical similarities listed in (Salton, 1989).
This last restriction is not critical to the proof of the lower bounds, but it would
make the analysis easier.
4 Z. Chen and B. Zhu
In section 5 we give some discussions of our result and also show that
Rocchio's algorithm can be used to learn many other target document
classes. We conclude the paper and list several open problems in section
6.
2. Rocchio's Similarity-Based Relevance Feedback
Algorithm
Let R be the set of all real values, and let R + be the set of all non-negative
real values. Let n be a positive integer. In the binary vector
space model in information retrieval (Salton, 1989; Salton et al., 1975),
a collection of n features or terms T are used to represent
documents and queries. Each document d is represented as a vector
such that for any i, 1 i n, the i-th component
of v d is one if the i-th feature T i appears in d or zero otherwise. Each
query q is represented by a vector v
any i, 1 i n, the i-th component of v q 2 R is a real value used to
determine the relevance (or weight) of the i-th feature T i . Because of
the unique vector representations of documents and queries, for convenience
we simply use d and q to stand for their vector representations
v d and v q , respectively.
A similarity in general is a function m from R n R n to R + . A
similarity m is used to determine the relevance closeness of documents
to the search query and to rank documents according to such close-
ness. In the binary vector space model of information retrieval (Salton,
1989; Salton et al., 1975; Baeza-Yates and Ribeiro-Neto, 1999), to retrieve
relevant documents for a given query vector q with respect to
a similarity m, the system searches for all the documents d, classies
those with similarity values m(q; d) higher than an explicit or implicit
threshold as relevant, and returns to the user a short list of relevant
documents with highest similarity values. This information retrieval
process is in fact determined by a linear classier, as dened later in
this section, which is composed of a query vector q, a similarity m, and
a real-valued threshold .
Unfortunately, in the real-world information retrieval applications,
usually an ideal query vector cannot be generated due to many factors
such as the limited knowledge of the users about the whole document
collection. A typical example is the real-world problem of web search.
In such a case, the user may use a few keywords to express what
documents are wanted. However, it is nontrivial for both the user and
a web search engine to precisely dene the collection of documents
wanted as a query vector composed of a set of keywords. The alternative
Some Formal Analysis of Rocchio's Algorithm 5
solution to the query formation problem is, as stated in (Salton, 1989),
to conduct searches iteratively, rst operating with a tentative query
formation (i.e., an initial query vector), and then improving formations
for subsequent searches based on evaluations of the previously retrieved
materials. This type of methods for automatically generating improved
query formation is called relevance feedback, and one particular and
well-known example is Rocchio's similarity-based relevance feedback
(J.J. Rocchio, 1971; Ide, 1971a; Salton, 1989).
Rocchio's similarity-based relevance feedback algorithm works in a
step by step adaptive renement fashion as follows. Starting at an initial
query vector q 1 , the algorithm searches for all the documents d such
that d is very close to q 1 according to the similarity m, ranks them by
m(q; d), and nally presents a short list of the top ranked documents
to the user. The user examines the returned list of documents and
judges some of the documents as relevant or irrelevant. At step t 1,
assume that the list of documents the user judged is x
the algorithm updates its query vector as q
where the coe-cients t j
the algorithm uses the updated query vector q t and the similarity m
to search for relevant documents, ranks the documents according to
m, and presents the top ranked documents to the user. In practice, a
threshold is explicitly (or implicitly) used to select the highly ranked
documents. Practically, the coe-cients t j
may be xed as
(Baeza-Yates and Ribeiro-Neto, 1999; Salton, 1989). The following four
typical similarities were listed in (Salton, 1989): For any q; x 2 R n ,
dice coefficient
To make the above denitions valid for arbitrary q and x, we dene
that the similarity between two zero vectors is zero, i.e.,
It should be pointed out that the cosine similarity m 3 is nothing but
the inner product similarity m 1 when the vectors are normalized. It is
also easy to show that Jaccard similarity m 4 is a strictly monotonic
6 Z. Chen and B. Zhu
transformation of the dice similarity m 2 . This implies that both the inner
product similarity and the cosine similarity may achieve equivalent
classication for any document document with respect to the given
query vector. The subtle, but important, dierence between the two
similarities is that dierent rank values may be obtained for a document
with respect to the given query vector so that dierent \ranking gaps"
are obtained between documents. For example, when the rank gap
between documents x and y based on the inner product similarity m 1 is
0:8; the rank gap based on the similarity m 3 may
be Analogously, the above analysis applies
to the dice similarity and the Jaccard similarity. Dierent rank gaps between
pairs of documents based on dierent similarities dene dierent
user preference structures of the documents, hence dierent document
groups or clusters may be obtained. Therefore, dierent information
retrieval performances might be achieved for dierent similarities. In
other words, if the performance of an information retrieval system is not
concerned, then cosine and inner product similarities may be regarded
as two equivalent similarities, and so may Jaccard and dice similarities.
In (Wong et al., 1988) user preference was studied in terms of structures
of weak order and, in particular, linear order. In designing an adaptive
information retrieval system, the system performance is denitely not
a negligible factor. To our best knowledge, we do not know any provable
theoretical results about in
uences of the dierent similarities on
the performance of the similarity-based relevance feedback. Our linear
lower bounds proved in this paper tell us that in the worst case, the
four dierent similarities have the same aect on the performance of
Rocchio's relevance feedback. But we do not know what the result will
be in the average case.
As stated in (Baeza-Yates and Ribeiro-Neto, 1999), the main advantage
of the relevance feedback is its simplicity and good results.
The simplicity is due to the fact that the modied term weights (query
vector components) are computed directly from the set of retrieved
documents. The good results are observed experimentally and are due
to the fact that the modied query vector does re
ect a portion of the
intended query semantics.
The similarity-based relevance feedback algorithm is essentially an
adaptive supervised learning algorithm from examples (Salton and Buck-
ley, 1990; Lewis, 1991). The goal of the algorithm is to learn some
unknown classier to classify documents as relevant or irrelevant. The
learning is performed by modifying (or updating) the query vector that
serves as the hypothetical representation of the collection of all relevant
documents. The method for updating the query vector is similar to the
Some Formal Analysis of Rocchio's Algorithm 7
Perceptron algorithm. We given the necessary formal denitions in the
following.
DEFINITION 1. Let m from R n R n to R + be a similarity. A
classier with respect to m over the n-dimensional binary vector space
f0; 1g n is a triple (q; ; m), where q 2 R n is a query vector, and
R is a threshold. The classier (q; ; m) classies any documents
d) or irrelevant otherwise. The clas-
sier m) is called a linear classier with respect to the similarity
if m is a linear function from R n R n to R + .
For simplicity, we may just call (q; ; m) a classier, or a linear
classier when m is linear. The following are examples of classiers:
In particular, (q is a linear classier but the other three are
not, because m 1 is linear and m i are not linear for
DEFINITION 2. An adaptive supervised learning algorithm A for
learning a target classier (q; ; m) over the n-dimensional binary vector
space f0; 1g n from examples is a game played between the algorithm
A and the user in a step by step fashion, where the query vector q and
the threshold are unknown to the algorithm A, but the similarity m
is. At any step t 1, A gives a classier (q m) as a hypothesis
to the target classier to the user, where q t 2 R n and t 2 R. If
the hypothesis is equivalent to the target, then the user says \yes" to
conclude the learning process. Otherwise, the user presents an example
such that the target classier and the hypothesis classier
dier at x t . In this case, we say that the algorithm A makes a mistake.
At step t + 1, the algorithm A constructs a new hypothetical classier
m) to the user based on the received examples x
The learning complexity (or the mistake bound) of the algorithm A is
in the worst case the maximum number of examples that it may receive
from the user in order to learn some classier.
If the readers are familiar with on-line learning from equivalence
queries (Angluin, 1987; Littlestone, 1988), then an adaptive supervised
8 Z. Chen and B. Zhu
learning algorithm as dened above is a proper on-line learning algorithm
for learning the class of classiers from equivalence queries
over the n-dimensional binary vector space. We now give the formal
denition of Rocchio's similarity-based relevance feedback algorithm.
DEFINITION 3. Rocchio's similarity-based relevance feedback algorithm
is an adaptive supervised learning algorithm for learning any
classier m) over the n-dimensional binary vector space f0; 1g n
from examples. Let q 1 be the initial query vector. At any step t 1,
the algorithm presents a classier (q m) as its hypothesis to the
target classier to the user, where t 2 R is the threshold, and the
query vector q t is modied as follows. Assume that at the beginning of
step t the algorithm has received a sequence of examples x
then the algorithm uses the following modied query vector q t for its
next classication:
are called additive updating factors.
Please note that our denition above is a generalized version of
Rocchio's original algorithm. In our denition, any function m from
R n R n to R + can be used as a similarity; arbitrary real values can be
used in computing the updated query vector; and nally our denition
allows adaptive learning until the target is obtained.
REMARK 4. We would like to give the following remarks about Roc-
chio's similarity-based relevance feedback algorithm.
(a) In the above denition, Rocchio's similarity-based relevance feed-back
algorithm can use any real-valued threshold and any real-valued
additive updating factors at each step. But in practice the
additive updating factors t j
may be xed as 1 (or 0:5) to promote
the relevance of relevant examples and 1 (or 0:5) to demote the
irrelevance of irrelevant examples (Baeza-Yates and Ribeiro-Neto,
1999; Salton, 1989). t 0
is usually set to 1. Also in practice the
threshold is usually implicitly used for selecting a short list of top
ranked documents.
(b) For the purpose of the worst case analysis of the mistake bounds
of the algorithm, in the denition we only allow the algorithm to
receive one example at each step. We consider that the user acts
as an adversary to the algorithm and that the algorithm is required
Some Formal Analysis of Rocchio's Algorithm 9
to precisely learn (or search for) the target linear classier. In
practical applications, in contrast to the above worst case consid-
erations, at each step the algorithm may receive several examples
from the user; the user in general may not act as an adversary
to the algorithm; and the algorithm is usually required to search
for a short list of top ranked relevant documents. Hence, our lower
bounds proved in this paper may not aect the algorithm's eective
applicability to the real-world problems. The formal analysis of the
algorithm helps us to understand its nature well so that we may be
able to nd new strategy to improve its eectiveness or to design
new algorithms for information retrieval.
(c) When the similarity m is the inner product of two vectors, then
Rocchio's algorithm is similar to Rosenblatt's Perceptron algorithm
(Rosenblatt, 1958).
We will use the sets of documents represented by monotone disjunctions
of relevant features to study the mistake bounds of Rocchio's
algorithm. The e-cient learnability of monotone disjunctions of relevant
features (or attributes) has been extensively studied in machine
learning (for example, (Littlestone, 1988)). Although very simple in for-
mat, monotone disjunctions are very common ways of expressing search
queries, especially in the case of web search. All existing popular search
engines support disjunctions of keywords as search query formations.
For any k with 1 k n, classiers can be dened to precisely classify
a monotone disjunction of at most k relevant features
i.e., to precisely classify whether any given document satises the monotone
disjunction of (2) or not. If we choose a vector u 2 R n such that
all its components are zero except that those at positions i are
one, then it is easy to verify that for any d 2 f0; 1g n , each of the
following four expressions is a necessary and su-cient condition for
deciding whether d satises (2):
kn
Z. Chen and B. Zhu
This implies that (u; 1
are all respectively classiers for (2).
3. Technical Lemmas
The technique used in (Kivinen et al., 1997) to prove linear lower
bounds for the Perceptron algorithm (or, in general, linear additive
on-line learning algorithms) is the construction of an example sequence
l )) with pairwise constant inner products
such that for any given initial query vector (or weight vector as used in
(Kivinen et al., 1997)) and any linear classier with the inner product
similarity, if the initial query vector and the linear classier dier on the
sequence B, then the Perceptron algorithm makes one mistake at one
of the two examples in every pair of B. In other words, each pair of the
sequence B preserves the classication dierence of the linear classier
and the initial query vector for the Perceptron algorithm when the
examples in B are used to update the query vector. It was shown in
(Kivinen et al., 1997) that row vectors of Hadamard matrices can be
used to construct the required example sequence B. We will borrow the
above technique from (Kivinen et al., 1997) to prove linear lower bounds
for Rocchio's similarity-based relevance feedback algorithm. However,
one must note that when a similarity (for example, the Jaccard coefcient
similarity) other than the inner product similarity is used, the
pairs of the sequence B as used in (Kivinen et al., 1997) may not still
preserve the classication dierence of the target classier (which may
not necessarily be linear) and the initial query vector. The rotation
invariant concept (Kivinen et al., 1997) is in general not applicable to
learning algorithms with a non-zero initial query vector, nor applicable
to non-rotation variants of the linear additive learning algorithms.
Therefore, we need to design new methods for constructing example
sequences that are applicable to Rocchio's similarity-based relevance
feedback algorithm with arbitrary initial query vector and any of the
four similarities dened in section 2.
In the following we extend Denition 7 given in (Kivinen et al., 1997)
to deal with any similarity.
DEFINITION 5. Let the sequence
l )), where
z 0
t and z 00
t are in f0; 1g n for all t. Let q 1 2 R n be a query vector, m a
similarity, and (u; ; m) a classier. Dene q
R. We say that the
query vector q t and the classier (u; ; m) dier on the sequence B
Some Formal Analysis of Rocchio's Algorithm 11
with respect to m if either
We now prove a weaker version of Lemma 8 in (Kivinen et al., 1997)
in which only the initial query vector (or weight vector in their term)
is required to dier from the target linear classier on the example
sequence, whereas we require that all the query vectors (the initial
one and the updated ones) dier from the target classier which in
general may not be linear. We do not use the pairwise constant inner
product property, because we may not have such a property for other
similarities.
LEMMA 6. Let m from R n R n to R + be a similarity and let q 1 2 R n
be the initial query vector. Let the sequence
l ));
where z 0
t and z 00
t are in f0; 1g n for all t. For any classier (u; ; m)
over the domain f0; 1g n , if q t , which is as dened in Denition 3, and
m) dier on B with respect to m for
similarity-based relevance feedback algorithm makes at least l mistakes
for learning the classier (u; ; m).
Proof. Let A be Rocchio's similarity-based relevance feedback algorithm
for learning (u; ; m). Consider the trial sequence
in which x t 2 fz 0
t g, and y t is the classication value of x t determined
by the unknown target classier (u; ; m) for In other
words, y m) classies x t as relevant or y
At any step t with 1 t l, the hypothesis of the algorithm A is
m) with
according to expression (1) of Denition 3. By the assumption, q t and
m) dier on the sequence B with respect to m. That is, we
have either m(q t ; z
or In the rst
case, if t m(q t ; z 0
t ), the adversary chooses x
t . In this case,
i.e., the target classier classies x
t as irrelevant, but
the hypothesis issued by A classies it as relevant, thus A makes a
Z. Chen and B. Zhu
mistake. If t > m(q t ; z 0
t ), the adversary chooses x
t . In such a
case, y i.e., the target classier classies x
t as relevant,
but the hypothesis issued by A classies it as irrelevant, thus again
A makes a mistake. In the second case of m(q t ; z 0
t ), with the same manner we can show that
the learning algorithm A makes a mistake at either z 0
t or z 00
t . Therefore,
A makes l mistakes on the trial sequence S. This means that A makes
at least l mistakes for learning the unknown target classier (u; ; m).We now follow the approach in (Kivinen et al., 1997) to construct
example sequences from row vectors of Hadamard matrices. Such sequences
are essentially applicable to Rocchio's similarity-based relevance
feedback algorithm when the zero initial vector is used, but not
when a non-zero initial vector is used. Let I n be the identity matrix of
order n.
DEFINITION 7. A Hadamard matrix H n of order n is an n n
matrix with elements in f1; 1g, such that
H n is normalized if the rst row and the rst column consist of ones
only.
The above (2) implies that any two distinct rows (or columns) of a
H n are orthogonal. Normalized Hadamard matrices can be constructed
as follows. Let (1). For any
Two examples of Hadamard matrices are given as follows.
Some Formal Analysis of Rocchio's Algorithm 13
The following property follows from (3) and (4).
PROPOSITION 8. For be the t-th row of the
normalized Hadamard matrix H n for
DEFINITION 9. Let positive integers d and
k. For be the t-th row of the normalized Hadamard
. We dene BH to be the sequence ((z 0
where
z 0
z 00
PROPOSITION 10. Let positive integers d
and k and let
be the sequence as dened
in Denition 9. For any i and j with 1
Proof. We only prove (a), because (b) and (c) can be coped with
similarly. By Proposition 8,
h is
Similarly,
is 2
14 Z. Chen and B. Zhu
h is
We now introduce a new method for constructing example sequences
that are applicable to Rocchio's similarity-based relevance feedback
algorithm with any of the four similarities and an arbitrary initial query
vector. We expand a Hadamard matrix by adding rows and columns
with zeroes, and exchange rows and columns of the expanded matrix
according to the initial query vector. The new method is given in the
proof of Proposition 11.
PROPOSITION 11. Given any positive integers
d and k, for any query vector q 2 f0; 1g n , there is a sequence
such that v 0
t and v 00
t are in f0; 1g n for
and the sequence satises all the three properties given
in Proposition 10 with each occurrence of 2 d replaced by 2 d 1 and
each occurrence of z replaced by v, respectively. Furthermore, we have
q has at least 2 d 1 zero components or m 1 (q; v
Proof. Given any vector
for positive integers d and k, we have
This means that we can choose 2 d 1 components of q, denoted by
, such that they are either all one or all zero. Dene the
is the 2 d 1 2 d 1 Hadamard matrix. We move the rst
of C n to the rows
, respectively. This process
can be achieved through a sequence of exchanges of two rows. In other
words, there is an n n transformation matrix A such that AC n does
the work and AA . We now move the rst 2 d 1 columns of AC n
Some Formal Analysis of Rocchio's Algorithm 15
to the columns
, respectively. Similarly, this process can be
achieved through a sequence of exchanges of two columns. Moreover,
does the work. Now, for any j with 1
row of AC n A T . Then, for 1 s 2 d 1 , the
component of d i j
denoted by x i s
is in fact the s-th component
of the j-th row of the Hadamard matrix H 2 d 1 . In other words, d i j
has all zero components except these 2 d 1 components x i s
forming a
subvector that is the same as the j-th row of H 2 d 1 . We nally construct
j from d i j
by changing all its 1 components to zero and keeping all
its other components. We also construct v 00
j from d i j
by changing all its
1 components to one and all its one components to zero, and keeping
all the other components. In other words, v 0
are constructed as
follows:
We rst construct z 0
j and z 00
j from the 2 d 1 2 d 1 Hadamard matrix
as in Denition 10.
We construct v 0
j by adding n 2 d 1 zero components to the end of
z 0
j and then moving the rst 2 d 1 components of z 0
through exchanging columns.
Similarly, we construct v 00
j by adding n 2 d 1 zero components to
the end of z 00
j and then moving the rst 2 d 1 components of z 00
j to
exchanging columns.
Hence, Proposition 11 follows from Proposition 8 in a manner similar
to Proposition 10. 2
In the following two lemmas we show that the sequence BH enables
the query vector q t to preserve m 1 similarity for any pair of z 0 t and
z 00
t in BH when the zero initial query vector is used, and the sequence
enables the query vector q t to preserve m 1 similarity for any
pair of v 0
t and v 00
t in D(q 1 ) when the arbitrary initial query vector q 1
is used.
LEMMA 12. For positive integers k and d, let BH
be the sequence dened in Denition 9. Let
where the initial query vector q
2 R, and
g. Then,
Z. Chen and B. Zhu
Proof. For any 1 j < t 2 d , for x
(b) and (c) we have m 1
For
for any 1 t 2 d ,
LEMMA 13. Let positive integers k and d. Given
any initial query vector q 1 2 f0; 1g n , let D(q 1 ) be the sequence given
in Proposition 11, and
g. Then,
q 1 has at least 2 d 1 zero components.
Proof. For any 1
g, by Proposition
11, properties similar to (b) and (c) of Proposition 10 hold for the
sequence D(q 1 ). Hence, we have m 1
any 2 t 2 d 1 , we have by Proposition 11
Some Formal Analysis of Rocchio's Algorithm 17
Thus, for any 2 t 2 d 1 has at
least 2 d 1 zero components, then again by Proposition 11 we have
The following lemma allows us to choose examples in some subdomain
to force a learning algorithm to make mistakes.
LEMMA 14. Given n > k 1 0, there is an adversary strategy that
forces any adaptive supervised learning algorithm to make at least k 1
mistakes for learning the class of disjunctions of at most k 1 variables
from fx i 1
g over the binary vector space f0; 1g n . Moreover,
the adversary chooses examples in the vector space with nonzero values
only for variables in fx i 1
g.
Proof. For any given adaptive supervised learning algorithm, at any
step t for 1 t k 1, the adversary uses the example x t to defeat the
learning algorithm as follows, where x t has all zero components except
that its i t -th components is one: If the learning algorithm classies x t
as relevant, then the adversary classies it as irrelevant, otherwise the
adversary classies it as relevant. 2
One may easily note that the strategy we used above to prove
Lemma 14 can be generalized to prove the following fact: Any given
adaptive supervised learning algorithm makes at least n mistakes to
learn the class of disjunctions of at most n variables from fx
over the binary vector space f0; 1g n , because the algorithm can be
forced to make one mistake to determine whether or not each of the
n variables is in the target disjunction of at most n variables. Unfor-
tunately, one must note that this kind of strategy cannot be used to
prove that an adaptive supervised learning algorithm (such as Rocchio's
algorithm) makes at least n mistakes for learning a disjunction of at
most k variable when k is less than n, especially, when k is a small
constant. That is the reason why we must design sophisticated methods
in this paper to prove linear lower bounds for Rocchio's algorithm for
learning disjunctions of at most k variables, where k can be any value
between 1 and n. For example, k can be 1, 3, log n, or n. Disjunctions
of a small number of variables are the common ways for users to specify
their information needs. For example, in the real-world of web search,
the number of keywords used in a query session is usually very small.
The problem of learning disjunctions of a small number of variables
Z. Chen and B. Zhu
has been studied by many researchers (see, for example, the work in
(Littlestone, 1988)).
Careful readers may have observed that we do not rule out the choice
of in the decomposition of Proposition 8 to
Lemma 13 in this section. When
14 can be simply used to prove linear lower bounds for any adaptive
supervised learning algorithm (such as Rocchio's algorithm) to learn
disjunctions of at most variables over the binary vector space.
However, as we pointed out in the above paragraph, for any k such that
must reply on the choice of d 6= 0 in the decomposition
of to prove our linear lower bounds. For example, in the
case of with the choice of d 6= 0 such that d we can prove
that Rocchio's algorithm makes at least mistakes for learning
disjunctions of one variable when the zero initial query vector is used.
As we will show in the next section, the proof is accomplished through
the construction of 2 d pairs of examples from row vectors of Hadamard
Once again, the strategy of Lemma 14 or the like is not
applicable at all to the case of learning disjunctions of one variable, nor
to the case of learning disjunctions of a small number of variables.
4. Linear Lower Bounds
We are now ready to prove linear lower bounds for Rocchio's similarity-based
relevance feedback algorithm when any of the four typical similarities
is used. Throughout this section, we let
two positive integers d and k, and let u be the vector in f0; 1g n such
that its rst component is one, its last k 1 components have all k 1
or fewer ones (however, these one-components are not specied at this
point), and all other components are zero. Given any query vector
be its 2 d 1 components such that they
are either all zero or all one. Dene u(q 1 ) to be the vector in f0; 1g n
such that its i 1 -th component is one, its i j -th components are all zero
among the remaining n 2 d 1 components
there are at most k 1 one components (again, setting which of these
components to be one is not determined at this point). Note that both
respectively a monotone disjunction of at most k
relevant features. We use E(u) and E(u(q 1 )) to denote the monotone
disjunctions represented by u and u(q 1 ), respectively.
LEMMA 15. Let
2 d) be the example sequence
dened in Denition 9. For any similarity m i , 1 i 4, there
Some Formal Analysis of Rocchio's Algorithm 19
is a 2 R such that the query vector
and the classier dier on BH with respect to m i for
are arbitrary values in R, and x
g.
Proof. As noted in section 2,
1=
are respectively classiers for
the monotone disjunction E(u) of at most k relevant features. It follows
from Denition 9 that the rst component of z 0
t is one, the rst of z 00
is zero, and the last k components of each of both z 0
t and z 00
t are all
zero for 1 t 2 d . Hence, for any 1 t 2 d , we have by Propositionm 1 (u; z 0
kn
By Lemma 12 and the above (8) and (12), for any 1 t 2 d , q t and
the classier (u; 1=2; dier on the sequence BH with respect to m 1 .
For the similarity m 2 , for any t 2 we have by Proposition 10 and
Lemma 12
For
Because z 00 according to the
denition. Thus, for 1 t 2 d , we have
hence by (9) and (12) the query vector q t and the classier (u; 2=(k
dier on the sequence BH with respect to m 2 .
Z. Chen and B. Zhu
For the similarity m 3 , for any t 2 we have by Proposition 10 and
Lemma 12
For as for the similarity m
according to the denition. Thus,
(12) the query vector q t and the classier (u; 1=
dier on the
sequence BH with respect to m 3 .
Finally, for the similarity m 4 , for any t 2 we have by Proposition
For
Thus, for 1 t 2 d , we have m 4
and (12) the query vector q t and the classier (u; 1=(k
dier on the sequence BH with respect to m 4 . 2
LEMMA 16. Given any initial query vector
) be the example sequence dened in Proposition
11. For any similarity m i , 1 i 4, there is a 2 R such that
the query vector
and the classier dier on D(q 1 ) with respect to m i for
are arbitrary values in R, and x
g.
Moreover, if q 1 has at least 2 d 1 zero components, then q 1 and
dier with respect to m i , too.
Some Formal Analysis of Rocchio's Algorithm 21
Proof. The proof is the same as what we just did for Lemma 15, but
we need to replace u by u(q 1 ), z by v, and 2 d by 2 d 1 , respectively. We
also need to use Proposition 11 and Lemma 13 to complete our proof.We now prove the following main results in this paper.
THEOREM 17. Let positive integers d
and k. For any given similarity m i with
similarity-based relevance feedback algorithm makes at least n mistakes
for learning the class of monotone disjunctions of at most k relevant
features over the binary vector space f0; 1g n , when the initial query
vector and the similarity m i are used.
Proof. Let A be the Rocchio's similarity-based relevance feedback
algorithm with the similarity m i and the initial query vector q
We analyze the number of mistakes that A must make in learning
E(u), the disjunction of at most k relevant features represented by u.
As we noted before, there is a 2 R such that the classier
classies E(u), i.e., it is logically equivalent to E(u). By Lemma 15, the
classier and the query vector q t with 1 t 2 d dier on
the example sequence
d) with respect to
the similarity m i . Thus, by Lemma 6, the adversary can use examples
from BH to force the algorithm A to make 2 d mistakes. Note that the
last k 1 components of all examples in BH are zero and the last
components of u are unspecied but may have at most k 1 one
components. Hence, by Lemma 14, the adversary can further force A
to make at least k 1 mistakes to learn the values of the last k 1
components of u. Putting all together, A makes at least 2 d
mistakes for learning E(u). 2
THEOREM 18. Let positive integers d and k.
For any given similarity m i with similarity-based
relevance feedback algorithm makes at least (n+k 3)=2 mistakes
for learning the class of monotone disjunctions of at most k relevant
features over the binary vector space f0; 1g n , when an arbitrary initial
query vector q 1 2 f0; 1g n and the similarity m i are used. Moreover, if
the initial query vector q 1 has at least 2 d 1 zero components, then the
algorithm makes at least (n mistakes.
Proof. Let A be the Rocchio's similarity-based relevance feedback
algorithm with the similarity m i and the arbitrary initial query vector
We analyze the number of mistakes that A must make
in learning E(u(q 1 )), the disjunction of at most k relevant features
represented by u(q 1 ). As we noted before, there is a 2 R such that the
22 Z. Chen and B. Zhu
classier classies E(u(q 1 )), i.e., it is logically equivalent
to E(u(q 1 )). By Lemma 16, the classier (u(q 1 and the query
vector q t with 2 t 2 d dier on the example sequence D(q 1
respect to the similarity m i . If q 1
has at least 2 d 1 zero components, then the classier and q 1 also dier
with respect to m i . Thus, by Lemma 6, the adversary can use examples
from D(q 1 ) to force the algorithm A to make 2 d 1 1 mistakes, or 2 d 1
mistakes if q 1 has at least 2 d 1 zero components. Note that there are
positions such that the components of all examples
in D(q 1 ) at those positions are zero, and the components of u at those
components are unspecied but may have at most k 1 one components.
Hence, by Lemma 14, the adversary can further force A to make at
least k 1 mistakes to learn the values of the components of u at those
positions. Putting all together, A makes at least 2 d 1
(n+k 3)=2 mistakes for learning E(u); and if q 1 has at least 2 d 1 zero
components, A makes at least 2 d 1 mistakes. 2
The lower bounds obtained in Theorems 17 and are independent
of the choices of the threshold and coe-cients that Rocchio's
similarity-based relevance feedback algorithm may use in updating its
query vector and in making its classication.
5. Discussions
5.1. The Gradient Descent Procedure
As pointed out in (Wong et al., 1988), one primary concern in information
retrieval is to ensure that those documents more relevant to the
user information needs are ranked ahead of those less relevant ones.
This means that a ranking is acceptable if it can guarantee that less
preferred documents will not be listed in front of the more preferred
ones (such a ranking is called an acceptable ranking in (Wong et al.,
1988)). Let denote the user preference relation over the document
vector space. Wong, Yao and Bollmann designed a very nice gradient
descent procedure to compute the query vector q satisfying
d d
is called the dierence vector for documents d and d 0 .
Gradient Descent Procedure. The procedure is outlined as follows
(i) Choose an initial query vector q 0 and let
Some Formal Analysis of Rocchio's Algorithm 23
(ii) Let q k be the query vector in the k-th step. Identify the set of
dierence vectors
is a solution vector), terminate the procedure.
(iii) Let
b:
back to step (ii).
The above gradient descent procedure is a very nice adaptive algorithm
for computing the query vector. However, it must know the
user preference relation ahead of the time and perform exhaustive
search to identify the set (q k ) at step (ii). The exhaustive search is
of exponential time complexity. In practice and in a machine learning
setting, the user preference relation is the unknown target that must
be learned by an information retrieval system. In this sense, the gradient
descent procedure is not an adaptive learning process. On the other
hand, Rocchio's similarity-based relevance feedback algorithm formally
dened in section 2 is an adaptive learning algorithm without a priori
knowledge of the user preference. The updating process for the query
vector at each iteration is of linear time complexity.
5.2. Learning Other Document Classes
In this paper, we study the learning of a document class represented
by a monotone disjunction of index features (or terms) with Rocchio's
algorithm. In fact, Rocchio's algorithm can be easily used to learn other
target document classes such as the class represented by a conjunction
of disjunctions of index features (or terms). Conjunctions of disjunctions
are the most common forms for search queries as constructed
by humans. We give several examples here. From those examples we
know that the lower bounds proved in previous section on the learning
performance of Rocchio's algorithms hold for those learning cases.
Example 1 (Learning Arbitrary Disjunctions). An arbitrary
disjunction is a general case of monotone disjunctions and may have
negated index features in it. A negated index feature in a disjunction
means that the feature should not occur in the desired documents. Let
_ _
be an arbitrary disjunction. Let z document vector
that makes g false, i.e., g(z must have z
Z. Chen and B. Zhu
1. We can use z to transform g into
a monotone disjunction
Please also note that the same z can be used to transform f back into
g in the following manner
The above transformation methods tell us that g can be learned as
follows. First, use Rocchio's algorithm with an initial query vector q
to learn g. When a document vector judged by the
user as irrelevant, then one can use this z to transform any obtained
document vector
continue the learning. With this kind of transformation, the algorithm
actually learns the function f . But as we observed before, f can be easily
transformed into g with the document vector z. The above process
implies that learning an arbitrary disjunction with Rocchio's algorithm
has the same performance as learning a monotone disjunction.
Example 2 (Learning Monotone Conjunctions). Let
be a monotone conjunction, i.e., all index features occurred in g are
positive. The negation of g is a disjunction
_ _
Note that the vector z can be used to transform g into a
monotone disjunction
and to transform f back into g
Hence, to learn g we only need to learn its negation
g, and by example
1 this can be done with Rocchio's algorithm.
Example 3 (Learning Arbitrary Conjunctions). Let
be an arbitrary conjunction. The negation g of g is
_ _
Some Formal Analysis of Rocchio's Algorithm 25
which is an arbitrary disjunction. To learn g we only need to learn
its negation g, and by Example 1 this can be done with Rocchio's
algorithm.
Example 4 (Learning Disjunctions of Conjunctions). Let
be a disjunction of conjunctions, G i is a conjunction for 1 i s.
Using the virtual variable technique developed in (Maass and Warmuth,
1998), one can learn G as follows: Introduce one new input variable
(virtual variable) for each of the possible 3 n conjunctions that can be
constructed from variables x . When the values of x are
known, then the value of each virtual variable is easy to be determined.
With the help of virtual variables, G is a monotone disjunction and thus
can be learned with Rocchio's algorithm.
Example 5 (Learning Conjunctions of Disjunctions). Let
be a conjunction of disjunctions, F i is a disjunction for 1 i s.
Because the negation of F is a disjunctions of conjunctions, as in
Example 4 the virtual variables technique developed in (Maass and
Warmuth, 1998) can be used to learn the negation of F and hence F
itself.
5.3. A Remark on the Optimal Criterion of Rocchio's
Algorithm
According to (J.J. Rocchio, 1971; Salton, 1989), the construction of
an ideal query vector would target to maximize the average query-document
similarity for the relevant documents and at the same time
minimize the average of the query-document similarity for the irrelevant
documents. It is known in (J.J. Rocchio, 1971; Salton, 1989) that under
appropriate assumptions such an ideal query vector has the form
(R
Rel
Nonrel
where R and N R are the assumed number of relevant and irrelevant
documents, and the summations range over the sets of normalized
relevant and irrelevant documents, respectively. However, the optimal
query vector cannot be adopted in practice, because the sets of relevant
and irrelevant documents with respect to the queries are not known
26 Z. Chen and B. Zhu
before an exhaustive search. Recall that the gradient descent procedure
in (Wong et al., 1988) has a similar problem. On the other hand, the
optimal query vector can be adaptively approached in the following
(see (Salton, 1989)):
where R 0 is the set of documents judged by the user as relevant by the
end of iteration i, and N 0 is the set of documents judged as irrelevant. In
the above two approximation formulas, 1
, and are updating
factors (or coe-cients). In our formalization of Rocchio's algorithm
given in section 2, arbitrary updating factors are allowed. The lower
bounds we have proved are in fact independent of the choices of the
updating factors. That is, our lower bounds hold even if 1
and 1
are used as updating factors.
5.4. Counting Arguments
For any k with 1 k n, given any disjunction of k variables
it is easy to know that there are 2 n k documents in the binary vector
space f0; 1g n that are irrelevant to Q, i.e., the vectors of those documents
make Q false; and that there are 2 n 2 n k documents that
are relevant to Q, i.e., the vectors of those documents make Q true.
When k is small, say 3 is a huge value for a very large n.
That is, there are a huge number of documents that are irrelevant to Q.
One might ask whether or not this kind of observation helps us to nd
some simple ways to prove linear lower bounds for Rocchio's algorithm.
For example, an adversary could, in response to almost any formulated
query, produce some document which matches the query to some degree
but it not relevant. As a matter of fact, this sort of idea is in essence an
example of the decision tree technique developed in (Littlestone, 1988)
to prove lower bounds for general learning algorithms:
In the decision tree, each inner node is labeled with a document
vector in the binary vector space f0; 1g n .
There are two edges leaving each inner node, labeled \relevant"
and \irrelevant", respectively.
Some Formal Analysis of Rocchio's Algorithm 27
Each leaf is labeled with a disjunction of at most k variables in
such a way that the disjunction at the leaf is consistent with all
the labels along the path leading from the root to the leaf ( the
number of inner nodes along this path is the depth of the leaf).
Assume that the depth of every leaf of the decision tree is at least
t. Then, the mistake bound of any learning algorithm for learning
disjunctions of at most k variables is at least t. Readers can refer
(Littlestone, 1988) for the proof of this statement.
The decision tree technique is useful because it reduces the problem
of proving a lower bound for every learning algorithm to the problem
of constructing a single decision tree with the required depth. The
latter can usually be done through counting arguments to estimate the
depth of the decision tree. To our best knowledge, (Maass and Turan,
1994) is the best article to prove lower bounds for learning a threshold
gate, a general case of a disjunction of at most k variables. The article
presents several powerful counting arguments to estimate the depth
of decision tree for the class of threshold gates. Unfortunately, those
counting arguments do not help us to obtain linear lower bounds for
Rocchio's algorithm. The reason is that there are not many monotone
disjunctions of at most k binary variables. One can easily nd out that
the number of monotone disjunctions of at most k binary variables is
The least depth of the decision tree for the class of monotone disjunctions
of at most k binary variables is log 2 C(k). For example,
log
log
log
log 2 C(k) < log 2 C(n) < n; for any k < n:
Therefore, counting arguments cannot yield linear lower bounds for
Rocchio's algorithm when k is much less than n, especially when k is
a small constant. For example, when the lower bound produced
by the counting argument is just log 2 n. However, the non-counting
technique that we use is this paper can yield linear lower bounds for
Rocchio's' algorithm for any k with 1 k n, even
recall that disjunctions of a small number of variables are the common
28 Z. Chen and B. Zhu
ways for users to specify their information needs. For example, in the
real-world of web search, the number of keywords used in a query
session is usually very small. The problem of learning disjunctions of a
small number of variables has been studied by many researchers (see,
for example, the work in (Littlestone, 1988)).
6. Conclusions and Open Problems
Rocchio's similarity-based relevance feedback algorithm is one of the
most popular query reformation method in information retrieval and
has been used in various applications. It is essentially an adaptive
supervised learning algorithm from examples. However, there is little
rigorous analysis of its learning complexity. In this paper we prove
linear lower bounds for Rocchio's similarity-based relevance feedback
algorithm when any of the four typical similarities listed in (Salton,
1989) is used. Because the linear lower bounds are proved with the worst
case analysis, they may not aect the algorithm's eective applicability
to the real-world problems. The lower bounds help us understand the
nature of the algorithm well so that we may nd new strategies to improve
the eectiveness of Rocchio's algorithm or design new algorithms
for information retrieval. One possible way is to use the Winnow2
(Littlestone, 1988) algorithm as an alternative for the similarity-based
relevance feedback algorithm in applications of information retrieval.
For example, in our recent research on building real-time intelligent
web search engines (Chen et al., 2000; Chen and Meng, 2000), we used
a tailored version of Winnow2.
We list the following open problems for future research.
Problem 1. The lower bound in Theorem holds for an arbitrary
initial query vector q 1 2 f0; 1g n . Choosing a zero-one initial query
vector is a very common practice in applications. For example, in web
search an initial zero-one query vector may be constructed with the
query words submitted by the user. When the initial query vector q 1 is
chosen from R n , we can prove the same lower bound with the similar
but tedious approach for the similarities But we do
not know whether the same lower bound still holds for m 4 .
Problem 2. In this paper we have proved linear lower bounds for
Rocchio's similarity-based relevance feedback algorithm in the binary
vector space. We do not know whether our approach can be extended
to study the learning complexity of Rocchio's algorithm in arbitrary
discretized vector space.
Problem 3. The linear lower bounds we have established for Roc-
chio's algorithm in the binary vector is based on the worst-case anal-
Some Formal Analysis of Rocchio's Algorithm 29
ysis. It would be very interesting to analyze the average-case learning
complexity of Rocchio's algorithm. We feel that this problem is very
challenging, because any nontrivial average case analysis will reply
on realistic models of document distribution, index term distribution,
and the user preference distributions as well. We feel that it is not
easy to model those distributions nor to analyze the complexity under
those distributions. The probabilistic corpus model proposed in
(Papadimitrious et al., 2000) may shed some light on this problem.
Problem 4. Although it follows from our linear lower bounds that
the Winnow2 algorithm (Littlestone, 1988) has better worst case learning
complexity, the authors do not know any provable theoretical analysis
of the average learning complexity about the Winnow2 algorithm,
nor about the similarity-base relevance feedback algorithm. More pre-
cisely, we do not know whether the Winnow2 algorithm performs better
in average than the Rocchio's similarity-based relevance feedback
algorithm.
Acknowledgements
In early 1997, Dr. Stanley Sclaro asked the rst author whether the
relevance feedback algorithm can be used to help the user search for
the desired World Wide Web documents with about two dozens of
examples judged by the user. At the time, his research group implemented
ImageRover (Taycher et al., 1997; Sclaro et al., 1997), an
image search engine from the user's relevance feedback, while the author
and his colleagues started to build intelligent search tools (such
as Yarrow (Chen and Meng, 2000), WebSail (Chen et al., 2000) and
Features (Chen et al., 2001)) with the help of information retrieval and
machine learning techniques. Dr. Sclaro's question together with the
authors' own research on building intelligent web search tools inspired
the work in this paper. The authors would also acknowledge that the
example sequence selection method developed in (Kivinen et al., 1997)
for proving linear lower bounds for the Perceptron algorithm is the key
to the breakthrough of our proofs. Without knowing the method it
would take longer for the authors to nish the work in this paper.
We thank three anonymous referees and the journal editor, Professor
Paul B. Kantor, for their critical and valuable questions and comments
for helping us to revise this paper. We thank one referee for informing
us the reference (Wong et al., 1988).
Z. Chen and B. Zhu
--R
Queries and concept learning.
Modern Information Retrieval.
Multiplicative adaptive algorithms for user preference retrieval.
Yarrow: A real-time client site meta search learner
WebSail: From on-line learning to web search
IEEE Press
Information Retrieval: Data Structures and Algorithms.
Relevance feedback in information retrieval.
The Smart Retrieval System - Experiments in Automatic Document Processing
The perceptron algorithm vs. Winnow: linear vs. logarithmic mistake bounds when few input variables are relevant.
Learning in intelligent information retrieval.
Learning quickly when irrelevant attributes abound: A new linear-threshold algorithm
Information and Computation
Latent semantic indexing: A probabilistic analysis.
A critical analysis of the vector space model for information retrieval.
The perceptron: A probabilistic model for information storage and organization in the brain.
Automatic Text Processing: The Transformation
A vector space model for automatic indexing.
Cascia M and Sclaro
Linear structures in information retrieval.
--TR
--CTR
Ying Liu , Dengsheng Zhang , Guojun Lu , Wei-Ying Ma, A survey of content-based image retrieval with high-level semantics, Pattern Recognition, v.40 n.1, p.262-282, January, 2007 | relevance feedback;similarity;supervised learning;lower bound;vector space |
594068 | Spectral Sequences on Combinatorial Simplicial Complexes. | The goal of this paper is twofold. First, we give an elementary introduction to the usage of spectral sequences in the combinatorial setting. Second we list a number of applications.In the first group of applications the simplicial complex is the nerve of a poset; we consider general posets and lattices, as well as partition-type posets. Our last application is of a different nature: the {\cal S}_n-quotient of the complex of directed forests is a simplicial complex whose cell structure is defined combinatorially. | Introduction
In this paper we use spectral sequences to compute homology groups of combinatorially
given simplicial complexes, whether they come as nerves of posets or
with an explicit combinatorial description of the cell structure.
This idea is not new, in fact spectral sequences have been used for that purpose
in a quite general setting, already in, e.g. [Ba75, Ba77, Ba80], [Q1]. Recently, these
methods have started to take more concrete forms, for example Phil Hanlon used
them in [H] to compute the homology groups of the so-called generalized Dowling
lattices. In the joint paper [FK], Eva Maria Feichtner and the author used spectral
sequences to attack an especially difficult case of subspace arrangements, namely
the so-called D n;k -arrangements.
In Section 2 we define some basic notions. Then, in Section 3, we give a thorough
and elementary, from scratch, description of one possible way to use spectral
sequences for poset homology computations.
In Section 4 we derive several corollaries of the properties of the spectral se-
quences, which can be applied to a wide class of posets. These results include both
M-obius function computations and finding the Betti numbers of a poset. We take
a look at the Whitney homology of a poset and the intriguing questions coming up
in this context. In Theorem 4.1 we prove two inequalities for the Betti numbers of
an arbitrary lattice.
In Section 5 we apply these methods to different partition-type posets. In Sub-section
5.1 we consider the intersection lattices of orbit arrangements, \Pi
Furthermore, we compute completely the homology groups of the particular lattice
\Pi 3;2;2;1 . This example shows that the homology groups of orbit arrangements A -
can have very irregular structure in general, which was not known before. We
remind the reader that it was shown in [Ko1, Theorem 4.1] that when a partition
- has no primitive partition identities then \Pi - is shellable, in particular it is
Date: March 21, 2000
Research at IAS was supported by von Hoffmann, Arcana Foundation.
homotopy equivalent to a wedge of spheres. In Subsection 5.2 we take a look at
the subspace arrangements associated with certain partitions with restricted block
sizes.
In Section 6 we use spectral sequences to study homology groups of the Sn -
quotient of the complex of directed forests \Delta(G n )=Sn . In [Ko2] it was shown that
\Delta(G n ) is shellable. Here we derive a formula for the rational Betti numbers of
\Delta(G n )=Sn and also detect torsion in its integer homology groups.
2. Basic notions and definitions
In this section we introduce the basic notions which we use throughout the text.
Definition 2.1. Let P be a finite poset. The nerve of P , \Delta(P ), (also known as
the order complex of P ), is the abstract simplicial complex whose vertices are
the elements of P and whose faces of dimension k are the chains x
in P . See [Q2] for a more general definition.
If P is explicitly given with adjoint elements then we consider the
simplicial complex \Delta( -
1g. Where it causes no confusion we
often write \Delta(P ) instead of \Delta( -
We also use the convention that unless the bar ( - ) is explicitly written, the
concerned poset always has adjoint elements
For an arbitrary simplicial complex C, e
will denote the kth reduced homology
group of C (see [Sp] for a definition). For the sake of brevity we will often
Furthermore we let -P (x; y) denote the value of the M-obius function on the
interval (x; y) of the poset P . The definition and many properties of the M-obius
function can be found for example in [St1]. We use the convention -
Definition 2.2. A poset P is called Cohen-Macaulay (or just CM) if for every
interval (x; y) of the poset P we have e
2.
Recall that a chain complex C of vector spaces (resp. abelian groups) is a sequence
\Gamma! Cn d
\Gamma!
of vector spaces (abelian groups) and maps between them,
such that d
A filtration on C, a collection of filtrations on
each
all i, j; here we denote F
3. Spectral sequences for the nerves of posets
Spectral sequences constitute a convenient tool for computing the homology
groups of a simplicial complex. Here we give a short description of one possible
way to apply spectral sequences to compute homology groups of the nerve of a poset.
A special case of this particular approach has been previously used by Phil Hanlon,
in the work cited above.
Of course, the filtrations considered here are very special, but we hope that this
may be a good starting point for a combinatorialist. A few good sources for the
material on spectral sequences are [McC, Sp, Mas].
SPECTRAL SEQUENCES ON COMBINATORIAL SIMPLICIAL COMPLEXES 3
3.1. The definition and some properties of spectral sequences.
A spectral sequence associated with a chain complex C and a filtration F on C
is a sequence of 2-dimensional tableaux (E r
r=0 , where every component E r
k;i is
a vector space (for simplicity we start with considering field coefficients), E r
unless k; i - 0, and a sequence of differential maps (d r ) 1 r=0 such that
d r
im(E r
k+1;i+r
d r
Comments.
It follows from (0) and (2) that E 1
1. In the general case
k;i is defined using the notion of convergence of the
spectral sequence. We will not explain this notion in general, since for the spectral
sequence that we consider only a finite number of components in every tableau E r
are different from zero, so there exists N 2 N, such that d
one sets
k;i .
2. For the case of integer coefficients, (3.2) becomes more involved: rather than
just summing the entries of one needs to solve extension problems to get
H (C). This difficulty will not arise in our applications, so we refer the interested
reader to [McC] for the detailed explanation of this phenomena. When considering
integer coefficients, E r
; are not vector spaces, but just abelian groups.
3. We would like to warn the reader that our indexing is different from the
standard (but more convenient for our purposes). The standard indexing is more
convenient for the spectral sequences associated to fibrations, an instance we do
not discuss in this paper.
For a finitely generated abelian group G, let rk G denote the dimension of the
G. When specializing to a spectral sequence for the homology of the
nerve of a finite bounded poset, we immediately observe that its M-obius function
can be read off from the E r
non-negative integer r.
Proposition 3.1. Let P be a finite poset and (E r
an associated spectral se-
quence, then
Proof. It is a well known fact that
k;i , see for example [McC, Example 6, pp. 15-16].
Furthermore the theorem of Ph. Hall says that
Formula (3.3) follows from (3.4) and (3.5).
As we will see later, formula (3.3) specializes to several well-known formulae for
M-obius function computations, once the spectral sequence is specified.
Proposition 3.2. Let P be any poset and (E r
spectral sequence for
H (\Delta(P )). Then we have
(for some r
and, for any k,
Proof. From (3.1) we have rk E r+1
and (3.6) follows. It also follows that
We shall now prove (3.8). Let us denote d
n+1;i+r
, then we have the following diagram
d2
n+1;i+r
d3
From the definition of the spectral sequence we know that
hence
Comment. We use here the fact that if G is an abelian group and H is a sub-group
of G then rk
Summing over all i 2 Zin (3.9) we obtain
hence using formula (3.2) we obtain
SPECTRAL SEQUENCES ON COMBINATORIAL SIMPLICIAL COMPLEXES 5
3.2. A class of filtrations.
In this subsection we consider all homology groups with coefficients in F, where
F is either a field or the ring of integers. In fact, everything prior to (3.13) is valid
for F being an arbitrary ring.
Let us describe a special class of filtrations on the chain complex for \Delta(P ).
First of all one chooses the following data: J a subposet of -
P and a function
N, such that f( -
other words the preimage of each element in N forms an antichain in J . The most
frequent choices of the function f are the rank function on J (when it exists) and
an arbitrary linear extension of the partial order on J . The choice of J is more
subtle and usually depends heavily on the structure of the poset P , see [FK, H].
Having chosen f and J , we will define an increasing filtration on the chain
complex for \Delta(P ). be a chain (not necessarily
maximal) in P . Define the pivot of \Gamma, piv(\Gamma), to be the element of \Gamma " J with the
highest value of the function f . Since the preimages under f of each natural number
form an antichain, we know that f takes different values on different elements in
hence the notion of pivot is well defined. Furthermore, let the weight
of \Gamma, !(\Gamma), be the value of f on the pivot, i.e.,
take - 0 as a pivot and say that the chain \Gamma has weight 0. This assignment of weights
gives us the filtration of the chain complex C (P
ff
F
with h \Delta i F denoting the linear span of the given chains with coefficients in F.
Recall that by the definition of the nerve of a poset,
Omitting an element other than the pivot does not alter the weight of the chain,
omitting piv(\Gamma) turns another element into the pivot, on which f takes a lower
value than on the former pivot, so the resulting chain has a strictly lower weight.
Hence the differential operator @ respects the filtration.
By construction, the filtration is bounded from below.
By definition
ff
F
The differential d
k\Gamma1;i is induced by the simplicial boundary operator.
be a generator of
k;i , then
since the weight of a chain is lowered by the omission of an element if and only if
it is the pivot which is removed.
Now we shall replace the chain complexes
chain isomorphic complexes. The latter allow us to give an explicit description of
6 DMITRY N. KOZLOV
the
in terms of the homology groups of certain subposets of P . First
we need some notations: for a 2 J , let S a
f(a)g.
There is an obvious isomorphism between the following chain complexes "divid-
ing" each chain \Gamma in P with pivot a ? - 0 into two chains, namely its subchains below
and above the pivot:
with e
denoting the augmented simplicial chain complex of the respective intervals.
We need to use augmented complexes including the empty chain in order to get
proper counterparts for chains which have the pivot as maximal element below - 1
or as minimal element above - 0.
Let
~
id\Omega ~
with the usual sign conventions, namely ~
@c
p\Omega ~
for c p 2 e
One can see that the isomorphism
commutes with the boundary operators d 0 and ~
@\Omega , respectively. Hence ' is actually
a bijective chain map and we get
For simply have
In case F is a field, or F = Zand at least one of the subposets ( - 0; a) " S a and
S a has free homology groups, we can apply the algebraic K-unneth theorem
and deduce
In this setting, Proposition 3.1 specializes to
Special cases of formula (3.14) can be found in for example [St1]. Observe that
when P is a lattice and
P , and f is an arbitrary order
preserving function on J [ f - 0g, then (3.14) gives Weisner's theorem:
For the explicit derivation of the E 1 ; -tableau in this case see Theorem 4.1. For
more information on Weisner's theorem itself the reader may want to consult [St1,
Corollary 3.9.3].
SPECTRAL SEQUENCES ON COMBINATORIAL SIMPLICIAL COMPLEXES 7
When J is a lower ideal and f is an order-preserving function, i.e. if x ? y then
specializes to
a)\Omega e
4. Applications for general posets
Let P be a pure poset. Form a spectral sequence by choosing
P and
according to (3.15) and (3.12),
rk (a)=i
e
We can read off the so-called Whitney homology groups of P (first introduced
and studied by Baclawski in [Ba75]) from the E 1
e
now P be a CM poset, then
2. It means
that under the first differential d 1 all of the groups W k (P ), except for the highest
one, cancel in some intriguing way. It would be of a great interest to clarify the
combinatorial nature of these cancellations.
Theorem 4.1. Let P be a finite lattice, x an atom in P . Then the following
inequalities hold:
In particular, if fi k\Gamma2 ( - 0;
Proof. Let
P-x and let x be any linear extension of J . Consider
the spectral sequence E which is associated to the ideal J , where we filtrate using
the given linear extension of J . Observe first that -
P-x is contractible.
Also, for any a 2 J , we have (a; -
P-x-a .
This means that (a; -
contractible (actually a cone with apex x- a)
using formulae
(3.12) and (3.15), we obtain
0; otherwise.
The inequalities (4.2) and (4.3) follow from inequalities (3.7), resp. (3.8).
Applications of Theorem 4.1 will be given in the next section. The following
theorem may be occasionally useful.
Theorem 4.2. Let P be a pure poset of rank r. Suppose that there exists a subposet
J of P such that
(2) for any a 2 J , both [ - 0; a] and [a; - 1] J are CM and rk [a; -
e
a)\Omega e
Proof. Construct the spectral sequence
r=0 with the subposet J as in the
proof of the Theorem 4.1 and with f(x) =rk(x). Then it follows from the formulae
and (3.12) that E 1
rk (a)=i;a2J
a)\Omega e
Using the fact that P nJ , [ - 0; a] and [a; - 1] J are CM and that rk (P nJ) =rk (P
r\Gamma2. The spectral sequence collapses
here, hence (4.4) and e
2, follow from (3.2).
Let us recall a theorem proved in [BWal].
Theorem 4.3. (Complementation Theorem).
If L is a bounded lattice, s 2 -
L, and the complements of s form an antichain,
then -
wedge
x?s
Remark 4.4. In the special case, when the complements of an atom x 2 P form
an antichain, the spectral sequence above allows us to derive the homology counter-part
of the Complementation Theorem 4.3.
Reason. If the complements of x form an antichain one can choose the function
f so that it takes the same value v on all of the complements of x. Then there will
be only one non-zero row in E 1
namely
e
All the differentials d r will be zero maps for r - 1, so we obtain
e
5. Applications to partition-type posets
5.1. Orbit arrangements.
A subspace arrangement A is a finite collection of affine subspaces
in the Euclidean space R n . Let A be a central subspace arrangement (all
the subspaces pass through the origin) and take all possible non-empty intersections
t, ordered by reverse inclusion, that is
This is a partially ordered set, which is actually a lattice. The
SPECTRAL SEQUENCES ON COMBINATORIAL SIMPLICIAL COMPLEXES 9
bottom element is - and the top element is This
lattice is called the intersection lattice and is often denoted by LA .
We use the notation - for the partition of the number
into blocks of sizes - and we always have these blocks ordered in non-increasing
. By \Pi n we denote the partition lattice
of the set [n]. It is the poset with elements all different partitions of [n] ordered
under refinement.
The following class of subspace arrangements was first introduced in [Bj94, sub-section
3.3]. If nontrivial partition of the set [n], let
The type of - is the number partition of n given by the block sizes jB i j. Given
a non-trivial number partition - ' n, let
A - is called an orbit arrangement, expressing the fact that A - is the orbit
of any single subspace K - under the natural action of Sn on R n . Let \Pi
Note that \Pi
Theorem 5.1. Consider a partition -
notation means that we have m blocks of size 1). Let
2. Then \Pi - is
Remark. For this bound to be useful, we should have much larger
For example, for
Proof. Take a coatom consider the spectral sequence
associated with the ideal We have
e
Let d be the number of blocks in y, then [y; - 1] ' \Pi d (here we use that 2 occurs
as a block size in -). We shall show that d - t. Let y have blocks of sizes
. The set fs gives a number partition of n, means that
- is a refinement of fs g. The condition x - means that there exists
a block of y, without loss of generality we can assume it is s d , such that - is not
a refinement of fs 1g. It means it is impossible to pack disjointly
blocks of sizes - blocks of sizes s
We will attempt to perform such a packing with a version of a greedy algorithm.
Let us start with packing - 1 into some of the blocks s 1. If it is possible
continue with - 2 and so on. At some point we will have to stop. Say we stopped
at - i , i.e., it is impossible to pack - i into the rest (after packing -
the blocks s 1. Then the rests of the blocks s have at most
us an inequality
or
which implies
hence d - t.
The lattice \Pi d has nonzero homology group only in dimension d \Gamma 3, so
using (3.6), we can conclude that \Pi - is
Often spectral sequences can be used for a direct computation of the poset homology
groups. We will give here an informative example.
1). We shall compute the homology groups of \Pi 3;2;2;1 . The poset
\Pi 3;2;2;1 is pure and ranked by the function (the number of blocks in x).
\Pi 3;2;2;1 , f(x) =rk(x), and construct the corresponding spectral sequence.
As was described in Section 4 we obtain Whitney homology groups. It is easy
to see that ( - 0; a) is CM for all a 2 -
\Pi 3;2;2;1 except for the case when a has partition
type (4; 4). These intervals are schematically shown in Figure 1.
Figure
1.
The Betti numbers of intervals ( - 0; a) are given in the following table.
type of a number e
e
e
44
Observe that we can use formulae (3.15) and (3.12), since the intervals ( - 0; a) have
. Hence, the
f(x) =rk(x), can be easily computed. The only non-zero entries are
It is easy to check that the first two rank levels of \Pi 3;2;2;1 form a connected
poset, hence d 1 is exact in E 1
0;1 . It means that
Already this shows that H 1 (\Pi 3;2;2;1 ) 6= 0.
SPECTRAL SEQUENCES ON COMBINATORIAL SIMPLICIAL COMPLEXES 11
It is not difficult to show that d 1 is exact in E 1
1;2 too (this will be done later).
Hence the associated spectral sequence collapses at its second term, and the non-zero
entries of the tableau
are:
Hence,
e
In [Ko1, Theorem 4.1] it has been proved that \Pi - is shellable if - has no primitive
partition identities. This of course does not apply to \Pi 3;2;2;1 , since
has the identity 3+ 1. It is however not difficult to adapt the proof of [Ko1,
Theorem 4.1] to show that is shellable. This
adaptation is technical and requires to go into the details of the 4-pages proof of
the mentioned theorem, so we shall omit this argument. Alternatively, one could
show that P is shellable by a direct argument.
Now, associate a spectral sequence ( e
to P in the same way as above. The
Whitney homology groups of P are subgroups of the Whitney homology groups of
\Pi 3;2;2;1 . On the other hand, since P is shellable, d 1 must be exact in e
1;2 . Then,
of course, d 1 is also exact in E 1
1;2 .
5.2. Partitions with restricted block sizes.
Let \Pi n;1;:::;k denote the poset consisting of partitions with block sizes from the
set n). These lattices were considered in [W] in
connection with certain relative subspace arrangements. It is believed that \Pi n;1;:::;k
is torsion-free. We can obtain some information on the homology groups of these
lattices from the following proposition.
Proposition 5.2. \Pi n;1;:::;k is
Proof. \Pi n;1;:::;k is a lower ideal of the partition lattice \Pi n . \Pi n is a CM poset and
\Pi n;1;:::;k contains the first k \Gamma 1 rank levels of \Pi n . Let J be a subposet of \Pi n;1;:::;k
consisting of the complement of the first k \Gamma 1 rank levels of \Pi n , f(x)
Then the formulae (3.13) specialize to
e
since (a; -
Every interval ( - 0; a) is a CM poset of rank rk(a) - k, also P n J is CM of rank
k, hence
Using (3.2) we conclude that e
6. Sn-quotient of the complex of directed forests
In this section we shall assume the following notions to be known: directed graph,
a subgraph of a directed graph, directed tree, directed forest. If needed the reader
may consult any textbook on graph theory for the definitions. We shall use V (G),
resp. E(G), to denote the sets of vertices, resp. edges, of a directed graph G. We
think of E(G) as a subset of (V (G) \Theta V (G)) n f(x; (G)g. Since all the
graphs considered in this section are directed, we will often omit this word.
Following a hint of R. Stanley, [St2], the following simplicial complexes were
considered in [Ko2].
Definition 6.1. Let G be an arbitrary directed graph. Construct a simplicial complex
\Delta(G) as follows: the vertices of \Delta(G) are given by the edges of G and k-
simplices are all directed forests with are subgraphs of G.
Let Gn be the complete directed graph on n vertices, i.e., a graph having exactly
one edge in each direction between any pair of vertices, all together n(n \Gamma 1) edges.
It was shown in [Ko2] that \Delta(G n ) is shellable, thus all its homology groups are 0
except for the top one, and one can show that fi n\Gamma2 (\Delta(G n
Furthermore, there is an action of Sn on \Delta(G n ) induced by the permutation
action of Sn on [n], thus one can form the topological quotient
see
Figure
2 for the case It was asked in [Ko2, Section 6, Question 2]
what H was. The answer to that turned out to be more complex than we
thought. In this section we show that the groups H are not, in general,
free, and also give a formula for fi n\Gamma2
A combinatorial description for the cell structure of Xn . Clearly, the
action of Sn on \Delta(G n ) is not free. What is worse, the elements of Sn may fix
the simplices of \Delta(G n ) without fixing them pointwise: for example for
permutation (23) "flips" the 1-simplex given by the directed tree 2 /\Gamma 1 \Gamma! 3.
Therefore, one does not have a bijection between the orbits of simplices of \Delta(G n )
and simplices of Xn . To rectify the situation, consider the barycentric subdivision
We have a simplicial Sn -action on Bn induced from the Sn -
action on \Delta(G n ) and, clearly, Bn =Sn is homeomorphic to Xn . Furthermore, if
an element of Sn fixes a simplex of Bn then it fixes it pointwise. In this situation,
it is well-known, e.g. see [Br], that the quotient projection Bn !
a simplicial structure on Xn , in which simplices of Xn correspond to Sn -orbits of
the simplices of Bn with appropriate boundary relation.
Let us now give a combinatorial description of the Sn -orbits of the simplices of
Bn . Let oe be a simplex of Bn , then oe is a chain of forests on
labeled vertices, such that T i is a subgraph of T i+1 , for dim(oe). One can
view this data in a slightly different way: it is a forest with dim(oe)+1 integer labels
on edges (labels on different edges may coincide). Indeed, given a chain of forests
above, take the forest T dim(oe)+1 and put label 1 an all edges of the forest T 1 ,
label 2 on all edges of T 2 , which are not labeled yet, etc. Vice versa, given a forest
T with a labeling, let T 1 be the forest consisting of all edges of T with the smallest
label, let T 2 be the forest consisting of all edges of T with one of the two smallest
labels, etc. To make the described correspondence a bijection, one should identify
all labeled forests on which labelings produce the same order on edges.
Formally: the p-simplices of Bn are in bijection with the set of all pairs (T; OE T ),
where T is a directed forest on n labeled vertices and OE Z, such that
there exists an order-preserving injection / : Z! Z, such that
The boundary operator is given by: for a p-simplex (T; OE T
takes the same values as OE T except for the edges on which OE T takes ith and
(i+1)st largest values (say a and b), on these edges OE T i takes value a. Furthermore,
SPECTRAL SEQUENCES ON COMBINATORIAL SIMPLICIAL COMPLEXES 13
T p+1 is obtained from T be removing the edges with the highest value of OE T , OE Tp+1
is the restriction of OE T . Of course, this description of the boundary map is just
a rephrasing of the deletion of the ith forest from the chain of forests in the original
description. However, we will find it more convenient to work with the labeled
forests rather than the chains of forests.
The orbits of the action of Sn can be obtained by forgetting the numbering of
the vertices. Thus, using the fact that simplices of Xn and Sn -orbits of simplices
of Bn are the same thing, we get the following description.
The p-simplices of Xn are in bijection with pairs (T; OE T ), where T is a directed
forest on n unlabeled vertices and OE T is an edge labeling of T with
modulo a certain equivalence relation. This equivalence relation and the boundary
operator are exactly as in the description of simplices of Bn .
Figure
2.
On
Figure
2 we show the case 3. On the left hand side we have \Delta(G 3 ),
on the right hand side is X . The labeled forests next to the edges
indicate the bijection described above, labeling on the forests corresponding to the
vertices in X 3 is omitted. S 3 acts on \Delta(G 3 ) as follows: 3-cycles act as rotations
around the line which goes through the middles of the triangles, each transposition
acts as a central symmetry on one of the quadrangles, and as a "flip" on the edge
which is parallel to that quadrangle.
Filtration. There is a natural filtration on the chain complex associated to the
simplicial structure on described above. Let F i be the union of all simplices
has at most i edges. Clearly,
The description of the E 1 tableau. Recall that E 1
we use the indexing from Section 3. In other words, the homology is computed
with "truncated" boundary operator: the last term, where some edges are deleted
from the forest, is omitted. Clearly,
where the sum is over all forests with k edges and E T is a chain complex generated
by the simplices (T; OE T ), for various labelings OE T , with the truncated boundary
operator as above.
Let us now describe a simplicial complex whose reduced homology groups, after
a shift in the index by 1, are equal to the nonreduced homology groups of E T . The
arrangement of k(k \Gamma 1)=2 hyperplanes x cuts the space S
simplices, where H is the hyperplane given by the equation x 1
14 DMITRY N. KOZLOV
Denote this simplicial complex A k . The permutation action of S k on [k] induces
an S k -action on A k . It is easy to see that if an element of S k fixes a simplex of
A k , then it fixes it pointwise. Hence, for any subgroup \Gamma ' S k , the \Gamma-orbits of the
simplices of A k are in a natural bijection with the simplices of A k =\Gamma.
Let T be an arbitrary forest with n vertices and k edges. Assume that vertices,
resp. edges, are labeled with numbers acts on [n] by
permutation, let Stab (T ) be stabilizer of T under this action, that is the maximal
subgroup of Sn which fixes T . Then Stab (T ) acts on E(T ), i.e., we have a homomorphism
does not depend on
the choice of the labeling of vertices. However, relabeling the edges changes S(T )
to a conjugate subgroup. Therefore, for a forest T without labeling on vertices and
edges, S(T ) can be defined, but only up to a conjugation.
Proposition 6.2. The chain complex of A k =S(T ) and E T (with a shift by 1 in the
indexing) are isomorphic. In particular, e
Proof. Label the k edges of T with numbers As mentioned above, the
p-simplices of E T are in bijection with labelings of the edges of T with numbers
(using each number at least once). Taking in account the chosen labeling
of the edges, this is the same as to divide the set [k] into an ordered tuple of
non-empty sets, modulo the symmetries of [k] induced by the symmetries of T .
Clearly, these symmetries of [k] are precisely the elements of S(T ).
The (p \Gamma 1)-simplices of A k are in bijection with dividing [k] into an ordered tuple
of p+1 non-empty sets: by the values of the coordinates. Therefore we conclude that
the p-simplices of E T are in a natural bijection with the (p\Gamma1)-simplices of A k =S(T ).
Here the unique 0-simplex of E T , (T; 1), (1 is the constant function taking value 1),
corresponds in A k =S(T ) to the empty set, which is a (\Gamma1)-simplex. One verifies
immediately that the boundary operators of E T and A k =S(T ) commute with the
described bijection. Therefore E T and A k =S(T ) are isomorphic as chain complexes
(after a shift in the indexing). In particular, e
coefficients. Proposition 6.2 allows us to give a description of -entries in
the case when the homology groups are computed with rational coefficients. Indeed,
it is well known that, when a finite group \Gamma acts on a finite simplicial complex X,
one has e
is the maximal vector subspace
of e
acts trivially (more generally Q can be replaced with a field
whose characteristic does not divide j\Gammaj). Since A k is homeomorphic to S k\Gamma2 we
have e
2. It is easy to compute
e
In fact, for -
Q), one has
where sgn denotes the sign homomorphism sgn 1g. Therefore
e
0; otherwise,
where A k is the alternating group, A
Combined with the Proposition 6.2 this gives H i
cases. Therefore it follows
from (6.1) that rk E 1
is equal to the number of forests T
with k edges and n vertices, such that S(T ) ' A k . rk
that fi i
SPECTRAL SEQUENCES ON COMBINATORIAL SIMPLICIAL COMPLEXES 15
in [Ko2]), and fi i
In particular, by computing the Euler
characteristic of Xn in two different ways, we obtain
Theorem 6.3. For n - 3, fi n\Gamma2
The first values of f k;n are given in the table below. Note that there are zeroes
on and below the main diagonal and that the rows stabilize at the entry (k;
(for k - 2).
Zcoefficients. The case of integer coefficients is more complicated. In general,
we do not even know the entries of the first tableau. However, we do know that it
is different from the rational case, i.e., torsion may occur.
For example, let T be the forest with 8 vertices and 6 edges depicted on Figure 3.
Clearly, (12)(34)(56)g. It is easy to see that A 6 =S(T ) is a double
suspension (by which we mean suspension of suspension) of RP 2 , thus the only
nonzero homology group is e
In particular, E 1
4;6 is not free.
Figure
3.
2 6On the positive side, we can describe the values which d 1 takes on the "rational"
generators of E 1
us call a forest admissible if S(T ) ' A jE(T )j . For every
admissible forest T with k edges we fix some order on the edges, i.e., a bijection
determines uniquely an integer generator e T of H
by
where we sum over all right cosets of S(T ), (we choose one representative for each
coset). Observe that the sign of g, resp. the simplex (T; g ffi / T ), are the same for
different representatives of the same right coset class, because S(T ) ' A k , resp. by
the definition of S(T ).
Proposition 6.4. For an admissible forest T , we have
ff
where the sum is over S(T )-orbits of E(T ), for which there exists a representative ff,
such that T n ff is admissible, we choose one representative for each orbit; note that
the admissibility of T n ff depends only on the S(T )-orbit of ff, not on the choice of
the representative. Notation in the formula: T n ff denotes the forest obtained from
T by removing the edge ff; ~
defined by ~
~
consists of those permutations
of edges of T n ff which can be extended to T by fixing the additional edge.
Proof. For an admissible forest T with k edges and a bijection OE : E(T
OE) denote a face simplex of (T; OE), where e
T is obtained from T by removing
the edge with the highest label, ~
OE is the restriction of OE to e
T . In our notations
However, for convenience, we use the notation
"tilde" in the rest of the proof.
According to the general theory for spectral sequences, d 1
@ denotes the usual boundary operator, and we view @(e T ) as embedded into the
relative homology group H k\Gamma2 linear combination of simplices
which are obtained from the simplices (T; g ffi / T ) by either merging two
labels, or omitting the edge with the top label. e T 2 H means that
the application of the "truncated" boundary operator to e T gives 0, therefore all
the simplices obtained by merging two labels will cancel out. Furthermore, since
2, and the group H k\Gamma2
freely generated by e U , where U is an admissible forest with edges, we can
conclude that also the contributions ( e
OE), where e
T is not admissible, will cancel
out. Combining these arguments with (6.2) we obtain:
sgn (g)( e
where we have only those terms left in the sum, for which e
T is admissible. After
regrouping we get
sgn (g)( e
ff
sgn (g)( e
where in the second term the first sum is taken over all S(T )-orbits of [k], for which
e
T is admissible, while the second sum is taken over all right cosets S(T )g which
have a representative g such that g ffi / T we take one representative per
coset. To verify (6.5) we just need to observe that the S(T )-orbit of (g
does not depend on the choice of the representative of S(T )g; this follows from the
definition of S(T ).
Finally, one can see that, for ff being an edge of T , such that T n ff is admissible,
sgn (g)( e
S(Tnff)h
where the sum in the first term is again taken over all right cosets S(T )g which
have a representative g such that g ffi / T and the sum in the second term is
simply over all right cosets of S(T n ff).
Indeed, on the left hand side we have a sum over all labelings of E(T ) with
such that ff gets a label k, and we consider these labelings up to
a symmetry of T ; each labeling comes in with a sign of the permutation g, which
is obtained by reading off this labeling in the order prescribed by / T . On the right
hand side the same sum is regrouped, using the observation that to label E(T ) with
[k], so that ff gets a label k, is the same as to label E(T n ff) with [k \Gamma 1]. The only
details which need attention are the multiplicity and the sign.
Every S(T )-orbit of labelings of E(T ) with [k] so that ff gets a label k corresponds
to [S(T
S(T )] of S(T n ff)-orbits of labelings of E(T n ff) with [k \Gamma 1], since
we identify labelings by the actions of different groups: S(T n ff) ' e
S(T ). Each of
this S(T n ff)-orbits comes with the same sign, because S(T n ff) ' A k\Gamma1 . The sign
SPECTRAL SEQUENCES ON COMBINATORIAL SIMPLICIAL COMPLEXES 17
corresponds to the change of the order in which we read off the
edges: instead of reading them off according to / T , we first read off along / Tnff
and then read off the edge ff last. Formally: g ffi /
hence sgn
defined by ~ hj h, ~
Combining (6.4), (6.5) and (6.6) we obtain (6.3).
Homology groups of
just a point. As shown in Figure 2, X 3 ' S 1 , where ' denotes homotopy
equivalence. With a bit of labour, one can manually verify that X 4 ' S 2 . Further-
more, one can see that H 3 (X 5
We leave this
to the reader, while confining ourselves to the case Figure 4 we have all
forests on 6 vertices. We denote some of the forests by two digits. The numbers
over the edges denote the order in which we read the labels, i.e., the bijection / T .
It is easy to see that A k =S(T ) is homeomorphic to S k\Gamma2 for all admissible T , and
is contractible otherwise. The only nontrivial cases are 41, 47, 48, 51, 55, and 59,
all of which can be verified directly. Therefore, the only nontrivial entries of E 1
(Zcoefficients) will lie on the can be computed
from the chain complex 0
k=1 k=2, not admissible31 33213 1
k=3, admissible k=3, not admissible
k=4, not admissible
3 4k=5, admissible
Figure
4.
k=5, not admissible
From Proposition 6.4 we have
here the two-digit strings denote the corresponding forests on Figure 4. Thus
e
Therefore 6 is the smallest value of n, for which the homology groups H
are not free.
--R
Whitney numbers of geometric lattices
Galois connections and the Leray spectral sequence
"Handbook of Combinatorics"
"First European Congress of Mathematics, Paris 1992"
Introduction to compact transformation groups
A homotopy complementation formula for partially ordered sets
The generalized Dowling lattices
Fundamentals of the Theory of Groups
Complexes of directed trees
Exact couples in algebraic topology I
User's Guide To Spectral Sequences
Homotopy properties of the poset of nontrivial p-subgroups of a group
Higher algebraic K-theory I
group actions on subspace arrangements and combinatorics of discriminants
--TR | shellability;homology groups;posets;spectral sequences;graphs |
594153 | Fast Subsumption Checks Using Anti-Links. | The concept of anti-link is defined (an anti-link consists of two occurrences of the same literal in a formula), and useful equivalence-preserving operations based on anti-links are introduced. These operations eliminate a potentially large number of subsumed paths in a negation normal form formula. Those anti-links that directly indicate the presence of subsumed paths are characterized. The operations have linear time complexity in the size of that part of the formula containing the anti-link.The problem of removing all subsumed paths in an NNF formula is shown to be NP-hard, even though such formulas may be small relative to the size of their path sets. The general problem of determining whether there exists a pair of subsumed paths associated with an arbitrary anti-link is shown to be NP-complete. Additional techniques that generalize the concept of pure literals are introduced and are also shown to eliminate redundant subsumption checks. The effectiveness of these techniques is examined with respect to some benchmark examples from the literature. | Introduction
The logical consequences of a ground formula, expressed as minimal implied clau-
ses, are useful in certain approaches to non-monotonic reasoning (Kean and Tsi-
knis, 1992; Przymusinski, 1989; Reiter and de Kleer, 1987), where all consequences
of a formula set (e.g., the support set for a proposed commonsense conclusion) are
required. Minimal conjunctions that imply a formula are useful in situations where
satisfying models are desired, as in error analysis during hardware verification.
Such minimal implied clauses are the formula's prime implicates, and the minimal
conjunctions that imply it are its prime implicants.
Many algorithms have been proposed to compute the prime implicates of propositional
boolean formulas. Most algorithms (de Kleer, 1992; Jackson and Pais,
1990; Jackson, 1992; Kean and Tsiknis, 1990; Slagle et al., 1970) assume that
the input is either in conjunctive normal form (CNF) or in disjunctive normal
form (DNF). The algorithm of (Ngair, 1993) requires the input to be a conjuncti-
This research was supported in part by National Science Foundation Grant CCR-9101208
(Ramesh and Murray) and by Deutsche Forschungsgemeinschaft within the Schwerpunktpro-
Deduktion (Beckert and H-ahnle). Some of the results in this paper appear in condensed
form in the Proceedings of the 5 th International Conference on Logic Programming and Automated
Reasoning, Kiev, Ukraine, July 16-21, 1994, and in the Proceedings of the National Conference
on Artificial Intelligence, Seattle, WA, July 31-August 4, 1994.
on of DNF formulas. In (Ramesh and Murray, 1993) we propose a set of techniques
for finding the prime implicates of formulas in negation normal form (NNF). Our
techniques are based on dissolution, an inference rule introduced in (Murray and
Rosenthal, 1987b), and on an algorithm called Pi. We have discovered classes of
formulas for which our techniques are polynomial but for which any CNF/DNF-
based technique must be exponential in the size of the input. Ngair has also
introduced similar examples; however, our method is more general than Ngair's
which is based on order theory (Ngair, 1993). Coudert and Madre (1992) have
also developed an algorithm for computing prime implicates and implicants of formulas
in which binary decision diagrams (BDDs) are employed. Although we use
prime implicate/implicant generation as an example to demonstrate the utility of
anti-link operations, anti-link operations can be employed in any application that
requires eliminating subsumed paths in an NNF formula. We have successfully
used anti-link operations in a diagnosis system (Ramesh and Murray, 1995).
In (Ramesh and Murray, 1993) we describe the Pi algorithm; there, Pi is used
to enumerate all the prime implicates of a full dissolvent, an NNF formula that
has no conjunctive links (defined later). Pi repeatedly does subsumption checks to
keep intermediate results as small as possible. However these checks are expensive.
Many result in failure, and they have to be done on sets which can be exponentially
large. The time required for these operations can be reduced by using a more
compact representation of the intermediate results (de Kleer, 1992), but avoiding
as many such checks as possible is the focus of this paper.
We show that the full dissolvent can be restructured before applying Pi such
that many non-prime implicates are removed without doing subsumption checks
at all. We define disjunctive and conjunctive anti-links 1 in NNF formulas, and we
identify operations to remove such anti-links and their associated subsumed paths.
This leaves fewer subsumption checks for the Pi algorithm.
In the next section we describe our path semantics viewpoint and our graphical
representation of formulas in classical logic. In Section 3 we introduce anti-links
and develop useful equivalence-preserving operations based on them. In Section 4,
complexity issues are discussed and some NP-completeness results are proven.
Section 5 introduces further techniques based on strictly pure subformulas. The
effectiveness of our techniques on certain benchmark formulas described by Ngair
(1993) is explored. In Section 6 we introduce strictly pure full blocks and use them
to develop a method that reduces the number of subsumption tests required.
1 Anti-links and some associated operators were first proposed by Beckert and H-ahnle - personal
communication. The first motivation for studying anti-links arose in connection with regular
clausal tableau calculi (Letz et al., 1992). The anti-link rule as it will be defined later can be
viewed as an implementation of the regularity condition in (Letz et al., 1992) for the propositional
non-clausal case (Letz et al. considered the first-order clausal case). There, refinements of general
inference rules are considered, whereas the anti-link rule allows implementation as a preprocessing
step.
Fast Subsumption Checks Using Anti-Links 3
Foundations: Facts on Formulas in Negation Normal Form
We assume the reader to be familiar with the notions of atom, literal, and formula
from classical logic. We consider only formulas in negation normal form (NNF):
The only connectives used are conjunction and disjunction, and all negations are
at the atomic level. This restriction is reasonable, since formulas that contain
negations and other operators at any level can be converted to NNF in polynomial
time.
In this section, we introduce a number of technical terms and definitions that
are treated in detail in (Murray and Rosenthal, 1993). They are required for the
development of the anti-link operations defined in Section 3, and they make the
paper self-contained even for readers not familiar with dissolution.
2.1 Semantic Graphs
Semantic graphs are a graphical representation of NNF formulas:
Definition 1. A semantic graph consists either of
1. one of the constants true and false,
2. a literal A or A,
3. a c-arc, which is a conjunction of two semantic graphs, or
4. a d-arc, which is a disjunction of two semantic graphs.
We use the notation (X; Y ) c for the c-arc from X to Y and similarly use (X; Y ) d
for a d-arc; the subscript may be omitted when no confusion is possible.
Each semantic graph used in the construction of a semantic graph G is called
an explicit subgraph of G. If
subgraph of G if X (Y ) is not a c-arc; otherwise the fundamental subgraphs of X
(Y are fundamental subgraphs of G. Similarly if
a fundamental subgraph of G if X (Y ) is not a d-arc, otherwise the fundamental
subgraphs of X (Y ) are fundamental subgraphs of G.
The set of nodes of a semantic graph G consists of all literal occurrences used
in its construction; the same holds for the set of c-arcs of G and the set of d-arcs
of G; i.e., these sets include the nodes, c-arcs, and d-carc, respectively, occurring
in the explicit subgraphs of G.
In the following, we identify a semantic graph G and the formula it represents 2 ;
essentially, the only difference between the semantic graph and the formula is the
point of view, and we will use either term depending upon the desired emphasis.
For a more detailed exposition, see (Murray and Rosenthal, 1993).
true, false, and positive literals represent themselves; a negative literal A represents :A;
4 Anavai Ramesh et al.
In addition, we identify a semantic graph and the triple consisting of its set of
nodes, its set of c-arcs, and its set of d-arcs. The only exception, were this latter
identification is not possible, because it would be ambiguous, are the semantic
graphs true and false (both correspond to (;; ;; ;)). Note, however, that when a
semantic graph contains occurrences of true and false, the obvious truth-functional
reductions apply. Unless otherwise stated, we will assume that semantic graphs
are automatically so reduced.
In pictorial representations, c-arcs and d-arcs are indicated by the usual symbols
for conjunction and disjunction; the arguments of a c-arc are placed vertically
above each other, the arguments of a d-arc horizontally besides each other.
Example 1. Below, the formula
E) - (:A - (B - C)) (1)
is displayed as a semantic
A
Y
(2)
The boxes in (2) show the explicit subgraphs used in the construction of the
semantic graph (since c-arcs and d-arcs are associative and commutative we do
not show the explicit subgraphs in subsequent pictorial representations).
Definition 2. If A and B are nodes in a graph, and if (X; Y ) ff is an arc
or d) with A in X and B in Y , we say that is the arc connecting A
and B, and that A and B are ff-connected.
Example 2. In (2), C is c-connected to each of B, A, C, D, and E, and is d-
connected to A.
Definition 3. Let G be a semantic graph. A partial c-path through G is a set
of nodes such that any two are c-connected, and a c-path through G is a partial
c-path that is not properly contained in any partial c-path.
(Partial) d-paths are defined accordingly using d-arcs instead of c-arcs.
'(p) denotes the set of literals of a path p.
Fast Subsumption Checks Using Anti-Links 5
Example 3. Below, the semantic graph (2) is shown with lines indicating its c-
paths (on the left) and its d-paths (on the right):
A
A
The c-paths are fC; A; Ag, fC; A; B; Cg, fD; Ag, fD; B; Cg, fE; Ag, fE; B; Cg;
the d-paths are fC; D; Eg, fA; D; Eg, fA; Bg, fA; Cg.
The following lemma is obvious.
Lemma 1. Let G be a semantic graph. Then an interpretation I satisfies (falsi-
fies) G iff I satisfies (falsifies) every literal on some c-path (d-path) through G.
2.1.1 Subgraphs
We will frequently find it useful to consider subgraphs of a semantic graph that
are not explicit.
Definition 4. Given a semantic graph G and a non-empty subset N of the nodes
of G, the subgraph of G that corresponds to N is that part of G that consists of
nodes from N , where the logical structure of that part is preserved.
denotes the subgraph of G corresponding to the set of nodes of G that
are not in N .
Two subgraphs H and H 0 of G meet each other if they have nodes in common.
A non-empty subset N of nodes corresponds unambiguously to one subgraph
of G. The empty set corresponds to both true and false; true and false are sub-graphs
of all semantic graphs.
For a more precise definition of subgraphs, see (Murray and Rosenthal, 1993).
Example 4. Below the subgraph of (2) is shown that corresponds to the node set
g.
A - D
A
6 Anavai Ramesh et al.
2.1.2 Blocks
The most important subgraphs are the blocks:
Definition 5. A c-block H is a subgraph of a semantic graph G with the property
that any c-path p that includes at least one node from H passes through H , where p
passes through H iff the subset of p consisting of nodes of H is a c-path through H .
d-blocks are accordingly defined using d-paths.
Example 5. In (2), the subgraph corresponding to the node set fA; D; E;A; Cg
is a c-block. However, it is not a d-block since the d-path fA; Bg restricted to the
subgraph is fAg, which is a proper sub-path of fA; Cg in the subgraph.
Definition 6. A full block is a subgraph that is both a c-block and a d-block.
One way to envision a full block is to consider conjunction and disjunction as
n-ary connectives. Then a full block is a subset of the arguments of one connective,
i.e., of one explicit subformula.
Full blocks may be treated as essentially explicit subgraphs (up to the order of
arguments), and the Isomorphism Theorem from (Murray and Rosenthal, 1987a)
assures us that they are the only structures that may be so treated.
Example 6. In (2), the subgraph corresponding to fC; A; Eg is a full block. It
can be written as (fC; Ag; E) d ; i.e., we can regard the upper part of the graph
as (fC; A; Eg; D) d . The fundamental subgraphs of the upper disjunction are
and the literals D and E.
Definition 7. Let H be a full block; H is a conjunction or a disjunction of fundamental
subgraphs of some explicit subgraph M . If the final arc of M is a
conjunction, then we define the c-extension of H to be M and the d-extension of
H to be H itself. The situation is reversed if the final arc of M is a d-arc.
We use the notation CE(H) and DE(H) for the c- and d-extensions, respecti-
vely, of H .
Example 7. In (2),
In this paper, we compute c- and d-extensions of single nodes only. Single nodes
are always full blocks and so testing for this property will be unnecessary. If we
assume that formulas are represented as n-ary trees, computing these extensions
can be done in constant time; we merely determine whether the given node's parent
is a conjunction or a disjunction, and the appropriate extension is then either the
node itself or the parent.
Fast Subsumption Checks Using Anti-Links 7
2.2 Path Dissolution
Path dissolution (Murray and Rosenthal, 1993) is an inferencing mechanism for
classical logic that has several interesting properties. It is an efficient generalization
of the method of analytic tableaux, is strongly complete in the propositional case,
and can produce a list of satisfying interpretations of a formula. The latter feature
is particularly valuable in this or in any setting in which one wishes to make use
of satisfying interpretations rather than merely to determine whether any exist.
Path dissolution works by selecting a link and restructuring the formula so
that all paths through the link are eliminated. The nature of the restructuring is
such that one cannot rely on CNF (conjunctive normal
starts out in CNF, a single dissolution step produces an unnormalized formula.
One consequence of eliminating all paths through a link is strong completeness:
Any sequence of dissolution steps will eventually create a linkless formula. The
paths that remain may be interpreted as models (satisfying interpretations) of the
formula.
Definition 8. A c-link is a complementary pair of c-connected nodes; d-connec-
ted complementary nodes form a d-link.
Unless stated otherwise, we use the term link to refer to a c-link. Path dissolution
is in general applicable to collections of links; here we restrict attention to
single links.
Example 8. Consider the link fA; Ag in (2). Then the entire graph
is the smallest full block containing the link.
Definition 9. Let X be a semantic graph and H an arbitrary subgraph. 3
The c-path complement of H with respect to X , written CC(H;X), is the
subgraph of X consisting of all literals in X that lie on c-paths that do not contain
nodes from H . If no such literal exists, CC(H;X)= false.
The c-path extension of H with respect to X , written CPE(H;X), is the sub-graph
of X containing all literals that lie on c-paths that pass through H . If no
such literal exists,
In the development of anti-link operations, we will use operations that are the
duals of CC and CPE. We use DC for the d-path complement and DPE for the
d-path extension operators. Their definitions are straightforward by duality,
Because we consider only single link dissolution, the first arguments of CC
and CPE will be literals when these operators are used in the construction of
dissolvents in the examples below. However, this is not the case in Section 3, and
hence the above definitions of these operators are in full generality.
usually is but does not have to be a subgraph of X.
4 Note, that CPE has two arguments whereas CE (Def. 7) has but one; intuitively, CE has an
implicit second argument that is always the entire graph in which the explicit argument occurs.
8 Anavai Ramesh et al.
Example 9. In (2),
E)
The above definitions of the operators CC and CPE are adequate for the
definition of dissolution. However, (equivalent) more constructive definitions are
given in Section 3, where they will be required in proving the correctness of the
anti-link operations introduced there.
The reader is referred to (Murray and Rosenthal, 1993) for the proofs of the
lemmas below.
Lemma 2. Let H be an arbitrary subgraph of G. The c-paths of CPE(H;G) are
precisely the c-paths of G that pass through H .
Corollary 1. CPE(H;G) is exactly the subgraph of G relative to the set of
nodes that lie on c-paths that pass through H .
Lemma 3. Let H be an arbitrary subgraph of G. The c-paths of CC(H;G) are
precisely the c-paths of G that do not pass through H .
Corollary 2. CC(H;G) is exactly the subgraph of G relative to the set of nodes
that lie on c-paths that do not pass through H .
Lemma 4. If H is a c-block, then CC(H;G)- CPE(H;G) and G have the same
c-paths.
The above lemmas and corollaries about CC and CPE all hold in dual form
for DC and DPE.
Suppose that we have literal occurrences A and A residing in conjoined sub-graphs
X and Y , respectively. It is intuitively clear that the c-paths through (X -
Y ) that do not contain the link fA; Ag are those through (CPE(A;X)-CC(A; Y
plus those through (CC(A; X)
Ag be a link, and let be the smallest
full block containing H . DV (H; M ), the dissolvent of H in M , is defined as follows:
If H is a single c-block, then DV (H;
Otherwise (i.e., if H consists of two c-blocks),
Fast Subsumption Checks Using Anti-Links 9
The only way that H can be a single c-block is if H is a full block (it is trivially a
d-block). In that case, and A and A must be (up to commutations and
reassociations) arguments of the same conjunction.
The following proposition follows from the corollaries and Lemma 4:
Proposition 1. Either of the two more compact graphs shown below has the
same c-paths as DV (H; M ), and may thus be used instead:
Y
The semantic graphs from the above proposition are not identical to DV (H; M)
as graphs, but they do have the identical c-paths: all those of the original full block
except those of CPE(A;X)- CPE(A; Y ), i.e., except those through the link.
Example 10. If we dissolve on the link fA; Ag in (2) (using the compact form (4)
of dissolution from Proposition 1), the graph that results is:
A
Theorem 1. Let H be a link in a semantic graph G, and let M be the smallest
full block containing H . Then M and DV (H; M) are logically equivalent.
A proof of Theorem 1 (in a more general form) can be found in (Murray and
Rosenthal, 1993).
We may therefore select an arbitrary link H in G and replace the smallest full
block containing H by its dissolvent, producing (in the ground case) an equivalent
graph. We call the resulting graph the dissolvent of G with respect to H . Since
the paths of the new graph are all that appeared in G except those that contained
the link, this graph has strictly fewer c-paths than the old one. As a result, finitely
many dissolutions (bounded above by the number of c-paths in the original graph)
will yield a linkless equivalent graph. This proves:
Theorem 2. At the ground level, path dissolution is a strongly complete rule of
That means, that the result of applying dissolution repeatedly to an unsatisfiable semantic
graph results in the graph false, independently of the choice of the link that is dissolved on at
each step.
2.3 Prime Implicates/Implicants
We briefly summarize basic definitions regarding implicates. The treatment for
implicants is completely dual and is indicated by appropriate dual expressions in
parentheses.
Definition 11. A disjunction (conjunction) D subsumes another disjunction D 0
(conjunction
true (false) is subsumed by all disjunctions (conjunctions).
A disjunction is called true iff it is equivalent to true. A conjunction is called
false iff it is equivalent to false.
Lemma 5. If a disjunction (conjunction) D 0 that is not true (false), then D subsumes
A true disjunction (false conjunction) subsumes another true disjunction (false
conjunction) only.
Definition 12. A disjunction (conjunction) P of literals is an implicate (impli-
cant) of a formula G, iff G
A disjunction (conjunction) D is a prime implicate (prime implicant) of a formula
G iff
1. D is not true (false).
2. D is an implicate (implicant) of G.
3. For all literals A i in D, Gj= (D
Note that the set of all prime implicates (implicants) of a formual G, when
treated as a CNF (DNF) formula, is equivalent to G.
Definition 13. Let D be the set of all prime implicates of a formula G. A prime
implicate D of G is essential if D n fDg is not equivalent to G, otherwise D is
inessential.
2.4 Fully Dissolved Formulas
If we dissolve in a semantic graph G until it is linkless, we call the resulting graph
the full dissolvent of G and denote it by FD(G). Observe that FD(G) is dependent
on the order in which links are activated. However, the set of c-paths in FD(G) is
unique: It is exactly the set of satisfiable c-paths in G. Because FD(G) is link-free,
the consequences, i.e., implicates, of G are represented in the d-paths of FD(G).
In a dual manner, we may define dissolution for disjunctive links; in that case,
FD(G) has no disjunctive links, and the implicants of G are represented in the
c-paths of FD(G). These relationships are made precise by Theorem 3 below.
Fast Subsumption Checks Using Anti-Links 11
In the discussion that follows, we will often refer to subsumption of d- and c-
paths rather than of disjuncts and conjuncts. Paths are defined as sets of literal
occurrences, but with regard to subsumption, we consider the literal set '(p) of
a path p. In this way, no change in the standard definitions is necessary. The
theorem below was proved in (Ramesh and Murray, 1993).
Theorem 3. In any non-empty formula in which no c-path (d-path) contains a
link, every implicate (implicant) of the formula is subsumed by some d-path (c-
path) in the formula.
Corollary 3. Every prime implicate (implicant) of a reduced DNF (CNF) for-
mula, i.e., one with no false conjuncts (true disjuncts), is subsumed by some d-path
(c-path) in the formula.
This follows directly from the theorem because such a DNF (CNF) formula has
no c-paths (d-paths) with links.
In (Ramesh and Murray, 1993), the prime implicates of G are computed by first
obtaining FD(G); then, knowing that all implicates are present in the d-paths of
FD(G), the Pi algorithm computes -(FD(G)), where
is a d-path through F , '(p) is not true;
for all d-paths q through
When used in this way, Pi extracts all unsubsumed non-tautological d-paths from
an NNF formula without c-links. In general, Pi computes -(F ) for an arbitrary
3 Subsumed Paths and Anti-Links
Much of the material in this section is a detailed description of the results sketched
in (Ramesh et al., 1994). Our goal is to first identify as many subsumed paths
as possible in an efficient manner and then eliminate them. The presence of anti-
links (both disjunctive and conjunctive) in a graph may indicate that subsumed
d-paths are present in the graph. We now define anti-links and then discuss ways
to identify and remove subsumed paths due to anti-links.
Definition 14. If is a d-arc in a semantic graph G and if AX and
A Y are nodes (occurrences of literal in X and in Y respectively, then we call
a disjunctive anti-link.
is a c-arc in G, then we call fAX ; A Y g a conjunctive anti-link.
Note, that M is the smallest full block containing the anti-link.
The following theorem relates subsumed paths to anti-links. The theorem is
immediate for CNF formulas; there is an obvious dual theorem regarding subsumed
c-paths that is immediate for DNF formulas.
12 Anavai Ramesh et al.
Theorem 4. Let G be a semantic graph in which a d-path p is subsumed by a
distinct non-tautological d-path p 0 in G. Then G contains either a disjunctive
anti-link or a conjunctive anti-link.
Proof. There are two distinct possibilities, either
Suppose there must be a literal having two different occurrences.
These two occurrences must be either d- or c-connected and thereby constitute
either a disjunctive or a conjunctive anti-link.
Suppose '(p) oe '(p 0 ). The proof is by induction on the structure of G.
Basis: G is a literal. The result is vacuously true since there cannot be two distinct
d-paths through G.
Induction step:
(a) Suppose are
both from the same explicit subgraph (X or Y ) or from different explicit
subgraphs. If they lie in the same explicit subgraph then the result
follows directly from the induction hypothesis. If they are from different
subgraphs then every literal in '(p 0 ) occurs at least once in X and at least
once in Y . Any two such occurrences of some literal in '(p 0 ) constitute
a conjunctive anti-link.
(b) Suppose Y be the restriction of p to X and
to Y respectively. Let p 0
Y be the restriction of p 0 to X and to
Y respectively. Since p and p 0 are distinct, either p X and p 0
X must be
distinct, or p Y and p 0
Y must be distinct (or both), so assume without loss
of generality that p X and p 0
are distinct.
If either p X subsumes p 0
X or vice versa, then by the induction hypothesis,
must have an anti-link and so does G. On the other hand if p X and
X do not subsume each other, then there must be some literal (say L)
in '(p 0
which is not in p X . But since p 0 subsumes p, there must be
an occurrence of L in p Y . The two occurrences of L, one in p 0
X and the
other in p Y , constitute a disjunctive anti-link.
Unfortunately, the presence of anti-links does not imply the presence of subsumed
paths, and hence the converse of the above theorem is not true.
3.1 Redundant Anti-links
We now identify those disjunctive anti-links which do imply the presence of subsumed
paths.
Definition 15. A disjunctive anti-link fAX ; A Y g with respect to the graph G is
redundant if either CE(AX ) 6= A or
Fast Subsumption Checks Using Anti-Links 13
Definition 16. Let fAX ; A Y g be a disjunctive anti-link in graph G, where
is the smallest full block containing the anti-link.
is the set of all d-paths of M which pass through both
and A Y or through both and AX .
Example 11. Consider the following graph
Y
A Y
The two occurrences of A form a disjunctive anti-link. Because
contains the d-path
(indicated by a line). But since CE(AX there are no paths
through is the only member of DP (fAX ; A Y g; G). The anti-
link is redundant, and p is subsumed by p (with literal set fA; Cg).
Notice that had G been embedded in a larger graph G 0 , every d-path q containing
p in G 0 would be subsumed by a corresponding d-path q 0 that differs from q only
in that q 0 contains p 0 instead of p.
In general, one or both of the literals in a redundant anti-link fAX ; A Y g is an
argument of a conjunction, and DP (fAX ; A Y In the above example,
the two occurrences of C are both arguments of disjunctions, and thus comprise a
non-redundant anti-link for which DP (fCX ; C Y
Although only redundant disjunctive anti-links contribute directly to subsumed
d-paths, non-redundant anti-links do not prohibit the existence of subsumed paths.
However, such non-redundant anti-links do not themselves provide any evidence
that such paths are in fact present.
Theorem 5. Let fAX ; A Y g be a redundant disjunctive anti-link in a semantic
graph G. Then each d-path in DP (fAX ; A Y g; G) is properly subsumed by a d-
path in G that contains the anti-link.
Proof. Recall that a d-path (c-path) in a graph G is said to pass through a sub-graph
X of G if the path when restricted to the set of nodes in X forms a d-path
(c-path) in X . Let p 2 DP (fAX ; A Y g; G), and assume without loss of generality
that p passes through both CE(AX and A Y . Note that CE(AX is
non-empty and that is the largest full block containing the anti-link.
We may write CE(AX ) as
are p restricted to X and to Y , respectively,
and p o is p restricted to nodes outside of both X and Y . By construction, AX 62 p X
and thus p X passes through some C
restricted to C i , and hence
. The d-path p 0
14 Anavai Ramesh et al.
3.2 An Anti-Link Operator
The identification of redundant disjunctive anti-links can be done easily by checking
to see if either CE(AX ) 6= AX or After identifying a redundant
anti-link, it is possible to remove it using the disjunctive anti-link dissolvent
(DADV) operator defined below; in the process, all d-paths in DP (fAX ; A Y
are eliminated, and the two occurrences of the anti-link literal are collapsed into
one.
Definition 17. Let fAX ; A Y g be a disjunctive anti-link and let
the smallest full block containing the anti-link. Then
Example 12. Consider again the semantic graph (5) from Example 11. We have
C), so the upper conjunct in DADV is
E). For the middle conjunct,
this conjunct is (B - A). Finally in the lower conjunct, DPE(AX
and false, so this reduces to C). The result is:
We point out that although DADV produces a CNF formula in the above
simple example, in general it does not. In particular, the above graph can be
simplified as the consequence of easily recognizable conditions, and the resulting
graph is not in CNF. For the details, see Case 1 of Section 3.5.
3.3 Extension and Path Complement Operators
A number of more primitive operators are used in the definition of DADV ; they are
described in (Murray and Rosenthal, 1993) and have been defined in Section 2. We
present equivalent constructive descriptions here in order to prove Lemma 6 below,
and, in the next subsection, to verify that DADV has the desired properties.
Fast Subsumption Checks Using Anti-Links 15
Proposition 2. Let G be a semantic graph and H an arbitrary subgraph. Then
false if H does not meet G
the final arc of G is a d-arc
if the final arc of G is a c-arc
true if H does not meet G
the final arc of G is a c-arc
if the final arc of G is a d-arc
G if H does not meet G
false if
the final arc of G is a d-arc
if the final arc of G is a c-arc
G if H does not meet G
true
the final arc of G is a c-arc
if the final arc of G is a d-arc
are the fundamental subgraphs of G that meet H , and F i
are those that do not.
Lemma 6. If G is a graph and A is a literal occurrence in G, then CC(A;G) is
logically equivalent to
Proof. We prove the lemma by showing that the formula on the left and the
formula on the right possess exactly the same set of d-paths; the result then follows
from Lemma 1. The proof is done via induction on the syntactic structure of G
(the lemma trivially holds if true or
1. If G is a literal, then and both the set of d-paths of CC(A;G) and the
set of d-paths of are empty. Note, that
2. If loss of generality assume A belongs to X .
Hence By the induction hypothesis, the d-
paths of CC(A;X) are just those of (DPE(A;X) \Gamma fAg)-DC(CE(A);X). So
CC(A;G) has the same d-paths as (DPE(A;X) \Gamma fAg)-DC(CE(A);X)-Y .
Now consider the right hand side of the equation. Since A is in X ,
Therefore,
be disjoint from Y , and thus
Therefore we can write the right hand side of the equation as (DPE(A;X) \Gamma
factoring out the subgraph Y we get
an equivalent subgraph having
the same d-paths. But this is just the semantic graph that has been shown to
have the same d-paths as the left hand side.
3. Finally suppose again assume that A is in X . Now there are
two subcases to consider.
a) If false and thus has no d-paths, then A in X is not d-
connected to any other subgraph in X . Hence X is of the form A-C 1 -
and A. As a result, both DC(CE(A);G)
and d-paths.
(b) If CC(A;G) 6= false, then
and thus CC(A;X) 6= false. Therefore, by the induction hypothesis,
CC(A;G) has the same d-paths as
Focusing now on the right hand side of the equation,
DPE(A;X) by definition. The c-extension of A can only include nodes
from X (otherwise, contrary to the subcase (b) condi-
tion). Therefore, . Therefore the
right hand side of the equation has the same d-paths as (DPE(A;X) \Gamma
fAg)- (DC(CE(A);X)-Y ). This is just the result obtained for the left
hand side in this subcase.
3.4 Correctness of DADV
In Theorem 6 below we show that DADV (fAX ; A Y g; G) is logically equivalent
to G and does not contain the d-paths of DP (fAX ; A Y g; G).
Theorem 6. Let be the smallest full block containing fAX ; A Y g, a
disjunctive anti-link in semantic graph G. Then DADV (fAX ; A Y g; M) is equivalent
to M and differs in d-paths from M as follows: d-paths in DP (fAX ; A Y
are not present, and any d-path of M containing the anti-link is replaced by a path
with the same literal set having only one occurrence of the anti-link literal.
Fast Subsumption Checks Using Anti-Links 17
Proof. Note that AX and A Y are literal occurrences (and hence d-blocks) in X
and in Y respectively. By the dual of Lemmas 4, X is equivalent to DC(AX ; X)-
X), and from the distributive law, M is equivalent to
Similarly, Y is equivalent to we expand the
upper occurrence of Y and distribute. Thus, M is equivalent to
By the duals of Lemmas 2 and 3, not only have we rewritten M equivalently, but
the d-paths of M have been preserved. We will continue to rewrite M ; our goal is to
eventually put it in an equivalent form in which the d-paths of DP (fAX ; A Y
have been omitted.
Consider the d-paths of DC(AX ; X) - the d-paths in X that miss AX . They
either miss CE(AX ), the c-extension of AX , or pass through CE(AX g.
Hence DC(AX ; X) has the same d-paths as
By replacing the lower occurrence of DC(AX ; X) in the previous graph, we get
the following graph M 0 which is equivalent to M and has the same d-paths as
Every d-path in the subgraph DPE((CE(AX
Theorem 5, all these paths are subsumed by other d-
paths. Therefore, we can remove the subgraph DPE((CE(AX
preserving equivalence to get the graph M 00 shown below.
Again by using arguments dual to the one given earlier for X , we have that Y and
have identical d-paths.
Replacing Y in M 00 , we find that every d-path in the subgraph DPE(AX ; X)-
Again by Theorem 5, these
paths are also subsumed by other d-paths. Therefore we can remove the subgraph
preserve equivalence; M 000 results.
The d-paths in M 000 are those of M excluding the d-paths in DP (fAX ; A Y
Consider now the d-paths of DPE(AX . They are
exactly those of M (and of M 000 ) that contain the anti-link: They each contain two
occurrences of the literal A. Hence we can remove the node A Y from
Fast Subsumption Checks Using Anti-Links 19
and apply Lemma 6 to get M 0000 .
Applying Lemma 6 to M 0000 we get DADV (fAX ; A Y
In constructing DADV (fAX ; A Y g; M)we have removed only subsumed d-paths
and altered only d-paths that contain the anti-link by collapsing the double occurrence
of the anti-link literal. Hence DADV (fAX ; A Y g; M) is equivalent to M , does
not contain the anti-link, and does not contain any d-path of DP (fAX ; A Y
Theorem 6 gives us a method to remove disjunctive anti-links and some subsumed
d-paths: Simply identify a redundant anti-link and the
smallest full block M containing it, and then replace M by DADV (H; M ). The
cost of this operation is proportional to the size of the graph replacing M , and
this is linear in M . Also, c-connected literals in M do not become d-connected in
truly new disjunctive anti-links are not introduced. Howe-
ver, parts of the graph may be duplicated, and this may give rise to additional
copies of anti-links not yet removed. Nevertheless, persistent removal of redundant
disjunctive anti-links (in which case DP (fAX ; A Y g; M) 6= ;) is a terminating
process, because the number of d-paths is strictly reduced at each step. This
proves:
Theorem 7. Finitely many applications of the DADV operation on redundant
anti-links will result in a graph without redundant disjunctive anti-links, and termination
of this process is independent of the choice of anti-link at each step.
Although we can remove all the redundant disjunctive anti-links in the graph,
this process can introduce new conjunctive anti-links. Such anti-links may indicate
the presence of subsumed d-paths, but the situation is not as favorable as with
disjunctive anti-links - see Section 3.7.
Simplifications
Obviously, DADV (fAX ; A Y g; M) can be syntactically larger than
Under certain conditions we may use simplified alternative definitions for DADV .
These definitions result in formulas which are syntactically smaller than those that
result from the general definition. The following is a list of possible simplifications.
20 Anavai Ramesh et al.
1. If
then DC(CE(AX Therefore by (possibly non atomic)
factoring on DC(AX ; X) and observing that
has the same d-paths as Y , DADV (fAX ; A Y g; M) becomes
It turns out that this rule applies to (2) in Example 1. Since CE(AX
the simplified rule for this case results in the following graph.
A
2. If
then DC(CE(AX Hence
3. If both Case 1 and Case 2 apply, then CE(AX and the above
formula simplifies to
Note that in all the above versions of DADV , the roles of X and Y can be
interchanged.
Fast Subsumption Checks Using Anti-Links 21
3.6 Disjunctive Anti-Links and Factoring
It is interesting to note that the DADV operation contains factoring (i.e., the
ordinary application of the distributive law to a pair of conjunctions containing a
common argument) as a special case. This is just the condition for Case 2 above
except that both CE(AX
A
This is the graph obtained by disjunctive factoring (Murray and Rosenthal, 1993).
The DADV operator also captures the absorption law (or merging). If AX and
A Y are both arguments of the same disjunction, then
Note, however, that technically the anti-link is not
redundant in this case.
3.7 Conjunctive Anti-Links
There are conjunctive anti-links that always indicate the presence of d-paths that
are subsumed by others, and they are easy to detect. However, the conditions
to be met are much more restrictive than those for redundant disjunctive anti-
links. Consider a conjunctive anti-link fAX ; A Y g, where the smallest full block M
containing the anti-link is (AX Every d-path in Y which passes through A Y
will be subsumed by the d-path consisting of the single literal AX . Hence we can
replace Y by
This is a kind of dual to Case 3 of the simplified versions of DADV discussed
earlier. There, the anti-link fAX ; A Y g is disjunctive and . The simplified
DADV operation just replaces Y by Note that the conjunctive
anti-link operation above removes subsumed d-paths, whereas the Case 3 disjunctive
anti-link operation can either remove paths or merely remove the second occurrence
of the anti-link literal on paths that contain the anti-link. Both operations
involve d-paths, and both have strictly dual operations that would affect c-paths
instead.
4 Complexity Considerations
The problem of eliminating all subsumed paths in a graph in an efficient manner
does not seem feasible. The following definition makes precise the notion of minimality
with respect to subsumed d-paths. Then we show that it is NP-hard to
achieve this property.
Definition 18. Let G be a semantic graph; we say that a graph G 0 is a d-minimal
equivalent of G if it satisfies the following conditions.
22 Anavai Ramesh et al.
1. G is logically equivalent to G 0 .
2. If p 0 and q 0 are two distinct d-paths in G 0 , then p 0 does not subsume q 0 and
vice versa.
3. If p 0 is a d-path in G 0 , then there is a d-path p in G such that,
4. If p is a minimal d-path in G, then there is a d-path p 0 in G 0 such that
The c-minimal equivalent of a graph is defined in the obvious dual way.
Note that Property 1 above is implied by Properties 3 and 4, and that G 0 needs
not be unique. However, the d-paths of G 0 will always include all essential (and
possibly some inessential) prime implicates of G.
Computing d-minimal equivalent graphs efficiently would be helpful for finding
prime implicates. In a d-minimal equivalent graph of a full dissolvent, subsumption
checks can be completely eliminated by Property 2 above. Hence to find the prime
implicates of G, we can find a d-minimal equivalent G 0 of the full dissolvent FD(G),
and then simply enumerate the d-paths of G 0 .
A d-minimal equivalent of a given graph G can be trivially obtained by first
enumerating all the d-paths of the given graph G and then eliminating all the
subsumed d-paths. The above algorithm is exponential in the size of G, because
G 0 is being constructed in CNF. However an NNF d-minimal equivalent G 0 of G
may be small compared to a CNF d-minimal equivalent. Even so, the problem is
NP-hard (proof follows) and hence is not likely to have an efficient algorithm.
Theorem 8. The following problem (elimination of subsumed paths) is NP-hard.
Given a graph G, find a d-minimal equivalent graph G 0 .
Proof. To show NP-hardness we reduce from satisfiability of CNF formulas. Let
C be an instance of the CNF satisfiability problem and fX be the
set of variables in C. Let A; X 0
n be distinct variables not occurring in
g. Let D be the semantic graph obtained by replacing X i by X 0
(by which we denote the NNF of the negation of C). We
construct the following semantic graph G.
A - D
Fast Subsumption Checks Using Anti-Links 23
The size of the graph G is no more than a constant factor of the size of C and can
therefore be constructed in linear time. It is easy to see that any d-path which
includes the literal A must pass through D and vice versa.
Let G 0 be any graph which is a d-minimal equivalent to G. We will show that
C is satisfiable iff the literal A occurs in G 0 .
Suppose C is satisfiable; then :C is falsifiable, and there are d-paths (in fact,
clauses, since :C is in DNF) in :C that do not contain any disjunctive link
g. All such d-paths through D do not contain any fX
at
least one such, say p, is not subsumed by another d-path through D. The d-path
pA cannot be subsumed by any other d-path in G and hence there will be a path
in G 0 which has the same literal set as pA. Hence the literal A must occur in G 0 .
If C is not satisfiable, then :C is valid. Therefore for every d-path p in D (and
hence every d-path through A), there is some i, 1 - i - n, such that the pair
of literals fX
'(p). But every such pair of literals forms a d-path in G
and hence every d-path containing A will be subsumed by another d-path in G.
Furthermore the subsuming path will not contain the literal A. By definition of
d-minimal equivalent and by construction of G 0 , no d-path in G 0 can contain the
literal A, and thus the literal A cannot occur in G 0 .
If we can solve the elimination of subsumed paths problem in polynomial time
then we have the following algorithm which can solve the satisfiability of CNF
in polynomial time: Given any instance C of the CNF satisfiability problem, we
can construct in polynomial time the graph G as shown earlier. We then find the
graph G 0 using the algorithm for elimination of subsumed paths. The size of G 0
will be polynomial in the size of G (since computing it required only polynomial
time). Now C is satisfiable iff the literal A occurs in G 0 and this check can be done
in polynomial time.
By a completely dual construction we obtain the following corollary.
Corollary 4. Given a graph G, finding a c-minimal equivalent of G is NP-hard.
We have seen that the general problem of computing d- or c-minimal graphs
is NP-hard. Nevertheless, redundant disjunctive anti-links are easily recognized,
and eliminating their corresponding subsumed d-paths can be done without direct
subsumption checks. On the other hand, recognizable subsumed d-paths due to
conjunctive anti-links are not likely to be as plentiful due to the strong restriction
defining such useful anti-links. It is also difficult to find out if an arbitrary conjunctive
anti-link results in subsumed d-paths. In fact, this problem is NP-complete.
Theorem 9. The following problem is NP-complete. Given a conjunctive anti-
link in a graph G, determine whether there are there two d-paths p X
and p Y in G, such that p X passes through AX and p Y passes through A Y and
either p X subsumes p Y or vice versa.
Proof. It is easy see that this problem is in NP. To show NP-hardness we reduce
from satisfiability of CNF formulas. Let C be an instance of the CNF satisfiability
problem and fX be the set of variables in C. Let A;
n be
distinct variables not occurring in fX g. Let D be the semantic graph
obtained by replacing X i by X 0
We construct the following
semantic graph G.
The subgraph D is a DNF formula, and A 1 and A 2 are two different occurrences
of the literal A. These two literal occurrences form a conjunctive anti-link in G.
Every d-path through A 2 contains the literal B, and only d-paths containing A 1
can possibly subsume d-paths through A 2 . The size of the graph G is no more
than a constant factor of the size of C and can therefore be constructed in linear
time.
We must show that C is satisfiable iff there is a d-path through A 1 that subsumes
another d-path through A 2 . Suppose first that C is satisfiable. Then :C is
falsifiable, and there is at least one d-path in :C that does not contain any disjunctive
link g. Therefore some d-path p through D does not contain any
of the literal pairs fX
Recall that '(p) is defined to be the literal
set of path p. It is easy to see that since '(p) does not contain such a literal pair
(corresponding to a d-link in :C), a d-path p 0 can be chosen that passes through
the n rightmost disjuncts in the lower part of G, such that '(p 0
subsumed by A 1 p.
To show the if-part, suppose there is some d-path (say p) through A 1 that
subsumes another d-path (say p 0 ) through A 2 . Then p cannot contain any literal
because no such pair occurs on any d-path in the lower part of G.
Therefore p when restricted to D will not have such a literal pair, :C has a d-path
without a d-link, and hence C is satisfiable.
Corollary 5. The problem dual to the one described in Theorem 9 involving
disjunctive anti-links and c-paths is NP-complete.
5 Some Benchmark Examples
Ngair (1993) has investigated examples that prove difficult for many proposed
prime implicate/implicant algorithms. In this section, we show that Pi
links is effective for some of these examples. For other examples from (Ngair,
1993), applying anti-link techniques appears not to produce as significant an impro-
vement. We develop an additional technique based on strictly pure full blocks that
results in a dramatic improvement for these latter examples.
Fast Subsumption Checks Using Anti-Links
In (Ngair, 1993) a class of formulas is proposed for which reliance on an intermediate
CNF form can result in an exponential increase in size and hence would be
intractable for CNF-based algorithms. Dissolution does poorly for these
examples: Although the full dissolvent can be computed quickly, a large number
of subsumption checks must be performed by Pi. It turns out, however, that in
this case the subsumed implicates correspond to easily recognizable anti-links of
both the disjunctive and conjunctive kind. We show that if these anti-links are
removed after dissolution is performed, dissolution + Pi can find all the implicates
in polynomial time.
Ngair's formulas are abbreviated with F n (n - 1) and are defined as:
A
A 2i
In the left part of Figure 1 we show the graph of F n for a fixed n.
A 3
A
A 4
A 2n
A
A 2n
A 3
A
A 4
A 2n
A
A 2n
A 3
A 4
Fig. 1. Semantic graph of Ngair's formulas before and after dissolution.
F n has 4n literals, and 2n \Gamma 2 c-links; dissolution can remove these links
by performing 2n dissolution steps. The full dissolvent that results is depicted in
the right part of Figure 1.
The structure of the full dissolvent depends on the order in which links are
selected for application of dissolution; the above dissolvent is the one obtained
by the current version of our propositional dissolution prover Dissolver. (The
26 Anavai Ramesh et al.
compact version (3) from Proposition 1 of the dissolvent is used; X is chosen to
be the smallest of the two c-blocks). We can now factor on all the occurrences
of both A 1 and A 2 in the upper right hand part of the graph and on the two
occurrences of A 1 in the lower left corner. The resulting graph is shown in Figure 2.
(Since Dissolver is NNF-based, such factoring is not only feasible but is in fact
implemented and routinely employed to produce the final output.)
A 3
A
A 4
A 2n
A
A 2n
A 3
A 4
Fig. 2. Ngair's formulas after dissolution and factoring.
The two occurrences of A 2 at the bottom left part of the graph form a redundant
disjunctive anti-link; they can be removed using the special case covered by Rule 1
for disjunctive anti-links. The two occurrences of A 1 on the left hand side of
the graph form a conjunctive anti-link and can be removed using the conjunctive
anti-link rule. This produces:
A
A 2n
A 3
A 4
By factoring on A 1 and removing the conjunctive anti-link comprised of the
two occurrences of A 2 (or by just factoring on A 1 - A 2 ), the above graph reduces
Fast Subsumption Checks Using Anti-Links 27
to the prime implicates are just fA 1 g and fA 2 g. To get this graph,
factoring and 3 anti-link operations were required - obviously polynomial
time. Hence dissolution + removal of anti-links + Pi can handle the above class
of problems in polynomial time. Perhaps the most important point is that no
subsumption checks whatsoever are required.
6 A Generalized Purity Principle
6.1 Strictly Pure Full Blocks
Recall that a full block is essentially an explicit subgraph; it is a subset of the arguments
of a conjunction or disjunction, and, via commutations and reassociations,
can in fact be made explicit.
Definition 19. A subgraph M in a graph G is pure iff all c-links or d-links that
meet M at all are totally within M . 6 If, in addition, all conjunctive or disjunctive
anti-links that meet M at all are totally within M , we say that M is strictly pure. 7
If M is a full block in G we speak of a (strictly) pure full block .
When factored, some of the examples from (Ngair, 1993) contain surprisingly
many strictly pure full blocks. Note that both factoring and recognizing strictly
pure full blocks are polynomial operations. Intuitively, such full blocks can be
replaced by single new variables, and the implicates of the resulting graph bear a
strong relationship to those of the original. Of course, the full block in question
must be satisfiable (since the new variable certainly is). At first, this may appear
to be a heavy penalty. It is not, however, because the prime implicates of the full
block itself must be computed anyway. In doing so, its satisfiability is determined
as a byproduct.
The following theorems characterize the properties of strictly pure full blocks
with respect to prime implicates. In them we employ the following notation: let
M be an explicit subgraph of a graph G and let X be a variable not occurring in
G. By G X
M we denote the graph obtained by the substitution of X for M in G.
Similarly, if D is a disjunction of literal occurrences from G we denote by DM the
disjunction of literals that occur in M and by DG\GammaM the disjunction of literals
that do not. Obviously, holds. Finally, we set
ae
DG\GammaM otherwise
Theorem 10. Let M be a satisfiable strictly pure full block in a satisfiable semantic
graph G and let D be a non-tautological disjunction of literals from G. If
DM 6= false, then the following statements are equivalent:
6 This is just the obvious generalization of the concept of a pure literal as it is used in the
literature on CNF-based automated deduction.
7 Simply put, M shares no variables with the rest of G.
28 Anavai Ramesh et al.
1. D is a prime implicate of G.
2. D X
M is a prime implicate of G X
M , and DM is a prime implicate of M .
This theorem turns out to be a special case of Theorem 11 to be proved in the
following subsection.
If a graph G contains several strictly pure full blocks M then the
repeated application of Theorem 10 provides a potentially significant speedup in
computing the prime implicates of G: Replace each strictly pure full block M i by
a new variable X n) and compute the prime implicates of the resulting
graph G X
M . Then, all substitutions of prime implicates of M i for X i in the prime
implicates of G X
M result in prime implicates of G. The speedup is potentially
dramatic: Each subsumption test performed within some M i would otherwise be
performed once for every d-path in G X
M that can be extended through M i to form a
d-path in G. Observe that prime implicates of G X
containing none of the variables
are simply prime implicates of G that do not contain literals from
any of the blocks M i .
Several distinct strictly pure full blocks can be handled by repeated application
of Theorem 10 as explained above. However, multiple occurrences M of
a single full block M in G require an extended analysis. The problem is that the
multiple occurrences themselves preclude any single M i from being strictly pure,
even if M shares no variables with the rest of G. Intuitively, we would expect that
by replacing each of the occurrences M i in G by the single new variable X , the
prime implicates of the resulting graph G X
would also bear a strong relationship
to those of G. This is made precise in the next section.
6.2 Multi-Pure Full Blocks
Definition 20. Suppose that M are occurrences of full blocks in G and
that all of them are syntactically identical (up to associativity and commutativity
of disjuncts and conjuncts). The subgraph M formed by taking all the nodes of
the blocks M i is not necessarily a full block; 8 but let M be strictly pure. Then
we call the M i multi-pure full blocks.
In addition, suppose that there are occurrences M n+m of full
blocks syntactically identical (up to associativity and commutativity of disjuncts
and conjuncts) to M , the NNF of the complement of any of the M i (1 - i - n). We
call complementary multi-pure full blocks.
Note that each (complementary) multi-pure full block M i is not strictly pure,
since it has anti-links (and possibly links) to its equivalent (complementary) full
blocks in G.
Observe that complementary non-atomic formulas must be recognized. For
example, if could be A - B or B - A. In fact, M could
8 As the blocks M i could be single literals occuring in arbitrary positions, this is hardly
surprising.
Fast Subsumption Checks Using Anti-Links 29
have been input as or as :(:A oe B). If NNF formulas are stored in an
appropriate canonical way, complementarity is easily (that is, in polynomial time)
detectable; the situation is also straightforward when complementary formulas
have the form M and :M prior to conversion to NNF. In any case, a detailed
treatment of this issue is beyond the scope of this paper. We do note that in
the absence of complements, multi-pure full blocks are recognizable in polynomial
time via a canonical NNF representation. A modification of any algorithm for
finding common subtrees (see (Grossi, 1993) for one such algorithm) can be used
for recognizing multi-pure full blocks.
It turns out that the results of Theorem 10 can be extended to the case in
which a formula contains complementary multi-pure full blocks. We use the notation
of Theorem 10 with the understanding that M denotes any occurrence of an
and the M are treated as negated occurrences
of M (thus G X
M replaces the complementary occurrences M j as well). M is
defined as the subgraph of G relative to the M i and
are defined as before, but relative to M . Additionally,
we define D X
M in the obvious way (Intuitively, we use D X
M when the literals of DM
correspond to unnegated occurrences of M , and we use D X
M when the literals in
DM correspond to negated occurrences of M ).
Theorem 11. Let M n+m be complementary
multi-pure full blocks in a satisfiable semantic graph G, where all of the
blocks M i and M j are satisfiable (we allow D be a non-tautological
disjunction of literals from G. Then the following statements are equivalent:
1. D is a prime implicate of G.
2. false and D is a prime implicate of GX
or
DM 6= false and D X
M is a prime implicate of G X
M , and DM is a prime
implicate of M
or
DM 6= false and D X
M is a prime implicate of G X
M , and DM is a prime
implicate of M .
Proof. Let G 0 X
M be a graph without c-links that is equivalent to G X
(for instance,
M could be the full dissolvent of G X
Similarly, let M 0 be a c-linkless equivalent
of M , and M 0 be a c-linkless equivalent of M . Let G 0 be the graph obtained from G
by replacing X by M 0 and X by M 0 . It is easy to see that G 0 is equivalent to G
but has no c-links. By Theorem 3, every prime implicate of G is present as a
d-path in G 0 and every prime implicate of G X
M is present as a d-path in G 0 X
M .
To prove the only-if-part, let D be a prime implicate of G. Then there must
be an unsubsumed d-path p in G 0 such that are
complementary, p can never meet (and thus pass through) both M i and M j for
any i and j.
Suppose first that p does not pass through any of the occurrences of M or M .
In this case, p must also be a d-path in G 0 X
(technically, p is isomorphic to a d-
path in G 0 X
To prove that p is not subsumed by another d-path in G 0 X
M , assume
otherwise, namely, that there is a path p 0 in G 0 X
M that subsumes p. But p 0 cannot
contain X or X, and hence would also be a d-path in G 0 that subsumes p, which
is a contradiction. Thus D is a prime implicate of G 0 X
M and hence of G X
M .
Now suppose p passes through the full blocks
be the restriction of p to M i j 0 . Notice that for 1 - j, k - q, '(p
wise, the d-path obtained by replacing p j by p k in p would subsume p. Similarly,
cannot be subsumed by another d-path in M i j 0 . Since p j is an unsubsumed d-
path in M i j 0 which is a linkless equivalent of M ,
of M . Now let p X be the d-path obtained by replacing each of the p j by X in p;
X is a d-path in G X
M . Furthermore, p X cannot be subsumed by another d-path
in G X
M (again, such a subsuming path would induce a path in G 0 that subsumes p).
Therefore D X
prime implicate of G X
M .
Finally, in the case that p passes through the full blocks
argument is similar as in the previous paragraph.
To prove the if-part, first suppose DM = false and D is a prime implicate of G X
M .
Then there is an unsubsumed d-path (say p) in G 0 X
M such that
contains neither X nor X. Thus p is an unsubsumed d-path of G 0 ,
and D is a prime implicate of G.
Now suppose that D X
M is a prime implicate of G X
M and that DM is a prime
implicate of M . Then there are unsubsumed d-paths p X in G 0 X
M and p M in M 0 ,
respectively, such that '(p X
M and '(p M respectively. In the present
subcase, by definition, D X
contains X (and cannot contain X). Let p 0 be the
result of replacing all occurrences of X in p X by p M ; p 0 is a d-path in G 0 . Since
both p M and p X are unsubsumed in G X
respectively, and since M 0 does
not share any variables with the rest of G 0 , p 0 will also be unsubsumed in G 0 .
Hence, by Theorem 3, prime implicate of G.
Similarly, if D X
M is a prime implicate of G X
M and DM is a prime implicate of M ,
then D is a prime implicate of G.
It is straightforward to see that in the case when Theorem 11
collapses into Theorem 10.
On the one hand we expect to substitute new variables for multi-pure full blocks
and achieve a savings in the computation of prime implicates comparable to that
provided by Theorem 10. But note that some complementary occurrences of M
may be c-connected; this means that such occurrences play a role in whatever
inference process is employed prior to computation of the implicates themselves. In
Fast Subsumption Checks Using Anti-Links 31
particular, we may treat them as literals and dissolve (indeed, the set of individual
links between such full blocks would satisfy the requirements of a multiple link
dissolution chain as it is defined in (Murray and Rosenthal, 1993)).
That dissolving on two complementary full blocks accomplishes exactly what
dissolving on all the corresponding single-links would is clear: All c-paths through
both full blocks are eliminated from the graph. But the former operation is much
more efficient than the latter. Therefore, recognizing such complementary full
blocks and performing inference directly on them, rather than on their constituent
literals, is desirable. Note also that for the inference phase of a prime implicate
computation, complementary full blocks do not have to be multi-pure full blocks.
This condition is necessary only for the extraction of implicates using Theorem 11
once all implicates are known to be present.
Finally, the remarks above apply also to identical full blocks if they form appropriate
non-atomic anti-links as discussed in Section 3.
6.3 More Examples
Kean & Tsiknis (1990) provide a class of examples referred in the following to
as Knm . They have mn+1 input CNF clauses and (m+1) n +mn prime implicates.
This set of clauses can be factored to obtain a more compact representation in NNF
as shown in Figure 3.
Snm
Fig. 3. Semantic graph of Kean & Tsiknis's formulas.
Since the number of prime implicates is exponential, so is the number of subsumption
checks required. The number of subsumption checks for the Ipia (de
Kleer, 1992) and Gen-Pi (Ngair, 1993) algorithms are shown in Table I.
Examples Ipia Gen-Pi Pi
K33 5166 972 164
K44 506472 11600 887
K54 1730120 29074 887
I
Number of subsumption checks needed for Kmn by
Ipia, Gen-Pi, and Pi
For each i, the literals S a full block M i , and all literals in it are
strictly pure. Let K 0
mn be the graph obtained by replacing each full block M i by
a new variable X i . By the corollary of Theorem 10, we can get the prime implicates
of Kmn from the prime implicates of K 0
mn . Since each of the subgraphs M i
has no c-links, the prime implicates of M i are present as d-paths by Theorem 3.
Since they also have no anti-links, by the contrapositive of Theorem 4, neither are
subsumption checks required to find these prime implicates. Thus the number of
subsumption checks to be done is exactly that required for computing the prime
implicates of K 0
mn , and this is significantly less than that needed for Kmn . Note
that the number of prime implicates of K 0
mn is only n. For the problems in
Table
I, we applied the above technique in combination with anti-link operations.
For
mn , the full dissolvent depends only on n and can be defined recursively. The
full dissolvent of K 0
m2 (basis) and of the general case of K 0
are shown in
Figure
4.
The number of subsumption checks required here is also shown in Table I. Cle-
arly, our techniques produce a significant reduction in the number of subsumption
checks required. Note that for the problem Kmn , the number of subsumption
checks depends only on n and not on m, and is not reduced by applying the
anti-link operations to the full dissolvent.
Our techniques are not limited to NNF formulas. They can sometimes be used
by other algorithms like Ipia and Gen-Pi which are not based on NNF formulas.
For example K 0
mn turns out to be in CNF and hence both Ipia and Gen-Pi can
handle these formulas, thereby reducing the number of subsumption checks nee-
ded. However normal forms like CNF provide very little scope for applying these
techniques directly. For example the literals S in the unfactored form of
Kmn do not form a full block. Hence one cannot apply Theorem 10. They do form
a full block after factoring. This provides stronger evidence that by avoiding less
general normal forms like CNF/DNF, one can improve the performance of prime
Fast Subsumption Checks Using Anti-Links 33
A n
A
Fig. 4. The full dissolvent of Km2 (left) and of Kmn , n ? 2 (right).
implicate algorithms.
We also note that we have implemented some of the anti-link operations presented
above in a diagnosis system introduced in (Ramesh and Murray, 1995). As
a result, we greatly increased the size of problems solvable on our system. (The
anti-link operations used were the special cases that do not increase the size of the
7 Comparison with BDDs
BDDs (Bryant, 1986) are commonly used in verification of boolean circuits. Coudert
and Madre (Coudert and Madre, 1992) describe an algorithm which produces
the prime implicates/implicants of a propositional formula represented as a BDD.
Any algorithm including theirs which uses BDDs must perform large amounts of
subsumption testing. Given any formula in NNF, a BDD based method would
first construct the BDD and then extract the prime implicates/implicants from it.
In contrast, our system would first compute the full dissolvent. But for either of
these approaches, the next stage - extracting the prime implicates/implicants -
requires extensive testing for subsumption.
The size of the BDD depends critically on the ordering (of variables) chosen.
There are classes of NNF formulas (Breitbart et al., 1990) for which any BDD
will be exponentially large in the formula size. These formulas do not have any
c-links, so the dissolution phase of our method does not change the formula. Hence
the input to Pi would be a small formula, whereas the BDD based method would
have to handle an exponentially larger intermediate representation. However these
formulas have many prime implicates and prime implicants, and the subsumption
checking is the bottleneck for both methods.
34 Anavai Ramesh et al.
In all likelyhood, the relative performance of these two methods can be determined
through experimental evaluation only; formulas will exist for which one
method is superior, and vice versa.
8 Conclusions and Future Work
We have introduced anti-links and defined useful equivalence-preserving operations
on them. These operations can be employed so as to strictly reduce the
number of d-paths in an NNF formula. Unlike path dissolution, which removes
unsatisfiable (or tautological, in the dual case) paths, anti-link operations remove
subsumed paths without any direct checks for subsumption. This is significant for
prime implicate computations, since such computations tend to be dominated by
subsumption checks.
Although prime implicate/implicant problems are intractable in general, our
techniques perform exponentially better than others on certain examples. In addi-
tion, we are able to improve performance greatly on the inherently exponential
examples of (Ngair, 1993).
Some experimental results on a dissolution- and Pi-based system for computing
prime implicates are reported in (Ramesh and Murray, 1993). That system is
currently being extended; some anti-link operations are already implemented and
have shown to improve performance. Operations based on strictly pure full blocks
are under development, and their effectiveness in practice will be tested.
--R
Hunt III
Implicit and incremental computation of primes and essential implicant primes of boolean functions.
An improved incremental algorithm for computing prime implicants.
On finding common subtrees.
Computing prime implicants.
Computing prime implicants incrementally.
An incremental method for generating prime implicants/im- plicates
Assumption based reasoning and clause management systems.
Inference with path resolution and semantic graphs.
Path dissolution: A strongly complete rule of inference.
Dissolution: Making paths vanish.
A new algorithm for incremental prime implicate generation.
An algorithm to compute circumscription.
An application of non clausal deduction in diagnosis.
On anti-links
Foundations of assumption-based truth maintenance systems: preliminary report
A new algorithm for generating prime implicants.
--TR
--CTR
A. K. Shiny , Arun K. Pujari, An Efficient Algorithm to Generate Prime Implicants, Journal of Automated Reasoning, v.22 n.2, p.149-170, February 1999 | anti-links;subsumption |
594161 | The Use of Lemmas in the Model Elimination Procedure. | When the model elimination (ME) procedure was first proposed, the notion of lemma was put forth as a promising augmentation to the basic complete proof procedure. Here the lemmas that are used are also discovered by the procedure in the same proof run. Several implementations of ME now exist, but only a 1970s implementation explicitly examined this lemma mechanism, with indifferent results. We report on the successful use of lemmas using the METEOR implementation of ME. Not only does the lemma device permit METEOR to obtain proofs not otherwise obtainable by METEOR, or any other ME prover not using lemmas, but some well-known challenge problems are solved. We discuss several of these more difficult problems, including two challenge problems for uniform general-purpose provers, where METEOR was first in obtaining the proof. The problems are not selected simply to show off the lemma device, but rather to understand it better. Thus, we choose problems with widely different characteristics, including one where very few lemmas are created automatically, the opposite of normal behavior. This selection points out the potential of, and the problems with, lemma use. The biggest problem normally is the selection of appropriate lemmas to retain from the large number generated. | Introduction
The Model Elimination (ME) procedure was defined in the 1960's [17, 18]
nearly coincident with the Resolution procedure [22]. There was little early
This work is supported in part by NSF grants CCR-8900383 and CCR-9116203.
experimentation with ME, so the procedure received relatively little attention.
(However, it is the basis of the SL-Resolution procedure which played an historical
role in the beginning of Logic Programming). A major implementation
of ME was completed in the early 1970s by Fleisig et al. [14] that did provide
a direct comparison with the Unit Preference - Set-of-Support refinement of
Resolution (Wos et al. [29]), as both procedures were implemented with the
same underlying inference tools. Individual wins were found for both methods
but no evidence to prefer ME over the known refinements of Resolution was
forthcoming. The notion of lemma, introduced in the first papers of ME, was
implemented by Fleisig et al. with a resulting indifference to their usefulness.
The paper included this statement:"The use of lemmas usually was detrimental,
although some short refutations were obtained using lemmas. The poor performance
is due to the lack of selection rules for lemmas and is aggravated by the
depth-first nature of search." ([14], p. 135). This paper will strongly refute the
conclusion of that paper regarding the value of lemmas within ME. We report
on results that to date are only obtainable within the ME framework by the use
of lemmas, and the theorems proven include some not yet provable by Resolution
techniques. We now understand that the notion of only direct competition
with Resolution is oversimplistic; this procedure tends to do relatively well on
non-Horn problems where Resolution methods now employed are not focused.
Unlike chess, theorems are a very diverse lot and different proof methods may
excel in different areas.
As is well-known to many in this research area, the idea of ME was kept alive
by the work of Mark Stickel. Most notably, Stickel exploited the fact that ME
is an extension of SLD-Resolution (Prolog) to develop the Prolog Technology
Theorem Prover (PTTP) [24, 25]. In the late 1980's almost simultaneously three
groups took this one step further, building on the architecture (the Warren Abstract
Machine (WAM)) developed for Prolog that the logic programming community
had extended to parallel machines. These projects were PARTHENON
(CMU) [9], PARTHEO (Munich) [23], and METEOR (Duke) [4, 3]. (The Munich
[16] and Duke efforts included sequential provers also.) The work reported
here has been implemented on one of the METEOR family of ME provers.
What has changed in 20 years that makes the lessons of the Fleisig et al.
paper invalid in part? A fair number of things: maybe most important is
the WAM architecture ideas, but also important are use of iterative deepening
(introduced to ME by Stickel), a sophisticated implementation exploiting the
WAM ideas, vastly more powerful yet cheaper computers, and careful use of
techniques to restrict lemma creation and use.
We look in depth at three examples, theorems proven with use of lemmas that
would otherwise not be proved using ME. Two theorems are from the theory of
continuous functions and one is a collection of three challenge problem from the
1960's not all solved automatically until now. (Two of the three latter challenge
problems were solved in the weak fully automated mode; that is, some initial
restructuring of the problem was done to force generation of lemmas. This
was done by splitting the problems into two and six cases respectively, without
knowledge of the problem solution. The details are presented later. We mention
here that the problem has subsequently been solved in (strong) fully automated
mode by the Semantic Hyper-Linking prover of [11]. To our knowledge no
other prover has succeeded on this problem in non-interactive mode.) Because
the purpose of this paper is to look in-depth at the nature of lemma use, and
because other papers [5, 3], contain results of METEOR on standard problems
of the Automated Theorem proving (ATP) community, we omit such listings
here. For example, the Astrachan and Stickel paper [5] discussing caching in
includes two tables of results and a brief discussion on lemma use. (Caching
is not applicable for the examples we treat here.)
The Model Elimination procedure is a linear input procedure; that is, one
parent clause is the preceding clause and the other clause is an input clause.
This is the key property of SLD-resolution that allows compilation of Prolog
programs, elegantly implemented in the WAM architecture. ME can use the
architecture structure and also enjoy a high inference rate. However, like
Prolog, ME does suffer high search redundancy due to the depth-first search
mode of the WAM architecture. (ME does use iterative deepening rather than
pure depth-first search, however.) Lemmas shorten proofs, thus reducing this
redundancy. We show by example that the compression of proof achieved with
lemma use can be striking, and the gain occurs on "real" (vs. toy) problems.
We note that there is a version (restriction) of resolution that is in 1-1 correspondence
with ME. The Resolution version is a linear input procedure except
for a restricted "ancestor resolution" operation where resolution between two
deduced clauses is necessary. (See the TOSS procedure in [19] 1 .) Thus, the
procedure can be regarded as an encoding of the TOSS Resolution restriction
using 2-sorted logic (framed and unframed literals), but it should be noted
that ME is not, strictly speaking, a Resolution procedure. This is highlighted
by the fact that Linear Input Resolution is complete only for a small extension
of Horn clause logic whereas ME is complete for all of first-order logic.
This paper is organized as follows: In Sections 2 and 3 we briefly describe
the ME proof procedure and the realization of this procedure in METEOR. In
Section 4, Section 5, and Section 6 we describe the successful application of
lemmas to three theorems none of which can be proved without lemmas using
We conclude with a short summary in Section 7.
2 The Model Elimination Procedure
Like Resolution, Model Elimination is a refutation procedure, with the formula
to be refuted presented in conjunctive normal form. Skolem functions are
1 The TOSS procedure corresponds to a slightly different ME procedure.
2 None of these problems yields a proof in less than 24 CPU hours using "vanilla" ME
without lemmas.
used to eliminate existential quantifiers. (See [10] or [19] for details on formula
preparation; [19] contains a full description of the ME procedure.) We view the
clauses as sets of literals and the formula as a set of clauses. The corresponding
entity to a derived clause in Resolution is the (derived) chain, an ordered list
of literals where each literal is of one of two classes, an A-literal or B-literal.
ME, as currently defined, has two basic operations 3 , extension and reduction.
The basic operation of extension is like the Resolution operation with retention
of one of the literals resolved upon. The retained literal is promoted to a A-
literal. (Intuitively, the A-literal is a type of ancestor literal.) We give a succinct
presentation of the ME operations and lemma mechanism here, followed by an
example. The appendix gives an expanded presentation of the procedure.
The first chain in a deduction is an ordered input clause with all literals
classified as B-literals.
Below and in general we oversimplify the reference to occurrences of literals.
In particular, we refer to a literal in successive chains as the same literal when
in fact the later literal may be an instantiation of its "parent" literal. This
simplification should cause no confusion.
The extension operation glues a (shortened) input clause, ordered by user
choice, to the left of the current chain if the leftmost B-literal of the chain unifies
with the complement of some literal of the input clause. The new chain is the
instantiation of the current chain by the unifier with the unifying literal of the
input clause dropped, and the other unifying literal (the leftmost literal of the
current chain) promoted to A-literal. Newly added literals are B-literals and
other literals retain their classification from the current chain 4 . All leftmost
A-literals, if any, are removed back to the leftmost B-literal.
The reduction operation removes the leftmost B-literal of the current chain
if it can be unified with the complement of an A-literal of the chain. The new
chain is the instantiation of the current chain by the unifier with the leftmost
B-literal missing. Again, all leftmost A-literals, if any, are removed back to the
leftmost B-literal.
The creation of lemmas occurs when the leftmost A-literals are removed,
at the end of the extension and reduction operations. Here we use only unit
lemmas, although a more general notion of lemma, allowing multiliteral lemmas,
is defined in [19]. The lemma chains are created as the complements of the
removed A-literals, but only some A-literals can produce a lemma. To create
only unit lemmas the eligibility mechanism is simple. In a reduction operation,
the A-literal that complements the leftmost B-literal is the reduction A-literal.
During a reduction step, all A-literals strictly to the left of the reduction A-
literal are marked. Every A-literal in a newly created clause inherits the mark,
if any, of its parent A-literal. Any A-literal unmarked at the time of removal
3 Early papers [17, 18] had three operations.
Traditionally, ME chains grew "to the right" but Prolog conventions of replacing the
leftmost literal have influenced recent implementations. We choose to follow the convention
used in the METEOR implementation.
creates a lemma. Not all generated lemmas are retained; retention depends
on a number of criteria discussed later, some under control of the user. If the
lemma is retained it acts exactly as if it were a unit input clause regarding
extension. (Lemmas are subject to restrictions and modifications not shared by
input clauses, however.)
The ME refutation in Figure 1, adapted from [19, 2], illustrates the ME
mechanisms.
1. p(X) -q(Y) input clause
2. -p(X) r(Y) input clause
3. -p(a) -r(Y) input clause
4. q(X) p(a) input clause (and goal chain)
begin proof
5. p(Y) [q(X)] p(a) extension with 1
variable renaming, clause 1
6. r(Z) [p(Y)] [q(X)] p(a) extension with 2
variable renaming, clause 2
7. -p(a) [r(Z)] [p(Y)] [q(X)] p(a) extension with 3
8. [r(Z)] [p(a)] [q(X)] p(a) prior to removal of A-literals
p(a) reduction
unit lemmas formed
-p(a)
9. 2 extension with lemma -p(a)
Proof completion if lemma mechanism is not used:
9. -r(Y) [p(a)] extension with 3
10. -p(X) [-r(Y)] [p(a)] extension with 2
reduction
Figure
1: ME refutation
In
Figure
1 the unit lemmas are created during the final stage of the reduction
that yields chain p(a) at step 8. The reduction creates A-literal p(a) from parent
p(Y) and the subsequent removal of A-literals p(a) and q(X) create the lemmas.
Removal of r(Z) cannot create a unit lemma.
In
Figure
2 we present proof trees associated with the example, one proof
tree for the proof without a lemma use and one that incorporates the lemma
use. In a proof tree, each clause used in an extension is represented, here by its
clause number. The goal clause is listed as root of the proof tree. The literals
of a clause are represented by the child nodes of the clause, where the clause
(actually, the appropriate chain of the clause) that is used in the extension
on that literal is named. Reduction is shown by a backwards arrow from a
node labeled Rn, for the nth reduction. The arc to an ancestor node of the
reduction is labeled by the same Rn to indicate which is the A-literal of the
reduction. The proof tree gives sufficient information to reconstruct the proof
without backtracking; the instantiations of the variables are determined during
the tracing of the proof using the proof tree.
The proof tree on the right side of Figure 2 is a method of displaying lemma
use and also representing a proof tree without lemma use. The leftmost box
encloses the subdeduction that defines the lemma and the other occurrences
of that box in the deduction indicate positions where the lemma is used. As
such, the box would be replaced by a single node. The subdeduction in the box
provides a subtree that could occur if the lemma device is not used. (Note that
the tree to the left shows that a slightly different deduction actually occurred
when the lemma device was not used.) This reporting device is used later in the
paper for deductions of considerably larger size, and does give a graphic feeling
of the saving in proof size realized by lemma use.
The reduction arrow in the boxes is somewhat confusing in this instance
because the reduction is to the A-literal that creates or calls the lemma. For
the right side box the reduction arrow refers back to the literal that calls the
lemma, for that is the valid A-literal of reduction if the lemma is replaced by
its deduction.3
without lemma with lemma
Figure
2: proof trees
3 The METEOR Architecture
We provide here only a brief description of the METEOR architecture. A full
description can be found in [2]. METEOR is written in C and runs on workstations
and in parallel and distributed computing environments. The same search
engine is used in both the sequential and parallel setting. A discussion of the
architecture of METEOR with emphasis on the parallel and distributed modes,
appears in [3]. Iterative deepening is used to ensure completeness of the search
strategy in all cases.
METEOR is designed to conform to the principles of the Warren Abstract
Machine (WAM) [1], the de facto standard for Prolog implementations. How-
ever, clauses are not compiled into WAM code, but into a data structure that
is then interpreted at runtime by either a sequential or parallel search engine.
Several different depth measures can be used in bounding a potential proof
during an iterative deepening search. We report on four measures here, these
are described in Table 1.
measure description
D inf inference depth - bound total number of inferences in proof tree
D Alit A-literal depth - bound depth of proof tree
D roll rollback-reduction - combination of D inf and D Alit
(preference given to reductions)
Dweight weight depth - weight clauses (per branch of proof tree)
Table
1: depth measures employed in METEOR
The measures D inf and D Alit are commonly used in ME provers and are the
default measures in PTTP and SETHEO respectively. As a bound on the entire
proof tree, the use of D inf ensures that a minimal-length proof (in terms of
extensions and reductions) is found. D Alit was also used in the first implementation
of ME [14]. At any point in a proof search one can tell the current depth
with respect to the D Alit measure by counting the number of A-literals in the
current chain, whereas for the D inf measure it is the total number of extensions
and reductions needed to derive the current chain. (Of course, one does not
include subsearches removed by backtracking.) Note that the depth of a proof
tree corresponds to the number of A-literals in the longest chain of the proof;
this depth is the minimal D Alit depth for which this proof tree can be found.
For the example deduction at the end of the last section, when no lemma is
used the D inf is 7 and D Alit is 3. By this we mean that the proof can be found
in the depth stated, and that a depth bound less than that stated would not
permit the proof shown to be found. This can be seen from the given derivation
or by consulting the appropriate proof tree. Note that for the proof tree the
D inf measure is determined by counting the nodes in the proof tree (excluding
the root), and the D Alit is determined by counting the depth of the proof tree
with the root having depth 0. For the deduction using the lemma the D inf is
5 and the D Alit is 3. For the latter depth we assume that the left branch is
searched first; if the right branch were searched first then the D Alit is 2.
When D roll is employed, depth is calculated as for D inf regarding extension,
but a successful reduction operation results in "rolling back" the depth to that
depth in force when the A-literal of the reduction was introduced to the chain
as a B-literal. The measure was discovered by accident, and has no clear intuition
for its definition; we simply noted it worked well in many cases. One
observation regarding its success is that it charges for extension by unit clauses,
e.g. lemmas, (whereas D Alit has no charge) yet gives added resources to explore
the consequences of a reduction as does the D Alit measure, indeed often more
resources than D Alit gives. For the example deductions of the last section the
D roll is 4 for both lemma use and no lemma use. None of these measures is uniformly
superior to the others nor does it appear that simple syntactic criteria
can be used to determine which measure is more appropriate (see [2]).
Dweight is used in conjunction with any of these depth measures rather than
as a replacement for them. Input clauses are annotated with an integral weight
that contributes to the weight of a chain when the clause is used. The weight
of a chain is the sum of the weight of all clauses whose literals "appear" in the
chain. When Dweight is used it is incremented in an iterative manner just as
other depth bounds are incremented in an iterative deepening search.
Minimum Value Theorem
We first consider a problem where the lemmas are very effective. The theorem
we consider is the Minimum Value Theorem (MinVT). This is also known in
the ATP literature as AM8 [27].
Theorem: (MinVT) A continuous function in a real closed interval [a; b]
attains its minimum in the interval.
In
Table
2 we give a readable rendition of the axioms for MinVT. The numbers
on the left refer to the clause numbers for these axioms as they are given
in [27] and in the order submitted to METEOR.
In
Figure
3 we give the axioms as submitted to METEOR. The clause numbering
relates the input clause to its counterpart in Table 2. The "nocontra"
suppresses the contrapositive of the dichotomy axiom (axiom 1) from being generated
as it is clearly not needed and is a very costly axiom to include, as is the
dichotomy axiom itself. Line 16 is for naming Skolem functions, for which we
do not permit self nesting. The semantics of the problem made it likely that no
function needed to be so nested.
In
Figure
4 and Figure 5 we present in proof tree format the proof found by
METEOR. The proof tree is given in a coded form with the lemmas labeled but
unwound so that the full structure of the tree is apparent.
Figure
4 (on the left) shows the proof actually discovered by METEOR. It
is a proof involving seven input clauses and four lemmas. Using depth measure
D inf , this would be a proof of depth 10. Actually, it took D inf depth 12 (it
can be done in D inf depth 11) to discover the proof because some lemmas used
in the proof required that depth to be discovered. Figures 4 (on the right)
and 5 present the full proof, with each inference labeled by a lemma label or
by a clause number. The dotted arrows at the bottom of the proof tree to
the right in Figure 4 link to the appropriate subtrees in Figure 5. The node
labels beginning with "L" refer to lemmas, with the numbering determined by
the proof recovery procedure (not the order of lemma generation); other node
labels refer to the input clauses by number.
the axioms for total order
1. x - y - y - x
2. x - y - y - z
Roughly, because of the symmetry of the antecedent
3. x - y - y
l is a minimum point in [a,l]
4. a - l
5. l - b
Any point greater than l has a smaller point with smaller f-value.
7-9. a - x
For all x, h(x) is the smallest point in [a,b] s.t.
10-13. a - b - a - y
For all x, there exists a point k(x) in [a,b] such that
This is the negation of the theorem conclusion
14,15,17. a - x
Table
2: Axioms for Minimum Value Theorem (MinVT)
We made the point previously that lemmas are often discovered in earlier,
"failed" parts of the search tree. That is very evident here from the proof trees.
For example, some top lemmas are used only once in the proof and so, to be
invoked as lemmas, they must have been established before the proof was found.
(In particular, note lemmas L2, L3, and L4, labeled on the trees in Figure 4 with
derivations continuing in Figure 5.) Lemmas used in the proof of these lemmas
were clearly discovered by the time the more complex lemmas were obtained.
Note that this does not mean that they were discovered earlier in the same
proof tree iteration because lemmas are retained through successive iterations.
Thus information from "later" in the tree can be used on early branches of the
succeeding iterate. In general, iterative deepening gives a breadth-first form of
search within which the search is depth-first.
The effectiveness of lemmas is dramatically made by noting that the depth of
the proof given here, when D inf (the depth measure used here) is employed with
no use of lemmas, is over 600! Such search depth is well beyond the capability
of any implementation of ME, or any other prover we know.
It should be pointed out that resolution does exactly this kind of compres-
sion, and that resolvents are lemmas also, in the sense of retaining intermediate
results. Indeed, we noted that unit lemmas are resolvents from tree portions
where reduction is not used. The difference, as noted before, is that our lemmas
nocontra
1. p(X,Y) - p(Y,X)
2. -p(X,Y)-p(Y,Z) - p(X,Z)
3. -p(X,Y) -p(Y,X) - p(f(X),f(Y))
4. p(a,l)
5. p(l,b)
7. -p(a,X) -p(X,b) - p(a,q(X)) - p(X,l)
8. -p(a,X) -p(X,b) -p(f(X),f(q(X))) - p(X,l)
9. -p(a,X) -p(X,b) - p(q(X),X) - p(X,l)
11. -p(a,X) -p(X,b) - p(h(X),b)
12. -p(a,X) -p(X,b) - p(f(h(X)),f(X))
13. -p(a,X) -p(X,b) -p(a,Y) -p(Y,b) -p(f(Y),f(X)) - p(h(X),Y)
14. -p(a,X) -p(X,b) - p(a,k(X))
15. -p(a,X) -p(X,b) - p(k(X),b)
17. -p(f(X),f(k(X)))-p(a,X)-p(X,b)
Figure
3: Input clauses for Minimum Value Theorem (MinVT)
are optional regarding completeness. That does not mean they are optional
regarding realizing an actual proof, as this case demonstrates. However, not
being a priori concerned about having to retain almost every nonredundant
intermediate result we do achieve much more trimming. In the first proof we
obtained of MinVT, taking 171 secs., we created and retained just 593 lemmas
while making about 393,000 successful inferences. The only constraint we had
(besides the unit lemma constraint, which is universal for us but still a con-
straint) was a term-length stipulation of 10 on the lemmas and a disallowance
of iterative nesting of any function. For speed considerations the term-length
check is done only on the term replacing a variable at a substitution occurrence;
thus the literal may contain many more constant and function letters than the
bound indicates. This check can be done on literals in new chains as well as
on lemmas, but here was applied only to lemmas. Note, by the way, that the
nesting restriction applied here is almost totally safe for a first run as all functions
but f are Skolem functions, for which one should never gain by nesting,
and nesting f makes no heuristic sense given the problem nature. The sensitivity
to term length is quite modest; if term-length is not limited at all, the
same number of lemmas are retained. For this problem, the limit on nesting
of the same function symbol is necessary in order to constrain the number of
lemmas generated. (That is not always the case, however.) Thus we illustrate
the point that we can trade off more search with input clauses for less retention
goal
goal
Figure
4: top-level proof of AM8 and partial unrolling of proof
of intermediate results than many strategies of resolution employ.
5 Wang Challenge Problem
It is the usual case that we generate too many lemmas and seek ways of trimming
lemmas without removing those helpful to the proof. Therefore, it is an interesting
situation to encounter a problem where too few lemmas are produced.
This situation arose when we pursued a challenge problem set that had not
been fully proven by an automated theorem prover, to our knowledge. In 1965,
Hao Wang put forth several challenge problems for automated theorem provers,
problems beyond the capability of theorem provers at that time [26]. Moreover,
they proved difficult for automated provers for some time. The problem set we
consider were labeled ExQ1, ExQ2, and ExQ3 by Wang, and were treated in
the section "Examples from Quantification Theory". Although Wang suggests
that for a more intuitive understanding of these examples, we should think of
F as the membership relation ffl, this suggestion did not achieve its purpose for
us.
We state the three problems, which are formulas to be refuted in Table 3,
followed, in Figure 6, by one set of axioms used by METEOR. In Figure 6,
replaces constant n of the axioms (the latter for
purely historical reasons).
Problem ExQ1 has been solved by a number of systems, we suspect, because
it is also known as "Wos 31", in [28]. As such it has been solved by OTTER [20],
but because this is one of numerous problems that circulate under labels as
meaningful as "Wos 31", it is not easily determined what provers have solved
Figure
5: proof of AM8, lemmas unrolled
ExQ1: The conjunction of the following formulas is unsatisfiable.
1. m 6= n
2. n 6= k
3.
4.
5.
ExQ2: Replace (2) and (3) above by
1.
2.
ExQ3: Remove (1) from ExQ2.
Table
3: Axioms for ExQ problems
this first problem. OTTER has not solved ExQ2 or ExQ3 although ITP, in some
sense an ancestor of OTTER, did solve ExQ2.
We have solved it with some preconditioning on the manner of presentation
of the problem; we broke it into cases so as to force generation of lemmas.
As previously mentioned, the semantic hyper-linking theorem prover of Chu
and Plaisted subsequently has provided a fully automated proof, the first to
our knowledge [11]. (This problem is particularly well suited for their prover
because it is highly non-Horn, like a logic puzzle. That is why it turns out to be
poorly structured for us; the high number of reductions blocks the production
of unit lemmas.)
A proof of Wos31 (ExQ1) was obtained using D Alit without breaking the
theorem into cases; using Dweight reduces the time to one-third of that when no
weighting is employed. Note that our ExQ3 solution contains the ExQ1 case,
in terms of the inequalities for the three basic constants. As for ExQ1 we again
use D Alit for case 6 of ExQ3; for all other cases we use D roll . It is interesting
8 -p(Y,V),-p(V,Y),r(Y,m),p(Y,m),r(V,m),r(V,Y) 21 -r(X,Y),r(f(X),f(Y))
9 -r(g(Y),b),r(Y,b),p(Y,b) 22 -r(X,Y),r(g(X),g(Y))
Figure
Input clauses for ExQ2, case 1
that all other cases are solved using D roll and not easily solved (in some cases)
using D Alit .
When we first ran ExQ2, very few lemmas were generated and no proof was
obtained. Indeed, an overnight run (14 hours) yielded only 6 lemmas. In con-
trast, for ExQ1 87 lemmas were created in one successful run. Our experience
with the success of lemmas made us consider immediately how more lemmas
could be generated. Because unit lemma generation is inhibited by reductions
we decided to introduce unit clauses to allow more frequent proof branch termination
by unit extension rather than reduction. Although we did not understand
the proof of the theorem (and still don't) it did seem apparent that ExQ1 and
ExQ2 were in effect dealing with cases of equality and inequality of three con-
stants; k,m,n. We broke up the problem into the cases listed in Table 4 and
were able to prove each theorem. Note that the case definition for ExQ2 follows
immediately from the axioms added to define ExQ2. Statistics for these cases
are provided in Table 4.
ExQ2 cases
case
case
ExQ3 cases
case
case
case
case
case
case
problem depth time # inferences # lemmas
measure (secs)
(case 1) D roll Dweight 4,562 14,462,880 47
ExQ2 (case 2) D roll 4.6 12,683 26
(case 1) D roll 108 170,185 67
ExQ3 (case 2) D roll 14 19,916 104
(case
(case
ExQ3 (case 5) D roll 9 12,741 26
(case
Table
4: cases and statistics for ExQ1, ExQ2, and ExQ3
As reported in Table 4 for ExQ2(case 1), we used Dweight , although the same
result was obtained by D roll alone in twice the time (9784 sec.) and double the
inference total (29,886,276 inferences). The weights are the entries seen at the
end of each input clause. It is interesting to view a case of use of weights; these
weights were entered once prior to any weighted run, using an "algorithm" that
accounts for clause length primarily, but with high penalty for known problem
axioms such as the equality axioms. There is a small adjustment in general for
the number of free variables in a clause. The major gain in using the weights
here is the control of the equality axioms.
We comment on other aspects of the METEOR listing of the axiom set
in
Figure
6. The lex predicate is used to order constant symbols for use in
demodulation, and the skolem predicate lists the Skolem functions as mentioned
in the previous section. Neither restriction was used in the runs reported in
this section; demodulation was not used at all in these reported runs. (We
obtained so few lemmas that use of demodulation was not a useful option, but
the problem was initially specified so that demodulation could be used.) The
input axioms are seen to differ in small ways from the natural translation of the
Wang problem specification. Besides the replacement of b for n, there is the
appearance everywhere of example. We had done
our experiments with the axiom set obtained from [27] before tracing the origin
of the problem in preparation for this paper. We have chosen to accept the
variance from the original problem statement since [27] has become a standard
source for problems, including this problem set.
We now feel that we have discovered a new technique for ME, that of breaking
problems into cases to generate useful lemmas. It may even pay to do this
when many lemmas are generated, by severely limiting the natural lemmas being
produced if they do not yield a proof, and trying to generate new lemmas by
the case method. It is clear that this is not (yet) an automatable technique, as
other tries at this have not been useful. That is, we tried to see if the discovery
of a proof for ExQ1 could be speeded up by introduction of cases. However,
all runs of ExQ1 using added cases resulted in increased time to proof. But we
have seen that the technique of forcing lemma creation is fruitful. How widely
applicable the idea is awaits further experience.
6 Bledsoe Challenge Problem
The third problem we consider is actually a collection of variants on a problem
investigated by Bledsoe starting in the early 1970's. Using a natural deduction
style theorem prover with some special heuristics for limit theorems, Bledsoe
and Boyer [7] proved that the sum of two continuous functions at a limit point
is the limit of the sums at that point. They assigned the label LIM+ to this
problem. The theorem has since been proven on the STR -
+VE prover of Hines
and Bledsoe [8, 15], a general theorem prover with some special devices for
handling inequalities on the real line. Bledsoe recognized the difficulty of the
theorem for the uniform provers and issued a challenge set of problems based
on the LIM+ problem [6]. There are five different first-order axiom sets designated
as the challenge set; two make explicit use of the equality predicate with
one formulation requiring use of paramodulation or another rule that builds-in
equality.
Using METEOR we have been able to prove the first three formulations of
the challenge problem. The lack of a full built-in equality mechanism (no mechanism
such as paramodulation) precludes an attempt on the fifth formulation of
the problem. The fourth formulation, using equality without any strong equality
restriction or simplification mechanism stronger than the unadorned demodulation
mechanism for lemmas that we do have, is too much for METEOR at
this point. The first three formulations use the single predicate - (also used in
the MinVT theorem discussed in Section 4). Several uniform provers have now
obtained the third formulation of the challenge problem but METEOR was the
first to achieve success at this level to our knowledge. (See Digricoli [13, 12] regarding
proofs of the fourth and fifth formulations done in a partially interactive
mode.)
Our purpose here is to report on the experience of METEOR with lemma
use on this problem set. The third formulation is the hardest problem where
METEOR has succeeded, where by "hardest" we mean that the strongest set of
restrictions we have ever used were needed to obtain a proof. One proof requires
over 20 hours on a SUN SparcStation 2; shorter proofs required some insight as
to the proof so do not count as legitimate datapoints regarding the capability
of METEOR as a fully automated theorem prover. Proof attempts using proof
knowledge are used to test various constraints in shorter time periods. We will
make clear which experiments use proof insight when such results are presented.
In
Figure
7 we give the clauses used in the three formulations, in roughly
the order that METEOR took them as input (read from left-to-right and top-to-
bottom). The clause numbers are those of the original presentation by Bledsoe
in [6]. METEOR normally re-orders clauses by number of literals (with preference
for unit clauses), with attention to degree of generality also considered.
The item "n at the end of each clause assigns a clause weight n, as discussed
later.
We do not give the original non-clausal formulation of the clause set because
the meaning of most clauses is self-evident, once the constants are interpreted.
The predicate lt denotes -, the function ab denotes absolute value, d1 and and
d2 are Skolem functions for regions (see below), ha is one-half, pl is +, ng
is negative, xs is a Skolem function for exception points in the delta regions,
and min is, of course, minimum. Clauses 3 and 4 give the continuity condition
for function f and g respectively. For example, clause 3 is a direct translation
of Equation 1
%clause 5 % clauses 1,2
clause 12 % clause 8
clause 8.1
clauses 3,4
clause 6
clause 9.1 % clause 10.1
clause 9.2 % clause 10.2
clause 9.11 % clause 10.11
clause 10.3 % clause 11.3
lt(X,0),lt(Y,0),-lt(min(X,Y),0)"6 -lt(X,ha(Z)), -lt(Y,ha(Z)), lt(pl(X,Y),Z)"6
clause 14 % clause 15
clause 7.1
clause 7.2
Figure
7: clauses for Bledsoe challenge problems
The goal clauses, 7.1 and 7.2, give the negation of the theorem we assert (in
conjunction with clause 6). For example, clause 7.1 states
Clause 7.1 is a more difficult goal to achieve because of the need to use the
triangle inequality. However, that change and the related need for clause 8.1,
are not significant changes. Formulation 2 is not much harder than formulation
1. The introduction of the dichotomy axiom (axiom 14) and especially the transitivity
axiom (axiom 15) along with axiom changes for min makes formulation
3 a considerably harder problem.
We list the three formulations by clause set, but will here only study the third
formulation. The first two problem variations METEOR could handle relatively
straightforwardly. The clauses for all three formulations are:
formulation 1 clauses 1, 2, 3, 4, 5, 6, 7.2, 9.11, 10.11, 10.3, 11.3, 12. The goal
is clause 7.2.
formulation 2 clauses 1, 2, 3, 4, 5, 6, 7.1, 8.1, 9.11, 10.11, 10.3, 11.3, 12. The
goal is clause 7.1.
formulation 3 clauses 1, 2, 3, 4, 5, 6, 7.1, 8, 9.1, 9.2, 10.1, 10.2, 11.3, 12, 14,
15. The goal is clause 7.1.
We include some data on runs for the first two formulations with little dis-
cussion; see Table 5. In the lemmaizing run, only ground lemmas are stored and
only ground subgoals are extended by lemmas. For reasons not important here
these combined restrictions are labeled "ground generalizations only".
thm search parameters
time (secs) and number of inferences
D Alit Dweight y lemmaizing z
one 1222.7 2,854,399 3.94 14,682 26.37 36,232
two 3859.8 12,294,133 9.76 43,980 10242.9 11,682,410
yusing D Alit and Dweight
zground generalizations only
Table
5: time and inferences for formulations one and two
We also give the proof tree for the second and third formulations in Figure
8 with the proof of the second formulation on the left. The dotted boxes
surrounding subtrees denote lemma occurrences as discussed below.
6.1 The Third Formulation
We now list the proof devices and restrictions used to tackle the third formula-
tion. Many have been used here only, so our experience with them is limited.
Others are more common, and we can comment on our more general experience
with them.
1. We use a combination of depth measures, D Alit and Dweight . This has been
tried often, usually obtaining considerably improved performance. This is
one of the few times that the proof has not been obtained without this
device. ( This is an oversimplification in that a proof has been obtained
using a combination of D roll and Dweight but only under optimal limits
on other parameters. It was considerably more time-consuming than with
D Alit and Dweight , so more general attempts were not tried.)
2. Only ground lemmas are stored, and these are only used when no instantiation
of the calling goal occurs. This trims the branching factor to one
at this node.
6 10.1
Figure
8: proof trees for second and third formulations
3. Lemma literals are limited in number of symbols allowed.
4. The number of occurrences of any specific input clause allowed in a proof
is controlled. METEOR is very sensitive to this parameter, so we could
not set it by uninformed guess and realize a proof. For our no-proof-
knowledge proofs METEOR increments the upper bound on the clause
occurrence count as a function of current depth according to a ratio set
by the user. The ratio needed is moderately insensitive to user setting in
terms of obtaining a proof at all, but the time needed to realize the proof
is strongly sensitive to that ratio.
5. Literals containing terms of certain forms are not retained. The exclusions
range from obvious redundancies to possibly strong exclusions. We have
results for several combinations of exclusions.
6. Reduction is restricted to B-literals whose source is the transitivity axiom.
This restriction is more natural than it sounds, for reasons stated below.
7. The goal clause is reordered from the usual rule of ordering. There are
only two literals so there is a binary choice, but normally we would expand
the more constrained literal first. This is a significant deviation, because
we rarely had to have to rotate through the literals of the goal clause, yet
in this case no proof has been obtained using the usual literal as the literal
first expanded.
We now expand on some of the above.
The depth measure Dweight utilizes the clause weight that appears appended
at the end of each input clause. The depth measure functions as does D Alit
except the clause weight is used to increment the count instead of the unit
increase used by D Alit . This depth measure may be used in conjunction with
each of the other measures; the proof development terminates appropriately
when any depth count is exceeded, so one gets the conjunction of the depth
criteria.
The weights used in the clauses were guessed once and not changed, following
a prescribed pattern. Some adjustment from a strict formula occurred. For
example, the min axioms constitute one-third of the axioms, but are not likely
to constitute one-third of the clauses used in a proof, so are weighted higher.
The initial "guess" did not use proof knowledge, so is considered a non-sensitive
constraint.
Controlling the number of occurrences of each input clause was necessary for
the any proof to succeed. In actuality it is control of dichotomy and transitivity
that is crucial; experiments show that we can make quite safe guesses about
upper bounds for all other axioms if the transitivity and dichotomy axioms
are limited to the optimal count. We have solved the problem with iterative
incrementing on all clauses, but this is effectively equivalent to binding only
dichotomy and transitivity (clauses 14 and 15) as shown in Line 6 of Table 7
which indicates limits on clause use of optimal plus twenty except for dichotomy
and transitivity. When iterative deepening on clause limits is employed the user
still must pick a ratio of clause-limit increment to depth bound increment, but
this is less sensitive than guessing the clause count. Data on Line 7 of Table 7
increases the count by one for every two levels of increase in the D Alit count.
Literals can be excluded from retention when certain terms are created upon
unification. This is an action at the chain level, not just at the lemma level.
Thus this can effect completeness "in the small". This avenue is taken because
of the large number of proof branches explored that seem to expand from along
very questionable routes, dealing with terms that are either unlikely to occur in
the proof or are redundant with other terms. The terms excluded range from
clearly safe for exclusion to perhaps quite risky. We stress that we do obtain
proofs of the theorem excluding only the very safe exclusions, but performance is
definitely enhanced with more risky exclusions. In Table 6 we list the exclusions
used.
1. d1(d2(X)) 2. d2(d1(X)) 3. d1(d1(X)) 4. d2(d2(X))
5. d1(pl(X,Y)) 6. d2(pl(X,Y)) 7. min(min(X,Y),Z) 8. min(X,min(Y,Z))
9.
13. min(ab(X),Y) 14. min(pl(X,Y),Z) 15. min(X,pl(Y,Z)) 16. min(X,X)
17.
Table
terms excluded in Bledsoe challenge problems
We used four classes of risk in the exclusion heuristic: very safe, safe, some
risk, more risk. In the very safe category are the nested Skolem functions, terms
such as d1(d2(X)). Also included is the term min(X; X). Still considered
safe is the term ha(ab(X)), because ab(ha(X)) is not excluded. Likewise for
included. That is slightly riskier
perhaps because the symbol count has increased and there is a limit on the
total number of symbols allowed per literal. (The limit used was either 11 or
15, about equally used, but 20 symbols still allowed a proof.) Others in Table 6
are riskier; we discuss this further in the next paragraph. Line 3 of Table 7 gives
data for a run using very safe exclusions only. (The phrase "ex. 1-4, 16" means
that terms 1-4 and 16 are excluded terms for that run.) Lines 4 and 5 provide
data using other subsets of the terms in Table 6. The column labeled att.infs
gives attempted inferences, which are potential inferences identified prior to the
unification attempt.
run statistics
description time infs. att.infs. # of lem.infs.
of run (sec)
1. optimal (termsize=15) 27858 23,146 66,485 115 590
2. optimal (termsize=20) 23095 23,052 66,346 153 601
3.y very safe (ex. 1-4,16) 66609 65,871 196,968 186 1,136
4.y ex. 1-4,7-10,12,14,16 49206 47,861 143,409 133 1,037
5.y ex. 1-4,9,10,16 64368 61,499 186,207 180 1,124
limits
7. iter. deep.z 152077 129,419 355,250 181 2,443
ytermsize limit of 15 symbols
zSparc ELC, increase all limits by 1 every other stage
Table
7: altering limits on extensions for third Bledsoe problem
We now briefly consider some of the riskier exclusions we considered. Excluding
similar terms may seem very risky, but we noticed
a proliferation of such terms and it led to asking if they were needed.
Note that terms of this type could still arise through instantiation of variables.
Here exclusion means that unification cannot instantiate a variable with an excluded
term. To illustrate this, the goal \Gammalt(min(e0; e0); min(X; e0)) can be
refuted with the exclusion of all terms in Table 6. In obtaining the proof the
term min(min(e0; e0); e0) is generated when X in the goal is instantiated to
e0). Thus, an excluded term's appearance is not forbidden, just the
use of a term that embeds the excluded term as a substitution instance. The
reader can see this by first extending with clause 9.2 followed by extension with
clause 9.1. Even though completeness is endangered this is a reasonable action
to take and this type of step may be needed to get very difficult theorems. We
are adverse to this not because it endangers completeness if the exclusions are
risky, but because we have been developing the thesis that basic ME should be
hidden and the user should play with the lemmas. We give in Table 8 data on
runs with exclusions, and note again that the exclusions are not needed for the
proof.
run statistics
description time infs. att.infs. # of lem.infs. % succ.
of run (sec)
1. all limits 23324 23,144 66,994
2. D roll , all limits 38663 37,928 116,069 71 1,081 33
3. ex. 1-17 38144 38,450 116,421 71 987 20
4. ex. 1-10,12-16,18 23533 23,709 68,196
5. ex. 1-8,18 43228 38,601 110,147 75 664 22
6. ex. 1-4,7,8,16-18 42101 37,633 107,665 75 659 22
7. ex. min terms 26529 31,290 89,898
8.y ex. 1-4,7-10,12,14,16 49206 47,861 143,409 133 1,037 21
9.y ex. 1-4,9,10,16 64368 61,499 186,207 180 1,124 12
10.y ex. 1-4,16 66609 65,871 196,968 186 1,136 12
14.z trm.size=15 27858 23,146 66,485 115 590 48
yterm-size
zotherwise as in line 1
Table
8: performance characteristics for the third formulation
That reductions are restricted to B-literals from the transitivity axiom actually
came from noting that the simpler proofs for formulations 1 and 2 did not
use reductions. That puts this in the category of "cheating" by our standards.
Even though it was not based on knowing the proof of formulation three, it is
not likely in the real world that simpler versions of the problem are around to
break in our heuristics. Even though that is how we arrived at this guess, there
is reason to guess that way again in similar situations. That is, it is a guess
we would make in other similar situations. The reason is that we have seen
many proofs having some non-Horn clauses where nevertheless reduction is not
needed. So, after our initial tries that tells us the problem is hard, we would
first try without reduction. Then we would try as here, allowing it on transi-
tivity, because they often do use it. This is the first time that a problem has
strongly benefited from this restriction; we have simply made the observation
about when reduction occurs in other problems. More experience is needed to
tell whether the pattern we just have suggested really holds.
The interchange of literal order within the goal is the hardest to justify on
uniform grounds. It works this way and not the other way. Usually, starting
with the more instantiated literal first is the winning strategy. The normal
ordering works in the first two formulations; the proof can be obtained without
lemma use starting with the more instantiated literal. The proof is impossible
to find without lemmas when the literal lt(D; 0) is expanded first. The situation
reverses even for these easier formulations when lemmas are tried. The reason
is clear from the proof tree. In Figure 8 we see that if one follows the second
literal (the right branch) then the key lemma, in the dotted line box, is reached
in D Alit depth 8 while pursuit down the other branch requires depth 13. (Recall
that D Alit is proof tree depth, so the reader can check this directly by counting
branch lengths in the proof trees of Figure 8).
We note that the variable D in the goal is instantiated by the key lemma
as follows: \Gammalt(min(d1(ha(e0)); d2(ha(E0))); 0). This instantiation gives the
found in the typical proof found in analysis texts: for a given epsilon (ffl 0 )
the corresponding delta is the minimum of the deltas (ffi 1 and corresponding
to half of the given epsilon. The min axioms are necessary for discovering
this instantiation. However (and somewhat surprisingly), if the min axioms
are removed from the input clause set a proof is obtained in less than 600
seconds with no limits on clause use. However, in this case "lt(d1(ha(e0)),0) or
lt(d2(ha(e0)),0)" is deduced, giving less information than is provided when the
min axioms are included, but in significantly less time.
Summary
Plaisted [21] has shown that ME with unit lemmas and caching is one of the few
goal-sensitive procedures that has a polynomial search time within the propositional
Horn clause setting in a suitable sense. The result assumes that ME is
used with iterative deepening search, the normal mode for METEOR. Elsewhere
(see Astrachan and Stickel [5]) data is given on use of unit lemmas and caching
in the Horn clause domain. Here we have presented examples in the non-Horn
setting (where caching is not implemented nor easily designed) but where we
have demonstrated that unit lemmas are still very effective. We have considered
examples illustrating very different situations: the nearly ideal, the insufficient
lemma supply situation (where case analysis provided the needed lemmas), and
a barely adequate lemma supply (where only one deep lemma is used and not
even created until the correct proof is under development). This wide scope
of situations we believe demonstrates the usefulness of unit lemma addition to
the Model Elimination procedure. We hope to achieve enough knowledge about
lemma use that henceforth we will view the basic ME procedure as a black box
and the collection of lemmas as the data the user views and manipulates.
Appendix
We give a more formal definition of the Model Elimination(ME) procedure as
used by METEOR. A fuller treatment of the ME procedure(s) is given in [19].
A chain is a sequence of literals, each literal an A-literal or a B-literal. (That
is, a chain is an ordered clause with two types of literals.)
An input chain is a chain of B-literals, obtained by placing an ordering
on a clause from a conjunctive normal form (CNF) formula to be tested for
unsatisfiability. Clauses from the CNF formula are called input clauses. A
input clause of n literals from the CNF formula must be represented by at least
chains, where each literal of the input clause is leftmost in at least one input
chain.
The empty chain is denoted by 2.
If l is the leftmost literal in chain C we write (C \Gamma flg) to represent the
chain C with the leftmost occurrence of l removed. There will be no occasion to
remove a literal other than the leftmost literal, or a sequence of literals leftmost.
In the latter case we regard the literals as being removed one at a time as the
literal becomes leftmost in an intermediate chain.
A chain is preadmissible iff
1. complementary literals are separated by an A-literal;
2. no B-literal is to the left of an identical A-literal;
3. no A-literal is identical or complementary to another A-literal.
A chain is admissible iff it is preadmissible and the leftmost literal is a B-
literal. In practice we will sometimes not enforce condition (2); that can be a
user option.
Let C 1 be an admissible chain and let C 2 be a variable-disjoint input chain.
If there exists a most-general-unifier(mgu) oe of the leftmost literal l 1 of C 1 and
the complement of the leftmost literal l 2 of C 2 , then the extension operation
extends C 1 by C 2 to form chain C 3 by promoting the leftmost literal of C 1 oe
to an A-literal and placing (C g)oe to the left, the literals of (C
arranged in any order the user chooses. All literals in C 3 oe inherit the type
of their parent literal in C 1 and C 2 with the noted exception of the promoted
A-literal. If the chain that results is not preadmissible then the extension is
not defined. If the chain that results is a preadmissible chain with an A-literal
leftmost (i.e., nonadmissible) then the leftmost A-literals are removed back to
the leftmost B-literal, which yields an admissible chain.
Let C be an admissible chain. If there exists a mgu oe of the leftmost literal l
of C and an A-literal of C, then the reduction operation yields chain (C \Gamma flg)oe.
If the chain that results is not preadmissible then the reduction operation is not
defined. If the chain that results is a nonadmissible preadmissible chain then
the A-literals to the left of the leftmost B-literal are removed.
An ME derivation is a sequence of chains composed of an input chain as
first (goal) chain, followed by derived chains, each either an extension of the
preceding chain by some input chain or a reduction of the preceding chain.
An ME refutation is an ME deduction of the empty chain.
Lemmas, an optional property of ME, are created when A-literals are removed
in the transformation from preadmissible to admissible chain. A lemma
is an informal label for either a lemma clause that results from the process of
lemma creation, or the chains that are created from the clause. Here we consider
only unit lemmas so the distinction is pedantic. From the lemma clause only
one chain is created, consisting of the single B-literal and regarded as an ordered
clause. A lemma chain is treated as an input chain after generation (if it passes
filters that may eliminate it; these are generally user-controlled options).
The lemma clause is the complement of the A-literal removed when the A-
literal is eligible to create a lemma. The eligibility criterion is exactly as stated
in the body of the paper but repeated here for completeness. This definition
is only correct for unit lemmas. In a reduction operation, the A-literal that
complements the leftmost B-literal is the reduction A-literal. During a reduction
step, all A-literals strictly to the left of the reduction A-literal are marked.
Every A-literal in a newly created clause inherits the mark, if any, of its parent
A-literal. Any A-literal unmarked at the time of removal creates a lemma clause.
--R
Investigations in Model Elimination Based Theorem Prov- ing
METEOR: Exploring model elimination theorem proving.
METEORs: High performance theorem provers using model elimination.
Caching and lemmaizing in model elimination theorem provers.
Challenge problems in elementary calculus.
Computer proofs of limit theorems.
Variable elimination and chaining in a resolution-based prover for inequalities
A parallel theorem prover for non-Horn clauses
Symbolic Logic and Mechanical Theorem Proving.
Semantically guided first-order theorem proving using Hyper-linking
The Rue theorem-proving system: the complete set of LIM+challenge problems
An implementation of the model elimination proof procedure.
The central variable strategy of str - +ve
Mechanical theorem proving by model elimination.
A simplified format for the model elimination procedure.
Automated Theorem Proving: A Logical Basis.
Otter 2.0.
The search efficiency of theorem proving strategies.
A machine-oriented logic based on the resolution principle
PARTHEO: A high performance parallel theorem prover.
A Prolog technology theorem prover: Implementation by an extended Prolog compiler.
A Prolog technology theorem prover: Implementation by an extended Prolog compiler.
Hierarchical deduction.
Efficiency and completeness of the set of support strategy in theorem proving.
--TR
--CTR
Allen Van Gelder , Fumiaki Okushi, Lemma and cut strategies for propositional model elimination, Annals of Mathematics and Artificial Intelligence, v.26 n.1-4, p.113-132, 1999
Fumiaki Okushi , Allen Van Gelder, Persistent and Quasi-Persistent Lemmas in Propositional Model Elimination, Annals of Mathematics and Artificial Intelligence, v.40 n.3-4, p.373-401, March 2004
Allen Van Gelder, Autarky Pruning in Propositional Model Elimination Reduces Failure Redundancy, Journal of Automated Reasoning, v.23 n.2, p.137-193, August 1999
Allen Van Gelder , Fumiaki Okushi, A propositional theorem prover to solve planning and other problems, Annals of Mathematics and Artificial Intelligence, v.26 n.1-4, p.87-112, 1999 | lemma;METEOR;model elimination |
594176 | Testing Positiveness of Polynomials. | Many problems in mathematics, logic, computer science, and engineering can be reduced to the problem of testing positiveness of polynomials (over real numbers). Although the problem is decidable (shown by Tarski in 1930), the general decision methods are not always practically applicable because of their high computational time requirements. Thus several partial methods were proposed in the field of term rewriting systems. In this paper, we exactly determine how partial these methods are, and we propose simpler and/or more efficient methods with the same power. | Introduction
Many problems in mathematics, logic, computer science, and
engineering can be reduced to the problem of testing positiveness
of polynomials. In 1930, Tarski [33, 34] showed that the
problem is decidable. In fact, he gave a decision method for
a more general problem than just testing positiveness. Since
many improvements and new methods were proposed
19, 18, 25, 36, 8, 21, 22, 5, 12, 23].
However, these methods are computationally expensive due
to their generality. Naturally one is interested in devising
more efficient methods for the sub-problem: testing posi-
tiveness. But then, this sub-problem turns out to be still
difficult. Thus, several authors (mainly from the field of
rewriting systems, for proving termination) proposed
some partial methods, partial in the sense that these method
might not be able to decide the positiveness of some polynomials
[24, 4, 10, 10, 31, 32, 11].
In this paper, we determine how much partial these methods
are. In other words, we find proper subsets of the set
of all positive polynomials that are decided by those meth-
ods. Equivalently, we determine restrictions on the positiveness
that are decided by them. Further, we propose simpler
and/or more efficient methods for the same sets of polynomials
The structure of the paper is as follows. In Section 2, we
list three different restrictions on the property of positiveness
(eventual, absolute, eventual absolute). In the subsequent
sections, we show that each of the existing methods is a decision
procedure for one of the above restricted positiveness
properties. We also give several new methods.
Several Types of Positiveness
let P be a non-zero polynomial in
R[x], and let - 2 R.
Definition 2.1 (Types of Positiveness) We say that P is
ffl positive from - iff 8x
eventually positive 1 iff there exists a - such that P is
positive from -.
absolutely positive from - iff P is positive from - and
every partial derivative P is non-negative from -, that
eventually absolutely positive iff exists a - such that P
is absolutely positive from -. 2
Example 2.1 Let polynomial. The polynomial
P is positive from 0. In fact one sees easily that it
is positive from all - ? \Gamma1. Therefore it is also eventually
positive. However, it is absolutely positive only from - 0
because its second derivative (6x) is non-negative only for
non-negative values of x. As it is absolutely positive from
some - it is also eventually absolutely positive. 2
Example 2.2 Let 1. It is easy to see that
the polynomial P is positive from every - and therefore it
is eventually positive. On the contrary, it is not absolutely
positive from any -, because the derivative
always negative. Consequently it is not eventually absolutely
positive. 2
1 The notion of eventual positiveness was first introduced by Lankford
[24].
Naturally, we are interested in the relations among the
properties. Let P - , EP, AP - , EAP respectively stand for
positiveness from -, eventual positiveness, absolute positiveness
from - and eventual absolute positiveness. The following
proposition shows the relations among them.
Proposition 2.1 The following diagram describes the implication
relation among the different kinds of positiveness prop-
erty. An arrow goes from A to B if A implies B.
@
@
@
@R
\Gamma\Psi
@
@
@
@R
\Gamma\Psi
Proof.
The proofs of all indicated implications follow easily from the
definition. It is equally easy to see that the indicated implications
are the only implications valid for the given properties.
We can use polynomials from Examples 2.1 and 2.2 as counter
examples to other implications. 2
3 Methods for Absolute Positive-
ness
We start with presenting a necessary and sufficient condition
for absolute positiveness of a polynomial. The theorem will
be used in several following subsections and will form a base
for the new method we present later.
From now on, let oe - stand for "shifting" by -. Precisely,
oe - (P ) is the polynomial obtained from P by replacing each x i
with polynomial P can be rewritten
as
e c e x e where the exponent vectors (e) are distinct and
(distributed representation). We will call those c e 's
coefficients of P .
Theorem 3.1 Let P be a non-zero polynomial. Then P is
absolutely positive from - iff every coefficient of the polynomial
oe positive and the constant term is non-zero. 2
Proof.
First note that since P is a non-zero polynomial, oe - (P ) is
also a non-zero polynomial.
Assume that every coefficient of oe - (P ) is positive and the
constant term is non-zero. Then obviously oe - (P ) is positive
from 0. Note that the graph of P is obtained by shifting that
of oe - (P ) by - to the positive direction. Thus the polynomial
P is positive from -.
Let @ be an arbitrary but fixed partial differentiation operator
as @ e 1 +\Delta\Delta\Delta+e n
. Since the polynomial oe - (P ) has all co-efficients
positive, the polynomial @(oe - (P )) also has all coefficients
positive. Therefore @(oe - (P )) is non-negative from 0.
Observing that differentiation and shifting commutes, that is,
we see that oe - (@(P )) is non-negative
from 0. Note again that the graph of @(P ) is obtained by
shifting that of oe - (@(P )) by - to the positive direction. Thus
@(P ) is non-negative from -. Therefore P is absolutely positive
from -.
We can use the same arguments as in the first part of the
proof. The assumption of the polynomial P being absolutely
positive from - is then equivalent to the fact of polynomial
oe being absolutely positive from 0. Therefore we want to
prove that if the polynomial oe - (P ) is absolutely positive from
then it has all coefficients positive and non-zero constant
term. The proof will be done by contradiction.
Assume the constant term of oe - (P ) is zero. Then the value
of oe - (P ) at 0 is 0, contradicting the fact that oe - (P ) is absolutely
positive from 0. Assume there exists a term with
negative coefficient in oe - (P ). Then there exists a derivative 2
of oe - (P ) with a negative constant term (it is the derivative
eliminating all variables of the term with the negative coef-
ficient). The derivative is negative at 0, contradicting the
absolute positiveness of oe - (P ). 2
3.1 Partial Derivative Method
Giesl [11] gave a partial method for testing the positiveness,
by extending the idea of Lankford [24]. The method is based
on the following implications (called differentiation rules):
It might be the 0-th order derivative, that is, the polynomial oe - (P )
itself.
The method, starting from the sentence
repeatedly applies the implications (backward) until it results
in a conjunction of inequalities among numbers. If all those
numeric inequalities are satisfied, then the method outputs
'yes' (P is positive from -). If not, it outputs `don't know'.
Since it is a partial method, a question naturally arises:
How much partial is the method? In other words, we want
to know the proper subset of the set of all positive polynomials
that are decided by the method. As the reader might
have guessed (from the fact we put the method into the section
about absolute positiveness), the method is a decision
procedure for absolute positiveness (Theorem 3.2).
The rest of the subsection is devoted to the proving the
theorem. For this we start with a lemma which will simplify
the proof of the theorem.
Lemma 3.1 The partial derivative method outputs 'yes' on
an input P and - iff it outputs 'yes' on the input oe - (P ) and 0.Proof.
Suppose that by applying Rule-1 on an inequality Q
we generate two new inequalities Q
is easy to see, from the commutativity of shifting and differ-
entiation/evaluation, that by applying the same rule on the
inequality oe - (Q) ? 0, we will generate two new inequalities
The same holds for applying
Rule-2 on Q - 0.
The computation of the partial derivative method on input
ends in a set A of numerical inequalities. Following
the observation above, we easily see that applying the
same computation path on oe - (P ) and 0 results in the set A 0
of numerical inequalities, which are obtained by shifting the
inequalities in A. But then shifting a numerical inequality results
in the same inequality. Thus we conclude that
and so their truths are the same. 2
Now we can prove the exact power of the partial derivative
method.
Theorem 3.2 (Power of Partial Derivative Method)
The partial derivative method outputs 'yes' for an input P
and - iff the polynomial P is absolutely positive from -.
Proof.
Assume the partial derivative method outputs 'yes' on P
and -, it means P is positive from -. From Lemma 3.1 we
know it also outputs 'yes' on oe - (P ) and 0, and oe - (P ) is positive
from 0.
Now we will show, by contradiction, that oe - (P ) has all co-efficients
positive and non-zero constant term. Assume that
the polynomial oe - (P ) has either a negative monomial or constant
term equal to zero.
We start with the case when the constant term is zero.
Then we know oe - (P ) is not positive at 0 and it contradicts
the positiveness of oe - (P ) from 0.
Next we assume that a monomial in oe - (P ) has a negative
coefficient. We would like to show that the partial derivative
method does not prove the positiveness of oe - (P ) from 0. For
this, let us first observe the following. Let Q be a polynomial
in an inequality and let M be a monomial in Q with negative
coefficient. We claim that after applying a rule (Rule-1
or Rule-2) one of the resulting polynomials still contains a
monomial with negative coefficient. To see this, let x i be the
variable on which the rule is applied. Let Q 1 be the polynomial
resulting from substituting 0 into x i in Q and let Q 2
be the polynomial resulting from differentiating Q in x i . Assume
that x i occurs in M . Then the monomial @M
occurs in
since it cannot be canceled by other monomials. Further,
the monomial obviously has a negative coefficient. Assume
that x i does not occur in M . Then M occurs in Q 1 because
there cannot be any cancelation among different monomials
after substituting 0 into x i .
Repeated applications of the rules results in a set of numerical
inequalities. From the observation above we know that
at least one of the inequalities must be of the form a - 0 or
a ? 0 where a ! 0. Thus the partial derivation method does
not output 'yes' for oe - (P ) and 0. Contradiction.
Thus, we showed that oe - (P ) has all coefficients positive
and the constant term is non-zero. From Theorem 3.1 we
conclude that P is absolutely positive from -.
Assume P is absolutely positive from -. From Theorem
3.1 we know that oe - (P ) has all coefficients positive and non-zero
constant term. We will show that the method proves the
positiveness of oe - (P ) from 0.
In the final set of numerical inequalities there is only one
strict inequality (resulting from the application of the first
part of Rule-1). Note that the left hand side of the strict
numerical inequality is the constant term of oe - (P ). Because
the constant term is positive, the strict inequality is true.
All other numerical inequalities are non-strict. Note that the
applications of the rules cannot create a negative term. Thus
all the numbers in the non-strict numerical inequalities are
non-negative. Hence, all non-strict inequalities are true,
We showed that the initial inequality is transformed into a
valid set of numerical inequalities. Thus the partial derivative
method outputs 'yes' for the input oe - (P ) and 0. From Lemma
3.1 we conclude that the method outputs 'yes' also on the
input P and -. 2
3.2 Merging Method
The method was first described by Ben Cherifa and Lescanne
[4]. Steinbach [31, 32] increased the power of the method and
removed some restriction imposed by the original version.
The main idea of this method is deciding the positiveness of
polynomial P by finding a sequence of polynomials
such that
The positiveness of polynomial Pn is checked with the "all
coefficients are positive" rule. Of course this rule decides the
positiveness of a polynomial only from positive -.
The transformation of P i into P i+1 is done in two main
steps. Firstly, a pair of monomials, one having negative
and one positive coefficient are chosen. Secondly, the two
monomials are merged into a new monomial. The procedures
CHOOSE and CHANGE are the essential part of the method
and for a detailed discussion on them we refer to Section 5.3
of [32].
We are again interested in the relation between the method
and the positiveness properties we have defined. Giesl in [11]
proved the following facts regarding the comparison of his
method with the merging methods of Steinbach [32] and Ben
Cherifa and Lescanne [4].
Theorem 3.3 (Power of Merging Method (Giesl 95))
ffl If the merging method can prove a polynomial P to be
positive from -, then the partial derivative method can
do so as well.
ffl If partial derivative method can prove P to be positive
from -, then there exists a - 0 - such that the merging
method can prove P to be positive from - 0 . 2
Giesl also gives an example for the second observation,
where the merging method cannot prove positiveness of P
from - though the partial derivative method does. Therefore
the partial derivative method is stronger than the merging
method.
We see that the merging method besides being a partial
method for deciding positiveness of polynomial also only partially
decides absolute positiveness of polynomial. Naturally
one can be again interested in an exact characterization of
the power of the method. We do not know a simple characterization
for the polynomials positiveness of which is decided
by the merging method and leave it as an open problem.
3.3 Shifting Method (New)
We present a new and simple method for checking absolute
positiveness of polynomial. The method is based on Theorem
3.1 which gives the necessary and sufficient condition
for absolute positiveness. From the theorem the method is
obvious.
1. Shift P by -, that is, compute the polynomial P 0 such
that
2. If all the coefficients of P 0 are positive and the constant
term is non-zero then output 'yes', else output `no'.
Example 3.1 Check if the following polynomial 3 P is absolutely
positive from 2:
We apply the shifting method. For this, we first shift P
by 2,
Next, we find that all the coefficients are positive and the
constant term is non-zero (8), thus we conclude that P is
absolutely positive from 2. 2.
3.4 Comparing the Complexity of the Method
Since all the above methods are of equal testing power, we are
interested in complexity differences. In the following theorem,
we recall the analysis of the merging method by Steinbach [31]
and the analysis of the partial derivate method by Giesl [11].
Then we give the analysis of the shifting method. Below we
assume that every arithmetic operation takes a constant time.
Theorem 3.4 (Computing Times) The computing times
for worst cases are bounded from above as follows:
ffl Partial Derivative Method O(d n ')
ffl Merging Method O(' ' )
Shifting Method O(d n ')
where
n the number of variables,
' the number of monomials,
d the maximum of the degrees in each variable. 2
Proof.
Partial Derivative Method: In [11], Giesl gave the following
derivation: Let T (n; d; ') be the computing time for
an input characterized by n, d and '. First we compute
store the results for the later use. This
3 This polynomial arises from a certain polynomial interpretation of
the term rewrite system for associativity and endomorphism [11].
takes O(d). Let S(n; d; ') be the computing time for the re-
maing part (successive elimination of variables). The elimination
of one variable involves the following: d partial differen-
tiations, where each differentiation takes O('), d evaluations,
where each evaluation takes O('), using the stored values of
the powers of -. Further this process produces (d
polynomials in variables to work on. Thus, we get the
following recurrence formula:
By solving the recurrence formula, we see that S(n; d;
O(d n '): Thus, T (n; d;
Merging Method: Steinbach [31] proved the following bound
where s is the number of the positive monomials and t is
the number of the negative monomials. He then, using the
formula of Stirling(s! aproximates to ( s
2-s), simplified it
to
t, it can be rewritten in terms of ' as
Shifting Method: First, we need to shift each monomial. 4 For
this, we need to shift the power of each variable, that takes
O(d 2 ) for each variable. Then we need to multiply out the
shifted powers, that takes O(d n ). Thus, shifting each monomial
takes O(d shifting all the
monomials takes O(d n '). Next, we need to sum all the shifted
monomials, which takes O(d n '). Thus, all together, the shifting
method takes O(d
These are asymptotic results (with the big O's), and thus
one should be careful not to draw any too definitive conclusion
about their performances on small/moderate size inputs,
which often arise in application domains.
4 Methods for Eventual Absolute
Positiveness
Now we shift our focus to the (known and new) methods for
testing eventual absolute positiveness.
4.1 Partial Derivative Method (eventual
positiveness version)
We have already mentioned the Lankford's method [24] which
was suggested as a partial decision method for eventual pos-
itiveness. Let P be a non-constant polynomial. Then the
4 Actually, there are practically better ways, such as Honer evaluation
or synthetic division, etc. But they do not seem to give a better bound,
thus we will stick to the brute-force way since it easier to analyze.
method is based on a simple fact that if every non-vanishing
first order partial derivative of P is eventually positive then
P is eventually positive. We can apply the same reasoning
on the partial derivatives repeatedly until all polynomials are
numbers. If all of them are positive then the input polynomial
is eventually positive. Otherwise, we don't know.
Since it is a partial method, a question again naturally
arises: How much partial is the method? We will answer this
question by following the similar approach that we already
used in studying the power of the partial methods for testing
positiveness (Section 3).
Lemma 4.1 The partial derivative method (Lankford) outputs
'yes' on an input P iff it outputs `yes' on the input
Proof.
Suppose that by applying differentiation on an inequality
another inequality Q ? 0 . It is easy to
see, from the commutativity of shifting and differentiation,
that by differentiation in the same variable on the inequality
oe 0, we will generate a new inequality oe - (Q
The computation of the partial derivative method (Lank-
ford) on input P ends in a set A of numerical inequalities.
Following the observation above, we easily see that applying
the same computation path on oe - (P ) results in the set A 0
of numerical inequalities, which are obtained by shifting the
inequalities in A. But then shifting a numerical inequality results
in the same inequality. Thus we conclude that
and so their truths are the same. 2
Now we can prove the exact power of the partial derivative
method (Lankford).
Theorem 4.1 (Power of Partial Derivative Method)
The partial derivative method (Lankford) outputs 'yes' on input
P iff the polynomial P is eventually absolutely positive.
Proof.
Assume that the partial derivative method outputs 'yes' on
an input P. We need to show that P is eventually absolutely
positive. From the assumption, we know that P is eventually
positive. Therefore there exists a - 0 such that P is positive
from - 0 . Further from the details of the execution of
the partial derivative method, we observe that every partial
derivative of P is either a zero polynomial or eventually posi-
tive. Thus for every non-zero partial derivative P of P , there
exists a - such that P is positive (thus non-negative) from
- . Now let - be the maximum of - 0 and all - 's. Then, P is
absolutely positive from -. Thus, P is eventually absolutely
positive.
Assume that the polynomialP is eventually absolutely pos-
itive. We need to show that the partial derivative method
outputs 'yes' on this input. Since P is eventually absolutely
positive, there exists - such that P is absolutely positive
from -. Then, oe - (P ) is absolutely positive from 0: By Theorem
3.1, we see that all coefficients of oe - (P ) are positive and
the constant term is non-zero. Note that the partial derivative
method does not introduce negative terms during the
execution on the input oe - (P ). Thus, the method will output
'yes' on the input oe - (P ). By Lemma 4.1, we conclude that
the method will also output 'yes' on the input P . 2
4.2 Dominating Monomials Method (New)
Now we propose a new and more efficient method for testing
eventual absolute positiveness of polynomial. First note that
the eventual (absolute) positiveness of a univariate polynomial
can be trivially decided by checking whether its leading
coefficient is positive. We generalize the observation to multivariate
case. For this, the notion of leading monomial must
be generalized. The new method is essentially based on one
such generalization (which we call dominating monomial).
Definition 4.1 (Dominating monomial) We say that a
monomial s dominates a monomial m. iff m divides s and m
is different from s. We say that s is a dominating monomial
of P iff there is no monomial in P dominating s. 2
Example 4.1 Let us consider polynomials
There are three dominating
monomials in P there are two in Q
univariate polynomials there is only one dominating
monomial - the leading monomial. 2
Now we are ready to describe the new method:
1. Collect all the dominating monomials of P .
2. If their coefficients are all positive, then output 'yes', else
output 'no'.
The proof of the correctness of the method will be given later
(Theorem 4.2). Let us first get familiar with the method by
working on several small examples.
Example 4.2 Check if the following polynomial is eventually
absolutely positive:
One sees immediately that the only dominating monomial is
xyz. Since its coefficient is positive, the polynomial is eventually
absolutely positive.
Let us try another:
One sees that the dominating monomials are x 4 , 2xy 3 and
y. Since their coefficients are positive, the polynomial is
eventually absolutely positive.
Let us try still another (obtained by changing signs in the
previous example),
Again, the dominating monomials are x 4 , \Gamma2xy 3 and 3x 2 y.
Since one coefficient is negative, the polynomial is not eventually
absolutely positive. 2
Remark: Note that one can use the dominating monomial
method as a quick pre-pruning method while testing absolute
positiveness: Suppose that we would like to check whether a
polynomialP is absolutely positive from -. We first apply the
(very cheap) dominating monomial method. If it turns out
that P is not eventually absolutely positive, then we do not
need to carry out the more expensive absolute positiveness
check, since we already know that the answer is 'no'. 2
The remaining of this section is devoted to proving the correctness
of the dominating monomial method (Theorem 4.2).
We begin with a lemma which "justifies" the notion of dominating
monomial.
Lemma 4.2 The set of dominating monomials of P and that
of oe - (P ) are the same. 2
Proof.
Let m be a dominating monomial of P . We need to show
that m is a dominating monomial of oe - (P ). We prove it by
contradiction. Assume that m is not a dominating monomial
of oe - (P ). There are two cases:
ffl m is not a monomial of oe - (P )
ffl m is a monomial of oe - (P ), but not dominating.
Case 1: m is not a monomial of oe - (P ).
Note that m is a monomial of oe - (m). Since m is not a monomial
in the oe - (P ), there must be a monomial q (different
from m) in P such that there is a monomial q 0 of oe - (q), that
has the same degree vector as m. Every monomial of oe - (q)
divides q, in particular, q 0 divides q. Since m and q 0 have the
same degree vector, m divides q. Recall that m is different
from q, thus q dominates m. Therefore m is not a dominating
monomial of P . Contradiction.
Case 2: m is a monomial of oe - (P ), but not dominating.
Thus there is a monomial q 0 in oe - (P ) that dominates m.
Hence there is a monomial q of P such that there is a monomial
q of oe - (q), that has the same degree vector as q 0 . Every
monomial of oe - (q) divides q, in particular, q divides q. Since
q 0 and q have the same degree vector, q 0 divides q. Recall
that q 0 dominates m. Thus m divides q 0 and they are differ-
ent. Since q 0 divides q, we see that m divides q and they are
different. Thus q dominates m, and m is not a dominating
monomial of P . Contradiction.
Thus m must be a dominating monomial of oe - (P ).
Let m be a dominating monomial of oe - (P ). We need to show
that m is a dominating monomial of P . This can be done in
the exactly same way as before, since
The following theorem relates the notions of eventual absolute
positiveness and dominating monomials, proving the
correctness of the dominating monomial method.
Theorem 4.2 A polynomial P is eventually absolutely positive
iff the coefficients of all dominating monomials of P are
positive. 2
Proof.
Assume that P is eventually absolutely positive. We show
that the coefficients of all dominating monomials are positive.
From eventual absolute positiveness of P we know that
there exists a - such that P is absolutely positive from -.
From Theorem 3.1 we know that oe - (P ) must have all coefficients
positive and non-zero constant term. Therefore also all
coefficients of the dominating monomials of oe - (P ) are posi-
tive. By Lemma 4.2, the set of all dominating monomials of P
is the same as that of oe - (P ). Thus all dominating monomials
of P have positive coefficients.
Assume that the coefficients of all dominating monomials
of P are positive. We need to prove that P is eventually
absolutely positive.
We begin by taking care of a trivial case where all other
(non-dominating) monomials of the polynomial P also have
positive coefficients. It is easily seen, that such a polynomial
is absolutely positive from any - ? 0 and therefore eventually
absolutely positive.
Therefore assume that there exists at least one monomial
with negative coefficient (negative monomial) in P . We partition
the polynomial P into a sum of several sub-polynomials
such that one of the sub-polynomials consists of all positive
non-dominating monomials of P and that each of the remaining
sub-polynomials consists of exactly one dominatingmono-
mial of P (which we will call the leading monomial) and some
(possible none) monomials dominated by the leading monomial
(thus, these monomials are all negative.)
Obviously, if each sub-polynomial is eventually absolutely
positive, so is P . Thus, from now on, we will show that each
sub-polynomial is eventually absolutely positive. Let Q be
one of sub-polynomials.
If Q consists of only positive monomials, it is absolutely
positive from any - ? 0 and therefore eventually absolutely
positive. Thus, from now on assume that Q has at least one
negative monomial.
First we will prove that Q is eventually positive. Let
We claim that Q is positive
from - 5 . To see this, first recall that x m dominates x e i for
every i. Hence, we see immediately that for every i and for
every x -,
a
ab
a
Thus, we see that for every x -, Q
Q is eventually positive.
It remains to show that for every partial derivative Q of
there exists a - such that Q is non-negative from - .
It is obvious that every vanishing derivative is non-negative
from any -. Thus from now on let Q be a non-vanishing
partial derivative of the polynomial Q. Note that Q again
consists of a positive leading monomial (a derivative of the
leading monomial of Q) and some (possibly none) negative
monomials dominated by the leading monomial. Thus, by
applying the idea used for showing the eventual positiveness
of Q, we see that there exists a - such that Q is positive
from - and therefore it is also non-negative from - . As
there are only finitely many derivatives, we can take -m the
maximum of the bound for positiveness of the polynomial Q
and the bounds for non-negativeness of its derivatives. Then
the polynomial Q is absolutely positive from -m . Thus Q
is eventually absolutely positive. We showed that every sub-
polynomial of P is eventually absolutely positive. Therefore
P is also eventually absolutely positive. 2
4.3 Comparing the Complexity of the Method
We know that the partial derivative method (Lankford) and
the dominating monomial method have the same power.
The following theorem compares their asymptotic complexity
bounds.
Theorem 4.3 (Computing Times) The computing times
for worst cases are bounded from above as follows:
ffl Partial Derivative Method (Lankford) O(d n ')
Dominating Monomial Method O(n' log ')
where
n the number of variables,
' the number of monomials,
d the maximum of the degrees in each variable. 2
Proof.
5 Actually, one can find a much smaller value for - than the one
given here. But here we are only interested in proving the existence of
a bound, and thus any bound suffices.
The bound for the partial derivative method is immediate
from the fact that the method performs up to d n differentiations
of polynomials, where each differentiation takes O(').
The bound for the dominating monomial method is immediate
from the number of comparisons needed for sorting the
monomials according to the partial order defined by the domination
property, where each comparison takes O(n). 2
Conclusions
Several results were presented in the paper. We determined
how much partial the several known methods are for testing
positiveness of polynomials. After that we proposed simpler
and/or more efficient methods with equal power.
There are several directions for the future work. Regarding
the shifting method, one can use more sophisticated methods
for the shifting. For example, the number of monomials
necessary to be shifted can be significantly reduced by exploiting
the structure of the polynomial (not all monomials
have to be shifted, the shifting can be stopped after no negative
monomials can be generated, summing new monomials
need not be done for only positive monomials etc). Also, it
will be interesting/important to find out experimentally how
the new methods (shifting, dominating monomial) behave on
small/moderate size inputs.
--R
Algorithms for the Geometry of Semi-Algebraic Sets
Cylindrical algebraic decomposition II: An adjacency algorithm for the plane.
An adjacency algorithm for cylindrical algebraic decompositions of three-dimensional space
Termination of rewriting systems by polynomial interpretations and its implementation.
Simplification of Truth Invariant CAD's and Solution Formula Construction.
Improved algorithms for sign and existential quantifier elimination.
Quantifier elimination for the elementary theory of real closed fields by cylindrical algebraic decomposition.
Quantifier elimination by cylindrical algebraic decomposition - 20 years of progress
Partial cylindrical algebraic decomposition for quantifier elimination.
Termination of rewriting.
Generating polynomial orderings for termination proofs.
A combinatorial algorithm solving some quantiifier elimination problems.
The complexity of deciding Tarski algebra.
On the complexity of semialgebraic sets.
An improvement of the projection operator in cylindrical algebraic decomposition.
Improvements in CAD-based Quantifier Elim- ination
Simple solution formula construction in cylindrical algebraic decomposition based quantifier elimina- tion
Heuristic search and pruning in polynomial constraint satisfaction.
Parallelization of quantifier elimination on a workstation network.
Quantifier elimination for formulas constrained by quadratic equations via slope resultants.
Approximate quantifier elimination.
Generic quantifier elimination.
Approximate Quantifier Elimination.
A finite termination algorithm.
Applying linear quantifier elimination.
An Improved Projection Operator for Cylindrical Algebraic Decomposition.
An improved projection operator for cylindrical algebraic decomposition.
Solving polynomial strict inequalities using cylindrical algebraic decomposition.
On the computational complexity and geometry of the first-order theory of the reals
A parallel implementation of the cylindrical algebraic decomposition algorithm.
Proving Polynomials Positive.
Termination of rewriting.
The completness of elementary algebra and geometry.
A Decision Method for Elementary Algebra and Geometry.
The complexity of linear problems in fields.
Quantifier elimination for real algebra - the cubic case
--TR
--CTR
Salvador Lucas, Practical use of polynomials over the reals in proofs of termination, Proceedings of the 9th ACM SIGPLAN international symposium on Principles and practice of declarative programming, July 14-16, 2007, Wroclaw, Poland
Jrgen Giesl , Aart Middeldorp, Transformation techniques for context-sensitive rewrite systems, Journal of Functional Programming, v.14 n.4, p.379-427, July 2004
Jrgen Giesl , Ren Thiemann , Peter Schneider-Kamp , Stephan Falke, Mechanizing and Improving Dependency Pairs, Journal of Automated Reasoning, v.37 n.3, p.155-203, October 2006
Nao Hirokawa , Aart Middeldorp, Tyrolean termination tool: Techniques and features, Information and Computation, v.205 n.4, p.474-511, April, 2007 | termination proofs;positiveness of polynomials;term rewrite systems |
594182 | The Design of the CADE-13 ATP System Competition. | Running a competition for automated theorem proving (ATP) systems is a difficult and arguable venture. However, the potential benefits of such an event by far outweigh the controversial aspects. The motivations for running the CADE-13 ATP System Competition were to contribute to the evaluation of ATP systems, to stimulate ATP research and system development, and to expose ATP systems to researchers both within and outside the ATP community. This article identifies and discusses the issues that determine the nature of such a competition. Choices and motivated decisions for the CADE-13 competition, with respect to the issues, are given. | Introduction
Running a competition for Automated Theorem Proving (ATP) systems 1 is a difficult and
arguable venture. The reasons for this are that existing ATP systems are based on different
logics, are designed for different types of reasoning, require different amounts of user interaction,
have different input formats, and may run on specialized hardware. Moreover, there is no clear
work profile with respect to which ATP systems should be evaluated. However, a competition
will make a significant contribution to the following important needs:
ffl to evaluate the relative capabilities of ATP systems,
ffl to stimulate ATP research in general,
ffl to stimulate ATP research towards autonomous systems,
ffl to provide motivation for implementing and fixing systems,
ffl to provide an inspiring environment for personal interaction between ATP researchers,
ffl to expose ATP systems to researchers both within and outside the ATP community.
In other disciplines competitions are regularly used to stimulate research and development.
The annual ACM computer chess championship [New94] is very well known and attracts much
interest. Participants in the chess championship are clearly motivated to improve their pro-
grams. Programming competitions are also popular [CRRP90, AKK93, Dem96], and encourage
programmers to improve their skills. Competitions in machine learning [MMPS94], algorithm
implementation [CIJ + 94], and other disciplines have all stimulated effort in their respective
fields. In ATP there have already been competitions at the propositional [BKB92] and 1st
order [Ove93] levels, which have encouraged researchers to improve their ATP systems. As an
example, Otter's autonomous mode [McC94] resulted in part from the competition described
in [Ove93].
As well as being of interest in its own right, an ATP system competition, or at least an
examination of the issues involved in a competition, will provide insight into the more general
notion of ATP system evaluation. For a long time the testing and evaluation of ATP systems has
been very ad hoc. Results being published seldom provide an accurate reflection of the intrinsic
power of the ATP system being considered. Inadequate evaluation has the potential to damage
a field of research; bad ideas may appear to be good and are thus adopted and perpetuated 2 ,
while good ideas may appear bad and are hence discarded. A first step towards improving ATP
system evaluation has been the release of the TPTP problem library [SSY94, SS96]. A common
library of problems is a necessary, but not sufficient, tool for meaningful system evaluation.
There are also other issues that need careful consideration. This examination of the issues
surrounding an ATP system competition goes a fair way towards capturing the requirements
for meaningful ATP system evaluation. It should be noted that using benchmarks and test
beds (such as the TPTP problem library) in system evaluation requires special care (see also
[HPC93]).
In order to benefit fully from a competition, a thoroughly organized event, with unambiguous
and motivated rules, is necessary. One approach to ATP system competitions, as was taken in
We use the term "ATP system" to refer to the functional unity represented by the implementation of a
reasoning calculus and its control, i.e., the implementation of a proof procedure.
Geoff thinks that paramodulation is an example of this in ATP.
the competition at CADE-11 [Ove93], is to run very specialized competitions with specifically
selected problems. While this allows a detailed analysis and comparison of the proofs obtained
by ATP systems, it does not provide a realistic comparison of the ATP systems in terms of
their general usefulness. In [Ove93] Overbeek notes that the ATP community had "never [been]
able to formulate an acceptable mechanism for comparing different systems". In order for a
comparison of different ATP systems to make sense, it is necessary that all the systems should
be attempting to capture a common notion of "truth", as is described in the Realist viewpoint
in [Pel91]. Given this commonality across all systems, we believe that it is possible to set
out rules for a competition that can determine a winner, relative to some clearly specified
constraints. For some issues relevant to an ATP competition, inevitable constraints emerge.
For other issues there are several choices, and a decision has to be made for the competition.
The arising issues, choices, and decisions are described in this paper.
Although this paper focuses on the issues relevant to experimental comparison of ATP
systems, it is important to acknowledge the contribution of analytic approaches, e.g., [Let93,
Dun94, Pla94]. These approaches investigate metrics such as search space duplication, search
tree size, Herbrand multiplicity, number of variables to bind, and connectivity. At the propositional
level analysis can be reasonably accurate, and is thus important for that limited situation.
At the 1st order level the analysis is significantly more difficult, and results obtained so far are
insufficient. Complete analysis of search guidance at the 1st order level is of course impossible
(for otherwise 1st order logic would be decidable!). It is for these reasons that we have focused
on experimental comparison of ATP systems; in this way meaningful judgements can be made.
Competition Issues
There are four types of issues (and resultant choices and decisions) relevant to the design of an
ATP system competition:
1. Issues based on the fundamental nature of ATP.
2. Issues associated with common practice in ATP research.
3. Issues arising from the application of ATP systems.
4. Issues directly related to the competition.
An overview of the issues that are discussed in the following sections is given in Table 1.
The table also shows the two types a particular issue most belongs to, according to the four
types presented above.
Type Issue
ATP System Properties
2,3 Degree of Automatization : How much user interaction is allowed?
2,3 Soundness and Completeness: How do soundness and completeness affect
evaluation?
2,3 Proofs and Satisfiability Checking: Should the systems be expected to find
proofs or models?
2,3 Proof Objects : Are explicit proof objects required?
1,2 Monolithic and Compositional Systems: Does the system structure matter?
Problem Presentation
1,2 Scope of Logic : Which logics (e.g., Classical, Modal) should be allowed?
1,2 Built-in Theories : Are built-in theories (e.g., equality) allowed?
2,3 Input Language : What input language (e.g., CNF, FOF) should be used?
3 Clause Type Information : Is usage of such information acceptible?
Clause and Literal Orderings : How can bias be avoided?
Problem Selection
2,4 Problem Source : Where should the problems come from?
4 Problem Difficulty : How difficult should the problems be?
2,4 Problem Axiomatization : What about biases in problem axiomatizations?
4 Number of Problems : How many problems should be used?
Resource Limits
- Should a runtime limit apply per problem or for all problems altogether?
What runtime limit should be imposed?
4 Hardware and Software resources : What hardware and software should be
available for the competition?
System Evaluation
Should a distinguished "winner" be determined?
2,3 Performance Metrics : What metrics should be used for evaluation?
3,4 Ranking Scheme : How should performance metrics be combined for ranking?
Table
1: Relevant issues for an ATP system competition design.
3 ATP System Properties
3.1 Degree of Automation
From a user's viewpoint, ATP systems are of two types : fully automatic systems 3 and interactive
systems. Currently, and presumably in the future, the most important application of
fully automatic ATP systems is as embedded systems in more complex reasoning environments,
where they serve as core inference engines. This setting is shown in Figure 1. The environment
may call on the fully automatic ATP system to solve subtasks within the operation of the
overall system. The subtasks are thus generated by the environment. Examples of fully au-
3 Astrachan and Loveland [AL94] define three types of fully automated deduction (F.A.D.) systems . "pure
F.A.D. systems, where only the problem can be entered ., the strong F.A.D. systems, where parameters can
be set only once, and the weak F.A.D. system, where many experiments with parameters are permitted, but
each adjustment requires a restart from the beginning of the problem. For the purposes of this discussion,
automatic ATP systems are the pure and the strong F.A.D. systems; weak F.A.D. systems are considered to be
interactive.
tomatic systems are Otter [McC94], SETHEO [LSBB92], SATCHMO [SGar], the CLIN series
[LP92, CP94, Ale95], and SPASS [WGRar].
Problem Solution
Language
Transformers Interface
User
Management
Data
System
Control
(fully automatic)
ATP System
atomic
proof
requests
proofs/
models
Figure
1: The embedding of an ATP system in some reasoning environment.
Interactive systems find application in hardware and software verification research [BM90,
HRS90, ORS92, WG92], the formalization of informal mathematical proofs [FGT90, Pau90],
the teaching of logic [Por94], and as tools of mathematical and meta-mathematical research
86]. Examples of interactive systems
NQTHM [BM90], and NUPRL [CAB systems typically embed some
form of a fully automatic ATP system as a subsystem 4 , and are an example of the reasoning
environments mentioned above. At any point the user of an interactive system may ask that
some (sub)problem be submitted to the fully automatic component.
Both fully automatic and interactive theorem proving systems are important. It is clear,
however, that the two types of system are very different. In terms of a competition, it would
not make sense to compare fully automatic systems with interactive systems; the qualities that
are required of the two types are largely distinct. In particular, an interactive system must
be judged largely on its ability to assist the user in the organization and tracking of complex
proof objects [PS94]. While for fully automatic systems the system runtime is the dominating
issue. It may be the case that there are ATP system evaluation criteria that are independent
of whether the systems are automatic or interactive. However, at this stage no such criteria are
clear. Thus the ATP competition can compare either fully automatic systems or interactive
systems, but the two types cannot be compared with each other.
Many of the assessment criteria for a competition between interactive theorem proving
systems would be very subjective, as individual user abilities and tastes would necessarily factor
into the comparison. There are some criteria, e.g., "user-friendliness", that do not appear to
have any objective measure at all. In contrast, the criteria for comparing fully automatic
ATP systems are mostly objective, as described in this paper. Also, recalling that interactive
systems typically embed a fully automatic ATP system as a subsystem, a comparison of the
fully automatic subsystems of interactive systems should be part of a comparison of interactive
systems 5 . Decision : The ATP competition will be between fully automatic ATP systems. No
4 At the current stage, most interactive systems contain a quite rudimentary and simple theorem proving part,
while (justifiably so) most effort is spent on the development of adequate logics, proof tactics, and interfaces.
5 Today, a direct comparison of the fully automatic subsystems would be difficult, because due to their
human interaction will be allowed.
In the rest of this paper attention is limited to fully automatic ATP systems, and they
will be referred to simply as ATP systems. Note that the decision to focus on fully automatic
systems does not exclude the possibility of a competition between semi-automated or interactive
systems. Indeed, such a competition would be of interest, if the difficulties involved can be
adequately resolved.
A consequence of the limitation to fully automatic systems is that the competition will
not appreciate system properties which relate to human computer interaction, and therefore
will not necessarily determine the best "human assistant". Rather, the competition will assess
the pure reasoning capabilities, and nothing else 6 . The intention is to foster automation. In
particular, the competition aims to identify powerful general purpose deduction procedures,
and to encourage automatic problem analysis and system configuration. The development of
deduction procedures has been a focus of ATP research since its inception, and is certainly a
mature enough area to evaluate. On the other hand, automatic problem analysis and system
configuration are underdeveloped. In various research groups there is much knowledge about
how to analyze problems, and how to configure that group's ATP system. This knowledge is
exploited when the ATP system is evaluated, by having the knowledgeable person manually
configure the system for each problem. Due to this common practice of manual configuration,
the effort to capture and implement problem analysis and configuration techniques is rarely
taken. Implemented systems often feature strong reasoning components but have very poor
automatic control. This makes it difficult for other users of such systems to get the best
possible performance from the systems, and makes the systems unsuitable for use as embedded
systems. Hopefully this ATP competition will encourage researchers to formalize and capture
their analysis and configuration skills in their ATP systems.
3.2 System Soundness and Completeness
Traditionally, ATP systems are designed to be deductively sound and complete: every answer
returned is deductively correct and if a solution exists it is eventually deduced. However, ATP
systems are usually too complex to formally verify either property. Thus systems are tested
experimentally to detect violations of these properties. While soundness can be assumed for
extensively tested systems (at least if a large number of the produced solutions have been
verified), completeness is more difficult to assess. The reason for this is that the inability to
find a solution is not necessarily a sign of incompleteness - the problem could simply be too hard
for the system. In fact, due to the finite amount of resources allocated to any particular ATP
system run, every search for a solution has limited completeness, independent of the system's
theoretical completeness. A special case of incompleteness is a bugged ATP system, which
crashes on some problems. The question then arises, how should unsound and/or incomplete
and/or bugged systems be treated in the ATP competition?
From a users point of view, there is little difference between not finding a solution due to
system incompleteness, not finding a solution due to a resource limit being reached, and not
finding a solution due to a system crash. In all cases the user learns nothing about the solution
to the problem. There are also positive aspects to each form of failure. If a resource limit is
reached then the user can optimistically increase the resources available (although this is futile
simplicity no modular system design is used and an isolated test is not easily possible.
6 But note: the success of ATP systems as automated reasoning assistants will depend on their usability by
non-experts. For high usability the dependence on user interaction, in terms of low level guidance, needs to be
minimized. This argues that even in interactive systems less (low level) interaction is better.
if the resource limit was reached due to incompleteness, and further, the supply of resources
typically cannot deal with the exponential growth in demand for them). If a system terminates
quickly, due to incompleteness or a bug, then time is saved and there is hope of having the
system repaired. In practice a bugged or incomplete system may solve more problems within
some time limit than a bug free complete system, and therefore may be more useful. Decision:
In the ATP competition, systems must be sound but may be incomplete and may be bugged.
The soundness of competing systems will be assessed before the competition with specific test
problems. Systems found to be unsound will be excluded from the competition.
A property associated with soundness and completeness is that of stability. If an ATP
system finds a solution to a problem, then the system must be able to find that solution again
if required. ATP systems that simply 'get lucky' are of little use. Repeatability of testing is also
a standard requirement of the scientific method. Decision: For every solution found in the ATP
competition, the solution process must be reproducible by running the system again. If randomness
plays a role, reproducibility must still be ensured, e.g., by using pseudo-random numbers and
recording the seeds.
3.3 Proofs and Satisfiability Checking
There are two distinct classes of problems that may be presented to ATP systems. Firstly
there are problems that require the proof of a theorem, and secondly there are problems that
require satisfiability to be established (via the generation of a model). Both types of problem
are of interest. However, mixing proof performance and satisfiability assessment would blur the
interpretation of competition results. One reason for this blurring is that most ATP systems are
designed for one or the other purpose, but not both (exceptions are, for example, the RAMCEC
algorithm [BCP94] and hyper-linking [LP92]). As a result, a comparison of specialized systems
of the different types is arguable. In the future more dual purpose systems may be developed,
in which case it may not be necessary to divide the work profile for a competition, as is now
the case. Thus the work profile for a competition should not require both theorem proving and
model generation.
Historically, more emphasis has been placed on the ability to find proofs, and therefore this
is considered to be the more important issue (albeit this is not the case in some applications).
: The ATP competition will focus on theorem proving performance. In order to implement
this decision, only theorems will be used (see Section 5.1).
3.4 Proof Objects
Depending on its generality and purpose, there are various responses that an ATP system may
make when given a problem. A proof or a model may be returned, or only an assurance that
a proof or model exists may be given.
There are some ATP systems, e.g., completion based systems, that conserve resources by
not building a proof object during their search. Such systems merely retain enough information
to build the proof object later, if required. Other ATP systems, e.g. model generation systems,
are not able to build a proof object, and can only give an assurance that a proof exists.
There is no evidence that usage of an ATP system as an embedded system typically either
requires or does not require delivery of proof objects or models, and it is desirable to make
the ATP competition accessible to as many ATP systems as possible. Decision : The ATP
competition will not require ATP systems to return proof objects. The soundness testing (see
Section 3.2) will ensure that competing systems do not make invalid claims to have found a
proof. This decision evidently gives some bias towards those systems that do not build a proof
object. This bias is considered to be slight, and justified in terms of extending the scope of the
competition. However, the added functionality of ATP systems that do produce proof objects
should be acknowledged. Decision : In the presentation of the ATP competition results, it will be
noted which of the systems do produce complete proof objects.
3.5 Monolithic and Compositional Systems
Today, a large number of different calculi, inference rules, and proof procedures exist. Ideally,
an ATP system would have all known techniques available, and would, during a particular
solution search, switch back and forth between the most suitable techniques. First steps in this
direction are ATP systems which are formed from a collection of different proof procedures, and
which analyze the given problem in order to decide which procedure or inference rules to use.
A well known example of this type of system is Otter in its autonomous mode [McC94], which
enables or disables inference rules according to a check whether the problem is propositional,
whether it is Horn, and whether it contains equality and/or equality axioms.
An ATP system in which no components are chosen as alternatives to others, based on the
given problem's characteristics, is called a monolithic ATP system. An ATP system that runs
as one of several possible distinct monolithic systems, as determined by the given problem's
characteristics, is called a compositional system. Combining several monolithic systems in a
parallel manner also results in a compositional system. The definition does not limit monolithic
systems to a single calculus or rule of inference, but requires that any switching back and forth
between different calculi and/or rules is done in an integrated way, and occurs continuously
during the proof process 7 .
Compositional systems provide a valuable approach to building more versatile systems, and
compositional systems can be expected to outperform monolithic systems. Conversely, monolithic
systems can be improved by integrating more specialized components. Altogether, both
the construction of compositional systems and of monolithic systems are valuable. Research
into compositional systems will improve knowledge of which approach is best for what problems,
while research into monolithic systems will push the performance of uniform approaches (which
form the core of compositional systems) to the limit 8 . The results may one day lead to a type
of monolithic system which integrates all available techniques. Altogether, the competition
should not put either of these approaches at a disadvantage. Decision : In the ATP competition
there will be two categories: Open, which includes both types of systems, and Monolithic, which
includes only monolithic systems. Any controversy about which category a system belongs to
will be resolved by the competition panel (see Section 7.1).
4 Problem Presentation
4.1 Scope of Logic
Many "hot logics" in ATP research, such as higher order logics, modal logics, and temporal
logics, are very interesting. Sufficient research has been done to support a comparison of ATP
7 Rigid definitions of monolithic and compositional systems seem hardly possible. For any formal definition
made it seems that an ATP system that violates the intuitive notion can be contrived.
8 This issue can also be viewed from the evaluation viewpoint: the goal of evaluating a system is not simply
to see how well it performs, but also to learn why it achieves the observed performance. This is difficult for
compositional systems, and therefore it is desirable to obtain evaluations of their individual components as well.
\Phi \Phi \Phi \Phi \Phi \Phi
1st order
\Phi \Phi \Phi \Phi \Phi \Phi
propositional
non-propositional
no-equality
pure-equality
mixed
unit
non-unit
Figure
2: Classification of 1st order logic problems.
systems within many of these logics, as well as common classical logics. However, a comparison
of ATP systems across logics would be unlikely to make sense, for several reasons: the types of
output and expected performance vary from logic to logic, different logics may have different
semantics, and specific logics may be particularly designed for specific applications (making a
fair problem selection difficult). Thus the problems for the competition should include problems
from any one (but only one) logic.
The wide-spread use of 1st order logic in ATP suggests it as a starting point; specialized
competitions for other logics can still occur in the future. Furthermore, transformation techniques
(e.g., [Ker91, Ohl91]) allow the use of 1st order logic ATP systems for solving problems
in some other logics. Decision : The ATP competition will be restricted to theorems expressed in
classical 1st order logic.
Classical 1st order logic can be subdivided as shown in Figure 2.
The leaves in Figure 2 correspond to syntactically identifiable problem classes, and it is
trivial to determine which class a given problem belongs to. It would be possible to use
problems from all classes together, or to have different competition categories for the classes.
For some of the problem classes specialist ATP systems, that employ the appropriate tech-
niques, exist. Specialist systems can be expected to perform better on problems in their class
than systems not specialized for that class. A best overall ATP system can be built easily
by choosing the best system for each problem class, and using a trivial switch to invoke the
appropriate system. Trivial switch systems are of high interest to users, because they provide
better overall performance than any of their components. For the competition, however, there
is little interest in evaluating the actual switches within such systems, due to their simplicity.
Thus an overall performance evaluation of such systems is not desirable. Instead it is better
to evaluate the component systems separately, and from that conclude the overall performance
achievable by their combination. Decision : Specific problem classes of 1st order logic (according
to the classification above), for which specialist ATP systems exist, should be treated in separate
categories in the ATP competition.
Ideally the ATP competition would have separate categories for all of the problem classes.
However, merging or omitting some classes may still be appropriate.
The development of specialized ATP systems for propositional logic is largely separated from
ATP for non-propositional logic, and there are separate specialized competitions for evaluating
propositional systems 9 . There is no need to duplicate those competitions. Decision : There will
not be a category for propositional problems in the ATP competition.
In the original competition announcement the no-equality and mixed problem classes were
merged, for the following reasons. Firstly, systems that include specialized equality treatment
9 The next such event will be at the "International Competition and Symposium on Satisfiability Testing",
to be held in Beijing, China.
are typically competitive on no-equality problems, and therefore can be evaluated on such
problems. Secondly, a natural formulation of many interesting problems involves equality, and
therefore most state-of-the-art ATP systems include specialized equality treatment. These
motivations indicate that it is acceptable to keep these two classes merged, and it is desirable
for the competition to maintain its announced format. Decision : The no-equality and mixed
problem categories will be combined in the ATP competition.
Most pure equality problems known to the ATP community are written in Clause Normal
Form (see Section 4.3) as unit equality problems. There are specialized unit equality ATP
systems which cannot handle any other format of problem, so it is necessary to have a separate
category for these systems. Decision : There will be a separate category for unit equality problems
in the ATP competition. Non-unit pure equality systems are able to handle no-equality and
mixed problems by translating such problems to pure equality, and are able to compete with
no-equality and mixed systems (even if at a disadvantage, the extent of which is currently
unknown). The small number of commonly known non-unit pure equality problems seems
insufficient for a separate category. Decision : The no-equality, mixed, and non-unit pure equality
problem categories will be combined in the ATP competition 10 .
4.2 Built-in Theories
A theory can be built into an ATP system, rather than expressing it by a set of axioms (e.g.,
equality theory). This approach is chosen in order to provide specialized, and hopefully more
efficient, treatment of that theory. Systems capable of such specialized action should not be put
to a disadvantage by including axioms unnecessary for them. Decision : In the ATP competition,
theory axioms that have been built into an ATP system can be removed from the input to that ATP
system, using an automatic tool.
4.3 Input Language
The problems submitted to an ATP system may be expressed in full First Order Form
or possibly in some constrained subset of 1st order logic, such as clause normal form (CNF).
Therefore the ATP system must, in general, be able to deal with FOF. An examination of
current ATP systems reveals three possible approaches (see Figure 3):
ffl A non-specialized clausifier is used to convert the submitted problems to CNF, and the
ATP system uses the CNF versions of the problems (CNF systems).
ffl A specialized clausifier is prepended to a CNF ATP system, and this combined system
deals with the submitted problems directly (Clausifying systems).
ffl The ATP system does it's processing in FOF, and thus deals with the submitted problems
directly systems).
A comparison of CNF systems and FOF systems is not sensible, as CNF systems are disadvantaged
if FOF problems are used, and FOF systems are disadvantaged if CNF problems are
used. A comparison of FOF systems and clausifying systems is possible using FOF problems,
and a comparison of CNF systems and clausifying systems is possible using CNF problems.
A comparison of CNF systems and clausifying systems would constitute a comparison of
the clausifiers as well as a comparison of the ATP systems' basic theorem proving capabilities.
In future ATP competitions these categories should be separate.
Non-specialized
Clausifier
atomic proof
requests
in FOF
System
CNF
proofs/
models
Clauses
atomic proof
requests
in FOF
System
CNF
Specialized
Clausifier
proofs/
models
proofs/
models
atomic proof
requests
in FOF
FOF
System
Figure
3: Alternative system designs regarding the input language.
This would blur the interpretation of the results. Also, current ATP research is dominated by
CNF systems. There are applications that generate CNF problems directly (e.g., test pattern
generation for electronic circuits). These factors indicate that a CNF competition is particularly
viable. Decision : The ATP competition will use theorems expressed in Clause Normal Form. This
constraint does not exclude the other two types of ATP systems from the competition. However,
such systems will not be able to take advantage of their abilities to deal with FOF problems 11 .
CNF problems can be either Horn or non-Horn, and there are particular techniques designed
for solving each type. In the same way that the different classes of problems shown in Figure 2
are treated separately, ideally Horn and non-Horn problems should be treated separately.
It is not clear what techniques are best for which type of problem. ATP systems for non-Horn
problems can perform well on Horn problems, and some non-Horn problems are handled
well by systems designed for Horn problems. There is no corpus of ATP systems that are
specialized for either type of problem. For switch systems, classifying problems as being Horn
or non-Horn is easy, but selecting superior specialists for either type is not. Decision : Horn and
non-Horn problems will be used together in the ATP competition.
4.4 Clause Type Information.
A clause of a CNF problem may be classified, depending on whether it is part of the conjecture,
part of assumptions made, or part of the underlying theory. This clause type information may
be useful to an ATP system.
In the application of ATP systems such information will typically be available, and therefore
should be used. Decision : Systems may use clause type information in the ATP competition.
11 A competition using FOF problems is planned for the future. Having established the quality of their CNF
ATP systems in this competition, developers will be able to spend time building specialized clausifying programs
ready for a subsequent FOF competition.
4.5 Clause and Literal Orderings.
A possible source of bias in the competition is the particular ordering of the clauses within each
problem, and the literals within clauses.
For system evaluation it is necessary to ensure that pre-tuning (possibly accidental) to a
particular clause or literal order is of no benefit. Decision : In the ATP competition, random
clause and literal orderings will be used. The same clause and literal ordering will be used for all
systems.
5 Problem Selection
5.1 Problem Source
There are several possible sources for the unsatisfiable sets of clauses to be used in the ATP
competition. The competition could use problems supplied by the entrants, could use problems
selected from those commonly used by the ATP community, or could use new problems designed
especially for the competition (there are other options too).
If entrants were to supply the problems, they would almost inevitably supply (pathological)
cases for which their ATP system is particularly effective and that are difficult for other com-
petitors. The problems would not reflect any real work profile of ATP systems, and the ability
of the entrant to make such selections would influence the results. Designing new problems for
the competition would be acceptable, but requires additional effort and could still (unintention-
ally) be biased towards a particular system. Using problems from the ATP community will to
some extent reflect common usage of ATP systems. The TPTP Problem Library [SSY94, SS96]
contains a broad selection of such CNF theorems, as required. Decision : The unsatisfiable sets
of clauses to be used in the ATP competition will be selected from the TPTP problem library 12 .
The tptp2X utility, distributed with the TPTP problem library, will be used to remove
unnecessary equality axioms (see Section 4.2) and to reorder the problem clauses and literals
(see Section 4.5).
The tptp2X utility can be used to produce a pure equality representation of problems for
non-unit pure equality systems (see Section 4.1).
TPTP problems provide clause type information (see Section 4.4). Use of the clause type
information is possible either directly, by reading the TPTP problem, or indirectly, by using
a tptp2X formatting option that takes clause type information into account (see [SS96] for
details).
In principle, knowing the problem source allows problem-specific information to be precomputed
and accessed during the competition (in the extreme, proof look-up). Such activity is
contrary to the purpose of the competition, and is disallowed. Global optimization of an ATP
system for the TPTP is acceptable, because such an optimization seems likely to work well as
a general technique, due to the size and scope of the TPTP.
5.2 Problem Difficulty
The TPTP problem library contains a broad selection of problems in CNF, most of which are
unsatisfiable sets of clauses, as required. Suitably difficult problems must be selected for the
12 In a sense, entrants influence the problem selection by their submission of problems to the TPTP. However,
due to the selection process this constitutes a very weak influence.
competition. The TPTP rating system categorizes problems as follows:
solvable by all state-of-the-art ATP systems
difficult solvable by some state-of-the-art ATP systems
unsolved solvable by no state-of-the-art ATP systems
4 open theorem-hood unknown
Here "state-of-the-art ATP systems" means specialist ATP systems for the class of the
problem, according to an extended version of the classification given in Section 4.1.
Using easy problems would not differentiate sufficiently between systems performances. On
the other hand, each theorem must be provable by at least some of the systems. Decision : The
ATP competition will use TPTP problems with difficulty rating 2.
5.3 Problem Axiomatization
Many of the problems in the TPTP problem library have been taken from publications and
existing problem libraries. Some of the theorems contain only those axioms necessary for a
particular proof, or contain lemmas that assist a proof. Also, the axioms are often selected to
suit a particular ATP system, and are therefore biased towards that system. For each problem
using such a non-standard axiomatization, the TPTP provides a version of the problem using
a standard axiomatization containing all the axioms and no lemmas.
The use of a standard axiomatization is desirable because it reflects the typical initial
situation when formulating a new problem, and also avoids any bias towards a particular
system. Decision : Only standard versions of TPTP problems will be used in the ATP competition.
5.4 Number of Problems
Ideally, each ATP system would be evaluated using all eligible TPTP problems. However, the
limited time and hardware resources available determine a maximal number of problems 13 . At
the same time, a minimal number of problems is necessary for meaningful system evaluation.
The number of problems to be used needs to be determined.
The minimal number of problems will be determined to ensure sufficient confidence (say
85%) that the competition results are the same as would be obtained using all eligible problems.
For an evaluation based on the number of problems solved, as is essentially the case for the
ranking schemes to be used in the ATP competition (see Section 7.3), and assuming a worst
case proportion of problems solved (50%), this is computed by first computing n 0 , the minimal
number assuming an infinite number of eligible problems:
and then adjusting for the actual number of eligible problems as follows [Wad90]. Decision :
The minimal number of problems to be used in the ATP competition will be:
13 A complete evaluation pursued in a larger time frame is an interesting project by itself. Available TPTP
result data for various systems have been collected in [SS95]. These results, however, are difficult to compare,
because they have been obtained under differing constraints and on differing hardware platforms.
min number of problems =
23:04 \Theta number of eligible problems
number of eligible problems
The rating of TPTP problems is currently being completed. From that the number of
eligible problems, and hence the minimal number of problems, will be determined.
The maximal number of problems is determined by the resources available for the competition
(the number of workstations and the total time), the number of ATP systems competing,
and the minimal time limit that can be imposed on each proof attempt (see Section 6.1).
The maximal number of problems to be used in the ATP competition is:
number of problems = number of workstations \Theta time for competition
number of ATP systems \Theta minimal time limit
6 Resource Limits
6.1 Time Resource
Problems may be presented to an ATP system one-at-a-time or in batches. In both cases the
ATP system will have to deliver results within some time limit. Also, the time available for the
competition is limited. It is thus necessary to impose a time limit in the competition, either on
individual proof attempts or on the total time for all proof attempts.
If the problems are presented as a batch and an overall time limit is used, that will allow
the ATP systems to examine all the problems and perform once-only tuning before starting the
proof attempts. In terms of the competition, an overall time limit would simplify the winner
assessment; the system that proves the most theorems within the time limit is the winner, and
if more than one system proves the same number of theorems then the total time taken to prove
those theorems is compared (this ranking scheme has been adapted in Ranking Scheme A in
Section 7.3). In applications of ATP systems, problems are likely to be presented one-at-a-time,
as and when the problems are generated. Even if an ATP system is presented with a batch
of problems, they are likely to be treated individually, again requiring individual time limits
to decide when an unsuccessful attempt to find a solution should be abandoned 14 . Also, an
evaluation based on individual time limits still provides relevant performance information for
the batch case, but not vice versa. Decision : In the ATP competition, a time limit will be imposed
on individual proof attempts.
A minimal time limit is necessary so that the ATP systems spend most (say 95%) of their
time on proof search. This ensures that their deductive capabilities are compared, rather
than their initialization and termination efficiencies. The non-proof time of each ATP system
will be estimated by measuring the time that it takes to prove a trivial theorem, e.g.,
:p. The geometric average of the system's non-proof times will be taken to determine
the non proof time. Then, to ensure that the systems spend 95% of their time searching for a
proof, the minimal time limit = non proof time \Theta 20.
The time limit to be imposed on each proof attempt depends on the resources available for
the competition, the number of ATP systems, and the number of problems (which in turn is
determined by the minimal time limit; see Section 5.4). Decision : The time limit to be imposed
on each proof attempt in the ATP competition will be:
14 Processing all problems on a single processor via multiprogramming would not require imdividual time
limits, but realistically allows only as many proving processes as can fit in memory.
number of workstations \Theta time for competition
number of ATP systems \Theta number of problems
The way that the number of problems is determined in Section 5.4 ensures that
time limit - minimal time limit. In Section 7.2 it is explained that the granularity of timing
will be one second. Thus the minimal non proof time is one second, so time limit -
seconds.
It is important to note that the imposition of a time limit means that the competition
results will have to be viewed as modulo that time limit. A different time limit may produce a
different ranking of the systems. Results could be computed for a range of time limits, up to
the time limit used, and this may give further insight into the relative abilities of the systems.
If the ranking remains stable for a reasonable range of time limits, this provides empirical
evidence that the ranking reflects a time limit independent ranking of the ATP systems. Decision
: The ATP competition results will be plotted as a function of the time limit.
6.2 Hardware and Software Resources
ATP systems have been developed using a wide range of hardware and software resources. The
most commonly used computers in ATP research are UNIX based workstations. Many current
ATP systems do, or can be made to, run on such workstations. Other hardware used includes
PCs, LISP machines, parallel computers, and distributed networks of computers. The ATP
competition could limit itself to the common workstation environment, or could allow the use
of other hardware.
Running all ATP systems on the same hardware allows a direct comparison of the systems,
and is thus the preferred environment for the ATP competition. The host institution of the
competition is able to provide a homogeneous set of UNIX workstations, thus making this
option available. However, some ATP systems have been specially designed for a particular
computer, and cannot easily be ported. The host institution will be unable to supply the range
of specialized hardware that the ATP systems could use. Although a direct comparison of ATP
systems running on widely disparate hardware is not meaningful, performance data from such
systems does allow a comparison of the overall performance from a user's perspective. Since it
would be of interest to the ATP community to see the performance of all systems, ATP systems
that run on specialized hardware need to be catered for in the ATP competition. Decision :
Each of the ATP competition categories will be divided into two subcategories : General Hardware
and Special Hardware. ATP systems in the General Hardware subcategories will all be executed on
the same type of UNIX workstation, as supplied by the host institution. ATP systems in the Special
Hardware subcategories will be allowed to use any hardware brought to the competition or accessible
via the InterNet.
Common languages used to implement ATP systems are C, Prolog, and LISP. Other languages
have also been used. For the ATP competition, the major difference between implementation
languages is whether the code is interpreted, as is often the case for Prolog and LISP,
or compiled to machine code, as for C. ATP systems that run in an interpreted environment
are disadvantaged by the time taken to start up the interpreter, and by the relative slowness
of interpreters compared to compiled code. It would be possible to provide separate categories
for the two types of implementation.
There are some implementation environments that do not fall clearly into one or other of
the two types. Many vendors of Prolog and LISP interpreters also provide compilers, thus
alleviating the problems to at least some extent. Further, it is also important to acknowledge
the effort taken to code an ATP system in a language such as C, and the benefit derived
is competition will not be concerned with the languages used to
implement the ATP systems.
7 System Evaluation
7.1 Winner Assessment
It is arguable if an overall "winner" should be assessed. The reason for this is that potential
entrants may be frightened off by the fact that some other system may be believed to perform
better than theirs. The ATP competition could avoid this problem by simply reporting the
performance data of the ATP systems and allowing observers to draw their own conclusions.
Not determining a winner would leave out much of the spice of the competition, and would
remove much of the motivation for improving the capabilities of current systems 15 . It must be
remembered that the assessment done in the competition will be with respect to the decisions
made in this paper, i.e., the winner may not be the best ATP system in a general sense. Rather,
the ranking will simply provide feedback to potential users about which system is currently the
most adequate for their particular use. An useful byproduct of the competition will be the
charting of the performance data; that may reveal interesting properties of systems that do not
win. Decision : The ATP competition will both determine a specific ranking of the ATP systems
and present a listing of the performance data.
Two possible ways of determining a ranking are to have a quantitative ranking scheme or
to have a judging panel.
A quantitative ranking scheme can be implemented mechanically (as a computer program,
such as the RoboJudge described in [AKK93]) and checked for bias, but has little flexibility.
A judging panel is more flexible, can take into account more aspects, and can impose intuitive
judgment on the results. The benefits of both approaches are desirable. Decision : The ranking
of ATP systems in the ATP competition will be done by quantitatively evaluating system performance
and having that evaluation vetted by a panel of ATP researchers.
7.2 Performance Metrics
There are many criteria by which ATP systems can be evaluated. Issues such as completeness,
soundness, correctness, and proof performance are all of direct interest to ATP researchers.
Soundness (correctness) should be required in-so-far as falsely stating theoremhood of a non-
theorem renders the system untrustworthy, and therefore useless. Completeness plays a role
in-so-far as systems capable of proving more theorems should be ranked higher than systems
proving less. Incomplete systems, systems that fail to find a proof due to resource constraints,
and those that crash because they are bugged must be compared (see Section 3.2). Proof
performance can be measured in many ways, including runtime, number of inference steps
(proof size), and proof tree depth (if proofs are represented as trees). In the broader context of
computing science, issues such as software quality (portability, modularity), user friendliness,
execution environment, etc., may also be of interest. It is necessary to decide what criteria
should be used to evaluate the ATP systems in the ATP competition.
Would you train hard for the Olympics if you could not stand on a pedestal when you won?
The panel will consist of Peter Andrews, Alan Bundy, and Jeff Pelletier.
The broader issues of computer science are of lesser interest to the ATP community, and
factoring them into the evaluation would blur the focus on ATP. Also, no generally accepted
metrics exist for the broad issues, and evaluation would become a matter of taste. Decision :
The ATP competition will evaluate the ATP systems in terms of issues directly relevant to the ATP
community.
The quantitative ranking scheme needs to observe performance metrics of the ATP systems,
and combine those values to produce a ranking of the systems. Quantitative performance
metrics available for evaluation are:
ffl Calculus-relative measures
number of inferences performed (ideally split according to the inference rules used)
number of unifications performed (ideally split into failed and succeeded unifications)
proof size (e.g., length, depth)
ffl Absolute measures
number of problems solved
runtime (possibly split into startup time and search time)
memory usage
For the purposes of the ATP competition the measures used must be independent of the
ATP systems, so that values can be meaningfully compared. Measures such as the number
of inference steps and proof length are not suitable because the units of measure can vary
from calculus to calculus, and from implementation to implementation. System independent
measures that are readily obtained are the number of problems solved, runtime, and memory
usage.
The number of problems solved and the runtime are direct indicators of the quality of an
ATP system. Memory usage is important in so far as it can affect runtime. If an ATP system
requires less than the available memory, then the effect on runtime is negligible. If an ATP
system requires more than the available memory, then either the system cannot handle the
problem, or swapping increases the wall-clock time of the computation. Therefore the effect of
memory usage can be subsumed in a proper definition of runtime. Decision : The number of
problems solved and the runtime will be used for winner assessment in the ATP competition. The
memory usage will also be recorded and presented.
The are two reasonable ways of measuring runtime: CPU time taken, and wall-clock time
taken. The advantage of CPU time is that it is easy to measure and it is independent of
system influences such as external load, daemon processes, memory size, disc performance.
However, CPU time seems inappropriate if swapping occurs because it does not reflect the
user's perception of the runtime. Wall-clock time takes swapping into account, but is dependent
on system influences, and therefore can be difficult to measure in a reproducible manner. From
the developer's viewpoint, CPU time is more interesting. From the user's viewpoint, wall-clock
time is more relevant. Decision : For runtime, both CPU time and wall-clock time will be measured
and reported in the ATP competition.
In the General Hardware category, the choice of which time measurement is used for winner
assessment will depend on the computing environment. If no swapping occurs then: Decision :
In the General Hardware category CPU time will be used for winner assessment. If swapping does
occur, and the wall-clock time measurements are stable and representative of the time required
for the computation (essentially CPU time plus time required for swapping), then: Decision :
time will be used for winner assessment. Otherwise: Decision : CPU time plus an
estimate of the swapping time will be used for winner assessment.
In the Special Hardware category CPU timings are typically incomparable. In contrast,
wall-clock times can be compared, in the context of the hardware used. Decision : In the Special
Hardware category wall-clock time will be used for winner assessment.
The precision of time measurement on a computer system is limited. In order to reduce the
effect of this, and to emphasize significant rather than marginal differences, the competition
timing will be discrete. Decision : In the ATP competition timing will be done in units of one
second. In particular, the minimal time a system can take to find a proof is one second.
7.3 Ranking Schemes
The ATP competition must have a ranking scheme that combines the performance metrics to
produce a ranking of the ATP systems. The ranking scheme must have certain properties:
Monotonicity requirements:
ffl The ranking improves as the number of problems solved increases.
ffl The ranking improves as the time taken to solve the problems decreases.
Required invariants:
ffl For systems that solve the same number of problems, the one that takes the least time
to solve them obtains a better ranking.
ffl For systems that take the same amount of time, the one that solves the most problems
obtains a better ranking.
ffl Systems which solve the same number of problems in the same total amount of time
obtain the same ranking.
The issue of how to combine the performance metrics to obtain a ranking scheme is a
contentious one. Two different quantitative schemes for determining a system ranking, representing
different emphases between number of problems solved and time taken, have been
developed. For both schemes higher scores are better. Both schemes use the total time takenas
a parameter. This value is the sum of the time taken over all problems, including those for
which no proof is found, in which case the time limit is used.
Ranking Scheme A. This ranking scheme focusses on the ability to find as many solutions
as possible. The idea is to rank the systems according to the number of problems solved, and
to further differentiate by considering the number of erroneous claims that no proof exists, the
number of system errors, and the runtime. Since for erroneous claims and system errors the full
time limit is used as system runtime, considering only the runtime accounts for all the latter
issues. Thus, each system is given a score:
number of problems solved \Gamma
total time taken \Gamma best total time taken
where best total time taken = least total time taken by a system that solves the same number of
problems, and number of problems \Theta time limit. Achievable scores range
from 0 to the number of theorems.
Ranking Scheme B. This scheme measures solutions per unit time. Each system is given a
score:
number of problems solved
total time taken
Achievable scores range from 0 to 1.
The schemes place different emphasis on the two performance metrics: scheme A puts
emphasis on the number of problems solved while scheme B balances the emphasis. This
difference can lead to different rankings of ATP systems. Under scheme A a system which
solves the most problems will win, while under scheme B this is not necessarily so. Each
ranking scheme suits specific user requirements, and thus neither can be ignored. Decision : In
the ATP competition, in each competition category a winner according to Scheme A and a winner
according to Scheme B will be determined. As well as the scheme specific rankings, an overall
assessment is desirable. However, any attempt to combine the scores from Schemes A and
requires a trade-off between the two metrics: number of problems solved and time taken.
Any particular trade-off is unlikely to be acceptable to everyone. However, if a particular ATP
system is the winner in both schemes, then it is superior in terms of both performance metrics.
In the ATP competition, iff a single system is the winner of a category according to both
Schemes A and B, it will be the overall winner of the category.
Note: If only one ATP system is registered for a particular category, no winner will be
announced for that category, but the results for that system will still be presented.
Example. The example in Table 2 gives some system runtime values ("-" denotes an unsolved
problem). The example is designed to illustrate the differences between the schemes, to the
extent that each scheme produces a different ranking of the systems. It also shows the scores
and rankings that are produced by the different schemes, assuming that time limit = 20.
System Runtime for problem Scores by scheme Ranking by scheme
2. 1.
2.
Table
2: Example showing the runtimes of three different systems on five different problems
and the unscaled scores and rankings produced by the ranking schemes.
8 Conclusion
From the numerous issues that need to be resolved for organizing a useful competition, and
the impossibility of making an indisputable decision in several cases, it becomes clear that
alternative competition designs are possible. However, we believe that this rationally planned
competition will provide most of the benefits hoped for in Section 1.
We see a clear potential for improved future competitions, by extending their scope; additional
coverage of FOF systems (instead of just CNF systems) and model generation (instead
of just theorem proving) are the most important issues. However, it seems preferable to start
with a core design for a competition, and to add such extensions when more experience has
been gained.
After more than 30 years of research, automated theorem proving abounds with techniques
developed and ideas proposed. The future requires that these techniques and ideas be evaluated
to determine which are viable, and to integrate them into systems which are far more flexible
than the simple monolithic and compositional systems available today. The most important
challenge ahead in theorem proving research will be to provide adequate control, a subject still
in its infancy, since it is difficult to approach theoretically.
For all these goals, system evaluation is a crucial research tool, and competitions such as
this one will provide stimulus and insight that can lay the basis for the development of future
ATP systems.
Acknowledgments
. We are indebted to many researchers who discussed and commented
on our ideas; especially Alan Bundy, Bertram Fronh-ofer, Reinhold Letz, Bill McCune, David
Plaisted, and Christoph Weidenbach.
--R
The Internet Programming Contest: A Report and Philosophy.
Measuring the Performance of Automated Theorem Provers.
Proving First-Order Equality Theorems with Hyper-Linking
A Method for Building Models Automati- cally
A Theorem Prover for a Computational Logic.
Implementing Mathematics with the Nuprl Proof Development System.
The 4th DIMACS Interantional Algorithm Implementation Challenge.
Semantically Guided First-order Theorem Proving using Hyper-linking
The ACM Scholastic Programming Contest - <Year>1977</Year> to <Year>1990</Year>
The 2nd Annual Prolog Programming Contest.
Search Space and Proof Complexity of Theorem Proving Strategies
IMPS: An Interactive Mathematical Proof System.
Introduction to HOL
Controlled Experimentation and the Design of Agent Architectures.
Tactical Theorem Proving in Program Verification.
How to Prove Higher Order Theorems in First Order Logic.
On the Polynomial Transparency of Resolution.
Eliminating Duplication with the Hyper-Linking Strat- egy
OTTER 3.0 Reference Manual and Guide.
3 Inductive Learning Com- petitions
The 24th ACM International Computer Chess Championship.
Based Translation Methods for Modal Logics.
PVS: A Prototype Verification System.
The CADE-11 Competitions: A Personal View
The Next 700 Theorem Provers.
The Philosophy of Automated Theorem Proving.
The Search Efficiency of Theorem Proving Strategies.
Automated Advice in Fitch-style Proof Construction
Theorem Proving in Interactive Verification Systems
Efficient Model Generation through Compilation.
ATP System Results for the TPTP Problem Library (upto TPTP v1.
The TPTP Problem Library (TPTP v1.
The TPTP Problem Library.
Handbook of Statistical Methods for Engineers and Scientists.
RVF: An Automated Formal Verification System.
Automated Reasoning Contributes to Mathematics and Logic.
--TR
--CTR
Geoff Sutcliffe , Christian Suttner, The Procedures of the CADE-13 ATP System Competition, Journal of Automated Reasoning, v.18 n.2, p.163-169, April 1997
Geoff Sutcliffe , Christian Suttner, The Results - of the CADE-13 ATP System Competition, Journal of Automated Reasoning, v.18 n.2, p.271-286, April 1997
Francis Jeffry Pelletier , Geoff Sutcliffe , Christian Suttner, Conclusions about the CADE-13 ATP System Competition, Journal of Automated Reasoning, v.18 n.2, p.287-296, April 1997
G. Sutcliffe , C. B. Suttner, The CADE-15 ATP System Competition, Journal of Automated Reasoning, v.23 n.1, p.1-23, July 1999
Francis Jeffry Pelletier , Geoff Sutcliffe , Christian Suttner, The development of CASC, AI Communications, v.15 n.2, p.79-90, September 2002
Francis Jeffry Pelletier , Geoff Sutcliffe , Christian Suttner, The development of CASC, AI Communications, v.15 n.2,3, p.79-90, August 2002
G. Sutcliffe, The CADE-17 ATP System Competition, Journal of Automated Reasoning, v.27 n.3, p.227-250, October 2001
Geoff Sutcliffe, The CADE-16 ATP System Competition, Journal of Automated Reasoning, v.24 n.3, p.371-396, April 2000
Christian Suttner , Geoff Sutcliffe, The CADE-14 ATP System Competition, Journal of Automated Reasoning, v.21 n.1, p.99-134, August 1998 | automated theorem proving;competition;design |
594200 | The TPTP Problem Library. | This paper provides a detailed description of the CNF part of the TPTP Problem Library for automated theorem-proving systems. The library is available via the Internet and forms a common basis for development and experimentation with automated theorem provers. This paper explains the motivations and reasoning behind the development of the TPTP (thus implicitly explaining the design decisions made) and describes the TPTP contents and organization. It also provides guidelines for obtaining and using the library, summary statistics about release v1.2.1, and an overview of the tptp2X utility program. References for all the sources of TPTP problems are provided. | Introduction
This paper describes the TPTP (Thousands of Problems for Theorem Provers)
Problem Library. The TPTP is a library of problems for automated theorem
proving (ATP) systems, for 1st order logic. The TPTP is comprehensive, and
thus provides an overview, and a simple, unambiguous reference mechanism for
problems. All problems in the TPTP are presented in an unambiguous
format, and automatic conversion to other known ATP formats is provided.
The principal motivation for this project is to move the testing and evaluation
of ATP systems from the present ad hoc situation onto a firm footing. This
is necessary, as results currently being published seldom provide an accurate
reflection of the intrinsic power of the ATP system being considered. A common
library of problems is necessary for meaningful system evaluations, meaningful
system comparisons, repeatability of testing, and the production of statistically
significant results. Guidelines for using TPTP problems and presenting results
are given in Section 4.2.
1.1 State of the Art
A large number of interesting problems have accumulated over the years in the
ATP community. Besides publishing particularly interesting individual problems,
from early on researchers have collected problems in order to obtain a basis
for experimentation. The first major publication 3 in this regard was [MOW76],
3 The first circulation of problems for testing theorem provers to our knowledge is due
to L. Wos in the late sixties.
which provides an explicit listing of clauses for 63 problems, many of which are
still relevant today. In the same year Wilson and Minker [WM76] tested six
resolution strategies on a collection of 86 named problems. The problem clauses
are not supplied in [WM76], however. A second major thrust was provided by
[Pel86], which lists 75 problems. Other more recent collections are [BLM
[Qua92a], [MW92], and [McC93], to name a few. Also, the Journal of Automated
Reasoning's Problem Corner regularly provides interesting challenge problems.
However, problems published in hardcopy form are often not suitable for testing
ATP systems, because they have to be transcribed to electronic form. This is
a cumbersome, error-prone process, and is feasible for only very small numbers
of problems. A problem library in electronic form was made publicly available
by Argonne National Laboratories (Otter format, [McC90]) in 1988 [ANL]. This
library has been a major source of problems for ATP researchers. Other electronic
collections of problems are available, but have not been announced officially (e.g.,
that distributed with the SPRFN ATP system [SPR]). Although some of these
collections provide significant support to researchers, and formed the early core
of the TPTP library, none (with the possible exception of the ANL library) was
specifically designed to serve as a common basis for ATP research. Rather, these
collections typically were built in the course of research into a particular ATP
system. As a result, there are several factors that limit their usefulness as a
common basis for research. In particular, existing problem collections are often:
- hard to discover and obtain,
- limited in scope and size,
outdated,
- formatted and tuned for a particular ATP system,
- inconsistent in their presentation of equally named problems,
- provided without a regular update service for new problems,
- provided without a reliable error correction service.
As a consequence, several problems arise. Firstly, system development and
system evaluations typically rely on a limited range of problems, depending on
the collections of problems available to the researcher. Secondly, the presentation
format used in a collection may not be appropriate for the desired purpose,
and a comparatively large effort is required just to make the problems locally
usable (which in practice often means that such a collection of problems is simply
ignored). Thirdly, using a particular collection may lead to biases in results,
because the problems have been designed and tuned specifically for a particular
ATP system. Fourthly, the significance and difficulty of a problem, with respect
to the current state-of-the-art in ATP systems, is hard to assess by newcomers
to the field. Existing test problems are often not adequate anymore (e.g.,
Schubert's Steamroller [Sti86]), while others may be solvable only with specialized
techniques (e.g., LIM+ [Ble90]) and therefore are much too hard to start
with. Finally, many copies and variants of the same "original" problem may exist
in different libraries. Coupled with a lack of documentation, this means that
unambiguous identification of problems, and therefore a clear interpretation of
performance figures for given problems, has become difficult.
The problem of meaningfully interpreting results is even worse than indi-
cated. Commonly a few problems are selected and hand-tuned (clauses and literals
are arranged in a special order, irrelevant clauses are omitted, lemmas are
added in, etc) specifically for the ATP system being tested. However, the presentation
of a problem can significantly affect the nature of the problem, and
changing the clauses clearly makes a different problem altogether. Nevertheless
the problem may be referenced under the same name as it was presented else-
where. As a consequence the experimental results reveal little. Some researchers
avoid this ambiguity by listing the clause sets explicitly. But obviously this usually
cannot be done for a large number of problems or for large individual prob-
lems. The only satisfactory solution to these issues is a common and stable
library of problems, which the TPTP provides.
1.2 What is Required?
The goal for building the TPTP has been to overcome the current drawbacks,
and to centralize the burden of problem collection and maintenance to one place.
The TPTP tries to address all relevant issues. In particular, the TPTP
- is available by anonymous ftp.
The TPTP is thus easily available to the research community. Awareness of
the TPTP is assured by extensive formal and informal announcements.
- spans a diversity of subject matters.
This reduces biases in the development and testing of theorem provers, which
arise from the use of a limited range of problems. It also provides an overview
of the domains that ATP is used in. The significance of each domain may be
measured by the number of problems available.
- is large enough for statistically significant testing.
In contrast to common practise, an ATP system should be evaluated over
a large number of problems, rather than a small set of judiciously selected
examples. The large size of the TPTP makes this possible.
- is comprehensive and up-to-date.
The TPTP contains all problems known to the community.There is no longer
a need to look elsewhere.
- is presented in a well structured and documented format.
All problems in the TPTP are presented in an unambiguous format. Automatic
conversion to other known formats is provided, thus eliminating the
necessity for transcription. The design and arrangement of the problems is
independent of any particular ATP system.
- provides a common, independent, source for problems.
This provides unambiguous problem reference, and makes the comparison of
results meaningful.
contains problems varying in difficulty, from very simple problems through
to open problems.
This allows all interested researchers, from newcomers to experts, to rely on
the same problem library.
provides statistics for each problem and for the library as a whole.
This gives information about the syntactic nature of the problems.
- will provide a rating for the difficulty of each problem.
This is important for several reasons: (1) It simplifies problem selection according
to the user's intention. (2) It allows the quality of an ATP system to
be judged. (3) Over the years, changes in the problem ratings will provide
an indicator of the advancement in ATP. The problem ratings are currently
being worked on, and will be part of a future TPTP release.
documents each problem.
This contributes to the unambiguous identification of each problem.
- provides standard axiomatizations that can be used in new problems.
This simplifies the construction of new problems.
- is a channel for making new problems available to the community, in a simple
and effective way.
- removes the necessity for the duplicated effort of maintaining many libraries.
specifies guidelines for its use for evaluating ATP systems.
As the TPTP is a standard library of problems, it is possible to set ATP
evaluation guidelines which make reported results meaningful. This will in
turn simplify and improve system comparisons, and allow ATP researchers
to accurately gauge their progress.
The TPTP problem library is an ongoing project, with the aim to provide
all of the desired properties.
Current Limitations of the TPTP. The current version of the TPTP library
is limited to problems expressed in 1st order logic, presented in clause normal
form. In particular, there are no problems for induction and nonclassical theorem
proving. However, see Section 5 for upcoming and planned extensions.
2 Inside the TPTP
Scope. Release v1.0.0 of the TPTP contains 1577 abstract problems, which
result in 2295 ATP problems, due to alternative presentations (see Section 2.2).
Tables
1, 2, and 3 provide some statistics about release v1.0.0 of the TPTP.
The problems have been collected from various sources. The two principal
sources have been existing problem collections and the ATP literature. Other
sources include logic programming, mathematics, puzzles, and correspondence
with ATP researchers. Many people and organizations have contributed towards
the TPTP. In particular, the foundations of the TPTP were laid with David
Plaisted's SPRFN collection [SPR]; many problems have been taken from Argonne
National Laboratory's ATP problem library [ANL] (special thanks to Bill
McCune here); Art Quaife has provided several hundred problems in set theory
and algebra [Qua92b]; the Journal of Automated Reasoning, CADE Proceedings,
Table
1. Statistics on the TPTP.
Number of problem domains 23
Number of abstract problems 1577
Number of problems 2295
Number of non-Horn problems 1449 (63%)
Number of problems with equality 1805 (79%)
Number of propositional problems 111 (5%)
being non-Horn 56 (50%)
Total number of clauses 322156
Total number of literals 970456
Table
2. Statistics for non-propositional TPTP problems.
Measure Minimum Maximum Average Median
Number of clauses 2 6404 124 68
Percentage of non-Horn clauses 0% 99% 6% 4%
problems 0% 99% 9% 4%
Percentage of unit clauses 0% 100% 32% 22%
Number of literals 2 18966 276 162
Percentage of equality literals 0% 100% 47% 47%
problems 4% 100% 57% 47%
Number of predicate symbols 1 4042 12 4
Number of function symbols 0 94
Percentage of constants 0% 100% 46% 33%
Number of variables 0 32000 311 271
Percentage of singletons 0% 100% 6% 7%
Maximal clause size 1 25 4 5
Maximal term depth
Table
3. Statistics for propositional TPTP problems.
Measure Minimum Maximum Average Median
Number of clauses 2 8192 444 36
Percentage of non-Horn clauses 0% 99% 20% 1%
problems 1% 99% 40% 45%
Percentage of unit clauses 0% 100% 16% 1%
Number of literals 2 106496 3303 132
Number of predicate symbols 1 840 69 13
Maximal clause size 1 21 5 3
and Association for Automated Reasoning Newsletters have provided a wealth
of material; smaller numbers of problems have been provided by a number of
further contributors (see also the Acknowledgements at the end of Section 5).
The problems in the TPTP are syntactically diverse, as is indicated by the
ranges of the values in Tables 2 and 3. The problems in the TPTP are also semantically
diverse, as is indicated by the range of domains that are covered.
The problems are grouped into 23 domains, covering topics in the fields of logic,
mathematics, computer science, and more. The domains are presented and discussed
in Section 2.1.
Releases. The TPTP is managed in the manner of a software product, in the
sense that fixed releases are made. Each release of the TPTP is identified by a
release number, in the form v!Version?.!Edition?.!Patchlevel?. The Version
number enumerates major new releases of the TPTP, in which important new
features have been added. The Edition number is incremented each time new
problems are added to the current version. The Patch level is incremented each
time errors, found in the current edition, are corrected. All changes are recorded
in a history file, as well as in the file for an affected problem.
2.1 The TPTP Domain Structure
An attempt has been made to classify the totality of the TPTP problems in
a systematic and natural way. The resulting domain scheme reflects the natural
hierarchy of scientific domains, as presented in standard subject classification
literature. The current classification is based mainly on the Dewey Decimal
Classification [Dew89] and the Mathematics Subject Classification used for the
Mathematical Reviews by the American Mathematical Society [MSC92]. We define
four main fields: logic, mathematics, computer science, and other. Each field
contains further subdivisions, called domains. These TPTP domains constitute
the basic units of our classification. The full classification scheme is shown in
Figure
1.
2.2 Problem Versions and Standard Axiomatizations.
There are often many ways to formulate a problem for presentation to an ATP
system. Thus, in the TPTP, there are often alternative presentations of a prob-
lem. The alternative presentations are called versions of the underlying abstract
problem. As the problem versions are the objects that ATP systems must deal
with, they are referred to simply as problems, and the abstract problems are
referred to explicitly. Each problem is stored in a separate physical file. The primary
reason for different versions of an abstract problem is the use of different
axiomatizations. This issue is discussed below. A secondary reason is the use of
different formulations of the theorem to be proven.
TPTP Logic
Mathematics
Computer science
Other
Combinatory logic
Logic calculi
Henkin models
Theory
Graph Theory
Algebra Boolean Algebra
Robbins Algebra
distributive
Lattices
Groups
Rings
General Algebra
Number Theory
Topology
Analysis
Geometry
Category theory
Computing Theory
Planning
Program Verification
Syntactic
Puzzles
Miscellaneous
COL
HEN
GRA
BOO
ROB
LDA
GRP
ALG
NUM
ANA
GEO
COM
PLA
PUZ
MSC
# of Problems
abs. / vers.
284 / 321
Fig. 1. The domain structure of the TPTP.
Different axiomatizations. Commonly, different axiomatizations of a theory
exist, and, in general, most are equally acceptable. In the TPTP an axiomatization
is acceptable if it is complete (in the sense that it captures some closed
theory) and it has not had any lemmas added. Such axiomatizations are called
standard axiomatizations. Within the ATP community some problems have been
created with non-standard axiomatizations. An axiomatization is non-standard
if it has been reduced (i.e., axioms have been removed) and the result is an incomplete
axiomatization, or if it has been augmented (i.e., lemmas have been added)
and the result is a redundant axiomatization. Non-standard axiomatizations are
typically used to find a proof of a theorem (based on the axiomatization) using a
particular ATP system. In any 'real' application of an ATP system, a standard
axiomatization of the application domain would typically have to be used, at
least initially. Thus the use of standard axiomatizations is desirable, because it
reflects such 'real' usage. In the TPTP, for each collected problem that uses a
non-standard axiomatization, a new version of the problem is created with a
standard axiomatization. The standard axiomatization is created by reducing or
augmenting the non-standard axiomatization appropriately.
The standard axiomatizations used in the TPTP are kept in separate axiom
files, and are included in problems as appropriate. If an axiomatization uses
equality, the required axioms of substitution are kept separate from the theory
specific axioms. The equality axioms of reflexivity, symmetry, and transitivity,
which are also required when equality is present, are also kept separately, as they
are often used independently of the substitution axioms.
2.3 Problem and Axiomatization Naming
Providing unambiguous names for all problems is necessary in a problem library.
A naming scheme has been developed for the TPTP, to provide unique, stable
names for abstract problems, problem versions, and axiomatizations. File names
are in the form DDDNNN-V[MMM].p for problem files, and DDDNNN-E.TT
for axiom files. DDD is the domain name abbreviation, NNN is the index within
the domain, V is the version number, MMM is an optional generation parameter,
E is the axiomatization extension number, .p indicates a problem file, and TT
is either .ax for theory specific axioms or .eq for equality substitution axioms.
The complete file names are unique within the TPTP.
Abstract problems and axiomatizations have also been allocated semantic
names. The semantic names can be used to augment file names, so as to give an
indication of the contents. While these names are provided for users who like to
work with mnemonic names, only the standard syntactic names are guaranteed
to provide unambiguous reference. The semantic names are formed from a set of
specified abbreviations. The semantic names can be added to the syntactic file
names using a script that is provided.
2.4 Problem Presentation
The physical presentation of the TPTP problem library is such that ATP researchers
can easily use the problems. The TPTP file format, for both problem
files and axiom files, has three main sections. The first section is a header section
that contains information for the user. The second section contains include instructions
for axiom files. The last section contains the clauses that are specific
to the problem.
The syntax of the problem and axiom files is that of Prolog. This conformance
makes it trivial to manipulate the files using Prolog. All information in the files
that is not for use by ATP systems is formatted as Prolog comments, with a
leading %. All the information for ATP systems is formatted as Prolog facts. A
utility is provided for converting TPTP files to other known ATP system formats
(see Section 3). A description of the information contained in TPTP files is given
below. Full details are given in [SSY93].
The Header Section
The header contains information about the problem, for the user. It is divided
into four parts. The first part identifies and describes the problem. The second
part provides information about occurrences of the problem. The third part
gives the problem's ATP status and a table of syntactic measurements made
on the problem. The last part contains general information about the problem.
An example of a TPTP header, extracted from the problem file GRP039-7.p, is
shown in Figure 2.
Released v0.0.0, Updated v0.11.5.
Theory (Subgroups)
Subgroups of index 2 are normal
O is a subgroup of G and there are exactly 2 cosets in
% G/O, then O is normal [that is, for all x in G and y in O,
% x*y*inverse(x) is back in O].
Problems and
Experiments for and with Automated Theorem Proving Programs
IEEE Transactions on Computers C-25(8), 773-782.
% Number of literals :
% Number of predicate
% Number of function
% Number of variables : 42 ( 0 singletons)
Maximal clause size : 4
Maximal
Comments : element-in-O2(A,B) is A-1.B. The axioms with
force index 2.
fixed.
Fig. 2. Example of a problem file header (GRP039-7.p).
The header fields contain the following information:
- The % File field contains the problem's syntactic and semantic names, the
TPTP release in which the problem first appeared, and the TPTP release
in which the problem was last updated.
- The % Domain field identifies the domain from which the problem is drawn.
- The % Problem field provides a one line, high-level description of the abstract
problem.
- The % Version field gives information that differentiates this version of the
problem from other versions of the problem.
- The % English field provides a full description of the problem if the one line
description is too terse.
- The % Refs field provides a list of references to items in which the problem
has been presented.
- The % Source field acknowledges, with a citation, where the problem was
(physically) obtained from.
- The % Names field lists existing known names for the problem (as it has been
named in other problem collections or the literature).
- The % Status field gives the problem's ATP status 4 , one of satisfiable,
unsatisfiable, open, or broken.
- The % Syntax field lists various syntactic measures of the problem's clauses.
- The % Comments field contains free format comments about the problem.
- The % Bugfixes field documents any changes which have been made to the
clauses of the problem.
The Include Section
The include section contains include instructions for TPTP axiom files. An
example of an include section, extracted from the problem file GRP039-7.p, is
shown in Figure 3.
%-Include the axioms of equality
include('Axioms/EQU001-0.ax').
%-Include the equality axioms for group theory in equality form
include('Axioms/GRP004-0.ax').
%-Include the subgroup axioms in equality formulation
include('Axioms/GRP004-1.ax').
Fig. 3. Example of a problem file include section (GRP039-7.p).
Each of the include instructions indicates that the clauses in the named
axiom file should be included at that point. Axiom files are presented in the
same format as problem files, and include instructions may also appear in
axiom files. Full versions of TPTP problems (without include instructions) can
be created by using the tptp2X utility (see Section 3).
4 This field has not yet been filled in all problems of the TPTP.
The Clauses Section
TPTP problems are presented in clausal normal form. The literals that make
up a clause are presented as a Prolog list of terms. Each literal is a term whose
functor is either ++ or -, indicating a positive or negative literal respectively.
The single argument of the sign, i.e., the atom of the literal, is a Prolog term.
The signs ++ and - are assumed to be defined as prefix operators in Prolog.
Each clause has a name, in the form of a Prolog atom. Each clause also has
a status, one of axiom, hypothesis, or theorem. The hypothesis and theorem
clauses are those that are derived from the negation of the theorem to be proved.
The status hypothesis is used only if the clauses can clearly be determined as
status is theorem. The name, status, and literal list of each
clause are bundled as the three arguments of a Prolog fact, whose predicate
symbol is input clause. These facts are in the clauses section of the problem
file.
Two examples of clauses, extracted from the problem file GRP039-1.p, are
shown in Figure 4.
%-Definition of subgroup of index 2
input-clause(an-element-in-O2,axiom,
++subgroup-member(A)]).
input-clause(prove-d-is-in-subgroup,theorem,
[-subgroup-member(d)]).
Fig. 4. Examples of problem file clauses (GRP039-1.p).
2.5 Physical Organization
The TPTP is physically organized into five subdirectories:
- The Problems directory contains a subdirectory for each domain, as shown
in
Figure
1. Each subdirectory contains the problem files for that domain.
- The Axioms directory contains the axiom files.
- The TPTP2X directory contains the tptp2X utility, described in Section 3.
- The Scripts directory contains some useful C shell scripts.
- The Documents directory contains comprehensive online information about
the TPTP, in specific files. This provides quick access to relevant overview
data. In particular, it provides a simple means for selecting problems with
specific properties, by using standard system tools (e.g., grep, awk).
3 The tptp2X Utility
The tptp2X utility converts TPTP problems from the TPTP format to formats
used by existing ATP systems. Currently, the tptp2X utility supports the following
output formats:
- the MGTP format [FHKF92];
- the Otter .in format [McC90] (the set of support and inference rules to be
used are also specified, and are included in the output file);
- the PTTP format [Sti84];
- the SETHEO .lop format [STvdK90];
- the SPRFN format [Pla88];
- the TPTP format, substituting include instructions with the actual clauses.
It is simple to add new formatting capabilities to the tptp2X utility. The tptp2X
utility can also be used to rearrange the clauses and literals in a problem. This
facilitates testing the sensitivity of an ATP system to the order in which the
clauses and literals are presented. Full details of the tptp2X utiltity are given in
[SSY93].
4 You and the TPTP
4.1 How to FTP the TPTP
The TPTP can be obtained by anonymous ftp from the Department of Computer
Science, James Cook University, or the Institut f?r Informatik, Technische Uni-
versit-at M-unchen. The ftp hosts are coral.cs.jcu.edu.au (137.219.17.4) and
flop.informatik.tu-muenchen.de (131.159.8.35), respectively. At both sites
the TPTP is in the directory pub/tptp-library. There are three files. Information
about the TPTP is in the ReadMe file (9.3 KByte), a technical report
[SSY93] is in TR-v1.0.0.ps.Z (357 KByte), and the library itself is packaged
in TPTP-v1.0.0.tar.Z (2.4 MByte). Please read the ReadMe file, as it contains
up-to-date information about the TPTP.
4.2 Important: Using the TPTP
By providing this library of ATP problems, and a specification of how these
problems should be presented to ATP systems, it is our intention to place the
testing, evaluation, and comparison of ATP systems on a firm footing. For this
reason, you should abide by the following conditions when using TPTP problems
and presenting your results:
- The specific version, edition, and patch level of the TPTP, used as the problem
source, must be stated (see the introduction of Section 2).
Each problem must be referenced by its unambiguous syntactic name.
may be added/removed without explicit notice. (This
holds also for removing equality axioms when built-in equality is provided
by the prover.)
- The clauses/literals may not be rearranged without explicit notice. If clause
or literal reversing is done by the tptp2X utility, the reversals must be explicitly
noted.
- The header information in each problem may not be used by the ATP system
without explicit notice. Any information that is given to the ATP system,
other than that in the input clauses, must be explicitly noted (including
any system switches or default settings).
Abiding by these rules will allow unambigous identification of the problem,
the arrangement of clauses, and further input to the ATP system which has been
used.
5 Present and Future Activity
5.1 The Present
Users' experiences with the TPTP will tell if we have achieved the design goals
described in Section 1, except for the problem ratings. The problem ratings are
currently being worked on. Note that these ratings should decrease as advances
in automated theorem proving are made. Therefore the long term maintenance
of the individual problem ratings will provide an objective measure of progress
in the field.
An upcoming addition to the TPTP is a set of Prolog programs for generating
arbitrary sizes of generic problems (e.g., the "pigeon holes" problem). This will
implicitly provide any size of such problems, and also reduce the physical size of
the TPTP. These programs are being worked on. In order to ensure the usability
of the programs, they will be tested on a public domain Prolog.
The tptp2X utility will soon be modified to be capabile of applying arbitrary
sequences of transformations to problems. The transformations will include
those currently in tptp2X, and others that become available (e.g., Mark
Stickel has provided a transformation for his upside-down meta-interpretation
approach [Sti94]). Automatic removal of equality axioms will also be provided,
to ease the life of researchers whose ATP systems have built in mechanisms for
equality reasoning.
5.2 The Future
We have several short and long term plans for further development of the TPTP.
The main ideas are listed here.
Performance tables for popular ATP systems.
Extensive experimental results, for publically available ATP systems, are
currently being collected (based on all the TPTP problems). These will be
published in some form.
- ATP system evaluation guidelines.
General guidelines outlining the requirements for ATP system evaluation
will be produced.
- The BSTP Benchmark Suite.
A benchmark suite (the BSTP) will be selected from the TPTP. The BSTP
will be a small collection of problems, and will provide a minimal set of
problems on which an ATP system evaluation can be based. The BSTP will
be accompanied by specific guidelines for computing a performance index
for an ATP system.
Full 1st order logic.
The TPTP will be extended to include problems in full 1st order logic no-
tation. ATP systems with automatic conversion to clausal form then can
derive additional information regarding the problem, such as which functors
are Skolem functors.
- Various translators.
Translators between various logical forms will be provided.
ffl from full 1st order logic to clausal normal form
ffl from non-Horn to Horn form
ffl from 1st order to propositional form
- Non-classical and higher order logics.
In the longer term, the TPTP may be extended to include problems expressed
in non-classical and higher order logics.
5.3
Acknowledgements
We are indebted to the following people and organizations who have contributed
problems and helped with the construction of the TPTP:
Geoff Alexander, the ANL group (especially Bill McCune), the Automated
Reasoning group in Munich, Dan Benanav, Woody Bledsoe, Maria Poala
Heng Chu, Tom Jech, Reinhold Letz, Thomas Ludwig, Xumin Nie,
Jeff Pelletier, David Plaisted, Joachim Posegga, Art Quaife, Alberto Segre, John
Slaney, Mark Stickel, Bob Veroff, and TC Wang.
--R
Available by anonymous ftp from info.
Challenge Problems in Elementary Calculus.
Set Theory in First-Order Logic: Clauses for G-odel's Axioms
Dewey Decimal Classification and Relative Index.
Model Generation Theorem Provers on a Parallel Inference Machine.
Otter 2.0 Users Guide.
Single Axioms for Groups and Abelian Groups with Various Operations.
Problems and Experiments for and with Automated Theorem-Proving Programs
American Mathematical Society
Experiments in Automated Deduction with Condensed Detachment.
Automated Deduction in von Neumann-Bernays-Godel Set The- ory
Problems based on NBG Set Theory.
The TPTP Problem Library (TPTP v1.
A Prolog Technology Theorem Prover.
Schubert's Steamroller Problem: Formulations and Solutions.
SETHEO/PARTHEO Users Manual.
--TR
--CTR
Robert Nieuwenhuis, The impact of CASC in the development of automated deduction systems, AI Communications, v.15 n.2, p.77-78, September 2002
Robert Nieuwenhuis, The impact of CASC in the development of automated deduction systems: Guest-editorial, AI Communications, v.15 n.2,3, p.77-78, August 2002
Monty Newborn , Zongyan Wang, Octopus: Combining Learning and Parallel Search, Journal of Automated Reasoning, v.33 n.2, p.171-218, September 2004
John Slaney, More Proofs of an Axiom of ukasiewicz, Journal of Automated Reasoning, v.29 n.1, p.59-66, 2002
G. Sutcliffe , C. B. Suttner, The CADE-18 ATP System Competition, Journal of Automated Reasoning, v.31 n.1, p.23-32,
Bernd Lchner, Things to Know when Implementing KBO, Journal of Automated Reasoning, v.36 n.4, p.289-310, April 2006
Steven Trac , Yury Puzis , Geoff Sutcliffe, An Interactive Derivation Viewer, Electronic Notes in Theoretical Computer Science (ENTCS), v.174 n.2, p.109-123, May, 2007
Urban , Grzegorz Bancerek, Presenting and Explaining Mizar, Electronic Notes in Theoretical Computer Science (ENTCS), v.174 n.2, p.63-74, May, 2007
Geoff Sutcliffe , Christian Suttner, The CADE-19 ATP System Competition, AI Communications, v.17 n.3, p.103-110, August 2004
Geoff Sutcliffe , Christian Suttner, The CADE-19 ATP system competition, AI Communications, v.17 n.3, p.103-110, July 2004
Justin Ward , Garrin Kimmell , Perry Alexander, Prufrock: a framework for constructing polytypic theorem provers, Proceedings of the 20th IEEE/ACM international Conference on Automated software engineering, November 07-11, 2005, Long Beach, CA, USA
Geoff Sutcliffe, The IJCAR-2004 Automated Theorem Proving Competition, AI Communications, v.18 n.1, p.33-40, January 2005
Geoff Sutcliffe, The IJCAR-2004 automated theorem proving competition, AI Communications, v.18 n.1, p.33-40, January 2005
Francis Jeffry Pelletier , Geoff Sutcliffe , Christian Suttner, The development of CASC, AI Communications, v.15 n.2, p.79-90, September 2002
Francis Jeffry Pelletier , Geoff Sutcliffe , Christian Suttner, The development of CASC, AI Communications, v.15 n.2,3, p.79-90, August 2002
G. Sutcliffe , C. B. Suttner , F. J. Pelletier, The IJCAR ATP System Competition, Journal of Automated Reasoning, v.28 n.3, p.307-320, April 2002
G. Sutcliffe , C. B. Suttner, The CADE-15 ATP System Competition, Journal of Automated Reasoning, v.23 n.1, p.1-23, July 1999
Geoff Sutcliffe, The CADE-16 ATP System Competition, Journal of Automated Reasoning, v.24 n.3, p.371-396, April 2000
Geoff Sutcliffe, The CADE-20 Automated Theorem Proving Competition, AI Communications, v.19 n.2, p.173-181, April 2006
Geoff Sutcliffe, The CADE-20 automated theorem proving competition, AI Communications, v.19 n.2, p.173-181, January 2006
Dominique Pastre, Strong and weak points of the MUSCADET theorem prover - examples from CASC-JC, AI Communications, v.15 n.2,3, p.147-160, August 2002
G. Sutcliffe, The CADE-17 ATP System Competition, Journal of Automated Reasoning, v.27 n.3, p.227-250, October 2001
J. Avenhaus , Th. Hillenbrand , B. Lchner, On using ground joinable equations in equational theorem proving, Journal of Symbolic Computation, v.36 n.1-2, p.217-233, July
Josef Urban, MPTP -- Motivation, Implementation, First Experiments, Journal of Automated Reasoning, v.33 n.3-4, p.319-339, October 2004
Jia Meng , Claire Quigley , Lawrence C. Paulson, Automation for interactive proof: first prototype, Information and Computation, v.204 n.10, p.1575-1596, October 2006
Andreas Meier , Volker Sorge, Applying SAT Solving in Classification of Finite Algebras, Journal of Automated Reasoning, v.35 n.1-3, p.201-235, October 2005
Evaluating general purpose automated theorem proving systems, Artificial Intelligence, v.131 n.1-2, p.39-54, September 2001
Stephan Schulz, E - a brainiac theorem prover, AI Communications, v.15 n.2,3, p.111-126, August 2002
Stephan Schulz, E - a brainiac theorem prover, AI Communications, v.15 n.2, p.111-126, September 2002
Geoff Sutcliffe , Christian Suttner, The state of CASC, AI Communications, v.19 n.1, p.35-48, January 2006
Geoff Sutcliffe , Christian Suttner, The state of CASC, AI Communications, v.19 n.1, p.35-48, January 2006
Jens Otten , Wolfgang Bibel, leanCoP: lean connection-based theorem proving, Journal of Symbolic Computation, v.36 n.1-2, p.139-161, July
Simon Colton , Stephen Muggleton, Mathematical applications of inductive logic programming, Machine Learning, v.64 n.1-3, p.25-64, September 2006
Jose Hernandez-Orallo, Beyond the Turing Test, Journal of Logic, Language and Information, v.9 n.4, p.447-466, October 2000
Christian Suttner , Geoff Sutcliffe, The CADE-14 ATP System Competition, Journal of Automated Reasoning, v.21 n.1, p.99-134, August 1998
Christoph Weidenbach, Combining superposition, sorts and splitting, Handbook of automated reasoning, Elsevier Science Publishers B. V., Amsterdam, The Netherlands, 2001
R. Sekar , I. V. Ramakrishnan , Andrei Voronkov, Term indexing, Handbook of automated reasoning, Elsevier Science Publishers B. V., Amsterdam, The Netherlands, 2001 | problem library;TPTP;experimental evaluation |
594215 | What You Always Wanted to Know about Rigid E-Unification. | This paper solves an open problem posed by a number of researchers: the construction of a complete calculus for matrix-based methods with rigid E-unification. The use of rigid E-unification and simultaneous rigid E-unification for such methods was proposed by Gallier et al., in 1987. After our proof of the undecidability of simultaneous rigid E-unification in 1995. (Degtyarev and Voronkov, 1996d), it became clear that one should look for more refined techniques to deal with equality in matrix-based methods. In this article, we define a complete proof procedure for first-order logic with equality based on an incomplete but terminating procedure for rigid E-unification. Our approach is applicable to the connection method and the tableau method and is illustrated on the tableau method. | Introduction
Algorithms for theorem-proving based on matings or tableaux in first-order logic
without equality comprise two kinds of rules. Rules of the first kind construct
matrices or tableaux from a given formula using a suitable amplification. Rules
of the second kind try to close paths or branches using substitutions making the
paths or branches inconsistent. These substitutions are unifiers of some atoms
laying on a path or branch. Until recently, most approaches to introducing equality
in such matrix-based methods tried to generalize such algorithms by a suitable
modification of the notion of a unifier.
Such a modification using simultaneous rigid E-unification was introduced in
(Gallier et al., 1987) for the method of matings (Andrews, 1981) or the connection
method (Bibel, 1981). It can be easily represented in the tableau formalism. The
method of matings interleaves two steps: amplification by quantifier duplication
and search for mating for a given amplification. For formulas in disjunctive normal
form this method was formulated earlier in (Prawitz, 1983). In this case amplification
is represented by a matrix and mating is represented by a set of simultaneously
satisfiable substitution conditions (mated pairs). Prawitz proposed a procedure for
constructing substitution conditions one by one, closing the corresponding paths
in the matrix through search with backtracking. Procedures of this kind were used
in later formalizations and implementations of the tableau method, the method
of matings or the connection method for formulas without equality. For example,
in (Fitting, 1990) the search for mating consists of repeated applications of MGU
atomic closure rule.
Supported by grants from INTAS, TFR and the Swedish Royal Academy of Sciences
y Partially supported by a TFR grant
(Gallier et al., 1987) tried to describe a similar procedure for logic with equality.
For example, (Gallier et al., 1992) describe such a procedure in which a substitution
condition is formalized via rigid E-unification, and the set of substitution
conditions via simultaneous rigid E-unification.
Simultaneous rigid E-unification can be formulated as follows. Given equations
finite sets of equations find a substitution oe such
that
means provability in first-order logic
with equality). The corresponding instance of the simultaneous rigid E-unification
problem is denoted by the system of rigid equations
EXAMPLE 1.1. In this and further examples we shall often omit parentheses in
terms with unary function symbols, for example we write ffb instead of f(f(b)).
Assume that we want to prove the formula
several applications of
tableau expansion rules to the negation normal form of :' (ff-, fi- and fl-rules in
the terminology of (Smullyan, 1968; Fitting, 1990) we obtain the following tableau
(we only consider the part of the tableau containing literals, omitting non-literal
a ' b c ' d
Collecting formulas lying on the two branches in this tableau we obtain the
following two rigid equations expressing inconsistency of this tableau:
This system of rigid equations has one solution ffa=x; fb=y; fc=u; fd=vg. This
substitution can be found by applying the functional reflexivity rule and MGU
replacement rule of (Fitting, 1990) (in fact, the reformulation of the paramodulation
rule for tableaux). Obviously, this tableau cannot be closed without the use
of the functional reflexivity. 1
1 The system of clauses corresponding to this example improves a result proved in (Plaisted,
1995) by using a more complicated example. In this system of clauses
a
a
there is no refutation even by unrestricted rigid paramodulation (i.e. using non-ordered rigid
paramodulation and paramodulation into variables), while (Plaisted, 1995) gives an example
showing incompleteness of ordered rigid paramodulation only.
What You Always Wanted to Know About Rigid E-Unification 3
Since the invention of simultaneous rigid E-unification by (Gallier et al., 1987),
there have been a number of publications on simultaneous rigid E-unification itself
and its use in theorem proving, for example (Gallier et al., 1988; Gallier et al., 1989;
Gallier et al., 1990; Gallier et al., 1992; Baumgartner, 1992; Beckert and H-ahnle,
1992; Becher and Petermann, 1994; Beckert, 1994; Goubault, 1994; Petermann,
1994). Some of these articles were based on the conjecture that simultaneous rigid
E-unification is decidable. There were several faulty proofs of the decidability of
this problem (Gallier et al., 1988; Gallier et al., 1990; Goubault, 1994).
The refutation procedure for first-order logic with equality using simultaneous
rigid E-unification (Gallier et al., 1992) was based on a faulty assumption that
solutions to simultaneous rigid E-unification can be found by consecutive combination
of finite complete sets of solutions for (non-simultaneous) rigid E-unification
(Gallier et al., 1990; Gallier et al., 1988). Later, (Degtyarev and Voronkov, 1996d;
Degtyarev and Voronkov, 1996e) proved that simultaneous rigid E-unification is
undecidable, which implied that Gallier et.al.'s procedure cannot, in general, find
solutions to simultaneous rigid E-unification. However, it is not clear whether this
implies incompleteness of their procedure for first-order logic with equality: there
are examples when the procedure cannot find a solution for a given amplification in
spite that such a solution exists, but can find a solution for a bigger amplification.
Completeness of Gallier et.al.'s procedure or existence of a procedure complete for
first-order logic with equality based on some set of solutions to rigid E-unification
was an open problem (Petermann, 1994; Beckert, 1995). Our paper gives a positive
solution to this problem.
An advantage of Gallier et.al.'s procedure is that it allows one to extend the
proof-search technology developed for tableaux without equality to the case with
equality, using solutions to rigid E-unification instead of most general unifiers. In
particular, for a given amplification Gallier et.al.'s procedure always terminates.
A procedure of this kind is used in the theorem prover 3 T A P (H-ahnle et al., 1994,
R.H-ahnle, private communication).
In this paper we define a procedure extending the tableau method to logic with
equality based on an incomplete procedure for rigid E-unification. Nevertheless,
our procedure is complete for first-order logic with equality. Hence, we rehabilitate
Gallier et.al.'s program for adding equality to semantic tableaux. Moreover, our
procedure solves rigid equations laying on different tableau branches independent-
ly. This strongly improves Gallier et.al.'s procedure which uses solutions of some
rigid equations to solve rigid equations on other branches.
A similar approach has already been defined in (Kanger, 1983) based on a more
straightforward way of variable instantiation. As a method for finding a closing
substitution, Kanger proposed an algorithm which can now be characterized as
an incomplete (but terminating) algorithm for simultaneous rigid E-unifiability.
Variables in a matrix (or a tableau) could be consecutively substituted by ground
terms already occurring in the matrix. This procedure does not solve simultaneous
rigid E-unifiability, but it gives a procedure complete for first-order logic with
total.tex - Date: June 3, 1997
4 Anatoli Degtyarev and Andrei Voronkov
equality. In the terminology of (Fitting, 1990) it means that a closing substitution
can be found after a sufficiently high (but not necessarily minimal) number of
applications of the fl-rule. The approach to substitutions based on this idea has
been characterized as minus-normalization in (Matulis, 1963; Maslov, 1967).
However, for a language with function symbols minus-normalization is interesting
mostly theoretically. Even in simplest cases, minus-normalization requires
a huge number of instantiations. For example, in the tableau of Example 1.1, we
have to consider 8 4 possible instantiations of variables x; by terms in the
set fa; b; c; d; fa; f b; f c; fdg. Moreover, it has been proved that the use of minus-
normalization can lead to considerable growth of derivations. Some results on
minus-normalization are proved by (Norgela, 1974).
In this paper we describe a logical calculus BSE for rigid E-unification based
on the rigid basic superposition rule that is an adaptation of basic superposition
of (Bachmair et al., 1992; Nieuwenhuis and Rubio, 1992), for "rigid" variables. For
a given rigid E-unification problem (called rigid equation in this paper), there is
only a finite number of BSE-derivations for this problem. Thus, BSE gives us an
algorithm returning a finite set of solutions to this rigid equation. We use these
solutions to close a tableau branch in the same way as most general unifiers are
used to close a branch in the MGU atomic closure rule of (Fitting, 1990).
Preliminaries
We present here a brief overview of notions and preliminary definitions necessary
for understanding the paper. We assume basic knowledge of substitutions and
unification.
Let \Sigma be a signature, and X be a set of variables. T (\Sigma; X) denotes the set of
all terms in the signature \Sigma with variables from X. The set of all ground terms
in the signature \Sigma is denoted by T (\Sigma).
A literal is either an atomic formula or a negation of an atomic formula. An
equation is a literal s ' t, where s; t 2 T (\Sigma; X). We do not distinguish equations
Literals of the form :(s ' t) are denoted by s 6' t and called
disequations. For simplicity, we assume that ' is the only predicate symbol of our
first-order language. As usual, arbitrary first-order languages can be represented in
such language by introducing a sort bool and replacing any non-equational atom
A by A ' true (for details see e.g. Bachmair et al., 1995).
By a ground expression (i.e. term or literal) we mean an expression containing
no variables. For any expression E, var(E) denotes the set of all variables occurring
in E. For a sequence of variables -
x, we shall sometimes denote - x also the corresponding
set of variables. We write A[s] to indicate that an expression A contains
s as a subexpression and denote by A[t] the result of replacing this occurrence of
s in A by t. By Aoe we denote the result of applying the substitution oe to A. If A
is a formula, we can as usual rename bound variables in A before applying oe. We
total.tex - Date: June 3, 1997
What You Always Wanted to Know About Rigid E-Unification 5
shall denote '(x) a formula ' with zero or more free occurrences of a variable x
and write '(t) to denote the formula 'ft=xg.
A substitution ' whose domain is a subset of fx is denoted
A substitution oe is called grounding for a set of variables V if for every variable
the term voe is ground.
be two substitutions with disjoint domains, The union of ' 1 and
is the substitution oe defined as follows. For every variable v we
have
Note that we use the union notation only for substitutions with disjoint
domains.
The inference systems used in this paper are defined with respect to a reduction
ordering, denoted by - which is total on ground terms. Our results are valid for
any such ordering.
A formula is in the Skolem negation normal form if it is constructed from
literals using the connectives - and the quantifier 8. There is a satisfiability-
preserving structure-preserving translation of formulas without equivalences into
formulas in Skolem negation normal form consisting of the standard skolemization
and a translation into negation normal form used e.g. in (Andrews, 1981). In order
to prove an arbitrary formula ', we translate :' in Skolem negation normal form
obtaining a formula / and try to establish unsatisfiability of /. For this reason,
theorems in this paper are formulated in terms of unsatisfiability.
For an equation s ' t and a multiset of equations E we write E ` s ' t to
denote that the formula ( V
is provable in first-order logic with
equality. For such formulas provability can be tested by the congruence closure
algorithm (Shostak, 1978). For the inclusion of multisets we shall use notation
3 Rigid basic superposition
The term "rigid paramodulation" has already been used in (Becher and Peter-
mann, 1994; Plaisted, 1995) for systems of inference rules in which all variables
are treated as "rigid". For example, rigid clause paramodulation of (Plaisted, 1995)
is essentially paramodulation and resolution over a set of clauses, where all substitutions
are applied to the whole set of clauses. A similar system for resolution has
been proposed earlier in (Chang, 1972) as V-resolution and in (Lee and Chang,
for resolution with paramodulation as V-resolution and V-paramodulation.
6 Anatoli Degtyarev and Andrei Voronkov
We shall use the term "rigid basic superposition" to denote a "rigid" version of
basic superposition. We formalize rigid basic superposition using constraints that
is close to the presentation of (Nieuwenhuis and Rubio, 1995).
DEFINITION 3.1 (Constraints). By an (ordering) constraint we mean a set of
expressions which can be of two kinds: an equality constraint s ' t, or an inequality
constraint s - t, where s; t are terms. A substitution ' is a solution to a constraint
(respectively, a constraint s - t) if ' is grounding for
coincides with t' (respectively, s' - t').
A substitution ' is a solution to a constraint C if ' is a solution to every equality
or inequality constraint in C. A constraint C is satisfiable if it has a solution.
Constraints C 1 and C 2 are called equivalent if they have the same sets of solutions.
We assume that there is an effective procedure for checking constraint satisfiability.
For example, there are efficient methods for solving ordering constraints for lexicographic
path orderings given by (Nieuwenhuis, 1993; Nieuwenhuis and Rubio,
1995).
DEFINITION 3.2. A rigid equation is an expression of the form E ' 8 s ' t,
where E is a finite multiset of equations and s; t are terms. Its solution is any
substitution ' such that E' ' s' ' t' 2 .
Below we shall introduce a system BSE for solving rigid equations. The derivable
objects of BSE are constraint rigid equations:
DEFINITION 3.3 (Constraint rigid equation). A constraint rigid equation is a
pair consisting of a rigid equation R and a constraint C. Such a constraint rigid
equation will be denoted R \Delta C.
DEFINITION 3.4 (Calculus BSE). The calculus BSE of constraint rigid equations
consists of the following inference rules:
Left rigid basic superposition:
(lrbs)
Right rigid basic superposition:
2 The term "rigid equation" could be more adequately expressed as "instance of a (non-
simultaneous) rigid E-unification problem", but this would be too lengthy.
What You Always Wanted to Know About Rigid E-Unification 7
Equality resolution:
Application of the rules is restricted to the following conditions:
1. The constraint at the conclusion of the rule is satisfiable;
2. The right-hand side of the rigid equation at the premise of the rule does not
have the form q ' q.
3. In the basic superposition rules, the term p is not a variable.
4. In the left basic superposition rule, s[r] 6= t.
The basic restriction in BSE is formalized by representing most general unifiers
through equality constraints. Condition 1 has two purposes. The satisfiability of
equations in constraints is needed to preserve correctness of the method. The
satisfiability of inequality constraints is needed to ensure termination (Theorem 3.9
below). Conditions 3-4 are not essential, they are added as standard optimizations
used in paramodulation-based methods. Condition 2 prohibits to apply any rules
to rigid equations of the form E ' 8 q ' q.
We denote by R \Delta C the fact that R 0 \Delta C 0 is obtained from R \Delta C by
an application of one of the inference rules of BSE. The symbol ; denotes the
reflexive and transitive closure of ;.
3.5. Consider the rigid equation ha ' a; hx ' a; hb ' fy ` 8 y '
gfy. The ordering - is the Knuth-Bendix ordering (see Martin, 1987) in which all
weights of symbols are equal to 1 and which uses the precedence relation f ? h ?
a. Under this ordering we have ht - a and f t - hb for every ground term t.
The following is a BSE-derivation for this rigid equation:
fy ` 8 y ' gfy
fy ` 8 y ' ghb \Delta ffy - hb; gfy - fy ' fyg
fy ` 8 y ' ga
\Deltaff y - hb; gfy - fy ' fy; hx - a; ghb -
fy ' fy; hx - a; ghb -
By using constraint simplification, i.e. replacement of constraints by equivalent
"more simple" constraints we can rewrite this derivation as
fy ` 8 y ' gfy
fy ` 8 y ' ghb
fy ` 8 y ' ga \Delta fghb -
8 Anatoli Degtyarev and Andrei Voronkov
THEOREM 3.6 (Soundness of BSE). Let R substitution
satisfying C is a solution to R. In particular, R is solvable.
Proof. For any constraint C, denote by C ' the constraint obtained from C be
removing all inequality constraints. First we note that for every application of
an inference rule of BSE of the
By induction on the number of inference steps and using
the fact C i ' C i+1 , we prove the same statement for multi-step derivations
Let R have the form E Applying the obtained statement to the
multi-step derivation R t.
Hence, any solution to C. We have
Any constraint in C ' ` has the form u ' u. Hence,
solution to
This theorem leads to the following definition:
DEFINITION 3.7 (Answer constraint). A constraint C is called an answer constraint
for a rigid equation R if for some rigid equation
We note that BSE is an incomplete calculus for solving rigid equations. It
means that there are solvable rigid equations R that have no answer constraint.
For instance, consider the rigid equation 3 x ' a ` 8 gx ' x. It has one solution
fga=xg. However, no rule of BSE is applicable to x ' a ` 8 gx ' x \Delta ;.
This means that BSE can yield less solutions to a rigid equation than any other
known procedure, for example that of (Gallier et al., 1992) because all these procedures
are existentially complete. At the same time, BSE can yield more solutions
than the procedure of (Gallier et al., 1992) as the following example shows. For
the rigid equation a ' fa ` 8 x ' fa the procedure of (Gallier et al., 1992) will
find one solution fa=xg, but there are two answer constraints whose solutions are
the substitutions fa=xg and ffa=xg respectively.
In order to show that there is only finite number of derivations in BSE from a
given constraint rigid equation, we prove an auxiliary statement.
be an infinite sequence of terms in a finite signature all
whose variables belong to a finite set. Then there are numbers
and the constraint t i - t j is unsatisfiable.
Proof. Following (Kruskal, 1960) we introduce a partial ordering - on terms as
the smallest reflexive and transitive relation satisfying
1.
2. if s - t then r[s] - r[t].
3 Suggested by G.Becher (private communication).
What You Always Wanted to Know About Rigid E-Unification 9
By Kruskal's Tree Theorem (Kruskal, 1960) there exist
It is easy to see that the constraint t i - t j is unsatisfiable.
Similar statements have been proven in (Dershowitz, 1982; Plaisted, 1986).
THEOREM 3.9 (Termination of BSE). For any constraint rigid equation R \Delta C,
there exists a finite number of derivations from R \Delta C.
Proof. Suppose that there exists an infinite number of derivations from R \Delta C.
Then, by K-onig's lemma there exists an infinite derivation R \Delta
consisting of superpositions. Consider any application of superposition
it have the form
(lrbs)
(the case of right rigid basic superposition is similar). We prove that for every
the constraint C n is equivalent to C n [fs[p] - s[r]g. Indeed, the constraint
(and hence the constraint C n ) contains pg. By the definition of
reduction orderings, if p - r, then s[p] - s[r]. This implies that C n is equivalent
to s[r]g.
Since every application of rigid basic superposition replaces a literal s[p] '
t (or s[p] 6' t) in R i by a literal s[r] ' t (respectively, s[r] 6' t), there is an
infinite sequence of terms t and an increasing sequence of natural numbers
with the following property. For every positive natural number k the
constraint C n k
is equivalent to C n k
. Since all terms t k are in the same
finite signature and have variables in the same finite set, by Lemma 3.8, there are
and the constraint t
for
all k - j, the constraint C n j
is equivalent to C n j
, for all k - j. Hence,
the constraint is equivalent to C n j . Thus, C is
satisfiable. But satisfiability of C implies satisfiability of t i - t j . Contradiction.
Note. In (Degtyarev and Voronkov, 1996f) the left rigid basic superposition has
been formulated incorrectly in the following way:
(lrbs)
With this formulation, termination is not guaranteed as the following example
shows. Consider the rigid equation fgx ' gx; gx ' a ' 8 a ' b and arbitrary
reduction ordering - total on ground terms. The following is an infinite sequence
of applications of (lrbs):
ag
(lrbs)
\Deltafgx ' gx; fgx - gx; gx - a; gx - fag
(lrbs)
ag
It is easy to see that the constraint
ag
is satisfied by the substitution ff a=xg.
Inequality constraints are not needed for soundness or completeness of our
method. The pragmatics behind inequality constraints is to ensure that the search
for solutions of a rigid equation is finite. In addition, the use of ordering constraints
prunes the search space.
To illustrate this theorem, we consider Example 3.5. The rigid equation of this
example has an infinite number of solutions including fb=x; gh n a=yg, for every natural
number n. However, all possible BSE-derivations starting with ha ' a; hx '
fy ` 8 y ' gfy \Delta ; give only two answer constraints, one is
ffy - hb; gfy - fy ' fy; hx - a; ghb -
shown in Example 3.5, another is ffy - hb; gfy - fy ' fy; y ' ghbg obtained
from the following derivation:
fy ` 8 y ' gfy
fy ` 8 y ' ghb \Delta ffy - hb; gfy - fy ' fyg
fy ' fy; y ' ghbg
This answer constraint can be simplified to fy ' ghbg.
Theorem 3.9 yields
THEOREM 3.10. Any rigid equation has a finite number of answer constraints.
There is an algorithm giving for any rigid equation R the set of all answer constraints
for R.
What You Always Wanted to Know About Rigid E-Unification 11
In the rules (fl) the variable y does not occur in the premise.
Fig. 1. Tableau Expansion Rules
4 Answer constraints and the tableau method
In this section we consider how to use the system BSE for theorem proving by the
tableau method. Since we only consider skolemized formulas, we have no ffi-rules
in tableau calculi.
DEFINITION 4.1 (Branch and tableau). A branch is a finite multiset of formulas.
A tableau is a finite multiset of branches. A tableau with branches
be denoted by \Gamma . The tableau with is called the empty tableau
and denoted by #.
Often, tableaux are represented in tree form. Representation of tableaux as
multisets of branches is more convenient for us for several reasons. For this representation
we introduce a logical system allowing to expand tableaux:
DEFINITION 4.2 (Tableau expansion rules). The rules (ff), (fi) and (fl) of Figure
are called tableau expansion rules.
DEFINITION 4.3. Let \Gamma be a branch of a tableau. The set of rigid equations on
\Gamma is defined in the following way. A rigid equation t is on \Gamma if E is the
multiset of all equations in \Gamma and (s 6' t) 2 \Gamma.
We extend the notion of answer constraints to tableau branches:
DEFINITION 4.4. A constraint C is an answer constraint for a tableau branch \Gamma
if C is an answer constraint for some rigid equation on \Gamma.
By Theorem 3.10, we obtain
THEOREM 4.5. Any tableau branch has a finite number of answer constraints.
There is an algorithm which for any tableau branch \Gamma computes the set of all
answer constraints for \Gamma.
The following theorem states soundness and completeness of the tableau method
with answer constraints:
THEOREM 4.6 (Soundness and completeness). Let - be a sentence in Skolem negation
normal form. Then - is unsatisfiable if and only if there is a
obtained from - by tableau expansion rules and answer constraints C
respectively, such that
Proof. Soundness follows from soundness of BSE .
The proof of completeness is quite lengthy and is given in Appendix A. It
is based on the completeness of the equality elimination method (Degtyarev and
Voronkov, 1994; Degtyarev and Voronkov, 1995a; Degtyarev and Voronkov, 1996b).
To illustrate this theorem, consider the formula of Example 1.1. Assume that
we want to prove the formula
d oe g(u; x; y) ' g(v; fa; fb))). The negation normal form of :- is 8xyzu((a '
The ordering - is the lexicographic path ordering (see e.g. Nieuwenhuis and
Rubio, 1995) based on the precedence g ? f ? a d. For purely
illustrative purpose, we shall display tableaux in the tree form. After one quantifier
duplication (application of a fl-rule) and some other tableau expansion rules we
obtain the following tableau:
a ' b c ' d
There is one rigid equation on each branch of the tableau:
Rigid basic superposition is applicable to none of this rigid equations. Rigid equation
(1) has one answer constraint fg(x; u; v) ' g(y; f c; fd)g obtained by an application
of the equality resolution rule:
Similarly, rigid equation (2) has one answer constraint fg(u; x; y) ' g(v; fa; fb)g.
The union of these constraints fg(x; u; v) ' g(y; f c; fd); g(u; x; y) ' g(v; fa; fb)g is
total.tex - Date: June 3, 1997
What You Always Wanted to Know About Rigid E-Unification 13
unsatisfiable. Thus, our method does not find solution after one quantifier dupli-
cation. After three quantifier duplications and some other tableau expansion steps
we obtain the following tableau:
a ' b c ' d
a ' b c ' d
a ' b
It has four branches:
Consider the following rigid equations R 1 -R 4 on the branches \Gamma 1 -\Gamma 4 , respectively
We can apply the following BSE-derivations to R 1
a ' b; a ' b ' 8
a
a
14 Anatoli Degtyarev and Andrei Voronkov
a
a
ag
The union of the answer constraints of these derivations is
a - b; a ' a;
This constraint is satisfiable. To check this, we can consider the following substitution
5 Tableau basic superposition
As a simple consequence of our results, we prove a completeness result for a
paramodulation rule working on tableaux. A paramodulation rule working directly
on tableaux was proposed in (Loveland, 1978) in the context of model elimination
and later in (Fitting, 1990). However, their formulations have all disadvantages of
the early paramodulation rule of (Robinson and Wos, 1969):
1. Functional reflexivity rule is used;
2. Paramodulation into variables is allowed;
3. Increasing applications of paramodulation are allowed (for example, x can be
rewritten to f(x).
As a consequence, for a given tableau expansion there may be an infinite sequence
of paramodulations, in particular due to the use of functional reflexivity or increasing
applications of paramodulation. Since the publication of the book (Loveland,
1978), no improvements of the paramodulation-based tableau calculi have been
described except for (Plaisted, 1995) who has shown how to transform derivations
with resolution and paramodulation to tableaux by introducing a tableau factoring
rule.
Here we show that paramodulation is complete under the following restrictions:
What You Always Wanted to Know About Rigid E-Unification 15
1. No functional reflexivity is needed;
2. Paramodulation into variables is not allowed;
3. Orderings are used so that there are no increasing applications of paramodulation
4. Basic restriction on paramodulation prohibits paramodulation into terms introduced
by unification.
All these refinements are a consequence of our main result (Theorem 4.6).
In order to formalize the basic strategy, we keep the substitution condition as
a set of constraints, as before. Thus, we work with constraint tableaux:
DEFINITION 5.1 (Constraint tableau). A constraint tableau is a pair consisting
of a tableau T and a constraint C, denoted T \Delta C.
Now we adapt the tableau rules of (Fitting, 1990) to the case of constraint
tableaux. For simplicity, we only consider signatures whose only predicate symbol
is '. When we prove a formula ', we construct the Skolem negation normal form
/ of :' and, starting with the constraint tableau / try to derive the empty
tableau # with some satisfiable constraint.
DEFINITION 5.2 (Calculus T BSE). The free-variable tableau calculus T BSE
is shown in Figure 2.
DEFINITION 5.3 (Constraint tableau expansion rules). The rules (ff), (fi) and
(fl) of T BSE are called constraint tableau expansion rules.
The calculus T BSE has the required completeness property:
THEOREM 5.4 (Soundness and completeness). Let ' be a formula in the Skolem
negation normal form. It is unsatisfiable if and only if there is a derivation from
the constraint tableau ' \Delta ; of a constraint tableau # \Delta C.
Proof. Straightforward from Theorem 4.6 by noting that the rules of BSE can
be simulated by the corresponding tableau rules.
This logical system has one more pleasant property:
THEOREM 5.5 (Termination). For any constraint tableau T \Delta C there is only a
finite number of derivations from T \Delta C not using constraint tableau expansion
rules.
(lrbs)
In the rules (fl) the variable y does not occur in the premise. The conditions on
the rules (lrbs) and (rrbs) are the same as for the corresponding rules of BSE.
Fig. 2. Calculus T BSE
Proof. Similar to that of Theorem 3.9.
This means, that for a given amplification, we cannot have infinite search. Infinite
search without any expansion steps is possible in Fitting's system.
To illustrate the connection between the tableau rigid basic superposition rule
and rules of BSE, we reconsider the example of Section 4. On the branch containing
the literal g(x fd) and the equation c ' d, we can apply rigid
basic superposition that adds g(x fd) to the branch. Similarly,
we can apply rigid basic superposition to the branch containing
This results in the
tableau given in Figure 3 (the picture does not include the constraint, it is discussed
below).
After four application of the (er) rules all branches of this tableau become
closed. The resulting constraint of this derivation is the same as the union of the
answer constraints shown at the end of Section 4.
6 Related work
The problem of extending tableaux with equality rules is crucial for enriching the
deductive capabilities of the tableau method. Despite the fact that this problem
has been attacked by a growing number of researchers during the last years, known
solutions are not yet convincing. At the same time tableau methods of automated
deduction play an important role in various areas of artificial intelligence and
computer science - see e.g. special issues of the Journal of Automated Reasoning,
v. 13, no. 2,3, 1994. These issues contain a survey (Schumann, 1994) of implemen-
What You Always Wanted to Know About Rigid E-Unification 17
a ' b c ' d
a ' b c ' d
a ' b
Fig. 3.
tations of tableau-based provers. Among 24 systems mentioned in the survey only
two are able to handle equality.
The systems PROTEIN (Baumgartner and Furbach, 1994) and KoMeT (Bibel
et al., 1995) implement the modification method of (Brand, 1975). This method
transforms a set of clauses with equality into a set of clauses without equality.
This transformation usually yields a considerably larger set of clauses. In partic-
ular, the symmetry and the transitivity axioms must be explicitly applied to all
positive occurrences of the equality predicate. Recently, (Degtyarev and Voronkov,
1996c) proposed a new translation method based on the so-called basic folding
demonstrated for Horn clauses.
According to (Schumann, 1994), the system 3 T A P uses the method of (Beckert
and H-ahnle, 1992). Paper (Beckert and H-ahnle, 1992) claims the completeness of
the method, but this claim is not true. The method expands the tableau using
the standard tableau rules, including fl-rules. For finding a closing substitution,
an analogue of linear paramodulation without function reflexivity has been pro-
posed. As it is well known, linear paramodulation is incomplete without function
reflexivity. The same is true for the method of (Beckert and H-ahnle, 1992), as the
following example shows. Suppose that we prove the formula 9x(a ' b-g(fa; fb) '
In order to prove it using paramodulation, we need
to paramodulate a ' b into g(fa; fb) ' h(fa; fb). The method of (Beckert and
H-ahnle, 1992) only allows for paramodulation into copies of g(x; x) ' h(x; x)
obtained by applications of the fl-rule. Thus, this (provable) formula cannot be
proved using the method of (Beckert and H-ahnle, 1992).
Consider now approaches based on simultaneous rigid E-unifiability by (Gallier
et al., 1987; Gallier et al., 1992) and related methods. We do not consider numerous
total.tex - Date: June 3, 1997
works dedicated to (non-simultaneous) rigid E-unifiability. This problem is NP-complete
and there exist a number of complete algorithms for its solution (Gallier
et al., 1988; Gallier et al., 1990; Goubault, 1993; Becher and Petermann, 1994;
De Kogel, 1995; Plaisted, 1995). Since simultaneous rigid E-unification is undecidable
(Degtyarev and Voronkov, 1996d; Degtyarev and Voronkov, 1996e), these
completeness results are useless from the viewpoint of general purpose theorem
proving as proposed in (Gallier et al., 1987; Gallier et al., 1992). Our system BSE
can easily be extended to a calculus complete for rigid E-unifiability, but such
completeness is not our aim. We tried to restrict the number of possible BSE-
derivations preserving completeness of the general-purpose method of Section 4.
It is not known whether the procedure described in (Gallier et al., 1992) is
complete for theorem proving 4 . Even if it is complete, our procedure based on
BSE has some advantages over Gallier et.al.'s procedure. For example, for every
tableau branch with p equations and q disequations, we consider q rigid equations,
while Gallier et.al.'s procedure checks q \Delta 2 p rigid equations.
(Gallier et al., 1988; Gallier et al., 1990) introduced the notion of a complete
set of solutions for rigid E-unification, proved finiteness of such sets and gave
an algorithm computing finite complete set of solutions. According to this result,
(Goubault, 1994) proposed to solve simultaneous rigid E-unifiability by using finite
complete sets of solutions to the components of the simultaneous problem. Paper
(Goubault, 1994) contained faulty results. The undecidability of simultaneous rigid
E-unification shows that finite complete sets of solutions do not give a solution to
the simultaneous problem. The reason for this is that substitutions belonging to
complete sets of solutions for different rigid equations are minimal modulo different
congruences.
(Petermann, 1994) introduces a "complete connection calculus with rigid E-
unification". Here the completeness is achieved by changing the notion of a complete
set of unifiers so that solutions to all subproblems are compared modulo
the same congruence (generated by the empty equality theory). In this case,
a non-simultaneous problem can have an infinite number of solutions and no
finite complete set of solutions. For example, for the rigid E-unification problem
f(a) ' a ` 8 x ' a the complete set of solutions in the sense of (Gallier et al.,
1992) consists of one substitution fa=xg (and there is only one answer constraint
ag obtained by our method), but the complete set of solutions in the sense
of (Petermann, 1994) is infinite and consists of substitutions ff n (a)=xg, for all
:g. This implies that proof-search by the method of (Petermann, 1994)
can be non-terminating even for a limited number of applications of the fl-rule
(i.e. for a particular tableau), unlike algorithms based on the finite complete sets
of unifiers in the sense of (Gallier et al., 1992) or based on minus-normalization
(Kanger, 1983). The implementation of the method of (Petermann, 1994) uses a
completion-based procedure by (Beckert, 1994) of generation of complete sets of
4 For example, the completeness of Gallier et.al.'s procedure does not follow from our method
because, as noted above, our calculus BSE can give more solutions to some rigid equations.
What You Always Wanted to Know About Rigid E-Unification 19
rigid E-unifiers. This procedure is developed with the aim of solving a more general
problem - so-called mixed E-unification and has been implemented as part of the
tableau-based theorem prover 3 T A P . Complete sets of unifiers both in the sense
of (Gallier et al., 1992) and in the sense of (Petermann, 1994) can be computed
by this procedure in the case when all variables are treated as rigid. However, the
termination is not guaranteed even for complete sets of rigid E-unifiers in the sense
of (Gallier et al., 1992).
(Plaisted, 1995) gives "techniques for incorporating equality into theorem prov-
these techniques have a rigid flavor". His method of path paramodulation guarantees
termination for a given amplification and, in the case of success "solves
the simultaneous rigid E-unification problem, in a sense". However, this does not
solve the problem attacked by a number of researchers: extend the method of
matings to languages with equality by rigid E-unification. First, unlike (Gallier
et al., 1992) the search for solutions for a given amplification is not incremental
(the method does not allow "branch-wise" computation of solutions to rigid E-
unification for separate branches). Second, within a given amplification Plaisted
uses factoring rules which involves two branches (paths). As a consequence, even
when the original formula contains no equality, his method results in the standard
tableau calculus plus the factoring rule.
In fact, path paramodulation of (Plaisted, 1995) simulates resolution-paramodu-
lation inference in a connection-like calculus. Although it is not noted in (Plaisted,
1995), this technique has been demonstrated for resolution in many papers, for
example in (Bibel, 1981; Eder, 1988; Eder, 1991; Mints, 1990; Baumgartner and
Furbach, 1993; Avron, 1993). The generalization of this simulation to paramodulation
is straightforward.
However, this simulation technique is insufficient for proving the results of our
paper since, in particular, it gives no insight on how to avoid factoring in tableaux
with equality. The use of factoring prevents not only from the independent search
for solutions for tableau branches, but even from the incremental solving of rigid
equations on tableau branches as proposed by Gallier et.al.
Our equality elimination method (Degtyarev and Voronkov, 1996b; Degtyarev
and Voronkov, 1995b; Degtyarev and Voronkov, 1995a) is based on extending a
tableau prover by a bottom-up equation solver using basic superposition. Solutions
to equations are generated by this solver and used to close branches of a tableau.
Thus, the method combines (non-local) tableau proof search with the (local) equation
solving. Only completely solved equations are used in the tableau part of the
proof, thus reducing non-determinism created by applications of the MGU replacement
rule of (Fitting, 1990). The equation solution is even more restricted by the
use of orderings, basic simplification and subsumption.
A similar idea: combination of proof-search in tableaux with a bottom-up equality
saturation of the original formula is used in (Moser et al., 1995) for constructing
a goal-directed version of model elimination and paramodulation.
One of advantages of the tableau method is its applicability to non-classical
logics. However, handling equality in non-classical logics seems to be a much more
difficult problem than that in classical logic. For example, it is shown in (Voronkov,
1996) that procedures for intuitionistic logic with equality must handle simultaneous
rigid E-unification. This implies that our method based on BSE does not give a
complete procedure for intuitionistic logic with equality. Other results on relations
between simultaneous rigid E-unification and intuitionistic logic are considered in
(Degtyarev and Voronkov, 1996a; Degtyarev et al., 1996a; Degtyarev et al., 1996b;
Veanes, 1997).
An extensive discussion of equality reasoning in sequent-based systems may be
found in (Degtyarev and Voronkov, 1997).
Acknowledgments
We thank Gerard Becher and Uwe Petermann for helpful discussions, anonymous
referees for their valuable comments and the guest editors Jose Julio Alves Alferes
and Luis Moniz Pereira for their patience.
--R
Theorem proving via general matings.
Basic paramodulation and superposition.
Basic paramodulation.
Consolution as a framework for comparing calculi.
PROTEIN: A PROver with a Theory Extension INterface.
An ordered theory resolution calculus.
Rigid unification by completion and rigid paramodulation.
An improved method for adding equality to free variable semantic tableaux.
A completion-based method for mixed universal and rigid E-unification
Issues in theorem proving based on the connection method.
On matrices with connections.
Proving theorems with the modification method.
Theorem proving with variable-constrained resolution
Rigid E-unification simplified
Equality elimination for semantic tableaux.
Equality elimination for the inverse method and extension proce- dures
General connections via equality elimination.
Decidability problems for the prenex fragment of intuitionistic logic.
Equality elimination for the tableau method.
Handling equality in logic programs via basic folding.
Simultaneous rigid E-unification is undecidable
The undecidability of simultaneous rigid E-unification
What you always wanted to know about rigid E-unification
Equality reasoning and sequent-based methods
Simultaneous rigid E-unification and related algorithmic problems
"Logic in Computer Science"
Orderings for term rewriting systems.
Consolution and its relation with resolution.
First Order Logic and Automated Theorem Proving.
Theorem proving using rigid E-unification: Equational matings
IEEE Computer Society Press
Rigid E-unification is NP-complete
Rigid E-unification and its applications to equational matings
Rigid E-unification: NP-completeness and applications to equational matings
Theorem proving using equational matings and rigid E-unification
The many-valued tableau-based theorem prover 3 T A P
Technical Report 30/94
A simplified proof method for elementary logic.
Well quasi ordering
Symbolic Logic and Mechanical Theorem Proving.
Automated Theorem Proving: a Logical Basis.
How to choose weights in the Knuth-Bendix ordering
Invertible sequential variant of constructive predicate calculus (in Russian).
On variants of classical predicate calculus with the unique deduction tree (in Russian).
Model elimination with basic ordered paramodula- tion
Basic superposition is complete.
Theorem proving with ordering and equality constrained clauses.
Journal of Symbolic Computations
On the size of derivations under minus-normalization in Russian
A complete connection calculus with rigid E-unification
A simple non-termination test for the Knuth-Bendix method
Special cases and substitutes for rigid E-unification
An improved proof procedure.
Paramodulation and theorem-proving in first order theories with equality
An algorithm for reasoning about equality.
On Simultaneous Rigid E-Unification
Proof search in intuitionistic logic with equality
--TR | equality reasoning;tableau method;rigid E-unification |
594229 | Integrating Computer Algebra into Proof Planning. | Mechanized reasoning systems and computer algebra systems have different objectives. Their integration is highly desirable, since formal proofs often involve both of the two different tasks proving and calculating. Even more important, proof and computation are often interwoven and not easily separable.In this article we advocate an integration of computer algebra into mechanized reasoning systems at the proof plan level. This approach allows us to view the computer algebra algorithms as methods, that is, declarative representations of the problem-solving knowledge specific to a certain mathematical domain. Automation can be achieved in many cases by searching for a hierarchic proof plan at the method level by using suitable domain-specific control knowledge about the mathematical algorithms. In other words, the uniform framework of proof planning allows us to solve a large class of problems that are not automatically solvable by separate systems.Our approach also gives an answer to the correctness problems inherent in such an integration. We advocate an approach where the computer algebra system produces high-level protocol information that can be processed by an interface to derive proof plans. Such a proof plan in turn can be expanded to proofs at different levels of abstraction, so the approach is well suited for producing a high-level verbalized explication as well as for a low-level, machine-checkable, calculus-level proof.We present an implementation of our ideas and exemplify them using an automatically solved example.Changes in the criterion of rigor of the proof engender major revolutions in mathematics. H. Poincar, 1905 | Introduction
The computer and the development of high-level programming languages
made possible the mechanisation of logic as well as the realisa-
M. KERBER, M. KOHLHASE, V. SORGE.
tion of mechanical symbolic calculations, we could witness in the last
forty years. This has lead to two rather disjoint academic fields: mechanised
reasoning and computer algebra, which each have their own meth-
ods, interests and traditions, even though they share common roots:
none of the two fields is imaginable without the underlying foundation
of mathematical logic or the mathematical study of symbolic calculations
(leading to such algorithms and methods as the determination of
the GCD or the Gau-ian elimination). Only in the last decade we have
seen a move towards an integration of the fields driven by the insight
that real-world formal problems often involve a mixture of both computation
and reasoning, hence an integration of mechanised reasoning
systems and computer algebra systems is highly desirable (cf. [Buc85]).
This is the case in particular, since deduction systems are very weak,
when it comes to computation with mathematical objects, and computer
algebra systems manipulate highly optimised representations of
these objects, but do not yield any formally checkable proof information
(if they give any explanation at all).
In the remainder of this introduction we briefly summarise key points
of mechanised reasoning systems as well as of computer algebra systems
and then give a short preview on the integration approach advocated
in this paper. By its nature, such a short description has to abstract
from many details and to simplify considerably.
1.1. Mechanised Reasoning Systems
Mechanised reasoning systems (for short MRS in the following) are
built with various purposes in mind. One goal is the construction of an
autonomous theorem prover, whose strength achieves or even surpasses
the ability of human mathematicians. Another is to build a system
where the user derives the proof, with the system guaranteeing its cor-
rectness. A third purpose consists in modelling human problem-solving
behaviour on a machine, that is, cognitive aspects are the focus.
Advanced theorem proving systems often try to combine the different
goals, since they can complement each other in an ideal way. Let us
roughly divide existing theorem-proving systems into three categories:
machine-oriented theorem provers, proof checkers, and human-oriented
(plan-based) theorem provers.
Normally all these systems do not exist in a pure form anymore, and
in some systems like our
own\Omega mega system [BCF + 97] it is explicitly
tried to combine the reasoning power of automated theorem provers as
logic engines, the specialised problem solving knowledge of the proof
planning mechanism, and the interactive support of tactic-based proof
development environments. We think that the combination of these
KeKoSo.tex; 24/06/1998; 14:49; no v.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 3
complementary approaches inherits more advantages than drawbacks,
because for most tasks domain-specific as well as domain-independent
problem-solving know-how is required and for difficult tasks more often
than not an explicit user-interaction should be provided. While such an
approach seems to be general enough to cope with any kinds of logic-level
proofs, it neglects the fact that for many mathematical fields,
the everyday work of mathematicians only partially consists in proving
or verifying theorems. Calculation plays an equally important r-ole. In
some cases the tasks of proving theorems and calculating simplifications
of certain terms can be separated from each other, but very often
the tasks are interwoven and inseparable. In such cases an interactive
theorem proving environment will only provide rather poor support to
a user. Although theoretically any computation can be reduced to theorem
proving, this is not practical for non-trivial cases, since the search
spaces are intractable. For many of these tasks, however, no search is
necessary at all, since there are numerical or algebraic algorithms that
can be used. If we think of Kowalski's equation
purpose procedures do not (and cannot)
provide the control for doing a concrete computation.
1.2. Computer Algebra Systems
Early computer algebra systems (CAS for short) developed from collections
of algorithms and data structures for the manipulation of algebraic
expressions like the multiplication of polynomials, or the derivation
and integration of functions [Hea95]. Abstractly spoken, the main
objective of a CAS can be viewed in the simplification of an algebraic
expression or the determination of a normal form. Today there is a
broad range of such systems, ranging from very generally applicable
systems to a multitude of systems designed for specific applications.
Unlike MRS, CAS are used by many mathematicians as a tool in their
everyday work, they are even widely applied in sciences, engineering
and economics. Their high academic and practical standard reflects the
fact that the study of symbolic calculation has long been an established
and fruitful subfield of mathematics that has developed the mathematical
theory and tools.
Most modern systems [Wol96, CGG have in common that
the algebraic algorithms are integrated in a very comfortable graphical
user interface that includes formula editing, visualisation of mathematical
objects and even an interface to programming languages. As in the
case of MRS the representation languages of CAS differ from system
to system, which complicates the integration of such systems as well
as the cooperation between them. This deficiency has been attacked in
4 M. KERBER, M. KOHLHASE, V. SORGE.
the OpenMath initiative [AvLS96], which strives for a standard CAS
communication protocol. Currently the main emphasis is laid on standardising
the syntax and the computational behaviour of the mathematical
objects, while their properties or semantics are not considered.
That means there is no explicit representation format for theorems,
lemmata and proofs. Some specific systems allow to specify mathematical
domains and theories. For instance in systems like MuPad [Fuc96]
or Axiom [JS92], computational behaviour can be specified by attaching
types and axiomatisations to mathematical objects; but this also
falls short of a comprehensive representation of all relevant mathemat-
ics. Furthermore, almost all CAS fail to give an explanation or proof of
their solution to the problem at hand, even though some mathematical
theories like that of Gr-obner bases can be successfully applied to theorem
proving in elementary geometry [Cho88, Kap88, CGZ94, Wu94].
1.3. Contributions of this Paper
Not only the fact that a mutual simulation of the tasks of an MRS and
a CAS can be quite inefficient, but more that the daily work of mathematicians
is about proving and calculating points to the integration
of such systems, since mathematicians want to have support in both of
their main activities. Indeed two independent systems can hardly cover
their needs, since in many cases the tasks of proving and calculating are
hardly separable. As pointed out by Buchberger [Buc96a] the integration
problem is still unsolved, but it can be expected that a successful
combination of these systems will lead to "a drastic improvement of
the intelligence level" of such support systems.
Our paper addresses two immediate questions occurring in the integration
of automated reasoning and computation systems.
How can the algorithms be integrated, so that the underlying
mathematical knowledge is mutually respected and a synergy effect
is achieved?
How can the correctness problem inherent in any such combination
be addressed? In particular, how can results from the CAS be
integrated into a proof without having to completely trust the
We advocate an integration of computer algebra into mechanised reasoning
systems using the proof planning paradigm. This approach
allows to encapsulate the computer algebra algorithms into meth-
ods, that is, declarative representations of the problem solving knowledge
specific to a certain mathematical domain. The proof planning
paradigm enables a user to guide a proof or to fully hand over the con-
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 5
trol to a planner, which in turn can use computer algebra systems, if
the specifications for the corresponding algorithms are met. The use of
hierarchic proof plans at the method-level gives a suitable granularity
of integration, since it allows to directly use existing (human) control
knowledge about the interplay of computation and reasoning.
A proper integration into the proof planning approach answers the
question about the correctness automatically, since the corresponding
questions are solved for proof planning. In this area a proof plan can
either be rejected (the tactics are not executable, hence the plan cannot
be used to build a proof) or executed. The later results either in a
further planning phase to fill in possible gaps or in an accepted machine-checkable
proof. Hence a proper integration requires that the computer
algebra system produces high-level protocol information that can be
processed by an interface to derive proof plans which themselves can
be seamlessly integrated into the overall proof plan generated in the
problem solving attempt. Since this can be expanded into an explicit,
checkable proof in order to obtain a correctness guarantee for the combined
solution, we have also given a principled answer to the correctness
problem.
The feasibility of the approach advocated in the sequel has been
verified by integrating a simple CAS into
the\Omega mega proof planning
system. Therefore, we organise the paper around this experiment and
describe the relevant features with a system perspective. Our approach
requires a mode of the CAS that generates information from which it
is possible to generate a proof plan. For that reason the integration of
a standard CAS makes major adaptations unavoidable (in particular it
is necessary to change the source code of these systems). Our approach
is not committed to the particular systems involved, in particular, the
work reported here should be understood rather as a proof of principle
than as the development of a state-of-the-art integrated system.
Moreover, we will make the details of the approach more concrete by
explaining them by means of an example that cannot easily be solved
by either a mechanised reasoning system or a computer algebra system
alone, but that needs the combined efforts of systems of each kind.
2. Related Work
We give a short description of some of the experiments to combine MRS
and CAS and roughly categorise them into three classes with respect
to the treatment of proofs that is adopted, that is, with respect to the
correctness issue. In doing so we only describe in detail the approaches
of integrating CAS into MRS, that is, essentially the MRS is the master
KeKoSo.tex; 24/06/1998; 14:49; no v.
6 M. KERBER, M. KOHLHASE, V. SORGE.
and the CAS the slave, since our approach is also of this kind. With
the same right, one can of course follow the converse direction, namely
to approach the integration from the point of the CAS and indeed such
approaches are also successfully undertaken (see e.g. [CZ92, Buc96]).
The question about the granularity of integration is treated uniformly
by all these experiments. The application of the CAS is treated
as another (derived) rule of inference at the level of the (tactic) calcu-
lus, so the granularity of integration depends on the granularity of the
calculus or the tactics involved.
In the first category of attempts (see e.g. [HT93b, BHC95]) one
essentially trusts that the CAS properly work, hence their results are
directly incorporated into the proof. All these experiments are at least
partly motivated by achieving a broader applicability range of formal
methods and this objective is definitively achieved, since the range of
mathematical theorems that can be formally proved by the system combinations
is much greater than that provable by MRS alone. However,
CAS are very complex programs and therefore only trustworthy to a
limited extent, so that the correctness of proofs in such a hybrid system
can be questioned. This is not only a minor technical problem, but will
remain unsolved for the foreseeable future since the complexity (not
only the code complexity, but also the mathematical complexity) of a
CAS does not permit a verification of the program itself with currently
available program verification methods. Conceptually, the main contribution
of such an integration is the solution of the software-engineering
problem how to pass the control between the programs and translating
results forth and back. While this is an important subproblem, it does
not seem to cover the full complexity of the interaction of reasoning and
computation found in mathematical theorem proving. In an alternative
approach that formally respects correctness, but essentially trusts CAS,
an additional assumption standing for the CAS is introduced, so that
essentially formulae are derived that are proved modulo the correctness
of the computer algebra system at hand (see e.g. [HT93b]).
The second category (for which [HT93a] is paradigmatic) is more
conscious about the r-ole of proofs, and only uses the CAS as an oracle,
receiving a result, whose correctness can then be checked deductively.
While this certainly solves the correctness problem, this approach only
has a limited coverage, since even checking the correctness of a calculation
may be out of scope of most MRS, when they don't have additional
information. Indeed from the point of applicability, the results of the
CAS help only in cases, where the verification of a result is simpler
than its discovery, such as prime factorisations, solving equations, or
symbolic integration. For other calculations, such as symbolic addition
or multiplication of polynomials and differentiation, the verification is
just as complex as the calculation itself, so that employing the CAS
KeKoSo.tex; 24/06/1998; 14:49; no v.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 7
does not speed up the proof construction process. Typically in longer
calculations, both types of sub-calculations are contained.
A third approach of integrating computer algebra systems into a
particular kind of mechanised reasoning system, consists in the metatheoretic
extension of the reasoning system as proposed for instance
in [BM81, How88] and been realised in Nuprl [Con86]. In this approach
a constructive mechanised reasoning system is basically used as its
own meta-system, the constructive features are exploited to synthesise
a correct computer algebra system and due to bridge rules between
ground and meta-system it is possible to integrate the so-built CAS
that it can be directly used as a component. The theoretical properties
of the meta-theoretic extension guarantee that if the original system
was correct then the extended system is correct too. This method is
the most appealing one from the viewpoint of correctness, although
the assumption that the original (also rather complex) system must be
correct can hardly be expected to be self-evident for any non-trivial
system. A disadvantage compared to the other two approaches is that
it is not possible to employ an existing CAS, but that it is necessary to
(re)implement one in the strictly formal system given by the basic MRS.
Of course this is subject to the limitations posed by the (mathematical
and software engineering) complexities mentioned above.
The main problem of integrating CAS into MRS without violating
correctness requirements is that CAS are generally highly optimised
towards maximal speed of computation but not towards generating
explanations of the computations involved. In most cases, this is dealt
with by meta-theoretic considerations why the algorithms are adequate.
This lack of explanation makes it not only impossible for the average
user to understand or convince himself of the correctness of the com-
putation, but leaves any MRS essentially without any information why
two terms should be equal. This is problematic, since computational
errors have been reported even for well-tested and well-established
CAS. From the reported categories of approaches only the last one
seriously addresses this problem.
3.\Omega mega as an Open System for Integrating Computation
\Omega mega is a proof development system, based on the proof planning
paradigm. In this section we describe its architecture and components
and show how this supports the integration of computer algebra sys-
tems. Since the goal of this paper is not to present a system description
of\Omega mega, but to document the integration of computer algebra into
it, we try to be as concise as possible and introduce the relevant parts
KeKoSo.tex; 24/06/1998; 14:49; no v.
8 M. KERBER, M. KOHLHASE, V. SORGE.
only, the general architecture, the proof planner, and the integration
possibilities for external reasoners.
3.1. The Proof Development
Environment\Omega\Gammamen
The entire process of theorem proving
in\Omega mega can be viewed as
an interleaving process of proof planning, execution and verification
centred around a hierarchical proof plan data structure.
Several integrated tools support the user in interacting with the
system. Some of them are also available to the proof planner.
Theory Database
Since methods and control knowledge used in proof planning are most-
ly
domain-specific,\Omega mega organises the mathematical knowledge in a
hierarchy of theories. Theories represent signature extensions, axioms,
definitions, and methods that make up typical established mathematical
domains. Each theorem has its home theory and therefore has access
to the theory's signature extensions, axioms, definitions, and lemmata
without explicitly introducing them. A simple inheritance mechanism
allows to incrementally build larger theories from smaller parts.
We give an overview of the part
of\Omega mega's theory database that
is necessary for solving our extended example in Figure 1.
Proof Explanation
Proof presentation is one important feature of a mathematical assistant
that has been neglected by traditional deduction
systems.\Omega mega
employs an extension of the Proverb system [HF96] developed by our
group that allows for presenting proofs and proof plans in natural lan-
guage. In order to produce coherent texts that resemble those found in
mathematical textbooks, Proverb employs state-of-the-art techniques
of natural language processing.
Due to the possibly hierarchical nature
of\Omega mega proofs, these can
be verbalised at more than one level of abstraction, which can be selected
by the user.
To summarise our view of proofs, for every theorem an explicit proof
has to be constructed so that on the one hand it can be checked by
a proof checker, on the other hand the system provides support to
represent this proof in a high-level form that is easily readable by
humans [HF96]. Neither the process of generating proofs nor that of
checking them is fully replaced by the machine but only supported. If
a human mathematician wants to see a proof, he/she can do so at an
appropriate level of abstraction.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 9
3.2. Proof Planning
The central data structure for the overall process is the Proof plan Data
Structure (PDS). This is a hierarchical data structure that represents
a (partial) proof at different levels of abstraction (called proof plans). It
is represented as a directed acyclic graph, where the nodes are justified
by (LCF-style) tactic applications. Conceptually, each such justification
represents a proof plan (the expansion of the justification) at a lower
level of abstraction that is computed when the tactic is executed 1 . In
\Omega mega, we explicitly keep the original proof plan in an expansion hier-
archy. Thus the PDS makes the hierarchical structure of proof plans
explicit and retains it for further applications such as proof explanation
or analogical transfer of plans.
Once a proof plan is completed, its justifications can successively
be expanded to verify the well-formedness of the corresponding PDS.
This verification phase is necessary, since the correctness of the different
components (in particular, that of external ones like automated
theorem provers or computer algebra systems) cannot be guaranteed.
When the expansion process is carried out down to the underlying
ND-calculus (natural deduction), the soundness of the overall system
relies solely on the correctness of the verifier and of ND. This also
provides a basis for the controlled integration of external reasoning
components if each reasoner's results can (on demand) be transformed
into a sub-PDS. The level to which the proofs have to be expanded
depends on the sophistication of the proof checker. As pointed out by
Barendregt [Bar96], a more complex proof-checker that accepts proofs
in a more expressive formalism may drastically reduce the length of the
communicated proofs. If the high-level justifications are not expanded
but accepted as they are, our approach reduces to one in which the computer
algebra system is fully trusted. In short, the hierarchical nature
of the PDS supports the full spectrum of user preferences, from total
trust in the CAS, over partial trust in certain levels to full expansion
of the proofs in a detailed calculus level description that is machine
checkable.
A PDS can be constructed by automated or mixed-initiative plan-
ning, or pure user interaction that can make use of the integrated tools.
In particular, new pieces of PDS can be added by directly calling tac-
tics, by inserting facts from a database, or by calling some external reasoner
(cf. Section 3.3) such as an automated theorem prover or a computer
algebra system. Automated proof planning is only adequate for
1 This proof plan can be recursively expanded, until we have reached a proof plan
that is in fact a fully explicit proof, since all nodes are justified by the inference rules
of a higher-order variant of Gentzen's calculus of natural deduction (ND).
M. KERBER, M. KOHLHASE, V. SORGE.
problem classes for which methods and control knowledge have already
been established.
The goal of proof planning is to fill gaps in a given PDS by forward
and backward reasoning [HKKR94] (proof plans were first introduced
by Bundy, see [Bun88, BSvH 93]). Thus from an abstract point of
view the planning process is the process of exploring the search space
of planning states that is generated by the plan operators in order to
find a complete plan from a given initial state to a terminal state.
\Omega mega's proof planner is an extension of the well-known STRIPS
algorithm that can be evoked to construct a proof plan for a node
(the goal node) from a set I of supporting nodes (the initial state)
using a set Ops of proof planning operators, here called methods. A
method is a (partial) specification of a tactic in a meta-level language.
In\Omega mega planning is combined with hierarchical expansion of methods
and precondition abstraction. The plans found by this procedure are
directly incorporated into the PDS as a separate level of abstraction.
In this model, the actual reasoning competence of the planner and
the user builds upon the availability of appropriate methods together
with meta-level control knowledge that guides the planning. At the
moment,\Omega mega provides user-defined method ratings as a means of
control and can use analogy as a control strategy of the planner. Two
examples of methods are displayed in the section on the extended exam-
ple, Section 3.4.
3.3. Integration of Computer Algebra Systems as
External Reasoners
According to the different modes
of\Omega mega there are different levels
on which an external reasoning system, RSys, can be integrated:
Interactive calls, RSys is represented as a command call-RSys
that invokes the reasoner on a particular subproblem and returns
the result,
Proof planning, RSys is represented as a method whose specification
contains knowledge about the problem solving behaviour
and option settings for RSys.
Justifications, RSys can serve as a justification of a declaratively
given subgoal that is left to be proved by RSys.
In any case, the proof found by RSys must eventually be transformed
into a PDS, since this is the proof-theoretic basis
of\Omega mega. For automated
theorem provers like Otter [McC94], we described the integration
in [HKK + 94] and the necessary proof transformation to PDS
in [HF96], so we will not pursue this matter here. The integration of
KeKoSo.tex; 24/06/1998; 14:49; no v.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 11
CAS follows the same paradigm and is the main topic of this paper,
so we will develop the paradigm for the case of external computations
in\Omega mega. We will see examples for the three different levels of integrations
of a CAS
into\Omega mega in the example in the next section, so
we will not go into that here. This leaves us with the question of the
transformation of the CAS results into PDS.
If we take the idea of generating explicit PDS seriously also for
computations we can neither just take existing systems nor follow the
approach of meta-theoretic extensions,
since\Omega mega is a classical proof
system and does not use constructive logic. On the other hand we cannot
using them even in cases, where the verification of a calculation
is much easier than the calculation itself (e.g., integration
of functions); the computation needed for verifying alone is in many
cases still much too complicated to be automatically checked without
any guidance. For instance even the proof for the binomial formula
problem for any computer algebra
system) needs more then 70 single steps in the natural deduction
calculus 2 . Thus using theorem provers or rewriting systems to find such
proofs can produce unnecessarily large search spaces and thus absorb
valuable resources. On the other hand such proofs show a remarkable
resemblance to algebraic calculations themselves and suggest the use of
the CAS not only to instantly compute the result of the given problem,
but also to guide a proof in the way of exploiting the implicit knowledge
of the algorithms. We propose to do this extraction of information not
by trying to reconstruct the computation in the MRS after the result
is generated - as we have seen, even in case of a trivial example for a
CAS this may turn out to be a very hard task for an MRS - but rather
to extend the CAS algorithm itself so that it produces some logically
usable output alongside the actual computation. Surely in most cases
a user would not like to see proofs at a level where the binomial formula
is explained (although a novice might want to). This means that a
hierarchical approach to proof generation is appropriate, in which the
abstraction level of the proof presentation can be chosen by the user.
Our approach is to use the mathematical knowledge implicit in the
CAS to extract proof plans that correspond to the mathematical computation
in the CAS. So essentially the output of a CAS should be
transferable into a sequence of tactics, which presents a high-level
description for the proof of correctness of the computation the CAS
has performed. Note that this does not prove general correctness of
the algorithms involved, instead it only gives a proof for a particular
instance of computation. The high-level description can then be used to
2 Proofs of this length are among the hardest ever found by totally automatic
theorem provers without domain-specific knowledge.
M. KERBER, M. KOHLHASE, V. SORGE.
produce a readable explanation or further expanded to a level that can
be automatically checked by proof checkers. The level of abstraction
on which the checking can take place, depends on the level of sophistication
of the proof checker. For a naive proof checker, the proof must
be expanded to an explicit calculus level. The decision to extract proof
plans rather than concrete proofs from the CAS is essential to the goal
of being verbose without transmitting too much detail.
For our purpose, we need different modes, in which we can use the
CAS. Normally, during a proof search, we are only interested in the
result of a computation, since the assumption that the computation
is correct is normally justified for established CAS. When we want to
understand the computation - in particular, in a successful proof - we
need a mode of the CAS that gives enough information to generate a
high-level description of the computation in terms of the mathematics
involved. This is is described in the next section in detail. Before
doing so we describe how the integrated system automatically solves
an extended example from an economics examination.
3.4. Extended Example
The concrete task at hand is to minimise the costs for running a
machine while producing a certain product.
Problem: The output of a machine can range over a certain interval,
the interval I = [1; 7]. The cost of the product prod is determined by
the costs of water and electricity for producing prod , which are given
by the functions
prod ffl r
prod
and the prices for water and electricity
kWh
Determine the output d in I of the machine such that the total costs
are minimal.
This example serves our purposes for several reasons. Firstly, it
allows us to show the interaction of proof planning with symbolic computation
and the extraction of proof plans from calculations. Secondly,
the mathematics involved is simple enough to be fully explained (only
simple polynomial manipulations are necessary). Thirdly, it is not an
example we created, but the problem is a slightly varied version of a
KeKoSo.tex; 24/06/1998; 14:49; no v.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 13
minimisation problem from a masters examination in economics at the
Universit?t des Saarlandes, Saarbr-ucken [WiW89].
In order to solve problems like this, we have integrated a simple CAS
into\Omega mega, called -Cas 3 .
The -Cas-system is very simple and can at the moment only perform
basic polynomial manipulations and differentiation, but it suffices
for automatically solving the example at hand. Clearly, for a practical
system for mathematical reasoning, a much more developed system
like Maple [CGG + 92], Reduce [Hea95], Axiom [JS92], or Mathematica
[Wol96] has to be integrated. The technicalities of the integration
will be described in Section 4.
For the formalisation of the example, we use the theory mecha-
nism
of\Omega mega to create a theory economy (see Figure 1) that contains
the domain-specific knowledge (both the factual and the method
knowledge) needed for the problem solution. Obviously, we need a
background theory of costs in economics (that handles both numerical
parts and denomination of cost functions) and one of minimisation
of real functions, therefore, our theory inherits material from the theories
costs and calculus. The calculus theory is provided
by\Omega mega
and contains relevant parts of the knowledge of an elementary calculus
textbook: For instance, the real numbers are introduced as a complete,
dense archimedian field (based on elementary algebraic notions such
as groups and rings defined in the respective theories). The set of real
numbers (showing the existence of such a complete, dense archimedian
field) are constructed as the quotient field of the ring of sequences of
rational numbers over the ideal of null-sequences. The rational numbers
in turn are constructed as signed fractions of natural numbers
that are defined from the Peano axioms in theory natural. All of these
mathematical theories are based on the theories function, set, and
relation, that specify naive (simply typed) set theory and the properties
of functions and relations on such sets. Finally, the whole hierarchy
builds on the theory base, which declares the underlying logic
by providing the logical connectives and quantifiers and the basic ND
inference rules.
The theory economy provides a type AE of units that covers the different
units of denominations - in our example
(for work), prod (for product) and DM (for the price). We then formalise
prices as triples consisting of one real number and two units
and cost functions as a real function together with two units (read as
input/output units). Note, that just as in the real world, addition (\Phi)
3 The -Cas system is part of the standard distribution
of\Omega mega which can
be obtained from http://www.ags.uni-sb.de/software/deduktion/omega. The
example is accessible as WiWi-Exam in the theory economy.
14 M. KERBER, M. KOHLHASE, V. SORGE.
base
set relation
struct
ordered
topology
ordered-ring
ordered-field
metric-space
natural
rational
sequences
integer
semigroup
group
ring
field
monoid
real
calculus
economy
costs
Figure
1. Theory hierarchy
in\Omega mega's knowledge base
multiplication
(\Omega ) and comparison of costs and cost functions is defined
as that of their real parts with respect to the denominations. For these
calculations we have the axioms CF1 and CF2. If two denominations
differ, we can relate them by their prices, for this purpose we use axiom
Pr.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 15
Optimisation in economy is formalised by a predicate Opt on a cost
function cf(f; DM ; prod ) and an interval I that is true, whenever f
has a total minimum 4 on I.
O Opt(cf(f; DM ; prod ); I) , 9x TotMin(x; f; I)
Thus we can state the problem as the following formula 5
where H is a set of hypotheses that are needed for the complete proof,
for instance the price axioms
The planner solves the problem by generating a high-level proof
plan consisting of methods from its domain specific method base on
economics exam questions 6 .
We are going to outline this process by describing its major steps.
In particular, we will demonstrate how the proof planner
of\Omega mega
and the -Cas-system interact, and make explicit, on which entries of
a mathematical database this interaction depends. The planner finds
the following simple proof plan:
4 The predicate TotMin and the problem solving knowledge related to it is inherited
from the theory calculus.
5 Actually the formalisation of the problem is not fully correct, since the examiner
is not only interested in the proof that there exists such an x, but he/she wants to
know the value of x as well as a proof that this value fits the requirements. Obviously,
such an answer cannot be obtained from the formula here, but only from a proof
that is constructive for the variable x, where we can extract a witness term. This
is no problem for a CAS nor for an MRS based on constructive logic, but for a
traditional MRS based on classical logic, the proof construction process has to be
refined to guarantee constructivity for x. Note that the arguments, why the witness
for x meets the requirements can still be classical and non-constructive.
this means that the proof planner may only use methods in our proof plan that are
constructive to get the wanted answer as presented here and not a non-constructive
abstract argument. Finally note that this phenomenon is another argument in favour
manipulating explicit proofs. Without this, one may find oneself in the position, that
one is convinced (by meta-theoretic arguments) of the existence of a (constructive)
proof, but in fact without one from which to extract a term witness to answer the
exam question.
6 Questions for certain standard exams are a good example for a very restricted
mathematical domain, since the proofs and calculations involved are highly stan-
dardised. Therefore finding the proof plan in this example is not a big problem for
\Omega mega.
M. KERBER, M. KOHLHASE, V. SORGE.
Mult-by-Price
3 Add-by-Denom
5 TotMin-Rolle
where the first three methods compute the actual cost function by
adjusting the denominations and adding. Method 4 uses Axiom O for
optimisation. As the example only contains polynomials of degree two,
the planner selects a method TotMin-Rolle (cf. Figure 3) for finding
total minima that makes implicit use of Rolle's theorem from the
calculus theory:
Let f be a polynomial of degree two, then f has a total minimum at
has a minimum at x and f(a) - f(x) - f(b).
Formally we get the following equivalence:
TotMin TotMin(x; f; [a; b]) , x 2 [a;
Note that Rolle's theorem is accessible in the current theory and, to
ensure correctness, the database has to contain its formal proof.
Now let us take a closer look at some of the methods in order to get a
feeling of how this initial proof plan can be expanded. In Figures 2 and 3
we have given slightly simplified presentations of the Mult-by-Price
and TotMin-Rolle method 7 .
The declaration slot of the method simply defines the meta-variables
used in the body of the method. The premises, conclusions, and the
constraint describe the applicability of the method. In the example of
Mult-by-Price, for instance, line L 4 has to be present and to be an
open subgoal, while L 1 and L 3 are lines that can be used in order to
has to be given already, whereas L 3 is generated by the
application of the method (indicated by the \Phi). Since the method is
intended to prove L 4 , after the application of the method, this line can
be deleted from the current planning state (we indicate this by the \Psi).
In the constraint slot further applicability criteria are described, which
cannot be formulated in terms of proof line schemata. Declarations,
premises, constraints, and conclusions form the specification part of
the method. In order to be able to mechanically adapt methods the
tactic part is further subdivided into the declarative content and the
procedural content. (However, this particular feature is not important
for the purpose of this paper.) In our examples the procedural content
7 We have especially adjusted the syntax of the constraint in a way that is more
comprehensive for the reader.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 17
Declarations
just
f;
Premises
Constraint
Conclusions \PsiL 4
Declarative
Content
(=subst L 3
Procedural Content schema \Gamma interpreter
Figure
2. The Mult-by-Price method from theory cost.
consists of a schema-interpreter, which essentially inserts the declarative
content (using the bindings made in the planning phase) at the
correct place in the current partial proof tree. In the concrete example
the lines L 1 through L 4 are inserted (Note that we adopted a linearised
version of ND proofs as introduced in [And80]).
In order to understand to which piece of actual proof these methods
evaluate, we have to examine the declarative content and the bindings
performed in particular in the constraint. The constraint of the
Mult-by-Price-method states a rather simple computation: if there is
a cost function in the given open line which has a denomination other
than DM, it is multiplied with the appropriate price. The multiplication
of the real parts is carried out by the CAS and the corresponding cost
function is constructed. As this point is crucial for understanding the
working scheme of a method we will view the bindings in the constraint
step by step: When applied to the current plan the method is matched
with the open goals of the planning state. The first pass of the planner
yields that L 4 can be matched with our theorem THM. Thus its formula
Opt([cf(-d 0:5d
is bound to the meta-variable OE. It is then examined to find an occurrence
of a cost function. If such a subterm exists its arguments are
bound to g; v; w and by matching line L 1 we receive the numerical part
of price in f (if the appropriate price is not provided the application of
the method would fail here). Afterwards the new cost function is com-
M. KERBER, M. KOHLHASE, V. SORGE.
puted (according to axiom Pr) in / 0 and finally OE 0 contains the result
of replacing the old cost function in OE by / 0 . Hence in the first plan
step the optimisation formula stored in OE 0 contains the cost function
cf(-d prod ) as a subterm.
With all these meta-variables instantiated the subproof contributed
by the Mult-by-Price-method consists of lines L 2 and L 3 in the
declarative content. Here we observe that L 2 results from applying the
price-axiom Pr (which is fetched from the database) to line L 1 . Furthermore
note that in L 3 we have a call to the CAS as a justifying
method for the line. This means that at this point in the proof planning
procedure, the CAS is called in order to compute the product of
price and original cost function. The line resulting from this calculation
is then used as the new open subgoal in the planning state.
Summarising the effects of the method Mult-by-Price can be
observed in two steps. First the goal line THM is justified with the
method yielding the following subproof:
Then the method in the justification of line THM (which has been
abbreviated due to a lack of space) could be expanded thereby inserting
the intermediate steps as described above by instantiating the macro
steps of the method. Note that the following expanded subproof is at
a more detailed level of abstraction in the PDS. In particular, the
justification of THM itself is different at this level.
cf(-d
In the proof of THM, the method Mult-by-Price is applied twice
in order to normalise both summands. To preserve space we will
not present the next two methods of our proof plan as extensively
as the Mult-by-Price-method. Add-by-Denom is very similar to
Mult-by-Price and applies axiom CF1 inside the optimisation function
Opt to compute the final cost function. In its course the CAS is called
once to perform a polynomial addition. Then the Optimise-method
simply introduces the definition for the Opt function of axiom O.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 19
Declarations
just
Premises
Constraint degree(OE)
y / compute with CAS(minimum; OE)
Conclusions \PsiL 12
Declarative
Content
(a
Procedural Content schema \Gamma interpreter
Figure
3. The TotMin-Rolle method from theory calculus.
Far more interesting than these two methods is the TotMin-Rolle-
method as it contains a different example for the use of a CAS in
\Omega mega. Again the presentation of the method in Figure 3 is simplified.
The TotMin-Rolle method is applied at a stage of the proof where
the actual minimum of the cost function has to be introduced. This task
is fulfilled within the constraint of the method. The compute with CAS
statement actually calls the CAS in quiet mode to compute the minimum
of the function OE and store it in the meta-variable y. At this
stage, the CAS is used as an oracle here, just as in [HT93a]. In our
example the minimum of the cost function is at and the ND-line
of the form
will be transformed by eliminating the existentially quantified variable:
M. KERBER, M. KOHLHASE, V. SORGE.
The rest of the proof plan is devoted to proving that the result is actually
a total minimum. This is done by using the definition for TotMin
from the database and furthermore by using the definitions for minimum
and interval which correspond to line L 1 and L 2 in the method
TotMin-Rolle. These definitions are introduced in lines L 9 through L 11
by applying them to the correct assertions given in lines L 3 through
L 8 . This is expressed by the justifications in the corresponding lines; for
instance, the justification of line L 10 states that we can infer y 2 [ff; fi]
from the lines L 5 and L 6 with the definition of interval in line L 2 .
A closer look at the justifications of lines L 3 through L 8 reveals that
these contain methods themselves. Lines L 3 and L 4 again depend on
calculations of the CAS which computes the first and second derivative
of our cost function. The justifications Simplify correspond to a method
performing basic arithmetic simplifications and comparisons.
Consisting of only 5 methods the above proof plan gives the impression
of a small proof and on an abstract level it is indeed; an experienced
mathematician might not want to see more. But expanding the plan
into a partially grounded ND proof gives it a length of 90 lines, containing
lines justified by the CAS. The proof on this level may roughly
correspond to a proof that a novice would like to see and that would
form a reasonable solution of the exam problem once it is presented in
natural language by the Proverb system. By rerunning the CAS in a
proof plan generating mode on the CAS-justifications and extracting
proof plans, the proof can be expanded to a more detailed proof plan
containing an account of the mathematics behind the calculations. This
proof plan already contains 135 plan steps and - if the user does not
feel comfortable with the level of detail yet - can then be expanded
to a calculus-level ND proof of length 354. Note that even this proof
is not a stand-alone proof of the minimisation theorem, but depends
on the proofs of a number of lemmata from a database. Furthermore,
in these proofs the simplification of ground arithmetic expressions is
not expanded, for instance, into a representation involving zero and
the successor function either, which would be necessary to obtain a
detailed logic-level proof.
4. Integrating Computations into Explicit Proofs
In this section we describe Sapper (System for Algorithmic Proof
Plan Extraction and Reasoning), which generates proof plans from
CAS output. As mentioned in Section 3.3, for the intended integration
KeKoSo.tex; 24/06/1998; 14:49; no v.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 21
it is necessary to augment the CAS with mathematical information for a
proof plan generating mode in order to achieve the proposed integration
at the level of proofs. For the -Cas system, which we have developed
to demonstrate the feasibility of the approach, this was rather simple, as
we will demonstrate below. Enriching a state of the art CAS with such
a mode for producing the necessary additional protocol information,
would of course require a considerable amount of work.
4.1. Architecture
The Sapper system can be seen as a generic interface for connecting
\Omega mega (or another proof plan-based mechanised reasoning system)
with one or several computer algebra systems (see Figure 4). An incorporated
CAS is treated as a slave
to\Omega mega which means that only
the latter can call the first one and not vice versa. From the software
engineering point of
view,\Omega mega and the CAS are two independent
processes while the interface is a process providing a bridge for com-
munication. Its r-ole is to automate the broadcasting of messages by
transforming output of one system into data that can be processed by
the other 8 .
Unlike other approaches (see [HC95, GPT96] for example) we do
not want to change the logic inside our MRS. In the same line, we
do not want to change the computational behaviour of the computer
algebra algorithms. In order to achieve this goal the trace output of the
algorithm is kept as short as possible. In fact most of the computations
for constructing a proof plan is left to the interface. The proof plans
can directly be imported
into\Omega mega.
This makes the integration independent of the particular systems,
and indeed all the results below are independent of the CAS employed
and make only some general assumptions about the MRS (such as being
proof plan-based). Moreover, the interface approach helps us to keep
the CAS free of any logical computation, for which such a system is not
intended anyway. Finally, the interface minimises the required changes
to an existing CAS, while maintaining the possibility of using the CAS
stand-alone. The only requirement we make for integrating a particular
CAS is that it has to produce enough protocol information so that a
proof plan can be generated from this information. The proof plan in
turn can be expanded by the MRS into a proof verifying the concrete
computation.
The interface itself can be roughly divided into two parts; the translation
part and the plan generator. The first performs syntax translation
between\Omega mega and a CAS in both directions while the latter
8 This is an adaptation of the general approach on combining systems in [CMP91].
22 M. KERBER, M. KOHLHASE, V. SORGE.
Hypotheses
Theorems
Methods
Tactics Tactics
Methods
Theorems
Hypotheses
Interface
Structured Database
Theory 1
Theory 1.1 Theory 1.2
Theory 2
result
access
access
plan tactics
knowledge
call
result
Plan Generator
Translator
Function Mappings
call
args.
Abstract
-CAS
Figure
4. Interface
between\Omega mega and computer algebra systems
only transforms verbose output of the CAS
to\Omega mega proof plans.
Clearly only the translation part depends on the particular CAS that
is invoked.
For the translations a collection of data structures - called abstract
CAS 9 - is provided each one referring to a particular connected CAS
(or just parts of one). The main purpose of these structures is to specify
function mappings, relating a particular function
of\Omega mega to a corresponding
CAS-function and the type of its arguments. Furthermore
it provides functionality to convert the given arguments of the mapped
\Omega mega function to CAS input. In the same fashion it transforms results
of algebraic computations back into data that can be further processed
by\Omega mega. The functionality in this part of our interface offers us the
possibility of connecting any CAS as a black box system, as in the first
approach we have described in Section 2. For instance, we may want to
use a very efficient system without a mode for generating proof plans in
9 In a reimplementation of Sapper we would probably use the OpenMath protocol
[AvLS96] as a lingua franca on the CAS side.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 23
proof search as black box system, and then another less efficient system
with such a mode for the actual proof construction, once it is clear what
the proof should look like. This corresponds to recent techniques used
in knowledge based systems, where the explanation component is not
just a trace of the rules applied during the search, but the explanation
is reconstructed by an independent component.
The plan generator solely provides the machinery for our main goal,
the proof plan extraction. Equipped with supplementary information
on the proof
by\Omega mega it records the output produced by the particular
algebraic algorithm and converts it into a proof plan. Here the
requirements of keeping the CAS side free of logical considerations and
on the other hand of keeping the interface generic seem conflicting at
the first glance. However, this conflict can be solved by giving both sides
of the interface access to a database of mathematical facts formalising
the mathematics behind the particular CAS algorithms. Conceptually,
this database together with the mappings governing the access, provides
the semantics of the integration
of\Omega mega with a particular CAS. Thus
expanding the plan generator is simply done by expanding the theory
database by adding new tactics.
While\Omega mega itself can access the complete database, Sapper's
plan generator in the interface is only able to use tactics and lookup
hypotheses of a theory (cf. Figure 4). The CAS does not interact with
the database at all: it only has to know about it and references the
logical objects (methods, tactics, theorems, or definitions) in the proof
plan generating mode. Thus knowledge about the database is compiled
a priori into the algebraic algorithms in order to document their calculations
4.2. Proof Plan Extraction
Let us now take a closer look at the implementation of the proof plan
generation in -Cas and at the expansion process of its output. This
should demonstrate how proofs can be extracted from computer algebra
calculation and provide an intuition on the requirements that our
approach poses on the CAS side.
As an example we will consider a polynomial addition from the
example above. Normally, an experienced mathematician would not
like to see any proof at all for that, while a high-school student
would like to. As we have seen in our example, the main purpose
of the Add-by-Demon-method is to compute the final cost function
prod ). This is done in -Cas by adding
the two polynomials -d d 3. In the remainder
of this subsection we will expand this addition in several steps and
thereby obtain a calculus level proof for the computation.
M. KERBER, M. KOHLHASE, V. SORGE.
Before examining this example in detail, let us consider the general
scheme of the proof plan generation inside the polynomial addition
algorithm of -Cas. We first take a look at the different representations
of a polynomial p in the variables x
r . The
logical language
of\Omega mega is a variant of the simply typed -calculus
(indeed we use a stronger type system, but here we want to keep things
as simple as possible), so the polynomials are represented as polynomial
functions, that is, as -expression where the formal parameters
are -abstracted (mathematically, p is a function of r argu-
For the notation, we use a prefix notation; the symbols +, and "
denote binary functions for addition, multiplication and exponentiation
on the reals. In this representation, we can use fi-reduction for the
evaluation of polynomials.
In -Cas, we use a variable dense, expanded representation as an
internal data structure for polynomials (as described in [Zip93], for
instance). Thus every monomial is represented as a list containing its
coefficient together with the exponents of each variable. Hence we get
the following representation for p:
Let us now turn to the actual -Cas algorithm for polynomial
addition. This simple algorithm adds polynomials p and q by a
case analysis on the exponents 10 with recursive calls to itself. So let
r and
r . We have presented the
algorithm in the jth component of p and the kth component of q in a
Lisp-like pseudo-code in Figure 5. Intuitively, the algorithm proceeds
by ordering the monomials, advancing the leading monomial either of
the first or the second arguments; in the case of equal exponents, the
coefficients of the monomials are added.
Obviously, the only expansions of the original algorithm needed for
the proof plan generation are the additional (tactic.) statements 11 .
We assume a lexicographic monomial order and employ it for ordering the
exponents. Thus we make use of the operators ?, !, and = in an intuitive sense.
Furthermore we can define the rank of a monomial as the vector given by its exponents
and the rank of a polynomial as the maximum rank of its monomials with
respect to the lexicographic monomial order.
11 Observe that in this case, the called tactics do not need any additional argu-
ments, since our plan generator in the interface keeps track of the position in the
KeKoSo.tex; 24/06/1998; 14:49; no v.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 25
(poly-add (p q)
(tactic "mono-add")
(cons-poly
er j
r
(poly-add
r
r
(tactic "pop-first")
(cons-poly ff j x
er j
r
(poly-add
r
r
(tactic "pop-second")
(cons-poly
r
(poly-add
r
r )))
Figure
5. Polynomial addition in -Cas.
They just produce the additional output by returning keywords of tactic
names to the plan generator and do not have any side effects. In
particular, the computational behaviour of the algorithm does not have
to be changed at all.
If we now apply this algorithm to the two polynomials
we obtain the following proof plan:
(mono-add, pop-second, mono-add)
First the two quadratic monomials from p and q are added, then the
linear term of q (the second argument) is raised, since it only appears
in one argument, and finally the remaining monomials are added up.
In the case of the polynomial addition, each of the methods (proof
plan operators) directly corresponds to a tactic with the same name,
that is, the list of the three methods above directly represents a concrete
proof plan for polynomial addition of the concrete polynomials p and
proof and thus knows on which monomials the algorithm works when returning a
tactic. This way we need not to be concerned which form a monomial actually has
during the course of the algorithm.
26 M. KERBER, M. KOHLHASE, V. SORGE.
q. (In the following representation we omitted the context in which the
polynomials are embedded in the actual proofs.)
These four lines correspond to a step-by-step version of the basic
High School algorithm. So far the expansion of the call-cas-method
has been exclusively done by -Cas proof plan generation mode. But
at this stage -Cas cannot provide us with any more details about the
computation and the subsequent expansion of the next hierarchic level
can be achieved without further use of a CAS.
Let us for instance take a look at the pop-second tactic to understand
its logical content. The tactic itself describes a reordering in a
sum that looks in the general case as follows:
For the current example we can view a and c as arbitrary polynomials
and b as a monomial of rank greater than that of the polynomial a.
It is now obvious that the behaviour of pop-second is determined by
the pattern of the sum it is applied to. If in equation (1) the polynomial
c does not exist, pop-second is equivalent to a single application
of the law of commutativity. Otherwise, like in our example, the
tactic performs a series of commutativity and associativity steps. The
pop-second step above can thus be expanded in a plan which reflects
the single step applications of the laws of commutativity and associativity
Assuming we have expanded the two mono-add tactics as well, we
have constructed a representation of the proof at a level where it only
needs the axioms in the polynomial ring. To finally expand this to a fully
explicit calculus level proof, we further expand all three justifications
of the above lines. This leads to a sequence of eliminations of universally
quantified variables in the corresponding hypothesis, the axioms
of commutativity and associativity. In our example the commutativity
axiom would be transformed in the following fashion:
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 27
Here, the justification (THM) in the first proof line indicates that
the commutativity of was imported from the theory real
in\Omega megas
mathematical database, where it was established as a theorem. The
remaining lines are natural deduction inferences: universal eliminations
that instantiate a with the number 6 and b with the term \Gamma12x.
Altogether this single application of the pop-second-tactic is equivalent
to a calculus-level proof of 11 inference steps. The length of the
subproof for this trivial polynomial addition is 43 single steps. This
example shows how it is possible to mechanically construct a proof
verifying the correctness of any particular CAS computation without
verifying the CAS algorithm (or their implementation) in the general
case.
However, the calculus level proofs for the computations are very long
and rather boring and therefore hardly any human user might actually
want to see much less read them. Therefore the Proverb proof explanation
system
in\Omega mega provides a more realistic alternative, since it
gives the user access to representations of the parts of the proof on
various levels of abstractions making use of the hierarchical structure
of the underlying PDS. For instance, it is then possible to present
the computations with some intermediate steps, as it is customary in
textbooks. For example, we could include the three steps of the High
School algorithm mentioned above, to illustrate the polynomial addi-
tion. (The decision which steps should be included and which omitted,
depends of course on the expertise of readers for which a particular
proof presentation is intended.)
Despite all these abstractions in both developing and presenting the
proof, we can still use any proof checker for ND-calculus to verify all
steps including computations. Furthermore, if we assume we have a
more sophisticated proof checker, for example one that works modulo
the axioms of polynomial rings, it is also possible to check the proof
on an abstract level. As already mentioned, the more sophisticated the
proof checker is, the more concise the communicated proofs can be.
We have tested proof plan extraction from simple recursive and iterative
CAS algorithms, where it works quite well, since these algorithms
closely correspond to the mathematical definitions of the corresponding
concepts. However, more complicated schemes like divide-and-conquer
algorithms (for instance, the polynomial multiplication of Karatsuba
and Ofman [KO63]) cannot be adapted to our approach so easily without
extending the mathematical knowledge base by corresponding lemmata
28 M. KERBER, M. KOHLHASE, V. SORGE.
The example of the polynomial addition is surely a trivial one, we
have chosen it solely for presentation reasons. In particular it is very
likely to be correct in any real-world implementation, since it is well
tested and does not depend on sophisticated mathematical theorems
for which fuzzy boundary cases must be considered. For the sake of
argument, let us assume an error in the implementation, for instance,
in the second case of the polynomial addition algorithm in Figure 5
the cons-poly statement was forgotten, so that the algorithm has the
following (incorrect) form
(tactic "pop-first")
(poly-add
r
In the computation of ((x 2 that we have discussed
above, the second case is never used, and the computation would be
correct although the program is not.
If we now change the order of addition of our polynomials p and q to
we get the following incorrect result from the changed algorithm:
Inserting the proof plan generated by the faulty algorithm then yields
In checking, the proof checker would see that the pop-first step is
not justified, since the expansion corresponds to the application of the
law of associativity. This would yield
and thus would not be applicable during the expansion. Thus the proof
plan and consequently the calculation would be rejected
by\Omega mega.
Note that in a large system with literally millions of possible cases,
the correctness of a calculation like depends only
on a tiny subset of the whole program. It is a strength of our approach,
that only the calculations that are necessary for a given proof would be
checked. This has the advantage that errors on different levels can be
detected (in particular, on the levels of algorithms, of compilers, and
of processors). Of course, for very long computations checking can be
pretty expensive. Moreover, highly elaborated and efficient algorithms
in state of the art CAS might be hard to augment with proof plan
KeKoSo.tex; 24/06/1998; 14:49; no v.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 29
generation modes. As we have seen in the example above, the mathematical
knowledge in the database has to reflect the mathematical
knowledge in the algorithm in order to easily decorate the algorithms
by a proof plan generation mode. However, to extend and prove corresponding
lemmata is not a trivial task for sophisticated algorithms.
In particular such an approach would go very much in the direction of
program verification.
Even if it proves practically impossible to extract the information
that is valuable at the conceptual, mathematical level, it is always possible
to reserve these elaborated techniques for the quiet mode used in
proof discovery, and use more basic algorithms, for which the mathematics
is easier and that are more easily decorated by a proof plan generation
mode, for the proof extraction phase. Systems like Axiom [JS92]
or MuPAD [Fuc96] seem to come closest among standard CAS to the
needs for a proof plan generation, since one can already attach axiomatisations
to algorithms.
5. Conclusion
In this work we have reported on an experiment of integrating a computer
algebra system into the interactive proof development environ-
ment\Omega mega, not only at the system level, but also at the level of
proofs. The motivation for such an integration is the need for support
of a human user when his/her proofs contain non-trivial computations.
We have shown that the proof planning paradigm in general and the
\Omega mega system in particular provide an open environment for such an
extended integration that supports different integration levels.
In our approach it is not possible to use a standard CAS for the
integration as it is, since such a system provides answers, but no directly
usable justifications from which proof plans can be extracted. This,
however, turned out to be essential in an environment that is built to
construct communicable and checkable proofs.
In order to achieve a solution that is compatible with such a strong
requirement, we have adopted a generic approach, where the only
requirement for the CAS is that it has a proof plan generation mode for
the generation of communicable and checkable proofs. Since we want to
achieve the two goals simultaneously, namely to have high-level descriptions
of the calculations of the CAS for communicating them to human
users as well as low-level ones for mechanical checking, we represent
the protocol information in form of high-level hierarchical proof plans,
which can be expanded to the desired detail. Fully expanded proof
plans correspond to natural deduction proofs which can be mechani-
M. KERBER, M. KOHLHASE, V. SORGE.
cally checked by a simple proof checker. In the case that the CAS has
made a mistake the proof checker will detect it.
The general idea and the fundamentals of the integration of a CAS
into an MRS are independent from the concrete proof development
environment\Omega mega and the concrete computer algebra system -Cas.
It can be realised in any plan-based theorem prover. Proof extraction
can even be realised on any tactic-based system and with any CAS
that can protocol its calculations in form of tactics. Axiom [JS92] and
MuPAD [Fuc96] seem to be best suited for a corresponding extension
since one can already attach axiomatisations to algorithms. If in addition
the algorithms could be enriched in a way that they produce protocol
information in every computation step, that is, state which of the
attached axioms are used and what the particular instantiations are,
the system would probably fit in with our approach pretty well.
A useful extension of our approach would consist in the usage of
various algorithms for the same computation, for instance, one as a
fast and efficient algorithm that is not suitable for knowledge extraction
while searching for a proof. Afterwards, when actually documenting the
whole proof a less efficient algorithm, which is optimised to find short
proofs, can provide a complete proof plan.
Although the correctness issue can be achieved by a tactic-based
approach as well and does not need the specifications that are used in
proof planning, the full strength of an integration where considerable
automated support is provided cannot be achieved on this level, since
it is not possible to perform mechanical reasoning about the tactics.
Such an automation can, however, be achieved by the proof planning
approach, where the proof planner can automatically call a CAS pro-
cedure, when the conditions in the corresponding method are met. The
usefulness of an integration on this level can already be seen in the case
of our simple -Cas: After the integration we are able to prove optimisation
problems which were out of reach without such a support. On
the other hand, the system is able to give explanations of the involved
computations at various levels of abstraction. A feature that is missing
from todays CAS.
From our experiments we expect that the successful integration of
any powerful computer algebra systems would considerably enhance
the reasoning power of any mechanised reasoning system.
Acknowledgements
The work presented in this paper was supported
by the "Deutsche Forschungsgemeinschaft" in SFB 378, project
OMEGA. It benefited a lot from discussions in the Calculemus interest
group.
INTEGRATING COMPUTER ALGEBRA INTO PROOF PLANNING 31
The authors would like to thank Lassaad Cheikhrouhou for his help
with\Omega mega's proof planner and with coding the methods for our
examples. Furthermore, we would like to thank Deepak Kapur and the
anonymous referees for carefully reading earlier versions of the paper
and for their detailed comments that helped us to improve the presentation
considerably.
--R
Transforming matings into natural deduction proofs.
Objectives of OpenMath.
Technical Report 12
Computations and formal proofs in type theory.
Theorems and algorithms: An interface between Isabelle and Maple.
Rippling: A heuristic for guiding inductive proofs.
Symbolic Computation (An Editorial).
Using Mathematica for Doing Simple Mathematical Proofs.
"Intelligenzniveaus"
The use of explicit plans to guide inductive proofs.
Machine Proofs in Geome- try: Automated Production of Readable Proofs for Geometry Theorems
Mechanical geometry theorem proving.
Integrated software compo- nents: A paradigm for control integration
Implementing Mathematics with the Nuprl Proof Development System.
Reasoning theories - towards an architecture for open mechanized reasoning systems
An open environment for doing mathe- matics
Reduce user's manual: Version 3.6.
Computational metatheory in Nuprl.
Adapting methods to novel tasks in proof planning.
Presenting machine-found proofs
Extending the HOL theorem prover with a computer algebra system to reason about the reals.
Reasoning about the reals: The marriage of HOL and Maple.
AXIOM: The Scientific Computation System.
A refutational approach to theorem proving in geometry.
Otter 3.0 reference manual and guide.
The Mathematica Book: Version 3.0.
Mechanical Theorem Proving in Geometries: Basic Principles.
Texts and monographs in symbolic computation.
Effective Polynomial Computation.
Address for correspondence: Manfred Kerber School of Computer Science The University of Birmingham Birmingham B15 2TT
--TR
--CTR
Andreas Meier , Martin Pollet , Volker Sorge, Comparing approaches to the exploration of the domain of residue classes, Journal of Symbolic Computation, v.34 n.4, p.287-306, October 2002
Paul Cairns , Jeremy Gow, Integrating Searching and Authoring in Mizar, Journal of Automated Reasoning, v.39 n.2, p.141-160, August 2007
Micheal Kohlhase , Andreas Franke, MBase: representing knowledge and context for the intergration of mathematical software systems, Journal of Symbolic Computation, v.32 n.4, p.365-402, October 2001 | computer algebra;proof checking;hierarchical proof planning;mechanized reasoning |
594248 | Ordered Semantic Hyper-Linking. | The ordered semantic hyper-linking strategy is complete for first-order logic and accepts a user-specified natural semantics that guides the search for a proof. Any semantics in which the meanings of the function and predicate symbols are computable on ground terms may be used. This instance-based strategy is efficient on near-propositional problems, is goal sensitive, and has an extension to equality and term rewriting. However, it sometimes has difficulty generating large terms. We compare this strategy with some others that use semantic information, and present a proof of soundness and completeness. We also give some theoretical results about the search efficiency of the strategy. Some examples illustrate the performance of the strategy. | Introduction
There are at least two basic approaches to the study of automated deduction. One
approach concentrates on solving hard problems, especially those of interest to
human mathematicians. There have been some notable successes in this area, and
even some proofs of hitherto unproven conjectures. This has served to give the
field of automated deduction some respectability among mathematicians and the
general public. Such proofs may be done with or without human interaction. For
this approach, it is of secondary interest whether the prover that solves these hard
problems is very weak for other, easy problems. Another approach to automated
deduction concentrates on building provers that perform well on a broad range of
problems, with a minimum of human interaction. In this approach, it does not make
sense to try hard problems if one's prover still has difficulty with easy problems.
The philosophy is to develop as far as possible theorem provers that have general
problem solving ability. The advantage of this approach is that one is likely to obtain
provers that are more well-rounded, and in the long run possibly more powerful; a
disadvantage is that the results may appear less spectacular, especially in the early
stages.
We have concentrated on the latter approach. In this endeavor, we have developed
a number of provers over the recent years, including the modified problem
reduction format of [Pla88] and its extensions, the clause linking method of [LP92],
and clause linking with semantics [CP94a], among others. We have emphasized
first-order logic without equality. These provers have become increasingly more
powerful, each able to solve a considerable range of problems out of reach of its pre-
decessor, with little or no human guidance. In addition, these provers can compete
respectably with well-known powerful theorem provers on certain types of problems.
For this, we have emphasized Prolog implementation, as a way to rapidly implement
and test a wide variety of ideas with little manpower. This means that our
provers have a disadvantage with respect to provers carefully implemented in C or
LISP, since the underlying language is less efficient; despite this, the performance
has been impressive. We now would like to carry this investigation a step further,
and incorporate some kind of ordering methods.
hyper-linking [CP94a] was developed to retain the propositional advantages
of hyper-linking [LP92] while adding natural semantics and goal-sensitivity
[Pla94a]. We discuss the issues of propositional efficiency and goal-sensitivity in
[Pla94a, Pla94b], thereby highlighting what we feel are some inefficiencies in many
common theorem proving strategies. Even hyper-linking without semantics performs
much better than resolution and similar strategies on some hard problems,
particularly non-Horn problems. We show in [CP94a] that hyper-linking with semantics
is sometimes much better still. However, there are still some problem with
semantic hyper-linking that we would like to solve. The cooperation between semantic
hyper-linking and rough resolution does not seem as clean as it could be.
Rough resolution [CP93b] is a version of ordered resolution developed to eliminate
large literals from proofs; this is helpful because semantic hyper-linking has difficulties
generating such large literals. Therefore the cooperation of these two methods
seems attractive, and indeed, we show in [CP93b] that this cooperation improves
the effectiveness of semantic hyper-linking on a number of problems. However, the
definition of rough resolution seems arbitrary; the logical way to eliminate large literals
is to use ordered resolution, as described in [BG90, HR91]. Also, the manner
in which the semantic tree is constructed and searched seems to have an arbitrary
element to it; this also makes this part of the method harder to describe formally. In
addition to semantic hyper-linking and rough resolution, UR (unit resulting) resolution
is a component of the prover described in [CP94a]. The motivation for this is
that rough resolution eliminates large literals from proofs, UR resolution eliminates
the Horn parts of proofs, and what remains is a non-Horn proof with small literals;
clause linking performs well on such problems. However, the Horn property is really
irrelevant here, since clause linking performs well on problems with small literals,
whether they are Horn problems or not. Therefore it seems logical to eliminate
UR resolution. Also, the choice of which rough resolutions and UR-resolutions are
performed seems to be arbitrary, to some extent; we prefer small clauses and small
proofs, essentially. Our motivation in the development of ordered semantic hyperlinking
is to simplify semantic hyper-linking as much as possible, and in this way
hopefully to extend its peaks of strength to a wider class of problems. This should
also allow for a small and easily understood implementation.
In addition, we are interested in removing some of the propositional inefficiencies
from term-rewriting based theorem proving strategies. Such strategies essentially
reduce to A-ordering [Sla67] on first-order logic without equality. However,
in [Pla94b] we show some simple sets of clauses on which A-ordering produces an
exponential search space, regardless of the ordering chosen. On the other hand,
term-rewriting methods are often very efficient, and extend naturally to other specialized
theories [BG94]. Furthermore, certain sets of clauses are easily decided by
strategies based on ordering [FLTZ93]. That is, these ordering based strategies are
a decision procedure, always terminating and indicating whether the set of input
clauses is satisfiable or not. However, these sublanguages of first-order logic are
not decidable in this way by clause linking. Therefore, we would like to present
semantic clause linking in a format that facilitates the transition to term-rewriting
based theorem proving strategies, thereby also providing a way to remove some of
their notable inefficiencies, while preserving some of their advantages.
The idea of semantic hyper-linking is to show that a set S of clauses is unsatisfiable
by the failure of a systematic search for a model of S. Ordered semantic
hyper-linking is similar, but it organizes the search a little differently. The basic
principle behind ordered semantic hyper-linking is the following: Suppose we have
a set of independent choices to make in a process of examining a set
of possibilities. Thus there are potentially 2 n combinations of choices altogether.
Then we assume that there is an ordering on these choices, and we make the simplest
choice first. Suppose p 1 is the simplest of the choices; then we first consider
the alternatives p 1 and not(p 1 ). For each such alternative, we recursively attempt
to solve the problem. The reasoning is that we may solve the problem before the
more complex choices are even seen, thereby saving effort. This seems to be a natural
strategy from the standpoint of human problem solving. In the application to
theorem proving, the set of choices is infinite, and the order in which they are made
has other implications, but the idea is still the same.
Furthermore, a problem with semantic hyper-linking is that sometimes the enumeration
of ground terms is necessary. We would like to have a method that is
based on unification instead of on the enumeration of ground terms. The proposed
method incorporates unification in a natural way, and for certain kinds of semantics
we show that the enumeration phase can be done in polynomial time. There is
an additional reason to believe that this new version will have better performance.
The work required by semantic hyper-linking is strongly influenced by the number
of "eligible literals" that are generated. The proposed method should reduce
this number, thereby making the method more efficient and permitting proofs that
require more rounds of search.
We also consider some complexity issues, as discussed in part by [Gou94]. His
approach is non-clausal, but the same analysis applies to a clausal framework. He
shows that the fundamental problem associated with the mating [And81] or connection
[Bib87] approach is \Sigma p
2 complete. These approaches first choose a number
of copies of each of the input clauses, and then seek to find a single substitution
that makes the given set of copies of the clauses propositionally unsatisfiable. (For
a general set of clauses, an arbitrary number of copies may be needed.) Goubault's
result has the consequence that the effort to prove a theorem is at worst exponential
in the size of a minimal proof, using a suitable implementation of these approaches,
where proof size is measured by the number of instances of the input clauses that
appear in the proof. More precisely, if S is the set of input clauses and each clause
appears at most n times in the proof, then the effort is exponential in n times the
size of S, written as a character string. This is actually not a bad bound; many
other methods are considerably worse, at least relative to this measure of proof size.
For example, clause linking can be double or even triple exponential in this measure
of proof complexity. The reason is that a proof containing n copies of the input
clauses may involve a number of unifications proportional to n; each such unification
can increase the size of the terms by a constant factor. Thus terms that are
exponentially large can be generated, the number of terms within this exponential
size bound is double exponential, and the time to handle a double exponential set
of ground clauses can be triple exponential. By altering the measure of term size,
so that repeated subterms are counted only once, this can be reduced to double
exponential. We consider the behavior of ordered clause linking and argue that
although the worst-case bound is double exponential, there is reason to believe that
in many cases this performance will be single exponential or even better. Of course,
there may be proofs in which many copies of the clauses are needed but the term
sizes are all small; for such clauses, clause linking would probably be faster than
the mating approach.
It is interesting that our proposed theorem prover incorporates a number of
well-known AI techniques, including case analysis, explanation-based generaliza-
tion, procedural semantics (to describe the semantics of the set of clauses), back-
tracking, ordering criteria, and of course unification and first-order logic. Therefore
this prover may have some independent interest from the standpoint of artificial
intelligence.
2 Orderings on Interpretations and Clauses
The idea of ordered clause linking with semantics is to place a total ordering on
the set of atoms, and then based on this to define a lexicographic total ordering
on the set of interpretations of these atoms. Now, semantic hyper-linking can
be seen as a systematic search for a model of a set S of clauses; if this search
fails, then we know that S is unsatisfiable. During this search, a semantic tree
is essentially constructed. Ordered semantic hyper-linking works in a similar way.
In fact, both strategies are somewhat similar to model elimination in this respect
[Lov69]; this similarity may be more apparent for ordered semantic hyper-linking
than for semantic hyper-linking. However, instead of a semantic tree, we have a
transfinite semantic tree, as in [HR91]. Also, in ordered semantic hyper-linking we
specify more precisely how this tree is constructed. That is, the interpretations
are examined in a sequence I consistent with the total ordering; the first
interpretation I 0 to be considered is the one that is least in this ordering. For this
interpretation we find a clause C 0 not satisfied by I 0 ; this clause is a minimal such
contradicting clause in a specified ordering on clauses. The next interpretation I 1
considered is the smallest interpretation that is not "obviously" contradicted by the
clauses found so far (in this case, C 0 ). The search continues in this manner, so we
have I only is the sequence in which the
interpretations are examined completely determined in this way, but the choice of
which clauses C i are found is also largely determined (up to minimality). If S is
unsatisfiable, eventually the set fC will be unsatisfiable; this will
be detected by the prover, and the search will stop.
We now define these orderings on atoms and interpretations more precisely.
We assume that some first-order language is specified in terms of a finite set F
of function and constant symbols, a finite set P of predicate symbols, and a list
X of variables. Then we are interested in the satisfiability problem of sets S of
first-order clauses over this language. Let T be the set of terms formed from
the function symbols F and the variables X , and let T (F) be the set of ground
terms (terms without variables) formed from T and F . Let A be the set of atoms,
that is, expressions of the form P
For orderings !, we define x ? y as equivalent to y ! x. A partial ordering
is said to be well-founded if there are no infinite sequences x
We assume that there is a total well-founded ordering ! on A. If
the ordering is order-isomorphic to !, then A can be enumerated as A 1
this will not be possible if the ordering corresponds to
a higher ordinal. The ordering on A may be based on the size (number of symbol
occurrences) in the atoms A i , or it may be one of the orderings used to show the
termination of term-rewriting systems [DJ90, Pla93]. Of course, there are also other
possibilities.
We now specify the ordering on interpretations. A literal is an atom or an atom
preceded by a negation sign :. A literal without a negation sign is called positive
and one with it is called negative. The literals L and :L are called complementary.
We write L for the complement of L; thus if L is positive then L is :L, and :L is
L. If A 2 A, then we call A and :A literals over A. An interpretation I is (for our
purposes) a subset of A, or, equivalently, a mapping from A to ftrue; falseg. If I
maps A to true then we write I j= A and say that I satisfies A. Otherwise, I 6j= A
and we say that A contradicts I. We say that I j= :L iff I 6j= L. We say that two
interpretations I and J agree on a literal L if (I
assign L true or they both assign L false. If I and J are two distinct interpretations
of A, let d(I; J) be the least atom A (with respect to !) such that I and J do not
agree on A. Such a least atom must exist, because the ordering on atoms is well-
founded. Let I 0 be a special interpretation called the initial interpretation; this
is typically supplied by the user. We order the interpretations with respect to I 0
as follows: Let I and J be two different interpretations of A. Let A be d(I; J).
Then if I agrees with I 0 on A, we say I I. Thus the smallest
literals have the greatest influence on the ordering, and the interpretations that
agree with I 0 are smaller in the ordering than interpretations that disagree with I 0 ,
other things being equal. Note that I 0 is the minimal interpretation in this ordering.
This ordering on interpretations is not well-founded, if A is infinite. Still, it turns
out that certain sets of interpretations of interest to us have minimal elements.
We will mainly be interested in interpretations that differ from I 0 in finitely many
places; we now develop some of their properties.
Definition 2.1 Given an interpretation I of A and literals L i over A, let I[L
be defined as follows:
(a) Lng or if
(b) L 62 fL Lng and I
Thus like I except for the finite list [L
ceptions;" for an earlier use of this notation see [CP94a].
Theorem 2.2 Suppose I is an interpretation over A and
Proof. If I ! J , then I and J are unequal; thus there must be a literal d(I; J). If
agrees with I 0 on the atom d(I; J), so J ! I. 2
This result classifies the interpretations that are smaller than I
into n distinct groups, depending on which L i is equal to d(I; J).
We now specify the ordering on literals and clauses. We order literals so that
if A and B are atoms and A ! B then A ! B (as literals), A ! :B, :A ! B,
and :A ! :B. However, the literals A and :A are not ordered with respect to
one another. A clause is a finite set of literals, regarded as their disjunction. A
clause is a tautology if it contains a literal and its negation. A clause is a ground
clause if it contains no variables (and similarly for literals, atoms, and terms). We
define a partial ordering ! on non-tautologous clauses by the multiset extension
of the ordering on literals: If C is the empty clause (which contains no literals),
then C ! D for every non-empty clause D. Also, if C and D are clauses, then let
and M be their maximum respective literals, which exist if C and D are non-
tautologous. Then if
fMg. If L and M are
complementary, then C and D are not ordered. We note that this multiset ordering
on clauses is well-founded, because the underlying ordering on literals is. We will
not further use this ordering on clauses, and present it here mainly to make this
point clear. An interpretation I satisfies a ground clause C if I satisfies some (that
is, at least one) literal in C, and in this case we write I Otherwise, we say
that C contradicts I and write I 6j= C. A substitution is a mapping from variables
to terms. If \Theta is a substitution and C is a clause then C \Theta represents the clause
obtained by replacing variables of C by terms, as specified by \Theta. Such a clause
C \Theta is called an instance of C. A similar terminology applies to terms, atoms, and
literals, so we can apply substitutions to them, for example. For our purposes, we
say that an interpretation satisfies a non-ground clause if it satisfies all of its ground
instances. An interpretation I satisfies a set S of clauses if it satisfies every clause
C in S. An interpretation I is a model of a ground clause C if I I is a
model of a set S of ground clauses if I j= C for all C 2 S. Least models of single
ground clauses and finite sets of ground clauses exist, as we now show.
Theorem 2.3 Suppose Lng is a ground clause, and suppose
the least model of C is I 0 [Ln ].
Proof. We note that I 0 [L n ] is a model of C. We show that no smaller interpretation
J is a model of C. Suppose J ! I 0 [L n ]. Then by theorem 2.2, d(I;
This implies that J agrees with I 0 on Ln , and so C contradicts J . 2
Theorem 2.4 Let G be a finite set of ground clauses. If G is satisfiable, then G
has a least model.
Proof. Let A An be the atoms that appear (positively or negatively)
in clauses in G. There are only finitely many interpretations of these atoms; at
least one of them, say I, is a model, since G is satisfiable. Let I min be the least
such model, in our ordering on interpretations. This must exist, since there are
only finitely many such finite interpretations. Extend I min to an interpretation
I of A where each L i is either A i or :A i and I min
i. Then J is a model of G, since I min is, and it is a least model, because I min is
as small as possible among the interpretations of the A i and the interpretations of
the other literals have been chosen as small as possible. Any smaller interpretation
would have to differ from J on some literal L i , by theorem 2.2, which is not possible
by the way I min was chosen. 2
Definition 2.5 If G is a set of ground clauses over A, let lm(G) be its least model,
that is, the smallest interpretation I in the ordering on interpretations such that I
satisfies all elements of G.
In ordered clause linking with semantics, we accumulate such a set G and in
the process keep track of its least model lm(G). However, we do not store G in
its original form, but apply certain simplifications to it so that only the features
relevant for the current minimal model are retained. For this, we not only make use
of least models but also least contradicting clauses of interpretations. However, this
necessitates the introduction of another ordering on clauses. We would have liked to
define ordered semantic hyper-linking entirely in terms of the ordering ! on clauses,
but it turns out that this is incomplete if the ordering ! has order type greater than
!. Therefore we introduce another ordering ! cl on clauses and use it to choose
contradicting instances. This means that for purposes of completeness, ordered
semantic hyper-linking may need to use two different orderings, which seems to be
somewhat remarkable. For this purpose, we assume that ! cl is a partial ordering
such that for all ground clauses C, all but finitely many ground clauses D satisfy
cl D. An example of such an ordering is to order the clauses by size, that
is, the total number of occurrences of symbols, with two clauses unordered if they
have the same number of symbols. Since there are only finitely many non-variable
symbols that can appear in a clause, this ordering satisfies the finiteness property
given above. We note that ! cl is well-founded. We say a clause C is minimal in a
set of clauses if there is no clause D in the set such that D ! cl C; note that a set
of clauses can have more than one, but at most finitely many, minimal elements.
We now show that minimal contradicting clauses always exist; that is, if I is not
a model of a set S of (non-ground) clauses, then there is a minimal ground instance
D of a clause C of S such that D contradicts I.
Theorem 2.6 Suppose S is a set of (possibly) non-ground clauses over A and I is
an interpretation of A that is not a model of S. Then there is a ground instance D
of some clause C of S such that for all other ground instances D 0 of clauses in S,
if I 6j= D 0 then either D ! cl D 0 or D and D 0 are unrelated by ! cl .
Proof. The set of such ground clauses D 0 such that I 6j= D 0 is non-empty, since
I 6j= S. Since the ordering ! cl on ground clauses is well-founded, this set of ground
clauses has a minimal element D, as claimed. Note that there may be more than
one such minimal D, but at most only finitely many, by the way ! cl is defined.
This result holds even if S is infinite, by the way. 2
Definition 2.7 Let mi(S; I) be some such clause D, that is, a ground instance D
of some clause in S such that I 6j= D and such that there is no other ground instance
C of a clause in S such that C ! cl D and such that I 6j= C. If there is more than
one such instance D, we assume that mi(S; I) is one of them, chosen in an arbitrary
manner. We call such a clause D a minimal contradicting instance for I.
Later we will discuss algorithmic aspects of computing mi(S; I).
3 The Search Procedure
The task now is to devise a procedure that will search through the set of all interpretations
in a manner consistent with the ordering, finding clauses that contradict
each interpretation. For this, we maintain a finite list C of "relevant" ground clauses
that record the progress made in the search so far; this list contains instances of
clauses from S as well as instances of clauses derived from S by A-ordering resolu-
tion. The goal of the search is to continually increase the least model lm(C) of C,
that is, to make lm(C) larger and larger in the ordering on interpretations. This
least model is called the current interpretation. At the beginning C is empty and
lm(C) is I 0 . As elements are added to C, and sometimes removed, this least model
becomes larger and larger in our ordering on interpretations. If S is unsatisfiable,
then eventually C will contradict all interpretations, and there will not be a least
model any more. At this point, the empty clause will be in C and the search will
stop. The invariant that C possesses is captured by the following definitions.
Definition 3.1 If C is a (non-tautologous) clause, let max(C) be the maximal
literal in C in the ordering !. This exists because clauses are finite.
Definition 3.2 A list C of clauses is ascending if it is of the form C
contradicts the least model of C 1 , and so on. The
literals are called eligible literals, in harmony with the use of this term in
[CP94a].
Theorem 3.3 If then so are all its prefixes. Also,
Furthermore, this latter interpretation disagrees
with I 0 on the literals max(C j ).
Proof. The part about prefixes is immediate. Let I be I 0 [max(C 1
max(Cn )]. For the rest, we use induction on i. We show that I 0 6j=
i. By induction, lm(fC
Since the literal max(C i ) is larger than any literal [max(C 1
agrees with I 0 on max(C i ). By the definition
of ascending, lm(fC
To show that I and I 0 disagree on the literals max(C i ), we have just shown that
I 0 6j= max(C i ) for all i, but I by the way it is constructed.
To show that I is lm(C), we show that I is a model of C but no smaller interpretation
J is a model of C. Now, I is a model of C since it satisfies all the literals
I then J must differ from I on some eligible literal, by theorem 2.2.
Suppose d(I; J) is max(C I and
J differ on max(C i )). It remains to show that J does not satisfy the other literals
of C i . We know that lm(fC by the definition of ascending.
By induction, we know that lm(fC
does not satisfy C i .
Therefore J does not satisfy C i , since J agrees with I 0 [max(C 1
on all literals smaller than max(C i ), and thus the literals of C i other
than are not satisfied by J either. 2
Now, when the search procedure begins, the set C is empty, and this set is then
successively modified by adding to it some clause instance D contradicting its least
model. Whenever this is done, it is necessary to do some processing on C to preserve
the ascending property. This processing involves performing certain resolutions, as
well as deleting certain elements from C, in a manner that will be described. Letting
simp(C; D) denote the result of this processing, we have the following overall
algorithm for ordered semantic hyper-linking:
while fg 62 C do
if lm(C)
else D / mi(S; lm(C));
return "unsatisfiable"
3.1 Processing the list C of relevant clauses
There are two kinds of operations that take place during the processing of C involved
in the call to "simp." The first kind is to perform ordered resolutions between D
and the last clause of C, when possible. For this, we define a res(C,D) as follows:
Definition 3.4 Suppose C and D are ground clauses and suppose there is a literal L
such that
Now, a res(C,D) will be an (A-ordering) resolution involving the maximal literals
in C and D. We note that A-ordering resolution is in itself a complete theorem
proving method for propositional logic, and has natural extensions to first-order
logic. The second kind of operation that takes place during "simp" is to eliminate
elements from C that are made irrelevant by these A-ordering resolutions, that is,
elements of C that can be eliminated without affecting lm(C). We have the following
procedure for "simp":
procedure
if max(Cn ) and max(D) are complementary then
return
else if max(Cn ) ? max(D) then
return
else return [C
To show correctness, we define an interpretation I (C; D) where C is an ascending
list of clauses and D is a clause contradicting lm(C). This interpretation will
have the property that lm(C) ! I (C; D) and if I I (C; D) then I 6j= C [ D.
Therefore, if C [ D is satisfiable, then I (C; D) ! lm(C [ D). Thus this definition
gives a lower bound on the least model (if it exists). We show that each processing
step in "simp" does not decrease I (C; D). And, at the beginning, I (C; D) is larger
than lm(C). Therefore, at the end we will obtain an ascending set of clauses whose
least model is larger than it was at the beginning. Or, if I (C; D) is the maximal in-
terpretation, that is, the interpretation that disagrees with I 0 everywhere, then this
property is preserved, and we will eventually derive the empty clause fg. I (C; D)
can be the maximal interpretation only if C [D is unsatisfiable.
Definition 3.5 Suppose C is an ascending list of clauses. Let Cn be the last clause
in the list C. Suppose D is a ground clause contradicting lm(C). Define I (C; D) as
follows:
I (C; D)
1. L ? max(D) and I 0 6j= L or
2. L max(D) and lm(C)
We note that since I (C; D) imitates lm(C) for literals less than or equal to
max(D), and max(D) contradicts lm(C), therefore I (C; D) does not satisfy D.
Also, for literals larger than max(D), I (C; D) is chosen to be as large as possible
in the ordering on interpretations, and for smaller literals, I (C; D) agrees with
lm(C). Therefore, I (C; D) ? lm(C). (We cannot have equality because I (C; D)
differs from I 0 on infinitely many literals, assuming that A is infinite.) Also, if
J is an interpretation and J ! I (C; D) then J does not satisfy C [ D. If J !
lm(C) this is immediate. If contradicts J . If J ? lm(C)
then d(J; lm(C)) ? max(D) since I (C; D) and lm(C) agree on literals not larger
than max(D). Therefore D contradicts J in this case, too. Thus lm(C [ D) ?
I (C; D). And if there is no least model for C [D, then we can at least say that all
interpretations J less than or equal to I (C; D) fail to satisfy C [ D.
To show correctness, we need to show that every processing step in "simp" preserves
the property that D contradicts lm(C) and does not decrease I (C; D). Let
Cn be the last element of C. If max(D) ? max(Cn ) then the list C with D added
to the end, is ascending, because D contradicts lm(C). If max(D)
then Cn does not enter into the definition of I (C; D) at all, so deleting Cn does
not affect I (C; D). Also, D still contradicts lm(fC since this cannot
be distinguished from lm(C) on literals smaller than max(Cn ). If max(D)
and max(Cn ) are complementary (the only remaining case), then the A-ordering
resolution replaces D by a resolvent containing all the literals of D and Cn except
the two maximal ones. This resolvent will still contradict the least model of
since Cn did (by the definition of ascending) and all the literals of
D except max(D) also contradicted this least model (since D contradicted lm(C)).
Also, I (fC because the maximal literal
of a res(Cn ; D) is smaller than the maximal literal of D.
We now consider the case in which C [ D is unsatisfiable. If at some stage in
this processing, I (C; D) becomes the maximal interpretation, then no ascending
list can be produced, since all ascending lists of clauses are satisfiable. This means
that the empty clause fg is derived, and the search terminates.
3.2 An example
Suppose that the set A of atoms is
and that S contains the following clauses:
Suppose I 0 interprets P i as true for all i, that is, I 0
the following sequence of current interpretations I and the corresponding
clauses mi(S; I i
I 0 (now the clause :P 5 ; :P 8 is chosen)
I
(resolvent , from the above two clauses)
I
I
I
is generated from
(resolvent P 6 is generated from P 10 and P 6
(resolvent :P 5 is generated from P 6 and :P 5
I
(resolvent fg is generated from :P 5 and P 5
We show the five ascending lists of clauses that are generated, too:
(after "simp" is called)
3.3 Completeness
We can argue the completeness of this method in a manner similar to the completeness
proof in [PACL92]. However, the fact that our partial orderings may have order
type greater than ! complicates the argument a little. Also, the fact that clauses
D that are chosen at one point may be discarded later complicates the proof. The
general idea is to show that if S is unsatisfiable then there are only a finite number
of ground instances that can ever be chosen as minimal contradicting instances.
Therefore there are only a finite number of atoms that ever appear in C. This essentially
reduces the problem to one involving finite interpretations. Since there are
only finitely many finite interpretations, and by the ordering on interpretations, the
same one cannot be seen more than once, eventually the method must stop; if S is
unsatisfiable, then the only way for the method to stop is to generate the empty
clause.
We now show that only a finite number of clauses can be chosen.
Theorem 3.6 Suppose S is an unsatisfiable set of clauses. Then the set fmi(S; I)
I is an interpretation over Ag is finite.
Proof. Let T be a finite unsatisfiable set of ground instances of clauses in S; such
a set T exists, by the so-called Herbrand's theorem. Then for every interpretation I
there is a clause D in T such that I 6j= T . Note that mi(S; I) is minimal in ! cl among
clauses contradicting I; thus we cannot have D ! mi(S; I). However, for all but
finitely many ground clauses C,
which is finite. 2
Definition 3.7 Suppose we arbitrarily choose some finite unsatisfiable set T of
ground instances of S. Then we say a ground instance C of S is small if it is in the
set [D2T fD it is large otherwise. We say that an atom is small
if it appears (positively or negatively) in a small clause, and it is large otherwise.
Also, a literal :A is small if A is small, otherwise :A is large.
Theorem 3.8 Ordered semantic hyper-linking is complete, that is, if a set S of
clauses is unsatisfiable, then eventually the empty clause fg will be derived.
Proof. As above, we observe that the clauses mi(S; I) will be small for all current
interpretation I, and there are only finitely many such clauses. It follows that all the
current interpretations I constructed will be of the form I 0 [L], where L is a subset of
the small literals. This is a finite set of interpretations. Each current interpretation
constructed is larger than its predecessor in the ordering ? on interpretations; thus
the same interpretation cannot be seen twice, and the search must eventually stop.
The only way that this can happen is for the empty clause to be generated, if S is
unsatisfiable. 2
3.4 Efficiency
We briefly note one advantage of this approach over semantic hyper-linking as described
in [CP94a]; that is that the growth in the number of eligible literals is
better controlled. The number of eligible literals has a strong effect on the work
required to find a minimal clause D contradicting the current interpretation. The
procedure "simp" will automatically perform A-ordering resolutions when the maximal
literal of the contradicting clause D is the complement of an existing eligible
literal; each such resolution has the effect of removing an eligible literal from C.
In semantic hyper-linking without an ordering, it is rare for eligible literals to be
removed. Typically the set of eligible literals grows rapidly, making the search procedure
time-consuming after a few rounds of search and making it difficult to find
proofs that require more than a few rounds of search. However, the other parts
of semantic hyper-linking are powerful enough so that many proofs can be found
within three or four rounds of search. In addition, the way that the literals are
ordered in semantic hyper-linking makes the propositional satisfiability test fast.
Still, we think it would be an advantage to be able to handle many rounds of search
efficiently.
Finding Minimal Contradicting Instances
The preceding discussion has not dealt with the practical aspects of how the minimal
contradicting instance mi(S; I) is found. We have dealt with this to some extent in
[CP94a]. The problem is, given an interpretation of the form I 0 [L
a set S of (possibly) non-ground clauses, to test whether I 0 [L
if not, to find a minimal ground instance D of some clause C in S such that D contradicts
I (if such a clause D exists). For this purpose, as we shall
see, it is helpful to choose an I 0 that is decidable, that is, given a non-ground clause
C we can decide whether I 0 There are a number of kinds of interpretations
I 0 that are decidable; among them are the syntactic interpretations, interpretations
with a finite domain, and interpretations over the reals in which all the functions
and predicates can be expressed in terms of linear arithmetic with inequality. We
say that an interpretation I is syntactic if for any two atoms A and B with the
same predicate symbol, I depending only on
the signs and predicate symbols of literals, are fairly limited in expressiveness, but
are sometimes useful anyway, as we show in [CP94a]. As an example of an interpretation
in terms of linear arithmetic with inequality, we might interpret P (x; y)
as 2x ? y and we might interpret f(x; y) as if (x ? y) then x else y. Now, if
I 0 6j= C, then we will need to find a ground instance C \Theta of C such that I 0 6j= C \Theta.
A problem is that even if I 0 6j= C, such a ground instance may not exist; the reason
is that some of the elements of the domain of I 0 may not be values of any finite
ground terms. The question, given clause C, does there exist a substitution \Theta such
that C \Theta is a ground clause and I 0 6j= C \Theta, seems to be harder than deciding if
I 0 We say an interpretation I 0 is Herbrand decidable if this question about
\Theta is decidable. We note that syntactic interpretations and interpretations with
a finite domain are Herbrand decidable. We don't know whether interpretations
over the reals in which the functions and predicates can be expressed using linear
arithmetic with inequality, are Herbrand decidable. If I 0 is not Herbrand decid-
able, then we may have a current interpretation I that satisfies S without being
able to detect this, and we may then spend an infinite amount of time fruitlessly
searching for a ground instance C \Theta that contradicts I. However, this will not affect
the completeness of ordered semantic hyper-linking, because if such a C \Theta exists,
it will eventually be found. If I 0 is Herbrand decidable, then the question whether
I decidable, as we will now show.
We first specify in more detail how such an instance C \Theta can be found, if it
exists, and moreover an instance that is minimal, assuming that I 0 is decidable. Our
approach is to construct a set Z of literals with the following property: The set of
ground instances of literals in Z is exactly the set of ground literals L such that I 0 6j=
L and neither L nor its complement L appear in the list [L of eligible
literals. Then one can show that D contradicts I 0 [L literal
of D is either the complement of an eligible literal or an instance of a literal in Z.
For, literals of D that are complements of some L i will be false in I 0 [L
since I 0 [L Also, literals that are instances of elements
of Z will be false in I 0 [L agrees with I 0 on
such literals. To obtain such instances D, then, we can take a clause C of S and
apply a substitution \Theta such that all literals L of C \Theta are instances of some literal
in Z or complements of some eligible literal. That is, we find most general \Theta such
that for all L in C \Theta, there exists a literal M in Z or in the set of complements of
eligible literals such that L and M are identical.
We note that finding such a \Theta is reminiscent of the hyper-linking method of
[LP92]. If all the literals in Z are ground literals, this can be done by a matching
procedure, in which the literals of C are matched one by one; if some literals in Z
are non-ground, we may need to do successive unifications. Then if the resulting
instance D is non-ground, it is necessary to instantiate the variables with ground
terms in some manner. Since we are only interested in minimal ground instances, we
can replace each variable by a ground term that is minimal in the clause ordering,
assuming that the clause ordering ! cl is monotone. For our purposes, we say that
the clause ordering is monotone if it can be extended to a partial ordering on terms
such that for terms s and t, s ! cl t implies C[s] ! cl C[t] for a clause C[s] containing
an occurrence of s. Furthermore, we require that for any term t there are at most
finitely many terms s for which :(t ! cl s). Note that this implies that there are at
most finitely many minimal terms, by the condition just given. However, in order to
find a minimal instance, it may be necessary to replace each variable by all minimal
terms in all possible ways, which can be expensive. For this purpose, we write s#t
to mean :(s ? t)":(t ? s) and we write C#D similarly for clauses C and D. Then
we can choose an ordering ! cl so that s#t implies C[s]#C[t]; for example, ordering
terms by their size satisfies this condition. For such an ordering, we can obtain
a minimal instance of C by replacing all variables by arbitrarily chosen minimal
terms.
Now, the problem is to generate Z. Without knowing more about I 0 , not much
can be said. If the test I 0 j= L is decidable for ground L, then one can enumerate all
ground literals L, discard eligible literals and their complements, and test whether
I 0 L, and in this way generate, or at least enumerate, Z. The fact that Z is
infinite need not be a problem, because one only needs to enumerate Z in ascending
order in the ordering ! cl in order to find a minimal contradicting instance D. As
soon as one instance D has been found, literals L such that D ! cl L need not
be examined, and this eliminates all but finitely many literals. For this we need
to assume that if L 2 C and L 6= C then L ! cl C. In [CP94b] we indicate how
specialized decision procedures can be used to aid in the generation of such sets Z
of literals, in some cases. Of course, such an enumerative method cannot detect if
the current interpretation satisfies C (or S). Here we choose a different approach
that permits a relatively small set Z 0 to be generated independent of I 0 , and delays
the consideration of I 0 to a later stage. This approach also permits us to detect if
the current interpretation satisfies S, if I 0 is Herbrand decidable.
We make some comments about the complexity measures used. These are defined
in terms of the sizes of various structures, considered as character strings.
Alternatively, the size of a clause, set of clauses, etc. is the number of occurrences
of symbols in it. So if we say that something can be computed in time polynomial
in a set S of clauses, we mean that the running time is bounded by a polynomial
in the length of S, written out as a character string; this is the usual complexity
measure.
4.1 Disunification
Let Z 0 be a set of literals such that a ground literal L is an instance of a literal in
exactly when neither L nor its complement appear in the set of eligible literals.
Thus we have a kind of disunification problem. It turns out that a finite set Z 0
always exists, since the eligible literals are ground and there are finitely many of
them. We are using the fact that there are only finitely many function and predicate
symbols in all. Also, Z 0 can be computed in time polynomial in the list of eligible
literals. To see this, let Z 0 (E) be a desired Z 0 of literals as desired where E is
the set of literals that are either eligible literals or their complements. We first
note that the positive and negative literals can be handled separately. Let L pos be
the set of all positive literals and let L neg be the set of all negative literals. Let
pos be the positive literals in E and let E neg be the negative literals in E. Then
We can then extend this further, to
consider the sets of positive and negative literals having specified predicate symbols,
and solving for Z 0 for each such subclass. If there are n predicate symbols in all, we
obtain a total of 2n subproblems to solve, whose solutions can then be combined to
obtain the desired Z 0 . If a predicate symbol with a specified sign does not appear
in E, the subproblem has a simple solution; then P
is in Z 0 (E) for suitable P , since none of its instances will be in E. Otherwise, we
can consider the sets of literals having various function or constant symbols in some
chosen position. Each such further division reduces the problem into a number of
subproblems equal to the number of function and constant symbols, and partitions
the set E further into disjoint subsets; eventually we obtain trivial problems, whose
solutions can be combined.
4.2 Generating eligible instances
Suppose the set Z 0 of literals has been generated, as specified above. We generate
instances of the input clauses as follows: For each clause C in S, we partition C into
two disjoint sets of literals C ff and C fi . This is done in all possible ways. For each
such partition, we unify the literals in C ff with complements of eligible literals, and
those in C fi with literals from Z 0 . This also must be done in all possible ways. In
this way, we obtain an instance D of C which can be expressed as D ff [D fi where the
literals in D ff are complements of eligible literals and the literals in D fi are instances
of literals of Z 0 , that is, they do not unify with eligible literals or their complements.
We call such an instance an eligible instance. Note that there are only finitely
many eligible instances, and they can be found by a simple enumeration procedure.
In order to ensure that D contradicts I 0 [L it is necessary to find a
substitution fl such that I 0 6j= (D fi )fl. We also want this instance to be minimal in
the clause ordering ! cl . If fl is as specified, then I 0 [L reasoning
as above: The literals in D ff are not satisfied by the current interpretation because
they are complements of eligible literals. The literals in (D fi )fl are not satisfied by
the current interpretation I 0 [L because they are not satisfied by I 0 . If
I 0 is Herbrand decidable, then the test whether such a fl exists is decidable, and
in this way we can test if the current interpretation satisfies S. If such a fl exists,
we want to find one such that Dfl is minimal in the ordering ! cl . The search for
depends of course on I 0 and ! cl . If the clause ordering is based on the directed
acyclic graph size of the terms, that is, the size is the number of distinct subterms
that appear, independent of how often they appear, then this computation seems
to be rather complicated, despite the favorable theoretical properties of this size
measure. However, for certain types of interpretations and literal orderings, the
search for such a fl producing a small clause can be done quickly, as we will show
in the next section. This is also dealt with to some extent in the paper [CP94b]. It
is likely also that this search can always be done fast if I 0 is an interpretation with
a (small) finite domain and if the clause ordering ! cl is monotone. However, we
can say something more in case I 0 is syntactic. If I 0 is syntactic, then I 0 6j= (D fi )fl
iff I 0 6j= D fi , which latter condition can be checked just by examining the signs and
predicate symbols of the literals. This permits some clauses to be rapidly eliminated
from further processing.
4.3 Complexity analysis
Now, the generation of all the eligible instances requires an amount of work that
depends on the number and sizes of the eligible literals and the number of literals
in the clauses. However, suppose that there is a constant bound on the number of
literals in each clause of S. Then the generation of the eligible instances can be
done in time polynomial in S and the set of eligible literals, since one has to look
at all combinations obtained by unifying each literal in C with each complement of
an eligible literals or with each element of Z 0 . If the set of eligible literals unioned
with Z 0 has n elements and a clause C has k literals, then there are n k possibilities,
which is still polynomial, for a fixed k. For each possibility, the work is polynomial
(or even linear), using efficient unification algorithms. Note that n is polynomial
because the number of elements of Z 0 is polynomial, by the disunification arguments
given above. The assumption that k is bounded is reasonable, because it is possible
to convert clauses with many literals into clauses with three literals in a satisfiability-
preserving manner by introducing new predicate symbols.
We have just shown that if the number of literals in clauses of S is bounded,
then the eligible instances can be generated in polynomial time, regardless of I 0 .
However, in order to generate a minimal contradicting instance, it is necessary to
instantiate the eligible instances with a substitution fl as specified above. If I 0 is
syntactic and the clause ordering ! cl is monotone and has properties concerning #
as specified in section 4, then such a fl can be obtained simply by checking the signs
and predicate symbols and replacing all variables by a minimal term; the entire
process of generating a minimal contradicting instance can then be done in time
polynomial in S and the set of eligible literals, that is, polynomial in their lengths
written out as character strings. If I 0 has a finite domain, then we can find for each
domain element d a minimal ground term t d whose interpretation under I 0 is d;
such terms can be found by a simple iteration procedure. Then to find a minimal
instance Dfl such that I 0 6j= (D fi )fl, it is only necessary to consider fl replacing
variables by terms of the form t d for various d in the domain. This is a finite
number of possibilities, exponential in the number of variables in D fi . If we use an
ordering based on directed acyclic graphs, that is, counting the number of distinct
subterms that appear, but not counting how often they appear, then the generation
of a minimal contradicting instance can be more complicated. This is because such
directed acyclic graph-based orderings are not monotone, since the contribution of
a subterm to the clause depends on subterms that appear elsewhere in the clause.
However, because of the favorable complexity properties of the directed acyclic
graph-based orderings, it may be worthwhile to use them anyway. In general, it
makes sense to look at the eligible instances in order of their size; then it is possible
that a small contradicting instance may be found early and the instantiation of the
larger eligible instances may be avoided.
5 Additional Ordered Resolutions
Since the basic search procedure performs A-ordering resolution, it seems reasonable
to do additional resolutions; these might have the effect of doing part of the work
in advance, and thereby speed up the search. So we might add to the input clause
set S a set S 0 of clauses generated by A-ordering resolution from S, and consider
these clauses S 0 as additional input clauses. One would expect that these additional
clauses might lead to the finding of certain contradictions earlier. They also have
the effect of eliminating large literals from proofs, as mentioned in [CP94a]. Since
the basic search procedure has difficulty generating large literals, this combination
is reasonable, and we have found that in practice such a combination (with rough
resolution instead of A-ordering resolution to eliminate large literals) often works
well. We can balance the work between ordered semantic hyper-linking and A-
ordering resolution in some way so that both are done in parallel; one method to
use is to divide the total time spent equally between them.
The question remains what ordering to use for these A-ordering resolutions, and
which A-ordering resolutions to do. As for the ordering, we can choose some literal
ordering ! lit compatible with the ordering ! on ground literals. That is, we can
say lit M (for non-ground literals L and M ) if there is a ground substitution
\Theta such that L\Theta ! M \Theta. Note that we really need to use the ordering ! here,
not ! cl , to compare L\Theta and M \Theta. Then we can restrict literals resolved on, to
literals that are maximal in this ordering ! lit . As for which A-ordering resolutions
to perform, we observed in section 4.3 the strong dependence of the efficiency of
ordered semantic hyper-linking on the number of literals in clauses of S, so it is
reasonable to keep the number of literals small. However, we want to perform the
A-ordering search in a complete manner, so that a reasonably large portion of the
search space is explored. For this, it is necessary to consider not just the number
of literals in a clause, but the size (number of symbol occurrences) of the clause.
Preferring clauses of small size can be done in a completenesss-preserving manner,
and will also tend to keep the number of literals small. The question remains exactly
how this can be done. One way to do this is to keep a list of all pairs of clauses
that have not yet been resolved together, and always resolve the pair of clauses
whose sum of sizes is as small as possible. This produces clauses of small size
(number of symbol occurrences), which will tend to have few literals, but requires
a quadratic amount of space to store these possible resolutions. Another method
is the Otter [McC89] approach, in which a small clause is repeatedly chosen and
resolved against all other clauses. This avoids the expensive bookkeeping, but has
the problem that this small clause will also resolve against large clauses, possibly
producing large clauses very early. We propose a compromise, in which a list
of clauses is constructed as follows: The clauses are entered into this
list L smallest first. Whenever a clause is entered into the list, it resolves (using
A-ordering resolution) against all clauses that are already on the list. In this way,
all resolutions will eventually be done, but we have some guarantee that when two
clauses are resolved, both of them are small. Also, the amount of bookkeeping is
kept to a minimum. When we are done resolving C i against C j for all j i, then
we find the smallest clause D such that D is in S or has been produced by an earlier
resolution, and such that D is not already in the list L. We then enter this smallest
clause D in the list as C i+1 and resolve D against C j for 1 j i, continuing the
process.
Now, for certain problems, it is important to produce large A-ordering resolvents
early, if they are directly derived from the negation of the theorem; this is the
case for example in Bledsoe's five limit problems [Ble90]. Therefore, we would like
to make this A-ordering resolution procedure sensitive to support criteria as well
as size. For this purpose, we can say that a clause C is semantically supported
if it contradicts the user-given interpretation I 0 . Both input clauses and clauses
generated by resolution can be semantically supported. We then can modify the
above A-ordering search strategy so that on alternate choices of D, a semantically
supported clause is chosen. Thus, we alternate between choosing D as the smallest
clause not yet in L, and the smallest semantically supported clause not yet in L;
this D is then added to the list and resolved against all clauses already in L. This
will tend to favor resolutions involving supported clauses, even if the clauses are
large. This can only be done systematically if I 0 is decidable (or better, Herbrand
decidable).
5.1 Explanation-based generalization
The idea of explanation-based generalization (EBG) is to extract some general principles
from a specific argument, enabling the argument to be applied to a wider range
of situations. This principle can be applied in the ordered resolution phase of ordered
semantic hyper-linking. We note that in the procedure "simp" of section 3.1,
A-ordering resolutions are performed between ground clauses Cn and D; both Cn
and D are instances of clauses in S or clauses produced from S by prior A-ordering
resolutions. Suppose C 0
n and D 0 are the more general (possibly non-ground) clauses
of which Cn and D, respectively, are instances. Then by general properties of res-
olution, it follows that there is an A-ordering resolvent C of Cn and D such that
a res(C n ; D) is an instance of C. Therefore, it seems reasonable to store these more
general clauses C 0
along with their respective instances Cn , D, and
a res(C n ; D). In this way, we produce lemmas that can be added to the set of input
clauses; such lemmas are likely to be relevant to the proof and may be generated
again during the search. By adding them to S, we may avoid sections of the search
in which the same resolutions are performed over and over again. It makes sense
to generate these lemmas, in addition to performing the A-ordering resolutions of
the previous section, since these lemmas may not be generated by the list-based
search method described there. The fact that a uniform ordering is used in the
search may make the lemma mechanism more effective; the search method used in
semantic hyper-linking without ordering can vary the literal ordering for different
interpretations, making it less likely that a lemma found earlier will be useful later
on.
6 Replacement Rules
We found that the use of replacement rules considerably enhanced the performance
of semantic hyper-linking, and so it is reasonable to include them in ordered semantic
hyper-linking, too. However, it is necessary to adapt them to the current
context. Suppose is the current set C of relevant clauses. From this
we construct a set EL of explicit literals; these are the literals satisfied by lm(C)
that actually appear in the clauses C i . Thus, the set EL is defined as the set of
literals L such that either L or L is a member of [ i C i and such that lm(C)
Now, if we can show that EL[S is unsatisfiable, then we have already contradicted
the current interpretation lm(C) and need not search for a minimal contradicting
instance. For, if we can show that EL [ S is unsatisfiable, then we know that the
clause is a logical consequence of S, and can be used as if it were
the minimal contradicting instance. In fact, we typically find a small subset of the
clause that is a consequence of S, which may be more useful for the
search.
To see whether EL[S is unsatisfiable, we use some incomplete but often effective
methods. In the general AI context, these may be viewed as "obvious inferences"
or "associations" that are readily made. One method is to use natural replacement
rules; these are implications of the form L such that all
variables in the literal L appear elsewhere in the implication, and such that some
clause is a member of S. These replacement rules may be used
by unifying the L i with elements of EL; then the corresponding instance of L will
be a ground literal (since all variables of L also appear elsewhere). This ground
literal is a logical consequence of EL and can be (temporarily) added to EL. This
operation may be repeated a number of times, and if complementary literals appear
in EL, then we know that EL [ S is unsatisfiable. From this derivation, a clause
that is a subset of fL : L 2 ELg may be extracted, which is a logical consequence
of S, and can be used in place of the minimal contradicting instance.
Another kind of replacement rules are definitional replace rules; this is a slight
simplification of the minimal replace rules of [CP93a]. The idea of definitional replace
rules is to capture clauses that represent definitions, and the effect of applying
them is to expand the definitions; this is particularly useful in set theory and modal
logic. A definitional replace rule is of the form L such that all
variables in L 1 appear in L and such that some clause fL; L
is a member of S. If one has a definition of the form L j A where L is a literal and
A is a formula involving no quantifiers, one can verify that such clauses will be generated
when this definition is converted to clause form. Sometimes such formulae
are generated even if A contains quantifiers.
Such replacement rules are used in an inverse way to natural replacement rules;
if L has an instance L\Theta in EL then the implication L\Theta
can be added to EL. Also, if L has an instance L\Theta appearing on the right-hand side
of some such implication that has previously been added to EL, then this instance
can be added to EL. In this way, EL is augmented by a set of ground instances
of clauses in S. These instances are the instances that one would consider when
expanding definitions. We can then test if EL together with these ground instances
is unsatisfiable, using something like Davis and Putnam's method [DP60]. If so,
then a clause that is a subset of fL : L 2 ELg may be extracted, which is a logical
consequence of S; thus we know that EL [ S is unsatisfiable.
In order to control the application of replace rules, it seems most reasonable
to use a time bound based on the time used to search for a minimal contradicting
instance. It seems reasonable to first search for a contradiction using natural replace
rules. If this fails, then definitional replace rules can be applied, again controlled by
the time bound. If this fails, then we have generated a set G of ground clauses that
can be processed a little more; this set G contains EL (considered as unit clauses)
together with the ground instances generated by definitional replacement. Since G
consists of ground clauses, it has only finitely many models. We can examine all
these models J of G one by one, and for each such model J , we can again apply
natural replacement to J to see if it can be contradicted. We note that since G is
finite, the models J are essentially finite, too. Each such model J can be considered
as a set U of unit clauses, that is, the set of literals L such that J j= L and such
that L or its complement appears in G. Then we can perform natural replacement
on this set U ; this may find some contradictions that were nearly, but not quite,
found by definitional replacement. Such contradictions (demonstrations that S [U
is unsatisfiable) need to be found for all models J of G in order to demonstrate that
7 Complexity Analysis
We now consider the complexity required by ordered clause linking, in terms of
the complexity of the shortest proof from S. We consider both worst-case bounds
and give plausibility arguments for better performance. In the introduction, we
noticed that clause linking has a triple exponential bound in the complexity of the
proof, which can be reduced to double exponential if a suitable ordering on literals
is used. The same arguments apply to ordered clause linking. However, we have
reason to believe that the performance will be better than this. We know that if S is
unsatisfiable then there is an unsatisfiable set T of ground instances of S. Suppose
we measure the complexity of the proof by the complexity c(T ) of T , that is, its
length when written out as a character string. Or, equivalently for our purposes, we
can measure the complexity of the proof by the complexity of the largest clause in
T . Note that this complexity measure does not economize on repeated occurrences
of the same subterm. Now, suppose our clause ordering is based simply on the
length of the clause, written out as a character string, that is, the sum of the sizes
of the literals in the clause. Then each clause appearing in the proof has complexity
at most c(T ), so we will find the proof when all clauses of complexity c(T ) or less
have been generated (or earlier). The number of such clauses is exponential in c(T ),
and so the time required to test their satisfiability may be double exponential in
c(T ). We note that this measure is independent of how many clauses appear in
T , if the "largest clause" complexity measure is used. This will give our method a
better comparison with the methods of [Gou94], which need to count the number
of elements in T .
Another favorable factor for our method is that the satisfiability of a set of
ground clauses can be tested in expected polynomial time, for many probability
distributions. And in practice, methods similar to Davis and Putnam's method
often decide satisfiability of sets of propositional clauses very fast. We have also
found this to be the case in the clause linking theorem prover. Since our search
procedure is similar to Davis and Putnam's procedure in its systematic search for a
model, we would expect a similar time bound to apply to it, too; thus we may expect
in practice that the time required by our method is single exponential. We note
further that this is based on the assumption that all clauses of complexity c(T ) or less
are generated. Our method is very selective about which clauses are generated, so
that it is reasonable to assume that only a small subset of the clauses of complexity
c(T ) or less will be generated. For example, we can show that our method will only
generate logically minimal ground instances, that is, ground instances that are not
logical consequences of smaller (with respect to ! cl ) ground instances. Equivalently,
a ground instance C is logically minimal if there is some interpretation I such that C
is a minimal instance of S contradicting I. The question whether a clause is a logical
consequence of simpler clauses is also relevant for the methods of [BG90, BG94], it
turns out. One would expect that the number of logically minimal ground instances
of a given size is much smaller than the total number. In fact, we do not even
generate all the logically minimal clauses. The fact that A-ordering resolutions
are done in the "simp" procedure means that many interpretations are not even
examined. That is, we only generate clauses that are logically minimal when such
A-ordering resolvents are also considered, so this can eliminate some clauses from
being logically minimal. But, as a worst case bound, our method is exponential in
the number of logically minimal ground instances; this is always finite when S is
unsatisfiable.
One might ask whether it would be just as efficient to generate all ground instances
of clauses in S, and then consider them in order of size. Thus we would have
a list C of all ground instances of S, with the smallest ones occurring
earlier in the list. We could then test if C i is a logical consequence of C i , for i j,
and if so, delete C i from the list. This produces a smaller sublist C 0
of ground instances, of which finite prefixes can be tested for satisfiability. Our
method is more efficient in that the non-logically minimal instances are never even
generated. Furthermore, even some of the logically minimal instances are avoided,
as explained above.
7.1 Estimating the size of the tree
We can give additional evidence that the work required by ordered semantic hyperlinking
is often small. We note that it is only the small atoms that influence the
search, as defined in definition 3.7. Let us consider the smallest n atoms in A
and the probability that a clause C over these atoms will contradict an arbitrary
interpretation I. Suppose that there are m 3-literal ground clauses C in all. Then
the chance that a random interpretation I will not satisfy a specific clause C is 1=8
(since each of 3 literals must be mapped to false). Therefore the chance that the
interpretation will satisfy the clause C is 7=8;, and the chance that I will satisfy m
3-literal clauses is (7=8) m , if the clauses are chosen independently. The expected
number of models of m independently chosen clauses (considering only the first n
literals) is then 2 n (7=8) m since there are 2 n interpretations altogether for n atoms.
We note that and the expected
number of models is less than one. This means that the probability is very small
that we will have to search past the first n atoms to find a contradicting instance.
This is evidence that if there are many clauses then the size of the tree is small,
on the average. What we are given is non-ground clauses, in general, instead of
ground instances, so the determining quantity for this analysis is the number of
their ground instances of various sizes, and how they depend on one another.
--R
Theorem proving via general mating.
On restrictions of ordered paramodulation with simplification.
Ordered chaining for total or- derings
Automated Theorem Proving.
Challenge problems in elementary calculus.
Model finding in semantically guided instance-based theorem proving
Rough resolution: a refinement of resolution to remove large literals.
Semantically guided first-order theorem proving using hyper-linking
The use of presburger formulas in semantically guided theorem proving.
Rewrite systems.
A computing procedure for quantification theory.
Resolution Methods for the Decision Problem.
The complexity of resource-bounded first-order classical logic
Proving refutational completeness of theorem-proving strategies: the transfinite semantic tree method
A simplified format for the model elimination procedure.
Eliminating duplication with the hyper-linking strategy
Otter 1.0 Users' Guide.
Conditional term rewriting and first-order theorem proving
Equational reasoning and term rewriting systems.
The search efficiency of theorem proving strategies.
The search efficiency of theorem proving strategies: an analytical comparison.
Automatic theorem proving with renameable and semantic resolution.
--TR
--CTR
Kahlil Hodgson , John Slaney, TPTP, CASC and the development of a semantically guided theorem prover, AI Communications, v.15 n.2,3, p.135-146, August 2002
Kahlil Hodgson , John Slaney, TPTP, CASC and the development of a semantically guided theorem prover, AI Communications, v.15 n.2, p.135-146, September 2002
R. Janvier , Y. Lakhnech , M. Prin, Certifying cryptographic protocols by abstract model-checking and proof concretization, ACM SIGBED Review, v.3 n.4, p.37-57, October 2006
David A. Plaisted , Adnan Yahya, A relevance restriction strategy for automated deduction, Artificial Intelligence, v.144 n.1-2, p.59-93, March
Adnan Yahya , David A. Plaisted, Ordered Semantic Hyper Tableaux, Journal of Automated Reasoning, v.29 n.1, p.17-57, 2002
Carsten Sinz, Visualizing SAT Instances and Runs of the DPLL Algorithm, Journal of Automated Reasoning, v.39 n.2, p.219-243, August 2007
Peter Baumgartner, First-order logic Davis-Putnam-Logemann-Loveland procedure, Exploring artificial intelligence in the new millennium, Morgan Kaufmann Publishers Inc., San Francisco, CA, | automated theorem proving;hyper-linking;semantics |
594258 | Semi-Thue Systems with an Inhibitor. | A i>semi-Thue system with an inhibitor is one having a special symbol, called an i>inhibitor, that appears on the right side of every rule but does not appear on the left side of any rule. The main result of this paper is that the uniform halting problem is decidable for the class of such systems. The concept of i>inhibitor is related to the concept of i>well-behaved derivation in systems without an inhibitor. The latter concept has received some attention from those interested in the open question as to whether the uniform termination problem for one-rule semi-Thue systems is decidable. | April, 1998 (revised)
1. Introduction, notation and terminology. Semi-Thue systems constitute a
universal model of computation, in the sense that any decision problem about
computations is reducible to a problem about semi-Thue systems. Every recursively
enumerable language is the language of some semi-Thue system. (E.g., see Chapter 7
of [3].)
And yet the concept is simple: A semi-Thue system is an ordered pair (\Sigma; \Pi),
where \Sigma is a finite alphabet of characters and \Pi a finite set of rules (u; v), where in each
case u and v are words over \Sigma. These systems are called "semi-Thue systems" because
the rules are not necessarily reversible, u being referred to as "the left side" and v "the
right side" of the rule (u; v). Semi-Thue systems are distinguished from Thue systems
(named for their originator Axel Thue [15]) whose rules operate in both directions.
The important notion in the study of semi-Thue system is that of a derivation
from one string to another. We write to mean that w 2 is derived in one step
from w 1 , i.e., that there exist words x and y such that w
(u; v) is a rule of the system. We say that z is derivable from w or that there is a
derivation from w to z, if there exist strings w
Each w i is a line of the
derivation, which has lines, and has p steps; p is the length of the derivation. An
infinite derivation is an infinite sequence w
nonnegative integers i.
Although the class of semi-Thue systems is quite powerful, there have been some
applications in which not all this power is appropriate. An example is the context-free
Supported by Grant No. CCR-9500182 from the National Science Foundation.
grammar, which had as its origin the phrase-structure grammar put forth tentatively
and critically by Chomsky [2] for natural languages, but which by now has its chief
application in the domain of formal languages (see [11]). A context-free grammar is a
semi-Thue system that (1) distinguishes between "terminal" and "nonterminal"
characters of the alphabet, (2) restricts rules to those having single nonterminals as
their left sides, and (3) restricts derivations to those whose first lines all consist of a
single occurrence of a particular nonterminal designated as the start symbol (usually S
in the literature) and whose last lines have only terminal characters.
Another application has arisen in the area of computer science concerned with
theorem proving by machine, where semi-Thue systems are used and thought about
extensively. Typically, these semi-Thue systems, often called "rewrite systems," are
used to reduce words to simpler equivalent words (see, e.g., [7] or [1]). Rewrite systems
and context-free grammars are quite different both in their purpose and their
operation. Nevertheless, these enterprises do have in common their use of
computationally weak semi-Thue systems.
The research program into which the present paper fits is not concerned with
particular applications of semi-Thue systems such as grammars and rewrite systems.
Rather it considers various subclasses of semi-Thue systems that appear to be usefully
weaker than the entire class (without regard to any particular application), and then
attempts to assess how useful and weak they are. One method of assessing a subclass is
to determine whether certain decision problems are decidable for it. If so then that is
evidence that the subclass is weak, since most significant decision problems are
undecidable for the full class of all semi-Thue systems. And, if the decision problem is
a computationally important one, it is evidence also that the subclass may be useful.
There are several decision problems that can be used as criteria in this way. Let us
focus on three of them:
(1) The halting problem. Given a semi-Thue system (\Sigma; \Pi) of the
subclass, and given x 2 \Sigma , is every derivation whose first line is x finite?
(2) The uniform halting problem. Is every derivation in a given
semi-Thue system of the subclass finite?
(3) The derivability problem. Given a semi-Thue system of the subclass,
and given x; y 2 \Sigma , does there exist a derivation of y from x?
For example, for both the class of context-free grammars and the class of rewrite
systems used by many theoreticians of machine theorem proving, all three of these
problems are decidable. Moreover, any subclass of the semi-Thue systems for which
any of these three problems is solvable is weaker and possibly more useful than the
class of all semi-Thue systems. Weaker because all three problems are undecidable for
the class of all semi-Thue systems. And more useful, albeit in a restricted set of
possible applications, because the ability to tell whether or not derivations will
terminate gives the user an advantage. The importance of termination in the practical
use of rewrite systems is described in detail in [6].
The uniform halting problem seems more difficult than the other two, although
there seems to be no general proof that if that problem is solvable for any subclass of
semi-Thue systems then the other two problems are solvable also. At any rate, several
research workers have decided to focus on the uniform halting problem; in particular,
the question of whether or not that problem is decidable for the subclass of one-rule
semi-Thue systems has received some attention, so far without an answer, in [4], [5],
[8], [9], [10], [12], [13], [14] and [16]. This subclass will be discussed in Section 4.
The subclass that is the main focus of this paper is the subclass of semi-Thue
systems with an inhibitor, i.e., an alphabetic character that occurs at least once on the
right side of every rule, but does not occur on the left side of any rule. The main result
is that the uniform halting problem for this subclass is decidable, proved in Section 3,
where it is also proved that the halting problem and the derivability problem are
decidable. Derivations in semi-Thue systems with an inhibitor will be analyzed in
detail in Section 2.
The subclass of semi-Thue systems with an inhibitor was noticed in the course of
studying the subclass of one-rule systems [13]. The results of the present paper on
semi-Thue systems with an inhibitor lead to a distinction that promises to be fruitful
in analyzing derivations in one-rule systems without an inhibitor. That distinction,
between well behaved derivations and ill behaved derivations, is explained in Section 4.
In this paper lower-case Greek iota (') will be used as an inhibitor. So, in a
semi-Thue system with an inhibitor, ' 2 \Sigma, every right side has at least one occurrence
of ', and no left side has any occurrence of '. Our convention will be that a semi-Thue
system has k rules:
We shall write x ! n y to mean that there is a derivation of n steps (n - 0) from x
to to mean that there is a derivation from x to to mean that
there is such a derivation of at least one step.
For mean that there exist z 1 ; z 2 2 \Sigma such that x ! z 1 yz 2 . We
shall write x . + y to mean that there exist z 1 ; z 2 2 \Sigma such that
The well known fan theorem states that an infinite rooted tree in which each node
has only finitely many children nodes has an infinite path. The following generalization
will be useful in Section 2; the proof is left to the reader:
Theorem 1.1. If a forest of finitely many rooted trees has infinitely many nodes,
each of which has only finitely many children nodes, then the forest has an infinite path.
Definition (the y). If x; y and z are words and xyz is a line in a derivation then
it may be that y occurs several times as a factor (i.e., substring) of that line. For
example, then there are
three occurrences of y in xyz, the second of which we shall refer to as "the apparent
occurrence of y in xyz," or "the y in xyz," or (frequently, when the designation xyz is
understood) "the y." The article "the" will indicate that we are referring to a
particular occurrence of y and not to the word y itself. When we wish to talk about the
word apart from any occurrence in a line we shall simply say "y."
Definition (the same occurrence). If x 1 bx 2 u h x 3 th line of a
derivation where b is a letter and x 1 bx 2 v h x 3 is the (j st line of that
derivation, then we talk of the apparent occurrence of b in the j th line as being the
same as the apparent occurrence of b in the (j st line. On the other hand, no
occurrence of a character in the apparent occurrences of u h or v h exists in the other
line: any character occurrence in the apparent u h is destroyed, and any character
occurrence in the apparent v h is created, in going from the j th line to the (j st line.
2. Analysis of derivations. Section 3 will present the decision procedure to
determine whether a given semi-Thue system with an inhibitor is uniformly
terminating. In preparation, this section will develop a method of analyzing derivations
in such systems. To begin, it is stipulated that there be no occurrence of the inhibitor '
in the first line of a derivation. This stipulation will help us establish important
structural concepts. It is justified by the fact that (since ' does not occur on the left
side of any rule) if there is an infinite derivation from x 1 'x then there is an
infinite derivation from one of the x i 's. All semi-Thue systems discussed in this section
and Section 3 will be systems with the inhibitor '.
Definition (vital). For b 2 \Sigma, if xby is a line other than the first in a derivation,
then the apparent occurrence of b is vital if it is not ' and has been created either in
that line or in some preceding line of the derivation (in other words, if that occurrence
of b does not exist in the first line).
Definition (S-occurrence, the set S). (1) If w 6= - and xwy is a line of a
derivation then the w is an S-occurrence in that line if all its character occurrences are
vital, the x does not end in a vital character occurrence, and the y does not begin with
a vital character occurrence. (That is to say, the x must either be null or end in a
nonvital character occurrence. And the y must either be null or begin with a nonvital
character occurrence.) In short, a nonnull S-occurrence is a maximal factor of vital
character occurrences in a line of a derivation. (2) If a line of a derivation begins with
(ends in) ' then the occurrence of - at the left end (right end) of the line is an
S-occurrence. And if bc is a factor of a line where both the b and the c are nonvital
character occurrences, at least one of the two being ', then the - between the b and the
c is an S-occurrence. (3) S is the set of all words having an S-occurrence in some line
of some derivation.
Note that if x's'y ! z and s has no ' then
and y ! y 0 . This follows from the segregating power of the inhibitor ', and shows the
importance of S-occurrences in lines all of whose non-iota character occurrences are
vital. Even more revealing of the importance of S-occurrences is the next theorem.
Definition (S-sequence). The sequence s is an S-sequence if, for each i,
Theorem 2.1. In a semi-Thue system with an inhibitor, there exists an infinite
derivation only if there is an infinite S-sequence.
Proof: If there is an infinite S-sequence s then an infinite derivation
can be defined as follows: For each i, define z i and z 0
i so that s
(guaranteed by the definition of s i . s
is an infinite derivation.
Now assume there is an infinite derivation w
where the character occurrences of w 1 that are never destroyed in the derivation are
precisely those that occur in the apparent factors y . So, for every i,
for some z . Consequently, for some j, 1 - j - m, the sequence
z
is an infinite derivation possibly with repetitions; that is to say, there is an infinite
sequence
For convenience we alter the notation and set z
is an infinite derivation in which every character occurrence of z 1 is eventually
destroyed. Since z 1 is only finitely long, there exists a p such that, for all i - p, the line
z i has no character occurrences in common with z 1 .
Thus for all i - p,
where each s i;h 2 S, and q is the number of "s in z i .
For each line i - p, there is exactly one h such that the s i;h is rewritten by a rule,
becoming (for some in the (i st line; for all
is copied to become the very same S-occurrence in the
st line (but with a different subscript for
to mean that the s i;h 0
is copied to become the s i+1;h 00
in the
st line. Then define C to be the transitive, symmetric and reflexive closure of the
relation C 0 . Thus C(!
and the s i;h is copied, recopied, etc., until it becomes the s i 0 ;h 0
in the (i 0 ) th line, or
is copied, recopied, etc., to become the s i;h .
Clearly, C is an equivalence relation; furthermore if C(! then the
word s
. Note also that, for any i and h - q i , if there is no h 0 - q i+1 such that
for finitely many values of h 0 , s i;h . s i+1;h 0
Consider now the graph H whose nodes are the equivalence classes of the C
relation: The roots of H are the classes having the respective pairs
as members; there is an edge from a node N 1 to a node N 2 of H
if and only if there are and the s i+1;h 0
in the (i st line is part of what is obtained by rewriting from the s i;h in the i th line.
Clearly, H is a forest of rooted trees. Define
Since the z-derivation is infinite, H has infinitely many nodes, each of which has
only finitely many children nodes. Hence, by Theorem 1.1, there is an infinite path
through the Putting s
Definition (v-section, L(v h ); R(v h )). The word w is a v-section if ' does not
occur in w and there is a v h such that, for some x and y, either v
or x'w. Thus the null word is a v-section if and only if some v h either begins in ',
ends in ', or has '' as a factor. If v
In particular, L(v h ) (R(v h only if v h begins
with (ends in) '.
Note that every v-section has an S-occurrence in some derivation. Whenever a
rule applied in a derivation where v the apparent
occurrences of the internal v-sections always become S-occurrences. The apparent
occurrences of L(v h ) and R(v h ) become either S-occurrences or parts of S-occurrences.
E.g., for the system
in the third line of the derivation
a
a'bc'd
a'be'f'g'd
the occurrence of g is an S-occurrence, but the occurrence of of the
S-occurrence be.
An S-occurrence of - must, in its first line, be the result of an application of a rule
having lambda as a v-section. However, if L(v h ) or R(v h the application of the
rule need not result in an S-occurrence of -. E.g., in the system
In the derivation
a
a'bc'd
a'b'f"d
the application of the second rule results in the third line in which R(v 2 ) becomes an
S-occurrence of - but L(v 2 ) does not, being absorbed into the S-occurrence b.
Generally, we can think of a nonnull S-occurrence in a line as a maximal substring
occurrence consisting of consecutive vital character occurrences; it is brought about by
one or more rule applications each of which is responsible for creating some of its vital
character occurrences. The earliest S-occurrences are v-sections, which come about as
a result of rule applications. The more complex S-occurrences are brought about by
the modification of simpler S-occurrences. The theorems that follow will describe this
process in detail.
Theorem 2.2. If the s is an S-occurrence in a line xsy of a derivation, then
either x ends in ' or y begins with ' or both.
Proof: Let s be any word having an S-occurrence in the derivation. Let xsy be
the first line that has that occurrence of s as an S-occurrence. Then
some ff; i; fi, the preceding line being ffu i fi. Let us make three observations.
(1) The v i must have either the rightmost character occurrence of the x, a
character occurrence of the s or the leftmost character occurrence of the y. (Otherwise
s would have an S-occurrence in the preceding line.)
(2) The v i must have a character occurrence in common with either the x or the y.
(Since s has no ' but v i does, s cannot account for all of v i .)
(3) If the v i has any two character occurrences of the line xsy then it has every
character occurrence between.
From (1), (2) and (3) we infer that the v i contains either the rightmost character
occurrence of the x or the leftmost character occurrence of the y.
Case I: is a single character, and the v i contains the b. Then since
the s is an S-occurrence, the b is not vital. And since it is part of the v i , it is not a
character occurrence of the first line. Hence
Case II: is a single character, and the v i contains the c. Then, by
similar reasoning,
We have proved that our theorem is true of the first line having that s as an
S-occurrence. But since "s are indestructible in a derivation, our theorem is true of all
the lines having that s as an S-occurrence.2
We consider two examples. The first is the system with the two rules (ab; aac')
and (c; b'), and the derivation
ab
aac'
whose S-occurrences are underlined. These are the first four lines of an infinite
derivation, which is obtained by applying the two rules alternately. The lines of this
derivation have increasingly long S-occurrences at their left ends, followed by several
S-occurrences of -.
Our second example is the system with the two rules (ab; b'ac) and (c; b'a) and the
derivation
ab
b'ac
b'ab'a
b'b'ac'a
b'b'ab'a'a
Each line of the resulting infinite derivation will have several S-occurrences of b,
followed by an S-occurrence of either ab or ac, and then several S-occurrences of a.
Definition (the sets S L and SR ). S fxjsome derivation has a line x'y in
which the x has no nonvital character occurrencesg. fyjsome derivation has a line
x'y in which the y has no nonvital character occurrencesg. It is not difficult to see that
is the number of
rules.)
It is clear from the definitions that S L [ SR ' S.
Theorem 2.3. If xbsy (xsby) is a line of a derivation in which the s is an
S-occurrence and the apparent letter b is an occurrence from the first line, then
Proof for xbsy: By Theorem 2.2, . The result of deleting all
lines of the derivation after the line xbsy, and then deleting the noted b and all
characters to its left from all lines, is a derivation possibly with repeated lines, having
the line sy = s'y 0 in which the apparent s is an S-occurrence, and hence is vital. Thus
The proof that s 2 SR when the line is xsby is symmetric.2
Theorem 2.4. (a) S the smallest set C such that, for all j, (1) L(v j
the smallest C 0 such that, for all j,
Proof that C ' L from the two-line derivation
y has no ' and there is a derivation of xu j y'z, for some z. This
derivation can be extended to become a derivation of xv j y'z, which shows that
Proof that S L ' C: In any derivation D, put th line does not
begin with a character occurrence of the first lineg. If and D has a j 0th
line then also. For each j 2 J(D), let the j th line be x j 'y j , where x j is
iota-free. Clearly, if J(D) 6= ; and j 0 is the smallest member of J(D) then x
for some h. Also,
j(D)g. We have proved that
L(D) where the union is taken over all derivations D in the
system, we have S L ' C.
Thus S C. The proof that
We shall generally focus on S L knowing that, whatever we prove about S L , an
appropriate similar assertion can be proved about SR .
Definition (The set S Li ). For each
The proofs of the following two theorems are straightforward:
Theorem 2.5. S
Theorem 2.6. If xu j y 2 S Lj 0
then xS Lj ' S Lj 0
Continuing the examples given above, in the system whose rules are (ab; aac') and
(c; b') we have S f-g. In the system whose rules are
(ab; b'ac) and (c; b'a), we have S ag.
Theorem 2.7. the smallest set S 0 such
(1) every v-section is in S
Proof: To prove that S 0 ' S we verify that (1)-(5) are all true of S. Items (1)
and (2) are clear.
The verification for item (3) is as follows: Assume u
some z 0 there is a derivation whose last line is yz'z 0 where the yz is vital. The result of
appending x to the left end of every line is a derivation whose last line is
. We can extend this derivation by adding the line v h z'z 0 , in which the
word R(v h )z will have an S-occurrence, showing that R(v h )z 2 S. The verification for
item (4) is similar.
To verify that (5) is true of S, assume xu h y 2 S. Then, for some z and z 0 , there is
a derivation whose last line is zxu h yz 0 in which the xu h y is an S-occurrence. If we
append to this derivation the line zxv h yz 0 the result is a derivation whose last line has
both xL(v h ) and R(v h )y as S-occurrences, showing that both these words are in S.
(Examples illustrating (3) and (5) are provided after this proof.)
To prove that S ' S 0 we assume an arbitrary derivation D and prove that every
S-occurrence in D is in S 0 . We do so by proving the following proposition by
mathematical induction on i: If D has at least i lines then every S-occurrence in the i th
line is in S 0 .
This proposition is true for since the first line has no S-occurrences.
Assume it is true for the i th line and let the (i st line be xsy in which the s is an
S-occurrence. Assume also that s does not have an S-occurrence in the i th line, and
that is the rule by means of which the i th line is rewritten as the (i st line.
either (a) at the left end of the line, which begins in ', (b) at the
right end of the line, which ends in ', (c) flanked by two consecutive ''s, (d) flanked by
nonvital b 6= ' on the left and ' on the right, or (e) flanked by ' on the left and nonvital
c 6= ' on the right. Since - is not an S-occurrence in the preceding line in the
derivation, the s must be a factor of the v h in the (i st line. In each of the cases (a),
(b), (d) and (e), the ' flanking the s must be part of the v h and - is a v-section of v h .
In case (c) either both "s are part of the v h and hence - is an interior v-section of v h ,
or only one of the two "s is part of the v h and - is an end v-section of v h .
Henceforth we assume s 6= -. Let the noted occurrence of s in the (i st line
consist of the B(s) th through the E(s) th characters of that line, in left-to-right order.
And let the noted occurrence of v h in that line consist of the B(v h ) th through the
E(v h ) th characters. Note that B(v h E(s). To carry through the
proof, we divide into cases based on the relative positions of s and v h in the
st line.
Case I: B(v h ) - B(s) and E(s) - E(v h ). Then s is a factor of v h , and since s is an
S-occurrence of the (i st line, s must be a v-section of v h . By (1), s 2 S 0 .
In the remaining cases either E(v h
v h has an occurrence of ' but s does not, the v h cannot be wholly inside the s. The
possibility E(v h give rise to Cases II and III, while the possibility
give rise to Cases IV and V, which are right-left symmetric to
Cases II and III, respectively.
Case II: E(v h E(s). Then
there would be no change in the vicinity of the s in
going from the i th line to the (i st line, and the s being an S-occurrence in the
st line would also be an S-occurrence in the i th line, contrary to our assumption.
Furthermore, the rightmost character of v h must be ', otherwise that character
occurrence would be vital and the s would not be an S-occurrence in the (i st line.
Thus R(v h since s does not have an S-occurrence in the i th line, the s must
be a proper suffix of an S-occurrence rs in that line.
Case IIa: r is a proper suffix of u h , i.e., u rs is an
S-occurrence in line i preceded by a character occurrence of the first line. (The
rightmost character occurrence of r 0 cannot be ' since it is part of u h , and cannot be
vital since it is not part of the S-occurrence rs.) It follows by Theorem 2.3 that
rs 2 S L . Taking apply (3) getting R(v h )s 2 S 0 . Since
Case IIb: r is not a proper suffix of u h . Then . Here we
apply (5) to get completing Case II.
Case III: E(v h cannot be a substring of s, we
get E(s). Consider the
character occurrence b immediately to the left of the leftmost character occurrence of s.
It must be an ', for otherwise it would be vital and would have to be part of the
S-occurrence s. Furthermore, it must be the rightmost ' in the v h , for otherwise, there
would be an ' inside of the S-occurrence s. Therefore, we can assume that the (i st
line is x y, where v th line is x 0 u h z 3 y.
Case IIIa: all the character occurrences of the u h are vital in the i th line. Then, for
some x 00 ; x 000 where x the x 000 u h z 3 is an S-occurrence in the i th line. By the
inductive hypothesis, x 000 u h z 3 2 S 0 , and by (5),
Case IIIb: not all the character occurrences in the u h in the i th line x 0 u h z 3 y are
vital. Then u all the character occurrences in the u 00 are vital
but the rightmost character occurrence in the u 0 is not vital. This character occurrence
is not an ', so it must be a character occurrence of the first line of the derivation. It
follows that u 00 z 3 is an S-occurrence, since all its character occurrences are vital but it
is not adjacent to a vital character occurrence in the i th line, either on the left or on the
right. Moreover, by Theorem 2.3, u 00 z 3 2 S L . Thus
Case IV: This case is left-right
symmetric to Case II. (It is obtained from Case II by simultaneously interchanging !
and ? and interchanging B and E.)
Case V:
This case is left-right symmetric to Case III.2
We illustrate (3) of Theorem 2.7 by the Thue system
Taking Hence
by (3) we get derivation with an S-occurrence of ga is:
bc
baa'e
h'ga'e
We illustrate (5) by the Thue system
Assume for the moment that abcd 2 S 0 , and take by (5) we
get derivation with S-occurrences of abcd,
ah and jd is
h'abf
Definition (ABC property). A word w has the ABC property if there exist
words A; B; C such that
Theorem 2.8. Every s 2 S has the ABC property.
Proof: Theorem 2.7) we can complete our proof by showing that
every s 2 S 0 has the ABC property.
To this end we note that (1) if s is a v-section then we can take
For (2), if s 2 S L (S R ) then we can take
For (3), if then we can take
y.
For (4), if then we can take
For (5) we should demonstrate that if xu h y has the ABC property then both
it. Accordingly, we assume that xu h
We shall prove that s 1 has the
property, leaving the similar proof for s 2 to the reader. A division into cases is
required according to whether or not x is a prefix of A 0 and, if not, whether or not it is
a prefix of A 0 B 0 .
Case I: A
which satisfies the requirement, since Ax
Case II:
which satisfies the requirement, since A is the same as A 0 , B is
no longer than B 0 and x 2
Case III: y, we have C
y. We now take
2 . Clearly
the requirement, since they are the same as A 0 , x 0
It remains to prove x 2 C 2 S L . Note first that
So, by Theorem 2.4, x 0
our proof is complete.2
Theorem 2.9. If S is infinite then either S L or SR is infinite.
Proof: If S is infinite then fjsjjs 2 Sg is an unbounded set of lengths. By
Theorem 2.8, each accord with the ABC property. Since fjB s jjs 2 Sg is
bounded, either fjA s jg or fjC s jg is unbounded. But each A s (C s ) is a factor of a
member of SR (S L ). It follows that either SR or S L is infinite.2
3. The algorithm. This section presents the algorithm to determine whether a
given semi-Thue system with an inhibitor is uniformly terminating, 1 using the analysis
of the preceding section. At the conclusion of this section, it is proved that the halting
problem and the derivability problem are also decidable.
The algorithm will begin by constructing finite automata for the languages S L
and SR .
Definitions related to finite automata. A nondeterministic finite automaton
(automaton for short) is a finite directed graph each of whose arcs has either a letter or
the symbol - as a label; one node is designated as the initial node and any number of
nodes are designated as accepting nodes. A walk through the graph is a sequence
where the N i 's are nodes and the A i 's are arcs, such that for each i, A i goes from N i\Gamma1
to N i . This walk goes from N 0 to N p . The word spelled out by this walk is the result of
deleting all -'s from the word a 1 a 2 \Delta \Delta \Delta a p where, for each i, a i is the label of N i . In
particular, the word spelled out is the null word itself if a i. The language
of an automaton is the set of all words spelled out by walks from the initial node to an
accepting node.
We begin by constructing, for the finite language fL(v h )j1 - h - kg, a loopless
finite automaton G 0
(1) exactly one initial node N I with no arc entering it;
(2) exactly one accepting node N T with no arc leaving it;
(3) exactly one path from N I to N and exactly one path from N to N T , for
each node N other than N I and N T ;
(4) nodes N Lk such that, for each i, the path from N Li to N T spells
out L(v i ); in particular, if L(v i there is simply a lambda arc, i.e.,
arc labeled -, from N Li to N T ; and
(5) for each i, a lambda arc from N I to N Li .
The construction is done so that
there are no nodes in G 0 other than those required by (1)-(4), and there
are no lambda arcs except those explicitly mentioned in (4) and (5).
From G 0 we construct a finite automaton G L for the language S L by repeating the
following step as often as possible: for a pair of nodes N; N 0 and an integer
I am grateful to Friedrich Otto for pointing out a defect in a previous version of this algorithm
in [13].
Figure
1: G 0
Figure
2: G L
if there is a walk from N to N 0 spelling out u i , insert a lambda arc from N to N Li ,
provided that there is not one already there.
Note that G L and G 0 , having the same set of nodes, differ only in that G L has
certain lambda arcs that G 0 does not have. It follows that the construction step is
repeated only finitely many times and the graph G L so constructed is a
nondeterministic finite automaton.
As an example, G 0 and G L for the semi-Thue system
are shown in Figures 1 and 2, respectively. Thus S
The automaton GR for the language LR is like G L except that N I and N T are
interchanged and all arrows are reversed. More explicitly, we first construct G 0R for
the same as (1),(2),(3);
Rk such that, for each i, the path from N I to N Ri
spells out R(v i this is simply a lambda arc; and
each i, a lambda arc from N Ri to N T .
The construction is done so that
are no nodes in G 0R other than those required by (1 0 )-(4 0 ), and
there are no lambda arcs except those explicitly mentioned in (4 0 ) and (5 0 ).
From G 0R , GR is constructed by repeatedly finding N , N 0 and i such that there is
a walk from N to N 0 spelling out u i ; and then inserting a lambda arc from N Ri to N 0 .
GR is similar enough to G L so that we can carry through detailed reasoning about G L
knowing that corresponding things about GR will also follow.
Theorem 3.1. The language of G L (GR ) is S L (S R ).
Proof for G L : With Theorem 2.4, the proof that S L is a subset of the language of
G L is straightforward and is left to the reader.
For the converse let A q be the lambda arcs in G L other than those of
in the order in which they are added in the construction. For each h, 1 - h - q, let
G h be the graph that results from G 0 by adding the lambda arcs A . Thus for
Where A h+1 goes from N to N Li ,
there is a walk in G h from N to some node N 0 spelling out u i .
Let P (h; n), for q - h - 1 and n - 0, be the following assertion: For all i,
spelled out by a walk in G h from N Li to N T in which the lambda arc
A h occurs at most n times then w 2 S Li .
Our objective will be to prove that P (q; n) is true for all n. First we note that
is true, since for each i there is only one walk in G 1 without the arc A 1 from
N Li to N T , which is a walk in G 0 , and that walk spells out the word L(v i
Next we prove that, for each h - q and n,
n) and let w be spelled out by a walk W in G h from N Li to N T in which A h occurs
times. Let occurs n times in W 1 but does not occur in
respectively. Assume A h goes from node N to
N Lg . By the construction of G h from G h\Gamma1 there is a walk W 3 in G h\Gamma1 from N to N T
spelling out a word u g y for some y. The walk W 1 W 3 spelling out w 1 u g y has only n
occurrences of the arc A h . Thus P (h; n) implies w 1 u . The walk W 2 from N Lg
to N T has no occurrences of the arc A h . Hence w 2 2 S Lg , which, by Theorem 2.6,
implies
From this it follows by mathematical induction that, for all n and h - q, P (h;
implies P (h; n). But, for all h ! q, P (h; n) for all n is equivalent to P
Putting all this together we get the proposition
For all n; P (q; n)
which, by Theorem 2.5, clearly implies that the language of G is included in S L ,
concluding the proof that the language of G L equals S L .
The proof that the language of GR is SR is similar.2
Next it is proved that certain derivations in the semi-Thue system can be obtained
from certain walks in G L and GR . In particular, loops in the automaton graphs will
yield derivation loops in the semi-Thue system. We confine our attention to G L ,
knowing that corresponding results about GR will also be valid. We refine our
consideration of the algorithm in obtaining the graph G L from G 0 , considering the
sequence as defined in the proof of Theorem 3.1.
Definition (w 0 (N)). For any node N other than N I , w 0 (N) is the word spelled
out by the unique walk from N to N T in G 0 .
Theorem 3.2. For each i, 0 - i - q, and for any two nodes N and N 0 in G i other
than N I , if there is a walk from N to N 0 spelling out a word x, then
z. If the walk has at least one lambda arc then
some z. These derivations are obtainable effectively.
Proof: We begin by proving the first sentence by mathematical induction on i.
That sentence is clearly true for 0: in this case w 0 since the only
relevant walks are segments of the walks from the N Li 's to N T , which are disjoint from
one another. We now assume it is true for inductive hypothesis)
and prove it is true for i + 1. This proof is itself by mathematical induction on the
length of the walk from N to N 0 . The proposition is clearly true when this length is 0.
We assume it for walks of length e (the e inductive hypothesis) and we prove it for
walks of length e + 1. Thus let
be this walk in G i+1 , and let the word x a be the word spelled out by it, x e
being the word spelled out by the walk N of length e. By the e inductive
Case I: a 6= -. Then the arc from N e to N e+1 labeled a is on the walk in G 0 from
N e to N T . Consequently, w 0 (N e
Case II: h, and (whether the lambda arc from
N e to N e+1 is the new lambda arc of G i+1 or one already in G i ) there is a walk from N e
to N T in G i spelling out a word u h z 0 , for some z 0 . By the i inductive hypothesis,
. Thus we have, for some z 000 :
since x
This concludes the proof of the first sentence in the statement of our theorem.
The second sentence follows from the fact that a lambda arc in the walk causes Case II
to apply, insuring that the derivation has at least one step. Clearly, all these
derivations are obtained effectively.2
Definition (loop derivation). If w . y and y . + y then we say the system has a
loop derivation on y from w. Note that a loop derivation provides us with one kind of
infinite derivation: from w we get the infinite derivation
From the proof of Theorem 3.2 we also get
Theorem 3.3. If node N is on a loop in G L then there is a loop derivation on
in the semi-Thue system.
(It should be mentioned that a loop does not imply that S L is an infinite set. It is
possible for the loop to consist entirely of lambda arcs and for S L to be finite. For
example, this happens with the system with the two rules (a; b'c), (b; a'c), for which
bg. Following the constructions we get a . + a, which we could have inferred in
this simple example from the observation that a ! 2 a'c'c.)
Theorem 3.4. If s 2 S and jsj ? (2k 1)m then there is a loop derivation from s.
Proof: That s has the ABC property (by Theorem 2.8) and that jsj ? (2k
together imply that
either jAj ? km or jCj ? km.
Case I: jCj ? km. Since x 2 C 2 S L , there is a walk in G L spelling out C ending at
N T . But, by the construction of G L , all words spelled out by loop-free paths in G L have
length - km. Thus there is a loop in the walk spelling out C, and so by Theorem 3.3
there is a loop derivation on some suffix of C, and hence a loop derivation from s.
Case II: jAj ? km. The proof is similar, using the graph GR for SR :2
Theorem 3.5. There is an algorithm that determines whether both G L and GR
are without loops and, if so, enumerates the finite set S.
Proof: By Theorem 3.1, S It is easy to tell whether
both graphs are without loops.
Assume now that they are without loops. Then the sets S L and SR are finite and,
by Theorem 2.9, so is S. S L and SR are enumerable from G L and GR . Let S 0 be the
smallest set satisfying (1)-(4) of Theorem 2.7. From the finite enumeration of S L and
SR we can enumerate S 0 . Noting that S is the smallest class that contains S 0 and is
closed under (5) of Theorem 2.7, let us recursively define the sets S i+1 , for all i - 0:
Clearly, S i+1 is computable from S i ; and
. But since S is finite by
Theorem 2.9, in computing the successive S i 's, eventually we shall reach an i such that
which implies that, for this i,
Theorem 3.6. If a semi-Thue system with an inhibitor in which S is finite has an
infinite derivation then there exists an s 2 S such that s .
Proof: Since there is an infinite derivation, there is an infinite S sequence
Theorem 2.1. Because S is finite there must exist p and q, q ? p, such
that s
Theorem 3.7 (Main Theorem). There is an algorithm that produces either a
loop derivation in a given semi-Thue system with an inhibitor, or the information that
the system is uniformly terminating.
Proof: The algorithm begins by constructing the automaton G L for S L . If G L has
a loop then from that loop a loop derivation is effectively determined, by Theorem 3.3.
If G L has no loop, the analogous automaton GR for SR is constructed. If GR has a
loop, analogously a loop derivation is effectively determined.
If neither G L nor GR has a loop then, by Theorem 3.5, S is finite and can be
enumerated. The . relation on S is computed and, from this, the . + relation on S. If
there is an s 2 S such that s . + s then we have a loop derivation, effectively.
Otherwise, by Theorem 3.6, the system has no infinite derivation.2
Corollary 1. The uniform termination problem for semi-Thue systems with an
inhibitor is decidable.
Corollary 2. If a semi-Thue system with an inhibitor has an infinite derivation
then it has a loop derivation.
In studying the complexity of the algorithm of Theorem 3.7, we assume that the
expression T naming the semi-Thue system is simply the list of its rules,
The following assertions should be clear to the reader: The
automaton G 0 is constructible in polynomial time. Each G i+1 is constructible from G i
in polynomial time. Since all the automata G have the same set of
nodes and each G i+1 is obtained from G i by adding an arc, q is bounded by a
polynomial in the number of these nodes. Thus the construction of the
nondeterministic finite automaton G L is accomplished in polynomial time, and
similarly for GR . It is possible to determine in polynomial time whether G L (GR ) has a
loop, and if so to produce the loop derivation in polynomial time.
However, I cannot prove that the enumeration of S L (S R ), if it is finite, can be
done in polynomial time, since jS L j (jS R j) may be exponential in the size of G L (GR ).
Thus if G L or GR has a loop, the main algorithm produces a loop derivation in
polynomial time and terminates. But if neither G L nor GR has a loop then the main
algorithm has to enumerate the finite set S. Since there is no polynomial bound on jSj
for those S that are finite, the algorithm as written in the proof of Theorem 3.7 is not a
polynomial-time algorithm. However, this does not imply that the following has a
negative answer:
Open question 1. Is there a polynomial-time algorithm for the problem of
whether a given semi-Thue system with an inhibitor is uniformly terminating?
This section closes by settling the two remaining problems of Section 1, the
halting problem and the derivability problem for semi-Thue systems with an inhibitor.
Theorem 3.8. The halting problem for semi-Thue systems with an inhibitor is
decidable. If such a system has an infinite derivation from a word w then it has a loop
derivation from w.
Proof: For a given w and be the set of
derivations from w of length i, and
let\Omega i be the set of all S-sequences that can be
taken from those derivations (as in the proof of Theorem 2.1). Note that \Delta 1
and each \Delta i+1
and\Omega are readily computable from \Delta i
and\Omega i . Consider three
possibilities:
(1) For some i ? 1, ;. Then there is no infinite derivation from w.
(2) There is an i and an S-sequence
in\Omega i with a repeated S-expression.
Then there is an loop derivation from w.
(3) There is an i and an S-sequence
in\Omega i with an S-expression s such that
m. Then by Theorem 3.4 there is a loop derivation from s, and hence
a loop derivation from w.
If any of these possibilities occurs, then we have the answer to the question after a
finite amount of time. It remains to prove that one of them must occur. Theorem 1.1
can be used to prove that if there is no infinite derivation from w then the set of
lengths of the derivations from w has an upper bound and possibility (1) will occur. If
there is an infinite derivation from w then by Theorem 2.1 there is an infinite
S-sequence \Delta. The proof of that theorem makes it clear that w . s 1 , and hence
w . s i , for all i. If that S-sequence has a repeated element then possibility (2) will
occur. If not there will be no bound on the length of the elements occurring in that
S-sequence and possibility (3) will occur.2
Theorem 3.9. The derivability problem for semi-Thue systems with an inhibitor
is decidable.
Proof: We define I(w) to be the number of iotas in the word w. Where
is a derivation and be the weight of the
st step, which equals I(v), (u; v) being the rule used. Let the weighted length of
a derivation be the sum of the weights of all the steps of the derivation. Given x and y,
any derivation of y from x must have a weighted length of I(y) \Gamma I(x).
The algorithm that decides whether y is derivable from x simply enumerates all
derivations from x whose weighted length equals I(y) \Gamma I(x). Because all weights are
positive, no line z such that I(z) ? I(y) can be part of a such a derivation.
Consequently, the list of such derivations can be enumerated readily. Finally, y is
derivable from x if and only if the last line of one of these derivations is y:2
Open question 2. Does there exist an algorithm for the following problem:
Given a semi-Thue system with an inhibitor and words x and y, does x . y hold?
4. Well behaved derivations. 2 We now turn our attention to semi-Thue
systems without an inhibitor, with an emphasis on those having only one rule. Some
derivations in these systems turn out to be like those in systems with an inhibitor.
Definition (inhibited rule, inhibition system). If u a rule of a
semi-Thue system T without ' then is an inhibited rule of T . (v 0 or v 00 can be
the null string.) The inhibition system of T is the semi-Thue system whose rules are all
the inhibited rules of T . An immediate consequence of this definition is
Theorem 4.1. If x is a finite or infinite derivation in the inhibition
system of the semi-Thue system T then, where each x 0
i is x i with all "s erased,
is a derivation in T .
Definition (well behaved, ill behaved). A derivation D in a semi-Thue
system T without ' is well behaved if there is a derivation in the inhibition system of T
from which D is the result of deleting all "s. Otherwise D is ill behaved.
From Theorems 4.1 and 3.7 we get
Theorem 4.2. There is an algorithm that produces, given a semi-Thue system
without ', either a well behaved loop derivation in the system or the information that
the system has no well behaved infinite derivation.
Example 1. The inhibition system T 0 of the system T whose one rule is (cb; bbcc)
has five rules:
This section is based on material from [13].
This system T 0 has an infinite derivation. In fact, all we need for this infinite
derivation is the one rule (cb; bb'cc). The infinite derivation is based on the following
loop of length 2:
ccb
cbb'cc
bb'ccb'cc
(In this and the examples to follow, the part of the line with an underscore is the
occurrence of u that is rewritten as the v in the next line, which has an overscore.) The
th line in the infinite derivation is (bb') st line is
Accordingly, the original system also has an infinite well behaved derivation based
on the loop
ccb
cbbcc
bbccbcc
The (2n) th line of this infinite derivation is (bb) st line is
Example 2. The following is an ill behaved derivation in the system with the one
rule (ccb; bbccc):
ccccbb
ccbbcccb
bbcccbcccb
bbcbbccccccb
bbcbbccccbbccc
bbcbbccbbcccbccc
To prove that this derivation is ill behaved we note that the inhibition system has
six rules, whose right sides are, respectively, 'bbccc, b'bccc, bb'ccc, bbc'cc, bbcc'c and
bbccc'. Thus the second line in the corresponding derivation in the inhibition system
has six possibilities. It is left to the reader to verify that in each of these six cases the '
will inhibit the replacement of the occurrence of bbc in one of the lines below. (For
example, if the ccb in the first line is rewritten as bb'ccc in the second line then the ccb
in the fifth line cannot be rewritten.)
However, the first five lines of the above derivation form a well behaved derivation,
which can be verified by considering the following derivation in the inhibition system:
ccccbb
ccbbc'ccb
'bbcccbc'ccb
'bbc'bbcccc'ccb
If all the "s from this derivation are deleted, what remains are the first five lines of the
above derivation in T .
The system with the single rule (ccb; bbccc) has an infinite derivation. This is clear
from the first five lines of our original derivation, which shows that
ccccbb . 4 ccccbb
The sixth line of this infinite derivation is the sixth line of the above derivation, which
shows that the infinite derivation is ill behaved.
This system has no infinite well behaved derivation. To verify this fact we can
refer to Theorem 4.1 and prove that its inhibition system has no infinite derivation.
Using the algorithm of Section 3 for this is tedious as it involves enumerating S.
Rather than do this we work with a superset of S:
3g. Then it is rather simple to verify using
Theorem 2.4 that
Thus in particular, for each rule (u; v), we have L(v); R(v) 2 T .
Next, we use Theorem 2.7 to verify that
by proving the following:
(1) every v-section is in TT ;
(3) (since all rules have the same left side ccb) if
then R(v)z 2 TT (for all right sides v);
Parts (1) and (2) are clear. For (3), yz 2 S L implies
. The reasoning for (4) is similar to the
reasoning for (3).
For (5), implies that . So, a fortiori,
From L(v); R(v) 2 T , we then get xL(v); R(v)y 2 TT .
Having proved that S ' TT , we complete the proof that the inhibition system has
no infinite derivation by proving there is no infinite S sequence (invoking Theorem 2.1).
The proof is by contradiction. Assume there is an infinite S sequence s
Then each s h
with
and 3. The following must be true:
nothing could be derived from u h .)
(b) Either
(Part (b) can be verified by first noting that there is only one occurrence of ccb in
. Thus if s h ! w, then w is a word resulting from
by placing a single ' anywhere between the two slashes and deleting the slashes; s h+1 is
either the word to the left of the ' or the word to its right. If to the left then
if to the right, k
Taking
, we have by (b) either
1. By (a) again we get k
Where s
we get by (b) either j
By (a) we then see that s 4 cannot exist, which completes our proof that the system
with the one rule (ccb; bbccc) has no infinite well behaved derivation, ending our
discussion of Example 2.
In [13] there is a much more expeditious algorithm for the problem of whether a
given one-rule semi-Thue system has an infinite well behaved derivation. That
algorithm does not require consideration of the inhibition system of the given system,
but involves a structural analysis of one-rule systems that is well outside the purview of
this paper. That structural analysis having been established, the proof in [13] that the
one-rule system (ccb; bbccc) has no infinite well behaved derivation takes one quarter
the space used in the proof given above as part of Example 2.
This example generalizes. Zantema and Geser [16] prove that a system with one
rule
in which (1) p ? n, either p is a multiple of n or q is a multiple of
m, has an infinite derivation. In [13] it is proved that such a system in which either
2m has no infinite well behaved derivation. From these two results it
follows that any such system in which either 2n in for i an integer - 2
or else 2m ? in has an infinite ill behaved derivation but no infinite well
behaved derivation.
Interestingly, it is proved in [16] that there is no infinite derivation at all in any of
the following cases: (1) q is not a multiple of m,
is not a multiple of n. (Senizergues [14] has extended these results of
Zantema and Geser.) In [13] it is proved that if p - 2n and q - 2m then there is an
infinite well behaved derivation.
The two examples discussed in this section illustrate the distinction between well
behaved infinite derivations and ill behaved infinite derivations. They are intended to
suggest the importance of this distinction to the question of whether the uniform
halting problem for one-rule semi-Thue systems is decidable. It is generally conjectured
that this problem is decidable, and some progress has been made in proving partial
results along that line. However, the question of whether the uniform halting problem
for one-rule semi-Thue systems is decidable is very much open. It seems to me that
further progress on this question will come only if research workers achieve a structural
understanding of ill behaved derivations. There are partial results towards this end
in [13].
The halting problem is open for one-rule semi-Thue systems. On the other hand,
we have
Theorem 4.3. The derivability problem is decidable for one-rule semi-Thue
systems.
Proof: Given x, y and a semi-Thue system whose one rule is (u; v) our algorithm
to determine whether y is derivable from x divides into three cases according to the
relative lengths of u and v: Case I, jvj ! juj; Case II,
In Cases I and II, the finite set of words derivable from x can be enumerated, and the
presence or absence of y in the set easily determined. In Case III, the finite set of
words derivable from x whose length does not exceed that of y can be enumerated,
again yielding an answer to the question.2
For a class of semi-Thue systems an interesting question is, does every semi-Thue
system in the class with an infinite derivation have a loop derivation? The result in
Section 3 shows that this question has an affirmative answer for the class of semi-Thue
systems with an inhibitor. When restricted to well behaved infinite derivations, it has
an affirmative answer for all semi-Thue systems. However, it is an open question for
one-rule semi-Thue systems; which means that the question restricted to infinite ill
behaved derivations is open for one-rule semi-Thue systems.
--R
"Three models for the description of language,"
"Termination of rewriting,"
"Topics in termination,"
"On proving uniform termination and restricted termination of rewriting systems,"
Monographs on Theoretical Computer Science
Termination und Konfluenz von Semi-Thue-systemen mit nur einer Regel
"Explanations to the text,"
"One-rule semi-Thue systems with loops of length one, two or three,"
"The development of formal language theory since 1956,"
"The uniform halting problem for one-rule semi-Thue systems: progress report,"
"Well behaved derivations in one-rule semi-Thue systems,"
''On the termination problem for one-rule semi-Thue systems"
"Probleme - uber Ver-anderungen von Zeichenreihen nach gegeben Regeln,"
"A complete characterization of termination of 0
--TR
--CTR
Matiyasevich , Graud Snizergues, Decision problems for semi-Thue systems with a few rules, Theoretical Computer Science, v.330 n.1, p.145-169, 31 January 2005 | string rewriting;uniform termination;well behaved derivation;semi-Thue system;termination |
594264 | Efficient Algorithms to Detect and Restore Minimality, an Extension of the Regular Restriction of Resolution. | A given binary resolution proof, represented as a binary tree, is said to be i>minimal if the resolutions cannot be reordered to generate an irregular proof. Minimality extends Tseitin"s regularity restriction and still retains completeness. A linear-time algorithm is introduced to decide whether a given proof is minimal. This algorithm can be used by a deduction system that avoids redundancy by retaining only minimal proofs and thus lessens its reliance on subsumption, a more general but more expensive technique.Any irregular binary resolution tree is made strictly smaller by an operation called i>Surgery, which runs in time linear in the size of the tree. After surgery the result proved by the new tree is nonstrictly more general than the original result and has fewer violations of the regular restriction. Furthermore, any nonminimal tree can be made irregular in linear time by an operation called i>Splay. Thus a combination of splaying and surgery efficiently reduces a nonminimal tree to a minimal one.Finally, a close correspondence between clause trees, recently introduced by the authors, and binary resolution trees is established. In that sense this work provides the first linear-time algorithms that detect minimality and perform surgery on clause trees. | Introduction
The regular restriction of binary resolution [14] states that a resolution
step resolving on a given literal should not be used to deduce a clause
containing that literal. In other words, that resolution step should not
be an ancestor of such a clause in the binary derivation tree. We extend
this restriction so that it applies also when a reordering of the resolutions
brings such a clause below that step. We use rotations of edges
in the binary tree to reorder the resolution steps, and require that the
rotations neither weaken what is proved nor increase the size of the
tree. If a binary resolution proof cannot be made irregular by such
rotations, we call it minimal.
This extension of regularity depends on sequences of rotations, and
thus appears to be expensive to compute. However we characterize it
with a condition that can be checked efficiently by examining the static
tree. The condition is stated in terms of history paths in the binary
resolution tree. Each history path tells the story of a given literal. The
tail of the history path is a leaf of the tree and it tells where the
literal was introduced in an input clause. The history path is said to
close at the node where its literal is resolved away. When one history
path closes at a node that occurs in another history path, and the two
paths are disjoint, we say the first history path directly precedes the
other. The precedes relation on history paths is the reflexive transitive
closure of directly precedes. History paths and the precedes relation are
basic in our understanding of how binary resolution trees behave when
rotations are performed. We provide simple conditions on history paths
that characterize when one node can be rotated below another (we say
it is visible from the other) and when one node cannot be rotated from
below another (we then say it supports the other.) By examining the
history paths in a static tree, we can decide much about what can and
cannot be accomplished by sequences of rotations.
In particular, we can say whether rotations can convert a regular tree
to an irregular one. A theorem prover can use this ability to screen the
proofs it builds, and retain only the minimal ones. Since every clause
with a non-minimal proof is subsumed by some clause with a minimal
proof, this theorem prover uses minimality to lessen its reliance on sub-
sumption. The runtime of full subsumption grows with the number of
retained clauses, which may become very large, while detecting minimality
depends linearly on the size of each proof tree, which is typically
much smaller.
Instead of using minimality simply as a filter, a theorem prover can
convert a non-minimal proof to a minimal one, using operations defined
in this paper. Consider the branch of an irregular derivation tree that
makes it irregular. This branch contains the node where some given
literal is resolved and, further down, contains a clause in which that
literal occurs. Why resolve the literal away, only to have it reappear
later? We can remove this resolution but otherwise reconstruct the
branch as closely as possible to the original, with this literal appearing
additionally in some of the clauses. The constructed tree is smaller
and the result it proves is at least as general as the original one. We
call this operation surgery, and define a second operation, splay, which
rearranges a non-minimal tree so that it is irregular. Both operations
run in time linear in the size of the tree. A combination of both operations
will eventually reduce any non-minimal tree to some minimal
one.
The first section below presents the regular restriction on binary
resolution trees. In that section we introduce the surgery operation for
irregular binary resolution trees. Then minimal binary resolution trees
are introduced. This section also discusses our rotations and the set of
rotation equivalent trees, which is all of the trees that can be generated
from a given tree by a sequence of these rotations. In the following sec-
tion, we discuss the "precedes" relation of history paths, and use that to
define the "holds" relation on nodes. We then relate holds and visibility
by showing that if the nearest common descendant of two given nodes
holds one of them, then that one is not seen by the other, i.e. it cannot
be rotated below the other. Based on this condition, we give an efficient
algorithm for deciding visibility. We show how a theorem prover can
be restricted to retain only minimal proofs and disregard non-minimal
ones, decreasing the number of proofs that must be considered. Then
we show the splay operation for efficiently converting a non-minimal
proof into an irregular one, so that surgery can further convert it to a
minimal one. Thus another theorem prover can efficiently convert its
non-minimal results to minimal ones if desired. In the next section we
use history paths to characterize support: the condition where one node
in a binary resolution tree must be a descendant of another after any
sequence of rotations.
Both minimality and surgery were first developed for clause trees [5].
The clause tree is a tool for developing ideas in automated reasoning,
and the binary resolution tree is an efficient, compact data structure
to implement clause trees. In the second last section we show the close
relation between binary resolution trees and clause trees. Thus, this
paper provides the first efficient algorithm for surgery in clause trees.
We close with some remarks on the relation between clause trees and
binary resolution trees, and related work.
This paper is an extension of [13].
2. Binary Resolution Trees
We use standard definitions [2] for atom, literal, substitution, unifier
and most general unifier. In the following a clause is an unordered disjunction
of literals. We do not use set notation because we do not want
multiple occurrences of a literal to collapse to a single literal automat-
ically. Thus our clauses can be viewed as multisets. An atom a occurs
in a clause C if either a or :a is one of the disjuncts of the clause.
The clause C subsumes the clause D if there exists a substitution '
such that C' ' D (as sets, not as multisets). A variable renaming
substitution is one in which every replacement of a variable maps to
another variable, and no two variables map to the same variable. Two
clauses C and D are equal up to variable renaming if there exists a
variable renaming substitution ' such that Two clauses are
standardized apart if no variable occurs in both. Given two parent clauses
which are standardized
apart (a variable renaming substitution may be required) their resolvent
is the clause (C 1 - C 2 )' where ' is the most general unifier of
g. The atom resolved upon is a 1 ', and the set of
resolved literals is g.
It is convenient to define a mapping ae of literals for the resolution
operation. This is used later to define history paths.
(Resolution mapping). For each resolution operation we
define the resolution mapping ae from each occurrence of a literal c in
each parent clause to either the atom resolved upon if c is a resolved
literal, or otherwise to the occurrence of c' in the resolvent.
The reader may be missing the usual factoring operation on a clause,
which consists of applying a substitution that unifies two of its literals
with the same sign and then removing one of these literals. This
operation is not needed in binary resolution trees, however, since if a
clause contains two identical or unifiable literals, both can be resolved
upon whenever the clause is used in a resolution. By allowing several
literals to be resolved on, instead of merging them before the resolu-
tion, we have just one type of internal node in our binary resolution
tree, instead of two. (De Nivelle uses resolution nodes and factorization
nodes [3].) Moreover, an implementation is free to merge or factor
literals if desired. Factoring may be seen as an optimization if the factored
clause can be used in several resolution steps, since the factoring
is done only once.
A binary resolution derivation is commonly represented by a binary
tree, drawn with its root at the bottom. Each edge joins a parent node,
drawn above the edge, to a child node, drawn below it. The ancestors
(descendants) of a node are defined by the reflexive, transitive closure of
the parent (child) relation. The proper ancestors (proper descendants)
of a node are those ancestors (descendants) not equal to the node itself.
If T and H are nodes in a tree then path(T ; H) is the unique path from
T to H . Here, T is called the tail and H the head.
Definition 2. A binary resolution tree on a set S of input clauses is
a labeled binary tree. Each node N in the tree is labeled by a clause
label, denoted cl(N ). Each node either has two parents and then its
clause label is the result of a resolution operation on the clause labels
of the parents, or has no parents and is labeled by an instance of an
input clause from S. In the case of a resolution, the atom resolved upon
is used as another label of the node: the atom label, denoted al(N ).
Any substitution generated by resolution is applied to all labels of the
tree. The clause label of the root of the binary resolution tree is called
the result of the tree, result(T ). A binary resolution tree is closed if its
result is the empty clause, 2.
a-d
a:b-d-e
d:b-c-e
e:b-c-f-g
c:a- b-b-f-g
a: b-b-f-g
b:f-g
-a-b-e
c-d
e-f-g
a-b-c
h:-a
-b
-g
-a-h
-h
Figure
1. An irregular binary resolution tree.
For the binary resolution tree in Figure 1,
:gg. The labels of a node N are
displayed beside the name of the node and separated by a colon, e.g.
the node N 4 has atom label c, and clause label a - b - b - f - g. The
order between the parents of a node is not defined.
If instead of labelling the internal nodes by atoms, one labels each
edge with the complement of the literal resolved upon, a binary resolution
tree would become a semantic tree, and the leaves of the binary
resolution tree would become failure nodes of the semantic tree.
Using the resolution mapping ae for each resolution operation in the
tree, we can trace what happens to a literal from its occurrence in the
clause label of some leaf, down through the tree until it is resolved
away. Clearly if all literals are eventually mapped to the atom label
of some internal node, the clause label of the root is empty. In this
case by soundness of resolution, the clause labels of the leaves is an
b:
a-d
d:a-c
c:a-a-b
a:b
c-d
a-b-c
-b
-a-h
-h
Figure
2. Surgery: Operation 5 on Figure 1.
unsatisfiable set. Thus we are primarily concerned about tracing the
"history" of a literal starting from its appearance in a leaf.
Definition 3 (History Path). Let the nodes (N occur in a
binary resolution tree T such that N 0 is a leaf whose clause label contains
a literal a, and for each is a parent of N i . Let
ae i be the resolution mapping from the parents of N i to N i , and let
occur in cl(N i ). Suppose N n either is the root of T , or has
a child N such that ae a is mapped by the resolution at N to the
atom resolved upon at N . Then (N is a history path for a.
The history path is said to close at N if N exists, and then N is written
as close(P ). The node N n is the head, the leaf N 0 is the tail and a is
the literal of P , written head(P ); tail(P ) and literal(P ), respectively.
For example in Figure 1, (M for c which
closes at N 4 . The two history paths for b in Figure 1, corresponding to
the two occurrences of b, are (M 3
Both of these close at N 6 . The only which does not close is the one for
f , which is
Definition 4 (Regular). A binary resolution tree T is regular if there
does not exist a node N of T and a descendant M of N , such that
al(N) occurs in cl(M ).
The tree in Figure 1 is irregular because al(N 1 ) is a and a occurs
in cl(N 4 ). Irregular trees are never necessary. Why resolve away the a
twice? One could choose to leave out the resolution at N 1 , leaving the
a in the clause, do the other resolutions as necessary (not all will be
necessary) and later resolve a away, as was done at N 5 . Operation 5
makes this idea more formal.
A new binary resolution tree T 0 is constructed from T in which M 0
and all of its ancestors, and possibly other M i are removed. However
all leaves of T 0 are also leaves of T . Thus every history path in T 0
has a corresponding history path in T . The converse cannot be true,
since the history paths of T through M 0 do not exist in T 0 . A new
sequence (N 0
n ) is defined in which either N 0
M i is removed) or N 0
i corresponds to N i in T .
Operation 5 (Surgery on irregular trees). Let T be an irregular binary
resolution tree with being the path of
nodes from N 1 to the root N n , and with being the first
node in this path whose clause label contains a. Let N i\Gamma1 and M i\Gamma1 be
the parents of N i for be the parents of
so that a occurs in the clause label of N 0 with the same sign as in
cl(N
Procedure
all ancestors of N 0 be in T 0 . (M 0 and all of its
ancestors are removed.) Let N k be the node at which some history
path P a for a in N j closes, if k exists.
For do
If there is a history path in T 0 containing N 0
for which the corresponding
history path in T closes at N i then
Put M i\Gamma1 and all its ancestors into T 0 .
i as a new node in T 0 which is the child of N 0
Let the resolution at N 0
i be defined so that the history paths of
i that close at N 0
i correspond to history paths of T that close at
Let the history path corresponding to P a also close at N 0
k .
(That is, the same literals as far as possible are resolved at N 0
i as
at N i with one possible addition.)
else
There is no history path containing N 0
which corresponds To a
path that closes at N i .
. (M i\Gamma1 and all of its ancestors are removed.)
endif
endfor
Note that if the occurrence of a in N j is never resolved away, i.e. its
history path continues to the root, then the two literals corresponding
to a may occur in the root of T 0 . However, they are both at least as
general as a.
Figure
2 shows the effect of surgery on Figure 1. Surgery is performed
at using N 4 as N j . M are not needed in T 0 . By insisting
that both occurrences of a are closed at the same node, we ensure that
does not have a in its result when T does not. Thus N 0
5 closes both
history paths for a from N 0
Theorem 6. Let T be an irregular binary resolution tree on a set
S of clauses and T 0 is constructed by Operation 5. Then T 0 is also a
binary resolution tree on S, T 0 is smaller than T and the result of T 0
subsumes the result of T .
Proof. We use the following lemma: If clauses C 1 and C resolve to give
clause C 2 subsumes C 1 then either the resolution of C 2 and
C is not possible and C 2 subsumes R 1 , or it is possible and its result,
This assumes that all literals from C resolved in the
first resolution are also resolved in the second, and furthermore that
literals from C 2 are resolved in the second resolution if they correspond
(in the subsumption) to literals from C 1 resolved in the first resolution.
Each leaf in T 0 has the same label as a leaf in T and therefore T 0
is defined on S. Also, each internal node is defined by a resolution of
its parents, so T 0 is a binary resolution tree. Note that cl(N 0
subsumes cl(N 1 ) - a because cl(N 1 ) contains all the literals in cl(N 0 )
except possibly a. Using repeated applications of the lemma, it follows
that cl(N 0
cl(N j ) since a occurs in cl(N j ). Then cl(N 0
the result of T 0 subsumes that of T . Since M 0 is not in
T 0 and since all other nodes in T 0 are taken at most once from T , it
follows that T 0 has fewer nodes than T . 2
Theorem 7 (Completeness [14]). If S is unsatisfiable there exists a
closed regular binary resolution tree on S. Furthermore the smallest
closed binary resolution tree is regular.
Proof. If S is unsatisfiable, there exists a closed binary resolution tree
[11]. If it is irregular, apply Operation 5 repeatedly until it is regular.
This process must terminate since the tree is smaller at each step.
If the smallest closed binary resolution tree is not regular, surgery
can be applied to it, making a smaller closed tree. 2
Figure
3. A binary tree rotation
3. Minimal Binary Resolution Trees
A rotation of an edge in a binary tree is a common operation, for
example with AVL trees [1]. Before we apply it to binary resolution
trees, we review the operation on binary trees. Given the binary tree
fragment on the left of Figure 3, a rotation is the reassignment of edges
so that the tree on the right of Figure 3 is produced. The parent C of
becomes the child of E and the parent B of C becomes the parent
of E. If E has a child in T , then C takes that child in T 0 . In other
words, the edges (B; C), (C; E) and (E; F ) if it exists, are replaced by
the edges (B; E), (E; C) and (C; F ) if necessary.
Operation 8 (Edge Rotation). Let T be a binary resolution tree with
an edge (C; E) between internal nodes such that C is the parent of E
and C has two parents A and B. Further, suppose that no history path
through A closes at E. Then the result of a rotation on this edge is the
binary resolution tree T 0 defined by resolving cl(B) and cl(D) on al(E)
giving cl(E) in T 0 and then resolving cl(E) with cl(A) on al(C) giving
cl(C) in T 0 . Any history path closed at C in T is closed at C in T
similarly any history path closed at E in T is closed at E in T 0 . Also,
the child of E in T , if it exists, is the child of C in T 0 .
A rotation may introduce tautologies to clause labels of internal
nodes. For instance, if al(C) occurs in cl(D) then cl(E) in T 0 may
be tautological. However the clause label of the root is not changed
(Corollary 11). We prove a slightly more general result first, which is
also used later.
Definition 9. Let T 1 and T 2 be two binary resolution trees defined
on the same set of input clauses. Then T 1 and T 2 close history paths
similarly if there is a one-to-one and onto mapping - from nodes in T 1
to those in T 2 , such that:
1. If N is a leaf then -(N) is a leaf and both are labeled with instances
of the same input clause. Thus there is a natural one to one cor-
respondence, from literals in cl(N) to those in cl(-(N )). Moreover
this mapping of literals provides a mapping from history paths in
T 1 to those in T 2 , defined so that they start from the same literal
in the input clause, up to variable renaming. We represent these
other two mappings also with -. We require for all history paths P
in T 1 that tail(-(P
up to variable renaming.
2. For every history path P of T 1 , P closes at a node N if and only if
closes at -(N ).
Thus two binary resolution trees close history paths similarly if they
resolve the same literals against each other, albeit in a possibly different
order.
Lemma 10. If two binary resolution trees T 1 and T 2 close history
paths similarly, the result of T 1 and the result of T 2 are the same, up
to variable renaming.
Proof. Note that result(T 1 ) and result(T 2 ) are composed entirely of
literals from history paths that do not close, and since the same history
paths are closed in each, the same literals are not resolved away. Also
the composition of mgus in T 1 and that in T 2 are unique up to variable
renaming since, given a node N , the same literals are unified at N and
-(N ), up to variable renaming. 2
Corollary 11. Given a binary resolution tree T with an internal node
C and its child E, Operation 8 generates a new binary resolution tree
and cl(E) up to variable renaming.
Proof. Observe that Operation 8 produces a tree which closes history
paths similarly. 2
A rotation changes the order of two resolutions in the tree. Rotations
are invertible; after a rotation, no history path through D closes at
C, so another rotation at (E; C) can be done, which generates the
original tree again. We say that two binary resolution trees are rotation
equivalent if one can be generated from the other by a sequence of
rotations. For instance, the first binary resolution tree in Figure 4 is
produced by rotating the edge (N 4 ; N 5 ) in Figure 1. The second tree
Figure
4. From Figure 1 rotate
in
Figure
4 is then produced by rotating the edge (M 4 ; N 5 ). Thus both
trees are rotation equivalent to Figure 1. Rotation equivalent is an
equivalence relation. It is not surprising that rotation equivalent binary
resolution trees must close history paths similarly, but the converse is
true as well.
Theorem 12. Two binary resolution trees T 1 and T 2 are rotation
equivalent if and only if they close history paths similarly.
Proof. Since one rotation of T 1 creates a binary resolution tree that
closes history paths similarly to it, so too does the sequence of rotations
creating T 2 .
The converse is proved by induction on the number of internal nodes.
Suppose T 1 and T 2 close history paths similarly. Then they must have
the same number n of internal nodes since they have the same number
of leaves. If no rotation is possible and the theorem
holds. Let N be a node in T 1 with parents L 1 and L 2 that are leaves.
Then in T 2 , -(N) has proper ancestors -(L 1 ) and -(L 2 ) which also are
leaves, and -(N) closes only history paths with tails -(L 1 ) and -(L 2 ).
We create T 0
2 by rotating edges so that -(L 1 ) and -(L 2 ) are parents of
-(N ), if this is not already the case. Let C be either parent of -(N) and
let A and B be the parents of C. If -(L 1 ) and -(L 2 ) are both ancestors
of C then neither is an ancestor of the other parent of -(N ). But -(N)
must close a history path from that other parent, contradiction. Thus
the edge (C; -(N)) can be rotated, since not both A and B contain a
history path closing at -(N ). This rotation reduces the total number
of non-leaf ancestors of -(N ). After a finite number of such rotations,
both parents of -(N) are leaves. Call this tree T 0
.
Let T
1 be T 1 with leaves L 1 and L 2 deleted, and let T
2 be T 0
2 with
leaves
close history paths
similarly since T 1 and T 0
close history paths similarly. By induction T and T
are rotation equivalent. The sequence of rotations to convert
1 to T
will also convert T 1 to T 0
2 which is rotation equivalent to T 2 .We focus on the set of rotation equivalent trees that do not contain
an irregular binary resolution tree. Any tree in this set is said to be
minimal, since surgery cannot be applied to make it smaller.
Definition 13. A binary resolution tree T is minimal if no sequence
of rotations of edges generates a tree T 0 that is irregular.
Theorem 14. If a binary resolution tree T on S is non-minimal, there
exists a minimal binary resolution tree T 0 on S which is smaller than
T and the result of T 0 subsumes the result of T .
Proof. If T is not minimal, apply Operation 8 and Operation 5 so that a
regular tree is produced. If this tree is minimal then let T 0 be this tree.
Otherwise repeat from the beginning until T 0 is defined. This process
must terminate because the tree is getting smaller at each application
of Operation 5. Also the old result is subsumed by the new result at
each step. 2
Thus a smallest binary resolution tree is minimal. Goerdt has shown
[4] that a smallest regular binary resolution directed acyclic graph
(DAG) may be exponentially larger than an irregular binary resolution
DAG. Thus by considering only regular or minimal binary resolution
DAGs, a theorem prover may not find the smallest proof, and hence
may require more inferences to prove a given theorem. However in most
cases we believe that the space of minimal binary resolution DAGs is
much smaller than the space of all binary resolution DAGs and that
considerable time can be saved by restricting to minimal ones. (Similar
arguments can be made for and against most restrictions of resolution,
including set-of-support and hyperresolution.)
4. Checking Minimality
Determining whether a given binary resolution tree is minimal seems
to be labourious, since the straightforward application of the definition,
as is done in the proof of Theorem 14, checks every possible sequence
of rotations, and there can be exponentially many. In this section we
give an efficient algorithm for determining visibility - which nodes can
be rotated below which - so deciding minimality is efficient.
Definition 15 (Visible). In a given binary resolution tree with internal
nodes N and M , we say that M is visible from N , and that N
can see M , if there exists a sequence of rotations such that M is a
descendant of N . Otherwise M is invisible from N .
Thus a node can see the nodes that can be rotated below it. Although
this is a property defined in terms of rotations, it is possible to inspect a
static tree, without doing any rotations, to determine visibility. Because
of this, visibility can be computed in linear time. That static property,
holds, is defined after one more concept, precedes.
Definition directly precedes a history
path Q if P and Q have no nodes in common, and P closes at
some node in Q. We write P OE Q. Moreover we say P precedes Q, and
there is a sequence of history paths (P
directly precedes P i+1 for
A history path P precedes a node N if N closes some history path Q
and P OE Q.
The precedes relation is the reflexive and transitive closure of directly
precedes. In particular a history path precedes itself, even though
it does not directly precede itself. Also note that precedes defines a
partial order on the set of history paths.
In most cases a rotation does not change the precedes relation on
history paths.
Lemma 17. Let the history path P precede the history path Q in
the binary resolution tree T and let P be the images of
and T respectively after a rotation of the edge (C; E) as in Definition 8.
Further suppose that the head of Q is not C. Then P 0 precedes Q 0 in
Proof. Let and TD be the subtrees of T rooted at A; B and
C respectively. If close(P ) and head(Q) are in the same one of these
subtrees, the rotation has no effect on whether P ! Q. We know that
head(Q) is a proper descendant of close(P ). Also head(Q) is not C so
head(Q) must be a descendant of E.
Now if tail(P ) and tail(Q) are in the same subtree,
then the rotation does not affect P OE Q because the node of Q which
P precedes is also in that subtree. Let P 1 be the path closing at that
node. Thus P OE P 1 OE Q. We have these cases, which are illustrated
in
Figure
5.
1. tail(Q) is in . If tail(P ) is in closes at C. After the
rotation,
1 , which is one node longer, closes at C in T 0 . P 0 OE
Otherwise tail(P ) is in TD . Let P 0 denote the path through B
closing at C. After the rotation P 0 OE P 0
2. tail(Q) is in TB . If tail(P ) is in after the rotation P 0 OE
Otherwise if tail(P ) is in TD then after the rotation, P 0 OE P 0
3. tail(Q) is in TD . Since no path through A closes at E, we know
tail(P ) is not in . Thus tail(P ) is in TB . After the rotation,
directly hold an
internal node M of a binary resolution tree if M is the first node that
occurs on both P 1 and Q 1 , (i.e. the parent of M does not occur on
both.) We say that P and Q hold M if there exist history paths P 1 and
directly hold M . A
node N holds M if P and Q hold M and both P and Q close at N .
Also, if P and Q hold M and are in a set of history paths, we say
that the set holds M .
The following theorem relates invisible, a property that depends on
all rotation equivalent trees, to held, a property that can be checked
by examining just the one tree of interest.
Figure
5. Cases of Lemma 17
Theorem 19. The nearest common descendant of M and N holds M
if and only if M is invisible from N .
Proof. ()) We show that if the nearest common descendant of M and
holds M , then after a rotation, the (possibly new) nearest common
descendant of M and N holds M . Thus M can never be a descendant of
N for if it were then the nearest common descendant would be M , and
a node cannot hold itself. Cases in the proof of the forward direction
are in
Figure
6.
Let F be the nearest common descendant of N and M , and let the
rotated edge be (C; E), and let nodes A; B and D adjacent to it be as
defined in Operation 8. Let P and Q hold M and close at F , while P 1
and directly hold M , and P 1 OE P and Q 1 OE Q. Consider the case
where F 6= E, so that after the rotation F is still the nearest common
descendant of M and N . By Lemma 17, P 0
Suppose M 6= E. Then after the rotation, M is still the first common
node on P 0
1 , so F still holds M . Now suppose that
Without loss of generality assume that P 1 contains C and Q 1 contains
D. (Case 1a) If P 1 contains B then after the rotation, P 0
hold E, so F holds M . (Case 1b) If P 1 contains A then consider the
path and closing at C. After the rotation, P 0
that P 0
hold E, so again F holds M .
Now suppose that Consider the case (Case 2) where M is
an ancestor of C so that N is either E or an ancestor of D. Since no
history path can contain A and C and close at E, M 6= C. For the
same reason, P and Q contain B and close at E. (Case 2a) If M is an
ancestor of A then the paths that directly precede P and Q close at C
and hold M . Thus C holds M . After the rotation the nearest common
descendant of M and N is C, and C still holds M . (Case 2b) Otherwise
if M is an ancestor of B then after the rotation the nearest common
descendant of M and N is E and E still holds M .
Finally consider the case (Case is an ancestor of D.
(Case 3a) If N is either E or an ancestor of B then after the rotation,
holds M and is still the nearest common descendant of N and
M . (Case 3b) If N is C or is an ancestor of A, then consider path
R with head at B which closes at C. After the rotation, the nearest
common descendant of M and N is C, while R 0 directly precedes both
after the rotation.
Conversely, suppose that M is not held by the nearest common
descendant F of M and N . If then M is a descendant of N
and therefore visible from M . If F is the child of M then the edge
can be rotated, making M a descendant of F and therefore of
N . Assume that there exists a path (N
A
A
A
A
Case
3a
Case
R'
R
Q'
Q'
A
A
Q'
Case
A
A
A
Case
1a
Case
R
R'
A
A
Case
2a
Figure
6. Cases of Theorem 19
so that N i\Gamma1 and K i\Gamma1 are the parents of N i , for
use induction on n. Without loss of generality N 0 is
chosen so that al(N 2 ) occurs in cl(N 0 ); thus a history path through N 0
closes at N 2 . If there exists i in ng such that no history path
through N i\Gamma2 closes at N i then the edge (N can be rotated,
shown as Rotation 1 in Figure 7. We say that N i has been rotated
to the side of the path(M; F ), and so M is now closer to F and the
theorem holds by induction.
Thus for each i in path through N i\Gamma2 closes
at N i . If there is no j in ng such that N j is held by F then
in particular N n\Gamma1 is not held so the edge (N can be rotated.
But then the distance from M to the nearest common descendant of
M and N is and the theorem holds by induction. Choose
the smallest j in ng so that N j is held by F . Note that j 6= 1 by
assumption. If there is a history path through K j \Gamma2 closing at N j then
this path and the path through N j \Gamma2 closing at N j directly hold
Thus held by F , contradicting the definition of j. Therefore no
such path through K j \Gamma2 exists and the edge can be rotated as
illustrated in Rotation 2 of Figure 7. If is closer to F
after the rotation; we say that N j has been rotated off the top of the
path(M; F ), and the theorem holds by induction. Otherwise consider
the history paths through N j \Gamma2 closing at N j . If one of these includes
another includes K j \Gamma3 then N j \Gamma2 is held by F after the
rotation. This means that N j \Gamma2 was held by F before the rotation,
contradicting the definition of j. Thus the edge N j \Gamma2 N j can be rotated.
The result of this rotation is that N j will be rotated either to the side of
the path(M; F ), or closer to M . By a second induction on the distance
from M to N j , N i will eventually be rotated off the top or to the
side. Thus the distance from M to F will decrease by the constructed
sequence of rotations. 2
The sequence of rotations, constructed in the proof of Theorem 19
rotates the visible node M to below the node N that can see it. Thus
if the tree were regular but non-minimal, the rotations would make
it irregular, exposing the non-minimal parts. Using surgery, we can
remove all non-minimal sections of a tree, and reconstruct a minimal
tree from the pieces left behind.
Unfortunately the number of rotations required to expose a non-
minimality may be quadratic in the length of the path in the tree.
Since the trees are not balanced, this is quadratic in the size of the tree
in the worst case. Later we give a linear time operation, called splaying,
to bring a visible node to a descendant. In the next section, however,
we detect and avoid non-minimal trees.
Rotation 1: to the side
F
F
Rotation 2: off the top
F
F
Figure
7. Rotations in the proof of Theorem 19
5. Minimality as a restriction
Now we turn our attention to a theorem prover that keeps only minimal
binary resolution trees. Since every non-minimal tree is subsumed by
some minimal tree, this strategy uses the minimal criteria to reduce
redundancy, lessening reliance on subsumption.
Definition 20. Let T be a binary resolution tree. Then atoms(T
fal(N)jN is a node of Tgis called the set of atoms of T . A subbrt of T
is a binary resolution tree whose node set consists of a node of T called
the root of the subbrt, and all of its ancestors. For a subbrt T 0 of T ,
is a node of T 0 and visible from the root of Tg is
called the set of visible atoms of T 0 .
Theorem 21. Let binary resolution tree T consist of a root node R
and two subbrt's T 1 and T 2 . T is minimal if and only if
1. T 1 and T 2 are minimal,
2. no atom in cl(R) is in atoms(T ),
3.
4.
Proof. Assume that T is minimal. If T 1 or T 2 were not minimal, then
there would be a sequence of edge-rotations which would make the
subbrt irregular. The same sequence performed on T would make T
irregular as well. Hence the first condition is true. If the second condition
were false, then T would be irregular immediately. Assume that the
third condition is false. Then there are two nodes,
whose atom labels are the same, and M is visible from R. Hence M
can be rotated below R, without rotating any edges in T 2 . Now M
is the descendant of N , making T irregular. The fourth condition is
symmetric to the third.
Conversely, assume that T is not minimal. Then there is a sequence
of rotations that create an irregular tree T 0 . Node N has a descendant
M 1 in T 0 such that al(N) occurs in cl(M 1 ). Since the rotations do not
change cl(R), if al(N) occurs in the result of T 0 , it occurs in cl(R) in T
and then T violates the second condition. Thus al(N) does not occur in
cl(R) so there is a descendant M of N in T such that
If M and N are in the same T i then T i violates the first condition.
Assume M and N are in different T i . Since M has been rotated below
is visible from N in T , and by Theorem 19 M is not held by the
nearest common descendant R of M and N . Thus M is visible from R.
Therefore al(M) is in vis(T i ) while al(N) is in atoms(T 3\Gammai ). 2
Any theorem prover based on binary resolution that keeps only minimal
trees has already satisfied the first condition in Theorem 21 for
any newly constructed tree, since only minimal trees are used in the
construction. It is easy to check that the new result does not contain
an atom in atoms(T ). What is left is to find is an easy way to calculate
those atoms in each subbrt T i which are visible from the root of T .
The idea in Procedure 22 is that a node is visible in a subbrt T i if
and only if it is not held by the root of T , by Theorem 19. So for each
node N we need to calculate the history paths going through it that
precede the root. If some of these paths go through one parent of N ,
and some go through the other, then N is held by the root; otherwise
N is visible from the root.
In each procedure call visible(N; PN ), the first argument N is a
node in the tree and we want to know whether or not it is held by the
root. Initially it is one of the parents of the root, but as we traverse
upward it becomes instantiated with each ancestor of this parent. The
invariant we maintain is that the second argument, PN , is the set of
paths that include N and precede the root. The paths through the
parent of the root that precede the root are simply those whose heads
are that parent, so the invariant is easy to establish in the first place.
Suppose N has parents A and B. To calculate the paths PB through B
that precede the root, we start with PN , and remove those paths that
go through A if there are any. If there are none then PB is PN . If there
is some path in PN through A, we need to add to PB any path with
head at B, since these paths precede that path through A, and thus
precede the root.
Since we know that the paths in PN must go through at least one
of the parents of N , we assume that B is that parent.
Procedure 22 (Visible). Given a node N in a binary resolution tree
and a set PN of history paths that precede the root of the tree, vis(N; PN )
returns the atoms labels of nodes at and above N visible from the root.
Procedure vis(N; PN )
If (N is a leaf) return OE
Let A and B be the parents of N and partition PN into PA and
PB , which are the sets of paths which go through A and through B,
respectively. Assume without loss of generality that B is chosen so
that PB is nonempty.
Let CA and CB be the history paths with head at A and B respectively.
if PA is nonempty then
//N is held
return
else
and N is not held, so it is visible
return
endif
The third and fourth conditions in Theorem 21 require us calculate
which is done by calling vis(R i is the root of the
binary resolution tree, R 1 and R 2 are the parents of R, and R i is the
set of paths with heads at R i .
Procedure 22 runs in a number of set union calculations which is
proportional to the number of nodes in the tree. With hashing, these
operations can in principle be performed in time proportional to the
size of the clauses. Hence vis is a linear time algorithm, which is as fast
as one could expect.
We have implemented a prototype theorem prover for propositional
logic. It resembles OTTER[9], but it retains only minimal binary resolution
trees (so that the recursive calls in the first condition of Theorem
21 are not needed), whereas the proofs built by OTTER correspond
to non-minimal trees in some cases. Our implementation actually builds
binary resolution DAGs, instead of trees, to save space. This is important
because bottom-up theorem provers are limited by space as well
as by time. Note that Procedure 22 traverses the entire implicit tree,
so it may visit a single stored node more than once. Thus its runtime
is not guaranteed to be linear in the size of the DAG. The prototype
includes another restriction, discussed in [6], which ensures that from
each set of rotation equivalent binary resolution trees, exactly one is
found.
6. Restoring Minimality
There are two basic ways to restore minimality. If a binary resolution
tree is irregular then the surgery operation will remove the non-
minimality. For a binary resolution tree that is regular but non-minimal,
some rotations need to be done to make it irregular - we call this
exposing the non-minimality. This irregularity involves two internal
nodes M and N that resolve upon the same atom a and neither is a
descendant of the other but (at least) one is visible from the other.
Suppose M is visible from N . When M is rotated below N , one parent
of M becomes a descendant of N . Since a occurs in that parent's clause
label, surgery from N can be done.
In the proof of the converse of Theorem 19 we gave a quadratic
length sequence of operations for moving visible nodes down to become
descendants. Operation 24, called splaying, performs this with a linear
number of rotations. It is related to the splay operation [12] for binary
trees in that it brings a node closer to the root. In our case, to splay a
binary resolution tree at M , we divide the descendants of M into two
sets: the observers O for those that can see M , and the non-observers O
for those that cannot. Then we rearrange the tree so that all the nodes
in O are ancestors of M , leaving just those nodes in O as descendants
of M . Thus M is brought as close to the root as possible. This is done
in a way that guarantees N is an ancestor of M , so that surgery can
be accomplished.
The first step in the splay is to determine which descendants of M
can see M , as computed by Procedure 23.
Procedure 23 (Obs). Given a node M in a binary resolution tree T
such that P 1 is the complete set of history paths containing both M
and one parent of M and P 2 is the paths containing M and the other
returns the set of proper descendants of M that
can see M , called the observers of M .
Procedure obs(M;
if M is the root of T then
return OE
else
Let D be the child of M and K be the other parent of D.
Let C 1 be the paths from P 1 that close at D and C 2 be the paths
from P 2 that close at D.
Let K be the paths that contain both K and D.
holds M
return
else if C
return fDg [ obs(D; K[
else
endif
endif
The invariant of Procedure 23 is every pair of paths one from P 1
and the other from P 2 holds M . Then if we ever find a descendant D
that closes a member of each, then D holds M and so cannot see M ;
otherwise D can see M . To maintain the invariant as we go from M to
D, if D closes paths in P i we need to add to P i all of the paths K that
come from K through D, because each one of these paths precedes a
path that contains M . If D does not close any path through P i , then
we have nothing to add to P i . In either case we remove from P i any
path that closes at D since these do not contain D.
Operation 24 uses the same code as is in Procedure 23 (but not the
procedure itself) to decide how the resolutions below M should be re-ordered
in the new tree. The parents S 1 and S 2 of M are considered
stubs to be built upon. The observers of M are put into one of two
queues Q 1 and Q 2 , and the non-observers are put into Q 3 . Along with
each node put in the queue, we also put the subtree rooted at the other
parent of the node, so that the resolution can be reconstructed later.
Those put into Q 1 become descendants of S 1 , while those in Q 2 become
descendants of S 2 . After this is done, the two subtrees are joined by
a resolution corresponding to M . Finally all of the nodes in Q 3 are
made descendants of M . Each of the resolutions is done so that all
of the history paths closed at a node in the given tree are closed at
the same node in the constructed tree. Thus the resulting tree closes
history paths similarly with the given tree.
Operation 24 (Splay). A splay at an internal node M in a binary
resolution tree T produces a new binary resolution tree T 0 such that
all descendants of M cannot see M in T 0 .
Operation
Initially are three empty queues.
Initially P 1 is the set of history paths through M and one parent S 1
of M , while P 2 is the set of history paths through M and the other
parent S 2 of M .
call splay1(M;
return processQ(
Procedure splay1(M;
if M is the root of T then
return
else
Let D be the child of M and let K be the other parent of D.
Let C 1 be the paths from P 1 that close at D and C 2 be the paths
from P 2 that close at D.
Let K be the paths that contain both K and D.
holds M
enqueue D and the subtree rooted at K into Q 3
else if C
enqueue D and the subtree rooted at K into
else
enqueue D and the subtree rooted at K into
endif
endif
The resolutions must be done so that the resulting binary resolution
tree closes history paths similary with T .
Procedure processQ(T ; Q)
If Q is empty then
return T
else
dequeue T 1 and N from Q leaving Q 1
construct T 2 by resolving T and T 1 making them parents of N
return
endif
For example, the binary resolution tree in Figure 8 shows the result
of performing a splay from the node M = N 5 on the second tree in
Figure
4. The subtrees S 1 and S 2 are the leaves labelled a- b -:c, and
h, respectively. The descendants of N 5 are M 4
which N 3 and N 4 are put into Q 1 , while M 4 is put into Q 2 . These end
up above N 5 in the resulting tree. The only non-observer, N 6 , is put
into Q 3 and ends up below N 5 .
Lemma 25. If T is a binary resolution tree and M is an internal node
of T , then the result T 0 of splay(T ; M) is a binary resolution tree. T 0 is
defined on the same set of clauses as T ; is the same size as T and has
the same result as T .
Proof. T 0 closes history paths similarly with T . 2
Operation 26 (Splay Surgery). Let T be a binary resolution tree T
containing a pair M;N of nodes such that al(M) = al(N) and N can
see M
Procedure
if M is a descendant of N in T then
return surgery(N)
else
return
endif
To see that a splay actually brings M below N , so that surgery is
possible, suppose that the nearest common descendant of M and N is
not M . Thus either N is that nearest common descendant or N and M
are on different branches. N is either D or an ancestor of K at some
point in splay1. We also know N can see M so it must be put into one
of the queues Q 1 or Q 2 , and cannot be part of Q 3 . Thus when the tree
a-d
a:b-d-e
d:b-c-e
e:b-c-f-g
-a-b-e
c-d
e-f-g
a-b-c
a: b-b-f -b
g: a- b-b-f
-g
c:a- b-b-f-g
h:-a
-a-h
Figure
8. Result of Operation 24 at N5 on Figure 4
is rebuilt, N is put in while we are processing either Q 1 or Q 2 . M is
put in after Q 1 and Q 2 are empty, so it is below N .
Returning to our example, after the splay, the node N 5 in Figure 8 is
below N 1 and surgery from N 1 can be done. The result of this surgery
is the same as that shown in Figure 2. Notice that in this example we
also have the option to splay at N 1 and do surgery from N 5 , since N 1
is also visible from N 5 . The resulting tree would be different: it would
not require the leaf :a - h nor :h, and its result would have been f .
Thus surgery does not always produce a more general result, but always
produces a smaller tree.
Splay surgery does a linear number of set operations since it does
at most n resolution steps where n is the length of a branch, and then
performs surgery, which itself does a number of resolutions limited by
the length of a branch. Thus it is effectively a linear time algorithm.
7. Support
Often a node that is visible from another can be rotated so that it is not
a descendant, but sometimes no sequence of rotations can bring a node
from below another. In this case we say the node supports the other,
since it is always beneath it. Support, like visibity, is a property that
depends on the entire set of rotation equivalent trees. In this section
we characterize support in terms of history paths, so it can be checked
by examining a static tree.
Definition 27 (Support). A node N in a binary resolution tree T
supports a node M if after every sequence of rotations, M is an ancestor
of N .
Definition 28 (Tightly holds). Two history paths
tightly hold a node N if there exist two sequences
of history paths such that for
directly holds M ,
and for no pair does the head of P i equal
the head of Q j . A node N tightly holds M if both P and Q close at N .
Tightly holds is the special case of holds, where no two paths in the
sequences have the same head except the bottom two. This turns out
to be the exact condition for one node being below another after every
sequence of rotations.
Theorem 29. A node N tightly holds M if and only if N supports
M .
Proof. ()) We show that if N tightly holds M before a rotation, it
also does afterwards, and thus must be a descendant of M . Consider a
rotation of edge (C; E) where nodes A; B; C; D and E are defined as in
Definition 8. We will indicate the image of any history path P after the
rotation by P 0 . At first assume that fC; Eg is disjoint from fM;Ng. By
. Before the rotation all heads of
paths in the sequences were distinct so they must be distinct after the
rotation, unless there is a new path in either of the sequences. There is
one case where such a new path occurs. (In Lemma 17, the new path
introduced when tail(Q) is in .) In that
case the head of new history path was not on path(M; N ). Thus the
heads of paths of the new sequences (P 0
are
distinct except head(P 0
Also M is still directly held
by
1 so N tightly holds M .
Now suppose fC; Eg is not disjoint from fM;Ng. (Case 1) If
then without loss of generality let P 1 contain A and Q 1 contain B.
We know that P 1 does not close at E since the rotation is possible.
Suppose first that Q 1 does not close at E, as in Figure 9.1a. Then
after the rotation C is directly held by P 0
1 and so is tightly
held by N . Now suppose Q 1 closes at E, as in Figure 9.1b. Note that
there must exist Q 2 since otherwise E holds N and and so Q 1 and P 1
both close at and then the rotation is not possible. After the
A
C=N
A
Qm
Pn
Q'n
Case
2b A
A
Case
3a
A
A
Case
A
A
Case
1a A
A
Case
1b A
C=N
A
Pm
Qn
Q'n
Case
2a
Figure
9. Cases showing tightly hold is invariant under rotations
Case 1
Case 2
A
A
A
Figure
10. Cases showing support implies tightly holds
rotation, C is directly held by P 0
2 , and so is still tightly held
by N . (Case close at N , and
either they both include A, as in Figure 9.2a, or they both include B
as in
Figure
9.2b. In either case, after the rotation, N tightly holds
M by the sequences (P 0
(Case
then assume without loss of generality that C is in P 1 and
D is in Q 1 . If A is also in P 1 as in Figure 9.3a, then there is a path
with head at B and P 0 OE P 1 . After the rotation, the sequences
ensure that N tightly holds M . If B
is in P 1 , as in Figure 9.3b, then after the rotation the paths (P 0
and (Q 0
tightly holds M . (Case Finally if
then either Pm and Q n both contain C or both contain D. If they both
contain C then note that they both contain the same parent B of C,
else the rotation is not possible. Then after the rotation, B is a parent
of E and although P 0
are one node shorter than before, N
tightly holds M by the paths (P 0
both contain D, then after the rotation there is no change to the
history paths; thus N tightly holds M .
We induct on the length of path(M;
is the parent of N i+1 for
1. If is a parent of N and then a rotation of the edge (M; N) is
possible unless there exist history paths that tightly hold M and close
at N . Suppose k ? 2. First assume (case 1) that N k does not support
. Then by the first half of this theorem N k does not tightly hold
and so the edge (N can be rotated. Since M must remain
an ancestor of N; M must be an ancestor of B in the rotation, as shown
in
Figure
10.1. Thus the path from M to N is shorter, and by induction
tightly holds M in the new binary resolution tree. By rotating the
edge back again, one sees that N tightly holds M in T , because tightly
holds is invariant under rotation. As this case is covered, from now on
we assume that N k supports N k\Gamma1 .
Next assume (case 2) that N k does not support N k\Gamma2 . Then N
does not support N k\Gamma2 , for otherwise N k supports N k\Gamma1 supports N k\Gamma2
and, by transitivity of support, there is a contradiction. By the first half
of this theorem, we may rotate the edge (N k\Gamma2 ; N k\Gamma1 ). Then we may
rotate the edge (N k\Gamma2 ; N k ), since N k does not tightly hold N k\Gamma2 . In
this second rotation, N k must remain a descendant of N k\Gamma1 so it must
be as shown in the third binary resolution tree in Figure 10.2. Thus
path(M; N) is shorter, so by induction N tightly holds M . Because
tightly holds is invariant under rotation, N tightly holds M in T also.
From now on we assume that N k supports N k\Gamma2 . By similar arguments
we assume that N k supports each of N
(Case If the edge (M; N 2 ) can be rotated in T then path(M; N)
is shorter in the resulting tree T 0 and by induction N tightly holds M
in T 0 . Since tightly holds is invariant under rotation, N tightly holds
in T .
Finally if the edge (M; N 2 ) cannot be rotated then there are paths
from each parent of M closing at N 2 in T . We know by induction that
tightly holds N 2 and assume that (P are
the paths that make this so. Assume without loss of generality that
includes M . Then Q 1 must include the other parent of N 2 since N 2
is the first node that P 1 and Q 1 have in common. No matter which
parent of M is in P 1 , there is a path closing at N 2 containing M and
's other parent. Call this path Q 0 . Since the head of Q 0 is M , it is
distinct from the heads of the other P i and Q j in the sequences. Thus
tightly holds M by the paths (Q
In this final theorem, we relate the notions of visibility and support.
Theorem 30. In a binary resolution tree, a node M is invisible from
a node N iff there is a support S of M on path(M; N ).
Proof. ()) Let D be the nearest common descendant of M and N .
Consider the path sequences by which D
holds M . Consider the least i and j such that head(P i
and let S be the node where P i and Q j both close. These i and j must
exist since the head(Pm the heads of paths before
are distinct, S tightly holds M and thus S supports M .
be the
sequences of paths by which S tightly holds M . Since S is on path(M; N ),
and S is a descendant of M , S must be an ancestor of the nearest
common descendant D of M and N . Thus there are paths R
such that S is on R 1 and R k closes
at D. Thus D holds M via the sequences
8. Relation to Clause Trees
The results in this paper were developed after we understood clause
trees [5], and then primarily as a means to implement clause trees.
We eventually found that most of our ideas from clause trees could be
expressed in binary resolution trees. Binary resolution trees are simpler
in some ways since they are easier to implement, but more often clause
trees are easier to use when exploring new ideas. In particular, visibility
and support can be read almost directly from a clause tree, whereas the
properties held and tightly held are somewhat harder to see in binary
resolution trees. We use whichever is appropriate. In this section we
relate the two.
Refering once again to the example, the rotation equivalent binary
resolution trees in Figures 1, 4 and 8 all correspond to the first clause
tree in Figure 11. The binary resolution tree in Figure 2 corresponds
the second clause tree in Figure 11. A reader familiar with clause trees
will note that the second clause tree in Figure 11 can be constructed
directly from the first by adding a merge path between the a atom
nodes and then doing surgery to remove the subtree beyond the tail of
the new merge path.
Some of the correspondences between binary resolution trees and
clause trees are obvious. The leaves of a binary resolution tree are the
clause nodes of the clause tree; both are labeled by an instance of an
input clause. The internal nodes of a binary resolution tree are the
atom nodes of a clause tree. A history path in a binary resolution tree,
which we associate with a literal, corresponds to a labeled edge in a
clause tree, also associated with a literal. If the history path is not
closed, it corresponds to an edge incident with an atom node leaf; a
closed history path corresponds to an edge incident with a closed atom
node.
_
a
c d a
e
f
_
_
a
c d a
_
_
_
Figure
11. Clause trees corresponding to Figures 1, 4, and 8 and to Figure 2
Minimal clause trees correspond to minimal binary resolution trees
whose result does not contain two identical atoms. The minimal condition
on clause trees does not allow any legal unchosen merge path
or legal tautology path, including leaf to leaf paths. A minimal binary
resolution tree may correspond to a clause tree with a legal unchosen
leaf to leaf merge path, or legal leaf to leaf tautology path. This is
because the regularity condition in binary resolution trees requires one
of the nodes to be internal.
Finally, visibility (resp. support) between internal nodes in a binary
resolution tree correspond to visibility (resp. support) between closed
atom nodes in a clause tree. Table I shows a number of the corresponding
notions.
Table
I. Corresponding notions
Clause Trees Binary resolution trees
clause node leaf node
internal atom node internal node
edge history path
open leaf atom node literal in result
cl(T
internal-to-internal surgery splay surgery
internal-to-leaf surgery surgery
merge path two history paths closing together
equivalence classes of reversal equivalent equivalence classes of rotation equivalent
minimal (up to leaf-to-leaf) minimal
visible internal atom nodes visible
support on internal atom nodes support
path reversal no structural change
no structural change rotation (change in derivation)
merge set all history paths closing at a given node
9. Related, Past and Future Work
Regularity is one of the most important restrictions and some form
of it is used in many theorem proving methods related to resolution,
including tableau [10], and all variants of model elimination[8].
Permuting inference steps has been investigated by Kleene [7], in the
context of Gentzen's sequence calculus, both classical and intuitionistic.
Kleene's permutations sometimes increase the size of the proof. It is
interesting to note he defines the ancestor relation between instances
of formulas in each inference, allowing him to state which instances of
formulas in the deduction belong to a given instance in the end sequent.
This is analagous to our notion of history paths.
In the context of binary resolution derivations, de Nivelle [3], has
two types of nodes: resolution nodes have two parents and factoring
nodes have one. He defines four types of edge rotations, depending on
the type of nodes incident with the edge. We disallow the rotation
where a factorization node is parent to a resolution node, because in
this case the size of the derivation must be increased. His application
is to construct resolution games which are then used to show various
completeness results for restrictions of resolution based on ordering
literals. Both de Nivelle's paper and ours show that basic properties
of resolution may be exposed by considering the set of trees equivalent
modulo permutations.
The main contribution of this paper is to present the minimal restriction
of resolution, originally developed in terms of clause trees, using
the well known proof format of binary resolution derivations. The original
motivation for doing so was to implement bottom up algorithms
for constructing minimal clause trees. A direct implementation, based
on the structural definition of clause trees was done, but each new tree
needed its own storage space and the visibility algorithm was cumber-
some. To remedy both of these problems we used the notion of binary
resolution derivations and implemented each new clause tree as a single
storage cell with two parent clause trees. (For propositional logic this
solves the space problem, since each tree can be used as part of other
trees.) The surprising result is that visibility can be expressed easi-
ly, and requires a linear algorithm using this data structure. We then
determined to explain as much of our clause tree work as we could
using binary resolution trees, to make them more accessible to readers
familiar with resolution. This task turned out to be difficult until we
discovered that edge rotations, history paths and the "precedes" relation
between history paths are the fundamental concepts needed. Then
we related visibility and support to history paths using the "holds" and
"tightly holds" relations. In retrospect the authors still believe that it
is easier to work conceptually with clause trees. We have anecdotal evi-
dence, from a graduate course in automated reasoning given two times
by the second author, once with clause trees only and once with binary
resolution trees followed by clause trees, that the intuitions for support
and visibility are quite understandable using either data structure.
We are presently developing the full theorem provers described here,
one to use minimality as a restriction and another to use splay and
surgery to improve proofs after they are constructed by resolution.
Redundancy elimination by subsumption is always an important consideration
for theorem provers. Unfortunately the minimal restriction
is not complete with full subsumption. For instance one can not refute
with a minimal binary resolution tree if one resolves p
against :p-q, generating q, and then uses back subsumption to remove
before the resolution between :p - q and :p - :q is done. The
latter resolution is part of the only minimal binary resolution refutation
of these clauses. The former resolution step leads to a binary resolution
tree in which p is resolved at two different nodes on one branch.
However, we have discovered [6] that one can retain completeness by
giving up some of the power of minimality, without giving up any of
the power of subsumption.
The space of minimal binary resolution trees is interesting for the
following reasons: (1) it is refutationally complete, (2) it extends the
well known regularity restriction of resolution (3) it contains the smallest
binary resolution tree, (4) non-minimal (sub)trees can be identified
in time linear in the size of the tree, and (5) non-minimal trees can be
reduced to minimal ones efficiently.
--R
An algorithm for the organizaton of information.
Symbolic Logic and Mechanical Theorem Proving.
Resolution games and non-liftable resolution orderings
Regular resolution versus unrestricted resolution.
Clause trees: a tool for understanding and implementing resolution in automated reasoning.
Bottom up procedures to construct each minimal clause tree once.
On the permutability of inferences.
Mechanical theorem proving by model elimination.
Otter 3.0 users guide.
A machine-oriented logic based on the resolution principle
Extending the regular restriction of resolution to non-linear subdeductions
On the complexity of derivation in propositional calculus.
--TR | clause tree;resolution;binary tree;regularity;theorem proving |
594272 | A Full Formalization of SLD-Resolution in the Calculus of Inductive Constructions. | This paper presents a full formalization of the semantics of definite programs, in the calculus of inductive constructions. First, we describe a formalization of the proof of first-order terms unification: this proof is obtained from a similar proof dealing with quasi-terms, thus showing how to relate an inductive set with a subset defined by a predicate. Then, SLD-resolution is explicitely defined: the renaming process used in SLD-derivations is made explicit, thus introducing complications, usually overlooked, during the proofs of classical results. Last, switching and lifting lemmas and soundness and completeness theorems are formalized. For this, we present two lemmas, usually omitted, which are needed. This development also contains a formalization of basic results on operators and their fixpoints in a general setting. All the proofs of the results, presented here, have been checked with the proof assistant Coq. | Introduction
This paper is concerned with programming languages semantics. Its aim is
to formalize SLD-resolution in the calculus of inductive constructions (Coq).
First, terms and substitutions are dened, and the unication theorem, constantly
used in the denition of the semantics of denite programs, is proved
from a similar theorem for quasi-terms [26]. Then, we present the formal
denitions of syntactic objects used in logic programming (atoms, queries,
clauses, etc) and we introduce their interpretation schemes. Last, declarative
and operational semantics of denite programs are introduced, and the
proofs of fundamental results of the theory of logic programming are formalized
(lifting and switching lemmas, soundness and completeness theorems).
The reader is assumed to be familiar with the terminology and the basic
results on the semantics of logic programs, as introduced in [2, 19].
Of course, there exists an extensive literature on logic programming [3,
2, 17, 19, 28] where all these theorems are proved, and one can wonder
about the usefulness of such a formalization. For this, recall that formalizing
a proof rst consists in giving formal denitions of the objects used,
then explicitely stating a priori the hypotheses needed, and last inferring the
conclusion. Therefore, since our proofs have been encoded using the Coq
proof assistant, all objects and properties are explicitely dened as well as
all hypotheses needed for these proofs. Each step of a proof also explicitely
results from denitions or applications of induction schemes, lemmas, or the-
orems. This makes a dierence from the initial proofs, which can be found
in many books on logic programming. Hence, formalizing proofs brings us
at a level of detail that is often left to the reader, and we will see that if we
take into account some details, often considered as minor in more informal
presentations, proofs are getting a bit complicated. Furthermore, we will
see that some assumptions, usually overlooked, are required in some of the
theorems proved. The main diculty of this development is concerned with
the denition of the variable renaming process used in an SLD-derivation,
which is made explicit, thus introducing some complications, usually omit-
ted. For instance, we will see that the proof of the completeness theorem
is more delicate than it seems and requires, from a formal point of view,
several technical lemmas. Few papers are devoted to these details; however,
in [27], J. C. Shepherdson points out inaccuracy in some of the basic results
in the theory of logic programming and presents a discussion about the role
of standardizing apart in SLD-resolution. Let us give the most famous ex-
ample, coming from this paper, and showing how a classical result can be
incorrectly stated: in a famous book [19], J. W. Lloyd gives the fundamental
theorem of completeness of SLD-resolution in the following form:
Let P be a denite program and G a
denite goal. For every correct answer for P [fGg, there exists
a computed answer for P [ fGg and a substitution
such that
.
In 1994, J. C. Shepherdson wrote about this theorem: This is not true [27]
and gave a very simple counterexample. Of course, it is true that we can nd
two substitutions and
such that
G; however, although and
act only on the variables occurring in G, this does not imply that
can
be restricted to yield
. Another typical example is the lifting lemma
generally stated as follows:
be a program, N a goal and a substitu-
tion. Suppose that there exists an SLD-refutation of P [ fNg
with the sequence of mgu's . Then, there exists an SLD-
refutation of P [ fNg with the sequence of mgu's 0
n such
that 0
0 is more general than
No assumptions on the substitution are supposed here. However, in order
to formalize the corresponding proof, which builds the derivation starting
from N , we have to assume some hypotheses. Let x be a variable occurring
in the domain of and in N that does not occur in N . Whereas x can be
used in the renamed clauses during the derivation starting from N , it cannot
be used during the derivation starting from N . Hence, in order to exactly use
the same sequences of variant clauses (which is always suggested) in the two
derivations, we have to suppose that no variable used for the renaming of the
input clauses in the derivation starting from N occurs in N . Furthermore,
for similar reasons, in order to prove 0
we have to suppose
that no variable used for the renaming of the input clauses in the derivation
starting from N occurs in the domain of . A similar problem happens
during the proof of the switching lemma asserting that if during an SLD-
derivation, two atoms L 1 and L 2 are successively selected, then they can also
be selected in the reverse order and the derived states are the same up to
renaming of variables.
| {z }
| {z }
Here again, if we want to exactly use the same variants of C 1 and C 2 in
the two derivations, some assumptions are required. By hypotheses (coming
from the initial derivation), we have
However, if we
want to select L 2 before L 1 with C 2 , C 2 must satisfy
But nothing in the switching lemma ensures such a property, and, depending
on the standardization apart used for SLD-derivations, it is possible that a
variable occurring in R 0 but not occurring in R 1 , occurs in C 2 . To avoid
this problem, C 1 and C 2 must satisfy
holds if we use the standardizing apart coming from [2]). Hence, formalizing
a proof brings us to a greatest level of detail. Most of problems are due to
variables occurring in the input clauses (variants of clauses used in the resolution
steps) coinciding with other variables in the derivation. Surprisingly,
another problem comes from the necessity of an explicitation a priori of all
the assumptions needed to obtain a proof. Curiously, even if this requirement
seems natural, it is a common practice in logic programming, to suppose,
during the proofs (on paper) of most of basic results, some assumptions
on the variables occurring in the clauses used, without any justication. Of
course, there exists an independence result asserting that the existence of a
derivation does not depend on the choice of variables in the input clauses
(even if this choice is very important during the proofs), and these results
are still correct. However, these properties on variables have to be formally
proved from this independence result, and, furthermore, they can only express
properties on the objects occurring in the theorem (for instance, we
cannot suppose during a proof that a clause does not share variables with a
goal built in the proof if this goal does not appear in the theorem).
Standard semantics ( la Herbrand) of denite programs deals with well-known
objects: substitutions and renaming. However, several non-equivalent
denitions for these objects can be found in the literature, thus introducing
some confusion (for example, the meaning of renaming is often assumed
simpler than its formal denition implies). In [15], H. P. Ko and M. E. Nadel
point out that dierent authors give subtley dierent denitions of substitu-
tions. They cite six non-equivalent denitions and point out the implication
for the is an instance relation, thus giving dierent versions of the lifting
lemma. Therefore, substitutions are not as simple as they might rst ap-
pear, and this motivates some authors, as R. S. Kemp and G. A. Ringwood
in [14], to take the instance relation as primitive rather than taking substi-
tutions. There is also a confusion in the literature concerning the denition
of most general uniers (mgu in short). In [18], J. L. Lassez, M. J. Maher,
and K. Marriot compare four non-equivalent denitions of mgu. Of course,
logic programming is concerned with these problems and is also subject to
such confusions. For an SLD-derivation
the following denitions for the renaming process required in an SLD-deriv-
ation can be found:
and the confusion arises because all these conditions in fact dene dierent
hypotheses. There are at least two reasons for these conditions. First, the
standardization apart is needed in order to be able to unify the selected
atom with the head of the variant of the clause used. The last reason is
to obtain the most general possible answer (substitution). Therefore, this
formalization settles down the problem of variable renaming, which has long
been a cause of errors in the eld of logic programming.
Description of Coq
We use here version 6.2 of the proof assistant Coq [4], which allows the interactive
development of formal proofs. Coq is based on a logical framework
known as the calculus of inductive constructions [5], which is an extension of
a typed -calculus supporting dependent types and polymorphic types. The
basic idea underlying this logical framework, based on the Curry-Howard
isomorphism [9, 17], is that a proof of a proposition can be seen as a functional
object. For instance, a proof of a proposition of the form A ) B is a
function mapping every proof of A to a proof of B. The type of this function
is isomorphic to the proved proposition, so types and proposition are
identied, as are objects and proofs. Furthermore, this framework allows the
denition of inductive and co-inductive types (which are specied by their
constructors). A classical example of an inductive type is the denition of
natural numbers, which is dened in the system Coq by
Inductive
Three induction principles are (automatically) generated by this denition:
nat_id :(P:nat->s)(P O)->((n:nat)(P n)->(P (S n)))->(n:nat)(P n)
(id; s) is either (ind,Prop) or (rec,Set) or (rect,Type). A classical
example of a co-inductive type is the type of innite sequences, formed with
elements of type A, or streams for shorter. In Coq, it can be introduced by
CoInductive Set Stream [A:Set]:=cons:A->(Stream A)->(Stream A).
Note that there is no induction principle for co-inductive types. Coq also
allows the denition of mutually recursive types. We shall use here two
distinct sorts: Prop is the type of logical propositions; Set is the type of data
type specications. The type of Prop and Set is Type. Constructing a proof
within Coq is an interactive process: given a goal, the user species which
deduction rule should be applied, and Coq does all the computations. The
theorem prover solves successive subgoals with tactics (i.e., functions that
build a proof of a given goal from proofs of more elementary subgoals).
Goal
apply a tactic
Subgoal n
3 Terms and Unication
The rst step of this development consists naturally in formalizing uni-
cation of terms. The unication algorithm deals with two sets: terms and
substitutions. Let us rst present their formal denitions. Given a functional
signature (i.e., a countable set with an arity function ar) and a countable
set X of variable symbols, terms (T [X]) can be dened by induction as
follows:
if f is a functional symbol in such that l is a list
of terms of length n, then tf(f; l) is a term.
At the same time, we introduce the dependent type L n; [X] of lists of terms
of length n (T [X] and L n; [X] are mutually recursive).
Substitutions (S T ) are dened as applications from X to T [X]. Recall
now that given two terms t 1 and t 2 , if for a substitution s, we have
called a unier of t 1 and t 2 (unif_t). s is called a minimal
unier (min_unif_t), if for every unier s 0 of t 1 and t 2 , we have s s 0 (i.e.,
there exists a substitution s 0 such that s 0 which is denoted by the
predicate less_subst_t). A unier s of t 1 and t 2 is called a most general
unier if it is minimal, idempotent (i.e. 8x 2 X which is
denoted by the predicate idempotent_t) and relevant to t 1 and t 2 (i.e., every
variable occurring in the domain of s also occurs in the list formed by t 1 and
and every variable occurring in the range of s also occurs in the
list formed by t 1 and t 2 (under_lt)). These denitions are extended to lists
of terms.
Instead of formalizing unication on terms by following the standard
approach (based on the unication algorithm), and since a similar (formal)
proof, dealing with quasi-terms, has been obtained by J. Rouyer [26], we have
transposed the unication property from quasi-terms to terms. Originally,
quasi-terms were introduced by Z. Manna and R. J. Waldinger in order
to illustrate their technique for program synthesis: in [21], an unication
algorithm has been derived by proving that its specication can be satised.
This proof has been veried within the Cambridge LCF theorem prover [10],
by L. C. Paulson [23]. A similar proof has been obtained by J. Rouyer [26]
for quasi-terms dened as follows:
are used to obtain variable quasi-terms, constant quasi-
terms and functional quasi-terms, ConsArg is used to build non-empty lists
of quasi-terms (terms and lists of terms are merged in a single data type).
For instance, the term f(x; a; g(x)) is obtained as follows
More precisely, J. Rouyer has proved that if there exists an unier for q 1
and q 2 , then if these two quasi-terms are well formed, this unier, which is
a quasi-substitution, is indeed a substitution. Clearly, T [X] is a proper
subset of Q [X] (ConsArg(ConsArg(x; x); x) is neither a term nor a list of
terms), and, in order to transpose the unication property, we have to dene
a mapping f from well-formed quasi-terms (i.e., quasi-terms representing
terms) to terms. However, Coq does not incorporate the notion of partiality:
any function is total. The current solution we have taken in this development
consists in considering simultaneously a quasi-term and the proof that it is
well formed. Hence, a predicate P on Q [X] characterizing well-formed
quasi-terms is dened. Depending on the type of P , two approaches are
possible. The rst one corresponds to a programming language
the type of P is dened recursively on the structure
of the quasi-term q considered. When q is not well formed, we use the
applied to Q [X] and to a proof of the
proposition False obtained from q and the proof that it is well-formed. The
second approach corresponds to a proofs language approach: the type of
dened recursively on the structure of the proof
that the quasi-term considered is well formed.
In addition to the interest of the unication theorem, we are motivated by
developing an approach based on the reusability of formal proofs. Therefore,
this development shows how to dene partial functions. More precisely, we
outline how from
two inductively dened sets,
a predicate P on E 1 , such that there exists a bijection between E 2 and
we can dene the following functions:
The two characteristics of this problem are as follows:
1 is dened by a predicate, that does not allow any (direct) denition
of functions or predicates on E P
1 . Therefore, every expression of the
stands for 8e
2. We just know the bijection between
such that
Furthermore, we would like to have
The function f 21 is easy to obtain, seeing that every e 2 in E 2 is in relation
with an element in E 1 . Furthermore, for every e 2 in
The denition of f 12 is rather critical because of the denition, by a pred-
icate, of the domain of f 12 . The technique used here consists in dening
inductively for every e 1 in E 1 , the collection P[e 1 of the
proofs of P logically equivalent, only P[e 1
has a computational content). Of course, for every e 1 in E P
1 , there must
exist a proof of P In this way, we are in position to dene,
recursively on the structure of such a proof, the function
Y
such that 8e 1 Hence, according to these def-
initions, proofs can be viewed as objects (data structures) of a mathematical
collection (inhabiting the Set type) with an explicit algorithmic content, thus
allowing to proceed by induction over these proofs or to dene recursive functions
on the structure of these proofs. Since E 2 is isomorphic to a subset
of our aim is to map result about E 1 to a result about E 2 by proving
only few conservativity lemmas. Let U 1 and U 2 be two formal properties,
respectively on E 1 and E 2 (quasi-unication and unication), such that
and assume that the property U 1 holds on E 1 . Given the two functions f 12
and f 21 , we can prove the property U 2 on E 2 , by the following reasoning. Let
e 2 be an element in by hypothesis, we have U 1 (f 21 (e 2 )), and there exists
a proof p for f 21
And the claim now follows, since
. In this manner, we have proved the unication theorem
without really working on unication, but by proving only few conservativity
lemmas (for a full presentation of this proof, see [13]).
Theorem 3.1 (Unication) Given two terms t 1 and t 2 , either t 1 and t 2
are not uniable, or they are and there exists an idempotent minimal unier
relevant to these terms.
4 Objects Used in Logic Programming
We present in this section the formal denitions of the objects used in logic
programming, and we introduce, for each of them, an interpretation schema.
First, let be a relational signature. The collection At; [X] of atoms
is inductively dened as follows: if p is a predicate symbol in such that
l is a list of terms of length n, then pl(p; l) is an atom. Then,
queries, denite clauses, denite programs, and Horn clauses are dened from
atoms by
(arity ar):fun -> nat
Mutual inductive
ar f)) -> Term
with list_term : nat -> Set :=
cons: (n:nat)Term -> (list_term n)->(list_term (S n)).
subst := var -> Term.
Inductive Unification_t[t1,t2:Term]:Set:=
(cons (S O) t1 (cons O t2 nil)))
(cons (S O) t1 (cons O t2 nil)))
->(Unification_t t1 t2).
Inductive quasiterm : Set :=
V:var->quasiterm | C:fun->quasiterm |
Root:fun->quasiterm->quasiterm |
ConsArg: quasiterm->quasiterm->quasiterm.
Table
1: Terms, substitutions, and unication.
In order to be able to give an interpretation of these objects, it is necessary
to attach some meaning to each of the symbols occurring in them. Therefore,
let us dene the interpretations of the signature [. For this, let ' n [A] be
the dependent polymorphic type of lists of elements of type A of length n,
and bool the set of booleans (with its usual operators,
order to dierentiate them from the operators :, ^, _ on Prop). We dene
two collections of mappings: F n [A] is formed by mappings from ' n [A] to A,
and P n [A] is formed by mappings from ' n [A] to bool. According to these
denitions, interpretations, over a domain D, are dened, in a classical way,
by
I
Y
F ar(f) [D] I
Y
Hence, given an interpretation I, over D, of (resp. ), a n-ary function f
predicate p) is interpreted by a mapping f I
bool). We are now in position to give the following interpretation
At; [X] Inductive atom : Set :=
pl:(p:predic)(list_term (arity_p p))->atom.
Inductive request : Set :=
true_req:request|
cons_req:atom->request->request.
C; [X] Definition clause:Set:=(atom*request).
Inductive program : Set :=
nil_pgm:program|
cons_pgm:clause->program->program.
Inductive horn : Set :=
hp:program->horn|
hr:request->horn->horn.
Table
2: Syntactic objects.
schemes. First, we dene A X as the collection of valuations over A (mappings
from X to A). Then, terms (and lists of terms) are interpreted as follows:
let I be an interpretation of , over a domain D, a term t (resp. a list of
terms l of length n) is interpreted by an application
dened by
f I (l I (v)) if
l I
where nil_' and cons_' are the constructors of ' n [D] and cons is a constructor
of L n; [X]. Henceforth, we will nd it more convenient to write I
to denote an interpretation of [ I [D] I [D]). An object
clause, .) is interpreted by an application
dened by
I (l I (v))
r I
false if
(: b a I
true if
a I
I (v)) if
ri I (v) = a I (v) _ b r I (v)
true if
c I (v)
I (v) if
r I (v)
Inductive
[D:Set][n:nat](LIST D n)->D.
I [D] Definition f_i : Set -> Set :=
[D:Set](f:fun)(f_n D (arity ar f)).
A X Definition valuation:Set->Set:=[A:Set](var->A).
Fixpoint Interp_t [D:Set;I:(f_i D);t:Term]
:(valuation D)->D:=[v:(valuation D)] Case t of
[f:fun][l:(list_term (arity ar f))]
((I f) (apply_l D I (arity ar f) l v)) end
with apply_l [D:Set;I:(f_i D);n:nat;l:(list_term n)]
(valuation D) -> (LIST D n) :=
[v:(valuation D)]<[n:nat](LIST D n)>Case l of
(NIL D)
[n0:nat][t0:Term][l0:(list_term n0)]
(CONS D n0 (Interp_t D I t0 v) (apply_l D I n0 l0 v))
end.
bool Inductive bool:Set:= true:bool | false:bool.
[D:Set][n:nat](LIST D n) -> bool.
I [D] Definition p_i :Set -> Set :=
[D:Set](p:predic)(p_n D (arity_p p)).
Table
3: Interpretations of [ .
An interpretation I, over a domain D, is said to be a model of an object
(atom, query, .), if for every valuation v, over D, we have
In this case, we write (depending on the interpretation schema used
for a query r, we write either I r or j= I ~ r). Note that, whereas given a
valuation v 2 D X , the proposition true is decidable, since D can be
an innite set, the proposition I o is not necessarily decidable. This will
introduce many complications in the following. To terminate, we dene the
relation of logical consequence (j=) between a Horn clause and a query as
follows:
General interpretation schema of
Definition Interp_O :(D:Set)(f_i D)->(p_i D)->O->
(valuation D)->bool:=[D:Set][If:(f_i D)][Ip:(p_i D)][o
[v:(valuation D)] Case o of I end.
[p0:predic][l0:(list_term (arity_p p0))]
request
false
(orb (neg (Interp_p D If Ip l0 v)) (Interp_r D If Ip r0 v))
request
true
(andb (Interp_p D If Ip l0 v)) (Interp_rn D If Ip r0 v))
clause
[a:atom][r:request]
(orb (Interp_r D If Ip r v) (Interp_p D If Ip a v))
true
(andb (Interp_c D If Ip c0 v) (Interp_P D If Ip p0 v))
[p:program](Interp_P D If Ip p v)
(andb (Interp_r D If Ip r0 v) (Interp_h D If Ip h0 v))
I
Definition O_valid:(D:Set)(f_i D)->(p_i D)->O->Prop:=
((v:(valuation D))(Interp_O D If Ip l v)=true).
request -> Prop :=
(h_valid D If Ip h)->(reqn_valid D If Ip r) ).
Table
4: Interpretations and models.
5 SLD-Resolution
The logical approach of denite programs can be split in two parts: the
declarative semantics determines what can be computed; the operational semantics
(given by SLD-resolution) describes how it is computed. Execution
of denite programs is based on a combination of two mechanisms: replacement
and unication. This form of computing is a specic form of theorem
proving, called SLD-resolution (for Selection Linear Denite).
5.1 Resolution and Transitions
The resolution rule is an inference rule that denes a deductive relation,
C be the denite clause C + C in the program P ,
is an atom, called the head of C, and C a query, called the
body of C, R a query and r a renaming substitution such that no variable
occurring in r(C) also occurs in R. We can write the resolution rule in the
following abbreviated manner:
is a mgu of R =n and r(C
where R =n stands for the (n+ 1)-th atom of R (at_n_req), and where R[n
r(C )] is the query obtained by replacing in R, the (n 1)-th atom by
the query r(C ) ((change_n_r n (rsubst_req r (body_c C)) R)). In each
resolution step, two choices are made: the choice of the selected atom and
the choice of the input clause whose head unies with the selected atom.
Therefore, the resolution rule can be viewed as a rule that moves from a state
to another, dened as follows. First, we introduce SR as the collection of
mappings from X to X (the classical properties on substitutions are extended
to SR ) and a predicate P R on SR , characterizing the renaming substitutions
r such that
occurring in the domain of r also occurs in the range of r
(r is idempotent).
A resolution state is a pair :R, where is a substitution and R a query.
We give now the formal denitions of the renaming conditions that have to
be satised during a transition i :R i
. First, the initial resolution
state i :R i must satisfy i R Then, the renaming substitution r has
to rename all the variables occurring in C and only these variables; this is
denoted by PRC (r; C). Last, we dene two predicates satised when no variable
occurring in the range of r also occurs in the domain of i (P RS
in the query R i (P RR We are now in position to dene the predicate
P , on the collection of transitions, by
where MGU(; a 1 ; a 2 ) (at_mgu) means that is a most general unier of a 1
and a 2 .
5.2 SLD-Resolution and Derivations
A nite valid SLD-derivation is a nite sequence of composable transitions
satisfying the predicate
also
Hence, derivations can be dened inductively,
from , as lists. Most of proofs of properties of SLD-resolution are obtained
by induction over a derivation by using a left induction schema. However,
during the soundness proof, we shall need the right one. Hence, we dene
two collections of derivations as follows (D l and D r are isomorphic):
D l ::= d l
c (D l ;
| {z }
left induction
| {z }
right induction
Two functions are dened, in order to relate these two sets. As we did for the
transitions, we now dene a predicate, on D l , characterizing valid derivations
(sequence of composable transitions satisfying the predicate P and an
additional renaming condition). For this, we introduce the following deni-
tions. Two transitions e 1
f and e 2
f are said to be composable
. A function #, on D l ,
that computes the list of variables occurring in the input clauses of a deriva-
tion, is dened. The predicate P D , on D l , can now be recursively dened
by
t (t) and P (t), then P D (d)
Resolution states Definition state:Set:=(subst*request).
(Fst and Snd are projections on a product type.)
SR Definition rename:=var->var.
Definition good_rename:rename->Prop:=[sr:rename]
(((y:var)(x=y)->(rdom sr x)->(rdom sr y)->
(sr x)=(sr y))^((rdom sr x)->(rrange sr x))).
Definition rename_c:rename->clause->Prop:=
PRR
Definition rename_out_req:rename->request->Prop:=
PRS
Definition rename_out_dom:rename->subst->Prop:=
((x:var)(rdom r x)->(s (r x))=(tv (r x))).
Inductive trans:Set:=trans_cons:state->program->nat->
clause->rename->subst->atom->state->trans.
Inductive rsl [ei:state;p:program;n:nat;
c:clause;r:rename;s:subst;a:atom;ef:state]:Prop:=rsl_init:
(le (S n) (Length_r (Snd ei)))
(rsubst_at r (head_c c)))
(*H4*) ->(good_rename r)
(([x:var](Subst_t s ((Fst ei) x))), (subst_req s
->(rsl ei p n c r s a ef).
Definition RSL:trans->Prop:=[t:trans] Case t of
[a:atom][ef:state](rsl ei p n c r s a ef) end.
Table
5: Transitions.
D l
Inductive deriv:Set :=
deriv_cons : deriv -> trans -> deriv.
Inductive
deriv_f_cons : trans -> deriv_f -> deriv_f.
Inductive couple_trans_ok [t1:trans;t2:trans]:Prop:=
couple_trans_ok_init:(p_trans t1)=(p_trans t2)->
(state_end_t t1)=(state_init_t t2)->(RSL t1)->(RSL t2)
->(couple_trans_ok t1 t2).
Fixpoint list_var_c_d [d:deriv]:listv:=
Case d of
(var_cl (rsubst_cl (sr_trans t0) (c_trans t0)))
[d1:deriv][t1:trans](Appv (list_var_c_d d1)
(var_cl (rsubst_cl (sr_trans t1) (c_trans t1)))) end.
Fixpoint Deriv_ok [d:deriv]:Prop:= Case d of
((couple_trans_ok (end_d d2) t2)^(Deriv_ok d2)^
->(rrange (sr_trans t2) x))) end.
Table
Derivations.
where t d stands for the last transition of d 0 , R stands for the initial
query of d, and r stands for the renaming substitution used during the
transition t 0 .
These denitions allow a full formalization of classical properties of SLD-
resolution, presented in the next section.
6 Basic Results
SLD-resolution denes a relation satisfying several important properties.
The logical ones are soundness and completeness; two others are particular
to this form of computation: lifting and switching lemmas.
6.1 Two Classical Lemmas
6.1.1 Switching Lemma
At each resolution step of a derivation, an atom and a clause must be selected.
The following well-known lemma ensures that the non-determinism in the
choice of atom does not matter: this is called don't care non-determinism.
Lemma 6.1 (Switching) If during a valid derivation, two atoms A and B
are successively selected, then they can also be selected in the reverse order,
and the derived states are the same up to renaming of variables.
This lemma is proved by decomposing the two transitions:
s id :R 0
| {z }
d
s id stands for the identity substitution tv). Furthermore, note that we suppose
the rst selected atom is before the second in the query R, that's why
we have the assumption This proof (presented in details
in [12]) is classical and requires constantly the denition of the variable renaming
process used during a valid derivation. Note that we explicitely
build, during this proof, the substitution relating the two derived states, thus
allowing us to assert they are the same up to renaming of variables.
6.1.2 Lifting Lemma
The lifting lemma is another classical lemma and is used during the completeness
proof. As we said in the introduction, we have to assume some
additional conditions on the renaming used, in order to prove it.
Lemma 6.2 (Lifting) Let d : s id :R
be a valid derivation. If for
a nite list of variables l, we have dom() l, then if
there exists a valid derivation s id :R
, such that and for a
query R f , we have R
The proof is obtained by induction over the derivation (using a left induction
schema). Here again, the two derived states are explicitely related (for
a full presentation, see [12]).
6.2 Two Fundamental Properties
Answers and solutions dene the operational and declarative semantics of
denite programs. Given a denite program P , the solutions to a query
(Deriv_ok d) -> (Fst (state_init_d d))=tv
-> (Snd (state_init_d d))=(subst_req eta r) ->
->(rrange (sr_trans t) x)))
(p_trans t1)=(p_trans
(Fst
(Ex [rf:request]((Snd (state_end_d d0))=
(subst_req (Fst (state_end_d d0)) rf)
^(Snd (state_end_d d))=(subst_req (Fst (state_end_d d))
(subst_req eta rf))))
([x:var](Subst_t (Fst (state_end_d d)) (eta x)))))).
(Deriv_ok (deriv_cons (deriv_cons d t1) t2)) ->
(le (plus (n_trans t1) (Length_r (body_c (c_trans t1))))
(n_trans t2))->
(Fst (state_init_d d))=tv ->
((Deriv_ok (deriv_cons (deriv_cons d
(n_trans t3)=(S (minus (n_trans t2)
(Length_r (body_c (c_trans
(n_trans t4)=(n_trans
((Snd (state_end_d (deriv_cons (deriv_cons d t1) t2)))=
(subst_req r (Snd (state_end_d
(deriv_cons (deriv_cons d
(Snd (state_end_d (deriv_cons (deriv_cons d t3) t4)))))
-> (Ex [v:var] (r x)=(tv v)))))))).
Table
7: Lifting and switching lemmas.
(Fst (state_init_d d))=tv->(Snd (state_end_d d))=true_req
(subst_req (answer d) (Snd (state_init_t (head_d d))))).
Table
8: Soundness of SLD-resolution.
R are the substitutions such that h p (P )
a declarative description of the desired output from denite program and
query. Conversely, we have the operational counterpart of solutions: answers.
If s id :R
is a valid derivation, then is an answer to R.
6.2.1 Soundness of SLD-Resolution
The soundness theorem expresses that every answer to a query is also a
solution to this query.
Theorem 6.1 (Soundness) If, from a denite program P and a query R,
we get the valid derivation s id :R
The corresponding proof requires the notion of free transitions that are
transitions satisfying the resolution rule, except that the uniers used are
not necessarily most general uniers. Hence, the condition on the
initial step (condition (*H5*) of the predicate rsl) does not necessarily hold.
This proof is obtained by using a right induction schema.
6.2.2 Completeness of SLD-Resolution
Let us now turn to the formalization of the completeness theorem of SLD-
resolution: if there exists a solution to a query, then there exists an answer
to this query (in this form, the completeness theorem is weaker than the
usual completeness theorem and the soundness theorem proved; we don't
relate here the solution with the answer). As usual, we need some new
denitions and lemmas rst: let us summarize them.
First, we have to dene Herbrand interpretations with respect to our
denitions. For this, we dene inductively the collection, T [;], of ground
terms (Ground_Term) that are terms not containing variables, obtained using
only function symbols occurring in (this set is also called the Herbrand
universe of ). At the same time, the collection, L n; [;], of lists of ground
terms is dened. Similarly, we dene the collection, At; [;], of ground
atoms (Ground_Atom), which can be formed by using relation symbols from
with ground terms from the Herbrand universe of as arguments (this
set is also called the Herbrand base of [ ). We also dene S ; , as the
collection of ground substitutions (Ground_subst), which are mappings from
X to T [;] (which exactly corresponds to T [;] X ). Furthermore, to avoid
some uninteresting complications, we assume, from now, on that the signature
used, contains a constant (i.e., a 0-ary function symbol); hence the
above-dened sets are nonempty (in [8], J. H. Gallier discusses in detail the
need for at least one constant symbol in in the context of the Herbrand
theorem).
We can now introduce the denition of the Herbrand interpretation of
, written H. For every f 2 , f H is a mapping from ' ar(f) [T [;]] to T [;]
dened by:
where tfg is the unique constructor of ground terms and where l 0 has type
L ar(f) [;] and is obtained from l. Using this denition, we dene a Herbrand
interpretation of [ as any interpretation over ground terms, based on
H. Since, for Herbrand interpretations, the assignment to constants and
functions is xed, it seems possible to identify a Herbrand interpretation I
of [ with a subset of the Herbrand base, dened by a predicate (I),
characterizing the ground atoms a, such that I a
However, note that specications of I and (I) correspond to two dierent
kinds of specications: whereas for every Herbrand interpretation I and
every ground atom a, the proposition I a is decidable, for an arbitrary
predicate p, on At; [;], the proposition p(a) is not. Therefore, later, we'll
use in theorems, which need to get from a predicate on the Herbrand base,
a Herbrand interpretation, this proposition as an assumption (we will use
this assumption only as a mapping). Fixpoint characterization of the least
Herbrand model and completeness of SLD-resolution will be obtained only at
the cost of this strong assumption, implicitly suggested by the identication:
Type.
For every denite program P , we dene, by a predicate on At; [;], the
least Herbrand model of P as the intersection of all Herbrand models of
According to this denition, and from [28], we prove that M
)g. We wish now to obtain a deeper characterization
of this set using xpoint concepts. To study Herbrand models of
denite programs, R. Kowalski and M. van Emden associate with a denite
program P , an operator T P , called immediate consequence operator, which
provides the link between the declarative and operational semantics of de-
nite programs. Using the identication of a Herbrand interpretation with a
predicate on the Herbrand base, this operator is usually dened as follows.
Table
9: Declarative semantics.
Let P be a denite program, p a predicate on At; [;], and a a ground atom.
If for a clause c occurring in P and for a ground substitution such that
then T P (p)(a). Since it is possible that some variables occur in the atoms a 0 ,
we cannot establish the decidability of T P (p), even if we know the decidability
of p: given an (not necessarily ground) atom and a Herbrand interpretation,
we cannot prove the decidability of the proposition this interpretation is a
model of this atom, needed to evaluate atoms not necessarily ground in
the body of the clause aected by T P .
Since Herbrand models of a program P are exactly the xpoints of T P , we
formalize some results on operators and their xpoints in a general setting.
In fact, T P is easily seen to be upward continuous, and it follows that its
least xpoint is T "!
P and is equal to M P .
us turn to the denition of the operational counterpart of the
least Herbrand model: the success set of a denite program, dened by a
predicate S P on the Herbrand base, characterizing the ground atoms a such
that there exists an SLD-refutation starting from a. From the two technical
lemmas presented in the end of this section, we prove that M P is equal to
S P and, under the assumption that every predicate on the Herbrand base is
decidable, we are now in position to prove the completeness theorem in the
following
Theorem 6.2 (Completeness) Let P be a denite program, R a non-empty
query, and a solution for R. Then, there exists the following valid
derivation s id :R
operators
A:Set Definition PA:=A->Prop. Definition OP:=PA->PA.
Inductive ORD:Set:= Fixpoint ORD_FIRST [n:nat]:ORD:=
Case n of
So:ORD->ORD | Oo
Lo:(nat->ORD)->ORD. [p:nat](So (ORD_FIRST p)) end.
ordinal powers
Fixpoint
[a:A]False
[l:(nat -> ORD)]([a:A](Ex [n:nat]((POF f (l n)) a))) end.
Theorem
Table
10: Operators, ordinals, and xpoints.
One delicate step in the proof of the completeness theorem of SLD-resolution
is concerned with the combination of derivations. This proof is made by
induction over the length of the initial query, and the following argument is
always used:
has a refutation
Because each B i is ground, these refutations
can be combined into a refutation of P [
However, the combination of derivations is rather delicate, and the way it is
made is never given. Therefore, during the formalization of this proof, we
need a (technical?) lemma, whose proof is not so immediate and shows (in
a constructive way) how the nal refutation can be obtained from the initial
ones. Of course, in order to ensure the good properties on the variables
occurring in the nal refutation, we have to be able to rename the initial
refutations.
First, we have the following variant lemma, which is seldom stated and
whose proof is not immediate. It is proved, in a dierent form, in [2] and
stated in [20].
Lemma 6.3 (Variant lemma) Let l be a list of variables and d 1 the valid
derivation s id :R
There exists a valid derivation d 2 :s id :R
Inductive Tp
Inductive Success [p:program;a:Ground_Atom]:Prop :=
(p_deriv d)=p->(Deriv_ok d)->
(Fst (state_init_d d))=tv->(Snd (state_init_d d))=
(cons_req (Ground_to_atom a) true_req)->
(Snd (state_end_d d))=true_req-> (Success p a).
(r=true_req)-> (semantic_csq (hp p) (subst_req s r))->
(Fst (state_init_d
(Snd (state_end_d
Table
11: Completeness of SLD-resolution.
, such that no variable occurring in #(d 2 ) also occurs in l. Furthermore,
for a substitution s r such that dom(s r ) var(R 2 ), we have R
In other words, the existence of a derivation does not depend on the choice
of variables in the input clauses: it suces that the good properties hold.
Formalizing this lemma consists in building from a derivation d 1 starting
from R and from a nite set of variables Z, a derivation d 2 starting from R
such that no variable occurring in the input clauses of d 2 also occurs in Z.
R
| {z }
Z
| {z }
d2
As a (not so immediate) consequence, we obtain the following lemma.
Lemma 6.4 (Combination of derivations) Let P be a denite program,
R be a nonempty query, and be a ground substitution. If every atom
occurring in R is in the success set of P , then, there exists a valid derivation
s id :R
Proof. We proceed by induction over R. For
the claim is obvious. For induction hypothesis,
if for every atom a 0 occurring in r, we have S P (a 0 ), then, there exists a
valid derivation s id :r
Moreover, by hypothesis, we have
By the induction hypothesis, we can build the valid derivation
I :r ; . Furthermore, by (1), we have S P (a) and, by denition, there exists
a valid derivation d
is a ground substitution,
we can prove, by induction over d 1 , that d 3 : s id :c r (a; r)
I :a is also
a valid derivation. Moreover, from d 2 and by Lemma 6.3, there exists a
valid derivation d 4 : I :a
now, by induction over d 4 , we prove that d 5 : I :a
valid derivation. Hence, by combining d 3 and d 5 , which is suitable for the
renaming conditions, one obtains the valid derivation s id :c r (a; r)
which settles the claim. J
As we said, the formal completeness proved is weaker than the soundness
theorem proved: we don't relate the solution and the answer. This is
due to the following usual step in the proof:
be the variables of N . Enrich the
language of P by adding new constants a
be
the substitution fx 1 =a there exists an SLD-
refutation of P [ f
Ng (. By textually replacing in this refutation
a i by x i , for
This operation cannot be formalized by using our denitions (which do not
allow to add new constants in the functional signature or to textually replace
constants by variables and variables by constants). A possible solution
could consists in following the S-semantics approach developed in [7] which
allows variables in the Herbrand base.
7 Related Work
As we said, unication on quasi-terms has been formalized by L. C. Paulson
[23] using LCF and by J. Rouyer [26] using Coq. Concerning the deni-
tion of partial functions, C. Dubois and V. Vigui Donzeau-Gouge [6] have
recently proposed a method to generate automatically the predicate P characterizing
the domain of a partial function f from equations dening f in
a ML-style. Formal completeness proofs have been envisaged by several au-
thors. In [24], H. Persson presents a formalization, using the proof assistant
ALF, of a constructive completeness proof for intuitionistic predicate logic
w.r.t. models based on formal topology. In [11], J. Harrison discusses about
a formalization in HOL of basic rst-order model theory including Compact-
ness, Lowenheim-Skolem, and Uniformity theorems. In [16], J. L. Krivine
describes a formalization in second order-logic of an intuitionistic proof of
the completeness theorem of classical logic. Finally, note that in the area of
formal methods applied in logic programming, and starting from an operational
semantics for Prolog, the soundness and completeness proofs, for
each renement step toward the Warren Abstract Machine (WAM), have
been elaborated by C. Pusch [25] with the theorem prover Isabelle.
8 Conclusion
In order to prove formal properties about programs, it seems natural to
give a formal specication of their operational semantics. In this paper,
SLD-resolution has been formalized, and fundamental properties of this form
of computation have been proved (more than 600 technical lemmas have
been formalized during this development). The proofs we have machine-checked
are based on those in J. W. Lloyd's book [19] and then follow the
traditional we have chosen to take as the referential notion of
truth a semantical notion (an alternative could consist in taking another
referential notion like natural deduction or sequent calculus).
First, note that, instead of proving the unication theorem by following
the unication algorithm, as J. Rouyer did in [26], we have used his result on
quasi-terms to obtain our proof. The technique proposed is based on dening
a bijection between terms and quasi-terms satisfying a given predicate and
proving the preservation of the unication property. In this way, we have
proved the unication theorem without really dealing with unication theory,
thus avoiding a heavy proof requiring to handle sophisticated theories. This
construction is interesting because it represents an alternative to the classical
approach and shows how to take advantage of a previous formal proof, even
if the desired proof does not exactly deal with the same objects. Whereas
the unication theorem proved in [26] requires about 140 lemmas, only 75
lemmas have been proved in our development. This shows the interest that
a proofs library be provided.
In more informal presentations, variable renaming problems are often
ignored; however, these problems cannot be ignored here. As we said, the
results presented here have been proved in the calculus of inductive construc-
tions, thus making a dierence from the proofs one can nd in many books on
logic programming. The main dierence is concerned with the renaming process
used in an SLD-derivation: it is made explicit. A typical example is the
proof of the completeness theorem that requires a variant lemma (assert-
ing that the existence of an SLD-derivation does not depend on the choice of
variables in the input clauses used) and a lemma on combination of derivations
(which explicitely allows this operation), whose proofs are rather long.
Therefore, formalizing SLD-resolution introduces many complications. Even
if combining some SLD-derivations seems to be easy, this operation requires
several renamings in order to satisfy the standardization apart assumed
in the denition of a derivation. Usually, these lemmas are implicitly used
without any proof or any justication. Not surprisingly, a full formalization
of these proofs shows how minor details could be crucial. An interesting
discussion about these ne points, at the foundations of logic programming,
can be found in [15, 27]. Of course, the main problems come from the explicitation
of all the substitutions used during the unication and the variable
renaming processes: substitutions are a quite hard matter to deal with. In
[1], substitutions are said to be the minence grise of the -calculus, this can
also be said for SLD-resolution. Like SLD-resolution for clauses; -reduction
denes a relation on -terms, and it may be interesting to compare properties
of these relations. Whereas -reduction is conuent, SLD-resolution
just satises the switching property, which is weaker than conuence. Fur-
thermore, the variables renaming process used in an SLD-derivation can be
viewed as an implicit -conversion: the renaming is made explicit and allows
a full formalization of SLD-derivations, along the lines of the calculus
of explicit substitutions [1] for -reduction (the -calculus is a renement
of the -calculus, where substitutions are manipulated explicitely, and provides
a link between the classical -calculus and concrete implementations).
The renaming process required in an SLD derivation plays an essential role
in logic programming: it constitutes an important step in the denition of
operational semantics of denite programs from the declarative reading of
Horn clauses.
Acknowledgments
Many thanks to Ren Lalement for enlightening discussions
about this work, as well as the anonymous referees for some very
useful comments.
--R
Explicit substitutions.
Logic programming.
Contributions to the theory of logic programming.
Project Coq.
The calculus of constructions.
A step towards the mechanization of partial functions: domains as inductive predicates.
Declarative modeling of the operational behavior of logic languages.
Logic for computer science
Proofs and Types
Edinburgh LCF
Formalizing basic
Formalization of SLD-resolution in the calculus of inductives constructions
Reynolds and Heyting models of logic programs.
In Koichi Furukawa
Une preuve formelle et intuitionniste du thorme de compltude de la logique classique.
Computation as Logic.
Foundations of Logic Programming.
Partial evaluation in logic program- ming
Deductive synthesis of the uni
Logic Programming and Prolog.
Verifying the uni
Constructive completeness of Intuitionistic Predicate Logic: A formalization in Type theory.
Dveloppement de l'algorithme d'uni
The role of standardising apart in logic programming.
The semantics of predicate logic as a programming language.
--TR | calculus of inductive constructions;SLD-resolution;standardization apart;formal proofs;semantics of logic programs |
594273 | Some Lambda Calculus and Type Theory Formalized. | We survey a substantial body of knowledge about lambda calculus and Pure Type Systems, formally developed in a constructive type theory using the LEGO proof system. On lambda calculus, we work up to an abstract, simplified proof of standardization for beta reduction that does not mention redex positions or residuals. Then we outline the meta theory of Pure Type Systems, leading to the strengthening lemma. One novelty is our use of named variables for the formalization. Along the way we point out what we feel has been learned about general issues of formalizing mathematics, emphasizing the search for formal definitions that are convenient for formal proof and convincingly represent the intended informal concepts. | Introduction
"This paper is about our hobby." That is the first sentence of [MP93],
the first report on our formal development of lambda calculus and
type theory, written in autumn 1992. We have continued to pursue
this hobby on and off ever since, and have developed a substantial
body of formal knowledge, including Church-Rosser and standardization
theorems for beta reduction, and the basic theory of
Pure Type Systems ( PTS ) leading to the strengthening theorem and
type checking algorithms for PTS . Some of this work is reported
in [MP93, vBJMP94, Pol94b, Pol95]. In the present paper we survey
this work, including some new proofs, and point out what we feel
has been learned about the general issues of formalizing mathematics.
On the technical side, we describe an abstract, and simplified, proof of
standardization for beta reduction, not previously published, that does
not mention redex positions or residuals. On the general issues, we emphasize
the search for formal definitions that are convenient for formal
proof and convincingly represent the intended informal concepts.
The LEGO Proof Development System [LP92] was used to check
the work in an implementation of the Extended Calculus of Constructions
with inductive types [Luo94]. LEGO is a refinement style
proof checker, publicly available by ftp and WWW, with a User's Manual
[LP92] and a large collection of examples. Section 1.3 contains
Submitted to Journal of Automated Reasoning
y A version of this paper appears as technical report ECS-LFCS-97-359, University
of Edinburgh.
z Laboratory for Foundations of Computer Science, University of Edinburgh
x Basic Research in Computer Science, University of Aarhus. Centre of the Danish
National Research Foundation.
information on accessing the formal development described in this pa-
per. Other interesting examples formalized in LEGO include program
specification and data refinement [Luo91], strong normalization of System
F [Alt93], synthetic domain theory [Reu95, Reu96], and operational
semantics for imperative programs [Sch97].
1.1 Why?
PTS have a beautiful meta-theory, developed informally in [Bar92,
Ber90, GN91, vBJ93, Geu93]. These papers are unusually clear and
mathematical, and there is little doubt about the correctness of their re-
sults, so why write a machine-checked development? The informal presentations
leave many decisions unspecified and many facts unproved.
They are far from the detail of representation needed to write a computer
program for typechecking PTS , and the lemmas needed to prove
correctness of such a program. At the start, our long-term goal was
to fill these gaps in order to increase confidence in proofchecking programs
(such as LEGO) based on type theory. That goal is largely met
in [Pol95]. Also, while the basic informal theory of PTS is well under-
stood, the difficulties of formalization suggested reformulations which
clarify the presentation.
Another goal of the project is to develop a realistic example of formal
mathematics. In mathematics and computer science we do not
prove one big theorem and then throw away all the work leading up
to that theorem; we want to build a body of formal knowledge that
can continually be extended. This suggests some design criteria for
formalization. Representations and definitions must be suitable for the
whole development, not specialized for a single theorem. The theory
should be structured, like computer programs, by abstraction, providing
"isolation of components" so that several parts of the theory can
be worked on simultaneously, perhaps by several workers, and so that
the inevitable wrong decisions in underlying representations can later
be fixed without affecting too seriously a large theory that depends on
them. The body of knowledge we want to formalize is itself still grow-
ing, e.g. [vBJMP94] reports advances on typechecking for PTS done
later than our original formalization, that became part of our formal
development. The work on typechecking benefited from the basic formalization
of PTS , since proofs about several related systems could be
easily adapted from proofs already done for PTS . Further, new subjects
were included; e.g. the standardization theorem, not used in the
type theory, was formalized by the first author. On the other hand, we
do not claim that type theory is a realistic example for all formal math-
ematics: it is especially suitable for formalization because the objects
are inductively constructed, their properties are proved by induction
over structure, and there is little equality reasoning.
Perhaps the most compelling reason for our continuing fascination
with this work is the lure of completely concrete, yet simple, proofs
of results whose conventional presentation seems to require some notions
that are "messy" to formalize, e.g. the standardization theorem
discussed in section 3.4. We see such proofs as beautiful, both by their
simplicity and their concreteness. There is a tendency in formalization
to throw simplicity to the winds in frustration to get the proof to work
at all; but once it is checked, it can be beautified relatively easily, as
improved definitions and arguments are mechanically checked, easily
pointing out new glitches and suggesting how to fix them. Also, a formal
development is easy to come back to a year later, as all the details
you would not otherwise have written down are explicit, and don't have
to be rediscovered.
1.2 Related Work
There are many formalizations of the Church-Rosser theorem [Sha85,
Hue94, Nip96, Pfe92]; the only formalization of a standardization theorem
we know of is [Coq96a], for lazy combinator expressions. Formalizations
of type theory include [DB93, Bar96]; both of these address
limited aspects of very special type theories (essentially the Calculus of
Constructions), although [Bar96] is very interesting work in which the
program extraction mechanism of Coq is used to extract an executable
typechecker from a proof of decidability of typechecking. In contrast
to all the cited work except [Bar96], our development hasn't been terminated
by reaching one specified theorem, but continues to grow in
various directions guided by our interests, and by other work we come
across that we feel needs checking. For example, both authors have
checked parts of type theory papers we were asked to referee.
A novelty in our presentation is the use of named variables. Most
of the formalizations of type theory or lambda calculus that we know
of use de Bruijn indices ("nameless variables") [Sha85, Alt93, Hue94,
Nip96, Bar96] or higher order abstract syntax [Pfe92] to avoid formalizing
the renaming of variables to prevent unintended capture during
substitution. While de Bruijn notation is concrete and suitable for
formalization, there are reasons to formalize the theory with named
variables. For one thing, implementations must use names at some
level, whether internally or only for parsing and printing; in either
case this use of names must be formally explained. More interesting
is the insight to be gained into the meaning of binding. Many
researchers agree that de Bruijn representation "really is" what we informally
mean by lambda terms, in the sense that there is no need
to quotient terms by alpha-conversion, i.e. intensional equality on de
Bruijn terms corresponds with what is informally meant by identity
of terms. Nonetheless, de Bruijn representation is a coding of the informal
notion of binding, and doesn't address at all the relationship
between free and bound variables, namely how free variables become
bound. In our formalization, syntactic terms using named variables
are themselves concrete: the names of bound variables actually occur
(parametrically) in meta-formulas containing them, just as the names
of free variables do. This is done using a formulation suggested by Coquand
[Coq91], based on syntactically distinguishing free from bound
variables 1 . Other work on formalization of binding and substitution
using names includes [Coq96b, GM96, Owe95, Sat83, Sto88], but these
do not work out any large examples using their binding notions. It
would be interesting to compare our development with some similar
example using the terms up-to alpha conversion of [GM96]. A presentation
of type theory based on treating terms with named variables
concretely is Martin-L-of's calculus of explicit substitutions [Tas93], but
this presentation is not closed under alpha-conversion, as our presentation
is (section 5.5.3), and we view this as a failure of concreteness
of Martin-L-of's system.
1.3 This paper and the formal development
The source files for the development described in this paper, along
with a README file explaining how to check them, is available on the
LEGO WWW homepage http://www.dcs.ed.ac.uk/home/lego/.
LEGO uses a module system (described in [JP93]) based on
Cardelli's mock modules [Car91]. Each source file is a module, and each
module has a header saying which modules it depends on. Thus the
directory of modules associated with this paper contains parallel, and
even incompatible, developments. If you type Load strengthening,
the file strengthening.l (which contains the proof of strengthening
for PTS ) will be loaded, preceeded by every module it depends on 2 .
This distinction is already present in Gentzen [Gen69, pages 71-2, 116-7, 141,
216-7] and Prawitz [Pra65]
2 The dependencies are determined from the module headers, not by examining
There are over 70 proof source files with extension .l
containing
over 1500 definitions and lemmas. This is a large amount of formal
knowledge, which we can only survey here. This paper uses informal
mathematical notation, but almost every definition and lemma that
we mention is given with its formal name in typewriter font (often
in parentheses). You can then use grep to find the file in which it is
defined and the files in which it is used. This is not particularly elegant,
but it's how we do it too. Keeping track of a large amount of formal
knowledge is a serious problem that we have not addressed very well.
1.3.1 About notation
As mentioned, this paper uses informal notation, which is arrived at
by manually translating from the formal LEGO notation into L A T E X.
Further, the translation is not purely syntactical; we chose to surpress
some technical details to have a readable presentation. Errors are quite
likely, arising from both our translation and your interpretation. This
paper may be an informative outline of the formal work, but if you want
to believe one of our results you must read its formal statement, and all
the formal definitions used in its statement; see [Pol97] for discussion
of believing a large formal development.
In [MP93] we used formal notation, verbatim text manually extracted
from LEGO source files; no translation errors occur, but there
is no reason to believe the verbatim text in the paper actually appears
in the files. Indeed, the the document and the files drifted apart
over time. In [Pol94b] we again used formal notation, mechanically
extracting marked sections of the source files, following the idea of
Knuth's WEB. We could rerun the extraction to update the document
to the formal source, but many readers complained the document was
as unreadable as the formal source. Presenting a formal development
is a serious problem. Perhaps mechanical extraction with mechanical
translation to informal notation is the right direction to pursue.
For better or worse, we have sanitised this presentation so that very
little purely formal detail shows through. For example, we mostly sur-
press the distinction between boolean values and propositional values.
However, we don't want to hide the fact that formalization requires
many details that don't appear in informal presentations.
the actual dependencies in the files.
3 The .l files are the ones we wrote; LEGO generates "compiled" files with a .o
extension. These are the fully annotated -terms generated by the LEGO tactics
called in the .l file.
A few basic notations The development uses LEGO's built-in library
of impredicative definitions for the usual logical connectives and
their properties; we use standard notation for these connectives. Quantifiers
are typed in ECC, but we reserve symbols to range over certain
types, and drop the type labels almost everywhere; e.g. p will be reserved
to range over parameters, PP , so we
Well known computer science notations are used, e.g. if
as if-then-else, list( ) for the type of lists over , @ (or sometimes
just concatenation) for list append. All funtions of ECC are total (as
opposed to functions in the object theory of lambda terms and PTS ),
so some operations take extra arguments for a "failure value", e.g.
(assoc a b l) returns b if a is not the first element of a pair occurring
in l .
Pure Languages
In this section we discuss a formalization of the language of PTS ,
including terms, occurrences and substitution. We derive a strong induction
principle for well-formed terms.
A Pure Language ( PL ) is a triple (PP; VV; SS) where
ffl PP is an infinite set of parameters, ranged over by p , q , r ; these
are the global, or free, variables.
ffl VV is an infinite set of variables, ranged over by v , x , y ; these
are the local, or bound, variables.
ffl SS is a set of sorts, ranged over by s , t u ; these are the constants
PP , VV and SS have decidable equality. That PP and VV are infinite is
captured by the assumption that for every list of parameters (variables)
there exists a parameter (variable) not occurring in the list; e.g.
We are not assuming mathematical principles, but working parametrically
in types PP , VV and SS having the stated properties. These
can be instantiated with particular types that provably do have these
properties, e.g. the natural numbers, or lists over some finite enumeration
type. By working parametrically we are preserving abstractness:
only the stated properties are used in our proofs.
4 In this formula, member(p; l) is decidable because PP has decidable equality.
2.1 Terms
The terms of a PL , Trm , ranged over by M , N , A , . , E , a , b , are
given by the grammar
atoms: variable, parameter, sort
binders: lambda, pi
application
To be precise, Trm is inductively generated by six constructors: every
term can be thought of as a well-founded tree whose leaves are variables,
parameters and sorts, and whose interior nodes are lambda and pi
(having three branches each) and application (having two branches).
We often define functions on Trm by structural (primitive) recursion
over this inductive definition. As usual, we intend [v:A]B and fv:AgB
to bind v in B but not in A . However the intended binding structure
is not determined by the definition of Trm , but is made explicit by the
definitions of substitution and occurrence below. Equality on terms is
defined by recursion over Trm ; it inherits decidability from PP , VV and
SS .
Remark 2.1 (Notation) Often when doing case analysis by term
structure, we want to say that the binders, lambda and pi, behave the
same way. We introduce a notation hv:Aia to allow combining these
cases. The actual formalization does not have such a notation, but this
would have saved much cutting and pasting in developing the proofs.
The length of a term is used as a measure for well-founded induction
Two properties of this measure are used applications: if A is a proper
subterm of B then (used in induction on the
length of terms), and every term has positive length (used in reasoning
about PTS by induction on the sum of the lengths of the terms in a
context).
2.2 Occurrences of Parameters and Sorts
The list of parameters occurring in a term is computed by primitive
recursion over term structure, and the boolean judgement whether or
not a given parameter occurs in a given term is decided by the member
function on this list of parameters.
params(p) , [p]
params(hv:Aia) , params(A) @ params(a)
Similarly are defined.
2.3 Substitution
For the machinery on terms, we need two kinds of substitution, for
parameters and for variables, both defined by primitive recursion over
term structure. Write [a=p]M (formally psub) for substitution of a
for a parameter, p , in M . This is entirely textual, not preventing
capture. Since parameters have no binding instances in terms, there is
no hiding of a parameter name by a binder.
[a=p]q , if(p=q; a; q)
[a=p]ff , ff ff 2 VV; SS
[a=p]hv:Bib , hv:[a=p]Bi[a=p]b
Substitution of a for a variable, v , in M , written [a=v]M (formally
vsub), does respect hiding of bound instances from substitution, but
does not prevent capture.
[a=v]x , if(v=x; a; x)
[a=v]ff , ff ff 2 PP; SS
[a=v]hx:Bib , hx:[a=v]Biif(v=x; b; [a=v]b)
will be used only in safe ways in the type theory and
the theory of reduction and conversion, so as to prevent unintended
capture of variables. Note that these operations are total functions, and
do not rename variables. Also, occurrences of a in [a= ] are shared,
regardless of whether they occur within different binding scopes, in
contrast to the situation with de Bruijn indices.
Some important lemmas can now be proved:
Vcl-atom Vclosed(ff) ff 2 PP [ SS
Vcl-bind
Table
1: Inductive definition of the relation Vclosed .
and we have a ready supply of terms of the shape [p=v]M , with
Many other properties of these operations are proved in the formal
development.
2.4 No Free Occurrences of Variables
Intuitively parameters are the free names in terms; variables are intended
to be the bound names, and we do not consider terms with free
variables to be well formed. We define inductively a predicate Vclosed
(variable-closed) over terms (table 1). This is analagous to the way a
typing relation specifies another kind of well-formedness. (It will turn
out that every PTS -typable term is Vclosed ). Thus Vclosed is used
as an induction principle over well formed terms. As this relation is
a simple case of ideas that recur many times in what follows, we will
discuss it at some length.
Of course all terms of form s and p are Vclosed (rule Vcl-atom),
and no terms of shape v are Vclosed (there is no rule to introduce
Vclosed(v) ), but how do we define Vclosed for binders? The approach
to "going under binders" is a central idea of our formal handling
of names: for hv:Aia to be Vclosed , we require Vclosed(A)
and Vclosed( [p=v]a) for some parameter p . That is, to go under a
binder, first fill the hole with parameter, p . But p doesn't appear in
the conclusion of rule Vcl-bind; which parameter are we to use? In
the definition of Vclosed we say that any parameter will do, but there
is another possible choice: that Vclosed( [p=v]B ) be derivable for all
p . This is not a formal question; it is one of the tasks of a reader of formal
mathematics to decide if the formalisation correctly captures her
informal understanding. But a formaliser can help readers by pointing
out alternatives, and formally proving some relationship between them.
This is especially interesting when alternative definitions lead to easier
proofs in some cases. We will see this below for Vclosed .
Remark 2.2 Vclosed is equivalent to having no free variables
(Vclosed vclosed, vclosed Vclosed). This observation may be of
informal interest ("the definition of Vclosed is reasonable"), but we
do not use it formally because Vclosed allows us to avoid all talk of
Vclosed Generation Lemmas Suppose you have a proof of
examining it you know it must
be constructed by Vcl-bind from proofs of Vclosed(A) and
no other rule for Vclosed has a conclusion
of shape Vclosed( hv:AiB ) . The very fact that a relation is inductively
defined means that its judgements can only be derived by using
its rules. This is often called case analysis, and more generally, the lemmas
that express such properties are called generation lemmas [Bar92],
or inversion principles [DFH 93]. Note that inversion principles are
determined by the shape of a definition, not by its extension. LEGO has
new and very useful tactics to automate the use of inversion [McB96],
but most of what we describe in this paper was done before the tactics
were available. We will frequently use inversion on inductive definitions
in the rest of this paper without further comment.
The generation lemmas from the definition of Vclosed are
Notice how the existential quantifier in the case for binders expresses
the failure of the subformula property in Vclosed .
2.4.1 A better induction principle for Vclosed .
Here are three "obvious" facts about Vclosed (alpha Vclosed lem,
Vclosed alpha).
They are all directly provable, but appear to need length induction
(which appeals to well-founded induction and then subsidiary case
analysis; e.g. the proof of claim aVclosed alpha below), for the usual
reason that statements about change of names are proved by length induction
rather than structural induction: e.g. [q=v]M is not generally
a subterm of ( M N ) , but it is shorter than ( M N ) . We will derive
a new induction principle which packages up such arguments once and
for all.
Consider an alternative definition, called aVclosed , differing
only in the rule for binders, in which the right premise requires
aVcl-bind
We will show that Vclosed and aVclosed derive the same judgements.
Induction over aVclosed is the principle which Melham and Gordon
rediscovered [GM96, Section 3.2].
It is worth saying that Vclosed is a type of finitely branching
well-founded trees; i.e. Vcl-atom are the leaves, and Vcl-bind and
Vcl-app are binary branching nodes. On the other hand, aVclosed
contains infinitely branching well-founded trees, where aVcl-bind creates
a branch for each parameter p . Notice also that for any term, A ,
there is at most one derivation of aVclosed(A) , while there may be
many derivations of Vclosed(A) , differing in the parameters used in
the left premises of instances of aVcl-bind.
Equivalence of Vclosed and aVclosed (aVclosed Vclosed,
Vclosed aVclosed)
Both directions follow easily by structural inductions once we have the
following claim (aVclosed alpha):
Proof. The claim is proved by induction on lngth(B) . This works
because every term appearing in a premise of a rule of aVclosed is
shorter than the term appearing in its conclusion; the typing relations
to be considered later do not have this property, and more subtle proofs
will be required (section 5.2.1).
By well-founded induction on lngth(B) , we have the goal
Now using term structural induction on A , we have cases for sort, vari-
able, parameter, binder and application (only case analysis is necessary
here; we don't use the structural induction hypotheses). Consider the
case for binder: we must show aVclosed( [q=v] hn:AiB ) , i.e.
under the assumptions
(i.e. aVclosed(hn:[p=v]Aiif(v=n; B; [p=v]B)))
By aVclosed inversion applied to assumption vclp we also know
By aVcl-bind, it suffices to show
Noticing that [p=v] doesn't change lngth, the first of these holds
by ih and h1. For the second, let r be an arbitrary parameter, and
consider cases. If then we are done by h2; i.e. [q=v]B doesn't
actually appear in the goal, and [p=v]B doesn't actually appear in h2.
Finally the interesting case: if v 6= n we use a straightfoward lemma
(alpha commutes alpha)
to rewrite the goal to aVclosed( [q=v] [r=n]B ) . By ih it suffices to show
aVclosed( [p=v] [r=n]B ) , which follows by h2 after again rewriting the
order of substituting p and r .
What have we gained? By defining aVclosed and showing it to
be extensionally equivalent to Vclosed , we can view the induction
principle of aVclosed as an induction principle for the extension of
Vclosed , and this is clearly stronger than the induction principle of
Vclosed . We insist on extension to point out that aVclosed-induction
may be used to prove statements about the judgement Vclosed , but
not about derivations of the judgement.
Notice that we could directly prove the analogue of claim
aVclosed alpha for Vclosed (the proof outlined above works), but
it is not just the stronger premises of aVclosed we are after (i.e. the
generation lemmas), it is the stronger induction hypotheses.
2.5 A Technical Digression: Renamings
are sequential operations; we have not used a notion
of simultaneous substitution, except in the following special case. A renaming
is a finite function from parameters to parameters. Renamings
are represented formally by their graphs as lists of ordered pairs.
rp , PP \Theta PP (renaming pair)
Renaming , list(rp)
ae and oe range over renamings. The action of a renaming (renTrm)
on parameters is by lookup in the representing list, and is extended
compositionally to all terms.
aep , (assoc p p ae)
aeff , ff (ff 2 VV; SS)
aehv:Aia , hv:aeAiaea
ae(M N) , ae(M) ae(N)
This is a "tricky" representation. First, if there is no pair (p; q) in ae ,
returns p , so the action of a renaming is always total,
with finite support. Also, while there is no assumption that renamings
are the graphs of functional relations, the action of a renaming is func-
tional, because assoc finds the first matching pair. Conversely, consing
a new pair to the front of a renaming will "shadow" any old pair with
the same first component. We do not formalize these observations.
Renamings commute with substitution in a natural way:
Renaming is iterated substitution. We can analyse the action of
a renaming in terms of substitution (renTrm is conjugated psub):
From this lemma it is easy to show that renaming respects any relation
that substitution of parameters respects (psub resp renTrm resp):
Similar results hold for n -ary relations R .
Injective and Surjective Renamings It is useful to have bijective
renamings (e.g. in Section 5.2.1). The definitions are standard:
It is surprisingly difficult to construct bijective renamings in general
because of the trickiness of the representation mentioned above. However
it's clear that any renaming that only swaps parameters is bijective
(swap sur, swap inj), and this is enough for our purposes:
3 Reduction and Conversion
In this section we outline the theory of reduction and conversion of
Pure Languages. The main results are the Church-Rosser and standardization
theorems.
As in the definition of Vclosed (Section 2.4), the interesting point
in defining reduction is how the relation goes under binders. To understand
how reduction works, consider informally one-step beta-reduction
of untyped lambda calculus. In our style the fi and - rules are:
The substitution [N=x]M on the RHS of fi does not prevent capture,
so some restriction is required. It is obvious that no capture can occur
if N is closed in the usual informal sense, but because we distinguish
between parameters and variables it is enough that N be Vclosed .
This is no actual restriction: we will only want to reason about Vclosed
terms anyway, as these are the "well-formed" terms.
To use fi under a binder, as allowed by - , we must preserve the
invariant that fi is only applied to Vclosed terms: we fill the "holes"
left by stripping off the binder with a fresh parameter. Here is an
instance of - where incorrect capture might occur (contracting the
underlined redex):
After removing the outer binder -x , replacing its bound instances by a
fresh parameter, q , and contracting the Vclosed redex thus obtained,
we must re-bind the hole now occupied by q . (Since q was fresh, all
instances of q mark holes that should be re-bound). According to - ,
we require a variable, y , and a term, N , such that [q=y]N is the
contractum of the Vclosed redex, -x:q in the example. Such a pair
is y , -x:y (the one we have used above), as is z , -x:z for any z 6= x .
However - does not derive the incorrect judgement
because
Thus incorrect capture is avoided.
3.1 Parallel Reduction
Rather than use ordinary fi -reduction, we take parallel reduction ('a
la Tait-Martin-L-of) as the basic reduction relation. Parallel reduction
is convenient for the Church-Rosser and standardization theorems, as
emphasised by Takahashi in her beautiful account [Tak95]. Our development
follows that of [Tak95], with some refinements.
3.1.1 One-step parallel reduction
This relation, ![
(par red1), is defined in Table 2. As in Vclosed
above, the dependence of the congruence rule for binders on the choice
of a parameter p is only apparent. However, something new arises here,
namely the side conditions p 62 . These are eigenvariable
pr1-atom ff ![
pr1-beta
A ![
Vclosed(U)
pr1-bind
A ![
pr1-app
A ![
Table
2: 1-Step Parallel Reduction
conditions 5 , which ensure that the parameter p correctly indicates the
position of the bound variables in the compound terms.
Only Vclosed terms participate in ![
(par red1 Vclosed)
and ![
is reflexive on Vclosed terms (par red1 refl)
A stronger induction principle for ![
The rules pr1-atom, pr1-
bind and pr1-app are the congruence rules for our language. As with
Vclosed (section 2.4.1), we introduce a strong congruence rule for
binders
~
pr1 -bind
A ~
and prove that ![
and ~
are extensionally equivalent, giveing us
stronger induction and inversion principles. Because of the eigenvariable
conditions in pr1-bind, a technique using renamings is required
5 Kleene [Kle52, x78, on the notion of "pure variable" proof] explains how to
treat such conditions; however, to do so he must explicitly consider operations on
derivations, hence dependent elimination, whereas our methods require only rule
induction, i.e. non-dependent elimination. The second author is grateful to N.
Shankar for this reference.
to show the equivalence. We omit the details, but a similar argument
is used in section 5.2.1.
The strong induction principle is used to show that ![
is closed
under substitution (par red1 psub):
Many-step parallel reduction !
(par redn), is the transitive
closure of ![
. It inherits properties par redn Vclosed and
par redn refl from the corresponding properties of ![
mentioned
above.
3.1.2 Alpha-Conversion
We define ff -conversion, ff
- , to be the least congruence, i.e. ff
- is exactly
without the rule pr1-beta, so ff
. This definition is
symmetric, by inspection. To show that it is transitive requires the
stronger induction principle for ff
- , which we prove in the same way as
above. Hence ff
- is an equivalence relation 6 . It is decidable for Vclosed
terms (decide alpha conv):
ff
with a straightfoward but messy proof, by double induction on
and aVclosed(B) .
Informally, alpha-conversion is used for changing the names of vari-
ables. We do not have hx:AiB ff
does
not prevent capture. However, we do have (true alpha conv pi):
Closure under ff -conversion One of Coquand's original motivations
for distinguishing between variables and parameters was to avoid
the need to reason about ff -conversion; many of the arguments below
(Church-Rosser, standardisation, subject reduction) achieve this goal.
Name-carrying syntax is regarded as an abbreviation for a quotient
modulo ff -conversion, so that when we formalise a relation R such
as parallel reduction above, we really intend R modulo the quotient
structure, i.e. ff
- . We say a relation R is:
6 This should be contrasted with Gallier's meticulous but long-winded treatment
in [Gal90].
closed under ff if ffffiR ' Rffiff ; strongly closed, if ffffiR ' R ;
full wrt ff if Rffiff ' ffffiR ; strongly full, if Rffiff ' R .
Remark 3.1 ![
is strongly closed under ff -conversion: the proof is
the same as that for transitivity of ff
- , with the additional case of a
redex handled by observing that an ff -variant of a redex is a redex.
However ![
is not full w.r.t. ff
-classes. For example
but no ff -variant of the LHS ![
-reduces to ( [y 1 :q]y 1
although this is an ff -variant of the RHS.
3.1.3 A Church-Rosser Theorem
Using the argument of Tait and Martin-L-of, as modernized in [Tak95],
we prove the first CR theorem (par redn DP):
by the usual strip lemma argument and the diamond property of ![
(comp dev par red1 DP).
To do so, we introduce an inductive characterisation of complete
development, \Gamma![
, (comp dev)
7 . It is given by the same rules as ![
except for the application rule:
cd-app
A \Gamma![
AB \Gamma![
A is not a lambda
The side condition in cd-app forces contraction of all redexes: we have
a deterministic sub-relation of ![ .
The theorem on finiteness of developments now becomes the combination
of:
ffl induction on the definition of \Gamma![
, which we may think of as a
partial correctness assertion;
ffl the existence (for Vclosed terms) of complete developments,
(comp dev exists), which we may think of as a termination argument
7 cf. the definition of \Gamma![
as a function by structural recursion on terms [Tak95]
This separation of concerns gives us an advantage over Takahashi's
informal proofs, in that we do not have to consider, in each proof about
\Gamma![
, a subsidiary induction (case-analysis) to resolve the redex/non-
redex distinction in the case of an application. This is handled once
and for all in the existence proof, while induction on the definition of
\Gamma![
already delineates the redex/non-redex distinction. The price we
pay is that we no longer work with an object-level function, but rather
a functional relation.
Of course, we have simplified matters by considering developments
of the entire set of redexes in a term: this is sufficient for our purposes,
but a more refined analysis (e.g. [Hue94]) would take us beyond our
simple datastructure of terms.
The diamond property (comp dev par red1 DP) follows easily from
the following "Takahashi" lemma (comp dev preCR):
whose proof is by induction on M \Gamma![ M 0 , with inversion of M![ N . As
usual, the interesting case, of a redex/redex, appeals to par red1 psub.
Remark 3.2 These proofs do not make any appeal to ff -conversion.
This is because both the ![
and \Gamma![
relations are strongly closed under
ff -conversion. Indeed, we may show the following two properties, which
strengthen comp dev exists, namely comp dev unique:
and comp dev exists unique:
3.2 Conversion
We define conversion, ' (conv), as the symmetric and transitive closure
of !
. It inherits properties conv Vclosed and conv refl from
those of !
mentioned above.
The second Church-Rosser theorem is now straightfoward to
prove for conversion (convCR):
3.3 Normal Forms
A term is beta normal (beta norm), if it has no beta redexes . This
may be defined with the same rules as aVclosed , except the rule for
application, which is
bn-app beta norm (A) beta norm (B)
beta norm ( AB )
A is not a lambda
All beta norm terms are Vclosed (beta norm Vclosed). A relation
of reduction to normal form is defined:
A # N , beta norm (N) - A !
(normal
is reflexive, so there is reduction from a normal form, but every
reduct of a normal form is a normal form (par-redn-bnorm-is-bnorm)
Any reduct of a normal form alpha-converts with that normal form
(par-redn-bnorm-is-alpha-conv)
Hence, by Church-Rosser, normal forms of a term are unique up to
alpha-conversion (nf-unique). Since ff
, the converse also holds
(nf-alpha-class)
Thus the class of normal forms of a ( Vclosed ) term is either empty or
exactly an alpha-conversion equivalence class.
Deciding conversion Conversion is decidable for normalizing terms.
The proof of this depends on Church-Rosser; since normal forms are
unique only up to alpha-conversion, it also depends on decidability of
alpha-conversion (Section 3.1.2).
3.4 The Standardization Theorem
Our work on type-checking requires us to go beyond theorems such
as Church-Rosser in the analysis of reduction. In particular, to talk
of syntax-directed systems, we must consider deterministic reduction
relations, of which weak-head reduction is the simplest. A typical
A !wh A 0
Table
3: One step of weak-head reduction
property required of such a relation is the following counterpart to the
quasi-normalisation theorem (wh standardisation lemma):
Takahashi showed how to approach such theorems with an analysis of
parallel reduction into head reduction followed by internal reduction, a
so-called semi-standardization lemma [Mit79]. We adapted her methods
to the case of weak-head reduction, and the corresponding modified
notion of internal reduction. In doing so we simplify them somewhat,
in particular by removing the need for the complex invariant M ? N .
Moreover, the arguments we employed can be replicated in the context
of head reduction and internal reduction in their classical senses.
Recently, we rounded off this line of development by proving a standardization
theorem for pure languages. The main novelty here is the
removal of any mention of residuals (so the reader may be unconvinced
that we have formalised the standardization theorem). The other thing
to observe is that all the desirable consequences of standardization,
which we required to analyse type-checking, such as the lemma above,
are already corollaries to the semi-standardization lemma.
There are three main ingredients to the theorem: weak-head reduc-
tion, internal parallel reduction, and standard reduction itself.
3.4.1 Weak-head reduction
One step of weak-head reduction (wh red1) is shown in Table 3. By
inversion, we see that there are no weak-head reducts of a lambda, so
we may assume without loss of generality that A is not a lambda in the
rule wh1-app. We have not built any Vclosed assumptions into the
definition, as this will always be used in a context in which all terms
are Vclosed .
The reader may validate such a definition by considering the weak-
head normal forms (Table 4), and various lemmas relating !wh and
wh-atom whnf(ff) ff 2 PP [ SS
wh-bind
A is not a lambda
Table
4: Weak-head normal forms
ip1-atom ff![
ip1-bind
Table
5: One step of internal parallel reduction
whnf (wh red1 determin, wh nf is nf1, alpha conv resp wh nf).
Many-step weak-head reduction, iwh , (wh redn) is defined as
the reflexive transitive closure of !wh . It is closed under renam-
ings, substitution (psub resp wh redn), and application on the right
3.4.2 Internal parallel reduction
The classical notion of head reduction leads to a notion of "internal"
redex, as any non-head redex. We adapt such a notion to weak-head re-
duction, which gives us the definition of internal parallel reduction, ![
(ipar red1) as shown in Table 5. We allow arbitrary parallel reduction
in each compound term, except in the rator position of applications,
where we restrict to internal reduction.
It is immediate by structural induction that internal parallel reductions
are parallel reductions. We also have the important abstract
property (ipar red1 refl wh nf) that ![
preserves and reflects weak-
head normal forms, and a fortiori , the shape (outermost constructor)
of a term. This reflection of weak-head normal forms, together with
the lemma below, is the key to the proof of the quasi-normalisation
result with which we opened this discussion.
Semi-standardization (par red1 wh redn ipar red1)
Proof. The proof proceeds by induction on M![
. The only tricky
case is that of the parallel fi step. By inductive hypothesis, we obtain
(introducing Skolem constants Aw ; Bw )
and we are required to show that there exists some Mw such that
Since
by psub resp wh redn and psub is vsub alpha, we may conclude the
result by stitching weak-head reduction sequences together, provided
we can establish the following claim, which is the easy base case of
Lemma 2.4 in [Tak95] (wh ipar red1 psub):
This is proved in the same way as we showed closure of parallel reduction
under substitution, by induction on M![
. A detail to observe
here is that we must explicitly assume that the reduction from N to
N 0 is parallel. Takahashi builds this into her ? invariant, whereas in
the use of wh ipar red1 psub, we obtain this assumption for free as
the premise associated with reduction in A .
We show the case of an application
and B![
. By induction hypothesis, there exists some PA such
that [N=p]A iwh PA![
. The proof of the claim, and hence
of the whole lemma, is completed by taking P= def PA ( [N=p]B ) ,
and appealing once more to psub resp wh redn, ipar red1 app and
par red1 psub.
To establish the full semi-standardization result for !
, we must
also show the commutation result (ipar wh redn commutes):
This is a corollary (by induction on Mw iwh M 0 ) of the following
lemma (ipar wh red1 commutes):
Proof. Induction on M![
of the ancillary hypothesis
All cases are trivial, except that of application
. We show
the case of a wh-redex, where we have:
and We use the fact that ipar red1 reflects the
weak-head normal form A to infer that A = [u:U ]A 000 .
Moreover, since A![
by inversion that U![
V and
8p: [p=u]A 000 ![
[p=v]A 00 . Choosing p 62 A 00 ; p 62 A 000 , and applying
pr1-sub, we obtain [B=u]A 000 ![
Now we appeal to
Lemma 3.4.2, finally to conclude that for some P , we have
as required.
Throughout we used induction on the definitions of the various reduction
relations to establish these lemmas. This is by contrast with
Takahashi's treatment, where induction is on the term structure (with
inversion of the relational hypotheses). This leads to slightly weaker
arguments, and consequently to the need for stronger inductive in-
variants. Such refinements to these arguments would be inconceivable
without machine support.
3.4.3 Standard Reduction
The property of being a standard reduction, \Gamma! s , is usually stated
(e.g. by Mitschke [Mit79]) in terms of a highly intensional geometric
definition on -terms. To formalise this definition directly, we would
have to enrich the datatype of terms in order to be able to speak of
std-atom ff\Gamma! s ff ff 2 PP [ SS
std-bind
std-app
std-wh
Table
Standard reduction, standard (adapted from Plotkin)
redex positions in a term. Such an approach has been taken in [Hue94];
we have chosen instead a presentation (table 6), adapted from Plotkin's
notion of standard sequence [Plo75]. The essence of this presentation
is to define standard reduction as the least congruence closed under
prefixing by weak-head reductions. We leave implicit the sequence
of redexes contracted, as this may be computed by recursion, and its
"left-to-right" character, and thus avoid mention of residuals or redex
positions.
Remark 3.3 We have defined standard reductions of arbitrary length
once and for all, and without any considerations of reduction to normal
note furthermore, however, that we may easily achieve this end
by adding the side condition A 0 6= - to the std-app rule, and whnf(B)
to the std-wh rule. Also, this definition is both strongly closed under
ff -conversion, and strongly full.
Our final aim is the following standardization theorem
(the standardisation lemma):
Induction on A !
suffices if we can show that our notion of standard
reduction absorbs single steps of parallel reduction:
By our Lemma 3.4.2, and std-wh, it suffices to prove the following
lemma, that standard reduction absorbs single steps of internal parallel
reduction (standard absorbs ipar red1):
Proof. The proof is by induction on B \Gamma! s C . This avoids reconsidering
the tricky application case of the commutation lemma above, and
we may exploit the fact
preserves and reflects the shape of
terms. The price we pay is the need for strong induction on B \Gamma! s C ,
as the ancillary hypothesis A![
then an expansion step. In each
non-atomic case, we make a subsidiary appeal to semi-standardization,
in order to be able to exploit the induction hypotheses. This gives a
rather mechanical and "abstract nonsense" flavour to the argument,
emphasising once more that the real complexity lies in the the proof of
Lemma 3.4.2.
We focus on the case of a binder, where we have as hypotheses:
By inversion of H, we conclude that
A
and 8p: [p=w]B c ![
[p=u]B . But now by semi-standardization,
A c iwh Aw![
. So by induction
hypothesis ihA, we have Aw \Gamma! s A 0 , and using std-wh to fold back the
reductions A c iwh Aw , we finally obtain A c \Gamma! s A 0 . In exactly
the same way, modulo the choice of a parameter
we obtain [p=w]B c \Gamma! s [p=v]B 0 . But now C \Gamma! s hv:A 0 iB 0 by construction
This concludes the proof that standard reduction absorbs internal
reduction, and hence parallel reduction, and so finally we may conclude
that every (parallel) fi -reduction sequence may be standardized.
4 Pure Type Systems
PTS is a class of type theories given by a set of derivation rules (table 7)
parameterized by a PL , (PP; VV; SS) , and by two relations
informally as ax(s 1 :s 2 )
Start
Weak
Lda
App
Table
7: The Typing Rules of PTS (formal name gts)
ffl rules, rl ' SS \Theta SS \Theta SS , written informally as rl(s
We usually intend ax and rl to be decidable, but this assumption is
not used in the basic theory of PTS . When we are interested in algorithms
for typechecking ([Pol94b, Pol95]), even stronger assumptions
about decidability are needed.
The typing judgement has the shape meaning that in
has type A . (The formal name of this relation
is gts, from the old name "Generalized Type Systems".) We call M
(or (\Gamma; M) ) the subject and A the predicate of judgement. Contexts,
ranged over by \Gamma , \Delta , bind parameters to types:
Contexts are formalized as lists over PP \Theta Trm . If \Gamma participates in
some derivable judgement,
4.1 A Generalization: Abstract Conversion
We have further generalized PTS by parameterizing the rules of table
7 on another relation, - (called abstract conversion), occurring
in the side condition of rule tConv. In conventional presentations of
PTS [Bar92], the actual relation of beta-conversion ( ' ) is used for - .
There are several reasons to be interested in parameterizing PTS
on its conversion relation. For one thing, the type theory ECC, implemented
in LEGO, is not actually a PTS because it uses a generalized
notion of conversion called cumulativity. ECC is of special interest to
us, so we formalize an extension of PTS which includes ECC. Our formal
development includes a typechecking algorithm for ECC [Pol94b].
Even for PTS , there is a notorious open problem, the Expansion Postponement
problem [vBJMP94, Pol94b], which asks if the conversion
relation in table 7 can be replaced by beta-reduction without changing
the typability of any terms. We know of one other work on PTS using
an abstract conversion relation: [BM].
The only properties of - necessary to prove the substitution lemma
(section 5.4) are reflexivity, transitivity, and invariance under substitution
cnv trans 8A;
To prove the subject reduction theorem (section 5.5), we finally need
that conversion is related to contraction of redexes, and has an "inter-
nal" Church-Rosser property:
Notice the contravariance in the last property. It is easy to prove that
' has these properties, so we can formally instantiate - by ' (or by
the cumulativity of ECC) and discharge all these assumptions; we are
working abstractly, not making assumptions.
' is an equivalence relation, but - is a partial order (which is why
we use an asymmetric symbol for - ). Other significant properties of
' that do not generally hold for - include:
Some differences between abstract-conversion- PTS and fi -conversion-
are detailed in [Pol94b]. This kind of analysis, of which properties
are actually used in some body of work, is greatly aided by formalization
4.2 Are the rules a formalization of PTS?
Leaving aside abstract conversion, the rules of table 7 differ from the
standard informal presentation [Bar92] in several ways. First, the handling
of parameters and variables in the Pi and Lda rules, is similar
to that in the rules of table 2. Other differences are restriction of
weakening to atomic subjects, and the Lda rule.
Binding and substitution The treatment of operating under
binders in table 7 is analogous to that in the reduction relations considered
above. (See discussion of the rule Lda below.) As the substitution
used in rule App may cause capture of variables, we must show that
N is Vclosed . In fact we have (gts Vclosed lem)
by structural induction. It also follows easily that a Valid context is
Vclosed in an obvious sense.
Atomic Weakening The standard presentation of weakening in
PTS allows any term as subject
(weakening)
where we restrict to atomic terms, ff (see rule Weak). Our rules
derive the same judgements (weakening is seen to be admissible in section
5.3), but allow fewer derivations (those derivations where weakening
is pushed to the leaves). This gives a cleaner meta theory, as
induction over derivations treats fewer cases. For example, given a
with an application as its subject, there
is no confusion whether it is derived by App or Weak. Thus, with
atomic weakening, any judgement may only be derived by tConv or
by exactly one of the remaining rules.
The Lambda Rule For the rule for typing a lambda in informal
presentations [Bar92, Geu93] is
The conventional understanding is that the bound variable, x , doesn't
really occur in the conclusion of rule - , as the notations "
refer to alpha-equivalence classes 8 . Thus, in concrete
notation, the subject and predicate of the lambda rule may bind different
variables, which we formalize in our rule Lda. One might, instead,
rule - as
This was our first attempt, and surprisingly, this system derives the
same judgements as the system of table 7 (lemmas rlts gts and
gts rlts). However, using Lda', the subject reduction theorem is
difficult to prove, and derivations are distorted by the need to use the
conversion rule for alpha-conversion. See [Pol94b] for more details.
5 PTS With Abstract Conversion
We survey the development leading to the subject reduction theo-
rem. The main difference between this section and the presentation
in [Bar92] is our use of the atomic weakening rules (section 4.2), and
our simpler proof of subject reduction (section 5.5).
5.1 Some basic facts
Here is a sample of the many small facts that had to be established,
usually by simple structural induction.
Parameter lemmas All parameter occurrences in a judgement are
bound in the context, and the binding instances in a Valid context are
distinct parameters:
(free params lem1)
8 However, in the left premise of rule - , all free instances of the actual symbol
are intended to refer to the context entry [x:A] . Thus the
conventional reading of this rule doesn't make sense as concrete notation.
Start Lemmas Every axiom is derivable in every valid context, and
the global bindings of a valid context are all derivable:
5.2 A Better induction principle for PTS
As for previous relations, we define an alternative typing relation, ' a
(apts), that identifies all those derivations of each ' judgement that
are inessentially different because of parameters occurring in the derivation
but not in its conclusion. ' a
differs from ' only in the right
premise of the Pi rule and the left premise of the Lda rule.
aLda
In these premises we avoid choosing a particular parameter by requiring
the premise to hold for all parameters for which there is no reason it
should not hold, that is, for all "sufficiently fresh" parameters. As
before, we will show that ' and ' a
derive the same judgements.
It is interesting to compare the side conditions of Pi with those of
aPi. In Pi we need the side condition p 62 B so that no unintended
occurrences of p (i.e. those not arising from occurrences of the variable
x ) are bound in the right premise; we do not need p because the
validity of \Gamma[p:A] is obvious from the right premise. In aPi, we cannot
require the right premise for all p , but only for those such that \Gamma[p:A]
remains valid, i.e. those p not occurring in \Gamma . However the condition
not required because of "genericity", that is, the right premise
of aPi must hold for the infinitely many parameters not occurring in
only finitely many of these instances can occur in B .
5.2.1 ' a
is equivalent to '
As with previous relations, this equivalence will give us a stronger induction
principle, and stronger generation (inversion) lemmas for ' .
(apts gts; gts apts)
Proof. Direction ) is straightfoward by structural induction on
To prove direction ( , first prove a lemma that bijective renamings
respect ' a
(bij ren resp apts)
by ' a
-structural induction 9 .
Now we proceed to prove
by structural
induction on a derivation of All cases are trivial except
for the rules Pi and Lda. Consider the case for Pi: we must prove
under the assumptions
l prem
prem
By rule aPi (using l ih) it suffices to show \Gamma[r:A] ' a
arbitrary parameter r 62 \Gamma . Thus, using the free parameter lemmas of
section 5.1, we know
A from l prem and noccG
prem
prem
Taking
derivable using bij-ren-resp-apts to rename r ih. (Recall from section
2.5 that swap(p; q) is always bijective.) Thus we are finished if we
can show
It is clear that the first equation holds from nopG, noccG, norA and
nopA. For the second equation, notice that if then we are done
trivially, so assume r 6= p , and hence r 62 [p=n]B (from r prem and
noccG). Now, using vsub renTrm commutes (section 2.5) we have
9 Actually injectivity of a renaming is enough for it to preserve ' a , but we cannot
prove this until after we know ' a = ' .
as required.
5.3 The Thinning Lemma and Weakening
The Thinning Lemma is important to our formulation because it shows
that full weakening (weakening) is admissible in our system, justifying
our use of atomic weakening in the definition of ' (section 4.2).
The subcontext relation is defined
We also say \Delta extends \Gamma . This is the definition used informally
in [Bar92, GN91, vBJ93]; a much more complicated definition is required
to express this property in a representation using de Bruijn
indices for global variables. Now we can state (thinning lemma):
A naive attempt to prove the thinning lemma by structural induction
encounters serious difficulties with parameter side conditions
(see [MP93, Pol94b] for discussion), but a proof is straightfoward
using ' a
-induction, justified by the previous section. The full weakening
rule is a corollary of thinning lemma.
5.4 Cut and type correctness
The substitution lemma
(substitution lemma)
is proved by induction on the derivation of \Gamma[p : From
this we get the commonly used case (cut rule) by instantiating \Delta to
the empty context.
Among the correctness criteria for type systems is that every type is
itself well formed. In PTS we have the theorem (type correctness):
The proof is by structural induction; the only non-trivial case is rule
App, which uses the substitution lemma and vsub-is-psub-alpha
(section 2.3).
Subject Reduction Theorem: Closure Under Reductio
An important property of type systems is that a term does not lose
types under reduction, thus types are a classification of terms preserved
by computation. In fact we will show entire ' -judgements are closed
under reduction. We now need all five properties of abstract conversion
(section 4.1).
5.5.1 Non-Overlapping Reduction
Our goal is to prove
usually called the subject reduction theorem. Our naive strategy is
to show that one step of reduction preserves typing, by induction on
. The critical case is rule App, when the application is
actually a redex that is contracted. In order to simplify that case,
we want to avoid overlapping redexes, as allowed in the fi -rule of ![
We want some reduction relation with no overlapping, whose transitive
closure is equal to !
Another difficulty is that in rules Pi and Lda, a subterm of the
subject of the conclusion (the type-label) appears in the context part
of a premise; thus in these cases of an induction argument, a reduction
in the subject of the conclusion may result in a reduction in the context
of a premise. This suggests that the induction hypothesis should be
strengthened to simultaneously treat reduction in the context and the
subject, leading to the goal
where ! is ordinary one-step fi -reduction. This approach is used
in [GN91, Bar92], and produces a large number of case distinctions,
based on which subterm of the subject contains the one redex which
is contracted; all of these subcases are inessential except to isolate
the one non-trivial case where the redex contracted is the application
constructed by rule App. This simultaneous treatment of one reduction
in either the context or the subject suggested to us that the proof would
be smoother using a reduction relation that is congruent simultaneously
in all branches, while forbidding overlapping of redexes. One step non-overlapping
reduction, no
(no red1), is defined by the same rules as ![
(table 2) except for the fi -rule, which is modified to prevent overlapping
redexes:
nor1-beta ( [u:U ]B ) A no
no
, so from the assumed property cnv conv (section 4.1),
we have
A no
We extend no
compositionally to contexts (red1Cxt), and to
pairs of a context and a term (red1Subj), writing \Gamma no
h\Gamma; Mi no
We also define no
(no redn), the transitive closure
of no
, and show no
(no par redn, par no redn).
5.5.2 The Main Lemma (subject reduction lem)
Proof. By structural induction on We show the interesting
case, from rule App. Given
l prem
prem
red
we must show . By induction hypotheses
By type correctness of gtsDM, for some s
By the pi-generation lemma, for some s 2 and p 62 B
By the cut rule on gtsDL and gtsDB (we also use vsub-is-psub-alpha
(section 2.3) here, and several more times in this case)
Now there are two subcases
!M 0 and L no
The goal is rule App and the induction hypotheses
we easily have Use rule tCnv and gts-
DBsub to expand L 0 in the predicate back to L as required (this uses
cnv-conv).
The goal is
by the lambda-generation lemma, for some w , B 0 and s 0
By (cnvCR-pi c') (this is the only time it is used in this proof)
By a generation lemma on gtsDpi'
By (tCnv cnvA gtsDL gtsDA')
By tCnv, cnvB and gtsDBsub, it suffices to show
which follows by cut on gtsDL' and gtsDb.
5.5.3 Closure Under Reduction
It is now easy to show the subject reduction theorem, gtsSR, and a
useful corollary, predicate reduction
Finally, extending !
compositionally to contexts 10 , ' is closed under
beta-reduction (gtsAllRed)
This relation is equivalent to transitively closing the compositional extension of
of no
! to contexts.
There is a trivial but useful lemma (predicate conv):
Unlike rule tCnv, we don't ask for evidence that s has a type, but the
side condition uses ' , not - . To prove such a lemma with - requires
technical restrictions; e.g. ECC with its type hierarchy chopped off a
finite level fails to have such a property because of the sort at the top
of the hierarchy.
Closure Under Alpha-Conversion From gtsAllRed and the fact
that ff
, it follows that ' judgements are preserved by ff
(gts alpha closed). Hence an implementation may typecheck a
judgement as stated by a user, rather than searching for an alpha-
equivalent judgement which is derivable. See [Pol94b, Pol94a].
5.6 Another Presentations of PTS
In several rules of ' the context \Gamma occurs more then once in the list
of premises; in order to build a complete derivation, \Gamma must be constructed
(by Start and Weak) in each branch in which it appears. It
is much more efficient to assume that we start with a valid context, and
only check that when rules extend the context (i.e. the right premise
of Pi and the left premise of Lda) they maintain validity. This is more
in keeping with implementations which are actually used, where we
work in a "current context" of mathematical assumptions. We present
such a system in table 8, and show it is equivalent to ' . The idea is
originally due to Martin-L-of [Mar71], and is used in [Hue89].
This system has two judgements, a type judgment of shape
(lvtyp), and a validity judgement of shape \Gamma ' lv
(lvcxt).
Note that they are not mutually inductive: validity depends on typing,
but not conversely.
We have proved that ' lv
characterizes ' (iff gts lvcxt lvtyp):
Direction ( of the proof is subtle. Formally, it uses an auxiliary
mutual inductive definition, and a well-founded induction requiring dependent
elimination; this is the only place in the entire development
that either mutual induction or dependent elimination are used. More
abstractly, direction ( claims termination of a function that replaces
all the proof annotations omitted by ' lv
. As this is a fast-growing
function, its termination is a strong result. The proof is described
in [Pol94b].
lvLda
lvCons
Table
8: The system of locally valid contexts (lvtyp, lvcxt)
6 PTS with fi -conversion
It is remarkable how little about - has been needed for the theory
described so far (section 4.1). In [Pol94b] we pursue the theory of
PTS with abstract conversion to a correct typechecking algorithm for
cumulative PTS , including Luo's system ECC. Here, we point out a
more standard theory of PTS with fi -conversion, i.e. we instantiate -
in the preceeding with the actual relation ' . (In LEGO the command
Cut executes the admissible rule substitution lemma of section 5.4.)
This theory, leading to the strengthening theorem and typechecking
algorithms for classes of PTS , is detailed in [vBJMP94].
6.1 Strengthening
Strengthening is a tricky result about PTS , first proved by Jut-
ting [vBJ93]:
\Gamma[q:C
(gts strengthening)
The development we formalize, in which strengthening is a corollary to
work on typechecking, is described in detail in [vBJMP94]. We were
particularly interested to prove strengthening because LEGO uses it in
the Discharge command.
6.2 Functional PTS
Functional PTS are well behaved and are, perhaps, the only ones that
are interesting in practice.
Functional ,
ae
In a functional PTS , ax and rl are the graphs of partial functions,
but we do not necessarily have procedures to compute these functions.
Uniqueness of Types The definition of functional PTS makes sense
for abstract-conversion PTS , and is useful in that setting, as it gives a
kind of uniqueness: when building a derivation of a typing judgement
guided by the syntax of its subject, it is deterministic which axiom
to use at each instance of Ax, and which rule to use at each instance
of Pi [Pol94b]. The idea behind the definition of functional is that
the uniqueness just mentioned propagates through whole derivations
to give a property that types are unique up to conversion:
conv unique types ,
For fi -conversion PTS we prove
Functional ) conv unique types (types unicity)
by structural induction on
However, this proof uses properties of ' , and cannot be modified
to prove any similar property of abstract-conversion PTS .
types unicity is too linear for - , which is only a partial order; the
correct generalization is a principal types lemma, saying that any type
is above some principal type, but we cannot hope that every two types
are comparable [Pol94b].
Subject Expansion Any fi - PTS with uniqueness of types also has
a subject expansion property (subject expansion):
conv unique types )
While subject reduction says that terms don't lose types under reduc-
tion, this lemma says terms don't gain types under reduction. In this
A is the principal premise, and is a well-formedness
premise. There are examples of two different ways subject
expansion can fail for non-functional PTS in [vBJMP94].
--R
A formalization of the strong normalization proof for System F in LEGO.
Lambda calculi with types.
Coq en Coq.
Type Dependence and Constructive Mathemat- ics
On the subject reduction property for algebraic type systems.
F-sub, the system.
An algorithm for testing conversion in type theory.
Combinator shared reduction and infinite objects in type theory.
An algorithm for type-checking dependent types
Towards checking proof checkers.
On Girard's
The Collected Papers of Gerhard Gentzen.
Logics and Type Systems.
Five axioms of alpha con- version
A modular proof of strong normalization for the calculus of constructions.
The constructive engine.
Residual theory in
Incremental changes in LEGO:
Introduction to Metamathematics.
LEGO proof development sys- tem: User's manual. Technical Report ECS-LFCS-92-211, LFCS, Computer Science Dept., University of Edinburgh, The King's Buildings
Program specification and data refinement in type theory.
Computation and Reasoning: A Type Theory for Computer Science.
Per Martin-L-of
Inverting inductively defined predicates in LEGO.
The standardisation theorem for
Pure Type Systems for- malized
More Church-Rosser proofs (in isabelle/hol)
Coding binding and substitution explicitly in Is- abelle
A proof of the Church-Rosser theorem and its representation in a logical framework
Closure under alpha-conversion
The Theory of LEGO: A Proof Checker for the Extended Calculus of Constructions.
A verified typechecker.
How to believe a machine-checked proof
Natural Deduction
Program Verification in Synthetic Domain The- ory
Synthetic domain theory in type theory: Another logic of computable functions.
Theory of symbolic expressions
Auxiliary variables and recursive procedures.
A mechanical proof of the Church-Rosser theorem
Substitution revisited.
Parallel reductions in
Formulation of Martin-L-of's theory of types with explicit substitutions. Master's thesis
--TR
--CTR
Michael Norrish, Mechanising Hankin and Barendregt using the Gordon-Melham axioms, Proceedings of the ACM SIGPLAN workshop on Mechanized reasoning about languages with variable binding, p.1-7, August 26, 2003, Uppsala, Sweden
Christian Urban , Michael Norrish, A formal treatment of the barendregt variable convention in rule inductions, Proceedings of the 3rd ACM SIGPLAN workshop on Mechanized reasoning about languages with variable binding, p.25-32, September 30-30, 2005, Tallinn, Estonia
Yasuhiko Minamide , Koji Okuma, Verifying CPS transformations in Isabelle/HOL, Proceedings of the ACM SIGPLAN workshop on Mechanized reasoning about languages with variable binding, p.1-8, August 26, 2003, Uppsala, Sweden
Michael Norrish, Mechanising -calculus using a classical first order theory of terms with permutations, Higher-Order and Symbolic Computation, v.19 n.2-3, p.169-195, September 2006
S. J. Ambler , R. L. Crole , Alberto Momigliano, A definitional approach to primitivexs recursion over higher order abstract syntax, Proceedings of the ACM SIGPLAN workshop on Mechanized reasoning about languages with variable binding, p.1-11, August 26, 2003, Uppsala, Sweden
Dimitri Hendriks, Proof Reflection in Coq, Journal of Automated Reasoning, v.29 n.3-4, p.277-307, 2002
Jonathan Ford , Ian A. Mason, Formal Foundations of Operational Semantics, Higher-Order and Symbolic Computation, v.16 n.3, p.161-202, September
Conor McBride , James McKinna, Functional pearl: i am not a number--i am a free variable, Proceedings of the 2004 ACM SIGPLAN workshop on Haskell, September 22-22, 2004, Snowbird, Utah, USA
James Cheney, Scrap your nameplate: (functional pearl), ACM SIGPLAN Notices, v.40 n.9, September 2005
Thierry Coquand , Randy Pollack , Makoto Takeyama, A Logical Framework with Dependently Typed Records, Fundamenta Informaticae, v.65 n.1-2, p.113-134, January 2005
Ren Vestergaard , James Brotherston, A formalised first-order confluence proof for the -calculus using one-sorted variable names, Information and Computation, v.183 n.2, p.212-244, 15 June
Andrew M. Pitts, Nominal logic, a first order theory of names and binding, Information and Computation, v.186 n.2, p.165-193, 01 November
Conor McBride , James McKinna, The view from the left, Journal of Functional Programming, v.14 n.1, p.69-111, January 2004
Riccardo Pucella, SIGACT news logic column 14, ACM SIGACT News, v.36 n.4, December 2005 | type theory;LEGO proof checker;formal mathematics;lambda calculus;Pure Type Systems |
594296 | New Worst-Case Upper Bounds for SAT. | In 1980 Monien and Speckenmeyer proved that satisfiability of a propositional formula consisting of i>K clauses (of arbitrary length) can be checked in time of the order 2i>K / 3. Recently Kullmann and Luckhardt proved the worst-case upper bound 2i>L / 9, where i>L is the length of the input formula. The algorithms leading to these bounds are based on the i>splitting method, which goes back to the DavisPutnam procedure. i>Transformation rules (pure literal elimination, unit propagation, etc.) constitute a substantial part of this method. In this paper we present a new transformation rule and two algorithms using this rule. We prove that these algorithms have the worst-case upper bounds 20. 30897 i>K and 20. 10299 i>L, respectively. | Introduction
.
SAT (the problem of satisability of a propositional formula in conjunctive normal
can be easily solved in time of the order 2 N , where N is the number of variables in the
input formula. In the early 1980s this trivial bound was reduced for formulas in 3-CNF by
Monien and Speckenmeyer [20] (see also [22]) and independently by Dantsin [1] (see also
[4] and [2]). After that, many upper bounds for SAT and its subproblems were obtained
[21, 17, 25, 13, 14, 26, 16, 8, 23, 24]. Most authors consider bounds w.r.t. three main
parameters: the length L of the input formula, the number K of its clauses and the number
N of the variables occurring in it. Before the conference proceedings version of this paper
[9], the best known worst-case upper bounds for SAT were:
p(L)2 L=9 [16],
p(L)2 K=3 [21] (see also [16]),
where p is a polynomial. Also, the upper bound p(L)2 L=4 for satisability problem for general
Boolean formulas (i.e., not necessarily in CNF) is known [28]. Recently Paturi, Pudlak, Saks
and Zane [24] proved that 3-SAT is checkable in the randomized time O(2 0:446N ), but it is still
Some of the work described in this paper was presented at the 9th ACM-SIAM Symposium on Discrete
Algorithms (SODA'98) [9].
y Steklov Institute of Mathematics at St.Petersburg, 27 Fontanka, 191011 St.Petersburg, Russia.
Email: hirsch@pdmi.ras.ru, URL: http://logic.pdmi.ras.ru/~hirsch/index.html. Supported in
part by grants from INTAS and RFBR.
unknown whether the trivial upper bound 2 N for the general SAT problem can be improved.
Kullmann and Luckhardt in [16] simplied the algorithm of Monien and Speckenmeyer from
[21] and presented also an improved algorithm of the same complexity p(L)2 K=3 which works
better when the ratio of the number of clauses to the number of variables is greater than
2:64557. In the conference proceedings version of this paper [9] we presented two algorithms
which improve the bounds p(L)2 to
p(L)2 0:30897K and p(L)2 0:10537L respectively. In this journal version we improve the second
algorithm and prove the worst-case upper bound p(L)2 0:10299L . Our new algorithm uses the
p(L)2 0:30897K -time algorithm as a subroutine; the proof of the corresponding upper bound is
much simpler than the proof in the conference proceedings version [9].
The most popular methods for solving SAT are the local search method and the splitting
method . Many experimental and average-case results show the signicant power of the local
search method (for references, see the survey [7]). However, most best known worst-case
upper bounds for SAT and its NP-complete subproblems are obtained using the splitting
method [21, 16, 8] (for worst-case upper bounds for the local search method see [10, 11,
12]). The splitting method is also useful in proving worst-case upper bounds for exact and
approximate MAXSAT solving [18, 3, 19].
The splitting method goes back to the Davis{Putnam procedure [6]. Let l be a literal
occurring in a formula F . Let F [l] be the formula obtained from F by assigning the value
T rue to the literal l, i.e. by removing all clauses containing l and deleting all occurrences of
l from the other clauses. In short, the main idea of the Davis{Putnam procedure is that F is
satisable i at least one of the formulas F [l] and F [ l ] is satisable. In a wider sense [5], a
splitting algorithm constructs a tree by reducing satisability of a formula F to satisability
of several formulas F [I 1 ]; F [I obtained from F by assignments I 1 ; I
spectively. Then, a splitting algorithm simplies each of the formulas F [I 1 ]; F [I
according to transformation rules which do not change their satisability. These transformations
take a polynomial time. Their role is to reduce some of the parameters L, K or
N of the formulas F [I 1 ]; F [I and to simplify these formulas by eliminating pure
literals (a literal is pure if its negation does not occur in the formula), 1-clauses (1-clause is
a clause consisting of one literal) and other \easy pieces".
Recurrent equations are often used in complexity analysis of algorithms. Kullmann and
Luckhardt in [16] described a very similar, but simpler technique which is very useful in the
estimation of the running time of splitting algorithms. One can consider an execution of
a splitting algorithm as a branching tree, i.e. a tree such that formulas labelling children
are simpler than formulas labelling parents (leaves are labelled with the simplest formulas).
With each node of this tree we associate a branching vector of non-negative numbers and
a polynomial constructed from this vector. One can estimate the number of leaves in the
tree using the largest of the positive roots of these polynomials. Precise denitions and
formulations are given in Sect. 3.
Transformation rules play an important role in splitting algorithms. Two simplest rules
were proposed in the original paper of Davis and Putnam [6]: we can eliminate pure literals
and 1-clauses. All transformation rules we use are described in Sect. 4. This paper introduces
a new transformation rule which goes up to the following simple observation: if each clause
of our formula contains at least one negative literal, then this formula is trivially satisable
by the assignment in which all variables have the value F alse. Let P (l; F ) be a property of
a literal and a formula, for example, \F contains exactly two occurrences of l and at least
three occurrences of l ". In addition, we suppose that for each variable v in the formula F
at most one of the literals v and v satises P . Given F , the literals that satisfy the property
P will be referred as P -literals.
The black and white literals principle. Let F be a formula in CNF. At least
one of the following two alternatives holds.
(1) There is a clause in F that contains a P -literal and does not contain the
negations of any other P -literals.
(2) Satisability of F is equivalent to satisability of the formula obtained
from F by removing all clauses containing the negations of P -literals.
A formal proof of the black and white literals principle is given in Lemma 4.3. Figure 1
illustrates this principle. White circles (-) denote P -literals, black circles () denote their
negations, circles with dots (-) denote other literals (i.e., literals which are neither P -literals
nor the negations of P -literals; note that the negation of such literal is again neither P -literal
nor the negation of a P -literal). Columns correspond to clauses of the formula. The gure
contains two formulas, the rst one satises the condition (1), the second one satises the
condition (2).
(1)
| {z }
(2)
@
@
@
@
@
Figure
1: Two alternatives of the black and white literals principle.
This principle is the key point of our algorithm corresponding to the upper bound p(L)2 0:30897K :
In this algorithm we use the presence of clauses that contain a P -literal and do not contain
the negations of other P -literals for a certain property P . The black and white literals principle
is a kind of insurance: it guarantees that if we cannot nd a required clause, then we
can replace F by a simpler formula, or F does not contain any P -literals at all. This principle
is one of re-formulations of the following simple property: for any partial assignment A
(i.e., a set of literals which does not contain simultaneously x and x for any variable x) for
a formula F in CNF, either there is a clause in F containing only literals from A, or setting
the values of all these literals to F alse does not change the satisability of F .
Another known re-formulations of this property are the generalized sign principle [16] and
the autarkness principle [20, 22, 17] (see also [16]). A comprehensive study of the autarkness
principle can be found in [15].
The use of the black and white literals principle leads to two new bounds for SAT presented
in this paper and also to several upper bounds for the satisability problem for
formulas in CNF{(1,1) [8] (a formula is in CNF{(1,1) if each literal occurs in it positively
at most once; the satisability problem for these formulas is NP-complete).
In Sect. 2 we give basic denitions. Section 3 contains the technique that allows us to
estimate the size of a branching tree. In Sect. 4 we explain transformation rules that we
use in our algorithms. In Sect. 5 and Sect. 6 we describe the algorithms having the upper
bounds p(L)2 0:30897K and p(L)2 0:10299L respectively, and the corresponding proofs.
2 Basic denitions.
Let V be a set of Boolean variables. The negation of a variable v is denoted by v. Given a
set U , we denote Ug. Literals are the members of the set Positive
literals are the members of the set V . Negative literals are their negations. If w denotes
a negative literal v, then w denotes the variable v. A clause is a nite set of literals that
does not contain simultaneously any variable together with its negation. The empty clause
is interpreted as F alse. A formula in CNF (CNF-formula) is a nite set of clauses. The
empty formula is interpreted as T rue. The length of a clause is its cardinality, the length of
a formula is the sum of the lengths of all its clauses. The length of a clause C is denoted by
jCj. A k-clause is a clause of the length k. A k + -clause is a clause of the length at least k.
A k -clause is a clause of the length at most k. If we say that a literal v occurs in a clause
or in a formula, we mean that this clause or this formula contains the literal v. However, if
we say that a variable v occurs in a clause or in a formula, we mean that this clause or this
formula contains the literal v, or it contains the literal v.
An assignment is a nite subset of W that does not contain any variable together with
its negation. Informally speaking, if an assignment I contains a literal w, it means that w
has the value T rue in I. To obtain F [I] from F and an assignment I
remove from F all clauses containing the literals w i ,
delete all occurrences of the literals w i from the other clauses.
For short, we write F [w
An assignment I is satisfying for a formula F if F [I] is the empty formula. A formula is
satisable if there exists a satisfying assignment for it. We say that two formulas F and G
are equi-satisable if both are satisable, or both are unsatisable.
Let w be a literal occurring in a formula F . This literal is a i-literal if F contains exactly
i occurrences of w. It is a (i;j)-literal if F contains exactly i occurrences of w and exactly j
occurrences of w. It is a (i;j + )-literal if F contains exactly i occurrences of w and at least j
occurrences of w. It is a (i;j )-literal if F contains exactly i occurrences of w and at most
occurrences of w. Similarly, we dene (i
We denote the number of occurrences of a literal w in a formula F by #w
the sum of the lengths of the clauses containing w by }w When the meaning of F is
clear from the context, we omit F . A literal w is a }i-literal if Similarly, we dene
3 Estimation of the size of a branching tree.
Kullmann and Luckhardt introduced in [16] a notion of a branching tree. It is intended for
estimating the time complexity of splitting algorithms, since a tree of formulas which such an
algorithm splits, is a branching tree. One can consider an execution of a splitting algorithm
as a tree whose nodes are labelled with CNF-formulas such that if some node is labelled with
a CNF-formula F , then its sons are labelled with (simplied) formulas F [I 1 ]; F [I 2 ];
for some assignments I
Suppose we have a tree whose nodes are labelled with formulas in CNF. To each formula
F we attach a non-negative integer The tree is a branching tree if,
for each node, the complexity of the formula labelling this node is strictly greater than the
complexity of each of the formulas labelling its sons. In this paper we use
is the number of variables in F ;
is the number of clauses in F ;
is the length of F .
We prove two upper bounds, w.r.t. K and w.r.t. L. However, in this section we do not x
any concrete measure of complexity.
Let us consider a node in our tree labelled with a formula F 0 . Suppose its sons are labelled
with formulas F 1 , F 2 , . , Fm . A branching vector of a node is an m-tuple
are positive numbers not exceeding The characteristic polynomial of
a branching vector ~ t is dened by
The characteristic polynomial h ~ t (x) is a monotone function of x on the interval (0; +1),
and h ~ t exactly one positive root. We denote
this root by ( ~ t ) and call it the branching number . We suppose leaves. We
omit one pair of parentheses and write
Example 3.1 For example,
0:69424::: is the golden ratio;
The branching number of a tree T is the largest of the branching numbers ( ~ t ) of its
nodes. We denote it by max;T . The following lemma proved by Kullmann and Luckhardt
allows us to estimate the number of leaves in a branching tree using its branching number.
Lemma 3.1 (Kullmann, Luckhardt, [16]) Let T be a branching tree, let its root be labelled
with a formula F 0 . Then the number of leaves in T does not exceed ( max;T
This lemma already allows us to estimate the running time of a splitting algorithm
if we know the branching number of the splitting tree and the algorithm processes each
its leaf in a polynomial time. However, our algorithm corresponding to the upper bound
calls the algorithm corresponding to the upper bound p(L)(6; 7; 6; 7) K
as a subroutine and thus processes some of the leaves in an exponential time. To estimate
the overall running time, we use the following simple generalization of Lemma 3.1.
Lemma 3.2 [8] Let T be a branching tree, let its root be labelled with a formula F 0 . Let G l
denote the object labelling a leaf l of the tree T . Let
l is a leaf of T
Proof is the induction on the construction of the tree.
Base. The tree consisting of the unique node. In this case
Step. Consider the tree T presented in Fig. 2. Let ~ be the branching tuple
in its root.
l is a leaf of T
s
l is a leaf of T j
f((G l ))A
s
s
(by denition of the tuple ~ t)
Figure
2: A splitting tree
s
s
(by denition of h ~ t )
(max(; max;T (by monotonicity of h ~ t )
ut
Now if we know the branching number of the tree corresponding to a splitting algorithm,
then we can estimate its running time. We explicitly require our algorithms to perform
splittings with branching numbers not greater than we wish (and we only need to prove that
there always exists a splitting satisfying this condition). For this purpose, the algorithm has
to compare branching numbers corresponding to dierent vectors. Of course, this can be
done just by the examination of a constant number of cases and the use of the monotonicity
of . However, a more general statement holds.
Lemma 3.3 (Kullmann, Luckhardt, [16]) Let m, k be natural constants, x 1
positive rational numbers. The problem whether
than (y 1 ;y solvable in time polynomial of max(x 1 ;x
In the following, when estimating the running time of our algorithms, we use frequently
inequalities like (7; 15) < (5; 17) or (5; 17) < (6; 7; 6; 7) 1=3 without proofs. One can check
these inequalities by approximate calculation of the branching numbers. However, there are
several simple observations that may help to prove some of this inequalities easier.
Lemma 3.4 (Kullmann, Luckhardt, [16])
(1) Permutations of the components of a branching vector do not aect the corresponding
branching number.
(2) The branching number strictly decreases as one or more components of the branching
vector increase.
4 Transformation rules.
In this section F denotes a formula in CNF.
Lemmas 3.1 and 3.2 allows us to take into consideration only the dierences between
the complexity of an input formula and the complexities of the formulas obtained from it
by splitting. The higher these dierences are, the smaller the number of leaves is. Thus,
to obtain a good algorithm, we should reduce as much as possible the complexities of the
formulas obtained by splitting. Here we explain transformation rules that allow us to do it.
More precisely, we explain that in certain cases we can nd a simpler formula equi-satisable
with F . In the following we use these rules so that they never increase the parameter under
consideration (the number of clauses in a formula or the length of a formula).
Elimination of 1-clauses. If F contains a 1-clause fag, then the formulas F and F [a] are
equi-satisable since all assignments that contain a are unsatisfying.
Subsumption. If F contains two clauses C and D such that C D, then F and F nfDg are
equi-satisable since each assignment that satises the clause C, satises also the clause D.
Resolution with subsumption. Suppose we are given a literal a and clauses C and D
such that a is the only literal satisfying both conditions a 2 C and a 2 D. In this case, the
clause (C [ D) n fa; ag is called the resolvent by the literal a of the clauses C and D. We
denote it by R(C; D).
Let now F contain such clauses C and D. It is clear that adding R(C; D) to the formula
does not change its satisability. However, it increases its size. To avoid this eect, we
use this rule only if R(C; D) D. In this case we reduce the satisability problem for the
formula F to the satisability problem for D)g.
Elimination of a variable by resolution. Given a literal a, we construct the formula
DP a
adding to F all resolvents by a;
removing from F all clauses containing a or a.
Lemma 4.1 (Davis, Putnam, [6]) The formulas F and DP a are equi-satisable.
This transformation can increase the size of a formula or/and the number of clauses in
it, but we use this rule only if it does not increase the parameter under consideration (the
number of clauses in a formula or the length of a formula). Note that in particular, this
transformation does not increase any of the parameters of F if a is a pure literal, and thus
it eliminates pure literals.
Elimination of blocked clauses. The clause C is blocked for a literal a w.r.t. F if C
contains the literal a, and the literal a occurs only in the clauses of F that contain the
negation of at least one of the literals occurring in C n fag. (Note that F may or may not
contain C.) In other words, there are no resolvents by a of the clause C and any other
clause of the formula F . For a CNF-formula F and a literal a occurring in it, we dene the
assignment
ag j the clause fa; xg is blocked for a w.r.t. Fg:
When the meaning of F is clear from the context, we omit F and write I(a).
The notion of a blocked clause was introduced and investigated by Kullmann in [13, 14].
We use the following two facts about blocked clauses.
Lemma 4.2 (Kullmann, [13, 14])
(1) If a clause C is blocked for a literal a w.r.t. F , then F , F n fCg and F [ fCg are
equi-satisable.
(2) Given a literal a, the formula F is satisable i at least one of the formulas F [a]
and F [I(a)] is satisable.
Application of the black and white literals principle. Let P be a binary relation
between literals and formulas in CNF, such that for a variable v and a formula F , at most
one of P (v; F ) and P (v; F ) holds.
Lemma 4.3 Suppose that each clause of F that contains a literal w satisfying P (w; F )
contains also at least one literal b satisfying P (b; F ). Then F and F [fl j P (l; F )g] are equi-
Proof. This is a particular case of the autarkness principle [20, 22, 17, 16]. We denote
Suppose G is satisable. Consider a satisfying assignment I for the
formula G. It is clear that the assignment I [ . On the other hand,
each assignment satisfying F satises also G. ut
5 A bound w.r.t. the number of clauses.
In this section we present Algorithm 5.1 which checks satisability of formula F in the time
is a polynomial). This algorithm has two subroutines, Function
REDUCEK and Function SPLITK . Function REDUCEK simplies the input formula
using the transformation rules (see Sect. 4). Function SPLITK is intended for reducing the
satisability problem for the input formula to the satisability problem for several simpler
formulas. The execution of this algorithm can be viewed as follows: Function REDUCEK
simplies the input formula, then SPLITK splits it into several formulas, REDUCEK sim-
plies each of these, and so on.
In the following, we denote by REDUCEK the formula that Function REDUCEK
outputs on input F . Similarly we dene SPLITK
Function REDUCEK .
Input: A formula F in CNF.
Output: A (simplied) formula in CNF.
Method.
(KR1) Elimination of 1-clauses. If F contains a 1-clause
Repeat this step while F contains 1-clauses.
(KR2) Application of the black and white literals principle. If each clause C in F
that contains a (2;3 contains also a (3
F := F [fa j a is a (3
Elimination of a variable by resolution. Choose a literal a such that a or a
occurs in F and maximal. If there are several such
literals, then choose a literal with # a minimal. If 0, then F := DP a
Repeat this step while F satises this condition.
If F has been changed at steps (KR1){(KR3), then go to step (KR1), otherwise
return F .
ut
Function SPLITK .
Input: A formula F in CNF.
Output: If F is satisable, then T rue, otherwise F alse.
Method.
(KS1) The empty formula. If
containing the empty clause. If ; 2 F , then return F alse.
Splitting into two subproblems. For each literal a occurring in F , construct two
If there exists a literal a such that (K(F
then choose the formulas F 1 and F 2 corresponding to this literal. If SPLITK returns
T rue for at least one of these, then return T rue, otherwise return F alse.
Splitting into four subproblems. Choose a literal a occurring in F . For each
two literals b and c occurring in F [a] and F [a] respectively, construct four formulas
F 11 =REDUCEK
F 21 =REDUCEK
F 22 =REDUCEK
If there exist literals b and c such that
then choose the formulas F 11 , F 12 , F 21 and F 22 corresponding to these literals. If
returns T rue for at least one of these, then return T rue, otherwise return
F alse.
ut
Algorithm 5.1.
Input: A formula F in CNF.
Output: If F is satisable, then T rue, otherwise F alse.
Method.
Return SPLITK (REDUCEK
ut
In Sect. 4 we explained that none of the steps of REDUCEK changes the satisability of
the formula. The steps (KR1){(KR4) cannot be repeated more than K(F
since none of them increases the number of clauses or the number of variables, and during
each iteration (KR1){(KR4){(KR1) at least one of these quantities decreases. Each of these
steps takes a polynomial time. Thus, REDUCEK does not change the satisability of the
formula and returns the answer in a polynomial time.
We now construct a tree which re
ects the behaviour of Algorithm 5.1 (together with
Functions REDUCEK and SPLITK ). Its internal nodes are labelled with formulas that
Algorithm 5.1 splits at steps (KS3) and (KS4). Its leaves are labelled with formulas that
satisfy the conditions of the steps (KS1) and (KS2). Each internal node labelled with F has
two sons labelled with F 1 and F 2 or four sons labelled with F 11 , F 12 , F 21 and F 22 . Since
the conditions of the steps (KS3) and (KS4) guarantee that the corresponding branching
numbers do not exceed (6; 7; 6; 7), by Lemma 3.1 the number of leaves in the tree is at most
is the input formula. Thus, the Algorithm 5.1 returns the answer
in the time p(L(F ))(6; 7; 6; 7) K(F ) , where p is some polynomial.
It remains to prove that Algorithm 5.1 performs correctly, i.e., each formula in CNF
reduced by REDUCEK satises at least one of the conditions of the steps (KS1){(KS4). To
prove this statement, we need two simple lemmas concerning the output of REDUCEK .
Lemma 5.1 Let F 1 be the value of F at step (KR1) of Function REDUCEK at some point
of time (maybe after eliminating several 1-clauses), F 2 be the corresponding output formula
of Function REDUCEK , d and e be literals occurring in F 1 .
(1) If d is a (1 ;1
(2) If d and e are (1 ;1 and there are no clauses in F
that contain d and e simultaneously, then 2.
Proof. (1). If REDUCEK modies once more the formula at steps (KR1) or (KR2), then at
least one clause will be deleted from it. Otherwise, at least one clause will be eliminated at
step (KR3) since K(F 1 ) K(DP d
(2). W.l.o.g we suppose that F 1 contains at most one 1-clause, this clause (if any) contains
a 1-literal and after eliminating this clause the formula F 1 does not contain 1-clauses at
all. If F 1 contains exactly one 1-clause, then it will be eliminated at step (KR1), and one
more clause will be eliminated by (1) since at least one of the literals d and e remains a
Now let F 1 contain no 1-clauses. If REDUCEK modies this formula at step (KR2), then
at least one clause, i.e., at least two occurrences will be eliminated.
Now F has the value F 1 before the step (KR3). W.l.o.g. we suppose that
of the step (KR3). At step (KR3) a 1 -literal will be chosen. After the rst application of
DP , at least one of the literals d and e remains a 1 -literal and its negation or the literal
itself remains in the formula. Hence, by (1) at least one more clause will be eliminated. ut
Lemma 5.2 Let F be a formula in CNF. Then the formula REDUCEK does not contain
1-clauses, 1 -literals and (2;2)-literals.
Proof. Function REDUCEK eliminates 1-clauses at step (KR1). If d is a 1 -literal or a
(2;2)-literal, then K(DP d eliminates such literals at
step (KR3). ut
Theorem 5.1 Algorithm 5.1 performs correctly and stops in the time p(L)(6; 7; 6; 7) K <
p(L)2 0:30897K , where L is the length of the input formula, K is the number of clauses in it,
and p is a polynomial.
Proof. We have shown above that it su-ces to prove that each formula F in CNF reduced
by REDUCEK satises at least one of the conditions of the steps (KS1){(KS4). Suppose
F does not satisfy the conditions of the steps (KS1){(KS4). We now consider all possible
cases. We prove that each of this cases is impossible. All symbols have the same meaning
as they have at the corresponding steps of Function SPLITK . For
The key observation is that if the formula F contains few \frequent" variables, then after
the transformation of F into F [a]; F [a] for some literal a we can apply Lemma 5.1. We now
prove this more formally.
Case 1: The formula F contains a (3
All clauses of the formula F containing the literal a disappear in F [a], all its clauses containing
the literal a disappear in F [a]. Since a is a (3 4. Thus, in terms
of the step (KS3), i.e., the condition of the step (KS3) is
Case 2: The formula F contains a clause that contains a (3;3)-literal a and a (2;3
b.
All three clauses of the formula F containing a disappear in F [a], all three clauses containing
a disappear in F [a]. In addition, b becomes a (1 ;1 + )-literal in F [a]. Thus, in terms of the
step (KS3) we have 1 1 by Lemma 5.1. Hence, i.e., the
condition of the step (KS3) is satised.
Case 3: The formula F contains a 2-clause consisting of 2-literals.
All clauses of the formula F containing a disappear in F [a], all its clauses containing a
disappear in F [a]. By Lemma 5.2, a is a (2;3 3. Similarly to
Case 2, in terms of the step (KS3) we have 1 1. In addition, C becomes a 1-clause in
F [a] and will be eliminated at step (KR1), i.e. 2 1. We now have
4, i.e., the condition of the step (KS3) is satised.
Case 4: The formula F contains a 3 consisting of 2-literals.
sg. All clauses of the formula F containing a i disappear in F [a i ], all
its clauses containing a i disappear in F [a i ]. By Lemma 5.2, a i is a (2;3
In addition, a 2 and a 3 become
in F [a 1 ]. If C is the only clause that contains a 2 and a 3 simultaneously, then by Lemma 5.1
we have K(F [a 1 ]) K(REDUCEK 2. Otherwise, a 3 becomes a (0;3
in F [a 2 ], i.e. K(F [a 2 ]) K(REDUCEK 2. Depending on which of these two
alternatives takes place, we choose a 1 or a 2 as a in terms of the step (KS3). We now have
i.e., the condition of the step (KS3) is satised.
Case 5: The conditions of Cases 1{4 are not satised.
Since the step (KR2) does not change F , it contains only 3-literals. Since F does not satisfy
the condition of the step (KS3), for each literal a,
3:
Let a be a literal occurring in F . We now prove that there exist literals b and c such that the
condition of the step (KS4) is satised. We consider three sub-cases (the rst two of them
are similar to Cases 2{4).
Case 5.1: There exists a clause in F [a], such that a 1 is a (3;3)-literal
and a 2 is a 2-literal.
We suppose in terms of the step (KS4). Similarly to Case 2, 11 4, 12 3.
Case 5.2: There exists a clause in F [a], such that a 1 is a (2;3)-literal
and a are 2-literals.
We suppose in terms of the step (KS4). Similarly to Cases 3{4, 11 3, 12 4,
or 11 4, 12 3. (Note that by (5.1) the literals a i and a j cannot occur together in two
clauses.)
Case 5.3: The conditions of Cases 5.1{5.2 are not satised.
Since by (5.1) the steps (KR1){(KR3) do not reduce the number of clauses in the formula
F [a] and the conditions of Cases 5.1{5.2 are not satised, this formula consists of clauses
that contain only (2;2)-literals and clauses that contain only (3;3)-literals. Since exactly
three clauses of the formula F disappear in F [a], all occurrences of any (3;3)-literal cannot
disappear in F [a]. Hence, it contains at least one (2;2)-literal b 1 . Let b 1 be a 2-literal. The
formula F does not contain 2-clauses by (5.1). Similarly, it cannot contain two clauses,
each containing the literals a and b 1 simultaneously. Thus, F [a] contains a 3
are 2-literals.
We choose the literal b 1 as b. Both clauses of the formula F [a] that contain b 1 disappear
in F [a; b 1 ]. In addition, these clauses contain only (2;2)-literals which become
literals. Thus, by Lemma 5.1
3:
On the other hand, two clauses of F [a] containing b 1 disappear in F [a; b 1 ], and two more
clauses disappear by Lemma 5.1 since b 2 and b 3 become )-literals. We note that by
(5.1) the formula F contains only one clause that contains b 2 and b 3 simultaneously. Thus,
We now have that in each of Cases 5.1{5.3 there exists a literal b in F [a] such that
7. A literal c can be chosen similarly. Hence, the
condition of the step (KS4) is satised. ut
6 A bound w.r.t. the length of a formula.
In this section we present Algorithm 6.1 which checks satisability of formula F in the
time p(L(F ))2 0:10299L(F ) (where p is a polynomial). As in the previous section, we dene
two subroutines, Function REDUCE L and Function SPLIT L . We use them similarly to
REDUCEK and SPLITK : Function REDUCE L simplies the input formula, then SPLIT L
splits it into several formulas, REDUCE L simplies each of these, and so on.
Function REDUCE L .
Input: A formula F in CNF.
Output: A (simplied) formula in CNF.
Method.
(LR1) Elimination of 1-clauses. If F contains a 1-clause
Repeat this step while F contains such a clause.
Subsumption. If F contains two clauses C and D such that C D, then F :=
fDg. Repeat this step while F contains such clauses.
Elimination of blocked clauses. If F contains a blocked clause C, then F :=
fCg. Repeat this step while F contains blocked clauses.
Resolution with subsumption. If F contains two clauses C and D such that
R(C; D)D, then F := [fR(C;D)g. Repeat this step while F contains
such clauses.
Elimination of a variable by resolution. Choose a literal a such that a or a
occurs in F and
Repeat this step while F satises this condition.
If F has been changed at steps (LR1){(LR5), then go to step (LR1), otherwise
return F .
ut
Function SPLIT L .
Input: A formula F in CNF.
Output: If F is satisable, then T rue, otherwise F alse.
Method.
(LS1) The empty formula. If
containing the empty clause. If ; 2 F , then return F alse.
containing no 2-clauses. If F does not contain 2-clauses, apply Algorithm
5.1 to F and return its answer.
Splitting into two subproblems. For each literal a occurring in F , construct two
If there exists a literal a such that (L(F )
choose the formulas F 1 and F 2 corresponding to this literal. If SPLIT L returns T rue
for at least one of these, then return T rue, otherwise return F alse.
ut
Algorithm 6.1.
Input: A formula F in CNF.
Output: If F is satisable, then T rue, otherwise F alse.
Method.
Return SPLIT L (REDUCE L
ut
Similarly to REDUCEK , Function REDUCE L does not change the satisability of the
formula and returns the answer in a polynomial time.
We now construct a tree which re
ects the behaviour of Algorithm 6.1 (together with
Functions REDUCE L and SPLIT L ). Its leaves are labelled with formulas that satisfy the
conditions of the steps (LS1){(LS3). Algorithm 6.1 processes in a polynomial time formulas
satisfying the conditions of the steps (LS1) and (LS2), and passes formulas satisfying the
condition of the step (LS3) to Algorithm 5.1 which processes such a formula F in the time
is a polynomial (note that F
contains no 2 -clauses since 1-clauses are eliminated at step (LR1)).
Internal nodes of our tree are labelled with formulas that Algorithm 6.1 splits at step (LS4).
Each internal node labelled with F has two sons labelled with F 1 and F 2 . Since the condition
of the step (LS4) guarantees that the corresponding branching number does not exceed
3.2 the running time of Algorithm 6.1 is upper bounded
by q(L(G))(6; 7; 6; 7) L(G)=3 for input formula G, where q is a polynomial.
It remains to prove that Algorithm 6.1 performs correctly, i.e., each formula in CNF
reduced by REDUCE L satises at least one of the conditions of the steps (LS1){(LS4). We
need three simple lemmas concerning the output of REDUCE L to prove this statement.
Lemma 6.1 Let F be a formula in CNF, d be a literal occurring in it.
(1) If d is a (1;2 )-literal occurring in a 3 -clause, then L(DP d
(2) If d is a (1;1 )-literal occurring in a 2 -clause, then L(DP d 2:
(3) If d is a (1;1)-literal, then L(DP d 2:
Proof. By straightforward calculations. ut
Lemma 6.2 Let F 1 be the value of F at one of the steps (LR1){(LR5) of Function REDUCE L ,
F 2 be the corresponding output formula of Function REDUCE L , d be a literal occurring in
(1) If d is a (1;2 )-literal occurring in a 3 -clause, then
(2) If d is a (1;1 )-literal occurring in a 2 -clause, then 2:
Proof. (1). Note that any change of the formula at steps (LR1){(LR4) is a removal of some
clauses and/or a change of other clauses by their subsets, and thus results in decreasing the
length of the formula by at least one occurrence. If the formula does not change any more
before the step (LR5), then at least one occurrence will be removed by Lemma 6.1(1).
(2). Suppose that after F gets the value F 1 , Function REDUCE L modies the formula
before the step (LR4). This modifying cannot result in increasing the length of a clause or
in increasing the number of occurrences of a literal. Moreover, if the formula changes at
these steps, at least one occurrence is removed. If only one occurrence is removed, then at
least one of the literals d, d remains in the formula. If this is the occurrence of d, then by
Lemma 6.1(1) at least one more occurrence will be removed at step (LR5), and (2) holds.
Otherwise, d becomes a pure literal and will be removed at step (LR5), thus (2) holds again.
Suppose now that REDUCE L does not modify the formula before the step (LR5).
Then, (2) follows from Lemma 6.1(2). ut
We use the following simple properties of the formula reduced by Function REDUCE L
in the proof of 6.1 without explicit mentioning.
Lemma 6.3 Let G. Then
(1) F does not satisfy any of the conditions of the steps (LR1){(LR5);
(2) there are no 1-clauses in F ;
(3) there are no pure literals and (1;1)-literals in F ;
(4) there are no 2-clauses in F containing a 1-literal;
(5) for any literal d occurring in F , } d
for any 1-literal d occurring in F , } d +# d 7;
(7) for any literal d occurring in F , } d +# d 5.
Proof. (1) is trivial; (2){(7) since F does not satisfy the conditions of the step (LR1)and
see also Lemma 6.1. ut
Theorem 6.1 Algorithm 6.1 performs correctly and stops in the time p(L)(6; 7; 6; 7) L=3 <
p(L)2 0:10299L , where L is the length of the input formula and p is a polynomial.
Proof. We have shown above that it is su-cient to prove that each formula F in CNF reduced
by REDUCE L satises at least one of the conditions of the steps (LS1){(LS4). Suppose F
does not satisfy the conditions of the steps (LS1){(LS3). We now consider the two possible
cases: when F contains at least one 1-literal a, and when it contains no 1-literals. We prove
that in each of these cases F satises the condition of the step (LS4).
Informally, this is done as follows. In the rst case we show that the assignment I(a)
contains many literals. The second case is handled by careful examination of sub-cases: we
choose a 2-clause fc; dg in F and examine the following sub-cases:
there are many occurrences in the clauses containing the literal c (or d);
F contains many occurrences of the literal c (or d).
In these two sub-cases we show that many occurrences are eliminated during the transformation
of F into F [c]; F [c] (or F [d]; F [d]) and the subsequent elimination of 1-clauses
obtained from the clauses containing the literals c; c (or d; d). The third sub-case is:
none of the previous sub-cases holds.
In this sub-case one of c and d is a (2;2)-literal occuring only in 2- and 3-clauses which
allows us to use Lemma 6.1 after one occurrence of this literal is eliminated during the
splitting by another literal.
In the following we denote
F 2 and a literal a have the same meaning as they have at step (LS4) of Algorithm 6.1.
Case 1: The formula F contains a 1-literal a.
be the only clause containing a. Let
and } a +# a 7 by Lemma 6:3, we have # a max(7 } a ;
be the number
of 3 -clauses among all clauses that contain a.
During the transformation of the formula F into F 2 , all occurrences of the literal a and
all clauses containing a will be eliminated. Thus,
+# a
5:
During the transformation of the formula F into F 1 , the clause D and all occurrences
of the literal a will be eliminated; all 2-clauses containing a will be eliminated too (at
step (LR1)). Since D is not blocked for any a i w.r.t. F , for each there exists
clause D i in F such that D i \ fa; a g. All these clauses will be eliminated
since all clauses fa; a i g are blocked for a w.r.t. F (i.e. fa; a clauses
containing a, all clauses D i and the clause D are distinct. Thus, we have
r+(7 r)+(# a
We now have i.e., the
condition of the step (LS4) is satised 1 .
Case 2: The formula F does not contain 1-literals.
Since F does not satisfy the condition of the step (LS3), it contains a 2-clause dg.
Let us note that
The formula F does not contain other clauses that contain
the literal d and the literal c, or the literal d and the
literal c, or the literal d and the literal c, simultaneously.
This proposition is true since F does not satisfy the conditions of the steps (LR2) and (LR4).
Also, in this case I(c) = fcg and I(d) = fdg by (6.2) and the denition of I(: : :).
Let us denote one of the literals c, d by a (we shall choose later which one). We denote
the remaining literal by b. Let be the number of 3 -clauses among all clauses that contain
a (note that # a 1), let
be the number of 3 -clauses among all clauses that contain
a. We now count the occurrences that disappear during the transformation of the formula
F into F [I(a)] (= F [a]) and F [a] and subsequent elimination of 1-clauses resulted from the
2-clauses containing the literals a and a.
During the transformation of the formula F into F 1 , all occurrences of the literal a and
all clauses containing a will be eliminated; all 2-clauses that contain a will be eliminated too
(at step (LR1)), there are (# a
clauses.
1 Kullmann and Luckhardt [16] prove for a very similar algorithm that in this case
thus, (5; 17) in the condition of the step (LS4) can be replaced by (8; 12). However, this would not improve
our upper bound while would make the proof longer; thus, we present here this simpler proof.
The formula F [a] contains the 1-clause fbg obtained from the 2-clause D. It will be
eliminated at step (LR1). If F contains other 2-clauses containing a, the clauses obtained
from them will be eliminated at step (LR1) too. The number of such clauses is (# a 1 ).
During the transformation of the formula F into F 2 , all occurrences of the literal a and all
clauses containing a or b will be eliminated. By (6.2), D is the only clause containing b in
which the literals a; a can occur. Thus, even if we count only occurrences that disappear in
clauses containing a or a before the rst application of the step (LR2), we have
We consider several sub-cases.
Case 2.1: } c 6 and } d 6.
From (6.3) and (6.4) we have
Thus, i.e., the condition of the step (LS4) is satised.
Case 2.2: # c 3 or # d 3.
Let a 2 fc; dg be the literal for which # a 3 holds, let b be the remaining literal in fc; dg.
Thus, we have
a +# a 22:
Thus, i.e., the condition of the step (LS4) is satised.
Case 2.3: # or } d 5.
Let a 2 fc; dg be a literal such that } a be the remaining literal in
fc; dg. Then 4 } b 5 and } a } b . In this case b is a 2-literal, it occurs in D and in one
other 2- or 3-clause. We denote this clause by C b .
The literal b becomes a (1;2)-literal in F [I(a)] (= F [a]). We now complete the proof
by showing that several literal occurrences will be eliminated in addition to the occurrences
counted by (6.3). There are three sub-cases.
Case 2.3.1: At least two occurrences are eliminated before the rst application of step (LR2)
in addition to the occurrences counted by (6.3).
In this case,
+(# a )9;
a +# a 20:
Case 2.3.2: Exactly one occurrence is eliminated before the rst application of step (LR2)
in addition to the occurrences counted by (6.3).
We remind that (6.3) counts only occurrences to the clauses containing one of the literals
a,a. By (6.2) the occurrence of the literal b to the clause C b or any occurrence of the literal
b cannot be eliminated during the transformation of the formula F into the formula F [a]. If
we counted any of these occurrences in the # a
term of (6.3), then it was an elimination
of a 1-clause fbg obtained from a 2-clause fa; bg. Since it is impossible to have two distinct
identical clauses fa; bg in the formula, the other two occurrences (another occurrence of the
literal b and the occurrence of the literal b in C b ) eliminated at this moment are not counted
by (6.3); this fact contradicts the assumption of Case 2.3.2.
Thus in this case b remains a (1;2)-literal before the rst application of the step (LR2). By
Lemma 6.2(1) at least one more occurrence will be eliminated after that and thus (6.5){(6.7)
hold.
Case 2.3.3: No occurrences are eliminated before the rst application of step (LR2) in
addition to the occurrences counted by (6.3).
Similarly to Case 2.3.2, b remains a (1;2)-literal before the rst application of the step (LR2)
during transformations of the formula F [a] by Function REDUCE L . Thus, if jC b
two more occurrences are eliminated by Lemma 6.2(2), and (6.5){(6.7) hold.
If, however, jC then we can apply only Lemma 6.2(1), but in this case } a }
and thus
10;
Hence, in all three sub-cases 2.3.1{2.3.3, i.e., the condition
of the step (LS4) is satised. ut
7 Conclusion and further work
In this paper we have improved the existing upper bounds for SAT with respect to K (the
number of clauses) and L (the length of a formula). The key point in our algorithms and
proofs is the black and white literals principle, a new transformation rule which can be viewed
as a re-formulation of two previously known principles: the autarkness [20, 22, 17, 15] and
the generalized sign principle [16].
Our proofs (as well as the proofs of the previous upper bounds [21, 16]) are neither short
nor elegant. It would be a kind of breakthrough to nd a compact way to present proofs
of upper bounds for splitting algorithms. It is believable that such a way could lead to
even better bounds, since currently our possibilities to create new heuristics and prove the
corresponding upper bounds are limited by the length of a comprehensible proof. On the
other hand, it is a challenging problem to prove (more) tight lower bounds for (some class
splitting algorithms: currently, the exponential lower bounds for resolution proofs (see,
e.g., [27]) are far enough from the known upper bounds for splitting algorithms. (Most of
splitting algorithms can be viewed as resolution proofs and vice versa.)
Another direction for work is to nd randomized algorithms that give better upper bounds
for SAT (or to nd a way how to apply modern randomized algorithms that have already been
invented for 3-SAT in recent breakthrough papers [23, 24]). Also, it remains a challenging
problem to nd a less-than-2 N upper bound where N is the number of variables.
--R
Tautology proof systems based on the splitting method
Less than 2 n satis
Approximation algorithms for Max Sat: a better performance ratio at the cost of a longer running time
Exponential upper bounds for the satis
A machine program for theorem-proving
A computing procedure for quanti
Algorithms for Satis
Separating the signs in the satis
Two new upper bounds for SAT
Local Search Algorithms for SAT: Worst-Case Analysis
Hard formulas for SAT local search algorithms
SAT local search algorithms: worst-case study
New methods for 3-SAT decision and worst-case analysis
Investigations on autark assignments
Algorithms and their complexity
Obere Komplexit
Parametrizing above guaranteed values: MaxSat and Max-Cut
New upper bounds for MaxSat
Upper bounds for covering problems
Solving satis
An Improved Exponential-time Algorithm for k-SAT
Solving 3-satis ability in less than 1:579 n steps
Pure literal look ahead: An O(1:497 n
The Complexity of Propositional Proofs
A satis
--TR
--CTR
Rainer Schuler, An algorithm for the satisfiability problem of formulas in conjunctive normal form, Journal of Algorithms, v.54 n.1, p.40-44, January 2005
Bolette Ammitzbll Madsen, An algorithm for exact satisfiability analysed with the number of clauses as parameter, Information Processing Letters, v.97 n.1, p.28-30, January 2006
Evgeny Dantsin , Andreas Goerdt , Edward A. Hirsch , Ravi Kannan , Jon Kleinberg , Christos Papadimitriou , Prabhakar Raghavan , Uwe Schning, A deterministic (2 - 2/(k+ 1))n algorithm for k-SAT based on local search, Theoretical Computer Science, v.289 n.1, p.69-83, 23 October 2002
Ramamohan Paturi , Pavel Pudlk , Michael E. Saks , Francis Zane, An improved exponential-time algorithm for k-SAT, Journal of the ACM (JACM), v.52 n.3, p.337-364, May 2005
Tobias Riege , Jrg Rothe , Holger Spakowski , Masaki Yamamoto, An improved exact algorithm for the domatic number problem, Information Processing Letters, v.101 n.3, p.101-106, February, 2007
Ryan Williams, Algorithms for quantified Boolean formulas, Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms, p.299-307, January 06-08, 2002, San Francisco, California
Haiou Shen , Hantao Zhang, Improving exact algorithms for MAX-2-SAT, Annals of Mathematics and Artificial Intelligence, v.44 n.4, p.419-436, August 2005
Jens Gramm , Edward A. Hirsch , Rolf Niedermeier , Peter Rossmanith, Worst-case upper bounds for MAX-2-SAT with an application to MAX-CUT, Discrete Applied Mathematics, v.130 n.2, p.139-155, 15 August
Edward A. Hirsch, Worst-case study of local search for MAX-k-SAT, Discrete Applied Mathematics, v.130 n.2, p.173-184, 15 August
Laurent Simon , Daniel Le Berre , Edward A. Hirsch, The SAT2002 Competition, Annals of Mathematics and Artificial Intelligence, v.43 n.1-4, p.307-342, January 2005
Oliver Kullmann, Lean clause-sets: generalizations of minimally unsatisfiable clause-sets, Discrete Applied Mathematics, v.130 n.2, p.209-249, 15 August
Rolf Niedermeier , Peter Rossmanith, An efficient fixed-parameter algorithm for 3-hitting set, Journal of Discrete Algorithms, v.1 n.1, p.89-102, February | SAT;worst-case upper bounds |
594333 | Alternative Translation Techniques for Propositional and First-Order Modal Logics. | We describe and analyze techniques, other than the standard relational/functional methods, for translating validity problems of modal logics into first-order languages. For propositional modal logics we summarize the □-as-Pow method, a complete and automatic translation into a weak set theory, and then describe an alternative method, which we call i>algebraic, that achieves the same full generality of □-as-Pow but is simpler and computationally more attractive. We also discuss the relationships between the two methods, showing that □-as-Pow generalizes to the first-order case. For first-order modal logics, we describe two extensions, of different degrees of generality, of □-as-Pow to logics of rigid designators and constant domains. | Introduction
Translation techniques have oered valuable aid for the study and development
of theorem provers for non-classical logics, and their nave
use can be ascribed to tradition. The rst systematic study of the relational
translation was carried out within Correspondence Theory (van
Benthem, 1983). In later years further studies of the relational and similar
techniques for computational purposes were initiated ((Ohlbach,
1991; Ohlbach, 1993; Nonnengart, 1993); see also (Ohlbach et al., 2001)
for a comprehensive survey). The eld has revealed itself to be fruitful
and interesting.
The relational translation of a modal
the rst-order formula RT('; x) (it has also been called ST , for \stan-
dard translation", but we will reserve this designation for \set-theoretic
inductively dened by
c
2001 Kluwer Academic Publishers. Printed in the Netherlands.
Alberto Policriti, and Matteo Slanina
Here, each propositional variable p i is mapped one-to-one to a unary
predicate symbol P i . Let RT(') be
If
axiomatizes a frame-complete logic, then
Here f denotes validity of ' in the logic axiomatized by
, and
denotes classical (in this case second-order) validity. The second-order
quantiers in RT(') can be removed, since they are universal and appear
only as prex to the consequent of an implication. However, the
second-order character of RT(
is, in general, not eliminable, since,
in this case, the second-order (universal) quantication appears in the
antecedent of an implication. This makes the technique inapplicable for
computational purposes, since the target language is highly undecidable
(non-arithmetic, cf. (van Benthem, 1983)). Whenever RT(
can be
proved equivalent to a rst-order formula, the logic axiomatized by
is
said to be rst-order denable and the modal validity problem can be
solved by a rst-order theorem prover. Determining when RT(
a rst-order equivalent is the main topic of correspondence theory. In
some cases it can even be done automatically (e.g. Sahlqvist formulae,
the SCAN procedure (Gabbay and Ohlbach, 1992)). Unfortunately,
not all modal logics have a rst-order (frame) correspondent, and, even
when they do, there is no complete algorithm to nd one. A lot of work
has been done to avoid these di-culties, resulting in some extensions
of the class of tractable logics and, especially, in improved performance
(Nonnengart, 1993; Ohlbach, 1998). In particular, (Ohlbach,
1998) proposed a way to incorporate axioms and rules of Hilbert calculi
into relational translations, thus creating a hybrid system able to deal
with the axioms that cannot directly be captured by the translation.
A dierent perspective on the problem is taken in the approach
proposed in (D'Agostino et al., 1995), where the 2-as-Pow translation
was rst introduced. The novelty of 2-as-Pow lies in the fact that,
instead of determining which modal theories can be mapped into a rst-
order language, a fragment of second-order logic is used as a framework
for the translation. It turns out that the fragment required is very
small and can be specied as a weak rst-order axiomatic set theory.
Under this theory, the resulting translation is sound and complete for all
frame-complete (not only with respect to a rst-order class of frames)
Alternative Translation Techniques for Propositional and First-Order Modal Logics 3
logics. More specically, given a frame-complete logic with axiom
and
a formula ', the 2-as-Pow translation (
is such that
where
is the weak axiomatic set theory that will be dened in Section
2. Several extensions of this method were discussed in subsequent
papers (Montanari and Policriti, 1997a; Montanari and Policriti, 1997b;
van Benthem et al., 1998), including a variation (van Benthem et al.,
1997) that allows for completeness for any logic (not necessarily frame-
complete) and another with strong decidability results (D'Agostino
et al., 1996).
In this paper we systematically present set-theoretic and algebraic
translation techniques that are less restrictive than RT and its vari-
ations, and whose range includes propositional modal logics as well
as an important class of rst-order modal logics. After a short review
of the original 2-as-Pow translation (Section 2), we introduce
a new, very natural, translation method, that we call algebraic. This
algebraic translation, suggested by the algebraic semantics for modal
logics, achieves completeness for all logics in a simpler way than 2-
as-Pow. We point out strong relationships between 2-as-Pow and the
algebraic method, showing a new way to obtain the former from an
algebraic point of view (Section 3). We show that, in a certain sense to
be made precise later, 2-as-Pow and the algebraic translation coincide
at the propositional level. However, no such strong relationship holds
when we try to extend these methods to handle rst-order modal log-
ics: 2-as-Pow can be so extended, but for the algebraic method there
seems to be a signicant stumbling block (unless we allow the target
language of the translation to be second-order, which is unacceptable).
The relational translation and its derivations can be extended, in their
restricted setting, to rst-order modal logics in a fairly straightforward
manner. In Section 4, we collect and organize some results (Montanari
et al., 2000a; Montanari et al., 2000b) on the extension of 2-as-Pow
to the important class of rst-order modal logics of rigid designators
and constant domain, which is signicant given the aforementioned
observations. Section 5 contains some lengthy proofs that would have
broken the continuity of the exposition if put in the main text. We
conclude with some discussion on open problems and possible future
work.
We have tried to use a commonly understood symbolism. Some less
common notations are the ones for logical
syntactic derivation in classical and modal logic;
4 Angelo Montanari, Alberto Policriti, and Matteo Slanina
'Ks syntactic derivation in the modal calculus K s , that is, K
plus the Instantiation Rule;
truth in a model, semantic consequence in classical logic;
truth in a world or model, frame semantic consequence
in modal logic.
2. 2-as-Pow Translation (Propositional Case)
The 2-as-Pow translation, at the propositional level, can be described
as an extension to the 2 operator of the set-theoretic interpretation
of the propositional connectives ^, _, and :. The approach brie
y
described here was rst presented in (D'Agostino et al., 1995) and
subsequently developed in (van Benthem et al., 1997) and (van Benthem
et al., 1998). The key idea is simply to replace the accessibility
relation R of the possible world semantics by the membership relation
2. Accordingly, a world y accessible from x becomes an element of
x, and taking a further step from y via R amounts to moving into y
to inspect one of its elements. This viewpoint allows us to identify a
frame F with its support w. Moreover, since we clearly want all worlds y
accessible from a given world x in a frame w to be themselves elements
of w, it is natural to require that w be a transitive set: w P(w).
Valuations for propositional variables, i.e. sets of worlds, can now be
identied with worlds themselves. 2-as-Pow is designed in such a way
that the translation ' of a compound formula ' turns out to be the
set
of all worlds where ' is true.
For propositional connectives we simply follow the Boolean tradition
and say that
In order to complete the denition it is su-cient to calculate the Kripke
semantics of the 2 operator replacing R by 2:
which is to say: 2' holds true at x if and only if x is a subset of ' .
This allows us to complete our denition by putting
Alternative Translation Techniques for Propositional and First-Order Modal Logics 5
It is possible to show that the
collection
of the following set-theoretic
principles su-ces for proving the soundness and completeness
of the translation:
z
Dening Trans(w) as w P(w) it can be shown that
When a modal logic is characterized by a nite collection of Hilbert
axioms, whose conjunction is
, these results generalize to
where
Axiom
(w) stands for 8~x (w
), where ~x is the list of all the variables
in
distinct from w.
Thus when is frame-complete an exact correspondence between
modal and set-theoretic derivability is guaranteed
It turns out that the
theory
is almost minimal in providing a
formal counterpart to the idea underlying the 2-as-Pow translation.
Let us call MM (an acronym for \Minimal Modal") the theory whose
axioms result from those
of
by replacing x 2 P(y) $ x y with the
following two theorems of
1 As a technical note, if we were to deal with a logic with an innite axiom set
, we could reformulate the result as follows (use skolemization on w/c and the
Deduction Theorem for rst-order logic to obtain the equivalence):
6 Angelo Montanari, Alberto Policriti, and Matteo Slanina
where u \ v is an abbreviation for u n (u n v). Although MM is even
weaker
than
it can still drive the 2-as-Pow translation. A further
possible simplication would be to eliminate the binary union symbol,
observing that, by exploiting complementation, it can be dened in
terms of set dierence.
Theorem 1 (Completeness of 2-as-Pow). If
'Ks ', then MM
Theorem 2 (Soundness of 2-as-Pow).
If
'.
3. Algebraic Translation (Propositional Case)
The same mental shift that proceeds from relational semantics to the
relational translation enables one to discover the algebraic translation
as a straightforward rewriting of algebraic semantics in syntactic terms.
The basic objects playing the role of Kripke frames are Boolean algebras
with one extra operator (Bull and Segerberg, 1984; Blackburn et al.,
2001).
Denition 3. Consider the rst-order language of Boolean algebras
(with meet u, join t, complementation 0 , bottom element 0, and top
element 1) and an additional operator ' . Dene the theory MA (for
Modal Algebra) to be the rst-order theory of Boolean algebras with
the two additional axioms:
Denition 4. Let us map each propositional symbol p to a distinct
individual variable x p of the target rst-order language and dene
the algebraic translation ' # of a modal formula ' by the following
structural induction:
Alternative Translation Techniques for Propositional and First-Order Modal Logics 7
Based on this denition and following the truth denition of algebraic
semantics, we put
It is straightforward to prove that this translation is sound and complete
for all (nitely axiomatizable) modal logics, since the algebraic
semantics is complete for all logics (in fact, it is equivalent to the general
frame semantics).
Theorem 5. Given a modal logic with axiom
and a formula ',
The algebraic translation converts a validity problem in any modal
logic to a validity problem of rst-order logic, thus permitting the use
of any rst-order theorem prover. As a validity checking method, this
is slower than the use of the relational or functional translation, when
the latter is applicable, but it has the advantage of being a completely
syntactic method and it can turn out to be extremely useful for experimenting
with new logics. 2 A further advantage of this technique
is that it also works, with no modication, for multi-modal logics:
just introduce one ' operator for each of the modalities involved and
augment the underlying theory with a pair of axioms, of the form of (1),
for each of them.
What we are left with after the algebraic translation is a deduction
problem in equational rst-order logic. Tools that deal with such prob-
lems, such as EQP, are available and can be used for modal theorem
proving based on the algebraic translation. Equational problems can be
solved particularly e-ciently when rewriting techniques can be applied.
In the case of modal logic, Foret (Foret, 1992) discovered con
uent
(modulo associativity and commutativity of the Boolean operators)
and terminating rewriting systems for the logics K, D, T, and S5. The
rewriting systems are oriented versions of the equational axioms of
modal algebras and can be seen as a specialized solver for the algebraic
translation of the formulae. For example, Foret's system for K adds the
oriented versions of (1) to Hsiang's system for propositional logic|
an oriented version of the equational theory of Boolean rings with
multiplicative identity (Hsiang, 1982; Hsiang, 1985):
We did some simple experimentation with a raw algebraic translation given to
EQP (McCune, 1997), and were able to prove 31 out of the 72 problems of (Gore
et al., 1997) in seconds (at most a few minutes in a few cases) on a Pentium class
computer.
8 Angelo Montanari, Alberto Policriti, and Matteo Slanina
3.1. Relations with 2-as-Pow.
If one looks at the original formulation of the 2-as-Pow translation,
there is one peculiar feature: the membership symbol 2 does not appear
explicitly. In fact, the translation seems to be expressed in an almost
equational language and looks very much like the algebraic translation.
Moreover, the axioms of MM are strikingly similar to those of modal
algebras.
We will now prove that these remarks have indeed a deep under-
pinning: there is an equational theory of sets, capturing the Boolean
properties
of
and MM , that proves the propositional 2-as-Pow translation
sound and complete. In other words, at the propositional level,
the algebraic and the 2-as-Pow translation are essentially equivalent.
However, as will be shown in the next section, there is no simple way
to lift this equivalence to the rst-order level.
One would be inclined to use, as an equational set theory, a theory
of Boolean algebras. However, we cannot hope to have a complementation
function, since there is no constant for a top element. Hence, we
add a relativized complementation which mimics the behavior of set
dierence. This turns out to be all we need and the following axioms
are su-cient.
Denition 6. We dene the
theory
by the
universal closure of the following axioms:
Intuitively, the rst ten axioms describe a theory of \Boolean algebras
without maximum element". It can be shown that the models of
these axioms are such that the cone of elements below any given element
is a Boolean algebra. This kind of structure is exactly a Boolean ring
in the sense of, e.g., (Jacobson, 1951), that is, an idempotent ring with
no multiplicative null element. This allows us to establish a two-way
correspondence between models
of
and models of MA. Using this
correspondence and the 2-as-Pow translation, which can be applied
directly to the language
of
, we can prove the following equivalence:
Alternative Translation Techniques for Propositional and First-Order Modal Logics 9
Theorem 7. Consider a nitely axiomatizable modal logic, with axiom
, and a modal
Proof. See Section 5.
Corollary 8. If
axiomatizes a frame-complete modal logic, then
Proof.
'Ks ' by soundness and completeness of 2-
as-Pow. By soundness and completeness of the algebraic translation
(Theorem 5),
To conclude apply Theorem 7.
4. 2-as-Pow Translation (First-Order Case)
The analogy between the 2-as-Pow and the algebraic translation does
not lift from the propositional to the rst-order level. An extension
of the algebraic method to rst-order modal logics would necessitate
employing a theory of complete Boolean algebras, which is second-
order, therefore leading again to problems of the same sort as those
mentioned in Section 1. However, we have successfully extended 2-
as-Pow to an important class of rst-order modal logics maintaining
the target language of the translation at the rst-order level. Hence,
2-as-Pow and the semantics it is based on can be seen as genuine generalizations
of the algebraic models; only at the lowest (propositional)
level do the two happen to be equivalent.
Here we describe two extensions of the 2-as-Pow translation method
to the class of rst-order modal logics with rigid designators and xed
domains, known as Q1 systems (see (Garson, 1984; Fitting, 1993; Fitting
and Mendelsohn, 1998)). Informally, the language of such logics is
a rst-order language together with a 2 modality. A model M consists
of a frame hW; Ri (possibly with restrictions dened by an underlying
propositional modal logic) plus a rst-order logic interpretation with
a single domain D, an interpretation FC for constants and one F F
for function symbols, and|the only part that varies with worlds|the
interpretation F P of predicate symbols:
There is a sound and complete calculus for any such logic, obtained
by adding to the propositional calculus for the underlying modal logic
Alberto Policriti, and Matteo Slanina
the axioms and rules of rst-order logic|the Universal Quantier Axiom
schema and the Universal Generalization Rule|and the Barcan
for every formula '(x).
Both translations will be targeted to a two-sorted rst-order logic.
This is done essentially for better understanding and ease of implemen-
tation: in principle everything could be done in a one-sorted language
(see (Slanina, 2001) for details; for a general discussion of the reducibility
of many-sorted to one-sorted logic see also (Davis, 1993)). If L is the
rst-order modal language, we dene L 0 to be a two-sorted language
where the sort term denotes L-terms and the sort set denotes objects
of the translation (possible worlds and sets thereof). The underlying
theory
is modied accordingly, with the third axiom now becoming
8x8y
We call this modied
theory
.
The rst translation (Montanari et al., 2000a) works for the fragment
of the Q1 language where modal operators cannot appear in the
scope of quantiers (below: \locally quantied formulae"). This case
appears often in practice and can be treated using the observation
that sentences can be decomposed into two disjoint parts: one rst-
order, but classical, and the other modal, but propositional. 3 More
precisely, a sentence of this fragment can be written as
are classical rst-order sentences and the
formula we obtain by replacing each ' i by a propositional variable p i ,
for short), is a propositional modal
formula. The simple, but crucial, observation at this point is that
derivability can be split accordingly, as stated in the following lemma.
Lemma 9. There is a nite set of classical propositional formulae
(over the variables
'g for all 2 ,
and, for all ,
Proof (sketch). Clearly,
3 This is the case, for instance, of Manna and Pnueli's temporal frame-work
(Manna and Pnueli, 1995), where most specications can be conned to this
restricted form of quantication.
Alternative Translation Techniques for Propositional and First-Order Modal Logics 11
Let be the set of propositional formulae on that are valid
under the substitution fp 1 7! ' g. Then, it is easy to see
that the right-hand side of (2) is equivalent to (p
nite modulo logical equivalence.
Using the above results, the translation is dened as follows.
Denition 10. As an auxiliary notation, we introduce a transformation
that adds an extra variable (representing a world in a Kripke
frame) to the arguments of each predicate symbol ( ~ t are terms):
Now x a variable w of sort set. The translation (
of a locally
quantied respect to the logic
axiomatized by
, is expressed as follows:
where
Here Axiom 2
(w) and are the same as in the propositional case, with
all bound variables of sort set.
The adequateness theorems are similar to the ones for the propositional
case:
Theorem 11 (Completeness).
Theorem 12
(Soundness).
Q1 F .
The proofs of these theorems can be found in (Montanari et al.,
2000a). We omit them here, since our next translation is stronger.
The second translation works for the full Q1 language and is developed
along a dierent line.
Alberto Policriti, and Matteo Slanina
Denition 13. The set-theoretic translation (
with respect to the logic with axiom
(a propositional modal
is the formula
Trans(w) and Axiom
(w) are the same as in the propositional case,
while ' (w) encodes the semantics of quantiers. The notation is as
follows: variables occurring|free or not|in ' are denoted by ~x, which
stands for x are fresh function symbols f for some subformulae
of ' (to be specied below), with signature set term
set. Each term t , with subformula of ', represents the set of worlds
where is true, in the frame w and under variable assignment ~x.
Formally, let be a superset of the set of the variables
appearing in '. Then
are
the free variables in ', with
2.
' (w) is simply the conjunction, over all subformulae of ', of the
formulae (w), where is dened as
(w) => > > > <
if is 8x i and x
are the free variables in
, with
otherwise.
In analogy to the propositional case, we now have the following
theorems, whose proofs are given in Section 5.
Theorem 14 (Completeness).
Theorem 15
(Soundness).
Example. Let ' be the formula
The superscripts mark the main operator of each of the eight subformulae
of '. Let
be the axiom of seriality,
Alternative Translation Techniques for Propositional and First-Order Modal Logics 13
some freedom of notation (e.g., we use 9 , whose direct translation is
obtained patching the one for 8 in the obvious way), the translation is
the following:
Axiom
5. Proofs
5.1. Proof of Theorem 7.
We only give a sketch of the proof. The interested reader is referred
to (Slanina, 2001) for the details.
\Only if". The proof is by contradiction: assume
that
i.e., by completeness of rst-order
logic,
. This means there
exists a model A
of
E and an assignment on A such that, putting
a A P A (a) ;
Let B be the model for MA dened in the obvious way taking as
domain the lower cone of A with supremum a (see (Slanina, 2001) for
details). Each term t in the language
of
E such that any occurrence of
n has w as its left argument can be mapped to a term t 0 in the language
of MA, and the assignment can be mapped into the assignment 0
on B dened by 0 in such a way that
and
14 Angelo Montanari, Alberto Policriti, and Matteo Slanina
It is then straightforward to prove that B 6 (
\If". The argument is analogous to the \only if" case, proceeding
by contradiction from a model A of MA such that A ~ 8(
building a model B
of
E such that B 6 (
5.2. Proof of Theorem 14.
We need a preliminary lemma, whose omitted proof directly follows
from Denition 13.
Lemma 16. If there is no free occurrence of x i in ', then there is no
occurrence of x i in t ' (w; ~x).
The proof of the theorem is by induction on the derivation of '.
Propositional Axioms. The proof is exactly the same as the one for
the propositional 2-as-Pow translation (cf. (D'Agostino et al., 1995)).
Universal Quantier Axioms. Let us assume, without loss of gener-
ality, that we are instanciating the variable x 1 and that the other free
variables in
where the substitution fx 1 7! sg is free for x 1 in (x 1 ). Let be
and
Assume ' (w) (Trans(w) and Axiom
(w) are not needed in the
proof). We shall prove that w t ' (w; ~x) by showing that, whenever
From Def. 13, we have that t
that is, taking
the negation out of the quantier,
with ' (w) (the (w) conjunct), this implies y 62 f (w; x
Modus Ponens and Necessitation Rule. Both proofs are basically the
same as those for the propositional case. Refer, again, to (D'Agostino
et al., 1995).
Alternative Translation Techniques for Propositional and First-Order Modal Logics 15
Universal Generalization Rule. Assume the same notation as with the
Universal Quantier Axiom schema. The rule has then the form
does not occur free in '. Let be the subformula 8x 1 . From
Def. 13, we get
Assume '!8x 1 (w) (Trans(w) and Axiom
(w) are not needed in
the proof). We shall prove that w t '!8x 1 (w; ~x) by showing that,
necessarily y 2 f (w; x
Assume y 2 w and y 2 t ' (w; ~x). By induction hypothesis, w (w n
contains no occurrence of x 1 ; hence, we can apply classical
Universal Generalization to conclude that
thus, from the conjunct (w) of the assumption '!8x 1 (w), that
Barcan Formulae. Let us call
and the formulae 8x 1 2 respectively, and let
xm be the free variables in (or, equivalently, in ). Then
Assume ' (w) and y 2 w. Then
_ 8z: set (z 2 y
_ 8z: set (z 2 y
Alberto Policriti, and Matteo Slanina
The rst equivalence is just the unfolding of the denition of t ' (w; ~x) by
the axioms
of
2 . In the second we dropped the subformula y 2 w from
the conjunct because it is true by assumption, and then we rewrote the
rst disjunct using (w) and the second using
the
In
the last, we used the denition of in the left disjunct and (w) in
the right one.
Now, to show that w t ' (w; ~x), we take, as above, y 2 w and assume
that the second disjunct of the last line is false, which is equivalent
to
This obviously implies the rst disjunct, thus proving the claim.
5.3. Proof of Theorem 15.
The proof is an adaptation of the technique introduced in the soundness
proof of the propositional case in (D'Agostino et al., 1995). More pre-
cisely, we are going to follow the proof of Theorem 5 of that paper. The
rst part is almost the same and we will state some lemmas without
proof.
Let U be a universe of hypersets satisfying all the axioms of ZF FA
(ZF except the Foundation Axiom) and AFA (see (Aczel, 1988) for
details).
Lemma 17. Let be an ordinal, V be the set of all well-founded sets
of rank less than , and U n V be the universe of all hypersets not
belonging to V . Then any model for the language
of
2 with domain
set and interpretation function () 0 satisfying
is a model
of
.
Proof. See Lemma 6 of (D'Agostino et al., 1995).
Given a frame (W; R; D), we want to embed it into the universe
suitable . In (D'Agostino et al., 1995), the authors
prove the existence of a labeled decoration such that the following
lemma holds.
Alternative Translation Techniques for Propositional and First-Order Modal Logics 17
Lemma 18. For each a; b 2 W ,
1. a
2. a 62 V +1 and a n V aRbg.
Proof. See (ii) and (iii) in Lemma 7 of (D'Agostino et al., 1995).
Now consider an interpretation
an assignment : f~xg ! D. Moreover, let M be the Q1 model
A model for the language
of
2 can be obtained as follows. First,
take the interpretation for set symbols as dened by the previous
lemmas and let D be the domain for the sort term. Then, interpret
term constant and function symbols as in FC and F F , respectively,
and, for each k-ary relational symbol Q, let f
be equal to
if this set is not empty, and to V +1 otherwise.
Finally, for each universally quantied formula
variables x j 1
be equal to
if this set is not empty, and to V +1 otherwise.
We call this model AM . Furthermore, let W be equal to fa j
a 2 Wg. W 62 V +1 because V +1 is transitive and, for each a 2 W ,
a 62 V +1 (Lemma 18).
Lemma 19. We have:
1. for each a 2 W , d
if and only if
a
2. AM ' (W ).
Proof. 1. Let The proof is by induction on '.
immediate from the denition of f
induction hypothesis) a
d) or a 2 0 t
d) ,
(for AM is a model
of
d)
d) , (by
denition of t ' ) a 2 0 t
d).
Alberto Policriti, and Matteo Slanina
d)
, (for a 2 0 W ) a 2 0 W and a 62 0 t
d) , (for AM
is a model
of
d) , (by denition of t ' )
a
d).
aRb , (by i.h.) for every b 2 W such that aRb, b 2 0 t
d)
d) , (by denition of
(by denition of t ' )
a
d).
immediate from the denitions of f
' and t ' .
2. Assume, without loss of generality, that
be the free variables in '. We are going to prove ' (W ). Let
a 2 W and d be arbitrary elements of D. Then a 2 0
f
(by denition of f
' , for every d 1 2 D, a; [x 1 =d (for the
rst part of this lemma) for every d 1 2 D, a
Corollary 20.
if and only if
Proof. Follows directly from Lemma 19 recalling that M Q1 L '
means that M Q1 L 8~x '.
Lemma 21. A modal propositional formula
, over the propositional
variables is valid in the frame (W; R) if and only if, for the
corresponding hyperset W ,
holds in U n V +1 .
Proof. See Lemma 9 of (D'Agostino et al., 1995).
To conclude the proof of Theorem 15, let us suppose that
4 By Lemma 16, all the d's beyond the m-th do not count in the interpretation.
Alternative Translation Techniques for Propositional and First-Order Modal Logics 19
be a model based on a frame in which
is valid (a Q1-L model). From Lemma 21 it follows that Axiom 2
is true in AM , and from the second part of Lemma 19 the same follows
for ' (W ). Furthermore, it is easy to prove that Trans(W ) holds
as well. Since AM is a model
of
and, by hypothesis, the formula
8~x: term W 0 t
is true in AM , it follows from Corollary 20
that M Q1 L '.
6. Conclusions and Open Questions
All the results presented in this paper uniformly rewrite the deduction
problem for various families of modal logics into deduction problems
with some form of set-theoretic
avor. The main contributions are the
proposal of an equational theory capable of driving the translation at
the propositional level and the extension of the 2-as-Pow translation
technique to a signicant class of rst-order modal logics.
A systematic study of set-theoretic translation techniques for different
kinds of rst-order modal logics could be carried out starting
from the ideas presented here. In this paper, we deliberately conned
ourselves to one of the most signicant classes. Moreover, we did not
consider the extension of the algebraic method to the rst-order case:
although we did not see any particular obstacle in principle, its development
would almost certainly have called for the introduction of
a very ad-hoc (two-sorted, non-equational) extension of the theory of
Boolean rings, thus stripping the method of its elegance (which was the
main motivation for its use in the propositional case).
All of the results mentioned call for specialized techniques explicitly
designed for deduction in such theories
as
or, better yet, able
to exploit the syntactic features of the formulae obtained from the
translation. Preliminary work in this direction is presented in (Piazza
and Policriti, 2000), where a tableaux-based decision procedure for a
class of formulae in which the resulting formulae can be embedded is
presented. Other related results can be found in (Cantone and Zarba,
2000; Cantone et al., 2001).
A further step toward the applicability of the results presented could
be obtained via a higher level of integration of the set-theoretic translation
with more classical techniques. For example, it would be interesting
to study the possibility of separating the rst-order denable portions
of a logic (for which more e-cient techniques are often available) from
contexts in which the 2-as-Pow is the only available translation. In this
context, we mention as an open problem, the question of precisely char-
20 Angelo Montanari, Alberto Policriti, and Matteo Slanina
acterizing the expressive power of locally quantied rst-order modal
logics (cf. Lemma 9).
Finally, another research task, related to the quest for specialized
techniques designed to be coupled with the translations presented here,
is the search for reduction orders and rewriting systems to be used in
automated engines for testing derivability in the
theory
introduced
in Section 3.
Acknowledgments
We wish to thank prof. Martin Davis for a careful proof-reading of the
nal draft of this paper.
--R
Modal Logic and Classical Logic.
Modal Logic
Set Theory for Computing.
From Decision Procedures to Declarative Programming with Sets
Handbook of Philosophical Logic
Journal of Arti
Lectures in Abstract Algebra
Temporal Veri
'EQP 0.9c User's Guide'.
Journal of Logic and Computation 1(5)
Bulletin of the IGPL 1(1)
Technical Report 07/01
--TR | first-order modal logics;computable set theories;translation methods |
594334 | Checking Simple Properties of Transition Systems Defined by Thue Specifications. | In (possibly infinite) deterministic labeled transition systems defined by Thue congruences, labels are considered as functions of states into states. This paper provides a method for computing domains of such functions for a large class of transition systems. The latter are related to model checking of transition systems defined by Thue congruences. | Introduction
Countable transition systems can model any software or digital hardware system and appear
as one of the most fundamental structures in computer science. While the research on finite
transition systems has a long tradition (see e.g. [1] for further references), infinite transition
systems have only recently attracted attention of computer scientists. One of the basic
problems concerning infinite transition systems is their effective description. We argue that
Thue systems may be used for defining both finite and infinite transition systems and semi-
Thue systems may be used as mechanization tools for reasoning about underlying transition
systems.
When a transition system models a real-life system, the properties of the latter correspond
to the theory of the transition system within some suitable logic. The falsity of a sentence
on a given transition system amounts to the emptiness of a certain set, namely the meaning
of the sentence. Roughly speaking, this set is obtained as a combination of the elementary
relations that interpret atomic formulae. Such a combination is computable whenever so are
elementary relations and the operators of the logic are simple enough. In particular, this is
the case for the Hennessy-Milner logic [9] where the elementary relations are unary and the
operations are boolean ones. To establish the truth of a sentence, the central problem is then
to compute the elementary relations. This is the subject of the present paper.
Our work is related to the well established grounds of formal verification which are based
on the connections between logic and formal languages (see e.g. [19]). In that approach, the
truth of a sentence on a finite transition system is checked using automata-theoretic con-
structions, and is decidable. The transition systems considered here are more general and
possibly infinite. As a consequence, the relations interpreting atomic formulae are not always
computable. In this situation, the truth is no more decidable. We thus fall into a common
pattern of various areas of automated reasoning where deduction rules do not yield an algorithm
but rather a not always terminating procedure. We follow a similar approach to the
problem which is a first step towards formal verification of what we call Thue specifications,
and may be summarized as follows.
The semantics of a Thue specification is given as a labeled transition system, the states
of which form a language over an alphabet \Sigma and labels belong to an alphabet \Gamma . Each label
a in \Gamma corresponds to an event and may be seen as a partial function of states. As in a Hoare
triple [']P [/], where the domain (resp. range) of a partial function associated to a program
P is restricted by a precondition ' (resp. postcondition /), an event a 2 \Gamma may be restricted
to a partial function of X into U where X and U are some subsets of the set of states. This is
written a: X!U . Besides letters of \Gamma , the words over \Gamma may be seen as functions. This leads
to the word-functions of the form u: X!U with . The problem studied in this paper is
that of finding the maximal subset X 0 of X on which u is defined and u(X 0 ) ' U . However, the
only solutions of interest are those which may readily be subject to boolean operations, and
for which the emptiness problem is decidable. Within the Chomsky hierarchy, only rational
languages satisfy both requirements. This leads us to the problem of determining the domain
of u: X!U whenever it is rational, assuming that both X and U are also rational. To solve
this problem, we introduce a procedure that is given under the form of three deduction rules
that derive a system of left-linear (language) equations from a word-function u: X!U . If the
procedure terminates, the least solution of the resulting system of equations is the domain of
u: X!U .
In deduction rule-based automated reasoning, the most fundamental issues are soundness
and completeness [20]. While the soundness is an obvious requirement, the completeness may
be out of range in certain situations. Unlike the set of consequences of a finite set of axioms,
the theory of a single structure need not be recursively enumerable. For instance, since the
theory of the standard model of arithmetics is undecidable (see e.g. [17]), by the Turing-Post
Theorem, one concludes that this theory is not recursively enumerable. A complete method
for deciding the truth of a sentence cannot exist in such a case. This limitation is well known
in the area of inductive theorem proving (see e.g. survey [4]). Similarly, the problem studied in
this paper is not recursively enumerable, hence the procedure introduced here is not complete.
In particular, this procedure is not guaranteed to terminate on each instance of the problem
which has a rational solution. Nevertheless, we establish a reasonably weak sufficient condition
for the termination and we show that this condition is satisfied by several well-known classes
of semi-Thue systems for which the termination is expected.
This paper is organized as follows. In Section 1 basic notions from language theory and
string rewriting are recalled. Section 2 introduces Thue specifications and their models. The
main problem of the paper is stated in Section 3 and is related to the Hennessy-Milner logic.
In Section 4 a procedure that treats the problem is provided. Section 5 is devoted to the
correctness of the procedure. In Section 6 it is established that the problem is not recursively
enumerable and a reasonably weak condition for the termination of the procedure is provided.
The techniques developed in the paper are applied in Section 7 to an example of a simple
railway network. Brief conclusions close the paper.
Assuming a minimum theoretical background from rational languages [16] and string-rewrit-
ing [6], we recall in this section several notions from these topics and we set some notations
for the sequel. The family of rational languages over an alphabet \Sigma is written Rat(\Sigma ) and
the family of the rational subsets of a language L ' \Sigma is written Rat(L), viz
stands for the powerset of L.
Systems of equations We speak of rational expressions in the usual meaning but we also use
rational expressions with variables. The variables are written are assumed
to form an infinite, countable set. Subsequently we shall often replace variables in a given
rational expression R (resp. set of equations E ) with some rational expressions (possibly with
variables) by applying a substitution oe on it. The resulting expression (resp. set of equations)
is written Roe (resp. E oe). A substitution of a single variable X by an expression P may be
its application on an expression R (resp. set of equations E) is written
A (left) linear system of equations is a set of equations such that, for each variable, there
is at most one equation with this variable as lefthand side and each equation is of the form
where Y is a rational expression, each Y i is a rational expression denoting a nonempty set and
are variables. In such an equation, Y is called constant term. We say that the system
of equations E is balanced if, for each variable X of the system, there is exactly one equation
in E with X as lefthand side.
Among all solutions of E with respect to (w.r.t.) a given variable X we distinguish the least
solution (w.r.t. inclusion). It is well known that a balanced linear system of n equations has
a least solution w.r.t. any of its variables. One may compute such a solution using the Gauss
elimination method. For more details related to this topic the reader may consult e.g. [3].
Suffixes, prefixes, quotients and remainders Given u; v; w 2 \Sigma such that
is called a prefix and v a suffix of w. When v 6= " (resp. u 6= "), u (resp. v) is a proper prefix
suffix ) of w. We note pref (u) (resp. suff (u)) the set of all the prefixes (resp. suffixes) of
a word u. These notations are extended to sets; for instance, given X ' \Sigma , pref (X) stands
for
u2X pref (u). When words x and z, then y is called a factor of w.
When xz 6= ", y is an proper factor of w.
The (right) quotient (resp. remainder) of M ' \Sigma by N ' \Sigma , written M=N (resp. MiN)
is defined as follows
resp.
As we will see further, some steps of the procedure that is the main point of this paper
depend on computations of quotients and remainders between rational languages. Remember
that the family of rational languages is closed under both quotients and remainders [10].
String rewriting A semi-Thue system (sts) S over an alphabet \Sigma is a binary relation on
di of S, also noted g ! d, is called a rule; l(r) (resp. r(r)) stands for the
lefthand (resp. righthand) side of r, i.e. g (resp. d). The latter notation is extended on sets of
pairs (e.g. binary relations, functions etc.), especially l(S) denotes the domain and r(S) the
range of S. An sts S is
1. special if
2. monadic if r(S) ' A [ f"g and jlj ? jrj for each (l; r) 2 S,
3. left-basic if for all x;
2 r(S) and for all x;
reduction relation "!
" on \Sigma is associated with S in the usual way, namely !
and the rewrite relation is the reflexive-transitive closure
of !
. A word is said to be reducible (resp. irreducible) w.r.t. S when it belongs
(resp. does not belong) to l(!
). The set of all irreducible words over \Sigma is written \Sigma # S . It
is well known that this set is rational whenever l(S) is so, since \Sigma #
. A
normal form of a word u w.r.t. S is an irreducible word v 2 \Sigma # S such that u
v. 1 We say
that an sts S is confluent when for all words u; v; v 0 2 \Sigma such that u
v and u
v 0 there
exists a word w 2 \Sigma such that v
w and v 0
w. If in addition S is terminating, i.e. there
is no infinite chain
is said to be convergent. It is well known that the
convergence of an sts implies the existence and uniqueness of a normal form of each word.
Throughout this paper we only use convergent semi-Thue systems and the unique normal
form of a word u is written u# S . In notation !
usually omit the subscript S when
there is no ambiguity about the sts we refer to. Notice that in our notations "#" has a lower
precedence than the concatenation, thus uv# stands for the normal form of uv.
Notations for rewriting of rational expressions are similar to those for individual words.
For sake of simplicity, we identify every rational expression with the language it denotes. We
may write etc. for any rational expressions X, Y that, in
this context, stand for associated languages. Consequently, we speak of the normal form of a
rational expression X and we write X# in the reference to the set fu# j u 2 Xg or possibly
to some rational expression denoting this set.
It may be useful to restrict applications of some rules of an sts so that they can only
rewrite prefixes of words. For this aim we may assume that each alphabet \Sigma may be extended
by an additional symbol
the words to rewrite belong to $ \Sigma \Sigma and S is a subset
of ($ \Sigma \Sigma \Theta $ \Sigma \Sigma ) [ (\Sigma \Theta \Sigma ). Note that if all rules are in $ \Sigma \Sigma \Theta $ \Sigma \Sigma then we are in
the particular case of regular canonical systems [5] (see also [8,15]). The latter are known as
generating rational languages.
Convergent Thue Specifications, Their Languages and Models
A convergent Thue specification cts is a triple h\Sigma is a state alphabet, \Gamma is
an event alphabet, R is a rational subset of $ \Sigma \Sigma (of \Sigma if S " ($ \Sigma \Sigma \Theta $ \Sigma \Sigma is a
finite convergent sts over \Sigma [ \Gamma and each word of R is irreducible, i.e. R 2 Rat($ \Sigma \Sigma # S ). The
distinction between state alphabet and event alphabet has no importance from a theoretical
point of view but is useful in practical situations. When simply write h\Sigma ; R; Si.
Recall that the convergence is not decidable in general. On the contrary, for a rational
language R, it is decidable whether R '
The aim of Thue specifications is to provide means for specifying and verifying processes.
This article does not discuss that approach as a specification technique but focuses merely on
We use a restricted version of the notion of normal form that is common in term-rewriting. In the general
version a normal form of a word u w.r.t. S is an irreducible word v 2 \Sigma #S such that u
v.
a basic problem related to formal verification. In this field, semi-Thue systems are needed.
Moreover since we are intersted in deterministic processes, we only consider confluent semi-
Thue systems.
The semantics of Thue specifications is given in terms of (a variant of) labeled transition
systems. Formally, a labeled transition system (lts) A is a tuple hQA
is a set of states, \Gamma is an alphabet, ' A 2 QA is an initial state and ffi A ' QA \Theta \Gamma \Theta QA a
transition relation. When (q; a; q 0 we say that q (resp. q 0 ) is the origin (resp. target)
of a transition labeled by a. A transition system is deterministic if for all q; q
each a implies that q
Each state q 2 QA recognizes some set of words of that is defined
as the smallest set satisfying the following conditions:
if
The language of A written L is the set of all words recognized by the states of A ,
namely
q2QA
Definition 2.1. An lts is an initial model of cts
and the following holds for all u; v 2 R and each a
if and only if ua#
The language L (cts) of a cts is the language of its initial model: L
cag
c
c
c
c
c
\Deltaff
A
A
A AU
a
c
c
c
c
c
c
c
c
\Deltaff
A
A
A AU
a
c
c
\Gamma\Psi
@
@
@ @R
a b
c
\Gamma\Psi
@
@
@ @R
a b
c c
c
c
c
c
c
\Deltaff
A
A
A AU
\Deltaff
A
A
A AU
ae
ae
ae
ae
ae
ae
ae
ae=
Z
Z Z
Z Z
Z Z Z~
c
a
a
c
c
a b
Fig. 2.1. A convergent Thue specification and its initial model
We emphasize that according to the above definition, the states QA of an initial model are
identified with the words of R. It may be observed that the confluence of S is sufficient for an
initial model to be deterministic. Consequently, convergent Thue specifications only model
deterministic processes. Henceforth, for an initial model A of a cts, ffi A is considered as a
function and we write ffi A (u; a) = v instead of (u; a; v) 2 ffi A . Another important observation
is that the language of a cts is always closed under nonempty prefixes because the language
of a transition system is so.
We speak of an initial model because one may define a satisfaction relation
labeled transition systems and Thue specifications. One may then consider the initial object
in the category of the models of a cts. This initial object may be alternatively characterized
as the initial model in the sense of the above definition. Obviously, the initial model is unique
up to isomorphism and always exists. An example of a convergent Thue specification together
with its initial model is provided in Fig. 2.1. In this example, the identification of the set of
states with R 1 is left as an exercise to the reader.
For sake of simplicity, from now on and up to Sect. 7, we neglect the distinction between
state alphabet and event alphabet. Both alphabets are assumed equal and a cts is written
3 Domains of Word-functions and the Hennessy-Milner Logic
In the previous section we explained the relationship between convergent Thue specifications
and deterministic labeled transition systems. To any convergent Thue specification h\Sigma ; R; Si,
one may associate its initial model, say A . Concerning A , a very basic problem consists
in characterizing all transitions with some given label a 2 \Sigma . More precisely, one may wish
to characterize all states that are origins of the transitions labeled by a. For this aim, it is
convenient to view a as a function of states 2 into states by writing a: R!R. The problem
consists therefore in characterizing the domain of this function. Instead of taking all the states
into account, one may consider a restriction of the above function written a: X!U , for some
subsets X and U of R. In the sequel, we restrict our attention to the case where both X and
U are rational subsets of R.
The main problem of this paper may be stated as follows.
Problem. Given a convergent Thue specification cts = h\Sigma ; R; Si and a function a: X!U
relative to cts and such that both X and U are rational subsets of R (X; U 2 Rat(R)), find
Dom(a: X!U), viz the domain of the function, whenever it is rational.
To better understand this problem, one has to reason about the initial model of the cts, say
A . According to Definition 2.1, given a state w 2 X we have
Hence, w 2 Dom(a: X!U) when wa# 2 U . Thus, Dom(a: X!U) is the largest subset X 0 of
X such that X 0 a# ' U .
In order to solve this problem, it is useful to consider a bit more general question that
appears as a technical trick without specific semantics related to transition systems. With
this aim in view, given u 2 \Sigma and rational subsets X;U of R, the word-function u: X!U
is defined as follows: u(w) = wu# S , for every w 2 X such that wu# S 2 U . Thus
Remember that R is the set of states of A .
It is important to note that, without additional assumptions, a word-function needs not
coincide with the corresponding composition of functions associated to labels. When
unless 1g. Since the set
of the states of a cts may be strictly included in \Sigma # S , the assumption about \Sigma # S being the
source or a the target of a function is not compatible with the semantics in terms of transition
systems. For this reason, the word-function are considered here as a technical tool without a
special meaning.
To close this section we point out that the problem we are interested in is related to the
model checking, at least in the context of the Hennessy-Milner logic.
Checking Properties Expressed in the Hennessy-Milner Logic
The formulae of the Hennessy-Milner logic [9] are built up from the constants 1 and 0,
using the classical connectives (:; ; "; etc.) and a unary operator hai for each letter a of the
alphabet \Sigma .
Given a labeled transition system A , the meaning of a formula ', viz the set of the states
of A that satisfy ', written ['] A , is inductively defined as follows:
where the map [hai] A : (QA defined by
When a transition system A is an initial model of cts Si, we can express
the meaning of a formula in terms of the domains of the word-functions. For this aim, the
equalities (3.1) remain valid (we have precisely [:']
becomes [hai] A
It is obvious from the above that the procedure developed in the sequel may be used
for checking the properties, expressed in the Hennessy-Milner logic, of systems defined by
convergent Thue specifications. This is relevant only for those cts's for which the procedure
succeeds in computing Dom(a: R!X) for all a 2 \Sigma and all X 2 Rat(R) (see Subsection 6.2).
Since in the case of success, Dom(a: R!X) is rational, the boolean operations stipulated in
may readily be performed.
4 Introducing the procedure
A method for solving the problem stated in the latter section is now developed. An instance of
the problem consists of a cts h\Sigma ; R; Si and a word-function u: X!U relative to it, such that
both X and U are rational subset of R. More precisely, X, U and R are rational expressions
that, for sake of simplicity, are identified with corresponding languages. In addition, u is
required to be irreducible. This is not restrictive since u: X!U and u#: X!U are equal due
to the convergence of S. Hence, if u is reducible, u has to be normalized before applying the
method.
The solution of an instance of the problem is the subset X 0 of X such that X
however that the method developed in the sequel can find X 0 only
rational. The method consists of a procedure that, provided it terminates, computes
a system of equations, the least solution of which is also the solution of the instance of the
problem. Basic ideas underlying the procedure are developed in subsequent paragraphs.
The task of finding Dom(u: X!U) becomes easier if X is partitioned into two parts Y and
Z such that Y u is irreducible and each word of Zu is reducible. Further, Z will be partitioned
into smaller parts, say Z . Indeed, such a "divide and conquer" strategy is based
on the following obvious equality
In order to characterize Z, assume that a rule g ! d of S is applicable to a word vu of Zu.
Since both v and u are irreducible, g overlaps v and u, i.e.
are such that x 6= " and w 6= ". This remark leads to the following
definition.
Definition 4.1. A word x 2 \Sigma is a left-overlap completion of u 2 \Sigma with respect to a
semi-Thue system S if there exist w; w 0 2 \Sigma such that xw 2 l(S), ww
left-overlap completion x of u is minimal if no left-overlap completion of u is a proper suffix
of x.
In view of the above definition, each word of Z has a suffix that belongs to the set, say L, of
all left-overlap completions of u. The set Y , being the complement of Z in X, is characterized
by X i L. In fact, one may characterize Y as X i L min where L min stands for the set of all
minimal left-overlap completions of u.
In order to partition Z into smaller parts, observe that, given a left-overlap completion x
of u, the expression (X=x)xu denotes all the words of Xu that may be reduced by any rule
d such that w is a prefix of u. Consequently, one may wish to partition Z according to L
as
x2L (X=x)x. However, this is not a partition because (X=x 1 )x 1 ' (X=x 2 )x 2 whenever
x 2 is a suffix of x 1 . In fact, it is L min that provides a partition of Z, namely
(X=x)x.
In sum, the following partition of X is used as basis for the divide and conquer strategy:
Now, according to (4.1), the domain corresponding to each part has to be found. With respect
to the first member of the above partition, it is not too difficult to see that
Indeed,
since both U and (XiL min )u are irreducible.
With respect to the other members of the partition described in (4.2), Dom(u: (X=x)x!U)
has to be found for each x 2 L min . Observe first that
Consider, now, various ways of computing (X=x)xu#. Obviously, one may compute xu# first
and subsequently compute the normal form of (X=x)(xu#). Thus
The maximal suffix of xu# that is not rewritten during any computation of the normal form
of (X=x)(xu#) now has to be isolated. The concept introduced in the following definition is
useful for this purpose.
Definition 4.2. A word v of \Sigma # is a right irreducible divisor with respect to an sts S when
f"g. The set of all right irreducible divisors w.r.t. S is written rid S .
For any u 2 \Sigma such that rid S we say that w is a right irreducible divisor of
w.r.t. S. The set of all right irreducible divisors of u is written rid S (u). A right irreducible
divisor of u is maximal if it is not a proper suffix of a right irreducible divisor of u.
It is easy to see that rid . Consequently, since S is finite and
\Sigma # is rational, rid S is rational too. It is also obvious that any right-irreducible divisor of
xu# is not rewritten during any computation of (X=x)(xu#:
Proposition. Any u 2 rid S and w 2 \Sigma satisfy
Let us go back to the problem of finding Dom(xu#: X=x!U) assuming that
z is the maximal right irreducible divisor of xu#. Suppose also that
for some V ' \Sigma . Then V in view of the above proposition, and V y#z ' U .
Therefore V y# ' U=z. Consequently In sum, taking (4.4) and (4.5)
into account, we have
The next definition is not indispensable since it just combines Definitions 4.1 and 4.2.
Nevertheless, it will allow a more concise presentation of the procedure.
Definition 4.3. A left-overlap triple of a word u w.r.t. S is a triple of words hx;
that x is a minimal left-overlap completion of u, z is the maximal right
irreducible divisor of xu#. The set of all left-overlap triples of u is written lot S (u), or simply
lot (u) if S is determined by context. A triple 2 lot (u) is written hx ; y ; z i.
The procedure is given in the form of three deduction rules (see Table 4.1) Generate,
and Eliminate, the first of which corresponds, roughly speaking, to the transformations
discussed up to now in this section. Using (4.1), (4.2), (4.6) and Definition 4.3, those
transformations may be summarized in the next lemma.
Henceforth we speak of an irreducible expression to mean that the expression denotes a
language, each word of which is irreducible.
Lemma 4.4. Let X be an irreducible rational expression and u an irreducible word. Then
U=z 6=?
The proof of the lemma follows from the above discussion together with the following remarks.
When X=x ?. For this reason, such
cases are excluded from (4.7). Also the first member of the above sum is written in a way
that slightly differs from the righthand side of (4.3), since Xi
and
x is the set of all minimal left-overlap completions of u (formerly L min ).
Table
4.1. Deduction rules
U=z 6=?
U=z 6=?
Xx
is a set of fresh variables.
We shall now describe the procedure by explaining its principles and related notations.
As mentioned at the beginning of this section, in case of success the result of the procedure
consists of a system of equations. Consequently, we still need some variables. In a derivation
of such a system, an expression of the form X 7! u: X!U with a variable X represents a
goal. This means that Dom(u: X!U) should be the least solution w.r.t. X of the resulting
system of equations. Each rule of a procedure is applied downwards with reference to some
goal. The goal is then said to have been treated ; otherwise it is called fresh. We denote by F
(resp. T) the set of fresh (resp. treated) goals. Thus, the procedure manipulates sequents of
the form T; F ' E where E is a system of equations.
Let us now explain the r"ole of each rule of the procedure. First note that any rule is
applied with reference to some fresh goal. Given a fresh goal X 7! u: X!U the rule Generate
introduces a new equation based on (4.7)
U=z 6=?
and for each 2 lot(u) such that X=x 6= ? and U=z 6= ?, it introduces a fresh goal
Each X is some new variable. The goal X 7! u: X!U is then no
longer fresh and is transferred to T. Notice that if, in the new equation, we replace X by
Dom(u:X!U) and each X by Dom(y : X=x !U=z ) we thereby obtain (4.7). The fresh
introduced in this step correspond to the principle that the
procedure should be applied recurrently in order to compute Dom(y : X=x !U=z ).
The following idea underlies the rule Identify. If there is a treated goal X 7! u: X!U (the
one for which an equation has been generated) and a fresh goal X 0 7!
then we should not generate an equation from X 0 7!
Instead, we identify the two variables X and X 0 . This is realized by renaming X 0 as X in the
current system of equations. The goal X 0 7! simply removed from F.
The rule Eliminate deals with goals X 7! u: X!U such that Xu is irreducible. A fresh
goal satisfying this condition is moved to T and the equation is added to the
systems of equations.
The applicability of the above rules is restricted by certain conditions (written beside each
rule). We insist on the fact that within such applicability conditions Xu be understood as a
language and r(T) as a set of word-functions (the range of the assignment T). The notation
F q fX 7! u: X!Ug is used for a partition of some F 0 such that X!Ug.
Derivations and related concepts are defined as follows.
A derivation is a (possibly finite) sequence of sequents s 0
for each there exists an instance of a rule, the upper and lower sequent of
which are equal resp. to s i and s i+1 , and s i satisfies the applicability conditions of the rule.
A derivation is called maximal when it is not a proper prefix of another derivation. We say
that a sequent is pure when it is of the form ?; fX 0 7! stands
for an irreducible rational expression and u 0 an irreducible word such that rid f"g. We
say that a derivation is pure when it starts with a pure sequent.
In order to compute Dom(u: X!U) the procedure starts with the pure sequent
f"g. This is not restrictive since, if
with z the maximal right irreducible divisor of u such that z 6= ", then
X!U=z). The procedure may therefore start with the pure sequent
?; fX 7! y: X!U=zig ' ?. Next, the rules are applied as long as possible in order to
produce a maximal derivation. The procedure stops if no rule may be applied. This happens
only if there are no more fresh goals. It then remains to compute the solution of the resulting
system of equations w.r.t. X . Let us illustrate this by applying the procedure to an example.
Example 4.5. Let cts 1 be the convergent Thue specification of Fig. 2.1. We want to compute
We check that both $(a are irreducible, and rid(c) =
f"g. Taking into account that lot (c) = fha; "; bi; hb; c; aig, we have the following derivation.
Generate
ae
oe
Eliminate
ae
oe
ae
oe
ae
oe
ae
oe
Finally, the least solution of the resulting system w.r.t. X 0 yields
as expected, according to the minimal model of cts 1 depicted on Fig. 2.1.
5 Correctness of the procedure
Usually, a sequent-like calculus is correct, when it transforms valid sequents into valid ones.
We shall use the following notation in order to explain what we mean by "valid sequent".
Notation 5.1. For any set G of goals, we denote by oe G the following substitution:
The following definition is used as basis for the correctness.
Definition 5.2. A sequent T; F ' E is valid, when Dom(v: Y !V ) is the least solution of
goal Y 7! v: Y !V 2 T.
We need to establish the following theorem.
Theorem 5.3. Any sequent of a pure derivation is valid.
Proof. Let be a derivation satisfying the assumptions of the theorem and let us
prove the statement for any sequent s k by induction on k 2 N.
Basis: The statement holds trivially for any pure sequent ?; fX 0 7!
Induction step. We have to distinguish 3 cases depending on the rule that yields s k from s k\Gamma1 .
By induction hypothesis s k\Gamma1 is valid and the validity of s k is obtained using the correctness
of each rule, established in Appendix B. 2
The main result on the correctness is given as corollary of Theorem 5.3.
Corollary (Correctness). Let D be a maximal finite derivation starting with a pure sequent
be the last sequent of D. Then Dom(u: X!U) is
the least solution of
Proof. It is obvious that on the first sequent either Generate or Eliminate may by applied.
Consequently, X 7! u: X!U 2 T. On the other hand, F is empty, since no rule can be
applied on the last sequent of D. Hence oe F is empty and by Theorem 5.3 we conclude that
Dom(u:X!U) is the least solution of
6 Incompleteness and termination
Since the procedure computes only linear systems of equations, the rationality of the domain
of a word-function is obviously a necessary condition for the termination. To see that this
condition is not sufficient, consider the following specification: cts
apply the procedure to the
goal . The procedure generates the following infinite sequence of goals:
This example points out that the procedure is not complete. In fact, as established in the
next subsection, a complete procedure for this problem cannot exist. (By the completeness of
the procedure we mean that it terminates on each instance of the problem that has a rational
solution.) In Subsection 6.2, we therefore investigate a sufficient condition for the termination
of our procedure.
6.1 Incompleteness of the problem
The question as to whether a complete procedure exists for this problem is equivalent to the
recursive enumerability of the following set of tuples:
More precisely, we consider an even simpler version of the problem where the cts's are of
the form h\Sigma ; \Sigma #; Si and the word functions are of the form a: X!U . We establish that the
following set of pairs is not recursively enumerable:
is a convergent sts over \Sigma , a 2 \Sigma ;
To this end we reduce the complement of the halting problem for Turing machines. More
precisely, given a deterministic Turing machine T and an input word w, we construct a
convergent sts and a word-function the domain of which is rational if and only if T does
not halt on w.
be a deterministic single-tape Turing machine, where
is the tape alphabet, denotes the blank symbol, Q is the set of states,
is the transition function and q 0 is the initial (resp.final) state. Observe that without
loss of generality it is implicitly assumed here that T cannot print . Consequently, each tape
cell that has been visited by the tape head contains a letter of \Pi and the language accepted
by T is
stands for the reflexive-transitive closure of the single-step computation relation ' T
Without loss of generality we assume in addition that
is the set of "overlined"
versions of letters of \Pi and 0; 0; are additional symbols. Let
be an input word.
Given the pair hT ; wi we construct the pair hS T ; %:Xw!U# i where
and the sts ST over \Sigma is the union of several groups of rules below. When two rules differ
only by 0 or 1, we abbreviate them by meta-variables ; 0 that rank over f0; 1g. The use of
"overlined" ("underlined") symbols is not relevant for the understanding of the construction
but aims at avoiding overlaps between lefthand sides of ST . At first reading the reader may
assume that the "underlined" and "overlined" versions of any symbol and the symbol itself
are identical.
ffl Initialization rules
ffl Rules that simulate the behaviour of T
ffl Rules that apply immediately after each simulation step that does not result in a configuration
where the tape head reads
ffl Rules that apply before each simulation step (after (ii) or (vii))
ffl Terminal rules
Before justifying this construction, we state several lemmas. The first one is obvious.
Lemma 6.1. Both Xw and U# are irreducible w.r.t. ST . 2
Lemma 6.2. ST is confluent.
Proof. To establish the confluence, it is enough to check that the lefthand sides of ST do not
Lemma 6.3. ST is terminating.
Proof. Consider the following precedence on \Sigma : 0 1 a # for all a 2 \Pi. Let 1 be
the following (rewrite) ordering on (\Sigma r f%g) :
where lex is the lexicographic extension of and e
x (resp. e y) stands for the reversal of x
(resp. y). Using 1 we define a (reduction) ordering 2 on (\Sigma r f%g) :
It is easy to check that, except for (i), each rule of l ! r 2 ST satisfies l 2 r. Let then 3
be a (reduction) ordering on \Sigma defined, for all x; y 2 \Sigma , as follows: x 3 y if
stands for the number of occurrences of % in x
- or
where lex
stands for the lexicographic extension of 2 .
Now, for Rule (i) we have % 3 % because (0; ") lex
1). For each
other rule l ! r 2 ST we have also l 3 r because 2 and 3 coincide on (\Sigma r f%g) . 2
Justification of the construction Given a word q 0 wx 2 Xw , where
some a below the
rewrite steps of the word q 0 wx%. (The sequences of rules used in these steps are denoted by
rational expressions.)
Starting from q 0 wx% we get
and by
we end up with u n q n v n #, provided that
Thus if T does not halt on w, Dom(%:Xw!U#
Assume then that T halts after k steps in a configuration u k q f v k and let v
for some b the length 2n of x may be arbitrarily big, without loss of
generality we assume that n ? k l. Starting with q 0 wx% analogous rewrite steps lead to
We then get
(viii) (ix)(vii)
Now, using the rules (x) and (xi) we end up with u k q f # if and only if the word
belongs to the Dyck language D . Consequently Dom(%:Xw!U#
which is not a rational language.
We have therefore established the following lemma.
Lemma 6.4. Dom(%:Xw!U# ) is rational if and only if T does not halt on w. 2
Putting together Lemmas 6.1, 6.2, 6.3 and 6.4 and taking into account the fact that the
complement of the halting problem for Turing machines is not recursively enumerable, we
conclude that the following holds.
Theorem 6.5. DomRat is not recursively enumerable. 2
In view of this theorem a complete procedure for the problem of computing rational domains
of (even single-letter) word-functions cannot exist. Otherwise, there would exist a Turing
machine that "semi-decides" the complement of the halting problem.
6.2 Termination
In this subsection we state a sufficient condition for the termination of the procedure. The
following definition provides a tool for studying the termination.
Definition 6.6. The generation set for a goal X 7! Dom(u:X!U) w.r.t. an sts S, written
is the smallest subset of \Sigma \Theta (\Sigma )\Theta (\Sigma ) that contains hu; X;Ui and such that
whenever hv; Y; W for each 2 lot (v).
In the sequel, we shall consider the first, the second and the third projections of a generation
set G S (u; X;U
We now state two lemmas that lead to the final result of this section. The first one is
obvious.
Lemma 6.7. A maximal derivation starting with a pure sequent ?; fX 7! Dom(u: X!U)g '
? is finite if and only if its generation set is finite. 2
Lemma 6.8. The second (resp. third) projection of a generation set G S (u; X;U) is finite if
Proof. Note first that for a given rational set Z the cardinality of the set
is not greater than 2 k , where k is the number of states of a minimal automaton accepting Z.
In order to prove the statement, it is therefore enough to show that 2 (G S (u; X;U)) ' QX
According to Definition 6.6,
there exist hy
and
lot (y n ). Thus
Hence
The following theorem states a simple sufficient condition that guarantees that the procedure
will terminate.
Theorem 6.9. Starting with a pure sequent ?; fX 7! Dom(u: X!U)g ' ?, the procedure
terminates if
1. S is finite,
2. for each minimal left-overlap completion x of u, the word xu belongs to l(S) and
3. for each rule r 2 S, any 2 lot (r(r)) and any minimal left-overlap completion x 0 of y ,
the word x 0 y belongs to l(S).
Proof. According to Lemmas 6.7 and 6.8, the termination of the procedure is guaranteed
if 1 (G S (u; X;U)) is finite. An easy induction allows us to establish that for any y in
there exists a rule r 2 S such that xy and x is a minimal left-overlap
completion of y. Hence 1 (G S (u; X;U)) is included in a finite set, namely suff (l(S)). 2
Note that, when used for computing the domain of a word-function that is a single letter
(as e.g. in the case of the Hennessy-Milner logic), the procedure terminates provided that
both the first and the third requirements of Theorem 6.9 hold. We may use this observation
for more general word functions. In order to compute Dom(u: X!U) w.r.t. h\Sigma ; R; Si such
that when the second requirement of Theorem 6.9 is not satisfied
whereas the first and the third ones are, we may proceed as follows.
1. compute the ranges of the word functions:
(For the computation of ranges we may use the procedure of [11]. This procedure always
terminates for a single-letter word-function under conditions 1 and 3 of Theorem 6.9.)
2. Set D apply the procedure for computing the domains
of the word functions:
Now
It is important to point out three classes of semi-Thue systems that may successfully
be used for letterwise computation of domains of word-functions, namely left-basic sts's,
monadic sts's and special sts's.
Corollary 6.10. Starting with a pure sequent ?; fX 7! Dom(a: X!U)g ' ?, where a 2 \Sigma ,
the procedure terminates if S is finite and is special, monadic or left-basic.
Proof. When S is monadic, for any r 2 S, the set lot (r(r)) may contain only elements of the
form hx; a; "i or hx; "; ai such that xr(r) ! a is a rule of S. When S is left-basic or special,
obviously for each rule r of S. Hence the sts's that are special, monadic or
left-basic satisfy the third requirement of Theorem 6.9. 2
In view of the corollary, we may assert that the requirements of Theorem 6.9 provide a
reasonably weak sufficient condition for termination. These requirements capture the well
known classes of sts's, the models of which are related to the transition graphs of pushdown
machines [7,12]. For the latter, the rationality of the domains of word-functions follows from
the well known fact that the pushdown store languages are rational. In addition, the scope
of Theorem 6.9 is not restricted to special, monadic or left-basic sts's. Indeed, S 1 (see Fig.
2.1) is neither special, monadic nor left-basic whereas it satisfies the requirements 1 and 3 of
the theorem.
Last but not least, the example of non termination that opened this section has one
interesting property, namely that cts 0
equivalent to cts 2 , in the sense that cts 2 and cts 0
2 have the same initial model. But this
time the procedure terminates for cts 0
2 on any single-letter word-function.
7 Final Example
We consider a simple portion of a railway network. A single track connects two stations: left
(L) and right (R), via a central one (C), as on the following picture.
L C R
All trains run from L to R or vice-versa with a stop at C, never being allowed to go in reverse.
The central station has two platforms allowing train crossing. Each of these platforms may
be occupied by at most one train.
To model this situation we may consider the following state alphabet \Sigma
a train has left L but has not yet arrived at C
a train has left R but has not yet arrived at C
\Gamma! D C
a train has left C for R but has not yet arrived at R
a train has left C for L but has not yet arrived at L
\Gamma! A C
a train coming from L is waiting on a platform of C
a train coming from R is waiting on a platform of C
The underlined versions of \Gamma! D C
have no special meaning for the modeling but aim
at making easier the definition of transitions by a semi-Thue system. For this reason, we
distinguish the set \Sigma 0 of non-underlined letters of \Sigma : \Sigma
g. We also
consider the following event alphabet \Gamma .
d L
departure of a train from L
departure of a train from R
\Gamma! d C
departure of a train from C for R
departure of a train from C for L
\Gamma! a C
arrival of a train from L at C
a C
arrival of a train from R at C
a L
arrival of a train at L
a R
arrival of a train at R
In our modeling a train "appears" when it leaves one of the stations L or R and "disap-
pears" when it arrives at the opposite terminal station. Since the trains do not go in reverse,
there is a deadlock, when two trains run towards one another on the same portion of the track
(between L and C or between C and R).
In order to define the set R of states, we need the following expressions, each of which
describes, in fact, a subset of R satisfying some characteristic property (stated between paren-
(D L
trains run from L to R),
trains run from R to L),
(D L
trains run towards C),
trains run from C to L or R).
Using the above expressions, the states of the system may be defined as follows:
A word of R reflects the events in the reverse chronological order (a state alphabet letter
corresponding to the most recent event is written immediately after $). For instance
means that there is one train, say t running from R to C, a second one, say t running from
L to C and a third one, say t 3 , on a platform of C coming from R. The events corresponding
to this configuration occurred in the following has left R before t 2 left L and t 2 has
left L before t 3 arrived at C.
The transitions are defined by the following sts S over f$g [
xd L
\Gamma! d L
x for x 2 \Sigma 0 xd R
\Gamma! d R
x for x 2 \Sigma 0
$d L
\Gamma! $D L
\Gamma! $D R
x \Gamma! a C
\Gamma! \Gamma! a C
x /\Gamma a C
\Gamma! /\Gamma a C
x for x 2 \Sigma 0 r f \Gamma! D C
\Gamma! a C
\Gamma! \Gamma! A C
a C
\Gamma!
x \Gamma! A C
\Gamma! \Gamma! A C
\Gamma!
x for x 2 \Sigma 0
\Gamma!
\Gamma!
x \Gamma! d C
\Gamma! \Gamma! d C
x for x 2 \Sigma 0 r f \Gamma! A C
x /\Gamma d C
\Gamma!
\Gamma! A C
\Gamma! d C
\Gamma! \Gamma! D C
\Gamma!
x \Gamma! D C
\Gamma! \Gamma! D C
\Gamma!
x for x 2 \Sigma 0
\Gamma!
\Gamma!
\Gamma! a R
x for x 2 \Sigma 0 r f \Gamma! D C
xa L
\Gamma! a L
\Gamma! D C
a R
a L
When a meta-variable x is replaced by all possible values, we get a system of 62 rules with
non-overlapping lefthand sides. This system is therefore finite and confluent. The termination
of S may readily be established using standard reduction orderings, thus concluding that S
is convergent.
As an example of questions concerning this system, we may ask about the set of states in
which a departure of a train may occur at one of the terminal stations, for instance at R. The
set of such states, say P
, is precisely given by P d R
computing P d R
it is useful to ask about the termination of the procedure in this case. Since the first condition
of Theorem 6.9 is obviously satisfied by S, we check whether the second one is satified by d R
Indeed, for each letter a and any left-overlap completion x of a, we have xa 2 l(S). Hence, it
remains to verify the third condition of Theorem 6.9. To this end, we compute the set T of
left-overlap triples of r(S):
For the rules with a meta-variable, we obtain, for all x 2 \Sigma 0
lot(d L
xig
lot (d R
xig
lot ( \Gamma! a C
lot ( /\Gamma a C
lot( \Gamma! A C
xig
lot(
xig
lot ( \Gamma! d C
lot ( /\Gamma d C
lot ( \Gamma! D C
xig
lot ( /\Gamma D C
xig
lot(a R
lot (a L
For the rules with $, we have
lot($D L
\Gamma! A C
and for other rules
lot(
\Gamma! A C
ig
lot(
ig
lot ( \Gamma! D C
ig
lot ( /\Gamma D C
ig
We observe that 2 (T ) f"g. Thus, for each u 2 2 (T ) and each left-overlap
completion x of u we have xu 2 l(S), meaning that the third condition of Theorem 6.9 is
satisfied. We may therefore conclude that the procedure terminates here for any single-letter
word-function.
Starting with a pure sequent ?; fX 7! Dom(d R
the procedure terminates
and yields a system of equations, the least solution of which is, as expected,
ing
Thus, the departures of trains from R are possible only when there are no trains running from
C to R.
Concluding remarks
Semi-Thue systems and transition systems have been related here by sketching a formal
specification technique named as Thue specifications. A particular emphasis has been placed
on the simplest case of the problem of formal verification. A pragmatic point of view has been
necessary in approaching the latter problem, since this has been shown not to be recursively
enumerable, and has led to an incomplete procedure. This problem is perhaps the most
elementary problem that one has to deal with in order to be able to approach the model
checking of Thue specifications, at least in the special case of the Hennessy-Milner logic.
However, since the expressive power of the latter is not very rich, our work needs be extended
so as to handle more powerful logics. With this aim in view, our attention is currently focussed
on the monadic second-order logic [13].
One of the most important problems concerns the specification of systems that consist of
interacting processes. This problem may be handled via the concept of synchronized product
[2]. Within that approach, each component of the system is specified separately and interactions
between components are defined as synchronization constraints. For instance, the
railway example may be specified in an even more elegant way as four interacting processes:
the two portions of the track and the two platforms of the central station. When a system
is specified componentwise by several Thue specifications provided with a synchronization
constraint, these specifications may be combined into a single one, (on wich the procedure
may be applied for checking the properties of the system). Based on the ideas of [14], an
algorithm that performs the latter task, has been developed [18].
Acknowledgments
We wish to thank Marie-Catherine Daniel-Vatonne and '
Etienne Payet
for careful reading of a preliminary version of this paper, and Adrian Bondy for correcting
the English text. We are grateful to Damian Niwi'nski for numerous suggestions that helped
improving the presentation of this paper. Special thanks are due to Serge Burckel whose
comments have influenced Subsection 6.1 and to an anonymous referee that has suggested
the current proof of Lemma 6.3 which is more elegant than our original proof.
--R
Finite Transition Systems.
Comportements de processus.
Theorem proving in hierarchical clausal specifications.
Regular canonical systems.
A string-rewriting characterization of context-free graphs
On the regular structure of prefix rewriting.
Algebraic laws for nondeterminism and concurrency.
Introduction to Automata Theory
A procedure for computing normal forms of certain rational sets.
The graphs of finite monadic semi-Thue systems have a decidable monadic second-order theory
Thue specifications and their monadic second-order properties
A method for enumerating cosets of a group presented by a canonical system.
Finite automata.
Mathematical Logic.
An automata-theoretic approach to automatic program verification
Automated reasoning: Introduction and Applications.
first occur all self-Identify steps
and other Identify steps occur after.
--TR | automated deduction;infinite-state systems;formal verification;string-rewriting |
594344 | SAT-Based Decision Procedures for Classical Modal Logics. | We present a set of SAT-based decision procedures for various classical modal logics. By SAT based, we mean built on top of a SAT solver. We show how the SAT-based approach allows for a modular implementation for these logics. For some of the logics we deal with, we are not aware of any other implementation. For the others, we define a testing methodology that generalizes the 3CNFi>K methodology by Giunchiglia and Sebastiani. The experimental evaluation shows that our decision procedures perform better than or as well as other state-of-the-art decision procedures. | Introduction
Propositional reasoning is a fundamental problem in many areas of
Computer Science. Many researchers have put, and still put, years of
eort in the design and implementation of new and more powerful SAT
solvers. Most importantly, the source code of many of these implementations
is freely available and can be used as a basis for the development
of decision procedures for more expressive logics (see, e.g., (Giunchiglia
and Sebastiani, 1996a; Cadoli et al., 1998)).
In this paper, we present a set of SAT-based decision procedures for
various classical modal logics (Montague, 1968; Segerberg, 1971). By
SAT-based, we mean built on top of a SAT solver. We show how the
SAT-based approach allows for a modular implementation for these
logics. For some of the logics we deal with, we are not aware of any
other implementation. For the others, we dene a testing methodology
which generalizes the 3CNFK methodology by Giunchiglia and
(1996a). The experimental evaluation shows that our deci-
1999 Kluwer Academic Publishers. Printed in the Netherlands.
A. Tacchella
sion procedures perform better than or as well as other state-of-the-art
decision procedures.
Our approach, rst suggested by Giunchiglia and Sebastiani (1998),
consists of two steps:
1. take o the shelf one of the fastest SAT procedures available, and
2. use it as the basis for your modal decider.
Our approach diers from most of the previous works in decision
procedures for modal logics, which are either tableau-based, (i.e., based
on Smullyan's tableau for propositional logic (Smullyan, 1968): see,
e.g., (Fitting, 1983; Massacci, 1994; Baader et al., 1994)), or translation-based
(i.e., based on a reduction to rst order logic: see, e.g., (van
Benthem, 1984; Ohlbach, 1988; Hustadt and Schmidt, 1997a)). Some
of the dierences and advantages of the SAT-based approach with respect
to the tableau based and translation based approaches have been
already pointed out in (Giunchiglia and Sebastiani, 1996b; Giunchiglia
et al., 1998). Here we show how the SAT-based approach provides for a
simple and natural schema for the development of decision procedures
for modal logics.
Our approach diers also from the approaches by Horrocks (1998)
and Patel-Schneider (1998). These authors developed their own SAT
checker and used it as a basis for their modal decider. This approach
allows for a better integration among the dierent modules of the system
and for a ner tuning of the reasoning strategies. On the other
hand, it does not exploit the great amount of ongoing work on SAT
deciders. Each year, new and faster SAT engines are proposed. With
some standard modications of the source code we can inherit in the
modal setting all the benets of state-of-the-art propositional checkers. 1
Finally, our system, called *sat, improves also on previous works
by Sebastiani and ourselves (1996a; 1996b; 1998). In particular,
*sat is built on top of the SAT decider sato (Zhang, 1997). *sat
inherits many of the sato congurable options, and allows for
some more options (including early pruning, caching, two forms of
backjumping, and the choice of various splitting heuristics); and
*sat is able to deal with 8 modal logics, namely E, EM (=M),
EN, EMN, EC, EMC (=R), ECN, EMCN (=K) (see (Chellas,
1980)). For EN, EMN, EC and ECN, we do not know of any
similar point is made by Kautz and Selman (1998) as an explanation for the
better performances of SATPLAN with respect to specialized engines for planning
problems.
SAT-Based Decision Procedures for Classical Modal Logics 3
other implemented decision procedure, nor of any reduction to a
formalism for which a decision procedure is available.
The paper is structured as follows. In Section 2 we review some
basic denitions about classical modal logics. Then, in Section 3, we
present the idea of the SAT-based approach to modal reasoning, and
discuss in detail the algorithms for the 8 logics we consider. Section 4
is devoted to *sat: it discusses some of the motivations underlying
its construction, and some of its features. The experimental analysis
comparing *sat with other state-of-the-art decision procedures is done
in Section 5. Our analysis is restricted to K (for which there are several
systems available) and E (for which there exists a reduction to bimodal
K). We end in Section 6 with the conclusions and the future work.
2. Classical modal logics
Following (Chellas, 1980), a modal logic is a set of formulas (called
theorems) closed under tautological consequence. Most modal logics
are closed under the rule
for certain values of n. If then the logic is said to be monotone.
then the logic is said to be regular. If n 0 then the logic is
said to be normal. The smallest monotone, regular and normal modal
logics are called M, R and K respectively (see, e.g., (Chellas, 1980)).
Classical modal logics (Montague, 1968; Segerberg, 1971) are weaker
than normal modal logics. In fact, the only requirement is that the set
of theorems is closed under the rule
As a consequence, the schemas
2 The symbols > and ? are 0-ary connectives representing truth and falsity
respectively.
4 E. Giunchiglia, F. Giunchiglia and A. Tacchella
which are theorems in K do not necessarily hold in classical modal
logics. The three principles N, M, and C enforce closure conditions on
the set of provable formulas which are not always desirable, especially if
the 2 operator has an epistemic (such as knowledge or belief) reading.
If we interpret 2' as \a certain agent a believes '", then N enforces
that a believes all the logical truths, M that a's beliefs are closed under
logical consequence, and C that a's beliefs are closed under conjunction.
These three closure properties are dierent forms of omniscience, and
|as such| they are not appropriate for modeling the beliefs of a real
agent (see, e.g., (Giunchiglia and Giunchiglia, 1997) and (Fagin et al.,
Chapter 9). We can easily imagine situations involving a's beliefs,
where only an arbitrary subset of the above properties holds.
There are eight possible ways to add the three schemas M, C, and
N to the smallest classical modal logic E. The resulting modal logics
are called E, EM (equivalent to the logic M), EN, EMN, EC, EMC
(equivalent to R), ECN, EMCN (equivalent to K), where EX denotes
the logic obtained adding the schemas in X to E.
3. SAT-based procedures for classical modal logics
We say that a conjunction of propositional literals and formulas of the
form 2' or :2' is an assignment if, for any pair ; 0 of conjuncts in
, it is not the case An assignment satises a formula
' if entails ' by propositional reasoning. A formula ' is consistent
in a logic L (or L-consistent) if :' is not a theorem of L, i.e., if :' 62
L.
Consider a formula '. Let S be a set of assignments satisfying ', and
let L be a modal logic. As noticed by Sebastiani and Giunchiglia (1997),
the following two facts hold:
If at least one assignment in S is L-consistent then ' is L-consistent.
If no assignment in S is L-consistent then ' is not L-consistent as
long as the set S is complete for ', i.e., as long as the disjunction
of the assignments in S is propositionally equivalent to '.
From these facts, it follows that the problem of determining whether '
is L-consistent can be decomposed in two steps:
generate an assignment satisfying ', and
test whether is L-consistent.
In all the logics we consider, testing the consistency of an assignment
amounts to determining the consistency of other formulas whose
SAT-Based Decision Procedures for Classical Modal Logics 5
depth (i.e., the maximum number of nested 2 operators) is strictly minor
than the depth of . This implies that we can check the consistency
of these other formulas by recursively applying the above methodology,
at the same time ensuring the termination of the overall process. The
above methodology can be implemented by two mutually recursive
procedures:
Lsat(') for the generation of assignments satisfying ', and
Lconsist() for testing the L-consistency of each generated assignment
.
In order to simplify the presentation, we rst present Lconsist(),
and then Lsat(').
3.1. Lconsist()
Whether an assignment is consistent, depends on the particular logic
being considered. Furthermore, depending on the logic L considered,
the consistency problem for L (i.e., determining whether a formula is
consistent in L) belongs to dierent complexity classes. In particular,
the consistency problem for E, EM, EN, EMN is NP-complete, while
for EC, ECN, EMC, EMCN it is PSPACE-complete (see (Vardi, 1989;
Fagin et al., 1995)). Here, to save space, we divide these eight logics in
two groups. We present the algorithms for checking the L-consistency
of an assignment rst in the case in which L is one of E, EM, EN, EMN,
and then in the case in which L is one of the others.
3.1.1. Logics E, EM, EN, EMN
The following Proposition is an easy consequence of the results presented
in (Vardi, 1989).
PROPOSITION 1. Let
be an assignment
in which
is a propositional formula. Let L be one of the logics E, EM,
EN, EMN. is consistent in L if for each conjunct :2 j in one of
the following conditions is satised:
L-consistent for each conjunct 2 i in , and L=E;
L-consistent for each conjunct 2 i in , and L=EM;
are L-consistent for each conjunct 2 i in
, and L=EN;
are L-consistent for each conjunct 2 i in ,
and L=EMN.
6 E. Giunchiglia, F. Giunchiglia and A. Tacchella
function Lconsist(
foreach conjunct 2 j do
foreach conjunct 2 i do
if M [i;
if M [j;
if M [j; False then return False
if M [j;
if M [j; False then return False
return True.
Figure
1. Lconsist for E, EM, EN, EMN
When implementing the above conditions, care must be taken in order
to avoid repetitions of consistency checks. In fact, while an exponential
number of assignments satisfying the input formula can be generated by
Lsat, at most n 2 checks are possible in L, where n is the number of \2"
in the input formula. Given this upper bound, for each new consistency
check, we can cache the result for a future possible re-utilization in a
This ensures that at most n 2 consistency checks will
be performed. In more detail, given an enumeration of
the boxed subformulas of the input formula, M[i,j], with i 6= j, stores
the result of the consistency check for (' i ^:' j ). M[i,i] stores the result
of the consistency check for :' i . Initially, each element of the matrix
M has value Undef (meaning that the corresponding test has not been
done yet). The result is the procedure Lconsist in Figure 1.
Consider Figure 1 and assume that L=E or L=EN. Given a pair of
conjuncts 2 i and :2 j , we split the consistency test for (
in two simpler sub-tests:
rst, we test whether
only if this test gives False, we test whether (:
SAT-Based Decision Procedures for Classical Modal Logics 7
Notice also that, in case L=EN or L=EMN, if we know that, e.g.,
consistent and we store this
result in M[j,j].
PROPOSITION 2. Let
be an assignment
in which
is a propositional formula. Let L be one of the logics E, EM,
EN, EMN. Assume that, for any formula ' whose depth is less than
the depth of , Lsat(')
returns True if ' is L-consistent, and
False otherwise.
returns True if is L-consistent, and False otherwise.
Proof: The Proposition is an easy consequence of the hypotheses and
Proposition 1.
3.1.2. Logics EC, ECN, EMC, EMCN
The following Proposition is an easy consequence of the results presented
in (Vardi, 1989).
PROPOSITION 3. Let
be an assignment
in which
is a propositional formula. Let be the set of formulas i
such that 2 i is a conjunct of . Let L be one of logics EC, ECN,
EMC, EMCN. is consistent in L if for each conjunct :2 j in one
of the following conditions is satised:
L-consistent for each non empty subset
0 of , and L=EC;
L-consistent for each subset 0 of , and
is empty or ((
Assume that L=EC or L=ECN. The straightforward implementation
of the corresponding condition may lead to an exponential number of
checks in the cardinality jj of . More carefully, for each conjunct
in , we can perform at most jj
1. for each formula i in , we rst check whether (:
consistent in L. Let 0 be the set of formulas for which the above
test fails. Then,
8 E. Giunchiglia, F. Giunchiglia and A. Tacchella
function Lconsist(
is a conjunct of g;
foreach conjunct 2 j do
foreach conjunct 2 i do
if M [j;
if M [j;
if not Lsat(
return True.
Figure
2. Lconsist for EC, ECN, EMC (R), EMCN (K)
2. in case L=ECN or 0 6= ;, we perform the last test, checking
whether ((
consistent in L.
Furthermore, the result of the consistency checks performed in the rst
step can be cached in a matrix M analogous to the one used in the
previous subsection.
If L=EC or L=ECN, the procedure Lconsist in Figure 2 implements
the above ideas. Otherwise, it is a straightforward implementation
of the conditions in Proposition 3.
PROPOSITION 4. Let
be an assignment
in which
is a propositional formula. Let L be one of logics EC, ECN,
EMC, EMCN. Assume that, for any formula ' whose depth is less than
the depth of , Lsat(')
returns True if ' is L-consistent, and
False otherwise.
returns True if is L-consistent, and False otherwise.
Proof: The Proposition is an easy consequence of the hypotheses and
Proposition 3.
SAT-Based Decision Procedures for Classical Modal Logics 9
function Lsat(')
return Lsatdp (cnf('), >).
function Lsatdp (', )
if f a unit clause (l) occurs in ' g
then return Lsat dp (assign(l;
l := choose-literal('; );
return Lsat dp (assign(l; '), ^ l) or
base */
/* backtrack */
/* unit */
/* split */
Figure
3. Lsat and Lsat dp
3.2. Lsat(')
Consider a formula '. Let L be a modal logic. The generation of assignments
satisfying ' is independent of the particular logic L being
considered. Furthermore, it can be based on any procedure for SAT:
if the SAT decider is complete, then we can generate a nite and
complete set of assignments for ' as follows:
at step 0, ask for an assignment satisfying ', and
at step i for an assignment satisfying ' and the
negation of the assignments generated in the previous steps.
By checking the L-consistency of each assignment, we obtain a
correct and complete decider for L.
if the SAT decider is correct but incomplete, then we cannot generate
a complete set of assignments for ', but we can still build
a correct but incomplete decider for L by checking each generated
assignment. Of course, whether an incomplete eective procedure
for SAT can be turned into an eective incomplete procedure for
a modal logic L, is still an open point.
The above method for generating a complete set of assignments
for ' has the advantage that the SAT decider is used as a blackbox.
A. Tacchella
The obvious disadvantage is that the size of the input formula checked
by the SAT solver may become exponentially bigger than the original
one. A better solution is to invoke the test for L-consistency inside the
procedure whenever an assignment satisfying the input formula
is found. In the case of the Davis-Putnam (DP) procedure (Davis and
Putnam, 1960), we get the procedure Lsat represented in Figure 3. In
the gure,
cnf(') is a set of clauses |possibly with newly introduced propositional
variables| such that, for any assignment in the extended
language, the following two properties are satised: 3
1. if satises cnf(') then the restriction of to the language of
2. if satises ' then there exists an assignment in the language
of cnf(') which (i) extends and (ii) satises cnf(').
Examples of such conversions are the \classical conversion" (which
given a formula in negative normal form recursively distribute
conjunctions over disjunctions), and the conversions based on \re-
naming", such as those described in (Tseitin, 1970; Plaisted and
Greenbaum, 1986; de la Tour, 1990).
choose-literal('; ) returns a literal occurring in ' and chosen
according to some heuristic criterion.
if l is a literal, l stands for A if l = :A, and for A if l = :A;
for any literal l and formula ', assign(l; ') is the formula obtained
from ' by (i) deleting the clauses in which l occurs as a disjunct,
and (ii) eliminating l from the others.
As can be observed, the procedure Lsat dp in Figure 3 is the DP-
procedure modulo the call to Lconsist() when it nds an assignment
satisfying the input formula. Notice that in this procedure the pure
literal rule, used by some DP implementations, is not implemented.
In fact, our main interest is in correct and complete modal deciders.
With the pure literal rule, the set of assignments checked by Lconsist
|assuming that each of such call returns False| is not ensured to be
complete. 4
3 Let be an assignment in a language L. Let L 0 L be a language. The
restriction of to L 0 is the assignment obtained from by deleting the conjuncts
not in L 0 . Let 0 an assignment. 0 extends if each conjunct of is also a conjunct
of 0 .
4 According to some authors (see, e.g., Freeman (1995)) the pure literal rule only
helps for a few classes of SAT problems. Furthermore, when this rule does help, it
does not result in a substantial reduction in search tree size.
SAT-Based Decision Procedures for Classical Modal Logics 11
In the following, for any formula ' and for any assignment in
the (possibly extended) language of cnf('), ' is the restriction of
to the language of '. Analogously, for any set of assignments ,
g.
PROPOSITION 5. Let ' be any modal formula. Assume that, for
any assignment , Lconsist() prints and returns False. Let be
the set of assignments printed as the result of invoking Lsat('). The
disjunction of the assignments in ' is propositionally equivalent to '.
Proof: In the hypotheses of the Proposition, what we need to prove is
that
_
First, it is clear that cnf(')
2 . For the thesis, the right-to-left
implication is an easy consequence of the rst of the two properties of
cnf('). Assume that the left-to-right implication is false. This means
that there exists an assignment in the language of ' such that
(1) for any propositional atom A, either A or :A is a conjunct of ,
(2) for any formula 2 in the language of ', either 2 or :2 is a
conjunct of ,
(3) satises ', and
does not satisfy
.
Given (3) and the second of the properties of cnf('), there must exist
an assignment 0 in the language of cnf(') which
extends ,
thus also
.
means that 0 entails
2 by propositional reasoning. Thus,
there must exist an assignment 00 in such that |given (1), (2), (5)|
each conjunct of 00
' is also a conjunct of 0
' and thus of . This implies
that entails 00
' . Since 00
, contradicting (4).
We can now state and prove soundness and completeness results for
our procedures.
Theorem [Soundness and Completeness] Let L be one of the logics
E, EM, EN, EMN, EC, ECN, EMC, EMCN. Lsat is sound and
12 E. Giunchiglia, F. Giunchiglia and A. Tacchella
complete for L, i.e., for any modal formula ', Lsat(') returns True if
' is L-consistent, and False otherwise.
Proof: First observe that Lsat(') returns
True if there exists a call to Lconsist() which returns True, and
False if each call to Lconsist() returns False.
The proof is by induction on the depth d of '. If 0 the Theorem
is trivial. Assume that 1. By induction hypothesis, for any
formula whose depth is less than d, Lsat( ) returns True if is L-
consistent, and False otherwise. In the following, we use the following
two facts:
(1) For any two assignments and 0 diering only for propositional
conjuncts, is L-consistent i 0 is L-consistent.
This is a trivial consequence of Proposition 1 and Proposition 3.
(2) Let be an assignment such that Lconsist() is invoked during
the execution of Lsat('). Lconsist() returns True if is L-
consistent and False otherwise.
Given that the depth of is less than or equal to d, this is a
consequence of the the induction hypothesis, Proposition 2 and
Proposition 4.
There are two cases:
1. ' is L-consistent. From Proposition 5, it follows that there exists a
call to Lconsist() in which the assignment (i) satises cnf('),
and (ii) is such that ' is L-consistent. Since possibly extends '
in that it may assign some newly introduced propositional variables,
from (1) it follows that is L-consistent, and from (2) it follows
that Lconsist() |and thus also Lsat(')| returns True.
2. ' is not L-consistent. From Proposition 5, it follows that for each
call Lconsist(), the assignment ' is not L-consistent. As above,
from (1) it follows that is not L-consistent, and from (2) it follows
that Lconsist() returns False.
4. *sat
*sat is built on top of sato ver. 3.2 (Zhang, 1997). The choice of
adopting sato as the basis for our system has been driven by the
following motivations:
SAT-Based Decision Procedures for Classical Modal Logics 13
sato is fast. We have not performed and are not aware of any
up-to-date extensive comparison among the dierent SAT solvers
publicly available. 5 However, according to some experiments we
have done and to the results presented in (Zhang, 1997), sato
seems to behave better than most of the currently available SAT
solvers.
sato has many options, including various splitting heuristics and
backjumping. We have inherited some of these options, and they
are available for experimentation.
sato has been written using some Software Engineering conventions
which have made and will make much easier to tune it for
our goals.
Besides the options inherited from sato, our system allows for other
possibilities that we have developed while implementing the system.
It is out of the goals of this paper to describe *sat structure, optimizations
and congurable options. For a more detailed presentation,
see (Tacchella, 1999) and the manual distributed with *sat. For our
goals, it suces to say that the core of *sat is a C implementation of
the procedures Lsat and Lconsist in Figures 1, 2, 3. In particular,
with reference to Figure 3, in *sat
cnf(') is the set of clauses obtained from ' by applying a conversion
based on renaming, such as those described in (Tseitin,
1970; Plaisted and Greenbaum, 1986).
choose-literal('; ) returns a literal according to a MOMS heuristic
(Maximum Occurrences in clauses of Minimum Size) (Freeman,
1995).
assign(l; ') is a highly optimized procedure which takes time linear
in the number of occurrences of l in '.
*sat also implements two important optimizations which have been
used in the tests presented in the next Section:
Early-pruning. Before each splitting step in Lsat, the L-consistency of
the assignment generated so far is checked by a call to Lconsist.
As in KsatC, care is taken to avoid the repetition of L-consistency
checks on the same branch of the propositional search tree. 6 Early
for a list of publicly available SAT solvers and more.
6 This is obtained through a pointer in the assignment stack which keeps track
of the portion of the current assignment which has been already veried to be
L-consistent.
14 E. Giunchiglia, F. Giunchiglia and A. Tacchella
pruning has proved to be very eective at least on some of the
tests presented in the next Section (see (Giunchiglia et al., 1998)).
Caching for K. In the case of the logic K, *sat uses an additional data
structure which allows to associate to any formula ' the result of
Lsat('). Before invoking Lsat on a formula , Lconsist checks
whether the K-consistency of has already been determined. As in
caching introduces some additional costs, but it may produce
dramatic speedups (see (Horrocks and Patel-Schneider, 1999b)).
We have not yet conducted an exhaustive experimental analysis to
see, for each class of formulas, which combination of *sat options leads
to the best results (see (Horrocks and Patel-Schneider, 1999b) for a
similar study of Dlp options). In all the tests in the next Section, we
used *sat options which seemed more reasonable to us. In particular,
we have set *sat as to use
early pruning on all tests, and
caching (for K) when the depth of the input formula is greater
than 1.
5. A comparative analysis
The availability of decision procedures for the logics we consider varies
signicantly. For EMCN, that we recall is equivalent to K, there are
many implemented decision procedures available, see, e.g.,
et al., 1998; de Swart, 1998). For E, EM and EMC, Gasquet and
Herzig (1996) provide a reduction to normal modal logics: by implementing
this reduction we indirectly obtain decision procedures for
these logics. Fitting (1983) calls U the logic EM, and denes a tableau
system for it. More recently, Governatori and Luppi (1999) dene a
tableau-like proof system for classical, monotonic and regular modal
logics. We are not aware of any implementation of these tableau sys-
tems. For EN, EC, EMN and ECN we are not aware of any other
implemented decision procedure, nor of any reduction into a formalism
for which a decision procedure is available.
Our comparative analysis is restricted to K and E. In fact, both our
decision procedures for E and EM, and Gasquet and Herzig's reductions
for E and EM, are similar. We expect that the experimental analysis
for EM would lead to results similar to the ones we have for E. For
SAT-Based Decision Procedures for Classical Modal Logics 15
EMC, Gasquet and Herzig's reduction is to a normal modal logic for
which we do not have a system available. 7
5.1. Modal K
As we said, there are several systems able to solve the consistency
problem for K. In our comparative experimental analysis, we consider
the four systems *sat, KsatC (Giunchiglia et al., 1998), Dlp (Patel-
Schneider, 1998) and
among the fastest solvers for K. We remember that TA, given a modal
rst determines a corresponding rst order formula ' and
then it performs conventional rst-order theorem proving. In our tests,
as in (Hustadt and Schmidt, 1997a), uses Flotter to convert '
in a set of clauses Cl(' ), and then the theorem prover Spass to solve
Cl(' ). For a brief description of Flotter and Spass, see (Weidenbach
et al., 1996). 8
We test these systems on three problem sets of randomly generated
formulas. A 3CNFK formula is a conjunction of 3CNFK
clauses, each with three disjuncts. Each disjunct in a 3CNFK clause
is either a propositional literal or a formula having the form 2C or
:2C, where C is a 3CNFK clause. See (Giunchiglia and Sebastiani,
1996a) for a more detailed presentation. We only remark that for any
formula ' there exist a 3CNFK formula which is K-consistent i ' is
K-consistent.
Sets of 3CNFK formulas can be randomly generated according to
the following parameters:
(i) the modal depth d;
(ii) the number L of clauses at depth
7 The reduction maps the consistency problem for a formula ' in EMC, into the
consistency problem for a formula ' 0 in the smallest normal modal logic with two
modal operators 21 , 22 and augmented with the schema
See (Gasquet and Herzig, 1996) for more details.
8 The experimental results have been obtained with Dlp ver. 3.1,
ver. 1.4 (Spass/Flotter ver. 0.55), KsatC ver. 1.0, and *sat ver. 1.2.
To compile the systems we have used sml-nj 110.0.3, sicstus prolog
3, ACL 5.0, and gcc 2.7.2.3. The tests have been run on several Intel
PCs, whose conguration varies from P200MHz with 64MbRAM, up to a
PII350MHz with 256 MbRAM. All platforms are running Linux 5.x RedHat. Dlp
is available at http://www-db.research.bell-labs.com/user/pfps.
at http://www.doc.mmu.ac.uk/STAFF/U.Hustadt/mdp. KsatC is available at
ftp://ftp.mrg.dist.unige.it/ in pub/mrg-systems. *sat is available at the WEB
page http://www.mrg.dist.unige.it/~tac/StarSAT.html.
A. Tacchella
(iii) the number N of propositional variables;
(iv) the probability p with which a disjunct occurring in a clause at
depth < d is purely propositional.
Care is taken in order to avoid multiple occurrences of a formula in a
clause, at the same time ensuring that the modal vs. the propositional
structure of each generated formula only depends on p. In more detail,
a clause is generated by randomly generating its disjuncts. When generating
a disjunct, we rst decide whether it has to be a propositional
literal or not. Then a disjunct of the proper type is repeatedly generated
as long as it does not occur in the clause generated so far.
In the tests we consider, a problem set is characterized by N and
p: d is xed to 1, while L is varied in such a way to empirically cover
the \100% satisable { 100% unsatisable" transition. For each pair
in a problem set, 100 3CNFK formulas are randomly generated,
and the resulting formulas are given in input to the procedure under
test. Then, for each run, we consider the time the systems take for
the main processing of the formula, thus excluding the negligible time
the systems take to read and somehow normalize the input formula.
(In particular, for this means that we take into account only the
time needed by Spass to solve the formula generated at the end of
the translation process.) For practical reasons, a timeout mechanism
stops the execution of the system on a formula after 1000 seconds of
CPU time. Even more, for any pair N; p, the execution of *sat, KsatC
and stopped after the system exceeds the timeout on 51 of the
100 samples corresponding to the xed N; p. Dlp instead, stops its
execution on the 100 samples corresponding to a pair N; p if a supermajority
of the rst n tests timeout. 9 When this happens, it is assumed
that Dlp exceeds the timeout for more than 50% of the tests with that
The rst three problem sets we consider have
xed to 0%: according to Hustadt and Schmidt (1997b), xing
corresponds to particularly dicult tests. We call these problem sets
PKN4p0, PKN5p0, and PKN6p0 respectively. PKN4p0 and PKN6p0
are called PS12 and PS13 respectively in (Hustadt and Schmidt, 1997b).
In order to better highlight the behavior of *sat and KsatC, we also
run these systems on a problem set (called PKN7p0) having
In Figure 4, satisability percentages and the median of
the CPU times for the four systems are plotted against the number
9 In more detail, Dlp stops its execution if there are at least 5 tests so far and
more than 90% of them timeout, or if there are at least 10 tests so far and more
than 75% of them timeout, or if there are at least 20 tests so far and more than 55%
of them timeout (Patel-Schneider, 1999).
SAT-Based Decision Procedures for Classical Modal Logics 17
Systems comparison - N=4, d=1, %p=0
CPU
KsatC
Systems comparison - N=5, d=1, %p=0
CPU
KsatC
Systems comparison - N=6, d=1, %p=0
CPU
KsatC
Systems comparison - N=7, d=1, %p=0
CPU
KsatC
Figure
4. Logic K. *sat, KsatC, Dlp, and 7.
samples/point. Background: satisability percentage.
of clauses L. Notice the logarithmic scale on the vertical axis, which
causes that values equal to 0:00 do not get plotted.
Consider Figure 4. The rst observation is that *sat and KsatC
are the fastest. The two systems perform roughly in the same way, with
*sat performing better when 5. For 7, the two systems
have similar performances, one system performing better than the other
for some values of L, but worse for other values of L. This comes at no
surprise: the two systems have the same underlying structure, both use
early pruning and a MOMS heuristic to select the splitting literal. The
two systems do not have an identical behavior because they use dierent
data-structures and implement slightly dierent MOMS strategies.
Considering the other systems, for PKN4p0 the gap between *sat/KsatC
and Dlp [resp. TA] is of more than one order of magnitude at the
cross-over point of 50% of satisable formulas, and goes up to almost
[resp. 4] orders of magnitude at the right end side of the horizontal
axis. For PKN5p0 and PKN6p0, values exceed the timeout
for respectively, while the corresponding values of
A. Tacchella
*sat [resp. KsatC] are 1.22 [resp. 1.83] and 3.32 [resp. 5.64] seconds.
keeps exceeding the timeout for all the successive values. The gap
between *sat/KsatC and Dlp on PKN5p0 is of more than one order
of magnitude at the cross-over points of 50% satisable formula, and
goes up to almost 3 orders at the very right of the plot. When
Dlp median values exceed the timeout for
does not terminate gracefully. 10 Comparing *sat and
Dlp on PKN4p0 and PKN5p0, we see that
the gap between *sat and Dlp seems to increase with L. Both for
PKN4p0 and PKN5p0, the dierence in logarithmic scale between
*sat and Dlp is (almost always) monotonically increasing.
At the crossover point of 50% satisable formulas, the gap between
*sat and Dlp [resp. TA] is roughly 1s [resp. 60s] for PKN4p0; and
220s [resp. 1000s] for PKN5p0.
Such good performances by *sat and KsatC are due to early pruning,
which has revealed to be very eective on these problem sets. For
example, if we disable early pruning in *sat and rerun it on PKN5p0,
the system keeps exceeding the time limit for
When the better behavior of *sat and KsatC than Dlp
and TA, is conrmed by the Q%-percentile graphs in Figure 5, corresponding
to 4. Formally, the Q%-percentile of a set S of values is
the value V such that Q% of the values in S are smaller or equal to
. The median value of a set thus corresponds to the 50% percentile
of the set. Figure 5 reports the 50%, 60%, 70%, 80%, 90% and 100%
percentile values of the CPU-times when *sat (top left), KsatC (top
right), Dlp (bottom left) and (bottom right) are run on PKN4p0.
The percentile plots for PKN5p0 and PKN6p0 look similar to the plots
in
Figure
5. This means that all the systems perform in roughly the
same way on the 50 most dicult samples of the 100 tests corresponding
to a xed N and L.
We also run the four systems on problems with
p is xed to 50%. We call these problem sets PKN4p50, PKN5p50,
PKN6p50, and PKN7p50. In Figure 6 the satisability percentages and
the median of the CPU times for the four systems are plotted against
the number of clauses L. As for
roughly in the same way and are the fastest. Dierently from the tests
in which 0%, at the transition point of 50% of satisable formulas,
the gap between *sat/KsatC and Dlp seems to diminish when the
number of variables increases. Horrocks and Patel-Schneider (1999a)
ver. 3.2 is able to successfully handle formulas with
SAT-Based Decision Procedures for Classical Modal Logics 19206010050709010 -2
percentiles
CPU
KsatC CPU TIME - N=4, d=1, %p=0
percentiles
CPU
percentiles
CPU
percentiles
CPU
Figure
5. Logic K. 50%{100% percentile CPU times of *sat, KsatC, Dlp, and TA.
samples/point.
show that for values of L bigger than 7, Dlp performances are superior
to those of KsatC when
that Dlp performs better than KsatC when p is high and worse
when p is low. We have not yet done such a broad comparison using
*sat instead of KsatC. However, we believe that Horrocks and Patel-
Schneider's conclusions should extend also to *sat, if *sat is used with
the parameter settings we have currently used, i.e., those which make
*sat most similar to KsatC. Of course, a big role can be played by
*sat already available congurable options, and this will be the issue
of future research. In any case, both *sat and KsatC perform better
than the other systems for large values of L, when the formulas are
trivially unsatisable. This is due to the fact that for large values of
L, formulas become propositionally unsatisable, and thus both *sat
and KsatC mostly take advantage of their SAT-based nature, e.g., of
their optimized data structures for handling large formulas.
As for the percentile plots of the timings of the systems
on PKN7p50, do not show big dierences with respect to the plots of
20 E. Giunchiglia, F. Giunchiglia and A. Tacchella
Systems comparison - N=4, d=1, %p=50
CPU
KsatC
Systems comparison - N=5, d=1, %p=50
CPU
KsatC
Systems comparison - N=6, d=1, %p=50
CPU
KsatC
Systems comparison - N=7, d=1, %p=50
CPU
KsatC
Figure
6. Logic K. *sat, KsatC, Dlp, and 7.
samples/point. Background: satisability percentage.
the medians. Considering Dlp and *sat 100% percentile plots, it is
interesting to observe that Dlp has a lower maximum than *sat; on
the other hand, *sat values decrease more rapidly than those of Dlp.
Finally, we see that for most of the problem sets we consider, all the
systems seem to have an easy-hard-easy pattern, whose peak roughly
correspond to the 50% of satisable formulas. When
phenomenon is best evident for *sat and KsatC.
We also consider the benchmarks formulas for K used at the Comparison
of Theorem Provers for Modal Logics at Tableaux'98 (see (de
Swart, 1998)). These consist of nine provable parameterized formulas
(ending with \ p") and nine unprovable parameterized formulas
(ending with \ n"). For each parameterized formula A(n), the test
consists in determining the greatest natural number n 21 satisfying
the following two conditions:
1. the prover returns the correct result for the formulas A(1);
in less than 100 seconds, and
SAT-Based Decision Procedures for Classical Modal Logics 21
percentiles
CPU
KsatC CPU TIME - N=7, d=1, %p=50
percentiles
CPU
percentiles
CPU
percentiles
CPU
Figure
7. Logic K. 50%{100% percentile CPU times of *sat, KsatC, Dlp, and TA.
samples/point.
2. the prover cannot do the formula A(n+ 1) in less than 100 seconds
or
Even though it has been proved that most of these tests can be easily
solved by current solvers, these are still interesting because
they are not 3CNFK formulas, and
some of these tests have not been solved yet.
The results for *sat, and Dlp are reported in Table I. KsatC has
not been tested since KsatC is able to deal with 3CNFK formulas only.
We also show the CPU time requested by the system to solve the last
instance A(n). Notice that *sat has been run with caching enabled,
since the depth of all the formulas in the Table is greater than 1. For
TA, we do not take into account the time needed to compute the rst
corresponding to A(n) (which is negligible), but we
do take into account the time requested by Flotter to convert A (n)
22 E. Giunchiglia, F. Giunchiglia and A. Tacchella
Table
I. Logic K. *sat, Dlp and performances on Tableaux'98 benchmarks
*sat Dlp
Test Size Time Size Time Size Spass Flotter
branch p 21 0.21
lin n 21 47.80 21 0.70 21 16.07 63.94
lin
path n 21 0.96
path p 21 0.72
ph n 12 0.60 9 40.16 9 45.21 9.92
ph p 8 48.54 6 11.34 6 42.19 0.97
poly n 21 2.25
poly p 21 1.73
into a set Cl(A (n)) of clauses (reported in the Flotter column), and
the time requested by Spass to determine the consistency or inconsistency
of (reported in the Spass column). Furthermore, we
stopped on A(n) with n < 21, either because Flotter does not
terminate gracefully when computing
or Flotter exceed the 100 seconds time limit. In the table, these three
cases correspond to the rows in which the value for n/Spass/Flotter
respectively is underlined.
As can be observed from Table I, the three systems are able to solve
all the instances of a formula in four cases. *sat and Dlp are able
to solve all the instances except for k branch n, k branch p, k ph n,
ph p. Except for the rst of these four parameterized formulas, *sat
is able to solve more instances than Dlp. For k branch n, both *sat
and Dlp are able to solve the 12th instance, with Dlp taking less time
than *sat to solve it.
SAT-Based Decision Procedures for Classical Modal Logics 23
5.2. Modal E
Gasquet and Herzig (1996) provide a translation which maps any formula
' into a formula 'GH in K 2 , i.e., the smallest normal modal logic
with two modal . The translation is such that ' is
satisable in E i 'GH is satisable in K 2 . This translation is dened
in the following way:
is a propositional variable,
and homomorphic for the cases of the propositional connectives.
Consider a formula '. We compare *sat performances on ' with
respect to *sat, Dlp and performances on 'GH . We could not
run KsatC on 'GH , since KsatC accepts only 3CNFK formulas with
at most one modality. To make evident when a system is run using
Gasquet and Herzig's translation, we append the string \+GH" to
the name of the system. Therefore, in the following, we will have the
systems *sat, *sat+GH, Dlp+GH, and TA+GH.
In E, the 3CNFK test methodology is not suited. Indeed, it is no
longer the case that for any modal formula ' there exists a 3CNFK
formula which is E-satisable i ' is E-satisable. Furthermore, checking
the consistency of an assignment in E amounts to determine the
consistency of ( :) for each pair of conjuncts 2 and :2 in :
most of these tests, in case and are 3CNFK clauses, can be trivially
We therefore consider sets of 3CNFE formulas. A 3CNFE formula
is a conjunction of 3CNFE clauses, each with three disjuncts. Each
disjunct in a 3CNFE clause is either a propositional literal or a formula
having the form 2C or :2C, where C is a 3CNFE formula. For
example,
where each l i (1 i 8) is a propositional literal, is a 3CNFE formula.
For any formula ', there exist a 3CNFE formula logically equivalent
to ' in E.
Sets of 3CNFE formulas can be randomly generated according to the
parameters used to generate 3CNFK formulas, and a new parameter C
representing the number of clauses at depth d > 0. A 3CNFK is thus
a 3CNFE formula in which C = 1. As in the previous subsection, a
problem set is characterized by N and p: d and C are xed to 1 and L
respectively; L is given increasing values in such a way to empirically
cover the \100% satisable { 100% unsatisable" transition. We also
A. Tacchella
Systems comparison - N=4, d=1, %p=0
CPU
TA+GH
Systems comparison - N=5, d=1, %p=0
CPU
Systems comparison - N=6, d=1, %p=0
CPU
Systems comparison - N=7, d=1, %p=0
CPU
TA+GH
Figure
8. Logic E. *sat, *sat+GH, Dlp+GH, and TA+GH median CPU time.
samples/point. Background: satisability percentage.
check that in each sample there are no multiple occurrences of a formula
in a clause, at the same ensuring that the propositional vs. the
modal structure of the formula only depends on p. Notice that while
increasing L also C is increased. As a consequence, for each pair of
in an assignment satisfying a 3CNFE formula,
the recursive E-consistency check for ( has itself a phase
transition from 100% satisable to 100% unsatisable when increasing
L. Overall, for low [resp. high] values of L we expect that each satisfying
assignment should be trivially determined to be E-consistent [resp. not
E-consistent].
As before, for each value N in a problem set, 100 3CNFE formulas
are randomly generated, and the resulting formulas are given in input to
the procedure under test. A timeout stops the execution of the system
on a formula after 1000 seconds of CPU time. We consider the following
problems sets:
SAT-Based Decision Procedures for Classical Modal Logics 25
percentiles
CPU
percentiles
CPU
percentiles
CPU
percentiles
Figure
9. Logic E. 50%{100% percentile CPU times of *sat, *sat+GH, Dlp+GH,
and TA+GH. samples/point.
PEN4p0, PEN5p0, PEN6p0, PEN7p0 in which
respectively, and
PEN4p50, PEN5p50, PEN6p50, PEN7p50 in which
Given the huge amount of time that Flotter takes to prepare the
formula for Spass, we run TA+GH only on the problems sets PEN4p0
and PEN4p50. For PEN7p0 and PEN7p50, we run TA+GH only on the
initial points. As in the preceding subsection, we only take into account
the time the systems take for the main processing of the formula. In
particular, for each system, we do not take into account the time needed
to perform the Gasquet and Herzig's conversion; and for TA+GH we
take into account only the time taken by Spass. The median and the
percentile plots of the systems on PEN4p0, PEN5p0, PEN6p0, PEN7p0
are shown in Figure 8 and Figure 9 respectively.
Consider Figure 8. As can be observed, *sat is the fastest: the gap
with the other systems is of more than one order of magnitude for
26 E. Giunchiglia, F. Giunchiglia and A. Tacchella
Systems comparison - N=4, d=1, %p=50
CPU
TA+GH
Systems comparison - N=5, d=1, %p=50
CPU
Systems comparison - N=6, d=1, %p=50
CPU
Systems comparison - N=7, d=1, %p=50
CPU
Figure
10. Logic E. *sat, *sat+GH, Dlp+GH, and TA+GH median CPU time.
samples/point. Background: satisability percentage.
certain values of L. However, both *sat+GH and Dlp+GH perform
quite well, better than one could have imagined given that the consistency
problem for E and K 2 belongs to two dierent complexity classes.
However, a closer look to Gasquet and Herzig's reduction reveals that,
considering a 3CNFE formula ', and an assignment
(as usual we assume that
is a propositional formula)
in the language of ',
1. satises ' i GH satises 'GH .
2. for checking the E-consistency of , *sat performs at most 2mn
consistency checks involving the formulas
3. for checking the K 2 -consistency of GH , both *sat+GH and Dlp+GH
perform at most 2mn consistency checks involving the formulas
SAT-Based Decision Procedures for Classical Modal Logics 27
percentiles
CPU
percentiles
CPU
percentiles
CPU
percentiles
CPU
Figure
11. Logic E. 50%{100% percentile CPU times of *sat, *sat+GH, Dlp+GH,
and TA+GH. samples/point.
The rst two points are obvious. To understand the last, it suces to
notice that GH is propositionally equivalent to
Given that both *sat+GH and Dlp+GH use caching, these procedures
will perform at most a quadratic number of checks in the number of
subformulas of 'GH . This is not the case for TA+GH, since Spass does
not have any caching mechanism. This explains the good behavior of
*sat+GH and Dlp+GH, and the bad behavior of TA+GH.
It is interesting to compare *sat+GH and Dlp+GH performances.
As can be observed, Dlp+GH performs better than *sat+GH for low
values of L, but worse for high values of L. This behavior re
ects
the dierent mechanisms used by *sat+GH and Dlp+GH to prune
the search space when checking the K-consistency of an assignment.
As we said in Section 4, in all the tests we have set *sat+GH as to
28 E. Giunchiglia, F. Giunchiglia and A. Tacchella
use the early pruning strategy. Dlp+GH instead implements a backjumping
schema in the spirit of (Baker, 1995): when an assignment is
discovered to be not K-consistent, backtracking to a point which does
not lead to the same contradiction is enforced. While implementing
early pruning does not introduce overheads, this is not the case for
backjumping, where a dependency set of each derived clause has to be
maintained (see (Patel-Schneider, 1998) for more details). Despite the
additional costs introduced, backjumping clearly wins if compared to
early pruning in logic K, for low values of L. In this case, almost each
assignment is K-consistent and early pruning may cause additional (i.e.,
not performed by a backjumping strategy) checks. On the other hand,
for high values of L, when the formula under test is not K-consistent but
there are still assignments satisfying it, *sat+GH is able to greatly cut
the search by checking the inconsistency of the assignment generated
so far. Dlp+GH instead checks the consistency of an assignment only
when it satises the current formula. Dlp+GH may therefore generate
many assignments which, even though they satisfy the input formula,
are not K-consistent. When L is so high that the input formulas become
propositionally unsatisable, *sat+GH may still perform additional
K-consistency checks, but these get compensated by (i) *sat+GH
SAT-based nature and (ii) the costs Dlp+GH has because of back-
jumping. Considering Figure 9, we see that Dlp+GH has a better
behavior than the other systems on some of the hardest instances.
Evidently, on these tests, backjumping leads to a more uniform behavior
than early pruning. Horrocks and Patel-Schneider (1999a) show that
for some randomly generate 3CNFK formulas, early pruning leads to a
more uniform behavior than backjumping.
For
TA+GH median and percentile times are plotted in Figure 10 and
Figure
respectively. As it can be observed, the situation is very
similar to the case in which 0%. The only dierence is that
now *sat+GH performs better than Dlp+GH for a lower value of L.
This is reasonable, since for each L, the number of consistency checks
performed by *sat+GH because of early pruning, diminishes when p
increases.
Finally, notice the easy-hard-easy pattern of *sat. To better appreciate
it, Figure 12 shows the number of calls to Lsat done by Lconsist
on PEN4p0-PEN7p0 (left), PEN4p50-PEN7p50 (right) against the ratio
between L and N . As can be observed, *sat performs a number of
Lsat calls whose maximum roughly correspond to the 50% of satisable
formulas. This transition happens when L
N is close to 5 for
to 6 for This behavior re
ects the above stated intuition
SAT-Based Decision Procedures for Classical Modal Logics 29
checks d=1 %p=0
OF
CHECKS
7 variables
6 variables
5 variables
4 variables
Consistency checks d=1 %p=50
OF
CHECKS
7 variables
6 variables
5 variables
4 variables
Figure
12. Logic E. *sat median number of calls to Lsat. 7.
samples/point. Background: satisability
percentages.
according to which for low [resp. high] values of L all the formulas
should be easily determined to be E-consistent [resp. not E-consistent].
6. Conclusions and future work
We have presented a set of SAT-based decision procedures for eight
classical modal logics. We have shown how the SAT-based approach
allows for ecient and modular implementations for these logics. We
have presented *sat. *sat is the only system that is able to deal with
EN, EC, ECN and EMN. In the case of the logic E, we have dened
a testing methodology which generalizes the 3CNFK methodology by
Giunchiglia and Sebastiani (1996a), and which is suitable for testing
systems for non-normal modal logics. The experimental evaluation
shows that *sat performances are superior to or comparable to the
performances of other state-of-the-art systems.
In the future, we plan to conduct an extensive experimental analysis
(similar to that presented in (Horrocks and Patel-Schneider, 1998; Horrocks
and Patel-Schneider, 1999b)) to understand, for each class of
formulas, which combination of *sat options leads to the best results.
We also plan to extend *sat in order to handle more expressive decidable
logics. We will also consider logics, like S4, for which more
sophisticated methods than that described in Section 4 have to be
employed in order to ensure the termination of the decision procedure.
A. Tacchella
Acknowledgments
We are grateful to Hullrich Hustadt, Peter F. Patel-Schneider, and
Hantao Zhang for the assistance they provided on their systems. Special
thanks to Roberto Sebastiani for the many useful discussions related
to the subject of this paper. Thanks also to the anonymous reviewers
for their helpful comments and suggestions. The rst and last authors
are partially supported by the Italian Spatial Agency.
--R
Intelligent backtracking on the hardest constraint problems.
An algorithm to evaluate quanti
Modal Logic - an Introduction
A computing procedure for quanti
Swart, editor. Automated Reasoning with Analytic Tableaux and Related Methods: International Conference Tableaux'98
Reasoning about knowledge.
Proof Methods for Modal and Intuitionistic Logics.
Improvements to propositional satis
PhD thesis
From classical to normal modal logics.
Ideal and Real Belief about Belief.
Building decision procedures for modal logics from propositional decision procedures - the case study of modal
of the 5th International Conference on Principles of Knowledge Representation and Reasoning - KR'96
More evaluation of decision procedures for modal logics.
Labelled tableaux for non-normal modal logics
Comparing subsumption optimizations.
Advances in propositional modal
Optimising description logic subsumption.
Journal of Logic and Computation
Using an expressive description logic: FaCT or
On evaluating decision procedures for modal logic.
On evaluating decision procedures for modal logic.
BLACKBOX: A new approach to the application of theorem proving to problem solving.
Strongly analytic tableaux for normal modal logics.
Translation methods for non-classical logics - an overview
DLP system description.
Personal communication
A Structure-preserving Clause Form Translation
Journal of Symbolic Computation
From Tableau-based to SAT-based procedures - preliminary report
An Essay in Classical Modal Logic.
On the complexity of proofs in propositional logics.
Correspondence theory.
On the complexity of epistemic reasoning.
--TR
--CTR
Andrei Voronkov, How to optimize proof-search in modal logics: new methods of proving redundancy criteria for sequent calculi, ACM Transactions on Computational Logic (TOCL), v.2 n.2, p.182-215, April 2001
Enrico Giunchiglia , Armando Tacchella, A Subset-Matching Size-Bounded Cache for Testing Satisfiability in Modal Logics, Annals of Mathematics and Artificial Intelligence, v.33 n.1, p.39-67, September 2001
SAT-based planning in complex domains: concurrency, constraints and nondeterminism, Artificial Intelligence, v.147 n.1-2, p.85-117, July
Enrico Giunchiglia , Yuliya Lierler , Marco Maratea, Answer Set Programming Based on Propositional Satisfiability, Journal of Automated Reasoning, v.36 n.4, p.345-377, April 2006
Alessandro Armando , Claudio Castellini , Enrico Giunchiglia , Marco Maratea, The SAT-based Approach to Separation Logic, Journal of Automated Reasoning, v.35 n.1-3, p.237-263, October 2005
Franz Baader , Diego Calvanese , Deborah L. McGuinness , Daniele Nardi , Peter F. Patel-Schneider, Bibliography, The description logic handbook: theory, implementation, and applications, Cambridge University Press, New York, NY, | modal logic;SAT-based decision procedure |
594390 | Fundamental Laws and Assumptions of Software Maintenance. | Researchers must pay far more attention to discovering and validating the principles that underlie software maintenance and evolution. This was one of the major conclusions reached during the International Workshop on Empirical Studies of Software Maintenance. This workshop, held in November 1996 in Monterey, California, brought together an international group of researchers to discuss the successes, challenges and open issues in software maintenance and evolution.This article documents the discussion of the subgroup on fundamental laws and assumptions of software maintenance. The participants of this group included researchers in software engineering, the behavioral sciences, information systems and statistics. Their main conclusion was that insufficient effort has been paid to synthesizing research conjectures into validated theories and that this problem has slowed progress in software maintenance. To help support this vision they identified the following supporting conclusions. (1) need to develop a genuine scientific approachmore than just using empirical methods, (2) other disciplines can help, (3) need to explore a wider range of approaches to empirical studies, (4) need to study both evolution and maintenance. | Introduction
All software systems evolve [1]. As they evolve they undergo numerous, successive changes - to fix errors,
improve performance or other attributes, and to adapt to new environments. The longer a system stays in
service, the larger maintenance costs are, and, therefore, it's not surprising that maintenance costs often
dominate initial development costs [2]. Clearly, improved tools, techniques, and processes can save a great
deal of time and money throughout the software industry.
To realize these savings, researchers are studying maintenance from many perspectives.
Making individual modifications. To make changes developers have to understand the existing system,
evaluate the effect of proposed changes, and then implement and validate it. To address these issues,
researchers study topics such as design recovery, program comprehension, impact analysis and regression
testing.
Coping with evolution. Because systems undergo many changes, not just one, other researchers focus on
the nature of change and how to limit its impact. Research in this area includes structured programming,
object-oriented programming languages, software architectures and configuration management.
Managing the maintenance process. Maintenance is costly and somewhat unpredictable. Thus,
management tools for controlling maintenance are in great demand. Many researchers have developed
metrics and models to predict when components are likely to need changing and how much that will cost.
These are only a few examples of maintenance research. There are many others. Clearly, software
maintenance is a significant problem that continues to foster considerable activity. However, as with other
software engineering areas, there is a concern that our research efforts lack hard evidence and critical
evaluation, and that without these, we can't develop a deep understanding of what tools and processes work,
when they work, or why. Consequently, many people believe that rigorous empirical methods must be one
of the cornerstones of research in our field.
This belief brought a large group of researchers to the International Workshop on Empirical Studies of
Software Maintenance. The workshop was help on November 8, 1996 in Monterey, California and involved
researchers from software engineering, the behavioral sciences, information systems and management, and
statistics. The goal of this meeting was to discuss the strengths, weaknesses, and open issues in empirical
methods and determine how they could be profitably applied to improve software maintenance research.
The workshop attendees were divided into four groups.
1. Study and assessment of (new) technologies,
2. Methodologies for performing empirical studies,
3. Studies of the maintenance process: fundamental laws and assumptions, and
4. Maintenance process improvement in practice.
This article summarizes the findings of subgroup #3: Studies of the maintenance process: fundamental laws
and assumptions. This subgroup is distinguished from others because their studies are not specific to
particular tools or methods. Instead it tries to identify general principles. The group's participants have
expertise in empirical methods, but approach their studies in different ways. Their backgrounds are diverse:
software engineering, behavioral science, business, statistics, and others.
2. Summary of Discussion
Subgroup #3 had two working sessions. During the first session, each participant presented their research
and took questions from the other participants. Before the workshop each participant received the following
list of questions about their work.
1. What were the study's goal and questions?
2. What empirical methods did you use (e.g., controlled experiment, case study, survey)?
3. Describe your study's design.
4. What threats to validity did you consider (construct, internal, external)?
5. What did you do well and what will you change in the future?
6. How much did it cost to perform the study?
7. What new questions do your results raise?
8. Can other researchers replicate your study?
2.1 Synopsis of Presentations.
This section summarizes each presentation. Of course, the few paragraphs given to each presentation cannot
capture the careful thought that goes into designing and conducting empirical research. Please see the
complete proceedings. Any mistakes or misrepresentations are unintentional, and are the sole responsibility
of the session chair, not the workshop participants.
. Maintenance of Reuse-Based Domain-Specific Software Product Lines[3]. Presented by William
Thomas:
Reuse saves money and time. Therefore, greater levels of reuse promise even greater savings.
Although this seems to be correct, the authors urge us to look more closely. A common way to get high
reuse levels is to split systems into two parts: one specific to the domain and the other to the
application. The domain-specific part provides the infrastructure: interconnection support, common
functions, and system architecture. Everything else is the application-specific part.
The authors strongly agree that this approach reduces coding effort, but warn us that it may also
redefine maintenance. Traditionally, applications are developed and maintained separately. However,
when applications share code, they may need to be maintained as a unit. Of course, developers can still
choose to maintain all applications individually, but may lose the benefit of domain-specific assets.
They might also choose to maintain all related applications as a unit, but that may constrain individual
applications.
Since the best way to manage this situation is unclear, the authors will conduct empirical studies using
historical data. They will explore such issues as measuring the cost of evolving applications and
domains, coupling between applications and domain, patterns of change, and the effect of domain
maturity on maintenance strategies.
This work reminds us that new technology can challenge, even invalidate, our basic assumptions.
. Using a Didactic Model to Measure Software Comprehension[4]. Presented by Elisabeth Dusink
One of the first steps in changing a system is understanding it. Documentation is supposed to help
understanding because it collects system knowledge and presents it in a structured way. The authors of
this article claim that developers learn about a system by reading its documentation. Furthermore, they
suspect that qualities of the learning process affect the quality of maintenance. Based on a model of
learning by Bloom[5], they argued that learning progresses from gaining knowledge, to understanding
it, applying it, analyzing it, and, finally, to synthesizing new knowledge from it.
The authors discussed a controlled experiment to link these levels of learning to maintenance success.
The experimental subjects, second-year CS students, will be placed into three- and four-person groups.
Each group will be given a 7,000 line email system written in C, and asked to modify it. They expect
the change to take about 80 hours per person to complete. For each modification the experimenters will
determine whether the group made the correct changes. Each person's understanding level will be
measured via a questionnaire.
One potential outcome of this research is a low-cost index for maintenance success. That is, we may be
able to test new technology by measuring its effect on understanding levels rather than by measuring its
effect on maintenance tasks themselves.
. Change-Prone Modules, Limited Resources and Maintenance[6]. Presented by Warren Harrison
Maintainers often work under tight deadlines with meager resources. So sometimes they take short cuts
even though they'd prefer to design and implement each change carefully. This kind of change is "ad
hoc". It can be made rapidly, but often degrades structure. In contrast "planned, structure preserving"
changes may preserve structure, but are more expensive. Harrison argues that ad hoc changes aren't as
damaging as has been claimed. He discussed data that showed that, in practice, changes tend to be
confined to a small part of the system. His conclusion is that modules that rarely change cannot degrade
and, thus, can tolerate ad hoc changes.
The author also outlined a model to help decide when to make ad hoc changes and when to restructure.
In the model, the cost of a maintenance request is a function of the request's complexity, the module's
state, and the kind of change made. Although the authors are still developing the model, it captures two
important notions: (1) ad hoc patches degrade structure more than planned, structure preserving
changes do, and (2) the effect of ad hoc changes will be compounded in modules that change often.
One interesting feature of this research is that it uses mathematical techniques to model long-term
evolution. Since, by definition, evolution takes time, researchers must find ways to reason about it.
Tools like these are a first step in that direction.
. An Empirical Exploration of Code Decay[7]. Presented by Adam Porter
Software systems must tolerate numerous, successive changes. As this happens, systems deteriorate and
changes become increasingly difficult. Eventually, new functionality cannot be added and the system
must be redesigned. Since solutions to this problem would be valuable, these researchers are
conducting a long-term, multidisciplinary project to examine the fundamental causes, symptoms, and
remedies for code decay.
The project team contains researchers in Statistics, Experimentation, Organizational Theory,
Programming Languages, Software Engineering, and Visualization. Their primary data source is the
AT&T 5ESS^TM switching system and its development data. This includes the switch's source code and
change control history (-700,000 changes) covering the last 15 years, its planned and actual
development milestones, effort and testing data, organizational history, development policies, and
coding standards.
To help the project achieve its goals quickly, they have constructed a set of model code artifacts that
they call the "code decay testbed". To do this they developed several small systems, attempted to
induce code decay in them, and used the resulting systems to evaluate ideas about code decay.
This research is a good example of how laboratory and field studies can work together to strengthen
results.
. On Increasing Our Knowledge of Large-Scale Software Comprehension[8]. Presented by Anneliese
von Mayrhauser
Far too often researchers create solutions (tools) without understanding the problem. Thus, there's a
tendency to focus on a tool's novelty or performance rather than on its efficacy. The authors believe
that program comprehension is a fundamental maintenance problem. Consequently, they have begun to
study how software developers understand programs and how maintenance tools can make it easier.
They presented a case study in which they analyzed how 11 professional programmers performed
maintenance. Then they tried to correlate what they saw with known theories of program
comprehension. These theories suggest that several factors may affect maintenance: task type, prior
exposure to the system, domain expertise, and language expertise.
The authors felt that limited sample size was one of the biggest problems that they and other
experimenters face. Therefore, they argue that we will have to combine data from multiple studies.
Further, this will require better methods for comparing studies, sharing data and terms, and analyzing
aggregate data.
One implication of this is that experimental results must generalize beyond the environment from which
they were taken. This may be one of the most important open issues in empirical software engineering.
. The Software Maintenance Process in Portugal[9]. Presented by Helena Mendes-Moreira
Maintenance costs are the dues of success. In this work the authors surveyed 37 software development
organizations in Portugal to characterize their maintenance processes. They selected companies with
more than 500 developers and revenues in excess of 13 million dollars. After they examined the survey
responses they conducted interviews with several of the respondents.
They found that most of the maintenance performed in these organizations involved quick fixes, rather
than planned enhancements. Also, in many cases, support activities such as updating documentation
were not done. More importantly, they found that the ratio of maintenance effort to new development
effort was growing rapidly. This might be expected in companies that enter the software market,
develop new products, and now, for the first time, must maintain them. Several participants noted
similar patterns in US industry.
This work raises the possibility of comparing historical data from established organizations with
current data from emerging ones. Would they find common patterns of organizational growth despite
the changes in technology?
. Predicting Aspects of Maintainability from Software Characteristics[10]. Presented by Jarrett
Rosenberg
We have to change the way we study change. The author presented several studies that tried to predict
the likelihood and cost of certain maintenance tasks. His results cast doubt on the soundness of current
metric-based modeling approaches. First he found little correlation between static complexity metrics
and repair activity. Second, he found considerable and unexplained variation in the metric values,
suggesting that other, unknown, factors are driving maintenance.
The author stressed two flaws in current metrics research. Metrics tend to be purely syntactic, which
excludes vital semantic information. They also tend to be static, ignoring information about a system's
development and evolution (e.g., testing history). The solution, however, is not to define new measures.
Instead, he argued, we will need to focus on creating deep theories of maintenance-related factors.
This presentation stressed two important research goals: to continue raising our scientific standards,
and to borrow wisely from the ideas and approaches of other research areas.
. Operational System Complexity[11]. Presented by Scott Schneberger
Maintenance bottlenecks can shift as technology changes. The industry is moving more and more from
centralized to distributed architectures. Will this shift change our assumptions about maintenance?
Schneberger suggests that it might. Since, he claims, there is little data on the maintenance of
distributed applications, he performed an exploratory study.
In this work he modeled a system's complexity in terms of its components, their internal complexity,
and their interactions. To test this idea he conducted a survey. His initial results were that as
distribution increased (i.e., components spread over more processors), system complexity increased,
while component complexity decreased. One of his conclusions is that distribution shifts complexity
out of individual components and into their interconnections.
The author also points out that, in some domains, there is a trend back toward centralization. These
results suggest that the benefits of solving certain maintenance problems can change over time.
. The Impact of Documentation Availability on Software Maintenance Productivity[12]. Presented by
Eirik Tryggeseth
One way to evaluate technology is to ask what would happen if it didn't exist. The author takes this
approach to see how documentation affects maintenance success. He also asks whether this effect is
different for more- or less-skilled programmers. To do this he performed a controlled experiment with
34 undergraduate students in computer science as subjects. Before the experiment he also measured the
students' skill in reading and writing C++ programs.
During the experiment the participants were asked to modify a 2700 line C++ program. Half of them,
group B, were given documentation, the rest, group A, were not. The experimenters measured the
amount of time that the participants spent understanding and modifying the system, and they measured
the quality of the modification. They found people who had documentation, group B, spent less time
understanding the system and made higher quality changes. They also found that the performance
measures for group B were correlated with the skill measures, while those of group A were not. One
explanation might be that Group B understood the system quickly, so programming skill became the
limiting factor for task performance. Group A, however, found it hard to understand the system, and,
therefore, were unable to profit from their programming skill.
One implication of this result might be that system-level knowledge has a greater (or, at least, more
immediate) effect on maintenance quality than individual programming skill does.
. Assessing Maintenance Processes Through Controlled Experiment[13]. Presented by Guiseppe
Visaggio
Sometimes the simplest approach is the most cost-effective. In this work the author explores the cost-benefit
tradeoffs between quick-fixes and a more thorough change process, called iterative
enhancement. The goal of this work is similar to Harrison's (described earlier), but uses a controlled
experiment rather than mathematical modeling.
The participants in this experiment were asked to modify two different systems, once using the quick-fix
approach, once using an iterative enhancement approach. The author measured the correctness,
completeness, effort, and traceability of each change. They found that quick fixes were less reliable and
degraded structure more than iterative enhancements did. One other interesting result was that quick-
fixes were done faster only when modification affected fewer than ten modules.
One fascinating observation is that these results appear to agree with those discussed by Harrison even
though the researchers used very different research methods.
2.2 Organizing the Current Literature
In the second session the group analyzed their presentations and other existing research to see what, if any,
fundamental laws of software maintenance are known. Because maintenance has so many facets, we first
developed a very rough taxonomy of the factors that might affect maintenance. Then for each category we
tried to synthesize common results, hoping to identify potential laws. We thought this might also indicate
open areas that should be, but are not being, addressed. The categories represent factors related to product,
people, process, and task.
1. Product. These factors relate to how attributes of system artifacts affect maintenance. We divided
product factors into two subcategories: complexity and structure. We assumed that complexity affects
our ability to understand the product. Research in this area includes software complexity metrics and
structured programming. Structure refers to how system components are organized. We assumed that
structure affects how changes impact a system. Research in this area includes studies of ripple-effect,
development of design patterns, and studies of software architecture and domain-specific languages.
2. People. These factors relate to how the attributes of individuals and groups affect maintenance. We
discussed three levels of this factor: Individual, Team, and Organizations. We assumed that
abilities, group dynamics, and organizational constraints affect maintenance. Research in
these areas include program comprehension, groupware, and cycle-time reduction studies.
3. Process. These factors relate to how the activities that individuals and teams carry out routinely affect
maintenance. We assumed that process factors affect an organization's ability to predictably achieve
their development goals. Research in this area includes documentation approaches, and configuration
management tools.
4. Task. These factors relate to the viewpoint from which maintenance is studied. Some research focuses
on individual changes while other focuses on longer-term evolution processes.
Within each of these categories, we tried to extract common findings. One topic for which we had some
success was modularization. Several people stated that Parnas' early work on information hiding [14]
illustrated some benefits of modularization, and that the effect of this and other research can be seen in
today's object-oriented programming languages. See Kemerer [15] for a survey of results in this area.
Unfortunately, we were unable to find too many more. Certainly some exist. But they didn't spring to mind
quickly. Although the group members knew of many studies, we couldn't distill their messages. Sometimes
group members disagreed about the interpretation of single paper. Sometimes one paper's findings were in
conflict with another paper's. Which one, if either, was correct? In many other cases we didn't think the
work proposed any general findings.
Our interpretation is that as a field, we've asked many questions and taken many measurements, but what
we've learned is unclear. Thus, our first conclusion is that we need to review the many studies published in
the literature to synthesize potential theories.
2.3 The Next Steps
Given more time, we probably could have found more common results, but the difficulties we had were
startling. One problem is that there hasn't been enough emphasis on synthesizing individual results into
theories. But another, more fundamental, problem is that many studies aren't designed to produce general
results.
Consider the following kinds of empirical research.
Feasibility studies. These studies are meant to validate new technology. Typically, the experimenter
exercises his or her tool or method to show that it performs better than some other method or tool. These
studies compare performances, but they rarely focus on the properties that make one tool better than
another.
Statistical Modeling. Many researchers have modeled the relationships between various software metrics
and maintenance attributes, such as change effort, severity, and locality. Since these models fit data without
understanding it (correlation vs. causality), there's a very little reason to believe that they will apply to other
data sets.
Observational studies. We also see many studies that document the behavior of a single project or
organization. These studies may be useful as benchmarks of typical behavior, but they aren't intended to
test any hypotheses. In fact, their authors rarely draw any actual conclusions.
Each of these types of studies serves a purpose and can further our understanding of software engineering.
However, they are not designed to and are not likely to produce general theories. Thus, our second
conclusion is that theory building must be designed into our empirical research.
3. Future Challenges:
In the previous sections we reviewed some of the subgroup's initial discussions. The group's activity took
place in two sessions. In the first session, the participants presented their studies and discussed their goals,
strengths, and weaknesses. During the second session we created a scheme for classifying maintenance
studies, classified studies using this scheme, and then looked for common research findings in each class.
We found some common findings, but not as many as we thought we should have. This led us to look more
carefully at the field and ask why common results were so hard to find. Our main conclusion is that a critical
part of scientific activity has been neglected in software maintenance research. That part is theory building -
which can be done either by synthesizing individual results, or by proposing initial hypotheses and testing
and refining them.
The last issue we wrestled with was how to remedy this situation. In this section we discuss some of our
recommendations for dealing with this problem. We divided these recommendations into three groups:
rethinking the goal of empirical methods, supporting interdisciplinary research, and expanding the use of
empirical methods.
3.1 Rethinking the Goals of Empirical Methods
The quality of empirical research has improved tremendously in the last few decades. But it must continue
to improve. In particular, we cannot forget that measurement is only one part of scientific inquiry. We
routinely use measurement to describe, predict, and test. This is important, but, by itself, it does not give us
the deep understanding we need to control software development.
. To gain control over software development we need to have validated theories that are (1) general, (2)
causal, and (3) suggestive of control strategies.
General theories hold across several environments. Relationships that only hold in one environment are
still important (for instance, for process improvement), but as scientists we should not be satisfied with
them. Thus, we should strive to draw theories from our studies (even if they turn out to be wrong) so
that they can be tested in other environments.
Theories should also be causal. Although the literature describes many reasonably-good predictive
models, they only capture correlations. We shouldn't confuse correlations with the underlying
principles we really care about. One of the key challenges to developing causal theories is to focus
more on discovering underlying principles and less on measuring high-level performance.
Finally, if we have multiple candidate theories, we should prefer theories that suggest practical control
strategies.
. Another issue to consider is human variation. Differences in natural ability affect every empirical study.
Some researchers are looking at ways to account for these differences, but much more work needs to be
done. As we discuss later, other fields have this problem as well and may have some insight that will
help us.
. Although we are ultimately concerned with professional programmers who build industrial software,
cost concerns lead us to use student subjects. Since we do not entirely understand the relationship
between the student programmers and professionals, these studies are often discounted. Consequently,
we need to develop models of the differences between student and professional populations.
. Science must be a public activity. There have been calls to make data public, but we must also share
artifacts, procedures, and terminology as well. Repositories and web sites should be set up and greater
efforts should be made to conduct collaborative research.
. Science is iterative. As we build and test theories, we will find almost all of them to be incorrect or
imprecise. As authors and as reviewers, we will have to change how we think about and how we present
our findings.
3.2 Supporting interdisciplinary research
Too often software engineering researchers think that our field is entirely unique. Software development
involves a web of individuals, groups and organizations working to build a complex array of products.
Therefore, it's certain that other fields have tools and techniques that we will find useful. For example,
. Behavioral scientists study how people work together (among other things). These have theories about
how people learn and understand, and how they work together. One of the group members, Jarrett
Rosenberg, coined the term "theory reuse" to describe this kind of interdisciplinary collaboration.
. Cognitive scientists study how people think. Consequently, they have experience defining instruments
to measure aspects of human skill. As we discussed earlier, such instruments could play a large role in
factoring human variation out of our empirical studies.
. Statistics already plays a big role in data analysis, experimental design, and hypothesis testing. We can
also benefit from their knowledge of simulation methods, visualization methods, and mathematical
modeling.
. Business disciplines such as organization theory and information systems management have a great
deal of knowledge about how process, organizational structure, and business strategies affect people's
ability to get work done. Understanding these effects may help us to reconcile studies from multiple
organizations. Also economists have considerable expertise in modeling complicated phenomena.
3.3 Expanding the Use of Empirical Methods
Controlled experiments are the standard method for verifying theories. However, they are not perfect. They
are expensive, have limited external validity, and it may be very difficult or, even unethical, to use them in
certain situations. Therefore, in addition to traditional analysis techniques, we should consider other
methods for generating and testing theories.
. Qualitative analysis. Refers to the analysis of data that is represented in words and pictures rather than
as numbers [16]. These approaches do not have as many supporting analyses as traditional quantitative
methods do, but may provide a richer description of the phenomena being studied.
. Meta-analysis. Gathering enough data to draw sound conclusions is a major problem in empirical
research. One way to solve this problem may be to integrate the data and results of multiple studies.
This can be done on an ad hoc basis, but there also approaches for statistically integrating the data.
These approaches are called meta-analysis.
. Mathematical modeling and simulation. This approach has been widely used in computer science, but
not in software engineering. This is unfortunate because mathematical models can be powerful and
much less expensive then experimenting with an actual system or process. They can also be very
effective as a compliment to other approaches.
. Case studies. Many case studies are simply retrospective descriptions of a project. Sometimes we call
these "lessons learned" articles or "experience reports". We should try to do more case studies in which
a hypotheses is stated and data is analyzed to see whether it is consistent with the hypothesis.
. Surveys. Surveys can be a very inexpensive way to acquire lots of information at low cost. They have
problems, but again, there is a large community of researchers that use them and understand their
limitations.
One final point to make here is that each of these approaches has strengths and weaknesses. Sometimes the
best thing to do will be to combine two or more approaches.
4.
Summary
Because software vendors must respond frequently and correctly to changing user expectations, hardware
platforms, and alternative products, software systems must tolerate numerous, successive changes. In
practice, however, systems deteriorate and changes become increasingly difficult to implement. Thus it's
easy to see why the costs of maintenance often dominate the costs of initial development.
Research that makes maintenance easier will save considerable time and money throughout the software
industry. Therefore, researchers have identified some sources of maintenance problems and developed
potential remedies for it. For example, some researchers believe that repeated changes complicate a system's
internal structure, so they have developed code metrics to model structural complexity. Others think that
some software designs are inherently less flexible than others so they have focused on design patterns and
software architecture. Still others argue that changes become more difficult because, over time, developers
lose their understanding of the system They have developed reverse engineering tools, and formal
documentation.
The exact manner and degree in which different factors affect maintenance is unclear. It is clear, however,
that this information is vital if our research is to have sustained, predictable improvement. Because many
researchers share this belief, they attended a workshop on the topic of empirical studies of software
maintenance. This article tries to summarize the ideas of the subgroup on Studies of the maintenance
process: fundamental laws and assumptions.
This group's main conclusion was that research community in software maintenance has produced many
interesting results, but failed to consolidate them into useful theories. To help remedy this situation the
group made three recommendations.
1. Researchers should design studies whose goal is to generate, test, and refine useful theories, not simply
to describe behavior. This implies that we must use much more sophisticated empirical methods than
we currently do.
2. Researchers should look to other disciplines for helpful insights, tools, and theories. However, they
should borrow wisely.
3. Empirical research is severely limited by our inability to find adequately-sized samples. Researchers
need to consider non-traditional techniques for combining data from multiple sources, and need to use
multiple data collection and analysis approaches to make better use of small data sets.
5. List of participants
The session chair would like to thank the subgroup participants for helping to make the workshop a success:
Thomas, Helena Mendes-Moreira, Elisabeth Dusink, Warren Harrison, Jarrett Rosenberg,
Giuseppe Visaggio, Marie Vans, Anneliese von Mayrhauser, Eirik Tryggeseth, Scott Schneberger.
6.
--R
A Model of Large Program Development.
System Structure and Software Maintenance.
Maintenance of Reuse-Based Domain-Specific Software Product Lines
Using and Didactic Model to Measure Software Comprehension.
Taxonomy of Educational Objects.
An Empirical Exploration of Code Evolution.
On Increasing our Knowledge of Large-Scale Software Comprehension
The Software Maintenance Process in Financial Organizations.
Problems and Prospects in Quantifying Software Maintainability.
Position Paper for the International Workshop on Empirical Studies of Software Maintenance.
The Impact of Documentation Availability on Software Maintenance Productivity.
Assessing Maintenance Processes Through Controlled Experiment.
On the Criteria for Decomposing Systems into Modules.
Software Complexity and Software Maintenance: A Survey of Empirical Research.
Methods in Qualitative Family Research
--TR | theory development;software maintenance;empirical studies;interdisciplinary research |
594421 | Further Experiences with Scenarios and Checklists. | Software inspection is one of the best methods of verifying software documents. Software inspection is a complex process, with many possible variations, most of which have received little or no evaluation. This paper reports on the evaluation of one component of the inspection process, detection aids, specifically using Scenario or Checklist approaches. The evaluation is by subject-based experimentation, and is currently one of three independent experiments on the same hypothesis. The paper describes the experimental process, the resulting analysis of the experimental data, and attempts to compare the results in this experiment with the other experiments. This replication is broadly supportive of the results from the original experiment, namely, that the Scenario approach is superior to the Checklist approach; and that the meeting component of a software inspection is not an effective defect detection mechanism. This experiment also tentatively proposes additional relationships between general academic performance and individual inspection performance; and between meeting loss and group inspection performance. | Introduction
Software inspection is a method for statically verifying documents. It was first
described by Michael Fagan in 1976 [6]. Since then there have been many variations
and experiences described, but a typical inspection involves a team of
three to five people reviewing and understanding a document to find defects.
The benefits of inspection are generally accepted, with success stories regularly
published. In addition to Fagan's papers describing his experiences [6, 7], there
are many other favourable reports. For example, Doolan [4] reports industrial
experience indicating a times return on investment for every hour devoted to
inspection of software requirement specifications. Russell [20] reports a similar
return of 33 hours of maintenance saved for every hour of inspection invested.
This benefit is derived from applying inspection early in the lifecycle. By inspecting
products as early as possible, major defects are caught sooner and are
not propagated through to the final product, where the cost of removal is far
greater.
One point of disagreement between inspection advocates is the role of detection
aids. Many practitioners do not use any (The Ad Hoc approach), while
others use Checklists to aid and regularise their process. Recently, Parnas and
Weiss[16] have argued that even Checklists are not sufficiently focused to reliably
aid inspectors, and have suggested that inspectors should be allocated
specific responsibilities. Parnas argues that the Checklist approach results in
an inspector repeatedly covering the same ground, while ignoring other ar-
eas, resulting in reduced coverage. This idea has been further developed by
19], who has developed the Scenario approach in an attempt to
address this problem. As well as developing the idea, Porter has attempted to
show, via subject-based experimentation, that Scenarios are indeed superior to
both Ad Hoc and Checklist approaches.
To prove any hypothesis, results of experimental studies must be reproducible
and hence, much to their credit, Porter et al. have made their experimental
material available. This paper reports on our experiences and results in
undertaking a partial replication of Porter's experiment. It will also draw upon
experiences and results from another partial replication undertaken by Lanubile
and Visaggio[13]. The paper will attempt to 'mirror' the organisation of
Porter et al.[19] for ease of comparison. Hence the hypothesis of this replicated
experiment is the same as the hypothesis in the original experiment:
. that nonsystematic techniques with general reviewer responsibility
and no reviewer coordination, lead to overlap and gaps, thereby
lowering the overall inspection effectiveness; while systematic approaches
with specific coordinated responsibilities reduce gaps, thereby
increasing the overall effectiveness of the inspection. (Porter et
2 The experiment
To further evaluate this hypothesis, the authors have replicated the original
experiment. As with all subject-based experiments the design of Porter's experiment
can be criticised, and hence a modified experimental design was undertaken
to explore the hypothesis from a slightly different viewpoint. The alterations
to the experiment will be discussed as they arise within the paper. As
with the original experiment, the study uses students taking a formal university
course 1 and commenced with a training phase in which the subjects were taught
inspection techniques and the experimental procedures, during which they inspected
two sample software requirements specification documents 2 ; this was
followed by the experimental phase.
2.1 Experimental design
This partial replication will focus on only 2 detection methods, Checklists (non-
systematic) and Scenarios (systematic). This will simplify the design allowing
greater focusing at the cost of being unable to generalise any results to include
the Ad Hoc approach (nonsystematic), and hence our real hypothesis is less
generic than the original experiment.
1 The original experiment used graduate students, this study used undergraduate students
(3rd Year).
2 The original only used one sample document. All the documents inspected in all three
experiments are software requirements specification documents.
Variables
The experiment manipulates three independent variables 3 :
ffl The detection technique - Checklist or Scenario (Treatment Variable).
ffl The specification to be inspected - two were used during the experiment
(CRUISE, WLMS - see Section 2.2 for a brief description of these specifications
ffl The subjects or groups of subjects - 50 subjects organised into 16 groups.
The original experiment included another independent variable, the order in
which the specifications were inspected. It was decided that it was unfeasible to
allow variation in the order in which the specifications were inspected; this was
because the inspections were part of an assessed class and hence the possibility
of subject plagiarism corrupting the experimental data could not be discounted.
The original experiment included this variation, but does not discuss how it
avoids threats from plagiarism.
The original experiment also measured four dependent variables:
ffl The individual fault detection rate,
ffl The team fault detection rate,
ffl The percentage of faults first identified at the collection meeting (meeting
gain rate), and
ffl The percentage of faults first identified by an individual, but never reported
at the collection meeting (meeting loss rate).
The replication also measured the above variables, plus 3 additional variables
ffl The time spent by each participant for the individual inspection,
ffl The time spent by each group for the collection meeting, and
ffl Average academic performance of each subject.
Also the replication collected additional data from 4 debriefing questionnaires
per specification - one individual and one group).
Design
Unfortunately the traditional fractional factorial design is unsuitable for this
experiment because, as stated by Porter[19]:
3 The original experiment included an internal replication and thus included another independent
variable.
Round 1 Round 2
WLMS CRUISE WLMS CRUISE
Ad Hoc 1B, 1D, 1G 1A, 1C, 1E 1A 1D, 2B
1H, 2A 1F, 2D
Checklist 2B 2E, 2G 1E, 2D, 2G 1B, 1H
Scenario 2C, 2F 2H 1F, 1C, 2E 1G, 2A, 2C
Table
1: Subject allocation in the original experiment
. they require some teams to use the Checklist method after they
have used the Scenario method. Since the Checklist reviewers create
their own fault detection techniques during the inspection (based on
their understanding of the Checklist), our concern was that using
the Scenario method in an early round might imperceptibly distort
the use of the other methods in later rounds. Such influences would
be undetectable because, unlike the Scenario method, the Checklist
method does not require reviewers to perform specific, auditable
tasks.
Hence it was decided that a very straightforward design was the only alternative
available. Each subject would participate in two inspections using the
same technique. This design suffers from the problem that any ability effect
between the two groups can distort any results applied to the treatment vari-
able. Unfortunately, we have no direct way of measuring the subject's ability
at software inspection, and hence it was decided that a random allocation of
subjects to each group was the best alternative. In an attempt to estimate any
effect, the average academic performance for each group was calculated. This
indicated that the groups were extremely well balanced in terms of academic
performance further post-analysis has revealed
a strong linear association between average academic performance and average
inspection performance (Pearson, hence it is believed
that the experimental design has had little or no impact on the results
affecting the treatment variable.
The original experiment used a partial factorial design in which each group
participated in two inspections, using some combination of the three detection
methods, provided the above rule is not broken. Table 1 details the group
allocation (A-H), where a 1 denotes the first run of the experiment and a 2
denotes the second run (or internal replication).
Threats to internal validity
All experiments suffer from the problem that some factor may affect the dependent
variables without the experimenter's knowledge. This possibility must be
minimised. In the original experiment Porter discusses five such threats:
ffl Selection Effects
The replication's approach is described in the previous section. The original
experiment employed the following allocation strategy, in conjunction
with the partial factorial design detailed above:
. Create teams with equal skills. For example, rate each par-
ticipant's background knowledge and experience as either low,
medium, or high and then form teams of three by selecting one
individual at random from each experience category.
ffl Maturation Effects
In the replication, each subject uses the same detection method through-out
the experiment and the order of attempting the specifications is fixed,
hence any learning effect should either be symmetrical across the two
groups (i.e. derived from a common source, e.g. experimentation proce-
dure) or directly related to the treatment variable (i.e. increased understanding
of, or ability with, the detection method). The situation with
the original experiment is more complicated, due to the asymmetrical allocation
of subjects and the variation in the order of both applying the
detection methods and inspecting the specifications, see Table 1.
ffl Replication Effects
Since this external replication does not contain an internal replication
component, this potential threat is of no concern.
ffl Instrumentation Effects
This variation is impossible to avoid and is controlled by having each
subject inspect both specifications.
ffl Presentation Effects
In the replication, the CRUISE specification is presented before the WLMS
specification. Hence it is possible that the subjects can apply knowledge
from their CRUISE inspection experience to their WLMS inspection. (See
below for an explanation of why a fixed order of presentation was chosen
- Plagiarism.) It is believed that any such effect should be symmetric
between the groups and presents a far lesser risk than the risk of plagia-
rism. The original experiment varies the order to control this effect, as
described in Table 1.
In considering the experiment and conducting initial trials with the experimental
material, it was found that a larger list of internal threats exist than
discussed in the original.
ffl Plagiarism
It was decided that it was unfeasible to allow variation in the order in
which the specifications were inspected; this was because the inspections
were part of an assessed class and hence the possibility of subject plagiarism
corrupting the experimental data could not be discounted and was
considered to be a greater risk than any asymmetric maturation effects.
ffl Time Effects
The original experiment allocated two hours for an individual inspection.
It is believed that this fixed time period could have introduced a large
bias into the results. The two specification documents are 24 and 31
pages long. Hence an inspection rate of 15.5 pages per hour is required
for the longer document. This is well above the figure quoted in many
inspection texts, e.g. Ebenau and Strauss[5] recommend 5 to 7 pages for
specification documents, and Gilb and Graham[8] are even more conservative
recommending 0.5 to 1.5 pages for software development documents.
These figures by themselves do not show that the inspection rate in the
original experiment was incorrect because of variations in the assumptions
- the specifications are in a semi-formal notation, which the texts don't
explicitly address and no precise definition of what constitutes a page are
given. But they are a cause for concern. Also in their replication Lanubile
and Visaggio[13] state that "the time limit was too short" and during our
training of the subjects, it was found that the subjects required more than
2 hours to inspect a 16 page specification document.
Hence to minimise this threat to validity, the original experiments strict
time limit was abandoned and the subjects were given as much time as
they required. Post-analysis shows that the average subject took 374 and
430 minutes to inspect the 24 and 31 page specifications respectively 4 .
ffl Effort Effect
The original experiment asked the subjects to either inspect the
document using a Checklist or 2) inspect the document using one of the
three Scenarios. These two tasks require different amounts of time and
effort, the former requiring significantly more effort than the latter. This
problem is compounded, as in the original, when this division of labour
is used in conjunction with the fixed time limit. Asymmetric effort requirements
in the application of the different detection methods leads to
results parameterised by the percentage of task completed rather than a
dimensionless quantity. This viewpoint is also supported by Cheng and
Jeffery[2], who have carried out independent studies investigating the relationship
between Scenarios and Checklists, and is consistent with the
work of Kelly et al.[11], who found that increasing the amount to be
inspected caused a decrease in inspector's performance.
Hence to minimise this internal threat, the subjects using the Scenario
technique were asked to apply all three Scenarios to balance the effort.
Post-analysis shows that this alteration does balance the effort. A comparison
of times taken can be found in Table 2.
ffl Measuring multiple events
The hypothesis of the original and this replication compares the various
detection methods. The original experiment waited until after the group
4 Note: These times will have a small error associated with them. Given the length of the
study, the subjects had to self-time parts of the study.
5 ignoring the Ad Hoc approach.
Checklist Scenario Checklist Scenario
Mean 460 403 379 370
St. Dev. 180 168 158 137
F ratio 1.34 0.04
Prob.
Table
2: Average time taken to complete each inspection
collection meeting to collect data for this comparison. Data collected
at this point will be distorted by meeting gains and losses which are
independent of the method used.
Hence to minimise this threat, it was decided to collect data from before
the collection meeting.
ffl Statistical power
All experiments should consider this most important design factor. Although
statistical power is difficult to estimate, it is important to consider
it, often in conjunction with effect size, in any well designed experiment.
Given that the sample size was fixed (size of class undertaking the course)
and assuming a standard setting for the power level (0.8), an experimenter
can find out what size of effect must exist for their experiment to be considered
well designed 6 . In the case of the original experiment, a large 7
effect size must be found, i.e. a large difference must be expected for the
experiment to have an appropriate design. Unfortunately we do not know
the estimated effect size of the original experiment, as it is not contained
within the paper.
Hence to minimise this threat, it was decided to reduce the required effect
size by increasing the sample size. This was achieved in two ways: first
increased subject numbers and second by measuring for the effect at the
individual rather than the group level. This is especially appropriate given
the decision on "Measuring multiple events". Hence with the increased
sample size the replication can now reliably find significant results for
small to medium 8 effect sizes.
ffl Group dynamics
Obviously the effectiveness of the group meeting component cannot be
divorced from the dynamics of the group undertaking the inspections,
and since the experiment has a repeated measure design, concern exists
that the group dynamics will alter between the two inspection phases.
Hence to minimise this threat, it was decided to have different group
allocations for each phase, and therefore the group component resembles
6 The real situation is slightly more complicated than this, see Miller et al.[15] for a discussion
on the impact of Statistical power on empirical research.
7 about 0.75, for a definition of large, medium and small power, see Cohen[3].
an experiment with an internal replication.
There also exists some internal threats which we were unable to minimise fully.
ffl Degree of application of the detection aids
It is impossible to strictly enforce application of the detection aids all
of the time. In fact, that situation is unnatural. Inspectors start their
inspection by reading the document and obviously may well find defects
during this initial preparation. Hence it is reasonable to assume that
a proportion of the reported defects are not directly attributable to the
application of the detection aid, even if the subject using it applies it
fully. But which proportion? Should the defects for the initial read of
the specification be discounted? The inspector may already be implicitly
applying the detection aid while reading. Applying the detection aid to
check a particular fact on a particular page leads the inspector to uncover
an indirectly related fact, should this be discounted? What about an
inspector applying an aid in a slightly non-standard fashion again leading
to an error not directly attributable to the detection aid. Further imagine
an inspector who chooses to augment their detection aided work with
some additional Ad Hoc based inspection, during which they find errors
directly related to the detection aids, how could these defects to reliably
found and discounted? The authors believe that this is a very grey area
with few distinguishing boundaries, and hence to attempt to subdivide the
reported errors is highly dangerous and unadvisable, without large data
sets to help to account for these potential variations. The experiment
has relatively small data sets, especially with regard to defect coverage
of individual Scenarios, e.g. as reported in the original experiment, the
missing or ambiguous functionalities Scenario has a strict coverage of one
defect in the CRUISE specification, which was not discovered by any
subject, and hence all defects reported by application of this aid are at
best indirect or secondary effects of applying the aid.
Hence, rather than attempting to subdivide the recorded defects, the
subjects will be asked to answer questions in the debriefing questionnaire
about their level of application of the detection aid. Answers to these
and other related questions should provide evidence for the validity of the
undertaken experiment.
ffl Typographical errors in specifications
The specifications from the original experiment contained a significant
number of typographical errors. Despite removing many of these errors,
some still existed during the experiment and may have caused confusion
for some of the subjects. Also these typographical errors preclude any
analysis of the false positives reported. This is a major deficiency in the
original and subsequent replications.
ffl Initial Data Analysis
Initial data analysis consists of the experimenter deciding on which reported
defects are correct and which are incorrect. Defects are unstructured
English descriptions of what the subjects' believe to be incorrect,
and they are required to supply an accurate description of the fault. This
is a inexact process and has potentially a large degree of variability. To
illustrate, the experimenter checks possible defects against the master defect
list (a list of all the defects contained within the document); Lanubile
and Visaggio[13] state that they believe that this list from the original
experiment is in error and provide several additional defects which they
believe are missing from the original list, i.e. the researchers can't even
agree on the perfect solution. It is concluded that this experiment has
a natural in-built risk which is difficult, if not impossible, to safeguard
against, unless the experimenter has the resources to employ multiple
researchers cross-checking the initial analysis.
ffl Learning Curve - Novice Subjects
All the subjects had to learn both the inspection process and the specification
language. It is quite possible that the experiment has experienced
effects due to subjects lack of understanding of either of these topics.
Apart from careful teaching of this material, it is difficult to employ further
measures to safegaurd against this effect. Instead any effect will try
to be 'measured' via the debriefing questionnaire and may subsequently
alter the analysis of the independent variables.
Threats to External Validity
Threats to external validity limit the ability to generalise the results from an
experiment to a wider population, under different conditions. The threats to
external validity for the replication are the same as for the original experiment:
ffl The subjects in our replication may not be representative of the general
software engineering population, e.g. this study used students rather than
software professionals. This threat is always a problem, because of the
lack of sampling frame, and hence even studies using professionals will be
exposed to this threat.
ffl The specification documents may not be representative of industrial prob-
lems. The documents used in this study are smaller and less complex than
industrial specifications.
ffl The inspection process may not be representative of industrial software
development practice. Despite using a well known and widely used inspection
technique[8], many other inspection processes exist in industry
which pose a threat to the ability to generalise from this experiment.
2.2 Experiment Instrumentation
This experiment has re-used, except as described above, the material from the
original experiment, see Porter et al.[19] for a full description of the materials.
The following is an abridged description of the materials to enhance the reader's
appreciation of the experimental results.
Software Requirements Specifications
The specifications used in this experiment are: an automatic cruise control
system[12] (CRUISE) and a water level monitoring system[22] (WLMS). The
CRUISE specification is 31 pages long and the WLMS specification is 24 pages
long. Each specification has four sections: overview, specific function require-
ments, external interfaces, and a glossary. The overview is written in En-
glish, whereas the other sections are specified using a tabular requirements
All the faults in both documents are natural, with the CRUISE
specification believed to contain 26 technical faults and the WLMS specification
believed to contain 42 technical faults.
Fault detection methods
The two detection methods are designed to search for a well-defined population
of faults. The original experiment used a general fault taxonomy to
define the responsibilities of Ad Hoc reviewers and consequently directly derived
a set of Checklist responsibilities from the Ad Hoc responsibilities. The
individual Checklist questions were selected from several industrial checklists.
Appendix
A gives a complete description of the Checklist. The Scenarios were
then derived from the Checklist by replacing individual Checklist items with
procedures designed to implement them. The Scenario procedures have been
further grouped into three distinct sub-groups: data type inconsistencies, incorrect
functionalities, missing or ambiguous functionalities. Hence the Scenarios
search for an exact subset of the faults defined by the Checklist's responsibili-
ties. A post-experiment investigation by the original experimenters estimated
that the Scenarios include about half of the faults covered by the Checklist.
Appendix
contains a complete list of all the Scenarios.
3 Data and Analysis
Due to the alterations of the design of the experiment, the collected data cannot
be analysed using the same strategy as the original experiment. Having said
this, comparisons will be drawn whenever possible.
3.1 Verification of experimental validity
Table
3 shows the average defect group detection rates for both the original,
the first external replication 9 and this subsequent replication. This table shows
that the subjects in this experiment performed at least as well as the subject's
in the other experiments, and subsequently if we assume that the alterations in
the experimental procedure have not increased the defect detection rate, this
verifies these subjects suitability for this study. As stated earlier, it is believed
that this group defect detection rate represents a composite result of using
the detection method plus a collection meeting component. Hence rather than
9 Figures for this experiment are approximate, as Lanubile and Visaggio only give a graphical
representation of this result.
Checklist Scenario Checklist Scenario
Original 0.24 0.45 0.41 0.57
1st. Rep. 0.24 0.20 0.32 0.33
This Rep. 0.39 0.42 0.48 0.49
Table
3: Average proportion of defects found in the three experiments, at the
group level.
1. Do you think you understand Software Inspections?
(a) Completely
(b) Well
(c) Reasonably Well
(d) Not too sure
(e) Not at all
2. Do you think you understand the notation?
(a) Completely
(b) Well
(c) Reasonably Well
(d) Not too sure
(e) Not at all
Figure
1: Questions regarding validity of experiment
examining the above figures to analyse the treatment variable, the individual
defect detection rates will be considered. Neither of the other experiments
report these figures. This analysis is described in the following section.
The experiment has one further source of data for analysis: the debriefing
questionnaire. Each individual was asked two questions, one about their
understanding of the inspection process and the other about the semi-formal
specification language; Figure 1 details these questions and Table 4 summarises
the results. The results are sufficiently positive, to verify these aspects of the
experiment, i.e. the subjects have gained sufficient ability in these two areas to
limit the impact of the learning curve. Further questions with a direct impact
on assessing validity are discussed in future sections. It is believed that all these
questions yield a sufficiently positive picture of the experimental procedures as
to add further weight to the belief that no unknown external factor or factors
have made the experiment invalid.
3.2 Individual Inspection Performance
The following two figures (Figures 2 and
the two specifications) inspection performance given a detection methodology.
As can be seen, on average the Scenario technology out performs the Checklist
Table
4: Summary of answers to questions regarding validity
Normalised Defects
Number
of
Subjects
S. D.11
Figure
2: Histogram of average subject performance using Scenarios
technology, but taking a closer look (Table 5), despite a noticeable difference in
the means the experiment falls just short of providing a statistically significant
result. Although not directly comparable, it is worth noting at this point, the
treatment variable analysis from the other experiments: the original,
and the first replication, Hence it is reasonable to
conclude that the result from this experiment is more supportive of the original
experiment than the first replication. We will return to the question of whose
treatment variable results (at the group level) later in this paper.
The only other variable to provide a significant result in either of the experiments
was the specification variable. Unfortunately this experiment's specification
variable could also hide a maturation effect, but given the experiences
of the other two experiments and the fact that nothing has been altered which
might directly impact on this effect, it is believed that this is unlikely. The specification
variable shows a statistically significant effect, in line with the other
Normalised Defects
Number
of
Subjects
S. D.11
Figure
3: Histogram of average subject performance using Checklists
Detection Method
Scenario Checklist
Subjects 26 24
Mean 0.36 0.31
St. Dev. 0.11 0.11
St.
F Ratio 2.80
F Prob. 0.10
Table
5: Basic detection method analysis
two experiments (original first replication:
Table
6. What is also of interest, is that this replication experienced
an asymmetric effect with respect to detection method, again see Table
6, whereas the original experiment did not experience
any 11 .
These results suggest that a closer investigation is required and suggest that
the treatment variable should be investigated against each specification sepa-
rately. Table 7 shows this information. As can be seen, a large difference exists
between the relative performance of the detection aids across the two specifications
- with the first phase of the experiment (using the CRUISE specification)
Remember these figures include results from using the Ad hoc approach and hence are
not directly comparable.
11 The first replication does not quote any figure.
Both Detection Method
Methods Scenario Checklist
Subjects 50 26 24
Mean -0.05 -0.01 -0.08
St. Dev. 0.11 0.12 0.12
St.
F Ratio 7.81 4.85
Table
Specification effect: independent and dependent of detection method;
the negative means indicate a preference for the WLMS specification
Scenario Checklist Scenario Checklist
Subjects 26 24 26 24
Mean 0.35 0.27 0.37 0.35
St. Dev. 0.14 0.13 0.10 0.12
St.
F Prob. 0.03 0.63
Table
7: Detection method analysis by specification
showing a strong effect, while the second phase (using the WLMS specification)
shows an extremely weak effect. The same analysis can be conducted for the
original experiment, albeit at the group level. This analysis is shown in Table
8, and is derived from Table 3 (pp. 569) in the paper by Porter et al.[19] Again
we see a strong performance bias towards one specification, further analysis is
not possible given the reported data 12 . Hence further analysis was undertaken
to attempt to explain this effect more fully.
One possibility is an asymmetric change in the effort or commitment between
the two groups. Obviously it is impossible to measure these effects di-
rectly, and hence we must rely on the related measure of time spent when
looking for an explanation. Table 9 summarises the time spent on individual
inspections, it analyses the difference in time taken by each subject (CRUISE -
WLMS), grouped by detection method. Note three subjects using the Scenario
method failed to complete their time estimates, and are hence excluded from
this analysis. This table shows that a small asymmetric effect does exist, but it
is believed that it is too small to account for the effect. Taking the difference in
means (31.3) and comparing it with the average time to complete (403), shows
that the effect accounts for 7.5% of the average time spent on inspecting, and
hence by itself is rejected as having sufficient likely impact to explain all of the
difference.
12 The first experiment does not supply sufficient figures to allow a complementary analysis.
Scenario Checklist Scenario Checklist
Subjects
Mean 0.45 0.24 0.57 0.41
St. Dev. 0.07
St.
F Ratio 22.06 4.92
F Prob. !!0.01 0.06
Table
8: Detection method analysis by specification of the original experiment
at the group level
Scenario Checklist
Subjects
Mean 50.2 81.5
St. Dev. 152.6 162.7
St.
F Prob. 0.50
Table
9: Difference in time spent between inspecting each specification
Two further possible explanations were explored 1) that particular faults or
particular types of faults are easier to find using one technique or the other; and
differences in coverage, between the two detection aids. The original experiment
states that in effect due to differences in coverage have been minimised
by:
" . deriving the Scenarios from the Checklist by replacing individual
Checklist items with Scenario procedures designed to implement
them."
Unfortunately the experiment has only transposed a subset of the Checklist
items into Scenario procedures and hence the possibility of a coverage effect
cannot be ignored. For the CRUISE specification which has 26 potential defects,
the Checklist items cover 24 of the defects, whereas the Scenario procedures
only cover 14 (10 Data type inconsistencies, 1 Incorrect functionalities and 3
Missing or Ambiguous functionalities) defects; and for the WLMS specification
which has 42 potential defects, the Checklist items cover 38 of the defects,
whereas the Scenario procedures only cover 24 (14 Data type inconsistencies,
5 Incorrect functionalities and 5 Missing or Ambiguous functionalities) defects.
These facts could be considered to add extra weight to the claim that the
Scenario procedures are superior - increased performance, for lower coverage.
This is probably true given the decision to give the subjects as much time
as they required. It is more difficult to estimate the potential impact on the
original with its fixed time limit.
Mean
Difference
(Scenario
Checklist)Defect
Figure
4: Difference between technologies against individual defects in CRUISE-8Mean
Difference
(Scenario
Checklist)
Defect
Figure
5: Difference between technologies against individual defects in WLMS
The following figures (Figures 4 and 5) shows the difference in performance
between the two technologies (Scenario - Checklist) against the individual de-
fects. The first figure illustrates the behaviour in the CRUISE specification. As
can be seen, subjects using the Scenario technique perform better than Check-list
users for nearly every defect and by a relatively consistent amount, with
little difference between the areas explicitly covered by the Scenario procedures
and those which are not. Turning our attention to the second figure, detailing
the results from the WLMS specification, we see that this consistent picture
disappears, and that the Checklist users out-perform the Scenario users in 36%
of the defects. Here many of the items covered by the Checklist but not by
the Scenario procedures, show results in favour of the Checklist technique. But
again there is no consistency in the interaction between the detection aids and
the specifications.
A further possibility that exists is that these defects fall into a single type of
3. Did you use your technique (Scenario or Checklist)?
(a) Always
(b) Most of the time
(c) Sometimes
(d) Occasionally
Never
4. Do you understand your technique?
(a) Completely
(b) Well
(c) Sort of
(d) Not to sure
(e) Not at all
5. Do you think your technique was better or worse than the Ad Hoc approach
previously employed?
(a) Definitely Better
(b) Probably Better
(c) About the same
(d) Probably Worse
Figure
Questions regarding technique used.
defect. To investigate this, the defects were characterised using the taxonomy
developed in the original experiment, which is a composite of two schemes
developed by Schneider et al.[21] and Basili and Weiss[1]. Unfortunately this
classification failed to reveal any insights into the effects, as the defects are
spread across the taxonomy.
Finally, the questionnaires were investigated to address this issue. The
questionnaires contain three questions directly relevant to this point (Figure
6).
Question 3 attempts to find the rate of use of each technique; Question 4
how well each technique is understood by the relevant subjects; and Question 5
elicits the subject's opinion on each techniques performance against a common
control technique. Table 10 summarises the subjects responses. Analysing
table yields two relevant facts. Firstly the more regular use of the Scenario
technique, compared with the Checklist technique; in fact the latter might be
more correctly named Checklist plus Ad Hoc. It is impossible to estimate the
impact this would have on the previous calculations, but any impact should be
symmetrical with regard to the specifications. The second observation is the
drop in usage of the Scenario technique between inspecting the CRUISE and
WLMS specifications, while the Checklist technique does not experience any
decline in application. This could well lead to an asymmetric effect, especially
if the Scenario technique is superior to simply adopting an Ad Hoc approach
to inspection.
To summarise the asymmetric effect between the two specifications is difficult
to explain. A number of factors have been found each of which could have
Q. 3 Q. 4 Q. 5 Q. 3 Q. 4 Q. 5
Checklist C%
Table
10: Detection method analysis by questionnaire (Figure 6), all percentages
rounded to 5%.
Scenario Checklist Scenario Checklist
No. of groups 8 8 8 8
Mean 0.42 0.39 0.49 0.48
St. Dev. 0.08 0.09 0.07 0.11
St.
F Prob. 0.49 0.75
Table
11: Initial analysis of group performance
a small asymmetric impact on the experiment. The most likely explanation of
the asymmetric effect is a combination of these factors, namely:
ffl Asymmetric effort effect
ffl Differences in coverage
ffl Decline in application of the Scenario technique
ffl Natural variation within the experiment
ffl The performance of the detection aids is dependent on the nature of the
specification
3.3 Analysis of Group Meeting Data
Earlier it is stated that this experiment deviated from the original design because
of concern of multiple events obscuring the basic hypothesis. Table 11
investigates the original hypothesis at the group level. Comparing this table
with the same analysis at the individual level (Tables 5 and 7) clearly shows
Scenario Checklist Scenario Checklist
No. of groups 8 8 8 8
Mean 0.62 0.48 0.64 0.59
St. Dev. 0.09 0.11 0.08 0.09
St.
F Ratio 7.46 1.14
F Prob. 0.02 0.30
Table
12: Analysis of Potential maximum group results
Scenario Checklist Scenario Checklist
No. of groups 8 8 8 8
Mean -5.13 -2.38 -6.00 -4.75
St. Dev. 2.30 3.46 4.20 3.69
St.
F Prob. 0.29 0.60
Table
13: Analysis of the relationship between meeting effects and detection
aid. Figures are quoted as per defect, rather than as percentages, due to the
small numbers involved.
that the group component has had a large effect upon the analysis of the treatment
variable, especially with regard to analysing the results of the CRUISE
specification. Recalling the results for the original experiment (p ! 0.01) and
the first replication (p ! 0.92), the results at the group level are now more supportive
of the first replication rather than the original experiment. This change
of support is directly attributable to (some aspects of) the group inspection.
This can be clearly seen by comparing Table 11 with Table 12, which estimates
the group score by forming a union of the three individual scores. In Table 12,
the familiar pattern from the individual analysis re-establishes itself, if anything
the effect (pro-Scenario) is even stronger than at the individual level. So why
the change? It is believed that the meeting component is introducing an effect
unrelated to the detection aids, and this effect is demonstrated in the difference
between Tables 11 and 12. The difference can be characterised by two variables:
meeting loss and meeting gain. Meeting gain represents new defects found at
the meeting, whereas meeting loss represents those defects found during the individual
phase which are 'lost' during the meeting session. (Meeting loss occurs
for a number of reasons which will be discussed later in the paper.)
Table
13 explores this possible relationship further, directly exploring the
possibility of a relationship between the meeting component (meeting gain -
meeting loss) and the detection aid. It shows that no significant result exists
between these two concepts and the larger negative results experienced by the
Meeting Gain Meeting Loss Meeting Gain Meeting Loss
No. of groups
Total Defects 26 26 42 42
Mean 1.13 4.88 1.63 7.00
St. Dev. 0.81 2.80 1.20 3.27
Table
14: Meeting Gain and Loss by Specification
Score Maximum
Loss p 0.14 !!0.01
WLMS r -0.51 0.52
Loss
Table
15: Correlation (Pearson) between Meeting Loss, Group Score and Maximum
Possible Group Score
Scenario subjects is believed to be directly related to the fact that these subjects,
on average, found more defects than any indirect association with the detection
aid. This conjuncture is discussed more fully in the following section and Table
15 shows the correlation between the meeting effects and the number of defects
found. Examining Tables 11-13 and 15 shows that a strong case can be made
that the meeting component is independent of the detection aid used, and
hence this experiments choice to explore the treatment variable at the individual
level rather than at the group level, as conducted in the original, is the more
appropriate experimental design.
3.4 Analysis of Meeting Losses and Gains
Another outcome of the original experiment was the rejection of the meeting
component as a fault detection technique. The original experiment reports
that the number of meeting losses outweighs the number of meeting gains, this
viewpoint is also supported by the first replication. The results here are no
different, with meeting losses comfortably outweighing meeting gains. Given
the low resolution in these values, complex statistical evaluation is inappropri-
ate, for example the median value of the meeting gain is one defect for both
specifications, i.e. one unit of resolution. Table 14 gives a brief summary of
meeting gains and meeting losses for each specification. The figures in this table
broadly agree with the original and the first replication, that on average meeting
losses are greater than meeting gains, and are also in line with the results
reported by McCarthy et al.[14], who reported that inspection techniques which
rely more on the individual component were more productive than those which
relied more upon the meeting component. Further, with regard to the meeting
gain component, these results are in line with the results reported by Votta[10].
Votta reported on his experiences observing a series of professional inspection
meetings and found that the meeting component only contributed 4%, on av-
erage, to the number of defects found. This experiment produced an average
meeting gain of 9% from our novice inspectors, i.e. over twice the professional
rate. It is clearly highly unlikely that our subjects are able to perform at twice
the level of seasoned professionals. Much more likely, and certainly the view of
the authors, is that this increase is due to an experimental process, and shows
the danger of extrapolating from such small scale, low resolution data. The
meeting loss figures broadly follow the trend of the other experiments, but at
a more extreme level, i.e. this experiment has larger meeting loss values than
the other two experiments. So why the large meeting loss? Table 15 shows
that the loss is a systematic effect, and that the meeting loss correlates with
the meeting score, and correlates extremely strongly with the potential maximum
group score, i.e. the greater the diversity of the defects discovered by the
individuals in the group, the greater the number of defects lost. One aspect of
the experimental material which may be influencing this is the typographical
errors contained within the specification. The subjects were told these errors
were not defects and to discard them. The typographical errors don't cause
any problem with the correctness of the specifications, but they do contribute
an additional difficultly in understanding the document. Given that the experiment
uses novice inspectors, it is believed that many groups had some difficulty
distinguishing between defects and typographical errors, leading to some genuine
defects being discarded at the meeting. Unfortunately it is impossible to
measure the impact of the typographical errors on the meeting component, and
even on the individual component, but it is believed that the greatest potential
impact will be on the meeting loss estimation, especially given the lower sample
size at the group level.
This numerical concern of the effectiveness of the meeting component is
not shared by the subjects. The subjects were asked if they thought that the
meeting component was worthwhile, via the questions in Figure 7.
In general, their responses must be categorised as positive (Table 16). Looking
in more detail we can see that the responses to the second questionnaire
are significantly less positive than the first. That is, there exists a large negative
trend from the first exercise to the second exercise in the subjects opinions
about the effectiveness of the meeting component as a vehicle for defect detec-
tion. This trend, rather than the individual responses, is more in line with the
quantifiable data from the inspection meeting- unfortunately there is no way
of predicting if this trend would continue into subsequent phases of such an
experiment.
Conclusions
Software inspection are undoubtedly one of the best ways to verify software
documents. Having said this, the technique remains relatively unexplored, in
terms of which variations upon the basic theme work best. This paper explores
one such variation - detection aids, specifically it attempts to compare Scenarios
6. In considering the effective use of an inspector's time,
how would you rate the collection meeting against the individual component?
A. Far superior
B. Useful
C. Of Similar Worth
D. Of limited use
E. A waste of time
7. Which (you may answer yes to more than one) of the following objectives
were achieved by your collection meeting?
A. Defect Merging
B. Extra Defect Detection
C. Group Bonding/Team Spirit
D. Education of Weak group Members
E. Ensure all individuals adequately prepare their defect lists
F. Ensure common practices amongst individual inspectors
Figure
7: Questions regarding technique used.
and Checklists, to see which approach is better, if any.
Importantly this paper is not a one-off study, but is part of a large piece
of work involving several other researchers investigating the same hypothesis.
Multiple independent studies of the same hypothesis are essential if software
engineering is going to produce empirically evaluated theories and procedures.
The paper attempts to compare its results with the other studies whenever
possible.
With regard to the hypothesis of the experiment, the results are ambiguous,
but on balance are generally supportive of the results in the original experiment.
Hence, given the current weight of evidence, from the three experiments, there
seems to be emerging support for the conjuncture that the Scenario approach
is better than the Checklist approach. More work is required to finally confirm
this conjecture.
As normal when conducting an experiment several other effects, or more
accurately possible effects, were revealed. These additional effects include:
ffl a strong correlation between general academic ability and the ability to
successfully inspect software.
ffl an interaction between the detection aids and the specifications.
ffl that the subjects were more willing to use Scenarios compared with Check-list
ffl that the effectiveness of the meeting component is independent of the
detection aid used.
ffl that meeting losses outweigh meeting gains, suggesting the meeting component
is not an effective defect detection mechanism.
Q. 6 Q. 7 Q. 6 Q. 7
A%
B%
C%
Table
Analysis of Questions 6 and 7 (Figure 7)
ffl that meeting losses correlate strongly with various measures of the number
of defects found by a group.
These new potential effects also require further investigation to verify their
validity. Looking ahead and assuming that they exist, then the above results
suggested several new lines of research within the software inspection area, e.g.
inspection models with alternatives to the meeting component.
A Checklist Method
ffl General
- Are the goals of the system defined?
- Are the requirements clear and unambiguous?
- Is a functional overview of the system provided?
- Is an overview of the operational modes provided?
- Have the software and hardware environments been specified?
- If assumptions that affect implementation have been made, are they
stated?
- Have the requirements been stated in terms of input, output, and
processing for each function?
- Are all functions, devices, constraints traced to requirements and vice
versa?
- Are the required attributes, assumptions and constraints of the system
completely listed?
ffl Omission
Missing Functionality
* Are the described functions sufficient to meet the system objectives
* Are all inputs to a function sufficient to perform the required
* Are undesired events considered and their required responses specified
* Are the initial and special states considered (e.g. system initia-
tion, abnormal termination)?
Missing Performance
* Can the system be tested, demonstrated, analyzed, or inspected
to show that it satisfies the requirements?
* Have the data type, rate, units, accuracy, resolution, limits, range
and critical values for all internal data items been specified?
* Have the accuracy, precision, range, type, rate, units, frequency,
and volume of inputs and outputs been specified for each function
Missing Interface
* Are the inputs and outputs for all interfaces sufficient?
* Are the interface requirements between hardware, software, per-
sonnel, and procedures included?
Missing Environment
* Have the functionality of hardware or software interacting with
the system been properly specified?
ffl Comission
Ambiguous Information
* Are the individual requirements stated so that they are discrete,
unambiguous, and testable?
* Are the transitions specified deterministicly?
Inconsistent Information
* Are the requirements mutually consistent?
* Are the functional requirements consistent with the overview?
* Are the functional requirements consistent with the actual operating
environment?
- Incorrect or Extra Functionality
* Are all the described functions necessary to meet the system objectives
* Are all inputs to a function necessary to perform the required
* Are the inputs and outputs for all interfaces necessary?
* Are all the outputs produced by a function used by another function
or transferred across an external interface?
Wrong Section
* Are all the requirements, interfaces, constraints, etc. listed in the
appropriate sections.
B.1 Data Type Consistency Scenario
1. data object's mentioned in the overview (e.g. hardware com-
ponents, application variable, abbreviated term or function)
(a) Are all data objects mentioned in the overview listed in the external
interface section?
2. For each data object appearing in the external interface section determine
the following information:
ffl Object name:
ffl Class: (e.g. input port, output port, application variable, abbreviated
ffl Data type: (e.g. integer, time, boolean, enumeration)
ffl Acceptable values: Are there any constraints, ranges, limits for the
values of this object
ffl Failure value: Does the object have a special failure value?
ffl Units or rates
ffl Initial value:
(a) Is the object's specification consistent with its description in the
overview?
(b) If object represents a physical quantity, are its units properly specified
(c) If the object's value is computed, can that computation generate a
non-acceptable value?
3. For each functional requirement identify all data object references:
(a) Do all data object references obey formatting conventions?
(b) Are all data objects referenced in this requirement listed in the input
or output sections?
(c) Can any data object use be inconsistent with the data object's type,
acceptable values, failure values, etc.?
(d) Can any data object definition with the data object's type, acceptable
values, failure value, etc.?
B.2 Incorrect Functionality Scenario
1. For each functional requirement identify all input/output data objects:
(a) Are all values written to each output data object consistent with its
intended function?
(b) Identify at least one function that uses each output data object.
2. For each functional requirement identify all specified system events:
(a) Is the specification of these events consistent with their intended
3. Develop an invariant for each system mode (i.e. Under what conditions
must the system exit or remain in a given mode)?
(a) Can the system's initial conditions fail to satisfy the initial mode's
invariant?
(b) Identify a sequence of events that allows the system to enter a mode
without satisfying the mode's invariant.
(c) Identify a sequence of events that allows the system to enter a mode,
but never leave (deadlock).
B.3 Ambiguities Or Missing Functionality Scenario
1. Identify the required precision, response time, etc. for each functional
requirement.
(a) Are all required precisions indicated?
2. For each requirement, identify all monitored events.
(a) Does a sequence of events exist for which multiple output values can
be computed?
(b) Does a sequence of events exist for which no output value will be
3. For each system mode, identify all monitored events.
(a) Does a sequence of events exist for which transitions into two or more
modes is allowed?
--R
Evaluation of software requirements document by analysis of change data.
Comparing inspection strategies for software requirement specifications.
Statistical Power Analysis for the Behavioral Sciences.
Experience with Fagan's inspection method.
Software Inspection Process.
Design and code inspections to reduce errors in program development.
Advances in software inspection.
Software Inspection.
Specifying software requirements for complex systems.
Votta Jr.
An analysis of defect densities found during software inspections.
Example NRL/SCR software requirements for an automobile cruise control and monitoring system.
Assessing defect detection methods for software requirements inspections through external replication.
An experiment to assess cost-benefits of inspection meetings and their alternatives
Statistical power and its subcomponents - missing and misunderstood concepts in emprical software enginerring research
Active design reviews: Principles and practices.
An experiment to assess different defect detection methods for software requirements inspections.
Comparing detection methods for software requirements inspections: A replicated experiment.
Comparing detection methods for software requirements inspections: a replicated experiment.
Experience with inspection in ultralarge-scale develop- ments
An experimental study of fault detection in user requirements.
--TR
--CTR
Stefan Biffl , Bernd Freimut , Oliver Laitenberger, Investigating the cost-effectiveness of reinspections in software development, Proceedings of the 23rd International Conference on Software Engineering, p.155-164, May 12-19, 2001, Toronto, Ontario, Canada
J. Miller, On the independence of software inspectors, Journal of Systems and Software, v.60 n.1, p.5-10, 15 January 2002
Stefan Biffl , Wilfried Grossmann, Evaluating the accuracy of defect estimation models based on inspection data from two inspection cycles, Proceedings of the 23rd International Conference on Software Engineering, p.145-154, May 12-19, 2001, Toronto, Ontario, Canada
Bente Anda , Dag I. K. Sjberg, Towards an inspection technique for use case models, Proceedings of the 14th international conference on Software engineering and knowledge engineering, July 15-19, 2002, Ischia, Italy
Bjrn Regnell , Per Runeson , Thomas Thelin, Are the Perspectives Really Different? FurtherExperimentation on Scenario-Based Reading of Requirements, Empirical Software Engineering, v.5 n.4, p.331-356, December 2000
Hidetake Uwano , Masahide Nakamura , Akito Monden , Ken-ichi Matsumoto, Analyzing individual performance of source code review using reviewers' eye movement, Proceedings of the 2006 symposium on Eye tracking research & applications, March 27-29, 2006, San Diego, California
Stefan Biffl, Using Inspection Data for Defect Estimation, IEEE Software, v.17 n.6, p.36-43, November 2000
Stefan Biffl , Michael Halling, Investigating the Defect Detection Effectiveness and Cost Benefit of Nominal Inspection Teams, IEEE Transactions on Software Engineering, v.29 n.5, p.385-397, May
Stefan Biffl , Walter J. Gutjahr, Using a Reliability Growth Model to Control Software Inspection, Empirical Software Engineering, v.7 n.3, p.257-284, September 2002
Oliver Laitenberger , Thomas Beil , Thilo Schwinn, An Industrial Case Study to Examine a Non-Traditional Inspection Implementation for Requirements Specifications, Empirical Software Engineering, v.7 n.4, p.345-374, December 2002
Susan S. Brilliant , John C. Knight, Empirical research in software engineering: a workshop, ACM SIGSOFT Software Engineering Notes, v.24 n.3, p.44-52, May 1999
F. MacDonald , J. Miller, A Comparison of Tool-Based and Paper-Based Software Inspection, Empirical Software Engineering, v.3 n.3, p.233-253, September 1998
James Miller , Fraser Macdonald , John Ferguson, ASSISTing Management Decisions in the Software Inspection Process, Information Technology and Management, v.3 n.1-2, p.67-83, January 2002
Thomas Thelin , Per Runeson , Claes Wohlin, An Experimental Comparison of Usage-Based and Checklist-Based Reading, IEEE Transactions on Software Engineering, v.29 n.8, p.687-704, August
Victor R. Basili , Forrest Shull , Filippo Lanubile, Building Knowledge through Families of Experiments, IEEE Transactions on Software Engineering, v.25 n.4, p.456-473, July 1999
Andreas Zendler, A Preliminary Software Engineering Theory as Investigated by Published Experiments, Empirical Software Engineering, v.6 n.2, p.161-180, June 2001
Oliver Laitenberger , Khaled El Emam , Thomas G. Harbich, An Internally Replicated Quasi-Experimental Comparison of Checklist and Perspective-Based Reading of Code Documents, IEEE Transactions on Software Engineering, v.27 n.5, p.387-421, May 2001
Oliver Laitenberger , Dieter Rombach, (Quasi-)experimental studies in industrial settings, Lecture notes on empirical software engineering, World Scientific Publishing Co., Inc., River Edge, NJ, | partial replication;experiments;software inspection;defect detection aids |
594454 | A Function Point-Like Measure for Object-Oriented Software. | We present a method for estimating the size, and consequently effort and duration, of object oriented software development projects. Different estimates may be made in different phases of the development process, according to the available information. We define an adaptation of traditional function points, called Object Oriented Function Points, to enable the measurement of object oriented analysis and design specifications. Tools have been constructed to automate the counting method. The novel aspect of our method is its flexibility. An organization can experiment with different counting policies, to find the most accurate predictors of size, effort, etc. in its environment. The method and preliminary results of its application in an industrial environment are presented and discussed. | Introduction
Cost and effort estimation is an important aspect of the management
of software development projects. Experience shows that accurate estimation
is difficult: an average error of 100% may be considered "good"
and an average error of 32% "outstanding" (Vicinanza, Mukhopadhyay
and Prietula 1991).
Most methods for estimating effort require an estimate of the size
of the software. Once a size estimate is available, models can be used
that relate size to effort.
Cost estimation is not a one-time activity at project initiation. Estimates
should be refined continually throughout a project (DeMarco
1982). Thus, it is necessary to estimate size repeatedly throughout
development.
2 Giuliano Antoniol et al.
Accurate estimation of size is vital. Unfortunately it has proved to
be very difficult, especially early in development when the estimates
are of most use.
Most research on estimating size has dealt with traditional applications
and traditional software development practices. Few methods
have been proposed for object oriented software development.
This paper presents a method for estimating the size of object oriented
software development projects. It is based on an adaptation of
the classical Function Point method to object oriented software.
In the following sections, we present our approach to measurement.
We explain how we map the concepts of function points to object oriented
software. We describe the process of counting Object Oriented
Function Points (OOFPs), and give an example. Results from a pilot
study are presented and discussed.
2. Measurement Perspective
Figure
1 shows the main phases of an object oriented (OO) development
process, and measurements that can be obtained at different points
in development. The purpose of these measures is to give the project
manager something from which to estimate the size, effort, and duration
of a project. These estimates can be revised as new artifacts become
available during development.
OO Analysis OO Design
System Requirements
Definition
Implementation
USER DESIGNER
CUSTOMER/
Figure
1. Perspectives and measures in the software development process.
As we move through the phases of the process, the measurement
perspective changes from that of the user to the designer.
At the end of the requirement specification phase, the classical Function
Point counting method is applied on the requirements doc-
ument. The function point method takes the perspective of the end
user. What is actually measured are the functions of the system that
main.tex; 23/06/1999; 14:27; no v.; p.2
A Function Point-like Measure for Object-Oriented Software 3
are visible to the end user. This measure is generally considered to be
independent of any particular implementation.
Some aspects of a system (e.g. a graphical user interface) are not
included in the classical function point count. Nevertheless, they contribute
to the final size of the system. If the objective of measuring
functionality is to estimate the size of an implementation of a sys-
tem, and from that the effort and duration of a software project, these
aspects should be taken into account. This changes the perspective
from that of the user to that of the customer i.e. the organization that
acquires the system, accepts it and pays the development costs; and
of the system designer, who has to produce an implementation of the
given specifications.
Once object oriented modelling begins (i.e. from the OO analysis
phase on), measurements can be obtained from the object models;
OOFP are used in place of FP. As development proceeds, this gives
a natural shift of perspective.
In the OO analysis phase, most of the elements in the object models
are still related to the application domain, so the perspective is still
that of the user.
At the OO design and later phases, the object models reflect implementation
choices. This includes aspects of the system that are not
specified in the requirements documents. The count of OOFP on these
models will thus include such functionalities. The measurement perspective
is now that of the designer.
Different size estimation models can be developed for different stages
of development. More detailed information is available, as the system
evolves from an abstract specification to a concrete implementation. It
should be possible to refine a size estimate repeatedly, as long as the
estimation process is not too difficult. Since we have developed tools to
automate the counting of OOFPs, re-calculation is easy at any time.
3. Object Oriented Function Points
Practitioners have found function points (Albrecht and Gaffney 1983,
IFPUG 1994) to be very useful within the data processing domain, for
which they were invented. We aim to exploit the experience that has
been obtained with function points in traditional software development,
in the OO paradigm. In adapting function points to OO, we need to
map function point concepts to object oriented concepts, and must
decide how to handle OO-specific concepts such as inheritance and
polymorphism.
4 Giuliano Antoniol et al.
Our presentation uses notations from the OMT method (Rumbaugh,
Blaha, Premerlani, Eddy and Lorensen 1991). It would not be much
different if the Booch notation (Booch 1991) or Unified Modeling Language
(Rational Software Corporation 1997b) was used instead, since
the main models and views in the different methodologies carry similar
information.
The OMT method uses three different, orthogonal views to describe
a software system:
Object Model: a static representation of the classes and objects in
a system, and their relationships.
Functional Model: data flow diagrams provide a functional decomposition
of the activities of the system.
Dynamic Model: state machines represent the dynamic and control
aspects of a system.
Although all three models provide important information about an
object-oriented system, the object model is the most important for
our purposes. It is usually the first to be developed, and so can be
measured earliest. It is the one that represents what is actually to
be built. In a sense the other models help in completing the object
model: the functional model helps in identifying and designing some
of the methods; the control model helps in identifying attributes that
are needed to maintain state information, and events that must be
implemented as classes or methods.
There is, however, an ongoing discussion in the practitioners community
on the content and role of those models. The functional model
seems to have fallen into disuse and is not required any more by some
methodologies (Rational Software Corporation 1997b). The dynamic
model is often replaced with a list of use cases and scenarios. The
object model is the only one that is present in all methodologies and
describes the system using specifically object-oriented concepts. For
these reasons, we decided to restrict our attention to object models.
In traditional developments, the central concepts used in counting
function points are logical files and transactions that operate on those
files. In OO systems, the core concept is no longer related to files or
data bases; instead the central concept is the "object".
The central analogy used to map function points to OO software
relates logical files and transactions to classes and their methods. A
logical file in the function point approach is a collection of related user-
identifiable data; a class in an object model encapsulates a collection of
data items. A class is the natural candidate for mapping logical files into
main.tex; 23/06/1999; 14:27; no v.; p.4
A Function Point-like Measure for Object-Oriented Software 5
the OO paradigm. Objects that are instances of a class in the OO world
correspond to records of a logical file in data processing applications.
In the FP method, logical files (LF) are divided into internal logical
files (ILFs) and external interface files (EIFs). Internal files are those
logical files that are maintained by the application; external files are
those referenced by the application but maintained by other applica-
tions. This division clearly identifies the application boundary. In the
OO counterpart, the application boundary is an imaginary line in an
object model, which divides the classes belonging to the application
from the classes outside the application. External classes encapsulate
non-system components, such as other applications, external services,
and reused library classes (both directly instantiated and subclassed
and parameterized classes). Classes within the application boundary
correspond to ILFs. Classes outside the application boundary correspond
to EIFs.
Transactions in the FP method are classified as inputs, outputs and
inquiries. This categorization is not easily applicable outside the data
processing domain.
In the OO paradigm the locus of operation are class methods, which
are usually at a more fine-grained level than transactions. Since object
models rarely contain the information needed to tell whether a method
performs an input, an output or is dealing with an enquiry, we do not
attempt to distinguish the three categories. We simply treat them as
generic Service Requests (SRs), issued by objects to other objects to
delegate to them some operations.
In short, we map logical files to classes, and transactions to methods.
Issues such as inheritance and polymorphism affect the structure
of the object model, and how the model should be counted. They are
addressed in Section 4.
3.1. Related Work
Other authors have proposed methods for adapting function points to
object oriented software. They too generally map classes to files, and
services or messages to transactions.
Whitmire (1993) considers each class as an internal file. Messages
sent across the system boundary are treated as transactions. Schoon-
eveldt, Hastings, Mocek and Fountain (1995) treat classes as files, and
consider services delivered by objects to clients as transactions. This
method gives a similar count to traditional function points for one
system. A draft proposal by the International Function Point Users
Group ("IFPUG") treats classes as files, and methods as transactions
1995).
6 Giuliano Antoniol et al.
Fetcke, Abran and Nguyen (1997) define rules for mapping a use
case model (Jacobson, Christerson, Jonsson and
Overgaard 1992) to
concepts from the IFPUG Counting Practices Manual (IFPUG 1994).
Three case studies have confirmed that the rules can be applied consis-
tently. No attempt has been made to relate the results to other metrics,
such as traditional function points, lines of code, or effort.
Sneed (1995) proposed object points as a measure of size for OO soft-
ware. Object points are derived from the class structures, the messages
and the processes or use cases, weighted by complexity adjustment factors
The closest analogue to our method is Predictive Object Points
(POPs), proposed by Minkiewicz (1997). POPs are based on counts
of classes and weighted methods per class, with adjustments for the
average depth of the inheritance tree and the average number of children
per class. Methods are weighted by considering their type (con-
structor, destructor, modifier, selector, iterator) and complexity (low,
average, high), giving a number of POPs in a way analogous to traditional
FPs. POPs have been incorporated into a commercial tool for
project estimation.
Our work differs from Minkiewicz in several ways. In two respects we
consider more information: we count the data in a class as well as the
methods; and we consider aggregation and inheritance in detail, instead
of as averages. We consider less information when counting methods,
since we do not distinguish between method types. Information about
method type is seldom available at the design stage. Automatic tools
would need to gather that information from the designer, which might
be a tedious task for very large systems. For that reason we do not
attempt to base our method complexity weighting on method type;
instead we try to exploit information about a method's signature, which
is most likely to be present in a design, at least at the detailed design
stage.
The key thing which is new about our method is its flexibility, with
much scope for experimentation. For example, Fetcke et al. (1997)
define that aggregation and inheritance should be handled in a particular
way. As discussed below in Section 4.1, we define several options
(one of which is Fetcke's approach) and leave it to the user to choose.
We have written programs to count OOFPs automatically, with several
parameters to govern counting decisions. An organization can experiment
to determine which parameter settings produce the most accurate
predictors of size in its environment. Thus we have a method which can
be tailored to different organizations or environments. Moreover, the
measurement is not affected by subjective ratings of complexity factors,
like those introduced in classical function point analysis.
A Function Point-like Measure for Object-Oriented Software 7
4. Measurement Process
OOFPs are assumed to be a function of the objects in a given object
model D. D might be produced at the design stage, or extracted from
the source code.
OOFPs can be calculated as:
where:
WELF (DET
A denotes the set of objects belonging to the application, and o is a
generic object in D. DETs, RETs and FTRs are elementary measures,
calculated on LFs and SRs and used to determine their complexity
through the complexity matrices W . Details are given in Sections 4.1-
4.3.
Figure
2 shows the phases of the OOFP computation process:
1. The object model is analyzed to identify the units that are to be
counted as logical files. There are four ways in which this might
be done; which to use is a parameter of the counting process. This
step is described in Section 4.1.
2. The complexity of each logical file and service request is deter-
mined. W tables are used to map counts of structural items (DETs,
RETs and FTRs) to complexity levels of low, average, or high.
These tables can be varied, and represent another parameter of the
counting process. This step is described in Sections 4.2 and 4.3.
3. The complexity values are translated to numbers, using another
table. These numbers are the OOFP values for the individual logical
files. The table used here can also be varied, and so is yet
another parameter of the counting process.
8 Giuliano Antoniol et al.
4. If a logical file is a class which is annotated as "reused" (ie developed
by reuse of another class), its OOFP value is multiplied by a
scale factor (1.0 or less). The scale factor is another parameter of
the counting process. This step is discussed in Section 4.4.
5. The OOFP values are summed to produce the total OOFP value.
Det
Ret
Det
Ftr
Det
Ret
OOFP
OOFP
OOFP
ILF
L,A,H
L,A,H
L,A,H
GB
Module
OO Design
Figure
2. OOFP computation process.
4.1. Identifying logical files
Conceptually, classes are mapped to logical files. It may not always be
appropriate to count each class simply as a single logical file, however.
Relationships between classes (aggregations and generalization / specializations
in particular) can sometimes make it appropriate to count
a group of classes together as a logical file.
Aggregation and inheritance relationships pertain mostly to implementation
aspects (internal organization, reuse). There tend to be few
of them in an analysis object model. There may be many of them in a
design or implementation model, as whole-part assemblies and inheritance
hierarchies are identified.
How these relationships affect the boundaries around logical files
depends on the perspective chosen, and the artifact on which the OOF-
Ps are computed.
At the analysis phase, the user's perspective is the important one. It
is too early to take the designer's point of view. At this stage, most of
the classes in an object model represent entities in the application and
user domain. There are few aggregation and inheritance relationships to
complicate things. Counting each single class as a logical file is usually
appropriate.
At this stage, the origin of a class does not matter. The scale factor
used in step 4 of the counting process shouild be set to 1.0, so the class
is counted with its full inherent value.
A Function Point-like Measure for Object-Oriented Software 9
At the design phase, the object models contain much more information
related to the implementation. From a designer's perspective,
considering each single class as a logical file will again be the correct
choice.
From a designer's or implementer's point of view, reuse makes classes
easier to develop. If the OOFP count is intended now to help predict
the effort or duration needed to build the system, a scale factor of less
than 1.0 should be used in step 4 of the counting process.
Counting a design object model from the user's perspective is more
complicated. To count what can actually be perceived by the user of
the system, the original abstractions present in the requirements and
analysis models have to be recovered. Implementation details should
not affect the count. There might no longer be a strict mapping of
single classes to logical files; collections of classes may sometimes need
to be counted together as a single logical file.
There may be many different ways to identify logical files. We consider
four, which are defined by different choices of how to deal with
aggregations and generalization / specialization relationships:
1. Single Class: count each separate class as a logical file, regardless
of its aggregation and inheritance relationships;
2. Aggregations: count an entire aggregation structure as a single
logical file, recursively joining lower level aggregations.
3. Generalization/Specialization: given an inheritance hierarchy,
consider as a different logical file the collection of classes comprised
in the entire path from the root superclass to each leaf subclass,
i.e. inheritance hierarchies are merged down to the leaves of the
hierarchy.
4. Mixed: combination of options 2 and 3.
Insert
Initialize
Delete
Top-of-pile
Bottom-of-pile
Location
Visibility
Collection Of Cards
Rank
Display
Discard
Card
Deck
Shuffle
Deal
Hand
Initial State
Draw Pile
Draw
Discard Pile
Draw
Figure
3. Single class ILFs.
Insert
Initialize
Delete
Top-of-pile
Bottom-of-pile
Location
Visibility
Collection Of Cards
Rank
Display
Discard
Card
Deck
Shuffle
Deal
Hand
Initial State
Draw Pile
Draw
Discard Pile
Draw
Figure
4. Aggregations ILFs.
Insert
Initialize
Delete
Top-of-pile
Bottom-of-pile
Location
Visibility
Collection Of Cards
Rank
Display
Discard
Card
Deck
Shuffle
Deal
Hand
Initial State
Draw Pile
Draw
Discard Pile
Draw
Figure
5. Generalization/Specialization ILFs.
For example, Figures 3-6 show the different counting boundaries that
result from these four strategies, on a sample object model 1 . Aggregation
merging decreases the number of classes in the object model
from 6 to 5 as CollectionOfCards is merged with Card; the resulting
logical file contains all the data members and methods of the two
classes. Generalization/specialization merging projects the superclass
CollectionOfCards onto its subclasses, again reducing the number of
logical files from 6 to 5. Finally, combining Aggregation and Gener-
alization/Specialization merging first aggregates CollectionOfCards
with Card and then projects the result onto the subclasses of
CollectionOfCards, resulting in 4 logical files.
Conceptually, it makes sense to merge superclasses into subclasses
for OOFP counting. It seems right to count the leaf classes, with their
full inherited structure, since this is how they are instantiated. (The
non-leaf classes of a hierarchy usually are not instantiated - they are
created for subsequent re-use by deriving subclasses, and for exploiting
polymorphism.) Also, two classes linked by a generalization / specialization
relationship are intuitively less complex than two separate
classes, because the subclass represents a refinement of the superclass.
1 The model is drawn from Rumbaugh et al. (1991).
A Function Point-like Measure for Object-Oriented Software 11
Insert
Initialize
Delete
Top-of-pile
Bottom-of-pile
Location
Visibility
Collection Of Cards
Rank
Display
Discard
Card
Hand
Initial State
Draw Pile
Draw
Discard Pile
Draw
Deck
Shuffle
Deal
Figure
6. Mixed ILFs.
Associations may present a problem. If non-leaf classes of an inheritance
hierarchy participate in associations, replicating the superclass
association into each subclass would increase artificially the number of
associations. In fact, the original superclass association contributes to
complexity only in the superclass, and in code it will only be implemented
once.
Merging aggregations into a single entity for OOFP counting seems
less intuitive. The objects that form aggregations are separate objects,
that exist independently of each other and have their own methods and
data members. At run-time, different objects will be instantiated for
each class in the aggregation.
However, it can be argued that dividing a user-identifiable class into
an aggregation of sub-classes is an implementation choice. From the
point of view of the end user, and of the function point measurement
philosophy, the OOFP value should not be affected. From this perspec-
tive, the aggregation structure should be merged into a single class and
counted as a single logical file.
Whether or not it is right to merge aggregations seems to depend on
whether the user's or designer's perspective is chosen. A hybrid solution
can be adopted, in which the treatment of aggregations is considered
as a parameter of the OOFP counting process. Three options can be
identified, with the choice left to the measurer:
1. merge aggregations;
2. do not merge aggregations;
3. flag on the design which aggregations should be considered as a
unique entity and so must be merged.
4.2. Logical Files
What is considered an ILF/EIF varies, according to the particular
ILF/EIF identification strategy used. Merging aggregations or general-
12 Giuliano Antoniol et al.
izations can generate ILFs or EIFs that correspond to sets of classes in
the design. We call these composite ILFs / EIFs, to distinguish them
from those consisting of a single class, called simple.
For each ILF/EIF it is necessary to compute the number of DETs
(Data Element Types) and RETs (Record Element Types). The rules
for DET/RET computation are slightly different for simple or composite
ILFs / EIFs.
In both cases, one RET is associated to each ILF/EIF, because it
represents a "user recognizable group of logically related data" (IFPUG
1994).
When the DETs and RETs of an ILF or EIF have been counted,
tables are used to classify the ILF/EIF as having low, average, or high
complexity. We base these tables on those given in the IFPUG Counting
Practices Manual Release 4.0 (IFPUG 1994).
4.2.1. Simple ILFs/EIFs
Simple attributes, such as integers and strings, are considered as DETs,
since they are a "unique user recognizable, non-recursive field of the ILF
or EIF" (IFPUG 1994).
A complex attribute in the OO paradigm is an attribute whose type
is a class (this models the analogy of a complex attribute with a RET,
i.e. "a user recognizable subgroup of data elements within an ILF or
EIF" (IFPUG 1994)) or a reference to another class.
Associations need to be counted as well, since they contribute to
the functionality/complexity of an object. An association is usually
implemented as a data member referencing the associated objects; this
reference is used in methods to invoke the associated object's services.
Associations are counted as DETs or RETs according to their car-
dinality. A single-valued association is considered as a DET (IFPUG
suggests counting a DET for each piece of data that exists because the
user requires a relationship with another ILF or EIF to be maintained
1994)). A multiple-valued association is considered as a RET,
because an entire group of references to objects is maintained in one
attribute.
Aggregations are a special case of associations. For simple ILFs /
EIFs, they are treated as normal associations.
4.2.2. Composite ILFs/EIFs
DETs and RETs are counted for each class within the composite, and
summed to give the overall total for the composite ILF/EIF.
DETs and RETs are counted using the same rules as for simple
ILFs / EIFs, except for aggregations. Aggregations are dealt with in a
special way because in a composite ILF/EIF they represent a subgroup.
A Function Point-like Measure for Object-Oriented Software 13
One RET is counted for each aggregation, whatever its cardinality. The
RET is assigned to the container class.
In practice, the values of DET and RET for any ILF/EIF are computed
by counting DETs and RETs for each component class on its
own (this is trivial for a simple ILF/EIF), and just adding them up 2 .
4.3. Service Requests
Each service request (method) in each class in the system is examined.
Abstract methods are not counted. Concrete methods are only counted
once (in the class in which they are declared), even if they are inherited
by several subclasses, because they are only coded once.
If a method is to be counted, the data types referenced in it are
classified:
simple items (analogous to DETs in traditional function points)
are simple data items referenced as arguments of the method, and
simple global variables referenced in the method;
items (analogous to File Types Referenced - FTRs -
in traditional function points) are complex arguments, objects or
complex global variables referenced by the method.
Several approaches are possible to distinguish complex items from
simple ones. For example, compiler built-in types might be considered
as simple and all other types as complex. This choice might not be
appropriate, since all user-defined types would be counted as com-
plex, even if they were scalar types or aliases of built-in types. Another
approach is to regard a complex item as one whose type is a class or a
reference to another class. This approach is used here.
When the DETs and FTRs of a method have been counted, tables
are used to classify the method as having low, average, or high com-
plexity. We base these tables on those given in the IFPUG Counting
Practices Manual Release 4.0 (IFPUG 1994) for external inputs and
queries.
Most of the time, the signature of the method provides the only
information on DETs and FTRs. Sometimes, especially early on, even
that is not known. In such a case, the method is assumed to have
average complexity.
2 The counting rules defined make DET-RET additive. The only exception is
the aggregation relation, which is handled differently in simple and composite ILFs.
However, in practice, the contribution of aggregation in composite ILFs corresponds
to considering one RET for each class involved in the aggregation structure, which
becomes equivalent to summing the RETs of each component class separately.
14 Giuliano Antoniol et al.
4.4. Allowing for reuse
In an early count, where the main aim is to capture user-oriented func-
tionality, the scale factor used in step 4 of the counting process should
be set to 1.0. A user doesn't care where a class comes from, so the class
should be counted with its full inherent value.
From a designer's or implementer's point of view, reuse makes classes
easier to develop. In a later count, in which the OOFP count may be
intended to help predict the effort or duration needed to build the
system, a scale factor of less than 1.0 would be appropriate.
4.5. An example
Figures
3-6 show four different ways that classes in an object model
might be merged, according to which of the four different LF identification
strategies is used. Here we show the OOFPs that are computed
for each variant.
Service Requests:
Service requests (methods) can be counted immediately. Since they
are only counted once anyway, it does not matter how the classes are
aggregated into logical files.
Because the signatures are unknown for the methods in the example,
each method is assumed to have average complexity. They each receive
the four OOFPs that are scored for an average service request.
As there are 12 concrete methods in the model, service requests
contribute 12 \Theta OOFPs.
Logical files:
The counting procedure for each individual class gives the DETs
and RETs shown in Figure 7.
The class Card has three DETs (two due to the two data items
and one due to the many-to-one association with CollectionOfCards)
and one RET (since the class itself is a collection of related data items).
CollectionOfCards has two DETs due to its two data items, one RET
due to the one-to-many aggregation with Card, and one RET for its
own structure. Each other class has one RET and as many DETs as it
has data items.
Depending on which ILF identification strategy is used, there are
four different ILF variants. Each variant merges classes together in
different ways, resulting in different total DET and RET counts. Table I
shows the result of applying IFPUG 4.0 complexity tables with each
variant. The value Low is rated as 7 OOFP, according to the IFPUG
tables.
A Function Point-like Measure for Object-Oriented Software 15
Insert
Initialize
Delete
Top-of-pile
Bottom-of-pile
Location
Visibility
Collection Of Cards
Rank
Display
Discard
Card
Deck
Shuffle
Deal
Hand
Initial State
Draw Pile
Draw
Discard Pile
Draw
Figure
7. DET/RET computation for LFs on the example system.
Table
I. ILF and SR complexity contribution (S
Collection of Cards Low Low -
Card Low - Low -
Deck Low Low Low Low
Hand Low Low Low Low
Discard Pile Low Low Low Low
Draw Pile Low Low Low Low
28
SR OOFP 48 48 48 48
Total OOFP 90 83 83 76
The highest OOFP count comes when each class is counted as a
single ILF. All the other variants have the effect of reducing the OOFP
value, as they reduce the number of ILFs. Although there is an increase
in DETs / RETs in the merged ILFs, it is not enough to raise the ILF
complexity to higher values.
5. Tools for Counting OOFPs
The process for computing OOFPs has been automated, as shown in
Figure
8. Object models produced with CASE tools are translated to an
intermediate representation. The intermediate representation is parsed,
Giuliano Antoniol et al.
OOFP
Translator
Tool-AOL
Other Tool
Tool Output
AST
AOL
Parser
AOL
Specification
OOFP
Counting Rules
OOFP
Counter
OMT/STP Rational ROSE
STP Output Petal Output
OMT/STP-AOL
Translator Translator
Petal-AOL
Figure
8. OOFP Computation Process
producing an Abstract Syntax Tree (AST), to which the OOFP counting
process is applied.
In order to be independent of the specific CASE tool used, an intermediate
language, called Abstract Object Language (AOL), has been
devised. The language is a general-purpose design description language,
capable of expressing all concepts available at the design stage of object
oriented software development. This language is based on the Unified
Modeling Language (Rational Software Corporation 1997b), a superset
of the OMT notation that is becoming the standard in object oriented
design. Since UML is a visual description language with some limited
textual specifications, we had to design from scratch many parts of
the language, while remaining adherent to UML where textual specifications
where available. Figure 9 shows an excerpt from the AOL
description of the object model depicted in Figure 7.
The output of the specific CASE tool used is translated automatically
into an equivalent AOL specification. One translator has been imple-
mented, to convert the output from OMT/STP (Interactive Development
Environments 1996) to an AOL specification. Other translators
main.tex; 23/06/1999; 14:27; no v.; p.16
A Function Point-like Measure for Object-Oriented Software 17
class Deck
operations
class Hand
attributes
operations
aggregation
container class CollectionOfCards mult one
parts class Card mult many;
generalization CollectionOfCards
subclasses Deck, Hand, DiscardPile, DrawPile
Figure
9. Excerpt of the AOL specification for the example object model.
could be implemented for other CASE tools, such as Rational Rose
(Rational Software Corporation 1997a) which fully supports UML and
represents its output using a language called Petal.
The AOL specification is then parsed by an AOL parser, producing
an AST representing the object model. The parser also resolves references
to identifiers, and performs some simple consistency checking
(e.g. names referenced in associations have been defined).
The OOFP Counter implements the OOFP Counting Rules described
in Section 4. The OOFP Counter is very different from other measurement
and counting tools, because instead of assuming a specific
counting strategy it allows one of several strategies to be chosen. This
makes it suitable for experimentation. The tool is very flexible, being
parameterizable with respect to the rules used in the counting process.
The AOL parser and the OOFP counter have been implemented in
both Refine (Reasoning Systems 1990) and Lex/Yacc.
6. Pilot Study
The described methodology has been applied in an industrial environment
producing software for telecommunications. Our first study is of
the relationship between the OOFP measure of a system and its final
main.tex; 23/06/1999; 14:27; no v.; p.17
Giuliano Antoniol et al.
size in lines of code (LOC), measured as the number of non-blank lines,
including comments.
Eight sub-systems of a completed application were measured. These
eight systems were chosen for study because all were developed by
the same poeple, in the same environment, using the same language
(C++). Design documents and the final source code were both avail-
able. Measurements of design characteristics were taken from the design
documents, not "reverse engineered" from the source code.
Table
II shows the numbers of various design elements in each system
Table
III shows the size of each system, spreading from about
5,000 to 50,000 lines of code. Table III also shows the OOFP count for
each system, using each of the four different strategies for identifying
logical files.
Table
II. Design Characteristics (Atr= Attributes,
Aggregation,
es).
System Atr Ope Ass Agg Inh Cls
The four OOFP series are strongly correlated with each other. The
lowest Pearson correlation, between the Single Class (S) and Mixed
(M) strategies, is .992. Other correlations range up to .998. As shown
in
table
III, differences between the methods become appreciable only
for the projects with large LOC values.
The high correlation between the four OOFP series suggests that
they are essentially linear transformations of each other. In that case,
changing the strategy for identifying logical files might not make much
difference to the accuracy of size estimation models.
6.1. Model Evaluation
A leave-one-out cross-validation procedure (Stone 1974) was used to
measure model performance. Each model was trained on
A Function Point-like Measure for Object-Oriented Software 19
table
III. System sizes and OOFPs.
System LOC S A G M
A 5807 63 63
D 19863 1071 1057 1057 1043
F 31011 518 403 483 368
G 47057 1142 1100 1124 1072
of the data set L (sample size is currently tested
on the withheld datum. The step was repeated for each point in L and
accuracy measures averaged over n. This method gives an unbiased
estimate of future performance on new data, and enables quite different
models to be compared directly.
Model error was estimated as the cross-validation version of the normalized
mean squared error (NMSE). This is the mean squared error,
normalized over the variance of the sample:
Regression based on least square minimization assumes that the
distribution of errors is Gaussian. Statistical tests for skewness and
kurtosis do not cause the hypothesis of normality to be rejected for
any of the five distributions (LOC and the four OOFP values). But
given the small size of our data set, it is not clear that the distributions
really are normal.
The least squares approach is sensitive to outliers (data points far
removed from other data points) in the data, because it minimizes
squared deviations. An outlier can have almost as much influence on
the regression results as all other points combined. Standard box-and-
whisker plots do not identify any of our systems as outliers, although
system H is right on the edge of being considered an outlier.
The impact of such influential points can be lessened by reducing
the weight given to large residuals - for example, by minimizing the
sum of absolute residuals rather than the sum of squared residuals.
Thus another measure for errors, based on absolute values, was also
20 Giuliano Antoniol et al.
considered to check inconsistencies due to possible influential or outlier
points. This measure is normalised mean absolute error (NMAE):
jy k \Gammamed y j
where are the mean and median
of the observed values in the sample L. Where available, the cross-validation
estimates of the standard error oe of the residuals y
and of the r-squared R 2 of the fit were also computed.
Even with cross-validation, care is needed in interpreting the results.
The small sample means that any observations must be regarded as
indicative rather than conclusive.
6.2. Models considered
Several regression techniques were considered to model the relationships
of LOC with OOFP. Other predictors of LOC, based on direct
indicators of OO size such as the number of classes or methods in the
design, were considered for comparison.
First, linear models (lms in table IV) based on minimizing the sum
of squares of the residuals were developed for each LF selection method.
Least absolute deviation, based on L 1 error, was also applied (l1s
in
table
IV). This method minimizes the sum of the absolute values of
the residuals, to reduce the effect of large error values.
Robust regression techniques were also investigated, to handle non-obvious
outliers. A family of M-estimators (see the Appendix) was considered
(rregs and rlms in table IV). The basic idea of M-smoothers
is to control the influence of outliers by the use of a non-quadratic
local loss function which gives less weight to "extreme" observations.
Examples of smoothers are Andrews, bisquare, fair, Hampel, Huber,
and logistic (Venables and Ripley 1994). Each corresponds to a different
weight function.
Finally, multivariate linear models were developed that predict LOC
directly from the numbers of OO design elements shown in table II.
6.3. Results
table
IV shows each of the models, parameterized over LF selection
methods and the type of regressor. The model coefficients b 0 and b 1
indicated were computed from the full data set. The estimated model
errors (NMSE and NMAE) are shown for each model. The estimated
R-squared measure is also included for the linear models.
A point of concern is whether an intercept term b 0 should be included
in the model. It is reasonable to suppose the existence of support code
main.tex; 23/06/1999; 14:27; no v.; p.20
A Function Point-like Measure for Object-Oriented Software 21
table
IV. Model performance for linear regressors
(lms and l1s) and robust methods (rregs and rlms).
Method
lm-A 0.43 0.66 0.69 8505 23.8
rreg-A 0.43 0.66 - 8255 24.0
not directly related to the functionalities being counted; and prediction
is improved with the term. However, the intercept term is not significant
in a non-predictive fit of the data. More importantly, the fact that the
intercept term is always larger than our smallest system might indicate
a poor fit for small OOFP values. It would be interesting to apply a
Bayesian procedure to select the intercept from given priors.
The results summarized in table IV are encouraging. For example,
the lm-G model has an NMSE of 38 %, meaning that the square error
variance is less than half of the sample variance. From another point
of view, models based on the OOFPs counted using the Generalization
strategy achieve a cross validation average error of 47 %, which is very
good.
The best model in table IV is rreg-G. Further investigation of
rreg-G was done, with the results shown in table V.
The best predictive accuracy (NMSE=0.337) was achieved by the
rreg-logistic-G model with tuning parameter This corresponds
main.tex; 23/06/1999; 14:27; no v.; p.21
22 Giuliano Antoniol et al.
table
V. Model performances for different weighting functions
of the M-estimator rreg, for the Generalization selection
method.
Method NMSE Comments
rreg-fair-G 0.48 converged after 50 steps)
to the linear predictor (This model is
very close to the basic linear model lm-G, whose equation is
table
IV suggests that in this data set the Generalization strategy
is consistently best. This is not proven statistically, though. A non-parametric
bootstrap approach (Efron and Tibshirani 1993) was used
to assess the models. The null hypothesis that there are no differences
between the errors from the lm-S and lm-G models cannot be rejected;
similar results were obtained for the other models. Thus it is not clear
that any counting strategy should be preferred over any other.
For comparison, multivariate linear models were developed that predict
LOC directly from the numbers of OO design elements (shown in
table
II). Poorer results are obtained from such models. For example, a
model based on classes and methods has
Models based on OOFP perform much better.
This pilot study was conducted in a specific project and environ-
ment, in a specific organization. The results are encouraging for size
estimation in this context. The issue of external validity must be addressed
by more extensive studies, targeting multiple organizations and different
projects. We have taken the first step in empirical investigation;
more needs to be done.
A Function Point-like Measure for Object-Oriented Software 23
7. Discussion of Results
As can be seen in table I, the complexity of each LF is always determined
to be low, even when several classes are merged together. The
same is true for service requests. The tables used to determine complexity
are based on those from the IFPUG Counting Practices Manual
(IFPUG 1994), in which quite large numbers of RETs and DETs are
needed to reach average or high complexity (for example, to obtain an
average complexity weight an LF needs a DET value between 20 and 50
and a RET value between 2 and 5). This is due to the data processing
origins of the function points method, and doesn't seem to apply as
well to all kinds of systems. Therefore the complexity tables should be
recalibrated, to provide more discrimination.
The implicit assumption in the use of these tables is that the complexity
of a class, and hence the size of its implementation and the effort
required to implement it, increases as the number and complexity of its
attributes increases. Similarly, the complexity of a method (and hence
its size and development effort) is assumed implicitly to increase as the
number and complexity of its parameters increases 3 . Whether these
assumptions are true needs to be determined experimentally.
The assumption seems reasonable for classes as a whole, but perhaps
not for methods. What works for transactions in traditional function
points may not work for methods in an object model, because transactions
tend to be much more coarse grained than methods.
At the analysis and design stages, we often have no more information
about a method than its signature. If it turns out that this is unrelated
to complexity and size, we have nothing to go by in counting OOFPs.
One possibility would be to permit the designer to annotate a method
with a complexity rating. This would introduce a subjective element
to the process, however, which we want to avoid. Another approach
would be simply to count the methods, making no attempt to classify
them by complexity. A promising approach would take advantage of the
information available in use cases and scenarios to derive a complexity
rating for methods.
On the data available to us so far, it seems that recalibration of the
OOFP tables for logical files might improve the accuracy of OOFP as
a predictor of size; recalibration of the table for methods might not.
Further experimentation is needed on this topic, with data from more
systems. In order to support such experimentation, the tool used to
3 These assumptions are fairly common. They underlie the philosophy of the
classical function point method. They also feature in the design metrics work of
Card and Glass (1990).
Giuliano Antoniol et al.
count OOFPs is designed to consider the table entries as parameters
that can be modified at any time.
The pilot study suggests that for this organization there is no reason
to prefer any of the four strategies for indentifying LFs over any other.
Other organizations may find differently. Although for this organization
the best size predictions appear to be obtained with the Generalization
strategy, its superiority is not proven statistically and may be an accident
of the data.
Modifying the complexity tables might make a difference in determining
the best strategy for selecting LFs.
Once a counting scheme has been chosen, it is important that it
be applied consistently. Consistent counting is straightforward for us,
since tools are used to automate the process.
8. Conclusions
We have presented a method for estimating the size of object oriented
software. The method is based on an adaptation of function points, to
apply them to object models. The proposed method takes full advantage
of the information contained in the object model and eliminates
the ambiguities of the traditional function points method. It can be
parameterized in order to take into account more closely the characteristics
of a specific design environment or of a particular problem.
We have defined the mapping from FP concepts to OO concepts,
and described the counting process. Tools have been developed that
automate the process. Preliminary results from a pilot study in an
industrial environment have been reported. The results from the pilot
study show promise for size estimation. This is important, since an
estimate of size is needed for many effort estimation models.
In summary, we have shown that we can apply the concepts of function
points to object oriented software and that the results are accurate
and useful in an industrial environment.
Future work will take several directions. One is to investigate the
effect of recalibrating the complexity tables. Other relationships, beyond
just OOFPs and code size, will be studied; those between OOFPs and
traditional FPs, and OOFPs versus effort, are of particular interest.
Another avenue is to consider the impact of using design patterns
(Gamma, Helm, Johnson and Vlissides 1995) on the structure within
object models; this may lead to other strategies for identifying logical
ILFs.
A Function Point-like Measure for Object-Oriented Software 25
Acknowledgements
We thank the referees for their constructive comments. This research
was funded by SODALIA Spa, Trento, Italy under Contract n. 346
between SODALIA and Istituto Trentino di Cultura, Trento, Italy.
When this work was undertaken, G. Caldiera and C. Lokan were with
the Experimental Software Engineering Group at the University of
Maryland, and G. Antoniol was with the ITC-IRST, Istituto per la
Ricerca Scientifica e Tecnologica, I-38050 Povo (Trento), Italy.
--R
Software function
Measuring Software Design Quality
Controlling Software Projects
An Introduction to the Bootstrap
Mapping the OO-Jacobson approach to function point analysis
Design Patterns: Elements of Reusable Object Oriented Software
Applied Nonparametric Regression
Software Through Pictures Manuals.
Estimating size for object-oriented software
Measuring object-oriented software with predictive object points
Unified Modeling Language
Reasoning Systems:
Measuring the size of object-oriented systems
Estimating the costs of object-oriented software
Modern Applied Statistics with S-Plus
Applying function points to object oriented software
--TR
--CTR
Maurizio Morisio , Daniele Romano , Ioannis Stamelos, Quality, Productivity, and Learning in Framework-Based Development: An Exploratory Case Study, IEEE Transactions on Software Engineering, v.28 n.9, p.876-888, September 2002
Marjan Heriko , Ivan Rozman , Ale ivkovi, A formal representation of functional size measurement methods, Journal of Systems and Software, v.79 n.9, p.1341-1358, September 2006
Gennaro Costagliola , Filomena Ferrucci , Genoveffa Tortora , Giuliana Vitiello, Class Point: An Approach for the Size Estimation of Object-Oriented Systems, IEEE Transactions on Software Engineering, v.31 n.1, p.52-74, January 2005
G. Antoniol , R. Fiutem , C. Lokan, Object-Oriented Function Points: An Empirical Validation, Empirical Software Engineering, v.8 n.3, p.225-254, September | design metrics;function points;object oriented;size estimation |
594739 | Efficient Window Block Retrieval in Quadtree-Based Spatial Databases. | An algorithm is presented to answer window queries in a quadtree-based spatial database environment by retrieving all of the quadtree blocks in the underlying spatial database that cover the quadtree blocks that comprise the window. It works by decomposing the window operation into sub-operations over smaller window partitions. These partitions are the quadtree blocks corresponding to the window. Although a block b in the underlying spatial database may cover several of the smaller window partitions, b<math> is only retrieved once rather than multiple times. This is achieved by using an auxiliary main memory data structure called the active border which requires <math>O\left(n\right)<math> additional storage for a window query of size <math>n\times n<math>. As a result, the algorithm generates an optimal number of disk I/O requests to answer a window query (i.e., one request per covering quadtree block). A proof of correctness and an analysis of the algorithms execution time and space requirements are given, as are some experimental results. | Introduction
Spatial data consists of spatial objects made up of points, lines, regions, rectangles, sur-
faces, volumes, and even data of higher dimension which includes time. Examples of
spatial data range from locations of cities, rivers, roads, to the areas that are spanned
by counties, states, crop coverages, mountain ranges, etc. They are increasingly finding
their way into adaptations of conventional databases for use in applications in geographic
information systems (GIS), resource management, space, urban planning, etc. [9, 22].
There are many different representations of spatial data (see [20, 21] for an overview).
We are interested in representations that are based on spatial occupancy. Spatial occupancy
methods decompose the space from which the data is drawn (e.g., the two-dimensional
space containing the lines) into regions called buckets. They are also commonly
known as bucketing methods. Traditionally, bucketing methods such as the grid
file [19], BANG file [13], LSD trees [17], Buddy trees [25], etc. have usually been applied
to points, although they can be applied to the other types as well.
There are four principal approaches to decomposing the space from which the data is
drawn. One approach buckets the data based on the concept of a minimum bounding (or
enclosing) rectangle. In this case, the minimum bounding rectangles of the objects are
grouped (hopefully by proximity) into hierarchies, and then stored in another structure
such as a B-tree [7]. The R-tree [16] (as well as its variants such as the R -tree [6]) is an
example of this approach.
The drawback of these hierarchies of objects is that they do not result in a disjoint
decomposition of the underlying space. The problem is that each object is only associated
with one bounding rectangle even though it may also overlap a portion of the bounding
rectangle of another object. In the worst case, this means that when we wish to determine
which object is associated with a particular point in the two-dimensional space from
which the objects are drawn (e.g., the containing rectangle in a rectangle database, or an
intersecting line in a line segment database), we may have to search the entire database.
The other approaches are based on a decomposition of space into disjoint cells, which
are mapped into buckets. Their common property is that the objects are decomposed
into disjoint subobjects such that each of the subobjects is associated with a different cell.
They differ in the degree of regularity imposed by their underlying decomposition rules
and by the way in which the cells are aggregated. The price paid for the disjointness is
that in order to determine the area covered by a particular object, we have to retrieve
all the cells that it occupies. Moreover, if we wish to report all the objects that overlap
a particular area, then we may have to report an object as many times as its subobjects
appear in the area.
The first method based on disjointness partitions the objects into arbitrary disjoint
subobjects and then groups the subobjects in another structure such as a B-tree. The
partition and the subsequent groupings are such that the bounding rectangles are disjoint
at each level of the structure. The R + -tree [26] and the cell tree [15] are examples of this
approach. Their drawback (as well as the R-tree variants) is that the decomposition is
data-dependent. This means that it is difficult to perform tasks that require composition
of different operations and data sets (e.g., set-theoretic operations such as overlay).
In contrast, the remaining two methods, while also yielding a disjoint decomposition,
have a greater degree of data-independence. They are based on a regular decomposition.
The space can be decomposed either into blocks of uniform size (e.g., the uniform grid [12])
or adapt the decomposition to the distribution of the data (e.g., a quadtree-based approach
that makes use of regular decomposition such as [24]). In the former case, all the blocks
are of the same size, while in the latter case, the widths of the blocks are maximal subject
to being restricted to be powers of two, and a restriction on their positions.
For example, Figure 1 shows the quadtree block decomposition of two square regions
of space each of which contains a rectangular subregion (termed a window) delimited by
heavy lines. The blocks are obtained by applying regular decomposition to the square
regions thereby repeatedly breaking them up into four congruent blocks until each block
is either completely within the window or completely outside the window.
window w window w
underlying spatial database underlying spatial database
Figure
1: The decomposition of (a) a 12 \Theta 12 window, and (b) a 13 \Theta 13
window into maximal quadtree blocks.
The uniform grid is ideal for uniformly distributed data, while quadtree-based approaches
are suited for arbitrarily distributed data. In the case of uniformly distributed
data, quadtree-based approaches degenerate to a uniform grid, albeit they have a higher
overhead. Both the uniform grid and the quadtree-based approaches lend themselves to
set-theoretic operations as the positions of the decomposition lines are restricted and thus
there is much less variation between the operands of the operations. Thus they are ideal
for tasks which require the composition of different operations and data sets. In gen-
eral, since spatial data is not usually uniformly distributed, the quadtree-based regular
decomposition approach is more flexible.
A window query is the spatial analog of a range query in that it retrieves all objects
that overlap the space covered by a range of x and y (and possibly z in three-dimensions)
coordinate values which form the window. In this paper we focus on performing a variant
of a window query using a regular decomposition quadtree. Both the window and the
underlying database are represented by a quadtree. In particular, the quadtree blocks
BW that make up the window are used to guide the retrieval process. The variant of the
query is one that retrieves all of the quadtree blocks BU of the underlying database that
cover the blocks that make up the window (i.e., BW ). This query differs from the classical
window operation described above which retrieves the objects in the underlying database
that cover the window instead of the blocks in the underlying database as we do here.
The rationale for using the quadtree blocks of the window is to match the quadtree
decomposition of the underlying spatial database. This makes it more straight-forward
to answer the window query since there is a direct correspondence between each window
block and some overlapping quadtree block(s) in the underlying spatial database. The
answer to the window query is the union of all the answers generated by querying the
underlying spatial database with the maximal quadtree blocks comprising the window
serving as the individual queries.
Our variant can be viewed as a preliminary step to the retrieval of the objects in that it
retrieves the blocks in the underlying database (i.e., BU ) that correspond to the window.
The next step would process blocks BU and extract the relevant objects from them. When
the underlying database is a quadtree where the objects have been decomposed so that the
blocks which contain them are disjoint, the step that extracts the relevant objects from
the blocks may in fact encounter some of the objects more than once (e.g., when a region
or line object has been decomposed into several blocks each of which contains a part of
the region or line object). In this case, this step would have to eliminate the duplicates
which is not a simple matter (but see [2, 4]).
The rationale for our variant is that we may wish to use these blocks (i.e., BU ) as
input to a subsequent operation whose underlying representation is also a quadtree thereby
facilitating the composition of several operations. Another way to characterize our variant
is that it is somewhat like a clipping operation where we are using the quadtree blocks
that make up the query window (i.e., BW ) to clip the blocks that make up the underlying
database (i.e, BU ).
In this paper we show how to retrieve the quadtree blocks from the underlying database
that cover the quadtree blocks that comprise the window. In particular, we describe a
method that retrieves each block b in BU just once even though b may cover several blocks
in BW . The rest of this paper is organized as follows. Section 2 gives an overview of
our approach. Section 3 describes our algorithm. Section 4 contains an informal proof of
correctness for the algorithm's block retrieval process, while an analysis of its worst-case
execution time and space complexity is given in Section 5. Section 6 presents empirical
results of the disk I/O behavior of the algorithm, while concluding remarks are drawn in
Section 7.
2 Overview of our Approach
A window decomposition algorithm is given in [3] which decomposes a two-dimensional
window of size n \Theta n in a feature space (e.g., an image) of size T \Theta T into its maximal
quadtree blocks in O(n log log T ) time. Once the set BW has been determined, we simply
retrieve the elements of the underlying spatial database S that overlap each of its elements.
The drawback of this algorithm is that many of the elements of S may be retrieved more
than once. For example, in Figure 2, the algorithm would retrieve block p of the underlying
spatial database four times (once for each of the maximal window blocks 1, 4, 8, and 10).
We assume that the underlying spatial database is disk-resident, and we often speak of the
operation of retrieving a block of the underlying spatial database as a disk I/O request.
This means that redundant disk I/O requests will result. 2 One solution is to keep track
of all blocks that have already been retrieved. This is not easy without additional storage
(see [2] for a discussion of the similar issue of uniquely reporting answers in a spatial
database).
s
r
Underlying
spatial
database
window w
Figure
2: Examples where more than one window block retrieves the same
block of the underlying spatial database.
The problem with using the algorithm in [3] is that the process of generating the
maximal blocks that comprise the window only depends on the query window and does
not take into consideration the decomposition of space induced by the underlying spatial
database. We overcome this problem by generating and retrieving each covering block
in the underlying spatial database just once. This is achieved by controlling the window
decomposition procedure through the use of information about blocks of the underlying
spatial database that have already been retrieved. We use an approach based on active
borders [23], at the expense of some extra storage. The algorithm that we present performs
this task with the same worst-case CPU execution-time complexity as the one in [3] (i.e.,
O(n log log T )). The difference is in the I/O cost where the new algorithm makes just M
requests to access the underlying spatial database instead of max(N; M) as in [3], where
M is the number of quadtree blocks in the underlying spatial database that overlap the
This problem can be overcome via appropriate use of buffering techniques. However, in this paper
we show how to avoid the problem by retrieving each block of the underlying spatial database just once
without relying on buffering techniques.
window and N is the number of maximal quadtree blocks in the window. A general significance
of both our algorithm and the one in [3] is that although the window contains n 2
pixel elements, the worst-case CPU execution-time complexity of the algorithms is almost
linearly proportional (and not quadratic) to the window diameter, and is independent of
other factors.
It is important to note that we retrieve blocks in the underlying spatial database by use
of information (partial) about their relationship to other blocks (e.g., containment, overlap,
subset, etc. We do not retrieve a block of the underlying database by its identifier. If we
could do this, then we could keep track of which blocks are retrieved via a hash table, for
example, and avoid retrieving them again. Instead, we are given the spatial description of
a window block, say b. The spatial description of b is used to retrieve all the blocks of the
underlying spatial database that are spatially related to b (e.g., the blocks that contain,
or are contained in, b). Blocks in the underlying spatial database can be retrieved more
than once if they satisfy some spatial relationship with respect to different window blocks.
In order to avoid retrieving the same block more than once when a different window
block is processed, we maintain a spatial analog to the hash-table mechanism above. This
is achieved through the usage of some spatial data structure, namely the active border,
tailored to match the needs of this type of spatial retrieval. The active border can also be
viewed as simulating the spatial equivalent of a sort-merge list of pages which is used in
database query processing when accessing data through secondary indexes [10].
3 Algorithm
Answering a window query by first computing the maximal quadtree blocks comprising it,
and then retrieving the corresponding covering blocks in the underlying spatial database
proceeds as follows. Assume a query window W, a spatial database S, a query function F
that performs the appropriate variant of a window query test (e.g., a containment test)
and a record of type answer set that accumulates the answer to the window query.
answer-set procedure Algorithm-1(S,W,F);
begin
reference spatial-database
value window W;
value function F;
block B;
block set C;
spatial-object set T;
answer-set RESULT;
decompose W into its maximal quadtree blocks;
foreach block B in W do
BEGIN
C:=blocks in S THAT cover B;
foreach block Q in C do
apply F to spatial objects associated with Q */
By varying the function F and the data type answer set, many window operations can be
implemented using Algorithm-1. For example, to answer the report query (i.e., reporting
the identity of all the features that exist inside a window), the function F simply identifies
all the spatial objects inside the block of the underlying spatial database, and the data type
answer set is just a set of spatial object identifiers for the qualifying objects. To answer
the exist query (i.e., determining if feature f exists in w), the function F tests whether or
not f (or f 's identifier) exists inside the block of the underlying spatial database, and the
data type answer set is the type Boolean while U is a logical or operation. To answer the
select query (i.e., reporting the locations of all instances of feature f in the window), the
function F simply tests whether or not f (or f 's identifier) exists inside the block of the
underlying spatial database, and the data type answer set is a quadtree that stores in it
the location of these blocks.
There is one principal issue in implementing this algorithm. This was discussed in
Section 2 and corresponds to the situation that block q in the underlying spatial database
covers more than one maximal quadtree block in the window. In this case, q will be
retrieved several times. This is what happens in the algorithm reported in [3]. This could
be overcome by avoiding the invocation of the retrieval step for some of the maximal
quadtree window blocks. The issue is how do we skip some of the maximal quadtree
window blocks. In order to understand this issue, we briefly focus on the relation between
the maximal quadtree blocks of the window decomposition and the quadtree blocks in the
underlying spatial database.
Assume that b is a maximal window block that is generated by the window decomposition
algorithm. Due to the quadtree decomposition of both the window and the underlying
spatial database, b can either be contained in, or contain, one or more quadtree blocks of
the underlying spatial database. In particular, there are three possible cases as illustrated
by
Figure
2. Case 1 is demonstrated in the figure by window block 2 which contains more
than one quadtree block of the underlying spatial database. All of these blocks have to be
retrieved (e.g., from the disk), and processed by the algorithm (e.g., the spatial objects
associated with these blocks will be reported as intersecting the window). The second
case is illustrated by window block 9 of Figure 2. Block 9 contains exactly one block of
the underlying spatial database which will have to be retrieved (e.g., from the disk) as
well. The third case is demonstrated by window blocks 1, 4, 8, and 10 of Figure 2 which
all require retrieving (e.g., from the disk) the same quadtree block (i.e., block p of the
underlying spatial database). Case 3 arises frequently in any typical window query, as
shown by the experiments conducted in Section 6, thereby resulting in a large number of
redundant disk I/O requests.
Our algorithm is an improvement over Algorithm-1 and is based on the following
observation (it is restated as Lemma 1, as well as proved, in Section 4):
Observation 1: Assume that a block, say b, is a maximal block that lies inside
the window w and overlaps with a block of the underlying spatial database, say
q. If q is of greater size than b, then q must intersect with at least one of the
boundaries of the window w (refer to Figure 3 for illustration).
In other words, there cannot be database blocks that are bigger than the intersecting
window blocks which are in the middle of the query window. These big database blocks
have to intersect the boundary of the query window. Our window retrieval algorithm is
based on this observation which we illustrate further later in this section.
The new algorithm consists of procedures WINDOW RETRIEVE, GEN SOUTHERN MAXIMAL,
and MAX BLOCK. They are described below, while their detailed code is given in the Ap-
pendix. The algorithm works for an arbitrary rectangular window (i.e., it need not be
square). We avoid generating non-maximal quadtree blocks in the window (or at least
generate a bounded number of them) by using the same technique as in [3], which we outline
below. Note that there are O(n 2 ) non-maximal blocks inside an n \Theta n window. Also,
each maximal quadtree block in the window is processed only once (i.e., as a neighbor of
another node) regardless of its size.
We make use of an active border data structure [23] which is a separator between the
window regions that have already been processed and the rest of the window. Note that
the active border in our case will differ from the conventional one (which looks like a
staircase) because of the nature of the block traversal process. In particular, we traverse
the blocks in the window in a row-by-row manner rather than in quadrant order (i.e., NW,
NE, SW, SE).
Figures
4-8 represent the first five steps of the execution of the algorithm for the query
window w. The heavy lines in Figure 4 represent the active border for window w at the
initial stage of the algorithm. In generating a new block, the window decomposer has to
consult the active border in order to avoid generating a disk I/O request for a window
region that has already been processed by a block of the underlying spatial database that
has already been retrieved.
The active border is maintained as follows. First, a window block, say b, is generated
by the window decomposer and a disk I/O request is issued to access the region of the
underlying spatial database corresponding to b. Assume that b overlaps in space with
block u in the underlying spatial database. Therefore, u is retrieved as a result of the
disk I/O request corresponding to b. The spatial objects inside u are processed and thus
there is no need to retrieve u again. As a result, the active border needs to be updated
by block b or u depending on which one provides more coverage of the window region.
Figures
4-8 illustrate the updating process of the active border. If u has a larger overlap
with the unprocessed portion of the window than b (e.g. window block 1 and block p
of the underlying spatial database in Figure 4, as well as window block 3 and block q
of the underlying spatial database), then the active border is expanded using u's region
Figure
5). If u is contained in b (e.g., window block 2 and block r of the underlying
spatial database in Figure 4), then all the other blocks in the underlying spatial database
have to be retrieved as well, and the active border is expanded by b's region (Figure 6).
If the sizes of b and u are the same (e.g., window block 12 and block s of the underlying
spatial database in Figure 4), then the active border is expanded by either one of them
Figure
8). Notice that, if we were using Algorithm-1, window blocks 4, 8, 10, and 7
would still be processed and hence would generate four redundant disk I/O requests to
retrieve blocks p and q.
The generation of the maximal quadtree blocks inside a given window is controlled by
procedure WINDOW RETRIEVE whose basic structure is given in Figure 9. WINDOW RETRIEVE
scans the window row-by-row (in the block domain rather than in the pixel domain),
and visits the blocks within it that have not been visited in previous scans 3 . For each
visited window block, say b, the underlying spatial database is queried and a corresponding
quadtree block, say q, is retrieved from the database. Procedures GEN SOUTHERN MAXIMAL
and MAX BLOCK generate b's or q's maximal southern neighboring blocks (in fact, only the
3 Observe that we could have chosen to scan the window in a column-by-column fashion instead of
row-by-row. The result is unchanged as long as the data structures for keeping track of the active border
are reoriented appropriately.
portion of q that lies inside the window will be used) according to the three cases presented
earlier in this section, that relate the location and size of both b and q with respect to
the query window. WINDOW RETRIEVE also makes sure that any of the remaining columns
of row r that lie within b or q are skipped. For example, consider Figure 2, where five
scans are needed to cover the 12 \Theta 12 window with maximal blocks. The first scan visits
blocks 1, 2, and 3; the second scan visits blocks 12, 5, 6, and 9; the remaining scans
visit blocks 14 and 11; 13; and 15. Notice that once blocks 5 and 6 have been visited,
their columns (i.e., 2-5 in the window) have been completely processed. Also, observe
that when block 1 is generated, block p of the underlying spatial database, which overlaps
with block 1, is retrieved. As a result, window blocks, 4, 8, and 10 are skipped. This way,
the algorithm can avoid reaccessing p by skipping all the window blocks that overlap with
p. As a consequence, the southern neighbors of p (and not those of block 1) are generated
by the algorithm.
Procedure GEN SOUTHERN MAXIMAL generates the southern neighbors (maximal blocks)
for each maximal block B generated by WINDOW RETRIEVE and that is not
contained in another maximal block. There are a number of possible cases illustrated in
Figure
greater than or equal to B. Otherwise, the total width of
blocks N 1 through Nm is equal to that of B. It is impossible for the total length to exceed
that of B unless there is only one neighbor (see Figure 10b). Procedure MAX BLOCK takes
as its input a window, say w, and the values of the x and y coordinates of a pixel, say
(col,row), and returns the maximal block in w with (col,row) as its upper-leftmost corner.
The resulting block has width 2 s , where s is the maximum value of i (0 - i - log T , where
\Theta T is the size of the image space) such that row mod and the point
(row lies inside w.
Figure
11a gives the active border's most general form. The active border does not
contain any holes (see Lemma 1 in Section 4 and thus Figure 11b corresponds to an
impossible situation). When a block of the underlying spatial database, say q, is retrieved,
the algorithm checks its size against the corresponding window block, say b. If q's size
is larger than that of b, then the algorithm knows that q has to intersect one of the
window's boundaries (see Lemma 1 in Section 4). We make use of this property here.
Figure
3 shows the four possible cases where the block retrieved from the underlying
spatial database intersects with one of the window boundaries. Each of the four cases
must be treated separately by the algorithm.
There is no need to maintain any data structures to explicitly store the northern portion
of the active border since WINDOW RETRIEVE can handle this portion directly. During the
first row-by-row scan of the window by WINDOW RETRIEVE, if a block of the underlying
spatial database, say q, is retrieved that happens to intersect the northern boundary of
the window (Figure 3a), then WINDOW RETRIEVE skips the window blocks in the current
row scan that overlap with q. The portion of the southern boundary of q that lies inside
the window is used to generate the southern neighboring blocks to be processed in the
next scan.
When block q of the underlying spatial database intersects only the southern boundary
of the window (Figure 3d), then it also suffices for WINDOW RETRIEVE to skip all the window
blocks that are adjacent to the window block that initiated q's retrieval. Although this
seems intuitive, it is not straight-forward to see that all of the processing of block q by
WINDOW RETRIEVE is localized in one part of the algorithm. In particular, although true,
it is not directly obvious that all the blocks that overlap with q will be processed by
WINDOW RETRIEVE at the same time so that they can be skipped. Thus as a result of this
localized processing, there is no need to maintain any explicit data structures in this case
either.
If q intersects the western or eastern boundaries (Figures 3b and 3c), its overlap with
the window creates a pocket-like region that needs to be stored in two separate lists,
WestList or EastList, respectively. Each time a window block is generated, it has to be
checked against the active border in order to make sure that the block is not covered by
a previously retrieved block of the underlying spatial database. Below, we show how to
perform this check in constant time.
To facilitate our presentation, we represent both WestList and EastList as two one-dimensional
arrays, each of length equal to the height of the window: WestList[r : r+n\Gamma1]
where the height of the window is n and (r; c) corresponds
to the x and y coordinate values of its upper-left corner. Figure 12b shows the border
represented by each of the two arrays as a result of extracting an 8 \Theta 12 window from the
underlying spatial database in Figure 12a. Let (r q ; c q ) be the location of the upper-left
corner of q. If q intersects the west boundary of the window, then WestList[r q ] is set to the
where the first component of the pair denotes the x coordinate value
of q's east boundary while the second component (i.e., s q ) denotes the size of q. The pair
represents the pocket-like region resulting from the intersection of q with w.
Similarly, if q intersects the east boundary of the window, then EastList[r q ] is set to the
Each time a window block is generated it has to be checked against the
active border in order to make sure that the block is not covered by a previously retrieved
block of the underlying spatial database. Notice that updating the active border only
requires one array access (either updating WestList or EastList depending on whether
q intersects the west or east boundaries of the window, respectively), while checking a
window block against the active border takes only two array accesses (one access to each
of WestList and EastList). Therefore, maintaining the active border, whether updating
or checking, takes O(1) time.
Observe that WINDOW RETRIEVE always generates maximal neighboring blocks, and
a bounded number of non-maximal blocks. An example of this situation arises when
processing blocks A-J in the first row of the window in Figure 13. Each of blocks B,
can generate at most one non-maximal neighboring block. Even
though these non-maximal blocks are generated, procedure WINDOW RETRIEVE skips them
in the next scan since they are subsumed (i.e., contained) in the previously processed
maximal block in the scan. For example, when scanning block K in Figure 13, blocks L,
M, and N are skipped since they are contained in it. This is easy to detect because for
each block we know the x and y coordinate values of its upper-left corner and its size.
Proving that the algorithm is correct involves showing that every block of the underlying
spatial database that overlaps with the query window is retrieved and processed by the
algorithm. In order to prove this, we can structure our algorithm in the following way.
The algorithm consists of two mechanisms: one for generating maximal quadtree blocks
inside the window (also termed the window decomposition algorithm), and the other for
retrieving blocks from the underlying spatial database and maintaining the active border.
The active border keeps track of the blocks on the boundary of the window that have
already been retrieved. This guarantees that each block in the underlying spatial database
is not retrieved more than once. Our strategy for proving that the algorithm is correct
is to separate these two mechanisms, show that each one is correct, and then prove that
they interact properly.
The algorithm has two cases. The first case arises when all the quadtree blocks of
the underlying spatial database that overlap the window are smaller than or equal to the
size of the smallest quadtree block in the window. The second case arises when this size
criterion is not satisfied.
In the first case the window decomposition algorithm will have to generate all of the
maximal quadtree blocks inside the window and none will be skipped - i.e., each one
causes a block of the underlying spatial database to be retrieved. In other words, there
are no pockets and thus the arrays WestList and EastList are never updated or accessed.
This means that the algorithm reduces to the window decomposition algorithm given in [3].
The window decomposition algorithm is proved correct in [3] and thus we will not
address it here. However, we only state that proving that the window decomposition
algorithm is correct involves showing that the execution of the algorithm generates a list
of maximal blocks that lie entirely inside the window and that cover each point inside the
window. In other words, each point inside the window is covered by one maximal block
that is generated through the execution of the algorithm. The following two theorems are
proved in [3]:
Theorem 1: Each point inside a window is covered by one and only one maximal block
generated by the algorithm.
Theorem 2: The window decomposition algorithm generates all the maximal blocks
inside the window and only maximal blocks, and hence is correct.
We now address the second case where some of the blocks in the underlying spatial
database are larger than the smallest block in the window - i.e., blocks of the underlying
spatial database whose sizes are larger than the overlapping window blocks. We need to
show that the interaction and maintenance of the active border with the window decomposition
algorithm (1) guarantees that every block of the underlying spatial database that
overlaps with the query window is retrieved and processed by the algorithm, and (2) does
not interfere negatively with the window decomposition algorithm. From the complexity
point of view, we prove, in Section 5, that every block of the underlying spatial database
that overlaps with the window is retrieved only once.
First, we use the concept of a maximal zone [3] to facilitate the presentation of the
proofs. Assume a window having (c; r) as the x and y coordinate values of its upper-left
corner with height w h (i.e., in the y direction) and width ww (i.e., in the x direction). First,
let us look at the x direction. Processing along the width ww , we subdivide the window
into p vertical strips with coordinate values of their upper-left corner
. p is defined so that c An example of such a decomposition
into vertical strips is shown in Figure 14a. The vertical strips are termed maximal columns.
We now subdivide the window into horizontal strips in the same way. In particular,
we have q horizontal strips with (c; r i as the x and y coordinate values of
their upper-left corner where r
r . q is defined so that r An example of
such a decomposition into horizontal strips is shown in Figure 14b. The horizontal strips
are termed maximal rows.
Now we define the term maximal zones as follows. A maximal zone, say Z ij , is the
region between the vertical strips (i.e., maximal columns) having c i and c i+1 as the x-coordinate
values of their upper-left corner and the horizontal strips (i.e., maximal rows)
having r j and r j+1 as the y-coordinate values of their upper-left corner where
Figure
14c gives an example of decomposing a window into its maximal
zones.
Below, we state some propositions dealing with properties of maximal zones. Their
proofs are straightforward, and we omit them in the interest of brevity. They are illustrated
in
Figure
14d.
Proposition 1: Each maximal block inside the window is entirely contained in one and
only one maximal zone.
Proposition 2: All the maximal blocks inside a maximal zone are of the same size.
Proposition 3: A maximal zone contains either one maximal block, or one row of maximal
blocks, or one column of maximal blocks.
Proposition 4: All the southern neighbors of a block lie in one maximal zone.
Proposition 5: There exists a maximal column, say c k , inside the window such that,
In other words, the sequence of distances between (width of) the maximal columns forms
a monotonically increasing sequence followed by a monotonically decreasing sequence. An
equivalent property exists for maximal rows.
A useful invariant that holds during the execution of the window decomposition algorithm
that also relates to maximal columns is stated below.
Invariant 1: Each maximal window block and its southern neighbor window blocks that
are both generated by the window decomposition algorithm always lie inside the same
maximal column.
In other words, the blocks inside a maximal column are processed independently of the
blocks in other maximal columns inside the window. Put differently, although the algorithm
scans the window row-by-row (in the block domain) and generates the maximal
neighboring blocks to the south of each block encountered, there is no interaction between
blocks of different maximal columns. We make use of this invariant to prove the lemmas
below.
Lemma 1: Assume that a block, say b, is a maximal block that lies inside the window
w and overlaps with a block of the underlying spatial database, say q. If q is of greater
size than b, then q must intersect with at least one of the boundaries of the window w
Figure
3).
Proof by Contradiction: Since b overlaps with q and b is smaller than q, then b is
contained in q (by the definition of a quadtree decomposition of space). Assume to the
contrary that the database block q lies entirely inside w. If q is of greater size than the
window block b that overlaps with it, then b is not a maximal block since we can use a
window block b 1 that contains b and that coincides with q as our new maximal block,
which leads to a contradiction. 2
As a result, we deal with three categories of blocks of the underlying spatial database
that intersect the window boundary: blocks that intersect the north boundary, blocks
that intersect the east (west) boundary, and blocks that intersect the south boundary.
Notice that the algorithm treats blocks that intersect both the west (east) and the south
boundaries of the window as if they just intersect the west (east) boundary. On the other
hand, it treats blocks that intersect both the north and west (east) boundaries of the
window as if they just intersect the north boundary. Blocks intersecting the east or west
boundary of the window receive the same type of processing and hence are considered as
one group. We prove the correctness of the interaction of each category separately.
Lemma 1 means that the active border does not contain any holes (see Figure 11b)
since the query window is scanned row-by-row, and large-sized blocks of the underlying
spatial database intersect only the window boundary. Therefore, storing only the outer
boundary of the active border is enough.
Lemma 2a: If a block of the underlying spatial database, say q, intersects the west (east)
window boundary, then the east (west) boundary of q that lies inside the window must
coincide with a boundary of one of the maximal columns of the window.
Proof: We prove the lemma for the case when q intersects the west boundary of the
window. The other case is similar. Assume the lemma does not hold - i.e., that q
intersects the window boundary but that the eastern boundary of q that lies inside the
window does not coincide with a maximal column of the window. Therefore, one of two
possible cases must occur. These are illustrated in Figure 15. Both of the cases cannot
happen since, by the definition of a quadtree decomposition, blocks cannot overlap in this
manner. 2
An analogous lemma can be stated for blocks intersecting the north or south boundary of
the window.
Lemma 2b: If a block of the underlying spatial database, say q, intersects the north
window boundary, then the south (north) boundary of q that lies inside the window
must coincide with a boundary of one of the maximal rows of the window.
Lemma 3: If a block of the underlying spatial database, say q, intersects the west (east)
window boundary, then the part, if any, of the south boundary of q, say s, that lies inside
the window must coincide with the north boundary of a maximal block inside the window.
Proof: Assume that q intersects the west boundary of the window. From Lemma 2a,
q's east boundary coincides with a boundary of a maximal column of the window, say c.
However, other maximal columns to the west of c may intersect q as well (for example, in
Figure
12, maximal column C 1 intersects block p of the underlying spatial database). If
q intersects with no maximal columns other than c, then only two cases are possible (as
illustrated in Figures 16a and 16b). Figure 16a cannot occur in a quadtree decomposition,
while
Figure
16b satisfies the Lemma. If q intersects with one or more maximal columns
other than c, then s must coincide with a maximal row inside the window (Figure 16c) as
the other case cannot exist in a quadtree decomposition (Figure 16d). Since a maximal
row coincides with the north boundary of maximal blocks across the whole window, then
this applies to q as well. 2
Lemma 4: If a block of the underlying spatial database, say q, intersects the west (east)
window boundary, then the window decomposition strategy will only skip the window
blocks covered by q while maintaining normal processing otherwise. In other words, up-dating
the active border with q does not adversely affect the mechanism used for window
decomposition.
Proof: Assume that q intersects the west border of the window. By Lemma 2a, the east
boundary of q coincides with a maximal column of the window. Therefore, the window
decomposition mechanism will function properly to the east of q since, by Invariant 1, the
block generation process works independently inside each maximal column. The portion
of the south boundary of q, say s, that lies inside the window, is used by the algorithm to
generate the new window blocks to the south of q. However, from Lemma 3, all parts of
s coincide with the north boundary of a maximal block inside the window. Therefore, by
applying a maximal block computation at s, the algorithm would still generate maximal
blocks of the window to the south of q after skipping the ones inside q (and hence avoid
retrieving q more than once by the overlapping window blocks). If the south boundary of
lies outside the window, then the Lemma holds since no further processing to the south
of q is needed. In addition, by Invariant 1, the window decomposition process to the east
of q is not affected by q since the east boundary of q coincides with a maximal column.We now study the case where a block of the underlying spatial database intersects the
south boundary of the window. We make use of the following lemma. Its proof is given
in [3] (where it is Lemma 4).
Lemma 5: All the maximal blocks arranged in a row inside a maximal zone are processed
in the same iteration of the main loop of procedure WINDOW RETRIEVE.
Lemma a block of the underlying spatial database, say q, intersects only the south
boundary of the window, then q lies entirely inside one maximal column of the window.
Proof: By Proposition 5, if q overlaps with more than one maximal column of the window,
then either the size of q is not a power of two (a contradiction) or q must intersect with
the east or west boundary of the window (a contradiction). Therefore, q lies inside one
maximal column. 2
Combining Lemmas 5 and 6, we get the following result:
Lemma 7: If a block of the underlying spatial database, say q, intersects only the south
boundary of the window, then the window decomposition strategy will only skip the
window blocks covered by q, while maintaining normal processing otherwise.
Proof: By Lemma 6, q lies inside only one maximal column of the window. By Lemma 5,
if one maximal window block, say b, results in retrieving q, then the rest of the window
blocks in the maximal zone that lie in the same row as b, will exist in the same iteration of
the main loop of procedure WINDOW RETRIEVE. Therefore, all of them can be automatically
skipped by the algorithm once q is retrieved, and hence no additional data structure is
needed to record q's retrieval. Since the south boundary of q is already outside the window,
no further processing is needed to the south of q. The effect of this is that it results in
skipping all the window blocks that overlap with q and that lie to the south of b up to
the south boundary of the window. Also, by Invariant 1, q lies inside only one maximal
column and hence does not affect other portions of the window decomposition mechanism.Lemma 8: If a block of the underlying spatial database, say q, intersects the north
boundary of the window, then the window decomposition strategy will only skip the
window blocks covered by q while maintaining normal processing otherwise.
Proof: Since q intersects the north boundary of the window, q will be retrieved when
the algorithm scans the first row in the window. In addition, q will be retrieved by the
leftmost maximal window block, say b, that overlaps with q since scanning is from left
to right. Therefore, all the window blocks to the right of b and that overlap with q are
automatically skipped by the algorithm since all of them immediately follow b in TopList,
the list of blocks to be processed. Processing of the algorithm resumes at the first window
block to the right of q in the current row scan. By Lemma 2b, the part of q's south border,
say s, that lies inside the window will coincide with a maximal row of the window. Since
a maximal row coincides with the north boundary of maximal blocks across the whole
window, this applies to s as well. Therefore, using s to generate maximal blocks to the
south of q will resume regular processing of the decomposition algorithm as it results in
generating legitimate maximal blocks of the window after skipping the window blocks that
overlap with q. Therefore, q is retrieved just once by the algorithm without affecting the
normal processing of the algorithm. 2
Combining Theorems 1 and 2 and Lemmas 4, 7, and 8 we get the following theorem:
Theorem 3; Every block of the underlying spatial database that overlaps with the query
window is retrieved by procedure WINDOW RETRIEVE and hence the algorithm is correct.
Proof: By Theorem 1, maximal blocks of the window cover every point inside the window
(without overlap). Therefore, if blocks of the underlying spatial database are smaller than
the window blocks, then, by Theorem 2, the window decomposition algorithm will generate
all the maximal blocks inside the window, and hence all the blocks of the underlying
spatial database overlapping with the window blocks are retrieved. If some of the blocks
of the underlying database, say D, are larger than the corresponding maximal window
blocks, then by Lemma 1, each block, say q in D, has to intersect with some of the
window boundaries. By Lemmas 4, 7, and 8, the algorithm will skip all but one of the
maximal blocks of the window that overlap with q (this is because when one of the maximal
blocks has to retrieve q, then the rest of the overlapping window blocks are skipped).
Lemmas 4, 7, and 8 also show that the normal window decomposition mechanism is
resumed after processing each block of the underlying spatial database that overlaps the
5 Complexity Analysis
Based on Observation 1 (restated as Lemma 1) that relates the size of the query window
blocks to the size of the underlying database blocks that they intersect, we are able to
restrict the size of the active border, so that it has a worst-case space complexity of O(n)
instead of O(n 2 ) for an n \Theta n query window.
Analyzing the time complexity of our algorithm is a bit complex as there are two
processes going on, and hence two ways of measuring it. The first is in terms of the blocks
of the underlying spatial database that are retrieved (the I/O cost), while the second is
in terms of the maximal blocks in the window, i.e., the window decomposition mechanism
and the maintenance of the active border (the CPU cost).
The CPU cost of the process of generating the maximal quadtree blocks in the window
is computed as follows. First, we find the number of maximal quadtree blocks, say N ,
inside the window, and then compute the cost of generating each one of the maximal
quadtree blocks, say T gen . The overall CPU cost T cpu is the product of these two terms,
i.e.,
It is important to note that, usually, not all of the maximal blocks inside the window are
generated. However, in the worst case, when none of the blocks in the underlying spatial
database intersect the border of the window, all the maximal blocks inside the window
are generated.
It is known that the number of maximal quadtree blocks inside a square window of
size n \Theta n is
in the worst case ([8, 11, 27]). It remains to compute the cost of generating each maximal
quadtree block comprising the window, i.e., T gen . This consists of the work, say Tm ,
to generate a maximal quadtree block, say B, and the work that is wasted, say Tw , in
generating southern neighboring blocks of B that are non-maximal. Therefore, the total
CPU execution time of the window decomposition algorithm is
Given a point (x,y) in a T \Theta T space, there can be at most log T different blocks
of size 2 i (0 - i - log T ) with (x,y) as their upper-left corner. We use a binary search
through this set of blocks to determine the maximal quadtree block inside the window [3].
Thus Tm is O(log log T ).
To compute Tw , we need to show that each maximal quadtree block inside the window
is generated once, and that only a limited number of non-maximal blocks are generated.
We say that the work required to generate blocks that are not maximal with respect to
a particular window is wasted. Such blocks are ignored (i.e., bypassed) in subsequent
processing. For example, the work in generating the southern neighbors of blocks B, C,
D, F, G, H, and J (i.e., L, M, N, P, Q, R, and T, respectively) in Figure 13 is wasted.
This is formulated and proved in the following two Lemmas.
Lemma 9: Each maximal quadtree block inside window w is generated at most once.
Proof: In Theorem 2, we proved that every maximal quadtree block inside window w
is generated by the algorithm. To show that it is generated only once we observe that
each window block processed by the algorithm generates only its southern neighbors. The
facts that non-maximal window blocks are bypassed by the algorithm, and that maximal
blocks do not overlap, mean that each maximal window block, say B, is generated as the
southern neighbor of only one other maximal window block, say C. Note that this worst
case only arises if WINDOW RETRIEVE generates all of the maximal blocks (i.e., none are
Lemma 10: Each window block visited by the algorithm can waste at most O(log log T )
work in generating intermediate non-maximal window blocks.
Proof: Assume that window block B generates wasted work. We show that this work takes
O(log log T ) time. B can generate neighboring southern maximal blocks that are either
smaller or larger. When the size of the neighboring block is greater than or equal to the size
of B, then the algorithm takes O(log log T of whether or not it is wasted
and the Lemma holds. When more than one southern neighboring block is generated (this
number can be of the same order as the size of B), we need to show that all the generated
southern blocks are maximal, and cannot be bypassed, i.e, they are not wasted work.
We shall prove this by contradiction. Assume that B generates more than one southern
neighboring block and that all of them are bypassed (i.e., not visited) in subsequent
processing. It should be clear that due to the nature of the quadtree decomposition of
space, either all of them are visited, or all are bypassed. Our assumption means that there
exists a block C whose width is greater than the total width of B's southern neighbors.
Let (B x ,B y ) and (C x ,C y ) be the locations of the upper-leftmost pixels of blocks B and
C, respectively. Also, let B s and C s be the widths of blocks B and C, respectively. It is
easy to see that the fact that B and C are maximal blocks that are southern neighbors
of other visited maximal blocks means that C . The fact that C s ? B s means
that the lower-rightmost pixel of C is at (C x which is in the window.
Therefore, which is the lower-rightmost pixel of B's southern
neighbor of equal size, say D, is also in the window. This means that D is B's neighboring
southern maximal block. However, this contradicts the existence of more than one such
block. Thus the assumption that all of the southern neighboring blocks of B are bypassed
is invalid. Therefore, no work is wasted in generating B's southern neighbors in this case,
and the Lemma holds. 2
Combining the results for Tm and Tw , and Theorem 3 means that we have proven the
following theorem.
Theorem 4: Given an n \Theta n window in a T \Theta T image, the worst-case CPU execution
time for the algorithm is O(n log log T
In order to compute the disk I/O execution time of the algorithm, say T io , we need to
prove the following theorem.
Theorem 5: Every block of the underlying spatial database that overlaps the query
window is retrieved once, and only once, by WINDOW RETRIEVE.
Proof: By Lemma 9, each maximal block is generated at most once. Let q be a block in
the underlying spatial database and suppose that q overlaps the window. If q lies inside
the window and is of equal or smaller size than the overlapping window block, say b, then
q will be retrieved once by the algorithm when b is generated, and hence the theorem holds
(notice that maximal blocks do not overlap). If q overlaps the window and if q contains
more than one window block, then q will be retrieved by the first window block, say b, that
encounters q. However, from that point onwards, all the window blocks that overlap q will
be skipped and block q will not be retrieved again. By Lemma 1, q has to intersect one
of the window boundaries. If q intersects the east or west boundaries of the window, then
by Lemma 4 the active border (i.e., WestList and EastList) prevents block q from being
retrieved again by the remaining window blocks that overlap q. Otherwise, if q intersects
the north or south boundaries of the window, then by Lemmas 7 and 8 the algorithm skips
the remaining window blocks that overlap q. Therefore q will be retrieved once, and only
once. Hence the theorem also holds when q is of larger size than the overlapping window
blocks. 2
Note that there is an onto relation between the set of blocks of the underlying spatial
database that are retrieved by the algorithm and the set of maximal window blocks
generated by the algorithm. This relation is only onto, rather than one-to-one onto, because
a window block, say b, may overlap more than one block in the underlying spatial
database (i.e., the overlapped blocks are smaller than b), in which case several blocks in
the underlying spatial database will be retrieved. However, they will only be retrieved
once.
The actual disk I/O cost of the algorithm depends on how the quadtree is implemented.
Assume that the underlying database consists of a total of K quadtree blocks and that M
of these blocks are retrieved by the window query. Assume further that it spans a space
of size T \Theta T . A pointer-based quadtree implementation may have an overall I/O cost as
high as M log T as we must traverse at most log T pointers to access the relevant block
in the quadtree. Using a pointerless quadtree representation such as a linear quadtree
(e.g., [14]) where each leaf block is represented by a unique number which is stored in a
-tree, the overall I/O cost is O(M log K) as the cost to retrieve each block is O(log K).
6 Empirical Results
In this section, we study the performance of the two algorithms Algorithm-1 (which
is based on the window decomposition algorithm [3]) and WINDOW RETRIEVE, which is
proposed in this paper. The window decomposition part of the two algorithms has the
same worst-case execution time complexity (i.e., O(n log log T )) as shown in Section 5. As
a result, we only focus on comparing the I/O cost of the two algorithms.
Figure
17 shows the results of experiments comparing the number of disk I/O requests
(i.e., blocks retrieved) to answer a window query using Algorithm-1(labeled Old Alg))
with the number of disk I/O requests generated by WINDOW RETRIEVE (labeled New Alg).
Our data consists of maps of the road network of the US provided by the Bureau of the
Census. A sample map corresponding to Falls Church containing 640 line segments is
given in Figure 18. The maps are represented using the PMR-quadtree [18, 21], a variant
of a quadtree for storing vector data.
The x-axis corresponds to the ratio between the window area and the area of the
underlying spatial database which spanned a 512 \Theta 512 image. Experiments were run for
the ratios .01, .001, .0001, and .00001. For example, the ratio .00001 corresponds to a 5 \Theta 5
window, while the ratio .01 corresponds to a 50 \Theta 50 window. For each such ratio, a set of
500 randomly positioned rectangles were generated. A window query is processed for each
rectangle using both algorithms. The y-axis corresponds to the average of the disk I/O
requests for each set of rectangles plotted on a logarithmic scale. Not surprisingly, use of
WINDOW RETRIEVE does not lead to a great reduction in disk I/O requests for small window
sizes (about 25%) since for both the window and the corresponding area in the underlying
database the number of blocks is relatively small. However, for larger size windows, the
reduction is much more pronounced, and, in fact, use of WINDOW RETRIEVE leads to an
improvement of over one order of magnitude (e.g., a factor of 10).
7 Concluding Remarks
An algorithm was presented for retrieving the blocks in a quadtree-base spatial database
environment that overlap a given window. It is based on decomposing a window into its
maximal quadtree blocks, and performing simpler sub-queries to the underlying spatial
database. Each block in the underlying spatial database is only retrieved once. The
algorithm is proven (analytically and experimentally) to lead to an improvement in disk
I/O performance. The algorithm requires some extra space (on the order of the width of
the window), to store the active border. It remains to consider how the algorithm can be
adapted to handle spatial databases with non-disjoint objects (i.e., overlapping).
Performance can be enhanced further by selecting a suitable buffering strategy for
the underlying B-tree [1, 5]. In particular, if we can adjust the scan order of the window
algorithm so that the window quadtree blocks are visited in Morton order, and accompany
this with a most-recently-used buffer replacement policy, then this would guarantee that
B-tree pages, both leaf and non-leaf pages, would be requested by the algorithm only
once, and hence no redundant disk I/O requests would result. For more clarification on
this issue, see [1, 5].
--R
An algorithm and a cost model for window queries in spatial databases.
Uniquely reporting spatial objects: yet another operation for comparing spatial data structures.
Decomposing a window into maximal quadtree blocks.
Hashing by proximity to process duplicates in spatial databases.
Multidimensional window retrieval in large spatial databases.
The ubiquitous B-tree
The space efficiency of quadtrees.
Advances in Spatial Databases - Fourth International Symposium
Fundamentals of Database Systems.
Analytical results on the quadtree decomposition of arbitrary rectangles.
Adaptive grids for geometric operations.
The BANG file: a new kind of grid file.
An effective way to represent quadtrees.
Efficient structures for geometric data management.
R-trees: a dynamic index structure for spatial searching.
The LSD tree: spatial access to multidimensional point and non-point data
A consistent hierarchical representation for vector data.
The grid file: an adaptable
Applications of Spatial Data Structures: Computer Graphics
The Design and Analysis of Spatial Data Structures.
Spatial data models and query processing.
Computing geometric properties of images represented by linear quadtrees.
Storing a collection of polygons using quadtrees.
The buddy-tree: an efficient and robust access method for spatial data base systems
A formula for computing the number of quadtree node fragments created by a shift.
--TR
--CTR
Ashraf Aboulnaga , Walid G. Aref, Window Query Processing in Linear Quadtrees, Distributed and Parallel Databases, v.10 n.2, p.111-126, September 2001 | window block retrieval;active border;spatial databases;range query;design of algorithms;data structures;databases;quadtree space decomposition;clipping |
594780 | A Multi-Resolution Content-Based Retrieval Approach for Geographic Images. | Current retrieval methods in geographic image databases use only pixel-by-pixel spectral information. Texture is an important property of geographical images that can improve retrieval effectiveness and efficiency. In this paper, we present a content-based retrieval approach that utilizes the texture features of geographical images. Various texture features are extracted using wavelet transforms. Based on the texture features, we design a hierarchical approach to cluster geographical images for effective and efficient retrieval, measuring distances between feature vectors in the feature space. Using wavelet-based multi-resolution decomposition, two different sets of texture features are formulated for clustering. For each feature set, different distance measurement techniques are designed and experimented for clustering images in a database. The experimental results demonstrate that the retrieval efficiency and effectiveness improve when our clustering approach is used. | Introduction
Satellite remote sensing development generated huge amount of image data during the last two
decades. With the launch of the new breed of high spatial resolution satellite systems, the volume
This research is partially supported by Xerox Corporation and NCGIA at Buffalo.
of digital image data will significantly increase. Paralleling with the remote image sensing is the
availability of Geographic Information System (GIS) data such as digital orthophotographs and
digital elevation models that are available in pixel format and in sheer volumes. Thus, there is
a great demand for effective retrieval mechanisms. In processing these geographic images, the
ultimate interest is to recognize and locate specific contents. A content-based retrieval approach is
paramount to organizing geographic images. In the design of such retrieval approaches, significant
features must first be extracted from geographical data in their pixel format. The features are
numerical measurements to characterize an image. These features can then be used to cluster and
index the images for efficient retrieval. Methods have been developed for indexing and accessing
alpha-numerical data in traditional databases. However, the traditional approaches to indexing
may not be appropriate in the context of content-based image retrieval [CYDA88, RS91, BPJ93].
In this context, a challenging problem arises with many image databases, within which queries are
posed via visual or pictorial examples (termed visual queries). A typical visual query might entail
the location of all images in a database that contain a subimage similar to a given query image.
Such a query is well suited to and most appropriate for geographic images in identifying specific
geographic contents such as land use/land cover types.
Texture in images has been an important aspect for geographic image classification and retrieval
[Har79, Joh94, RW96, WH90], due primarily to the heterogeneity nature of geographic
images and the association between the texture patterns and the geographic contents. The variety
and complexity of geographic texture present a challenge as well as an impetus for seeking
more effective approaches in feature representation. We have conducted experimental research
on image data retrieval based on texture feature extraction [SZ97, RSZSM97, SZB97]. In most
existing content-based retrieval approaches, feature vectors of images are first constructed (e.g.,
from wavelet transforms), which are then used to distinguish images through measuring distances
between feature vectors. Our experimental results demonstrate that this type of approaches can be
effectively used to perform content-based retrieval based on similarity comparison between images.
However, we encounter a critical problem that the feature vectors of some semantically irrelevant
images may be located very close in the feature space. Figure 1 presents two images of water
and stone between which the distance of the feature vectors is very small, but these images are
semantically not similar. Given a query such that its feature vector is located in the neighborhood
of the feature vectors of the two given images, both images are highly possible to be retrieved
together in response to the query. Thus, indexing alone, using R-tree or its variants based on the
closeness of feature vectors in the feature space, sometimes may not provide satisfactory solutions.
An effective clustering approach needs to be integrated into indexing techniques for efficient and
effective retrieval of image data. Once the query is narrowed to a specific category, image retrieval
can then proceed efficiently.
(a) (b)
Figure
1: Semantically different Images with similar feature vectors.
Figure
shows two arbitrary shape semantic clusters C 1 and C 2 in a two-dimensional feature
space. We may assume that C 1 and C 2 represent the images of stone and water in the feature space.
Consider the query image q which belongs to the cluster C 1 . If we only consider the closeness of
feature vectors in the feature space to return relevant images, we may retrieve many images from
cluster C 2 that are semantically irrelevant. Indexing trees such as R-trees are very efficient in
retrieving the nearest neighbors of the query image, but since they do not consider semantics
of images, the retrieved images might be semantically irrelevant. If we successfully classify the
database images into different semantic clusters, a visual query can be quickly narrowed to a
specific category. Therefore, combining clustering with R-tree related indexing, image retrieval can
proceed both effectively and efficiently.
x
x
x
x
x
x
x
x
x
x
x
xx
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
Figure
2: Two semantic clusters.
In this paper, we present an approach to effective and efficient retrieval of images in large
geographical image database systems. The goal is, given a query image of size n \Theta n pixels, to
retrieve all the database images of size N \Theta N (where n - N ), that contain a portion similar to
the query image. Database images have been decomposed into smaller segments (down to n \Theta n
segments) offline. The query image will be compared to the corresponding segments (as will be
discussed later). A clustering approach is designed to be incorporated into the existing indexing
methods [SRF87, BKSS90, LJF94] to achieve the effectiveness and efficiency. Similar to most of
other current clustering methods, our approach cannot distinguish overlapping clusters 1 . Thus,
1 The proposed method in [SCZ98] handles the overlapping clusters using heterogeneous features.
we assume that different clusters do not overlap in the feature space. The semantic clusters can
have arbitrary shapes or can be disconnected. We first choose a set of training samples to identify
predefined semantics clusters (for example, residential or agriculture). These clusters include the
semantically similar images. Then using a hierarchical method we find template images representing
each cluster. This approach helps consider both semantics and feature vectors in classifying images.
Using the multi-resolution property of wavelet transforms, we extract the features at different scales
where only the coarse features are used in clustering. In our clustering approach, distribution of
feature vectors in the feature space is also considered. Combining the proposed clustering with any
existing indexing approach, our experiments demonstrate that retrieval from clustered database
outperforms the methods that are based only on nearest neighbor retrieval. In addition, since the
retrieval of images is narrowed to a specific category, image retrieval can proceed more efficiently.
Since geographical images (specially airphoto images) are rich in texture, and have relatively well-defined
clusters, it makes our approach, which extracts multi-resolution texture features and clusters
the images, a good candidate to be used.
The remainder of this paper is organized as follows. Section 2 presents the approach to multi-resolution
texture feature extraction. Section 3 discusses the application of the feature extraction
approach on image clustering and retrieval. Experiments are presented in Section 4. Concluding
remarks are offered in Section 5.
In this section, we will first discuss the importance of texture features in retrieval. We will then
introduce wavelet transforms and the wavelet-based texture features extracted from images.
2.1 Texture Features
In the current methods, spectral features (pixel values) are usually used to retrieve images from a
geographical image database. However, spectral features alone may not be sufficient to characterize
a geographical image because they fail to provide information about spatial pattern of pixels.
One way of obtaining better classifications and retrieval is the use of spatial pattern recognition
techniques that are sensitive to factors such as image texture and pixel content. In addition, using
texture features of a group of pixels instead of individual pixels can reduce the information to be
processed. Hence it decreases the required memory storage and computation for image retrieval
and clustering. Because of the spatial nature of geographic images, texture has been used to
distinguish among the images [RW96, Lan80, HK69, MM96, Joh94, GT83]. However, compared to
purely spectral based procedures, texture-based retrieval systems have received limited attention
in remote sensing in the past [LK94].
Different methods defining texture were proposed to model natural texture feature or to be
used in classification. These approaches have included the use of Fourier transforms [SF86], fractals
[Man77], random mosaic models [AR81, JMV81], mathematical morphology [DP89], syntactic
methods, and linear models [CJ83]. However, most of these approaches have been used in the field
of pattern recognition and have not been applied to the analysis of remotely sensed data [RW96].
One method in texture feature extraction that has been used for remotely sensed data is to pass a
filter over the images and use the variance of the pixels covered by the filter as the value of the pixel
in the texture image [AN91, BN91, Jen79]. Woodcock and Ryherd found that using the above local
variance texturing technique in an adaptive windowing procedure resulted in an improved image
for certain applications [WR89]. The location of the adaptively located window used to calculate
local variance is the window with the lowest local variance of all windows that include the pixel.
They then apply a multi-pass, pair-wise, region-growing algorithm to find spatially cohesive units,
or "regions", in the image [RW96].
Johnson used a knowledge-based approach to classification of built-up land from multi-spectral
data. The approach involves spectral classification, determination of size and neighbor relations for
the segments in the spectrally classified image, and rule-based classification of the image segments
into land-use categories [Joh94]. The implementation is slow, and performance problems were
encountered due to the large number of objects being processed [Joh94].
Gray-level co-occurrence matrix, a matrix of second order probabilities, has been used in texture
analysis [BL91, HTC86]. The element s(i; j; v) of the co-occurrence matrix is the estimated
probability of going from gray-level i to j, given the displacement vector \Deltay). A set of
statistical values computed from co-occurrence matrices, such as entropy, angular second momen-
tum, and inverse difference moment have also been used [HSD73, PF91]. In practice, there are two
problems regarding this approach. The first is that the co-occurrence matrix depends not only on
the spatial relationship of gray-levels, but also on regional intensity background variation within
the image. The second issue is the choice of displacement vector because the co-occurrence
matrix characterizes the spatial relationship between pixels for a given vector v [WH90].
Wang and He presented a statistical method for texture analysis, where they define texture unit as
the smallest complete unit that best characterizes the local texture in eight directions from a pixel.
The distribution of texture units results in texture spectrum which can be used in texture analysis
[WH90]. Since the local texture information for a pixel is extracted from a neighborhood of 3 \Theta 3
pixels, instead of one displacement vector used in the gray-level co-occurrence matrix, their method
is more complete for the characterization of texture. They provided limited experimental results.
The textural structures that can be described within a neighborhood are naturally limited to
those which are observable within the size of neighborhood. Hence, features that are extracted based
on measurements within a fixed size neighborhood (for example 3 \Theta 3 pixels window) have poor
discrimination power when applied to textures not observable within the neighborhood because of
wrong scale [BGW91]. All the above texture analysis methods share this common problem. This
issue motivates the use of a multi-resolution method.
Bigun et al formulated a general n-D least mean square problem whose solution facilitates the
extraction of dominant orientation [BGW91]. In 2-D space, they used the linear symmetry along
with the Laplacian pyramids approach, to produce feature images. The linear symmetry features
directly measure the dominant orientation information in the frequency channels [BGW91]. QBIC is
a content-based image retrieval system which retrieves images based on their color, shape, or texture
In QBIC, texture features are based on modified versions of the coarseness, contrast,
and directionality features proposed in [TMY78]. The distance between the three-elements feature
vectors is measured by weighted Euclidean distance. However, new mathematical representations of
image attributes are needed in QBIC [FSN 95]. Features that describe new image properties such
as alternate texture measures or that are based on fractals or wavelet representations, for example,
may offer advantages of representations, indexability, and ease of similarity matching [FSN
Jacobs et al presented a searching algorithm for query images in an image database [JFS95].
They apply wavelet transform on query and database images. The wavelet coefficients are then
truncated and only the coefficients with largest magnitudes are used in comparing images. They
developed an image query metric which uses those truncated and quantized wavelet coefficients.
According to them, wavelet coefficients provide information that is independent of the original
resolution. Thus, a wavelet scheme allows queries to be specified to any resolution (potentially
different to that of database images) [JFS95]. Hence they call their method multi-resolution image
querying. Manjunath and Ma used Gabor wavelet transform to extract texture features and showed
that it performed better than other texture classification methods [MM96]. They used mean and
variance of frequency sub-bands to represent texture. In our method, we take advantage of multi-resolution
property of wavelet explicitly.
In our approach, as will be explained later, we apply wavelet transform to extract texture
features. Based on the property that was mentioned in [JFS95], a query image can have a different
size from that of a database image, which we can use. In addition to that, by applying wavelet
transform, we can have information about images at different scales (resolutions) from fine to coarse
at the same time. Our interpretation of the term (multi)resolution is different from that of [JFS95].
In their case, resolution indicates number of pixels in the image, and since number of pixels of
the query image and the database image do not necessarily have to be the same, they call their
method multi-resolution image querying. In our method, since we extract the image features at
different scales or levels of details (based on number of levels in wavelet transform), we have a
multi-resolution representation of the image. Having information about images at different scales
(resolutions), we can control the desired level of accuracy in comparing images. For example, in
clustering images where we roughly categorize images, we use only the coarse features, whereas
in image retrieval, all the fine details of images will be used. However, the method proposed in
[JFS95] uses a distance metric with fixed accuracy. Moreover, their method directly compares
the m largest wavelet coefficients of images one by one. Thus, if the image is translated, so will
the corresponding wavelet coefficients. Hence the result of comparison will be very different. In
our method, we compare derived values (mean, variance, or number of edge pixels) from each
of the corresponding frequency sub-bands, resulting in less sensitive comparison with respect to
translation. The method by Jacobs et al has the advantage of being fast. However, it has the
common problem of the nearest neighbor retrieval approaches that just rely on the closeness of
the feature vectors without considering the semantics of images. As we explained in the previous
section, such methods sometimes may not provide satisfactory solutions. In our approach, we
consider the semantics of images through clustering which results in more effective retrieval.
Feature extraction may be performed on either a whole image or the segments of images. We
assume that images are decomposed into segments properly. Some decomposition approaches can
be found in [SC94a, SC94b, RSZSM97, SRGZ97]. Upon the proper decomposition of images, the
system extracts the features of all the segments of images. The query image will be compared to
the corresponding segments of database images with the proper size. In our implementation, we
used nona-tree decomposition [RSZSM97, SRGZ97].
Nona-tree decomposition is a block-oriented approach in which images (and their segments)
are hierarchically decomposed into nine quadrants. The nine overlapping quadrants are uniformly
distributed segments. If there are k levels in nona-tree, the size of its segments will be N 2 , N 2
, where N 2 is the size of the original image. A query image is compared to the smallest
segments in nona-tree whose size is greater than or equal to the size of the query image. If the size
of nona-tree's smallest segments is larger than that of the query image, the query image will not
be compared to any of the segments. For example, if a nona-tree has segments of sizes 128\Theta128,
64\Theta64, and 32\Theta32, given a query image of size 64\Theta64, it will be compared to the 64\Theta64 segments.
A query image of size 60\Theta60 will be compared to the 64\Theta64 segments but a 24\Theta24 query image
will not be compared to any of the segments. In general, the segments generated by block-oriented
decomposition methods such as quad-tree, quin-tree, or nona-tree may not perfectly align the
portion which matches the query image. For example, in quad-tree, in the worst case, only 25% of
the matching segment will be covered. However, in [RSZSM97, SRGZ97], we proved that nona-tree
segments at least cover 56% of the matching segment. In average case, a larger portion of matching
segment will be covered, and our experiments showed that nona-tree performs better than other
block-oriented decomposition approaches [RSZSM97, SRGZ97].
2.2 Wavelet Transform
Wavelet transform is a type of signal representation that can give the frequency content of the signal
at a particular instant of time. In this context, one row/column of image pixels can be considered
as a signal. Applying a wavelet transform on such a signal decomposes the signal into different
frequency sub-bands (for example, high frequency and low frequency sub-bands). Initially, regions
of similar texture need to be separated out. This may be achieved by decomposing the image in
the frequency domain into a full sub-band tree using filter banks [Vai93]. Each of the sub-bands
obtained after filtering has uniform texture information. A filter bank based on wavelets could be
used to decompose the image into low-pass and high-pass spatial-frequency bands [Mal89a].
We will now briefly review the wavelet-based multi-resolution decomposition. More details can
be found in Mallat's paper [Mal89b]. To have the multi-resolution representation of signals we can
use a discrete wavelet transform. We can compute a coarser approximation of input signal A 0 by
convolving it with the low pass filter ~
H and down sampling the signal by two [Mal89b]. By down
sampling, we mean skipping every other signal sample (for example a pixel in an image). All the
discrete approximations A j , is the maximum possible scale), can thus be computed
from A 0 by repeating this process. Scales become coarser with increasing j. Figure 3 illustrates
the method.
A
A
A
G
G
Figure
3: Block diagram of multi-resolution wavelet transform.
We can extract the difference of information between the approximation of signal at scale
and j. D j denotes this difference of information and is called detail signal at the scale j. We
can compute the detail signal D j by convolving A j \Gamma1 with the high pass filter ~
G and returning
every other sample of output. The wavelet representation of a discrete signal A 0 can therefore be
computed by successively decomposing A j into A j+1 and D j+1 for This representation
provides information about signal approximation and detail signals at different scales. We denote
wavelet representation of signal A 0 after K levels as . The
idea of using multi-resolution property of wavelets in clustering is to use the features of the wavelet
coefficients at the coarse scale levels.
Corresponding to the lowpass filter, there is a continuous-time scaling function OE(t), and corresponding
to the highpass filter, there is a wavelet !(t). The dilation equation produces OE(t), and
the wavelet equation produces !(t) [SN96]. For example, for Haar wavelet transform with ~
[1=
2], and ~
2], the dilation equation is
and the wavelet equation is
Figure
4 shows the Haar wavelet !(t).1t
w(t)
Figure
4: The Haar wavelet !(t).
We can easily generalize wavelet model to 2 dimensions for images, in which we can apply 2
separate one-dimensional transforms [HJS94]. The image is first filtered along the horizontal (x)
dimension, resulting in a lowpass image L and a highpass image H. We then down sample each
of the filtered images in the x dimension by 2. Both L and H are then filtered along the vertical
(y) dimension, resulting in four subimages: LL, LH, HL, and HH. Once again, we down sample
the subimages by 2, this time along the y dimension. The two-dimensional filtering decomposes an
image into an average signal (LL) and three detail signals which are directionally sensitive: LH
emphasizes the horizontal image features, HL the vertical features, and HH the diagonal features.
Figure
5-a shows a sample airphoto image. Figures 5-b,c, and d show the wavelet representation
of the image at three scales from fine to coarse. At each level, sub-band LL (the wavelet approximation
of the original image) is shown in the upper left quadrant. Sub-band LH (horizontal edges)
is shown in the upper right quadrant, sub-band HL (vertical edges) is displayed in the lower left
quadrant, and sub-band HH (corners) is in the lower right quadrant.
Our feature extraction and clustering methods can use any appropriate wavelet transforms such
as Haar, Daubechies, Cohen-Daubechies-Feauveau ((2,2) and (4,2)), or Gabor wavelet transforms
a) b) c) d)
Figure
5: Multi-resolution wavelet representation of an airphoto image: a)original image; b) wavelet
representation at scale 1; c) wavelet representation at scale 2; d) wavelet representation at scale 3.
[Vai93, SN96, URB97, MM96]. Applying wavelet transform on images results in wavelet coefficients
corresponding to each sub-band. We can extract different features from wavelet coefficients of each
of these sub-bands. Next subsection explains the features that we used in the experiments.
2.3 Image Features
In clustering database images, different kinds of features such as shape, color, texture, layout, and
position of various objects in images can be used. Texture in images has been recognized as an
important aspect of human visual perception [TMY78, Har79, Joh94, RW96, WH90]. Tamura et al.
[TMY78] have discussed various texture features including contrast, directionality, and coarseness.
Contrast measures the vividness of the texture and is a function of gray-level distribution. Some
factors influencing the contrast are dynamic range of gray-levels, polarization of the distribution
of black and white on the gray-level histogram, and sharpness of edges. Directionality measures
the "peakedness" of the distribution of gradient directions in the image. Coarseness measures
the scale of texture. When two patterns differ only in scale, the magnified one is coarser. In
a geographical image database we classify images into residential, agriculture, water, and grass
clusters. These clusters have different textures. For example, their contrast is usually different;
or, the cluster of water images does not have any directionality, whereas residential images are
considered as directional images. These texture features of geographical images contain main visual
characteristics of images that can be utilized in geographical image clustering and retrieval.
Applying wavelet transform on images can provide information about the contrast of images.
Also, different sub-bands generated by wavelet transform have information about horizontal, verti-
cal, and diagonal edges in images [Mal89b], which helps in extracting features related to directionality
of images. Moreover, multi-resolution aspect of wavelet transform provides information about
images at different scales (from coarse to fine). These properties make wavelet transform a good
candidate to extract texture features of geographical images.
We calculated the mean and variance of wavelet coefficients to represent the contrast of the
image. We also count number of edge pixels in horizontal, vertical, and diagonal directions to have
an approximation of directionality of the image. These features are extracted at different scales
to use the multi-resolution property of wavelets. Edge pixels in the image have high amplitude in
detail signals (LH; HL, and HH). It means that the wavelet coefficient of such pixels has high
positive/negative value. Let Image(i; j) be a pixel in the image of size n \Theta m. Let WLH (i; j),
WHL (i; j), and WHH (i; j) be the corresponding wavelet coefficients of Image(i; j), for LH;HL,
and HH sub-bands, respectively. We define mLH as the maximum of absolute value of WLH (i; j).
That is,
To detect horizontal edge pixels, we first compute mLH . We consider Image(i; as a horizontal
edge pixel if
where ff is a factor that is determined by experiments. In our experiments, we chose ff as 0.35.
Similarly, we define
and
Image(i; is considered as an edge pixel if
Tables
1, 2, and 3 show the wavelet coefficients of Figure 5-a at scale 3 using Haar wavelet
transform. The corresponding edge pixels are shown in Figure 5-d.
Table
1: Wavelet coefficients WLH of Figure 5-a at scale 3.
Table
2: Wavelet coefficients WHL of Figure 5-a at scale 3.
28
26 43 -40 -45
28
Table
3: Wavelet coefficients WHH of Figure 5-a at scale 3.
Figure
The seven sub-bands generated after applying two levels of wavelet transform.
We tested our approach using two different sets of features. To obtain the features in feature set
1, we apply a two-level wavelet transform. For the sub-band LL of the coarsest scale of the wavelet
transform, we consider mean and variance of absolute value of wavelet coefficients as its features
?. For the other sub-bands, in addition to mean and variance, the system
counts number of edge pixels in the sub-band. So the feature vector for each of these sub-bands is
number of edge pixels ?. In this feature set, we will have seven sub-bands with
features. Figure 6 shows the seven sub-bands of image schematically. In clustering, we
just consider the features of the sub-bands of the coarsest scale of wavelet transform (11 features)
to compute the distance. Table 4 shows the extracted feature set 1 for Figure 5-a.
Number of
Sub-band Mean Variance edge pixels
Table
4: Feature set 1 of Figure 5-a.
In feature set 2, the two-level wavelet transform is applied giving seven sub-bands. The feature
vector for each sub-band is ! mean; variance ?. Each subsegment of the image has 14 features.
To compute the distance between feature vectors in clustering, we only consider the features of the
second scale of the wavelet transform (4 sub-bands, 8 features). We have extracted the feature sets
using both Haar and Daubechies wavelet transforms [SN96]. Feature set 2 for Figure 5-a is shown
in
Table
5 where Haar wavelet transform is applied.
Sub-band Mean Variance
Table
5: Feature set 2 of Figure 5-a.
To give equal contributions to all the features in determining the similarity, and to remove the
arbitrary affects of different measurement units, we normalize the feature values and recast them
in dimensionless units. To normalize the features, we first compute the mean -
f i and variance oe i of
each feature f i using the training samples. Our training samples include residential, agriculture,
water, and grass areas. Let a feature vector be normalized feature
vector be -
f n ). We normalized f i using Equation (8):
f i is the normalized value of f i . Our experiments show that we should give more (controlled)
contribution to the more important features. We can do so, by assigning weights to the features
and giving more weights to the more important features. Let
vector, where w i is the weight that is assigned to feature f i . The weighted feature vector ~
f of
feature vector f will be:
~
3 Clustering and Retrieval
Applying the feature sets introduced in Section 2, we will now present template-based image clustering
and retrieval approaches. We first describe how cluster templates are chosen. Given clustering
templates and features, images in a database can be classified based on their similarity to the
cluster templates. Based upon the resulting clusters, image retrieval can be efficiently supported.
3.1 Clustering - Related Work
Given a set of feature vectors, the feature space is usually not uniformly occupied. Clustering
the data identifies the sparse and the dense places, and hence discovers the overall distribution of
patterns of the feature vectors. In many existing clustering algorithms, k-medoid methods have been
used, where each cluster is represented by the center of gravity of the cluster. For example, PAM
(Partitioning Around Medoids) [KR90] was proposed to determine the most centrally located object
medoid for each cluster. Each non-selected object is grouped with the medoid to which it is the
most similar. CLARA (Clustering LARge Applications) [KR90] draws a sample of data set, applies
PAM on the sample, and finds the medoids of the sample. Ng and Han introduced CLARANS
(Clustering Large Applications based on RANdomaized Search) which is an improved k-medoid
method [NH94]. Ester et al presented a clustering algorithm DBSCAN relying on a density-based
notion of clusters which is designed to discover clusters of arbitrary shapes [EKSX96]. The key idea
in DBSCAN is that for each point of a cluster, the neighborhood of a given radius must contain
at least a minimum number of points, i.e. the density in the neighborhood has to exceed some
threshold. BIRCH (Balanced Iterative Reducing and Clustering using Hierarchies) incrementally
and dynamically clusters incoming data points to produce the best clusters with the available
resources (i.e. available memory and time constraints) [ZRL96]. Ma and Manjunath used a neural
network to learn the similarity measure and partition the feature space into clusters representing
visually similar patterns [MM95].
As mentioned in Section 1, retrieval only based on closeness of feature vectors may not necessarily
give satisfactory results, because it is possible that semantically irrelevant images have
close feature vectors. Indexing trees such as R-trees and its variants have been successfully used
in the past and are very efficient in retrieving the nearest neighbors of the query image in the
feature space. However, they retrieve all the nearest neighbors, whether or not they have the same
semantic as that of the query image.
Our goal in clustering is to group together images considering their semantics. In other words,
we want to cluster images such that images with the same semantics belong to the same cluster.
These semantic clusters can be used to narrow down the search to the areas in the feature space
where images have similar semantics to that of the query image. Searching only the semantically
relevant images makes the retrieval more effective, and also more efficient. Note that, our proposed
approach is not an alternative to R-tree or its variants. These indexing trees can be integrated within
each cluster to provide better efficiency, while the clusters preserve the similarity in semantics.
Semantics of images is application dependent, for example, in a GIS visual database, we can
consider residential, water, grass, and agriculture clusters.
3.2 Template-based Clustering
To support efficient content-based image retrieval, methods have been proposed to first cluster
database images based on their similarity to predefined image templates, which are termed cluster
templates or cluster icons [WAL To retrieve database images which are similar to or
contain a query image, the query image will first be compared to the cluster templates. Only
database images in the clusters corresponding to the chosen cluster templates will be searched.
The cluster templates and their associated information (as will be explained later) approximate
the clusters. An effective clustering of database images can greatly reduce the number of images to
be searched, resulting in a more efficient retrieval. Indexing techniques can be incorporated within
each cluster to provide a faster retrieval.
R-trees can be used to find the templates representing the clusters. But since in practice,
we have high dimensional feature vectors (20 features), R-trees might suffer from "dimensionality
curse" [BKK96]. Thus, we decided to apply hierarchical clustering to find the cluster templates.
Using separate training data for each cluster, we classify images considering their semantics. The
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
(a) (b)
Figure
7: a) arbitrary shaped clusters. b) circular sub-clusters of clusters.
type of semantic clusters is application dependent and should be determined by the application
experts.
For example, in a geographical image database, we can define the clusters of residential, agricul-
ture, water, grass, and a special cluster other. The cluster other contains all images which cannot
be included in any of the residential, agriculture, water, or grass clusters. We represent clusters
by cluster templates to organize database images. In the feature space, since semantically different
image data may have their feature vectors close to each other, each cluster may have arbitrary
shape.
Figure
7-a shows an example in two dimensional space where clusters have arbitrary shapes.
Our proposed method is a hybrid (both supervised and unsupervised) approach. Using supervised
classification approach, we choose a set of training samples for each cluster. Then using
unsupervised classification we find the sub-clusters within each cluster. The centroids of those
sub-clusters are used as the cluster templates of the cluster. Figure 7-b shows such centroids within
each cluster as black square dots. Cluster other should include all the objects in Figure 7-a shown
by " ". In a hierarchical approach, sub-clusters are defined within each cluster at different levels.
Suppose the training set of a cluster C c has n objects. Initially, we assume there are n sub-clusters
corresponding to the n objects in the cluster. We compute the distances between all pairs of
sub-clusters. We then group together the two closest sub-clusters, resulting in
We repeat the process of computing the distances between all pairs of current sub-clusters, and
grouping the two closest ones until having only one sub-cluster.
This hierarchically nested set of sub-clusters can be represented by a tree-diagram, or a dendrogram
[Gor81]. Figure 8 shows a group of 5 objects and their corresponding dendrogram. Each of
n leaves of the tree represents the single object whose label appears below it. Each position up the
tree at which branches join, has an associated numerical value d, which determines the distance
between the two grouped sub-clusters. The smaller the value of d, the more similar two sub-clusters
will be. We considered the distance between the centroids of sub-clusters as the distance between
sub-clusters. We call this method as centroid method. There are different methods to define the distance
between sub-clusters. In unweighted pair-group method using arithmetic averages (UPGMA),
the distance between two sub-clusters is the arithmetic average of the distances between the objects
d d
d2
(a) (b)
Figure
8: A group of objects and the corresponding dendrogram.
in one cluster and the objects in the other [Rom84]. In single linkage clustering method (SLINK),
the distance is the minimum of the distances between the objects in one cluster and the objects in
the other one (distance between two closest objects). The distance between sub-clusters in complete
linkage clustering method (CLINK), is defined as the maximum of the distances between objects in
the two sub-clusters [Rom84]. Applying either of these methods may give a different dendrogram.
We can cut the dendrogram of each cluster at different levels to obtain k number of sub-clusters
(cluster templates). The choice of k and the corresponding cutting distance is one of the most
difficult problems of cluster analysis, for which no unique solution exists. For example, if we cut
the dendrogram in Figure 8-b, where the distance between sub-clusters is d 1 , we will have two
sub-clusters, whereas if we cut at level d 2 , we will have three sub-clusters. Let
be the sub-cluster containing objects e 1 . If we cut a dendrogram at the level in which
the distance between the last two grouped sub-clusters is d i , then the maximum distance between
the children of the remaining sub-clusters will be d i . For example, in Figure 8-b, if we cut the
dendrogram at level d 1 , the distance between sub-clusters f1g and f2g, or f3g and f4g, or f3,4g
and f5g, will be less than d 1 .
A measure of the quality of clustering can be obtained by computing the average silhouette
width of the n image samples for each k value. Given an image i, which is assigned to
a cluster C be the average distance of i to all other images in cluster C j and b i
be the average distance of i to all images in cluster C h , where C h is the nearest neighbor cluster of
cluster C j (h 6= j). The s k is calculated as follows:
1:0. The value of s k can be used to select an optimal value of k such that s k will
be as high as possible. The maximum value of s k is known as the silhouette coefficient. In general,
a silhouette coefficient value of 0.70 or higher indicates a good clustering selection [KR90].
Assume that a cluster C c consists of m sub-clusters S c1 In clustering database im-
ages, whenever a sub-cluster S ci is chosen, the database images will be assigned to the corresponding
cluster C c . Similarly, in image retrieval, if a sub-cluster S ci is chosen, only the corresponding cluster
C c will be searched.
We also tested different methods in determining the distance between sub-clusters, to make the
dendrograms.
3.3 Clustering
To cluster database images, we first compute the distance between the cluster feature vectors of
cluster templates and all database images. Using the multi-resolution property of the wavelet trans-
form, we extract the image features at different scales. In comparing cluster feature vectors, only
coarse scale features will be used; while in retrieving images all the features will be compared. In
Section 2.2, we used the notation fAK as the wavelet representation
of signal A 0 after K levels of the wavelet transform. We define clustering scale (K; c) as the
number of coarsest scales that will be used in clustering after applying K levels of the wavelet trans-
form. It means that in clustering only the features extracted from fAK ; DK will
be used, where 1 - K - J , 1 - c - J , and c ! K. For example, clustering scale (5, 2) means that
the 5-level wavelet transform will be applied and the features of the 2 coarsest scales (fA 5
will be used in clustering. We define retrieval scale (K; r) as the number of scales that will be used
in retrieval after applying K levels of transform. In retrieving images, the features extracted from
will be used, where 1 - K - J , usually r ? c. In
retrieving, we will use all the features. Clustering scale and retrieval scale for both feature sets 1
and 2 are (2,1) and (2,2), respectively.
Let X and Y be two undecomposed images (for example, a query image, a cluster template, or
an undecomposed segment of a database image). Let CFX
be their cluster feature vectors extracted from the subbands fAK based
on the clustering scale (K; c). Let RFX be the retrieval
feature vectors of X and Y respectively, extracted from the subbands fAK
according to the retrieval scale (K; r). To measure the similarity between X and Y in clustering,
we define the clustering distance d c as follows:
where dist could be any appropriate distance function. Here, we use Euclidean distance for dist. To
measure the similarity between X and Y in retrieval, we define the retrieval distance d r as follows:
d r (X; Y
A database image Y can be decomposed into a set of smaller segments fY g. To measure
the distance between the database image Y and the undecomposed image X (a query image, or a
cluster template) in clustering, we use D c :
Similarly, in retrieval, we use D r to compute the distance between the query image X and the
database image Y:
In determining the correct cluster(s) for a database image, we use the distribution of objects
(feature vectors) in each sub-cluster. For each sub-cluster we define a scope. Let - i and - i be the
mean and variance of clustering distances d c of objects to the centroid of the sub-cluster i. The
scope of sub-cluster i is part of the feature space whose distance to the centroid of sub-cluster is less
than Parameter fi is a factor that is determined by experiments. In a two dimensional
space, the scope of a sub-cluster is a circle with radius In our clustering approach,
whenever a database image Y falls within the scope of any sub-cluster, it will be assigned to the
cluster corresponding to the sub-cluster. The reason is that a database image may contain the
features of several different cluster templates and it should be assigned to all the corresponding
clusters.
If the database image Y is not within the scope of any of the sub-clusters, but the distance
between the database image and the closest cluster template t is less than a threshold T ,
it will be assigned to the corresponding cluster represented by the closest cluster template. If there
is no cluster template for which the distance between the database image and the cluster template
is less than T , the database image will be assigned to the special cluster other. The cluster other
contains all the database images that cannot be assigned to the predefined clusters.
As an example, Figure 9 shows the scope of 3 sub-clusters A, B, and C in a two dimensional
space. In general, these sub-clusters do not necessarily belong to different clusters. The object
denoted by point 1 falls in the scope of sub-clusters A and B and will be assigned to both.
x
x
Cx
x
x
x
x
x
x
x
x
x
x
x
x
x
A
x
x
x
x
x3
Figure
9: Three sample sub-clusters.
However, some objects may not fall in any of the scopes considered above. For example, Point
2 in
Figure
9 is not in the scope of any of sub-clusters. Our clustering approach assigns such an
object to the closest sub-cluster. Although the distance d c between point 2 and the centroid of
sub-cluster C is less than that of sub-clusters A and B, but based on the distribution of objects
within clusters, it is more logical to assign object 2 to sub-cluster A. So, we first compute the
distance between the object and the border of the sub-clusters' scope, and then choose the closest
cluster. Hence, object 2 will be assigned to sub-cluster A. The object shown as point 3 in Figure 9
will be assigned to the cluster other, because it is far away from all clusters and its distance d c to
the closest cluster is greater than threshold T .
Algorithm 1 shows the steps in choosing the cluster(s) for database images. After generating
the templates, for each image, the time complexity of choosing clusters (either for adding the image
to the clusters or for retrieving images) would be O(t) where t is the number of templates. The
required time to assign database images to the clusters is O(tN) where N is the number of images.
Since the number of templates is generally far less than the number of images, that is t !! N , the
time complexity will be O(N ). That is, the time complexity of generating clusters will be
linear in terms of number of database images. So it can process large image databases efficiently. As
it will be shown in the experiments, just by clustering database images, the system avoids searching
more than 75% of the database images.
Algorithm 1
Choose Cluster To Add(Image)
/* Based on distance between Image and subclusters, */
adds Image to the corresponding cluster(s). */
f
/* compute the distance D c between all */
/* the subclusters and database image */
to Number Of Subclusters
Adjusted Distance
/* distance to the border of subcluster's scope */
/* find the index of the closest subcluster */
Closest Find Min(Adjusted Distance);
if (Adjusted DistanceClosest
f/* add to special cluster other */
Add Image T
return;
/* add image to "all" clusters that are close enough */
to Number Of Subclusters
fif (Distance
f/* add to the corresponding cluster of subcluster i */
Add Image T
if (Cluster Added == FALSE) /* image not added to any cluster */
/* add to the closest cluster */
Add Image T
3.4 Image Retrieval
To retrieve database images similar to or containing the query icon, the distance d c between query
icon and cluster templates will first be computed. If the query icon is within the scope of any
cluster template, the corresponding cluster(s) will be searched. To measure the similarity of query
icon and the database images in the cluster(s), the distance D r will be used. If the query icon
does not fall in scope of any cluster template, but its distance to the closest cluster template is less
than a threshold T , then the cluster corresponding to the closest one will be searched. Otherwise,
the cluster other will be searched to retrieve the relevant images. Given a good set of features,
comparing with the nearest-neighbor search used in R-tree and its variants, retrieval on the clustered
image database can potentially eliminate those images which are close to the query in the feature
space, but semantically not similar.
4 Experiments
As test data we used 1032 air photo images. To find the cluster templates representing each of
residential, water, grass, and agriculture clusters, we used between 50 to 100 training image data
per cluster. The training images were chosen such that the clusters do not overlap in the feature
space. We tried the four different methods to compute the distance between sub-clusters: centroid
method, CLINK, SLINK, and UPGMA. Figure 10 shows the sample cluster templates found by
the hierarchical approach using these methods.
Residential Water Grass Agriculture
a)
c)
d)
Figure
images: a) Centroid method; b) CLINK; c) SLINK; d) UPGMA.
It should be noted if additional terrains (such as jungle, or connifer forest) need to be added as
new clusters, a set of training samples should be chosen for them. By applying the clustering method
given in Section 3.2, the corresponding templates (subclusters) and their scopes can be determined.
Using the new templates and the previously chosen templates (for the current clusters), database
images can be easily reclustered. In other words, given new clusters (that are separate from current
clusters), our system can accommodate them.
To evaluate the performance of our clustering approach, we first visually inspected all database
images and assigned them to their corresponding clusters. We consider these clusters as ideal
clusters. We then compared the result of our clustering approach to the ideal clusters. Let C c be
the set of images in the system's output for cluster c. Let I c be the set of images in the ideal cluster
for cluster c. We define P c , the precision of clustering for cluster c as
The recall of cluster c, R c , is defined as
The higher P c and R c are, the better the clustering will be. As mentioned in Section 3.3, scope
of a subcluster S i is determined by - . The values - i and - i are calculated by the system
while generating the dendrogram. In our experiments a value between -0.5 to -1.5 for fi gives
reasonable results. The threshold T is used to assign a database image (or search) in the cluster
other. Based on our experiments, T - 2 max(- i ) can give satisfactory results. To find appropriate
values for ff, fi, and T , we can first choose a sample set of database images with known clusters. We
then determine the ideal clusters I c for the images in the sample set. After applying the clustering
method on the sample data, precision and recall of clustering (P c and R c ) can be calculated. We
can tune the values of ff, fi, and T by trail and error to obtain the desired P c and R c for the sample
set. The optimal values of these parameters can then be used to cluster the whole database.
In our experiments we chose 150 as the value of threshold T . We then tried the system for
different values of parameter fi. In the experiments, we used the original extracted features (without
any processing), normalized features, and weighted-normalized features. For weighted-normalized
features, we assigned a weight of 4 to the first feature of the feature vector, and equal weight of 1
to the rest of features. We chose these weights on a trail and error basis. Assigning weights is an
important issue that affects the results. The tables report the results when Haar wavelet transform
is applied. Table 6 shows P c and R c for different methods of finding distance between sub-clusters
when weighted-normalized features are used.
A good clustering should have high recall and precision. But recall is more important than
precision in clustering, because in retrieval from a cluster, we want to miss as few images as possible
comparing to retrieval from the whole database. In our experiments, the results obtained by CLINK
(maximum distance between objects in two sub-cluster) and UPGMA (average of distances between
objects) are better than those of others. They yield both very high precision and recall of clustering
Water 0.90 0.98 0.86 1.00 0.85 1.00 0.84 1.00
Agriculture 0.98 0.88 0.98 0.88 0.97 0.90 0.96 0.93
Residential
Grass 0.83 0.86 0.85 0.83 0.86 0.82 0.88 0.81
a) Centroid
Water 0.95 0.98 0.94 0.97 0.94 0.97 0.94 0.97
Agriculture
Residential 0.98 0.95 0.99 0.94 1.00 0.93 1.00 0.92
Grass 0.94 0.91 0.93 0.93 0.91 0.93 0.89 0.92
Water 0.92 0.97 0.89 0.98 0.87 0.99 0.78 1.00
Agriculture 0.96 0.84 0.96 0.84 0.96 0.84 0.96 0.84
Residential 0.98 0.90 0.98 0.90 0.98 0.90 0.98 0.90
Grass 0.79 0.87 0.81 0.85 0.82 0.83 0.82 0.77
c) SLINK
Water 0.90 0.98 0.86 1.00 0.85 1.00 0.84 1.00
Agriculture
Residential 0.97 0.98 0.97 0.98 0.97 0.98 0.97 0.98
Grass 0.97 0.86 0.98 0.84 0.98 0.83 0.98 0.81
d) UPGMA
Table
Precision and recall of clustering for different values of fi. Weighted-normalized feature
set 1.
(more than 0.90). As Table 6 shows, varying the value of fi makes slight changes in the performance
of clustering.
To study the impact of clustering on effectiveness of retrieval, we chose 10 query icons of size 32 \Theta
pixels. Our system processes queries such as "retrieve top N (say 50) images that have the same
texture as the query icon". We calculated the effectiveness of retrieval in terms of retrieval \Gamma rate.
Retrieval rate for top n images is defined as
retrieval number of relevant images in top n images
A high retrieval rate means that most of retrieved images are what the user looks for, and thus it
shows a better performance in retrieval. We calculated retrieval rates for values 10, 20, 30, 40, and
50 of n for the 10 query icons and then found their average value. We first computed retrieval rate
without using clustering. In this context, we consider nearest neighbor search approaches (such as
R-tree or serial search) as without clustering methods. We then computed the retrieval rate when
the clustering approach is used (with value 150 for threshold T and values 0.0, -0.5, -1.0, and -1.5
for fi). Different feature sets form different feature spaces. By normalizing features or assigning
weights to them, the feature space changes which results in altering the shape of clusters or the
location of query images. Also, different distance methods (centroid, CLINK, SLINK, UPGMA)
result in different shapes of clusters. As a consequence, we get different performances from these
various feature spaces and clusters. Given the appropriate feature vectors and distance method our
proposed approach can outperform nearest neighbor methods in retrieval.
Table
7 shows the average retrieval rate of top n images
set 1.
Table
8 has the same information for feature set 2. Tables 7 and 8 show that retrieval from
clustered database (using all different distance methods) outperforms the retrieval from the whole
database without clustering. In general, when a query image is near the boundary of the cluster, our
method avoids retrieving the images outside the cluster (the ones that are semantically irrelevant)
resulting in better performance. When the query image is in the middle of clusters, retrieving
nearest neighbors (without clustering), and retrieval using our clustering approach would be the
same. The retrieval rates obtained from CLINK and UPGMA are higher than those of others. It
confirms with our previous clustering results where these two methods had higher precision and
recall of clustering. In our experiments, we achieved the highest improvement in retrieval rate (from
0.70 to 0.95) when using original features set 2 and CLINK as shown in Table 8-a.
Original feature set 1 provides a higher retrieval rate than that of feature set 2. Normalizing
and then assigning weights to the features improves the retrieval rate when clustering is not used
for both feature sets 1 and 2. When clustering is applied, weighted-normalized features provide a
higher retrieval rate for feature set 2 (comparing to the original feature set), but not for feature set
1. In the latter case, another set of weights should be chosen. In general, a better method should
be used to find the best weights for the features. For the same distance method and feature set,
different values of fi do not make major changes in the retrieval rate.
DB Ret DB Ret DB Ret DB Ret
Centroid
Clustering 1.00 0.73 1.00 0.73 1.00 0.73 1.00 0.73
a) Original features
DB Ret DB Ret DB Ret DB Ret
Centroid
UPGMA
b) Normalized features
DB Ret DB Ret DB Ret DB Ret
Centroid
Clustering 1.00 0.76 1.00 0.76 1.00 0.76 1.00 0.76
c) Weighted-normalized features
Table
7: DB-Ratio DB, and retrieval-rate Ret for different values of fi. a) Original features; b)
Normalized features; c) Weighted-normalized features. (feature set 1).
The other issue that should be considered is the number of images that are searched in retrieval
from a clustered database. We define the ratio of database search DB \Gamma ratio as
number of images searched in database
total number of images in database
The lower DB \Gamma ratio is, the better clustering would be. The time to search the database is
directly proportional to the number of images to be searched. Thus a low DB \Gamma ratio means that
less time is used to search the database. Tables 7 and 8 show the average DB \Gamma ratio for the 10
query icons. In average our clustering approach yields a DB \Gamma ratio of about 0.25, that is, about
75% of irrelevant images will not be searched. We performed the experiments on a SUN SPARC
workstation using 168 MHz UltraSparc CPU with SunOS operating system and 1024 MB memory.
The average time to search the whole database was 1.5 seconds, whereas after clustering, it only
took about 0.23 seconds to return the relevant images. Integrating current indexing methods such
as R-tree or its variants can speed up the retrieval process more.
Figure
11 shows the 10 closest retrieved images (ordered from left to right) for a sample grass
query image without clustering and using clustering, respectively. For the query image in Figure 11,
DB Ret DB Ret DB Ret DB Ret
Centroid 0.22 0.94 0.23 0.95 0.23 0.96 0.23 0.96
Clustering 1.00 0.70 1.00 0.70 1.00 0.70 1.00 0.70
a) Original features
DB Ret DB Ret DB Ret DB Ret
Centroid
Clustering 1.00 0.71 1.00 0.71 1.00 0.71 1.00 0.71
b) Normalized features
DB Ret DB Ret DB Ret DB Ret
Centroid
Clustering 1.00 0.78 1.00 0.78 1.00 0.78 1.00 0.78
c) Weighted-normalized features
Table
8: DB-Ratio DB, and retrieval-rate Ret for different values of fi. a) Original features; b)
Normalized features; c) Weighted-normalized features. (feature set 2)
the first 10 retrieved images without clustering include four cases (images 6 through 10) which are
not grass images. As shown in Figure 11-c, those semantically irrelevant images are not retrieved
when our clustering approach is applied, which demonstrates the advantage of our method.
a) Query icon
Retrieved images without clustering
c) Retrieved images with clustering
Figure
11: Retrieval results
5 Conclusion
We have designed a content-based retrieval system that supports novel clustering and retrieval for
geographical images. This system utilizes the rich texture features existing in the geographical
images to assist content-based retrieval. A clustering approach is designed to automatically categorize
images based on themes such as land use or land cover. Using the multi-resolution property
of wavelet transforms, we extracted the features at different scales where only the coarse features
were used in clustering. Since the semantic distribution of feature vectors in the feature space is
considered in the clustering, the retrieval of the relevant images can be performed by narrowing
down to the relevant clusters. Thus, more precise image searching can be supported rather than
the plain nearest-neighbor search. Through the experimental analysis, we have shown that texture
features can be effectively used to cluster geographical images. In addition, our experimental results
demonstrated that retrieval from the clustered database can be more effective than that of
the whole database, given the appropriate feature sets and distance methods.
Acknowledgments
We would like to thank the reviewers of this paper for their constructive criticism and useful
comments throughout the revision of the paper.
--R
Comparisons between spectral mapping units derived from spot image texture and field soil map units.
Mosaic models for texture.
Multidimensional orientation estimation with applications to texture analysis and optical flow.
Sar sea ice discrimination using texture statistics: A multivariate approach.
Seasonal variation of heterogeneity in the tallgrass prairie: A quantitative measure using remote sensing.
A Visual Information Management System for the Interactive Retrieval of Faces.
Markov random field texture models.
An Intelligent Image Database System.
A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise
Query by image and video content: The QBIC system.
Classification Methods for the Exploratory Analysis of Multivariate Data.
The use of contextual information in the classification of remotely sensed data.
Statistical and Structural Approaches to Texture.
Compressing Still and Moving Images with Wavelets.
Pattern recognition with measurement space and spatial cluster ing for multiple image.
Textural features for image classi- fication
Use of texture operators in segmen- tation
Spectral and texture features to classify elusive land cover at the urban fringe.
Fast multiresolution image querying.
Finding Groups in Data: an Introduction to Cluster Analysis.
The development of a spectral-spatial classifier for earth observational data
Remote Sensing and Image Interpretation.
Multiresolution approximation and wavelet orthonormal bases of L 2 (R).
A theory for multiresolution signal decomposition: the wavelet representa- tion
Image indexing using a texture dictionary.
Texture Features for Browsing and Retrieval of Image Data.
Efficient and Effective Clustering Methods for Spatial Data Mining.
Image texture processing and data integration for surface pattern discrimination.
Analysis for Researchers.
Automatic Image Indexation and Retrieval.
Supporting Content-Based Retrieval in Large Image Database Systems
Combining spectural and texture data in the segmentation of remotely sensed images.
Transform Features For Texture Classification and Discrimination in Large Image Databases.
Semantic clustering and querying on heterogeneous features for visual data.
A Fourier-based textural feature extraction procedure
Image decomposition and representation in large image database systems.
An Approach to Clustering Large Visual Databases Using Wavelet Transform.
Geographical Data Classification and Re- trieval
Texture Features Corresponding to Visual Perception.
Wavelet transforms using lifting scheme.
Multirate Systems And
Facial Images Retrieval
A new statistical approach to texture analysis.
Generation of texture image using adaptive windows.
BIRCH: An Efficient Data Clustering Method for Very Large Databases.
--TR
--CTR
Wei Wang , Daoying Ma , Yimin Wu , Aidong Zhang , David M. Mark, Webview: a distributed geographical image retrieval system, Proceedings of the 2002 annual national conference on Digital government research, p.1-4, May 19-22, 2002, Los Angeles, California
Gholamhosein Sheikholeslami , Wendy Chang , Aidong Zhang, SemQuery: Semantic Clustering and Querying on Heterogeneous Features for Visual Data, IEEE Transactions on Knowledge and Data Engineering, v.14 n.5, p.988-1002, September 2002
Tao Li , Qi Li , Shenghuo Zhu , Mitsunori Ogihara, A survey on wavelet applications in data mining, ACM SIGKDD Explorations Newsletter, v.4 n.2, p.49-68, December 2002 | texture features;multi-resolution wavelet transform;hierarchical clustering;geographical image retrieval |
594788 | An Object Model of Direction and Its Implications. | Direction is an important spatial concept that is used in many fields such as geographic information systems(GIS) and image interpretation. It is also frequently used as a selection condition in spatial queries. Previous work has modeled direction as a relational predicate between spatial objects. Conversely, in this paper, we model direction as a new kind of spatial object using the concepts of vectors, points and angles. The basic approach is to model direction as a unit vector. This novel view of direction has several obvious advantages: Being modeled as a spatial object, a direction object can have its own attributes and operation set. Secondly, new spatial data types such as oriented spatial objects and open spatial objects can be defined at the abstract object level. Finally, the object view of direction makes direction reasoning easy and also reduces the need for a large number of inference rules. These features are important in spatial query processing and optimization. The applicability of the direction model is demonstrated by geographic query examples. | Introduction
1.1 Modeling Direction
Direction is a common spatial concept that is used everywhere in daily life. When people communicate
about a geographic space, for example, giving route descriptions, direction is necessary to convey the
information. Direction is also frequently used as a selection condition in spatial queries[11] or used for
similarity accessing in image databases[18]. Example queries used in army battlefield visualization[10]
are "Is there anything over the ridge?," "List the swamps in front of the tank."and "Let's move to the
north of the tree." The first example refers to a viewer-based orientation, the second can be defined on
either the intrinsic orientation of the tank(object-based) or of a viewer, and the third example refers to
the absolute direction with respect to the tree. In order to process queries involving direction constraints
in the selection criteria, a spatial database system should provide a way for users to formalize directions.
The common means of handling direction is to model direction as a spatial relationship between
objects[4, 20, 8, 26, 3, 16, 9, 6, 22, 15]. In this paper, we formalize direction from a different perspective:
as a spatial object. The basic approach is to model direction as a unit vector and orientation as a set of
directions. As a spatial object, direction can have its own attributes, and its own operators, and a richer
set of predicates and operators on direction and orientation can be defined. Second, new spatial data
types such as oriented spatial objects and unbounded spatial objects can be easily defined in the abstract
object level. The object view of direction also makes it easy to perform direction reasoning by using
only simple vector algebra, which also reduces the large number of inference rules commonly needed.
This is useful in the processing and optimization of spatial queries that contain direction constraints.
We model the direction for three frames of reference: absolute, object and viewer-based orientation
We will not discuss the philosophical issue of whether directions are object/entities or not in the
strictest sense. Absolute directions such as North, South, East, or West can be defined using a coordinate
system w.r.t. the earth, and thus these can be considered to be objects in their own right. The object
view for relative directions (e.g. left, front) needs further thought, because these directions are defined
with respect to coordinate systems attached to other objects. The issue needs to be explored further.
1.2 Related work and our contributions
The research work on direction modeling has been carried out in several areas such as geographic information
systems and image analysis. Most of the studies is on how to capture the semantics of
direction relations, and further, how to do spatial reasoning on the direction [3, 4, 6]. There are two
major direction reference frames used to model direction in 2D space: the cone-based model[16], and
the projection-based model[4, 6]. Frank[1] compared these two models and found the projection-based
reference frame to be better in many aspects. The most common way to model directions between extended
objects is through the object's Minimum Bounding Rectangle(MBR), where direction relations
are obtained by applying Allen's [2] interval relations along the x and y axis, in which case, 169 different
relations[3] can be distinguished. Some work based on MBR has been proposed on picture indexing
in pictorial databases[18, 26], and some work aligns each boundary box to the object's major axis[14],
which makes it possible to satisfy different reference frames[9]. On the other hand, Freska [5] proposed
an alternative method: semi-intervals to formalize the one-dimensional temporal relation based on incomplete
knowledge of the object. Goyal and Egenhofer [8] introduced a Direction-Relation Matrix to
represent cardinal directions. Based on the projection-based frame, it partitions the space around the
reference object and records into which direction tiles a target object falls. But this model still has
limitations in the modeling of line objects, and it is limited to 2D space. Little work has been done on
directions in 3D space [7].
The previous work modeled direction as a spatial relationship between spatial objects. This seems
to be a natural mapping of the directional relationship that is used in geographic space. But this
modeling method has some limitations. Operations on direction are limited. Oriented(directed) objects
and unbounded objects cannot be represented in the spatial data model.
This paper models direction as a spatial object: a unit vector. This novel view of direction has
several advantages over the binary boolean relationship view. Being modeled as a spatial object, a
direction object can have its own attributes and operation set. The implementation of operators can
use vector algebra, making a richer set of predicates and operators on direction feasible. Secondly,
new spatial data types such as oriented objects and unbounded objects can be defined at the abstract
object level. The object view of direction also makes directional reasoning easy. Basic vector algebra is
sufficient for inferencing new directions, and no special or new qualitative rules are needed. This reduces
the complexity of directional reasoning, and involving appropriate quantitative information is useful in
spatial query processing and optimization in spatial databases.
More discussion on direction objects, formal proofs, and their applications appear in [24], where an
algebra on the equivalence classes of direction objects is defined. The algebra unifies different methods
for directonal qualitative reasoning that have appeared in previous work[4]. These issues are outside the
scope of this paper which focusses on defining the basic concepts and implications of treating directions
as objects.
1.3 Scope and Outline of the Paper
The organization of this paper is as follows: In section 2 , we define a mathematical framework and
propose new ADTs for directions and orientations. A new spatial data type hierarchy is also proposed
in this section. In section 3, an oriented spatial object is defined using the orientation object, and its
application in spatial queries is discussed. Open geometry and its applications are illustrated in section4.
Finally, the paper concludes with discussions and recommendations for future work.
2 Basic Concepts
2.1 Points, Vectors, Angles
The basic concepts we use here are points, vectors and angles, as illustrated in figure 1. A point
has a position in space, which can be described using coordinates in a coordinate system. The only
characteristic that distinguishes one point from another is its position. A vector, in contrast, has both
vectors u and v are same, and
Points P and Q are different,
is the angle between vector v and t
Figure
1: Diagram of points, vectors and angles
magnitude and direction but no fixed position in space. An angle between two vectors represents the
direction deviation from one vector to the other. Here, by angle, we mean the smaller one between two
vectors, like ' in diagram 1. In this paper, we denote points by capitalized letters, such as P, and denote
vectors as lower case letters with an arrow above, such as ~v.
For simplicity we will use the Cartesian coordinate system to represent points and vectors in this
paper. The Cartesian coordinate system in 3D is a right-handed rectangular coordinate system, with
three axes x, y and z perpendicular to each other and intersecting at the origin. A point P in space is
represented as an ordered triple (x; are rectangular components of P on the x, y
and z axes , respectively. Let ~
U y and ~
vectors which are the basis vectors of
the coordinate system. A vector ~v can be defined as a linear combination of these basis vectors in the
U z , where a, b and c are some numbers.
Operands Operations Definition
U z
U z
\Theta ~a \Theta ~ b = jajjbj sin(') ~u, where ~u is a unit vector, perpendicular
to ~a and ~ b
scale
~
~
~
U z , where m is a number
z a ), a point away
from P with distance j~aj along the direction of ~a
Table
1: Operations on vectors and points
Table
summarizes representative operations on points and vectors. Here P
are two points, ' is the angle between vectors ~a and ~ b, where
~
~
~
U z
and ~
~
~
~
U z . We can see that the subtraction operation(-) is applied to point pairs, resulting
in a vector. The operations of addition(+), subtraction(-), scale multiplication, dot product(fi),
and cross product(\Theta) are available between vector operands. The definitions are given in terms of the
components in the Cartesian coordinate system. There is only one operation(+) available between a
point and a vector which actually produces another point. The associativity, commutativity and distribution
properties of these operators will be examined in the future work towards integrating vector
objects in query languages.
2.2 Direction and Orientation
Direction is defined as a unit vector, i.e., a vector with magnitude equal to 1. Table 2 defines the
operations on directions.
Operations Definition
composition ~
d2
deviation
reverse (\Gamma1) \Theta ~
between 1 ~
d between ~
d 1 and ~
among 2 ~
d among ~
d 2 and ~
~
~
~
~
Table
2: Operations on Directions
The operations on directions can be classified into three categories. The first category contains the
operations that produce new directions. Composition and reverse are operations in this category. The
composition operation is actually achieved by vector-addition, and the resulting vector is scaled down by
its magnitude to be a unit vector, which represents the new direction. The reverse operator produces
the reverse direction vector. The second category of the operations is to calculate the deviation between
two directions. Operator deviation calculates the cosine of the angle between two directions, and hence
gives the deviation of one direction from the other. A pair of vectors are orthogonal if their dot-product
returns zero, i.e., they have 90 0 deviation. The last category of the operations is to test the relationships
among directions. The operators between and among belong to this category. In figure 2, ~
d is between
~
d 1 and ~
d 1 is not between ~
d and ~
d 2 . As we will see in later sections, these three categories
d
d2
Figure
2: between operator
of direction operations make the modeling of direction concise and flexible.
Orientation is modeled as a spatial object which consists of a point of origin and N pair-wise orthogonal
directions, where N is the dimension of the embedding space. The origin point and the N directions
form a Cartesian coordinate system. In 3D space, the three directions may be labeled the Back-Front,
Left-Right, and Below-Above directions of the orientation. Formally, we can define orientation and its
operations in 3D space as follows:
This definition works well as long as vector ~
d1 is not parallel to vector ~
d2 . The parallel case can be handled in a user
defined manner.
d 3 are not in the same plane.
Orientation is a quadruple O= hOP, ~
front, ~
right, ~
abovei, where OP is a point, and ~
front, ~
right, ~
above
are three orthogonal directions. It has two operations:
front, ~
right, ~
right
aboven i, where
right
aboven )= ( ~
right; ~
above)fi rotationMatrix;
An example of the rotation Matrix which rotates the orientation along the ~
above axis for an angle
~
above
Table
3 gives an illustration of these operations.
~
above
above
front
right
front
right
above
right_n
above_n
above
front
right
Table
3: Operations on orientation
Abstract
Data Types for Modeling Direction
As a summary of the above discussion, the definition of ADTs for vector, direction and orientation is
given in Table 4. The C++ like syntax is used here. The column labeled attributes declares the member
variables of each class, and the representative operations column declares the interfaces of operations for
each class. The vector class has three member variables of the real type. These variables represent the
three coefficients when the vector is written as the linear combination of basis vectors of the coordinate
system. The constructor constructs a vector object, given three real arguments. The five vector operators
are declared as member operator functions. Direction is defined as a subclass of the vector class. It can
be constructed either from a vector or from an ordered triple. Besides inheriting attributes and operators
from the vector class, direction also adds new operators such as between and among. The orientation
class has four member variables which form a Cartesian coordinate system. Translate and rotate are
declared as the member operator functions of the orientation class.
2.3 Frame of Reference: Absolute, Object/Viewer-based Directions
In this section, we will deal with point-based objects for simplicity. There are three different perspective
systems. We define absolute directions(e.g. north, south), object-based directions(e.g. left, above), and
ADT attributes representative operations
vector x-comp: float; vector(float, float, float); // constructor
z-comp: float; vector operator
vector operator scale();
float operator dot-product (vector);
vector operator \Theta (vector);
direction(float, float, float); //constructor
direction(vector); // constructor
Direction inherited from vector direction operator Composition(direction);
subclass of vector constraint = unit magnitude direction operator
float operator deviation(direction);
boolean between(direction, direction);
boolean among(direction, direction, direction);
Orientation
// constructor
~
~
right : direction; orientation operator rotate(rotate-matrix);
~
above
Table
4: Abstract Data Types for direction and orientation
viewer-based directions.
Absolute Direction
Absolute direction in embedding space is defined as a relationship among objects based on their locations
in embedding space. For simplicity here, we will ignore the elevation and earth's curvature and use a
projection-based model to map the space to a 2D local coordinate system with north up and east right 1 .
We model absolute directions in two ways: constant direction objects and directional predicates.
Constant direction objects are created for frequently asked directions, e.g: ~
east, ~
west, ~
north, ~
south,
~
NE, ~
SE, ~
SW .
Table
5 illustrates how we can define the constant directions in terms of coordinates
in local embedding space. The unit vector is denoted by an ordered pair(a; b) which represents vector
a ~
U north .
unit vector (1,0) (0,1) (-1,0) (0,-1) ( 1
directions ~
east ~
north ~
west ~
south ~
Table
5: constant absolute direction
Introducing constant direction objects provides much flexibility in describing and deciding any di-
rection. By using the operator deviation, we can calculate how much deviation is from one direction to
another direction. We can also produce a new direction, given the deviation from a specific constant
direction. This is very useful in the layout of facilities.
Second, we also provide corresponding directional predicates to make it convenient for users to
1 For a global view, we can extend to the ellipsoidal coordinate system[13]
specify the direction relation between two objects. They are East, W est, South, North, Northwest,
NorthEast, SouthW est, SouthEast. For any two objects, assuming their centroids are P 1 , P 2 , we
represent the relationship "P 1 is to the east of predicate The predicate is true if
and only if equation ~
holds. Other predicates can be defined similarly.
The above constant directions and predicates give precise directional calculation, that is, only one
angle matches each case. Sometimes users may be interested only in approximate direction, such as a
direction range: between north and northwest. The operator between makes this approximate directional
predicate possible. If we want to test whether P 1 is between north and northwest of P 2 , we can use the
between operator in C++ notation as: ~
north; ~
Object-based direction
Object-based direction is the direction of the target object with respect to the orientation of the reference
object. The reference object is an oriented object, while the target object may or may not have
orientation. In figure 3, the person and the desk are oriented objects; the person is behind the desk
and the desk is behind the person also. We will use OB to represent the orientation of object B, and
right and OB : ~
above are the three directions of B's orientation. By using the direction operator
reverse , the directions of B's behind, left and below can be described as \GammaO
right
above, respectively.
The flag is to the left of the desk
The desk is to the right of the flag
Figure
3: Viewer/Object-based direction
Given a target point object A, and a reference point object B, the direction of A relative to B can
be calculated by using the deviation operation of the direction objects. First, a direction object ~
BA is
constructed from the vector A \Gamma B. Then the direction of point object A with respect to point object
B's orientation is decided by the deviation of direction object ~
BA from the three directions
front,
right and OB : ~
above of B's orientation. The vector dot-product is the meta operation for direction
deviation operation.
Table
6 illustrates the calculation of the object-based direction. The first column consists of the
directional predicates and the remaining three columns are the conditions needed to satisfy the predicates.
Direction predicates ~
BA
front ~
BA
right ~
BA
above
A in front of
A behind of
A right to
A left to
A above
A between front(B) and
~
right)
~
right)
~
~
~
~
~
~
~
~
right;
~
~
right;
A is among front(B),above(B) and left(B)=
~
right)
~
right)
~
right)
~
right)
~
~
~
~
Table
Object-based orientation
The predicate returns true if and only if all three corresponding conditions hold. The first six rows
illustrate the calculation of exact directions such as front, left, above, etc. As in row 1, if the dot-product
of vector ~
BA and direction OB : ~
front is greater than zero, and the dot-products between vector
~
BA and the other two directions of orientation OB are both zeros , then
means that A is in front of B. These directional predicates are for precise direction checking, whereas the
other two categories of predicates are for direction range checking. The second category of directional
predicates is to test if A is located in the region between two directions. Here the operator between is used
in C++ notation. For example, the relationship that A is between front(A) and right(B) is represented
as predicate ~
right), which has value true if and only if ~
BA
front and
~
BA
right are both greater than zero and ~
BA
above is equal to zero. The predicates in this
category are for the directions in 2D space. The third category of predicates consists of eight directional
predicates which test if A is among three directions in a 3D space. We represent the predicates using
the operator among. As can be seen from the table, by using direction object ~
BA, the checking of
directional predicates converts to the calculation of direction deviation which is easily performed by the
dot-product operation.
Viewer-based direction
Viewer-based direction refers to the directional relationship which is measured from the viewer's per-
spective. In figure 3, the flag is to the left of the desk from the viewer's perspective.
There are three related components in this system: target object A, reference object B, and the
viewer. The viewer has his/her own orientation, whereas objects A and B may or may not be oriented
objects. Given these three components, we can estimate the direction of object A relative to object B
from the viewer's perspective, in a way similar to that used with the object-based system. The similar
predicates but w.r.t. the viewer are defined and are calculated by the dot-product between vector ~
BA and
the three directions of the reference orientation. The reference orientation here is the viewer's orientation
O V , and hence the three dot-products needed to be calculated are ~
front , ~
right,
and ~
above. A similar table can be obtained as in Table 7.
Direction predicates ~
front ~
right ~
above
~
right)
~
right)
Table
7: Viewer-based orientation
In the viewer-based direction system, the viewer may change his/her orientation or position(unlike
objects, which are still). Using the operators rotate and translate on the orientation, we can easily
generate new orientations.
Viewer-based directions are heavily used in route navigation. The route instructions can be given
in terms of absolute direction, i.e., north, south, etc. But in fact, since many people have no idea
of the absolute direction, particularly in an area new to them, route instructions in absolute direction
have little meaning. The directions would be much easier to understand if the instructions were given
by viewer-based direction. Many web routing servers such as MapsOnUs use as many viewer-based
directions as possible in their route instructions. Figure 4 is an example of a route map that starts
from the Computer Science Building of the University of Minnesota to a UM apartment on the St. Paul
campus. The turn-by-turn instructions are given in table 8. As can be seen from the table, viewer-based
directions are used at every turn to make it easy for users to follow the descriptions intuitively.
Como AVSE Como Av
Washington Av
Knapp Av
E24-5
Raymond Av
University Avenue ( US52)
Figure
4: Route Planning
Go And Then Total miles
Start Head South on Union ST SE, From Start
Union ST SE, Mpls, MN)1 Less than .1 mi Turn LEFT onto Washington Ave. SE 0.0
3 1.4 mi Turn LEFT onto RAYMOND Ave. 1.9
4 1.1 mi Continue onto N Cleveland Ave 3.0
End Less that .1 mi End Point(2051 Knapp Ave, St.Paul,
Table
8: Turn-by-turn Directions
2.4 New Spatial Data Type Hierarchy
Some work has been done on modeling space into a spatial geometry hierarchy. The Open GIS
Consortium[12] proposed a spatial object hierarchy for incorporating 2D spatial ADTs in SQL, as illustrated
in figure 5.
This hierarchy consists of P oints, Curves, and Surface and the class GeometryCollection. The
basic operations are confined to topological and metric operations. Since these data types model only
bounded shape objects, the hierarchy has limitations in modeling objects; for example, maps, rivers,
roads and buildings which have their own directions/orientations. For example, with few exceptions,
printed maps are all oriented with north up. This is not only for better visualization, but for more
flexibility with spatial queries. It allows queries such as "Which state is to the left of Minnesota?" to be
asked by non-geographers who may not use geographic concepts like north, west, etc.
Spatial queries such as " Is Minnesota in the north part of the USA?" can be answered by comparing
the location of Minnesota with the center of the USA and its direction to the center, without the necessity
of getting the information on the boundary of the USA. But in the OGIS hierarchy, spatial objects can
only be modeled as bounded objects, so north part of USA should be represented in a polygon which
needs accurate boundary information that actually has little effect on the query.
A new spatial data type hierarchy is proposed in figure 6. This hierarchy includes oriented objects and
unbounded(open) objects, which could be defined using the direction and orientation objects discussed
MultiLineString
MultiPolygon
LinearRing
Line
MultiPoint
MultiCurve
MultiSurface
Polygon
LineString
Curve
Point
SpatialReferenceSystem
Geometry
GeometryCollection
Surface
Figure
5: Spatial Data Type Hierarchy[12]
above. In the new spatial hierarchy, maps and roads can be defined as oriented objects.
New Spatial Data Type Hierarchy
Figure
6 illustrates the extended spatial data type hierarchy which consists of shape objects, vectors and
oriented(directed) objects. The spatial data types and their operators can be embedded in an extended
query language to implement a spatial query language.
Vector object Oriented
Spatial
Surface
Curve
Solid
direction
Geometry Orientation
open geometry
open line
open rectangle
oriented
directed
line
oriented solid
Point
closed geometry point
classical type
Figure
Extended Spatial Data Type Hierarchy
Many new operators are available in the extended spatial object model. Between vector objects and
shape objects, affine transformations can be performed. The addition of these operations makes some
GIS applications easy. For example, Urban planning needs interactive placement/orientation of facilities,
location-based query exploration can use affine operations, and using these operations can also improve
viewer flexibility, so that we do not have to look down on earth from space. Instead, a viewer can view
from any direction by performing rotation transformations.
In the later sections, the new spatial data types are discussed in detail. Their applications in geographic
space are also described.
3 Defining Oriented(directed) Spatial Object
There are many objects in geographic space that have intrinsic directions/orientations in addition to
their locations and shapes, such as buildings, rivers and roads. As we discussed above, modeling maps as
oriented objects provides users more flexibility in query specification. It also allows users who have little
knowledge of geographic space to query directions intuitively, based on their own orientations. As in the
routing example given in figure 4, the turn-by-turn directions in table 8 mostly use viewer-based direction
to make the information more meaningful to non-geographical users. But since there is no information
on the orientation of the starting address, the first directional instruction is based on absolute direction
SOUTH. If we know the orientation of the exit of the building, then we can use viewer-based direction
instead, since in this case the viewer's orientation is aligned with the building exit's orientation. The
instruction then may be "Turn Right onto Union Street SE", which is very easy for any user to follow.
Table
9 shows some queries that can only be answered when the reference objects and/or viewers are
modeled as oriented objects.
Queries
List the swamps in front of the tank.
List the farm fields suitable for tank movement, and are left to Lake A as viewed by Viewer 1.
Let's move back a little.
How far is the next intersection down this road?
Table
9: Queries Need Orientation Information
Introducing the Orientation class into the spatial object hierarchy makes it easy to formalize oriented
objects. In addition to the attributes such as location and shape for the geometric shape objects, an
oriented object has an attribute orientation, which is an instance object of class orientation. The
operators available for oriented objects include both topological operators and direction and orientation
operators.
The ADT for oriented objects can be specified in Oracle8.0[25]. We first define the direction object
type and orientation object in Oracle 8.0. In the following, we assume Geometry is the spatial type
defined by OGIS[12]. It could be a point, a line, a polygon , and etc.
x NUMBER,
y NUMBER,
z NUMBER,
MEMBER FUNCTION composition(aDirection IN DirectionType) RETURN DirectionType,
MEMBER FUNCTION reverse RETURN DirectionType,
MEMBER FUNCTION deviation(aDirection IN DirectionType) RETURN NUMBER,
MEMBER FUNCTION between(aDirection IN DirectionType, bDirection IN DirectionType)
RETURN NUMBER,
PRAGMA RESTRICT REFERENCES(default, WNDS)
op PointType,
d1 DirectionType,
d2 DirectionType,
d3 DirectionType,
MEMBER FUNCTION translate(aVector IN VectorType) RETURN OrientationType,
MEMBER FUNCTION rotate(degree IN NUMBER) RETURN OrientationType,
PRAGMA RESTRICT REFERENCES(default, WNDS)
OrientedObject AS OBJECT (
shape Geometry,
orientation OrientationType,
MEMBER FUNCTION left(obj IN Geometry ) RETURN NUMBER,
/* other functions can be defined similarily */
PRAGMA RESTRICT REFERENCES(default, WNDS)
name VARCHAR2(20),
orientation OrientationType,
MEMBER FUNCTION left(obj1 IN Geometry, obj2 IN Geometry) RETURN NUMBER,
/* other functions can be defined similarily */
PRAGMA RESTRICT REFERENCES(default, WNDS)
We can use these data types to solve spatial queries involving oriented objects. As an example,
we will show how to write the first two queries in table 9 using Oracle 8.0. The first query contains
object-based direction and the second one focuses on viewer-based direction. First a database schema
is created , which consists of four tables, FarmF ield, LandCover, Tank, and V iewer. The queries are
performed on this database schema.
extent Geometry);
extent Geometry);
extent OrientedObject);
List the swamps in front of the tank.
SELECT L.name, L.extent
FROM Landcover L, Tank T
ffl Explanation:front is an object-based direction predicate with respect to the oriented object
Tank. Landcover is a partition of the space based on landcover type. We search for partitions
which lie in front of the tank and check their type. Example of possible types include
"swamps", "water", "hill".
List the farm fields suitable for tank movement, and are left to Lake A as viewed by Viewer1.
SELECT F.name, F.extent
FROM FarmField F, Landcover L, Viewer V
WHERE V.left(F.extent, L.extent)=1 AND
ffl Explanation: A farm field is suitable for tank movement if the crop growing inside is soft and
low. The type field in the FarmF ield table identify this property. left is a viewer-based
direction predicate with respect to the orientation of a viewer. The database will search for
FarmFields that are left of the lake from viewer1's perspective, and list all the satisfying fields
suitable for tank movement.
4 Open Geometry
Open objects mean those geometries whose boundaries are partially defined, or extending beyond the
data window, or infinite. To think of a query example first:
Query: Given the map of Minnesota as our data window, what's the length of the Mississippi
river?
Questions: What should the GIS system answer?
(a) The length of the Mississippi river inside Minnesota.
(b) At least the length of the Mississippi river inside Minnesota, but I don't know exactly.
Since the Mississippi river extends outside Minnesota, we cannot compute the exact length of the
river given only the Minnesota map, so we prefer answer (b). Modeling the river as a closed object
can only return answer (a) which is not precise; however, if we model the river as an open object, then
answer (b) will be obtained, which is more accurate.
4.1 Categories of Open Geometry
Table
categorizes the open objects based on two factors: the extent of the object and our knowledge
of the object. Figure 7 gives examples of each category of open objects.
Knowledge
Open Object within window beyond window Extent
Open-G complete none finite
Open-I complete complete infinite
Open-P partial partial
Table
10: Defining open objects
If the object is finite and its boundary is well defined within the data window, then this is a closed
object. Type Open-G refers to the object that has a finite boundary but extends beyond the data
window; and the portion of the object within the data window is fully known, but the portion outside
the data window is only partially known. This type of open object is useful in GIS applications. For
example, if we consider the map of Minnesota as our data window, then the Mississippi river falls into
the category of Open-G. Open-I refers to the object that has an infinite boundary, but we have complete
knowledge of the object either within the data window or outside. Even though it seems of little interest
to Geographic science since the earth has a finite surface, the category is useful in modeling direction
for extended objects, as we will discuss in a later section. Moreover, Open-I and Open-G have similar
closed Open_I
Open_G
Open_P
Data window
Figure
7: Examples of open shapes
topological properties. Type Open-P refers to an object of which we have only incomplete information.
Dealing with this kind of object is out of the scope of our discussion. In this paper, we will focus on
the category of Open-G and Open-I, and will use the term Open object in the places where difference
between the two is unnecessary. to be differentiated.
4.2 Geometric and Topological Operations on Open Objects
In this subsection, we will examine the effects of open objects on geometric and topological operations.
Table
11 and table 12 give the results for basic geometric and topological operations, respectively. Here
"Closed" represents a closed object and "Open" refers to an open object. The first column of each
small table contains the first argument type, and the first row contains the second argument type. For
example, Difference(Closed, Open. If the two
arguments of difference are Open objects, the result then could be either a closed object(If the two
open objects extending to the same space) or an open object.
Intersection Closed Open Union Closed Open Difference Closed Open
Closed Closed Closed Closed closed open Closed Closed Closed
Open/ Open/
Open Closed Closed Open Open open Open open Closed
Table
11: Domains and Ranges for Geometric Operations on Open Objects
ETDOC Closed Open Within Closed Open
Closed boolean boolean Closed boolean boolean
boolean/ boolean/
Open boolean don't know Open False don't know
Table
12: Domain and Ranges for Logical Operations on Open Object. ETDOC stands for one of
Figure
8 illustrates the four cases of operation Difference with an open shape involved. The pattern
parts represent the difference between two objects. It is worth to mentioning here that since the open
shapes E and F extend to the same region, so Difference(E; F ) is a closed shape.
A
A-B
C-D X-Y
F
Data window
Figure
8: Operation Difference on open shapes
In table 12, we combine operations that have the same results into one table. Here ETDOC represents
one of the operations in the set of fEqual, Touches, Disjoint, Overlap, Crossesg. The result of the
operations could be either boolean or don't know. don't know is a special value which has properties
similar to the null value in a database. A useful observation is that topological operations involving
closed objects always have boolean results.
4.3 Defining Open line, Open Rectangle
Examples of open spatial objects are open lines, open planes, and open spaces. A common way to
define these in 3D Cartesian geometry is in terms of equations such as the parametric equations [17]:
ct for a line through the point
and Ax+C=0 for a 3D space. It would be more convenient if there were corresponding object classes so
that users could describe them at an abstract level and use them to describe the space. The direction
object could be used for this purpose.
We define open lines and open rectangle regions here using directions and points. Table 13 shows
how to formalize each open object with examples in figure 9.
(d)
(c) (e)
(b)
(a)
Figure
9: Examples of open shapes
There are several subtypes in each type. For an open line, it could be 1-end open(figure 9a), which
needs a start point and a direction to define it, or it could be 2-end open(figure 9b), which needs an
intermediate point and a direction to describe it. The open rectangle also has three subtypes: a 1-side
open rectangle (9c), described by two vertices of the rectangle and one direction which is perpendicular
to the edge connected by the two vertices. A 2-side open rectangle is described using two 1-end open
lines which start from the vertex of the rectangle. Also a 3-side open rectangle could be defined by a
Type Subtype Descriptions Examples
open line openline1(1-end open line) start-point, direction (a)
openline2(2-end open line) intermediate-point, direction (b)
openrect1:1-side open rectangle vertex 1 ,vertex 2 ,direction, where
direction perpendicular to segment
formed by the two vertices
(c)
open rectangle openrect2(2-side open region) two 1-end open lines from the only
vertex
(d)
openrect3(3-side open rectangle) 2-end open line, direction (e)
Table
13: Defining open objects
2-end open line and a direction. It is obvious that extending to an open cube is easy.
Abstract
Data Type for open lines and open rectangles
The ADTs for open objects are given in table 14 using C++ notation. The entire open object class
is defined as a subclass of geometry. Geometric and topological operations available for open objects
include openUnion, openIntersection, openDifference, openWithin, openEquals, openTouches, openDis-
joint, openOverlap, and OverCrosses. The definition of the operators should be overloaded for open
objects, according to table 11 and table 12. Here, we only show the attributes and constructors of each
open object class, and as an illustration, we represent the spatial objects in figure 9.
ADT attributes constructors examples in figure 9
line
Table
14: Abstract Data Types for Open Lines and Open Rectangles
4.4 Modeling Direction Between Non-point Objects using open objects
We can use open shapes to model the directions between extended objects by converting the calculation
of directional relationships to the calculation of topological relationships between objects.
Given two objects TO and RO, we want to decide the direction of target object TO related to
reference object RO. Using the approach in [8], first we obtain the MBR of object RO and partition the
space around object RO into nine direction tiles based on the MBR of object RO, which is a rectangle
ABCD as in figure 10. We represent each direction tile as a spatial object, as in table 15.0000000000001111111111111111
O
TO
RO
Figure
10: Object TO and RO
Rectangle representation for figure 10
O rectangle(A,B,C, D)
Table
15: Direction tile
Eight of the nine direction tiles are open rectangles. NW, NE, SE, and SW are 2-side open rectan-
gles, and N, W, E, and S are 1-side open rectangles. In order to test the direction of object TO related
to object RO, we can test into which direction tile TO falls. The calculation is then converted to the
overlap relationship between object TO and the direction tiles. For example,
The other directional relationship can be tested similarly. As noticed in table 12, the topological operations
involving closed objects produce boolean values. The union of all the tiles that overlap with A is
the region where the target object TO is located w.r.t. the object RO. For example, in figure 10, TO is
North and Northwest and West of object RO.
In this paper, we model direction as a new kind of spatial object using the concepts of vectors, points
and angles. The basic approach here is to model direction as a unit vector. This novel object view of
direction has several obvious advantages: It allows the user to define the orientation of spatial objects;
it also gives a richer set of predicates and operators on direction and orientation. New spatial data types
such as oriented spatial objects and unbounded spatial objects can be defined as well. Finally, direction
reasoning, which is useful in spatial query processing and optimization, can be implemented simply by
basic vector algebra.
The benefits of the new viewpoint are obvious and promising. In future work, we would integrate
vector abstract data types with an extensible query language to evaluate their efficiency in the context
of various GIS applications[21, 23]. We would also like to explore the use of vectors to model values of
spatial attributes such as wind-velocity, the magnetic field of the earth, etc.
Acknowledgments
This work is sponsored in part by the Army High Performance Computing Research Center under the
auspices of the Department of the Army, Army Research Laboratory cooperative agreement number
DAAH04-95-2-0003/contract number DAAH04-95-C-0008, the content of which does not necessarily
reflect the position or the policy of the government, and no official endorsement should be inferred. This
work was also supported in part by NSF grant #9631539 Thanks to to Christiane McCarthy for helping
to improve the readability of the paper.
--R
Qualitative Spatial Reasoning: Cardinal Directions as an Example.
Maintaining Knowledge about Temporal Intervals.
Hierarchical Reasoning about Direction Relations.
Qualitative Spatial Reasoning about Cardinal Directions.
Temporal Reasoning Based on Semi-Intervals
Using Orientation Information for Qualitative Spatial Reasoning.
Basic Meanings of Spatial relations: Computation and Evaluation in 3D space.
The Direction-Relation Matrix: A Representation of Direction Relations for Extended Spatial Objects
Various Views on Spatial Prepositions.
Composing Conceptual Structure for Spoken Natural Language in a Virtual Reality Environment
An Introduction to Spatial Database Systems.
Open GIS Consortium Inc.
Open GIS Consortium Inc.
The observer's point of view: An Extension of Symbolic Projections.
Qualitative representation of Spatial Knowledge in Two-Dimensional Space
An Algorithm to Determine the Directional Relationship Between Arbitrarily-shaped Polygons in the plane
Modern Mathematical Analysis.
Using 2D C
Mathematical Elements for Computer Graphics.
CCAM: A Connectivity-Clustered Access Method for Networks and Network Computations
Equivalence Classes of Direction Objects and Applications.
A First Course in Database Systems.
A Prime-Number-Based Matrix Strategy for Efficient Iconic Indexing of Symbolic Pictures
--TR | orientation;oriented spatial object;open object;direction |
594792 | Compressing Triangulated Irregular Networks. | We address the problem of designing compact data structures for encoding a Triangulated Irregular Network (TIN). In particular, we study the problem of compressing connectivity, i.e., the information describing the topological structure of the TIN, and we propose two new compression methods which have different purposes. The goal of the first method is to minimize the number of bits needed to encode connectivity information: it encodes each vertex once, and at most two bits of connectivity information for each edge of a TIN; algorithms for coding and decoding the corresponding bitstream are simple and efficient. A practical evaluation shows compression rates of about 4.2 bits per vertex, which are comparable with those achieved by more complex methods. The second method compresses a TIN at progressive levels of detail and it is based on a strategy which iteratively removes a vertex from a TIN according to an error-based criterion. Encoding and decoding algorithms are presented and compared with other approaches to progressive compression. Our method can encode more general types of triangulations, such as those constrained by topographic features, at the cost of a slightly longer bitstream. | Introduction
Huge terrain datasets are increasingly available in GIS. This fact gives
rise to challenging problems in storage, transmission, and visualization
of terrain models. In particular, the design of compact structures for
encoding a terrain model as a sequential bitstream is important to reduce
the amount of time needed to transmit it over a communication line (e.g.,
through Internet), to save disk storage space or to load a terrain from
disk into memory.
While regular grids can be compressed through techniques similar to
those used for compressing images [16], this is not true for Triangulated
Irregular Networks (TINs). For TINs, the problem is different and more
involved. While the connecting structure of a grid is fixed, the triangulation
at the basis of a TIN is not uniquely defined by its vertices, and
thus it must be encoded explicitly. Such triangulation is usually the result
of some specialized algorithm which takes into account issues such as
preservation of terrain features, interpolation of isolines, minimization of
c
2000 Kluwer Academic Publishers. Printed in the Netherlands.
the approximation error, etc., and typically uses extra knowledge beside
the position of vertices. Thus, it is not reasonable to encode just the
vertices of a TIN, and recompute the underlying triangulation each time
the TIN is loaded or received.
The study of techniques for producing compressed formats of triangle
meshes (and, in particular, of TINs), generally referred to as
geometry compression, has gained increasing attention in the last few
years because of the widespread use of TINs as terrain models.
The problem of TIN compression involves two complementary tasks,
which can be studied independently:
Compression of the vertices, i.e., of the numerical information attached
to each vertex of the TIN (location, elevation and, possibly,
attributes).
Compression of connectivity, i.e., of information describing the triangles
of the TIN as triplets of vertices, and of adjacency information
between pairs of triangles.
Compression of vertices and of connectivity involve different problems
and different techniques. Thus, they can be treated separately. Vertex
compression has been treated by some authors [3, 8, 18] by using combinations
of lossy methods based on quantization and lossless methods
based on entropy encoding.
In this paper, we do not address vertex compression, while we focus
on compression schemes for TIN connectivity. We propose two compression
methods. The first method is based on traversing a TIN in
a shelling order (i.e., radially around a seed triangle); it encodes each
vertex exactly once, and guarantees less than two control bits for each
edge to encode connectivity. The second method compresses a TIN at
progressive levels of detail and is based on a strategy which iteratively
removes a vertex from a TIN according to an error-based criterion. Both
methods encode both the triangles of a TIN and their adjacency relations
directly in the bitstream.
This paper is organized as follows: in Section 2, we provide a brief
survey of existing techniques for compressing connectivity; in Section
3, we describe our compression method based on shelling; in Section 4,
we present our method for progressive compression. Section 5 contains
some concluding remarks.
Compressing Triangulated Irregular Networks 3
2. Previous Work
Our review of existing literature is focused on methods for compression
of connectivity. We do not address here methods for vertex compression.
A TIN is usually maintained (both on disk and in main memory) in
an indexed format: a list of vertices and a list of triangles are maintained
and the connecting structure of the TIN is described by providing three
vertex references for each triangle. Since the number of triangles in a
TIN is roughly twice the number of vertices and since a vertex reference
requires log n bits for a TIN with n vertices, such a scheme requires
at least 6n log n bits. The indexed format can be extended to encode
triangle-to-triangle adjacencies by adding, for each triangle, the references
to its three adjacent triangles. The total number of bits in this case
raises to 12n log n + 6n. In the following we will refer to such structure
as the explicit encoding for a TIN, and we will use it as a reference for
evaluating the performance of compression methods.
Techniques for compression of connectivity information of a TIN can
be roughly classified into:
Direct methods, which are aimed at minimizing the number of bits
needed to encode a given TIN "as it is". The bitstream must be
read and processed completely by a decompression algorithm in
order to obtain a description of the TIN.
Progressive methods, which encode a coarse TIN representation and
a sequence of details which must be added to it in order to recover
the initial TIN. In this case, an interrupted bitstream provides an
approximation of the terrain at a lower resolution.
Several compression methods proposed in the literature are not restricted
to TINs but they have been developed for triangle meshes
representing free-form surfaces in three-dimensional space. Thus, in our
literature survey we sometimes refer to triangle meshes rather than to
TINs.
2.1. Direct Methods
Classical direct methods proposed in the literature are based on the
decomposition of a triangle mesh into triangle strips, or generalizations
of triangle strips [3, 8, 9]. Such methods are especially well-suited for
visualization, but less to TIN transmission or encoding on disk because
they do not provide the full mesh topology.
A triangle strip is a path of triangles with alternated left and right
turns; it is simply specified by listing the vertices of its triangles in a
4 Leila De Floriani, Paola Magillo, Enrico Puppo13571 3
Figure
1. (a) A triangle strip; the corresponding vertex sequence is 0; 7.
(b) A generalized triangle strip; dashed arrow correspond to turns in the same
direction as the previous one in the sequence; the correseponding vertex sequence
with vertex replication is 0;
zig-zag order (see Figure 1 (a)); each vertex appears only once in the
sequence. A drawback of this simple structure is that a triangle mesh in
general cannot be decomposed into strips with alternating left and right
turns [9] .
A more general form of strip is given by so-called generalized triangle
strips, which represent standard technology in graphics packages. In this
case we do not have a zig-zag sequence, but each new vertex may correspond
either to a right or to a left turn in the pattern (see Figure 1 (b)).
The encoding bitstream either uses a binary code, called a swapcode,
to specify how to connect each new vertex to the last encoded triangle,
or it repeats the vertex in case of two successive turns with the same
orientation occur (see Figure 1 (b)). A drawback is that several strips
are necessary to cover a triangle mesh and vertices shared by more than
one strip must be replicated.
On average each vertex appears twice in the resulting bitstream. It
has been shown [9] that the problem of generating a minimum number
of strips is NP-complete. Evans et al. [9] give several heuristics in which
they try to maximize the number of triangles per strip, to minimize
swaps, to avoid strips formed by just one triangle.
Other methods [1, 8] also allow reusing more of the past vertices than
the last two ones (as in generalized triangle strips), by storing the last
k vertices in a buffer; small codes indicating how to operate on such a
buffer are interleaved in the bitstream. Deering [8] proposes a buffer of
positions and a syntax for the encoding, giving rise to the so-called
generalized meshes. Bar-Yehuda and Gotsman [1] studied the extent to
which we can increase the buffer size to reduce vertex duplication. They
also show that the problem of minimizing the buffer size for a given
mesh is NP-hard. Chow [3] gave algorithms for building generalized
Compressing Triangulated Irregular Networks 5
(a) (b) (c)
Figure
2. (a) A TIN; (b) the same TIN with a vertex at infinity added, and the edges
of the vertex spanning tree superimposed as thick lines; (c) the triangle spanning
tree (the dashed lines denote triangles incident in the vertex at infinity).
meshes which try to optimize the use of the buffer through heuristics.
Compression rates are about 11 bits of connectivity information per
vertex in [3, 8] and from 2.5 to 7 in [9].
Methods based on triangle strips and their variants provide just a description
of triangles and not of their mutual topological relations. Thus,
if the decoded TIN must undergo operations that require adjacency
relations (e.g., computation of visibility information, paths, drainage
networks), these should be reconstructed separately with an extra cost.
Other methods allow reconstruction of adjacency relations from the encoding
bitstream [7, 19]. Our method presented in Section 3 belongs to
this second class.
Topological surgery by Taubin and Rossignac [18] cuts a triangle mesh
along a set of edges that correspond to a spanning tree of vertices; such
tree is determined by selecting the minimum number of edges which
connect all the vertices. If we imagine cutting the given TIN along the
edges of the vertex spanning tree, we obtain another TIN which contains
the same triangles as the original one, and whose dual graph is structured
as tree, thus forming a spanning tree of triangles of the original TIN (see
Figure
2).
The triangle spanning tree can be decomposed into a collection of
triangle strips, called runs. Runs are connected through branching tri-
angles, each of which connects three runs.
The bitstream produced by the method consists of the vertex and
of the triangle spanning trees. A rather complex algorithm permits to
reconstruct the original TIN. Through experiments on manifold meshes
Taubin and Rossignac show a compression of 4 bits per vertex on av-
erage. The method produces longer strips than the previously discussed
ones; it requires that all vertices are kept in main memory during both
compression and decompression; both the coding and the decoding al-
6 Leila De Floriani, Paola Magillo, Enrico Puppo
gorithms perform consistent graph manipulation and are not easy to
implement.
The method by Touma and Gotsman [19], unlike the previous ones,
encodes triangle adjacencies directly in the bitstream. The compression
algorithm maintains an active list of edges bounding a (not necessarily
simply-connected) polygon which separates triangles already encoded
(located inside the polygon) from triangles that have still to be to coded
(located outside). At each step, the polygon is enlarged by encoding all
triangles lying outside it which are incident in one of its vertices. The
algorithm works in a completely similar way.
The resulting bitstream contains each vertex once, and three types of
commands: ADD, SPLIT and MERGE, where the first two commands
have one argument and the third command has two arguments. The
argument of ADD is the degree d of a new vertex to be inserted (i.e., the
number of triangles incident in such vertex), the arguments of SPLIT and
are integer numbers with the meaning of indexes and offsets;
such commands mark those points at which the number of boundary
curves of the current polygon increases by splitting one curve into two,
or decreases by merging two curves into one, respectively. With the
exception of MERGE operations (which are rare), the compression and
the decompression algorithms run in linear time in the number of mesh
edges. Details about the complexity of MERGE are not provided in [19].
The method generates an ADD command for each vertex of the mesh.
The number of SPLIT and MERGE commands depends on the mesh.
The authors do not report any evaluation of the number of SPLIT or
MERGE commands that can occur: they just observe that MERGE
commands can occur only for meshes of positive genus (i.e., three-dimensional
surfaces with through holes), and thus not for terrains.
If we assume that the degree of any vertex is less than b, the compressed
sequence requires at least 2 bits per vertex: two bits for
the command (since we have three possible commands) and log b bits
for the degree: for instance, 5 and 6 bits, respectively, if
16. The bits necessary to represent possible SPLIT and MERGE
commands add to these. Touma and Gotsman observe that the sequence
of codes can be compressed further. Since the average degree of a vertex
is 6, there is a spread of degrees around this value; moreover, there are
easily long subsequence repeating the same commands and the same
arguments. Thus, they use entropy coding combined with run-length
encoding, getting experimental compression rates from 0.2 to 2.4 bits
per vertex for connectivity.
Compressing Triangulated Irregular Networks 7
vertex split
edge collapse
v'
Figure
3. Edge collapse and its reverse vertex split.
2.2. Progressive Methods
Progressive methods encode a coarse approximation of a mesh and a
sequence of modifications which incrementally refine it into the original
mesh [12, 13, 17]. An interrupted bitstream provides an approximation
of the whole terrain, which can be seen as a form of lossy compression.
Progressive compression methods are especially useful for mesh transmission
or as compact formats for secondary storage since they allow a
trade-off between loading/transmission time and loss of accuracy. This
additional feature is paid with compression rates that are usually lower
than those of direct methods.
The basic technique for building progressive representations of meshes
come from iterative techniques for mesh simplification based on local
modifications of a mesh (see, e.g., [14, 11]).
A sequence of progressive resolutions for a mesh is generated by iteratively
applying a destructive operator, which removes details somewhere
in the mesh. A destructive operator has an inverse constructive operator,
which recovers such details. A compressed bitstream contains the coarse
mesh (i.e., the result of a sequence of destructive operations) along with
the sequence of constructive operations necessary to recover the original
mesh.
Progressive Meshes, developed by Hoppe [12, 13], provide a progressive
compression method where the destructive operator is edge collapse.
Edge collapse replaces an edge e with one of its endpoints v, and the
two triangles sharing e with two edges incident at v. The corresponding
constructive operator is vertex split, which expands a vertex v into an
and two edges e 1 and e 2 among those incident at v into two
triangles (see Figure 3). Each vertex split in the sequence is compactly
encoded by providing the new vertex v 0 , a reference to an old vertex v,
and a code specifying the position of e 1 and e 2 around v. The number
of bits necessary to encode connectivity is n(log n
a mesh of n vertices, if b is the maximum degree of a vertex, since the
position of e 1 is a number in the range and that of e 2 a number
in the range one position has already been chosen for e 1 ).
8 Leila De Floriani, Paola Magillo, Enrico Puppo
For instance, if we have 21 (23n) bits of
connectivity information.
Snoeyink and Van Kreveld [17] have developed a progressive method
which applies to TINs based on Delaunay triangulations, and guarantees
that all intermediate meshes are Delaunay triangulations. The
destructive operator removes a vertex from a Delaunay triangulation;
the corresponding constructive operator re-inserts such vertex. The compression
algorithm performs several stages starting from the given
each stage removes a maximal set of independent vertices (i.e. vertices
not connected by an edge) from the current Delaunay triangulation. The
process is guaranteed to terminate in a logarithmic number of stages.
The bitstream contains the final coarse mesh plus, for each stage in
reverse order, the sequence of removed vertices (which must be re-inserted
by the decoding algorithm). The sequence of vertices removed
in a stage is sorted in the same order in which the triangle containing
each vertex is encountered in the mesh traversal algorithm of de Berg
et al. [4]. Thus, the decoding algorithm at each stage can locate all the
triangles containing the new vertices in linear time in the size of the
current triangulation. The length of the resulting bitstream is O(log 2 n)
where n is the number of vertices and the constant is not known. A
disadvantage of this method is in requiring heavy numerical calculations
(i.e., the incremental reconstruction of a Delaunay triangulation) for
which may cause not only time overhead, but also numerical
and inconsistency problems (e.g., different triangulation of co-circular
points in the original and in the reconstructed mesh). No experimental
results are available.
Note that both methods described above assume a specific strategy
for retriangulating the mesh after the insertion of each vertex (i.e., vertex
split in [12, 13], and Delaunay update in [17]). In Section 4, we propose
a progressive method which does not depend on the retriangulation
strategy.
3. A Direct Compression Method Based on Shelling
In this section we describe a new compression method based on shelling.
This method is designed for mesh transmission or disk storage because
it encodes both triangles and their adjacency relations.
A shelling sequence of a TIN \Sigma is a sequence oe 1
angles, containing each triangle of \Sigma once, and such that, for any prefix
subsequence n), the boundary of the union
of the set of triangles foe is a simple polygon. A mesh is
shellable if it admits a shelling sequence; it is extendably shellable if
Compressing Triangulated Irregular Networks 9
it is shellable and every shelling sequence defined for a subset of its
triangles can be extended to a shelling sequence for the whole mesh.
Extendably shellable meshes include TINs and all the triangulations of
surfaces homeomorphic to a sphere or a disk; surfaces with a non-null
genus (i.e., with through holes) are not extendably shellable [2]. The
method we present here applies to triangle meshes that are extendably
shellable.
The bitstream implicitly encodes a shelling sequence of the given
TIN. It contains the vertices of the TIN interleaved with control codes
providing connectivity information. There are four control codes: VER-
TEX, SKIP, LEFT, and RIGHT, each represented on two bits. Coding
and decoding algorithms are very simple and work in time linear in the
size of the TIN without performing any numerical computation. Both
the triangles and their adjacency links are recovered from the bitstream
without extra processing. Moreover, only the boundary of the current
polygon and triangles incident to its edges have to be kept in memory,
while compressed / decompressed triangles lying completely inside the
polygon can be discarded.
The method starts from an arbitrary triangle and traverses the TIN
according to a shelling order. At each iteration, it produces a two-bit
code and, possibly, a vertex. Each vertex of the TIN is encoded exactly
once.
3.1. Compression and Decompression Algorithms
The compression and decompression algorithms maintain the simple
polygon bounding the currently encoded / decoded portion of the triangulation
in a doubly-linked list; they also keep a queue of active edges,
which are those edges of the current boundary that have not been tested
yet to compress / decompress the triangle externally adjacent to them;
a control code is sent/read for each active edge.
The compression algorithm starts from an arbitrary triangle of the
TIN, whose edges define the initial polygon, and sends its three vertices
to the output stream. Then, it examines each edge e of the current
polygon in turn and tries to enlarge the polygon by including the triangle
oe externally adjacent to e. It performs the following actions on e:
1. if the third vertex v of oe does not lie on the polygon, then include oe
and send a VERTEX code followed by vertex v (see Figure 4 (a));
2. if oe does not exist (i.e., edge e is on the boundary of the TIN), or the
third vertex v of oe lies on the polygon, and it is not the other vertex
of one of the edges adjacent to e along the polygon (i.e., oe cannot be
RIGHT
(a) (b) (c)
(d)
e
e
e"
e
VERTEX
e
Figure
4. The five possible situations for the current edge e in the TIN compression
algorithm: (a) the triangle externally adjacent to e brings a new vertex V ; (b) the
triangle externally adjacent to e does not exist; (c) the triangle externally adjacent
to e exists but cannot be included because it violates shelling; (d,e) the triangle
externally adjacent to e has another edge on the current polygon, and such edge is
the one lying to the left and to to right of e, respectively.
included since it makes the polygon not simple), then send a SKIP
code (see Figure 4 (b) and (c)); edge e will not be examined again;
3. if the third vertex v of oe lies on the polygon, and it is the other
vertex of the edge adjacent to the left of e, then include oe and send
a LEFT code (see Figure 4 (d));
4. if the third vertex v of oe lies on the polygon, and it is the other
vertex of the edge adjacent to the right of e, then include oe and send
a RIGHT code (see Figure 4 (e)).
The loop terminates when all the triangles have been compressed.
The decoding algorithm works in a similar way. It builds the first
triangle from the three vertices found at the beginning of the bitstream.
Then, it examines each edge e of the current polygon in turn, and tries
to enlarge the current polygon by creating a new triangle adjacent to e,
Compressing Triangulated Irregular Networks 11
according to the directions contained in the next control code read from
the bitstream:
1. in case of a VERTEX code: read a vertex v from the bitstream,
create a new triangle oe from e and v, and set an adjacency link
between oe and the triangle adjacent to the other side of e;
2. in case of a SKIP code: no new triangle is created; edge e will not
be examined again;
3. in case of a LEFT code: create a new triangle oe from e and the edge
adjacent to the left of e along the polygon; set adjacency links
between oe and the triangles adjacent to the other side of e and e
4. in case of a RIGHT code: create a new triangle oe from e and the
adjacent to the right of e along the polygon; set adjacency
links between oe and the triangles adjacent to the other side of e and
e 0 .
The loop terminates when the bitstream has been read completely.
3.2. Analysis
Since a TIN is extendably shellable, at each step one of the following two
conditions occurs: either all triangles have been processed, or there exists
a triangle which can be added to the current polygon while maintaining
it simple; at least one edge of such a triangle must lie on the current
polygon. In the first case, the process terminates. In the latter case we
show that the compression algorithm can find a new triangle to encode.
Each step of the main loop examinates an edge e of the current
polygon until it finds one such that the triangle externally adjacent
to it can be included. It is easy to see that, if e generates a triangle
(cases VERTEX, LEFT, and RIGHT) then such triangle preserves the
simplicity of the current polygon and, if e does not generate a triangle
(case SKIP) then either e is on the TIN boundary, or the triangle t e
externally adjacent to e does not preserve simplicity because the vertex
of t e opposite to e belongs to the boundary of the current polygon.
Edges of this last type will not be examined again (they are "virtually
removed" from the current polygon). Therefore, the algorithm will scan
edges of the current polygon until a non-SKIP edge is found. Since the
triangulation is extendably shellable, we are always sure that one such
edge exists until the whole triangulation has been traversed.
It remains to be shown that a triangle t e externally adjacent to a
SKIP edge e at some stage will be generated at some later stage. Since
all three vertices of t e already belong to the current polygon, it will
be possible to include t e only after having another edge e 0 of t e on the
polygon. Let t 0 be the neighbor of t e along e 0 . Since we are following a
shelling order, t 0 , hence e 0 , will be included in the current polygon at
some time. Thus, while examining e 0 , either a LEFT or a RIGHT code
will be sent, and t e will be included.
Thus, we have shown that the compression algorithm always termin-
ates, after having traversed all the triangles of the given TIN in shelling
order.
At each step, the number of operations performed on the current
edge is bounded by a constant. Each TIN edge is examined at most
once in the main loop, hence the time complexity for both compression
and decompression is linear in the number of edges, which is about 3n,
i.e., O(n).
It is easy to see that the actions performed by the decompression
algorithm, on each code read from the bitstream, reproduce exactly the
same triangle configuration from which that code has been generated
by the compression algorithm. Thus, the original TIN is reconstructed
correctly.
Each vertex is sent exactly once by the compression algorithm, and a
code is sent for every examined edge, i.e., at most one code for each TIN
edge. Indeed, not all edges are examined: LEFT and RIGHT codes eliminate
one edge each, which therefore does not generate a code; moreover,
the vertices of the boundary remaining after having processed all the
triangles do not generate any code.
Since the number of VERTEX codes is fixed, the bitstream is shorter
when there are many LEFT and RIGHT codes and few SKIP codes.
Implementing the list of active edges as a queue results in a polygon
that tends to grow in a breadth first order, thus providing many LEFT
and RIGHT codes. We found that an implementation based on a stack,
hence on a depth first order, produces much more SKIP codes, and, thus,
longer bitstreams.
In the worst case, the number of control codes is bounded from above
by the number of edges in the given TIN, i.e., about 3n (equivalent to
6n bits), where n is the number of TIN vertices. Experimental results
give better compression rates (see Section 3.3).
3.3. Experiments and Discussion
Our compression method takes into account only the connectivity structure
of a TIN, not its geometry. Thus, in order to prove the performance
of our approach on a wide range of inputs, we show experiments on TINs
having different kinds and sizes of triangulations, rather than on TINs
representing different terrains.
Compressing Triangulated Irregular Networks 13
Table
I. Results of the compression algorithm based on shelling. U1-4 are
TINs at uniform accuracy, A1-4 and B1-4 are TINs at variable accuracy.
Times are in seconds.
TIN vert tri code bits / encoding decoding
bits vert time (tri/sec) time (tri/sec)
U2 28510 56540 123086 4.3173 2.53 (22347) 1.55 (36477)
A3 15515 30818 65210 4.2030 1.36 (22660) 0.84 (36688)
All TINs used here are approximated models built by a surface simplification
algorithm from an original grid dataset representing the area
of Mt. Marcy (NY), courtesy of U.S. Geological Survey. Data U1-4 are
TINs approximating original data at a uniform error value, equal to 1,
2, 5 and 10 units, respectively; all triangles in a single TIN have about
the same area. Conversely, TINs A1-4 and B1-4 are characterized by a
great difference in triangle density of different zones: in A1-4 (B1-4),
one fourth (one 16th) of the area is represented with an elevation error
equal to 0.5 meters, while the rest is represented at the coarsest possible
detail.
Experiments have been performed on a Pentium Pro (200 Mhz, 64 Mb
RAM). Results are shown in Table I. Compression rates are lower than
4:5 bits per vertex. Execution times are about 22K and 37K triangles
per second in compression and decompression, respectively.
The main advantages of our method are those of being very simple
conceptually, and easy to implement, and at the same time, of giving
good compression rates.
The method is as simple as (generalized) triangle strips [3, 8, 9]
and achieves higher compression rates, comparable to those of more
complicated algorithms [18]; moreover, such algorithms do not provide
adjacency information.
14 Leila De Floriani, Paola Magillo, Enrico Puppo
w153
(a) (b) (c) (d) (e)
Figure
5. The triangulation after (a) and before (e) removing a vertex v, and the
related sequence of edge flips (b,c,d), to be read left-to-right to restore situation (e)
from situation (a). In (a), the edges around w, and in (b,c,d) the edges around v are
Triangle tv is encoded as the pair (w;4) and the sequence of edge flips is
1,3,0.
The algorithm proposed in [19] also encodes adjacency information,
and is more complicated than ours since it manages a multiply-connected
polygon instead of a simple one. The bitstream generated by such method
(disregarding the postprocessing step that is applied in [19] to further
compress it) requires at least 5n or 6n bits (depending on the maximum
degree of a vertex in the TIN), plus a variable number of SPLIT and
MERGE codes, which depends on the input mesh. Thus, the length of
the two bitstreams is comparable on average.
4. A Progressive Compression Method based on Edge-Flips
In this section we present a new method for TIN compression at progressive
levels of detail. We use a destructive operator which consists of
removing a vertex v of degree bounded by a constant b from the current
TIN and of retriangulating the corresponding polygonal hole -. The
inverse constructive operator inserts vertex v and recovers the previous
triangulation of -. We recall that the degree of a vertex is the number
of triangles incident in it.
The old triangulation is recovered from the new one by first splitting
the triangle t v , containing v, in the current TIN, into three triangles, and
then applying a sequence of edge flips. An edge flip is an operation that
replaces an edge, shared by two triangles whose union forms a convex
polygon, with the other diagonal of such polygon.
Our bitstream encodes, for each removed vertex v, both the starting
triangle t v and the sequence of edge flips to be performed (see Figure
\Gamma The starting triangle t v is given by a reference to a vertex w of t v
and by the index of t v in the star of triangles incident at w. The
reference to w requires log n bits; the index of t v requires log b bits.
Compressing Triangulated Irregular Networks 15
operation is specified by an edge opposite to v (in its star of
triangles), which is involved in the flipping operation. If triangles
incident at v are numbered in a conventional order in the data
structure encoding the TIN, such edge can be uniquely identified
with an index. Note that there are three edges incident at v at the
beginning and their number increases by one at each flip: there will
incident edges after i flips, and incident edges before
the last flip, where k is the degree of the removed vertex (k - b).
Therefore, for k ? 3, the whole sequence of edge flips is identified
by a sequence of k \Gamma 3 indices s is in the range
[0; 3+i]. It is easy to see that for a removed vertex of degree k, there
exist 3
possible sequences of flip indices. A
given sequence can be encoded compactly with a unique number in
the range [0; (k\Gamma1)!
called a flip code, which requires dlog( (k\Gamma1)!
bits and is given by the formula:
This flip code can be unpacked with a standard method: s k\Gamma4 is
given by c div (k\Gamma2)!
(j
2)!where div denotes the integer division operation.
Our bitstream encodes each removed vertex once and, for each vertex,
a vertex reference, a triangle index, the number of flips to be performed
and a flip code, as described above. Disregarding the cost of the initial
TIN, which is always very small, our method produces n(dlog ne
2dlog be)+
bits of connectivity information, where
k is the number of removed vertices of degree k. Since, on average, the
degree of a vertex in a TIN is six, this can be roughly estimated as
ne Experiments we made on real data confirm
such an estimate.
4.1. Compression and Decompression Algorithms
The compression algorithm works as follows:
1. Initialize the current TIN as the input TIN.
2. While the current TIN is not "small enough" select a vertex v of
degree at most b according to some criterion (to be explained next):
remove v and retriangulate the polygonal hole -;
locate the triangle t v of the new triangulation of - which contains
choose a vertex w of t v , having degree at most equal to b and
compute the index of t v around w;
simulate the reconstruction of the old triangulation of the hole
(the one containing v) from the current one (the one without
v), and encode the corresponding sequence of edge flips.
3. Send the current TIN, in a directly compressed format (e.g., as explained
in Section 3), followed by the sequence of removed vertices
in reverse order; for each vertex v, output also the index of the
associated vertex w, the index of t v in the set of triangles incident
in w, the number of flips to be performed and the flip code.
The compression algorithm has two key points: the choice of the
vertex v to be removed at each iteration of loop 2, and the retriangulation
of the corresponding hole -. Any criterion can be used for
both purposes, without affecting the format of the bitstream, or the
algorithm. We will discuss such issues further in Section
4.2.
The decompression algorithm performs the following steps:
1. Initialize the current triangulation with the coarse triangulation read
from the bitstream.
2. Read the next vertex v with associated information. Get vertex w
from the list of vertices in the current TIN and retrieve triangle t v
in the star of w. Insert v into the current triangulation by splitting
triangle t v at v; unpack the flip code and perform the given sequence
of edge flips.
3. The process can be stopped either when the bitstream is finished
(in this case the original TIN is completely reconstructed, and we
have a lossless decompression), or when the current TIN has a given
number vertices, or when a certain time has elapsed (in the two latter
cases, a TIN approximating the original one is built, and we have a
lossy decompression).
During both compression and decompression, the current TIN is
maintained in a data structure corresponding to the indexed format
with triangle-to-triangle adjacencies (see Section 2), augmented with
Compressing Triangulated Irregular Networks 17
partial vertex-to-triangle incidence information: for each vertex w in the
TIN, a link to one of its incident triangles is maintained. Such a data
structure is updated according to fixed conventional rules, which allow
us to obtain exactly the same indexing scheme during both compression
and decompression. This is fundamental to uniquely identify, at each
step, triangle t v in the star of vertex w and each edge to be flipped
through the corresponding flip index.
4.2. Analysis
The correctness of the method follows from basic properties of triangulations
well known from computational geometry:
1. if we remove a vertex, together with all its adjacent triangles, from
the interior of a plane triangulation, we make a star-shaped polygonal
hole that can be always filled with triangles without adding extra
vertices (we have a slightly different situation if the vertex is removed
from the boundary of the triangulation);
2. given a plane triangulation T and a new vertex v, if t v is the triangle
of T containing v, then we can obtain a new triangulation by
replacing t v with three new triangles incident at v (triangle split);
3. any triangulation of a given set V of vertices can be transformed
into any other triangulation of the same set of vertices through a
sequence of edge flips;
4. each edge flip applied to a boundary edge of the star of a vertex v
increases the degree of v by one unit.
ensures that at each step of the compression algorithm we
obtain a new (simplified) triangulation. Let T be the current triangulation
at a generic step, and T 0 be the triangulation obtained by eliminating
vertex v from T . Property 2 ensures that locating t v in T 0 provides
sufficient information to obtain a new triangulation T 00 containing v
with degree three, while property 3 ansures that T can be obtained from
T 00 through a sequence of edge flips. Since T differs from T 00 only in the
portion corresponding to the hole left by removing v from T , then edge
flips will affect only that portion. Each edge flip given by a flip index
introduces an edge incident at v which belongs to T , and such an edge
is never removed by a subsequent flip, because each flip affects an edge
on the boundary of the current star of v. Hence, if the degree of v in T
is k, then T will be recovered by exactly k \Gamma 3 flip operations, which are
specified by the flip code.
The core of the compression algorithm is the main loop in Step 2. As
already mentioned, we have two degrees of freedom: in the selection of
the vertex v to be removed and in the retriangulation of the resulting
hole.
Any criterion can be used to retriangulate the hole -. Since - has
a bounded number b of edges, retriangulating it requires a constant
number of operations in any case. For instance, an ear cutting procedure
might be applied, which corrsponds to iteratively flipping edges incident
at v, until just three incident edges are left. Cutting an ear of - corresponds
to flipping an edge incident at v, thus the sequence of edge flips
to be encoded is provided directly. Otherwise, no matter what algorithm
has been used to triangulate -, the sequence of flips can be obtained
as follows. Let T - be the triangulation of -. Vertex v is located first in
T - and triangle t v is found. An influence polygon is initialized with t v ,
and its edges are scanned. Each time an edge e is found, which does not
lie on the boundary of T - , then e is deleted and the influence polygon
grows by incorporating the triangle externally adjacent to e. The index
of e is encoded as a split index. This process continues until the influence
polygon covers the whole - (i.e., all edges are on the boundary of T - ).
Any criterion can also be used for selecting the vertex to be removed,
under the constraint that its degree is not higher than b. For a sufficiently
large value of b (e.g., this constraint has no impact on real world
cases. The specific implementation choice affects both the complexity of
the compression algorithm and the efficiency of the resulting bitstream
for the purpose of progressive transmission. We suggest to select the vertex
causing the least increase in the approximation error (as it was also
done by other authors, e.g., [14, 11]). This requires that the error caused
by removing a vertex of the current TIN is known at each iteration.
The approximation error of the current TIN is the maximum approximation
error of its triangles. For each triangle t, its approximation error
is equal to the maximum vertical distance of a removed vertex, whose
vertical projection falls in t, from the plane of t. In order to compute
approximation errors of triangles we associate with each triangle t in the
current triangulation the set of vertices already deleted whose vertical
projections fall in t.
The error introduced by removing a vertex v is evaluated by simulating
the deletion of v: the hole left by v is retriangulated and the error is
measured by locating v and all points lying inside its incident triangles
with respect to the new triangles that fill the hole, computing the errors
of such triangles, and choosing the maximum error. The error of each
vertex v is stored together with v, and it is updated whenever a vertex
adjacent to v is removed. Note that it is sufficient to evaluate the error
only at vertices whose degree is smaller than b, because they are the only
Compressing Triangulated Irregular Networks 19
Table
II. General information and theoretical bound for the three
TINs considered in our experiments.
terrain #vertices log 2 n log 2 b bits/vert (theor.)
Devil Peak 38115
Mount Marcy 16384 14 4 28
San Bernardino 16384 14 4 28
candidates for removal. The triangulation of a hole, necessary to evaluate
the error, is performed only at vertices of bounded degree, hence it takes
constant time at each vertex. Vertices of bounded degree are maintained
in a priority queue based on their errors. At each deletion, error must be
re-evaluated only for a constant number of vertices, i.e., the neighbors of
v. Location of points inside a given triangle t occurs at most four times,
namely for evaluating the cost of removing each of its three vertices, and
when one of such vertices is actually removed (when t is removed as
well). During the whole coarsening process, a removed vertex may fall,
and need to be relocated, in O(n) different triangles in the worst case.
However, following [10], it is easy to show through amortized analysis
that the expected cost of point location is still O(log n). It follows that
the total cost for computing approximation errors is O(n log n). This
equals the cost of managing the priority queue, since each operation
on the queue costs O(log n), and a constant number of operations are
performed for each removed vertex. Therefore, the total time complexity
of the compression algorithm in this case is O(n log n).
The selection criterion affects the quality of the intermediate triangulations
obtained from an interrupted bitstream (i.e., the ratio between
accuracy and number of vertices used), and thus the efficiency of the
sequence for progressive transmission. In other words, if the bitstream
is interrupted after k vertices, the approximation error of the currently
reconstructed TIN is either larger or smaller, depending on the policy
used within the compression algorithm for selecting vertices that must
be removed. One can trade-off the complexity of the selection procedure
with the quality of the compressed sequence.
Other possible techniques for vertex selection, different from the one
described above, have been discussed and experimented in [5]. Such
alternative methods include the selection of a maximal set of independent
vertices of bounded degree at each time, still based on an error-driven
criterion, and the random selection of a maximal set of independent
vertices (which runs in O(n), but gives poor quality of intermediate
triangulations in the bitstream).
Table
III. Length of the bitstream with the three encoding algorithms
terrain algo #bits bits/vert max deg avg deg
Devil Peak IR 1127k 29.58 11 5.64
Devil Peak IE 1125k 29.53 11 5.62
Devil Peak SE 1159k 30.42 11 5.97
Mount Marcy IR
Mount Marcy IE 449k 27.43 11 5.58
Mount Marcy SE 462k 28.22 11 5.89
San Bernardino IR 450k 27.50 11 5.61
San Bernardino IE 450k 27.50 11 5.60
San Bernardino SE 465k 28.39 11 5.95
Table
IV. Number of vertices which must be decoded to obtain a TIN within
a certain approximation error (expressed as a percentage on the heigth range
of the data set), with the three encoding algorithms.
Devil Peak IR 33766 29473 22385 13515 4060 1349
Devil Peak IE 30845 26113 18525 10086 2830 925
Devil Peak SE 32566 29154 20910 10512 2483 805
Mount Marcy IR 12323 9049 5578 3205 1368 818
Mount Marcy IE 10540 7278 4168 2378 936 527
Mount Marcy SE 10022 7037 3915 2068 692 230
San Bernardino IR 13302 11836 9863 7389 3414 1296
San Bernardino IE 12083 10613 8660 6070 2579 1296
San Bernardino SE 11222 10613 7311 4849 1965 657
We experimented three different encoding algorithms on three terrains
(datasets courtesy of the U.S. Geological Survey). The characteristics
of the three TINs are summarized in Table II. Tables III and IV
show the results. The method denoted as IR removes a maximal set of
mutually Independent vertices chosen in a Random way; IE removes a
maximal set of mutually Independent vertices chosen in an Error-driven
removes a Single vertex chosen in an Error-driven way. In all
cases, the bound on the degree of vertices to be removed is
Compressing Triangulated Irregular Networks 21
All heuristics give a bitstream length close to the theoretical bound:
it is slightly lower for methods that remove independent vertices, and
slightly higher for the method that removes a single vertex. Method IR
needs more vertices to be decoded in order to achieve a given precision
in the resulting TIN, with respect to error-driven methods IE and SE.
At low resolution, SE always outperforms the other two heuristics, and
generally behaves better than IE in most cases.
The decompression algorithm works in linear time, since n vertices
are read, and the insertion of any vertex v into the current triangulation
involves a search for t v in the star of a vertex w of degree bounded by
b, and a number of flips bounded by b \Gamma 1, with b a predefined constant.
Note that no numerical computations are needed in reconstructing the
TIN.
4.3. Discussion
The main advantage of our method is in being more general and flexible
than other progressive methods [12, 13, 17]. In fact, it does not impose
any specific criterion for removing vertices and for retriangulating after
vertex removal. It can incorporate different criteria for choosing the
vertices to remove, trading off between compression time and quality
of the intermediate meshes. The only constraint is on the maximum
degree of removed vertices (similar to Hoppe's). Hoppe does not take
into account the approximation error when selecting the next edge to
collapse. Also, Snoeyink and Van Kreveld do not select vertices with an
error-based criterion; moreover, deleting independent sets of vertices at
once puts a strong constraint, hence reducing adaptivity: the number of
vertices necessary to achieve a given approximation error may be much
higher.
In our approach, the specific criterion used for retriangulation is
encoded in the bitstream itself rather than being predefined. On the
contrary, [17] is restricted to Delaunay triangulations and [12, 13] to
triangulations obtainable through edge collapse (for instance, it cannot
guarantee a Delaunay triangulation at each step).
Our method is less compact than those in [12, 13] and [17]. Disregarding
the cost of the initial triangulation, which is always very small,
our method produces n(dlog ne bits of connectivity in-
formation. Hoppe's method requires n(log n bits. For
method costs 21n (23n) bits, while
our bitstream requires about 28n (30n) bits. Thus our method has an
overhead of about 30% with respect to Hoppe's with the advantage of
encoding more general TINs (e.g., Delaunay, data-dependent, etc.) and
22 Leila De Floriani, Paola Magillo, Enrico Puppo
of being based on vertex removal/insertion, which is probably the most
common technique used in GIS for terrain simplification.
The bitstream of [17] describes connectivity in just O(log 2 n) bits;
no experimental results are known. However, their decoding algorithm
involves heavy numerical calculations, which are time-consuming and
subject to floating point inaccuracies; our method does not perform any
numerical computation in decoding.
5. Concluding Remarks
We have proposed two new methods for compressing TINs. The first
method is a direct method based on traversing a TIN in a shelling order.
It sends each vertex once, and produces less than 4:5 bits of connectivity
information for each vertex, which is advantageous with respect to other
methods [3, 8, 9, 19]. Moreover, the adjacency relations between triangles
are reconstructed directly from the bitstream at no additional processing
cost. Because of this property, it is better suited to TIN analysis than
methods based on strips (which are essentially optimized for rendering
purposes).
The main advantages of this compression technique are the following:
it provides triangle adjacency information, it is conceptually simple and
easy to implement, and it gives good compression rates.
The algorithm proposed in [19], although more complicated than ours,
has similar features: it works expanding a polygon through a TIN and
provides triangle adjacency information. In [19], Touma and Gotsman
achieve improved compression rates by further compressing the bit-stream
through entropy encoding and run-length encoding. A similar
signal compression strategy can be applied to the sequence generated
by our shelling-based algorithm as well. We plan to test such possibility
in the near future, and we believe that this could lead to improvements
in compression rates comparable to those of [19].
Here, we have proposed our compression method for extendably shellable
triangle meshes and we have applied it to TINs. The method can be
extended to triangle meshes that are not extendably shellable. If the
input mesh, representing a free-form surface in space, is not extendably
shellable, then it is automatically partitioned into shellable patches and
each patch is encoded independently. This adds just a small overhead due
to the replication of vertices that belong to more than one patch. Based
on a similar principle, the method also extends to higher dimensions
to compress tetrahedral meshes which, in general, are not extendably
shellable. In this case, the number of possible control codes and, thus,
the number of bits to represent them, increases: four bits are needed to
Compressing Triangulated Irregular Networks 23
compress tetrahedral meshes. Some results on generic triangle meshes
and on tetrahedral meshes can be found in [15].
The second method belongs to the class of compression methods
providing progressive approximations for a TIN. It allows transmission
of a TIN according to criteria related to the approximation error of the
terrain representation. It is more flexible than Hoppe's method [12, 13]
since it can deal with Delaunay triangulations, and it has a broader
applicability than the one by Snoeyink and van Kreveld [17], since it
can deal with data dependent and constrained Delaunay triangulations.
On the other hand, it is just a little more expensive than Hoppe's method.
From the encoded bitstream a multiresolution model of a TIN, the Multi-
Triangulation, can be constructed, which makes it possible to perform
terrain analysis at variable resolution [6]. It applies to generic surfaces
in space, other than TINs. We are currently studying an alternative
encoding scheme for the flip sequence that might be more compact and,
furthermore, be easily reversed in order to manage dynamic processes
in which a mesh can be either refined or coarsened on-line.
We have shown experimental results for the first method, while the
second one is currently under implementation. Compression algorithms
with different error-driven selection techniques have been experimented
already in [6].
Acknowledgements
This work has been developed while Leila De Floriani was visiting the
University of Maryland Institute for Advanced Computer Studies (UMI-
her research has been supported by National Science Foundation
(NSF) Grant "The Grand Challenge" under contract BIR9318183.
This work has been partially supported by the Strategic Project of
The Italian National Research Council "Symbolic Computation - Systems
for Geometric Modeling" under contract number 97.04800.ST74.
--R
Time/space tradeoffs for polygon mesh rendering.
Shellable decompositions of cells and spheres.
Optimized geometry compression for real-time rendering
Simple traversal of a subdivision without extra storage.
Building and traversing a surface at variable resolution.
Compressing TINs.
Geometry compression.
Optimizing triangle strips for fast rendering.
Randomized incremental construction of the Delaunay and Voronoi diagrams.
Survey of surface simplification algorithms.
Progressive meshes.
Efficient implementation of progressive meshes.
A drop heuristic conversion method for extracting irregular networks from digital elevation models.
Spatial Operations on Multiresolution Cell Complexes.
JPEG, Still image compression standard.
Geometric compression through topological surgery.
Triangle mesh compression.
--TR
--CTR
Sebastian Krivograd , Mladen Trlep , Borut alik, Compression of triangular meshes by simultaneously processing pairs of triangles, Proceedings of the 21st spring conference on Computer graphics, May 12-14, 2005, Budmerice, Slovakia | geometric compression;data structures;triangulated irregular networks;terrain modeling |
594830 | Progressive Transmission of Vector Map Data over the World Wide Web. | Within distributed computing environments, access to very large geospatial datasets often suffers from slow or unreliable network connections. To allow users to start working with a partially delivered dataset, progressive transmission methods are a viable solution. While incremental and progressive methods have been applied successfully to the transmission of raster images over the World Wide Web, and, in the form of prototypes, of triangular meshes, the transmission of vector map datasets has lacked a similar attention. This paper introduces a solution to the progressive transmission of vector map data that allows users to apply analytical GIS methods to partially transmitted data sets. The architecture follows a client-server model with multiple map representations at the server side, and a thin client that compiles transmitted increments into a topologically consistent format. This paper describes the concepts, develops an architecture, and discusses implementation concerns. | Figure
1: Roads belonging to different layers.
In the second case, the file is composed of a single layer and entities having different
semantic and thematic meaning coexist in it. In this case, it is assumed that the original
composing set of entities has been overlayed, i.e., there are no intersections between pairs
of entities stored in the file.
paper mill
river
major road
lake
creek
minor roadA
minor roadB
(a)
paper mill river lake
creek creek mouth
major road
bridge intersection AB
minor roadA minor roadB
(b)
Figure
2: (a) A collection of spatial entities with the following pairwise intersections:
minor road A and minor road B; creek and (the boundary of) lake; river and major road;
(b) an overlay algorithm has been applied to the set of entities in (a).
For example, in Figure 2(a) a map is shown where intersections between entities occur. In
order to obtain an overlayed set, some entities must be added to the vector file storing the
map, namely the intersection point between minor road A and minor road B (intersection
AB), the intersection point between creek and lake (creek mouth), and the intersection
region between river and major road (bridge). Such a file, shown in Figure 2(b), can be
generated by applying an overlay algorithm to the set of entities in Figure 2(a) (Bentley
and Ottman 1979, Chazelle and Edelsbrunner 1992).
Overlay operations are always required when a query involving entities whose thematic
information is stored over two or more different layers must be performed. For example,
given a layer representing the hydrography of Italy and a layer describing the set of
Italian regions, we may want to perform queries such as, ?Which regions are traversed by
the river Po?? Map overlay is a complex operation and it is computationally expensive.
Thus, if the purpose of the vector file utilization is querying, it is more convenient to keep
an already overlayed set of entities instead of performing an overlay operation every time
a query is formulated. In the case of progressive transmission, if the client requires the
downloading for query purposes, he more likely expects to be provided with a ready-to-
use file instead of having to perform expensive preprocessing operations on it, such as
map overlay.
On the other side, keeping separated thematic layers in the same file prevents
segmentation of entities. For instance, each road in Figure 1 is fragmented into two
branches after the detection of the intersection point, if the overlayed approach is
adopted. This splitting is not necessary if two distinct layers, one for major roads and one
for minor roads, are maintained. Using this second approach, a smaller amount of entities
is stored. Furthermore, a higher degree of granularity in the transmission can be obtained.
With reference to the above example, the major road network and the minor road network
can be extracted from the file and transmitted separately, even if they are included in the
same level of detail. In conclusion, the adoption of either the overlayed or the separated
layers approach depends on whether the priority is mainly querying or visualization,
respectively.
In this paper, we consider vector files composed of a single layer of overlayed entities
composing a map. In this case, the most commonly used mathematical model is the cell
complex. We describe this concept in the next section.
2.3.2 Cell-Complexes
Cell complexes are commonly used as underlying mathematical models for vector maps
(Bertolotto et al. 1994; Egenhofer et al. 1989; Frank and Kuhn 1986; G ting and
Schneider 1995; Worboys 1992) as they provide a sound theoretical basis for the
formalization of spatial entities and relations contained in a map.
More formally, we define a map as an overlayed set of points, simple lines and (possibly
multiply connected) regions. A (Euclidean) cell complex is defined as a collection of
cells that are homeomorphic to disks. Each cell has a dimension and its boundary is
composed of cells of lower dimension. Pairs of cells in the complex are either completely
disjoint or they meet along their boundary. A complex is said to be n-dimensinal if n is
the maximum dimension of its cells.
The correspondence between entities in a map and cells in a two-dimensional cell
complex is straightforward: cells in a cell complex describe entities of a map. Points are
represented as 0-cells, lines as 1-cells, and regions as 2-cells. The interior and boundary
properties of cells in a cell complex model topological relations among entities in a map
(see Bertolotto (1998) for a more detailed description).
Several data structures for cell complexes have been defined in the computational
geometry and GIS literature (De Floriani et al. 1993; Frank and Kuhn 1986; Preparata
and Shamos 1985). In particular, topological data structures must encode both entities
and their mutual topological relations (Egenhofer and Franzosa 1991).
3. Challenges in Progressive Vector Map Data Transmission
As shown in the previous section, progressive transmission of raster data is relatively
simple. For example, if the purpose of the transmission is visualization, just adding pixels
to an incomplete image generates a more refined version of it. Available compression
mechanisms are also very effective.
When the purpose of the transmission is object manipulation, a vector representation is
required. Except for the particular case of triangular meshes for which effective
compression methods have been defined (see previous section), progressive vector
transmission is still challenging. Our focus is on vector map data, for which effective
compression mechanisms are currently lacking. Indeed, the set of spatial objects that need
to be represented in a map depends on its level of detail. In this context, the term detail
refers both to the amount of entities contained in the file and to the information stored
about such entities, e.g., their geometry (Goodchild and Proctor 1997). Therefore,
changes of detail can be caused by the addition or elimination of some entities, as well as
by the refinement or coarsening of the representation of existing entities (e.g., change of
dimension or shape).
Decreasing the level of detail of a vector map is a complex and time-consuming process
called generalization whose automation and on-line application are still open
problems. In fact, it relies on cartographic principles whose complete formalization is still
lacking (see Weibel and Dutton (1999) for a survey). Automated solutions have only
been proposed for sub-problems and are based on heuristic methods (e.g., the Douglas-Peucker
algorithm (1973)). Therefore, the process still requires interaction between semi-automatic
solutions and expert cartographers.
A critical issue in map generalization is preservation of consistency (e.g., constraints on
overlappings) while decreasing the level of detail (Robinson et al. 1984; McMaster and
Shea 1992; M?ller et al. 1995; Weibel and Dutton 1999). For example, random
subsampling of objects to be eliminated or to be simplified does not usually generate a
consistent representation at coarser detail. In Figure 3 and 4, examples are shown where
random subsampling generates topological inconsistencies across different
representations.
paper mill river lake
creek creek mouth
major road
bridge intersection AB
minor roadA minor roadB
paper mill river lake
creek creek mouth
major road
bridge intersection AB
minor roadA minor roadB
Figure
3: Random elimination of some entities (e.g., bridge) results in topologically
incorrect representations: the two branches of major road and river have incomplete
boundaries.
paper mill river lake
creek creek mouth
major road
bridge intersection AB
minor roadA minor roadB
paper mill river lake
creek creek mouth
major road
bridge intersection AB
minor roadA minor roadB
Figure
4: Selection of a random subset of entities, namely, major road and river (but not
bridge), to coarsen their representation generates a topologically incorrect representation:
topological relations between major road and bridge (and between river and bridge) are
not consistent across levels.
Consistency is an essential property for the usability of data (e.g., for analysis and
querying purposes). Therefore, ad hoc techniques and operators need to be applied.
Unfortunately, the majority of proposed methods do not intrinsically provide consistency
and thus a posteriori checks are required in order to adjust the result when some
inconsistency has been introduced.
During progressive transmission, consistent datasets need to be transmitted to the client
site, where there is no way to discover inconsistencies. Thus, consistency must be
checked for on the server site either implicitly by adopting generalization operators that
preserve it or by means of a posteriori checks on the generalized datasets.
In the following section we propose a solution to progressive vector map data
transmission.
4. A Client-Server Architecture for Progressive Vector Transmission
In this section we present a distributed client-server architecture that enables progressive
transmission of vector data. This work extends our previous research on progressive
vector transmission presented in Bertolotto and Egenhofer (1999). The solution we
propose meets the architectural requirements for the design of contemporary information
systems, involving both heterogeneity of data and processes. In fact, as different tasks are
better performed by different system components, distributed environments represent the
natural direction for which future generation systems are heading. This direction is in
accordance with the exponential network growth and the global connectivity reached in
the last few years. As a consequence, and thanks to the technological improvements
recently obtained, some of the old systems and, in general, newly developed systems, are
being redesigned and embedded into distributed environments (see, for example,
Hofmann (1999); Kramer et al. (1997); Kumar et al. (1999)).
To enable the progressive transmission of vector files, we pre-compute and store a
sequence of consistent representations at lower levels of detail on the server site. Such
representations are transmitted in order of increasing detail to the client upon request
Figure
5).
level 4
level 4 level 3 level 3
level 2
level 1
client server
Figure
5: Representations at different levels of detail are maintained on the server and
transmitted to the client in order of increasing detail.
Besides providing temporary versions of the data on which preliminary operations can be
performed, in this way, the user can realize during the process that the detail of the
currently displayed representation is good enough for her purpose and so she can decide
to interrupt the downloading of more detailed representations (stored in larger files).
Therefore, both time and disk space can be saved.
An interesting property of some techniques for progressive transmission of raster data
(e.g., interleaving techniques) is the fact that they only transmit increments (i.e., sets of
new pixels) at each step. Such increments are added to the currently displayed image to
improve its resolution without requiring the transmission or downloading of another
complete image file.
Since vector files can be very large, it would be useful to speed up the transmission in a
similar way to reduce network traffic. However, increments between two consecutive
levels of detail of a vector dataset can be complex sets of entities that are added to the
level at finer detail to refine the representation of a set of entities at the lower level. The
integration of such increments with the currently downloaded or displayed representation
is a non-trivial task if consistency between different representations must be preserved.
From a purely graphical point of view, a major requirement for spatial analysis consists
of providing a method for combining the results of several queries into a unique graphical
representation. Therefore, the system should allow the addition or elimination of
representation layers from the current display. However, in the case of progressive
transmission, the user may be interested in more than a visual inspection of the data. She
may want to analyze and work with a consistent dataset. A vector file is usually
composed not only of a set of points, lines, and polygons, but also of a set of spatial
relations linking such entities. Thus, suitable overlaying and integration techniques must
be applied not only at the graphical level, but also at the data level to include the
computation of spatial relations between newly introduced entities and preserved entities
(see Section 8.2).
Our solution for progressive vector map transmission relies on a distributed client-server
architecture, with a server provided with methods for building, manipulating, and
transmitting a sequence of map representations at different levels of detail; and a thin
client provided with a set of operations for visualizing as well as updating and integrating
the transmitted levels.
In summary, the following functionalities are required:
? on the server site: a preprocessing task must be performed in order to build a
sequence of map representations at different levels of detail, as well as a progressive
transmission technique must be developed to send the different levels one at a time;
and
? on the client site: a mechanism must be built in order to have different graphic layers
so that the displayed representation is complete at each step (corresponding to the
transmission of a given level of detail), and an integration algorithm must be
developed and implemented for reconstructing the dataset corresponding to the
displayed representation.
Thus, the major issues involved in the process are:
? the definition of a model for consistent multiple map representations;
? the definition of a transmission technique;
? the development of a graphic interface and a dynamic visualization tool for displaying
different layers corresponding to different levels of detail (during transmission); and
? the development of algorithms to compile transmitted increments into a topologically
consistent format for the reconstruction of intermediate levels of detail.
In this paper, we deal with modeling aspects involved in progressive vector map
transmission, disregarding the mainly graphical issues. In particular, in next section we
describe a model for multiple map representations.
5. Multiple Map Representations for Progressive Transmission
In this section we describe a model that was initially presented in Puppo and Dettori
(1995) and then further formalized in Bertolotto (1998). The model consists of a
sequence of map representations of a given area, each corresponding to a different level
of detail. Such sequence can be stored on the server and sent progressively to the client
upon request (as described in Section 4). In Bertolotto (1998) a set of generalization
operators have been defined and shown to be minimal and sufficient to generate
consistent transformations of maps. Only topological changes (e.g., changes of
dimension, complexity, etc.) are possible by applying such operators: metric and
semantic changes are not being taken into account. An example of topological changes in
a map is shown in Figure 6.
river river
bridge
Figure
Topological changes between two different levels of detail in a map: at higher
level (left) the river is represented as a region split into two branches by a bridge
(represented as a line); at lower level (right) the bridge is not represented and the set of
entities representing the river are reduced to a single line.
The set of operators defined is the following:
contraction of an open line (including its endpoints) to a point
Figure
7(a)).
Region contraction: contraction of a simply connected region (with its boundary) to
a point (Figure 7(b)).
Region thinning: a region (and its bounding lines) is reduced to a line (Figure 7(c)).
? Line merge: fusion of two lines sharing an endpoint into a single line (Figure 7(d)).
Region merge: fusion of two regions sharing a boundary line into a single region
Figure
7(e)).
elimination of an isolated point inside a region (Figure 7(f)).
elimination of a line inside a region (Figure 7(g)).
(a) (b) (c)
(d) (e)
Figure
7: Generalization operators.
These operators have been formalized by means of functions between the cell complexes
describing the original and the resulting map (Bertolotto 1998).
For example, in Figure 7(a), if l is the line on the left, p?and p??are its endpoints, and p
is the point on the right, the line contraction operator is formalized by the function
lc:C? C?, where C and C' are cell complexes, such that:
lc(p?)=lc(p?)?l=c(l) =p (1)
and
"e?C,e?p?,p?,?l,lc (e)= e (2)
Equation (2) states that all entities in C other than l, p?and p??are preserved.
Furthermore, constraints on mappings of topological relations must be fulfilled. For
instance, all lines in the map having an endpoint in either p?or p??are transformed into
lines of C?having an endpoint in p. A complete description of such constraints can be
found in Bertolotto (1998).
Contractions and thinning operators correspond to a decrease of dimension for a group of
entities, merge operators group two entities of the same dimension into a single one,
while abstraction operators correspond to the elimination of some lower-dimensional
entity from a region. These operators are called atomic, because they perform minimal
changes, i.e., they modify minimal sets of entities and preserve the others. By composing
functions corresponding to such operators, complex map transformations can be defined.
As outilined in Section 3, in the case of progressive transmission between two remote
sites, the preservation of consistency is a major issue, and it must be guaranteed by the
server as the client has no way to control it. When the previously described operators are
used, consistency is automatically guaranteed. In fact it has been shown that they
represent a minimal and sufficient set of functions that generate (by composition) only
consistent transformations for decreasing the level of detail of a map (Bertolotto 1998). In
particular, they allow to generate all map transformations that preserve the boundary of
entities and whose inverse image preserves connectivity (i.e., they do not allow to model
aggregation of non-connected entities3). Topological relations are thus consistently
transformed. Therefore, all multiple representation sequences built on the basis of such
operators are intrinsically consistent.
The model for a multiple representation sequence can be formalized as follows: let M bethe map at higher level of detail (stored on the server) and let f1, f2,., fk be an ordered
sequence of map transformations, i.e., a sequence of functions obtained as compositions
of atomic operators; let f1: M0?M1, f2: M1?M2,., fk: Mk-?1 Mkbe such that
f=fkfk-1. f2f1: M0?Mk
is a transformation of maps. The sequence M0 ,., Mk is composed of maps corresponding
to less and less detailed representations of the same area, and it is called a multiple
representation sequence (see Figure 8 for an example).
Figure
8: A multiple representation sequence with three levels of detail.
3 The formalization of aggregation of disjoint entities is traditionally a difficult issue, as this operation
might generate semantic and topological inconsistency. A tentative solution generates a fictitious ?shell?
containing the entities to be aggregated. However, this method has the drawback of forcing an arbitrary
partition (Dettori and Puppo 1996).
6. Encodings for Efficient Transmission
The efficiency of the model presented in Section 5 can be improved by defining
encodings that avoid redundancy between levels and by adding to it intra-level links to
allow navigation and browsing across levels. These issues are discussed in Section 6.1
and Section 6.2.
6.1 Data Structure
An important issue relates to the efficient storing of multiple map representations. Some
entities are preserved throughout the levels. Such entities should be stored only once in
the sequence instead of redundantly encoding them at each level. If such representations
are to be transmitted through the Web, reducing the amount of information to be
exchanged is highly useful. A straightforward way to avoid redundancy is storing the
entire set of entities only for the coarsest level, while all subsequent levels just record
newly introduced entities and more refined representations of entities present in previous
levels (i.e., the increments). This way transmission is also sped up; however, by not
storing the complete set of entities corresponding to each transmitted level, the problem
arises of defining algorithms for reconstructing the vector file corresponding to an
intermediate level, once the transmission has been terminated, to use, manipulate, and
query it. The problem lies in the computation of the spatial relations between newly
introduced entities and preserved entities. This problem does not occur if the purpose of
the transmission is just visualization. In such a case, only techniques for overlaying
graphical layers are necessary.
In the following we describe a structure for encoding a sequence M0 ,., Mk of multiple
representations in which entities are stored only once to avoid unnecessary duplications.
Such a structure is defined inductively on the basis of the inverse image of entities inside
each map (Puppo and Dettori 1995). More formally, for 1 ?i?k, given a submap Mi, j of a
map Mi , we consider each entity e of Mi, j such that its inverse image through fi contains
more than one entity in Mi-1 , i.e., e is not a preserved entity, its representation is more
detailed in Mi-1 . Mi-1,p= fi-1(e) is a submap of Mi-1 . The set of submaps of Mi-1
corresponding to all inverse images of entities in Mi that contain more than one entity
form level i-1. In this way, the map at the coarsest level (i.e., Mk ) is completely stored,
while only increments are stored for intermediate levels. In Figure 9 we show an example
of this encoding structure for the multiple representation sequence of Figure 8. Note that
entities that are preserved across different levels are represented only at the coarsest level
in which they appear (they are drawn as dashed in the intermediate levels in which they
are not stored explicitly).
Figure
9: An example of encoding structure for the multiple representation sequence of
Figure
8.
6.2 Adding Intra-Level Links
In this section we enrich a multiple representation sequence with links that connect
different representations of the same entities at different levels. We call such links intra-level
links or vertical links, since they provide the sequence with a hierarchical structure.
Keeping intra-level links facilitates the reconstruction of a representation at a given level
of detail and it allows us to know which are the entities that are being modified at
subsequent levels and which ones are preserved.An example of intra-level links joining
different representations of a river and a bridge at different levels in a multiple
representation sequence is shown in Figure 10.
level 3 river
level 2 river
bridge
river
level 1
bridge
Figure
10: Intra-level links joining different representations of a river and a bridge in a
multiple map representation sequence.
Intra-level links also allow for hierarchical spatial reasoning. In particular, in a querying
environment, the user can be interested in retrieving information at different detail.
Although a lower level of detail can be sufficient for processing a given query,
sometimes a more detailed answer is required. Maintaining intra-level links allows for
efficient navigation and browsing across the levels without having to query entire levels.
A query is initially performed at the lowest level and the result can be evaluated
according to a given user-defined criteria. If the outcome of the evaluation is satisfactory,
there is no need to query against a more detailed dataset. Otherwise, the intra-level links
are followed in order to find a satisfactory answer. Usually only links between entities
that belong to consecutive levels are kept. By combining them, also links between non-consecutive
levels can be obtained.
For the model described in Section 5, links between entities in consecutive levels are
formalized by means of the transformation functions defining the sequence (obtained as
compositions of atomic operators). Such functions perform generalizations of maps. The
inverse operation, i.e., the refinement of maps, can be formalized by ?inverting? such
functions. Although these functions are not injective, in Bertolotto (1998), the inverse
image of an entity in the co-domain of atomic generalization functions between cell
complexes representing maps has been characterized in such a way that an entity can be
refined through a small number of operations. Let p, l, and r denote a point, a line and a
region, respectively. It has been shown that the inverse image of a region can only be one
of the following sets:
? {r,r?,l} (i.e., the domain of operator region merge),
? {r,p} (i.e., the domain of operator point abstraction),
? {r,l} (i.e., the domain of operator line abstraction).
The inverse image of a line can only be one of the following sets:
? {p,l,l?} (i.e., the domain of operator line merge),
(i.e., the domain of operator region thinning).
Finally, the inverse image of a point can only be one of the following sets:
? {r,l,p} (i.e., the domain of operator region contraction),
(i.e., the domain of operator line contraction).
Therefore, we can define the inverse of generalization operators (defined in Section 5) as
follows:
? Point-region expansion: expansion of a point into a region (with its boundary)
p? {r,l,p?} (3)
expansion of a point into a line (with its endpoints)
p? {l,p?,p?}? (4)
? Line-region expansion: expansion of a line into a region (with its boundary)
l? {r,l?,l?}? (5)
splitting of a line into two lines sharing an endpoint
l? {l?,l?,?p} (6)
Region split: splitting of a region into two regions sharing a bounding line
r? {r?,r?,?l} (7)
insertion of an isolated point inside a region
r? {r?,p} (8)
insertion of a line inside a region
Basically, the inverse operations of contractions and thinning are expansions of an entity
into a set of entities including some higher dimensional entity. The inverse of merging is
splitting an entity into two entities of the same dimension, while the inverse of
abstracting an entity from a region is the insertion of an entity inside a region.
As for generalization operators, these refinement operators only perform minimal
changes. Thus, for example, in the line split operator, endpoints of line l are mapped onto
the corresponding endpoints of lines l?and l??(Figure 11).
p" p"
l"
l p
l'
p' p'
Figure
11: Endpoints of line l are preserved by line split.
On the basis of refinement operators, i.e., by considering inverse images of entities, we
enrich the model defined in Section 5 and encoded by means of the structure defined in
Section 6.1 with intra-level links. The resulting model has a tree-like organization. The
root is the map at the coarsest level of detail Mk . Each submap Mi-1,p that corresponds to
the inverse image of some entity e belonging to a submap Mi, j at level i in the sequence
is stored as a node and is called a child of M . An arc between M and M is
established and labeled e. The child relationship represents the refinement of a submap,
while the parent relationship represents generalization of a submap.
In
Figure
12 the example of Figure 9 has been enriched with intra-level links.
e
e"
Figure
12: Adding intra-level links results in a tree-like structure. Arcs are labeled with
the corresponding refined entities.
In the following section, an example of a multiple representation sequence and its
efficient encoding is described.
7. An Example
In this section, we describe an example of a multiple representation sequence with four
levels of detail (Figure 13). The coarsest level (level 4) contains the hydrographic map of
a given geographic area. This level includes the following set of entities {river, creek,
paper mill, lake, creek mouth}, such that river and creek are represented by lines, paper
mill and creek mouth (i.e., the intersection between creek and lake) are points, and lake is
a region. In level 3, the road network covering the same area is also represented: major
road, minor road A, minor road B, intersection AB, and bridge are added. The first three
entities are represented by lines. Intersection AB is the intersection point between minor
road A and minor road B, while bridge is the intersection point between major road and
river. Therefore, minor road A, major road and river are represented at this level as lines
split into two segments. Level 2 corresponds to a refinement in the representation of
paper mill, that is now a region, river, for which the thickness is shown (in both the
branches composing it), and bridge, that is now a line. All other entities are preserved,
i.e., their representation at this level does not change. Finally, the fully detailed map at
level 1 refines the shape of paper mill and shows the thickness of the two segments of
line that comprise major road, thus implying a transformation of bridge from line to
region.
In order to build such a sequence of representations to be stored on the server site, we
apply the generalization operators described in Section 5. For example, to obtain level 3
from level 2, the following operators are applied:
region thinning of river,
line contraction of bridge, and
region contraction of paper mill.
Figure
14 illustrates the structure described in Section 6.1 for the efficient encoding of
the multiple representation sequence of Figure 13. The set of entities in level i (for
corresponds to the increment with respect to level i+1. Entities that are present
at both level i+1 and i, and whose representation is refined at level i, are highlighted at
level i. An example is provided by river, that at level 4 is represented by a single line,
while at level 3 is composed of two segments joined by bridge.
Level 4 is completely represented, i.e., all entities together with their spatial relations are
stored in the encoding structure. For instance, the information that creek mouth is an
endpoint of creek is maintained. The set of spatial relations that are explicitly stored
depends on the particular data structure adopted to encode each map in vector format
(e.g., the extended DCEL structure defined in De Floriani et al. (1993)). Among the
entities present at level 3, only river (fragmented into two segments) and the newly
introduced entities (major road, bridge, minor road A, minor road B, and intersection
are encoded, as well as their spatial relations. At level 2, the only changes are the
refinement of paper mill, river and bridge. Only these entities and their relations are
represented. Similarly, at level 1, the encoding structure includes just paper mill, bridge
and the two segments composing major road. Intra-level links are also maintained
between different representations of the same entities at consecutive levels.
paper mill lake
river creek creek mouth
level 4
paper mill
lake
river creek creek mouth
major road level 3
intersection AB
bridge
minor road A
minor road B
paper mill
lake
river creek creek mouth
major road
bridge intersection AB
minor road A
minor road B
level 2
paper mill
lake
river creek creek mouth
major road
intersection AB
bridge
minor road A
minor road B
level 1
Figure
13: A multiple map representation sequence with four levels of detail.
paper mill lake
river creek creek mouth
level 4
river
level 3
major road
intersection AB
bridge
minor road A
minor road B
paper mill
river
bridge
level 2
paper mill
major road
bridge
level 1
Figure
14: Efficient encoding of the sequence represented in Figure 13.
8. Discussion and Implementation Issues
In Section 5 we have described a model for multiple map representations that can be used
for progressive transmission of map data over the WWW. The model is built on the basis
of a set of operators that perform topological changes on a map. Although such operators
have the interesting property of preserving topological consistency, they only modify the
topology of the map. However, in real implementations also changes in the geometric
shape of objects are commonly required, such as simplifications of lines (Douglas and
Peucker 1973). We are currently investigating the possibility of extending our model to
include this kind of operations. Changes depending on the semantic of objects should also
be allowed. The incorporation of semantic aspects is another goal of our current research.
A model for generating multiple map representations based on the Douglas-Peucker
algorithm and used for progressive transmission over the WWW has been described in
Section 2.2 (Buttenfield 1999). However, such a model has the drawback of not
guaranteeing the preservation of consistency. Furthermore, it only deals with line
simplification operations and does not allow other kinds of commonly used map
generalization operations (McMaster and Shea 1992).
Finally, as underlined in Section 2, a well known question related to the generation of
multiple map representations is the following: ?How many and what are the levels of
detail to be generated and stored?? The answer to this question strongly depends on the
application and on the particular task. For an implementation of our model, we plan to
analyze typical queries from different application fields to detect what the best levels of
detail are to provide satisfactory answers. Also, as underlined by Buttenfield (1989), it is
possible to detect the range of resolution at which some geographic processes become
evident. Such considerations will help decide what levels of detail need to be stored on
the server site.
In the following sections we discuss in more detail issues related to the implementation of
the model for progressive transmission proposed in this paper. In particular, we consider
the data transmission technique adopted (Section 8.1) and the reconstruction of datasets
corresponding to intermediate levels of detail downloaded on the client site (Section 8.2).
8.1 Transmission of Different Levels of Detail
In the solution we propose, the process of transmitting a multiple representation sequence
between two remote sites presents a few critical points. We assume to have a dataset d on
the server and a sequence of multiple representations of d corresponding to k levels of
detail, such that the higher the level, the less detailed the representation. We denote such
sequence by mr(d,k). We consider a transmission model in which the user is attempting to
download progressively the dataset d. Each level of detail corresponds to a separate
package. As described in Section 4, the process starts with the server transmitting the
representation corresponding to the first level of detail (i.e., the coarsest). We can
formalize such process by means of a binary operation t that takes a sequence mr(d,k) and
an integer i, with 1 performs the transmission of the representation
corresponding to level i in the sequence. Thus, the first step in the transmission process
can be denoted by
Upon completion of the transmission of the first package, the server continues the
transmission of the subsequent representations in order of increasing detail until the user
decides to stop the process. We indicate this sequence of steps with
In order to avoid unnecessary repetitions for storage saving purposes, in the encoding
structure for the model described in Section 6.1, given a representation corresponding to
a level i (0<i<k) of detail in the sequence, only the entities that have been modified are
stored at level i-1. Not only this model saves space on the server site, but it also speeds up
the transmission to the client site, i.e., it minimizes network traffic. On the server site the
coarsest representation mr((d,k),k) is completely stored, while only portions of the
subsequent representations (increments) are stored in the subsequent levels. Thus, the
size of the transmitted packages is reduced. On the client site, a new buffer is used to
store the increments to be integrated with the previously transmitted representation. From
a graphical point of view, such a buffer can be used as a graphic layer to be superimposed
on the previous one in order to completely display the representation at the new level of
detail. From a more operational point of view, ad hoc integration techniques must be
developed (such as for reconstruction of the topology of the dataset, discussed in next
section).
A further way to increase the granularity of the transmission is to send subparts of the
increments that are topologically disjoint (corresponding to nodes in the tree) as separate
packages. This way, topological consistency is still preserved and even smaller packages
are transmitted. Also, the user would have the possibility to decide to increase the detail
of only some subparts of the map (i.e., to decide to download only the subtrees
corresponding to the interesting areas), thus generating a representation at ?variable?
detail (the so-called selective transmission). Entities belonging to different levels of detail
would coexist in the representation reconstructed on the client site. We are currently
investigating this interesting aspect.
An important issue concerns the transmission of intra-level links. As discussed in Section
6.2, during query processing, multiple representation sequences benefit from the addition
of intra-level links between different representations of the same entity at different levels
of detail. A query is first performed at the coarsest level; if the result is unsatisfactory,
intra-level links can be followed to find a better answer. In this way we do not need to
query the entire following level. Furthermore, as discussed in next section, intra-level
links facilitate the reconstruction of the intermediate levels. Thus, such links must be
encapsulated in the transmitted packages, in the form of pointers, in addition to the new
entities to be displayed in the overlayed buffers. Each transmitted entity maintains a
reference to (the ID of) its parent in the previous level.
8.2 Reconstruction of a Dataset
Once the user at the client site decides to stop the transmission process, because the level
of detail of the currently displayed representation is good enough, the dataset
corresponding to that intermediate representation must be reconstructed. Such a dataset is
not stored explicitly (i.e., as an independent representation level) on the server either.
Thus, on the client site, integration operations are needed to compile a consistent
representation at a given level of detail from the collection of displayed layers.
Operations for deleting entities in the previous layers as well as for adding new sets of
entities (belonging to newer layers) to substitute them are needed on the client site.
Furthermore, spatial relations between newly introduced entities and preserved entities
must be computed. This operation can be very time consuming.
For the hierarchical model we consider, i.e., the sequence of multiple representations
described in Sections 5 and 6.1, enriched with vertical links (Section 6.2), a complete
representation corresponding to a given level of detail can be obtained by means of a visit
of the tree. The visit includes all nodes up to the desired level: entities contained in a
given node are deleted and replaced by the set of entities corresponding to the child of
such node (i.e., its refinement). The visit of the tree can be performed on the client site as
vertical links are transmitted together with increments (i.e., nodes in the tree) in the form
of pointers (as discussed in the previous section).
Due to the intrinsic consistency properties of the model (in terms of preservation of
topology), topological relations between two entities e and e?at level i can be
reconstructed on the basis of relations between entities that are parents of e and e?at the
preceding level.
As an example, we consider the sequence of multiple map representations shown in
Figure
13. Such a sequence is stored on the server and transmitted progressively. For
each transmitted level, the client receives only the increments and the intra-level links. In
this example, only level 4 is completely represented. Therefore, intermediate levels must
be reconstructed on the client site. For instance, to reconstruct level 3 from level 4 and
the increment between levels 4 and 3 (including: the refinement of river; the new entities
bridge, major road, minor road A, minor road B, and intersection AB; and the set of
spatial relations among them), the following operations must be performed:
? the line representing river at level 4 must be substituted by the two segments that
share bridge as an endpoint;
bridge, major road, minor road A, minor road B, and intersection AB must be added
as new entities; and
? the complete set of spatial relations for level 3 are reconstructed in a straightforward
way as union of the set of relations between preserved entities (stored at level 4) and
the set of relations between newly introduced entities (included in the increment
package).
9. Conclusions
This paper discusses the need for progressive vector transmission, by which a user is
provided with coarser versions of the data while she is downloading a large vector file
from a remote site. This process presents inherent challenges. Extracting a consistent
representation at a lower level of detail from a vector map dataset is a complex and time-consuming
operation that cannot be performed on-line during progressive transmission.
A solution is to pre-compute, on the basis of sound cartographic principles, a sequence of
multiple representations of the data to be stored on the server site. Each representation,
corresponding to a different level of detail, is transmitted separately. This solution has the
obvious drawback of requiring preprocessing. However, multiple representations can be
utilized to define structured digital libraries of summaries of geospatial data. Such
organization enables efficient access and manipulation of such data over the WWW.
Our contribution is a solution to vector map data transmission, based on a distributed
architecture. A model generating multiple map representations (Puppo and Dettori 1995;
Bertolotto 1998) that can be used for progressive transmission is described. The model is
built by applying a set of generalization operators that perform atomic topological
changes on vector maps. The defined operators guarantee the preservation of consistency
(Bertolotto 1998), an essential property for the usability of generalized data. Our future
goal is to extend such a model to include metric and semantic aspects as well as to
develop alternative models and to compare them in terms of storage and transmission
costs. The development of efficient encoding strategies plays a central role in this
framework.
In a more general setting, we are planning the design of a heterogeneous and distributed
geographic information system integrating data in different formats (e.g., raster, vector,
and textual) and retrieved from different sources. The system will include distributed
Internet archives in the form of digital libraries of generalized geospatial data for fast and
efficient use. Different formats of the same data will be automatically chosen by the
system to perform different tasks on the basis of efficiency. For example, rasterized
(scanned) versions of maps will be provided to the user for mainly visual purposes while
the corresponding vector versions will be progressively transmitted if actual object
manipulation is required. Several aspects will be integrated in the data including spatial,
temporal and semantic aspects to allow a wide range of operations and analysis.
Another essential requirement of contemporary information systems is related to the
concept of interoperability, i.e., the capability of autonomous systems to exchange data
and to handle processing requests by means of a common understanding of processes and
requests (Sondheim et al. 1999). This can be achieved if common representation models
are used (UCGIS 1996). In GIS, data modeling plays a central role in the framework of
interoperability, as agreement at the representation level is critical for exchanging
geospatial data. Therefore, the design and implementation of our comprehensive Internet-based
archive, will meet interoperability and standardization requirements as defined by
the OpenGIS Consortium (OGC 1996a and 1996b).
10.
--R
http://king.
Fractals Everywhere
Fractal Image Compression: Theory and Application to Digital Images
Digital Image Processing
Generalization in Digital Cartography
(eds.), Taylor and Francis
OGC (OpenGIS Consortium)
Computational Geometry: An Introduction
Elements of Cartography
The Design and Analysis of Spatial Data Structures
Applications of Spatial Data Structures
UCGIS (University Consortium for Geographic Information Science)
--TR
--CTR
Alexander Kolesnikov , Alexander Akimov, Distortion-constrained compression of vector maps, Proceedings of the 2007 ACM symposium on Applied computing, March 11-15, 2007, Seoul, Korea
Qiang Han , Michela Bertolotto, A multi-level data structure for vector maps, Proceedings of the 12th annual ACM international workshop on Geographic information systems, November 12-13, 2004, Washington DC, USA | progressive transmission;multiple representations;vector map data |
594869 | Bayesian Methods for Efficient Genetic Programming. | A Bayesian framework for genetic programming (GP) is presented. This is motivated by the observation that genetic programming iteratively searches populations of fitter programs and thus the information gained in the previous generation can be used in the next generation. The Bayesian GP makes use of Bayes theorem to estimate the posterior distribution of programs from their prior distribution and likelihood for the fitness data observed. Offspring programs are then generated by sampling from the posterior distribution by genetic variation operators. We present two GP algorithms derived from the Bayesian GP framework. One is the genetic programming with the adaptive Occam's razor (AOR) designed to evolve parsimonious programs. The other is the genetic programming with incremental data inheritance (IDI) designed to accelerate evolution by active selection of fitness cases. A multiagent learning task is used to demonstrate the effectiveness of the presented methods. In a series of experiments, AOR reduced solution complexity by 20% and IDI doubled evolution speed, both without loss of solution accuracy. | Table
1. A summary of previous efforts for upscaling genetic programming
Subjects Selected references
Angeline w3x Banzhaf w7x
Bloat Landgon w22x Nordin w27x
Wu w39x Zhang w44x
Blickle w10x Iba w18x
Parsimony Kinnear w19x Rosca w31x
Soule w36x Zhang w44, 45x
Andre w1x Angeline w2x
Modularity Koza w21x O'Reilly w28x
Spector w37x Rosca w32x
Angeline w4x Banzhaf w7x
Operators Chellapilla w11x Koza w20x
Luke w24x Poli w29x
Gathercole w13, 14x Hillis w17x
Subset Schoenauer w33x Siegel w34x
Teller w38x Zhang w40, 42x
This list contains references which are directly related to the present work,
and thus it is far from complete.
produced by the solution. Soule et al. w35xobserve that removing non-functional
codes at every generation does not halt the program's growth. Instead, the
programs generate code which, while functional, is never actually executed.
Similar observations have been made in "biological" evolution. That is, introns
or non-coding segments emerge in DNA as well. Wu and Lindsay w39xgive a recent
review of biological introns. Banzhaf et al. w7xcharacterize introns as having two
salient features: An intron is a segment of the genotype that emerges from the
process of the evolution of variable length structures, and an intron does not affect
the survivability of the individual directly. Introns in GP turned out to be a mixed
blessing. On one hand, they may benefit evolution since they enable a genetic
program to protect itself against the destructive effect of crossover, and allow the
population to preserve highly-fit building blocks w27x. On the other hand, from the
practical point of view, introns usually result in run stagnation, poor results, and a
heavy drain on memory and CPU time w8, 35x.
An explanation for the cause of bloat in GP was provided by Zhang and
Muhlenbein w44x. Based on statistical learning theory, they show that the total error
of genetic programs can be decomposed into two terms attributed to bias and
variance. Since complex models are more expressive and thus better at reducing
the bias error than simple models, GP programs tend to grow until they fit the
fitness data perfectly unless complex models are penalized to reduce the variance
error. Empirical evidence supporting the explanation was given by an analysis of
the distributions of fitness vs. complexity of genetic programs generated by a large
number of GP runs for solving 7-parity problems.
Recently, Langdon and Poli w22xprovide a similar but more general explanation
for bloat. They argue that any stochastic search techniques, including GP, will tend
to find the most common programs in the search space of the current best fitness.
Since in general there are more of these which are long than there are which are
short but GP starts with the shorter ones.the population tends to be filled with
longer and longer programs. Based on this argument, Langdon w23xpresents new
crossover operators that carefully control variation in size and produce much less
bloat.
For the purposes of upscaling genetic programming, there are several reasons for
generally preferring parsimonious programs to complex ones. Parsimonious programs
typically require less time and less space to run. This is particularly
important during the GP process which may need to store and evaluate populations
of hundreds or thousands of programs. When hardware implementation of
GP solutions is in mind, or when GP evolves hardware circuits online "evolvable
hardware"., simple circuits require less hardware resource and execution time than
complex circuits.
In addition, statistical theory says that simpler models are likely to generalize
better on unseen fitness cases. As shown in w44x, when biases are equal, a simple
program has less variance in average than a complex program, resulting in smaller
total error. This is the statistical background behind the principle of Occam's
Razor w43xand the necessity for parsimony pressure in genetic programming.
However, an effective control of program growth is a difficult task, since too much
pressure on parsimony that reduces variance error.may lead to loss of diversity
and thus result in low accuracy greater bias error. The adaptive Occam method
w44xwas presented as a method for striking a balance between accuracy and
parsimony of GP solutions. It adapts the complexity penalty in the fitness function
during a run so that programs of minimal complexity are evolved without loss of
their accuracy. Several researchers support that parsimony pressure is one of the
easiest and effective methods for avoiding bloat w10, 18, 19, 31, 35, 36x.
Controlling program growth is one method for reducing time complexity as well
as space complexity of genetic programming. Another approach to upscaling GP is
by increasing modularity and reusability of programs. Koza w21xintroduces the
automatically defined functions or ADFs. An ADF is a subroutine that is evolved
during a run of genetic programming and which may be called by the main
program that is being simultaneously evolved during the same run. He reports that
GP with ADFs produced more parsimonious solutions and required fewer fitness
evaluation. Angeline and Pollack w2xdevelop an alternative method called module
acquisition MA. Rosca and Ballard w32xpresent mechanisms for adaptive representation
learning ARL.that creates new subroutines through discovery and
generalization of blocks of code. Spector w37xpresents a method for evolving a
collection of automatically defined macros ADMs. He shows that ADMs sometimes
provide a greater benefit than ADFs.
The search process of GP can be made more efficient by designing novel genetic
operators. Traditionally, crossover has been considered as the primary operator
and mutation as the secondary. This view is consistent with the notion that GP is
best made by combining building blocks, as hypothesized in bitstring genetic
algorithms. Koza w20xhas argued that mutations have little utility in GP because of
the position-independence of GP subtrees. However, the roles of building blocks
and of crossover have become increasingly controversial in recent years. Luke and
BAYESIAN GENETIC PROGRAMMING 221
Spector w24xexperimentally demonstrate that mutation can in fact have utility and
that crossover does not consistently have a considerable advantage over mutation.
Banzhaf et al. w6xalso found that increasing the mutation rate can significantly
improve the generalization performance of genetic programming. Angeline w4x
shows that mutation operations can perform on par with subtree crossover and
suggests that the building block hypothesis may not accurately describe the
operational chracteristics of subtree crossover. Chellapilla w11xproposes a method
for evolving computer programs without crossover. Poli and Langdon w29xpropose
various crossover operators and compare their search properties. Haynes w16x
how small changes in representation, decoding, and evaluation of
genetic programs can increase the probability of destructive crossover and mutation
while not changing the search space.
More recently, several authors have shown that fitness evaluation in genetic
programming can be significantly accelerated by selecting a subset of fitness cases.
The basic idea is that, other things being equal, the evolution time can be
minimized by reducing the effective data size for each generation. Siegel w34x, for
example, describes a GP method for evolving decision trees using subsets of given
training cases. Each fitness case has a fitness measure and the training cases which
tend to be incorrectly classified by decision trees become more fit, and therefore
selected more frequently. This method is motivated by competitive selection of
fitness cases in the host-parasite model of Hillis w17x. Similar ideas of competitive
selection of fitness cases have been refined by Teller and Andre w38xand by
Gathercole and Ross w14x. Here, the fitness of a training case is evaluated only
when the cost of evaluating another fitness case is outweighed by the expected
utility that the new information will provide.
Another class of methods for fitness case selection is based on incremental
learning. Schoenauer et al. w33xpropose the successive optimization scheme that
gradually refines the fitness. Evolution typically starts by considering a unique
fitness case, and additional fitness cases are "gradually" taken into account when
the current population meets some performance criterion. Though in a slightly
different context, Zhang w40xpresents a selective incremental learning SEL.
method in which an "incrementally" chosen subset of given training data is used
for fitness evaluation of the model. The data sets are divided into two disjoint sets
of candidate and training sets. Each candidate data point has a fitness value, called
criticality, defined as the error made by the model. Fitter candidates are then
incrementally selected into the training set as learning proceeds. SEL evolves a
single data set for a single model. The method presented in Section 5 generalizes
this to populations of multiple models and multiple data sets.
2.2. Eoling multiagent cooperation strategies using GP
A multiagent learning task is used as a testbed for the Bayesian genetic programming
methods. In an single table and four robotic agents are
placed at random positions, as shown in Figure 1. A specific location is designated
as the destination. The goal of the robots is to transport the table to the
222 ZHANG
Figure
1. The environment for multiagent learning. On a grid world of there are four robots,
obstacles, and a table. The task of the robots is to transport the table in group motion to the
designated target position G.
destination in group motion. The robots need to move in herd since the table is too
heavy and large to be transported by single robots. The robots share a common
control program A .
best
The objective of a GP run is to find a multi-robot algorithm A that, when
best
executed by the robots in parallel, causes efficient table transport behavior in
group. To evolve the programs, the robots activate each candidate program A for
in parallel to run a team trial. At the beginning of the trial, the robot
locations are chosen at random in the arena. They have different positions and
orientations. During a trial, each robot is granted a total of S elementary
movements. The robot is allowed to stop in less than S steps if it reaches the
goal. At the end of the trial, each robot i gets a fitness value which was measured
by summing the contributions from various factors.
The terminal and function symbols used for building GP trees to solve this
problem are listed in Tables 2 and 3. The terminal set consists of six primitive
actions: FORWARD, AVOID, RANDOM- MOVE, TURN- TABLE, TURN- GOAL, and STOP.
The function set consists of six primitives: IF- OBSTACLE, IF- ROBOT, IF- TABLE,
IF- GOAL, PROG2, and PROG3. Each fitness case represents a world of 32 by
grid on which there are four robots, 64 obstacles, and the table to be transported
see
Figure
1 for an example of fitness cases. A set of 200 training cases that are
generated at random is used for evolving the programs. An independent set of 200
random cases is used to test the performance of the evolved programs.
All the robots use the same control program. To evaluate the fitness of robots,
we made a complete run of the program for one robot before the fitness of another
is measured. The raw fitness value, eg., of individual i at generation g against
case c is computed by considering various factors. These include the distance
between the target and the robot, the number of steps moved by the robot, the
number of collisions made by the robot, the distance between starting and final
position of the robot, and the penalty for moving away from other robots.
BAYESIAN GENETIC PROGRAMMING 223
Table
2. GP terminal symbols for the multiagent task
Symbol Description
FORWARD Move one step forward in the current
direction
AVOID Check clockwise and make one step in
the first direction that avoids collision
RANDOM- MOVE Move one step in the random
direction
TURN-
Make a clockwise turn to the nearest
direction of the table
TURN- GOAL Make a clockwise turn to the nearest
direction of the goal
STOP Stay at the same position
Table
3. GP function symbols for the multiagent task
Symbol Description
IF- OBSTACLE Check collision with obstacles
IF- ROBOT Check collision with other robots
IF-
Check if the table is nearby
IF- GOAL Check if the table is nearby
PROG2, PROG3 Evalute two or three.subtrees in
sequence
3. Bayesian genetic programming
In this section we present a theory of genetic programing that is based on Bayesian
inference. The general theory is then applied to addressing two important issues in
genetic programming, i.e., control of program growth and acceleration of fitness
evaluation. This section aims to provide an outline of the Bayesian GP approach
Figure
2. An example genetic program for the multiagent learning task. Non-terminal nodes denote
checking sensor inputs of the robots, and terminals indicate actions to be taken. The meaning of the
symbols is described in Tables 2 and 3.
and some distinguishing features in different implementations. The algorithms are
detailed in the following two sections.
3.1. Bayesian formulation of genetic programming
Genetic programming works by initializing a population of programs and iteratively
producing the next generation of fitter programs, i.e. Ag.s Ag4 M, where Ag
denotes the ith program at generation g, and M is the population size. Genetic
operators such as mutation and crossover are used to produce offspring programs
from the parent programs. New generations are produced repeatedly until the
maximum number of generations g is reached or some other termination
condition is satisfied. The goodness or fitness of a program is measured in terms of
a set D of fitness cases or training data and the programs can be considered as a
model of the unknown process f generating the data.
In the Bayesian GP, the best program is defined as the most probable model,
given the data D plus the prior knowledge on the problem domain. Bayes theorem
provides a direct method for calculating such probabilities w15x. It states that the
posterior i.e. after observing the data D.probability of a program A is
PDN A.PA.
PAN D.s
PD.
PDN A.PA.
s ,1.
A
where A is the space of all possible programs in case of A taking discrete values,
the integral will be replaced by summation. Here PA.is the prior i.e. before
observing the data.probability distribution for the programs, and PDN A.is the
likelihood of the program for the data.
The relationship between the states of models and their probabilities is established
by borrowing the concept of "energy" from statistical physics w26x. We regard
the GP system as a thermodynamic system. Every possible state s of the system has
some definite energy Es. The system energy can fluctuate and it is assumed that
the probability of a thermodynamic.system being in state s, given that the
temperature is T is given asPs.s expyEs.rT .,2.
Z
where Es.is the energy of the system and Z is the normalization constant needed
to make the distribution integrate or sum.to one. This distribution is known as
the canonical or Boltzmann.distribution.
BAYESIAN GENETIC PROGRAMMING 225
Under the canonical distribution, the prior distribution of programs A can be
expressed asPA.s expyaFA .,3.
ZAa .
where Z a.is a normalizing constant, a s 1rT, and F is the "energy" of model
AA
A in the "equilibrium" state. For example, the energy function, F , can be chosen
A
as the total number of nodes in genetic program A. This choice of prior distribution
says that we expect the program size to be small rather than large, thus
implementing a parsimony pressure. Similarly, the likelihood of models A for the
fitness data D can be expressed asPDN A.s expybFD .,4.
ZD b .
where F is an error function for the fitness set D, b controls the variance of the
noise, and Z b .is a normalization factor. The likelihood factor gives preference
to programs that fit better to have less error for.the fitness cases.
Initially, the shape of the prior probability distribution of programs PA.is flat
to reflect the fact that little is known in advance. Evolution is considered as an
iterative process of revising the posterior distribution of models PAN D.by
combining the prior PA.with the likelihood PDN A. In each generation, Bayes
theorem 1.is used to estimate the posterior fitness of individuals from their prior
fitness values. The posterior distribution PAN D.is then used to generate its
offspring.
The objective of Bayesian genetic programming Figure 3.is to find a program
Ag that maximizes the posterior probability:
best
est s min arg max PgAig N D. 5.
AiggAg.
Figure
3. Outline of the Bayesian genetic programming procedure.
226 ZHANG
where g is the maximum number of generations and Ag.is the populations of
size M:
Ag.s Aig 4Mis1.6.
The posterior probability P Ag N D. of program Ag is computed with respect to
the gth population:
PDN Aig .PAig .
PgAig N D.s Mg,7.
where P DN Ag .is the likelihood and PAg .is the prior probability of or degree
ii
of belief in. Ag. Note that the posterior probability is approximated by a fixed-size
population Ag.which is typically a small subset of the entire program space A.
Genetic operators are applied to generate L offspring AX , k s 1,.,L. For-
mally, this proceeds in two steps. First, candidates are generated by sampling from
the proposal distribution:
QgAXkN Aig .8.
The specific form of Q ?N ?.is determined by variation operators. For example,
for subtree crossover from two parents it is given as:
QCAXkN Ai.s PSAjN Ai.PRAXkN Ai, Aj.9.
AjgAg.
Here PAN A .is the probability of individual A in Ag.being selected as a
mate for A and P AX N A , A . is the probability of A and A producing AX by
crossover.
Then, each candidate generated by genetic operators is accepted with probability
PgAXkN D.
agAXkN Aig .s min 1, PgAig N D.5, 10.
where P Ag N D.is computed by 7.and PAX N D. is the posterior probability of
A estimated with respect to the current population:
PDN AXk.PAXk.
PgAXkN D.s Mg.1.
If AX is rejected in 10., then Ag is retained, i.e., AX / Ag. Note that this
kiki
acceptance function does not exclude the case that A is generated by crossover
from Agand another parent Ag Ag., j / i.
BAYESIAN GENETIC PROGRAMMING 227
After L offspring AX , k s 1,.,L, are generated, M of them are selected to
build the new population:
Ag q 1.s Aigq14is1.12.
This defines the posterior distribution P Ag N D. at the next generation. It
should be mentioned that this formulation of offspring selection is intentionally
very general so that it can accommodate various forms of existing selection
schemes, such as m, l.selection w5, 25x.
In effect, the evolutionary inference step from generation g to g q 1 is considered
to induce a new fitness distribution P Ag N D.from priors PAg . through
posterior distribution P Ag N D. following Bayes formula, using genetic operators.
Based on this theoretical framework we present in the following subsections two
examples of Bayesian genetic programming that employ specific techniques for
effective control of evolutionary dynamics. Detailed procedures and experimental
results are described in Sections 4 and 5.
3.2. GP with the adaptie Occam's razor
The first Bayesian GP focuses on the fact that genetic programming iteratively
searches populations of more probable more likely in terms of the data and the
priors. programs and thus the information gained in the previous generation can
be used in the next generation to revise the prior before seeing the data.belief in
true programs. Thus, the posterior distribution can be written in the form
PDN Aig .Pgy1Aig .
PgAig N D.s ,13.
Mjs1 PDN Ajg.Pgy1Ajg.
where the priors P Ag . are now expressed explicitly as a function of generation
rather than the fixed prior P Ag .as in 7. After computing the posterior
probabilities for Ag, the priors PA.are revised to PA.by a belief update
function u?, ? .:
PgA.s uPgy1A., PgAig N D.14.
An implementation of u?, ? .will be described in the next section.
Basically, the Bayesian GP starts with generating programs according to an
initial prior distribution PA.on the program sizes. Typically, the prior distribution
is given as uniform, reflecting the fact that little is known in advance about the
optimal size of genetic programs. Then, the fitness Fg.of the programs is
measured on the training cases, which results in the estimation of the likelihood
programs more details in Section 4. Combining the prior and the
likelihood by Bayes formula, we get the posterior probabilities P Ag N D. The
current prior is then updated to reflect the new information gained from the
posterior distribution.
Note that we assign prior distributions on the complexity of models programs.
In addition, information theory w12xsays that the probability and code length
complexity.of models are related as LA.sylog PA. By making use of this,
the complexity of programs can be controlled to evolve parsimonious and accurate
programs. In fact, we show in Section 4 that the adaptive Occam method presented
in w44xis derived from the Bayesian genetic programming framework.
3.3. GP with incremental data inheritance
In the second example of the Bayesian approach to GP, we make use of the fact
that the Bayes formula suggests an incremental, evolutionary learning rule: infer
programs of higher posterior probability from the existing programs by observing
new fitness cases. This leads to writing the posterior distribution as
PDig N Aig .Pgy1Aig N Digy1 .
PgAigN Dig.s Mg ,15.
where the data set Dg is now a variable of generation number g and specific to a
single program Ag. The collection of Dgconstitutes the data population Dg.
ii
The observation of new data will lead to update of the prior distribution:
PgAN Dig .s uPgy1AN Digy1 ., PgAig N Dig .16.
The revision of prior distribution is the same as the process for equation 14.,
except that the data Dgy1 for the estimation of likelihood and thus the posterior
probabilities of programs. is now a function of generation rather than fixed as D.
The genetic programming with the incremental data inheritance IDI.method
w42xis an example of this approach, where Dg specifically satisfies the following
conditions:
where D is the entire data set given for training. In this method, the fitness of
programs is estimated on incrementally chosen data subsets Dg, rather than on the
whole data set D, and thus the evolution is accelerated by reducing the effective
number of fitness evaluations. More details are described in Section 5.
4. Bayesian GP for parsimonious solutions
Statistical theories suggest that models which are too simple lack sufficient learning
capability while models which are too complex may generalize poorly on unseen
BAYESIAN GENETIC PROGRAMMING 229
data. As reviewed in Section 2.1, several researchers have observed that the
program size tends to grow without bound or "bloat" see, for example, w22x. In
this section we describe a Bayesian method for evolving parsimonious programs.
4.1. Algorithm description
The GP algorithm for the adaptive Occam method Figure 4.is the same as that of
the Bayesian GP procedure described in Figure 3, except three differences. The
first is the raw fitness calculated in step 2. The derivation of the fitness function is
given in Section 4.2. The second difference is in step 3, where the posterior
probability 13.is substituted for 7.; in 13.the prior is revised each generation
while in 7.it is constant. The third is the additional step 6 for the revision of
priors.
4.2. Fitness ealuation
For a convenient implementation of the Bayesian evolutionary algorithm we take
the negative logarithm of the posterior probability P Ag N D. and use it as the
fitness function
Fig.sylog PgAig N D.,18.
Figure
4. Outline of the Bayesian genetic programming with the adaptive Occam's razor AOR.
where Ag g Ag. Then the evolutionary process is reformulated as a minimization
process
est s min arg min Fig.,19.
AiggAg.
where the fitness function is expressed as
Fig.sylog PDN Aig .y log PAig .20.
As described in the previous section, we can write the likelihood function in
Bayes' theorem 1.in the form w9xPDN A.s expybFD . 21.
ZD b .
where F is an error function, b controls the variance of the noise, and Z b .is a
normalization factor. If we assume that the data has additive zero-mean Gaussian
noise, then the probability of observing a data value y for a given input vector x
would be
where Z b .is a normalizing constant. Provided the data points are drawn
independently from this distribution, we have
PDN Aig.s PycN xc, Aig. 23.
cs1s expybFD .24.
ZD b .
where x , y .g D are training cases and F is given as
cc D
FDs EDN Aig.s f xc; Aig.y yc.2.25.cs1
If we also assume that a Gaussian prior on the architecture of program Ag,we
ZAa .
BAYESIAN GENETIC PROGRAMMING 231
where Z a.is a normalizing constant. For example, F can be chosen in the form
AA
FAs CAig .s uk2 27.ks1
where u are the parameters defining the program Ag. This choice of prior
distribution says that we expect the complexity parameters to be small rather than
large, thus implementing a parsimony pressure.
Substituting 24.and 26.into 20., the fitness function can be expressed as
Fig.s bFDq aFA 28.
s bEDN Aig .q aCAig .,29.
where the first term reflects the error and the second the model complexity.
The exact calculation of the constants b and a in equation 29.requires the
true probability distribution of underlying data structure, which is in most real
situations unknown. Instead, we define an adaptive fitness function in its most
general form as
Fig.s Eig.q a g.Cig.,30.
where Eg.and Cg.are the measures for error and complexity of the program,
ii
and the parameter b is absorbed into the adaptive parameter ag.which balances
the error and complexity factors as follows:
if Ebestgy 1.) e
a g.s~ N 2 C^bestg. 31.N 2 Ebestgy 1.? C^bestg. otherwise.
This is the adaptive Occam method w44x. User-defined constant e specifies the
maximum training error allowed for the run. Egy 1.is the error of the best
best
program of generation g y 1. C^ g.is the size of the best program at generation
best
g estimated at generation g y 1. These are used to balance the error and
complexity terms to obtain programs as parsimonious as possible while not sacrificing
their accuracy. The procedure for estimating C^ g.is given in w44x.
best
4.3. Discussion
The necessity and difficulty of non-coding segments or introns in genetic programming
have been studied by many authors w22, 27, 39x. The adaptive Occam method
deals with the non-coding segment problem using a two-phase strategy by means of
an adaptive fitness function. In the first stage during Egy 1.) e., the
best
growth of non-coding segments is encouraged to increase the diversity of partial
solutions. In the second stage during Egy 1.F e., a strong parsimony
best
pressure is enforced to prefer compact solutions. The transfer from the first stage
to the second is controlled by Bayesian inference under the constraint of the
user-defined parameter e.
Note that the posterior probability P Ag N D. can be computed from the fitness
values Fg.by taking its exponential function:
PDN Aig .Pgy1Aig .
Mjs1 PDN Ajg.Pgy1Ajg.
expyEig.y a g.Cig.
s 32.
Mjs1 expyEjg.y a g.Cjg.
This shows that the revision of priors P Ag . is implemented as the update of
ag.in the adaptive Occam method since the priors are reflected in C^ g.which
best
leads to revision of ag.
We also note that minimization of Fg.is equivalent to the minimum description
length MDL.principle w18, 30x: the best model is a model whose total code
length for model description L AgN Dg.and data description LDgN Ag. are
ii ii
minimal. In information theory w12xthe optimal description length for a model is
given as the negative logarithm of probability of the model:
LAig .sylog PAig .3.
Similarly, the code length for the data given the program Ag is given as:
LDN Aig .sylog PDN Aig .4.34.
.correspond to the two terms in 20.
ii
4.4. Experimental results
The adaptive Occam method for complexity control was applied to the multiagent
learning task. Experiments have been performed using the parameter values listed
in
Table
4. The terminal set and function set consist of six primitives, respectively,
as given in Tables 2 and 3. A set of 200 training cases was used for evolving the
programs. An independent set of 200 cases was used for evaluating the generalization
performance of evolved programs.
The Eg.-values of program i at generation g are measured as the average of
its raw fitness values eg.less is better.for the cases c:
Eig.s ei, cg.,35.
BAYESIAN GENETIC PROGRAMMING 233
Table
4. Parameters used in the experiments for GP with the adaptive Occam's razor
Parameter Value
Population size 100
Max generation
Crossover rate 0.9
Mutation rate 0.1
Training cases 200
Test cases 200
where N is the number of fitness cases in the training set. Each eg.-value was
computed by considering such factors as the distance between the target and the
robot, the number of collisions made by the robot, and the distance between
starting and final position of the robot. Note that in the multiagent task there is no
target output given for the training case. The goodness of a program is measured
by scores or penalties.it collects by running the robots.
The complexity of a GP tree is defined as the size and depth of the tree:
Cig.s
where k is a constant. We used k s 2.
Figure
5 compares the fitness values for GP with and without AOR, averaged
runs. Shown are the Eg.-values of the best individuals in each generation
for each method. A tendency can be observed that the GP with the adaptive
Occam's razor converges slightly faster than the baseline GP, though there is no
significant difference in their final fitness. Figure 6 compares the typical changes of
program complexity for both methods. The tree complexity was measured in terms
of the tree size plus
Figure
5. Comparison of fitness values Eig.-component only.of the genetic programs for the
multiagent task. A tendency can be observed that the GP with the adaptive Occam's razor converges
slightly faster than the baseline GP, though there is no significant difference in their final fitness.
Figure
6. Evolution of the complexity of GP trees for the multiagent task. The GP with the adaptive
Occam's razor AOR.promotes the trees to grow when significant fitness error.reduction is required,
while it prefers smaller trees to larger ones when their fitness error.is comparable. In contrast, the GP
without the Occam factor tends to grow as generation goes on.
More detailed results are summarized in Table 5. The GP with AOR achieved,
on average, a 20% reduction of program complexity without loss of solution
accuracy in fact, with a slight improvement both in training and test performances.
It can be concluded that the adaptive Occam method evolves smaller programs
without loss of generalization capability of the programs.
5. Bayesian GP for accelerated evolution
5.1. Algorithm description
The algorithm for incremental data inheritance Figure 7.is the same as the GP
with AOR, except that the training set Dg now increases with generation. The
additional step for this modification is step 5, where the training set grows by
inheritance. The next section details the data inheritance procedure.
Table
5. Effects of the adaptive Occam's razor
GP programs for the multiagent learning task
Method Complexity
Baseline 31.4 " 6.5
AOR.on the complexity and average fitness values of
Average Fitness
Training Test
The sizes of training and test sets were 200, respectively. The values are averaged over ten runs.
BAYESIAN GENETIC PROGRAMMING 235
Figure
7. Outline of the Bayesian genetic programming with incremental data inheritance IDI.
5.2. Data inheritance procedure
The basic idea in genetic programming with incremental data inheritance is that
programs and their data are evolved at the same time. With each program is
associated a separate data set. We describe a variant of uniform crossover that we
call uniform data crossover. A simplified example for illustrating this process is
given in Figure 8.
First, two parent data sets, Dg and Dg, are crossed to inherit their subsets to two
offspring data sets, Dgq1 and Dgq1. Second, the data of parents' are mixed into a
union set
which is then redistributed to two offspring Dgq1 and Dgq1, where the size of
offspring data sets is equal to N s N q l, where l G 1 is the data increment
size. Thus, the size of data sets monotonically increases as generation goes on.
To maintain the diversity of the training data during inheritance we import some
portion of data from the base set. The import rate r is given as
ris r ? 1 y di.,0F r F 1. 38.
Figure
8. An illustrative example for data inheritance in IDI. Two parent data sets, Dig and Dig, are
merged to form the union set, Digqj, which is then inherited to two offspring data sets, Digq1 and Djgq1.
The off-spring data points with shaded circles are the examples imported from the base data set D to
maintain the diversity of data sets.
where r is a constant for import strength. The diversity d is measured as the ratio
of distinctive examples in the union set:
d sy1, 0F d F 1. 39.
Figure
8 illustrates the process of data inheritance, where two parent data sets of
size 6 each are unioned to form the genetic pool of size 10, from which two
offspring data sets of size 8 each are inherited. Marked are the data imported from
the basis data set to maintain the diversity.
5.3. Fitness ealuation
As in the implementation of the Bayesian GP with the adaptive Occam's razor, we
take the negative logarithm of P Ag N D. and use it as the fitness function
Fig.sylog PgAig N Dig .,40.
where Ag g Ag., Dg ; D, and P AgN Dg.are defined by 15.:
ii gi
gg PDig N Aig .Pgy1Aig N Digy1 .
PgAiN Di.s Mg gy1 .41.
Then the evolutionary process is reformulated as a minimization process
est s min arg min Fig.,42.
gFgmam Aig, Dig
where the fitness function is expressed as
Fig.sylog PDig N Aig .y log Pgy1Aig N Digy1 .43.
BAYESIAN GENETIC PROGRAMMING 237
Using the similar arguments as in Section 4.2 we can write the likelihood
function and the prior distribution of programs in the formPDigN Aig.s expybFD. 44.
ZAa .
where Z b .and Z a.are normalizing constants.
D A
We define an adaptive fitness function in its most general form as
Fig.s Eig.q a g.Cig.,46.
where Eg.and Cg.represents the error factor F and complexity factor F
ii D A
with a and b absorbed into ag. The parameter ag.balances these two factors
as follows
if Ebestgy 1.) e
a g.s~ Ng2 C^bestg. 47.Ng2 Ebestgy 1.? C^bestg. otherwise.
This is a generalization of the adaptive Occam method in that N is now a variable,
rather than fixed value N, and scheduled to increase monotonically as a function of
generation g.
5.4. Discussion
The incremental data inheritance method has interesting properties that characterize
the stability of the algorithm as generation goes on. It maintains a growing
subset of given fitness cases for each program. The monotonic growth of the fitness
subset ensures that the IDI method eventually achieves the same level of performance
as that of the baseline algorithm. This is contrasted with many of existing
methods for fitness case selection, including LEF w14xand RAT w38x. Maintaining a
separate subset for each program allows the learned component of the program
can be retained during evolution. At the same time, the import of new fitness cases
from the base set allows the programs to learn new situations, thus leading to
gradual improvement in performance.
5.5. Experimental results
We compare the performance of the GP with incremental data inheritance IDI.to
the baseline GP, i.e. one that uses the complete training cases from the outset.
Experiments have been performed using the parameter values listed in Table 6. GP
Table
6. Parameters used in the experiments for GP with
incremental data inheritance
Parameter Value
Population size 100
Max generation
Crossover rate 0.9
Mutation rate 0.1
Training cases 200
Test cases 200
Initial data size N . 20Data increment size l. 6
runs with IDI used 20 q 6g examples for each generation g selected from the
given data set, i.e. N s 20, l s 6, for fitness evaluation. For all methods, a totalof 200 training cases were used for training and an independent set of 200 test
cases was used for evaluating the generalization performance of evolved programs.
Fitness factors Eg.and Cg.are the same as in the experiments for GP with the
ii
adaptive Occam's razor, except that the training set size for Eg.is now N
ig
instead of N.
Results are shown in two different forms. Figure 9 shows the evolution of fitness
as a function of the generation number, in which there is no significant difference
in the performance. Since the GP with IDI uses variable data size, computing time
at each generation should be measured by a product of the population size and the
data size. This result is shown in Figure 10, where IDI achieved a speed-up factor
of approximately four compared with the baseline GP. More detailed results are
summarized in Table 7. The incremental data inheritance IDI.method used only
50% of the time required for the baseline GP. It is interesting to see that, despite
Figure
9. Comparison of fitness values as a function of the generation number. The curves are mean
values over ten runs. The GP with IDI shows no loss of fitness values compared to that of the baseline
GP algorithm.
BAYESIAN GENETIC PROGRAMMING 239
Figure
10. Comparison of fitness values as a function of the number of function evaluations. The
curves are mean values over ten runs. The GP with IDI converges much faster than the baseline GP
algorithm.
Table
7. Effects of incremental data inheritance IDI.on the time and average fitness
values lower is better.of GP programs for the multiagent learning task. The sizes of
training and test sets were 200, respectively. The values are averaged over ten runs. Time is
measured as the total number of fitness evaluations. Also shown are the standard deviations.
Average Fitness
Method Time Training Test
Baseline 1,220,000 215.8 " 8.3 221.3 " 7.6
IDI
the reduced data size, the generalization performance of the GP with IDI was
slightly better than that of the baseline GP.
6. Concluding remarks
We have presented a Bayesian framework for genetic programming. Two specific
GP algorithms were derived from this framework for reducing the time and space
complexity of genetic programming. Applied to the multiagent learning task, the
first method, i.e. GP with the adaptive Occam's razor AOR., achieved approximately
20% reduction of program complexity without any loss in fitness values. The
second Bayesian approach to genetic programming, i.e. the incremental data
inheritance IDI.method, used only 50% of the time required for the baseline GP
to achieve the same or a little better fitness level.
Though this improvement is significant, it should be mentioned that there is still
much room for further reduction of spacertime complexity of genetic program-
ming. Future work should address the following issues, among others. One is
incorporating better genetic operators. We have focused in the present work on
dynamics at the phenotypic level. Further improvement can be achieved by finding
more "intelligent" variation operators that adapt to the dynamics at the genotypic
level. In terms of Bayesian genetic programming, this involves adapting proposal
functions. The second issue is to improve modularity of genetic programs by
automatically designing and adapting reusable submodules such as ADFs or
libraries. This, combined with the Occam's razor, will further improve the comprehensibility
and reusability of genetic programs as well as speed up the GP process.
From the theoretical point of view, the Bayesian framework for genetic programming
provides a number of important features. One is that, by formulating the GP
process as Bayesian inference, principled techniques for driving evolutionary dynamics
of conventional GPs can be developed. In addition to the methods presented
in this paper, one can think of other methods within the framework. For
example, decision-making can be made more robust by combining multiple programs
instead of a single GP tree. The Bayesian GP framework provides a
principled way to combine multiple programs to build a committee machine.
Another important feature of Bayesian inference is that it allows background
knowledge in the problem domain to be incorporated in a formal way. For
instance, if we can guess the distribution of specific function symbols for good GP
trees, this knowledge can be reflected in the application probabilities of genetic
operators. Background knowledge is important especially for solving real-life
problems of practical interest.
Finally, the Bayesian analysis of genetic programming appears to be a useful tool
for incorporating various genetic programming procedures into a uniform frame-
work. A theoretical framework is crucial for the design and comparative analysis of
various genetic programming algorithms.
Acknowledgments
This research was supported by the Korea Science and Engineering Foundation
KOSEF.Granta 981-0920-350-2, by the Korea Research Foundation KRF.
Granta 1998-001-E01025, and by the Korea Ministry of Science and Technology
through KISTEP Granta BR-2-1-G-06. Thanks to Wolfgang Banzhaf and three
anonymous reviewers for helpful comments that improved the readability of the
paper.
--R
"Automatically defined features: The simultaneous evolution of 2-dimensional feature detectors and an algorithm for using them,"
"Genetic programming and emergent intelligence,"
An Introduction
"Evolving compact solutions in genetic programming: A case study,"
"Evolutionary programming with tree mutations: Evolving computer programs without crossover,"
Elements of Information Theory
"Dynamic training subset selection for supervised learning in genetic programming,"
"Small populations over many generations can beat large populations over few generations in genetic programming,"
Bayesian Data Analysis
"Perturbing the representation, decoding, and evaluation of chromosomes,"
"Co-evolving parasites improves simulated evolution as an optimization procedure,"
"Genetic programming using a minimum description length principle,"
"Generality and difficulty in genetic programming: Evolving a sort,"
On the Programming of Computers by Means of Natural Selection
"Scalable learning in genetic programming using automatic function definition,"
"Fitness causes bloat: Mutation,"
"Size fair and homologous tree crossovers,"
"A comparison of crossover and mutation in genetic programming,"
"The science of breeding and its application to the breeder genetic algorithm,"
"Probabilistic inference using Markov chain Monte Carlo methods,"
"Explicitly defined introns and destructive crossover in genetic programming,"
"On the search properties of different crossover operators in genetic programming,"
"Stochastic complexity and modeling,"
"Analysis of complexity drift in genetic programming,"
"Discovery of subroutines in genetic programming,"
"Evolutionary identification of macro-mechanical models,"
"Competitively evolving decision trees against fixed training cases for natural language processing,"
"Code growth in genetic programming,"
"Effects of code growth and parsimony pressure on populations in genetic programming,"
"Simultaneous evolution of programs and their control structures,"
"Automatically choosing the number of fitness cases: The rational allocation of trials,"
"Empirical studies of the genetic algorithm with noncoding segments,"
"Accelerated learning by active example selection,"
"A Bayesian framework for evolutionary computation,"
"Genetic programming with incremental data inheritance,"
"Genetic programming of minimal neural nets using Occam's razor,"
"Balancing accuracy and parsimony in genetic programming,"
"Evolutionary induction of sparse neural trees,"
--TR
--CTR
Byoung-Tak Zhang, A unified Bayesian framework for evolutionary learning and optimization, Advances in evolutionary computing: theory and applications, Springer-Verlag New York, Inc., New York, NY,
Sean Luke, Modification point depth and genome growth in genetic programming, Evolutionary Computation, v.11 n.1, p.67-106, Spring | bayesian genetic programming;incremental data inheritance;adaptive Occam's razor;probabilistic evolution;parsimony pressure;data subset selection |
594976 | Graph Coloring with Adaptive Evolutionary Algorithms. | This paper presents the results of an experimental investigation on solving graph coloring problems with Evolutionary Algorithms (EAs). After testing different algorithm variants we conclude that the best option is an asexual EA using order-based representation and an adaptation mechanism that periodically changes the fitness function during the evolution. This adaptive EA is general, using no domain specific knowledge, except, of course, from the decoder (fitness function). We compare this adaptive EA to a powerful traditional graph coloring technique DSatur and the Grouping Genetic Algorithm (GGA) on a wide range of problem instances with different size, topology and edge density. The results show that the adaptive EA is superior to the Grouping (GA) and outperforms DSatur on the hardest problem instances. Furthermore, it scales up better with the problem size than the other two algorithms and indicates a linear computational complexity. | Introduction
The main goal of this paper is to present the results of an experimental study on solving graph
coloring problems by Evolutionary Algorithms (EAs). In particular we show the working of a
new, problem independent adaptive mechanism for constraint handling in EAs. In Section 2 a
brief overview of graph coloring problems and graph coloring techniques is given. We decide to
investigate graph instances that are 3-colorable and identify the instances around the so-called
phase transition as the most challenging ones. Two graph coloring algorithms are selected to
serve as competitors to our EAs. Among the traditional graph coloring techniques we choose
DSatur from Br'elaz for its reported high performance, (Br'elaz, 1979). Besides, we also test the
Grouping GA (GGA) of Falkenauer, because graph coloring can be seen as a grouping problem and
the GGA shows excellent performance on grouping problems, such as bin packing (Falkenauer,
1994). In Section 3 performance measures for comparison of different algorithms are discussed.
Thereafter, in Section 4 the Grouping GA is described; in Section 5 genetic algorithms with integer
representation and with order-based representation are compared. In Section 6 we present our
adaptive mechanism that is modifying the penalty function during the evolution, and we show that
this adaptive mechanism highly increases performance. In Section 7 a big comparison between our
adaptive EA, the Grouping GA and DSatur is made. We observe that the Grouping GA exhibits
the lowest performance and that the adaptive EA outperforms DSatur on the hardest problem
instances, moreover it scales up better with the problem size. Finally, we draw conclusions in
Section 8.
Graph Coloring
The main motivation of the present research is our interest in the applicability of genetic, or more
generally evolutionary, algorithms to constraint satisfaction problems. In general, a constraint
satisfaction problem (CSP) is a pair hS; OEi, where S is a free search space, i.e. a Cartesian product
of sets and OE is a formula, a Boolean function on S, (Eiben and Ruttkay, 1997).
A solution of a constraint satisfaction problem is an s 2 S with Usually a CSP is
stated as a problem of finding an instantiation of variables within the finite domains
such that constraints (relations) c prescribed for (some of the) variables hold.
The formula OE is then the conjunction of the given constraints. It has been proved that every CSP
can be equivalently transformed to a binary one, i.e. to a CSP where each constraint concerns
exactly two variables, (Nudel, 1983). For graph coloring problems this property is natural, if we
envision nodes as variables and edges as constraints. This suggests that the findings on using a
genetic algorithm with no specific knowledge on the problem structure can be applicable to other
CSPs as well.
In the family of graph coloring problems an undirected graph E) is given and the
problem is to color each node in such a way that no two nodes connected by an edge are colored
with the same color. There exist several variations of this problem, like finding the least number
of colors that is needed to color the graph, or to find the largest subgraph in G that can be
colored with the given number of colors. All of these problems are known to be NP-complete
(Garey and Johnson, 1979), so it is unlikely that a polynomial-time algorithm exists that solves
any of these problems (Arora et al., 1992). A pure constraint satisfaction problem is the graph
3-coloring variant, where each node in the graph is to be colored with one of three given colors. In
this problem variant, there is no optimization involved, such as minimizing the number of colors
used for a conflict-free coloring. We have chosen to perform an in-depth investigation of this
variant, restricting ourselves to one problem type, but studying three different graph topologies,
several problem sizes and a whole range of edge connectivity values, yet keeping the number of
experiments manageable.
2.1 Problem Instances
In the literature there are not many benchmark 3-colorable graphs and therefore we create graphs
to be tested with the graph generator 1 written by Joe Culberson. This generator creates various
classes of k-colorable quasi-random graphs. The classes we want to investigate are the following.
Arbitrary 3-colorable graphs where vertices are randomly assigned to one of the 3 partition elements
(colors) uniformly and independently. This is a class that has widely been investigated. We
use the term 'arbitrary' to distinguish these kind of graphs from the following ones. Equi-partite
3-colorable graphs where the three color sets are as nearly equal in size as possible (the smallest
sets having one element less than the largest). Culberson reports that these graphs present the
most difficulty in obtaining the specified coloring for a suite of various algorithms, (Culberson
and Luo, 1996). Because the sets are almost equal in size, an algorithm has less information to
make use of. In case of flat 3-colorable graphs also the variation in degree for each node is kept to
a minimum, so this class is even tougher, since even less information is available to the algorithm.
Creating test graphs happens by first pre-partitioning the vertices in three sets (3 colors) and
then drawing edges randomly. For the first two types of graphs, once the pre-partitioning has
been done, a vertex pair v; w is assigned an edge with fixed probability p, provided that v and
w are not in the same color set. So there is some variation in the degree for each vertex. This
measure p is called the edge connectivity of a graph instance. When creating the test graphs a
random number generator is needed. This generator is fed with a random seed, which obviously
influences the created graphs, and - as it turns out from the experiments - also effects the
performance of the graph coloring algorithms.
In our preliminary experiments comparing different genetic algorithms equi-partite graphs
will be used (Section 5 and Section 6), while using all three classes in a final comparison with
two other methods (Section 7). For specifying the investigated graph instances we use the notation
G eq;n=200;p=0:08;s=5 , standing for an equi-partite 3-colorable graph with 200 vertices, edge
probability 8% and seed 5 for the random generator.
It is known that for many NP-complete problems, typical instances can be very easy to solve.
Turner found that many k-colorable graphs are easy to color, so comparisons between algorithms
based on these graphs are not very meaningful, (Turner, 1988). For an interesting comparison
one should look for hard problem instances that pose some challenges for candidate algorithms.
Cheeseman et al. (Cheeseman et al., 1991) found that NP-complete problems have an 'order
Source code in C is available via ftp://ftp.cs.ualberta.ca/pub/GraphGenerator/generate.tar.gz
parameter' and that the hard problems occur at a critical value or phase transition of such a
parameter. For graph coloring, this order parameter is the edge probability or edge connectivity
p. Using the cost function estimation of Clearwater and Hogg, (Clearwater and Hogg, 1996),
one can determine the approximate location of the phase transition depending on the number of
nodes n, in the graph. The phase transition for our type of problems will occur when the edge
connectivity values are around 7=n - 8=n. These values are a bit different from the estimate in
(Cheeseman et al., 1991), but our experiments confirm this range and indicate that the hardest
graphs are those with an edge connectivity around 7=n - 8=n, independently from the applied
graph coloring algorithm. In this investigation we concentrate on graphs in this region.
2.2 Graph Coloring Algorithms
There are many traditional graph k-coloring techniques, based on heuristics. Some existing algorithms
are: an O(n 0:4 )-approximation algorithm by Blum (Blum, 1989), the simple Greedy
algorithm (Kucera, 1991), DSatur from Br'elaz (Br'elaz, 1979), Iterated Greedy(IG) from Culberson
and Luo (Culberson and Luo, 1996), XRLF from Johnson et al. (Johnson et al., 1991).
Probably the most simple and best known algorithm is the Greedy algorithm, which takes some
ordering of the nodes of a graph and colors the nodes in this order with the smallest color 2 that
is possible without violating constraints. Grimmet and McDiarmid (Grimmet and McDiarmid,
have shown that for almost all random graphs the Greedy algorithm uses no more than
about twice the optimal number of colors. Nevertheless, several studies showed that in practice
and in theory the Greedy algorithm performs poorly (Kucera, 1991; Turner, 1988). We only
mention it here because our GA with order-based representation uses it as a decoder.
DSatur from Br'elaz (Br'elaz, 1979) uses a heuristic to dynamically change the ordering of the
nodes and then applies the Greedy method to color the nodes. It works as follows.
ffl A node with highest saturation degree (= number of differently colored neighbors) is chosen
and given the smallest color that is still possible.
ffl In case of a tie, the node with highest degree (= number of neighbors that are still in the
uncolored subgraph) is chosen.
ffl In case of a tie a random node is chosen.
Because of the random tie breaking, DSatur becomes a stochastic algorithm and just like for the
GA, results of several runs need to be averaged to obtain useful statistics. For our investigation the
backtrack version of Turner (Turner, 1988) has been implemented, which backtracks to the lastly
evaluated node that still has available colors to try. One search step is defined as expanding a
node with a new color, including those done after a backtracking. The DSatur heuristics performs
very well, therefore we use it as a heuristic technique to compare our EAs with.
Quite some research has been done about graph coloring with genetic algorithms, like Fleurent
and Ferland who have successfully considered various hybrid algorithms in (Fleurent and Ferland,
1996a), and who have extended their study into a general implementation of heuristic search
2 The colors are ordered just to make selection possible.
methods in (Fleurent and Ferland, 1996b). Others include von Laszewski who has looked at
structured operators and has used an adaption step to improve the convergence rate of a genetic
algorithm (Laszewski, 1991). Davis' algorithm in (Davis, 1991) was designed to maximize the
total of weights of nodes in a graph colored with a fixed amount of colors. This resembles the
problem definition used in the SAW-ing algorithm where we also add weights to the nodes of the
graph that is being colored. The difference is that the SAW-ing algorithm uses variable weights
to guide its search, while Davis' algorithm sees the fixed weights as the problem instance and
then tackles this problem as an optimization problem. Coll, Dur'an and Moscato discuss graph
coloring and crossover operators in a more general context in (Coll et al., 1995).
Performance Measures of Algorithms
The comparisons between different GAs and comparisons of GAs and DSatur will be based on
two different measures: success rate and computational effort. Probabilistic algorithms may find
a solution in one run and may not find one in another run. To cope with this problem we
execute a number of runs and monitor how many times a solution is found. The measure success
rate (SR) is the percentage of runs in which a solution is found, it gives an estimation of the
probability of finding a solution in one run. The most obvious measure of computational effort
for evaluating algorithms is the time complexity, e.g., CPU time in seconds, (Kronsjo, 1987). A
better option, however, is an implementation and hardware independent measure, computational
complexity, i.e., the number of basic operations required to find a solution. For search algorithms
this is the number of basic search steps a particular algorithm uses. Unfortunately, different
search algorithms can use different search steps. For a GA a search step is the creation (and
evaluation) of a new individual, in our case a new coloring. Thus, computational complexity will
be measured by the average number of fitness evaluations in successful runs, denoted as AES
(Average # of Evaluations to Solution). Fair as this measure may seem, even different GAs
may not fully be comparable this way. For instance, a GA using a heuristic within the crossover
operator performs 'hidden labor' with respect to a GA applying a standard `blind' crossover. In
other words, the extra computational efforts in performing a heuristic crossover are not visible
if we compare the AES values. A search step of DSatur is a backtracking step, i.e. giving a
node a new color. Thus, the computational complexity of DSatur is measured differently than
that of a GA - a problem that is rooted in the different nature of the algorithms and cannot
be circumvented. Despite of these drawbacks we compare algorithms by AES in the first part
of Section 7, because this measure is independent from implementational and executional issues,
such as the processor, programming language, network load, etc. In the second part of Section 7,
however, we compare the scaling-up behavior of the investigated algorithms, that is we show how
the AES values change with growing problem sizes. Regardless of the different meaning of AES
for different algorithms this comparison is by all means fair.
Grouping Genetic Algorithm
The Grouping Genetic Algorithm (GGA) was introduced by Falkenauer in (Falkenauer and
Delchambre, 1992) and further studied in (Falkenauer, 1994; Falkenauer, 1996). The GGA tries
to capture and exploit the structure of grouping problems by using an appropriate chromosomal
representation and genetic operators. The outlines of the GGA are given in Figure 1, while the
different steps are explained in the reminder of this section.
Grouping GA
Initialize population
Evaluate population
while not Stop-condition do
Sort the population using 2-tournament selection
Apply crossover to the best N c individuals
Replace the worst N c with the offspring
Mutate Nm randomly selected individuals in the population
Apply inversion to N i randomly selected individuals in the population
Evaluate population
while
Figure
1: Pseudo code of the Grouping Genetic Algorithm
In general, the grouping representation consists of two parts: an object part and a group part.
The object part consists of n genes, where n is the number of objects to be grouped, the group
part consists of a permutation of the k group labels. An object gene can take any of the k group
labels as allele, indicating that the object in question belongs to group of the given label. In a
graph coloring context objects are nodes and groups are colors; an example of a chromosome for
shown in Figure 2. The group part shows that three are colors A, B and C are
used for coloring the graph. The object part discloses that node 2 and 6 are colored with color
A, nodes 1, 3 and 4 are colored with color B and node 5 is colored with color C.
objects
groups
Figure
2: Example of a chromosome in grouping representation.
The GGA uses genetic operators on the group part of the chromosomes, and adjusts the object
part to the corresponding changes in the group part. We will use the three operators described
in (Falkenauer, 1994), which are crossover, mutation and inversion. The crossover is by far the
most difficult operator of these three, it uses a number of steps to compute two new chromosomes
from two parents. These steps are the following.
1: Copy parent 1 to child 1 and copy parent 2 to child 2.
Select at random two crossing sites, delimiting the crossing
section, in each of the two parents' group part.
Parent
Parent
2: Inject the contents of the crossing section of the first parent
before the first crossing site of the second child. Because
we are working with the group parts, this means we are
injecting groups of the first parent into the second child.
3: Overwrite the object part of child 2 such that membership of
the newly inserted groups is enforced (inherited from parent
1).
4a: Adapt the resulting groups to satisfy the constraints of the
problem. Here we throw away groups that have become
empty or lost an object in step 3. This can result in objects
which are not assigned to a group. These objects, which
are marked by an x, are put in a queue.
4b: We now have to reinsert the objects which reside in the queue. This can be done by any
heuristic function, as long as the representation remains valid. We do this by looking at the
node we want to insert and, if possible, assigning a color, by using a first-fit heuristic on
a random order of the available colors, such that no constraints are violated. If this is not
possible, we create a new group and assign the object to this group. Note, that this step
can lead to an increase in the number of colors.
5: Execute the steps 3, 4 and 5 again, but with both parents exchanged.
The mutation operator uses a similar procedure. When a chromosome is selected for mutation,
a number of elements in the group part are deleted. When a group is deleted all nodes in the
object part having that color will be temporarily uncolored. After the deletion of groups we will
reinsert the uncolored nodes using the same heuristic that is used in the crossover operator.
The third operator is inversion, which only operates on the group part of the chromosome,
without affecting the object part. We randomly mark two points in the group part of the chromosome
and then reverse the order of the groups between these two points. An example can be
found in Figure 3.
Figure
3: Example of inversion in grouping representation.
The crossover and mutation operators work in such a way that the length of the group part
of a chromosome can vary between the minimal number of colors needed to color a graph and the
number of nodes of the graph. We apply the algorithm to minimize the number of colors needed
to color the graph. For the 3-colorable graph instances we investigate the minimum is known to
be three. Therefore, we let the fitness of a chromosome depend on the number of 'unnecessary'
colors and the amount of nodes which are colored with an 'unnecessary' color, where the three
colors that color the most nodes are considered as 'necessary' and the remaining colors are defined
as 'unnecessary'. For a formal definition of the fitness function let us assume that k is the minimal
number of colors needed for coloring the graph. Furthermore, let a chromosome x use l colors
l with k l. Now let us define g(x; y) as the function that returns the amount of nodes
colored with color y in chromosome x. Without loss of generality we can assume that the colors
are ordered in such a way that Now the
fitness function can be defined as :
l
To minimize function (1) the GGA must minimize the number of colors used for coloring the
graph, it receives penalty points for each extra color and for every node colored with such a color.
It is easy to see that it reaches its global minimum of zero, if and only if the amount of colors
used is equal to the minimum amount of colors needed.
Initialization of the population is done by coloring every individual in the population using
the first-fit heuristic and starting the coloring at a random node. The algorithm contains a
pseudo-sorting procedure using 2-tournament selection. A pseudo-sorted list of individuals is
created by repeatedly selecting two different individuals uniform randomly from the population
to compete with each other. The loser, i.e. the one with the worse fitness value, is removed from
the population and inserted at the top of the list. The procedure stops when the population
becomes a singleton and the last remaining individual is added to the list. The individuals that
were inserted first have 'sank' to the bottom of the list and are seen as the worst individuals,
while those inserted last are the best ones. Note that the algorithm replaces the offspring of
the best N c individuals with the worst N c individuals, therefore the population size must be at
least 2 \Delta N c . As for the parameter setting we compared the values recommended by Falkenauer
in (Falkenauer, 1994) (a population of fifty individuals, N using
an allele mutation probability, giving the probability that an allele from the group part is being
deleted when the individual is undergoing mutation, of 10%) with other values. The best option
turned out to be using more mutation and less crossover, in particular N During
the present investigation these values will be used.
5 Standard Genetic Algorithms
We experimented with several non-grouping genetic algorithms, varying different components.
The common features of the GAs used are summarized in Table 1.
In the integer representation each gene of an individual represents a node in the graph and
its value can be one of the three colors. Thus, the chromosome length L equals the number of
nodes n in the given graph. The fitness function is based on penalizing constraint violation. We
consider each edge as a constraint and in case of m edges the penalty function f is
type steady state
selection 2-tournament
deletion strategy worst-deletion
crossover rate 1.0
mutation rate 1/chrom.length
stop-criterion T max fitness evaluations
Table
1: GA setup used in the experiments, except for the GGA
where w i is the penalty, or weight, assigned to the i-th constraint (edge e i ) and
It is obvious that when the minimum penalty of zero is reached, no constraints are violated and
a solution is found. Here we use the same penalty w for each constraint (edge), thus f simply
counts the violated constraints. It has been conjectured by Falkenauer that this representation
and the corresponding genetic operators are not well-suited for grouping problems, such as graph
coloring, mainly because of the 'blind disruption' of chromosomes, (Falkenauer, 1994). Our
experiments confirmed this conjecture, but one unexpected result deserves special attention.
Namely, increasing the disruptiveness of crossover operators increased GA performance, seemingly
contradicting that crossover is harmfull. Detailed presentation of all results would consume too
much space, a full overview can be found in (Eiben and Van der Hauw, 1996). Here we only
give an illustration in Figure 4 that illustrates that increasing the number of crossover points
in multi-point crossover, (De Jong and Spears, 1992), and increasing the number of parents in
multi-parent crossovers, (Eiben et al., 1994), leads to better results.
Nevertheless, the best GA variant within this representation turned out to be an asexual
GA using only mutation and no crossover in a (1+1) scheme, thus with population size 1 and
preservative selection. Figure 5 shows a comparison of the best asexual (mutation only) and
sexual (using crossover and mutation) variants.
In order-based GAs the individuals are permutations and special operators are used to
recombine and mutate permutations, (Starkweather et al., 1991; Fox and McMahon, 1991).
For graph coloring we define chromosomes as permutations of nodes and apply a decoder that
constructs a coloring from a permutation. So just as for integer representation the chromosome
length is As a decoder we have used the Greedy Algorithm which colors a node with the
lowest color that does not violate constraints and leaves nodes uncolored when no colors are left.
The simplest way of evaluating a permutation is then to use the number of uncolored nodes in
the coloring belonging to it. Formally, we use a penalty function that concentrates on the nodes,
instead of the edges. The function f is now defined as:
AES
Number of parents (diagonal) or crossover points (m-point)
diagonal
m-point
1-point120000160000200000240000
AES
Number of parents
scanning
uniform
Figure
4: Integer representation: effect of more crossover points and more parents on AES for
G eq;n=1000;p=0:025;s=5 . T in each run, the results are averaged over 25 independent
runs for each setting (nr. of crossover points, nr. of parents).0.20.61
Edge connectivity
sexual
AES
Edge connectivity
sexual
asexual
Figure
5: Integer representation: asexual (only mutation) vs. sexual reproduction (uniform
incest prevention) for near the phase transition. T
in each run, the results are averaged over 25 independent runs on each instance.
where w i is now the penalty (or weight) assigned to node i and
1 if node x i is left uncolored because of a constraint violation
Just like before, we use w but while for integer representation the fitness function counted
the 'wrong' edges, here we count the uncolored nodes. Note that the search space for order-based
representation is much bigger than for the integer representation: n! instead of 3 n . Because
at most 3 n different possible colorings exist this coding is highly redundant. Additionally, the
penalty function given in Equation 3 supplies less information than the one given in Equation 2.
These considerations might suggest that this GA will be less successful, but the experiments show
that the opposite is true.
Using this representation we compared different operators, various population sizes and the
effect of using only mutation. The outcomes are similar to those of integer representation, in
the sense that an asexual GA using only SWAP mutation and no crossover in a (1+1) scheme
outperforms the best sexual GA using OX2 crossover together with SWAP on large graphs, see
Figure
6 for illustration. On small graphs this is only partly true, but the global conclusion is that
the asexual GA has the best overall performance and that order based representation is superior
to integer representation.0.20.61
Edge connectivity
sexual
AES
Edge connectivity
sexual
asexual
Figure
Order-based representation: asexual (only SWAP mutation) vs. sexual reproduction
near the phase transition. T in each run,
the results are averaged over 25 independent runs on each instance.
Summarizing our findings on using GAs with traditional representations we can note the
following. The best performance is achieved with an algorithm without crossover, exclusively
using mutation and having population size 1. The question arises whether such an algorithm
still can be seen as genetic. A 'no' is supported by noting that the presence of crossover and a
population with more than one elements is crucial for GAs. However, one could also argue that
the representation and the mutation is standard, only the parameter setting is extreme. To avoid
conflicts with conventions on terminology we percieve and name the winning algorithm variant
as an evolutionary algorithm. To this end note, that in contemporary evolutionary computation
the term evolutionary algorithm comprises among others genetic algorithms, evolution strategies
(ES), and evolutionary programming (EP) (Back et al., 1997), and that (1+1) style alorithms are
common in ES (Schwefel, 1995) and EP always operates without using crossover (Fogel, 1995).
6 Stepwise Adaptation of Weights
Evolutionary algorithms are intrinsically dynamic and adaptive processes. It is thus rather
unnatural to use static control parameters that remain constant during the evolution. Using
constant parameters is, however, the traditional practice. In the meanwhile, there is an increasing
number of papers that consider varying parameter settings. This accumulates knowledge on a
research area that is thus becoming an emerging sub-technology within evolutionary computation.
Looking at related work on varying parameters in EAs one can distinguish common features
several approaches share. The classification in the paper by (Hinterding et al., 1997) distinguishes
three different streams. Dynamic parameters obtain different values along the evolution prescribed
by a user defined schedule. This schedule typically assigns new values to parameters depending
on time, most commonly expressed by the number of generations or fitness evaluations. Adaptive
parameters obtain new values by a feedback mechanism that monitors the evolution. The new
values typically depend on the achieved progress. This progress measure is the input of a
mechanism that resets the parameter. Self-adaptive parameters are encoded in the chromosomes
and undergo evolution themselves. As opposed to the previous two techniques, here there is not
even an indirect user control of this parameter. It is clear that varying parameters suits the general
'evolutionary spirit' better than static ones, furthermore, they have technical advantages. First
of all, they often lead to increased performance. Second, adaptive and self-adaptive parameters
free the user from determining these parameters by having the EA doing it. This reduces the
chance for incorrect parameter settings.
Our approach falls in the adaptive category in the above classification scheme. Technically it
amounts to modifying the weights of components of the penalty function, hence modifying the
fitness landscape during the search, based on feedback from the actual population. This technique
was introduced for constraint solving with GAs in (Eiben et al., 1995b), where the constraints
were weighted. The rationale behind it is clear: satisfying a constraint with a high penalty
gives a relatively high reward to the algorithm, hence it will be 'more interested' in satisfying
such constraints. Thus, using appropriate weights focuses the 'attention' of the algorithm, hence
it can improve the performance. Appropriate in this case means that the constraint weights
should reflect how important, or rather, how difficult a specific constraint is. This causes two
problems. On the one hand, to determine relative hardness of constraints can require substantial
knowledge on the problem. On the other hand, 'being hard' cannot be seen independently from
the applied problem solver. Therefore, it is a natural idea to leave the decision on measures of
hardness to the problem solver itself. Although there are well-founded arguments (Culberson,
1996; Wolpert and Macready, 1997) stating that no search technique can be superior in general,
having an evolutionary algorithm adjusting its parameters itself has been proved to be powerful
under many circumstances (Angeline, 1995; Hinterding et al., 1997). In the particular case of
constraint satisfaction problems we expect that a mechanism enabling the GA to learn weights
itself can circumvent difficulties of setting these weights by a human user.
It is interesting to note that using adaptive, or learning features to improve search performance
is done for other types of algorithms too. The breakout method of Morris (Morris, 1993) is
the earliest example we know of. Adaptive memory features as advocated by Glover, (Glover,
1996), and applied by Lkketangen and Glover, (Lkketangen and Glover, 1996), are close to
the 'evolutionary spirit' and work very well on constrained problems. Also, variants of the the
GSAT algorithm for satisfiability problems by Selman and Kautz, (Selman and Kautz, 1993)
and Frank, (Frank, 1996b; Frank, 1996a), apply mechanisms that re-evaluate weights of clauses
during the search process.
The best EA for our graph 3-coloring problem we found so far uses order-based representation
penalizing uncolored nodes. We extend this variant with an adaptive mechanism, thus the basic
idea is now implemented by monitoring which variables in the best individual violate constraints
and raising the penalty w i belonging to these variables. Depending on when the weights are
updated we can distinguish an off-line (after the run) and an on-line (during the run) version of
this technique, see Figure 7 and Figure 8.
Off-line saw
set initial weights (thus fitness function f)
for x test runs do
run the GA with this f
redefine f after termination
end for
Figure
7: Pseudo code of the off-line weight adaptation mechanism
On-line saw
set initial weights (thus fitness function f)
while not termination do
for the next Tp fitness evaluations do
let the GA go with this f
end for
redefine f and recalculate fitness of individuals
while
Figure
8: Pseudo code of the on-line weight adaptation mechanism
In (Eiben et al., 1995a) and (Eiben and Ruttkay, 1996) the off-line version was applied, here
we will use the on-line version modifying the weights, hence modifying the fitness function, during
the evolution. After a certain period, in particular T p fitness evaluations, the best individual in
the population is colored and the weights of its uncolored nodes (that are considered hard for the
are increased by 4w, i.e. w i is set to w i +4w. This implies that the EA has to search on a
dynamically changing fitness landscape, consequently the population has to be re-evaluated after
each period 3 . We call this mechanism Stepwise Adaptation of Weights (SAW).
3 Hereby the total number of fitness evaluations will not equal the total number of generated individuals. It could
be argued that the number of re-evaluations should be included in the total number of evaluations. However, we
want to count the search steps by the total number of generated colorings. Besides, re-evaluation is computationally
It is very interesting to see the fitness curve of a run of the EA with the SAW mechanism.
Figure
shows a run when a solution is found. The left curve has a higher resolution, displaying
the fitness of the best individual between 0 - 10000 evaluations, the right curve shows the range
80000. The higher resolution curve (left) shows that within each period the penalty drops
as the EA is making progress and then sharply rises when the weights are updated, giving the
image of a SAW!
Note that the SAW mechanism introduces two new parameters, T p and 4w. It is thus
important to check whether the performance of a SAW-ing EA is sensitive for the parameter
values. To this end we performed an extensive test series that showed that the performance is
pretty much independent from these parameters. As an illustration we present the outcomes for
for the asexual as well as for the sexual order-based EA in Figure 9 and 10. The
exact values for 4w and T p do not have a significant effect on the performance, as long as T p is
significantly smaller than T max . From now on, we will use
reason. Figure 9 and 10 also show that, also in the presence of the SAW mechanism the sexual
EA using OX + SWAP is clearly inferior to the asexual variant.0.20.61
OX2+SWAP100000200000300000
AES
Figure
9: Effect of varying 4w on G eq;n=1000;p=0:010;s=5 . T uses
population size 1, OX2+SWAP uses population size 700.
The effect of the SAW mechanism on the EA performance on graphs with
can be seen in Table 2. The increase in performance after adding the SAW-ing
mechanism is dramatic: the success rate averaged over all seeds raises from 9% to 92%, while
the number of search steps drops from 205643 to 89277. The figures show not only that a
SAW-ing EA highly outperforms the other techniques, but also that the performance is rather
independent from the random seeds. Thus, the SAW mechanism is not only highly effective,
obtaining much better success rates at lower costs, but also very robust. Somewhat surprising is
the low performance of the GGA. On average it terminates with 5 colors and approximately 50
nodes in the 'unnecessary' colors.
cheap: the individual needn't be decoded again, only the sum in Equation 3 has to be re-computed for its uncolored
nodes. Therefore, the number of re-evaluations is not included in the total cost.
2000 4000 6000 8000 10000
OX2+SWAP100000200000300000
AES
Figure
10: Effect of varying T p on G eq;n=1000;p=0:010;s=5 . uses
population size 1, OX2+SWAP uses population size 700.
7 Comparing the GGA, the SAW-ing EA and DSatur
The results summarized in Table 2 serve as an indication of the viability of our SAW-ing
mechanism. For a solid conclusion on the performance of the SAW-ing EA we perform an extensive
comparison between the Grouping GA as described in Section 4, DSatur with backtracking, and a
SAW-ing EA with order-based representation, simple greedy decoder, OneSWAP mutation 4 and
no crossover in a (1+1) selection scheme using T for the SAW mechanism.
The comparison is performed on arbitrary 3-colorable, equi-partite 3-colorable and flat 3-colorable
graphs for connectivities around the phase transition.
The results are based on 100, 50 and 25 runs for
For all instances, the graph is generated with seed 5. DSatur and both GAs are allowed
search steps.
The test results concerning SR and AES values are given in the Figures 11 - 13. The Grouping
GA is inferior to the other two algorithms on all graph instances. On small graphs
DSatur is better for all p's than the SAW-ing EA, except for flat graphs near the phase transition,
see
Figure
13 for On medium size graphs (n = 500) the SAW-ing EA is slightly better on
arbitrary and equi-partite topologies. On flat graphs we see that the performance of the SAW-ing
EA deteriorates much less at the phase transition than that of DSatur. On large graphs
the SAW-ing EA is clearly better w.r.t. success rates, because it is often able to find solutions
where DSatur does not find any. The AES curves are sometimes crossing, but in general the
SAW-ing EA needs fewer steps. The reason for these differences could be that the instances with
are small enough for DSatur to get out of local optima and find solutions, while this is not
possible anymore for where the search space becomes too big. Evaluating
the overall usefulness of the SAW-ing EA for graph coloring one has to consider two cases. On
Additional tests (not reported here) showed that OneSWAP which always swaps exactly one pair of genes is
slightly better for the (1+1) GA than usual SWAP.
the easy problems, i.e. small graphs and far from the phase transition DSatur is better. On
the hard instances near the phase transition and on large graphs the SAW-ing EA outperforms
DSatur. These results are very good in the light of the fact that DSatur is a highly problem
tailored graph coloring algorithm, whereas the SAW-ing EA is a general purpose algorithm for
constraint satisfaction, using no specific domain knowledge on graph coloring. Another strong
property of the SAW-ing EA is that it can take more advantage of extra time given for search.
We increased the total number of evaluations to 1000000 and observed that DSatur still had
SR=0.00 on G eq;n=1000;p=0:008;s=5 . The performance of the SAW-ing EA, however, increased from
SR=0.00 to SR=0.44 (AES=407283), showing that it is able to benefit from more time given,
where the extra time for backtracking is not enough to get out of the local optima.
It is an important question how the performance of an algorithm changes if the problem size
grows. This is the issue of scalability, which we will consider w.r.t. to the success rates and the
computational complexity. Thus, while the figures 11 - 13 were drawn for fixed n's and varying
p's, in the sequel we vary n (and keep related to it). We tested the
three algorithms using the same parameters as before for 8:0=n at the phase transition. The
results are given in Figure 14 showing that the Grouping GA could only solve the smallest problem
instances and DSatur was not able to find solutions on larger problem instances. Therefore, we
also made a comparison on easier instances for Figure 15 exhibits these results
showing that the SAW-ing EA scales up much better than the other two methods.
As discussed in Section 3 even the implementation independent number of search steps is not
ideal for comparing different algorithms. Nevertheless, comparing the growth rate of the number
of search steps when the problem size (the number of nodes in the graphs to be colored) grows
gives a sound basis for judgment, even though the absolute meaning of the given numbers may
differ. The scale-up curves for AES on the right hand side plots of Figure 14 (p = 8:0=n) and
Figure
show interesting results. On the easier case, for DSatur is
faster up to but the SAW-ing EA scales up much better. On the really hard graphs,
8:0=n, the SAW-ing EA outperforms DSatur already from The curves for both
edge connectivity values indicate that the SAW-ing EA scales up linearly with the problem size.
Edge connectivity (n=200)
DSatur
GGA 0100000200000300000
AES
Edge connectivity (n=200)
DSatur
Edge connectivity (n=500)
DSatur
GGA 0100000200000300000
AES
Edge connectivity (n=500)
DSatur
Edge connectivity (n=1000)
DSatur
GGA 0100000200000300000
AES
Edge connectivity (n=1000)
DSatur
GGA
Figure
11: Comparison for arbitrary 3-colorable graphs, for
Edge connectivity (n=200)
DSatur
GGA 0100000200000300000
AES
Edge connectivity (n=200)
DSatur
Edge connectivity (n=500)
DSatur
GGA 0100000200000300000
AES
Edge connectivity (n=500)
DSatur
Edge connectivity (n=1000)
DSatur
GGA 0100000200000300000
AES
Edge connectivity (n=1000)
DSatur
GGA
Figure
12: Comparison for equi-partite 3-colorable graphs, for
Edge connectivity (n=200)
DSatur
GGA 0100000200000300000
AES
Edge connectivity (n=200)
DSatur
Edge connectivity (n=500)
DSatur
GGA 0100000200000300000
AES
Edge connectivity (n=500)
DSatur
Edge connectivity (n=1000)
DSatur
GGA 0100000200000300000
AES
Edge connectivity (n=1000)
DSatur
GGA
Figure
13: Comparison for flat 3-colorable graphs, for
Number of nodes
DSatur
GGA2000006000001000000
50 250 500 750 1000 1250 1500
AES
Number of nodes
DSatur
GGA
Figure
14: Scale-up curves for SR and AES on equi-partite graphs with based on
runs.
Conclusions
NP-complete problems, such as graph coloring, form a big challenge for designers of algorithms
in general. For evolutionary algorithms, in particular, constraint satisfaction problems form a
specific challenge. In this paper we investigated how EAs can be applied for graph 3-coloring.
After trying several traditional genetic algorithm variants based on integer and order-based
representation we concluded that using only mutation is better than using mutation and crossover.
This fact is in accordance with the common opinion in evolutionary computation that traditional0.20.61
50 250 500 750 1000 1250 1500
Number of nodes
DSatur
AES
Number of nodes
DSatur
GGA
Figure
15: Scale-up curves for SR and AES on equi-partite graphs with based on
runs.
genetic crossovers are not appropriate for so-called grouping problems, because they 'blindly'
disrupt chromosomes. However, it is interesting to note that in integer representation using
more crossover points and more parents -which both imply heavier mixing than usual operators-
increases the performance, cf. Section 5.
As discussed at the end of Section 5, it can be argued that swithching off crossover and
setting the population size to 1 in a genetic algorithm results in an algorithm that cannot be
called anymore. Iterated stochastic hill-climbing could be an appropriate name, but we
rather use the name evolutionary algorithm. This name reflects the origin of the method and there
are other algorithms in evolutionary computation that use exclusively mutation, or population
size 1 (Fogel, 1995; Schwefel, 1995).
Following the recommendations that on grouping problems special representations and
crossovers are advisable (Falkenauer, 1994), we have implemented and tested the grouping GA.
Surprisingly, the GGA is inferior to a simple order-based asexual EA, see Table 2. This, suggests
that using specific grouping operators is not the only solution for handling the graph coloring
problem. Using only mutation and population size 1 works as well.
The main research subject of this investigation is the technique called Stepwise Adaptation
of Weights. This mechanism is problem independent and it amounts to repeatedly redefining the
weights that are used in the definition of the fitness (penalty) function. Similar mechanisms have
been applied in other search algorithms; here we use it in an EA. Adding the SAW mechanism
to the simple order-based asexual EA increased its performance with a factor 10 (success rates
increased from 9% to 92%), and made it the best algorithm on the problem instances we used for
a preliminary comparison, cf. Table 2.
SR AES SR AES SR AES SR AES SR AES
DSatur
Table
2: Comparing DSatur with backtracking, the Grouping GA, (1+1) order-based GA using
SWAP and (1+1) order-based GA using SWAP and the SAW mechanism (T
different seeds.
Conducting an extensive series of experiments on three different types of graph, three different
sizes and various edge connectivity values confirmed that the SAW-ing EA is a powerful graph
coloring algorithm. The SAW-ing EA was better than the GGA and also outperformed DSatur
by three criteria: 1) on the hardest graph instances it performs better than DSatur, 2) it is able
to increase its performance when given more time, whereas DSatur is not, scales up much
better, indicating a linear scale-up w.r.t. computational complexity. Especially nice about the
SAW-ing EA is that it is not tailored to the problem of graph coloring. Our findings are thus
relevant in the broader context of evolutionary constraint handling. The SAW mechanism helps
to circumvent a major problem of penalty based evolutionary constraint handling techniques by
letting the GA find the right constraint weights.
Further research concerns application of SAW-ing to other (NP-complete) constrained
problems and investigating variations of the SAW mechanism. Straightforward modifications
are varying the value of 4w over the constraints, and allowing decreasing w i for constraints that
are already satisfied. Especially interesting to study is the learning procedure based on combining
frequency and recency based memory of Lkketangen and Glover, where the changes in weights
are related to solution quality, (Lkketangen and Glover, 1996).
Finally, let us make an additional note on the constraint weights the EA finds. The plots in
Figure
suggest that problem solving with the SAW mechanism happens in two phases. In the
first phase the EA is learning a good setting for the weights. In this phase the penalty increases a
lot because of the increased weights. In the second phase the EA is solving the problem, exploiting
the knowledge (appropriate weights) learned in the first phase. In this phase the penalty drops
sharply indicating that using the right weights (appropriate fitness function) in the second phase
the problem becomes 'easy'. This interpretation of the fitness curves is plausible. We, however,
do not want to suggest that the EA could learn universally good weights for a given graph
instance. In the first place, another problem solver might need other weights to solve the same
problem. Besides, in a control experiment we applied the SAW-ing EA to a graph, thus learning
good weights, and then applied the EA to the same graph again using the learned weights non-
adaptively, i.e. keeping them constant along the evolution. The results showed worse performance
than in the first run when adaptive weights were used. Suggesting that the SAW mechanism works
by enabling the problem solver to discover some hidden, universally good weights is, therefore,
wrong. This seems to contradict the interpretation that distinguishes two phases of search. At
the moment we tend to see the main advantage of SAW in allowing the EA to shift the focus
of search (quasi) continuously and thus allowing implicit problem decomposition that guides the
population through the search space.2006001000140018000 2000 4000 6000 8000 10000
Fitness
Evaluations5001500250035000 20000 40000 60000 80000
Fitness
Evaluations
Figure
Fitness curve for the SAW mechanism for SWAP,
--R
Adaptive and self-adaptive evolutionary computation
Proof verification and hardness of approximation problems.
Handbook of Evolutionary Computation.
Institute of Physics Publishing Ltd
An O(n 0:4
New methods to color vertices of a graph.
Where the really hard problems are.
Problem structure heuristics and scaling behavior for genetic algorithms.
A discussion on some design principles for efficient crossover operators for graph coloring problems.
On the futility of blind search.
Exploring the k-colorable landscape with iterated greedy
A formal analysis of the role of multi-point crossover in genetic algorithms
Constraint satisfaction problems.
Graph coloring with adaptive evolutionary algorithms.
A new representation and operators for genetic algorithms applied to grouping problems.
A hybrid grouping genetic algorithm for bin packing.
A genetic algorithm for bin packing and line balancing.
Evolutionary Computation.
Genetic operators for sequencing problems.
Computers and Intractability: A Guide to the Theory of NP-Completeness
Tabu search and adaptive memory programming - advances
On colouring random graphs.
Adaptation in Evolutionary Computation: a survey.
Optimization by simulated annealing: An experimental evaluation
Operations Research
Algorithms: Their Complexity and Efficiency.
Intelligent structural operators for the k-way graph partitioning problem
In (Belew and Booker
Surrogate constraint methods with simple learning for satisfiability problems.
The breakout method for escaping from local minima.
Evolution and Optimum Seeking.
A comparison of genetic sequenceing operators.
Almost all k-colorable graphs are easy to color
--TR
--CTR
Steven Prestwich, Coloration Neighbourhood Search With Forward Checking, Annals of Mathematics and Artificial Intelligence, v.34 n.4, p.327-340, April 2002
Rhyd Lewis, Metaheuristics can solve sudoku puzzles, Journal of Heuristics, v.13 n.4, p.387-401, August 2007
Mrk Jelasity , Pilar Martnez Ortigosa , Inmaculada Garca, UEGO, an Abstract Clustering Technique for Multimodal Global Optimization, Journal of Heuristics, v.7 n.3, p.215-233, May 2001
Domingo Ortiz-Boyer , Csar Hervs-Martnez , Nicols Garca-Pedrajas, Improving crossover operator for real-coded genetic algorithms using virtual parents, Journal of Heuristics, v.13 n.3, p.265-314, June 2007
Peter Ross , Emma Hart , Dave Corne, Genetic algorithms and timetabling, Advances in evolutionary computing: theory and applications, Springer-Verlag New York, Inc., New York, NY, | adaptive parameters;genetic algorithms;constraint satisfaction;penalty functions;evolutionary algorithms;graph coloring;grouping problem |
594977 | Tabu Search for Frequency Assignment in Mobile Radio Networks. | The main goal of the Frequency Assignment Problem in mobile radio networks consists of assigning a limited number of frequencies to each radio cell in a cellular network while minimizing electromagnetic interference due to the reuse of frequencies. This problem, known to be NP-hard, is of great importance in practice since better solutions will allow a telecommunications operator to manage larger cellular networks. This paper presents a new Tabu Search algorithm for this application. The algorithm is tested on realistic and large problem instances and compared with other methods based on simulated annealing, constraint programming and graph coloring algorithms. Empirical evidence shows that the Tabu algorithm is very competitive by giving the best solutions to the tested instances. | Introduction
The Frequency Assignment Problem (FAP) is one of the key applications in mobile radio
networks engineering 1 . Although different versions of the FAP can be defined, the main
purpose is to assign a limited number of available frequencies to each cell in a mobile radio
network while minimizing electro-magnetic interference due to the re-use of frequencies.
The difficulty of this application comes from the fact that an acceptable solution of the
FAP must satisfy a set of multiple constraints, which impose conflicting objectives. The
most severe constraint concerns a very limited radio spectrum consisting of a small number
of frequencies (or channels). Telecommunications operators such as France Telecom must
cope with a maximum of 60 frequencies for their networks, whatever the traffic volume
Work supported by the CNET (French National Research Center for Telecommunications) under the
grant No.961B134.
1 The frequency assignment problem studied in this paper applies essentially to widely used cellular
networks and does not necessarily apply to other wireless technologies, such as the CDMA.
to be covered, and this, in agreement with national and international regulations. This
constraint imposes a high degree of frequency re-use, which in turn increases the probability
of frequency interference. Indeed, in addition to this constraint, there are frequency
interference constraints which state that frequencies assigned to some cells must satisfy
a given separation distance in the frequency domain.
The basic FAP can be shown to be NP-hard in its simplest form because it is reduced
to the graph coloring problem [13]. More generally, the problem is equivalent to the so-called
"set T-coloring problem" [20]. Therefore, it is very unlikely to find any efficient
algorithm for this problem. So far, many heuristic methods have been proposed to tackle
the FAP in cellular networks, including graph coloring algorithms (GCA) [11], constraint
programming (CP) [1], simulated annealing (SA) [8], artificial neural networks [18, 10],
evolutionary algorithms (EAs) [14] and Tabu Search (TS) [15]. Similar techniques have
been developed and experimented on a closely related problem called "radio link frequency
assignment" in the setting of military application [6, 17, 3, 4].
In this paper, we present a new and highly effective TS algorithm tailored for the
frequency assignment problem. This algorithm distinguishes itself from previous algorithms
by some important features such as incremental evaluation of solutions, dynamic tabu
tenure, candidate list strategy, and co-cell constraints handling. Experiments carried out on
realistic and large problem instances (up to 300 cells, 30,000 constraints with
show that this TS algorithm is very competitive and gives us the best results for the tested
instances compared with other methods based on graph coloring algorithms, constraint
programming, and simulated annealing.
The paper is organized as follows. In Section 2, the FAP is modeled as an optimization
problem. In Section 3, TS is briefly reviewed. In Section 4, the components of the TS
algorithm are described. In Section 5, after a review of the test data, experimental results
are presented and compared. Conclusions are given in the last section.
2 The Frequency Assignment Problem
2.1 Constraints in the FAP
A cellular network is defined by a set fC of N cells, each cell C i requiring T i
frequencies. The number T i , called the traffic of C i , is determined by an estimation of the
maximum number of communications which can simultaneously arise within a cell.
The basic FAP consists of assigning to each cell C i of the network T i frequencies
taken from a set of available frequencies while respecting a set of frequency interference
constraints. Since the number of available frequencies is very limited and usually much
smaller than the sum of the total traffics of the network, frequencies must be re-used by
different cells in an assignment. It is this frequency re-using that may lead to frequency
interference.
Interference occurs when two frequencies assigned to a same cell or two adjacent cells 2
are not sufficiently separated. Therefore, the frequency interference constraints over a
network are divided into co-cell constraints and adjacent-cell constraints.
ffl co-cell constraint: any pair of frequencies assigned to a radio cell must have a certain
distance between them in the frequency domain.
Two cells are adjacent if they emit within a common area even if they are not geographically adjacent.
ffl adjacent-cell constraint: any pair of frequencies assigned to two adjacent cells must
be sufficiently separated in the frequency domain.
These interference constraints are conveniently represented by a symmetric compatibility
matrix M [N; N ] where N is the number of cells in the network and each element of M
is a non negative integer. Let f i;k denote the value of the kth frequency (k 2 f1::T i g) of
denote the set of NF available frequency values, then the interference
constraints are formulated as follows:
is the minimum frequency separation necessary to satisfy the
co-cell constraints for the cell C i . 8m,
represents the minimum frequency separation required to
satisfy the adjacent-cell constraints between two cells C i and C j . M [i; means
there is no constraint between the cells C i and C j .
2.2 Optimization in FAP
Given a network defined by N cells with T i traffic for each cell C i and the compatibility
matrix M , two basic optimization (minimization) problems can be defined.
The first problem consists of minimizing frequency interference with a fixed number
of frequencies. In this case, the optimization problem is defined by a couple (S,f) where
the search space S is defined by the set of all possible frequency assignments and the cost
function f to be minimized is defined as follows. For any s in S, f(s) represents frequency
interference, measured by the number of unsatisfied co-cell and adjacent-cell constraints.
More formally, one has:
ae
ae
The second problem consists of minimizing the number of frequencies required in an
assignment 3 . This problem can be dealt with as a series of the first
problems as follows.
To minimize the number of frequencies NF used in an assignment, one fixes NF to
a sufficiently high value 4 and seeks an interference-free assignment s
the above mentioned search space S and the cost function f. If such an interference-free
assignment is found, one proceeds with NF-1 frequencies and so on. This process continues
until one can no longer find an interference-free assignment. This minimization process is
similar to that used by Hertz and de Werra in their TS algorithm for graph coloring [16].
Let us notice that minimizing the number of frequencies used is of great importance in
practice since free frequencies can easily be used for extensions to an existing network.
3 More generally, the interference-free requirement may be relaxed to allow any interference threshold.
4 This initial value can be determined with a greedy method.
3 A Brief Review of Tabu Search
This section gives a brief review of Tabu Search, emphasizing the most important features
which have been implemented in our TS algorithm. For a complete presentation of TS,
the reader is invited to consult the recent book by Glover and Laguna [12].
Tabu Search is a meta-heuristic designed for tackling hard combinatorial optimization
problems. Contrary to randomizing approaches such as SA where randomness is extensively
used, TS is based on the belief that intelligent searching should embrace more systematic
forms of guidance such as memorizing and learning.
can be described as a form of neighborhood search with a set of critical and
complementary components. For a given instance of an optimization problem characterized
by a search space S and a cost function f, a function N: S ! 2 S is first introduced to
determine a neighborhood. A typical TS algorithm begins then with an initial configuration
s in S and then proceeds iteratively to visit a series of locally best configurations following
the neighborhood function. At each iteration, a best neighbor s' 2 N(s) is sought to replace
the current configuration even if s' does not improve the current configuration in terms
of the cost function. To avoid the problem of possible cycling and to allow the search to
go beyond local optima, TS introduces the notion of Tabu list, one of the most important
components of the method.
A tabu list is a special short term memory that maintains a selective history H,
composed of previously encountered solutions or more generally pertinent attributes of
such solutions. A simple TS strategy based on this short term memory H consists in
preventing solutions of H from being reconsidered for next k iterations (k, called tabu
tenure, is problem dependent). Now, at each iteration, TS searches for a best neighbor
from this dynamically modified neighborhood N(H,s), instead of N(s) itself. Such a strategy
prevents Tabu from being trapped in short term cycling and allows the search process to
go beyond local optima.
When attributes of solutions instead of solutions are recorded in tabu list, some non-
visited, yet interesting solutions may be prevented from being considered. Aspiration
criteria may be used to overcome this problem. One widely used aspiration criterion
consists of removing a tabu classification from a move when the move leads to a solution
better than the best obtained so far.
uses an aggressive search strategy to exploit its neighborhood. Therefore, it is
crucial to have special data structures and techniques which allow a fast updating of move
evaluations, and reduce the effort of finding best moves. Moreover, candidate list strategies
may be used to limit the neighbors to be considered at each iteration to a subset of the
neighborhood. A typical strategy consists of identifying subsets of influential moves,
such as those considered promising to lead to improved solutions. A good candidate list
strategy combined with an efficient technique for move evaluations is essential for high
solution speed and good quality.
There are other techniques available in TS such as intensification and diversification.
In this paper, we show that a TS algorithm based on the above mentioned elements may
be very effective and robust.
The following notations will be used in the presentation: N the number of cells of a network,
NF the number of available frequencies, f1.NFg the set of NF frequency values, C i and T i
a cell and its traffic, f i;k (f i;k 2 f1.NFg) the value of the kth frequency of C i .
4.1 Components
Configuration, search space and cost function
Given a FAP instance involving N cells, traffics T i (i 2 f1.Ng), a set of frequency values
f1.NFg, and a compatibility matrix M [N; N ], a configuration s corresponds to a complete
frequency assignment:
In other words, a configuration is a frequency assignment satisfying the co-cell constraints
of the given instance. The search space S of the instance is therefore composed of all such
configurations.
According to equation (1) (Section 2), for each solution s 2 S, f(s) corresponds to the
total number of unsatisfied interference constraints. Since co-cell constraints are taken
into account by the configuration s, f(s) is now simplified to be the number of unsatisfied
adjacent-cell constraints. Note that for an interference-free assignment s,
An alternative approach consists of not imposing the satisfaction of co-cell constraints.
However, as explained later, directly integrating co-cell constraints into configurations is
an important factor in improving the search efficiency for this application.
Neighborhood and candidate list
Given S, the neighborhood function N defined as follows: s and s' 2 S are
neighbors if they are different at the value of a single frequency of a cell. More formally,
let s(f i;k ) denote the value of the kth frequency of the cell C i in s, then s' 2 N(s) if and
only if the following condition is verified:
such that s(f i;m ) 6= s'(f i;m ) and
Therefore, a neighbor of s can be obtained by changing the value f i;m of the mth frequency
of a cell C i in s in such a way that the new value always satisfies the co-cell constraint. A
move is thus characterized by a triplet ! being respectively a cell, a
frequency of the cell and a frequency value.
The members of N(s) are not equally interesting. Indeed, it will be less pertinent
to change a frequency value which does not violate any interference constraint. This
observation leads us to define the following candidate list strategy:
are different at the value of a conflicting frequency 5 g
5 A frequency of a cell is said to be conflicting if its value violates some interference constraints.
Clearly, the size of V varies during the search according to the number of conflicting
frequencies and in general is much smaller than jN(s)j. This candidate list strategy helps
the search to concentrate on influential moves and to avoid irrelevant ones. Moreover, it
significantly reduces the number of neighbors to be considered at each iteration.
Incremental evaluation and neighborhood examination
For any solution s, its cost f(s) represents frequency interference, measured by the
number of unsatisfied interference constraints. Since the number of neighbors to consider
may be very high at each iteration, we adopt a fast evaluation method inspired by a
technique proposed by Fleurent and Ferland [9]. Let us note
. The main
idea consists of maintaining incrementally in a NF W matrix ffi the move value or cost
variation for each possible move of the current solution s. Each time a move is carried
out, the elements of the matrix affected by the move are updated accordingly. Initializing
After a move, the matrix can be updated in time O(NF W )
in the worst case. A best neighbor in V can be searched in time O(jV j). Given that jV j
is smaller then NF W , each iteration takes thus time O(NF W ) in the worst case.
Tabu list and tabu tenure
When the value of a frequency of a cell C i in a solution s is changed to a new value,
the classified tabu for k (tabu tenure) iterations. That is, the
old value will not be allowed to be re-assigned to C i during this period. To implement the
tabu list, we use an N NF matrix T. Each time ! cell; old value ? is added to the tabu
list, the corresponding element of T is set to the current iteration number plus tabu tenure
k. At any moment, it is easy to verify if a given move is tabu or not by simply comparing
the current iteration number with that recorded in the tabu matrix T.
The tabu tenure k is dynamically adjusted by a function defined over the size of the
candidate list V . More precisely, ff is a value from (0,1] and k is bounded
by two constants Min and Max. Since jV j varies during the search, so does k for any fixed
ff. ff typically takes values from 0.1 to 0.5. To avoid too large values of k due to the
presence of many conflicting cells in a configuration, a constant Max is used to limit k.
Similarly, a lower bound Min is used to prevent k from becoming too small at late stages
of the search. Min and Max are typically fixed at 10 NF and NF.
Aspiration criteria
A very simple aspiration criterion is used: the tabu status of a move is cancelled if the
move leads to a solution better than the best solution s* encountered so far.
4.2 Tabu Algorithm
Now that the components of the TS algorithm have been presented, we give below the
general algorithm.
Tabu algorithm
begin
initialize the iteration counter */
generate an initial solution */
record the best configuration found so far */
while Iter ! MAX do
choose a best neighbor
such that NB ? T [i; new v] or f(s') ! f
update
update tabu tenure k
Figure
1. Tabu Search Algorithm for the Frequency Assignment Problem
This algorithm can directly be used to deal with the first optimization version of the
frequency assignment problem defined in Section 2, i.e. to minimize frequency interference
with a fixed number of NF frequencies. The algorithm stops and returns the best assignment
found after MAX iterations.
This algorithm can also be used to minimize the number of frequencies NF required in
an interference-free assignment as explained in Section 2.2:
1. apply the above TS algorithm to search an interference-free assignment s
with NF frequencies;
2. decrement NF, i.e. NF / NF-1, and go to step 1 if such an assignment is found;
3. stop and return NF+1 if no interference-free solution is found within MAX iterations.
Each time the TS algorithm is called with a decremented number of frequencies, an
initial configuration using NF-1 frequencies must be generated. There are two possibilities
to do this. First, one can generate a completely new configuration from scratch. Second,
one can re-use the last assignment obtained with NF frequencies as follows: for each
frequency having a value greater than the decremented NF, it is given a new value randomly
taken from 1 to the decremented NF 6 .
Note finally that this optimization process can be used to minimize the number of
frequencies NF required by an assignment with any admissible interference threshold.
4.3 Comments on the TS Algorithm
The current TS algorithm distinguishes itself from a previous TS algorithm [15] by some
important features. The first feature concerns the evaluation method. The ffi matrix
6 Given the definition of a configuration, this new frequency value must verify co-cell constraints.
introduced above allows a fast searching of best moves and an efficient updating of move
values. Conversely, no data structure is used in [15] to record move values. The evaluation
of neighbors is thus expensive and very time-consuming in the previous TS algorithm.
The second point concerns the candidate list strategy. It is well-known that the
number and nature of the neighbors visited at each iteration have a great influence on
the performance of a TS algorithm. The conflict-based strategy is an informative way to
isolate influential moves and is more efficient than the entire neighborhood. Experimental
data are presented in Section 5.4. to support this point.
The third point concerns the way co-cell constraints are handled. In the initial problem
formulation, both co-cell and adjacent-cell constraints are used to define the cost function
(see Section 2). Therefore, both of them can be treated exactly in the same way to evaluate
the quality of a configuration. This is the approach taken in [15]. However, a close look
at these two types of constraints makes it clear that they are in fact different. In some
sense, co-cell constraints are harder to solve than adjacent-cell constraints since co-cell
constraints, defined on each pair of frequencies of a same cell, form cliques. As shown
in [7], it is more interesting to remove these hard constraints from the cost function and
solve them first. This is realized by imposing the satisfaction of co-cell constraints by all
configurations (feasibility with respect to these constraints). This technique, called co-cell
handling (CCH) in [7], allows to reduce the search space and to simplify the cost function.
Experimental data are presented in Section 5.4. to support this point.
Finally, the dynamic tabu tenure is another factor contributing to the efficiency of the
algorithm. Indeed, it seems more natural to allow the tabu tenure to adjust itself during
the search than to impose a fixed value.
5 Experimentation and Results
In this section, we present experimental results of the TS algorithm on two sets of real size
FAP instances provided by the French National Research Center for Telecommunications.
These instances are produced by a generator in such a way that they reflect various
situations encountered in real networks or sub-networks of France Telecom. The main goal
here consists of finding interference-free assignments with a minimal number of
frequencies.
Two sets of experiments were carried out. The first one aims to evaluate the performance
of the Tabu algorithm by comparing it with a baseline algorithm. The purpose of the second
one is to compare the results of the Tabu algorithm with the best known results on the
same instances obtained with other methods.
5.1 Tests
Test
The first set of FAP instances has the following characteristics.
i.e. each cell is assigned one frequency. Consequently, a
co-cell constraint does not exist.
ffl adjacent constraint: jf for two adjacent cells
must be assigned different frequency values.
It is easy to see that these instances correspond to the classic graph coloring problem.
Finding an optimal frequency assignment is equivalent to coloring a graph using only
a minimum number (the chromatic number) of colors. For this test set, the chromatic
noted Opt for each instance, is known in advance.
These instances are labeled as NF.N.d representing respectively the optimal number of
frequencies needed for an interference-free assignment, the number of cells in the network
and the density of interference constraints over the network. For example, 8.150.30 defines a
network composed of 150 cells with 8 the number of frequencies required in an interference-free
assignment and 30% of a total of 150*(150-1)/2 interference constraints.
Test
The second set of FAP instances has the following characteristics.
i.e. each cell is assigned two frequencies.
i.e. two frequencies assigned
to the same cell must have a minimum distance of 3.
ffl adjacent constraint: jf
are adjacent cells; i.e. two frequencies assigned to two adjacent cells must have a
minimum distance of 1 or 2 according to the cells.
The instances of this set are labeled as q.N.d.p. The first parameter has no special
meaning. The second and third parameters have similar meanings to those of the first
set. The fourth parameter allows distinguishing between different instances of the same
class. For this set of instances, the exact optimal number of frequencies for an interference-free
assignment is no longer known due to the way the instances are generated, but it is
bounded by a lower bound LB given by the generator.
Compared with the first set, these instances are often larger in terms of the number
of constraints due to the doubled traffic. Large instances of 300 cells (representing 600
integer variables) contain up to 30,000 interference constraints. As we will see in the next
section, these instances are usually harder to solve than those of the first set.
5.2 Performance Evaluation
5.2.1 Baseline Algorithm
In order to evaluate the performance of the Tabu algorithm, we need a reference for
comparison. We take the standard steepest descent (SD) algorithm (with re-runs) as a
baseline reference for several practical reasons. First, SD is a well known and simple
algorithm. Second, SD requires no parameter to tune. Third, from the point of view of
implementation, SD and TS may share many important data structures. Forth, the results
of SD will give us some indication as to the difficulty of the instances tested.
The SD algorithm consists of repeating the following SD operation:
Steepest descent (SD): At each iteration, choose a best neighbor s' 2 V* such that
ties randomly).
We must point out that the SD algorithm uses the same neighborhood N(s), candidate
list V* and evaluation method as those used by the TS algorithm.
5.2.2 Method of Experimentation and Evaluation Criteria
The TS algorithm is run with initial random configurations. For a fixed number of
frequencies, TS is run 10 times, each run being limited to a maximum of 100,000 iterations.
Once an interference-free assignment is found with NF frequencies, the TS algorithm is
called with a new random assignment using NF-1 frequencies.
The parameter ff of tabu tenure determined according to the following
process. Values from 0.1 to 0.5 were tested for each instance with limited iterations (50,000
in this study) and the best one is used in later experiments (100,000 in this study).
In order to make the comparison between TS and SD as fair as possible, we give both
algorithms the same number of iterations (100,000). However, while TS may improve its
results with more iterations, this is not the case for SD. To avoid this problem, we give SD
more re-runs. For each run of TS, SD is run 20 times, each being limited to 5,000 iterations
in order to reach 100,000 iterations. The number 5,000 is empirically determined in such
a way that it is sufficiently high for SD to reach local optima and move around with some
side-walks.
The following three criteria are used to carry out the evaluation.
NF(S) the smallest number of frequencies found for an interference-free assignment, followed
in parenthesis by the number of successful runs which find such an interference-free
assignment with NF frequencies. This criterion reflects the quality of a solution.
Iter the number of iterations averaged over successful runs for the smallest number of
frequencies found for an interference-free assignment. One iteration corresponds to a
move from one solution to one of its neighbors. This criterion reflects the machine-independent
speed of an algorithm.
T(sec) the average user time 7 in seconds averaged over successful runs for the smallest
number of frequencies found. The timing is based on a SPARCstation 5 (75MHz,
5.2.3 Experimental Results
Table
1 shows the results of TS and SD on 4 instances of the first set and 6 instances of
the second set. These instances are taken from a total of 60 instances and represent some
hard problems.
For each instance, we give its name (first column), the optimal number of frequencies
(Opt) for the first set or the lower bound (LB) for the second set (2nd column), followed
by the results of TS (3rd-7th columns) and SD (8th-11th columns). For instance, the data
for 8.150.20 have the following meanings. TS finds optimal solutions for each of its 10 runs
with an average of 18,923 iterations and 123 seconds per (successful) run. SD finds 8 times
(out of 200) an interference-free assignment with 10 frequencies after 347 iterations and 3
seconds while none of its 200 runs manages to find an interference-free assignment with 9
frequencies after 5,000 iterations per run.
From the higher part of Table 1, we see that the 4 instances of the first set are too
difficult for SD to solve to optimality. Indeed, SD requires 2 to 8 extra frequencies to find
an interference-free assignment. On the contrary, TS solves all the instances to optimality
at each run with a maximum of 10 minutes. Following the size and the difficulty of an
Both TS and SD are programmed in C++.
Problems Opt/LB TS SD
Runs ff NF(S) Iter T[sec] runs NF(S) Iter T[sec]
Table
1: Results of TS and SD, 100,000/5,000 iterations per run for TS/SD
instance, TS does approximately 70 to 150 iterations per second. Since SD and TS gives
solutions of highly different quality, it is difficult to compare their solving speeds.
Concerning the instances of the second set (the lower part of Table 1), let us notice
that they are more difficult than the previous ones (the two 15.300.25.x instances seem
extremely hard). For these instances, the difference between the results of SD and TS is
even larger. Indeed, to find an interference-free assignment, SD requires at least 3 extra
frequencies above the lower bound. For the last two instances, this excess number reaches
respectively 19 and 15.
finds interference-free assignments with the lower bound frequency for 2 of 6 instances
within the limit of 100,000 iterations. For the 4 other instances, 1 to 5 extra frequencies
above the lower bound are necessary to have an interference-free assignment with success
rates ranging from 20% to 100%. As shown in the next section, these results will be
improved if more iterations is given to the TS algorithm. For these instances, TS achieves
approximately to 120 iterations per second. Finally, TS needs about 5 to 50 minutes
to find its solutions for these instances. These computing times are considered to be quite
satisfactory since in practice up to 48 hours are allowed to find a frequency assignment.
Moreover, minimizing the number of frequencies used is far more important than the
solution speed.
5.3 Comparisons with Other Methods
In this section, we contrast the results of the TS algorithm with the best results on the same
instances obtained with other methods including algorithms based on Simulated Annealing
(SA), Constraint Programming with ILOG-solver (CP) and Graph Coloring (GCA) [11].
The results of TS are those presented above, limited to 100,000 iterations. The results
of SA, CP, and GCA are those reported in [1, 2, 19]. Timing for SA and CP (not available
for GCA) is based on HP Stations (HP 735, 125 MHz, 128MB RAM) which are considered
to be about 2 to 3 times faster than the SPARCstation 5 (75MHz, 32MB RAM) we used.
SA and CP are respectively stopped after 2 and 10 hours on HP Stations, equivalent to
about 6 and 30 hours on a SPARCstation 5. Table 2 gives a summary of the results of
all these methods on the same set of instances. A minus "-" in the table means that the
result is not available.
From the data of Table 2, we notice first that TS and SA largely outperform CP
and GCA on these instances in terms of the quality of solutions. Indeed, none of these
instances is solved to optimality by CP or GCA (with the exception for 8.150.20 by GCA).
Problems Opt/LB TS SA
8.75.25.1
8.75.25.3
8.150.15.3
8.150.25.6
15.300.25.6
Table
2: Comparison of TS with other methods (maximum iterations for
Many extra frequencies (up to 17) are needed by CP and GCA to find an interference-free
assignment. On the contrary, the results of TS and SA are much better on all the instances.
In general, the harder the problem, the bigger the difference: for some instances, there is
a difference of more than 12 frequencies.
Let us now examine the results of TS and SA. In terms of the quality of solutions, we
see that the TS algorithm outperforms the SA algorithm on 4 instances (in bold) and does
as well as SA on the other instances. This is remarkable since reducing even one frequency
for such hard problems makes the problem much harder to solve. In terms of computing
time, TS is always faster than SA even for solutions of better quality. If we take into
account the difference of computing power between the machines used, it should be clear
that TS dominates SA.
In order to see how far the TS algorithm can go, another experiment was carried out.
In this experiment, we run the algorithm with more iterations (1,000,000 maximum) on 4
instances for which no interference-free assignment was found at 100,000 iterations with
lower bound frequencies. Table 3 shows the results of this experiment.
Problems Runs TS
Table
3: More TS results, maximum iterations = 1,000,000
From
Table
3, we see that 8.150.15.3 is solved with 16 frequencies (lower bound). The
results of 15.300.25.6 and 15.300.25.9 are improved with a gain of 1 and 3 frequencies
respectively. For 8.75.25.1, no interference-free solution is found with frequencies. To
solve the last three instances, a large number of iterations are needed with a running time
ranging from 6 to 10 hours.
In summary, we see that the TS algorithm gives the best results for these instances
in terms of solution quality and solving speed. This remains true for 50 other instances
solved but not reported here. Due to insufficient information about the testing conditions
and implementation details of some algorithms, it is difficult to give a really fair comparison.
However, contrasting these results seems to give some clear indications about the performance
as to these algorithms.
Finally, we point out that in addition to the previous results, the TS algorithm was also
applied to real data representing some largest mobile networks used in France to minimize
interference for a fixed number of frequencies and to minimize the number of frequencies for
assignments. Due to the confidential nature, we cannot report in details
our experiments on these networks. Suffice to say however that the TS algorithm gives
very competitive assignments for these real networks compared with other methods.
5.4 Discussions
The TS algorithm presented in this paper offers a significant improvement over the previous
best results on the set of tested instances. The high performance of the algorithm comes
from the combination of different features. In this section, we study the influence of some
of these features.
Conflict-based candidate list strategy
In order to see the influence of this strategy, experiments were carried out using the
neighborhood N(s) and the conflict-based candidate list V . We re-run the TS
algorithm on some instances with different fixed number of frequencies. Table 4 shows the
comparative results on a particular instance (8.75.25.3). In the table, each line corresponds
to the result of 5 runs and "-" means that no result is found after 100,000 iterations.
Iter T[sec] Iter T[sec]
22 267 2 104 0.6
Table
4: Influence of candidate list strategy on 8.75.25.3, maximum iterations = 100,000
We observe from the table that none of the 5 runs (100,000 iterations each) using the
neighborhood N(s) is able to find an interference-free assignment using a number
of frequencies smaller than 21. On the contrary, the conflict-based strategy allows the
algorithm to find interference-free assignments with only frequencies. Moreover, this
strategy is much more efficient in terms of number of iterations and computing time. These
remarks remain valid for other tested instances.
Another popular candidate list strategy is random sampling, i.e. only a percentage of
the neighborhood is randomly considered at each iteration. Similar tests show that once
again the conflict-based strategy largely dominates this sampling technique.
Co-cell constraint handling
In order to see the influence of this technique for the TS algorithm, we re-run our
times with the CCH option disabled on the second test set (no co-cell
constraint exists in the first test set). Table 5 shows the comparative results of TS with
and without CCH.
Problems LB Runs TS with CCH TS without CCH
Table
5: Influence of co-cell constraint handling, maximum iterations = 100,000
From the table, we observe that CCH gives better solutions by reducing the number of
frequencies by 1 or 2 for the last 3 instances. Also, to obtain solutions of the same quality,
CCH seems to be more robust since the solutions are found more often. More generally,
CCH allows to reduce the search space and to accelerate the search process.
Re-generation
Recall that there are two different ways to generate an initial configuration with NF-1
frequencies when an interference-free assignment is found with NF frequencies. One may
take a completely new random configuration or re-generate a configuration from the last
interference-free assignment (see Section 4.2).
Results represented above are obtained with random initial configurations. It is thus
interesting to know if the "re-generation" technique can lead to different results. Limited
experiments were carried out for this purpose. We observed that given the same number of
iterations, the re-generation often makes the search faster. We also observed that the re-generation
may effectively improve the results. In particular, it helps finding interference-free
assignments with frequencies (lower bound) for the two largest instances 15.300.25.x.
At the same time, we notice that the improvement is problem-dependent. More work is
needed to know to which extent and in which cases the re-generation is beneficial in general.
6 Conclusions and Future Work
In this paper, we have presented a powerful TS algorithm for the frequency assignment
problem. The algorithm has some key features including incremental evaluation, co-cell
constraint handling, candidate list strategy and dynamic tabu tenure. The algorithm was
evaluated against a steepest descent algorithm on various realistic instances. Results of
the TS algorithm were also compared with the best results obtained with other algorithms
based on simulated annealing, constraint programming and graph coloring. Empirical
evidence shows that the TS algorithm outperforms largely other algorithms by producing
the best results for the set of tested instances both in terms of quality of solution and solving
speed. Consequently, TS should be considered to be a very competitive and promising
method for the frequency assignment problem.
The FAP instances solved in this work may be considered to be large for today's
networks. However, mobile radio networks grow extremely fast and will reach easily 1,000
to 2,000 cells (several thousands of variables) in the near future. Therefore, very powerful
optimization methods are needed to deal with such networks. Parallel and distributed TS
techniques may be considered since they are probably among the most promising methods
for tackling large and challenging combinatorial problems [5].
Acknowledgments
We would like to thank gratefully Dr. A. Caminada from CNET - France Telecom for his
assistance. We also thank the referees of the paper for their useful comments.
--R
"R'esolution du Probl`eme de l'Affectation des Fr'equences Par Programmation Par Contraintes"
Some Results of Constraint Programming for Frequency Assignment
CALMAR Symposium on Combinatorial Algorithms for Military Applications
"A Tabu Search Algorithm for Frequency Assignment"
"Towards a Taxonomy of Parallel Tabu Search Heuristics"
"A Parallel Genetic Algorithm for Frequency Assignment Problems"
"Constraint Handling in Evolutionary Case Study on Frequency Assignment"
"Channel Assignment for Cellular Radio Using Simulated Annealing"
"Genetic and Hybrid Algorithms for Graph Coloring"
"A Neural Network Parallel Algorithm for Channel Assignment Problems in Cellular Radio Network"
"A Ressource Allocation Technique for FDMA Systems"
"Frequency Assignment: Theory and Application"
"Study of Genetic Search for the Frequency Assignment Problem"
"Tabu Search for the Frequency Assignment Problem in Cellelar Radio Networks"
"Using Tabu Search Techniques for Graph Coloring"
"Using Genetic Algorithms to Solve the Radio Link Frequency Assignment Problem"
"Channel Assignment for Cellular Radio Using Neural Networks"
"Algorithmes de Coloration des Graphes et d'Affectation des Fr'equences: Approches G'eom'etrique et Analytiques, Heuristiques, Recuit Simul'e, Programmation par Contraintes, Algorithmes G'en'etiques"
"T-colorings of Graphs: Recent Results and Open Problems"
--TR
--CTR
Sancho Salcedo-Sanz , Carlos Bousoo-Calzn, A portable and scalable algorithm for a class of constrained combinatorial optimization problems, Computers and Operations Research, v.32 n.10, p.2671-2687, October 2005
Junghee Han, Frequency reassignment problem in mobile communication networks, Computers and Operations Research, v.34 n.10, p.2939-2948, October, 2007
J. Mark Ware , Ian D. Wilson , J. Andrew Ware , Christopher B. Jones, A tabu search approach to automated map generalisation, Proceedings of the 10th ACM international symposium on Advances in geographic information systems, November 08-09, 2002, McLean, Virginia, USA
Michel Vasquez , Jin-Kao Hao, A Heuristic Approach for Antenna Positioning in Cellular Networks, Journal of Heuristics, v.7 n.5, p.443-472, September 2001
Albert Grf , Thomas McKenney, Ensemble planning for digital audio broadcasting, Handbook of wireless networks and mobile computing, John Wiley & Sons, Inc., New York, NY, 2002
Yehuda Ben-Shimol , Boaz Ben-Moshe , Yoav Ben-Yehezkel , Amit Dvir , Michael Segal, Automated antenna positioning algorithms for wireless fixed-access networks, Journal of Heuristics, v.13 n.3, p.243-263, June 2007
Carlos Bousoo-Calzn , Sancho Salcedo-Sanz, A Discrete-Time Quantized-State Hopfield Neural Network, Annals of Mathematics and Artificial Intelligence, v.42 n.4, p.345-367, December 2004
L. M. San Jos-Revuelta, A new adaptive genetic algorithm for fixed channel assignment, Information Sciences: an International Journal, v.177 n.13, p.2655-2678, July, 2007
Marco Chiarandini , Thomas Sttzle, Stochastic Local Search Algorithms for Graph Set T-colouring and Frequency Assignment, Constraints, v.12 n.3, p.371-403, September 2007
Harilaos G. Sandalidis , Peter Stavroulakis, Heuristics for solving fixed-channel assignment problems, Handbook of wireless networks and mobile computing, John Wiley & Sons, Inc., New York, NY, 2002
Celso C. Ribeiro , Simone L. Martins , Isabel Rosseti, Metaheuristics for optimization problems in computer communications, Computer Communications, v.30 n.4, p.656-669, February, 2007 | constraints;optimization;frequency;tabu search;assignment |
595008 | A Constraint Programming Framework for Local Search Methods. | We propose in this paper a novel integration of local search algorithms within a constraint programming framework for combinatorial optimization problems, in an attempt to gain both the efficiency of local search methods and the flexibility of constraint programming while maintaining a clear separation between the constraints of the problem and the actual search procedure. Each neighborhood exploration is performed by branch-and-bound search, whose potential pruning capabilities open the door to more elaborate local moves, which could lead to even better approximate results. Two illustrations of this framework are provided, including computational results for the traveling salesman problem with time windows. These results indicate that it is one order of magnitude faster than the customary constraint programming approach to local search and that it is competitive with a specialized local search algorithm. | Introduction
Local search methods in Operations Research (or) date back to over thirty years
ago [13]. Applied to difficult combinatorial optimization problems, this heuristic
approach yields high-quality solutions by iteratively considering small modifications
(called local moves) of a good solution in the hope of finding a better one. Embedded
in meta-heuristics designed to escape local optima such as simulated annealing and
tabu search, it has been very successful in achieving near-optimal (and sometimes
optimal) solutions to a variety of hard problems [8][23][1].
Constraint Programming (cp) features very flexible modeling capabilities to easily
and closely reflect the various constraints of a problem. In solving real-life combinatorial
optimization problems, it has to date almost invariably adopted the branch-
and-bound strategy, a global and therefore complete search method. 1 When an
exact algorithm proves too costly, simple approximate algorithms are often devised
by heuristically discarding the least-promising branches in the branch-and-bound
search tree (a form of beam search).
* A preliminary version of this paper appeared as [18].
What can constraint programming bring to local search methods? The fact that
heuristics tend to be specialized for a particular context can become a drawback
when faced with an even just slightly different context, such as side constraints:
adapting them may demand considerable time and effort. It is therefore tempting
to gain both the efficiency of local search methods and the flexibility of constraint
programming. In this paper we argue that local search is not so foreign to branch-
and-bound search and that constraints can be more actively involved in the exploration
of these local search spaces. We propose a clean integration of local search
in constraint programming by keeping on doing what comes naturally, i.e. branch-
and-bound, but on a different search space, though related to the original one. In
contrast with or practice, the resulting framework maintains a clear separation
between the constraints of the problem and the actual search procedure. For both
or and cp, the potential pruning capabilities open the door to more elaborate local
moves, which could lead to even better approximate results.
This adaptation of local search to the constraint programming paradigm stems
from its perception as a generalization of conventional cp branch-and-bound search.
In the latter case, we branch on the variables of the model and the neighborhood
degenerates into the whole solution space for which a single iteration becomes sufficient
since the optimal solution will necessarily be found. In order to lift this
approach to local search, the art then consists of choosing a representation for a
particular neighborhood structure which cp branch-and-bound search can exploit.
Each iteration of local search will simply be a branch-and-bound search, but on a
different search space. The active role of modeling constraints (discarding infeasible
neighbors) together with lower bounds on the cost of partial solutions (discarding
unattractive neighbors) will help prune the tree and thus reduce the search effort
over the whole neighborhood.
The rest of the paper is organized as follows. Section 1 first gives an overview of
local search methods and constraint programming. Our general framework for local
search in cp is presented in section 2. The implementation of that framework is then
illustrated on personnel scheduling (section 3) and single-vehicle routing (section
problems. An empirical study is included for this latter type of application. Finally
we address the flexibility offered by our framework in section 5.
1. Background
1.1. Local Search Methods in Operations Research
Local search methods involve repeatedly going from one solution to another through
a local move. What constitutes a valid local move varies according to the problem
and even within it (see for example section 4.1). The set of all solutions reachable
from a solution s through a local move is termed the neighborhood of s. The set of
all feasible solutions in this neighborhood will be called its feasible neighborhood.
Given this framework, a simple strategy called iterative improvement moves to
the best feasible neighbor (i.e. of lowest cost) every time until it does not improve
on the current solution, reaching a local optimum. Several ways of alleviating
the obvious drawback of this strategy have been proposed. Multi-start iterative
improvement achieves local optima from a pool of solutions and returns the best one.
Genetic local search builds upon the previous by recombining the local optima (in
the fashion of genetic algorithms [10]), applying iterative improvement, discarding
the least-promising solutions and repeating the process until some stopping criterion
is satisfied.
Two very successful strategies try to escape local optima by allowing moves which
temporarily increase the cost of the solution. Tabu search [7] moves to the best
neighbor at each iteration, regardless of whether or not it improves on the current
solution. To avoid cycling, a dynamic list of tabu solution attributes is kept. Typi-
cally, such a list covers recently examined solutions, which will remain forbidden for
a certain number of iterations. Simulated annealing [12] randomly selects a neighbor
at each iteration. If it improves on the current solution, the move is performed;
otherwise, it will be performed with a certain probability which depends on the
cost difference and which also decreases over time according to a cooling schedule.
Both strategies iterate until some stopping criterion is satisfied.
One crucial aspect in all of these local search methods is obviously the choice of
the neighborhood structure (see for example [9]). Ambitious neighborhoods increase
the chances of success but are more expensive to explore for methods which need
to do so. Small neighborhoods are both simple and fast to explore but may prevent
us from ever reaching a particularly good solution: it could require a sequence of
local moves (as opposed to a single one in a larger neighborhood), and every such
move would have to be the one selected in its iteration. A neighborhood which
strictly includes another induces a search which encounters fewer local optima and
thus facilitates their avoidance.
Because of the above, large neighborhoods are attractive. Several techniques have
been developed to speed up their exploration. The size of the neighborhood can
be somewhat reduced either by ignoring parts of it which are unlikely to produce
good solutions or, in a more exact fashion, by interrupting a carefully engineered
exploration when the remainder can only lead to worse (or infeasible) solutions.
In addition, the feasibility of neighbors must be assessed. As an early example in
routing problems, [24] describes a way to verify time-window constraints in constant
time per neighbor, though assumptions about the neighborhood structure must
be made. Others may perform approximate tests of feasibility to quickly identify
promising neighbors which are then thoroughly investigated, with the potential risk
of missing the best one.
So, the challenge of expressive neighborhoods has been met with specialized techniques
embedded in the local search and sometimes with compromises.
1.2. Constraint Programming
Constraint programming solves combinatorial problems by actively using the constraints
of the problem to implicitly eliminate infeasible regions of the solution
space. The algorithm at the heart of this approach implements complex logical
reasoning over the set of constraints.
To every variable of a cp model is associated a domain: each value in that domain
represents a possible value for the variable. Constraints on the variables forbid
certain combinations of values. Picturing the model as a network whose vertices
are the variables and whose (hyper)edges are the constraints provides insight into
the basic algorithm used in cp. A vertex is labeled with the set of values in the
domain of the corresponding variable and an edge is incident to those vertices
representing the variables appearing in the associated constraint. Looking locally
at a particular edge (constraint), the algorithm attempts to modify the label (reduce
the domain) of the incident vertices (variables) by removing values which cannot
be part of any solution because they would violate that individual constraint; this
local consistency step can be performed efficiently. The modification of a vertex's
label triggers the inspection of all incident edges, which in turn may modify other
labels. This recursive process stops when either all label modifications have been
dealt with or the empty label is obtained, in which case no solution exists. The
overall behavior is called constraint propagation.
Since constraint propagation may stop with indeterminate variables (i.e. whose
domain still contains several values), the solution process requires search and its
potentially exponential cost. It usually takes the form of a tree search in which
branching corresponds to fixing a variable to a value in its domain, thus triggering
more constraint propagation. We call variable-selection heuristic and value-
selection heuristic the way one decides which variable to branch on and which
value to try first, respectively. For combinatorial optimization problems, the tree
search evolves into a branch-and-bound search in which one branches in the same
way and lower bounds at tree nodes are obtained by looking at the smallest value
left in the domain of a cost variable.
1.3. Local Search in Constraint Programming
As we just saw, branch-and-bound search is by far the most popular (and natural)
solution strategy in constraint programming to handle combinatorial optimization
problems. A few exceptions are nevertheless found in the literature. A recent survey
on applications of constraint programming [28] describes applications in which local
search and cp are "loosely connected": the latter is used as a preprocessing step for
the particular heuristic employed. Others offer a tighter connection but essentially
consider individually each of the possible moves in a neighborhood to then assess
their feasibility and cost [22][3][2] 2 . This can be a costly endeavor when the nature
of the local moves is such that a great number of possibilities must be considered.
To solve constraint satisfaction problems, which abound in Artificial Intelligence,
repair-based methods (e.g. [25][15]) have had a good share of success. They can be
viewed as local search methods which typically consider a very small neighborhood
(changing the value of one variable) and use iterative improvement in order to
minimize the number of violated constraints.
2. A New Combination of Local Search and CP
As mentioned in the introduction, we will view local search as a sequence of cp
branch-and-bound searches. Given a combinatorial optimization problem P , which
we call the master problem, and some initial solution to it, we will solve a sequence
of auxiliary problems using standard constraint programming techniques. P is described
by a constraint programming model whose role is to ensure the feasibility
of our solutions. Each auxiliary problem is described by another constraint programming
model, called the neighborhood model, which describes the local search
space. The two types of models are related by interface constraints.
Definition 1. Neighborhood model. Let N denote some neighborhood structure
for solutions to a combinatorial optimization problem P . A set of finite-domain
variables usually distinct from the variables appearing in the model
for P , together with a (possibly empty) set of constraints on f- is a neighborhood
model for N if there is a one-to-one mapping between the set of feasible
combinations of values for f- and the neighbors in N .
Example: Let P be the traveling salesman problem on m cities and consider
the exchange of two cities in a solution as our neighborhood structure N . We
introduce variables I and J , both ranging over the interval [2; m], and the constraint
I ! J between them. If a solution is represented as the sequence
of cities forming the tour, a particular (feasible) combination of values for fI ; Jg is
interpreted as exchanging entries c I and c J in that solution to obtain a neighbor.
One easily verifies that this constitutes a neighborhood model.
The requirement of a one-to-one mapping could be relaxed to a surjective mapping
though this would mean that a neighbor may be examined more than once: without
the constraint I ! J in the example above, symmetry would lead to identical
solutions. However, surjectivity is crucial since otherwise we would miss some of
the neighbors.
The solution space defined by the neighborhood model can be explored by standard
cp branch-and-bound search. We branch on f- and also bound the
cost of partially constructed neighbors. As we saw in section 1.1, some heuristic
algorithms based on local search, such as tabu search and variations on iterative
improvement, are interested in acquiring the best solution in the neighborhood
and hence do not require to manipulate the whole of it per se. We can therefore
record the cost of the best neighbor found so far and derive lower bounds for partial
neighbors to reduce the portion of the neighborhood that has to be explored,
as in conventional branch-and-bound. Note that we do not prescribe the order in
which we select variables for branching: in accordance with common practice in the
constraint programming community, dynamic variable-selection and value-selection
heuristics may be used to increase the efficiency of the search.
Initially, the model for the master problem is stated and the variables of that
model are only constrained to that extent - in other words, they are not bound to
the current solution. Then the local search takes place in the form of a complete
NEIGHBORHOOD MODEL
local move
restricting neighbors
fixing main
constraint checking interface constraints
Figure
1. The interaction between the master and neighborhood models.
branch-and-bound search on the neighborhood model. At different stages of the
branch-and-bound search, valuable information can be exploited in order to restrict
the set of allowable values for the neighborhood-model variables on which that
search is performed and, more importantly, constrain as well the principal modeling
variables of the master problem which may independently prune our search tree by
propagating these changes through modeling constraints we need not know anything
about (see figure 1). We automate this behavior by introducing a set of conditional
constraints 3 called the interface constraints.
Definition 2. Interface constraints. An interface constraint has the form
stands for a subset of the variables in the model for P . It adds constraint
once each of - fixed. The set of interface constraints
establishes the link between the model for P and the neighborhood model:
as variables of the latter model are fixed during the branch-and-bound search, constraints
are generated on some variables of the neighborhood model and some of
the master problem, reflecting the fact that we narrowed the search.
We see two main advantages for such a framework:
Flexibility, genericity. The modeling constraints for P (and often some of the
are kept separate from the neighborhood model. This provides a flexible
way to state instance-specific constraints, independently of the local search.
It is especially useful when lots of different side constraints are present in the
problem: they will not clutter the local search with explicit feasibility tests as
is often the case in operations research heuristics. They will rather be indirectly
involved when some of the modeling variables will be further constrained
through the interface constraints as a result of branching on - . The end
result is a generic neighborhood exploration method parameterized by the type
of neighborhood structure but not by the nature of the modeling constraints for
the master problem.
Table
1. Availability of physicians
A,B,C,D,E. (a=am, p=pm, n=night).
Mon Tue Wed Thu Fri
A p/n a/p n a/p/n p
C p/n a a/p/n a/n n
Search Economy. There is a strong relationship between the savings brought
about by this branch-and-bound approach and how ambitious the neighborhood
is. Typically, enlarging the neighborhood means increasing the degrees of
freedom and so requires a greater number of variables to encode its structure.
This translates into a greater depth of the neighborhood search tree and a potentially
larger gain with every branch pruned 4 , either from the lower bound at
the particular node or the modeling constraints. This constitutes an asset in
view of the current trend toward more ambitious neighborhood structures. The
freedom of choosing the order in which variables are fixed and values tried also
contributes to that gain.
On the other hand, there is of course a price to pay for that flexibility, namely
the cost of constraint propagation and of built-in backtracking. We will attempt to
empirically evaluate the overall efficiency of the approach in sections 4.4 and 4.5.
3. An Introductory Application: Physician Scheduling
Here is a first illustration of this general framework. On a hospital ward, there
must be a physician on duty at all time. Consequently, a ward schedule has to be
established for the staff of physicians. As can be expected, the rules governing the
construction of a valid schedule vary from one hospital to the next. We describe
but one such context.
Each day is divided into three shifts: am, pm and night. (For the night shift, the
physician is simply on call.) The planning horizon is typically a few months. There
are several rules about the frequency of shifts covered by the same physician:
1. no more than one shift per day;
2. no two consecutive shifts (for example, Monday-night then Tuesday-am);
3. no two consecutive night shifts.
Physicians also have other duties elsewhere, especially the ones who have a part-time
status. They hand in a form specifying the shifts for which they are available
(table 1 gives a small example for five physicians over an horizon of five days).
If two physicians share a responsibility outside the ward on a certain day, they
may ask that at least one of them be off daytime duty on that day. Finally, a
target workload (in number of shifts) is assigned to each physician, which may vary
according to her status. A good schedule should remain close to the targets.
Let the planning horizon range from day 1 to n and let
be the set of shifts to assign in the schedule. Let MD represent the set of physicians
on staff, A k , the set of pairs hi; ji such that physician k is available for the j shift
on day i and R, the set of pairs hfk; k 0 g; ii such that physicians k and k 0 cannot
be both on daytime duty on day i. A natural model for this problem associates a
distinct variable to every shift being assigned:
The constraints listed above can be expressed as follows, in the same order:
stand for the target workload of physician k whereas ff k stands for her
actual workload in the schedule. We adopt a least-squares objective function to be
A local move will consist of changing the value of one slot in the schedule. Let
oe represent the current schedule and oe(hi; ji) the physician currently covering the
j shift on day i. A neighboring schedule of oe can be encoded through a variable
S representing the slot to be modified and a variable V representing the new value
for that slot. Our neighborhood model is then:
The cost of a local move replacing physician k 0 by k in some slot is
which simplifies to
If the target workload is the same for all physicians, evaluating the relative merit
of a move simply amounts to looking at ff k \Gamma ff k 0 .
Table
2. A feasible schedule (left) and an optimal schedule (right).
Mon Tue Wed Thu Fri
Mon Tue Wed Thu Fri
Table
3. The partial schedule after choosing one possible completion (right).
Mon Tue Wed Thu Fri
Mon Tue Wed Thu Fri
Let ffXgg denote the current domain of finite-domain variable X . We introduce
the following interface constraints:
When S is fixed to some slot ha; bi:
conditional constraint (7) fills all the other slots with the value in the current
schedule since they will not change;
conditional constraint (8) binds V to S a;b , thus restricting V to the possible
values for that slot and forbidding the current value for S a;b , through constraint
of the neighborhood model.
When V is fixed to some physician k:
conditional constraints (9) and (10) maintain the value of all the slots which
cannot possibly change: those whose value is k already and those which cannot
take that value;
conditional constraint (11) restricts S to the slots which may admit value k.
Example: Consider a simple instance with five physicians, a scheduling horizon of
five days, physician availabilities as given in table 1 and a uniform target workload
of three shifts per physician. In addition, physicians A and D cannot be both on
daytime duty on Thursday and neither can B and C on Wednesday. Table 2 gives
a feasible schedule in which A works four shifts and D only two, yielding a score of
2 on the objective function. We will investigate the possible local moves from that
schedule.
In a cp branch-and-bound search on our neighborhood model, a popular variable-
selection heuristic would have us branch on the variable with smallest domain first.
In our case that would be V . As far as trying the different values for V , it makes
sense to order them according to a lower bound on the relative merit of the possible
local moves introducing that value, and starting with the smallest bound. For value
A, we look at (ff A \Gamma ff x similarly, for the other values we get
\Gamma1; \Gamma1; \Gamma2; \Gamma1, in that order. We will therefore start by examining D, as illustrated
in the search tree on the left in figure 2.
This triggers constraints (9)-(11), the first two partially filling the schedule as
illustrated on the left in table 3. Entries shown in bold result from more elaborate
reasoning than a mere initial unavailability of D for that shift, and are achieved
through constraint propagation. For example, once shift h3; nighti has been filled
by D (constraint (9)), constraint (3) tells us that shift h4; ami cannot be filled by D
as well and so should take its current value A (constraint (10)). Now then, because
A and D cannot be both on daytime duty on Thursday (constraint (5)), shift h4; pmi
should also take its current value E. The domain of S is made to correspond to the
unassigned shifts in the partial schedule, fh1; nighti; h2; pmig through the combined
effect of constraints (11) and V 6= oe(S).
Branching now on S, we can again order the two branches according to the
lower bound, though here they have identical value. The leftmost branch brings
us to a terminal node, changing the value of slot h1; nighti to D, with a relative
merit of \Gamma1. Conditional constraint (7) fills the rest of the schedule. Since that
relative merit score is as good as any lower bound on unexplored branches in the
search tree, the rest of the tree can be pruned and we are done (see figure 2(left)),
yielding the schedule on the right in table 3. The actual cost of that move is
which keeps the objective function at 2.
A further iteration using the same strategy would produce the search tree on the
right in figure 2 and a local move of cost \Gamma2, bringing the objective function down
to 0. We would therefore have an optimal schedule, shown on the right in table 2
with the overall modifications in bold.
This small example is already sufficient to bring forth the two advantages stressed
at the end of section 2. Exploring the neighborhood by first fixing V then S runs
contrary to what would naturally come to mind, that is, first choose a slot to modify
and then pick a new value for it. Nevertheless, it is probably the better strategy of
the two since the search trees generated tend to be more sparse. The combination
of this variable-selection heuristic with a value-selection heuristic, constraint propagation
and lower-bound pruning yields a neighborhood exploration which is very
efficient in terms of the number of neighbors (terminal nodes) actually considered.
The other advantage was a generic local search with the flexibility to handle
instance-specific constraints. As we mentioned before, in this type of personnel
scheduling problem the rules of the game depend on where you are. With this
"C" "E"
"A" "D"
"A"
Figure
2. Neighborhood search trees: first (left) and second (right) iterations. Branch labels are
"value"/"lower bound". Terminal nodes are labeled with the relative merit of the move.
approach, the different hospital contexts will be reflected and handled in the master
model and not in the local search itself.
4. A Routing Application Using Tabu Search
This section provides another instance of the general framework described in section
2. It addresses a well-known problem on which several local search heuristics have
been applied in the past. The traveling salesman problem with time windows
(tsptw) consists of finding a minimum cost (usually the total travel distance or
total schedule time) tour of a set of cities where each city is visited exactly once
and which starts and ends at a unique depot. In addition, each city must be visited
within its own time window. Early arrival is allowed but implies a waiting time until
the beginning of the window. [24] showed that simply deciding whether there exists
a feasible solution to an instance of the tsptw is NP-complete. Nevertheless, the
full problem has important applications in bank and postal deliveries, school-bus
routing and scheduling, disjunctive scheduling with sequence-dependent processing
times, automated manufacturing environments and as a subproblem of the vehicle
routing problem with time windows (vrptw).
A constraint programming model for our master problem, the tsptw, was presented
in [19]. We sketch it below, emphasizing the main variables which will be
referred to later on. Let ng represent the set of cities to visit and duplicate
the unique depot into an origin-depot and a destination-depot, identified as 0 and
tour thus becomes a Hamiltonian path starting at 0 and
ending at n+ 1. At the heart of the model are variables S i associated
to each of the cities (and the origin-depot) and which represent their successor in
the tour. Their domain will therefore be an integer in the range
valid tour assigns a distinct successor to each city and avoids sub-tours. We also
define predecessor variables
counterpart of the S i 's (S To account for the scheduling component
of the problem, variables T i are introduced to represent the time at which we
visit each city. These must take a value within their respective time window while
being coherent with the order in which cities appear on the tour and taking into
consideration the travel time between cities. Several redundant constraints are also
present to increase the amount of propagation.
4.1. Some Neighborhoods for Routing Problems
Given the inherent difficulty of the problem, several or heuristic algorithms have
been designed and among them some based on local search. We briefly describe
the most popular neighborhoods in the context of routing problems, which include
the tsptw but may allow solutions consisting of a set of routes and involve other
restrictions such as capacity constraints.
Neighborhoods generated by modifications at the level of vertices include re-inserting
a vertex or exchanging two vertices. GENI, a generalized insertion procedure
[5], directs the re-insertion between some of its p (from 2 to 7) nearest
neighbors. In the -interchange [17], subsets of vertices
are selected each from a different route and then swapped. The possibility
of an empty subset allows simply re-inserting vertices. For efficiency reasons, -
rarely exceeds 2.
At the level of edges, a k-interchange [13] replaces k edges in the solution by k
others that reconnect the route(s). Lin-Kernighan moves [14] for the tsp increase
k until a gain criterion fails and only consider nearest neighbors of vertices for the
exchanges. An Or-opt move [16] relocates a string of one, two or three consecutive
vertices. A 2-opt ? move [21] replaces two edges (v different routes
with edges (v This exchanges the end portion of one route with the
end of the other. The CROSS exchange [27] goes further by exchanging a middle
portion of one route with a middle portion of the other, replacing four edges, and
includes the two previous types of moves as special cases.
4.2. An Orientation-Preserving 3-Interchange Neighborhood
We consider the orientation-preserving 3-interchange neighborhood and provide a
neighborhood model for it. Let T be the current tour. If I represents a city on
this tour, then I its successor (respectively predecessor)
on T . We define the following binary relation on cities: I OE J holds if I appears
before J on T .
Without loss of generality, let I OE J OE K. A 3-interchange move from T deletes
the three edges reconnects the tour by introducing
three new ones on the vertices (cities) I , I
orientation-preserving 3-interchange move reconnects the tour in the only possible
way which does not reverse any of the original route segments, by adding edges
I I
Figure
3. The orientation-preserving 3-interchange.
3). This is desirable when a scheduling component
is present in the problem, such as time windows. Two segments of the original
route have been swapped but the ordering within a segment is kept.
The neighborhood defined by orientation-preserving 3-interchange moves can be
encoded through three finite-domain variables I ; J; K, ranging from 0 to n. Their
interpretation is the one given above. Because of constraint I OE J OE K, each
neighbor is in one-to-one correspondence with a 3-tuple of values describing it. We
therefore have a neighborhood model:
ng
I OE J OE K:
Associating a cost c ij to every edge (i; j), the cost of a local move is given by
the total cost of the arcs we add minus the total cost of the ones we remove. Its
smallest possible value will be used as our lower bound and will be refined automatically
through constraint propagation as the domains of I ; J; K shrink (ultimately
to a single value).
Here are the interface constraints used during the branch-and-bound search (refer
to figure 3 throughout):
Conditional constraints (12)-(15) deal with information traveling from the neighborhood
model (the box on the right in figure 1) to the master model (the box on
the left in the same figure): in (12) for example, as we try a value for I , say i, we
know that the initial tour segment up to i will remain in the new tour and so the
appropriate successor variables in the routing model can be fixed. (13)-(15) respectively
address tour segments hi which are unchanged
in the neighboring tour.
Conditional constraints (16) and (17) reflect the fact that having fixed I to i
allows us to constrain further J and K: J must appear, in the current tour, just
before the successor of i in the new tour (corresponding to the addition of edge
must be the predecessor of i + in the new tour (corresponding
to the addition of edge Similarly, (18) and (19) restrict I and K given a
value for J while (20) and (21) restrict I and J given a value for K. In turn, this
is information traveling from the master model to the neighborhood model: the
successor and predecessor variables, constrained by the master model, restrict the
possible values for I , J and K, which are used to identify the potential arcs to be
added and removed in a neighboring tour.
Suppose for example that the variable ordering in our search tree is I ; J; K
throughout. Then at depth 1, with I fixed, conditional constraints (12), (16) and
(17) will be triggered; at depth 2, with both I and J fixed, (13), (19) and (18)
will be triggered but only the first two will be useful since the value of I is already
known; finally at depth 3, with all the variables fixed, only (14) and (15) will be
worth triggering.
As we saw, only the S i 's and P j 's in the master model and the I ; J; K variables
for the neighborhood model were involved in the interface. Note for instance that
the time variables T i were not directly involved.
Example: Consider the following example in which we wish to find a good tour
of cities fb; c; d; e; f; gg starting at a and ending at h, the two copies of the depot.
Aside from the usual constraints in the master model, we add two others, c OE g
(in any feasible tour) and S d 6= g, to show how instance-specific constraints are
taken into account when examining neighbors. We shall concentrate here on the
implicit pruning of infeasible neighbors through the constraints and leave out that
of unattractive neighbors through the lower bounds. We therefore ignore the cost
of individual arcs in our exploration. Our variable-selection heuristic will again be
the common "smallest-domain-first", with lexicographic order as a tie breaker.
Let the current tour be ha; b; c; d; e; f; Initially, branching variables I , J and
K have domains as indicated in figure 4-i; they are of equal size and so we first
branch on I . At the root of our search tree we have five possible values for I : a, b, c,
d or e. They should be tried in turn for a complete exploration of the neighborhood
but let us jump to when b is considered (figure 4-ii). Several things happen:
{ c, d, e, f, g }
{ a, b, c, d, e }
{ b, c, d, e, f }
c
f
d
e
a
{ c, d, e, f, g }
{ a, b, c, d, e }
{ b, c, d, e, f }
c
f
d
e
a
I
c d e
I
b c d
e
a
I
d
e
I
d
e
c
f
d
e
a
{ d, e, f }
{ c, d, e }
I b
c
f
d
e
a
e
d
-i-ii-iii-iv-
Figure
4. Exploring a neighborhood.
ffl The neighborhood-model constraint I OE J OE K triggers the removal of value b
from the domain of J and then c from the domain of K.
ffl Conditional constraint (12) sets S a to b as the initial tour segment.
ffl Conditional constraint (16) enforces could reduce the domain
of J depending on what the possible values for S b are.
ffl Conditional constraint (17) enforces . The combined action
of instance-specific constraint c OE g removes g from K's domain, since g is
certainly not part of the domain of P c . In addition, f is removed from J's
domain, through J OE K.
We are left with three possible values in each of J and K's domain and so move on
to fix J . Suppose we try d (figure 4-iii):
ffl The neighborhood-model constraint J OE K triggers the removal of value d from
the domain of K.
ffl Conditional constraint (13) sets S c to d as the current tour segment from i + to
j.
ffl Conditional constraint (19) enforces Now since S d 6= g was given
as an instance-specific constraint, (S d so f is removed from
K's domain.
Finally we fix K to the only possible value, e (figure 4-iv):
ffl Conditional constraint (14) does not result in any variable assignment since
tour segment consists of the single city e.
ffl Conditional constraint (15) sets S f to g and S g to h as the remaining tour
segment.
4.3. A Tabu Search Algorithm
In order to evaluate some of the efficiency issues related to this approach, we used
the previous neighborhood structure within a tabu search algorithm. Our aim is
twofold: to evaluate the efficiency of the branch-and-bound search in terms of the
proportion of the neighborhood explicitly visited; to compare its execution time
with that of a conventional, specialized tabu search algorithm with the objective of
measuring the cost of constraint propagation and backtracking. We will therefore
leave out ad hoc constraints and remain strictly within the reach of that specialized
algorithm for the tsptw. This section describes the specifics of the algorithms.
A random tabu tag is associated with each pair of cities (each arc) and initially set
to zero. When a move is performed at iteration i, the three arcs being replaced in
the tour are only allowed to be brought back into the tour after iteration i+', where
' is an integer randomly drawn from the interval [5; 10] (a ' is drawn separately
for each arc): their tabu tag is thus updated to i '. The tabu status of a move
is determined by examining the tabu tags of the three arcs it would bring into the
tour: unless each tag is less than the index of the current iteration, the move is
declared tabu. However, an aspiration criterion is included according to which the
move will be performed anyway if its cost improves on the cost of the best tour
met so far. To obtain our initial feasible solution, we use a "near-sighted" version
(with of the generalized insertion heuristic geni-tw [6]. We then run
100 iterations of tabu search on it (this fixed number of iterations serves as our
stopping criterion and simplifies comparisons in the next section).
Two versions of the cp tabu search algorithm were implemented, coined "full" and
"light". They differ in the extent of the master model used. Neither includes the
structural tsp constraints (distinct successors; sub-tour avoidance) since the nature
of a move guarantees a valid tour (ignoring time windows). The "full" version uses
the rest of the model outlined at the beginning of section 4 while the "light" version
omits the redundant constraints, keeping only what is necessary to ensure time-window
compliance. A non-cp, specialized version only departs from the other
two in the way the neighborhood exploration is carried out: three nested loops
iterate over the whole neighborhood and the feasibility of each neighbor is explicitly
assessed without resorting to constraint propagation. Finally, a "passive" cp version
also proceeds by nested loops but uses constraint propagation (through the "light"
model) to verify the feasibility of neighbors. It represents a popular approach to
combining cp and local search (as indicated in section 1.3) and does not actively use
the constraints to restrict the part of the neighborhood which must be explored.
All four implementations are written in C++ (the cp versions use ilog Solver,
a C++ library implementing constraint programming for combinatorial problems
[11]) and even share some of the code. The seed for the generation of random tabu
tags is the same so that all four executions follow identical sequences of moves on
a given instance. Neighborhood exploration is therefore the only variable.
As in the example at the end of the previous section, our variable-selection
heuristic for the branch-and-bound search was "smallest-domain-first". When a
tie-breaker was frequently needed (i.e. for the "light" version without lower-bound
pruning, which reduces little the domain of branching variables), we found that
the ordering I ; K; J performed significantly better than lexicographic ordering. It
has the advantage of identifying early on the only backward arc introduced by the
move, (K; I + ), which is most likely to cause a time-window violation. For the value-
selection heuristic, we considered several strategies. Our first attempt was to imitate
what we had done in the physician scheduling example and order values according
to some measure of the cost of the related moves. For each value v in the domain,
an inexpensive measure such as "\Gammac vv + ", the cost of one of the arcs being replaced,
or refinements such as "minfc vSv
proved no better and even worse than a simple lexicographic ordering, on our bench-
marks. A possible explanation is that whereas in the physician scheduling example
it seemed likely that the selected branch of the search tree could be extended to a
feasible move, here such likelihood is doubtful as hinted in the next section by the
constrainedness indicator. As a result, we may not find a feasible neighbor for a
while and thus miss opportunities to prune unattractive subtrees. An orientation-preserving
3-interchange should more likely be feasible if it swaps two short tour
segments, i.e. when I , J and K are close on the tour. Lexicographic order was
successful because our initial solutions happened to almost follow that ordering and
so lexicographic proximity was synonymous to proximity on the tour. Accordingly,
we implemented a simple value-selection heuristic, favoring the earliest v on the
tour, which outperformed on average all the previous strategies.
4.4. Experimental Results
For our experiments, we considered a set of Euclidean problems with travel times
between cities taken as the distance separating them. They are in fact subproblems
of a well-known vrptw testbed from [26]. The original problem instances feature
100 cities distributed on the [0; 100] \Theta [0; 100] grid and require several vehicles to
service them while obeying the side constraints. Some partition of the cities such
that each group may be visited by a single vehicle yields our subproblems, 25 in
all. We used the instances from the RC2 class which features a mixture of clustered
and uniformly distributed cities and requires few vehicles, yielding larger routes.
Their resulting size varies from 20 to 42 cities.
In addition to execution time, we introduce two indicators to analyze the results:
jfeasible neighborhoodj
jneighborhoodj \Theta 100
Table
4. Constrainedness (fl) and search effort (ffl) for several tree-search strategies.
problem fl ffl-full ffl-light
pruning pruning pruning pruning
rc203 3.4 36.4 12.9 40.2 77.1 20.8 74.0
rc204 10.1 54.5 11.6 72.2 94.3 12.7 88.4
rc206 1.1 17.9 8.3 17.1 31.4 14.1 34.7
rc207 2.5 36.4 11.1 37.1 61.6 13.3 58.9
rc208 4.1 64.3 18.8 79.7 100.0 17.3 93.4
will indicate how constrained a problem instance is by evaluating for a given solution
the proportion of neighbors which are feasible;
jsearch-tree leavesj
jneighborhoodj \Theta 100
will measure the effort put into our neighborhood exploration by comparing the size
of the search tree with the size of the neighborhood. Both fl and ffl are expressed as
percentages.
Table
4 evaluates fl and ffl on the benchmark problems for the versions which
explore the neighborhood by tree search. Instances are aggregated according to the
original vrptw instances (rc201 to rc208) since they tend to have similar time-window
characteristics. Each entry thus represents the average of 2 to 4 tsptw
instances, each averaged over 100 iterations of tabu search. The second column gives
the percentage of feasible neighbors; the following two groups of three columns, the
search effort for the "full" and "light" version, respectively. Within each group,
the column on the left reports on a plain tree search, whose pruning comes from
constraint propagation only and not from lower bounds on the cost at tree nodes;
the middle column reflects the addition of lower-bound pruning to the tree search
to obtain branch-and-bound; we leave out the column on the right for now.
Our first observation is that practically all these instances exhibit very constrained
neighborhoods for the solutions considered: fl averages 3.3%. Even rc204, with very
few meaningful time windows, has an average fl of 10.1%. Avoiding the systematic
exploration of the whole neighborhood therefore appears advantageous. Looking at
the search effort for plain tree search, the "full" version performs much better than
the "light" one in examining roughly half the number of leaves: as can be expected,
more powerful propagation ends up producing smaller ffl's but also slows down the
exploration as we will see in table 5. The gap in the search effort narrows for branch-
and-bound search where the lower-bound pruning common to both versions has a
significant impact. That impact is striking when we look at the difference between
plain tree search and branch-and-bound search within each version, particularly
the "light" one. The variation in the search effort between the eight groups of
instances, especially visible in column six where we only rely on the time windows for
Table
5. Computation times (in cpu seconds on a sun Sparc 10) for several tree-search strategies.
problem full light
pruning pruning pruning pruning
rc206 4065.2 3488.4 4538.0 282.0 1767.9 323.4
rc207 8532.2 5103.5 8933.6 524.4 2936.7 686.3
rc208 40444.4 9454.2 28542.6 964.3 3475.7 1663.9
pruning, reflects the variation in typical time-window width between those groups
of instances.
The aspiration criterion included in our tabu search algorithm prevents missing
out on the best solution found so far simply because the move leading to it is
tabu. On the other hand, it requires evaluating every tabu move. In a tree-search
setting such as ours, knowing at an internal node that a tabu arc is involved implies
that every move through that node is necessarily tabu. Disregarding the aspiration
criterion could allow pruning whole subtrees of tabu moves. We investigated what
we call tabu pruning. Each time one of the branching variables is fixed to some
value v, thus identifying a break in the current tour, tabu pruning eliminates tabu
arcs from the two sets of candidates, f(v; w)
to reconnect that break. This translates into removing some of the possible
values for the remaining branching variables. Columns five and eight of table 4
report the result of adding tabu pruning to plain tree search (without lower-bound
pruning). This often lowers the search effort though not necessarily (for example,
rc208 in column five or rc206 in the last column) since it affects the variable-selection
heuristic and so the topology of the search tree.
Table
5 is organized as the previous table and gives the computation times. Turning
first to the "full" version, we see that the addition of lower-bound pruning does
significantly reduce the computation time, as hinted by the reduction in search effort
in the previous table. The usefulness of tabu pruning is not proven here: it
may decrease or increase the computation time, depending on the instance. Tabu
pruning can also change the best solution found by the tabu search algorithm. Six
of our 25 benchmark problems showed an increase of the solution cost ranging from
0.1% to 1.5%. On the other hand, one problem showed a decrease of 1.9%.
It is not at all clear that a large and powerful constraint model with several
redundant constraints, designed with a standard branch-and-bound exact (global
search) algorithm in mind, is appropriate for local search. Indeed, the figures for
the "light" version show a marked improvement over the other one. For plain
tree search, this translates into a decrease in the area of one order of magnitude.
What comes as a surprise is that the addition of lower-bound pruning significantly
hampers the efficiency despite its great contribution in reducing the search effort.
Table
6. Computation times (in cpu seconds on a sun Sparc 10) for four implementations of tabu
search on benchmark problems and comparative ratios.
problem non-cp passive cp ratio light ratio light ratio
passive plain plain
rc204 30.4 2615.4 86.0 1412.7 46.5 160.1 5.3
rc206 48.6 1458.7 30.0 282.0 5.8 108.8 2.2
rc207 52.2 2595.3 49.7 524.4 10.0 103.8 2.0
rc208 60.9 1993.2 32.7 964.3 15.8 134.7 2.2
average: 40.5 16.2 4.0
Runtime statistics reveal that the amount of backtracking information maintained
for the branch-and-bound is about 10 times the amount for plain tree search. The
sharp drop in efficiency is apparently due to the repeated storage and retrieval
of all that information. It was not a major factor in the "full" version because
that extra amount of backtracking information was added to an already significant
amount associated to the full constraint model. Tabu pruning generally increases
the computation time and is not attractive for this light-weight version.
This setback for lower-bound pruning prompted us to implement the explicit computation
of lower bounds at tree nodes instead of relying on constraint propagation
to a cost variable. We subsequently refer to this implementation as lower-bound
pruning ? . The improvement in speed was astonishing, as we will see in the next
table.
Table
6 compares the computation time of four tabu search implementations.
Column two represents the specialized version, which is faster as expected. Next
comes the computation time for the passive cp version followed by a comparison
with the specialized version (passive cp / non-cp). That ratio reflects the sole
cost of constraint propagation, here averaging 40:5. The other two groups of two
columns represent the light-plain and light-plain with lower-bound pruning ? versions
and the ratios are all taken with respect to the non-cp version. The ratios
for the light-plain combination indicate how profitable it can be to proceed by
tree search instead of systematically considering every neighbor as in passive cp:
tempering the cost of constraint propagation with the elimination of subtrees of
neighbors yields the average ratio of 16:2. The light-plain combination is thus 2:5
times faster than passive cp. It even outperforms the latter on rc208 for which there
was no elimination of neighbors to speak of (see table 4): the triggering of interface
constraints at various levels of the tree corresponds to factoring out common
constraint propagation fragments among subsets of neighbors. The lower-bound
pruning ? implementation now brings out the savings observed in search effort. It is
on average four times faster than plain tree search and ten times faster than passive
cp. It also comes within a factor of four of the specialized version.
Figure
5. Performance ratio for larger neighborhood search trees.1357
CPU
time
ratio
nb of cities
3-interchange
4-interchange
These experimental results clearly indicate the superiority of our approach over a
more passive use of constraint propagation in local search. Unfortunately, the cost
of constraint propagation and built-in backtracking still prevented us from being
competitive with the specialized version on these instances. We therefore decided to
investigate larger neighborhood search trees in order to increase the natural payoff
of branch-and-bound pruning. This was done in two ways: increasing the size of the
instances (number of cities), which affects the breadth of the neighborhood search
tree; and considering 4-interchanges instead of 3-interchanges, which increases the
depth of the search tree by one. As our previous instances fell in the range 20-40
cities, we considered 20-, 40-, 60-, and 80-city instances taken from [4]. These additional
results are summarized in figure 5 which plots the ratio of the execution time
for our final approach (light lower-bound pruning ? ) over that for the specialized
version, for both 3- and 4- interchange neighborhood structures and for increasing
problem size. Each point is the average of over a dozen instances of varying time
window width.
As expected, our relative performance improves with the growth of the search
tree, especially between 20 and 40 cities. (Note that these results are consistent
with the average value and variability of the ratios previously reported in table 6
on different instances.) For 3-interchanges, the average ratio falls to 1.5 at 80 cities.
Note in particular that for 4-interchanges it drops below one starting at 60 cities: we
thus perform better than the specialized version from that point on. Even though
a 4-interchange is seldom used in practice, a neighborhood search tree of depth
four would not be uncommon: we have already mentioned the cross exchange for
routing; for our physician scheduling application in section 3, changing the value of
two slots at a time instead of one, a very plausible neighborhood structure, would
also correspond to a depth of four.
4.5. Applying the Framework to the GENIUS heuristic
The combination of a well-known tsp heuristic, genius [5], with the constraint
programming routing model sketched at the beginning of the section is described
in [20]. Though this heuristic, composed of a tour construction phase and a post-optimization
phase, is not strictly speaking a local search algorithm, each of its two
phases involves the exploration of a neighborhood very similar to what was used
earlier. It was therefore a good candidate for our framework.
The resulting algorithm, genius-cp, was able to solve variations on the tsp (with
single or multiple time windows, precedence constraints, sequencing constraints,
pick-up and delivery problems) by simply adding the appropriate constraints to
the master model without any modification to the algorithmic part (genius). In
contrast, a subsequent version of the original heuristic to handle single time win-
dows, genius-tw [6], had required major changes: the addition of backtracking
capabilities, special-purpose code to verify feasibility and adjustments of algorithmic
control to reflect the temporal flavor of the problem.
A comparison of genius-cp and genius-tw on benchmark problems with single
time windows revealed that the flexibility of our approach cost us about a factor of
four in speed 5 , but the former more often found the best solution whenever their
solutions differed. As for the other variations on the tsp, no specialized heuristic
based on genius existed and so we compared with a close relative on the other side
of the family, an exact cp algorithm using the same routing model. It confirmed
that genius-cp was more robust and several orders of magnitude faster. The
heuristic solutions obtained were also often optimal and generally very good.
5. Addressing Flexibility
The previous section provided evidence of the search economy achieved by our
framework; the report on genius-cp also displayed some of its flexibility. We
would now like to briefly return to that latter advantage.
Again, the root of that flexibility is the separation of the constraints of a problem
(the declarative part) from the heuristic search strategy (the algorithmic part).
Because of this, a particular heuristic search strategy can serve in different contexts
without any modification of its implementation. Such an approach presents clear
advantages from a software engineering point of view: since one only needs to adapt
the model to the problem, it makes it much easier and faster to tailor a piece of
software to real-life situations while reusing the algorithmic component as is.
It also has an impact on the maintainability of the code, especially if additional
constraints suddenly arise. In such a situation, a non-cp approach would either
have to modify the way valid neighbors are generated or add feasibility tests, to
reflect the additional constraints. Both solutions alter the algorithmic component.
In contrast, a cp approach will add the required constraints to the declarative
component (the model), which often simply amounts to expressing them using
variables already present in the model and standard constraints. For example, we
give below some constraints and their expression in the context of section 4:
sequencing constraints:
city j must be visited last:
must immediately follow city i: S
precedence constraints:
city j must be visited after city i:
multiple time windows:
city i may be visited from 9am to 5pm but not between noon and 1pm:
The adaptation of the program would thus consist of one additional line of code
per new constraint, leaving the rest of it unchanged.
Conclusion
We have proposed a novel framework for local search algorithms in constraint pro-
gramming. By maintaining branch-and-bound search at their core, we believe that
a cleaner and more natural integration is achieved. In addition, the familiar pruning
which can take place yields substantial savings on the number of neighbors that
actually need to be considered. A major advantage of bringing constraint programming
into local search methods is the flexibility and ease with which additional
constraints can be handled.
Two examples of this framework were given: physician scheduling and single-vehicle
routing. Computational experiments on the latter provided an estimate of
the price of constraint programming in this setting: it showed that such a framework
outperforms the simpler, more passive use of constraint propagation in local search
and that it is competitive with a specialized, non-cp local search algorithm. It also
stressed that a light-weight master model may be preferable and that the standard
branch-and-bound approach comes with a computational cost which may outweigh
its benefit: in our case, the explicit computation of lower bounds proved much more
efficient.
A tabu algorithm which is tailored and optimized for a particular context is expected
to perform better. Our experimentation suggests that, given a large enough
neighborhood (and not inordinately large), an implementation of our framework
may run faster. The initial cost of using constraint propagation can turn up a profit
when combined with a branch-and-bound exploration of the neighborhood search
space. The small percentage of feasible neighbors which we encountered, even when
the proportion of truly constraining time windows was very small, indicates that
it is worth investing in the elimination of infeasible subsets of the neighborhood.
A more ambitious study of different and especially larger neighborhoods as well as
different combinatorial problems could serve to strengthen the previous claim and
also to identify possible settings in which the "full" version or tabu pruning may
be advantageous.
Acknowledgments
Financial support for this research was provided by the Natural Sciences and Engineering
Research Council of Canada (NSERC).
Notes
1. Though incomplete search methods have been successfully introduced in the constraint satisfaction
community.
2. The neighborhood for the "shuffle" moves of [2] is explored through a tree search guided by
constraint propagation. This lies one step closer to our approach.
3. A conditional constraint p ) q enforces the consequent q once the antecedent p is verified. We
use the syntax "Var = value" for an antecedent to mean that it is verified when variable Var is
fixed to some value.
4. Granted, such a tree remains relatively shallow but potentially very bushy.
5. This is for a version of genius-cp equipped with lower-bound pruning ? , an improvement over
what is described in [20]
--R
Local Search in Combinatorial Optimization.
Disjunctive Scheduling with Task Intervals.
A Constraint Logic Programming Approach to the Vehicle-Fleet Scheduling Problem
New Insertion and Postoptimization Procedures for the Traveling Salesman Problem.
A Generalized Insertion Heuristic for the Traveling Salesman Problem with Time Windows.
Heuristic for Integer Programming Using Surrogate Constraints.
' E. Taillard, and D. de Werra. A User's Guide to Tabu Search.
Adaptation in Natural and Artificial Systems.
Computer Solutions of the Traveling Salesman Problem.
An Effective Heuristic Algorithm for the Traveling Salesman Problem.
Solving Large-Scale Constraint Satisfaction and Scheduling Problems Using a Heuristic Repair Method
Traveling salesman-type combinatorial problems and their relation to the logistics of regional blood banking
Metastrategy simulated annealing and tabu search algorithms for the vehicle routing problem.
A View of Local Search in Constraint Programming.
An Exact Constraint Logic Programming Algorithm for the Traveling Salesman Problem with Time Windows.
GENIUS-CP: a Generic Vehicle Routing Algorithm.
An Exchange Heuristic for Routing Problems with Time Windows.
Modern Heuristic Techniques for Combinatorial Problems.
Local Search in Routing Problems with Time Windows.
A New Method for Solving Hard Satisfiability Problems.
Algorithms for the Vehicle Routing and Scheduling Problem with Time Window Constraints.
Practical Applications of Constraint Programming.
--TR
--CTR
Michel Gendreau, Constraint Programming and Operations Research: Comments from an Operations Researcher, Journal of Heuristics, v.8 n.1, p.19-24, January 2002
Louis-Martin Rousseau , Michel Gendreau , Gilles Pesant, Using Constraint-Based Operators to Solve the Vehicle Routing Problem with Time Windows, Journal of Heuristics, v.8 n.1, p.43-58, January 2002
Simon de Givry , Laurent Jeannin, A unified framework for partial and hybrid search methods in constraint programming, Computers and Operations Research, v.33 n.10, p.2805-2833, October 2006
Samir Loudni , Patrice Boizumault , Philippe David, On-line resources allocation for ATM networks with rerouting, Computers and Operations Research, v.33 n.10, p.2891-2917, October 2006
Christian Blum , Andrea Roli, Metaheuristics in combinatorial optimization: Overview and conceptual comparison, ACM Computing Surveys (CSUR), v.35 n.3, p.268-308, September
Lucas Bordeaux , Youssef Hamadi , Lintao Zhang, Propositional Satisfiability and Constraint Programming: A comparative survey, ACM Computing Surveys (CSUR), v.38 n.4, p.12-es, 2006 | personnel scheduling problem;interface constraints;constraint programming;traveling salesman problem with time windows;neighborhood model;local search;tabu search |
595043 | Solving Vehicle Routing Problems Using Constraint Programming and Metaheuristics. | Constraint Programming typically uses the technique of depth-first branch and bound as the method of solving optimization problems. Although this method can give the optimal solution, for large problems, the time needed to find the optimal can be prohibitive. This paper introduces a method for using local search techniques within a Constraint Programming framework, and applies this technique to vehicle routing problems. We introduce a Constraint Programming model for vehicle routing, and a system for integrating Constraint Programming and local search techniques. We then describe how the method can be accelerated by handling core constraints using fast local checks, while other more complex constraints are left to the constraint propagation system. We have coupled our local search method with a meta-heuristic to avoid the search being trapped in local minima. Several meta-heuristics are investigated ranging from a simple Tabu Search method to Guided Local Search. An empirical study over benchmark problems shows the relative merits of these techniques. Investigations indicate that the specific long-term memory technique used by Guided Local Search can be used as a diversification method for Tabu Search, resulting in significant benefit. Several new best solutions on the Solomon problems are found in relatively few iterations of our algorithm. | Introduction
This paper describes the use of iterative improvement techniques and meta-heuristics as
the search engine within a Constraint Programming framework (ILOG Solver) and its application
to the Vehicle Routing Problem (VRP).
The VRP is a practical problem that has been studied widely in the literature [10]. The
problem is usually expressed as follows: given a set of customers requiring a visit, and
a fleet of vehicles based at a depot that can perform the visits, construct a set of routes
for the vehicles that minimises the costs of operation. The objective function is usually
expressed as costs related to the number of vehicles and to distance travelled. Constraints
include various capacity constraints on weight, volume, length, etc., time constraints on
when the customer will accept a visit, and the total length of routes. However, in practical
problems we may have many different kinds of additional constraints including legislative
restrictions, established work practices and customer preferences, and a complex objective
function reflecting complicated pay provisions.
Constraint Programming (CP) is a paradigm for representing and solving a wide variety
of problems. Problems are expressed in terms of variables, domains for those variables
and constraints between the variables. The problems are then solved using complete search
techniques such as depth-first search (for satisfaction) and branch and bound (for optimi-
The richness of the language used to express problems in CP makes it an ideal candidate
for VRPs. However, the VRP is an NP-hard problem [3], and for problems of practical size
computing optimal solutions can be too time consuming.
In this paper we investigate how iterative improvement techniques can be used in a CP
framework to replace complete search. As simple local search procedures get trapped in
local minima, the improvement techniques are used in conjunction with a meta-heuristic.
We examine two meta-heuristics: a simple Tabu Search approach [5, 6], and Guided Local
Search [21, 23].
The paper is organised as follows. In section 2 we describe the Constraint Programming
paradigm, how it can be applied to the VRP, and how local search can be performed within
this framework. In section 3 the solution technique using meta-heuristics is discussed. In
section 4, computational tests on the two meta-heuristics are reported. Investigations reveal
that the performance of simple Tabu Search can be significantly increased by incorporating
specific long-term memory features of Guided Local Search.
2. Constraint-Based Modelling of VRPs
Part of the attraction of Constraint Programming is the richness of the language for specifying
the model. ILOG Solver [14] allows real and integer variables to be constrained by
simple bounds and linear or non-linear constraints. Similarly the objective function can be
complex.
Very general expressions can be used as constraints. In addition to expressions involving
the usual arithmetic and logical operators, complex symbolic constraints can be used to
describe a problem. Examples include the all-different constraint, which is used to express
(and efficiently propagate) the fact that each variable in a set must take a different value,
and the ability to constrain the index of an array (by using a constrained variable).
enhances search using constraint propagation. If bounds or constraints on a variable
can be inferred, or are tentatively set, these changes are "propagated" through all the
constraints to reduce the domains of constrained variables.
ILOG Solver uses depth-first search with constraint propagation. At each node in the
search tree, the propagation mechanism removes values from the domains of constrained
variables that are inconsistent with other variables. If the propagation mechanism removes
all values from any variable, then there cannot be a solution in this subtree and the search
backtracks making a different decision at the backtrack point. Backtracking is chrono-
logical: decisions can only be undone in the opposite order to which they were made.
Moreover, the domains of constrained variables can only be reduced as search progresses
down the tree. The domains of all constrained variables can be restored by backtracking
to a previous node, but general enlargement (or relaxation) of domains is not supported.
This has important implications for the way in which vehicle routing problems are solved
in this paper, as discussed in section 2.4.
2.1. A Constraint Programming Model for the VRP
A decision variable R i
is associated with each customer visit i, representing the next visit
performed by the same vehicle. For each vehicle k, there are additional visits S k
marking
the start of the route, and E k marking the end of the route. To read off the itinerary for a
vehicle k, start at S k and follow the "next" pointers through to E k .
The set of customer visits will be referred to as N , starting visits as S, and ending visits
as E. visits. Regarding R as a function, R maps N [ S onto
To model the VRP and other routing problems, it is desirable to have a special constraint
type for dealing with constraints along paths. We use a path constraint [1, 8] that allows
real-valued quantities accumulated along a route to be bounded. The quantities accumulated
can relate to time, load, or other variables. The constraints are of the form
Thus, if visit j immediately follows visit i, quantity Q is accumulated. For example,
setting equal to the travel time between i and j means Q j would be the arrival time at j.
Setting q ij to be the demand at i would accumulate load on the vehicle. This specification
allows other real-world constraints to be expressed succinctly.
In each case a fixed point (boundary condition) must be supplied, for example
in the case of load constraints. A single constraint of this type which contains
an upper bound also has the effect of eliminating subtours (routes that do not include a S k
2.2. Core Constraints
The core constraints in vehicle routing problems are related to time and capacity. Time is
restricted both by the working day and by time windows at customers. Capacity may be
restricted in terms of weight, volume, number of pallet places, etc.
A path constraint can be used to propagate the start time of the customer service along
each vehicle route. In this case, q ij is the service time at i, plus the travel time from i to j.
Single or multiple service time windows could be set by further constraining the start of
service variable for each visit. The start and end of the working day for each vehicle can
be represented by imposing time windows on visits in S and E.
A method of modelling capacity constraints on vehicles is to propagate (via the path
constraint) the free space in the vehicle along each vehicle route. To model F i as the free
space on arrival at visit i, q ij is the change in free space associated with visit i. To indicate
that all vehicles must not be overfilled at any time, constraints of the form F
are imposed. For vehicle k with capacity c k , the fixed point F can be
set. Simultaneous pickups and deliveries can be modelled in a similar way, but this is not
discussed here.
2.3. Side Constraints
One of the significant benefits of CP techniques is that side constraints can be incorporated
into the model with comparative ease. For example, some visits may require special equip-
ment, or some vehicles may be simply too large to enter the premises. Therefore, we need
to be able to disallow a visit being made by particular vehicles.
We model this by propagating a vehicle tag - k for each visit k along each route, using
a constraint similar to the path constraint for which R
S. Thus customer visits served by vehicle k will have tag k. Vehicle k is then forbidden
from making visit i by imposing a constraint of the form - i 6= k. A conjunction of such
expressions can be used to exclude more than one vehicle.
The requirement that two visits i and j must be made by the same (different) vehicles
can also be specified using tags: -
Implementing a length capacity for vehicles provides one final example that demonstrates
a powerful use of vehicle tags. A length restriction is different from a capacity
constraint because it does not accumulate over a route. If visit i involves goods of length l,
and L k is the length of vehicle k, then the constraint L - i
l defines the length constraint.
2.4. Search Strategy
Solutions to CP problems are usually found using complete methods such as depth-first
search and branch and bound. However, for routing problems of practical size, complete
search methods cannot produce solutions in a short and reliable time period. By contrast,
iterative improvement methods have proved very successful in this regard.
Iterative improvement methods operate by changing small parts of the solution, for instance
moving a visit from one route to another. This type of operation involves retracting
previous decisions and making new ones. In contrast to depth-first search, retraction can
be done in any order, not simply in the opposite order the decisions were made. In general
the overhead of implementing this type of non-chronological retraction mechanism in CP
frameworks is very high.
To overcome this problem, the CP system is only used to check the validity of solutions
and determine the values of constrained variables, not to search for solutions. The search
is performed by an iterative improvement procedure. When the procedure needs to check
the validity of a potential solution, it is handed to the CP system. As a part of checking,
constraint propagation using all constraints still takes place. This adds value to the constraint
check, as the iterative improvement method can then take advantage of the reduced
domains to speed up search by performing fast legality checks (see later in this section).
The implementation relies on two representations of the solution. There is a passive rep-
resentation, which is the template against which new solutions are constructed, and which
holds the "current solution" (not necessarily the best solution). The second is an active
representation that holds the constrained variables, and within which constraint propagation
takes place. Variable states in the active representation are "checkpointed" (current
domains are saved) before any changes are made, so that domains can be restored later.
When the CP system performs propagation and validity checks it instantiates the set
of decision variables R using the itinerary in the passive representation. The constraints
then propagate and constrained variables (such as time and capacity variables) have their
domains reduced. If any variable has no legal values, the solution is illegal.
Improvement heuristics generally only modify a very small part of a routing plan. There-
fore, testing the complete solution in the above manner can be inefficient. We have tried to
avoid this inefficiency in two ways: by reducing the amount of work carried out by the CP
system to perform each check, and bypassing the CP checks altogether.
The first method applies if vehicle routes are independent, i.e. have no constraints acting
between visits in them. This is the case in many routing problems. For these problems,
only the routes involved in the modification of the plan need be instantiated in the active
representation. Normally, this means just one or two routes will be instantiated.
The second method of increasing efficiency is to perform tests on the core constraints in
situ (using the domains of constrained variables such as capacity and time, preserved from
the last propagation, as described earlier). Propagation precisely computes the remaining
slack for each cumulative (Q) variable. This slack is reduced as much as possible using all
constraints (i.e. all side constraints) in the problem. These in situ checks can all be done
in constant time using a method derived from Savelsbergh [17]. Only if the constant time
check is successful need the route set be passed to the CP system for full checking.
The acceleration techniques just described can increase performance of a VRP search
engine by a factor of twenty or more, such that up to 200,000 neighbourhood moves can
be examined per second on a high-end PC [1].
3. Solution Methods
Local search operates by considering a set of possible moves. The moves considered in
this paper are described in the following section. Local search repeatedly chooses a move
which reduces the objective value, and then implements this move, until no further legal
cost-reducing moves are available. Two alternatives in choosing a move to perform are
"first accept": choose the first cost-reducing move found, or "best accept": choose the
legal move that reduces the objective by the largest amount. The best accept method is
used throughout this paper.
Local search suffers from the problem that it will get caught in the first local minimum
that it encounters. In order to escape a local minimum, a controlled method of accepting
an up-hill move is required. Meta-heuristics provide the framework for accepting such
moves. In this paper, we examine two meta-heuristics, tabu search [5, 6], and guided local
search [21, 23]. These are described in more detail later.
3.1. Move Operators
We have considered four move operators (see figure 1):
a) 2-opt reverses a section of a route by deleting two arcs, and replacing them with two
others to reform the route.
b) Relocate moves a visit from its position in one route to another position in either the
same or a different route.
c) Exchange swaps two visits from either the same or different route.
d) Cross swaps the end portions of two route.
2-opt is described in [11], the others in [16].
A
A
(a) The 2-opt heuristic
A
A
(b) The relocate heuristic
A
A
(c) The exchange heuristic
A
A
(d) The cross heuristic
Figure
1. Four move operators
3.2. Tabu Search
Tabu Search is a meta-heuristic that has been widely applied to many combinatorial optimization
problems ([7] gives numerous applications) with great success. In particular,
Tabu Search been extensively applied to vehicle routing problems, with good results, for
example [4, 12, 13, 15, 19]. Tabu Search is sufficiently well known that we do not give a
general description, but descriptions can be found in [5, 6, 7].
Table
1. Thresholds for different
move operators
Operator arcs threshold
cross 4 3
exchange 8 6
relocate 6 5
Our implementation of Tabu Search is a simple one involving tabu moves. It does not
use long-term memory for explicit intensification and diversification phases.
For the VRP, moves can be characterised by two sets of directed arcs: arcs added and
arcs removed. For example, the relocate operator (figure 1(b)) removes three arcs and adds
three new arcs. We use two tabu lists of fixed and equal size: one for storing the most
recently added arcs, and the other for storing the most recently removed arcs.
We use the following procedures:
performs a local search, starting at solution S , and returns a new
solution. We use a "best accept" algorithm: among all the legal moves defined by
the move operators (section 3.1), choose the move that decreases the objective by the
greatest amount. Repeat until there is no move that strictly decreases the objective.
ffl RankMoves(S) returns a list of all legal moves from S , ordered according to ascending
cost difference. That is, moves reducing the objective by the greatest amount will
be near the beginning of the list.
ffl IsNotTabu(m) is true if the move m is not tabu as dictated by the tabu lists. In our
implementation, the tabu status of a move m is decided as follows: The arcs that are
removed by m and occur in the "recently added" tabu list are counted. Likewise, the
arcs that are added by m and occur in the "recently deleted" tabu list are counted.
The sum of these is then compared to a threshold dependent on the move type (see
table 1). If the threshold has been met or passed, the move is tabu, and is not tabu
otherwise. Note that in table 1, the number of arcs modified in 2-opt is variable because
the inverted part of the route may be of any length. In all experiments the length of
both lists was 100 arcs. An aspiration criterion was used which could change the tabu
status of a move. If the move would result in a solution better than the current best,
then it was accepted even if tabu.
ffl Perform(m) performs the move.
ffl InsertInTabuList(m) inserts the added and deleted arcs into the appropriate tabu lists.
The Tabu Search algorithm is described by Figure 2. O(S) is the objective function. The
function head(l) returns the first element in the list l, and removes it from l. InitialSolu-
tion() and StoppingCondition() are defined in section 4.
S := InitialSolution() // S is current solution
S := LocalSearch (S) // Make sure we start at a local min
best solution
while not StoppingCondition() do
moves := RankMoves(S)
moved := false
while not moved do
if IsNotTabu(m) then
Perform(m)
moved := true
return S
Figure
2. Tabu Search algorithm
3.3. Guided Local Search
Guided Local Search (GLS) [21, 23] is a meta-heuristic based on penalties. The method
works by adding a penalty factor to the objective function, based on the experience the
search has gained. Roughly speaking, search is penalised if it strays too close to previously
visited local minima, allowing escape from local minima. GLS has proved to be an
effective meta-heuristic for a range of combinatorial optimization problems, for example
see [20, 22, 23, 24].
In what follows, we describe the general algorithm, and then its application to the vehicle
routing problem.
3.3.1. The Guided Local Search Algorithm Guided Local Search moves out of a local
minimum by penalizing particular solution features that it considers should not occur in a
good solution. It defines a modified objective function, augmented with a set of penalty
terms on these features. The usual local search method is then invoked to improve the
augmented objective function. The cycle of local search and penalty term update can be
repeated as often as required.
GLS requires the following components:
ffl A set of features F . Let the indicator function for feature i 2 F be f i . f i the
feature i is in solution S, 0 otherwise.
ffl A cost vector c. c i is the "cost" of feature i.
ffl A penalty factor -.
GLS tracks penalties applied via a penalty vector p. p i is the (integer) number of times
feature i has been penalised so far. Assuming O(S) is the the original objective function
for the problem, GLS defines an augmented objective function:
O
and requires a local search procedure that minimises it. The user must provide procedure
that performs a local search, starting at solution S , and returns a new
solution. The improvement is carried out with respect to the augmented objective O 0 .
GLS provides a function called ChoosePenaltyFeatures(S, p) which takes a solution
and the current spread of penalties, and returns the set of features to be penalised. GLS
penalises the most costly features in the current solution, weighted by the number of times
the features have already been penalised. This has the effect of concentrating penalties on
"bad" features, while tending to accept bad features if they keep appearing in local minima
(i.e. if they seem inevitable). GLS chooses all features i 2 S for which c i =(p i +1) is largest
amongst the features in S. Unless the cost values in c are equivalent or low multiples of
each other, usually only one feature is chosen to penalise.
Assuming the usual functions of InitialSolution() and StoppingCondition() exist, the
GLS algorithm is described in figure 3.
S := InitialSolution() // S is current solution
S := LocalSearch (S) // Make sure we start at a local min
best solution
while not StoppingCondition() do
f := ChoosePenaltyFeatures(S, p)
forall g in f do
return S
Figure
3. GLS algorithm
Parallels can be drawn between GLS and the use of frequency memory in Tabu Search [5].
Frequency memory records the number of times a particular feature has appeared in previous
solutions. It is then used in a diversification phase to penalise the occurrence of
features that have appeared often. However there are two main differences between the
ideas. GLS uses its "memory" throughout the search, rather than in a separate phase. This
eliminates the need for "tuning parameters" for the use and duration of a diversification
phase. Second, the selection of features to penalise in GLS is based on the cost of the
features, as well as the frequency of their occurrence. By penalising features that have
appeared often, Tabu Search may attempt to drive out "good" features. GLS uses domain
knowledge, in the form of the feature costing, to try to avoid this. In addition, the sense in
which the frequency is used is different. In GLS the more often a feature appears and is
penalised, the less likely it is to be penalised further. The is not the case in Tabu Search.
3.3.2. GLS for Vehicle Routing We define our implementation of GLS for the VRP
with reference to the description above.
ffl Feature set F : In [21, 23] for the Travelling Salesman Problem, arcs were chosen as
the feature to penalise. We use the same method here, but use directed arcs, since for
routing problems involving time, direction is important.
ffl Feature costing: We assume that the cost c a of directed arc feature a is the length of
the arc d a .
ffl Penalty factor -: We have found that values of 0.1 to 0.3 work well, and have used 0.2
for the results in section 4.
ffl We again use a "best accept" algorithm: among all the legal moves
defined by the operators in section 3.1, choose the move that decreases the objective by
the greatest amount. Stop when there is no move that strictly decreases the objective.
To implement the objective O 0 , the local search is carried out using a modified distance
matrix. In the modified matrix, each directed arc a has a penalised distance d a + -p a d a .
The matrix is updated each time an element of p is changed.
InitialSolution() and StoppingCondition() are defined in section 4.
4. Computational Experiments
Computational experiments were performed using both the Tabu Search and Guided Local
Search meta-heuristics. For both heuristics the StoppingCondition() function used was
1000 forward moves in the search space (these 1000 forward moves took under 10 minutes
of CPU time). The InitialSolution() function used was that produced by the Savings
method of [2], followed by search to a local minimum. The objective function was the
total distance travelled by all vehicles. There was no incentive to reduce the number of
vehicles. This means that although the results from different methods are comparable with
each other, they are not directly comparable with previously reported best values which
emphasise reducing the number of vehicles.
After the 1000 moves, a final phase is entered by both Tabu Search and GLS where
restrictions are switched off and a search is performed to a local minimum. For GLS, this
corresponds to zeroing all penalties, and finding a local minimum. For Tabu Search, we
search to a local minimum using no tabu list. This final improvement can be particularly
useful in the case of GLS which may be prevented from reaching a true local minimum
during search due to the penalty method employed.
The data for comparison are as used by Solomon [18]. These problems are in 6 classes:
C1, C2, R1, R2, RC1, RC2. Each class contains between 8 and 12 individual problem
instances. All problems have 100 customers, a central depot, capacity constraints, time
windows on the time of delivery, and a total route time constraint. The C problems have
customers located in clusters. In the R problems the customers are at random positions.
The RC problems contain a mix of both random and clustered customers. The C1,
and RC1 problems sets have a short scheduling horizon, and require 9 to 19 vehicles.
Problem classes C2, and RC2 are more representative of "long-haul" delivery with
longer scheduling horizons and require fewer (2 - vehicles. Both time and distance are
given by the Euclidean distance between points.
4.1. Performance of the Algorithms
Figure
4 shows the rate of improvement of Tabu Search and GLS over the six problem
classes. The graphs were produced as follows: at each forward move, the lowest travel distance
found so far for each meta-heuristic on each problem was recorded. This describes a
series of monotonically decreasing curves for each meta-heuristic applied to each problem.
Then, all curves corresponding to a single problem class and single meta-heuristic were av-
eraged, resulting in 12 curves. Finally, these curves were normalised against a baseline,
which is the best average distance value over the class attained by the best meta-heuristic
for the class. Thus, in the graphs, one of the meta-heuristics always attains the 0% point.
In five of the six classes, GLS outperforms simple Tabu Search by a margin varying from
1.2% to 2.7%. In the remaining class, Tabu Search performs 0.5% better than GLS.
4.2. Inside the Search
In an attempt to understand the better performance of GLS over simple Tabu Search, we
examined the search process by observing the change in objective function. From this, we
hope to see when search stagnates, and how aggressively the search attempts to move out
of local minima.
Figure
5 shows the best objective value found so far O(S ), and the current objective
value O(S), as GLS and Tabu Search proceed through 1000 iterations on problem RC107.
Problem RC107 is a typical problem, in that the starting solution can be improved. Problem
RC107 demonstrates the gradual fall in the cost of S . It also shows how GLS diversifies
the search after moving to a new best solution. This can be seen in the rise in the cost of S
following a fall in the cost of S . After a period of diversification, GLS moves out of the
current local minimum, and finds a path to a new local minimum. This trace also shows
how the diversification period tends to become longer during search, suggesting that the
search must roam farther from the previous best solution in order to reduce the best cost.
In comparison, this simple Tabu Search appears to roam within a relatively small distance
from S , and as such cannot escape from the local minimum it is trapped it.
Figure
6 shows behaviour for problem C106. The initial solution to C106 is optimal,
and search is futile. We conjecture that GLS investigated three distinct local minima, or
clusters of local minima. It appears that the search repeatedly returns to the same or a
nearby local minimum before escaping to a new part of the solution space with a new, deep
local minimum. Simple Tabu Search appears to exhibit a harmonic behaviour, swinging
away and then back to S with a frequency apparently related to the tabu tenure.
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class C11357
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class C21357
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class R11357
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class R21357
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class RC11357
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class RC2
Figure
4. Rate of improvement of Tabu Search and GLS
4.3. Including a GLS-type long-term memory into Tabu Search
The drawback of the simple Tabu Search approach presented is that it is only based on
short-term memory. This limits its capability to explore various regions of the search
Distance
Iterations
Current
GLS on problem RC10712601300134013800 200 400 600 800 1000
Distance
Iterations
Current
Tabu Search on problem RC107
Figure
5. Inside Search, problem RC107. On the left GLS, and on the right simple Tabu Search. We see that as
search proceeds GLS tends to roam progressively further from S whereas Tabu Search appears to wander within
a small distance from S .85095010500 200 400 600 800 1000
Distance
Iterations
Current
GLS on problem C10685095010500 200 400 600 800 1000
Distance
Iterations
Current
Tabu Search on problem C106
Figure
6. Inside Search, problem C106. The starting solution is optimal, and we see on the left, GLS again roams
progesssively further from S and appears to find 2 or 3 new local minima. On the right, a harmonic appears
within simple Tabu Search, the frequency possibly a function of the tabu tenure.
space. To better diversify the search, various procedures have already been proposed in
the literature including frequency memory as discussed in section 3.3. (For an alternative
method that addresses the specific case of the VRP, see [15].)
GLS, because of its simplicity and the excellent results it gives (see [9] for a comparison
of GLS with best reported methods) seems to offer an alternative method of implementing
long-term memory within Tabu Search with diversification. It has two advantages over
other methods: incorporation of domain knowledge through the costing of arcs, and constant
diversification without the need for a separate phase.
The resulting Tabu Search still operates by selecting a non-tabu move from the available
neighbourhood. However, after each move a GLS-type procedure is called to update the
weights in the cost matrix. This method is called Guided Tabu Search (GTS) below.
For the combined method, the length of the tabu lists remained at 100 arcs. However,
very slightly better results were achieved by reducing the penalty factor from 0.2 to 0.15.
The performance of GTS relative to GLS and simple Tabu Search is shown in figure 7.
Guided Tabu Search outperforms the other two methods on the "long haul" problems
RC2), performing on average about 1.7% better. For the remaining
problem classes, GTS is not quite as convincing, but competitive.
5. Conclusion
We have described a method for combining Constraint Programming with iterative improvement
techniques. The combination makes full use of the propagation facilities of
the Constraint Programming framework, but does not use a backtracking procedure. The
method was accelerated using a system whereby certain core constraints are maintained
within the search engine, while other side constraints are handled by the Constraint Programming
system. This method was applied to the vehicle routing problem.
Search engines using two different meta-heuristics were examined: a simple Tabu Search
technique, and Guided Local Search. These techniques were compared over a set of standard
benchmark problems. Guided Local Search was found to be superior to the simple
Tabu Search method. Examination of the behaviour of both algorithms suggested that
adding features of Guided Local Search to Tabu Search would improve its performance.
A combined method, Guided Tabu Search, was able to outperform the other methods on
most problems.
In the future, we wish to examine other diversification methods in Tabu Search, and
compare the results to those obtained with Guided Tabu Search. Intensification strategies
in Guided Local and Guided Tabu Search are also of interest.
Further testing on real-world problems is in progress. We hope this will give us further
insights into ways of improving the methods presented.
Acknowledgments
The production of this paper was supported by the GreenTrip project, a research and development
undertaking partially funded by the ESPRIT Programme of the Commission of
the European Union as project number 20603. The partners in this project are Pirelli (I),
Tollpost-Globe (N), and University of Strathclyde (UK).
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class C12610
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class C22610
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class R12610
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class R22610
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class RC12610
Percent
above
Min
Iterations
GLS
Tabu Search
Problem class RC2
Figure
7. Rate of improvement of basic Tabu Search, GLS, and Tabu Search with GLS long-term memory
--R
Scheduling of vehicles from a central depot to a number of delivery points.
Computers and Intractability: A Guide to the Theory of NP-Completeness
A tabu search heuristic for the vehicle routing problem.
search
search
search.
Guided local search for the vehicle routing problem.
Routing problems: A bibliography.
Computer solutions of the traveling salesman problem.
Metastrategy simulated annealing and tabu search algorithms for the vehicle routing problem.
A tabu search heuristic for the vehicle routing problem with time windows.
Beyond the glass-box: Constraints as objects
Probabilitic diversification and intensification in local search for vehicle routing.
Computer aided routing.
The vehicle routing problem with time windows: Minimizing route duration.
Algorithms for the vehicle routing and scheduling problem with time window constraints.
Hybrid genetic algorithm
Fast local search and guided local search and their application to British Telecom's workforce scheduling problem.
Guided Local Search for Combinatorial Problems.
Function optimization using guided local search.
Guided local search.
Partial constraint satisfaction problems and guided local search.
--TR
--CTR
Vincent Tam , K. T. Ma, Combining Meta-Heuristics to Effectively Solvethe Vehicle Routing Problems with Time Windows, Artificial Intelligence Review, v.21 n.2, p.87-112, April 2004
Andrew Lim , Brian Rodrigues , Lei Song, Manpower scheduling with time windows, Proceedings of the ACM symposium on Applied computing, March 09-12, 2003, Melbourne, Florida
C. Voudouris, Guided Local Search an Illustrative Example in Function Optimisation, BT Technology Journal, v.16 n.3, p.46-50, July 1998
Pascal Hentenryck , Laurent Michel, Control Abstractions for Local Search, Constraints, v.10 n.2, p.137-157, April 2005
Alain Chabrier, Vehicle routing problem with elementary shortest path based column generation, Computers and Operations Research, v.33 n.10, p.2972-2990, October 2006
Laurent Michel , Pascal Van Hentenryck, Comet in context, Proceedings of the Paris C. Kanellakis memorial workshop on Principles of computing & knowledge: Paris C. Kanellakis memorial workshop on the occasion of his 50th birthday, p.95-107, June 08-08, 2003, San Diego, California, USA
Filippo Focacci , Andrea Lodi , Michela Milano, Mathematical Programming Techniques in Constraint Programming: A Short Overview, Journal of Heuristics, v.8 n.1, p.7-17, January 2002
J. Christopher Beck , Patrick Prosser , Evgeny Selensky, A case study of mutual routing-scheduling reformulation, Journal of Scheduling, v.9 n.5, p.469-491, October 2006
Christian Blum , Andrea Roli, Metaheuristics in combinatorial optimization: Overview and conceptual comparison, ACM Computing Surveys (CSUR), v.35 n.3, p.268-308, September
Haibing Li , Andrew Lim, Local search with annealing-like restarts to solve the vehicle routing problem with time windows, Proceedings of the 2002 ACM symposium on Applied computing, March 11-14, 2002, Madrid, Spain
Beatrice Ombuki , Brian J. Ross , Franklin Hanshar, Multi-Objective Genetic Algorithms for Vehicle Routing Problem with Time Windows, Applied Intelligence, v.24 n.1, p.17-30, February 2006
K. C. Tan , Y. H. Chew , L. H. Lee, A Hybrid Multiobjective Evolutionary Algorithm for Solving Vehicle Routing Problem with Time Windows, Computational Optimization and Applications, v.34 n.1, p.115-151, May 2006
Alexandre Le Bouthillier , Teodor Gabriel Crainic, A cooperative parallel meta-heuristic for the vehicle routing problem with time windows, Computers and Operations Research, v.32 n.7, p.1685-1708, July 2005 | vehicle routing;constraint programming;tabu search;Guided Local Search |
595077 | Constraint Logic Programming and Generalized Shortest Path Problems. | In this paper we study the relationship between Constraint Programming (CP) and Shortest Path (SP) problems. In particular, we show that classical, multicriteria, partially ordered, and modality-based SP problems can be naturally modeled and solved within the Soft Constraint Logic Programming (SCLP) framework, where logic programming is coupled with soft constraints. In this way we provide this large class of SP problems with a high-level and declarative linguistic support whose semantics takes care of both finding the cost of the shortest path(s) and also of actually finding the path(s). On the other hand, some efficient algorithms for certain classes of SP problems can be exploited to provide some classes of SCLP programs with an efficient way to compute their semantics. | Introduction
Shortest Path (SP) problems [4, 11] are among the most studied network optimization
problems. They are mainly used to represent and solve transportation
problems, where the optimization may involve dierent criteria, says cost, time,
resources, etc. Most interesting is the multi-criteria case, where the optimization
involves a set of criteria to be all optimized [5].
In this paper, we propose the Soft Constraint Logic Programming (SCLP) frame-work
[2, 7] as a linguistic support and a high-level and
exible programming environment
where to model SP problems naturally and solve them eciently.
SCLP programs are logic programs [9] where each ground atom can be seen as an
instantiated soft constraint [1, 3] and it can be associated with an element taken
from a set. Formally, this set is a semiring, that is, a set plus two operations,
and , which basically say how to combine constraints and how to compare
them. The presence of these two operations allows to replace the usual boolean
algebra for logic programming with a more general algebra where logical and and
logical or are replaced by the two semiring operations. In this way, the underlying
* Research partially supported by Italian MURST projects \Tecniche Formali per Sistemi Soft-
ware" and "Concurrency, Higher-Order and Types".
logic programming engine provides a natural tool to specify and solve combinatorial
problems (like SP problems), while the soft constraint machinery provides greater
expressivity and
exibility. In particular, the
exibility comes from the fact that
the same SCLP programming environment, and operational semantic engine, can
be used with dierent semirings (thus using dierent kinds of soft constraints), as
we will see later in this paper.
Here we consider several versions of SP problems, from the classical one to the
multi-criteria case, from partially ordered SP problems to those that are based on
modalities, and we show how to model and solve them via SCLP programs. The
basic idea is that soft constraints allow to faithfully represent the optimization
criteria, and CLP provides a declarative way to describe the given SP problem.
Moreover, this way of modeling and solving SP problems allows to associate with
such problems both a declarative and an operational semantics.
The main results of the paper are as follows:
Both classical, multi-criteria, partially-ordered, and modality-based SP problems
are given a modelization as SCLP programs; such programs are able to
both nd the cost of the shortest path(s) and also a shortest path itself.
A general methodology is provided to nd a non-dominated path for both multi-criteria
and partially-ordered SP problems; this methodology is based on a
change of semiring, but does not require any change in the underlying SCLP
syntax and semantics.
A new algorithm to obtain the semantics for a particular class of SCLP programs
is given, which is obtained by using a generalized version of the Floyd-Warshall
algorithm [6] for SP problems.
The paper is organized as follows: Section 2 gives the basic notions of soft constraints
and SCLP programs, Section 3 shows the construction to pass from a
classical SP problem to a CLP program, while Section 4 considers multi-criteria
and partially-ordered SP problems, and Section 5 deals with modality-based SP
problems. Then, in Section 6 we provide a class of SCLP programs with an efcient
algorithm to compute their semantics, and nally Section 7 concludes the
paper by summarizing its contributions and hinting at interesting directions for
future work.
2. Soft Constraint Logic Programming
In this section we describe the soft constraint logic programming (SCLP) framework,
which we will later use to to describe SP problems in a declarative fashion. All the
formal details that are skipped here can be found in [2, 3].
The SCLP framework is based on the notion of c-semiring introduced in [1, 3].
A c-semiring S is a tuple hA; A is a set with two special elements
and with two operations and that satisfy certain properties:
is closed, commutative, associative, idempotent,0 is its unit element and 1 is its
a . 0.9
b . 0.5
a a . 0.8
a b . 0.2
b a . 0
b . 0.1
x y
a . 0.9
Figure
1. A fuzzy CSP.
absorbing element; is closed, associative, commutative, distributes over +, 1 is
its unit element, and 0 is its absorbing element.
The operation denes a partial order S over A such that a S b i a
when a S b holds, we say that b is better than a. Other properties related to
the two operations are: + and are monotone on S ; 0 is its minimum and 1 its
maximum; is a complete lattice and + is its lub. Finally, if is idempotent
distributive lattice and its glb.
Semiring-based constraint satisfaction problems (SCSPs) are constraint problems
where each variable instantiation is associated with an element of a c-semiring A
(to be interpreted as a cost, level of preference, . ), and constraints are combined
via the operation and compared via the S ordering. Varying the set A and
the meaning of the + and operations, we can represent many dierent kinds of
problems, having features like fuzziness (using the semiring
optimization Moreover, the Cartesian product of
two c-semirings is another c-semiring, and this can be fruitfully used to describe
multi-criteria constraint satisfaction and optimization problems.
Figure
1 shows an example of a fuzzy SCSP. In this gure, variables are circles,
constraints are arcs, and semiring values are written to the right of the corresponding
tuples. The solutions of this SCSP are pairs of values (that is, a value for
each of the two variables) and, according to the c-semiring
semiring value is obtained by looking at the smallest
value for all the subtuples (as many as the constraints) forming the pair.
The SCLP framework [2] extends the classical constraint logic programming formalism
[8] in order to handle also SCSP [1, 3] problems. In passing from CLP
to SCLP languages, we replaced classical constraints with the more general SCSP
constraints where we are able to assign a level of preference to each instantiated
constraint (i.e. a ground atom). To do this, we also modied the notions of inter-
pretation, model, model intersection, and others, since we had to take into account
the semiring operations and not the usual CLP operations. For example, while
CLP interpretations associate a truth value (either true or false) with each ground
atom, in SCLP ground atoms must be given one of the elements of the semiring.
Also, while in CLP the value associated with an existentially quantied atom is the
logical or among the truth values associated with each of its instantiations, here we
Table
1. A simple example of an SCLP program
p(a,c) :- r(a).
q(a) :- t(a).
t(a) :- 2.
r(a) :- 3.
had to replace the or with another operation which refers to one of the semiring
operations (the +). The combination of atoms, which in CLP is modeled via logical
and, in SCLP is instead handled via the operation of the semiring.
Besides the model-theoretic semantics based on models and interpretations, SCLP
programs come also with a xpoint and an operational semantics. These semantics
are conservative extensions of the corresponding ones for logic programming (LP),
since by choosing a particular semiring (the one with just two elements, true and
false, and the logical and and or as the two semiring operations) we get exactly the
semantics.
The three semantics have been shown to be equivalent. In particular, we have
proven that, given the set of all refutations starting from a given goal, it is possible
to derive the declarative meaning of both the existential closure of the goal and its
universal closure.
A simple example of an SCLP program over the semiring hN; min; +; +1; 0i,
where N is the set of non-negative integers and is represented in
Table
1. The choice of this semiring allows to represent constraint optimization
problems where the semiring elements are the costs for the instantiated atoms. Note
that the ordering S in this semiring coincides with the ordering over integers.
The intuitive meaning of a semiring value like 3 associated with the atom r(a) is
that r(a) costs 3 units. Thus the set N contains all possible costs, and the choice
of the two operations min and + implies that we intend to minimize the sum of
the costs. This gives us the possibility to select the atom instantiation which gives
the minimum cost overall.
Given a goal like s(x) to this program, the semantics collects both a substitution
for x (in this case, x = a) and also a semiring value (in this case, 2) which represents
the minimum cost among the costs for all refutations for s(x). Figure 2 shows the
tree structure representing the two possible refutations for the goal s(x). Each node
in the tree represents a state of the computation, and the root represents the initial
state. Each computation state contains both the current goal and a semiring value.
At the beginning, the semiring value is the best one (0 in this example). Then, at
each step, one clause or fact is used, and this changes the current goal, accumulates
a substitution (written on the links of the tree), and combines the current semiring
value with a new value given by the used clause. If a clause has no semiring value
(like the rst four clauses of the example), the associated value is assumed to be
the best one. The combination of these two semiring values is achieved via the
multiplicative operation of the semiring, which in this example is the sum. All the
semiring values obtained by the refutations of the same goal (and with the same
substitution) are then combined together via the additive operation of the semiring,
which in this example is the min operation. Therefore the two refutations in Figure
2 produce the semiring value 2. The formal denition of the operational
semantics of SCLP programs can be found in [2].
Figure
2. The SCLP refutation tree for goal s(X).
The presence of a possibly partial order among the elements of the semiring
makes the operational semantics more complex to compute. In fact, there could
be several refutations for a goal which lead to dierent semiring elements which
are not comparable in the partial order. In this case, these elements have to be
combined in order to get the solution corresponding to the given goal, and their
combination could be not reachable by any refutation path in the search tree.
The fact that we have to combine several refutation paths when we have a partial
order (instead of a total one) can be fruitfully used in the context of this paper
when we have an SP problem with incomparable costs in the arcs. In fact, in the
case of a partial order, the solution of an SP problem should consists of all those
paths which are not \dominated" by others.
SCLP programming has been implemented. Its implementation has been described
in [7], and the system clp(FD,S) is available for free. More information
about the clp(FD,S) system, including also the instructions on how to down-load it,
can be found at the URL http://pauillac.inria.fr/~georget/clp fds.html.
3. Classical SP Problems
A shortest path (SP) problem can be represented as a directed graph
where each arc e 2 E from node p to node q (p; q 2 N) has associated a label
representing the cost of the arc from p to q.
There are four versions of the problem: the single pair problem, the single source
problem, the single sink problem, and the all pair problem. However, the single
source and the single sink problems are directional duals of each other, the single
pair problem at least partially solves the single source/sink problem, and one way
to solve the all pair problem is to solve n single source/sink problems. For these
reasons, the single sink (source) is fundamental and we concentrate on it. Given a
set S of nodes and any node v in S (the sink), a solution of the problem consists
of nding a path (or a set of paths) between any node of S and v, whose cost is
minimal.
Consider for example the SP problem represented in Figure 3: each arc has
associated a label representing the cost (in money, time, space, . ) of that arc.
In this example node v is the sink. Thus, given any node, we want to nd a path
from this node to the sink v (if it exists) that minimizes the cost.33
s
r
Figure
3. An SP problem.
To represent the classical version of SP problems, we consider SCLP programs
over the semiring which, as noted above, is an appropriated
framework to represent constraint problems where one wants to minimize the sum
of the costs of the solutions.
From any SP problem we can build an SCLP program as follows. For each arc we
have two clauses: one describes the arc and the other one its cost. More precisely,
the head of the rst clause represents the starting node, and its body contains
both the nal node and a predicate, say c, representing the cost of the arc. Then,
the second clause is a fact associating to predicate c its cost (which is a semiring
element). For example, if we consider the arc from p to q with cost 2, we have the
clause
Table
2. The SCLP program representing the SP problem in Figure 3.
2.
pr , r. c pr :- 3.
r :- c rq , q. c rq :- 7.
r :- c rt , t. c rt :- 1.
r :- c ru , u. c ru :- 3.
s :- c sp , p. c sp :- 1.
2.
2.
ts , s. c ts :- 3.
t. c ut :- 2.
and the fact
c pq :- 2.
Finally, we must code that we want v to be the nal node of the path. This is done
by adding a clause of the form v :- 0. Note also that any node can be required
to be the nal one, not just those nodes without outgoing arcs (like v is in this
example). The whole program corresponding to the SP problem in Figure 3 can be
seen in Table 2.
To compute a solution of the SP problem it is enough to perform a query in the
SCLP framework; for example, if we want to compute the cost of the path from r
to v we have to perform the query :- r. For this query, we obtain the value 6, that
represents the cost of the best path(s) from r to v.
Notice that to represent classical SP problems in SCLP, we do not need any
variable. Thus the resulting program is propositional. However, this program,
while giving us the cost of the shortest paths, does not give us any information
about the arcs which form such paths. This information could be obtained by
providing each predicate with an argument, which represents the arc chosen at
each step.
Figure
4 shows the same SP problem of Figure 3 where the arcs outgoing each node
have been labeled with dierent labels to distinguish them. Such labels can then
be coded into the corresponding SCLP program to \remember" the arcs traversed
during the path corresponding to a solution. For example, clause
would be rewritten as
p(a) :- c pq , q(X).
Here constant a represents one of the arcs going out of p: the one which goes to q.
If all clauses are rewritten similarly, then the answer to a goal like :- r(X) will be
both a semiring value (in our case 6) and a substitution for X . This substitution
s
r
a
c
a
a
a
c
c
a
Figure
4. An SP problem with labeled arcs.
will identify the rst arc of a shortest path from r to v. For example, if we have
means that the rst arc is the one that goes from r to t. To nd a
complete shortest path, we just need to compare the semiring values associated
with each instantiated goal, starting from r and following the path. For example,
in our case (of the goal 9X:r(X)) we have that the answer to the goal will be
with semiring value 6. Thus we know that a shortest path from r to v can start
with the arc from r to u. To nd the following arc of this path, we compare the
semiring values of u(a), u(b), and u(c). The result is that u(c) has the smallest
value, which is 3. Thus the second arc of the shortest path we are constructing is
the one from u to v. The path is now nished because we reached v which is our
sink.
Notice that a shortest path could be found even if variables are not allowed in
the program, but more work is needed. In fact, instead of comparing dierent
instantiations of a predicate, we need to compare the values associated with the
predicates that represent nodes reachable by alternative arcs starting from a certain
node, and sum them to the cost of such arcs. For example, instead of comparing
the values of p(a) and p(b) (Figure 4), we have to compare the values of q
of r
Figure
3).
A third alternative to compute a shortest path, and not only its cost, is to use
lists: by replacing each clause of the form
with the clause
during the computation we also build the list containing all arcs which constitute
the corresponding path. Thus, by giving the goal :- p(L)., we would get both the
cost of a shortest path and also the shortest path itself, represented by the list L.
An alternative representation, probably more familiar for CLP-ers, of SP problems
in SCLP is one where there are facts of the form
c(p,q) :- 2.
s
r
Figure
5. A multi-criteria SP problem.
c(u,v) :- 3.
to model the graph, and the two clauses
path(X,Y) :- c(X,Y).
path(X,Y) :- c(X,Z), path(Z,Y).
to model paths of length one or more. In this representation the goal to be given to
nd the cost of the shortest path from p to v is :- path(p,v). This representation
is obviously more compact than the one in Table 2, and has equivalent results and
properties. However, in this paper we will use with the simpler representation, used
in
Table
2, where all clauses have at most one predicate in the body. The possibility
of representing SP problems with SCLP programs containing only such a kind of
clauses is important, since it will allow us to use ecient algorithms to compute
the semantics of such programs (see Section 6 for more details).
4. Partially-ordered SP Problems
Sometimes, the costs of the arcs are not elements of a totally ordered set. A typical
example is obtained when we consider multi-criteria SP problems.
For example, if an arc represents a piece of highway between two cities, then we
can label each arc both with the cost and with the time needed to follow this piece.
Then, we want to nd the paths which have both the minimum overall cost and the
minimum overall time. In this example, there may be cases in which the labels of
two arcs are not compatible, like h$5; 20 0 i and h$7; 15 0 i. In general, when we have a
partially ordered set of costs, it may be possible to have several paths, all of which
are not dominated by others, but which have dierent incomparable costs.
Consider for example the multi-criteria SP problem shown in Figure 5: each arc
has associated a pair representing the weight of the arc in terms of cost and time.
Given any node, we want to nd a path from this node to v (if it exists) that
minimizes both criteria.
Table
3. The SCLP program representing the multi-criteria SP problem in Figure 5.
r :- c rq , q. c rq :- < 7,3 >.
r :- c rt , t. c rt :- < 1,3 >.
r :- c ru , u. c ru :- < 3,4 >.
ts , s. c ts :- < 3,2 >.
t. c ut :- < 2,1 >.
We can translate this SP problem into the SCLP program in Table 3. This
program works over the semiring
are classical min and +, suitably extended to pairs. In practice,
this semiring is obtained by putting together, via the Cartesian product, two instances
of the semiring hN; min; +; +1; 0i (we recall that the Cartesian product of
two c-semirings is a c-semiring as well [3]). On of the instances is used to deal with
the cost criteria, the other one is for the time criteria. By working on the combined
semiring, we can deal with both criteria simultaneously: the partial order will tell
us when a pair h cost, time i is preferable to another one, and also when they are
not comparable.
To give an idea of another practical application of partially ordered SP problems,
just think of network routing problems where we need to optimize according to the
following criteria: minimize the time, minimize the cost, minimize the number of
arcs traversed, and maximize the bandwidth. The rst three criteria correspond
to the same semiring, which is hN; min; +; +1; 0i, while the fourth criteria can
be characterized by the semiring h[0; U ]; max; min; 0; Ui, where U is the maximal
bandwidth in an arc. In this example, we have to work on a semiring which is
obtained by vectorizing all these four semirings. Each of the semirings is totally
ordered but the resulting semiring, whose elements are four-tuples, is partially
ordered.
Notice that the only dierence between the structure of the program in Table
3 and the one in the previous section is that here we have costs represented by
pairs of values, and, since we have a partial order, two such pairs may possibly be
incomparable. This may lead to a strange situation while computing the semantics
of a given goal. For example, if we want to compute the cost and time of a best
path from p to v, by giving the query :- p., the resulting answer in this case is the
value h7; 7i. While the semiring value obtained in totally ordered SCLP programs
represented the cost of one of the shortest paths, here it is possible that there are no
paths with this cost: the obtained semiring value is in fact in general the greatest
lower bound of the costs of all the paths from p to v. This behavior comes from the
fact that, if dierent refutations for the same goal have dierent semiring values,
the SCLP framework combines them via the + operator of the semiring (which, in
the case of our example, is the min 0 operator). If the semiring is partially ordered,
it may be that a + b is dierent from both a and b. On the contrary, if we have a
total order a + b is always either a or b.
This of course is not satisfactory, because usually one does not want to nd the
greatest lower bound of the costs of all paths from the given node to the sink, but
rather prefers to have one of the non-dominated paths. To solve this problem, we
can add variables to the SCLP program, as we did in the previous section, and also
change the semiring. In fact, we now need a semiring which allows us to associate
with each node the set of the costs of all non-dominated path from there to the
sink. In other words, starting from the semiring (which, we
recall, in our case is hN now have to work with
the semiring P H
is the Hoare Power Domain [10] of A, that is,
In words, P H (A) is the set of all subsets of A which
are downward closed under the ordering S . It is easy to show that such sets
are isomorphic to those containing just the non-dominated values. Thus in the
following we will use this more compact representation for eciency purposes.
In this compact representation, each element of P H (A) will represent the costs
of all non-dominated paths from a node to the sink;
the top element of the semiring is the set A (its compact form is f1g, which in
our example is fh0; 0ig);
the bottom element is the empty set;
the additive operation ] is the formal union [10] that takes two sets and obtains
their union;
the multiplicative operation takes two sets and produces another set obtained
by multiplying (using the multiplicative operation of the original
semiring, in our case +') each element of the rst set with each element of
the second one;
the partial order of this semiring is as follows: a P H (S) b i a b, that is
for each element of a, there is an element in b which dominates it (in the partial
order S of the original semiring).
From the theoretical results in [10], adapted to consider c-semirings, we can prove
that P H (S) and its more compact form are indeed isomorphic. Moreover, we can
also prove that given a c-semiring S, the structure P H (S) is a c-semiring as well.
Theorem 1 [P H (S) is a c-semiring] Given a c-semiring 1i, the
structure obtained using the Power domain of Hoare
operator is a c-semiring.
Proof: It easily follows from the properties of the operator in the c-semiring
S and from the properties (commutativity, associativity, and idempotence) of the
formal union ] in P H (S).
Note that in this theorem we do not need any assumption over the c-semiring
S. Thus the construction of P H (S) can be done for any c-semiring S. Notice also
that, if S is totally ordered, the c-semiring P H (S) does not give any additional
information w.r.t. S. In fact, if we consider together the empty set (with the
meaning that there are no paths) and the set containing only the bottom of A
(with the meaning that there exists a path whose cost is 0), it is possible to build
an isomorphism between S and P H (S) by mapping each element p (a set) of
onto the element a of A such that a 2 p and a dominates all elements in the set p.
The only change we need to make to the program with variables, in order to work
with this new semiring, is that costs now have to be represented as singleton sets.
For example, clause c pq :- < 2, 4 >. will become c pq :- f< 2, 4 >g.
Let us now see what happens in our example if we move to this new semiring. First
we give a goal like :- p(X). As the answer, we get a set of pairs, representing the
costs of all non-dominated paths from p to v. All these costs are non-comparable in
the partial order, thus the user is requested to make a choice. However, this choice
could identify a single cost or also a set of them. In this second case, it means
that the user does not want to commit to a single path from the beginning and
rather prefers to maintain some alternatives. The choice of one cost of a specic
non-dominated path will thus be delayed until later. If instead the user wants to
commit to one specic cost at the beginning, say then proceeds to
nd a path which costs exactly By comparing the answers for all goals of
the form p(a), where a represents one of the arcs out of p, we can see which arc
can start a path with cost In fact, such an arc will be labeled
and will lead to a node with an associated set of costs
Suppose it is the arc from p to q, which has cost h7; 3i. Now
we do the same with goals of the form q(a), to see which is the next arc to follow.
However, we now have to look for the presence of a pair
Notice that each time we look for the next arc, we choose just one alternative
and we disregard the others. If we used a xpoint (or any bottom-up) semantics to
compute the answer of the initial goal :- p(X)., then all the other answers we need
for this method have been already computed, thus the method does not require any
additional computational eort to nd a non-dominated path.
Notice also that the sets of costs associated with each node are non-dominated.
Thus the size of these sets in the worst case is the size of the maximal "horizontal
slice" of the partial order: if we can have at most N non-dominated element in the
partial order, then each of such sets will have size at most N . Of course in the
worst case N could be the size of the whole semiring (when the partial order is
completely "
at").
Most classical methods to handle multi-criteria SP problems nd the shortest
paths by considering each criteria separately, while our method deals with all criteria
at once. This allows to obtain optimal solutions which are not generated by
looking at each single criteria. In fact, some optimal solutions could be non-optimal
in each of the single criteria, but still are incomparable in the overall ordering. Thus
we oer the user a greater set of non-comparable optimal solutions. For example,
by using the time-cost multi-criteria scenario, the optimal solution w.r.t. time could
be 1 minute (with cost of 10 dollars), while the optimal solution w.r.t. cost could
be 1 dollar (with time of 10 minutes). By considering both criteria together, we
could also obtain the solution with 2 minutes and 2 dollars!
Finally, this method is applicable not only to the multi-criteria case, but to any
partial order, giving us a general way to nd a non-dominated path in a partially-ordered
SP problem. It is important to notice here the
exibility of the semiring
approach, which allows us to use the same syntax and computational engine, but
on a dierent semiring, to compute dierent objects.
5. Modality-based SP Problems
Until now we have considered situations in which an arc is labeled by its cost, be it
one element or a tuple of elements as in the multi-criteria case. However, sometimes
it may be useful to associate with each arc also information about the modality to
be used to traverse the arc.
For example, interpreting arcs as links between cities, we may want to model
the fact that we can cover such an arc by car, or by train, or by plane. Another
example of a modality could be the time of the day in which we cover the arc, like
morning, afternoon, and night. In all these cases, the cost of an arc may depend on
its modality.
An important thing to notice is that a path could be made of arcs which not
necessarily are all covered with the same modality. For example, the path between
two cities can be made of arcs, some of which are covered in the morning and
others in the afternoon. Moreover, it can be that dierent arcs have dierent sets
of modalities. For example, from city A to city B we can use both the car or the
train, and from city B to city C we can use only the plane. Thus modalities cannot
be simply treated by selecting a subset of arcs (all those with the same modality).
An example of an SP problem with the three modalities representing car (c), plane
(p), and train (t) can be seen in Figure 6. Here the problem is to nd a shortest
path from any node to v, and to know both its cost and also the modalities of its
arcs.
This SP problem with modalities can be modeled via the SCLP program in Table
4. In this program, the variables represent the modalities.
If we ask the query :-p(c)., it means that we want to know the smallest cost for
a trip from p to v using the car. The result of this query in our example is
(using the path p r u v).
c
c
c
c
c
c
c
s
r
Figure
6. An SP problem with modalities.
Table
4. The SCLP program representing the SP problem with modalities.
2.
pr (X), r(X). c pq (p) :- 3.
pr (c) :- 3.
7.
7.
ts (X), s(X). c sr (t) :- 2.
2.
ts (p) :- 3.
ts (t) :- 3.
c up (c) :- 3.
c up (t) :- 1.
c ut (t) :- 2.
c uv (t) :- 3.
c uv (c) :- 2.
Notice that the formulation shown in Figure 4 puts some possibly undesired
constraints on the shortest path to be found. In fact, by using the same variable in
all the predicates of a rule, we make sure that the same modality (in our case the
same transport mean) is used throughout the whole path. If instead we want to
allow dierent modalities in dierent arcs of the path, then we just need to change
the rules by putting a new variable on the last predicate of each rule. For example,
rule
would become
Now we can use a modality for the arc from p to q, and another one for the next
arc. In this new program, asking the query :-p(c). means that we want to know
the smallest cost for a trip from p to v using the car in the rst arc.
The same methods used in the previous sections to nd a shortest path, or a
non-dominated path in the case of a partial order, can be used in this kind of
SCLP programs as well. Thus we can put additional variables in the predicates to
represents alternative arcs outgoing the corresponding nodes, and we can shift to
the semiring containing sets of costs to nd a non-dominated path. In particular,
a clause like
would be rewritten as
p(X,a) :- c pq (X), q(Y,Z).
6. An SP Algorithm for a Class of SCLP Programs
Summarizing what we did in the previous sections, we can say that the general
form of the SCLP programs we use to represent SP problems consists of several
clauses for each predicate p i , where each clause body has one constraint and one
other predicate p j , plus one special clause for the sink predicate (with a 0 in the
body), plus the facts dening the costs of the arcs. Table 5 shows this general form
(only the clauses and without variables). It is important to notice that these are not
general SCLP programs, since there is always one predicate symbol in each clause
body (since the constraint can be replaced by its cost). In the logic programming
literature, these programs are called linear, because of the restriction on the number
of predicates in the bodies of the clauses.
Given any SCLP program of the form shown in Table 5, its semantics can be
obtained using classical methodologies (for the CLP literature) as described in
Section 2. However, we will now show an additional method, based on a classical
algorithm for SP problems, suitable adapted to c-semirings, to obtain the same
semantics. The algorithm we will use is the one developed by Floyd and Warshall
[6]. To put the SCLP program into a shape which can be handled by this algorithm,
we rst need to transform it into a system of linear equations, one for each predicate:
the left hand side of the equation is the chosen predicate, while the right hand side
is obtained by combining the bodies of all the clauses dening the predicates via
the operator, and replacing the comma with the operator in each body. The
Table
5. The general form of an SCLP program representing an SP problem.
Table
6. The system of equations corresponding to the SCLP program form of Table 5.
result of this transformation, applied to the program of Table 5, can be seen in
Table
6.
From this system of equations we can now build a graph with a node i for each
predicate and where the cost of the arc between nodes i and j is given by
predicate c ij . In this way, this system of equations can be interpreted also as the
matrix showing, for each pair of nodes, the cost of the arc (if it exists) between
such nodes. In fact, each column (and row) can be associated with one node.
Given this matrix, the algorithm works by selecting each triple of nodes, say i,
and k, and performing the following
and operators in this assignment refer to the operations of the chosen semiring.
The triples are chosen by rst selecting a value for index k (which is the intermediate
node in the two-step path), and then varying the indices i and j in all possible
ways (to consider all two-step paths from i to j). After considering all values for
k, that is, after n 3 steps, the value of the element in row i and column v represents
the cost of the shortest path from node i to v. In terms of SCLP semantics, this is
the semantics of predicate p i .
This method to obtain the semantics of an SCLP program of the form in Table 5
can be used independently of the semiring underlying the given program. In fact,
as noted above, the version we use of the original Floyd-Warshall algorithm does
not depend on the meaning of the + and operators. In particular, it can also be
used for partially ordered semirings. However, if the semiring we consider is totally
ordered, we can also use any other classical algorithm for solving SP problems.
Summarizing, this section provides a class of SCLP programs, over any semiring,
with a new method to obtain the semantics whose complexity is cubic in the number
of predicates of the program.
The form of the SCLP program in Table 5 does not contain any variable. However,
our method works also when each predicate (both the p i and the c ij predicates)
has some variables, provided that, in each clause, all the predicates have the same
variables in the same order. Thus, for example, we can admit clauses of the form
This kind of clauses can be handled by passing
to a more complex semiring, where each element is a vector (or a matrix) of the
elements of the original semiring, and the two operations are vectorizations of the
original ones.
7. Conclusions
We have investigated the relationship between shortest path problems and constraint
programming, proposing the soft constraint logic programming framework
to model and solve many versions of this problem in a declarative way. In particular,
both classical, multi-criteria, partially-ordered, and modality-based SP problems
are shown to be expressible in this programming formalism.
We also have shown that certain algorithm to solve SP problems can be used
to compute eciently the semantics of a certain class of SCLP programs. Such a
class could be extended by using structures more complex than semirings, or by
considering trees instead of paths. We plan to investigate these structures in the
future.
In particular, we plan to use SCLP programs also to model and solve best tree
problems. We also intend to apply our methodology to specify and solve planning
problems, since in many cases such problems can be cast as best tree problems over
the graph describing all possible moves of the planning scenario.
--R
Constraint Solving over Semirings.
An appraisal of some shortest-paths algorithms
Algorithm 97: Shortest path.
Compiling semiring-based constraints with clp(fd
Foundations of Logic Programming.
Power domains.
--TR
--CTR
Stefano Bistarelli , Francesca Rossi, Semiring-based contstraint logic programming: syntax and semantics, ACM Transactions on Programming Languages and Systems (TOPLAS), v.23 n.1, p.1-29, Jan. 2001
Alberto Lluch-Lafuente , Ugo Montanari, Quantitative -calculus and CTL defined over constraint semirings, Theoretical Computer Science, v.346 n.1, p.135-160, 23 November 2005 | shortest path problems;soft constraints;constraint logic programming |
595085 | Greedy and Local Search Heuristics for Unconstrained Binary Quadratic Programming. | In this paper, a greedy heuristic and two local search algorithms, 1-opt local search and k-opt local search, are proposed for the unconstrained binary quadratic programming problem (BQP). These heuristics are well suited for the incorporation into meta-heuristics such as evolutionary algorithms. Their performance is compared for 115 problem instances. All methods are capable of producing high quality solutions in short time. In particular, the greedy heuristic is able to find near optimum solutions a few percent below the best-known solutions, and the local search procedures are sufficient to find the best-known solutions of all problem instances with n 100. The k-opt local searches even find the best-known solutions for all problems of size n 250 and for 11 out of 15 instances of size n = 500 in all runs. For larger problems (n = 500, 1000, 2500), the heuristics appear to be capable of finding near optimum solutions quickly. Therefore, the proposed heuristicsespecially the k-opt local searchoffer a great potential for the incorporation in more sophisticated meta-heuristics. | is given, and a binary vector of length n is searched, such that the quantity
is maximized. This problem is also known as the (unconstrained) quadratic bivalent programming
problem, the (unconstrained) quadratic zero{one programming problem, or the (uncon-
strained) quadratic (pseudo-) Boolean programming problem (Beasley, 1998).
The BQP is known to be NP-hard (Garey & Johnson, 1979) and has a large number
of applications, for example in capital budgeting and nancial analysis problems (Laughunn,
1970; McBride & Yormark, 1980), CAD problems (Krarup & Pruzan, 1978), tra-c message
management problems (Gallo et al., 1980), machine scheduling (Alidaee et al., 1994), and
molecular conformation (Phillips & Rosen, 1994). Furthermore, several other combinatorial
optimization problems can be formulated as a BQP, such as the maximum cut problem, the
maximum clique problem, the maximum vertex packing problem and the maximum independent
set problem (Ivanescu, 1965; Pardalos & Rodgers, 1992; Pardalos & Xue, 1994).
Several exact methods have been developed to solve the BQP (Pardalos & Rodgers, 1990;
Barahona et al., 1989; Billionnet & Sutter, 1994; Helmberg & Rendl, 1998), but due to the
computational complexity of the problem, heuristics have been proposed recently to nd solutions
to large problem instances, including tabu search (Beasley, 1998; Glover et al., 1998b;
Glover et al., 1998a), scatter search (Amini et al., 1999), simulated annealing (Beasley, 1998;
Katayama & Narihisa, 1999) and evolutionary algorithms (Lodi et al., 1998; Merz & Freisleben,
1999b).
In this paper, a greedy heuristic and two local search algorithms for the unconstrained
binary quadratic programming problem (BQP) are presented. The greedy heuristic constructs
a feasible solution in n steps where n denotes the problem size, i.e. the number of elements of
a solution. In each step, the greedy heuristic selects an element and a value for it by making
a most favorable choice. Additionally, a randomized greedy heuristic is described in which
random components are added to the deterministic greedy heuristic.
The local search heuristics iteratively search a better solution in the neighborhood of the
current solution until no better solution exists and thus a local optimum is reached. The
neighborhood of the rst local search algorithm {the 1-opt local search { is dened by the
solutions that can be reached by changing a single element in the current solution. The second
local search is a k-opt local search where k elements in the solution are changed simultaneously.
Due to the computational complexity, only a small fraction of the k-opt neighborhood is searched
by the local search procedure.
The algorithms are tested on a set of 115 problem instances of the BQP. The experiments
show that the local search heuristics are able to nd optimum or best-known solutions for
instances with a problem size of up to 100 easily. The multi{start k-opt local search is capable
of nding best-known solutions in all runs for all problem instances studied with a problem size
less or equal to 250 and for 11 out of 15 instances of size 500.
For larger instances the algorithms are shown to nd near optimum
solutions in 10 to 60 seconds on a state-of-the-art workstation: in most cases, the multi{start
randomized greedy heuristic, the multi{start 1-opt local search, and the multi{start k-opt local
search nd solutions within 1%, 0.5%, and 0.1% below the best-known solution, respectively.
The paper is organized as follows. In section 1, the BQP is described in more detail. Section
2 describes the greedy and local search heuristics for the BQP. The results obtained from various
experiments conducted with these algorithms are discussed in section 3. Section 4 concludes
the paper and outlines areas of future research.
1 The Binary Quadratic Programming Problem
Throughout this paper, a solution vector x of the BQP is a boolean vector of length n:
. Thus, the solution space X of the BQP is of size 2 n ; it grows
exponentially with n.
The density of the matrix Q is sometimes used to characterize a BQP instance. The density
dens(Q) is dened as the number of non-zero entries divided by the number of total entries in
the matrix Q. Thus, the density varies between 0 and 1.
To demonstrate the relevance in various scenarios, some special cases and a generalization
of the BQP are described in the following.
1.1 Special Cases of the BQP
The BQP has been shown to be a generalization of other combinatorial optimization problems.
For example, the maximum clique problem and the maximum independent set problem are
special cases of the BQP. Let E) be an undirected graph and E) be the
complement graph of G, where
Eg. Furthermore, let
be the adjacency matrix of G, I denote the identity matrix, and T
g. Then, the maximum clique problem is
min
If x solves equation (2), the maximum clique of G is dened as
Similarly, the maximum independent set problem is
min
If x solves equation (3), the maximum independent set of G is dened as
In the maximum cut problem the objective function
has to be maximized, where w ij denotes the weight of the edge (i; in the graph
which the maximum cut is desired. The maximum cut problem can be formulated
as a 0/1 quadratic programming problem by assigning:
The maximum cut size c(x ) is equal to the objective f(x ) of the corresponding BQP, and the
cut itself is
1g.
Another application of the BQP arises in condensed matter physics. The calculation of
ground states in Ising Spin Glasses is a combinatorial optimization problem in which a conguration
of the spins with minimum energy is searched. The energy of an ising spin glass, in
which the spins lie on a two dimensional grid, is given by the Hamiltonian:
denotes the interaction between site i and j on the grid. By setting
the solution of the BQP yields a conguration with minimum energy, where s
and
1.2 A Generalization of the BQP
There is a close relation between binary quadratic programming and NK-landscapes as dened
by Kauman (Kauman & Levin, 1987) to model gene interaction in genetic evolution. This
relation is shown in the following. The objective function of the BQP can be decomposed into
functions. The tness of a BQP solution can thus be rewritten as a sum of functions for each
site, called the tness contributions f i of component i in the bit vector:
Similar to the NK-landscapes dened in (Kauman & Levin, 1987), the tness contribution
f i of a site i depends on the gene value x i and of k(i) other genes x
. While for
NK-landscapes is constant for all i, in the BQP k(i) is dened as the number of
non-zero entries in the i-th column of matrix Q. The mean k of the k(i) is given by
dens(Q). The BQP can be viewed as a special class of NK-landscapes with a special tness
contribution function f i . Alternatively, NK landscapes can be seen as a family of more general
binary programming problems.
Heuristics for the BQP
Heuristics can be divided into construction heuristics and improvement heuristics. The former
construct feasible solutions for a given optimization problem from scratch, while the latter take
a feasible solution as their input and try to nd better solutions by stepwise transformations.
Both types of heuristics can be implemented e-ciently and are often capable of producing
near optimum solutions for combinatorial optimization problems. If, however, the results obtained
are not su-cient, the algorithms can be combined or incorporated into meta{heuristics
such as memetic algorithms (Moscato, 1989), as for example shown in (Merz & Freisleben,
2000) for the graph bipartitioning problem: A dierential greedy heuristic (Battiti & Bertossi,
1998) combined with Kernighan-Lin local search (Kernighan & Lin, 1972) has been shown to
be su-cient for structured problems of small or medium sizes. If larger problems have to be
solved or the problems are unstructured, a memetic algorithm { a genetic algorithm incorporating
the local search and the greedy heuristic { has been shown to be more eective. Since
greedy and local search heuristics are important (components of) algorithms for combinatorial
optimization problems, corresponding approaches for the BQP are desired. Thus, greedy
and local search algorithms for the BQP are described in the following. To the best of our
knowledge, our proposals are the rst algorithms of this kind for the BQP.
2.1 Greedy Heuristics
Greedy algorithms are intuitive heuristics in which greedy choices are made to achieve a certain
goal. In combinatorial optimization, a solution to a given problem is searched which maximizes
or minimizes an objective function. Greedy heuristics are constructive heuristics since they
construct feasible solutions for optimization problems from scratch by making the most favorable
choice in each step of construction. By adding an element to the (partial) solution which
promises to deliver the highest gain, the heuristic acts as a \greedy constructor".
2.1.1 A Simple Greedy Algorithm
In the BQP, a solution is constructed by assigning a binary value to an element in the solution
vector x: a zero or a one. The general outline of the greedy algorithm is provided in Figure 1.
In each step, the heuristic searches for an element k in the solution vector and a value l to
procedure Greedy(x 2 X): X;
begin
repeat
nd k; l with g l
return x;
Figure
1: A Greedy Heuristic for the BQP
assign to it so that a gain function g l
k is maximized. Afterwards, the value l is assigned to the
vector component x k .
To nd an appropriate gain function, we modify the problem by adding a third state: Let
be a vector in which each component y i can have three values 0, 1, and
1. Starting with a vector ^
all i, the greedy heuristic can be viewed as a
transformation algorithm that transforms ^
y into a vector x for which x i 2 f0; 1g for all i and
thus x 2 X. The objective of the solution ^
y is
Let ~
be a vector that is equal to y 2 Y except for component y k . Then
Hence, the gain for changing y k from 0:5 to 0 (denoted g 0
k ) can be dened
as
Using this formula, the greedy heuristic as displayed in Figure 1 has a runtime complexity
of O(n 3 ) since the calculation of all g i takes O(n 2 ) and this has to be done n times before
the algorithm terminates. Thus, the greedy heuristic has an expected running time equal
to an algorithm that calculates the objective function f(x) for n solutions. However, the
greedy algorithm can be implemented more e-ciently. If the matrix Q is not stored in a
two dimensional array, but instead, for each i in ng a list of j's for which q ij 6= 0 is
maintained, the running time is reduced considerably for instances with a low density. To
reduce the running time for nding a choice with a highest gain, the following formula can be
used to calculate the new gain g i after y k has been set to 0 or 1:
1q ik if y
q ik otherwise and g 0
1q ik if y
Thus, once the gains g i have been calculated, they can be e-ciently updated after the
component y k has been set. Since the gains g only change for those i with q ik 6= 0, the running
time for updating the gains has a complexity in O(n). In gure 2, the pseudo code of the fast
greedy heuristic is provided. The running time for the improved heuristic is in O(n 2 ) since the
running time for nding the maximum gain g 0
k and g 1
k is in O(n) and has to be performed n
times to construct a feasible solution. Thus, the greedy heuristic has the same computational
complexity as an algorithm calculating f(x) for a single solution. The running time behavior
of the greedy heuristic can be improved even further if additional data structures are used
to nd the maximum gain in shorter than O(n) time. However, this has no in
uence on the
computational complexity of the algorithm since the time for the initial calculation of the gains
dominates over the times for the greedy choices.
procedure Greedy(x 2 X): X;
begin
for to n do x
calculate gains g i for all i in
repeat
nd k 0 with g 0
nd
then
else
endif
update gains g i for all i 2 C;
return x;
Figure
2: A Greedy Heuristic for the BQP
2.1.2 A Randomized Greedy Algorithm
The greedy heuristic described above is deterministic, since it always produces the same solution
for a given problem instance. Often it is desired that a construction heuristic produces many
dierent solutions, for example in hybrid algorithms. The above procedure can be randomized
as follows.
By making the rst choice randomly, i.e. selecting k and l randomly and setting x
in the rst step, a random component is incorporated. Furthermore, the deterministic choice
among x k 0
and x k 1
can be replaced by a random choice proportional to the gains g 0
and
is set to 0 with probability g 0
and x k 1
is set to 1 with probability
. The pseudo
code of the randomized greedy heuristic is provided in Figure 3.
2.2 Local Search
Local search (LS) algorithms are improvement heuristics that search in the neighborhood of
the current solution for a better one until no further improvement can be made, i.e. there is
no better solution in the neighborhood of the current solution. Local search algorithms can be
categorized by the neighborhoods they consider. For example, the neighborhood of a solution
represented by a binary vector can be dened by the solutions that can be obtained by
ipping
a single or multiple components in the binary vector simultaneously.
procedure
begin
for to n do x
calculate gains g i for all i in
Select k; l randomly and set x k := l;
repeat
nd k 0 with g 0
nd
set
if randomNumber[0,1]< p then
else
endif
update gains g i for all i 2 C;
return x;
Figure
3: A Randomized Greedy Heuristic for the BQP
2.2.1 1-opt Local Search
The simplest form of local search for the BQP is the 1-opt local search: In each step, a new
solution with a higher tness in the neighborhood of the current solution is searched. The
neighborhood of the current solution is dened by the set of solutions that can be reached
by
ipping a single bit. Hence, the 1-opt neighborhood contains all solutions with a hamming
distance of 1 to the current solution. In our implementation, we search for the solution with the
highest tness, i.e. we search for a
ip with the highest associated gain in tness new f old ).
The gain g k of
ipping bit k in the current solution can be calculated in linear time using the
with
The local search algorithm is given in pseudo code in Fig. 4. A straightforward implementation
of the 1-opt local search displayed in the gure has a running time of O(n 2 ) per iteration.
procedure
begin
repeat
nd k with
if
until
return x;
Figure
4: 1-opt Local Search
Analogous to the greedy heuristic, the e-ciency of the algorithm can be increased considerably.
The gains g i do not have to be recalculated each time. Instead, it is su-cient to calculate the
dierence of the gains g i . Assuming that all g i for a BQP solution have been calculated and
the bit k is
ipped, the new gains g 0
i can be calculated e-ciently by the formula:
Thus, the update of the gains can be performed in linear time. This property has also been
used in (Glover et al., 1998a) to speed up tabu search for the BQP. Furthermore, only the gains
have to be updated. The fast 1-opt local search is displayed in Figure 5. The
procedure
begin
calculate gains g i for all i in
repeat
nd k with
if
update gains
endif
until
return x;
Figure
5: Fast 1{opt Local Search for the BQP
running time of this algorithm is O(n) per iteration. The initialization of the gains is in O(n 2 ).
2.2.2 k-opt Local Search
The k-opt neighborhood N k opt of a binary vector of length n is dened by the binary vectors
that can be reached by
ipping one up to k bits in the vectors simultaneously. Hence, the
neighborhood N k opt denotes the hamming distance between
bit vectors) grows exponentially with k: jN k opt
Since it is computationally too expensive to search the complete k-opt neighborhood, Lin
and Kernighan have proposed heuristics for the traveling salesman problem (TSP) and the
graph partitioning problem that e-ciently search a small fraction of the k-opt neighborhood.
These algorithms, known as the Lin-Kernighan algorithm for the TSP (Lin & Kernighan, 1973),
and the Kernighan-Lin algorithm for graph partitioning (Kernighan & Lin, 1972), belong to the
best available heuristics for these two combinatorial optimization problems. In the following, a
local search algorithm for the BQP is presented that is based on the ideas of Lin and Kernighan.
The basic idea of the heuristic is to nd a solution by
ipping a variable number of k bits in
the solution vector per iteration. In each step, a sequence of n solutions is generated by
ipping
the bit with the highest associated gain. Analogous to the 1-opt local search procedure, a vector
of gains is maintained and updated according to equation (15) after each
ip. Furthermore, a
candidate set is used to assure that each bit is
ipped exactly once. The best solution in the
sequence is accepted as the new solution for the next iteration. Thus, in each iteration of the
algorithm a variable number of bits are
ipped to nd a new solution in the neighborhood of
the current solution. The pseudo code of the k-opt local search is presented in Figure 6.
The runtime complexity for the initialization is in O(n 2 ) and the running time per iteration
is also of complexity O(n 2 ).
The reduce the running time, the termination condition of the inner repeat-loop can be
modied so that the loop is terminated if there were no new x best for more than m iterations.
Thus, the resulting fast k-opt procedure has a shorter running time for m n than the k-opt
procedure described before.
Performance Evaluation
To evaluate the performance of the algorithms, we conducted several experiments on all 105
problem instances contained in ORLIB (Beasley, 1990). The sets glov-a, glov-b, glov-c and
glov-d contain the instances of type a through d described in (Glover et al., 1998b). The set
glov200 (glov500) consists of ve problem instances of size and is denoted
as type e (f) in (Glover et al., 1998b). The six sets described in (Beasley, 1998) with a density
procedure
begin
calculate gains g i for all i in
repeat
repeat
nd j with
G;
x best := x;
endif
update gains g i for all
x := x best ;
else
endif
return x;
Figure
for the BQP
dens(Q) of 0.1 and n 2 f50; 100; 250; 500; 1000; 2500g consist of 10 instances each. They are
denoted beashni. In the experiments, the instances of type g used in (Glover et al., 1998b;
Amini et al., 1999) with between 0:1 and 1 were also considered. They
are denoted as kb-g.
To nd a good parameter value for m in the k-opt procedure, experiments were performed
for beas1000 and beas2500. It appeared that is a good trade-o between running time
and solution quality. For larger values, the running time increased considerably with only small
changes in solution quality. Therefore chosen in all subsequent k-opt local search
experiments.
In the experiments, the performance of the randomized greedy algorithm, the 1-opt local
search applied to randomly generated solutions, the fast k-opt local search applied to randomly
generated solutions, and the combination of the randomized greedy heuristic and fast k-opt
local search was investigated. To enable a fair comparison, all algorithms implemented in C++
were run under the same conditions on a Pentium II PC (300 MHz) under the operating system
Solaris 2.6.2060100140180
time
in
ms
density of Q
greedy
1-opt
k-opt
time
in
ms
Problem size n
greedy
1-opt
k-opt
greedy+k-opt
Figure
7: Average running times of greedy and local search heuristics for the BQP
In a rst experiment, the average running times of the four algorithms and the average
solution quality was studied. In Figure 7, the average running times (in milliseconds) of 10000
runs of the algorithms are provided. In the left plot, the running times are provided for the
ve instances of the set glov500 with and a density dens(Q) contained between 0.1
and 1. As expected, the running time of the algorithms grows linearly with the density of
the matrix Q. The running times of the combination of the randomized greedy heuristic and
k-opt local search are slightly lower than the running times of the k-opt local search applied
to randomly generated solutions, since the number of iterations of the local search is reduced
when it is applied to solutions produced by the greedy heuristic. In the right plot, the running
times are provided for the six sets beas50 to beas2500. For all algorithms, the running times
grow quadratically with n. The k-opt algorithms appear to be 2.5 times slower than the 1-opt
algorithm, and for large n, the greedy heuristic is slower than 1-opt. Thus, the number of
iterations of the 1-opt procedure grows at most linearly with the problem size for the instances
studied.
The average solution quality of the approaches is displayed in Table 1. The solution quality
is measured by the average percentage excess (avg) (100 (1:0 f(x)=f best )) over the best-known
solution for a set of up to 10 instances, and the standard deviation (sdev) is also provided for
each algorithm. The greedy heuristic shows a better average performance on six of the sets
than the 1-opt local search, while the latter performs better on the remaining six. The k-opt
heuristic performs considerably better than the greedy and 1-opt heuristic: with one exception,
the average percentage excess is below 1%. However, the combination of greedy and k-opt local
Table
1: Average solution quality of greedy and local search heuristics for the BQP
instances greedy 1-opt k-opt greedy-k-opt
avg sdev avg sdev avg sdev avg sdev
glov-d 2.81 % 0.42 2.71 % 0.73 0.71 % 0.35 0.42 % 0.27
search performs best on all but one instance with respect to the average quality of the solutions.
Table
2: Time to reach the optimum
instances 1-opt k-opt greedy-k-opt
glov-d 52.11
beas250 { { { 20.00 0.09 0.77 10.30
In a second experiment, the heuristics were repeatedly applied (multi{start) to show their
ability to reach the optimum or best-known solution. Each of the heuristics was started multiple
times and the best solution found was returned. For each instance, runs were performed for
each algorithm, and the times to reach the best-known solutions were recorded. In Table 2,
the times for the algorithms that were capable of nding the optimum in all 30 out of runs
for all instances in a set are displayed. The average number of repetitions needed (rep), the
average time in seconds (avg t) to reach the best-known solution, as well as the maximum time
in seconds (max t) to reach the best-known solution is provided. For problems up to a size of
200, the 1-opt local search is capable of nding the optimum in less than 2 seconds. For the
set glov200 the average number of local searches is about 217. The k-opt heuristic needs only
about 13 local searches on the average to nd the best-known solutions for the instances of this
set. Both k-opt algorithms perform better on the instances up to need less than
0.23 seconds to nd the best-known solutions and are able to nd the best-known solutions of
all the instances of the set beas250. On this set, the greedy k-opt combination performs slightly
better than the k-opt on random solutions: less than 0.53 seconds are needed.
Table
3: Comparison of greedy, 1-opt, k-opt, and greedy-k-opt on large BQP instances
instances greedy 1-opt k-opt greedy-k-opt time
rep avg rep avg rep avg rep avg (sec)
The results show that for small instances (up to simple local search is su-cient
to nd best-known solutions quickly. The more challenging problems have a size of
higher. The third experiment concentrated on these instances. To enable a fair comparison, the
four algorithms were repeatedly applied until a predened time limit was reached. Once again,
runs were performed for each instance. The results are summarized in Table 3. For each
instance and algorithm, the average number of repetitions (rep), and the average percentage
excess (avg) is given. The time limit in seconds (time) used is provided in the last column of
the table.
The greedy heuristic shows to be inferior to the 1-opt local search: The average percentage
excess for the set beas1000 and beas2500 is between 0.727% and 1.170% in case of the greedy
heuristic; for the 1-opt local search the results are between 0.216% and 0.543%. The algorithms
based on k-opt are considerably better. The worst performance lies 0.128% below the optimum
for the beas instances. The kb-g instances appear to be harder; within a time limit of
the average solution quality lies between 0.012 % and 0.489 %. A preference to one of the k-opt
based algorithms can not be given, since their performance does not dier signicantly. Both
are able to nd the best-known solution for the problems glov500-1 and glov500-2 in all
but not for the other problems with and a density dens(Q) greater 0.25. This indicates
that problems with high densities are slightly harder for the k-opt local search. However, as
the results on the kb-g instances show, the average solution quality is not a simple function of
the density: the average percentage access for the problem with density 0.8 (kb-g08) is better
than for the problems with density 0.4 and 0.7 (kb-g04 and kb-g07).
In comparison to the tabu search and simulated annealing for the BQP proposed in (Beasley,
1998), the best found solutions obtained with the greedy heuristic and k-opt local search for
the 10 problems of size 2500 are in 7 out of 10 cases better than the best found solutions
reported in (Beasley, 1998). For tabu search and simulated annealing, the running times on a
Silicon Graphics Indigo workstation (R4000, 100MHz) are between 12721 and 51873 seconds
compared to the 60 seconds for the local search on a Pentium II 300 MHz PC. Thus, the
results produced by the k-opt local search appear to be superior or at least competitive to the
other approaches in solution quality per time. However, a comparison of the methods under
the same conditions (computing hardware, operating system, programming language, coding
is required to support this claim.
More sophisticated algorithms, however, are expected to produce better solutions: the tabu
search utilizing critical event memory (Glover et al., 1998a) found the best-known solution for
7 out of the 10 instances of set kb-g, in a CPU time of four minutes on a Pentium 200 PC. The
scatter search approach proposed in (Amini et al., 1999) found the best-known solutions of all
problems in this set, but no CPU times were reported. The heuristics proposed in this paper
are not intended to be competitive with these approaches. Instead, they have been developed
with the idea of building powerful meta-heuristics called memetic algorithms (Moscato, 1999;
{ evolutionary algorithms incoporating greedy heuristics and local
search.
Conclusions
In this paper, a randomized greedy heuristic and two local search algorithms based on the
1-opt and a k-opt neighborhood for the BQP have been proposed. The runtime behavior
and the average performance of these heuristics has been investigated in experiments on 115
problem instances. Furthermore, four algorithms based on these heuristics have been studied:
the multi{start randomized greedy algorithm, the multi{start 1-opt local search on randomly
generated solutions, the multi{start k-opt local search on randomly generated solutions, and
the multi{start k-opt local search on solutions generated by the randomized greedy heuristic.
The results indicate that multi{start 1-opt local search is able to nd best-known solutions of
the studied instances up to a size of n = 100 in all runs, and multi{start k-opt local search is
capable of nding the best-known solutions in all runs for all studied instances up to
Furthermore, for 11 out of 15 problem instances of size the best-known solution was
found in all runs with multi{start k-opt LS.
Applied to larger instances (n > 500), the multi{start randomized greedy heuristic produces
solutions less than 1% below the best-known solutions in most cases, the multi{start 1-opt local
search solutions below 0.5% in most cases and the multi{start k-opt algorithms solutions less
than 0.5% below the best-known solution in most cases in a CPU time limit of 10 seconds up to
a minute on a state-of-the-art workstation. Thus, the proposed k-opt local search appears to be
highly eective, and the additional coding eort required in comparison to the 1-opt heuristic
is denitely justied.
Both greedy and local search heuristics are well suited as components for meta{heuristics
since their average running time is below 700 milliseconds even for large problems of size
best-known solutions are desired for large problems, the incorporation of the
heuristics in genetic algorithms appears to be a promising approach (Merz & Freisleben, 1999b).
Further studies have shown that the combination of evolutionary algorithms and k-opt local
are highly eective applied to large problem instances (n 500) (Katayama & Narihisa, 2000;
Merz, 2000).
There are several areas of future research. First, the implementation specic parameter m of
the k-opt local search should be studied in more detail; an interesting question is whether there
is an instance independent optimum value for the parameter or whether the parameter has to
be tuned for each instance separately. Second, there may be instances for which the greedy
heuristic performs better than local search, as shown for the graph bipartitioning problem
(Merz & Freisleben, 2000). Additional experiments are necessary to support this claim. Third,
a comparison of the k-opt local search with the recently proposed tabu search algorithms for the
BQP (Beasley, 1998) is another interesting are of study. Finally, the heuristics described in this
paper may be extended to NK landscapes, a generalized unconstrained binary programming
problem. In fact, we are currently working on a greedy and a k-opt heuristic for NK landscapes.
Initial experiments indicate that both heuristics are highly e-cient.
--R
A Scatter Search Approach to Unconstrained Quadratic Binary Programs.
Heuristic Algorithms for the Unconstrained Binary Quadratic Programming Problem.
Minimization of a Quadratic Pseudo-Boolean Function
European Journal of Operational Research
Quadratic Knapsack Problems.
Computers and Intractability: A Guide to the Theory of NP-Completeness
Solving Quadratic (0
Performance of Simulated Annealing-based Heuristic for the Unconstrained Binary Quadratic Programming Problem
Solving Large Binary Quadratic Programming Problems by E
Quadratic Binary Programming.
An Evolutionary Heuristic for Quadratic 0-1 Programming
An Implicit Enumeration Algorithm for Quadratic Integer Programming.
Memetic Algorithms for Combinatorial Optimization Problems: Fitness Landscapes and E
Fitness Landscapes
On Evolution
Memetic Algorithms: A Short Introduction.
Computational Aspects of a Branch and Bound Algorithm for Unconstrained Quadratic Zero-One Programming
A Branch and Bound Algorithm for the Maximum Clique Problem.
A Quadratic Assignment Formulation for the Molecular Conformation Problem.
--TR
--CTR
Kengo Katayama , Akihiro Hamamoto , Hiroyuki Narihisa, Solving the maximum clique problem by k-opt local search, Proceedings of the 2004 ACM symposium on Applied computing, March 14-17, 2004, Nicosia, Cyprus
Patrick E. Meyer , Kevin Kontos , Frederic Lafitte , Gianluca Bontempi, Information-theoretic inference of large transcriptional regulatory networks, EURASIP Journal on Bioinformatics and Systems Biology, v.2007 n.1, p.8-8, January 2007
Kengo Katayama , Akihiro Hamamoto , Hiroyuki Narihisa, An effective local search for the maximum clique problem, Information Processing Letters, v.95 n.5, p.503-511, 15 September 2005
Peter Merz, Advanced fitness landscape analysis and the performance of memetic algorithms, Evolutionary Computation, v.12 n.3, p.303-325, September 2004 | local search;greedy heuristics;unconstrained quadratic binary programming |
595086 | Cooperative Strategies for Solving the Bicriteria Sparse Multiple Knapsack Problem. | For hard optimization problems, it is difficult to design heuristic algorithms which exhibit uniformly superior performance for all problem instances. As a result it becomes necessary to tailor the algorithms based on the problem instance. In this paper, we introduce the use of a cooperative problem solving team of heuristics that evolves algorithms for a given problem instance. The efficacy of this method is examined by solving six difficult instances of a bicriteria sparse multiple knapsack problem. Results indicate that such tailored algorithms uniformly improve solutions as compared to using predesigned heuristic algorithms. | Introduction
One of the major goals of a production facility is to utilize its inventory in the best possible
way to satisfy demand. In make-to-order production systems, such as the process
industry, a surplus inventory accumulates due to cancellations of orders and rejection
of production units for failing to satisfy quality requirements. Clearly, it is to the advantage
of the production facility to utilize this surplus inventory before planning its
production acitivites. This raises the problem of assigning a list of orders to the production
units in the inventory. The objectives are both maximizing the total amount
of orders that are assigned, and minimizing total waste of production units. Manufacturability
considerations such as the compatibility of orders and production units in
terms of quality, size, etc. impose additional assignment constraints. As production
operations involve more complex processes and a larger product variety, the problem
becomes more constrained. The bicriteria sparse multiple knapsack problem that we
consider in this study is motivated by this application.
In this paper we focus on the use of a team of heuristic algorithms which cooperate
to generate non-dominated solutions for this problem in a short computation time.
Although there exist several heuristic approaches for solving multiple knapsack problems
there does not exist a single dominant algorithm. Moreover, the performance of
the heuristics vary by problem instance and as a result a specific heuristic will often
demonstrate poor aggregate performance over a set of problem instances. However, if
the heuristics were allowed to cooperate with each other so that
ffl the solution generated by one heuristic can be subsequently improved by another
or
ffl the most appropriate subset of heuristics can be used to construct solutions for a
given problem instance
then the aggregate performance of a collection of cooperating heuristics over a set of
problem instances may be greatly improved. For this purpose we have developed a
collection of fast heuristics and incorporated them in an A-team architecture, which
provides a computational framework for implementing cooperation strategies among
heuristics. We present results of an experimental analysis that compares the effectiveness
of these heuristics working individually, and cooperating within an A-team
framework. Additionally for calibration purposes we compare these results against feasible
solutions derived using integer programming formulations. Since an important
consideration in a real application is the computation time required to generate solu-
tions, we also compare the performance of such a cooperative problem solving strategy
against traditional integer programming techniques.
The paper is organized as follows. We first formalize the problem in Section 2. In
Section 3 we provide an overview of the related work in the literature on the two versions
of the problem each with a single objective. We present our collection of heuristics and
a discussion of the cooperative problem solving strategy used in Section 4. Section 5
is a summary of the results of the experimental analysis and finally we conclude in
Section 6.
Problem Definition
We are given a set of items ng and a set of knapsacks
Each item j 2 N has a weight w j and each knapsack has a capacity c i associated
with it, where w j and c i are positive real numbers. In addition, for each item j 2 N
a set A j ' M of knapsacks that can hold item j is specified. For convenience we also
specify for each knapsack , the set B i ' N of items that can be assigned to the
knapsack.
For each knapsack we need to choose a subset S i of items in N to be assigned
to knapsack i, such that:
(1) All S i 's are disjoint. (Each item is assigned to at most one knapsack.)
(2) Each S i is a subset of B i , for (Assignment restrictions are satisfied.)
m. (Total weight of items assigned to a knapsack does
not exceed the capacity of the knapsack.)
w j is maximized. (Total weight of items assigned is maximized.)
i2I
denotes the set of indices of non empty
due to the unused portion of each utilized knapsack is minimized.)
We refer to this problem as the bicriteria sparse multiple knapsack problem (BSMK).
Without loss of generality we assume that w can be removed
from B i . The problem becomes trivial if all A j 's are disjoint, or if P
M . In the case that all B i 's are disjoint, the problem decomposes into m single 0-1
knapsack problems. Thus, we exclude these cases from consideration.
Note that the assignment restrictions can also be represented by a bipartite graph,
where the two disjoint node sets of the graph correspond to the sets N and M . Let
E) be the corresponding bipartite graph with . Then, there exist
an edge (i; . With this representation
the sparsity of the problem refers to the edge sparsity of the bipartite graph G. The
bicriteria problem is more relevant for sparser problems because for more constrained
problems, a solution with maximum assigned weight does not necessarily have small
waste.
3 Related Problems in the Literature
The single objective versions of the bicriteria problem are slightly modified forms of two
well-known problems in the literature.
If we consider the objective of maximizing total assigned weight alone, then the problem
is a variation of the multiple knapsack problem, which we call the sparse multiple knapsack
problem (SMK). For the objective of minimizing total waste alone, the problem
reduces to a variation of the variable-size bin packing problem, which we refer to as the
sparse bin packing problem (SBP).
In the classical multiple knapsack problem, any item can go into any knapsack, hence
the bipartite graph representing the problem is complete, whereas we generalize the
problem by allowing any bipartite graph. On the other hand the multiple knapsack
problem has a more general objective function: there exists a positive profit p j for
assigning item j to any of the knapsacks and the objective function is to maximize the
total profit of assigned items. In the application which motivated us, the profit of an
assigned item can be assumed to be proportional to the weight of the item, hence we
maximize total assigned weight.
The multiple knapsack problem is known to be NP -hard in the strong sense [Kar72],
[MT90]. The reduction from the 3-partition problem is still valid when the objective
function coefficients equal to the weights of items, so any instance of SMK with a
complete bipartite graph representation is also NP -hard in the strong sense. Thus, for
the objective of maximizing total assigned weight, our problem is strongly NP -hard and
there exists no fully polynomial time approximation scheme for SMK unless
For the multiple knapsack problem, several exact and heuristic solution methods have
been developed and tested in the literature (see Martello and Toth [MT90] for a survey).
Exact solution methods consist of branch and bound, and cutting planes. The branch
and bound methods use bounds based on either the Lagrangean relaxation 1 (Hung
and Fisk [HF78]) or the surrogate relaxation 2 (Martello and Toth [MT80, MT81a])
of the problem. The cutting plane methods use minimal cover, (1,d)-configuration and
multiple cover inequalities (Ferreira, Martin and Weismantel [FMW96]). Unfortunately,
these exact solution methods cannot solve large instances arising in real applications in
reasonable computation time. Heuristic methods include fast greedy algorithms followed
by local exchange heuristics (Martello and Toth [MT81b]), as well as non-polynomial
time approaches such as solving single knapsack problems successively (Martello and
Toth [MT81a]), or obtaining a feasible solution from the surrogate relaxation (Hung
and Fisk [HF78]).
Considering the objective of minimizing waste alone produces an ill-posed problem
with a trivial optimal solution that does not assign any items. Hence, we can consider
1 relaxing the assignment constraints decomposes the problem into m single knapsack problems.
getting a linear combination of the capacity constraints results in a single knapsack problem.
a version in which we impose the condition that all items in N or a specified subset
of N must be assigned and the goal is to use knapsacks with minimum total capacity.
Then, the problem is a generalization of the variable-size bin packing problem, where
we allow assignment restrictions in addition.
The bin packing problem is known to be NP -hard (i.e. [GJ79]), thus the more general
problem SBP is NP-hard as well. The bin-packing problem has been extensively
studied in the literature and it is one of the first problems for which efficient approximation
algorithms have been developed. The recent survey by Cook, Garey and Johnson
covers worst and average case analyses for online and offline algorithms. A
previous survey by the same authors [CGJ84] considers also some variations on the
problem. Exact algorithms have been developed by Martello and Toth [MT89]. The
variable-size bin packing problem has been studied by Friesen and Langston [FL86] who
provide modifications of well-known bin packing heuristics such as the next fit, first fit
and best fit heuristics.
Cooperative Problem Solving
Given an NP-hard optimization problem, it is difficult to design heuristic algorithms
which exhibit uniformly superior performance over all problem instances. An alternate
approach to tackle difficult problems is to organize a collection of heuristic algorithms
so that they can cooperate with each other and uniformly exhibit superior performance
which might not have been possible if they were used separately. Such an approach
is especially attractive when the collection of heuristic algorithms vary in their performance
over problem instances in an unpredictable way. Another ingredient required
for cooperative problem solving is an architecture that facilitates cooperation between
the heuristic algorithms and a control strategy that defines the rules of collaboration
among heuristics.
In the following paragraphs we discuss in more detail the organization (i.e. the architecture
and the control strategy) that we have used to build a cooperative problem
solving team of heuristics for the multiple knapsack problem. We will also discuss in
some detail the collection of heuristics that have been used to build the cooperative
problem solving team.
4.1 The Asynchronous Teams Architecture
An asynchronous team or A-Team [TdSM93] is an architecture that facilitates multiple
heuristics to work together on a common problem. Cooperation between heuristics
is allowed through a shared population of candidate solutions. Figure 1 provides a
schematic of this architecture. The architecture is similar to a blackboard system in
that the solutions are posted onto a blackboard which is shared by all the heuristic
algorithms. Each heuristic has access to the entire population of solutions and can
choose an appropriate (partial) solution to work on.
The heuristics that are used in this architecture are usually classified into three categories
based as follows:
ffl Constructors are heuristics which are used to create initial solutions.
ffl Improvers are heuristics which take existing partial solutions from the population
and modify them to produce a new solution. The criteria used to decide whether a
solution is added to the population depends on the choice of the control strategy.
In purely hill climbing approaches (such as genetic algorithms) only solutions
which are non-dominated would be added to the population. In variants such
as simulated annealing we might allow the entry of dominated solutions into the
population with the expectation that they might allow for better solutions to be
created later on.
ffl Destroyers are heuristics that remove redundant solutions from the population
with the intent of managing the size of the population. The determination of
whether a solution is redundant is difficult and usually a destroyer is designed to
retain a redundant solution with a non-zero probability. Note that destroyers are
typically used with control strategies that allow for the inclusion of dominated
solutions into the population.
Dominated
Solution
Constructors Destroyers
Improvers
Dominated
Solution
Non-Dominated
Solution
Figure
1: Schematic of an A-Team architecture
The typical approach for generating solutions using this architecture involves creating
an initial population of solutions using all the constructor heuristics and subsequently
evolving the population of solutions by repeated application of the improver
and destroyer heuristics. At any time the set of non-dominated solutions constitute
a Pareto-frontier and provide a set of non-dominated solutions to the problem. The
control strategy in this solution approach prescribes the rules of collaboration between
the heuristics. The control strategy specifies two rules:
ffl The first rule specifies how an improver heuristic picks a solution from the population
to improve, and
ffl the second rule specifies the criteria for incorporating a new solution created by
an improver heuristic into the population.
In our implementation we used a stochastic hill climbing approach for the control strat-
egy. A stochastic hill climbing algorithm searches a space S with the aim of finding a
state with optimal properties. The algorithm does this by making successive improvements
to the current state ae 2 S. In the context of this paper, the state ae corresponds
to a population of solutions to the bicriteria multiple knapsack problem. The algorithm
attempts to improve the current state ae by making a transition to one of the neighbors
- of ae in S. Within our A-Team implementation, this transition is made by randomly
picking an improver heuristic and then randomly picking a solution from the population
for the improver to work on. If the new solution generated by the improver is
non-dominated then it is added to the population which corresponds to the new state
- . Since the hill climbing approach does not allow non-improving moves, we do not
explicitly need to worry about managing the size of the population. As a result our
implementation of A-team for the bicriteria sparse multiple knapsack problem did not
require destroyers.
A-team architecture has been used to obtain good feasible solutions to various combinatorial
optimization problems such as the TSP problem (Talukdar and de Souza[TdS93]),
and scheduling problems arising in steel and paper manufacturing industry (Lee et al.
[LMHM96], Murthy et al. [MARW97]). The reader is referred to Talukdar, de Souza
and Murthy [TdSM93] for more on A-Team architecture.
4.2 Heuristics
With the aim of generating non-dominated solutions for BSMK, we have developed a
collection of constructor and improver heuristics. Most of these heuristics are simple
greedy heuristics which are adapted from the heuristics in the literature used for multiple
knapsack and variable-size bin packing problems. In addition, we have a few randomized
heuristics.
The construction heuristics are mainly greedy heuristics with various item and knapsack
selection rules, in addition to a couple of heuristics that round the LP relaxation solution
of SMK. Most of these constructors aim at maximizing total assigned weight.
The improver heuristics are either local exchange heuristics which aim to improve both
of the objectives, or heuristics which rearrange assigned items among knapsacks and
unassign some items for the purpose of minimizing total waste. In the next two sub-sections
we give a description of each heuristic.
4.3 Constructor Heuristics
Simple Greedy Heuristics
These heuristics first sort the items in non-increasing order of weight and the knapsacks
in non-decreasing order of capacity. There are two versions. In the first one, the next
knapsack in the order, say i, is picked, and then the next item, in the order, say j,
is picked. If item j is allowed to go into knapsack j, i.e. if does not
exceed the residual capacity of knapsack i, then item j is assigned to knapsack i. So,
for each knapsack picked, as many items as possible are packed into it. In the second
version, each item in the order is picked and assigned to the next feasible knapsack, if
possible. Both of the heuristics have running time O(n log n +m log m+nm). We call
these heuristics greedy-knapsack and greedy-item.
Greedy Heuristics with Various Knapsack Selection Rules
In these heuristics the decision to pick the next knapsack depends on the assignments
made upto that point. The heuristics sort the items in non-increasing order of weight,
pick the next item j and then pick a knapsack i 2 A j according to one of three rules.
There are three versions based on picking a knapsack with 1) minimum residual capac-
ity, residual capacity, or 3) minimum surplus demand, which are called
greedy-minrc, greedy-maxrc, and greedy-minsd, respectively. Surplus demand of a knapsack
i is the total weight of unassigned items in B i minus the residual capacity of the
knapsack. The reason for picking a knapsack with minimum surplus demand is that
the smaller the surplus demand, the more likely is the item to fit the knapsack. While
greedy-maxrc and greedy-minsd heuristics tend to maximize assignments without considering
waste, the greedy-minrc heuristic tends to minimize waste in addition.
Successive Assignment Heuristic
This is another greedy heuristic, where rather than picking a knapsack for each item
or picking items for each knapsack one by one, items are matched to knapsacks successively
with the objective of maximizing total weight of items matched. At each iteration
a maximum weight bipartite matching (assignment) problem is solved on a bipartite
graph in which edge (i; exists with weight w j only if w j does not exceed the residual
capacity of knapsack i. Initially the bipartite graph G is used. The assignments given
by the maximumweight bipartite matching solution are performed. Then, the bipartite
graph is updated by deleting all assigned nodes, all edges (i; j) for which w j exceeds the
residual capacity of knapsack j, and nodes with degree zero. The heuristic is repeated
until the graph has no remaining edge. This heuristic is called successive-assign.
Randomized Heuristics
The greedy heuristics can be modified randomly in order to break the pattern of greedy
choices. Suppose item j is picked in any of the greedy heuristics. The item will be
considered for assignment with a probability p j . After running through all items, the
heuristic is repeated with in order to assign the remaining items. There are
two versions based on the choice of p j . In the first one p j is proportional to the weight
of item j. That is, weight of an item)\LambdaC, where C is a constant factor,
so that items with larger weight are more likely to be picked. We call this heuristic
random-weight. In the second version, called random-degree,
degree in G) C, where deg(j) is the degree of node j in G. The idea is to defer the
assignment of items with more choices for knapsacks and to give priority to items that
may go into only a few knapsacks.
Heuristics Based on the LP Relaxation of SMK
These heuristics solve the LP relaxation of the problem for the single objective of
maximizing total assigned weight and then construct a feasible solution by rounding
the fractional LP solution.
The IP formulation of SMK is as follows.
st P
where the 0-1 variable x ij denotes whether item j is assigned to knapsack i. The LP
relaxation corresponds to relaxing integrality of these variables.
Although the LP relaxation of the multiple knapsack problem has a solution that can
be constructed easily in O(n) time 3 , the LP relaxation solution of the sparse problem
cannot be identified immediately. However, the relaxation can still be solved efficiently
by a maximum flow algorithm. The continuous problem reduces to a maximum flow
problem on a directed graph constructed from the bigraph G as follows. Each edge (j; i)
of G is directed from the item node j to the knapsack node i and is assigned capacity
. A source node s is connected to each item node j via an arc (s;
In addition a sink node t is connected to each knapsack node i via an arc (i; t) with
capacity c i . Then, the maximum flow from s to t equals the LP relaxation value and
the amount of flow on arc (j; i) divided by w j gives the value of x ij . Thus, if flow on
is assigned to knapsack i. If 0 1, the
variable is said to be fractional (in the corresponding solution).
There are two versions of the heuristic. In the first one, a simple greedy heuristic is
used to assign items corresponding to the fractional variables and all the remaining
3 It amounts to solving the LP relaxation of a single 0-1 knapsack problem.
items. In the second version, the fractional variables are sorted in non-increasing order
of their values, and for each fractional variable in the order, the assignment is done if
it is feasible. Then, the remaining items are assigned greedily as in the first version.
These two heuristics are called lp-greedy and lp-round.
4.4 Improver Heuristics
These local exchange heuristics aim at improving both of the objectives, and are repeated
until no more improvement occurs.
1. Exchange Items Assigned to Different Knapsacks
Consider all pairs of items assigned to different knapsacks. Swap the two items, if
the swap is feasible and allows an unassigned item to be assigned to one of the two
knapsacks. If the exchange of items is performed, pick the knapsack whose residual
capacity has just increased and repetitively assign the item with maximumweight
to it, if the assignment is feasible. This heuristic is called exchange.
2. Replace Assigned Items with Unassigned Items
Replace an assigned item or a pair of assigned items, with a single unassigned
item or a pair of unassigned items of larger weight. These heuristics are called
replace-single and replace-pair based on whether a single item or a pair of items
are replaced.
3. Rearrange
Rearrange assigned items in different knapsacks to aggregate residual capacity
into one knapsack and then use the aggregated capacity to assign new items.
Swap two items assigned to two different knapsacks, if the exchange is feasible
and the maximum residual capacity (over all knapsacks) increases. After all pairs
of items have been considered, repeat assigning a new item with maximum weight
to the knapsack with maximum residual capacity, if feasible. This heuristic is
called rearrange.
Heuristics to Reduce Waste
1. Empty Under-utilized Knapsacks:
This is a randomized heuristic. Two parameters are picked randomly: minimum
allowable utilization and maximum allowable percentage decrease in assigned
weight. Cancel assignments in all knapsacks with utilization less than minimum
allowable utilization, if the decrease in weight is less than the maximum allowable
percentage. This heuristic is called empty.
2. Empty Knapsacks Randomly and Reassign Items
For all knapsacks that are utilized, empty the knapsack with probability
utilization of the knapsack). Then, reassign items by the greedy-minrc heuristic.
This heuristic is called empty-and-reassign.
3. Pack Again
These are variable-sized bin packing heuristics. Cancel assignments in all knap-
sacks. Reassign originally assigned items by first fit decreasing or best fit decreasing
heuristics (i.e. the greedy-item or greedy-minrc heuristics). These heuristics
are called pack-again-ffd, and pack-again-bfd, respectively.
Heuristics to Increase Assigned Weight
Any of the constructor heuristics can be used as an improver to assign the remaining
items, if feasible. In our implementations we used the simple greedy-item heuristic for
this purpose and we refer to it as assign-remaining.
Computational Experiments
In this section we examine the performance of the cooperative problem solving strategy
and compare its behavior against traditional integer programming based techniques for
problem using computational experiments. We also compare the performance
of the cooperative strategy against individual heuristics in an effort to quantify the
improvements gained by cooperation. Finally we analyze the non-dominated solutions
to identify concatenations of heuristics that generate good solutions.
5.1 Data
We used real data from an inventory application problem in Steel Mill Industry [KDTL97].
For the instances available to us, the number of items vary between 111 and 439, while
the number of knapsacks is between 18-43. The sparsity of the problems are in the
range 10% - 28%. Size and sparsity of these instances are summarized in Table 1.
5.2 Implementation
Individual heuristics
We coded the heuristics presented in Section 4 in C++ language using the LEDA library
[NU95] and performed the tests on an IBM RS4000 machine operating under
AIX. First, we collected solutions output by each constructor and improver heuristic
and then found the non-dominated solutions among all collected solutions. When running
the improvers, we used the solution provided by the greedy-knapsack constructor
Tot. Cap. Tot. Weight
d3 393
d4 209 43 10.6 889.21 3528.04
d6 155
Table
1: Information on real-life data. Sparsity denotes the edge density of the bipartite
graph representation in percentage of the number of edges of a complete bipartite graph.
The last two columns denote the total capacity of knapsacks and the total weight of
items.
as input. The randomized heuristics were run times and the best solution among all
runs was output.
A-team
We incorporated the individual heuristics into an A-team architecture. We set the parameters
such as the stopping time and the probabilities for picking constructors and
improvers by a few initial tests. The probabilities for some of the improvers, (such as
replace-single, replace-pair, empty, and empty-and-reassign) which were more effective
during initial runs were increased. We examined the convergence of the solution population
by running the A-team code for a cycle of 100, 500, 1000, 1500, 2000 and 3000
heuristics. By observing the number of non-dominated solutions output, the maximum
and average value of assigned weight minus waste of these non-dominated solutions, we
decided on the cycle length of the A-team run for each data set. These statistics and
the chosen cycle lengths are given in Table 5 in Appendix.
IP based approaches
In order to assess the performance of the heuristics and the computational difficulty
of the problem, we tried to solve two IP's each with a single objective by a general
branch-and-cut method. The first problem considered to compare our results is the
sparse multiple knapsack problem, SMK, where the objective is to maximize assigned
weight only. The IP formulation of SMK was given in Section 4. In the second problem
considered, the objective function is the sum of the two objectives, that is we maximize
assigned weight minus waste. We call this problem MKBP as it combines multiple
knapsack and bin packing aspects. The IP formulation is as follows.
st P
where we introduce the 0-1 variable z i to denote whether any item is assigned to knapsack
i. The objective function equals 2 P
and the LP
relaxation corresponds to relaxing the integrality of all variables. The LP relaxation
of both SMK and MKBP problems have the same optimal value because an optimal
solution to the LP relaxation of MKBP will have zero waste. Hence, we refer to the
relaxation of both problems by "the LP relaxation".
In order to obtain the best bounds possible in a reasonable computation time, we added
the best lower bound obtained from our heuristics to the IP formulation of SMK and
MKBP, and solved them by a general integer programming solver, CPLEX4:0:3 [CO94]
using the default settings. After 1 hour of CPU time, we added the upper bound output
by Cplex to the formulation and ran Cplex again (we waited longer for larger instances
such as d1 and d3). We repeated this procedure until no better bounds were found in
more than 2 hours. A comparison of the LP relaxation values and the upper bounds
generated by a branch and bound method for data sets d1 to d6 are given in Table 2.
The running times given in Table 2 also give a crude idea on the computational difficulty
of solving the problems by exact methods. It took 2.4 hours to get the optimal solution
to SMK for data set d2, and we could not obtain the optimal solution for any other
problem.
Data LP bound UB %Gap Time (hrs) UB %Gap Time (hrs)
d1 641.85 639.70 0.34 9.2 639.70 0.34 2.6
d2 612.64 472.14 29.76 2.4 403.83 51.70 4.4
d3 385.37 384.99 0.10 6.2 381.14 1.11 8.0
d4 785.67 687.63 14.05 4.0 606.86 29.46 6.9
d6 444.01 424.20 4.67 8.2 414.37 7.15 5.0
Table
2: A comparison of the LP relaxation value and the best upper bound (UB)
obtained by a branch and bound method for the SMK and MKBP problems. The
column (% Gap) denotes the deviation in % of the LP bound from the best available
bound. Time denotes the cpu time to obtain the given bounds.
Here, we note that as the problem gets sparser, it gets harder in the sense that a
solution that maximizes assigned weight does not necessarily have small waste, hence
the choice of the knapsack to which an item is assigned becomes more critical. As the
problem gets more relaxed (that is, the bipartite graph representation gets closer to a
complete graph), the problem gets closer to the multiple knapsack problem and usually,
maximizing assigned weight suffices to minimize waste at the same time.
The sparsity of the problem plays a role also in determining the strength of the LP
relaxation. As sparsity increases, the gap between the LP relaxation value and the
optimal value gets larger for both problems.
We also collected feasible solutions output by Cplex and recorded the cpu times to
obtain the solutions. In these runs we did not provide any bounds to the objective
function initially, but reran Cplex with previously obtained bounds whenever we had to
stop due to memory problems. We stopped this procedure when no more improvement
could be obtained till the computer ran out of memory.
One may also consider using the best lower bound output by the individual heuristics
in the IP formulation, as opposed to a cooperative strategy. However, using the
heuristics in this way does not improve upon the performance of the branch-and-cut
method of Cplex significantly. Even using the better bounds output by the cooperative
strategy does not yield the optimal solution in reasonable computation time (as
seen in Table 2). In addition, the cooperative strategy has the advantage of generating
many non-dominated solutions for the two objectives while IP formulations specify one
objective function.
5.3 Comparative Evaluation of the Cooperative Strategy
Quality of Solutions
The quality of the solutions generated by using a cooperative strategy are significantly
better than the ones generated by individual runs, especially in the waste objective.
A comparison of the solutions with maximum assigned weight generated by A-team
implementation and individual runs is provided in Table 3. The waste of these solutions
are also given in the table. We see that the cooperation of the heuristics have been useful
to decrease the waste of the solutions that have the maximum assigned weight. We also
note that we could not obtain any solutions with a better assigned weight by the exact
solution method (using Cplex) for any of the problems except for d2.
Solutions with maximum value of (assigned weight - waste), that are generated by the
A-team implementation, individual heuristics, and Cplex are given in Table 4. We
observe a significant difference in (assigned weight - waste) of the solutions generated
by the cooperative strategy versus those generated by individual heuristics, especially
for the harder instances such as d2 and d4. Slightly better solutions could be obtained
by Cplex for only d2 and d4 in 4.4 and 6.9 hours, respectively. For larger instances
such as d1 and d3, the feasible solutions output by Cplex are significantly inferior to
Data AW Ratio Waste Waste % Cpu Time
I 636.60 0.9952 5.25 0.82 4399.06
d1 II 617.69 0.9656 24.16 3.76 37.81
III
I 470.98 0.9975 108.24 18.69 70.01
III 472.14 1.0000 110.04 18.90 8236.05
I 383.20 0.9954 5.64 1.45 9834.42
d3 II 382.33 0.9931 6.52 1.68 72.32
III 366.10 0.9509 22.74 5.85 46009.14
I 686.99 0.9990 110.97 13.91 318.17
d4 II 673.39 0.9793 155.54 18.76 3.44
III 686.99 0.9990 140.68 17.00 39923.20
I 592.33 0.9899 96.92 14.06 183.70
d5 II 590.23 0.9864 99.02 14.37 3.06
III 591.33 0.9882 97.92 14.21 39360.16
I 406.12 0.9574 30.95 7.08 76.46
d6 II 402.92 0.9498 34.15 7.81 1.63
III 402.97 0.9500 34.10 7.80 46570.32
Table
3: A comparison of the solution with maximum assigned weight obtained by I) the
A-team implementation, II) individual runs of all heuristics, and III) branch-and-cut.
AW is assigned weight. Ratio is the ratio of AW to the best available bound for the
assigned weight objective (from Table 2). Waste % is the ratio of the unused capacity
to the total capacity of utilized knapsacks in percentage. Cpu time is given in seconds.
those output by the cooperative strategy with a difference of 10% and 7% of the best
upper bound available, respectively.
The collection of heuristics are able to generate significantly more non-dominated solutions
when they cooperate in an A-team implementation. Few heuristics are able
to effectively improve both the objectives at the same time. As a result, while the
individual heuristics are good enough to maximize assigned weight, they are not capable
of minimizing waste at the same time. On the other hand, using a cooperative
organization, the heuristics which favor maximizing assigned weight and those which
favor minimizing waste have the chance to take the output of one another as input.
Therefore, they generate solutions with better values in both objectives. Plots of the
non-dominated solutions generated by the A-team implementation and the individual
heuristics are given in Figures 2, 3, and 4 in the Appendix. Note that for problems d1
and d3, which are less sparse compared to the other problems, solutions with large assigned
weight have small waste at the same time, so not many non-dominated solutions
were generated. This can be attributed to the fact that the two objectives are almost
parallel for these problems.
Data AW-Waste Ratio AW Waste Waste % Cpu Time
I 631.35 0.9869 636.60 5.25 0.82 4399.06
d1 II 593.53 0.9278 617.69 24.16 3.76 37.81
III 565.62 0.8842 603.74 38.11 5.94 44543.33
I 396.72 0.9835 450.59 53.87 10.68 70.01
d2 II 326.48 0.8094 338.14 11.66 3.33 1.48
III 398.86 0.9888 471.31 72.45 13.32 15681.26
I 377.56 0.9906 383.20 5.64 1.45 9834.41
d3 II 375.81 0.9860 382.33 6.52 1.68 72.32
III 354.36 0.9297 371.60 17.24 4.43 28723.18
I 595.55 0.9814 657.99 62.45 8.67 318.17
d4 II 566.41 0.9333 649.01 82.61 11.29 3.44
I 497.14 0.9733 580.33 83.19 12.54 183.70
d5 II 491.21 0.9617 590.23 99.02 14.37 3.06
III 465.90 0.9121 564.62 99.08 14.93 23117.35
I 375.17 0.9054 406.12 30.95 7.08 76.46
d6 II 368.70 0.8898 402.92 34.15 7.81 1.63
III 365.83 0.8829 x 401.45 35.62 8.15 18203.67
Table
4: A comparison of the solution with maximum (assigned weight - waste) obtained
by I) the A-team implementation, II) individual runs of all heuristics, and III) branch-
and-cut. The ratio is obtained using the best available upper bound for maximizing
assigned weight minus waste obtained from Table 2. Cpu time is given in seconds.
Run Time
Clearly, combining the heuristics by the cooperative strategy increases running time as
a cycle of 1500 - 3000 heuristics are run. However, still the run times are in a reasonable
range and are significantly smaller compared to that of the branch-and-cut method.
A single run of each individual heuristic takes between seconds, depending on
the size of the problem and the heuristic used. The running time of each individual
heuristic is given in Table 6 in Appendix. The most time-consuming heuristic is the
replace-single heuristic, which takes 45 seconds for d3 and only 0.24 seconds for d2.
The constructor heuristics take very little time. While greedy heuristics run in less
than a second, the lp-round and lp-greedy heuristics take slightly more time (0.17 -
1.31 seconds). The most time-consuming constructor successive-assign takes 0.32 to
4.25 seconds of cpu time.
The A-team implementation takes a time of approximately 1 minute - 3 hours, depending
on the size of the problem. Still, the run times are significantly small compared to
that of the branch-and-cut approach of Cplex, which is in the order of 3 - 13 hours.
All the run times are given in Tables 3 and 4. In these tables, the run time for individual
heuristics is the total time over all heuristics, as the best solution was picked after
running all the heuristics.
Concatenation of Heuristics in the A-team Implementation
By examining the non-dominated solutions on the Pareto frontier (shown in Figures 2-
we can identify the heuristics and the sequence in which they were applied to yield
a particular solution. Naturally the question arises whether it is really necessary to
randomize the sequence in which these heuristics act on each others' solutions. If it is
possible to identify one or more sequences (or concatenation of heuristics) which yield
the Pareto-frontier for all the problem instances, then we might abandon a stochastic
control strategy for constructing these solutions. In this section we show that the
concatenation of heuristics used to generate the Pareto-frontier varies significantly by
problem instance. This illustrates the need to tailor the solution strategy by problem
instance which is automated by the stochastic control strategy adopted in this paper.
For each non-dominated solution generated by the A-team implementation, we traced
the heuristics whose output solutions were used to obtain the non-dominated solution.
We can conclude that some heuristics were more effective and were repeated more.
Nevertheless, we observed no regular patterns in the sequence of agents called across
different problem instances. This justifies the use of an A-team approach for the concatenation
of heuristics as opposed to identifying some effective patterns and using these
patterns instead.
For the A-team implementation, the total number of occurrences of each heuristic which
participates in the generation of non-dominated solutions (for each problem instance)
is given in Table 7 in the Appendix. We see that lp-round has been the most frequently
used constructor. Local exchange heuristics replace-single and replace-pair, and waste
reduction heuristics empty and empty-and-reassign were the most effective improvers in
generating non-dominated solutions. We also give the heuristics that output the non-dominated
solutions of the individual runs in Table 8 for comparison purposes. The
statistics presented in these tables clearly indicate that the patterns used for constructing
the Pareto-frontier varied significantly across problem instances. Figures 5-8 in the
Appendix illustrate the construction of the non-dominated solutions generated by the
A-team implementation.
6 Conclusions
In this paper we introduced a bicriteria sparse multiple knapsack problem. We characterized
the computational complexity of this problem experimentally by computing
the gap of the LP relaxation to the best derivable bound and showed that increased
sparsity makes the problem more difficult. Integer programming techniques were unable
to generate solutions in a reasonable amount of time. A new cooperative problem
solving technique was introduced which used a collection of fast heuristic algorithms
embedded in a cooperative problem solving architecture called A-Teams. The solutions
generated using this approach were shown to be superior to those derived from using
these heuristics individually and to the feasible solutions derived from integer programming
techniques. The cooperative problem solving strategy is shown as an alternative
approach for automating the design of heuristics for hard combinatorial problems.
--R
Approximation algorithms for bin-packing: An updated survey
Approximation algorithms for bin-packing: A survey
Variable sized bin packing.
Solving multiple knapsack problems by cutting planes.
Computers and Intractibility:A Guide to the Theory of NP
An algorithm for 0-1 multiple knapsack problems
Reducibility among combinatorial problems.
The surplus inventory matching problem in the process industry.
Primary production scheduling at steel-making industries
Solution of the zero-one multiple knapsack prob- lem
A bound and bound algorithm for the zero-one multiple knapsack problem
Heuristic algorithms for the multiple knapsack problem.
Knapsack Problems.
Lower bounds and reduction procedures for the bin packing problem.
Leda user manual (version r 3.2).
Asynchronous organizations for multi- algorithm problems
Organizations for computer-based agents
--TR
--CTR
Jayant R. Kalagnanam , Andrew J. Davenport , Ho S. Lee, Computational Aspects of Clearing Continuous Call Double Auctions with Assignment Constraints and Indivisible Demand, Electronic Commerce Research, v.1 n.3, p.221-238, July 2001 | cooperation;bicriteria;multiple knapsack;multiple heuristics;asynchronous teams |
595245 | Lightweight Reasoning about Program Correctness. | Automated verification tools vary widely in the types of properties they are able to analyze, the complexity of their algorithms, and the amount of necessary user involvement. In this paper we propose a framework for step-wise automatic verification and describe a lightweight scalable program analysis tool that combines abstraction and model checking. The tool guarantees that its True and False answers are sound with respect to the original system. We also check the effectiveness of the tool on an implementation of the Safety-Injection System. | Introduction
Recent years have seen an increasing interest in computer-supported
techniques for analyzing correctness of software
artifacts. In particular, this interest is caused by the effectiveness
and potential of lightweight formal methods [18].
In this approach, verification consists of automated checking
of an artifact against some critical properties (e.g., deadlock-
security, fairness), often concentrating on debugging
instead of assurance. Most often lightweight methods
include model checking [5] - a technique for automatically
verifying properties of a system. Given a system and a prop-
erty, a model checker buildsthe reachability graph by exhaustively
exploring the state-space of the system. A number of
industrial model checkers have been developed, including
SPIN [15], SMV [22], and MurOE [10]. Althoughmodel checking
started as a technique for verifying hardware, it has been
effectively applied in a variety of software projects. For ex-
ample, SMV was used to verify correctness of mode logic
in A-7 aircraft [25] and TCAS specifications [4]; SPIN was
applied to the validation of the remote object invocation in
CORBAGIOP [20], checking Java programs [14], and many
others. Model checking became part of the routine V&V process
during the development of Lucent's new server product
[16], and has been applied to reasoning about user interfaces
[12] and business processes [19].
Model checking offers a potential for push-button verifi-
cation. However, this potential is not easily realizable, especially
for checking correctness of programs, as opposed to
specifications, protocols, or other software artifacts. First of
all, model checking is mostly limited to finite-state systems
(i.e., every variable in the system should have a finite domain).
Several model checkers allow reasoning about infinite-state
systems by "executing" all paths of the system up to a certain
depth [13, 15]. However, such systems cannot guarantee
that the system satisfies the desired property. To check pro-
grams, an analyst has to utilize abstractions, computed either
automatically or by hand [16]. And, although it is highly-
desirable that properties hold on the abstracted model if and
only if they hold in the original model [6], such assurance is
difficult to obtain: a different abstraction has to be built for
each class of properties under analysis [9].
Given a large number of available verification techniques
and a potential complexity and expense of their application
and interpretation of results, we propose a "layered" approach
to automatic verification, depicted in Figure 1. Given a system
S and a property P , we would like to know if P holds
in S. We would like to start at verification level 1, which
is fairly inexpensive, both in terms of the work required of
the user, and in terms of computing resources required. This
step will result in one of three conclusions: P is definitely
true or definitely false in S, at which point the verification
stops, or the analysis cannot yield any information. In the
latter case, the analyst will apply a technique on verification
property
is true
more expensive
analysis
property
is false verification step 2
verification step 1
step N
verification
Figure
1: Framework for automatic verification.
level 2. This technique is more expensive than that of verification
level 1, but may help in determining whether or not
holds. If it does not, the analyst proceeds in applying more
and more complex and expensive techniques until 1) P is definitely
proved or definitely disproved or 2) all levels are exhausted
or all resources are exhausted. Note that no precision
is lost at each level. All properties that have not been
concluded to definitely hold or definitely not hold on S during
the verification level have to proceed to level k.
What is the benefit of the step-wise verification frame-work
outlinedabove? It allows us to categorize existing tools
based on their effectiveness in verifying properties and the
complexity of application (this complexity metric includes
the effort needed by a human and the effort needed by a com-
puter). This also allows one to utilize verification efforts more
effectively.
In this paper, we discuss verification of sequential programs
against fairly complex properties, involving temporal
logic and arithmetic on values of variables, e.g. "a is never
less than b", "immediately after 2a will be true".
However, our approach is to build a "level 1" verifier. First,
we compute the abstraction of behaviors of the program under
analysis using abstract interpretation. This abstraction
is not dependent on a choice of properties to verify and is
computed automatically, even though the program may not
be finite-state. Then we model check the abstracted system.
If our analysis yields True, the property holds in the original
system; if it yields False, the property does not hold, and if
it yields Maybe, the analysis is inconclusive. For such cases,
properties can be verified using more expensive techniques.
The idea of verification with the presence of abstraction
has been explored by several researchers. In particular, Jackson
[17] proposed a model checking method to analyze infinite
specifications expressed in Z or VDM. His approach defines
an abstract state space where each abstract state represents
a (possibly infinite) equivalence class of concrete states.
Dams [9] demonstrated how to abstract reactive systems, so
that the abstracted transition systems preserves certain forms
of combined safety/liveness properties. Pardo [24] built the
abstract and the concrete models of the system and conservatively
verified properties expressed in -calculus on the abstracted
model. If the formula is proved false, related states
are then successively refined, until the given formula is verified
or computational resources are exhausted.
The rest of this paper is organized as follows: Section 2
gives an overview of model checking and abstract interpre-
tation. Section 3 discusses the theoretical goals of this work
and introduces new algorithms for our program verification
system. Proofs of correctness of some of these algorithms are
given in the Appendix. The design of this system is described
in Section 4. Section 5 demonstrates the results of using our
abstract model checker to analyze the Safety-Injection Sys-
tem. We conclude the paper with the summary of this work
and the outline of future research directions.
Background
In this section we recall the basic definitions of abstract interpretation
and model checking.
2.1
Abstract
Interpretation
Abstract interpretation [8, 9] is a way of symbolically executing
programs using abstract instead of concrete domain. Familiar
data-flow analysis algorithms, e.g., constant propagation
or live variables, are examples of abstract interpretation.
Let D c and D a be the concrete and the abstract domains, re-
spectively. The abstraction function ff : 2 D c ! D a maps a
set of concrete values into an abstract value. ff has an inverse,
the concretization function . An abstraction
is valid if the pair of functions (ff, fl) forms a Galois connection
For example, we can perform a "sign analysis" by replacing
a set of integers (D signs ((\Gamma), (+), or (0)).
Here, . We can execute
the program on the abstract values. For example,
(f\Gamma1345g \Theta f17g) ff
However, the abstract values cannot always be determined
exactly. Consider the following example:
(f\Gamma1345g \Theta f17g
can be represented as a set f(\Gamma); (+); (0)g with the interpretation
that the result can be any of these values. When
the abstract domain is finite, the abstract interpretor acts as
a data-flow analyzer. However, we may also want to use abstract
interpretationto reason about infinite-domain variables.
In order to achieve tractability, we need to ensure that the abstraction
is converging:
1. we have a finite representation of the infinite set of val-
ues. One way is to abstract from a set to an interval by
taking the minimum (maximum) value from the set as
the left (right) bound of the interval. For example,
2. we ensure convergence in a finite number of steps. With
a finite-domain abstraction, convergence is guaranteed.
To achieve convergence for the infinite-domain abstrac-
tion, [8] introduced an abstract binary operator widen-
ing, denoted as r, which represents a "jump". For any
abstract values i 0 and ri 1 . [8] defined
widening as follows:
For example,
2.2 Model Checking
In this paper we will concern ourselves withCTL model checking
- an automatic technique for verifyingproperties expressed
in a propositionalbranching-time temporal logic called Computational
Tree Logic (CTL) [5]. The system is defined by
a Kripke structure, and properties are evaluated on a tree of
infinite computations produced by the model of the system.
The standard notation M; s indicates that a formula f
holds in a state s of a model M . If a formula holds in the
initial state, it is considered to hold in the model.
A Kripke structure consists of a set of states S, a transition
relation R ' S \Theta S, a set of initial states I, a set of atomic
propositions P , and a labeling function L
must be a total function, i.e, 8s 2
If a state s n has no successors, we add a self-loop to it, so
that Intuitively, for each s 2 S, the labeling
function provides a list of atomic propositionswhich are True
in this state.
We use CTL on boolean expressions that include variables
and arithmetic operations on them. The set P of atomic propositions
is defined as follows:
If P 1 and P 2 are terms, then
are
atomic propositions.
Terms are defined recursively as
1. Every identifier and every constant is a term.
2. If t is a term, so is (t).
3. If t 1 and t 2 are terms, so are t 1
mod and exp are the mod and the exponentiation functions,
respectively. For example, the following are some atomic
propositions in this version of CTL:
CTL is then defined as follows:
1. Every atomic proposition
2. If ' and are CTL formulas, then so are :', ' - ,
The logic connectives :, - and - have their usual meanings.
The existential (universal) quantifier E (A) is used to quantify
over paths. The operator X means "at the next step", F
represents "sometime in the future", and U is "until". There-
fore, EX' (AX') means that ' holds in some (every) immediate
successor of the current program state; EF' (AF')
means that ' holds in the future along some (every) path emanating
from the current state; E['U ] (A['U ]) means that
for some (every) computation path starting from the current
state, ' continuously holds until becomes true. Formally,
exists some path s
Note that AF (') j A[True U ']; and EF (') j E[True U '],
that is, we are using a "strong until". We also use the abbreviations
EG(') and AG(') to represent the property that '
holds at every state for some (every) path emanating from s 0 .
EG and AG are defined as:
3 Lightweight Model Checking
The goal of this work is to use abstract interpretation to alleviate
the state explosion problem of model checking while
ensuring that the properties verified on the abstract system
can be properly interpreted in the original system. This goal
is achieved by constructing an abstract model checker on our
three-valued logic that returns values True, False and Maybe,
such that the analysis that results in True and in False is sound.
Using static analysis, we build the abstract system by associating
each line of the program with an abstraction of the set
of values that program variables can attain when the control
reaches this point along any execution path. This abstraction,
which reduces the state-space for finite-state and for infinite-
state systems, is computed completely automatically.
In this section we introduce the language for constructing
programs, describe the process of building the labeled transition
machine, and present a model checking algorithm on
the three-valued logic.
3.1 The Input Language
Our input language, called C-, is a sequential language with
the syntax similar to C. The language includes the following
constructs: booleanandinteger types; conditionalcon-
trol structures (if, else); loops (while); input and output
(print, fprint, scan, fscan); assignments; functions
and procedures. Dynamic features such as recursion or
pointers are not provided in this language. It also does not
allow any user-defined (compound) data structures. A complete
grammar of the language is available in [11]. Figure 2
gives an example program written in C-.
3.2 Construction of a Labeled Transition System
Here, we describe the transformation of the program representation
into a labeled transition system.
We start with a (infinite-state) program
is a (infinite) set of states, s 0 2 W is
the initial state, R ' W \Theta W is the total accessibility rela-
tion, and LT and LF are truth and falsity labeling functions,
mapping each state to the set of propositionsthat are True and
False, respectively, in this state (L T
In C-, as in C, there is no one-to-one correspondence between
assignments to variables and lines of code. In fact, before
attempting to verify programs expressed in C-, we need
to give it a well-defined formal semantics, i.e., describe the
way in which each construct transforms the "program state"
[23]. We define a state to be the mapping between the set
of global variables and their values, and thus a state change
occurs when at least one of the global variables changes its
value.
Our goal is to construct an abstract finite Kripke structure,
in which every edge represents a state change in the program.
In order to do that, we define a set of variables V and let Vw '
V be the set of variables which are accessible in the lexical
scope associated with a state w 2 W , and G ' V be the set
of variables which are accessible at every point of the pro-
gram. Thus, G is the set of global variables. Each state w in
the program is an n+1-tuple,
(v )), in which ln corresponds to the line number of the
state in the program, and
here d i is a subset of D i - the values of the concrete domain
of v i . CTL properties about such programs can be expressed
only in terms of global variables.
We start the analysis by parsing the program and building
an
Abstract
Syntax Tree (AST). AST is an intermediate representation
for the structure of the program under interpreta-
tion. Next, we propagate information for all variables (global
and local) in the current scope throughout the AST, until we
reach a fixpoint. Abstractions are formed by mapping a concrete
state w onto an abstract state w ff (w
each d i 2 2 D i is mapped onto an abstract value D ff i . The result
is an abstract state space W ff , in which each w ff 2 W ff is
an n+1-tuple w
Notice that line numbers and the set of variables are the same
in the concrete and the abstract state space. ff is chosen so
that W ff is finite, and an abstract state w ff can represent one
or more or even an infinite number of concrete states due to
the abstraction. Moreover, there is only one state associated
with each line of code. Let R ff be a transition relation over
the abstract state space, R ff ' W ff \Theta W ff . R ff is constructed
as follows: (s
Our labeling functions then become
In the concrete domain, 8w 2 W ,
Under the assumptions of
the Galois connection framework, an abstract system has at
least as many behaviors as the corresponding concrete one.
Typically, verification on abstracted systems is done either
conservatively or optimistically. The former case provides
"reliable negative" answers, with L ff T ' LT , and L ff F '
LF . The latter case provides "reliable positive" answers, with
In either case, one side of
the answer cannot be trusted. The goal of our work is to ensure
that we get "reliable positive" and "reliable negative"
answers, i.e., L ff T ' LT and L ff F ' LF . So, in our case,
. The resulting abstract
finite-state program is PG
In order to construct an abstract Kripke structure in which
every transition corresponds to a change to a global variable,
we define a "global variable changed" predicate p on a state
such that p(y) is True iff 9x; (x; y) 2 R ff , 9g 2 G, s.t.
g's abstract value in state x (y). Now we construct
an abstract aggregate state space S ff in which every element
contains one state w ff which involves a change to
a global variable, and other states that do not involve changes
to global variables and can be reached from w ff via the transitive
closure of R ff (denoted R ff ). s ff is defined recursively
as follows:
ffl if p(w ff ) is true, then w ff 2 s ff .
1: int b; 12:
2: int xy; 13: else
3: int main ( ) { 14:
4: int a; 15: if ( (a !=
5: int c; 16: if ( (a != 2) && (a !=
7:
8: print("xy is ", xy);
9: while { 20: print("b is ", b);
Figure
2: A program fragment.
Note that values of global variables within s ff are the same.
We will refer to L ff
T and L ff
F as labeling functions that map
each s ff 2 S ff to a set of atomic propositions on global variables
that are true (false) in that state. Finally, the transitions
between states in S ff , E ff ' S ff \Theta S ff , are thus defined as:
Our abstract Kripke structure K
ready.
3.3 Model Checking Algorithm
We now present the algorithm that receives a Kripke structure
K ff constructed above and a correctness propertyexpressed
in the version of CTL described in Section 2, and determines
whether or not the property holds in the system. As mentioned
in the previous section, we want to ensure that our analysis
yields "reliable positive" and "reliable negative" answers,
i.e., if the analysis concluded that a property is True, then it
holds in the original system, and if the analysis concluded
that a property is False, then it does not hold in the original
system. In order to do so, we introduce a third logical
value Maybe. Thus, if the analysis concluded that a property
Maybe holds in the system, then it is unknown whether or not
the property holds in the concrete system.
The algorithm recursively goes through the structure of
the property under analysis, associating each subproperty '
with a pair of sets of states (Yes('), No(')). Yes(') ' S ff
is a set of states in which ' is True, or, more formally, s ff 2
which represents a set of
states in which ' is False, is defined similarly. We also define
a predecessor function pred : 2 S ff
which, given a set
of states Q, returns all the states that can reach some state in
Q in one transition:
The algorithm, inspired by Bultan'ssymbolic model checker
for infinite-state systems [3], is given in Figure 3. For exam-
ple, a property p - q holds in state s ff if s ff is in Yes sets of
both p and q. The same property does not hold in state s ff if
s ff is in the No set of either p or q. When verifying EXp, we
note that if p holds in some immediate successor of state s ff ,
then EXp holds in s ff ; any immediate successor in which p
may hold (S ff \Gamma No(p)) should be excluded from No(EXp).
A[pUq] is computed recursively as follows: A[pUq] is True
in all states S 0 in which q holds; it is also True in predecessors
of S 0 in which p holds and all of which successors are
in S 0 . A[pUq] is False in a state s ff iff q does not hold in s ff
and either p does not hold in s ff or one of its successors does
not lead to q.
Implementation
Figure
4: Architecture of the Abstract Model Checker.
We have implemented our Abstract Model Checker (AMC)
as a 26,000-line C program. Figure 4 shows the architecture
Procedure CHECK(')
2.
Until
3. Return (Qm ,
2.
Until
3. Return (Qm ,
Figure
3: Model checking algorithm.
of our software. The CTL formulas and the input language
have been described in Sections 2 and 3, respectively. The
Abstract
Interpretor (AI) receives the program under analysis
and builds the Kripke structure K
using the process described in Section 3. This
structure, together with a set of CTL formulas, becomes the
input to the Model Checker which checks each property and
returns True if the formula holds in the program, False if the
formula does not hold, or Maybe if the validity of the formula
cannot be established. In the latter two cases, the model
checker also returns a counter-example. At the moment, the
counter-example facility includes just the line number and
the variable-value mappings of the states where the formula
is not True.
The AI receives a program and "interprets" it by starting
with an input context that consists of a set of values that variables
have before a program statement, executing the state-
ment, and producing an output context. The output context is
then stored as part of the state. The abstract values of finite-
domain variables (boolean or enumerated types) consist of
sets of (concrete) values these variables can attain, or UNDEF
(undefined) 1 . However, values of infinite-domain variables
such as integers should be abstracted further. In Section
2, we have briefly discussed how an abstraction function
ff can be applied to a set to get an interval. However, for bet-
1 For brevity, we do not discuss the treatment of UNDEF here. For details, please
refer to [11]
ter precision, we will associate each infinite-domain variable
with a (finite) set of intervals, with the following interpreta-
tion
In the current implementation of AI, each set can consist of
up to 5 intervals. We define ff
[ (union on the set of intervals)
below. Let a be intervals and assume, without a loss of
generality, that m - n:
fag
ff
fag
ff
ff
ff
ng
fag ff
When we encounter two sets, each containing more than one
interval, we first union elements of the set with less intervals
(in this case, fa 1 ; :::; amg) into one interval, and then union
the result with each interval of the other set. Interval operations
unionand difference have their usual meaning, and widening
on intervals is defined in Section 2. Other operations on
sets of intervals, ff
ff
r (widening) are similar.
Additional operations, including comparison and arithmetic,
are defined formally in [11].
The algorithm used in our AI for analyzing conditional
statements is depicted in Figure 5. Given an input abstract
statements to
execute when iexpr is True or False (stmt t and stmt f , respec-
tively), we either execute stmt t (stmt f ) based on S i and then
return the resulting abstract state, or call the Omega calculator
to get abstract states that correspond to taking the If and
the Else part (S i
t and S i
f , respectively), execute the state-
ments, and compute the union of the resulting output con-
texts. The Omega calculator is a set of C++ classes [21] for
manipulating integer tuple relations and sets described by Presburger
formulas. We use it for symbolically executing conditional
expressions involving intervals.
Procedure EVAL-IF
Evaluate iexpr
IF iexpr is True
Execute stmt t starting with S i to get S
Return S
ELSE IF iexpr is False
Execute stmt f starting with S i to get S
Return S
ELSE IF iexpr is Maybe
Call Omega calculator to get S i
f
Execute stmt t starting with S i t to get S
Execute stmt f starting with S i
f to get S
f
Return S
f
Figure
5: Algorithm for analyzing conditional statements.
For example, suppose we are running our AI on the program
fragment depicted in Figure 2 (Figure 6 shows the control-flow
graph for this fragment, with each state associated with
the program line number). Let the input context before executing
state 11 be ((xy; f[\Gamma20; 52]g); (a; f[\Gamma5; 8]g); (b; f[13;
2]g)). The condition xy == 0 evaluates to
Maybe; therefore, we call the Omega calculator to determine
that the value of xy in input contexts for states 12 and 14
should be f[0; 0]gand f[\Gamma20; \Gamma1]; [1; 52]g, respectively. The
values of b in output contexts of these states are f[5; 5]g and
f[26; 26]g; these are unioned to obtain f[5; 25]g in the input
context to state 15. The values of a after executing state 15
and state 16 are f[\Gamma3; \Gamma1]; [1; 8]gand f[\Gamma3; \Gamma1]; [1; 1]; [3; 3];
respectively. At this point, a has reached its
limit of five intervals, and further splitting cannot be done;
instead, we union a's intervals to get f[\Gamma3; 8]g and proceed
with the execution. This introduces a loss of information and
precision, but it is strictly conservative [11]. The outputvalue
for a after state 17 is f[\Gamma3; \Gamma3]; [\Gamma1; 8]g.
Loops are executed until a fixpoint on values of all variables
has been achieved. In order to ensure that this fixpoint
occurs in a finite number of steps, we change values of variables
in each loop at most 20 times, keeping track of whether
they decrease or increase between iterations. If a fixpoint was
not achieved, we widen values of non-converged variables,
with the increase and the decrease leading to the values of
+1 and \Gamma1, respectively. Afterwards, we proceed executing
the loop again to ensure that dependencies between the
variables are adequately captured. Table 1 lists several values
that variables b and xy attain in the input context to state
9 as we execute the main while loop of the program in Figure
2. At the first iteration, these values are f[13; 13]g and
\Gamma20]g, respectively. In the following19 iterations we
note that the maximum values b and xy can attain are in-
creasing, whereas their minimum values stay the same. Thus,
the widening which occurs on the 20th iteration changes only
the maximum values of these variables. The 21th iteration
does not bring any further changes, thus achieving a fixpoint.
Figure
7 shows the final Kripke structure built from the
control-flow graph of Figure 6. Each state is associated with
a line number of the statement that changes a global variable
in the original program, and withthe abstract values that global
variables have after the execution of this state. For example,
state 10 of Figure 7 is an aggregation of states 10 and 11 of
Figure
6.
int xy
int b
8:
10:
True 11:
xy == 0
14:
False
15:
a!=-2
True True
19:
print xy
int a
int c
7:
9:12:
20:
print b
True
False
False
False
3:
MAIN
END
True
False
Figure
Control-flow graph of the program in Figure 2.
iteration b xy
Table
1: Execution of the while loop of the program in Figure
2.
The resulting Kripke structure becomes input to the model
checker whose algorithm is described in Section 3. For ex-
Figure
7: Kripke structure K ff built from the program fragment
in Figure 2.
ample, we can model check the structure depicted in Figure 7
against CTL properties
and EF (b = 12). AMC returns False for the first property
because it is violated in state corresponding to line 12 of the
program. The second property is determined to be True because
it is satisfied in the state corresponding to line 12. The
third property is determined to be Maybe: it Maybe holds in
the state corresponding to line 14 and does not definitely hold
in any state.
4.1 Performance
Given a programPG, let jV j be the total number of variables,
global and local, and n be the number of statements in PG.
The worst case of the AI algorithm occurs when the program
has jV j loops, and each loop widens exactly one variable.
We go through each loop at most 20 times; therefore, each
statement in PG can be changed at most 20 \Theta jV j times, and
there are n \Theta 20 \Theta jV j changes altogether. Furthermore, every
state has at most predecessors. For each change of
state, we union abstract values of variables of all the prede-
cessors, which takes (n steps (m is a constant
proportional to the number of intervals associated with each
variable). Therefore, the entire computation of the abstract
interpretor takes 20 \Theta jV j \Theta n \Theta m \Theta (n \Gamma 1) \Theta jV j steps,
which is O(jV
To compute the performance of our model checker, we let
jP j be the length of a property P . Among all the CTL for-
mulas, A['U/] is the most complex. For this algorithm, Q i
can change value at most n times before a fixpoint is reached,
and it takes steps to compute Q i 's predecessors each
time. Verification of this property takes O(n \Theta (n \Gamma 1)) steps.
Therefore, the total running time for our model checker to
check a formula P is O(jP j \Theta n 2 ).
5 Case Study
To determine the effectiveness of our abstract model checker,
we analyzed the simplified version of a Safety-Injection System
[7]. Safety-Injection is an embedded system that monitors
the water pressure and injects the coolant into the reactor
core when the pressure falls below a certain threshold. There
is a manual control that the operator can use to prevent the
system from injecting the coolant, which causes the system to
be overridden. A reset switch prevents the system from being
overridden. The system inputs the value of the water pressure
and outputs a boolean condition signifying whether to
inject the coolant. In addition, it maintains the internal state
reflecting the water pressure. If the water pressure falls below
a threshold Low, the system's pressure level becomes too
low; if the water pressure raises above Permit, the system's
pressure level becomes high; otherwise, this level is "within
the permitted range".
We have implemented the Safety-Injectionsystem as a 200-
line C- program with 8 global variables closely reflecting those
of the specification: WaterPres of type integer, Block
and Reset of type boolean, Injection of type boolean,
Overridden of type boolean, constants Low, Permit,
TooLow, Permitted and High and Pressure of type
integer (our system does not allow enumerated types, and the
last three constants are used to indicate symbolic values of
Pressure). The implementation also includes 7 functions
and 8 local variables.
The specification language of our system is expressive enough
to capture complex properties of the Safety-Injectionsys-
tem, such as
1. AG((Reset - Pressure
2. AG((Reset -
3. AG((Block - :Reset - Pressure 6= High)
4. Permitted - WaterPres - Permit)
AX(WaterPres - Permit
For example, Property 2 states that the system will inject the
coolant if the pressure is too lowand the reset button is pressed,
whereas Property 4 states that whenever the pressure is permitted
and the water pressure raises above the allowed thresh-
old, then the system will eventually transit into a state where
the pressure is high.
We verified the above properties on Sun UltraSPARC-II
with 4 400 MHz processors and 4 GB of RAM. The entire
verification effort, includingbuildingthe abstract Kripke structure
and checking all the properties, took 3.92 seconds (user),
6.20 seconds (system). Our model-checker yielded True for
each of the four properties. The final Kripke structure consisted
of only abstract states.
Safety-Injection has been verified by two other research
groups. Bultan [2] built an infinite-state symbolic model checker
that uses binary decision diagrams (BDDs) and a system
of linear constraints to reason about models with Presburger
arithmetic. This model checker also uses the Omega
library together with abstract interpretation to achieve finite-time
convergence of the analysis, but the properties are verified
optimistically, allowing false positives. In addition, this
procedure is partial, with the convergence dependent on the
structure of the program and the formula to be verified. This
approach does not utilize abstraction for state-space reduc-
tion. Bultan verified Properties 1 and 2, and we were not able
to determine the exact size of his models. Bharadwaj and
Heitmeyer [1] analyzed SCR specifications using the SPIN
[15] model checker. Their technique only allows finite-domain
variables, including integer subranges and enumerated types.
The size of the concrete state space is reduced by two meth-
ods: eliminating variables which are not relevant to the property
being verified (SCR ensures that dependencies between
variables form a partial order), and by replacing input variables
by predicates. The latter approach makes the verification
conservative, allowing false negatives. The unabstracted
system for Properties 1 and 2 (SPIN performs on-the-fly ver-
ification, without building a complete state space) consists of
over 1.7 million states, whereas the combination of the above
abstractions brings the state space down to 650 states.
6 Summary and Future Work
In this paper we proposed a framework for step-wise automatic
verification and described an implementation of a very
cheap and not particularly precise model checker. This model
checker verifies infinite-state sequential programs written in
a subset of C against CTL formulas containing arithmetic op-
erations. It applies property-independent abstract interpretation
to create an abstract Kripke structure, and then uses
this extremely compact structure to verify properties in low-order
polynomial time. No user-created abstractions are nec-
essary. The verification always converges and is guaranteed
to be sound: if the model checker yields True, the property
holds in the concrete system, and if it yields False, the property
does not hold. This approach is not limited to the analysis
of programs; it can be applied to finite-state and infinite-
state specifications equally well. We also believe that tightening
up the code of our model checker and making the state
encoding symbolic will further improve its running time.
However, the results of our work are limited in several
ways:
(1) The implementation of the tool cannot handle complex
constructs of the input language. These include recur-
sion, user-defined data types, dynamic memory allocation,
pointers, etc. We also currently limit our verification to sequential
programs.
(2) Our tool interacts with the Omega library, which can
only handle operations on integer-valued variables. Thus, reasoning
about floating-pointnumbers is currently not supported.
(3) There is only one built-inlevel of abstraction provided
in our system.
(4) The input language, being a subset of C, does not have
formal semantics; in particular, the notion of a state transition
is poorly-defined. We chose to associate a state with values
of global variables, and a state transition with changes of
values of global variables. Perhaps a more flexible way to
determine the granularity of state transitions is more appropriate
(5) Our model checker returns Maybe if it cannot determine
whether a property holds in the system. We believe we
can reduce the number of cases for which the verification is
inconclusive by improving the reasoning about abstract values
and/or by choosing property-specific abstractions.
In short-term future work we hope to extend our model-checker
to reasoning about CTL [5] which combines branching-time
and linear-time operations and is strictly more expressive
than CTL. We would also like to address the issue
of state granularity. We can do so by either asking users to
specify which global variables constitute a "state" or to add
language constructs for explicitly stating the beginning and
the end of each state, either via begin-state/end-state or via
adding the notion of time (time-tick), where each state occurs
between consecutive time-ticks.
Acknowledgments
We would like to thank Ric Hehner and Radu Iosif for reading
earlier versions of this paper, and Mark Pichora, Albert
Yu and Daniel House for many interesting discussions. We
acknowledge the financial support of NSERC Postgraduate
Scholarship.
Appendix
In this section, we give proofs of correctness of algorithms
for checking A['U/]. See [11] for proofs of correctness of
other algorithms. Let (AM
s ff )) indicate that our model checker returns True (False) when
checking a formula OE in state s ff of the abstract model M ff .
Assume:
where M , s are the model and the state of the concrete pro-
gram, respectively. The above expressions state that our model
checker is sound with respect to Yes and No answers for ' and
/. Prove:
1.
2. (AM
1.
The proof is by induction on the length of the path from
s ff to a state in which / holds.
IH: Let T be the set of states from which can be reached
in ! n steps. Assume 8t ff
PROVE: The formula holds for paths of length - n.
We will not consider the case where AM
because it is covered by the base case.
2. (AM
A['U/] does not hold in state s ff if either (1) / does not occur
on some path emanating from s ff , or (2) on some path
emanating from s ff , before the first occurrence of /, there is
a state in which ' does not hold.
The algorithm can be expanded as follows:
Case (1):
Until
Case
Case (1) starts from the set of states where :/ is true and recursively
intersects it with those states that have successors in
which :/ holds. The result is the set of states that can never
reach /, i.e. M; s
(2) results in the set of states in which neither ' nor / hold,
i.e. M; s
--R
"Model Checking Complete Requirements Specifications Using Abstrac- tion"
"Verifying Systems with Integer Constraints and Boolean Predicates: A Composite Approach"
"Symbolic Model Checking of Infinite State Programs Using Presburger Arithmetic"
"Decoupling Synchronization from Local Control for Efficient Symbolic Model Checking of StateCharts"
"Automatic Verification of Finite-State Concurrent Systems Using Temporal Logic Specifications"
"Model Checkingand Abstraction"
"Documentation for Safety Critical Software"
"Static Determination of Dynamic Properties of Programs"
"Abstract Interpretation of Reactive Systems"
"The MurOE Verification System"
Analyzing infinite-state programs with abstract interpretation
"Model Checking Graphical User Interfaces Using Abstractions"
"VeriSoft: A Tool for the Automatic Analysis of Concurrent Reactive Software"
"Model Checking Java Programs Using Java Pathfinder"
"The Model Checker SPIN"
"A Practical Method for Verifying Event-Driven Software"
"Abstract Model Checking of Infinite Spec- ifications"
"Lightweight Formal Meth- ods"
"Model Checking for Managers"
"Validation of Remote Object Invocation and Object Migration in CORBA GIOP using Promela/Spin"
"The Omega Calculator and Library"
Symbolic Model Checking.
"An Abstract Dynamic Semantics for C"
"Automatic Abstraction techniques for Propositional -calculus Model Check- ing"
"Feasibility of Model Checking Software Requirements: A Case Study"
--TR
--CTR
Steve Easterbrook , Marsha Chechik , Benet Devereux , Arie Gurfinkel , Albert Lai , Victor Petrovykh , Anya Tafliovich , Christopher Thompson-Walsh, Chek: a model checker for multi-valued reasoning, Proceedings of the 25th International Conference on Software Engineering, May 03-10, 2003, Portland, Oregon
Marsha Chechik , Benet Devereux , Steve Easterbrook , Arie Gurfinkel, Multi-valued symbolic model-checking, ACM Transactions on Software Engineering and Methodology (TOSEM), v.12 n.4, p.371-408, October | program analysis;CTL;abstract interpretation;model checking |
595282 | A KDD framework to support database audit. | Understanding data semantics from real-life databases is considered following an audit perspective: it must help experts to analyse what properties actually hold in the data and support the comparison with desired properties. This is a typical problem of knowledge discovery in databases (KDD) and it is specified within the framework of Mannila and Toivonen where data mining consists in querying theories e.g., the theories of approximate inclusion dependencies. This formalization enables us to identify an important subtask to support database audit as well as a generic algorithm. Next, we consider the DREAM relational database reverse engineering method and DREAM heuristics are revisited within this new setting. | Introduction
We are interested in understanding data semantics from real-life databases.
This process is considered following an audit perspective in the following sense:
it must help experts to analyse what properties actually hold in the data and
support the comparison with desired properties. This research paper takes examples
from relational database audit, assuming that inclusion and functional
dependencies that (almost) hold in the data capture the so-called data seman-
tics. This will be called hereafter the basic problem. However, our framework can
be applied to other kinds of databases and/or properties.
This work has been done while the author was on sabbatical year in the Department of
Computer Science at the University of Helsinki (Finland). It is partly supported by AFFRST,
Association Franco-Finlandaise pour la Recherche Scientifique et Technique.
Auditing databases is an important topic. Integrity constraints that have been
more or less explicited at the design time of a database may not always hold in
a given instance. Indeed, only recent Data Base Management Systems enable
to enforce important integrity constraints such as foreign keys. In most of the
cases, it is assumed that application programs enforce desired integrity constraints
and, obviously, it is not always done in real-life databases. Understanding data
semantics in databases is of a crucial interest to support their maintenance and
evolution. The fact that some property holds or not in an instance can be used
by experts to fix some integrity violation in the data. It can also lead to an
explicit definition of an integrity constraint for further use of built-in checking
mechanisms. Improving our knowledge of encoded data semantics is also useful
for semantic query optimization (see e.g., [2]). Last but not least, audit is an
important preliminary step for a database reverse engineering process [5] or the
design of federated databases. Indeed, solving the basic problem provides the
raw knowledge that is needed to start a restructuring phase on a denormalized
relational schema [13].
Auditing as querying multiple theories. Auditing databases is a typical problem
of Knowledge Discovery in Databases (KDD). Discovering knowledge from
databases can be seen as a process containing several steps: understanding the
domain, preparing the data set, discovering patterns (e.g., dependencies), post-processing
of discovered patterns (e.g., selecting dependencies that should become
integrity constraints), and putting the results into use [8]. This is a semi-automatic
and iterative process that is often described using ad-hoc formalisms
and/or notations. However, a general KDD framework has been proposed by
Mannila and Toivonen [11]. Data mining consists in querying the so-called theory
of the database w.r.t. a class of patterns and a selection predicate that
defines their interestingness. Audit can then be supported by queries over relevant
theories. This approach emphasizes a human-centered process: expert users
can precisely specify the theories they are interested in and formulate queries to
learn about the properties that really hold in the data.
Contribution. First, we specify auditing tasks within this general KDD frame-
work. The basic problem is formalized as mining theories of approximate inclusion
and functional dependencies (see Section 2). This enables us to identify an important
subtask to support database audit i.e., querying an intensionally defined
collection of dependencies. A generic algorithm, the "guess-and-correct" scheme
introduced in [11], is a good starting point for the evaluation of such queries (Sec-
tion 3). Finally, in Section 4, we revisit the heuristics that constitute the core of
the DREAM reverse engineering method [16,17]. In this project, equi-joins that
are performed in the application programs are used to support the discovery of
"relevant" dependencies.
2. A formal framework for database audit
Notations The reader is supposed to be familiar with relational database con-
cepts. Suppose r is a relational database instance over the schema R. A relation
belongs to R and is defined by a relation name R i and a set of attributes
Each relation R i associated with a table r i which is a set of tuples.
The database extension r represents the set of tables r i . r i [Y ] is the projection of
the table r i on Y ' X i and t[Y ] is the projection of the tuple t following Y. Let
Y and Z be two subsets of X i , a functional dependency denoted by R
on R i
[Z]. It can be
be two relations associated with
tables r i and r j respectively. Let Y (resp. Z) be a subset of attributes of X i
dependency denoted by R i [Y ] ' R j [Z] is true in r i and
It can be written r
2.1. Computing theories
First, we introduce the KDD framework of Mannila and Toivonen [11].
Given a database instance r, assume the definition of a language L for expressing
properties of the data and a selection predicate q. The predicate q is used for
evaluating whether a sentence ' 2 L defines a potentially interesting property of
r. Therefore, a mining task is to compute the theory of r with respect to L and
q, i.e., the set Th(L; is trueg: It is possible to consider
generic algorithms to compute such theories following the popular "learning as
search" paradigm. A reasonnable collection of data mining tasks (association
rules, sequential patterns, data dependencies, etc) have already been carried out
using this approach (see [12] for a survey).
Example 2.1. Consider the discovery of dependencies that hold in a database.
Assume L 1 is the language of inclusion dependencies and consider q 1 as the
satisfaction predicate: let r and s be the instances of R and S, and
be the language of functional
dependencies. Here again, the predicate q 2 is the satisfaction predicate.
For instance, assume and the two following
instances:
Looking for a generic data mining technique, a key issue is to organize the search
through the space of L sentences and get some safe pruning strategies. Here,
to be safe means that we do not want to miss any interesting sentence w.r.t.
the selection predicate. A simple idea is to define a specialization relation on L
and then use a levelwise algorithm to compute Th(L; specialization
relation - is a partial order: ' is more general than `, if ' - ' (' is more specific
than '). It is a monotone specialization relation w.r.t. q if for all r and ', if
In other words, if a sentence ' satisfies q, then
also all more general sentences fl satisfy q. A simple but powerful "generate-
and-test" algorithm can now be derived: start from the most general sentences
and then try to generate and to evaluate more and more specific sentences, but
do not evaluate those sentences that can not be interesting given the available
information.
Example 2.2. A monotone specialization relation w.r.t. inclusion dependencies
is defined as follows: for
have
i: For instance, given
i]. The most general
sentences are all the potential unary inclusion dependencies and at each itera-
tion, one consider "longer attribute sequences". Now, assuming the restriction to
functional dependencies with a fixed right-hand side denoted as B, a monotone
specialization relation w.r.t. functional dependencies is the reverse of set inclu-
5sion: for X , Y ' R and B 2 R we have . For
instance, D. The most general sentences have the whole set R
as the left-hand side. At each iteration, one consider shorter left-hand sides. The
selection predicate q 1 (resp. It means that
if R[hA; Bi] ' S[hE; F i] holds then R[hAi] ' S[hEi] holds. A safe pruning criteria
is now obvious: if R[hAi] ' S[hEi] does not hold then R[hA; Bi] ' S[hE; F i]
does not hold either and should be discarded at the candidate generation step.
The same idea applies for functional dependencies: if AB ! D does not hold
then A ! D doe not hold either and might be pruned.
By alternating candidate generation and candidate evaluation, a levelwise algorithm
moves gradually to the more specific interesting sentences. This has been
already implemented for inclusion and functional dependency computation (see
[11] for a complexity analysis and pointers to related work). It provides the
best known algorithm for the discovery of all the inclusion dependencies. For
functional dependencies, better algorithms are available (e.g., [9]). However, it
is clear that functional dependency discovery is a very hard problem due to its
inherent exponential complexity and the fact that functional dependencies with
long left-hand sides are less likely to hold than functional dependencies with
shorter ones.
A problem with such a scheme is that the computation of the most interesting
sentences in a theory can be quite slow if there are interesting statements
that are far from the most general sentences (the typical case for functional de-
pendencies). Furthermore, a framework designed to support (basic) audit task
might consider some important specificities of this kind of application. First,
one should not consider only exact dependencies: we want to study dependencies
even in the case where some tuples violate these constraints. Next, the expert
user is quite often interested in tightly specified subsets of the dependencies that
hold. For instance, he/she just want dependencies that involve a given collection
of attributes. Finally, quite often, dependencies do not have to be computed from
scratch i.e., either the expert user has already a good knowledge of constraints
that should hold and/or the computation of constraints has been already done
on a previous state of the database.
This motivates the definition of the theories of approximate dependencies, a
querying approach over intensionally defined theories, and the use of a variation
of the levelwise algorithm, the so-called "guess-and-correct" scheme.
2.2. Solving the basic problem
Computing approximate dependencies Inconsistencies in the database can be
allowed by defining q 0
ffi) to be true iff some error measure of the dependency
is lower or equal to a user-defined threshold. Let us define an error measure g
for the inclusion dependency
where r is the instance of R. Using g enables to consider dependencies that almost
hold since it gives the proportion of tuples that must be removed from r to get
a true dependency. Among the several ways of defining approximate functional
dependencies in an instance r of R, one can also consider the minimum number
of rows that need to be removed from r for the dependency
hold (the so-called g 3 error measure in [9]):
Example 2.3. Assuming the instances of Example 2.1 for
approximate inclusion and functional dependencies are
given.
Inclusion dependencies Error Functional dependencies Error
The selection predicate q 1 (resp. q 2 ) can be modified to denote that all the
approximate inclusion (resp. functional) dependencies whose error is lower or
equal to a user-supplied threshold are desired. These selection predicates remain
monotone w.r.t. their respective specialization relations.
Now, one naive approach to solve the basic problem might be to compute
theories of approximate dependencies for some error thresholds, store them in a
"SQL3" table and then query such tables using available query languages. This is
a typical approach in many KDD applications where interestingness of patterns
is considered in a postprocessing phase while pattern discovery is mainly guided
by simple criteria like statistical significance or error thresholds. This gives rise
to several problems. The size of such theories can be huge while the expert user
is interested in only a few dependencies. Not only it might be untractable to
compute the whole theories but also it gives rise to tedious postprocessing phases
(e.g., a posteriori elimination of redundancies). It motivates a flexible querying
framework that support the analysis of tightly specified theories.
Querying tightly specified theories It happens that, a priori, only small subsets of
the languages of dependencies L 1 or L 2 are interesting. Restrictions of practical
interest concern non trivial inclusion or functional dependencies, unary inclusion
dependencies but also various selection criteria over attributes. Attribute data
types and application domain semantics guide the definition of such restrictions.
Example 2.4. Continuing Example 2.1, an inclusion dependency like S[hEi] '
R[hBi] can be considered as irrelevant if the corresponding domains for E and B
are respectively, a collection of transaction identifiers and f1,2g to denote male
or female. Also, in an application domain like relational schema restructuring, it
is clear that not all the functional dependencies are interesting (see Section 4).
In fact, only expert users can define such restrictions. It is possible to define
them either as context-sensitive restrictions to the definition of L 1 and L 2 or by
means of new selection predicates. These different views influence the computation
process and its efficiency: it is more or less a "generate-and-test" scheme
when the generation of candidate dependencies can make an active use of given
restrictions. Notice that refining the language (re)definition is the basic technique
for dependency discovery with inductive logic programming systems, the
so-called declarative linguistic bias definition (see e.g., [7]).
A typical audit process requires the computation of many related theories.
Not only, several theories for the same dependency class are needed, depending
of the dynamically evolving user's interest, but also different theories for different
kind of dependencies might be useful. An obvious example is the audit of referential
integrity constraints for which one must consider inclusion dependencies
whose right-hand side sets of attributes are a key i.e., a special case of functional
dependency.
To cope with such a querying approach, the conceptual framework of inductive
databases has recently emerged. It suggests an elegant approach to support
audit or more generally data mining over multiple theories.
2.3. Towards inductive databases
An inductive database, is a database that contains inductive generalizations
about the data, in addition to the usual data [3]. The idea is that the user can
then query the data, the properties in the data as well as the "behavior" of the
data w.r.t. some properties.
Theories are here defined intensionally. Indeed, it is not realistic to consider
that querying properties can be carried out by means of queries over some
materializations of every properties (e.g., data dependencies). The idea is that
properties are computed only at query evaluation time, when the user is asking
for some specific ones. However, during the formulation of the query, he can
think that every property is just there.
Formally, the schema of an inductive database is a
where R is a database schema, QR is a collection of patterns, V is a set of result
values, and e is the evaluation function that defines how patterns occur in the
data. The function e maps each pair (r; ' i ) to an element of V , where r is a
database over R and ' i is a pattern from QR . An instance (r; s) of an inductive
database over the schema R consists of a database r over the schema R and a
subset s ' QR .
For our basic problem, we need two inductive databases that associate to
a database all the inclusion dependencies and functional dependencies that can
be built from its schema. We can choose that evaluation functions respectively
return the g and g 3 error measures as previously defined.
At each stage of manipulating an inductive database (r; s), the user can
think that the value of e(r; ') is available for each pattern ' which is present in
the set s i.e., that every dependency is actually in s. He/she send queries over the
intensionally defined collections of all dependencies to select only dependencies
fulfilling some constraints.
Example 2.5. Continuing Example 2.1, a user might be interested in "select-
ing" only inclusion dependencies between instances r and s that do not involve
attribute R:A in their left-hand side and have a g error value lower than 0:3. One
expects that a sentence like R[hC; Di] ' S[hE; F i] belongs to the answer.
The definition of a concrete query language for inductive databases is out of the
scope of this paper. However, let us take ideas from the SQL-like operator MINE
RULE [15] and propose two queries.
Example 2.6. The first part of a query specifies the kind of dependency one
want to mine while the second one, that begins with the keyword FROM, defines
the data in which mining is performed. The intuition is that all the power of
SQL can be used for that selection of the data part. The query introduced in
Example 2.5 can be written as follows:
MINE INCLUSION DEPENDENCIES as IND
SELECT 1.3 as LHS-IND
1.3 as RHS-IND
FROM R,S
The schema of the output table IND has three attributes LHS-IND, RHS-IND and
ERROR that correspond respectively to the left-hand side, the right-hand side and
the error measure of inclusion dependencies. Given the instances in Example 2.1,
we expect that the tuple (hC; that denotes the approximate
inclusion dependency R[hC; Di] ' S[hE; F i] belongs to IND.
One can now search for functional dependencies in s whose left-hand sides are
a right-hand side of a previously discovered inclusion dependency. Such a query
might look like:
MINE FUNCTIONAL DEPENDENCIES as FD
SELECT 1.3 as LHS-FD
1.1 as RHS-FD
The schema of the output table FD has also three attributes LHS-FD, RHS-FD and
ERROR with the obvious meaning. Given the instances in Example 2.1, we expect
that the tuple (hE; that denotes EF ! G belongs to FD.
Evaluating this kind of query provides information about potential foreign keys
Gg.
Actual object-relational query languages can be used as a basis for inductive
database query languages. However, non classical optimization schemes are
needed since selections of properties lead to complex data mining phases. In-
deed, implementing such query languages is difficult because selections of properties
are not performed over previously materialized collections. Optimizing this
kind of query remains an open problem for properties like functional dependen-
cies. However, many inspiring ideas emerge from current research on association
rule mining [3].
3. The "guess-and-correct" generic algorithm
[11] provides a generic algorithm that start the process of finding Th(L;
from an initial guess S ' L. It appears as an interesting basis for query evalua-
tion. Consider a set S ' L closed downwards under -, i.e., if ' 2 S and fl - ',
then (by definition, this is true for Th(L; q)). The border Bd(S) of S
consists of those sentences ' such that all generalizations of ' are in S, the so-called
positive border Bd + (S), and none of the specializations of ' is in S, the so
called negative border Bd \Gamma (S)). Bd consists of the most specific sentences in
S, and Bd \Gamma (S) consists of the most general sentences that are not in S. Roughly
speaking, the positive border is the collection of the sentences that are "just in"
the theory while the negative border is the set of sentences that are "just off ".
Example 3.1. Assume that the collection of maximal nontrivial inclusion dependencies
i.e., the positive border
of the theory is fR[hA; B; Di] ' S[hG; F; Ei]; R[hCi] ' S[hEi]; S[hEi] '
g. Its negative border contains many non-dependencies
like R[hAi] ' S[hEi], or R[hBi] ' S[hEi].
Computing borders is not a simple task in general but it is tractable for sets of
data dependencies in real-life business databases.
Algorithm 3.1. The "guess-and-correct" algorithm [11]. Given, a database r, a
language L with specialization relation -, a selection predicate q, and an initial
guess S closed under generalizations, this algorithm outputs Th(L;
1. E := ;; // correct S downward
2. C := Bd
3. while C 6= ; do
4.
5. S := S n f' 2 C j q(r; ') is falseg;
7. od;
8. C
9. while C 6= ; do
// evaluation: find which sentences of C i satisfy q:
using S:
12. C := Bd \Gamma (S);
13. od;
14. output
The algorithm first evaluates the sentences in the positive border Bd
removes from S those that are not interesting. These steps are repeated until
the positive border only contains sentences satisfying q, and thus S ' Th(L;
Then the algorithm expands S upwards, it evaluates such sentences in the negative
border that have not been evaluated yet, and adds those that satisfy
q to S. Again, these steps are repeated until there are no sentences to evaluate.
Finally, the output is q). Notice that, from the complexity point of
view, the selection predicate has to be evaluated on every sentence that belongs
to the border of a theory. If the initial guess and the
first part of the algorithm is just skipped while the second part starts with the
candidate set C containing the most general sentences of L. We get the simple
levelwise algorithm that has been sketched in Section 2.1.
The discovery of (approximate) functional and inclusion dependencies in a
database can be solved by algorithm 3.1 given the specialization relations we
introduced.
Results about the complexity of such a scheme can be found in [11] and are
not discussed here. However, it is clear that the better the guess is, the better the
algorithm is efficient. How to obtain good original guesses S? One fairly widely
applicable method is sampling: take a small sample s from r, compute Th(L; s; q)
and use it as S. Another obvious situation where a guess is available is when a
new audit is performed on the same database: most of the dependencies should
have been preserved. Definitions at the schema level and application programs
can also be used to produce a guess.
4. Revisiting DREAM heuristics
This section revisits heuristics about dependency discovery for relational
database reverse engineering. Given an operational database, the aim of a
Database Reverse Engineering (DBRE) process is to improve the understanding
of the data semantics and to support the (re)definition of a validated conceptual
model. A DBRE process is naturally split into two major steps [17]:
ffl Eliciting the data semantics from the existing system
Various sources of information can be relevant for tackling this task, e.g.,
the physical schema or the dictionary, the data, the application programs,
but especially expert users. Among other things, application programs might
encode integrity constraints that have not been encoded at the schema level.
ffl Expressing the extracted semantics with a high level data model
This task consists in a schema translation activity and gives rise to several
difficulties since the concepts of the original model (e.g., a relational schema)
do not overlap those of the target model (e.g., an Entity-Relationship model).
Many works have been done where a conceptual schema is more or less automatically
derived from a hierarchical database, a network database or a relational
database [1,4,16]. For relational databases, it is not realistic to assume that functional
dependencies or foreign keys are available at the beginning of a DBRE
process. Furthermore, the less we make assumptions on the knowledge a priori
(normalization, attribute naming discipline, etc), the more we can cope with real-life
databases. Several works [18,16,19] have proposed independently to fetch the
needed information from the data manipulation statements embedded in application
programs.
In the DREAM project [16], we began to study the use of equi-joins to
support 3NF schema reverse engineering. This work has been extended to cope
with denormalized schema in [17]. In the spirit of [14], the DREAM approach
consider the relational schemas that can be translated into conceptual schemas, by
looking into the method which has been used to design them. The key problems
can be resumed as follows: identifying the relevant objects of the application
domain, recovering the structure of each of these objects and eliciting the links
(or relationships) between these objects. This process is inherently iterative and
interactive: only a part of dependency discovery can be done automatically.
To cope with denormalized schemas, [17] propose a restructuring phase that
leads to 3NF schemas where, according to the experts in charge of the validation,
each relation maps exactly one object of the application domain. For that pur-
pose, one has to find the functional dependencies which are meaningful for the
application domain while they are not conceptualized as relations. Assuming that
primary keys are known, the difficulty is to find out the non-key attributes that
correspond to identifiers of objects of the application domain. These attributes
constitute the left hand side of relevant functional dependencies and are involved
in some (approximate) inclusion dependencies (foreign keys). As a matter of fact,
one must support the discovery of hidden objects [10] that can even be encoded
in 3NF schemas.
The main contribution in the DREAM proposal has been to explore how
the attributes on which equi-joins are performed help the discovery of interesting
inclusion and functional dependencies for these restructuring purposes. The main
result has been the following heuristics.
ffl equi-joins between sets of attributes that are embedded in application programs
can be used to discover "relevant" inclusion dependencies.
ffl non key attributes of inclusion dependencies are good candidates for the left-hand
side of "relevant" functional dependencies.
These heuristics obviously reduce the number of dependencies to be considered
and "relevancy" refers to the interestingness of discovered dependencies for the
restructuring process. A complete scenario is considered in [17] though the following
example carries out the intuition.
Example 4.1. Given emp=fcode,name,tel,addg, dept=fdep,director,addg
and the dependencies (1) dept[director] ' emp[code] (2) emp[add] '
dept[add] (3) code ! name, tel, add and (4) tel ! add. Dependencies
(1) and (3) seem relevant for a restructuring phase while (2) and (4) are
just integrity constraints. The DREAM heuristics rely on the assumption that
dept.director ./ emp.code is probably performed in application programs
(pointing out the potentially interesting dependency (1) and that code is a candidate
for a left-hand side of a potentially interesting functional dependencies)
while dept.add ./ emp.add probably do not occur.
It is now clear that analyzing the set of equi-joins in application programs,
enables to focus on interesting inclusion dependencies. Furthermore, it helps to
fix integrity problems when we find that, e.g., R:C ./ S:E is performed while
neither R[hCi] ' S[hEi] or S[hEi] ' R[hCi] hold.
The collection of equi-joins can be considered as a theory Th(L;
is the language of all the equi-joins between sets of attributes from r and q is the
predicate that says if a given equi-join is performed on r. Computing such theories
requires non trivial compilation techniques. Indeed, even if we consider only
SQL queries, equi-joins can be performed in many ways, with nested or unnested
queries, with a where clause or with an intersect operator, etc. Such a collection
is a valuable source of information to support maintenance of application code
as well as data semantics elicitation.
DREAM heuristics can be encoded in queries over the inductive databases of
inclusion and functional dependencies, using selection criteria derived from equi-join
occurrences. The DREAM method does not claim any completness about
discovered dependencies. However, it appears that by combining the different
sources of information, we can compute guesses and speed up the discovery of
the complete collections.
5. Conclusions
We presented a framework for the audit of databases based on a KDD per-
spective. It emphasizes that high-level querying tools are needed to support
expert analysis of operational databases. It provides a nice application domain
for an ongoing research on generic data mining tools (inductive database management
systems) though it brings a solution to concrete problems of practical
interest (e.g., mining approximate dependencies). We must now study typical
audit tasks. For instance, supporting the elicitation of referencial integrity constraints
can be useful when migrating from an old DBMS to a recent one. It
needs not only to mine inclusion and functional dependencies but also to support
the efficient search for erroneous data. Finally, it seems interesting to study
the relationship between approximate inclusion dependency discovery and other
measures of similarity between sets of attributes e.g., [6].
--R
Conceptual database design: an Entity-Relationship ap- proach
Discovering rules in relational databases for semantic query optimisation
Querying inductive databases: a case study on the MINE RULE operator
Reverse engineering of relational databases: extraction of an EER model from a relational database
A Framework for the Design and Evaluation of Reverse Engineering Methods for Relational Databases
Machine Learning 26 (2)
Advances in Knowledge Discovery and Data Mining
A method for translating relational schemas into conceptual structures
Levelwise search and borders of theories in knowledge discovery
Methods and problems in data mining
extended entity-relationship object structures in relational schemas
A new SQL-like operator for mining association rules
Usign queries to improve database reverse engineering
Towards the reverse engineering of denormalized relational databases
An approach for reverse engineering of relational databases
Reconstruction of ER schema from database applications: a cognitive approach
--TR | reverse engineering;data mining;integrity constraint |
595383 | Robot Pose Estimation in Unknown Environments by Matching 2D Range Scans. | A mobile robot exploring an unknown environment has no absolute frame of reference for its position, other than features it detects through its sensors. Using distinguishable landmarks is one possible approach, but it requires solving the object recognition problem. In particular, when the robot uses two-dimensional laser range scans for localization, it is difficult to accurately detect and localize landmarks in the environment (such as corners and occlusions) from the range scans.In this paper, we develop two new iterative algorithms to register a range scan to a previous scan so as to compute relative robot positions in an unknown environment, that avoid the above problems. The first algorithm is based on matching data points with tangent directions in two scans and minimizing a distance function in order to solve the displacement between the scans. The second algorithm establishes correspondences between points in the two scans and then solves the point-to-point least-squares problem to compute the relative pose of the two scans. Our methods work in curved environments and can handle partial occlusions by rejecting outliers. | Introduction
Previous research in mobile robotics has typically addressed several types of problems. The first
is path planning in the case of a perfectly known environment and perfect sensing. The optimality
criterion in this class of problems is the minimization of the cost for traversal between a start
and an end position, while avoiding obstacles [18]. The second type of problem is exploration
of an unknown world with perfect range sensing and odometry information [23]. Here the issues
are primarily the complete coverage of the environment and the complexity of the algorithm as
a function of the complexity of the environment (number of vertices and edges of objects).
The third type of problem is path execution within a known real environment. The focus here is
typically on the sensing required to accurately execute a preplanned path, and the key problem
is robot self-localization (the "where am I" problem). One primary issue in solving this problem
is how to match sensed data (vision, sonar, laser, infrared etc. ) against map information.
A comprehensive collection of literature in this area can be found in [7,13]. The robot self-localization
problem can be addressed either by metric means, by ensuring that the difference
between the robot's actual position and the position where the robot thinks it is remains small
and bounded, or by qualitative and topological means. It is well understood that odometry is not
sufficient because it leads to unbounded position error [13]. A qualitative solution by tracking
which side of landmark-defined lines the robot is on is proposed in [20].
If the robot is equipped with vision, then matching 3D models with 2D scene images is possible
[9,16]. Because of the enormous computational requirements of using image data, using two-dimensional
laser range scans has also been proposed and demonstrated successfully [5]. The
robot "Blanche" assumes that a metric map of the environment consisting of polygonal obstacles
is available, and it matches noisy range scans against the map frequently to keep the position
error small [6]. At the heart of the method is an iterative least-squares algorithm that finds the
congruence between a range scan and the map provided that the initial displacement is small.
We can thus consider the problem of position estimation in a known (or partially known) two-dimensional
polygonal environment as solved.
Finally, exploration of an unknown world with imperfect range sensing and odometry information
is addressed [17]. Here the self-localization of the robot is still an important issue. Distinct
locations or landmarks detected from sonar data are used in [19]. Matching local models of line
segments obtained from sonar data with a cumulative global model is adopted in [8,24].
In the context of the above literature, our work addresses the robot self-localization problem by
using laser range scans, similar to the work in [5]. However, we consider more general cases as (1)
an arbitrary two-dimensional world, not necessarily polygonal; and (2) an unknown environment.
We intend to address the localization problem for both path execution and exploration of unknown
world.
The main issue in our problem is the consistent alignment of two data sets (range scans in
particular). This is quite different from model-based matching [10]. Although a range scan
represents a 2D shape (contour of the visible world), this shape is only represented by noisy
discrete points instead of a high-quality model, which makes it very difficult to reliably define or
extract features, as described in [10]. Another complication is due to the presence of occlusion,
since the range scans from two different robot positions will only partially overlap. This implies
that spatial correlation methods which use arclength to reference shape contours (such as [15])
can not be easily applied to scan-matching. The registration method based on fitting Spherical
Attribute Images [12] also has difficulty in matching partial views.
Our approach is to start with an approximate alignment of the two scans (obtained from odom-
etry), and then iteratively improve the alignment by defining and minimizing some distance
between the scans. We present two algorithms. The first algorithm is based on matching data
points with tangent directions on the two scans. It is formulated as searching a distance function
to estimate the relative rotation between the scans and using an embedded least-squares procedure
to solve for the relative translation. Previous methods which iteratively match points to
curves or surfaces have also been reported [1,4]. They typically solve both rotation and translation
from a least-squares procedure and use fixed-point iterations to improve the solution. To
ensure convergence, an initial small rotation and translation must be assumed. Our method differs
from previous methods in that we do not include the non-linear rotation component in the
least-squares solution and we use a search procedure rather than fixed-point iterations to minimize
the distance function. Thus we are able to solve larger rotational error than the previous
methods.
Our second algorithm is based on iterative least-squares solutions using point to point correspon-
dences, similar to the ICP algorithm proposed in [1]. But in addition to choosing the closest
point on the model as the correspondence for a data point, we also choose the model point which
has the same distance from the origin as the data point. Using two correspondence sets allows
our method to estimate the rotation and translation very accurately and our method converges
significantly faster than the ICP algorithm.
The rest of the paper is organized as follows: Section 2 defines the problem as the alignment of
two range scans so as to recover the relative translation and rotation of the two scans. Section
3 describes the tangent-based matching method. Section 4 describes the point-based matching
method. Section 5 summarizes the integration of the two algorithms and shows experimental
results from both simulated and real laser range data. Finally, section 6 concludes the paper.
Problem Definition
2.1 Pose Estimation by Aligning Scans
A range scan is a list of points corresponding to the intersection points of a laser beam with
objects in the robot's environment. The laser beam rotates in a horizontal plane and emanates
from a sensor mounted on the robot. Thus a range scan describes a 2D slice of the environment.
Points of the range scan can be specified in a polar coordinate system whose origin is the location
of the sensor, and the reference axis for the laser beam direction is the home orientation of the
rotating range sensor. Each scan point is represented by the laser beam direction, and the range
measurement along that direction. We refer to (O(x; y); ' 0 ) as the scan pose, where O is the
position of the sensor in a global coordinate system and ' 0 is the sensor home orientation.
Suppose that the robot starts at pose P ref (which is our reference pose) and takes a scan (call it
the reference scan S ref ). The robot then moves through a static environment to a new pose P new
and takes another scan (call it the new scan S new ). The approximate difference of pose P new from
pose P ref (i.e. the relative translation and rotation) is usually known from odometry information.
However, this information is often imperfect due to wheel slippage. Our task is to determine the
exact difference of pose P new with respect to pose P ref , by aligning the two scans.
The matching problem is formulated as the following: Initially assuming that the pose of S new is
new , find a rotation ! and a translation T for S new such that, after the transformation, S new is
aligned with S ref .
2.2 Criterion for Matching Scans
A scan is a sequence of points which represent the contour curve of the local environment. Due
to the existence of random sensing noise and self-occlusion, it may be impossible to align two
scans perfectly. There exist two types of discrepancies between the scans.
In the first type, there are small deviations of scan points from the true contour due to random
sensing noise. These deviations can be characterized by an error distribution function which
depends on the sensor. Another type of discrepancy is the gross difference between the scans
caused by occlusion (i.e. some area is only visible in one scan but not in the other). We regard
this kind of discrepancy as an outlier which cannot be described by the sensing error distribution.
Naturally, we adopt a scan matching criterion as to find the best alignment of the overlapping part
in the sense of minimum least-squares error, while ignoring the outlier parts. We can formulate
this matching criterion as the minimization of a distance measure between the two scans, as a
function of the rotation and translation. To exclude outliers in defining the distance measure, we
can apply the concept of robust statistics [11,2].
3 Search/Least-Squares Matching Algorithm
3.1 Method Overview
Our approach to the scan matching problem is to define a distance measure between the two scans
and search for an appropriate rigid transformation which minimizes the distance. Although the
search space is essentially a three-dimensional one (rotation and two-dimensional translation),
we try to reduce the search problem to an efficient one-dimensional search plus an embedded
least-squares solution, by carefully formulating the distance measure.
The idea of the matching method is briefly described below. First, we compute the tangent
directions on the scans by fitting lines to sets of consecutive scan points. Then we associate
approximate correspondences of scan points, assuming a known rotation angle ! (but not the
translation T ). From each pair of corresponding points, we formulate a linear equation about the
unknown translation T . Then, by using all correspondence pairs, we define a least-squares model
for T which also represents a matching distance as a function of !. Outliers can be detected using
gates and they contribute a constant cost to the distance measure. The final step is to search
for a rotation ! which minimizes this distance function. The translation T is solved through
the least-squares method. We refer to this method as rotation search/least-squares method to
distinguish it from pure least-squares based fixed-point iteration type of methods.
The steps of the algorithm are summarized as the following:
1. Project the reference scan S ref to the pose P 0
new so that the two scans are represented in
the same coordinate system. Discard those points on S ref which are likely not to be visible
from the new pose.
2. Compute the tangent directions on each scan by fitting lines to a neighborhood of sample
points. Discard unreliable tangent lines (such as at corners or depth discontinuities).
3. Decide on a trial value of the rotation ! from a global search procedure.
4. For each point on S new , use the rotation angle ! to define an approximate corresponding
point on S ref and compute the point through interpolation. Check the correspondence with
some thresholds in order to reject outliers.
5. Use all the correspondence pairs to construct a least-squares model for T and find the
least-squares solution. Define a matching distance as a function of ! from the least-squares
residual and the outlier penalties.
6. Update the rigid transformation by the least-squares solution of T .
7. Repeat steps 3-6 and find the rotation ! which minimizes the matching distance function.
Also obtain the overall translation by integrating the individual updates.
The algorithm will be explained in detail in the following sections.
3.2 Projection of Reference Scan
The reference scan S ref is originally defined at pose P ref . We would like to project it to the
(approximate) new pose P 0
new to emulate the world as viewed from P 0
new . This is easily done by
a change of coordinate systems for the points in S ref .
After projection, we determine whether each point in S ref is visible from P 0
new based on the
bounded obstacle assumption and opaque assumption. (1) Assume that initially the points in
S ref are ordered by their polar angles (say counterclockwise). After projecting the points to the
new pose, if the new polar angles of some points are in the wrong order (i.e. become clockwise),
then the surface containing these points is facing away from the sensor and thus the points are
not visible. (2) Along the rays from the new origin P 0
new to the points, if there are other points
(either from S ref itself or from the new scan S new ) close enough to the rays, then the points
further from the origin are considered hidden (see Fig. 1 for illustration). The points determined
as nonvisible are discarded.
(a) (b)
occluded points
new
new
Figure
1: Scan points are considered invisible after projection if (a) their angles are in the wrong
order or (b) there are other points blocking the rays.
Finally, we obtain a set of points in S ref which are ordered by angles. The projected scan can be
readily used as a reference for registering S new .
3.3 Fitting Tangent Lines
At each sample point on a scan, we compute an approximated tangent line by fitting to a neighborhood
of sample points centered at that point.
OE
ae
O
Figure
2: Parameters of a line fit to a set of points.
A line fit to a set of points in neighborhood of size n is defined by the parameters ae
(normal distance from the origin to the line) and OE (direction of a normal to the line) (see Fig. 2)
which minimize the following error:
There exists a closed-form solution for ae, OE, and min (ae;OE)
Figure
3: The points labeled by circles are discarded. Tangent lines are computed at all the other
points. Only some of these tangent lines are shown for clarity.
Although we fit a line at every sample point, some of the lines should not be considered as tangent
lines if the world contour itself is not smooth enough near these points. Specifically, we want to
exclude sample points near corners or occlusion boundaries.
Two indicators can help us to recognize these non-smooth regions. First, we check the incidence
angle is the polar angle of the sample point and OE is the computed normal direction, see
Fig. 2). A high incidence angle indicates that either the sensing direction is nearly parallel to a
surface so that the range measurements are unreliable, or there is a depth discontinuity (occlusion
boundary).
Another value we check is the fitting error min(E fit ) which indicates the co-linearity of the points
or the smoothness of the local region. The error is usually small for straight lines or smooth
curves, but large at high-curvature points or highly noisy regions. Therefore, a large fitting error
usually means that the tangent line is poorly defined.
We use the above two indicators to reject unreliable fitting results. Only when both values are
within predefined limits, we consider the fitted line as the tangent line at the current sample
point. Otherwise, we regard the tangent line to be undefined. Fig. 3 shows an example of using
incidence angle and fitting error to detect points where tangent lines are unreliable. We compute
tangent lines at all the other scan points.
It is interesting to note that the points we discard for being unreliable in defining tangent (which
are likely corners and occlusion boundaries) can be considered as features. It is possible to
do feature-based matching using these points, provided that the correspondences between the
features on the two scans can be determined. As the number of identifiable features in the scan
is far less than the number of available data points, we believe that the feature-based solution is
less accurate and less robust than our method which uses all the data points where a tangent is
defined.
3.4 Correspondence Definition
We define the correspondence of scan points and set up an equation based on the values of a pair of
corresponding points. For the convenience of analysis, we initially regard the scans as continuous
curves rather than sets of discrete points and we also ignore sensing noise or occlusion, until we
instantiate the equation for the actual scan points.
Once we have projected S ref to the pose P 0
new , we represent the two scans in the same coordinate
system (defined by (T )). The two scans differ only by a rotation ! and a translation
Let P 1 be a sample point on S new and let P 2 be the true corresponding point on S ref (i.e. they
both represent the same physical point in the world). The two points are related by
sin
is the rotation matrix. Consider the tangent line defined on S new
at P 1 and another tangent line on S new at P 2 . Let the normal directions of the two tangent lines
be ~n 1 and ~n 2 , respectively. Then we can derive from Eq. 2 that
Our strategy is to use Eq. 4 to estimate the translation T , given the rotation ! and the two scans.
However, we note that for a point P 1 on S new , the exact correspondence point P 2 on S ref also
depends on T . Therefore, we want to derive an approximated version of Eq. 4 which does not
use the exact correspondence point P 2 .
We will choose a point P on S ref which is close to P 2 . There are many choices of selecting P
based on R ! P 1 (which is P 1 after correcting the rotation), such as the closest point from R ! P 1 or
the intersection of the normal line at R ! P 1 with S ref . For the convenience of searching, we choose
as the intersection of the extension of vector R ! P 1 with scan S ref (see Fig. 4 for illustration).
Let ~n be the normal direction of the tangent line at P on S ref . If scan S ref is smooth and if P
is not too far away from P 2 , we have the approximate relationships:
(R
new
rotated S new
O
Figure
4: Illustration of point relationships.
The approximation errors of the above relationships are of the order O(x 2 ) where x is related
to jT j=jP 1 j (see Appendix B for derivation). Therefore, if jT j - jP 1 j and if the contour curve is
smooth, the approximation error is small. We can combine the above two relationships to form
a more accurate approximation whose error is of the order O(x 3 ) (see Appendix B):
(R
Eq. 7 is a linear equation about T in the form:
It is established based on the point P 1 and the rotation angle !. Notice that, given P 1 and !, we
can determine P without using T . The coefficients C x ; C y ; D can be computed from ! and the
parameters of the tangent lines.
Now if we instantiate Eq. 7 for n p points on S new , we can define an error function:
This error indicates the "distance" between the two scans as a function of ! and T . For a given !,
we can solve for T which minimizes the above distance, in terms of !. Moreover, the least-squares
error min T E(!; T ) can be considered as a matching distance function which is primarily defined
by the rotation !. Our final solution is based on searching the function for an optimal ! such
that the least-squares error is minimum.
3.5 Correspondence Search
Considering the fact that S ref is a discrete set of points, we can obtain the approximate correspondence
point P for P 1 by interpolation. Let the polar angle of P 1 be ', then the point P
is at direction ' !. Note that the points in S ref are ordered by their polar angles. We can
locate two consecutive points on S ref whose angles enclose ' !. Then we linearly interpolate
for both the range and the normal direction of P across the two points. This correspondence
search is very efficient. We can implement the search for all correspondence pairs in linear time
with respect to the number of points in the two scans.
Correspondence points which differ greatly in their normal directions or positions are considered
as outliers and they are not included in the least-squares solution. Typical causes of outliers are
occlusion or poor tangent estimation. We empirically choose thresholds ff and H d . A correspondence
pair is accepted only if both of the following conditions are met:
(R
Otherwise, we consider the pair as outlier and discard it. We also exclude the points if they are
near a corner or a depth discontinuity (as detected by the line fitting procedure).
3.6 Optimization
We define a total matching distance for a given rotation ! based on the least-squares error (Eq.
and the number of outliers. Let n p be the number of matching pairs of points and n o be the
number of outliers, the total matching distance is defined as:
(min
d
d
is the constant cost of an outlier (note that H d is the threshold that detects outliers).
The effect of the thresholding and adding fixed cost for outliers to the least-squares error is
approximately equivalent to using a truncated quadratic robust estimator to define the distance
measure. The advantage of using a robust estimator is that a small number of arbitrarily bad
outliers do not lead to an arbitrarily bad estimation [11,2].
The matching distance in Eq. 11 is a function of !. Implicitly, it is also a function of the translation
T (because the least-squares solution T may be difference from the true translation). But the
variable ! is dominant. We expect that the distance function should have a global minimum at
the true rotation angle and that the function is unimodal near the minimum. From the plot of a
typical E match (!) (Figure 5), we can see that the distance function has a single prominent valley.
Furthermore, if there is little translation, it has a well-defined lowest point.
An optimization procedure needs to be applied to minimize a distance function. Because the
distance function is generally not a smooth one, gradient based search methods are not applicable.
distance
measure
rotation angle (degree)
Matching Distance Functions
Figure
5: Matching distance measure as a function of rotation angle, in an example. The solid
curve is the distance function when translation is zero. The dashed curve is the distance function
when translation is (0.2, 0.1) meters (comparing with dimension of the environment of 10 meters).
One possible way of searching for a minimum is to sample the search space. Stochastic methods
(such as simulated annealing) may also be applied to minimize the non-smooth distance function
(such as [3]). These methods are usually computationally expensive.
We use the search by golden section method [14] to find the minimum along the rotation dimension
in the distance function. We choose this method because of its efficiency in terms of required
function evaluations. The search by the golden section method is stated as follows. Assume
that the global minimum is enclosed in an interval [! The first trial point is set at x
every step, a new point is chosen at x depending
on whether the function has a lower value at x 1 or x 2 , the better point becomes the new x 1 and
the worse one replaces ! 1 or ! 2 to form a new interval which still encloses the minimum. After
sufficient iterations, the final interval will be narrow enough to localize the minimum point.
Due to the residue in the translation, the optimal rotation found by the one-dimensional search
may be biased. To address this problem and reduce the bias, we correct the translation by the
least-squares solution every time we evaluate the distance function. As the search narrows down
the rotation, the translation residue is also getting smaller and so is the bias.
From the plot, we can see that the valley of the curve is within an interval of about 0.5 radians
degrees) in width. Beyond this interval, the curve is mostly flat. We require this initial
interval to start the search procedure. However, in case the initial rotation error is very large or
completely unknown, we can determine an initial interval by coarsely sampling the function at
some rotation values. For example, we can sample the function at every 15 degrees (resulting in
a total of 24 samples) and choose two adjacent points which have the lowest function values to
form an interval. This effectively allows our method to handle arbitrarily large rotations.
The amount of translational error handled by our method depends on the threshold H d . Usually
the algorithm is good enough to handle the residuals of the odometry estimates.
4 Point Correspondence Based Matching
4.1 General Approach
We now present another method to align two range scans. It is an iterative algorithm and is based
on associating point to point correspondence. The idea of the method is the following. For each
point P i on S new , we use a simple rule (independent of the actual rotation and translation) to
determine a corresponding point P 0
on S ref . Then from all the correspondence pairs of points, we
compute a least-squares solution of the relative rotation and translation. This solution is applied
to reduce the pose error between the two scans. We repeat this process until it converges.
The least-squares solution is derived by minimizing the following distance function which is defined
on n pairs of correspondence points:
dist (!; T
Closed-form solutions for ! and T can be derived (see Appendix C).
The central issue of the algorithm is then to define a sensible rule to determine correspondences
without knowing the actual rotation and translation.
4.2 Rules for Correspondence
We describe the correspondence rules in the following sections. For convenience, we will regard
the reference scan S ref as a continuous curve and refer to it as the model. We will consider the
correspondence search on a discrete scan later.
a b
Figure
Use rules to determine correspondences (which are joined by line segments in the figure).
(a) Use the closest-point rule; (b) use the matching-range-point rule. The model is the ellipse.
The data points are labeled by small circles. The big circle in the center is the origin.
4.2.1 Closest-Point Rule
A commonly used rule is to choose the closest point on the model as the correspondence for a
data point. We refer to this rule as the closest-point rule. Fig. 6(a) shows an example of finding
the correspondences for a set of points in an elliptic model, using the closest-point rule. Besl and
McKay described a general-purpose iterative closest point (ICP) algorithm for shape registration
based on this rule and they proved that the ICP algorithm always converges monotonically
to a local minimum with respect to the least-squares distance function [1]. We observe from
experiments that, if the rotation is small, the ICP algorithm is good at solving the translation.
One disadvantage of the ICP algorithm is that it converges very slowly. Especially, when the
model is curved, the correspondences found by the closest-point rule may contain little information
about the rotation. As seen from Fig. 6(a), the vectors joining the correspondence pairs have
very inconsistent directions and they tend to cancel out each other when used together to solve
for the rotation. Moreover, regardless of the type of the model, the convergence speed of the
algorithm is always very slow when the distance function approachs a local minimum.
To accelerate the ICP algorithm, Besl and McKay used a line search method to heuristically
determine the transformation variables based on their values in two or three recent iterations.
Although this improves the convergence speed near a local minimum, the problem of obtaining a
poor solution for the rotation component still exists. Therefore, the improvement in convergence
speed is limited. Moreover, in order to apply the line search method, an implicit assumption
is made about the smoothness of the least-square distance function. But this is typically not
true if the number of correspondence pairs changes during the iterations (as a result of rejecting
outliers).
O
model
Figure
7: Matching-range-point rule: For a point P , the corresponding point P 0 on the scan lies
within the sector and jOP 0 j is closest to jOP j.
4.2.2 Matching-Range-Point Rule
We propose a different rule which finds the correspondences in such a way that they significantly
reveal the rotation component.
Consider a data point P and its corresponding point . If we ignore the translation,
we have jP j. On the other hand, the polar angle ' of P and the polar angle -
' of P 0 are
related by -
This implies that the correspondence of P under a rotation is a point
which has the same polar range as that of P , and the polar angles of the corresponding points
differ by the rotation angle !. Now in the presence of a small translation, we can still expect
that the point P 0 with the same range as that of P is possibly a good approximation to the true
correspondence of P , and this approximate correspondence provides rich information about the
rotation angle !.
To ensure that the rule finds a unique and reliable correspondence, we only search for the
matching-range point within a local region of the model near P . Suppose that we can estimate
a bound B ! for the rotation !, i.e. j!j means
that P 0 should lie within the sector bounded by ' . Therefore, we propose the matching-
range-point rule as the following: For a data point P , its corresponding point is P 0 on the model
is closest to jP j. The rule is illustrated in Fig. 7.
Fig. 6(b) shows an example of using the matching-range-point rule to find correspondences in
the elliptic model. We can clearly see that the vectors joining the correspondence pairs consistently
indicate the rotation direction. Therefore, the least-squares solution should be a good
approximation to the true transformation, especially in the rotation component.
Based on this new rule, we design an iterative matching-range-point (IMRP) algorithm. In
this algorithm, the parameter B ! controls the size of the neighborhood to be searched for a
correspondence and also the maximum rotation possibly solved in one iteration. Thus it will be
best to choose B ! to be close to the rotation residual at every iteration. We empirically generate
using an exponentially decreasing function of the (0)e \Gammafft . It is also possible
to use the least-squares solution of ! in the current iteration to determine the value of B ! for
the next iteration.
A comparison of the performance of the ICP algorithm and the IMRP algorithm is illustrated in
Fig. 8. We notice that the IMRP algorithm converges faster than the ICP algorithm in estimating
the rotation. For the translation part, the IMRP algorithm is initially slower but it eventually
converges faster than the ICP algorithm.
The reason that the translation residuals from the IMRP algorithm are initially reduced slowly is
that the matching-range-point rule only tends to influence the translation component when the
sector becomes small enough. In the early iteration when B ! is large, the algorithm
tends to explain the displacement between the correspondence pairs by rotation rather than
translation. This phenomenon may present a potential problem to the stability of the algorithm
if we need to dynamically reject outliers using a threshold, as good correspondences may be falsely
rejected as outliers due to the incorrect translation. We will study more about outlier detection
later.
4.2.3 Combining the Two Rules
It is desirable to combine the two rules in order to achieve both the convergence speed of the
matching-range-point rule and the stability of the closest-point rule. We propose an iterative dual
correspondence (IDC) algorithm which uses both rules, as the following:
1. In each iteration do the following steps:
2. For each data point
(a) apply the closest-point rule to determine a correspondence point P 0
for
(b) apply the matching-range-point rule to determine a correspondence point P 00
for
3. Compute the least-squares solution (! from the set of correspondence pairs
(which are obtained using the closest-point rule).
4. Compute the least-squares solution (! from the set of correspondence pairs
(which are obtained using the matching-range point rule).
5. Form (! as the solution for the transformation in the current iteration.
The basic idea of the above algorithm is to take the translation component from the closest-point
rule solution and the rotation component from the matching-range-point rule solution to form
the current solution for the transformation.
The combination of the two rules appears to achieve significantly better results than each of the
individual rules. It does not only ensure the stability of the iterations, but also increases the
convergence speed significantly. In fact, the two rules reinforce each other by reducing different
components of the transformation, so that each of them can be more effective in the following
iteration. We notice that the IDC algorithm is insensitive to the choices of parameter B ! .
Fig. 8 illustrates the residuals of the transformation components during the iterations of the three
algorithms. The model and the data points in this example are the ones given in Fig. 6, where
the initial rotation is \Gamma6 degrees; the initial translation is (-5, 5) units (the width of the elliptic
model is 1000 units). Clearly, the IDC algorithm reduces the residuals much more quickly than
the other two single-rule algorithms.
We experimentally estimate the rate of convergence for each of the three algorithms using the
above example. The iterative closest point algorithm appears to have a sublinear convergence
rate. The ratio of error residuals larger and larger and it approaches to 1.
In fact, after iterations, C is at 0.998. For both the iterative matching-range point algorithm
and the iterative dual correspondence algorithm, the rate of convergence seems to be linear. The
error ratio for the iterative matching-range point algorithm is 0:875; the error ratio for the
iterative dual correspondence algorithm is
4.3 Correspondence Search
We will use the IDC algorithm to register a new scan S new to the reference scan (model) S ref .
Considering that S ref is discrete, we need to interpolate in order to locate the correspondence
point for each of the two rules.
First, we consider the matching-range-point rule. Let P (r; ') be a point on S new . We want to
find another point according to the matching-range rule. Since the points in scan
S ref are parameterized in a polar coordinate system, we choose to linearly interpolate 1=r from '
between two points.
be two adjacent points, the interpolation function - r( -
is:
This interpolation scheme is approximately equivalent to connecting the two points with a line
degree
Iterations
Rotation Residuals
IMRP algorithm
IDC algorithm2610
cm
Iterations
Translation Residuals
IMRP algorithm
IDC algorithm
a b
Figure
8: Comparison of iterative algorithms. (a) Rotation residuals from the three algorithms
over iterations (note the curve for the IDC algorithm is barely visible as it is almost zero after
three iterations). The initial rotation angle is 6 degrees. (b) Magnitudes of translation residuals.
The magnitude of initial translation is 7.07 units. The model and data set are given in Figure 6.
segment if j' small. This can be seen by comparing Equation 13 with the equation of a
straight line passing through P 1 and
The interpolation in Equation 13 also has the advantage that the interpolated - r is a monotonic
function of -
'; it is easy to inversely compute -
' for a given -
r.
The region where we need to search for P 0 consists of pairs of points whose angular intervals
overlap with be one such interval. We find the intersection [ -
we use Eq. 13 to interpolate two points P 0
at the ends of the new interval. If -
one of P 0
1 and P 0(whose polar range is closer to r) is a candidate for P 0 . In this case, we still need to check other
intervals for a potentially better candidate. But if - r 1 - r - r 2 , or -
, we can (inversely)
interpolate for a P 0 which has the same range as P .
Now we consider the closest-point rule. For consistency with the matching-range rule, we slightly
modify the closest-point rule such that it chooses the closest point P 0 within the sector [' \Gamma
only as the correspondence of P . The interpolation here is simply connecting two
adjacent points with a line segment. In a similar way as in the search for a matching-range
correspondence, we search all the angular intervals and find a P 0 by checking the distance from
P to the line segments (or end-points).
The search required to determine all the correspondence pairs can be efficiently implemented in
linear time with respect to the number of points on the two scans, by considering the fact that
all the points in the scans are ordered by their angles.
Due to occlusion, we may not find appropriate correspondence points for some data points. We
need to identify these outliers and exclude them from the least-squares distance function. Assume
that we have a bound B r for the maximum displacement resulting from translation for a pair of
corresponding points P and P 0 , i.e. jjP . We use this condition to test for outliers.
For a pair of points found by one of the rules, we accept them as a correspondence pair only if
the above condition is met. The threshold B r can be selected as the kth largest distance among
all the correspondence pairs, according to a predetermined constant fraction (p-tile).
4.4 Convergence of Iterative Algorithm
The iterative algorithm terminates when the change in the least-squares errors in sufficiently
small. In practice, we find it sufficient to fix the number of iterations to about 15-20.
The iterative process in the algorithm resembles fixed-point iterations. Since the zero pose error
is a stable fixed-point for the process, we expect that once the iteration converges that the final
solution should be very accurate. To ensure convergence a good initial estimate (small initial pose
error) is required by the algorithm. Usually, we can use odometry to provide this initial estimate.
Another possibility is to first apply the rotation search/least-squares method which we presented
in Section 3 to obtain a relatively good registration before applying the point-based method. We
find from experiments that this strategy usually guarantees the convergence of the point-based
method and the point-based method also usually improves the accuracy of the solution.
5 Scan Matching Experiments
5.1 Combining The Two Algorithms
We have presented two algorithms, the rotation search/least-squares algorithm and the iterative
point correspondence algorithm, for matching range scans. The rotation search/least-squares uses
a search procedure in the optimization process. This allows the algorithm to robustly solve for the
transformation even in the presence of a large initial pose error. However, because the matching
distance function is not smooth and we only use a simple one-dimensional search procedure to do
the minimization, the solution given by this algorithm may not be highly accurate. On the other
hand, the iterative point correspondence based algorithm gives a more accurate solution through
its fix-point iterations, as long as it converges. This natually leads to a two-staged algorithm to
solve a general matching problem by sequentially combining the two algorithms. We apply this
algorithm in the following experiments.
5.2 Sensing Strategy
If we have control over the sensing directions (as is the case with the ARK sensor [25]), we can
choose to take a range scan in such a way that the sampling points are evenly distributed in space.
In other words, we want the distances between adjacent points to be approximately equal. This
is more efficient than a uniform sampling of orientation where the interval width is proportional
to the ranges of the points from the sensor.
Assume that the current sample point is P ('; r). We will decide the direction of the next shot,
\Delta', such that the new point is a fixed distance d away from P . If we approximate the contour
curve near P by its tangent line (which has parameter (ae; OE)), the increment in sensing direction
is:
where the angle ' \Gamma OE can be computed by the following:
dr
d'
Note that the derivative dr
d'
can be estimated from recent range measurements. Combine the
above two equations and take a first order approximation (for a small d), we get:
\Delta' - d
d'
To avoid infinitely small increments, we can predefine a minimum value for \Delta'. Now ' + \Delta' is
the direction to take the next measurement.
This sensing strategy is used to generate both simulated and real scan data in our experiments.
5.3 Experiments with Simulated Data
Range measurements are simulated for various environments in order to test the matching algo-
rithms. We model the environments with lines and spline curves. Sensing noises are modeled as
additive random variables. For a given environment model, we can simulate a range scan from
any robot pose.
We present a series of experiments using simulated range data. In each experiment, we choose
an environment model and two poses, P ref and P new , from which to take the scans S ref and S new .
The pose error is generated randomly where ! is uniformly distributed in [-0.25, 0.25] radians
uniformly distributed in a disk of radius 50 centimeters (comparing with the
dimension of the environment of 10 meters). Sensing noise is assumed to be uniformly distributed.
We vary the maximum sensing noise in each experiment.
In each experiment setting, the matching process was run 1000 times (with randomly generated
initial pose error and sensing noise as described above). We computed the standard deviations
(from the theoretical zero means) of the residuals of the variables (!, T x , and T y ) resulting from
each matching process. The standard deviations of the residuals after the first stage (rotation
search algorithm) and after the second stage (iterative point correspondence algorithm) were
recorded. In the matching process, the number of iterations was fixed at 15 in each of the two
stages.
The results from six experiments are listed in Table 1. In each experiment, we list the environment
model, the maximum sensing noise, and the standard deviations of the residuals. We also plot
all the translation residuals from each of the six sets of experiments (Fig. 9). Each translation
residual is shown as a dot in the x-y plane. The dots form a cluster around the origin.
We have some observations from the statistical results. (1) The pose error residuals are very small
compared with the sensing noise. The standard deviation of translation residuals is about 15% to
25% of the standard deviation of sensing noise. The rotation residuals are well within one degree.
With a typical sensor accuracy of 5cm, the rotation residuals are within one tenth of a degree.
(2) The algorithm behaved robustly over thousands of runs. (3) The second algorithm (iterative
point correspondence algorithm) gave significantly more accurate estimates of rotation than the
first algorithm. But the two methods are equally good in finding the translations (the second
algorithm is slightly better when the sensing noise is relatively small or when the environment
is mostly linear (experiments 1, 2, 3). (4) The residuals appear to be normally distributed with
approximately zero means. (5) When the sensing noise becomes large (experiments 5 and 6), the
algorithm degrades gracefully. In experiment 6 (where the sensing noise is set to 20cm), it appears
that the limit of the algorithm is reached. We experienced a few failure cases where the iterative
algorithm did not converge. There were about 10 such cases among the 1000 runs. The failure
is partly caused by the step of rejecting outliers using thresholds. Raising the threshold level
may improve convergence. But it may result in bias in the estimation because of outliers. High
sensing noise also leads to bad estimation of local contour directions. Thus the correspondence
association step (which involves interpolation) is subject to large error.
We plot three typical matching examples from the above experiments. In each example, we show
the two scans which are misplaced with respect to each other. Then the same two scans after
alignment are shown. In the figures, the reference scan is plotted with x's. The big X at the
center is the actual pose P ref of the reference scan. The new scan to be registered is plotted with
circles. The big circles with arrows are the poses of the new scan before and after registration
(that is,
new and P new ).
Example 1 (Fig. 10) is a typical case from experiment 3. Here the rotation is 0:25 radians (14:3
2.1811 cm
2.1961 cm
2.5478 cm
2.2832 cm
1.1438 cm
1.1269 cm
1.2604 cm
1.2268 cm
After Stage 2
After Stage 1
noise:
noise:
noise:
noise:
noise:
noise:
oe x
oe y
oe x
oe x
oe y
oe x
oe y
oe x
oe y
oe x
oe y
oe y
1.5336 cm 0.8532 cm
0.7836 cm 0.8446 cm
Residual Standard Deviations
Simulated Environments and
Maximum Sensing Noise
Table
1: Statistics of experiments in simulated environments. Maximum initial rotation and
translation are set at \Sigma14:3 ffi and 50cm, respectively.
cm
cm
Translation Residuals in Experiment #1
cm
cm
Translation Residuals in Experiment #2
a b
cm
cm
Translation Residuals in Experiment #3
cm
cm
Translation Residuals in Experiment #4
c d
cm
cm
Translation Residuals in Experiment #5
cm
cm
Translation Residuals in Experiment #6
Figure
9: Translation residuals after apply the matching algorithm. (a) to (f) correspond to
experiments 1 to 6 in table 1. There are 1000 samples in each experiment. Larger spread of dots
in the plot corresponds to higher levels of sensing noise.
Figure
10: Example 1 (from experiment 3, maximum sensing noise is 10cm). The robot went
from pose A to pose B in reality, but due to odometry errors, it thinks it went to pose B 0 . Points
on scans from pose A and B are labeled as x's and small circles respectively. The poses are
indicated by arrows. Part (a) shows the alignment error due to the difference between pose B 0
and true pose B. Part (b) shows the result of aligning the two scans. The pose B 0 is corrected to
the true pose B by the same transformation. Notice the large occlusion in the lower right corner.
Figure
(from experiment 4, maximum sensing noise is 10cm). Part (a) shows the
pose error (indicated by the difference from B 0 to B) and the resulted alignment error of the
scans. Part (b) shows the result of correcting the pose error and aligning the two scans. The
large rotation and translation are corrected successfully. There is occlusion in the scan.
A
A
a
Figure
12: Example 3 (from experiment 6, maximum sensing noise is 20cm). Part (a) shows the
pose error (indicated by the difference from B 0 to B) and the resulted alignment error of the
scans. Part (b) shows the result of correcting the pose error and aligning the two scans. This
level of sensing noise is about the limit of algorithm capacity.
and the translation is (\Gamma30; \Gamma20) centimeters. Notice that there is a substantial portion of the
world (about one third) which is visible only in one scan but not in the other. Our algorithm is
able to ignore the unmatched parts but successfully perform the matching based on the remaining
part of the world which is visible in both scans.
Example 2 (Fig. 11) is from experiment 4, in which the environment consists of mostly curves
(rotation 0:5 radians (28:6 ffi ), translation (\Gamma60; 40) centimeters). There also exist occlusions in
the scans. Our matching method is successful.
Example 3 (Fig. 12) is chosen from experiment 6, in which the maximum sensing noise is as
large as \Sigma20 centimeters. Rotation is \Gamma0:2 radians (\Gamma11:5 degrees) and translation is (\Gamma40; 30)
centimeters. The correct alignment is found by the algorithm in this example. Note this level of
sensing noise is close to the limit of algorithm capacity.
In the above experiments, the second algorithm (point correspondence based method) is not fairly
tested as its input (from the output of the first algorithm) is too good. Here we present another
experiment which examines the iterative point correspondence algorithm without first applying
the rotation search method. We use the same environment as the one in experiment 2, but set
the maximum sensing noise to \Sigma10cm. The initial pose error is randomly generated so that ! is
uniformly distributed over [-0.1, 0.1] radians and T is uniformly distributed in a disk of radius
centimeters. We ran this experiment 1000 times. The standard deviations of the residuals
are listed in Table 2. For comparison, we also run the rotation search algorithm using the same
input set. We can see that the second algorithm is still successful despite of the relatively larger
initial pose errors. Again, the second algorithm performs significantly better than the first one
in finding the rotation, but only slightly better in finding the translation.
Residual First Algorithm Second Algorithm
Rotation
Translation x oe x 0.7652 cm 0.7827 cm
Translation y oe y 0.7998 cm 0.6514 cm
Table
2: Standard deviations of the residuals from the two algorithms when they are run independently
with the same set of input. Maximum sensing noise is \Sigma10cm. Maximum initial rotation
and translation are \Sigma5:7 ffi and 20cm, respectively.
5.4 Experiments with Real Data
In this section, we present the experimental results using real range sensor data in two different
environments. In the first experiment, we used the ARK robot [25] to collect range scans in the
Vision Lab at the Department of Computer Science, University of Toronto. The ARK robot is
equipped with a laser rangefinder (model Optech G150) mounted on a pan and tilt unit on the
robot platform. The accuracy of the rangefinder is 4 centimeters.
We present two examples of matching scans from this environment (Figures 13 and 14). Relatively
large pose errors between the two scans were intentionally introduced. Unfortunately, the ground
truth for this experiment is not available as the robot was driven by hand. Our matching algorithm
successfully aligned the scans in both examples. Notice that in performing the matching the
algorithm is able to ignore the cluttered areas at the right-side wall and the bottom left corner
(which are bookshelves). The algorithm also handled the occluded area well.
Another testing environment is the cafeteria and nearby corridor in FAW, Ulm, Germany. The
laser rangefinder used was a Ladar 2D IBEO Lasertechnik mounted on the AMOS robot. The
laser sensor has a maximum viewing angle of 220 degrees, and an accuracy of \Sigma20mm. We
obtained scans which were taken by the robot along its path at a pace of approximately 2
meters between scan poses. We then selected 84 pairs of scans which have sufficient overlap and
applied the scan matching algorithm to each pair. Our matching algorithm successfully aligned
the scans in all 84 cases. All of these scan matching results were used by a global scan registration
algorithm which is discussed in [22,21].
Two examples of the matching results are shown in Figures 15 and 16. In both examples, we
exaggerated the pose errors for testing the algorithm. The odometry error from the actual robot
is much smaller. Note that this robot samples orientation uniformly when taking the scans, as
opposed to our early strategy of making the sample points uniformly dense. But the matching
algorithm still works well with this kind of scan.
We also include another example using real range data from a hallway (Figure 17). Notice that the
constraints along the hallway direction is weak (the only reference are several shallow doorways).
Our algorithm is able to derive the correct matching.
It appears that the real sensor data are more accurate than our typical simulated data. After
thoroughly testing our algorithm with simulations, we believe that it should also work well in
real indoor environments of this type. Moreover, in a typical indoor robot course where range
measurements are taken at short discrete steps, the pose errors are usually much smaller than the
ones we simulated. As a conclusion from the experiments, we believe that our algorithm should
work robustly in real-life robotic applications.
6 Conclusion
We have developed two methods for matching two range scans and correcting the relative pose
error. The two methods can either be used individually or applied in sequence. Our matching
methods have the following desirable properties:
Figure
13: Example of matching scans taken by the ARK robot at U of T.
Figure
14: Another example of matching scans taken by the ARK robot.
Figure
15: Example of matching real scans at FAW, Ulm, Germany. The scans are shown in
dots. Part (a) shows the pose error (indicated by the difference from B 0 to B) and the resulted
alignment error of the scans. Part (b) shows the result of correcting the pose error and aligning
the two scans.
Figure
Another example of matching real scans at FAW, Ulm, Germany.
Figure
17: Example using real data from a hallway. Notice that the constraints are weak along
the hallway direction. Alignment still can be made using our algorithm.
1. Both methods can handle sensor noise and partial occlusion. By checking against thresholds,
the methods can effectively reject possible outliers. The methods are not very sensitive to
the choice of threshold values.
2. The methods do not rely on distinguishable features in the environment. Thus we avoid
the difficult process of feature detection and feature correspondence. The availability of the
number of features should not concern us either. In fact, we use most of the sensor data in
the matching process. This suggests that our algorithms are robust.
3. We do not require an a priori world model. We can match a scan directly to another
scan. Therefore our method can be used for exploration and map building in unknown
environments.
4. Our method can work in a general curved environment. We do not require the world
contours to be linear, as many other methods do.
5. The algorithm is fast (linear time in the number of sensor data points per iteration, for a
small fixed number of iterations). There is no exponential searching needed in finding the
primitive correspondence.
6. Our algorithm has the ability to correct arbitrarily large errors in rotation.
7. Our algorithms are demonstrated to be superior over similar existing methods in robustness
and efficiency.
We have tested our algorithm thoroughly with simulated data under various adverse conditions.
We also tested the algorithm with real data from two different environments using different
sensors.
Acknowledgements
Funding for this work was provided by NSERC Canada and by the ARK project which receives its
funding from PRECARN Associates Inc., the Department of Industry, Science and Technology,
NRC Canada, the Ontario Technology Fund, Ontario Hydro, and AECL. The authors would like
to thank Steffen Gutmann, Joerg Illmann, Thomas Kaempke, Manfred Knick, Erwin Prassler,
and Christian Schlegel from FAW, Ulm for collecting range scans and making the data available
for our experiments.
--R
A method for registration of 3-D shapes
Robust Incremental Optical Flow.
Registering multiple range data to create 3d computer objects.
Object modelling by registration of multiple range images.
Blanche: Position estimation for an autonomous robot vehicle.
Blanche: An experiment in guidance and navigation of an autonomous robot vehicle.
On the congruence of noisy images to line segments models.
World modeling and position estimation for a mobile robot using ultrasonic ranging.
Object Recognition by Com- puter: The Role of Geometric Constraints
Robust Statistics: The Approach Based on Influence Functions.
Building 3-D models from unregistered range images
Autonomous Mobile Robots
Numerical Methods and Software.
Fast vision-guided mobile robot navigation using model-based reasoning and prediction of uncertainties
A robot exploration and mapping strategy based on a semantic hierarchy of spatial representations.
Robot Motion Planning.
Dynamic map building for an autonomous mobile robot.
Qualitative navigation for mobile robots.
Shape Registration Using Optimization for Mobile Robot Navigation.
Optimal global pose estimation for consistent sensor data registration.
A comparative study of the path length performance of maze-searching and robot motion algorithms
positioning using model-based maps
Design of ARK
--TR
--CTR
Annalisa Milella , Carmine Dimiccoli , Grazia Cicirelli , Arcangelo Distante, Laser-based people-following for human-augmented mapping of indoor environments, Proceedings of the 25th conference on Proceedings of the 25th IASTED International Multi-Conference: artificial intelligence and applications, p.151-155, February 12-14, 2007, Innsbruck, Austria
Thomas Kmpke, Convex Translation Estimation, Journal of Intelligent and Robotic Systems, v.21 n.3, p.287-300, March 1998
Tom Duckett , Stephen Marsland , Jonathan Shapiro, Fast, On-Line Learning of Globally Consistent Maps, Autonomous Robots, v.12 n.3, p.287-300, May 2002
Amalia Foka , Panos Trahanias, Real-time hierarchical POMDPs for autonomous robot navigation, Robotics and Autonomous Systems, v.55 n.7, p.561-571, July, 2007
F. Lu , E. Milios, Globally Consistent Range Scan Alignment for Environment Mapping, Autonomous Robots, v.4 n.4, p.333-349, October 1997
Juan Nieto , Tim Bailey , Eduardo Nebot, Recursive scan-matching SLAM, Robotics and Autonomous Systems, v.55 n.1, p.39-49, January, 2007
Thomas Kmpke , Matthias Strobel, Polygonal Model Fitting, Journal of Intelligent and Robotic Systems, v.30 n.3, p.279-310, March 2001
Stergios I. Roumeliotis , Ioannis M. Rekleitis, Propagation of Uncertainty in Cooperative Multirobot Localization: Analysis and Experimental Results, Autonomous Robots, v.17 n.1, p.41-54, July 2004
O. Horn , A. Courcelle, Interpretation of Ultrasonic Readings for Autonomous Robot Localization, Journal of Intelligent and Robotic Systems, v.39 n.3, p.265-285, March 2004
Wolfgang Hbner , Hanspeter A. Mallot, Metric embedding of view-graphs, Autonomous Robots, v.23 n.3, p.183-196, October 2007
Christian Frh , Avideh Zakhor, An Automated Method for Large-Scale, Ground-Based City Model Acquisition, International Journal of Computer Vision, v.60 n.1, p.5-24, October 2004
John Mullane , Ebi Jose , Martin D. Adams , Wijerupage Sardha Wijesoma, Including probabilistic target detection attributes into map representations, Robotics and Autonomous Systems, v.55 n.1, p.72-85, January, 2007
Kin Leong Ho , Paul Newman, Detecting Loop Closure with Scene Sequences, International Journal of Computer Vision, v.74 n.3, p.261-286, September 2007
Urbano Nunes , Jos Alberto Fonseca , Lus Almeida , Rui Arajo , Rodrigo Maia, Using distributed systems in real-time control of autonomous vehicles, Robotica, v.21 n.3, p.271-281, June
Ioannis Rekleitis , Gregory Dudek , Evangelos Milios, Multi-robot collaboration for robust exploration, Annals of Mathematics and Artificial Intelligence, v.31 n.1-4, p.7-40, 2001
Frank Dellaert , Michael Kaess, Square Root SAM: Simultaneous Localization and Mapping via Square Root Information Smoothing, International Journal of Robotics Research, v.25 n.12, p.1181-1203, December 2006 | rotation search;robot pose estimation;reference scan;aligning scans |
595863 | Temporalizing Epistemic Default Logic. | We present an epistemic default logic, based on the metaphore of a meta-level architecture. Upward reflection is formalized by a nonmonotonic entailment relation, based on the objective facts that are either known or unknown at the object level. Then, the meta (monotonic) reasoning process generates a number of default-beliefs of object-level formulas. We extend this framework by proposing a mechanism to reflect these defaults down. Such a reflection is seen as essentially having a temporal flavour: defaults derived at the meta-level are projected as facts in a next object level state. In this way, we obtain temporal models for default reasoning in meta-level formalisms which can be conceived as labeled branching trees. Thus, descending the tree corresponds to shifts in time that model downward reflection, whereas the branching of the tree corresponds to ways of combining possible defaults. All together, this yields an operational or procedural semantics of reasoning by default, which admits one to reason about it by means of branching-time temporal logic. Finally, we define sceptical and credulous entailment relations based on these temporal models and we characterize Reiter extensions in our semantics. | Introduction
In [MH93a,b] a nonmonotonic logic was introduced, called Epistemic Default Logic (EDL). It
is based on the metaphor of a meta-level architecture. It already has been established in
how upward reflection can be formalized by a nonmonotonic entailment based on
states, and the meta-level process by a (monotonic) epistemic logic. The meta-level
reasoning can be viewed as the part of the reasoning pattern where it is determined what the
possibilities are for default assumptions to be made, based on which information is available
and (especially) which is not. The outcome at the meta-level concerns conclusions of the form
Pj, where j is an object-level formula. In EDL, default conclusions are kept separate from the
object level knowledge (they remain at the meta-level), by means of this explicit default
operator (just like in NML3, see [Doh91]). If one wants to draw further conclusions from
them using object level knowledge this should be done at the meta-level. Compared to a meta-level
architecture, what was still missing was the step where the default assumptions are
actually made, i.e., where such formulas j are added to the object level knowledge, in order to
be able to reason further with them at the object level. Here we actually "jump (down) to
conclusions". This is what should be achieved by the downward reflection step. In the current
paper we will introduce a formalization of the downward reflection step in the reasoning pattern
as well. Thus a formalization is obtained of the reasoning pattern as a whole consisting of a
process of generating possible default assumptions and actually assuming them (a similar
pattern as generated by the so-called BMS-architecture introduced in [TT91]).
The formalization of downward reflection is inspired by [Tre94, HMT94], where it is pointed
out how temporal models can provide an adequate semantics for meta-level architectures in
general, and [ET93, ET94] where these ideas have been worked out to obtain a linear time
temporal semantics for default logic. The general idea is that conclusions derived at the meta-
This work is partially supported by ESPRIT III Basic Research Action No. 6156 (DRUMS II).
a Utrecht University, Dept. of Computer Science, P.O. Box 80.089, 3508 Utrecht. Email: wiebe@cs.ruu.nl.
Also partially supported by the Free University of Amsterdam.
b Like footnote a, but also partially supported by the University of Nijmegen. Email: jj@cs.ruu.nl.
c Free University of Amsterdam, Dept. of Mathematics and Computer Science, De Boelelaan 1081a, 1081 HV
Amsterdam, The Netherlands. Email: treur@cs.vu.nl.
level essentially are statements about the state of the object level reasoning at the next moment
of time. So we can define downward reflection as a shift of time in a (reasoning) process that is
described by temporal logic.
In this paper in the Sections 2 to 6 the logic EDL is presented. As compared with earlier
publications ([MH91a, MH92a, MH93a,b]), the logic is slightly extended in order to cater for
downward reflection in subsequent sections. In Section 7 we define a labeled branching time
temporalization of this logic, in spirit of the approach of [FG92]. In Section 8 we define
sceptical and credulous entailment relations based on temporal models.
2. Epistemic logic
To start with, our language consists of objective formulas together with epistemic formulas.
2.1. DEFINITION (objective and epistemic formulas). Let P be a set of propositional constants
I is either a finite or countably infinite set. The set OBJ of
objective formulas is the smallest set containing P and closed under the classical propositional
connecitves. The formula - is shorthand for (p k . -p k ), for an arbitrary p k - P . The set
FORM of epistemic formulas j, y,. is the smallest set containing OBJ, closed under the
operator K , where Kj means that j is known. Moreover, we use Mj as an
abbreviation for -K-j, meaning that j is epistemically possible. For G - FORM, we denote
by Prop(G) the set of objective formulas in G.
Objective formulas are interpreted on ordinary valuations:
2.2. DEFINITION (propositional models, classical consequence). A valuation is a function s
from P to {t, f}. The set of all valuations is denoted Mod(PC). By determining s' behaviour
under the Boolean connectives, such a valuation is straightforwardly extended to a truth
function on arbitrary objective formulas a (cf. Definition 2.5): we then say that s is a
(propositional model) for a. For any set of valuations M and objective formula a, we write M
. a if any s - M is a model for a.
To interpret the whole set FORM of epistemic formulas, we need richer structures:
2.3. DEFINITION (simple S5-Kripke models). A (simple) S5-model M is a non-empty subset of
Mod(PC). The elements of M are called worlds. We denote the class of simple S5-models by
Mod(S5). Note that for any M # Mod(PC) we may interpret arbitrary objective formulas, but
in order to interpret epistemic formulas (cf. Definition 2.5) we have to conceive M as an S5-
model M.
The more general definition of an S5-model requires M to be of the format
where, for each w - W, p(w) is a valuation (thus, different elements of W may verify the same
objective formulas) and R is an equivalence relation (needed to interpret the operator K), but for
our purposes we will assume S5-models to be simple in the sense as we defined above. One
can show that our assumption does not change the validities of the logic (cf. Definition 2.6
below), but it facilitates a number of technical issues such as the definition of submodels and
union of models. However, some caution is in order here: although the restriction to simple S5-
models does not affect the notion of validity, some of the propositions on S5-models below do
depend on the simplicity of the models, and do not hold for general S5-models.
The set of worlds in an S5-model represents a collection of alternative worlds that are considered
(equally) possible on the basis of (lack of) knowledge. In the next section we shall use S5-
models as representations of the reasoner's objective knowledge and epistemic meta-knowledge
(i.e., what he knows that he knows or does not know).
2.4. REMARK (submodels and union of S5-models). Note that under our notion of S5-models,
which are just sets of valuations, one easily defines a subset relation on S5-models, and an
operation of union upon them.
2.5. DEFINITION (interpretation of epistemic formulas). Given the S5-model M # Mod(PC),
we define the relation (M, s) . j , with s -M by induction on the structure of the epistemic
(M, s) . p -
(M, s) . y
(M, s) . -y - (M, s) - y
(M, s) . Ky - (M, s') . y for all s' - M
(M, s) . My - (M, s') . y for some s' - M.
Note, that the definition of the K-operator states that j is known precisely when j holds in the
whole set of epistemic alternatives; that for the M-operator states that j is considered
epistemically possible iff there is at least one epistemic alternative that satisfies j. In the sequel,
when we write M # Mod(PC) we want to interpret it as a collection of propositional formulas,
whereas, if we write M for the same collection, we intend that M -Mod(S5), on which the
formula Kj has an interpretation. We then say that M is based on M.
2.6. DEFINITION (validity and satisfiability).
(i) j is valid in an S5-model M - Mod(S5), denoted M . j, if for all m - M: (M, m) . j.
(ii) j is valid, notation Mod(S5) . j, if M . j for all S5-models M.
(iii) j is satisfiable if there is an S5-model M and a world m - M such that (M, m) . j.
w.r.t. S5-models can be axiomatized by the system S5:
2.7. DEFINITION (system S5). The logic S5 consists of the following:
Axioms:
propositional tautologies
Knowledge is closed under logical consequence.
Known facts are true.
One knows that one knows something.
One knows that one does not know something.
Derivation rules:
(R1) y
Modus Ponens
(R2)
Kj
Necessitation
That j is a theorem derived by the system S5 is denoted by S5 - j.
2.8. THEOREM (Soundness and completeness of S5). S5 - j - Mod(S5) . j
2.9. DEFINITION. We say a formula y is in normal form if it is a disjunction of conjunctions of
the form d = a . Kb 1 . Kb 2 . Kb n . Mg 1 . Mg 2 . Mg k , where a, b i and g j (i - n,
- are all objective formulas.
The following holds for the logic S5;
2.10. THEOREM ([HC68]) In S5 every formula j is equivalent to a formula y in normal form.
In particular, this theorem implies that every epistemic formula can be represented equivalently
without nested epistemic modalities. In S5 one thus can do without nestings.
3. Epistemic states and stable sets
In this paper we simply define an epistemic state as an S5-model. The idea behind this was
already touched upon after Definition 2.3. The worlds in an S5-model represent the states of
the (real) world that the reasoner considers possible. Thus the S5-model as a whole delimits the
ways the real world is like as far as the reasoner is concerned. In other words, it determines
what he knows about the world and what he does not (what he has doubts about by
considering contradictory possibilities). Therefore, an S5-model represents truly the epistemic
state of the reasoner.
3.1. DEFINITION. An epistemic state is an S5-model M - Mod(S5). The set M of worlds in M
is the set of epistemic alternatives allowed by the epistemic state M. For such a model M, we
define K(M) as the set of facts known in M: . Kj}. We call K(M) the theory
of M or knowledge in M.
We mention here that the knowledge in M are exactly the validities in M:
3.2. LEMMA. For any S5-models M 1 and
3.3. REMARK. The converse relation of - on Kripke models (Cf. Definition 2.4), will play an
important role in the sequel. M 1 - M 2 means that the model M 2 , viewed as a representation of
the knowledge of a reasoner, involves a refinement of the knowledge associated with model
. This has to be understood as follows: in the model M 2 less (or the same) worlds are
considered possible by the reasoner as compared by the model M 1 . So, in the former case the
reasoner has less doubts about the true nature of the world. By Lemma 3.2 it turns out that this
means that with respect to model M 2 the reasoner has at least the objective knowledge
associated with model M 1 , and possibly more. So in a transition of M 1 to M 2 we may say that
objective knowledge is gained by the reasoner. Thus the relation '-' acts as an information
ordering on the set of S5-models. Finally we remark that Lemma 3.2 is a typical example of a
property that holds for simple S5-models only; with respect to general S5-models we would
only have the 'only if' part of the Lemma (cf. the discussion following Def. 2.3).
3.4. PROPOSITION (Moore [Moo85]).
(i) The theory of an epistemic state M is a so-called stable set, i.e., satisfies the
following properties:
(St 1) all instances of propositional tautologies are elements of
(St
(St 5) S is propositionally consistent.
(ii) Every stable set S of epistemic formulas determines an S5-Kripke model M S for which it
holds that is a finite set, then M S is the unique S5-Kripke
model with this property.
The (proof of) the following proposition, which determines stable sets in the realm of classical
propositional logic (cf. St 1 & 5), is also to be found in [Moo85].
3.5. PROPOSITION. A stable set is uniquely determined by the objective formulas it contains.
3.6. REMARK. Thus stable sets act as the epistemic contents of an epistemic state (viz. an S5-
model): a stable set describes exactly the formulas known by the reasoner when he is
is in epistemic state M. From Proposition 3.4(i) we see that this knowledge is closed under
classical propositional reasoning and under positive and negative introspection: if some formula
is known also the fact that this is known is in its turn known by the reasoner, and if some
formula is not known, the fact that it is not known is known itself. This reflects the (perhaps
rather strong notion of) rationality of the reasoner. On the other hand, 3.4(ii) says that a stable
set of epistemic formulas determines an S5-model, the epistemic state associated with
(knowing) this stable set. Proposition 3.5 states that a stable set, and thus the associated
state, is completely determined if one specifies exactly what objective knowledge is
present at the reasoner. The rest of the known set of formulas (the stable set) then follows.
4. Entailment based on epistemic states: upward reflection
On the basis of epistemic states, Halpern & Moses define an entailment relation |~ with which
one can infer what is known, and, more importantly, what is unknown in such epistemic states.
Recall that with every set of valuations M we can associate its epistemic state M in a
straightforward way (cf. Definition 2.5). Intuitively, M associates with M the epistemic state
given by considering (only) the set M of classical propositional models to be the possible states
of the world: this set, so to speak, gives a partial description of the real world. In general, more
than just one classical model is considered possible so that only those facts are known that are
true in all of them. We can exploit this idea further and define an entailment relation based on
the premise that we only know some objective formula j. To this end we need some additional
4.1. DEFINITION. Given some objective formula j, we define M j as the set of valuations
satisfying j}. The epistemic state that is associated with
M j is denoted by M j .
We have the following alternative characterizations of
4.2. PROPOSITION. M
Proposition 4.2 says that in order to get M j , we can also consider all S5-models of j and take
their union to obtain one 'big' S5-model. The result immediately follows from the fact that we
have simple S5-models, and from the fact that, for objective formulas j and arbitrary M -
Mod(S5), M . j - (since j is objective-adopting the view that M - Mod(PC)) M . j -
Now we are ready to define an entailment relation based on this "big" model. Keeping in mind
that '#' acts as an information order on models (Cf. 3.3), we define what are the consequences
of knowing only the objective formula j as those formulas that hold in the "big" model
4.3. DEFINITION (Nonmonotonic epistemic entailment). For
FORM:
Informally, this means that y is entailed by j, if y is contained in the theory (knowledge) of the
"largest S5-model" M j of j. Halpern & Moses showed in [HM84] that this "largest model"
need not always be a model of j itself if we allow j to contain epistemic operators. However,
in our case where we only use objective formulas j, M j is always the largest model for j. This
is obvious from our construction of M j , since M j . j and therefore M j . j (since j is
objective). Moreover, in this case the theory K(M j ) of this largest model is a stable set that
contains j and such that for all stable sets S containing j it holds that
(by Lemma 3.2 and Proposition 3.4), thus K(M j ) is the "propositionally least" stable set that
contains j. So |~ can also be viewed as a preferential entailment relation in the sense of Shoham
[Sho87, 88], where the preferred models of j are the largest ones, viz. M j , where the least
objective knowledge is available.
We denote the mapping j - K(M j ) by k: the stable set associated with
knowing only j. Alternatively viewed, k(j) is the |~-closure of j. Note that since
stable set, it is also propositionally closed.
We give a few examples to show how the entailment |~ works: Let p and q be two distinct
primitive propositions. Then:
Obviously, the entailment relation |~ is nonmonotonic, justifying the name we have given it.
(For instance, we have p |~ M-q, while not p - q |~ M-q; it even holds that p - q |~ -M-q . )
The nonmonotonic epistemic entailment |~ enables us to derive from an objective formula j,
characterizing the exact epistemic state of the reasoner (viz., technically, the epistemic state
exactly what is known and, even more importantly, what is unknown in this epistemic
state. This latter property renders the entailment relation context-sensitive and nonmonotonic,
so that the relation |~ goes beyond an entailment expressible in ordinary epistemic logic: with
respect to its premise the relation |~ involves a kind of epistemic closure.
Finally we state a property of that we shall need in the sequel:
4.4. PROPOSITION. The entailment relation |~ enjoys the property:
PROOF. Directly from Definition 4.3 and the fact that the stable set K(M j ) is closed under
conjunction (which in its turn follows from the fact that a stable set is closed under
propositional reasoning and contains the tautology y
5. The epistemic preference logic S5P
The "upward reflection" entailment relation |~ enables us to derive information about what is
known and what is not known. In this section we show how we can use this information to
perform default reasoning. To this end we extend our language with operators that indicate that
something is a default belief and thus has a different epistemic status than a certain fact. In this
way the proverbial "jump to conclusions" is not made directly in the logic, but a somewhat
more cautious approach is taken. The "jump" itself will be part of a next operation, the
"downward reflection", which will be discussed in the next section when we incorporate a
temporal element into our approach.
Let I be a finite set of indexes. The logic S5P of epistemic default logic is an extension of the
logic S5 by means of special modal operators P i denoting default belief (w.r.t.
situation or frame of mind i), for i - I, and also generalisations P t , for t - I.
Informally, read as "j is a default belief (within frame of reference i)". As we shall see
below, a frame of reference (or mind) refers to a preferred subset of the whole set S of
alternatives. This operator is very close to the PA (possible assumption) of [TT91]
and the D (default) operator of [Doh91]. The generalisation P t j is then read as a default belief
with respect to the (intersection of the) frames of reference occurring in t.
Formally, S5P-formulas are interpreted on Kripke-structures (called S5P-models) of the form
is a collection of worlds, M i # M (i - I) are sets
('frames') of preferred worlds, and R
mean that the set of worlds of M 1 is a subset of those of M 2 . Again we have identified worlds
s and their truth assignments. We let Mod(S5P) denote the collection of Kripke-structures of
the above form. Given an S5P-model M we call the S5-
model M based on M the S5-reduct of M'.
5.1. DEFINITION (interpretation of S5P-formulas). Given a model
we extend the truth definition on S5-models by the following clauses for the P i - and
(M, m) . P
(M, m) . P t j iff (M, m') . j for all m' with R t (m, m'), where R
Thus the former clause states that P i j is true if j is a default belief w.r.t. subframe M i ,
whereas the latter says that P t j is true if j is a default belief w.r.t. the intersection of the
subframes t. We will sometimes denote this intersection by M t . In the clause for P t ,
we assume that, for M. So in this special case we get that the P t
modality coincides with the knowledge operator K . Validity and satisfiability is defined
analogously as before.
It is possible to axiomatise (the theory of) Mod(S5P) as follows (cf. [MH91a, MH93a]): take
the S5 system for the modality K (and dual M) and use K45 for the P-modalities (both the P i
and the P t ), together with relating axioms, resulting in the system:
5.2. DEFINITION (system S5P). In the following, i ranges over I, and t over subsets of I .
Moreover, - is a variable over {K, P
propositional tautologies;
(R1) Modus Ponens
(R2) Necessitation for K: - j - Kj.
Axiom (B1) says that we are dealing with an extension of propositional logic; (B2) says that all
the operators K, P i , and P t are 'normal'; (B3 and B4) express that the relations R, R i and R t
are transitive and Euclidean, respectively; (B5) says that R is reflexive; (B6) and (B7) help us
to get rid of nested modalities: a nested modality is always referring to the frame corresponding
to the innermost one. (B8) provides us with a bridge between the modalities with indices from
I and those of P(I); it also shows that in fact we could do without the P i 's. (B9) says that if t #
t', then R t' # R t . Finally, (B10) is the syntactical counterpart of our definition that
We call the resulting system S5P. In the sequel we will write G - S5P j or j - Th S5P (G) to
indicate that j is an S5P-consequence of G. We mean this in the more liberal sense: it is
allowed to derive j from the assertions in G by means of the axioms and rules of the system
S5P , including the necessitation rule. (So, in effect we consider the assertions in G as
additional axioms: G - S5P j iff - S5P-G j.)
As for S5, one can again prove a normal form theorem for S5P implying that all formulas can
be represented equivalently as formulas without nestings.
5.3. THEOREM G - S5P j - (for all M - Mod(S5P): M . G - M .
PROOF. In the Appendix.
6. Epistemic Default Logic (EDL)
In the language of S5P we express defaults of the (using Reiter's notation, Cf.
are objective formulas. The
reading of such a formula is "if j is true and y is (considered) possible, then c is preferred
(within frame M i )". Usually we consider cases where y is syntactically equal to c (the so-called
normal defaults).
By combining the formal apparatus of S5P with Halpern & Moses' nonmonotonic epistemic
entailment we obtain a framework in which we can perform default reasoning. In this paper we
call this framework Epistemic Default Logic (EDL).
6.1. DEFINITION (default theory). A default theory Q is a pair (W, D), where W is a finite,
consistent set of objective (i.e. non-modal) formulas describing (necessary) facts about the
world, and D is a finite set of defaults of the form j - My- R i c, where j , y and c are again
objective formulas, and i - I. The sets W and D are to be considered as sets of axioms, and we
may apply necessitation to the formulas in them.
In principle, it would be possible to use the index i of the P-operator in a completely arbitrary
way, to be chosen by the knowledge engineer. However, in order to be able to treat the various
defaults in a default theory separately from each other, in the sequel we shall assume all P-
operators in a default theory to be distinct. This will allow for a generic way to look at the
possibilities of combining default beliefs by using the P t -operators. So, for example rather
than to look at a default theory with in which for both
defaults the same operator P 1 is used, we consider the set D
R 2 s}, in which both defaults are represented by means of different operators P 1 and P 2 , and
consider the combined operator P {1, 2} .
6.2. DEFINITION (default entailment). Let a default theory D) be given. Let W* be the
conjunction of the formulas in W. Note that W is a finite set, and moreover that W only
consists of objective formulas. Furthermore, let j be an objective formula. Then we define the
entailment relation |~ Q w.r.t. default theory Q as follows: (Recall that k(j) stands for
the |~-closure of j, where |~ is the nonmonotonic epistemic entailment of section 4.)
y.
This definition states that, given a default theory Q, y is a default consequence of j iff y
follows in the S5P-logic from the defaults together with what is implied by knowing only the
conjunction of j with the background information W.
Notice that the following equivalence holds, which states something about a modularity of the
entailment relations.
6.3 PROPOSITION
there exists a S5-formula y' - FORM such that
j-W* |~ y' and {y'} - D - S5P y
PROOF. This follows directly from the definition of |~ Q and Proposition 4.4, as is seen as
follows. Suppose we have j |~ Q y, i.e, k(j-W*) - D - S5P y. The logic S5P is compact,
hence there are a 1 , ., a k -k(j-W*) and d 1 , ., d n -D such that a 1 , . a k , d 1 , ., d n
y. By definition of k, since for each i - k, a i - k(j-W*) we have j-W* |~ a i for all i
by Proposition 4.4, y' satisfies the right-hand side of 6.3. -
Instead of true |~ Q y, we simply write |~ Q y. Note that, for
y, with Furthermore, if G is a finite set of epistemic formulas, and y
an S5P-formula, then we define G |~ Q y as G* |~ Q y, where G* stands for the conjunction of
the formulas in G.
6.4. EXAMPLE (Tweety). Consider the following default theory
-f} and representing that penguins do not fly, and that by default birds
fly. (For convenience we omit the subscript of the P-operator.) Now consider the following
(i). b |~ b -K-f (1)
meaning that from the mere fact that Tweety is a bird, we conclude that Tweety is assumed to
fly. (Here |~ stands for Halpern & Moses' nonmonotonic epistemic entailment.) This must be
contrasted to the inference:
(ii). b - p |~ Kp - S5P K-f (1)
i.e, not b - p |~ Q Pf,
meaning that in case Tweety is a penguin, we cannot infer that Tweety is assumed to fly, but
instead we can derive that we know for certain that Tweety does not fly: b - p |~ Q K-f .
7. A temporal formalization of downward reflection
In the previous section it has been described how upward reflection can be formalized by a
nonmonotonic inference based on epistemic states, and the meta-level process by a (monotonic)
logic. In the current section we will introduce a formalization of the downward
reflection step in the reasoning pattern. The meta-level reasoning can be viewed as the part of
the reasoning pattern where it is determined what the possibilities are for default assumptions to
be made, based on which information is available and (especially) which is not. The outcome at
the meta-level concerns conclusions of the form Pj, where j is an object-level formula. What
is still missing is the step where the default assumptions are actually made, i.e., where such
are added to the object level knowledge, in order to be able to reason further with
them at the object level. Here we actually "jump (down) to conclusions". This is what should
be achieved by the downward reflection step. Thus the reasoning pattern as a whole consists of
a process of generating possible default assumptions and actually assuming them.
By these downward reflections at the object level a hypothetical world description is created and
refined. This means that in principle not all knowledge available at the object level can be
derived from the object level theory W: downward reflection creates an essential extension to
the object level theory. Therefore it is excluded to model downward reflection according to
reflection rules as sometimes can be found in the literature, e.g., "If at the meta-level it is
provable that Provable(j) then at the object level j is provable" (e.g., see [Wey80]):
A reflection rule like this can only be used in a correct manner if the meta-theory about
provability gives a sincere axiomatisation of the object level proof system, and in that case by
downward reflection nothing can be added to the object level that was not already derivable
from the object level theory. In the above rule the meta-theory is only concerned with one fixed
object level theory. Since we essentially extend the object level theory, and consequently want
to move to another object level theory, an approach as taken in the rule above cannot serve our
purposes here.
In fact, in our case a line of reasoning at the object level is modelled by inferences from
subsequently chosen theories instead of inferences from one fixed theory, where in the choice
of the next object-level theory the upward and downward reflections play a role. Another
difference with the above "traditional" approach to meta-level reasoning is that we shall treat
these reflection steps model-theoretically instead of proof-theoretically, as shifts from one
model to another, which results in a temporal "super"-model indicating how these shifts may
take place over time. Actually, to keep in perfect line with the above, we should explain by
means of these models how object knowledge (modelled by a set M of valuations) is reflected
upwards to get a model for epistemic meta-knowledge (modelled by an S5-model M), how this
meta-knowledge is then extended with meta-knowledge about default beliefs (modelled by S5P-
models), and how, subsequently, this meta-knowledge is reflected downwards to object
knowledge (modelled by a new set M' of valuations) again. However, representing such shifts
in a temporal model would involve (sequences of) three different models (sets of valuations,
S5-models and S5P-models), which would be quite involved and cumbersome. Therefore, in
order not to complicate our temporal models too much, in our present setting we shall not
represent the above three steps separately, but treat them "in one blow", so to speak, i.e., as
one "super"-step. Now we are able to represent these "super"-steps as shifts from S5P-models
to S5P-models, so that our temporal "super"-model only involves sequences of one kind of
model, viz. S5P-models, of which the S5-reducts represent the reasoner's objective knowledge
and epistemic meta-knowledge, and the frames ('P-') parts represent meta-knowledge in the
form of default (or preferred) beliefs. We shall still refer to these supersteps as downward
reflection, although as we stated above, apart from a reflection of the "meta-knowledge" in the
form of default beliefs contained in the S5P-model at hand to the object level by converting
some of these beliefs into object knowledge, it also includes an immediate upward reflection
from the next object level theory (or rather model) resulting from this to the next meta-level
theory as represented by an S5P-model again.
In [GTG93] such a shift between theories is formalized by using an explicit parameter referring
to the specific theory (called 'context' in their terms) that is concerned, and by specifying
relations between theories. In their case reflection rules ('bridge rules' in their terms) may have
the form:
Here it is assumed that at the meta-level, knowledge is available to derive conclusions about
provability relations concerning a variety of object level theories OT. So, if at the object level
from a (current) theory OT some conclusions have been derived, and these conclusions have
been transformed to the meta-level, then the meta-level may derive conclusions about
provability from another object level theory OT'. Subsequently one can continue the object level
reasoning from this new object level theory OT'. The shift from OT to OT' is introduced by use
of the above reflection rule.
As we said above, in the approach as adopted here we give a temporal interpretation to these
shifts between theories. This can be accomplished by formalizing downward reflection by
temporal logic (as in [Tre94]). In a simplified case, where no branching is taken into account,
the following temporal axioms can be used to formalize downward reflection:
for every objective formula j. Here X is the temporal operator asserting that in the next
(epistemic) state its argument is true.
In the general case we want to take into account branching and the role to be played by an index
t in P t j. We will use this index t to label branches in the set of time points. By combining
EDL with the temporal logic obtained in this manner we obtain a formalization of the whole
reasoning pattern.
We start (following [FG92]) by defining the temporalized models associated to any class of
models and apply it to the classes of models as previously discussed.
In contrast to the reference as mentioned we use labeled flows of time. We use one fixed set L
of labels, viz. I , the powerset of the index set I. However, in most definitions we do not
use this fact, but only refer to (elements t of) L.
7.1 Flows of time
7.1. DEFINITION (discrete labeled flow of time).
Suppose L is a set of labels. A (discrete) labeled flow of time (or lft) , labeled by L is a pair
consisting of a nonempty (countable) set T of time points and a collection of
binary relations < t on T. Here for s, t in T and t in L the expression s < t t denotes that t is a
(immediate) successor of s with respect to an arc labeled by t. Sometimes it is convenient to
leave the indices out of consideration and use just the binary relation s < t denoting that s < t t
for some t (for some label t they are connected). Thus we have that We also use
the (nonreflexive) transitive closure - of this binary relation:
We will make additional assumptions on the flow of time; for instance that it describes a
discrete tree structure, with one root and in which time branches in the direction of the future.
7.2. DEFINITION (labeled time tree)
An called a labeled time tree (ltt) if the following additional conditions
are satisfied (recall that
(i) the graph (T, <) is a directed rooted tree.
(ii) (successor existence)
Every time point has at least one successor:
for all s - T there exists a t and a t - T such that s < t t
(iii) (label-deterministic)
For every label t there is at most one t-successor:
for all s, t, t' - T it holds: s < t t, s < t t' -
There are still some additional properties that sometimes are required.
7.3. DEFINITION (sub-lft and (maximal) branch)
a) An lft (T', (<' t called a sub-lft of an lft (T, (< t
holds It is also called the sub-lft of (T, (< t defined by T', or
the restriction of (T, (< t
b) A branch in an lft T is a sub-lft
(i) - T' x T' is a total ordering on T' x T'
(ii) Every t' in T' with a <-successor in T also has a <-successor in T':
for all t' - T', t there is a s' - T' : t' < s'
(iii) Every element of T that is in between elements of T' is itself in T':
for all s' - T', t - T, u'
c) A branch is called maximal if every t' in T' with a t-predecessor in T also has a t ' -
predecessor in T' for some t': for all t - T, t' there is a t ' and an s' - T' :
s' < t' t'. (Note that if T is a labeled time tree, this condition can be simplified to: the root r
of T is also the root of T'.)
We now immediately have the following:
7.4. PROPOSITION Any branch of an ltt T is an ltt.
7.5. DEFINITION
a) An lft is called successor-complete if for every label t every time point has at least one t-
successor: for all s and t there exists a t such that s < t t.
b) A path is a finite sequence of successors: s 0 , ., s n such
We call s 0 the starting point and s n the end point of the path.
7.6. DEFINITION (time stamps). Given an ltt (T, (< t is called a
time stamp mapping if for the root r it holds that and for all time points s, t it holds s < t
1. (Note that this time stamp mapping is unique.)
Note that an ltt is infinitely deep, i.e., for every k - N there is a time point t - T with
This is a direct consequence of the following proposition:
7.7. PROPOSITION
If B is a maximal branch in an ltt, then any time stamp mapping is an isomorphism between B
and N.
7.2 Temporal models
We first define our temporal formulas:
7.8. DEFINITION (temporal formulas).
a) Given a logic L, temporal formulas over (the language of) L are defined as follows:
of L then Cj is a temporal formula (also called a temporal atom)
ii if j and y are temporal formulas, then so are:
-j, j . y, j ' y, X $,t j, X
b) Below, our main concern will be temporal formulas over S5P; we will also refer to them
as TEDL-formulas (temporal epistemic default logic formulas).
The above temporal operators are fairly standard in branching-time temporal logic: X refers to
next-time, F to sometimes in the future and G to always in the future; the subscripts refer to
whether one considers only some ($) possible path (possibly with a fixed label t) or all (") of
these. The C-operator is the least standard: it means 'currently'. Usually in temporal logic this
operator is not really useful, since it just states that its argument, say j, holds in the current
state, which is normally represented by the formula j itself, without a C in front. Here,
however, we have a logic where we mix temporal and epistemic logic, and the C-operator acts
as a kind of separator between the epistemic and temporal part: in Cj, its argument j is an
itself is a temporal formula. This also facilitates the semantic
definition below.
7.9. DEFINITION (temporal models)
a) Let MOD be a class of models, and labeled flow of time.
A temporal MOD-model over T is a mapping M: T - MOD. If M is a temporal MOD-
model for any class MOD we call M a temporal model.
For (the snapshot at time point t) by M t . The temporal
model can alternatively be denoted by (M t ) t-T .
b) If we apply a) to the classes of models Mod(PC), Mod(S5) and Mod(S5P), we call
these temporalized models temporal PC-models, temporal S5-models and temporal S5P-
models over T, respectively.
c) Given an lft T, the temporal formulas are interpreted on MOD-models over T as follows:
conjunction and implication are defined as expected; moreover
M, s . -j iff not M, s . j;
ii The temporal operators are interpreted as follows:
means that in the current state j is true, i.e.
M, s . Cj iff M s . j
means that j is true in some t-successor state i.e.,
M, s . X $,t j iff there exists a time point t with s < t t such that M, t . j
means that there is a t with some t-successor in which j is true.
there exists a time point t with s < t such that M, t . j
meaning that j is true in all t-successor states, i.e.,
M, s . X ",t j iff for all time points t with s < t t it holds M, t . j
means that j is true in all immediate successors:
means that j is true in some future state, i.e.,
there exists a time point t with s - t such that M, t . j
means that for all future paths there is a time point where j is true, i.e.,
starting in s there is a t in B with M, t . j.
means that j is true along some future path, i.e.,
there exists a branch B starting in s with M, t . j for all t in B.
means that j is true all future states i.e.
M, s . G " j iff for all time points t with s - t it holds M, t . j.
Note that the operator C enforces a shift in the evaluation of formulas; taking us from a
temporal model M and a time point t to an S5P-model M t .
During the reasoning process we assume to gradually extend the information we have at the
object level, and consequently to shrink the set of possible worlds by means of reflecting
default beliefs downwards to object knowledge. In terms of temporal S5-models we can
formulate this property as follows:
7.10. DEFINITION. A temporal S5P-model obeys downward reflection, if the following holds
for any s and
the frame M t in M s is non-empty - there is a t with s < t t and for all such t
the set of worlds of M t equals M t
The above property expresses that the possible worlds in frame M t (representing the P t -default
beliefs) are taken to be the whole set of possible worlds (representing the objective knowledge)
in some (t-) successor epistemic state (or, rather, S5P-model).
Finally, we are ready to zoom in into the models we like to consider here, the temporal
models.
7.11. DEFINITION (TEDL-models)
TEDL-model M is a temporal S5P-model over an lft T such that:
1) T is a labeled time tree;
For every time point s, there is exactly one t with s <- t;
reflection.
The following notion is a crucial one for the sequel:
7.12. DEFINITION (conservativity and limit models). Let labeled flow of
time. A temporal PC-model M over T is conservative if for every two time points s and t with s
< t it holds that M(s) # M(t).
Suppose M is a conservative temporal PC-model. The intersection of the models M(s) for all s
in a given (maximal) branch of the lft T is called the limit model of the
branch, denoted lim B M. The set of limit models for all (maximal) branches is called the set of
limit models of M. These definitions straightforwardly extend to S5- and S5P-models, by
identifying M with its set of worlds, M.
7.13. THEOREM. TEDL-models are conservative.
PROOF. Suppose s < t, that is, for some label t, s < t t. Since TEDL-models obey downward
reflection and the underlying lft is an ltt, this means that the (now unique) set of worlds M t of
M t is the frame M t of M s . Since M t # M s , the set of worlds of M s , this gives M t # M s ,
which proves the theorem. -
Since we know that TEDL-models are conservative, we have that once we have obtained that
somewhere in a time point s along some path of such a model some objective formula is
known, it remains known in all successor points of s. (This is in fact the rational behind the
name "conservative models".) We can make this more precise if we introduce so-called cko-
formulas, which are formulas of the form CKj, where j is objective. In the sequel we will
denote cko-formulas by a. Then we have that:
7.14. PROPOSITION. Let M be a TEDL-model, and a a cko-formula.
If, for some s, M, s . a, then M, t . a for all t with s - t.
PROOF. Suppose M, s . a, for a = CKj. We show that for t with s < t we have that M, t .
a. (Then we can finish the proof by induction on the number of time point between s and t.)
By Theorem 7.13, we have that M t # M s . This yields: M, s . a - M, s . CKj - M s .
is objective and M t # M s we then must have M t ,
. j for all m in M t and hence M t . Kj. Finally, we have the equivalences M t . Kj -
Furthermore, TEDL-models enjoy a number of properties that can be expressed as validities in
our logic:
7.15. THEOREM. TEDL-models satisfy the following validities:
T0 All the operators of {X ",t , X" , F" , G" } satisfy the K-axiom (C too) and generalisation;
(introduction of C)
existence & label-deterministic)
is union of < t )
(dual of T6)
objective (allowing downward reflection)
objective (trivial downward reflection)
objective (conservativity)
transitive closure of <)
(from conservativity and induction)
7.17. REMARK. The Theorem above says that the formulas are at least sound; until
now we have not been concerned by designing a logic that is complete for TEDL-models.
8. TEDL models of default theories and entailment relations
We could formulate definitions of entailment of objective formulae related to any model, or any
model based on the standard tree. But it may well happen that there are branches in such
models, for instance labeled by the empty set only, that contain no additional information as
compared to the background knowledge. It is not realistic to base entailment on such
informationally poor branches in a model. Therefore we define:
8.1. DEFINITION (informationally maximal)
We define for TEDL-models M 1 and M 2 over the same flow of time that M 2 is informationally
larger
We call M 1 informationally maximal in a class M of models if it is itself the only model that is
informationally larger.
For a given model M we will apply this definition to the set B of all maximal branches, with T
flow of time.
8.2. DEFINITION (regular model)
TEDL-model M is called regular if all maximal branches are informationally maximal in the
class of maximal branches. The submodel based on all time points t included in at least one
maximal, informationally maximal branch is called the regular core of M, denoted by reg(M) .
8.3. REMARK.
In general the regular core will not be label-complete, because branches may be cut off. The
idea behind taking informationally complete branches is that we want to maximalise the effect of
applying defaults in order to obtain as much (default) knowledge as possible.
8.4. DEFINITION.
Let M be a TEDL-model over
We define for k - N
where M'(t) stands for the S5-reduct of the S5P-model M(t).
8.5. PROPOSITION.
Let M be a TEDL-model.
a) For k - k' it holds M (k') # M (k)
branch of reg(M
PROOF. a) follows directly from Theorem 7.13, b) follows from the distributivity of
intersection over union (and vice versa). -
8.6. DEFINITION (sceptical entailment)
Let M be a TEDL-model and a a cko-formula. We define the sceptical entailment relation by:
M | - scep a - for every maximal branch B in reg( M) there is a t in B such that M, t . a.
An immediate consequence of this definition is:
8.7. PROPOSITION.
If, for some k - N, M (k) . Kj, then M | - scep CKj.
PROOF. Suppose M (k) . Kj, for some k - N. This means that M'(t) . Kj for all S5-reducts
M'(t) with t in reg(M) and k. So for every maximal branch B in reg( M) we can find a t in
B such that M, t . Kj (viz. take t in B such that |t| = k. By Proposition 7.7 we can always do
this). Hence, M | - scep CKj. -
8.8. PROPOSITION.
Let M be a TEDL-model with root r. Let a = CKj be a cko-formula.
The following are equivalent:
reg(M), r . F " a
. Kj for every maximal branch B of the regular core of M.
PROOF. Clearly (i) and (ii) are equivalent.By Prop. 8.5 also (iii) and (iv) are equivalent. We
now show the equivalence of (i) and (iv). First we prove (i) - (iv): Suppose M | - scep CKj,
i.e. for every maximal branch B in reg( M) there is a t in B such that M, t . CKj. Now
consider a maximal branch B in reg( M). Then there is a t in B with M, t . CKj, i.e. M(t) .
Kj. By the conservativity of M we have that M(u) . Kj for all u - t, i.e., all worlds of the
models M(u) with u - t satisfy j. But then also all worlds of the models M(u) with u - t and u
in B satisfy j. Consequently, lim B
Next we prove (iv) - (i): Suppose lim B M . Kj for every maximal branch B of the regular
core of M. We have to prove that for every maximal branch B in reg( M) there is a t in B such
that M, t . CKj. Take some maximal branch B in reg( M). Then we know that lim B M . Kj,
i.e., - u in B M(u) . Kj. By the conservativity of the model M (Theorem 7.13) we know
that the sequence <M(u) | u in B> is monotonically decreasing (with respect to -). Let P
the set of propositional atoms occurring in the formula a (or j). Clearly, P 0 is finite. Now, for
any S5-model M with set S of worlds (truth assignment functions) we let M 0 denote the model
with set S 0 of worlds: S
for some s - S}. Clearly, M . Kj iff M 0 . Kj.
Now consider the sequence <M(u) 0 | u in B>. This is a monotonically decreasing sequence
with intersection - u in B M(u) 0 . Since P 0 is finite, and we identified worlds with truth
assignment functions, we have that all the models M(u) 0 contain only a finite number of
worlds. Together with the fact that the sequence is monotonically decreasing this yields that the
sequence must be stable from some point s in B on: M(u)
obviously the intersection - u in B M(u) . So now M(s) 0 . Kj, and thus M(s) .
Kj, i.e. M, s . CKj. -
For our definition of credulous entailment we can be less restrictive. Especially, too less
information in one branch can always be overcome by another, informationally larger branch.
8.9. DEFINITION (credulous entailment)
Let M be a TEDL-model. We define:
cred CKj - there exists an s with
M | - cred CKj - there exists an s with M(s) . Kj
8.10. PROPOSITION.
Let M be a TEDL-model, and a = CKj a cko-formula.
The following are equivalent:
cred a
cred a for some k - N.
. Kj for some maximal branch B
PROOF. Since clearly (i), (ii) and (iii) are equivalent, we concentrate on the equivalence of (ii)
and (iv): we first prove (ii) - (iv): Let M | - k cred CKj for some k - N. This means that there
exists an s with and M(s) . Kj, i.e., M, s . CKj. By Prop. 7.14, we then have that
M, t . CKj for all t with s - t. Now consider any maximal branch B through s. Clearly, this
branch has the property that the models M(t) with s - t all satisfy Kj, i.e., j holds in every
world of every model M(t). But then j holds in the intersection of these models as well. This
proves . Kj.
Next we prove (iv) - (ii): Suppose that lim B M . Kj for some maximal branch B . This
means that Kj holds in the intersection of the models M(t) along B . By the conservativity of
the model M (Theorem 7.13) we know that the sequence <M(t) | t in B> is monotonically
decreasing (with respect to -). Let P the set of propositional atoms occurring in the
formula a (or j). Clearly, P 0 is finite. As above, we denote, for any S5-model M with set S of
worlds (truth assignment functions), the model with set S 0 of worlds by M 0 where S
for some s - S}. Again, M . Kj iff M 0 . Kj. Now consider the sequence <M(u) 0 | u
in B>. This is a monotonically decreasing sequence with intersection - u in B M(u) 0 . Since P 0
is finite, and we identified worlds with truth assignment functions, we have that all the models
only a finite number of worlds. Together with the fact that the sequence is
monotonically decreasing this yields that the sequence must be stable from some point s on:
obviously the intersection - t in B M(t)
the intersection satisfies Kj, we obtain that M(s) 0 . Kj, and thus M(s) . Kj. Hence M | - cred
CKj. -
We can now associate TEDL-models with default theories as follows.
8.11. DEFINITION (TEDL-model of a default theory).
D) be a default theory. Then we define a TEDL-model of Q as a TEDL-model M Q
such
(i) (basis: the root) M Q r is an S5P-model such that (a) the S5-reduct of M Q r is the S5-model
W* , as defined in Section 4, and (b) M Q r satisfies the set of defaults, i.e., M Q r . D.
(ii) (induction step) Suppose that we are given an S5P-model at snapshot M Q s . Then we have
that for a(n S5P-) model M Q t with s < t t, it holds that: (a) the S5-reduct of M Q t is the S5-
model M t as it appeared as a frame in M Q s , and (b) M Q t satisfies the set of defaults again, i.e.,
. D.
Note that, in general, there are multiple TEDL-models of a default theory Q. Furthermore, note
that clause (ii)(a) reflects the downward reflection operation with respect to the P t -defaults.
This definition enables us to finally give the definitions of sceptical and credulous entailment
from a default theory.
8.12. DEFINITION (entailment from a default theory).
D) be a default theory, and j an objective formula. Then:
models M of Q it holds M | - scep CKj
cred j iff for all models M of Q it holds M | - cred CKj
Of course, we have that what is entailed sceptically, also is entailed credulously:
8.13. PROPOSITION. For default theory Q and objective formula j: Q | - scep j - Q | - cred j
Sceptical and credulous entailment are not the only approaches to define semantics for default
logic. Sceptical entailment can be considered a lower bound of the conclusions that can be
drawn, credulous entailment as an upper bound. A more differentiated approach bases
semantics of the default theory on the set of all alternative extensions that actually can be
constructed out of a default theory using the defaults as (non-monotonic, context-dependent)
inference rules. The original approach by Reiter [Rei80] defines the extensions of a default
theory by means of a pseudo-construction or fixed point definition; we will call these
extensions Reiter extensions.
In Constructive Default Logic, introduced in [TT92], the notion of Reiter extension is replaced
by the weaker notion of constructive extension. In [TT92] it was proven that the Reiter
extensions of a default theory are among the constructive extensions and they were
characterised. Constructive extensions give a broader perspective on the semantics of a default
theory. The formalisation in terms of branching time models introduced in the current paper, in
the first place is the temporal formalisation of the construction process of a constructive
extension. Just like in the case of Constructive Default Logic, in the applicability condition of a
point s, the justification My only refers to the current state of
information (and not to the whole (future) context of the reasoning pattern as in Reiter's case is
required). Because of this similarity for every (maximal) branch B in a TEDL-model M of a
default theory D), the theory of its limit Th(lim B M) is a constructive extension of Q
and the branch itself represents a construction chain of this constructive extension.
As the Reiter extensions are among the constructive extensions, a natural question is how in a
TEDL-model of a default theory the branches that lead to a Reiter extension can be
characterised. Based on variants of the notions self-defeatingness and exhaustiveness
introduced in [TT92], it is not difficult to find such a characterisation.
8.14. DEFINITION
Let M be a TEDL-model of the default theory branch in M.
The branch B is called self-defeating if there is a time point s in B and a default
in D such that the following holds:
for all time points t, t' in B and labels t with t < t t' and every default j ' - My ' - R j c in
D with j in t, there is some time point u in B with B u . o/oo y '.
Otherwise the branch B is called non-self-defeating.
The notion of non-self-defeatingness quarantees that any default conclusion that is drawn will
remain justified in the strong Reiter sense during the whole process. However, this is only one
side of the characterisation. It may well be the case that the defaults applied in branch B are
justified in the strong sense, but not all applicable defaults actually have been applied in B .
Therefore the notion of exhaustiveness is required:
8.15. DEFINITION
Let M be a TEDL-model of the default theory branch in M.
The branch B is called exhaustive if for every time point s in B and every default
in D such that B s . j and for all time points t in B it holds y,
then there is a time point s' in B and a label t with s< t s' and i is in t.
Based on these two conditions we can characterise the branches leading to Reiter extensions:
8.16. THEOREM
Let M be a TEDL-model of the default theory D). The following are equivalent:
(i) E is a Reiter extension of Q
(ii) there exists a non-self-defeating and exhaustive branch B in M with
The proof is similar to the proof of the main result in [TT92]. The following example default
theory illustrates our
a
r1: a - Mc - R 1 b
r3: a - Mo/oo c - R 3 o/oo c
In
Figure
1 the different reasoning paths are depicted. At each node the literals that are true at
the object level are depicted, and, between [.], the applicable default rules. At each arc the
label is depicted and, between (.), the justification it is based on.
a
[r1, r3]
a a, b a, o/oo c a, b, o/oo c
[r1, r3] [r2, r3]
a, b a, b, o/oo c
[r2, r3]
(c) ( o/oo c) (c, o/oo c)
(c) ( o/oo c)
Figure
Reasoning paths for an example default theory
The branch leading to a, b, c is non-self defeating and exhaustive, so it leads to the Reiter
extension Cn({a, b, c}). The same holds for the branch leading to a, o/oo c. The two branches
leading to a, b, o/oo c, however, are self-defeating: the occurrence of o/oo c leads to the defeat of
the earlier justification c. Therefore Cn({a, b, o/oo c}) is a constructive extension, but not a
Reiter extension.
9. Conclusions
In [MH93a,b] an Epistemic Default Logic (EDL) was introduced inspired by the notion of
meta-level architecture that also was the basis for the approach introduced in [TT91]. In EDL
drawing a default conclusion has no other semantics than that of adding a modal formula to the
meta-level. No downward reflection takes place to be able to reason with the default
conclusions at the object level (by means of which default assumptions actually can be made).
In [TT91] downward reflection takes place, but no semantical formalization was given: it was
defined only in a procedural manner.
In principle downward reflection disturbs the object level semantics, since facts are added
that are not logically entailed by the available knowledge. Adding a temporal dimension (in the
spirit of [FG92]) to EDL enabled us to obtain formal semantics of drawing a default
conclusion in a dynamic sense: as a transition from the current object level theory to a next one
(where the default conclusion has been added).
The approach as developed provides a formalisation of default reasoning using labeled
branching time temporal models. Within these models various types of semantics can be
defined: semantics based on sceptical or credulous entailment, and semantics based on
constructive extensions or Reiter extensions.
[TT92] Y.H. Tan, J. Treur, Constructive Default Logic and the Control of Defeasible
Reasoning, in: B. Neumann (ed.), Proc. of the European Conference on Artificial
Intelligence, ECAI'92, Wiley & Sons, 1992, pp. 299-303.
Acknowledgements
Discussions about the subject with Joeri Engelfriet have played a stimulating role for the
development of the material presented here.
Appendix
In this appendix, we provide a proof for theorem 5.3. First, we introduce an alternative class
of Kripke models.
Definition A1. We define the class A(S5P) of alternative models for S5P . Elements M of
A(S5P) are tuples
--R
A Temporal Model Theory for Default Logic
Adding a temporal dimension to a logic system
An Introduction to Modal logic
Towards a Theory of Knowledge and Ignorance
Formal Semantics of Temporal Epistemic Reflection
A. Modal Logic for
An Epistemic Logic for Defeasible Reasoning using a Meta-Level Architecture Metaphor
A Default Logic Based on Epistemic States.
Epistemic Logic for AI and Computer Science
Semantical Considerations on Nonmonotonic Logic
A Logic for Default Reasoning
Annual Reviews of Computer Science 2
A Semantical Approach to Nonmonotonic Logics
Constructive Default Logic and the Control of Defeasible Reasoning
Temporal Semantics of Meta-level Architectures for the Control of Reasoning
Prolegomena to a Theory of Mechanized Formal Reasoning
--TR | default reasoning;temporal models;meta-level architectures;epistemic states |
595884 | Definability of Polyadic Lifts of Generalized Quantifiers. | We study generalized quantifiers on finite structures. With every function f : we associate a quantifier Q_f by letting Q_fx &phis; say there are at least f(n) elementsx satisfying &phis;, where n is the size of the universe. This is the general form of what is known as a monotone quantifier of type 1 . We study so called polyadic lifts of such quantifiers. The particular lifts we consider are Ramseyfication, branching and resumption. In each case we get exact criteria for definability of the lift in terms of simpler quantifiers. | to a given logic? Such questions can be quite hard. On finite models,
Partially supported by a grant from the University of Helsinki. This research was initiated
while the first author was a Junior Researcher at the Academy of Finland.
answering some of these questions would mean solving notoriously difficult open
problems about computational complexity.
The results on (un)definability in the literature usually concern particular quan-
tifiers; few general definability results for interesting classes of quantifiers are known.
For monadic quantifiers, however, the definability question above has recently been
given a complete answer in algebraic terms (cf. [18]), an answer which also permits
complete classifications with respect to expressive power of various classes of
monadic quantifiers.
Nothing similar is in sight for polyadic quantifiers, not even for the simplest kind
whose signature consists of one binary relation. A rough way of measuring complexity
of a quantifier is by its arity, i.e., the largest arity of the relations occurring in the
corresponding signature. So monadic quantifiers are unary, and an early result by
Lindstr-om [14] is that the binary well-ordering quantifier is not definable by means
of any monadic quantifiers added to first-order logic. This leads to the question
of the existence of arity hierarchies of quantifiers: sequences hQ n i n2! where Q n is
n-ary and not definable in terms of Q k for k ! n, or even in terms of any quantifiers
of lower arity. Several such hierarchies are known; a systematic treatment is given
in [6].
These hierarchy results make essential use of infinite models. Recently, some
hierarchy results have also been obtained for finite models. One result by Luosto
[15] is that the binary quantifier " R contains at least half of the ordered pairs of
elements of the universe" is not definable from any monadic quantifiers over finite
models. The proof uses advanced finite combinatorics. Another recent result, the
Hierarchy Theorem of [8], states that, with respect to a more fine-grained complexity
ordering than the arity ordering, there exists at every step quantifiers not definable
in terms of quantifiers of lower complexity, over finite models. However, the existence
of these quantifiers is proved by probabilistic methods, not by explicit construction.
In this paper we shall give definability characterizations over finite models for
certain classes of polyadic quantifiers, more precisely for polyadic quantifiers that
are obtained from monadic ones by means of certain operations. We call these
operations polyadic lifts. Three such lifts are studied: branching, Ramseyfication
and resumption.
Let Q be a simple unary quantifier (one whose signature contains just one unary
predicate symbol), which is also monotone. Then there is a function f from natural
numbers to natural numbers such that on a universe with n elements
"at least f(n) ". The branching of Q (with itself) says of a binary relation R that
there are subsets X;Y of the universe with at least f(n) elements such that the
Y is contained in R . Similarly we can branch two distinct monotone
simple unary quantifiers (requiring then that jXj - f(n) and jY j - g(n)), or k such
quantifiers. The k-ary Ramseyfication of Q says that there is a set X of cardinality
at least f(n) which is homogeneous for R , i.e., any k distinct elements of X stand
in the relation R to each other. A resumption of a monadic quantifier, finally, says
the same thing about tuples of individuals that the monadic quantifier says about
individuals. So the k-ary resumption of Q says, on a universe with n elements, of
a k-place relation that it contains at least f(n k ) k -tuples.
These polyadic lifts turn up in various contexts. The Ramseyfication operation
is familiar from model theory. The ability to quantify over k-tuples is sometimes
assumed in finite model theory in order to be able to describe certain behavior of Turing
machines. And all three lifts have been proposed in natural language semantics.
Actually, this is the context where the idea of polyadic lifts and their definability
arose, even though the definability issues themselves are standard mathematical-
logical questions.
The most immediate question to ask about a polyadic lift is whether it really
gives anything new, i.e.: Is definable in terms of Q
is the question we deal with in this paper. We prove that for the three lifts under
consideration, the lifted quantifiers are usually not definable in first-order logic
augmented with the argument quantifiers. More precisely, we show that a certain
condition of unboundedness of the functions associated with monotone simple unary
quantifiers is sufficient for undefinability of branching and Ramseyfication. Actually,
our results are stronger. We show that, if Q is unbounded, the 1)-ary branching
of Q is not definable from any monadic quantifiers added to first-order logic
1). And for Ramseyfication we obtain undefinability even if any quantifiers of
arity at most k are allowed, and even if first-order logic is replaced by the stronger
logic
1! (a logic which extends fixed point logic). Moreover, we also show that
unboundedness is a necessary condition for undefinability. That is, if Q is bounded,
branching and Ramseyfication of Q is definable in terms of Q. We have a similar
characterization for the definability of the branching of k
For resumption, our results are similar but a little weaker. We show that a
slight strengthening of unboundedness is necessary and sufficient for the 1)-ary
resumption of Q to be undefinable from any monotone simple unary quantifiers
added to first-order logic. We also identify another necessary condition for the
+1)-ary resumption of Q to be undefinable from Q, roughly that the behavior of
Q on universes of size n does not determine its behavior of universes of size n k+1 .
In natural language semantics, the basic quantifiers are not the simple unary
ones but instead those of type h1; 1i, whose signature has two unary predicate
symbols. English determiners like all, some, no, at least five, most, all but three,
more than two thirds of, etc., denote such quantifiers. The lift operations arise
from the way noun phrases containing determiners are combined with each other
in sentences. The standard lifts here give polyadic quantifiers which are definable
from the determiner denotations, but some sentences appear to use the three lifts
studied in this paper. We show that our results about branching and Ramseyfication
generalize to type h1; 1i quantifiers, provided these satisfy two conditions. These
conditions are believed to hold (almost) universally for determiner denotations.
We restrict attention to finite models, a constraint which is common in natural
language semantics and model theory for computer science. The undefinability
results of course hold for arbitrary models - it's just that the counter-examples we
give to definability are finite. But our results that certain quantifiers are definable
in a certain logics require the assumption of finiteness.
In the remainder of this section we first recall the relevant notions pertaining
to logics with generalized quantifiers, and then introduce the three lift operations
in the context of natural language semantics. The brief linguistic excursion there
is included for background and motivation, but not used in the rest of the paper.
In Section 2 we state some facts about monotone quantifiers and establish that
boundedness implies definability (of branching and Ramseyfication). Sections 3,4,
and 5 deal with branching, Ramseyfication and resumption, respectively. In each
case, undefinability is established by means of a suitable Ehrenfeucht-Fra-iss'e game,
although the three proofs are quite different. Section 6 ends the paper with some
questions and open problems.
1.1 Generalized quantifiers and definability
We begin by recalling the concept of a generalized (Lindstr-om) quantifier, and of
logics with such quantifiers (cf. [13]).
A (generalized) quantifier is a class Q of structures of a finite relational signature
which is closed under isomorphism. The type of Q can be identified with a finite
sequence positive natural numbers (n ? 0). Equivalently, Q can
be defined as a functional assigning to each non-empty set A a quantifier QA of
a subset of
relation over A). Instead of
simply . The arity of Q is maxfk g. Q is monadic if it is unary
polyadic. We let Q k be the class of all quantifiers of
A quantifier Q of type hki is called simple. It is monotone if for all A and
all R; S ' A k , QAR and R ' S implies QAS . The notion of a type hk
quantifier being monotone in the i:th argument is defined similarly.
With many familiar logics L one can uniquely associate a logic L(Q) obtained
by adding the quantifier Q: a new formation rule yields formulas
are formulas, x i is a string of k i distinct variables, and the semantics
is given by the clause
A
Here A is the universe of A, a is a finite sequence of elements in A, and ' A
b)g. Similarly one defines the logic L(Q) when Q is a class
of quantifiers.
In this paper L will be either first-order logic L !! , or L k
1! (which is like L1!
except that it only has k variables), or L !
1! . As usual,
means that the same L(Q)-sentences are true in A and in B. When ' is an
its quantifier rank qr(') is the maximal number of nestings of
quantifier symbols (including 8 and in ', and
means that the same L !! (Q)-sentences of quantifier rank at most q are true in A
and in B.
The relativization of a type hk
quantifier Q rel defined by
A (X; R
This can be extended to formulas of L(Q): if P is a (new) unary predicate symbol
and ' such a formula one defines inductively a formula ' (P ) of L(Q rel ) which says
the same thing about (A; X) as ' says about the substructure of A generated by
X .
The quantifier Q is definable in L(Q) if the sentence
is logically equivalent to some L(Q)-sentence in those predicate symbols. A logic
extends another logic if every sentence in the latter is equivalent to some sentence
in the former. In particular, L(Q 0 ) extends L(Q) iff each Q 2 Q is definable in
1.2 Polyadic lifts and natural language quantification
Before defining the polyadic lifts we briefly explain how they turn up in natural
language semantics. More details can be found in [10].
Monadic generalized quantifiers provide the most straightforward way to give
the semantics of noun phrases (NPs) in natural languages. Consider a sentence like
It consists of a noun phrase no students, in turn constituted by the determiner no
and the noun students, and a verb phrase smoke, in this case a simple intransitive
verb. In a model A the noun and the verb phrase denote subsets of A. Thus, the
determiner is naturally taken to denote a binary relation between subsets of A, i.e.,
with varying A, a type h1; 1i generalized quantifier.
In (1) the quantifier used is noAXY , (using the same symbol for the
determiner as for its denotation). Changing the determiner in (1) we obtain other
quantifiers such as all, some, at least five, most, all but three,
more than two thirds of, etc., where, for example,
and all but three AXY ,
The first argument in these quantifiers is called the noun argument, and the
second the verb argument. Some determiners take more than one noun argument,
as in
(2) More students than teachers smoke
where more. than denotes the type h1;
Zj. The role of type h1i quantifiers in this context is as NP denota-
tions. For example, the denotation of most students is obtained by fixing the noun
argument of most to the denotation of students. Other NPs do not involve deter-
miners, like something and everything which denote 9 (9AX , X 6= ;) and 8
respectively, and phrases like John or Mary, which denotes the
set of X ' A such that note that whereas the determiner
denotations above are all closed under isomorphism, most NP denotations are not,
and thus do not qualify as quantifiers in the present sense.
Determiners usually denote type h1; 1i quantifiers, but not all such quantifiers
are determiner denotations. Indeed, the following two constraints have been found
to hold (almost) universally:
CONS QAXY () QAX X "Y
CONS predicts, for example, that the H-artig quantifier
I AXY ()
is not the denotation of any English determiner. And EXT implies that no determiner
can mean, say, some on universes with less than 10 elements and all on other
universes. Nevertheless, the determiner denotations form a rich class of quantifiers:
as further examples we may take the proportional quantifiers
and more than (at least) m n:ths
of the, and Boolean combinations of these, such as less than half of the, between ten
and twenty percent of the, not more than ten or at least twenty percent of the, etc.
Together, CONS and EXT express a characteristic asymmetry between the two
arguments of determiner denotations: the role of the noun argument is to restrict
the domain of quantification. A precise statement is the following
1.1 Fact. A type h1; 1i quantifier is CONS and EXT iff it is the relativization of
some simple unary quantifier.
Clearly, Q rel is always CONS and EXT and, conversely, if Q 0 is CONS and EXT
defined by QAY , Q
A AY , Q This simple fact often enables
one to generalize results about simple unary quantifiers to determiner denotations.
Notice also that a simple unary Q is monotone iff Q rel is right monotone (mono-
tone in the verb argument). For example, the proportional quantifiers above are
right monotone.
Thus, NP semantics involves monadic quantifiers. But sentences can combine
several NPs, together with transitive or ditransitive verbs denoting not sets but
binary or ternary relations. Their truth conditions can then be given by means of
polyadic quantifiers. Indeed, common sentential structures correspond to ways of
lifting monadic quantifiers to polyadic ones. The most ubiquitous lift is iteration,
as in
(3) Most students criticized three teachers
with a quantified subject and object (Q 1 X and Q transitive verb (R ).
The truth conditions (of one of the two readings of (3)) are
or, equivalently, the result of applying the lifted quantifier It(Q to the arguments
X;Y and R : define (suppressing
(R seemingly similar sentences sometimes correspond to
other lifts than iteration. For example,
researchers wrote thirty-two papers for the Handbook
presumably means neither that each of the forty researchers wrote thirty-two papers,
nor that each of the thirty-two papers was written by forty (co)authors. Instead, this
is an instance of so-called cumulative quantification: each of the forty researchers
authored at least one paper for the Handbook, and each of the thirty-two papers
was authored by at least one researcher. Thus, we have the lift
We now come to the lifts studied in this paper. The first was introduced by
Barwise in [1] with examples such as
Most boys in your class and most girls in my class have all dated each other
Here the lift in question, on at least one plausible reading, is branching.
1.2 Definition. For right monotone type h1; 1i quantifiers
(again suppressing the universe)
We write Br k (Q) for arguments). The branching of k monotone
type h1i quantifiers is defined similarly (suppress
So (8) means that there is a set X containing more than half the boys in your
class and a set Y containing more than half the girls in my class such that any pair
in X \Theta Y is a 'dating' pair.
A similar lift occurs in certain reciprocal sentences like
At least two thirds of the boys in your class all like each other
which can be taken as saying that there is a set containing at least two thirds of
the boys in your class such that any two distinct boys in this set are in the 'like'
relation:
1.3 Definition. Let Q be a right monotone type h1; 1i quantifier.
(where I(Y )g). Similarly for a
monotone simple unary Q.
We call the values of this lift Ramsey quantifiers, extending slightly the common
usage of this term (where Q is the quantifier 'there exists a least @ ff ').
Our final example of a polyadic lift, resumption, amounts to using a monadic
quantifier to quantify over k-tuples of individuals. This lift has found uses in computer
science (cf. [4] and [16]) but can be given a linguistic motivation as well; cf.
cases like
Most neighbours like each other
Most twins never separate
1.4 Definition. Let Q be of type h1; 1i. Define
(Res k (Q))ARS () Q A k RS
Similarly for simple unary quantifiers.
The route to the lifts here went via linguistics, but they are natural in other
contexts too. For example, to say that a graph contains so and so many vertices of
degree 3 one iterates monadic quantifiers. But to say that a graph contains a clique
of such and such size, one needs a Ramsey quantifier. Of course, one could also use
second-order logic. But the Ramsey quantifier gives a better estimate of just how
much expressive power one needs to add to first-order logic in this case.
To know how powerful the lifts are one needs first of all to answer the basic
logical definability question:
When is
(The question is also significant in a linguistic context. For example, non-definability
may imply that a certain kind of grammar for the corresponding expressions does
not exist.) Trivially, iterations and Boolean combinations thereof are so definable.
We shall prove below that the other polyadic lifts - branching, Ramseyfication and
resumption - are usually not definable in this way.
Monotone quantifiers
?From now on, unless otherwise noted, we restrict attention to finite models. Then,
a monotone simple unary quantifier can be identified with a function
quantifier corresponding to f says of a set X that it has at least f(n) elements,
where n is the cardinality of the universe (if f(n) ? n this is trivially false). More
precisely, given f , define
for A. Conversely, if Q is monotone, and
least k s. t. 9A9X ' if such a k exists
then
Rather perspicuous definability criteria can be given for monotone simple unary
quantifiers. A full characterization can be found in [18]; here we quote for illustration
the following special cases:
2.1 Theorem.
1. ([11], [20]) The quantifier Q f is first order definable iff either f(n) or n \Gamma f(n)
is eventually constant.
2. ([18]) Suppose that lim n!1 that either
lim is definable
in L !! (Q f ) iff at least one of
eventually constant.
In the second of these statements Q f is assumed to satisfy a strong unboundedness
condition. For most of this paper, the following weaker notion is sufficient.
2.2 Definition. We say that the function f (or quantifier Q f ) is unbounded if
Canonical examples of unbounded functions are
n ], and [log(n)] (where
[a] is the integer part of a). Typical bounded functions are (corresponding
to 9),
2.3 Theorem. If f is bounded, then for any k - 2, Br k (Q f ) and Ram k (Q f ) are
definable in L !! (Q f ).
Proof. By hypothesis, there is a number m such that for every n, either
0, or n. We can use Q f to
uniquely characterize each of these possibilities for f(n). To see this, note first that
are the
sentences respectively. Second, for p ? 0 we have
Third, let / q be the conjunction of
y
y
and :- . Then
Moreover, for each one of these finitely many possibilities, the branching conditio
is expressible in first-order logic. Indeed, if condition is
equivalent to the sentence
states that all components of x are
distinct, and H is the set of all functions h pg. In the case
the branching condition is equivalent to the sentence
simply
finally, if 1), then the
branching condition is trivially true (false).
Putting all this together we conclude that Br k (Q f )x
equivalent to the sentence
1-p!m
q!m
The case of Ram k (Q f ) is similar. 2
The relativization Q rel
f of Q f is the right monotone type h1; 1i quantifier
(Q rel
We say that
f is bounded if f is bounded. Notice that Q f is definable in
f ), that Br(Q f 1
is definable in L !! (Br(Q rel
)), and that
Ram k (Q f ) is definable in L !! (Ram k (Q rel
f )). ?From Fact 1.1 we see that right monotone
determiner denotations usually are of the form Q rel
f . For example, the quantifier
most is Q rel
f for 1. And in most of these cases, relativization increases
expressive power. In fact, the following result tells us precisely when this happens.
2.4 Theorem. ([11], [20]) The quantifier Q rel
f is definable in L !! (Q f ) (or in
eventually constant (i.e., iff Q f is first-order
definable).
Note that Q rel is definable in L(Q) iff L(Q) has the relativization property,
i.e., for any L(Q)-sentence ', ' (P ) is equivalent to an L(Q)-sentence. We end
this section by stating a relativized version of Theorem 2.3 (these theorems will be
generalized to the branching of several quantifiers in section 3).
2.5 Theorem. If f is bounded, then Br k (Q rel
f ) and Ram k (Q rel
f are definable in
Proof. Similar to the proof of Theorem 2.3. To formulate the branching condition
Br k (Q rel
over a universe A, we need to express statements of the
(p ? 0, q - 0), and this can be done with the quantifier Q rel
f . 2
3 Definability of branching
In this section we first recall definitions and basic properties of some Ehrenfeucht-
Fra-iss'e type games, and then apply these games to the definability of branching.
The bijective Ehrenfeucht-Fra-iss'e game of length q , BEF q (A; B), has two play-
ers, which we call Duplicator and Spoiler , respectively. In each round 1
of the game Duplicator chooses first a bijection f
by choosing an element a i 2 A. These q pairs of moves of the players determine
a relation Duplicator wins the game
if p is a partial isomorphism A ! B, i.e., if p is an injective function such that
for each relation R of A and the corresponding relation R 0 of B, and for all tuples
(b
(b
Spoiler wins if this is not the case, or if Duplicator cannot make his moves, i.e., if
there are no bijections
As usual, what happens in some particular play of BEF q (A; B) is not important.
It is rather the question "which one of the players has a winning strategy" that is
relevant for us. Here we say that Duplicator (Spoiler) has a winning strategy if he
has a systematic way of choosing the bijections f i (the elements a i ) such that using
it he always wins the game, no matter how the other player moves.
The following result is a direct consequence of Theorem 2.5 of [6]. For the sake
of completeness we will explain here the basic idea behind its proof.
3.1 Proposition. If Duplicator has a winning strategy in the game BEF q (A; B),
then A j q
B.
Proof. (idea) Consider a formula
of L !! (Q 1 ) and a partial function a 7! b. If f is a bijection
such that for every a 2 A and each 1 - j - m, A
then the function f is an isomorphism between the defined structures
(b; \Delta)) . Hence, A
only if B no matter what the interpretation of the quantifier Q is. Using
this observation it is easy to prove by induction on r that if f are bijections
which Duplicator has chosen according to his winning strategy, and
are the elements chosen by Spoiler, then
A
for every formula ' of L !! (Q 1 ) with qr(') - r . In particular, the equivalence
A holds for every sentence ' of quantifier rank - q . 2
If the structures A and B are finite, then the converse of Proposition 3.1 is
also true: A j q
only if Duplicator has a winnning strategy in
BEF q (A; B). Furthermore, this equivalence holds for infinite structures, too, if the
logic L !! (Q 1 ) is replaced with the infinitary logic L1! (Q 1 ) (cf. [6]). However, the
implication stated in Proposition 3.1 is all that is needed for proving undefinability
results.
3.2 Corollary. Let K be a class of structures. If for every natural number q there
exist structures A and B such that A 2 K , B 62 K and Duplicator has a winning
strategy in BEF q (A; B), then K is not definable in L !! (Q 1 ).
Below we will give a non-trivial application of BEF q (A; B) to finite models. But
to get a feeling for the game, it may be helpful to to first see the use of Corollary
3.2 with a much simpler example, which involves infinite models.
3.3 Example. For each natural number m, let Em be an equivalence relation
on equivalence classes, all of cardinality ! . Similarly, let
an equivalence relation with ! equivalence classes of cardinality ! . We claim that
To see this, consider an arbitrary
partial isomorphism such that . For each i, let
A i be the set of all elements of ! which are Em -equivalent with a i , and let B i
be the set of those elements which are E n -equivalent with b i . Clearly all these sets
are of cardinality ! . Furthermore, since r ! q - m;n,
the sets are also of cardinality
. Hence, there exists a bijection extending p which maps A i onto B i
is a partial isomorphism
In particular, Duplicator can keep choosing
bijections in the game BEF q ((!; Em in such a way that
the mapping f (a is always a partial isomorphism.
Let K be the class of all structures (A; E) such that E is an equivalence relation
on A with finitely many equivalence classes. Since (!; Em
but it follows from Corollary 3.2 that K is not definable in L !! (Q 1 ).
In a similar fashion we see that the class K 0 consisting of those equivalence relations
E) that have an even number of equivalence classes is not definable in L !! (Q 1 ).
Historical remark. The example is a variant of Keisler's counterexample to interpolation
in L !! (Q 1 ). It was realized by Caicedo [3] and V-a-an-anen (cf. [12]) that
this kind of example (though with infinitely many equivalence classes) works for all
monadic quantifiers; a proof using the BEF game was given in [6].
3.1 Branching of one quantifier
In Section 2 we saw that branching a bounded quantifier does not have any effect
on its expressive power. However, the following result shows that branching usually
increases the expressive power even beyond the reach of any monadic quantifiers.
3.4 Theorem. Let Q be a monotone simple monadic quantifier. If Q is un-
bounded, then Br 2 (Q) is not definable in L !! (Q 1 ).
Putting together Theorems 2.3 and 3.4 we obtain a complete characterization of
the definability of Br 2 (Q) in terms of Q for any monotone simple monadic quantifier
Q. Using Theorem 2.5 (and the fact that Br 2 (Q f ) is definable in L !! (Br 2 (Q rel
we get the same characterization for relativizations of such quantifiers. Moreover, 2
can be replaced by any k ? 1, since we have
3.5 Lemma. If Q is a monotone simple unary quantifier, or the relativization of
such a quantifier, then Br k (Q) is definable in L !! (Br k+1 (Q)).
Proof. When simply
which is seen by considering separately the three cases (1)
1. The relativized case is similar. 2
Applying also Fact 1.1, we obtain the following characterization.
3.6 Corollary. Suppose that Q is either a monotone type h1i quantifier, or a
right monotone type h1; 1i quantifier satisfying CONS and EXT. Then the following
conditions are equivalent, for any k ? 1:
(1) Br k (Q) is definable in L !! (Q).
(2) Br k (Q) is definable in L !! (Q 1 ).
(3) Q is bounded.
In [9], Hella and Sandu proved, modifying a model construction by Fagin [5],
that connectivity of (finite) graphs is not definable in terms of monadic quantifiers.
Their proof implies a special case of Corollary 3.6: Br 2 (most) is not definable in
Here we will use a simple trick to modify this proof so that it
works for any unbounded quantifier Q f .
3.7 Definition. Let n be a natural number and E) a graph. We say
that A is n-separable if there exist subsets C; D ' A such that
(C \Theta D) " by K f the
class of all graphs A which are f(jAj)-separable.
Here all graphs are assumed to be undirected, but not necessarily irreflexive.
Thus, a structure (A; E) is a graph if E is a symmetric binary relation on A,
possibly containing self-loops (a; a).
Observe now that a graph (A; E) is in the class K f if and only if its complement
graph E) is in the quantifier Br 2 (Q f ). Hence, we have
3.8 Lemma. For any function f the class K f is definable in the logic
We shall now define two families of graphs that are the heart of the proof of
Theorem 3.4.
3.9 Definition. Let q , r and s be natural numbers, and let P , P 0 , R and
S be mutually disjoint sets of cardinalities respectively.
Assume further that
1. We define two graphs A q;r;s = (A; E) and B
g.
In the case simply by A q and B q .
Thus, one can visualize the graphs A q;r;s and B q;r;s as follows. A q;r;s consists
of a cycle (with self-loops) of length two 'boxes' R and S containing
r and s elements, respectively. Each element in S is connected by an edge to all
elements of A (including itself), whereas the elements in R are not adjacent to any
other elements than those in S . The graph B q;r;s is similar, except that instead of
the big cycle it contains two cycles of length 2
3.10 Lemma. For all natural numbers q , r and s, Duplicator has a winning
strategy in the game BEF q
Proof. We start by observing that the subsets R and S of the universe of A q;r;s
and B q;r;s can be omitted in this proof without loss of generality: Duplicator has a
winning strategy in BEF q only if he has one in BEF q
Indeed, the mapping f 7! f [ id R [ id S for each bijection
any winning strategy of Duplicator in BEF q to a winning strategy
in BEF q On the other hand, if Duplicator wins the game between
the larger structures A q;r;s and B q;r;s , then he wins the game between A q and B q
simply by choosing the restrictions of his bijections to the set P . Hence, it suffices
to show that Duplicator can always win the game BEF q This was already
done in [9] (for cycles without self-loops), but for the sake of completeness we give
here a new proof.
For each k ! be the bijection defined by
ae
(Here we are stipulating that if t - similarly for e i .)
Thus, g k arises by splitting the big cycle in A q into two halves and mapping each
of these halves, in a uniform way, onto one of the small cycles in B q . We will show
below that Duplicator wins the game BEF q choosing bijections of the
form g k for suitable k .
Before describing this winning strategy we need to introduce some auxiliary
concepts. Let C be a subset of P and k and l integers ! 2t. We say that k and
l are C -equivalent if g l (a) = g k (a) for every a 2 C . The splitting points of g k are
. The distance of C from the splitting corresponding to g k
is
splitting pointg;
denotes the usual distance between elements in a graph. Furthermore,
for each a 2 P , we denote by h k (a) the splitting point which is closest to a. Note
that if d k (C) ? 0, then the restriction of the bijection g k to the set C [ fag is a
partial isomorphism A q ! B q for any a 2 P .
We claim now that Duplicator can choose his bijections f in the
game BEF q in such a way that, for each 1 - i - q ,
(1) there is k ! 2t such that f
g-equivalent to f
where a are the elements chosen by Spoiler. This constitutes the
promised winning strategy for Duplicator, since condition (2) implies that the mapping
is the restriction of f q to the set fa
and this restriction is a partial isomorphism by condition (1) for . The claim
is proved by induction on i:
(i) We let f note that conditions (1) and (2) are trivially satisfied
(ii) If a is the unique natural number ! 2t
such that k+2 q\Gamma2
assume as induction hypothesis that conditions (1) and
(2) hold for the bijection f . There are two possibilities: If h k (a i
g, we choose f l for . Then we have
d l (fa
and since there are no elements of fa l or between
c t+k and c t+l , g l is g-equivalent to g k . In the case h k (a i
we let f l for conditions (1) and (2) are seen
to hold by a similar argument.Proof of Theorem 3.4. Note first that in the graph B q;r;s there are no edges
between the sets
whence B q;r;s is (t+r)-separable. On the other hand, A q;r;s is not (t+r)-separable,
since if C; D ' A are sets of cardinality t +r , then either there is an element a of S
in C or D , or there are elements 1g.
In the former case, there is an edge between a and every element of C and D , and
in the latter case, there is an edge between c i and c j (here is where the self-loops
are used).
Now given Q f with f unbounded we can choose n such that t - f(n) - t.
equals the size of the graphs A q;r;s
and B q;r;s , and . By the observation above, B q;r;s is f(n)-separable,
but A q;r;s is not. From Corollary 3.2 and Lemma 3.10 it follows that the class K f is
not definable in L !! (Q 1 ). Since, by Lemma 3.8, K f is definable in L !! (Br 2 (Q f )),
it follows that Br 2 (Q f ) is not definable in L !! (Q 1
3.2 Branching of several quantifiers
We shall now extend the characterization in Corollary 3.6 to the branching of more
than one quantifier. The first thing to observe is that if both f and g are unbounded,
it does not necessarily follow that Br(Q f ; Q g ) is undefinable in L !! (Q f ; Q g ). For
example, let f(n) be n=2 if n is even and n+1 otherwise, and let g(n) be (n+1)=2
if n is odd and n+1 otherwise. Then Br(Q trivially false of every relation,
hence definable in L !! , although Br 2 (Q f ) and Br 2 (Q g ) are both undefinable in
What we need for ) is that f and g are 'jointly unbounded' in the sense
that the proof of Theorem 3.4 can be modified
to show that Br(Q f ; Q g ) is not definable in L !! (Q 1 ). And in fact the converse also
holds: if f; g are not jointly unbounded it can be shown that Br(Q f ; Q g ) is definable
in L !! (Both of these claims will follow from from Theorem 3.12 below.)
But these observations on the branching of two quantifiers do not generalize
immediately to the branching of k quantifiers. First, the condition on f; g; h of
not being jointly unbounded in the above sense turns out to be too weak to permit
the conclusion that Br(Q f ; Q
Lemma 3.5 does not generalize directly to the branching of several quantifiers. This
is because on a model A where
false, whereas if
If we know that h(n) is never 0 or n definable in terms of
as in the proof of Lemma 3.5, but not necessarily otherwise.
It turns out, however, that with a more careful generalization of the notion of
(un)boundedness to sequences of functions, we can obtain a necessary and sufficient
condition for the definability of the branching of k quantifiers.
3.11 bounded if there exists a number t
such that for all n, either
holds for at most one i. Otherwise hf
We also say that
are (un)bounded under these
circumstances.
The relation to the previous concept of boundedness for one function is the
(observe that if P holds of f i for at most one i, k ? 1, and all the f i are equal,
then P does not hold of any f i ). Also, note that if each of f
or even if all but one of them are bounded, then hf
The following theorem generalizes Corollary 3.6.
3.12 Theorem. Let hQ be either a sequence of monotone type h1i quan-
tifiers, or a sequence of right monotone type h1; 1i quantifiers satisfying CONS and
1). Then the following conditions are equivalent:
definable in L !! (Q 1 ).
Proof. (outline) Let hQ
i.
Claim: There are such that for every t there is n
such that
(i) for all l , f l (n) 6= 0 and f l (n)
For, by the unboundedness of hf holds that for every t there is n and
a pair such that (i) and (ii) hold. But there are only finitely many
pairs so for at least one of them, (ii) holds for infinitely many t. From this the
readily follows.
Let, be as in the Claim. Note that now we are essentially back
to the case mentioned above with two 'jointly unbounded' functions. The proof of
Theorem 3.4 is modified as follows. In the two models A q;r;s and B q;r;s , split the
into two subsets R 1 and R 2 with r 1 and r 2 elements, respectively. R 1 and
need not be disjoint but their union is R . Expand the models to A q;r 1 ;r 2 ;s and
by adjoining two unary predicate symbols P 1 and P 2 , which in A q;r 1 ;r 2 ;s
are interpreted as P respectively, and in B q;r 1 ;r 2 ;s as
and elements in R 1 and R 2 are only connected to elements in
S , Duplicator still has a winning strategy in the game BEF q
Consider the sentence
Take any quantifier depth q and choose n such that (i) and (ii) of the Claim hold.
Say
So we take R R of size r 2 , and R 1 as a subset of R of size r 1 . Then n is the
size of the models A q;r 1 ;r 2 ;s and B q;r 1 ;r 2 ;s and f i . It is
then easy to see, using the fact that none of f 1 that the
sentence above is true in B q;r 1 ;r 2 ;s but false in A q;r 1 ;r 2 ;s .
Assume that hf is bounded and let t be the bound. For
i be L !! (Q f i )-sentences such that (cf.
the proof of Theorem 2.3) in a model with universe A,
Let Finally, let \Phi s be a list of all
conjunctions built up from the sentences ' i , - i , ' r
which specify the value
of f i (jAj) for all but one i, and also state that f i (jAj) is not jAj + 1 or 0 for any i.
It follows from the assumption that in any model, either \Theta or \Xi or one of
In models of \Theta the branching sentence
is false, and in models of :\Theta - \Xi it is true. Moreover, we make the following
Claim: For each \Phi j there is a sentence \Psi j in L !! (Q f 1
such that in models
of \Phi j ,
?From this it follows that the branching sentence is logically equivalent to the
sentence
(:\Theta - \Xi) -
s
Proof of the Claim: An example will suffice to give the idea. Suppose that
and that \Phi j says that f 2 that none of f 1 (jAj),
(written semi-formally) is
9 distinct y
(We have and the
conjunct " x 3 62 fz above.) For this sentence says that there are sets Y
and Z g) such that jY
Using the monotonicity of Q f 1
one sees that this is the same as saying that there
are sets X;Y;Z such that jY
which, by the monotonicity of Q f 2
and
, is precisely what the branching sentence
holds.
This proves the Claim, and thereby the Theorem in the unrelativized case. The
case with relativized quantifiers is similar (cf. the proof of Theorem 2.5). 2
4 Definability of Ramseyfication
In this section we show that the Ramsey lift Ram k+1 (Q) of an unbounded quantifier
Q is not definable in L !! (Q). So the situation is analogous to the case of the
branching lift: the lift of Q is definable in L !! (Q) if and only if Q is bounded.
However, in two important respects our results about the Ramsey lift are stronger.
Namely, we prove that for unbounded Q the lift Ram k+1 (Q) is not definable even
in
Recall that L !
1! is the fragment of the infinitary language L1! in
which every formula contains finitely many different variables only, and Q k is the
family of all k-ary generalized quantifiers. Thus we can prove the undefinability
of Ram k+1 (Q) even with respect to infinite disjunctions and conjunctions and even
with arbitrary k-ary generalized quantifiers.
The main interest of L !
is in the fact that it contains various fixpoint
extensions of L !! (Q k ) (see [7, 11]). Intuitively speaking, L !
by allowing recursive definitions.
In Section 3 we introduced the game BEF q (A; B). The point of this was that
if Duplicator has a winning strategy in BEF q (A; B), then A j q
B. We shall
now recall a modification BP l
k (A; B) of BEF q (A; B) from [7] in order to get a
criterion for A j L l 1! (Q k ) B.
The k -bijective l -pebble Ehrenfeucht-Fra-iss'e game, BP l
k (A; B) is defined as fol-
lows: In each round q of the game Duplicator chooses first a bijection f
and Spoiler responds by choosing sets C q ' A and D q ' A so that jD q
and jC q [ D q j - l . Intuitively speaking, Duplicator claims that f q is an isomorphism
and Spoiler tries to dispute this by pointing to the part C q [ D q of A where
he thinks f q does not preserve structure. To check this out the referee defines
(letting rule dictates that Spoiler has to
play in such a way that C q ' dom(p wins the game if for all q the
relation p q is a partial isomorphism A ! B. Spoiler wins if this is not the case, or
if Duplicator cannot make his moves, i.e., if there are no bijections
The difference between BP l
is the following: In the
latter game all moves of Spoiler remain in the game and Duplicator has to create
bigger and bigger partial isomorphisms, whereas in the former game Spoiler can
only up to l previously played elements so the task of Duplicator is easier
but, on the other hand, Duplicator does not know how many moves the game has.
The game BP l
introduces the new feature that Spoiler can let the set D q of
"new" elements contain up to k elements.
4.1 Proposition. A j L l 1! Duplicator has a winning strategy in the
game BP l
Proof. See the proof of Proposition 3.1 and the proof of Corollary 5.9 in [7]. 2
4.2 Corollary. Let Q be a quantifier. If for some sentence ' of L !! (Q) and for
all natural numbers l there exist structures A and B such that A
and Duplicator has a winning strategy in BP l
then Q is not definable in
We shall consider the lift Ram 2 (Q) first, because the construction behind our
result on the general case of Ram k (Q) is different.
4.3 Theorem. If f is unbounded, then Ram 2 (Q f ) is not definable in L !
Proof. Let l - 1 be arbitrary. We show that Ram 2 (Q) is not definable in
The proof is based on a modification of the proof of the main result
of [2]. As in [2], let X be the colored graph which has the following
vertices:
ffl a
for each subset S of ng of even cardinality.
ffl The vertices a i and b i have the same color i and are called mates of each
other,
ffl The vertices m S are colored magenta,
ffl If i 6= j , then a i and a j have different color,
and the following edges:
ffl a i and m S are joined by an edge if i 2 S ,
are joined by an edge if i 62 S .
The relevant properties of these graphs are ([2]):
ffl For any even number of pairs there is an automorphism of X n which
swaps a i and b i for these i and leaves other a j and b j fixed.
Every automorphism of X n is obtained in this way.
2. Let T be a copy of K n , i.e. the complete graph with n vertices.
We define a new graph G as follows: For each vertex v of T, we replace v by a copy
X(v) of X n\Gamma1 . These copies are called gadgets. We endow X(v) with an additional
color which is different for different v . For each w 6= v in T we select one pair
from X(v) and one pair fa i(w;v) ; b i(w;v) g from X(w), in such a way
that all selected pairs in each gadget are distinct. Then we connect with an edge
a i(v;w) to a i(w;v) and b i(v;w) to b i(w;v) . This ends the description of G. The graph H
is defined similarly, except that for one edge (v T, we create a "twist" by
connecting a i(v 0 ;w 0 ) to b i(w 0 ;v 0 ) and b i(v 0 ;w 0 ) to a i(w 0 ;v 0 ) .
Note that because of the coloring, an automorphism of G or H induces an
automorphism of each gadget, and vice versa. The crucial properties of G and H
are:
ffl For any even number of edges of T there is an automorphism
of G (H) which twists f(v leaves other edges
fixed. Every automorphism of G and H is obtained in this way.
ffl For any edge (v; w) of T there is an isomorphism G ! H, where G is
obtained from G by twisting (v; w) and leaving other edges fixed.
ffl G and H are not isomorphic.
Since f is unbounded, there is a natural number m so that d -
be the disjoint union of G and two complete
graphs K u and K v , where
Likewise, let H 0 be the disjoint union of H, K u and K v . In both graphs the clique
K u is colored beige and K v violet. Note that the number of vertices of both G 0
and H 0 is exactly m.
The automorphisms of G 0 consist of an automorphism of G plus permutations
of K u and K v . The same holds for H 0 . Thus all the automorphisms of G 0 and H 0
are known. The same is true of isomorphisms G 0 ! H 0 , where G 0 is obtained
from G 0 by twisting an edge (v; w) of T and leaving other edges fixed.
We shall now show that G 0 j L l 1! by describing a winning strategy of
Duplicator in BP l
The task of Duplicator is to choose bijections G
Suppose Duplicator has played f q\Gamma1 , Spoiler has played C q\Gamma1 and D q\Gamma1 and the
referee has defined which is indeed a partial
We assume that Duplicator found f
by choosing a vertex v q\Gamma1 from T, twisting an edge adjacent to it and letting f
be the arising isomorphim onto H 0 . Naturally, v q\Gamma1 had to be chosen carefully.
Now, Duplicator chooses v q 6= v q\Gamma1 so that X(v q ) does not meet C This
is possible because n ? l + 1. Then he twists the edge (v q ; v q\Gamma1 ) and lets f q be
the arising isomorphism onto H 0 such that p q\Gamma1 ' f q . Next Spoiler plays C q and
D q and the referee defines p This is a partial isomorphism
is a singleton and no edge with one end in dom(p
twisted when f q was defined. This ends the description of the winning strategy of
Duplicator in BP k
ending the proof of G
We shall next describe the sentence of L !! (Ram 2 (Q)) that separates these two
graphs. The sentence stipulates the existence of a set which contains all beige
elements and exactly one element from the magenta part of each gadget X
Once we have this one fixed element x in the magenta part of a gadget, we can
divide each pair (a into the element with an edge to x - call it "lower" - and
the element without an edge to x - call it "upper" . The sentence we need says:
There is a set X such that jXj - f(m) and any two distinct elements x and y from
1. x is magenta or beige,
2. If x and y are not beige, then they are in different gadgets,
3. If there is a connection from the gadget of x to the gadget of y , it connects
"upper" elements to "upper" elements.
To see that this sentence really separates G 0 and H 0 we first note that the sentence
is true in G 0 , since we can let X consist of all beige elements plus the element m ;
from all gadgets. Then On the other hand, suppose such a
set X existed in H 0 . Since elements of X are either beige or in different gadgets,
actually consists of exactly the
beige elements and exactly one vertex from the magenta part of each gadget. This
element has the form m S for some set S of even cardinality, so the a i for i 2 S are
"lower". Now, in each gadget, flip the even number of pairs (a leave
the others. This results in an automorphism h of H 0 such that, in each gadget,
But with respect to m ; , all the a i are "upper". Since part 3 of the
sentence is true (for h(x) and h(y)), it follows that H 0 must be isomorphic to G 0 ,
which is a contradiction. Thus the sentence is false in H 0 , and the proof is finished.4.4 Theorem. If f is unbounded, then Ram k+1 (Q f ) is not definable in L !
Proof. The case Theorem 4.3, so we assume k ? 1. Fix l - 1. We
use the models constructed in [7]. By general results
in [7] we have A j L l 1! (Q k ) B. By [7, Corollary 8.8] A and B can be separated by
We shall make a little modification to the proof of
[7, Corollary 8.8] in order to cover an arbitrary unbounded f .
Let x be the size of the graph G. Note that A has a homogeneous subset of
cardinality does not. With this in mind, and since f is unbounded,
we choose an n with
extend the model A with two disjoint sets U and V , where jU
and f(n). The elements of U are colored beige and the elements
of V violet. The same extension is applied to B. We get two new models A 0 and
. We can separate these models with
the sentence Ram k+1 (Q)x is the
disjunction of /(x Corollary 8.8] and the formula " x 1 is beige".Combining Theorems 2.3 and 4.4 we obtain a complete characterization of the
definability of Ramseyfication for all monotone simple monadic quantifiers. And
as in the case of branching, the same characterization holds also for relativizations
of such quantifiers (this follows from Theorem 2.5 and the fact that Ram k (Q f ) is
definable in L !! (Ram k (Q rel
f ))).
4.5 Corollary. Suppose that Q is either a monotone type h1i quantifier, or a
right monotone type h1; 1i quantifier satisfying CONS and EXT. Then the following
conditions are equivalent, for any k - 1:
(1) Ram k+1 (Q) is definable in L !! (Q).
(2) Ram k+1 (Q) is definable in L !! (Q k ).
(3) Q is bounded.
5 Definability of resumption
We do not have as strong results for Res k (Q) as for Br k (Q) and Ram k+1 (Q) above.
In fact, it is proved in [11] that for type h1i Q, Res k (Q) is always definable in
extends to resumptions of any monadic quantifiers). But we prove
that if f is unbounded in a sense which is appropriate from the resumption point of
view, then Res k (Q f ) is not definable in L !
and hence not in L !! (M), where M is the collection of all monotone type h1i
quantifiers. For this result we need again a new version of an Ehrenfeucht-Fra-iss'e
type game from [11].
Ig be a family of type h1i quantifiers, A and B two
structures, and l a positive integer. The game MEF l (Q; A;B) has the following
rules: There are l pairs of pebbles. During the game Spoiler may take a pebble
and put it on an element of one of the models, and then Duplicator has to take the
corresponding pebble and put it on an element of the other model. If all pebbles
have been used already, Spoiler can remove one of his pebbles from one of the models
and reposition it on another element of one of the model. In such a case Duplicator
has to reposition the corresponding pebble on some element of the other model.
These pebble moves are called elementary moves.
There is another type of move that Spoiler can choose to make. This is called
a quantifier move. In this move Spoiler takes a pebble, one of the structures A
and B, say A, a quantifier Q j from the family Q, and a subset X of the universe
A of A such that the structure (A; X) is in the quantifier Q j , and the set X is
invariant under all automorphisms of A that fix all pebbled elements. Duplicator
must respond by choosing a subset Y of the universe of the other structure (in this
case Y must be a subset of the universe B of B) such that the structure (B; Y )
is in the quantifier Q j . Then Spoiler places the pebble on an element b 1 2 Y and
Duplicator must respond by placing a pebble on an element a 1 2 X .
In each round of the game Spoiler first makes an elementary move or a quantifier
move and then Duplicator responds as described above. This is repeated indefinitely.
After each round the referee checks if Spoiler has won already. For this, let a i and
, be the elements of A and B respectively pebbled by the two
players using the up to k pebbles available. If the mapping a
to be a partial isomorphism between A and B, then Spoiler wins. Otherwise, the
game goes on. If the game lasts for infinitely many moves without Spoiler winning,
then Duplicator is declared the winner.
5.1 Proposition. ([11]) Let Ig be a family of monotone type
quantifiers, A and B two finite structures, and l a positive integer. Then the
following statements are equivalent:
(3) Duplicator has a winning strategy for the game MEF l (Q; A;B).
5.2 Corollary. ([11]) Let Q be a quantifier and Q a family of monotone type h1i
quantifiers. If for some sentence ' of L !! (Q) and for all natural numbers l there
exist structures A and B such that A and Duplicator has a winning
strategy in MEF l (Q; A;B), then Q is not definable in L !
1! (Q).
We shall now give some examples concerning the definability of Res k (Q f ) in
The examples display characteristic features of resumption in this respect.
5.3 Proposition. Both boundedness of f and unboundedness of f are consistent
with Res k (Q f ) being definable in L !! (Q f ), but neither condition is sufficient or
necessary for this to hold.
Proof. Suppose is a k 'th power and
Then f is bounded and Q f is not first order (cf. Theorem 2.1), but Res k (Q f )
is. Hence Res k (Q f ) is trivially definable from Q f . Thus boundedness is consistent
with Res k (Q f ) being definable in L !! even when Q f is not.
To see that boundedness is not sufficient for Res k (Q f ) to be definable from Q f ,
suppose is the k'th power of a prime and
Then f is bounded and Q f is not first order. Moreover, Res k (Q f ) is not definable
from Q f , as the following argument shows: We can use Res k (Q f ) to define the
property "the size of the universe is a prime". But we can use Corollary 5.2 to
show that this property is not definable from l is a natural number.
l be a prime such that wins the game
Unboundedness of f is consistent with Res k (Q f ) being definable in L !! even
when Q f is not. To see this, suppose is a k 'th power and
otherwise. Then f is unbounded and Q f is not first order, but Res k (Q f ) is.
Finally, suppose is the k'th power of a prime and
otherwise. Then f is unbounded, Q f is not first order, and Res k (Q f ) is not definable
from Q f , because "the size of the universe is a prime" is definable from Res k (Q f ),
but not from Q f . 2
5.4 Definition. Let f be a function. The function f 0 is said to be
determined by f if for all m;n
5.5 Proposition. Suppose f is bounded and f(n k ) is determined by f . Then
Res k (Q f ) is definable in L !! (Q f ).
Proof. Let m, - , ' p , / q (p ? 0; q - 0) be as in the proof of Theorem 2.3,
and let '
sentence in L !! saying of a k-ary predicate R that the
number of k-tuples it contains is at least i (jAj k \Gamma i). By assumption there are
functions g and h such that f(n k
Res k (Q f )x equivalent to the L !! (Q f )-sentence
i!m
i!m
)The condition of Theorem 5.5 holds, for example, for the following
divides n
Thus Res k (Q fp ) is definable from Q fp . By a result of M. Mostowski ([17]), resump-
tions of the stronger divisibility quantifiers
divides the number of elements x satisfying OE(x):
are likewise definable from the quantifiers themselves.
is unbounded on X , if
is bounded on X .
The following theorem is the main result of this section:
5.7 Theorem. Suppose f is unbounded on fn k 2. Then
Res k (Q f ) is not definable in L !
Proof. For every m there is an n so that m - f(n k m. This f(n k ) is
either - [n k =2] or ? [n k =2]. One of these possibilities occurs infinitely often, and
hence we have
or
We start by assuming (1) and indicate at the end of the proof how to handle the
case that (2) holds.
Suppose are functions and l is a natural number. We are going to
prove that Res k (Q f ) is not definable in L l
consist of intervals of the following form:
We call a real a 2 [0; n] n-good, if a is not on any of the intervals in I n . A set
if each of its elements is. A direct calculation reveals that if
I is a subinterval of [0; n] of length -
there is an n-good subinterval J of I of length x. Let C
. By (1) there is an n such that
-=n .
s
s
In either case we have proved the claim.
2. There are an n-good x and a non-integer n-good y ? x on [0; n] so
that x
By Claim 1, there is an n-good subinterval I of [-] of length ? C 1 . On
the interval [-] the function F derivative
so the interval F 00 I has length ? C 1 . Hence there is a non-integer
n-good I . Now also x is n-good and x
proved.
Let a be the integer part of x, and b the integer part of y . We define now two
structures
ng
ag
bg.
3. Duplicator wins the game MEF l (fQ
The elementary moves are easy for Duplicator. Suppose then Spoiler chooses
a pebble, the model A, the quantifier Q and an invariant subset X of A with
furthermore that the pebbled elements in A are a
that Duplicator has not lost the game yet. Let the correspondingly
pebbled elements of B be b . For any set Z and d 2 f0; 1g let Z
is invariant under automorphisms of A that fix the elements
there are d 1 ; d 2 ; d 3 2 f0; 1g so that
where
Let
and
even then jjX
Therefore we can make the following inference, making use of the n-goodness of
x t. Hence jX
contrary to assumption. This inference shows that jY j - g j (n). So
Duplicator can play the set Y . Next Spoiler puts the pebble on some element y of
Y . It is now easy for Duplicator to put his pebble on an element x of X so that
the following condition are satisfied:
only if
To end the proof we have to exhibit a sentence of L !! (Res k (Q f )) which distinguishes
A and B. Consider the sentence
of L !! (Res k (Q f )). This sentence is true in A but false in B
because
a
We made the assumption that (1) holds. Suppose now (2) holds. We proceed
as above until the definition of n and -. This time we use (2) to find an n so that
we can continue as above. When we come to the sentence ', we replace it with
:Res k (Q f )x
The theorem is proved. 2
A special case of the above theorem - that Res 2 (Q f ) is not definable in L !! (Q f )
for proved in [19].
5.8 Theorem. The following conditions are equivalent for any monotone simple
monadic quantifier Q and any k - 2:
Res k (Q) is definable in L !! (M).
(2) Q is bounded on fn k !g.
Proof. Theorem 5.7 gives (1) ) (2). Assume then (2). So there is a number
m such that for all n, either
or
sentence in L !! (Q g ) (L !! (Q h )) saying that
i), and let \Phi i and \Psi i ) be as in the proof of Proposition 5.5. Then the sentence
Res k (Q f )x equivalent to the L !! (Q )-sentence
i!m
i!m
The field of definability of generalized quantifiers on finite structures is full of open
problems. Especially the polyadic quantifiers as well as the non-monotone ones
give rise to problems that no one knows how to approach. In this paper we have
considered certain polyadic lifts of monotone quantifiers, obtaining the following
results
I.
definable in L !! (Q f 1
is definable in L !!
II. Ram k (Q f ) is definable in L !! (Q f )
iff f is bounded.
III. Res k (Q f ) is definable in L !! (M) iff f is bounded on fn k !g.
I and II were also proved for relativizations of monotone simple unary quantifiers.
The following questions seem to be the most natural direction to continue the work
of this paper:
1. Find necessary and sufficient conditions for Br(Q f 1
to be definable
in
2. Find necessary and sufficient conditions for Res k (Q) to be definable in L !! (Q).
This question makes sense for non-monadic and non-monotone quantifiers, too.
3. Find necessary and sufficient conditions for Res 2 (Q f ) to be definable in L !! (Q 1 ).
(As we mentioned in the Introduction, K. Luosto [15] has proved that Res 2 (Q f )
is not definable in L !!
4. Find a suitable extension of III to relativizations of monotone simple unary
quantifiers.
--R
On branching quantifiers in English
Maximality and Interpolation in Abstract Logic
Journal of Logic and Computation
Definability hierarchies of generalized quantifiers
Logical hierarchies in PTIME
Partially ordered connectives and finite graphs
Kolaitis and J.
First order predicate logic with generalized quantifiers
On extensions of elementary logic
The hierarchy of monadic quantifiers
Computable quantifiers and logics over finite struc- tures
The logic of divisibility
Quantifiers in formal and natural languages
Relativization of quantifiers in finite models
Quantifiers in natural language - a survey of some recent work
--TR
--CTR
Jouko Vnnen, Unary Quantifiers on Finite Models, Journal of Logic, Language and Information, v.6 n.3, p.275-304, July 1997 | resumption;ramsey quantifier;branching;finite model theory;generalized quantifier |
595891 | Reasoning about Information Change. | In this paper we introduce Dynamic Epistemic Logic, which is a logic for reasoning about information change in a multi-agent system. The information structures we use are based on non-well-founded sets, and can be conceived as bisimulation classes of Kripke models. On these structures, we define a notion of information change that is inspired by Update Semantics (Veltman, 1996). We give a sound and complete axiomatization of the resulting logic, and we discuss applications to the puzzle of the dirty children, and to knowledge programs. | Introduction
Recently the notions of information and information change have gained a
prominent place in several fields of scientific research, such as philosophy, the
formal semantics of natural language and computer science. The present paper
highlights two of such developments, namely the update semantics of Veltman
(1996), and the analysis of communication in distributed systems, in particular
the approach of Fagin et al. (1995). Our main goal here is to show that tools of
the former may provide useful supplements to the approach of the latter.
Update Semantics
In his influential paper 'Defaults in Update Semantics,' Frank Veltman presents
a dynamic view on meaning. Following the slogan "You know the meaning of
a sentence if you know the change it brings about in the information state of
anyone who accepts the news conveyed by it," the meaning of a sentence is
associated with a function on information states. We will discuss Veltman's
update semantics as a simple example to illustrate the main notions involved.
The language of update semantics is a standard propositional modal language.
Definition 2.1 (Language) Given a set of propositional variables P , the language
LP of update semantics is the smallest set containing P such that if OE
and / are in LP , then OE - /, :OE and 3OE are in LP . 2
As said, we will interpret sentences as functions on information states. The
notion of information state used in update semantics is a very simple one. 1
Definition 2.2 (Information states)
ffl A possible world w assigns to each propositional variable a truth-value; it
is a function 1g.
ffl An information state oe is a set of possible worlds. 2
Veltman introduces more complex notions of information state to model reasoning with
default rules.
Intuitively, if an agent is in information state oe, then oe contains all worlds
that are compatible with the agent's information: for all the agent knows, each
possible world in oe may picture reality correctly. For example, the information
state consisting of the set of all possible worlds represents an information state
of an agent that has no information about the world at all, and the empty set
is an information state in which an agent has contradictory information.
When oe is an information state, and OE a sentence, we will write oe[OE] for
the result of updating oe with the sentence OE. Intuitively, oe[OE] is the state that
results when the agent, being in state oe, gets the information expressed by OE.
Definition 2.3 (Interpretation)
ae
oe if oe[OE]
update of an information state oe with a sentence p results in a state containing
all and only the worlds in oe in which p is true. The result of updating
a state oe with a negated sentence is a state containing all worlds in oe that do
not survive in oe updated with OE. Conjunction is defined as intersection.
A sentence of the form 3OE gets an interpretation roughly corresponding to
the intuitive meaning of 'It might be the case that OE.' An update of oe with
3OE either returns the same information state (when oe updated with OE does
not result in the empty state, i.e. when OE is compatible with the information
contained in oe), or it returns the inconsistent state (when OE is not compatible
with the information contained in oe). This reflects the assumption that an
agent in a state oe already knows what she considers possible and what not,
which means that a sentence of the form 'It might be that.' can never provide
new information; at most, it can be inconsistent with the information contained
in oe.
Definition 2.4 (Acceptance and validity)
ffl A sentence OE is accepted in an information state oe iff
oe k\Gamma\Gamma OE.
ffl A sequence of sentences acceptable iff there is a oe such that
ffl An argument OE updating any information state with
the premises in the order they are given, result in a state in which the
conclusion is accepted:
A sentence is accepted in an information state if an update with OE does not
change the information state. Intuitively, this happens only when the information
that OE is already contained in oe. A sequence of sentences is acceptable
when there is a state in which updating with the sentences in the order they
are given does not result in the inconsistent empty state. An argument is valid
iff updating an information state with the premises in the order they are given,
results in a state in which the conclusion is accepted.
One of the interesting features of update semantics is that the order in
which sentences in a text occur is important. In general, it is not the case that
correctly reflects the fact that changing the order of the
sentences of a text will in general produce a different story, which need not even
be coherent. Consider for example the following two examples:
Someone is knocking at the door.It might be John.It is Mary.
Someone is knocking at the door.It is Mary.It might be John.
The first sequence of sentences is acceptable, while the second is not: once one
knows it is Mary who is knocking at the door, it cannot be John anymore. This
is reflected in update semantics: 3p; :p is acceptable, while :p; 3p is not.
Another feature of update semantics is that updates always imply an increase
of information, in the sense that an update of an information state oe always
results in a state that is a subset of oe. i.e. oe[OE] ' oe. But this does not mean all
sentences that are accepted in the first state are also accepted in the updated
state. A typical case is a state oe containing two worlds w and v, with
and This is a state in which the agent does not know whether p is
true or not. In such a state, 3p is accepted. But as soon as the agent learns
that p is not the case, p is not considered possible anymore: in the state oe[:p],
3p is not accepted.
3 Dynamic Epistemic Semantics
Update semantics is a semantics that models the information change of a single
agent. In this section, we develop a semantics for a language in which it is
possible to express facts about the information and information change of several
agents. 2 The language is the following:
Definition 3.1 (Language of DES)
Let A be a non-empty set of agents, and let P be a set of propositional atoms.
The language L A
P of DES is the smallest set such that P ' L, and if OE and /
are in L A
P , and a 2 A, then :OE; OE - /; 2 a OE and [OE] a / are in L A
2 For an approach that uses a similar language, and employs a notion of constructive update
over partial Kripke models, see Jaspars (1994).
Other logical constants, such as -, ! and 3 a , are defined in the standard way.
We will refer to the part of the language that does not contain the [\Delta] a -operator
as the 'classical fragment of the language'. This is just the language of classical
multi-modal logic.
The intended interpretation of 2 a OE is that agent a has the information that
OE. The intended meaning of [OE] a / is that an update of a's information with OE
results in a situation where / is true. There is an operator [OE] a for each agent a
and each sentence OE in the language, which reflects the idea that any statement
about the system of agents and their beliefs is something which the the agents
may learn. This makes the agents effectively as 'intelligent' as us theoreticians,
i.e. in principle any property of the system we are able to formulate in the
object language may be known or learned by the agents.
To give a semantics for this language, we first need to make a choice as to
how to represent the information of the agents. We believe that a representation
that is based on non-well-founded sets is the most elegant way to do this. 3
Definition 3.2 (Possibilities)
Let A, a set of agents, and P , a set of propositional variables, be given.
ffl A possibility w is a function that assigns to each propositional variable
1g, and to each agent a 2 A an information
state w(a).
ffl An information state oe is a set of possibilities. 2
Clearly, this definition is circular, since possibilities are defined in terms of information
states, and information states are sets of possibilities. In the universe
of non-well-founded sets of Aczel (1988), this circularity is harmless. 4
A possibility w characterizes which propositions are true and which are false
by assigning to each atomic sentence a truth value, and it characterizes the
information of each of the agents by assigning to each agent an information
state. The information of an agent is represented, as it is in update semantics,
as a set of possible ways the world might be, according to that agent. In this
case, this is a set of possibilities.
There is a close relation between these non-well-founded models and Kripke-
structures; to be precise, there is a one-one-relation between possibilities and
bisimulation classes of worlds in Kripke models, that preserves truth of the
classical fragment of the language.
Definition 3.3 Let (R a
A decoration of M is a function that assigns to each w 2 W a function d(w) on
such that
3 See Groeneveld (1995) for a discussion of the semantics of DES using Kripke models and
the knowledge structures of Fagin and Halpern (Fagin et al. 1991).
4 The underlying set-theory is axiomatized by ZFC \Gamma (the Zermelo-Fraenkel axioms minus
the axiom of foundation) plus Aczel's Anti-Foundation Axiom (AFA).
assigns to each propositional variable the
same truth-value as it has in w in the model.
assigns to each agent a the set of
functions associated with worlds reachable from w by R a .
If d is a decoration of M , and w a world in M , we say that d(w) is the solution
of w in M , and (M;w) is a picture of d(w). 2
Proposition 3.4
ffl Each Kripke model M has a unique decoration. This decoration assigns
to each world in M a possibility.
ffl Each possibility has a picture.
ffl w in M and w 0 in M 0 have the same solution iff w and w 0 are bisimilar. 2
This means that possibilities can be seen as representing bisimulation classes of
worlds in Kripke models. Moreover, it implies the Bisimulation Principle (3.5
below) which we will frequently use later. In the following definition, we use the
notation w[B]v, for B a set of agent, to stand for the fact that w and v differ at
most from each other in the information states they assign to agent in B.
Proposition 3.5 (Bisimulation Principle) A bisimulation between possibilities
is any relation B such that wBv iff w[A]v and for each a 2 A, if w
there is a v 0 2 v(a) such that w 0 Bv 0 , and if v 0 2 v(a), then there is a w
such that w 0 Bv 0 .
If B is a bisimulation, then for all possibilities w; v: if wBv then
Properties of possibilities
One of the charms of Kripke semantics is the fact that properties of information
such as positive introspection or consistency correspond to certain simple
properties on frames, such as transitivity and seriality of the accessibility rela-
tions. Here are some examples of constraints on possibilities that correspond to
familiar frame constraints.
Definition 3.6 Call a class of possibilities S closed iff it holds that if w 2 S
1. C, the class of consistent possibilities is the largest closed class such that
2. T , the class of truthful possibilities is the largest closed class such that
3. P , the class of positive introspective possibilities is the largest closed class
such that w 2 P and v 2 w(a) imply v(a) ' w(a)
4. N , the class of negative introspective possibilities is the largest closed class
such that w 2 N and v 2 w(a) imply w(a) ' v(a) 2
Of special interest is the class of fully introspective possibilities P " N (which
is a closed class).
Conscious updates
In update semantics, if an agent updates her information with p she will discard
all possible worlds in which p is false. But if her epistemic alternatives are not
classical possible worlds, but possibilities as we have defined them, there will
be no point in also preserving those options in which p is true but in which the
agent does not have the information that p. Ideally, she will also accommodate
for the fact that she has learned p, and after having learned that p, she will not
only have the information that p, but on top of that have the information that
she has the information that p. And so on. We will refer to such an update as a
'conscious' update: the agent who gets new information is conscious of the fact
that she gets this new information.
Note that this is not an 'eliminative' process. A conscious update is not
one in which one simply discards possibilities to reach a state in which one
has more information. For example, consider a situation in which an agent a
does not know whether p, and knows that she does not know this. This will
be modeled by a possibility w such that the set of possibilities w(a) will only
contain possibilities in which a does not know whether p. Removing all non-p-
possibilities from this information state leaves the agent with a set of possibilities
in which p is true, but in which she does not know whether p.
We use the idea of conscious update for for interpreting sentences of the
form [OE] a /, which will be interpreted as 'after a consciously updates with OE,
/ is true.' To do this, we first have to give a formal definition of conscious
update. We will define for each sentence OE and each a 2 A a function [[OE]] a on
possibilities in such a way that applying this function to a possibility returns a
new possibility that is the result of updating a's information state consciously
with the information that OE. Remember that we use the notation w[a]v as an
abbreviation for the statement that w and v differ at most in the information
state they assign to a.
Definition 3.7 (Conscious updates)
a is that w 0 such that w[a]w 0 and w OEg.
So a conscious update of a's information in a possibility w changes the possibility
w in such a way that only a's information state is changed (i.e. the new
possibility differs from the old one only in the information state that is assigned
to a), and this is done in the following way: all possibilities in which OE is not
true are eliminated from a's information state, and in all remaining possibilities,
a's information state is consciously updated with OE.
That this notion of update is well-defined needs some proof. We will rely on
the Solution Lemma of Aczel (1988), which is standardly used in the set theory
ZFC/AFA for establishing the existence of non-well-founded sets, to prove that
that there is in fact a relation that conforms to definition 3.7. Then, we will
give an argument using the bisimulation principle to show that this relation is
the only relation conforming to the definition.
To prove the existence of the update function, fix an actor a 2 A and
some proposition p (i.e. p is a class of possibilities). For each possibility w,
introduce an indeterminate xw , and consider the class of equations defined by
the stipulations
ag [ f(a; fx
By the Solution Lemma this system has a unique solution, which in this case is a
map - from indeterminates to possibilities. Then define cu(a; p), the conscious
update with p for a by
It is not hard to check that it holds that (w; v) 2 cu(a; p) iff w[a]v and
which shows that cu(a; p) is the
function we were looking for.
To show that the update function is unique for each OE and a, assume that
there are in fact two functions f and f 0 that conform to definition 3.7. Note
that by the definition, both of these functions will be total on the class of all
possibilities. We will show that it holds for each possibility w, that
(w). For define a relation B as:
We claim that B is a bisimulation, from which it follows by the bisimulation
principle that so we need to show that for each w
there is a v 0 2 v(a) such that w 0 Bv 0 , and vice versa. Take any w 0 2 w(a). Then,
there must be a u 0 2 u(a) such that u 0
f 0 is a total function, there must be a v 0 2 v(a) such that f 0
this v 0 it holds that w 0 Bv 0 . The other direction is completely symmetric, which
shows that B is a bisimulation.
Definition 3.8 (Truth)
Technically we have to conceive of definitions 3.7 and 3.8 as one simultaneous
definition, since the definition of update uses the notion of truth and vice versa.
This offers no problems, however, and we have only separated the two for clarity.
All classical logical operators are interpreted classically: a conjunction is true
just in case both conjuncts are, a negation is true iff the negated sentence is not
true, 2 a OE is true just in case OE is true in each possibility in a's information state.
New is the definition for [OE] a /: such a sentence is true in a possibility w exactly
when / is true in the possibility that results from updating a's information state
in w with OE. We define validity in the standard way, i.e. for each
possibility w, and for each set of sentences \Gamma, \Gamma for each possibility w
such that w
Update Semantics
It turns out that validity in update semantics can be expressed in DES by
identifying a US-update with a conscious update in DES in a fully introspective
possibility. The validity of an argument-updating with the premises results in
an information state in which the conclusion is accepted-can then be expressed
in DES by a sentence expressing that after an agent consciously updates with the
premises, then she will accept the conclusion, i.e. she will have the information
that the conclusion holds.
Proposition 3.9 Let for each OE in the language of update semantics, OE 0 be just
like OE, except that each occurrence of 3 is replaced by 3 a . Then:
fully introspective w, w
Group Updates
Common knowledge is a concept that crops up in several places in the literature
on distributed systems in computer science, in the literature on game theory in
philosophy and economics and in the literature on pragmatics in linguistics. The
concept is most easily explained as follows: a sentence OE is common knowledge
between a group of agents B just in case each agent in B knows OE, each agent
knows of each other agent that he knows OE, and so on.
What we will do here is model the effect of a sentence becoming common
knowledge between a certain group of agents, and add operators [OE] B for each
A to express this in the object language. Such an operator may be useful,
for example, to formalize an idea in the theory of discourse that the purpose of
an assertion is to extend the common knowledge of speaker and hearer.
Definition 3.10 (Conscious group update)
B is that w 0 such that w[B]w 0 and w
for each a 2 B.
A group update with OE in a possibility w results in a new possibility in which
only the information of the agents in the group has changed. For each agent in
the group, the new information state consists of all the old possibilities in which
OE is true updated with the information that OE becomes common knowledge
between the agents in the group.
This definition is structurally similar to the definition given for conscious
updates above. In fact, it holds that for each w, w[[OE]] a = w[[OE]] fag . Also,
the proof that definition 3.10 is in fact correct is entirely analogous to the
coinduction argument we gave for definition 3.7, for which reason we won't
repeat the argument.
We can now extend the truth definition of DES with the following clause:
Axiomatization
In this section, we provide an axiomatization of the language of DES with group
updates, and prove that it is sound and complete with respect to the semantics.
Definition 3.11 (Conscious K)
The system CK is defined by the following axioms and rules.
Axioms
is valid in classical propositional logic
A3
is an atom. (independence)
(Generalized Ramsey Axiom)
a OE if a 62 B. (Privacy Axiom)
Rules
Nec2 If ' OE then ' 2 a OE
Nec[\Delta] If ' OE then ' [/] B OE
there is a derivation of OE from assumptions in \Gamma. 2
So, in addition to the rules and axioms of classical model logic, the deduction
system consists axioms describing the interaction between the dynamic operators
and the classical logical constants. Axiom 3 together with the rule Nec[\Delta]
guarantee that the dynamic operators behave as normal modal operators. Axiom
4 expresses that updates are functional: if it is not the case that a certain
sentence is true after an update with a certain sentence, then, since the update
always gives a unique result, it must be the case that the negation of that sentence
is true in the updated possibility. Axiom 5 expresses that the update of
an information state has no effect on the 'real' world; the same propositional
atoms will be true or false before and after an update. Axiom 6 expresses that
if it is the case that after a group update with OE, some agent in the group knows
that /, then that agent already knew that if OE were true, then after a group
update with OE, / would be true, and vice versa. Axiom 7, finally, expresses that
a group update has no effect on the information of agents outside of that group.
Proposition 3.12 (Soundness) If \Gamma 'CK OE then \Gamma
proof: A standard induction; by way of illustration, we show the correctness
of axiom 6, and leave the remaining cases to the reader. We have the following
equivalences, if a 2 B:
Proposition 3.13
proof: We use a variation on the classical Henkin proof for completeness of
modal logic, showing that for each consistent set of sentences there is a possibility
in which these sentences are true.
It is easy to show that each consistent set can be extended to a maximal
consistent set (we will refer to this as 'Lindenbaum's Lemma'). Let, for each
maximal consistent set \Sigma, w \Sigma be that possibility such that w \Sigma
and for each agent b: w \Sigma consistent and if 2 b / 2 \Sigma,
then \Gammag. 5 We prove the usual Truth Lemma, that is, for each sentence
- it holds that - 2 \Sigma iff w \Sigma Completeness then follows by standard
argumentation. The Truth Lemma is proven by an induction on the structure
of -, in which all cases are standard, except the case where - is of the form
5 In the terminology of definition 3.3, this model is the solution of the standard canonical
model for the minimal modal logic K. Alternatively, the existence of the possibilities w \Gamma is
easily proven by defining the appropriate set of equations, and an appeal to the Solution
Lemma.
/. The proof for this case rests on the following idea. Just as membership
in w \Sigma (a) depends on the formulae of the form 2 a OE in \Sigma, the B-update of w \Sigma
with OE depends on the formulae of the form [OE] B / in \Sigma. This is reflected by the
following operation on maximal consistent sets:
\Gammag
The functionality axiom A4 will ensure that will be a maximal consistent
set whenever \Gamma is. The step in the Truth Lemma for formulae of the form [OE] B /
then proceeds as follows:
(by 3.14 and induction hypothesis on OE)
(by induction hypothesis on /)
(by definition of \Sigma ffl B OE)
Which only leaves the next lemma. 2
Lemma 3.14 Let OE be fixed, and assume that for each maximal consistent \Sigma,
proof: Define a relation R on possibilities by
there exists a maximal consistent
set \Sigma such that
We will show that R is a bisimulation. The Bisimulation Principle 3.5 then
implies that R actually is an identity relation, which proves the lemma.
Let wRv, and suppose (the case that
easy). We need to show three things:
1. w[A]v.
(by the semantics) iff p 2 \Sigma (by the definition
of
2. Next we must show that for each b 2 A, if w 0 2 w(b) then there is a
We distinguish two cases: b 2 B, and b 62 B.
Assume that b 62 B. It then follows by axiom 7 that
which implies that w \Sigma (b). But by the definition of
and the fact that b 62 B, we have w \Sigma actually
v(b) in this case, which is certainly sufficient.
For the other case, let b 2 B and take any w (b). Then there
must be a \Sigma 0 that is maximal consistent such that w \Sigma 0
and w \Sigma (b). The latter implies that if 2 b - 2 \Sigma, then - 2 \Sigma 0 .
We want to find a v 0 such that (I) v
the set \Sigma . It is then immediate that (II)
holds. To see that (I) holds, take any 2 b / 2
and hence, by axiom
Because w \Sigma 0 by the main assumption of this lemma that
which means that / 2 \Sigma
was arbitrary, it follows that w \Sigma (b), which is what we wanted
to prove.
3. Finally we must show that for each b 2 A, if v 0 2 v(b) then there is a
If b 62 B, we can use the same argument as in case (2). So assume instead
that b 2 B, and take any w (b).
Consider the set \Sigmag. Below we
show that \Delta is consistent (III). Then \Delta can be extended by Lindenbaum's
Lemma to a maximal consistent set \Sigma 0 , for which it holds, by definition
of \Delta that w \Sigma This implies that w \Sigma 0
it is not hard to see that by definition of \Delta and the
functionality axiom it holds that It then follows that that
To see (III), suppose to the contrary that \Delta is inconsistent. Then there
must be
That means that:
(using A3 and A4)
which means that
by the fact that
contradicting the fact that \Gamma is consistent.Some observations and remarks
Here follows a short list of validities and non-validities.
Proposition 3.15
1. (there is no difference between updating with
updating with / - OE)
2. (updating first with OE and then with / is different
from updating with / first, and after that with OE.)
3. (updates of the information of one
group does not affect updates of the information of a disjoint group)
4. If ' OE (if two sentences have the same truth
conditions, they are also equivalent as updates)
It is possible to combine the notion of conscious update with stronger epistemic
logics. This is unproblematic for the logic of introspection: if we add the
introspection axioms of K45 to the axioms of CK, the resulting logic CK45 is
sound and complete with respect to the class of introspective possibilities. For
other well known epistemic logics such as KD45 or S5, updates will be partial
functions, since conscious updates don't necessarily preserve the properties of
consistency and correctness.
We sketch some details for one special case, S5. We take K to be the class of
truthful and introspective possibilities (positive and negative; see definition 3.6).
The K-update
a is then defined as the restriction of [[OE]] a to possibilities in
K. This will make the updates partial functions. For example, for an atom p this
will have the effect that an agent a can only learn p in a possibility w if w As
for the effect on the axiomatics, we conjecture that the following is complete:
add the axioms of S5 to CK; weaken the functionality axiom to :[OE] a
[OE] a :/; and compensate the loss of the existential part of the functionality
axiom by adding the axiom hOEi a ?
We end this brief discussion by a comment on our choice of operators. We
could have added operators of the form CB to the language, one for each (non-
empty) set of agents B, to express the static concept of OE being common knowledge
between the agents in B. Transferring the definition of Fagin et al. (1995)
to our framework, its definition could be the following:
an OE for each an
The reason we have not added these operators is that we have not yet found
an axiomatization for the language with these operators. We hope to correct
this omission in the near future.
4 An application: Automated Dirty Children
We have developed a language and a semantics for reasoning about information
and information change of several agents, which in turn can reason about their
own information and the information of other agents. We have provided an
axiomatization for this semantics. In this section, we want to show that the
logic developed above can be useful as a tool for analyzing problems concerning
reasoning about information in a multi-agent setting. To show this, we consider
a textbook case, the puzzle of the dirty children. This puzzle occurs under
different guises in the literature: it is a variant of the puzzle of the cheating
husbands (see for example Moses et al., 1986), the wise men puzzle (in e.g.
McCarthy, 1990) and the the Conway-paradox (e.g. van Emde Boaz et al., 1980).
The puzzle
The description of the dirty children puzzle that we give here is adapted from
Barwise (1981).
There are n children playing together. During their play some of the children,
say k of them, get mud on their foreheads. Each can see the mud on others
but not on his own forehead. Along comes a father, who says, "At least one
of you has mud on your head." He then asks the following question, over and
over: "Can any of you prove that you have mud on your head?" Assuming
that all the children are perceptive, intelligent, truthful, and that they answer
simultaneously, what will happen?
There is a "proof" that the first k \Gamma 1 times the father asks the question,
the children will all say "no" but that the k-th time the children that are dirty
will answer "yes."
The proof is by induction on the number of dirty children k. For
result is obvious: the dirty child sees that no one else is muddy, so he must
be the muddy one. If there are two dirty children, say a and b, each answers
"no" the first time, because of the mud on the other. But, when b says "no," a
realizes he must be muddy, for otherwise b would have known the mud was on
his head and answered "yes" the first time. Thus a answers "yes" the second
time. b goes through the same reasoning. Now suppose there are three dirty
children, a, b, c. Child a argues as follows. Assume I don't have mud on my
head. Then, by the both b and c will answer "yes" the second time.
When they don't, he realizes that the assumption was false, that he is muddy,
and so will answer "yes" on the third question. Similarly for b and c.
Formalization
We will show how one can formalize the description of the puzzle, and the
reasoning involved, in dynamic epistemic semantics. The result, that after
answers to the father's question, the children that are dirty know that they are
dirty, will then be a theorem in the logic.
Let A be a set of children playing in the mud. Consider a language that
contains a propositional atom p a for each a 2 A, which we will take to express
that child a is dirty. We start by introducing some convenient abbreviations:
ffl Each child can see the forehead of each of the other children. So, if a
child is dirty, each of the other children knows that she is dirty. This
can be expressed by the conjunction of all sentences of the form (p a !
for each a and b in A such that a 6= b. We
abbreviate this conjunction by vision .
ffl It is common knowledge between all children that each forehead can be
seen by each of the other children, i.e. vision is common knowledge between
all children. We can express this as CA vision.
ffl Before asking the children whether they know if they are dirty or not, the
father announces in face of all children that at least one of them has a dirty
forehead. Let father be the sentence
fp a j a 2 Ag, which expresses that
at least one of the children is dirty.
ffl After the father's announcement, all children answer the question 'Do you
know whether you are dirty or not?' The children answer either `yes' or
'no'. Let no be the sentence
f(:2 a p a -:2 a :p a ) j a 2 Ag, which is the
sentence that expresses that none of the children knows that she is dirty
(i.e. the information expressed by all children answering 'no' at the same
time.)
ffl Finally, we let for each B ' A, dirty(B) abbreviate V
This sentence expresses that all and only the children in B have dirty
foreheads.
We can now express in DES that if exactly m children are dirty and it is commonly
known between all children that they can see each other, then it holds
that after a common update with the father's statement that at least one of
the children is dirty, and commonly updating times with the fact that all
children answer 'no', the resulting state is a situation in which all dirty children
know that they are dirty. Formally expressed, this boils down to the following
statement:
Proposition 4.1 Let B be a set containing exactly m children (m - 1), and
stand for a sequence of updates with OE. Then it holds
for all a 2 B: dirty(B); vision; CA vision
A 2 a p a
proof: We will provide a syntactical proof of this statement. Although we do
not have an axiomatization for the language containing the common knowledge
operators CB , it is easy to see that that following axiom is sound, if b 2 B:
We will make use of this axiom in the proof.
The proof of the proposition is by induction on the number of dirty children
m. Assume first that only one child, say a, is dirty. In classical modal logic, it
holds that if a is the only dirty child, and a can see all other children, then a
knows that if at least one child is dirty, it must be herself:
We use axiom 5 to conclude that (omitting the subscript A from the update
operators for legibility):
whence, by axiom 6
dirty(fag); vision; CA vision ' [father]2 a p a
For the induction step, let B be a set of m+1 children, and a; b 2 B. It holds
by induction hypothesis and the necessitation rule that if B 0 has m elements,
then
Since CAvision ' 2 a (vision - CA vision) and dirty(B); vision ' 2 a (:p a !
dirty(B=fag)), it follows that
from which it follows, using axioms 3 and 5, and the fact that ' no ! :2 b p b ,
that
By axiom 6, then
and using the lemma below, finally,
Lemma 4.2 For each m: 2 a [no] m (no ! p a ) ' [no] m+1 2 a p a
This is proven by induction on m. If a ) is equivalent by
axiom 5 to 2 a (no ! [no]p a ), which is, by axiom 6, equivalent to [no]2 a p a .
For the induction step, assume that:
This implies that
From which it follows by axiom 6 that
[no]2 a [no] m (no ! p a )
whence, by induction hypothesis, that
This completes the proof of proposition 4.1. 6 2
Discussion
The puzzle of the dirty children and related puzzles have been discussed relatively
extensively in the literature, and several formalizations have been given.
Our analysis adds to earlier approaches in an essential way, we believe.
First of all, we have rephrased the informal description of the puzzle in the
object language of an independently motivated logic. Something like that has
not been done before: all earlier formalizations of the puzzle that we know
of consist of a more or less ad hoc model of the information and information
change involved in the puzzle. That means that each variant of the puzzle that
differs from the present one calls for a new analysis and the construction of
a new model. The relatively straightforward way in which the puzzle can be
formalized in DES suggests that similar problems may be formulated in the
same way.
Secondly, the fact that our formalization of the puzzle gives results similar
to Barwise's semi-formal results, shows that the paradoxical flavor of the
puzzle does not stem from a logical mistake. This suggests strongly that the
discrepancy between the ideal situation described in the puzzle and a 'real life'
situation should not be explained as a difference in principles of logic, but as
a result of the complexity of the reasoning involved in the puzzle and the way
it depends on the strong trust they should have in the each other's reasoning
capabilities.
Thirdly, the formalization given above makes the role that the father's announcement
and the children's answers play quite explicit. For example, one
of the 'paradoxical' aspects of the puzzle is that the father's statement seems
superfluous at first sight if there two or more dirty children present. In such a
situation, each of the children already knows that one of the children is dirty
(since everyone can see a dirty child). The formal correlate of this fact is a theo-
rem: father. The point of the father's statement lies in the
assumption that his announcement makes it common knowledge that at least
on child is dirty, which was not the case: p a -p b ; vision; CA vision 6' CAfather.
This observation is not new, but our analysis adds to earlier ones in that it is
now possible to formulate such facts in the object language.
Another puzzling aspect of the puzzle that is highlighted in our analysis is
the fact that the children keep on saying 'no' until `suddenly' some children
6 We have not proven that the children do not know that they are dirty before they have
answered the question times. To show that, one needs an extra assumption that in the
initial possibility, none of the children knows whether she is dirty of not, and that this fact is
common knowledge. A proof can then be given along the lines of the proof given here.
answer yes, suggests that each answer supplies new information, although, 'syn-
tactically', the children say the same thing each time. This is directly reflected
in our semantics: an update with no changes the possibility in a certain fixed
way, resulting in a new possibility in which another update with no may change
the possibility again.
This is an example of the failure in DES of the following principle of Success:
which states that after a group update with a sentence OE, each member in the
group knows that OE. This is not a property of updates in general, and the
example of no suggests that this is right. 7
5 Epistemic propositional dynamic logic
In this section, we use the ideas of dynamic epistemic logic for developing a
logic, which we call EPDL, for 'epistemic propositional dynamic logic'. Besides
update actions this logic will also have send actions and test actions. The main
thrust of this move is very much in the line of our discussion in the previous
section: by incorporating more notions, such as send actions, that are crucial
for understanding communication, into the logical object language, it becomes
possible to formalize processes that otherwise would remain part of the meta-language
The language of EPDL may be used to specify or describe the behavior of a
group of communicating agents, in a very general sense. The phenomena modeled
might be human agents speaking to each other, the behavior of processors
in a distributed network, or the behavior of a knowledge base and a human
agent querying it.
The idea that extensions or variations of epistemic logic may be used to
describe such kind of applications is not new. In computer science, the work
of Fagin et al. (1995) and Shoham (1993) on agent oriented programming are
prime examples. Another example is the work of McCarty (1990). See also de
Rijke (1993).
The basic idea here is to treat the update modalities of the previous sections
as programs, and extend the language with certain program operators familiar
from PDL (cf. Pratt (1976), Goldblatt (1987)). We consider a language in which
there are three kinds of basic programs. Firstly, there are update programs of
the form U(B; OE), that have the effect that OE becomes common knowledge in the
group of agents B. Secondly, a program S(a; B; OE) will stand for the action of
agent a sending the message OE to all agents in B. Thirdly, the local tests ?(a; OE)
stand for the action of agent a testing whether she knows that OE. In addition
7 For this particular example, we even have the surprising fact that there are possibilities
w such that w
to these basic programs, we add the program operators of PDL: composition,
union and iteration.
Definition 5.1 (Epistemic Propositional Dynamic Logic)
Given an atomic vocabulary P and a set of actors A, we define a set of assertions
\Phi and a set of programs \Pi by simultaneous induction:
where a
We will interpret programs as relations on possibilities. Since we have included
union in the language, which is interpreted as choice in our semantics, programs
will be non-deterministic in general: running a particular program may
lead to several different outcomes. That means that, in contrast with the updates
described in the previous sections, not all programs will have functional
interpretations.
Definition 5.2 (Semantics of EPDL)
An interpretation for EPDL is a function I that assigns to each triple consisting
of an actor a, a set of actors B and a formula OE a binary relation between
possibilities. Relative to such a interpretation we define the truth conditions of
assertions and the interpretation of programs inductively by:
truth conditions
program interpretations
w[[-
The interpretation function I plays a role only in the clause for the send actions
OE). The basic idea is that I(a; B; OE) describes the effects of the
sending action. Of course, the real interest in sending a message is to exchange
information. Thus the real burden is to relate send actions to epistemic effects.
This can be achieved in EPDL by formulating extra constraints that relate send
actions to update actions and to the information of the actors. Typically, these
extra constraints will reflect certain properties of the communication channel,
or certain pragmatic rules that the actors follow. For example, the axiom
a sincerity condition for actor a (here h-iOE is the existential dual of
actor a can only send the message OE if he has the information that OE.
As an example of the application of EPDL to communicative situations we
discuss a simple example which is called 'the bit-transmission problem' in Fagin
et al. (1995, pp. 107ff. We consider two agents, a sender s and a receiver
r . The sender has a certain piece of information (for example that the value
of register x is either 0 or 1) which she wants to communicate to the receiver.
We let the proposition p represent the information that x has value 1 (and
:p that the value is 0). We assume the communication line may be faulty;
for simplicity's sake we assume that messages either arrive immediately or are
lost forever. Since s cannot be sure that her message has arrived, she will
continue sending the message p until she has received an acknowledgment from
the receiver that he has gotten her message.
Another way of describing the behavior of s and r is as follows. s will send
the message p to r until she knows that r knows that p. As soon as r knows
that p, he will send a message 'I know that p' to s . Such descriptions that
make use of concept such as 'knowledge' are descriptions that we can fairly
straightforwardly translate into our language.
For capturing the behavior of this system in EPDL we first of all need
to express what the effect of sending a message is. Under the assumptions
we have made, that messages either arrive immediately, or are irredeemably
lost, the effect of sending a message OE to r can be described by the program
's information state is updated with OE, or nothing at
all happens (the test ?(r ; ?) will always succeed). The corresponding interpretation
function I interprets send actions as follows:
where Id is the identity relation over possibilities. This interpretation of send
actions corresponds to the syntactical characterization:
The action of s sending r the value of the bit p is can be described by the
program
While the receiver can be described as performing the following program:
(- r
:p)).
We can now formulate statements about such programs in the object language.
For example, the statement "If the value of x is 1, then the receiver will eventually
(that is, after repeating both programs again and again) know that the x is
1" may be represented by: 2 s
p. In fact, this sentence turns
out to be valid under the interpretation I given above.
Properties of programs
We may consider how EPDL programs behave with respect to the properties
of situations introduced in definition 3.6. In particular, we may ask which
properties are preserved under updating with certain programs.
Definition 5.3 Let S be a class of possibilities, I an interpretation. A program
- is persistent over a class S of possibilities under the interpretation I iff w 2 S
and
The following result claims that if I interprets all send actions as actions that
preserve positive or negative introspection, then all programs will.
Proposition 5.4 If each send action S(a; B; OE) is persistent over P (N ,
respectively) under I, then each program - is persistent over P (N ,
In general, programs are not persistent over the class of truthful situations, nor
over the class of consistent situations. One example is the program - s
above.
In a situation where S knows that r does not know the value of the bit, the
may result in a possibility in which r knows the value, but s still
believes that r does not know it.
Knowledge programs
As observed by Fagin et al. (1995), one way of looking at a problem like the
bit transmission problem is in terms of so called knowledge programs. That is,
we can model the actors as executing a certain set of instructions of the form
OE ) ff, which are read as "if OE then do ff", where OE is a formula of epistemic
logic, and ff is some action. Formally, they define a knowledge program for an
actor a as a set of these instructions g. These
programs are interpreted indeterministically by requiring that a performs one
of the actions ff i for which the test OE i succeeds.
The models they consider consist of 'local states' of agents standing in a
certain relation to each other. These 'local states' are meant to correspond in a
relatively direct way to states that the agents may actually be in. Actions are
interpreted as operations on such representations, while sentences of modal logic
are interpreted in a possible worlds model that is derived from this representa-
tion. In addition to this 'two-level' architecture, the model contains an explicit
representation of time, and a simple logic of time is added to the language.
It is clear that the in EPDL there are programs similar to these knowledge
programs, i.e. programs that make an action conditional on the epistemic state
of the actor. We will make a few remarks about how our framework compares
with the approach adopted by Fagin et al. One of the most salient differences
is that the former has an ontology that is much richer. Although this means
that the model allows for distinctions that cannot be drawn in our model and
that the behavior of a system can be described in much more detail than in our
approach, it also implies, as the authors themselves note, that it is often unclear
what part of the behavior of a system should be modeled by what part of the
semantics.
In the work of Fagin et al., information change on the level of Kripke structures
is a notion that is derived from change in the underlying model. By
contrast, we have given an explicit semantics for the notion of epistemic update
on this level, thereby providing a semantics in which it is much more clear what
is going on. Moreover, this means that we are not restricted to using only S5
models, which in the architecture of the system of Fagin et al. seems unavoid-
able. This is interesting, because it makes it possible to describe situations
in which agents are misinformed about either their environment or about the
information of the other agents.
6 Conclusions
In this paper, we have combined techniques from epistemic and dynamic logic to
arrive at a logic for describing multi-agent information change. The key concept
of dynamic semantics is that the meaning of an assertion is the way in which
the assertion changes the information of the hearer. Thus a dynamic epistemic
semantics consist in a explicit formal definition of the information change potential
of a sentence. We used these ideas to arrive at the system of Dynamic
Epistemic Semantics, which is semantics for a language describing information
change in a multi-agent setting. This semantics proved useful for analyzing
the Muddy Children paradox, and also for giving a semantics for knowledge
programs, since it enabled us to model knowledge change by giving an explicit
semantics to the triggers of the information change (the latter being the assertions
made, or the messages sent). We feel that this is an important extension,
since standard approaches to for example the Muddy Children (e.g. Fagin et al.
generally use static epistemic logics like S5 to describe the situation before
and after a certain epistemic event, leaving the transition between 'before' and
'after' to considerations in the meta-language. 8 In contrast, in dynamic epistemic
logic, epistemic actions like updates are first class citizens of the object
language of DES. For one thing, this opens the possibility of making artificial
agents a bit more intelligent, by giving them an axiomatics for DEL as their
tool for reasoning about knowledge change.
Authors adress:
Department of Philosophy
University of Amsterdam
Nieuwe Doelenstraat 15
The Netherlands
gerbrand@illc.uva.nl
groenev@illc.uva.nl
--R
The Journal of Philosophy
A system of dynamic modal logic.
Reasoning about Knowl- edge
A modeltheoretic analysis of knowledge.
Knowledge in Flux.
Logics of Time and Computation.
Logical Investigations into Dynamic Semantics.
Calculi for Constructive Communication.
On the difference between updating a knowledge base and revising it.
Formalization of two puzzles involving knowedge.
Formalizing Common Sense: Papers by John McCarthy.
Cheating husbands and other stories: A case study of knowledge
Semantical considerations on floyd-hoare logic
Belief revision from the point of view of doxastic logic.
Agent oriented programming.
Peter van Emde Boas
Defaults in update semantics.
--TR
--CTR
Alexandru Baltag , Lawrence S. Moss , Slawomir Solecki, The logic of public announcements, common knowledge, and private suspicions, Proceedings of the 7th conference on Theoretical aspects of rationality and knowledge, July 22-24, 1998, Evanston, Illinois
Fernando R. Velzquez-Quesada , Francisco Hernndez-Quiroz, Some semantics for a logical language for the game of dominoes, Proceedings of the 24th IASTED international conference on Artificial intelligence and applications, p.293-298, February 13-16, 2006, Innsbruck, Austria
Hans P. Van Ditmarsch, Descriptions of Game Actions, Journal of Logic, Language and Information, v.11 n.3, p.349-365, Summer 2002
Jan-Willem Roorda , Wiebe van der Hoek , John-Jules Meyer, Iterated belief change in multi-agent systems, Proceedings of the first international joint conference on Autonomous agents and multiagent systems: part 2, July 15-19, 2002, Bologna, Italy
Alexandru Baltag, Logics for insecure communication, Proceedings of the 8th conference on Theoretical aspects of rationality and knowledge, July 08-10, 2001, Siena, Italy
John Cantwell, A Formal Model of Multi-Agent Belief-Interaction, Journal of Logic, Language and Information, v.14 n.4, p.397-422, October 2005
Chitta Baral , Yan Zhang, Knowledge updates: semantics and complexity issues, Artificial Intelligence, v.164 n.1-2, p.209-243, May 2005
H. P. van Ditmarsch , W. van der Hoek , B. P. Kooi, Concurrent dynamic epistemic logic for MAS, Proceedings of the second international joint conference on Autonomous agents and multiagent systems, July 14-18, 2003, Melbourne, Australia
Robert Van Rooy, Quality and Quantity of Information Exchange, Journal of Logic, Language and Information, v.12 n.4, p.423-451, Fall
Barteld P. Kooi, Probabilistic Dynamic Epistemic Logic, Journal of Logic, Language and Information, v.12 n.4, p.381-408, Fall
Andreas Herzig, Modal Probability, Belief, and Actions, Fundamenta Informaticae, v.57 n.2-4, p.323-344, April
Andreas Herzig, Modal probability, belief, and actions, Fundamenta Informaticae, v.57 n.2-4, p.323-344, October
Churn-Jung Liau, A Logical Analysis of the Relationship between Commitment and Obligation, Journal of Logic, Language and Information, v.10 n.2, p.237-261, 2001
Paul Dekker, Meaning and Use of Indefinite Expressions, Journal of Logic, Language and Information, v.11 n.2, p.141-194, Spring 2002
J.-J. Ch. Meyer, Dynamic logic for reasoning about actions and agents, Logic-based artificial intelligence, Kluwer Academic Publishers, Norwell, MA, 2000
Churn-Jung Liau, Belief, information acquisition, and trust in multi-agent systems: a modal logic formulation, Artificial Intelligence, v.149 n.1, p.31-60, September
Barbara Dunin-Keplicz , Rineke Verbrugge, Evolution of Collective Commitment during Teamwork, Fundamenta Informaticae, v.56 n.4, p.329-371, December | dynamic logic;epistemic logic;non-well-founded set theory;information exchange |
595905 | Contexts in Dynamic Predicate Logic. | In this paper we introduce a notion of context for Groenendijk & Stokhofs Dynamic Predicate Logic DPL. We use these contexts to give a characterization of the relations on assignments that can be generated by composition from tests and random resettings in the case that we are working over an infinite domain. These relations are precisely the ones expressible in DPL if we allow ourselves arbitrary tests as a starting point. We discuss some possible extensions of DPL and the way these extensions interact with our notion of context. | Introduction
Dynamic Predicate Logic (DPL) was invented by Jeroen Groenendijk and Martin Stokhof (see [1], see
also our section 2) as a specification language (or better: as a module for a specification language)
of meanings for fragments of natural language. Most of the research concerning DPL has gone into
integrating it with versions of Montague Grammar (see [5]) and into integrating it with Frank Veltmans
Update Semantics (see [6]).
DPL is a theory of testing and resetting of variables/registers. These are fundamental operations
in computer science. Thus, apart from its use in Logical Semantics, DPL is a simple theory of these
basic operations. 1
DPL is a natural variant of Predicate Logic. It mainly differs in the treatment of the scope of the
existential quantifier. Certain basic truths about variables in Predicate Logic, however, fail in DPL
(see section 2, see also [2] for similar observations on DPLE). The study of DPL and its kin makes the
dependence of these truths on the specific choice of scoping mechanisms in standard Predicate Logic
visible.
In the light of the varied interest of DPL, it seems a good idea to make a closer study of its
metamathematical properties. We focus on the closely related questions:
ffl Which relations between assignments are definable in DPL (in a sense we will specify later)?
ffl How does DPL treat its variables?
To throw some light on both questions a good notion of context in DPL is indispensable. When
studying classical DPL, which is based on total assignments, contexts appear as objets trouv'es. They
are not part of the design of the language, but -as will become clear in the paper- can be viewed
as the result of 'abstracting away' or `erasing' certain properties of the predicate logical language
(both vocabulary and structure), thus yielding an underspecified language. Underspecification simply
means here that the denotations or meanings of the contexts are properties of relations, rather than
relations.
1 DPL is just one theory in a family of alternatives to predicate logic. In these alternatives 'resetting a register' is
replaced by other related actions, like 'create a new register'. See section 7 for references.
We can view what happens in the paper in a different light. Our deeper interest is in such grand
questions as:
ffl What should a general theory of information processing look like?
ffl What is the nature of the variable?
It seems to me that these questions are closely related and that ideas involving both Dynamics and
Contexts should play a role in the answer. The study of DPL, here, is analogous to the study of a
fruitfly in a laboratory situation. It allows us to focus on problems involving dynamics, variables,
information processing. Still, these problems remain feasible.
We end this introduction with a brief sketch of the paper. Section 2 is a straightforward introduction
to predicate logic. It contains all the technical material the reader needs to know. For a discussion of
the applications to discourse phenomena, however, the reader should consult [1]. Section 3 presents
our theory of contexts in DPL. We study contexts as mathematical objects in their own right and
establish their connections to language and semantics. Some materials concerning the information
ordering on contexts are placed in an appendix. In section 4, we treat the Switching Propery. This
property is characteristic for the DPL-definable relations. Section 5 contains the main result of the
paper: a relation over an infinite domain is DPL-definable iff it 'has' a context and satisfies the
Switching Property. In the next section, we touch on the subject of extending the DPL-language
with new operations such as conjunction and disjunction. We consider the question whether such
extensions support a good theory of contexts. We will produce two extensions that are complete for
all relations that have a context. In other words: all such relations are definable in those extensions.
Our last section 7 is devoted to the idea of making the context part of the semantics.
2 What is Dynamic Predicate Logic?
We provide the basic definitions of DPL. Nothing in this section pretends to be original. We start by
introducing some basic relational notions.
Definition 2.1 Let X be any non-empty set. Rel(X) is the set of binary relations on X , i.e.,
X). Let R; S 2 Rel(X ). We define:
1. The composition R ffi S of R and S is defined by: x(R ffi S)y :, 9z xRzSy. Note that composition
is in the order of application.
2. The dynamic implication (R!S) between R and S is defined by:
x(R!S)y
Our use of ! here overloads the symbol, since we also use it for implication in the objectlanguage.
We write :(R) for (R ! ;)
3. id X is the identity relation. R is a condition or test if R ' id X .
4. Consider Y ' X . We define diag(Y g.
5. dom(R) := fx2X j 9y xRyg and cod(R) := fy2X j 9x xRyg.
The notion of dynamic implication was first introduced by Hans Kamp in his pioneering paper [4].
Note dom(R). The relations in the range of diag are precisely the
conditions. Writing (Y ! Z) := (XnY ) [Z, we have:
Thus, diag is a homomorphic embedding of the structure h-X ; in the structure
We will sometimes confuse, in the relational context, the set X with
the relation diag(X). We need some further relational notions specifically concerned with relations
between assignments.
Definition 2.2 Let D be a non-empty domain and let Var be a set of variables. Let R2Rel(D Var ),
We define:
is the result of changing the values of f on the v i to d i .
I VarnV . We write [v] for: [fvg].
ffl Y is an hV i-set if f 2 Y and fI V g ) finitely restricted if Y is a hIi-set for some
finite I . A condition is finitely restricted iff it is the image of a finitely restricted set.
If we want to make the dependence of I or [:] on Var or D visible, we add them as subscripts.
We collect some simple facts concerning these notions. We have:
Note that the classical meaning of the existential quantifier as a 'cylindrification' can be given as:
We turn to the definition of DPL.
Definition 2.3 A DPL-language L is a structure hPred ; Ar ; Var ; Coni, where Pred is a set of predicate
symbols; Ar is a function from Pred to the natural numbers (including 0); Var is a, possibly
empty, set of variables, Con is a, possibly empty, set of constants. Let Ref := Var [Con be the set
of referents. We will use v; constants and referents. The set
of L-formulas, For L , is the smallest set such that:
are in For L for
ffl If OE; / 2 For L , then so are OE:/ and (OE ! /)
I feel that it is more faithful to the semantics to leave out the brackets in the formation rule for
the dot officially, but nothing important hangs on this choice in this paper. We get an ambiguous
syntax, but still unique meanings, since the operation of composition -the semantic counterpart of
"."- is associative. An alternative notation for 9v, is [v :=?] (random reset). We use :(OE) and 8v(OE)
as abbreviations of, respectively, (OE ! ?) and (9v ! OE). If x 2 Var and r 2 Ref and x and r are
distinct, we write [x := r] for:
Definition 2.4 A DPL-model M for a DPL-language L is a structure hD; Ii, where D is a non-empty
set, the domain of M; I is a function which assigns to each predicate symbol P of Pred L an Ar(P)-ary
relation on D and to each constant c an element of D. AssM , the set of assignments for M, is D Var .
Consider r 2 Ref . We define:
ae
The interpretation function [:] M : For
We write OE jM / for [OE] . We define validity in DPL by:
As usual, OE appropriate for the given language.
binary relation R is definable in a DPL-model M for a language L if there is an L-formula OE,
which defines R, i.e.,
We will often suppress the subscript M, when the model is clear from the context. We could extend
the DPL-language with function symbols by copying the way this is done in ordinary predicate logic.
However, for the kind of result we are after such an extension is immaterial, since the usual trick to
eliminate function symbols works also in DPL -with a small twist. E.g., P (f(g(x))) will be translated
to: ::(9u:G(x; u):9v:F (u; v):P (v)).
We remind the reader of Geach's Donkey Sentence: If a farmer owns a donkey, he beats it. This
sentence can be translated into DPL in a compositional way as:
One striking feature of DPL is that it is not 'structural': the values the predicate symbols may
assume are not all the possible meaning objects provided by the semantics; we only allow tests. A
second striking feature is the time symmetry of resetting and composition, which constrast strongly
with our time asymetric intuition about, say, the meaning of P (x):9x:Q(x). The asymmetry of our
intuition may be explained by the fact that we tend to think more in terms of successful resetting,
just in terms of what the resetting relation is.
Ordinary predicate logic can be interpreted in DPL as follows. We suppose that the predicate
logical language has as connectives and quantifiers: ?, ?, -, !, 9x. We translate as follows:
ffl (:) commutes with atomic formulas and with !
We find: [OE is the usual valuation function of Predicate Logic. Our
translation is compositional. It shows that we may consider Predicate Logic as a subsystem of DPL.
There is also a kind of inverse translation (:) ffi , which satisfies: [[OE
involves renaming of variables and cannot be taken to show that DPL is a subsystem of Predicate
Logic.
3 Contexts for Dynamic Predicate Logic
In this section, we study the notion of context and its connections with relations and language. We
placed some materials concerning the information ordering on contexts in an appendix, since, on the
one hand, they are conceptually relevant and have a clear place in the total picture, but, on the other
hand, they have no direct bearing upon the main results of the paper.
3.1 Introductory remarks
To motivate our notion of contexts, we first give an intuitive discussion about substitution and kinds of
variable occurrences in DPL. 2 In Predicate Logic variables may occur in a formula in two ways: freely
and bound. The free variables admit (under certain conditions) substitution. The bound variables
may be renamed salva significatione (ff-conversion). Let's write oe t
x (OE) for: the result of substituting
t for x in OE. In Predicate Logic we have, e.g.,
f I(c)
What is the proper analogue of this fact for DPL? To simplify the discussion we will only treat a special
case and refrain from giving official definitions. Consider the DPL-formula P (x):9x:Q(x):9x:R(x). We
1. f I(c)
2. f [P (x):9x:Q(x):9x:R(x)] M g I(c)
Meditation upon (1) and (2) suggests, that, in DPL, we have to distinguish two kinds of substitution
left substitution and right substitution and corresponding to these kinds two kinds of 'free occurrence':
right free. We also speak of input occurrences and output occurrences. Following temporal
intuitions -ignoring the essentially time-symmetric character of resetting and composition- we may
also call the left free occurrences simply free and the right free occurrences actively bound. Now
consider the following formula, say OE 0 , in which we have tagged occurrences of x with superscript
numerals.
We see that x 1 is a (left) free or input occurrence. Left substitution for x will cause it to be replaced. If
we form T in the semantics the values assigned to x 0 and x 1 will be unified. If we form 9x:OE 0 ,
x 1 will be 'bound' or `initialized' by the new 'quantifier'. Symmetrically, x 7 is right free or actively
bound. It will be in the scope of right substitution. If we form OE 0 :T the values of x 7 and x 0 will
be unified, If we form OE 0 :9x, x 7 will be 'aborted'. Neither x 1 nor x 7 are open to ff-conversion salva
significatione. x 3 is not accessible for substitution, nor is it ff-convertible: replacing x 2 , x 3 and x 4 by,
say, y, will result in a formula that resets y, which OE 0 doesn't do. We call x 3 a garbage occurrence:
it is something that 'exists', but is no longer `used'. 3 x 6 is also inaccessible for substitution, but in
addition it can be ff-converted: replacing x 5 and x 6 by y does not change the meaning of OE 0 . We say
that x 6 is clasically bound. Finally, we consider x 2 , x 4 and x 5 . These are 'occurrences' in a purely
syntactical sense only: they do not represent 'files' carrying information, but just signal that incoming
files labeled x should not be 'unified' with outgoing files labeled x. We say that these `occurrences'
are blockers. x 5 is not a blocker in OE 0 as a whole. 4
2 The subject of kinds of variables and substitution would merit a far more extensive discussion. Regrettably, such a
discussion is beyond the scope of the present paper.
3 The notion of garbage is studied in [8] and in [9]
4 Even if Vermeulens DPLE (see [7]) is quite close to DPL, the discussion of kinds of occurrences would be very
different.
Contexts, in our present set-up, signal the presence of input occurrences, of blockers and of output
occurrences. 5 They are abstract -in comparison with formulas- in the sense that they contain no information
about the number or the place of these occurrences. Contexts can be studied independently
from their connection with the logical language.
Contexts are familiar from Predicate Logic. There the context associated to a formula OE is simply
the set F of free variables of OE. 6 A salient property of contexts in Predicate Logic is as follows.
Suppose F is a context for OE, then
Most of the work in this section will be devoted to proving the appropriate DPL-analogue of this
property of Predicate Logic.
3.2 Contexts, considered by themselves
In this subsection, we treat contexts as mathematical objects in their own right. The natural connection
with DPL will surface in the subsequent subsections.
Definition 3.1 A DPL-context is a triple hI ; B; Oi, where I , B and O are finite sets of variables
and where equivalently, I [B. The set I is the input set, i.e., the set on
which the incoming assignments are constrained. The set O is the output set, i.e. the set on which
the outgoing assignments are constrained. Finally, the set B is the set of blocks. This is the set
of variables for which the identity between input and output value is cut through. The 'block' is a
barrier between past and future, breaking the link between input- and output-value. We write # for
is defined or converges, and " for is undefined or diverges. Define:
ffl id := h;; ;; ;i
" is a partial operation on contexts, defined by:
" otherwise
We will use c, d, . as variables over contexts. We write I c for the first component of c, etcetera.
The meanings of these objects, relations and operations will become apparent in subsection 3.3.
Lemma 3.2 The operations ffl, ! and " are well defined.
Proof
To see that ffl is well defined, note that:
5 In fact, there are good reasons also to put witnesses of garbage into the contexts. We will do not this in the present
paper, since it is not necessery for our results here. Moreover, adding garbage leads to considerable complication of the
framework and it necessitates bringing in Category Theory. We refer the reader further to [9].
6 The reader is referred to [3] for a category-theoretical framework appropriate for the study of contexts in Predicate
Logic.
It is trivial that ! is well defined. For the proof that " is well defined we refer the reader to the
appendix. 2
Theorem 3.3 The contexts with id and ffl form a monoid. Moreover, - is a partial ordering.
The proof of the theorem is easy. In the appendix we will show that " , if defined, is the infimum,
w.r.t.
Consider the monoid of contexts. It can be represented in an alternative way, as follows. The
monoid A is the monoid on two generators a and b, given by the equations: a ffl a
b. The tabel of the monoidal operation ffl is a follows.
ffl e a b ab ba aba
e e a b ab ba aba
a a a ab ab aba aba
ab ab aba ab ab aba aba
ba ba ba b b ba ba
aba aba aba ab ab aba aba
The monoid of contexts is now given as the set of functions from Var to A that are on all, but finitely
many arguments equal to e. We put: (f ffl g)(v) := f(v) ffl g(v). A triple hI ; B; Oi 'translates' to a
function f with, e.g., translates to a triple
abag, etcetera. It is easily seen that these 'translations'
give us an isomorphism of monoids between the representations. A is in fact isomorphic to the monoid
of contexts in the case that fxg. The alternative representation is possible by the fact that in
our monoidal operation treats all variables 'independently'. It is not difficult to extend the structure
on to get a function representation also for !, - and " .
In this paper we will stick to the set representation, since this representation is closest to the
relational notions we will need to formulate our theorem on contexts and relations -the theorem that
tells us what the contexts do. The function representation, however, has two advantages. First, it
is easier to use for doing computations 'in the head'. Secondly, its connection with the framework
developed in [9] to study contexts, is more perspicuous.
3.3 Contexts and relations
We turn to the connection between contexts and relations. 7 We show that this connection 'commutes'
w.r.t. ffl=ffi, !=! and -='. We fix a non-empty domain D.
Definition 3.4 Consider a relation R on D Var . R is an hI ; B; Oi-relation if
We say that c is a context for R, if R is an c-relation. R is an IBO-relation if R is an hI ; B; Oi-
relation for some hI ; B; Oi. We assign to each context c the property or 'meaning' fcg D , the set of all
c-relations on D Var . (We will often suppress the subscript D.)
The heuristic for this property is as follows. R is means that R is only concerned with the
values of the incoming assignment on I ; R only cares about the values of the outgoing assingment on
O; all this under the constraint that in going from input to output only values of variables in B are
changed. Before proving some facts about the notion introduced above, we sample some immediate
insights.
7 The semantics for contexts given here certainly does not exhaust all possible uses of contexts. E.g., the problem of
explaining what it is to be a variable occurrence of a certain kind is left untouched. Undoubtedly, contexts will play a
role in solving this problem.
ffl R is a hI ; ;; Ii-relation precisely if R is an hIi-condition.
We show that - on contexts describes the 'information ordering' on contexts. The idea is simply that
c is more informative than d if fcg ' fdg.
Theorem 3.5 1. c - d ) fcg ' fdg.
2. Suppose jDj - 2. Then: fcg ' fdg ) c - d.
Proof
We prove (1). Let c - d and R 2 fcg. We want to show:
Trivially, R is contained in (I I 0 show I I 0
. It is immediate, that f 0 I I fRgIO g 0 . We show that f [B]g.
Suppose
since fRg, R ' [B] and v 62 B. Finally, . Since R is a c-relation, we may
conclude that f 0 Rg 0 .
We prove (2). We write X c for VarnX . Let jDj - 2 and fcg ' fdg. Since, [B] 2 fcg, we have
fdg. Hence, using the facts of page 3, we find:
[B [O
Now it is immediate
The arguments that I ' I 0 and that O ' O 0 are analogous to one another. We give the argument
for the I-case. Suppose, for a reductio, that v 2 InI 0 . Let d and e be distinct elements of D. We
for the test: is f(v)=d?. Consider the relation R :=
so, R 2 fdg. Consider f with In case v 2 B 0 , we have: f e
I I 0 fRgIO 0 g. Since, as we have
already shown,
]g. Hence, since R 2 fdg, we have f d
Rg. Quod non. We turn
to the case that v 62 B 0 . Since I 0 nB
I I 0 fRgIO 0 g e
we find f e
. Thus, since R 2 fdg, we have f d
v . Quod non. 2
Theorem 3.5 shows clearly that contexts stand in a many-many relation to relations. Thus, the
question What is the context of R? has no definite answer. In the appendix we show that, but for one
notable exception, every relation has a most informative context. The next lemma may be used in
some cases to simplify the verification that a relation is hI ; B; Oi.
Lemma 3.6 R is a Oi-relation
Proof
It is clearly sufficient to show that for any R ' [B]:
I
?From left to right is immediate, since IO ' IO " B . For the converse, suppose f 0 I I fRgIO " B g 0 and
We have to show: gIO g 0 . Consider v 2 O. In case v 2 B, we have
I . Also since fRg, R ' [B] and v 62 B. Putting the identities together, we find
The following lemma is quite useful in applications (see example 3.14). We write A := I [B.
Lemma 3.7 Suppose R is an hI ; B; Oi-relation and f 0 I I fRg. Then there is a unique g 0 , such that
g. This g 0 has the following property: for any set of variables J , if f 0 I J f , then g 0 I J g. As a
consequence, we find that g 0 I I g and, hence, g 0 IA g. So, also, g 0 IO g.
Proof
Let R be an hI ; B; Oi-relation with f 0 I I fRg. Any g 0 with f 0 Rg 0 IB g, must satisfy: f 0 [B]g 0 IB g. So
the only possible choice of such a We verify that g 0 , thus defined, satisfies
. It is sufficient to show that gIO g 0 . This, in its turn, follows immediately from the property in
the last part of the theorem.
Consider any set J such that f 0 I J f . Suppose v 2 J . In case v 2 B, we have (v). In case
Finally f 0
since v 62 B. Putting things together, we find
Note that in the lemma O plays no significant role. Due to the 'forward looking' and time asymmetric
nature, however, of the definitions of implication and validity in DPL, it is sufficient for most
applications. An immediate consequence of the lemma is that if R is an hI ; B; Oi-relation, then
dom(R) is an hIi-condition and (by symmetry) cod(R) is an hOi-condition.
Theorem 3.8 Suppose R is a c-relation and S is a d-relation. Then R ffi S is a c ffl d-relation.
Proof
It is easy to see
(R
For the converse, suppose that f 0 [B 00
We have to show: f 0 (R ffi S)g 0 . For some h, we have fRhSg. We
partition Var into three sets
We show that f 0 Rh 0 Sg 0 . We first prove that f 0 Rh 0 . We check
the conditions for applying the fact that R is an hI ; B; Oi-relation.
1. f 0 I I 00 f and, hence, since I ' I 00 , f 0 I I f .
2. fRh.
3. hIO[ I 0 h 0 and, hence, hIOh 0 .
4. We show that f 0 [B]h 0 . Consider a variable v not in B. We have to show f 0 (v). We can
only run into trouble in case v is not in X 3 , i.e., if v is in BnB 0 or in O [ I 0 . The first possibility is
excluded, by the fact that v is not in B. Suppose v is in O [ I 0 . Then: h 0
R is an hI ; B; Oi-relation, so R ' [B]. We may conclude that In case
I 00 . In case v 2 I 0 , we find: v 2 I 0 nB ' I 00 . So in both
cases: v 2 I 00 . Since f 0 I I 00 f , it follows that (v). Composing the identities, we find
By (1)-(4), we may conclude that f 0 Rh 0 . Next, we check the conditions for applying the fact that S
is an hI
1. We have hIO[ I 0 h 0 and, hence, h 0 I I 0 h.
2. hSg.
3. We have gIO 00 g 0 and, hence, since O 0 ' O 00 , gIO 0 g 0 .
4. We show that h 0 [B 0 ]g 0 . Consider a variable v not in B 0 . We have to show h 0
Inspecting the definition of h 0 , we see that our desired identity can only fail if either v 62 B or
. We consider the case that v 62 B. We already showed that f 0 [B]h 0 .
Moreover, we assumed f 0 [B 00
we find: h 0 (v). Next, we consider the case that v 2 B and v 2 O [ I 0 [B
we choose v outside of B 0 , we need only consider the possibility that v 2 O [ I 0 . We have, by
our early assumption, gIO 00 g 0 ,
where O
we have v 2 I 0 nB (v). Putting the identities together,
we find h 0
By (1)-(4), we have: h 0 Sg 0 . 2
Theorem 3.9 Suppose R is a c-relation and S is a d-relation. Then R ! S is a c!d-relation.
Proof
Suppose R is a c-relation and S is a d-relation. Let
Trivially, (R ! S) ' [;]. Moreover, since id ' I I 00 , (R
To prove the converse, suppose f 0 I I 00 f and f(R ! S)f . We have to show that f 0 (R ! S)f 0 .
Suppose f 0 Rg 0 . By lemma 3.7, there is a g such that fRgI I 00 [B g 0 . It follows that g 0 I I 0 g. Since
, we can find an h, such that gSh. Again applying lemma 3.7, we find an h 0 with g 0 Sh 0 .We close this subsection with a language-free soundness result.
Definition 3.10 A relation on D Var is DPL-definable over D iff it can be generated by composition
from resettings [v] and finitely restricted conditions over D
Theorem 3.11 Every DPL-definable relation over D is an IBO-relation.
The proof is an obvious induction on the way the relation is generated.
3.4 Contexts and language
We turn to our discussion of how contexts are connected to formulas.
Definition 3.12 We assign to every DPL-formula OE a context c OE . Define:
We write I OE for I c OE
, etcetera.
Note that the definition correctly defines a function, by the associativity of ffl. We now prove the main
theorem of this section.
Theorem 3.13 For every formula OE, [OE] is a c OE -relation on D Var .
Proof
The proof is by induction on OE using theorems 3.8 and 3.3. The atomic cases are easy. 2
We obtain the following picture of the way contexts work: OE is mapped to c OE by abstracting both from
part of the vocabulary and part of the structure. c OE is mapped to fc OE g D , a property of relations. Via
a different route OE is mapped to the relation [OE] M . The two routes are connected by the theorem that
Note that c OE is not always the -minimal context of [OE] M , as is witnessed by the fact that c
is the identity on D Var , thus admitting the context h;; ;; ;i
Example 3.14 We provide two examples of how theorem 3.13 in combination with lemma 3.7 can
be used to verify a valid principle for DPL. We first prove:
Suppose [-:OE]g. We have to produce an h with g[OE]h. Since f [-:OE]g, we can find
a j with j[OE]g. By theorem 3.13: j[B OE ]g. I OE j. So, gI I OE j[OE]g. By
theorem 3.13 and lemma 3.7 we can find an h with g[OE]h.
As a second example we prove:
Suppose [-]g. We have to produce an h with f [/]h. By our assumptions,
there are i and j such that f [OE]i[/]j. Hence, f [B OE ]i and so fI I /
i. Thus, fI I /
i[/]j. We may conclude
that there is an h with f [/]h.
The examples demonstrate the role contexts must play in the formulation of schematic principles
for DPL.
4 The Switching Property
In section 3 we introduced contexts or IBO's as properties of relations and showed that every [OE] is an
IBO-relations. A first conjecture for characterizing the DPL-definable relations would be that these
are precisely the IBO-relations. We will see, however, that this conjecture is false. To characterize
the DPL-definable relations we need one extra property: the Switching Property. In the present
section we will prove that the DPL-definable relations do have the Switching Property (soundness).
In section 5 will will show that every IBO-relation on an infinite domain that has the Switching
Property is DPL-definable (completeness).
Definition 4.1 A relation R on D Var has the switching property if it is either a condition or there
are variables x and y (not necessarily distinct), such that cod(R). If the
second case obtains, we call the variables x and y involved a pair of switching variables. There might
be more than one pair of switching variables.
There are various other ways to define the Switching Property, but, I submit, the one presented here
is the most natural one. In the lemma below, we collect some helpful insights.
Lemma 4.2 Suppose R is a relation on D Var
1.
2. Suppose R is C are conditions and where T is a relation. Then
dom(R)
3. Suppose C is a condition. Then, C
The easy proof is left to the reader.
Theorem 4.3 Every DPL-definable relation over D has the switching property.
Proof
In case R is a condition, we are done. Suppose R is not a condition. As is easily seen, R must be of
the form C y, some conditions C, C 0 , and some relation S.
(In a formula OE defining R, x would correspond to the first existential quantifier occurring in OE, y to
the last. Note that we allow x and y to be the same variable and even the first and last existential
quantifier occurrence to be the same occurrence.) We have, using lemma 4.2:
dom(R)
dom(R)
dom(R)
dom(R) RThe results of section 3 and of this section combine to the obvious 'soundness'-result:
Theorem 4.4 Every DPL-definable relation over D is an IBO-relation with the Switching Property.
Example 4.5 We show how to use the Switching Property to prove that certain relations are not
DPL-definable. Suppose jDj - 2.
ffl Let R := [x :=
x;y . R is an IBO-relation,
with context hfx; yg; fx; yg; fx; ygi. Suppose R has the Switching Property. R is evidently not
a condition. Let v; w be a pair of switching variables. Let fRg, d, and d 6= e. Using the
fact that the domain of R is the set of all assignments, we find:
Hence, by the switching property: f e
Rg. But R is obviously injective. So we have a contradiction
Suppose our model M is the usual structure of the natural numbers. Let S := [x := x
x . S is an IBO-relation with context hfxg; fxg; fxgi. S
does not have the Switching Property since: S is not a condition; S has as domain the set of all
assignments; S is injective.
is an IBO-relation. Surprisingly, the best
context we can find for it is hfx; yg; fx; yg; fx; ygi. 8 Suppose that T has the Switching Property.
T is not a condition, so we can find switching variables v and w. By symmetry we may assume
that v 6= x. We can find f and g with fSg and f(x) 6= g(x). Choose d with d 6= g(v). Using the
fact that the domain of T is the set of all assignments, we find:
f d
By the Switching Property: f d
g. But we have two distinct variables x and v such that
f d
g(v). This is clearly impossible.
8 We will discuss this fenomenon in more detail in subsection 6.3.
5 The DPL-definable relations on an infinite domain
In sections 3 and 4 we have seen that the DPL-definable relations are IBO-relations with the Switching
Property. Here we show the converse -for the case that the domain, D, is infinite.
Theorem 5.1 Let D be an infinite set. Then the DPL-definable relations over D are precisely the
IBO-relations with the switching property on D Var .
Proof
One direction is by our previous results. Let R be an hI ; B; Oi-relation with the switching property.
In case R is a condition we are done. Suppose R is not a condition and let x, y be a pair of switching
variables. By the switching property cod(y). Note that dom(R) is an
hIi-condition and that cod(R) is an hOi-condition. Thus, it is sufficient to show that [x]
DPL-definable. [x] is an hInfxg; B; Onfygi-relation, where x; y 2 B. After renaming, we
see that it is sufficient to prove that any hI ; B; Oi-relation R, with x; y 2 B and x 62 I and y 62 O is
DPL-definable.
We will assume x 6= y. In case y, the proof is simpler. To increase readability, we will specify
R in a DPL-language that we introduce along the way. Suppose
g. Here the i k are supposed to be mutually distinct and similarly for the
other sets. Since D is infinite there is a coding of finite sequences of elements of D in D. Par abus de
langage, we will confuse this coding with our ordinary sequences of elements of D. Our language has
an (m 1)-ary predicate symbol P , where:
Remember that [y := x] is short for 9y:y = x. The formula OE is given by:
Here stands for the obvious condition. Note that [OE] is an hI ; B; Oi-relation. We
claim that R = [OE]. Suppose first that fRg. Take:
x .
Remember that x 62 g. We have:
Clearly, f and g witness that hf(i 1 )ii is in I(P ). Next we set:
y
We find (using y 62
Since f [B]g, it is easy to see that
For the converse, suppose f 0 [OE]g 0 . Let h 1
, be such that:
We are going to apply the fact that R is an hI ; B; Oi-relation. By the fact that h 1
and by the definition of P , we can find f and g such that fRg, f(i 1
(x). Since x 62
, it follows that f 0 I I f . Collecting what
we have, we see:
fRg.
By lemma 3.6 we need to check:
Consider
y 62 O, we find: h 3
Finally, v is not among the b
Putting the itemized insights together, we may conclude: f 0 Rg 0 . 2
6 Extensions of the DPL-language
We consider three extensions of the DPL-language. One with conjunction interpreted as intersection
of relations, one with a new quantifier 99 and one with disjunction interpreted as union of relations. We
will show that our contexts work for each of these extensions. The contexts provided for disjunction
are not optimally informative and intuitively queer, however. We will give some hints on how we think
this apparent defect should be repaired. We show that 99 is definable using - and that in the system
with 99 all IBO-relations are definable.
6.1 Conjunction
We study the effect of adding intersection of relations to the DPL-repertoire. One way of of thinking
about R " S is as: reset simultaneously via R and via S, and compare the results. If they are equal,
make the output of our new relation the shared output, otherwise abort. At the syntactical level, we
reflect the new operation by extending the language of DPL by adding the clause:
ffl If OE; / 2 L, then (OE-/) 2 L.
We will call the new language: L(-). The semantic clause is: [OE-/] := [OE] " [/]. We define intersection
of contexts as follows.
Note that:
I
So - is a well-defined operation on contexts. We define:
Note the difference between - and -. It is easy to see that - is precisely the infimum with respect to
-.
Theorem 6.1 Let R be a c-relation and let S be a d-relation. Then, R " S is a (c-d)-relation.
Proof
Suppose that the conditions of the theorem are fulfilled. Let
. Suppose f(R " S)g. It follows that f ([B] " [B 0 ])g,
(R " S) ' (I I 00
For the converse, suppose f 0 I I 00 f ,
We extend the definition of c OE to the new language by adding the clause c (OE-/)
Theorem 6.1
immediately yields the next theorem.
Theorem 6.2 [OE] is a c OE -relation for every OE2L(-).
We consider an example. Let c
g. Let / := (OE:9b 1
We have:
Thus, in this example our conjunction on contexts, gives us the 'intuitive result', i.e., [/] is an I-
condition.
Let's say that the DPL(-relations over a given domain D are the relations on this domain generated
by finitely restricted conditions and resettings using composition and intersection. The results of the
present section show that the DPL(-relations are all IBO-relations. The results of the next section,
will imply that, conversely, every IBO-relation is DPL(-).
6.2 A new existential quantifier
We define: 99x(R) := ([x] In case R is an hI ; B; Oi-relation, we see that 99x(R) := ([x] ffi
" [Bnfxg]. It follows -by the result of subsection 6.1- that 99(R) is an hInfxg; Bnfxg; Onfxgi-
relation.
We extend the language of DPL by adding the clause:
ffl If OE 2 L and v 2 Var then 99v(OE) 2 L
Note the overloading of notations. The new language will be L(99). The new semantical clause is
the obvious: [99vOE] . 99v is definable in L(-) as follows. Suppose c
then we can put (9x:OE:9x - 9b
Theorem 6.3 For any non-empty domain D, the DPL(99)-definable relations are precisely the IBO-
relations.
Proof
[Sketch] We have already seen that every DPL(99)-definable relation is IBO. For the converse, suppose
that R is an g.
Here the i k are supposed to be mutually distinct and similarly for the other sets. Take a DPL(99)-
language with an (m p)-ary predicate symbol P , where:
and f(o 1
Let be variables disjoint from I [B [O. Let OE be given by:
Clearly, that [OE] is an hI ; B; Oi-relation. The verification that R = [OE] is along the lines of the proof
of theorem 5.1. 2
Example 6.4 We show how to define the three relations of example 4.5. We do a bit more than the
theorem promises, because we give explicit descriptions of the 'P '.
can be defined by:
Note that this gives us the expected context: hfx; yg; fx; yg; fx; ygi.
can be defined (Strictly speaking we are working
in a relational language, so suggestive notation for, say, S(v; x).) The context
produced by the formula is as expected.
ffl We can define [(9x-9y)] by:
This gives us the context hfx; yg; fx; yg; fx; ygi. We will discuss this context in the next subsection
Since 99 is definable using -, the 'expressive completeness' of 99 w.r.t. the IBO-relations implies the
'expressive completeness' of -. Finally, we can translate Predicate Logic into DPL(-), by changing the
9-clause of our earlier translation to: (9(OE)) := 99(OE ). Remarkably, the old and the new translation
produce precisely the same relations at the semantical level.
Operations like !, - and thereis are not themselves actions in the sense of our semantics. They
are transformers of actions. Yet there is a tendency to understand 99x(OE) dynamically as a sequence
of actions: reset x; execute OE; set x back to its original value. The problem with this way of viewing
things is summarized with the question: where do we store the original value of x, so that we can
restore it at the end? DPL-semantics does not supply the right kind of 'memory' to realize 99(OE) as a
sequence of actions. We can do that (or, rather, something very much like it) in the richer semantics
of Kees Vermeulen's DPLE (see [7]), where under a variablename we do not store just one value, but
a stack of values. Here the original value of x is simply stored 'under' the new one.
RELATIONS IN CONTEXT 17
6.3 Disjunction
In this section we have a brief look at the problem of adding disjunction/union to DPL. Adding
disjunction/union evokes problems that are definitely beyond the scope of the present paper. So we
can only offer some tantalizing remarks.
One way of of thinking about R[S is as: Choose between R and S, and reset via the relation chosen.
At the syntactical level, we reflect the new operation by extending the language of DPL by adding
the clause:
ffl If OE; / 2 L, then (OE-/) 2 L.
We will call the new language: L(-). The semantic clause is: [OE-/] := [OE] [ [/].
What could be a context for [x] [ [y]? Some experimentation shows that the best we can do is:
This seems a wasteful way to represent the variable handling of this relation.
Our intuition tells us that [x] [ [y] is a pure resetter and not something that 'constrains' w.r.t. x and
y. The resetting part of our contexts is somehow too crude to represent 'choice' well. The example
does not tell us that in any strict sense our present framework is wrong. It just suggests that, possibly,
we could do better. We might try out richer notions of context. The most obvious proposal is to take
as a context in the new sense a set of contexts in the old sense, where the set is given 'disjunctive
reading'. 9 So, e.g., we would have:
c (9x-9y):P (x;y)
Note that e.g. the second occurrence of x in (9x-9y):P (x; y) seems to be ambiguous between free
and actively bound. So what is an ambiguous occurrence and how do we handle it theoretically? We
propose to addres this question elsewhere.
7 Relations in context
In DPL meanings are relations. The contexts we studied appear as properties of these relations.
We could give an alternative semantics for DPL by building the context into the meaning. Thus
we take as meanings pairs hc; Ri, where R 2 fcg. Let's call such a pair a c-relation. We define:
The new domain of meanings is, on the one hand, essentially richer than
the old one, since the same relation falls under several contexts. On the other hand, we threw all
non-IBO-relations away. We can 'lift' the notions intoduced in this paper to c-relations:
ffl A c-condition is a c-relations of the form hhI ; ;; Ii; Ri.
ffl If diag(dom(R))i. Similarly for cod.
ffl A c-relation R has the Switching Property if it is either a c-condition or there are variables v
and w such that:
ffl A c-relation is DPL-definable (over a given domain D) if it can be generated using ffl from
c-conditions and resettings
9 In fact, I think, this proposal is in the right direction, but still not quite right.
I am convinced that the enriched semantics is better than the usual one, but I will not argue the case here.
RELATIONS IN CONTEXT
In a similar way we can upgrade - and 99. Inspection of the proofs in this paper shows that, in
case D is infinite, the DPL-definable c-relations are precisely the ones with the Switching Property.
Moreover, all c-relations over the given domain -infinite or not- are DPL(99)-definable. We consider
an example. Remember that:
Let a model with domain D be given. We assume that D has at least two elements. Let id := id D Var .
We consider three c-relations with associate relation id.
1.
2.
3.
(1) and (2) are c-conditions and, hence DPL-definable. In fact, they can be defined in the language
by ?, respectively In contrast, (3) is not a condition. It is easy to see that (3) does not have
the Switching Property, since the domain of its internal relation id consists of all assignments and id
is injective. Hence (3) is not DPL-definable. Note that hh;; fxg; ;i; idi is not a c-relation at all.
A further step in modifying our semantics is to make the assignments 'local'. The idea is that the
context 'provides' the files/discourse referents/variables on which the variables are defined. Thus,
our meaning objects would be of the form hhI ; B; Oi; Ri, where R would be a relation taking input
assignments defined on I and yielding output assignments defined on O. This approach leads to a
semantics very much like Vermeulen's Referent Systems (see [8]). One effect of this further modification
is that it leads to a somewhat different view of contexts. In the local approach, contexts are the central
'engines' that manage the flow of the files in the interactions of meanings. This more dramatic view
of contexts is elaborated in [9].
Concluding remarks
In this paper we introduced a notion of context and specified its connections with relational semantics
and language. We used these contexts to prove a characterization of the DPL-definable relations.
Moreover, we illustrated the usefulness of contexts both in formulating and in verifying valid sequents
of DPL. We illustrated the fact that 'understanding of what is going on' is not automatically preserved
if we extend the DPL-language. E.g., adding disjunction leads to ambiguous occurrences of variables.
This observation tells us that the study of extensions will provide us clues regarding the question:
what is it to be a variable occurrence of a certain kind?
So -apart from the concrete results- what general conclusions may we draw from the paper? A
first one is, surely, that a study of the elementaria of DPL is both necessary and rewarding. Questions
on the nature of variable occurrences, the proper notion of syntactic substitution, etcetera, appear in
a new light. The fruitfulness of the study of DPL is independent of the question whether DPL is really
the best choice as a medium for representing dynamic phenomena. One reason is that, in a sense, the
relational semantics of DPL is very simple and that it is, therefore, easier to make progress. A second
conclusion is that it is rewarding to engage in a study that stresses the differences between DPL and
Predicate Logic. Much effort has gone into integrating DPL into the classical Montague framework.
This project has unavoidably a conservative flavour. The result has been that the unfamiliarity, the
strangeness of DPL has been underadvertised. Precisely mastering the strangeness provides us with
better insight into the formerly familiar notions. My third conclusion is simply: contexts are essential
in the study of DPL and its kin. We may want to vary the contexts, e.g., we may want to add 'garbage
elements' or to ignore the O-component, but contexts per se are there to stay. Our third conclusion
points to a larger programmatic point: the study of contexts and the way they are contexts of their
contents should be one of the central endeavors of the study of Information Processing and Dynamics.
REFERENCES 19
Acknowledgements
I thank Kees Vermeulen for many enlightening conversations and for his careful reading of a version
of this paper. I am grateful the students of various classes in Dynamic Logic both in Amsterdam and
in Utrecht for providing a critical forum for some of my ideas on DPL and Dynamics.
--R
Dynamic predicate logic.
Counting variables in a dynamic setting.
Categorical Type Theory.
A theory of truth and semantic representation.
Anaphora and the logic of change.
Defaults in update semantics.
Sequence semantics for dynamic predicate logic.
Merging without mystery
Dynamic bracketing and discourse representation.
--TR
--CTR
C. F. M. Vermeulen, Variables as Stacks, Journal of Logic, Language and Information, v.9 n.2, p.143-167, April 2000
C. F. M. Vermeulen, Text Structure and Proof Structure, Journal of Logic, Language and Information, v.9 n.3, p.273-311, July 2000 | variable;expressability;predicate logic;resetting;dynamics;context;register;relation;definability |
595906 | Communication across Viewpoints. | A case situation arising in a normal interaction among people is the baseline for discussing properties of the theory of viewpoints. In particular we consider how to ensure agreement on the meaning of certain utterances by agents who have different perspectives on the situation, while maintaning other knowledge as private. We argue that communication should be modeled as adding facts to the common knowledge of agents. We introduce the principle of referent sharing in communications and argue that common knowledge resulting from communication should only use constants whose referent is manifest to the parties involved. | Introduction
When several agents interact, their understanding of each other behaviour depends on some common
knowledge they all share as well as on assumptions about each other private knowledge. The
question arises then of how such common knowledge comes about. Communication between agents
seems to involve two aspects: ensuring that they all understand the subjects of their sentences and
becoming all aware that the information has been transferred.
The first aspect requires that the "referents" in communications be shared. The second entails that
communication not only involves transfer of knowledge from one agent to another but also extends
their common knowledge. These two facts together imply that common knowledge resulting from
communication should only use constants whose referent is "manifest" to the parties involved.
We explore these issues in the framework of the theory of viewpoints [2, 4, 5]. This theory was
conceived as a general and unified formalism for expressing several varieties of relativised
beliefs contexts, situations, truth, partitioning a knowledge base in microtheories and so on. Each
of these notions can be represented through viewpoints whose specific properties are captured by
axioms, added to the basic theory in order to characterise those viewpoints [26].
The theory of viewpoints is a reflective first order logic which amalgamates object and metalanguage
by using names for each term and statement of the language and which contains an axiomatisation
of provability in the style of natural deduction. Reflection rules provide the link between object and
metalanguage and lead to a non conservative but consistent extension of first order logic; these rules
have been carefully formulated in order to avoid paradoxes arising from self referential sentences,
which trickle in by diagonalisation [20].
Viewpoints denote sets of sentences which represent the assumptions of a theory. A statement of
the form in(
where vp is a viewpoint expression, is interpreted as "statement A is entailed
by the assumptions denoted by vp in the current interpretation" 1 .
The motivations and properties of the theory of viewpoints differ in several important respects from
existing proposals and formal accounts of contexts [18, 13, 25, 7, 8].
In the formal system by Buva-c and Mason for example [8], the semantics of ist(c; p), to be read as
"it is true in context c that p", is essentially (language restrictions apart) entailment: the semantics
associates to a context a set of models and p is assessed to be true in such models. As a consequence
a context will have complete information of what is true in other contexts:
Moreover the context structure, at least in the quantified version [9], is flat, according to their own
In the theory of viewpoints, since they are meant also for modeling belief contexts, the perspective
of observation is important: the fact that something holds in a viewpoint does not imply that "the
fact that it holds" is true in any other viewpoint. Therefore the property
is not desired and is not valid. To achieve this, the semantics provided for in is not entailment
but rather contextual entailment, so that the viewpoint vp 1
is resolved (interpreted) with respect
to the context where it appears (i.e. vp 2
rather than in a global context. This means that the
viewpoint expression vp 1
in the antecedent might denote a different set of assumptions from the
set of assumptions denoted by the vp 1
in the consequent. Note however that:
is valid, since contextual entailment ensures that viewpoint expressions at different levels of nesting
are interpreted coherently: the entailment is in fact restricted to a subclass of all models, those
"coherent" with the current context in the interpretation of the viewpoint expressions.
As an additional consequence the rules for entering and exiting a context have to preserve the
nesting of contexts, as argumented in [6] and as in the propositional version of the theory of
contexts by Buva-c and Mason [7, 8] but unlike in their quantified version [9].
The expressivity we require calls for implicitly defined viewpoints and a syntactic treatment of in,
so that self referential and mutually referential viewpoints can be defined. In many real applications
1 The notation 0
is an abbreviation for a term denoting sentence A. The naming device is not important in this
paper; we will feel free to drop quotes inside in when there is no risk of ambiguities.
contexts cannot be characterised explicitly by listing the complete set of assumptions. This is also
an issue raised by McCarthy when he suggests that contexts are to be considered rich objects [18].
Therefore, in addition to viewpoints expressed by means of sentence names, we also allow for
viewpoint constants and functions and rely on a partial characterisation by means of axioms stating
what holds in a viewpoint. In particular one can express the rules for the derivation of facts of type
vp). Examples of such assertions are lifting rules [18], which relate two separate viewpoints;
for example it is possible to state that whenever a formula satisfying some condition holds in a
viewpoint vp 1
then a related formula holds in viewpoint vp 2
As a special case, we can state that vp 1
subsumes vp 2
This allows for compact statements of problems and leaves to the logic machinery the burden
of extracting statement present in viewpoints as necessary during proofs from the rules which
charaterise them.
Note that the possibility of quantification over sentences inside the in operator, excluded in modal
logics, is essential to this aim; hence our choice of a syntactic treatment of the in operator.
Another important characteristic of the theory of viewpoints is that it is a reflective theory, as
opposed to a stratification of theories as in [27, 12], despite the troubles created by paradoxes. This
allows expressing facts which simply cannot be stated without the use of self referential viewpoints.
Here are some examples.
"John believes that he has a false belief " [21]
"Agent a believes that whatever he and agent b believe is true, while b does not believe so"
"Agent a and agent b have common knowledge (or belief) that p"
Note that to faithfully represent common knowledge it is not enough to state that both agents
know p, but it is also necessary to express that they know that they know p, that they know that
they know that they know
The possibility of recursive fedinitions of viewpoints (for example through lifting axioms or in
particular "auto-lifting" axioms such as CK-3) and of expressing self referential viewpoints leads
to non finite viewpoints.
2 Syntax and proof theory
The logic of viewpoints has the syntax of classical first order logic, extended with the statements
is the name of a statement and vp can be:
1. a finite set of statement names: f 0 A 0; 0 A 0; :::; 0 A 0
2. a viewpoint term, consisting of a viewpoint function and a list of terms. A viewpoint function
of no argument is a viewpoint constant.
For each symbol s of the language (either variable, function, predicate or viewpoint), we denote by
its name. Names for terms and literals are obtained through an appropriate naming schema as
in [5].
In the following we use the convention that A, B are metavariables for statements, 0 A 0 , are
quoted statements while vp; vp 1
are metavariables for viewpoints, i.e. expressions denoting
sets of sentences. To simplify the notation, we will sometimes use vp;
for sets of sentences
or, in the case of finite viewpoints, for the sentence which is the conjunction of the sentences
in the viewpoint. It should be clear from the context which is the intended meaning for such
meta-variables.
The proof theory for viewpoints can be conveniently presented in the style of natural deduction.
2.1 Inference rules for classical natural deduction
As customary, the notation \Gamma ' A indicates the pending assumptions \Gamma in the proof of A in
rules where some of the assumptions are discharged, like in the cases of implication introduction
and negation introduction. When the pending assumptions are the same in the antecedent and
consequent of a rule they are omitted.
The rules for natural deduction are quite standard. For example:
(- E)
are the rules for conjunction introduction and elimination, respectively, and
E)
are the rules for implication introduction and elimination. The full set of classical rules used is
presented in [6].
2.2 Metalevel axioms
The behaviour of in is characterised by the following axioms and inference rules, which allow classical
reasoning to be performed inside any viewpoint, and at any level of nesting.
The first axiom asserts that all the sentences which constitute a viewpoint hold in the viewpoint
itself, while the second states monotonicity of viewpoints.
An additional axiom establishes a principle which could be called positive introspection, if we choose
an epistemic interpretation for in.
(Positive introspection)
2.3 Metalevel inference rules
The following are the rules of reflection and proof in context for the theory of viewpoints: they
are more powerful than classical reflection and reification rules, but still safe from paradoxes as
discussed in [4].
(Reflection)
We have argued elsewhere for the usefulness of such a strong version of reflection [4], [5].
The metalevel should have the same inferencing capabilities of the object level. This could be
provided by means of one meta-inference rule for each classical object level inference rule, as
described in [5], or, more succintly, through the following rule of proof in context, together with a
meta-rule for implication introduction, which could be regarded as a principle of decontextualisation
[13]. Axiom1 and Axiom2 are also necessary to allow for classical reasoning in any viewpoint.
(Proof in context)
where the vp 1
in the antecedent is a finite set of sentences and the vp 1
in the consequent should be
read as the conjunction of the formulae in vp 1
. The notation 'C stands for classically derivable or
derivable without using reflection and positive introspection.
(Decontextualisation)
The converse rule of contextualisation is a derived rule:
The rule of proof in context asserts that a classical proof can be performed in any viewpoint
provided the premises of the proof are in the viewpoint. Notice that the consequent of the rule is
still a classical derivation, therefore the rule can be applied repeatedly, to carry out a proof at any
level of nesting within viewpoints. Therefore, if A 'C B then:
A corollary of proof in context is the following:
Theorem 1 in(
logical theorem A of classical natural deduction and for any view-point
vp.
Proof in context is more powerful and a much more useful rule than classical reification when
working with implicit viewpoints [6]. Classical reification is also a derived rule:
vp 'C A
(Reification)
2.4 Entering and exiting contexts
A useful mechanism when performing proofs in context is the ability to switch contexts and perform
natural deduction proofs within viewpoints. The safest way to interpret context switching in the
framework of natural deduction proofs with pending assumptions and implicit contexts is simply
to go one level deeper or shallower in nesting, or in other words unnesting and nesting.
This means for instance that in order to prove a statement of the form
one may pretend to move inside vp 1
, and perform a proof using available facts of the form
). If the formula A is itself of the form in(
one will have to go one level deeper to
prove B by using this time just facts of the form in(
In [6] we introduced a box notation for natural deduction proofs and viewpoints, making visible
the structure of dependencies and nested viewpoints in contextual reasoning. The notation is an
extension of the box notation introduced by Kalish and Montague [16].
For example, the following schema corresponds to the inference rule of negation introduction and
should be read as: "if assuming A a contradiction is reached, then :A is proved".
A (assum.)
The box notation is useful to visualise the scope of the assumptions made during a natural deduction
proof. In performing a proof within a box one can use facts proved or assumed in the same box or
in enclosing boxes. Facts cannot be exported from within a box to an enclosing or unrelated box.
For proofs in context we introduce a different kind of box, with a double border, to suggest boundaries
which are more difficult to traverse. The double box represents a viewpoint, i.e. a theory,
whose assumptions, if known, are listed in the heading of the box. If the assumptions are not
known the name of the viewpoint is shown. The only two rules for carrying facts in and out of a
double box are the rules corresponding to unnesting and nesting.
Importing a fact in a viewpoint:
vp
A
Exporting a fact from a viewpoint:
vp
A
(nesting)
The only way to import a fact A in a double box vp is to have a statement in(
in the environment
immediately outside the box. Symmetrically one can obtain in(
in the environment
immediately outside a double box vp if A appears in a line immediately inside the double box (not
inside a further single or double box within the double box). Note that to import a fact into a
nested double box the rule of unnesting must be applied repeatedly.
According to Axiom1, the assumptions of a viewpoint can also be used inside the viewpoint:
The main problem in providing a semantics to a reflective theory is to decide which truth value to
assign to statements of the form R , F ( 0 :R 0 ), which can be built by diagonalisation. Solutions
proposed in the context of logics for truth, can be a source of inspiration.
Kripke's account of truth [17] is based on Kleene's three valued logic. In his model the law of
excluded middle holds, while the principle of bivalence does not: in(
does not hold whenever
A is a classical tautology, like B - :B. A counterexample is R - :R, where R is a paradoxical
sentence. The solution by Perlis [21] also does not preserve the principle of bivalence.
We adopt therefore a different solution based on the idea of reaching a stable truth value for a
formula through an iterative process of revision as in Gupta-Herzberger semantic theory [14, 15].
We however retain the notion of truth and validity which Gupta-Herzberger leave undeterminate
for some statements.
An adequate semantics must avoid to sanction dangerous formulae. For example in consistent
reflective theories, a T axiom like
is often allowed, but in this case the reification rule (called necessitation in the context of modal
logics) must be restricted so that
is not derivable. Its derivation in fact would immediately lead to an inconsistent theory [20]. The
same argument applies to the reified positive introspection.
Another problem is accounting for positive introspection, which is a useful principle for our pur-
poses, without also having to admit the slightly different, stronger
which is not desirable and in fact cannot be proved in our theory. As a consequence, an interpretation
of in as straightforward entailment or derivability is not satisfactory. Our answer to this
problem is an interpretation of in as contextual entailment , i.e. entailment restricted to a subclass
of all models, to ensure that viewpoints at different levels of nesting are interpreted coherently.
We want to interpret in(t 1
in a certain model M, as entailment of t 1
from t 2
, i.e. that whenever
holds, then t 1
holds. However M establishes an interpretation for viewpoint functions some
of which may appear in t 1
; we must ensure that the same interpretation is used in evaluating t 1
Consider for instance:
When examining the validity of the consequent, we are already restricted to models where vp is
a viewpoint which entails A. Therefore, when we consider whether vp entails in(
must
carry over this restriction, and in fact we conclude that in all such models A is entailed by vp.
The interpretation of in as contextual entailment rests upon the notion of coherence of models. We
say that two models are coherent with respect to a viewpoint expression vp when they agree on the
interpretation given to the viewpoint constants and functions appearing in vp; formally:
Coherence is a reflexive, symmetric and transitive relation between models.
An interpretation structure M for the theory of viewpoints is a pair hD; Ii defined as follows:
1. The domain of interpretation D contains also the set of statements S of the language.
2. I associates an n-ary function f I : D n ! D, to each n-ary function symbol f of the language,
except the syntax constructors, i.e. those functions that we use to name sentences and terms
of the language, whose interpretation is fixed.
3. I associates to each n-ary predicate symbol p of the language, an n-ary predicate p I ' D n .
4. I associates to each n-ary viewpoint function vp, a function vp I : D n ! RecSubs(S); the
recursive subsets of S.
Terms are interpreted with respect to an assignment function g, which assigns elements of D to
variables. The interpretation of terms is classical except for naming terms, whose interpretation is
the term or statement they name. In particular:
In short we could write, for any term t without variables:
For each formula A, means that A is true in the interpretation M with assignment function
g. The notation g[i=x] represents the assignment function identical to g except that x is bound to
i.
For the interpretation of statements we proceed by defining the notion of true at level n. For
statements which do not contain variables quantified across in statements, the level corresponds to
the level of nesting of in statements. A statement with a nesting level of n will receive its definitive
truth value at level n; while paradoxical statements, to which no finite level of nesting can be
assigned, will keep oscillating periodically between true and false.
At level 0, all statements are considered false: not
M;g A.
For any n ? 0:
M;g (:A) iff not
M;g A
M;g A and
M;g A or
M;g (8x:A) iff for all d in D, 9k:
M;g[d=x] A
The truth of in statements at level n is defined on the basis of the truth at level n \Gamma 1. The
interpretation of in is contextual entailment , i.e. entailment restricted to a subclass of all models,
to ensure that viewpoints at different levels of nesting are interpreted coherently.
such that (N j t 2
M), not
or
In most cases, this process of revision stabilises in the sense that the truth value of statements settles
to either true or false from a certain level onward. There are however paradoxical statements, like
the counterpart of the liar statement, which do not stabilise at any finite level of revision but
continue to oscillate between different truth values. To such statements false will be assigned as
ultimate truth value.
A statement is said to be stably true accordingly to whether or not the revision process stabilises:
M;g A
Stable truth is however too coarse, since all statements which do not stabilise are considered false:
therefore for any such statement R both R and :R would be false. One further step is necessary
to distinguish among the statements which do not stabilise.
The notion of truth is classical except for in statements which relies on stable
Validity is defined as usual:
The notation vp j= A means that A is true in every model of vp.
We can verify that our semantics has the required properties.
Note. The law of excluded middle holds both at the object level:
A - :A
and at the metalevel:
However this does not imply that in(
which would be undesirable since it would
sanction the completeness of any viewpoint.
Consider the formula R, such that R , in(
which corresponds to the Liar sentence. The
paradox is avoided since the Liar sentence is false in every model:
We summarise a few relevant properties of our semantics:
1.
M A implies A but not vice versa.
2. in(
3. (in( 0 A
4. in(
is not valid.
5. in(
vp) is not valid.
6. in(
7. in(
) is not valid.
4 Sharing of referents in communication
We will illustrate with an example several features of the theory of viewpoints and how to reason
in it. The example is meant to illustrate several issues related to the modeling of communications
among agents holding different viewpoints about the same state of affairs and in particular using
different expressions to denote the objects of interest.
One morning Beppe told Maria about the following dream.
You and me are traveling by train, and you have both our tickets. I go to the toilet.
After my return the ticket inspector passes and asks for unchecked tickets.
I do nothing, since I know that you have my ticket. You do nothing since you have
already shown both tickets to the inspector while I was away. The inspector does not
remember seeing my ticket and therefore he asks me for it. At this point I ask you why
you do not show the ticket to the inspector.
We will attempt a formalisation of the reasoning of each agent involved in the situation described
above at different times, providing a rational account for the agent's behaviour.
In the reasoning by the inspector and by Maria, they both assume knowing certain information
about each other. Each one should have obtained such information through the transaction that
happened between them when Maria showed the tickets to the inspector. The transaction should
be modeled in such a way that some information flows from one agent to the other and that both
agents become aware not only of the transaction but also that the other is aware of the information
conveyed in the transaction.
The proper way to model the effect of a communication act is by extending the common knowledge
of the participants. The effect is not only that some information is added to the knowledge of
the recipients of the communication, but also that the recipients' awareness of such information
enriches the viewpoint of the originator of the communication, and the recipients become aware of
this and so on.
Communication also raises a problem about terms and denotations: i.e. which constants should be
used in the formalisation of the communicated knowledge. For instance, in the interaction between
Maria and the inspector while Beppe is away, how can Maria refer to Beppe? In our solution we
decided that she can't refer to Beppe directly, since she has no way to ensure that her reference to
Beppe will be the same as the one of the inspector.
The only things to which she can refer in her interaction with the inspector are what we call
"manifest constants", i.e. constants to which she can point directly (for instance because they are
objects in the scene), or indirectly through terms built upon other manifest constants (for instance
Husband-of(M), or Person-sitting(there)). We could even use Person-named("Beppe"), since the
name "Beppe" is part of the common vocabulary, however the referent of such name may not be
the same in all viewpoints.
Quine speaks about "observations terms", which are terms that are or can be taught by ostension,
and whose application in each particular case can therefore be checked intersubjectively [24].
Learning, and in particular language learning, is predicated on observation terms and hence on
ostension: as children learning the language, we get on to various simple terms and key phrases by
direct association with appropriate experiences. When we have progressed a bit with this kind of
learning, we learn further usages contextually [23].
We require that any statement expressing common knowledge between two agents, gained as a result
of a communication, only uses manifest constants: we call this the principle of referent sharing in
communicating knowledge.
Therefore in the example, the transaction between Maria and the inspector will be expressed by
means of the manifest constant ticket2 which refers to the actual ticket that Maria hands over to
the inspector. If we were to use T icket(B), where B is the constant denoting Beppe, we would
unduly transfer Maria's knowledge that Beppe's ticket has been checked to the viewpoint of the
inspector.
A different approach would be not to worry about terms used in the communication and rely on
a theory which provides for different denotations of terms in different contexts, as for example the
theories of context discussed by Buva-c, Guha and McCarthy.
5 Formalisation of Beppe's dream
The following notation will be used in the formalisation of the example introduced above.
B: Beppe
Beppe's viewpoint at time t
Maria's viewpoint at time t
vp(C; t): the ticket inspector's viewpoint at time t
knowledge of the set of agents denoted by x at time t;
in the example we will use All for everybody,
BM for Beppe and Maria and MC for Maria and the inspector;
Has(x;
shows ticket y to the inspector at time t;
ticket x has been checked.
Common knowledge of a set of agents plays a significant role in this example and we express it as
one theory for lifting axioms provided for each involved agent to access it. A general formulation
of common knowledge which will serve the purpose of the example, is the following.
Axioms for common knowledge:
to be used in conjunction with the following:
Axioms (1) and (2) provide a proper account of common knowledge to a group of agents, allowing
to derive the commonly known facts in any viewpoint, no matter how nested. In particular axiom
(2) is used to achieve the appropriate level of nesting in CK, and axiom (1) to lift from the CK
viewpoint at time t to any other relevant viewpoint at time t.
For example assuming:
(a)
it is possible to derive
which will appear in the proof as line (33), with the following steps:
(c) in(in(Has(M; Ticket(B)); vp(M; t 3
(d) in(in(Has(M; Ticket(B)); vp(M; t 3
To be more concise, we will skip similar derivation steps from common knowledge from now on.
The specific knowledge of the problem can be expressed as follows:
Both Beppe and Maria know that Maria has both tickets, at any time;
Corresponds to the common sense knowledge that only one person can hold a given object.
Next we need axioms to describe Maria's act of showing the tickets to the inspector and its effect,
i.e. the information conveyed in that act. They deserve some discussion.
In formalising the information flow one must avoid that also unintended information be transferred
between viewpoints.
For example, one might express as follows the fact that once Maria has shown her tickets, the
inspector checks them and thereafter they both know that they have been checked:
Maria knows that she has shown both tickets at time t 0
Maria knows that the second ticket is Beppe's;
It is common knowledge that after Maria has shown a ticket, at any later time she and the
inspector know that the ticket has been checked.
However this solution has a flaw: applying the law of substitutivity in Maria's viewpoint, Maria
knows that Shows(M; ticket2; t 0
therefore she can con-
clude, for instance, that in(Checked(Ticket(B)); vp(C; t 3 )). The effect is therefore that she unduly
transfers her information about ticket2 being Beppe's ticket to the viewpoint of the inspector.
The solution is then to separate the information flow from the conclusion that each agent is able
to draw from the information gathered.
First, we state that showing the ticket is common knowledge of both Maria and the inspector. This
is the information that is actually transmitted.
Maria and the inspector know that she has shown both tickets at time t 0
while the first ticket
can be referred to as Maria's ticket the second one is simply ``a second ticket'' in the common
knowledge viewpoint;
Maria knows that the second ticket is Beppe's (while the inspector doesn't);
The first statement uses ticket2 and cannot use T icket(B) since this is not a manifest constant and
is therefore forbidden by the principle of referent sharing in a statement on common knowledge.
And now we allow each agent to draw his own conclusion about which tickets have been checked:
It is common knowledge of Maria and the inspector that after Maria has shown a ticket, the
ticket has been checked.
Using these statements, we can easily prove the following two lemmas that will be used in the
formal account of the reasoning. The first lemma, corresponds to the fact that Maria knows that
her ticket and Beppe's have been checked by the inspector.
The second lemma, that will be used in Maria's reasoning, corresponds to the fact that she knows
that the inspector is aware of having checked her ticket and a second one, referred to as ticket2.
in particular, the following facts that Maria will use in her reasoning, can also be proved in viewpoint
while it is not the case that the inspector, nor Maria reasoning about the inspector, can deduce:
Finally we formalise the first request from the inspector (the request to show unseen tickets), which,
at time t 1
, becomes part of common knowledge in the following form:
Figure
1 summarises the axioms that have been used in the statement of the problem.
We can now proceed to give a formal account of the reasoning of the different agents at the different
times involved.
This is the reasoning in Beppe's viewpoint, at time t 1
Figure
1: Problem statement
Maria has my ticket;
I do not have my ticket;
Since I do not have a ticket the request from the inspector does not apply to me.
I do not have to show my ticket.
Therefore Beppe does nothing. Maria reasons as follows at the same time.
The inspector has already checked our tickets;
The request of the inspector does not apply to Beppe's ticket;
I do not have to show Beppe's ticket;
The request of the inspector does not apply to my ticket;
I do not have to show my ticket.
Therefore also Maria has good reasons for doing nothing. After this, at time t 2
, the common
knowledge is enriched as follows for the fact that nobody shows any ticket:
Moreover we have the fact that the inspector doesn't remember seeing Beppe's ticket, which is part
of the statement of the problem; this however is not common knowledge but it is asserted outside
any viewpoint.
Reasoning about the inspector in the external viewpoint, where the problem has been stated, and
including axioms (1)-(10) plus axiom (21).
the inspector notices, as anybody, that nobody shows Beppe's ticket at time t 1
he reasons that either the ticket has been checked or nobody has Beppe's ticket.
Assume the inspector believes that somebody has Beppe's the ticket;
he should at least believe that Beppe's ticket has been checked; but he doesn't by (21),
therefore:
the inspector cannot deduce that somebody has Beppe's ticket.
This same reasoning can be performed by the inspector himself, provided we postulate the addi-
tional, and reasonable, assumption that he is aware of the fact that he doesn't remember. This can
be made explicit in the statement of the problem or alternatively derived from (21) by negative
introspection (assuming this is a valid principle in general).
a realisation by the inspector of the fact that he cannot tell whether somebody has Beppe's
ticket.
As a consequence he asks Beppe to show his ticket. It is now common knowledge, at time t 3 , that
the inspector does not know whether somebody has Beppe's ticket.
Beppe now, at time t 3
The inspector does not know whether somebody has my ticket;
Assume the inspector thinks that he has seen my ticket;
He should also believe that somebody has my ticket, but he doesn't by (30);
therefore he does not believe that my ticket has been checked;
Maria knows that she did not show my ticket when asked;
Maria knows that she has the ticket;
Maria is aware of what the inspector said;
Maria believes that my ticket has been checked.
Therefore Beppe notices a difference between the inspector's viewpoint and Maria's viewpoint (lines
33 and 37); that's why he asks Maria why she doesn't show his ticket.
Finally, solicited by the request of the inspector and, further, from Beppe himself, Maria reasons
The inspector is not aware of the fact that he checked Beppe's ticket
(similar to Beppe's reasoning above).
but he certainly remembers having checked a second ticket;
he doesn't realize that the second ticket is Beppe's one
(otherwise there would be a contradiction).
she decides that in order to resolve the question she must tell the inspector that the second
ticket is Beppe's one. This goes a little beyond Beppe's dream, but it looks like a plausible reason
of the fact that the inspector does not remember: Maria, showing both tickets Beppe being absent
could not refer to Beppe as the owner of the second ticket.
6 Technical points about this example
The reasoning performed by the agents involved in the situation described by the example is simple
and intuitive, yet it appears that its formal account has some requisites in terms of expressivity of
the logical representation language to make it an interesting case study. In the following we will
discuss additional aspects of the proposed formalisation.
6.1 Viewpoint functions
We have several agents (Maria, Beppe, the inspector) and several times corresponding to situations
with different knowledge involved. We use vp(a; t), a viewpoint function denoting the viewpoint
of agent a at time t; the example shows the importance of viewpoint functions with variables
quantified in; this way it is possible to express, for example, that a certain fact holds from a certain
time on, or, if necessary, that there is a time when a fact holds.
6.2 Propagation of ignorance
The inspector does not remember having checked Beppe's ticket, and as a consequence he makes
everybody aware of the fact that he does not know whether Beppe has a ticket, and as a further
consequence Maria can realize that the inspector does not know that the second ticket he has seen
is Beppe's ticket.
Note that in the example we do not deal with deduction of ignorance from the fact somebody cannot
deduce something, a property which is in general undecidable in a first order setting (see [1, 10] for
examples of this approach). In other words ignorance in not "introduced" but only "propagated".
All we do is to use a much more conservative and sound pattern of reasoning for propagation of
ignorance, namely: if we have :in(A; vp) and we want to prove :in(B; vp), we can assume in(B; vp)
and try to prove in(A; vp); if this succeeds, we have succeeded in proving :in(B; vp).
In other words the following is a sound rule of inference:
(Propagation of Ignorance)
6.3 Viewpoint consistency is an option
In the example we do not deal with nonmonotonic aspects such as changes of mind, assumptions by
default, resolving contradictions, and so on. In this problem once a piece of knowledge is acquired
in a viewpoint it is also assumed to hold in successive viewpoints in time.
Dealing with nonmonotonic aspects would require writing problem dependent axioms stating what
changes and what doesn't from one viewpoint to the next in time.
In this respect some of the ideas presented in connection with the step/active logics by Perlis and
co-authors look promising [22, 19]. As an example we could exploit their approach to resolving
contradictions, once they manifest explicitly, by failing to inherit to the next step contradicting
assumptions.
This can be done since consistency of viewpoints is an option: the axiom :in(false; vp) does not
hold in general; a viewpoint can become inconsistent without affecting other viewpoints nor the
global reasoning context. This means that in the presence of a contradictory viewpoint, without the
consistency axiom, the inconsistency does not propagate outside and one can consistently reason
about it and adopt the best strategy available to create a new consistent viewpoint.
7 Implementation of viewpoints
The implementation of the Omega description logic [3] provided a viewpoints mechanism which
emphasised a hierarchical organisation of viewpoints. Viewpoints, as the other descriptions of
the Omega system, could be arranged in a lattice, where a viewpoint inherited from another by
including all the sentences belonging to it. Thereafter a viewpoint would inherit all the logical
consequences from its ancestor viewpoints. This proved useful for instance to create viewpoints
describing a basic theory (e.g. natural deduction), from which more specific viewpoints could be
created by adding new statements.
A new implementation of the theory of viewpoints is in progress using the Coq Proof Assistant
which supports the development of higher order logics [11]. The logical language used by Coq is a
variety of type theory, called the Calculus of Inductive Constructions.
The -calculus notation can be used as a uniform encoding for expressions, assertions and proofs.
Type checking rules enforce well-formedness conditions. According to the Curry-Howard isomor-
phism, assertions are represented as types and proofs are represented as terms whose type is the
formula they prove. Proving a formula is therefore seen as exhibiting a term of a given type (proving
constructively that the type is populated).
For defining a new logic system one has to provide:
1. a definition of wff's: by defining a signature for terms and formulas;
2. a definition of the logical axioms: asserting the existence of constants, whose type is the
formula corresponding to the axiom schema;
3. a definition of the inference rules: asserting the existence of constants, of functional type,
mapping the premises into the conclusions;
Using the higher order features of the language the naming device used for reifying sentences at
the metalevel and for the formulation of the reflection rules is greatly simplified: sentences are
represented as terms at any level.
An important task will be to prove that the presentation of the logic (by means of a specific
signature) is adequate in the sense that the encoding is a compositional bijection between the
syntactic entities (terms, formulas, proofs) of the logical system and certain valid -terms in the
signature. In particular we will have to prove that the higher order does not introduce any additional
theorems.
8 Conclusion
We have discussed properties of a theory of viewpoints which extends a classical natural deduction
calculus with sentences of the type in(A; vp) and with axioms and inference rules for contextual
reasoning.
We argued that an appropriate formalisation of the effect of communication acts is to extend the
common knowledge of the participants with statements which can only contain terms made out of
manifest constants, so that referent sharing is ensured.
--R
Reasoning about Knowledge and Ignorance
Metalanguage and reasoning across viewpoints
A Description Oriented Logic for Building Knowledge Bases
Reflections about reflection
A formalisation of viewpoints
Proofs in context
Propositional Logic in Context
Metamathematics of Contexts
Quantificational Logic of Context
Agent Reasoning with Belief Contexts: the Approach and a Case Study
The Coq Proof Assistant
Contexts: A Formalization and Some Applications
Truth and paradox
Notes on naive semantics
Logic: techniques of formal reasoning
Outline of a theory of truth
Notes on Formalizing Context
Context Shifts and Clashes in Dialogues: An Active Logic Perspective
Syntactical treatment of modalities
Languages with self-reference I: foundations
Reasoning Situated in Time I: Basic Concepts
On Mental Entities
Linguistics and Philosophy
Varieties of contexts
Viewpoints subsume belief
Prolegomena to a theory of mechanized formal reasoning
--TR
--CTR
Richard W. Weyhrauch , Marco Cadoli , Carolyn L. Talcott, Using Abstract Resources to Control Reasoning, Journal of Logic, Language and Information, v.7 n.1, p.77-101, January 1998 | metalevel theories;contexts;reflective theories;viewpoints;natural deduction |
595925 | Off-Line Parsability and the Well-Foundedness of Subsumption. | Typed feature structures are used extensively for the specification of linguistic information in many formalisms. The subsumption relation orders TFSs by their information content. We prove that subsumption of acyclic TFSs is well founded, whereas in the presence of cycles general TFS subsumption is not well founded. We show an application of this result for parsing, where the well-foundedness of subsumption is used to guarantee termination for grammars that are off-line parsable. We define a new version of off-line parsability that is less strict than the existing one; thus termination is guaranteed for parsing with a larger set of grammars. | Introduction
Feature structures serve as a means for the specification of linguistic information in current
linguistic formalisms such as LFG (Kaplan and Bresnan, 1982), HPSG (Pollard and Sag,
1994) or (some versions of) Categorial Grammar (Haddock, Klein, and Morill, 1987). This
paper focuses on typed feature structures (TFSs) that are a generalization of their untyped
counterparts. TFSs are related by subsumption (see (Carpenter, 1992b)) according to their
Journal of Logic, Language and Information, accepted for publication
information content. We show that the subsumption relation is well-founded for acyclic TFSs,
but not for cyclic ones. We use this result to prove that parsing is terminating for grammars
that are off-line parsable: this proposition is cited, but not proved, in (Shieber, 1992). We
also suggest a less strict definition for off-line parsability that guarantees termination in the
case of acyclic TFSs.
This work has originated out of our interest in the theoretical aspects of parsing with
grammars that are based on TFSs (see (Wintner and Francez, 1995b)). While the results
presented here are basically theoretical, we have implemented a system for efficient processing
of such grammars, based on abstract machine techniques; this work is presented in (Wintner
and Francez, 1995a). The rest of this paper is organized as follows: section 2 outlines the
theory of TFSs of (Carpenter, 1992b). In section 3 we discuss the well-foundedness of TFS
subsumption. We sketch a theory of parsing in section 4 and discuss off-line parsability of
TFS-based grammars in section 5.
2 Theory of feature structures
This section summarizes some preliminary notions along the lines of (Carpenter, 1992b).
While we use the terminology of typed feature structures, all the results are valid for untyped
structures, that are a special case of TFSs. (Carpenter, 1992b) defines well-typed and totally
well-typed feature structures that are subsets of the set of TFSs; for generality, we assume
nothing about the well-typedness of TFSs below. However, the larger context of our work is
done in a setup where features are assigned to types through an appropriateness specification,
and hence we retain the term typed feature structures rather than sorted ones. For the
following discussion we fix non-empty, finite, disjoint sets Types and Feats of types and
features, respectively, and an infinite set Nodes of nodes, disjoint of Types and Feats,
each member of which is assigned a type from Types through a fixed typing function
Nodes ! Types. The set Nodes is 'rich' in the sense that for every t 2 Types, the set
Below, the meta-variable T ranges over subsets of Types, t - over types, f - over features
and q - over nodes. For a partial function F , 'F (x)#' means that F is defined for the value
x. Whenever the result of an application of a partial function is used as an operand, it is
meant that the function is defined for its arguments. IN denotes the set of natural numbers.
A partial order v over Types is a type hierarchy if it is bounded complete, i.e., if every
up-bounded subset T of Types has a (unique) least upper bound, tT . If t v t 0 , t is said to
be more general than t 0 , which is more specific than t. t 0 is a subtype of t. is the
most general tTypes is the most specific, inconsistent type. All occurrences of ?
are identified.
A feature structure (over the parameters Nodes, Types and Feats) is a directed,
connected, labeled graph consisting of a finite, nonempty set of nodes Q ' Nodes, a root
Q, and a partial function specifying the arcs, such that every node
accessible from - q. A; B (with or without subscripts) range over feature structures
and Q; -
(with the same subscripts) over their constituents. 1 Let TFSs be the set of all
typed feature structures (over the fixed parameters Nodes, Types and Feats).
A path is a finite sequence of features, and the set Feats is the collection of
paths. ffl is the empty path. -; ff (with or without subscripts) range over paths. The definition
of ffi is extended to paths in the natural way: ffi(q; -). The
paths of a feature structure A are -)#g. Note that for
every TFS A, \Pi(A) 6= OE since ffl 2 \Pi(A) for every A.
A feature structure
q; ffi) is cyclic if there exist a non-empty path ff 2 Paths
and a node q 2 Q such that ffi(q; q. It is acyclic otherwise. Let ATFSs be the set of all
acyclic TFSs (over the fixed parameters). A feature structure
q; ffi) is reentrant iff
there exist two different paths
Definition 2.1 (Subsumption) A
exists a total function subsumption morphism) such that
ffl for every q 2
ffl for every q 2 Q 1 and for every f such that
Untyped feature structures can be modeled by TFSs: consider a particular type hierarchy in which the set
of types is the set of atoms, plus the types complex and ?, ? subsumes every other type, and the rest of the
types are incomparable. All features are appropriate for the type complex only, with ? as their appropriate
value. Atomic nodes are labeled by an atom, non-atomic nodes - by complex and variables - by ?.
The symbol 'v' is overloaded to denote subsumption (in addition to the subtype relation).
The morphism h associates with every node in Q 1 a node in Q 2 with at least as specific a
moreover, if an arc labeled f connects q with q 0 in A 1 , then such an arc connects h(q)
with h(q 0 ) in A 2 . Two properties follow directly from the definition: If A v B then every
path defined in A is defined in B, and if two paths are reentrant in A they are reentrant in
B.
If two feature structures subsume each other then they have exactly the same structure.
The only thing that distinguishes between them is the identity of the nodes. This information
is usually irrelevant, and thus an isomorphism is defined over TFSs as follows: A and B are
alphabetic variants (denoted A - B) iff A v B and B v A. A strictly subsumes B
If A strictly subsumes B then one of following cases must hold: either B contains paths
that A doesn't; or there is a path in B that ends in a node with a type that is greater than
its counterpart in A; or B contains 'more reentrancies': paths that lead to the same node in
B lead to different nodes in A.
Lemma 2.2 If A ! B (through the subsumption morphism h) then at least one of the following
conditions holds:
1. There exists a path - 2 \Pi(B) n \Pi(A)
2. There exists a node q 2 QA such that '(q) ! '(h(q)),
3. There exist paths
Well-foundedness
In this section we discuss the well-foundedness of TFS subsumption. A partial order - on a set
D is well-founded iff there does not exist an infinite decreasing sequence d 0 - d 1 - d
of elements of D. We prove that subsumption of acyclic TFSs is well-founded, and show an
example of general (cyclic) TFSs for which subsumption is not well-founded. While these
results are not surprising, and in fact might be deduced from works such as, e.g., (Moshier
and Rounds, 1987) or (Shieber, 1992), they were not, to the best of our knowledge, spelled
out explicitly before.
Lemma 3.1 A TFS A is acyclic iff \Pi(A) is finite.
Proof: If A is cyclic, there exists a node q 2 Q and a non-empty path ff that ffi(q;
Since q is accessible, let - be the path from the root to q: ffi( -
q. The infinite set of
paths contained in \Pi(A).
If A is acyclic then for every non-empty path ff 2 Paths and every q 2 Q, ffi(q; ff) 6= q. Q
is finite, and so is Feats, so the out-degree of every node is finite. Therefore the number of
different paths leaving -
q is bounded, and hence \Pi(A) is finite. 2
Definition 3.2 (Rank) Let r : Types ! IN be a total function such that r(t) ! r(t 0 ) if
. For an acyclic TFS A, let
IN be defined by \Delta(A).
By lemma 3.1, rank is well defined for acyclic TFSs. \Delta(A) can be thought of as the 'number
of reentrancies' in A: every node q 2 QA contributes to \Delta(A). For every
acyclic TFS A, \Delta(A) - 0 (clearly
Lemma 3.3 If A ! B and both are acyclic then
Proof: Since A v B, \Pi(A) ' \Pi(B). Consider the two possible cases:
ffl If
by the definitions of \Theta and subsumption;
by the definition of subsumption, since every reentrancy in A is a
reentrancy in B;
- By lemma 2.2, either case (2) holds), or \Delta(A) ! \Delta(B) (if case
(3) holds).
Hence
ffl If \Pi(A) ae \Pi(B) then
it might be the case that jQA j ! jQB j. But for every node q 2 QB that is not
the image of any node in QA , there exists a path - such that
Hence
Theorem 3.4 Subsumption of acyclic TFSs is well-founded.
Proof: For every acyclic TFS A,
rank(B). If an infinite decreasing sequence of acyclic TFSs existed, rank would have mapped
them to an infinite decreasing sequence in IN , which is a contradiction. Hence subsumption
is well-founded for acyclic TFSs. 2
Theorem 3.5 Subsumption of TFSs is not well-founded.
Proof: Consider the infinite sequence of TFSs A depicted graphically in figure 1.
For every i - 0, A to see that consider the morphism h i that maps - q i+1 to -
(i.e., the first i nodes of A i+1 are mapped to
the first i nodes of A i , and the additional node of A i+1 is mapped to the last node of A i ).
Clearly, for every i - 0, h i is a subsumption morphism. Hence, for every i - 0; A i w A i+1 .
To show strictness, assume a subsumption morphism
. By the third requirement of subsumption (h commuting with ffi), the first
nodes in A i have to be mapped by h 0 to the first i nodes in A i+1 . However, if q is
the 1-th node of A i , then ffi i (q) leads back to q, while ffi i+1 leads to the last node
of A i+1 (the cyclic node), and hence h 0 does not commute with ffi, a contradiction. Hence,
Thus, there exists a strictly decreasing infinite sequence of cyclic TFSs and therefore subsumption
is not well-founded. 2
To conclude this section, note that specification, which is the inverse relation to subsump-
tion, is not well-founded even when cyclic feature structures are ruled out. This fact can
easily be seen by considering the sequence of feature structures
f
f
f
f
f
f
f
f
f
A3
Figure
1: An infinite decreasing sequence of TFSs
of nodes, the first i of which are labeled t and the last - ?, and an f-arc leads from
every node to its successor. Clearly, and the sequence is infinite.
This is true whether or not appropriateness constraints are imposed on the feature structures
involved.
In the general case, then, given a feature structure A it might be possible to construct,
starting from A, both an infinite decreasing sequence of TFSs (by expanding cycles) and an
infinite increasing sequence (by adding paths).
Parsing
Parsing is the process of determining whether a given string belongs to the language defined
by a given grammar, and assigning a structure to the permissible strings. A large variety
of parsing algorithms exists for various classes of grammars (for a detailed treatment of the
theory of parsing with grammars that are based on feature structures, refer to (Shieber,
1992; Sikkel, 1993; Wintner and Francez, 1995b)). We define below a simple algorithm for
grammars that are based on TFSs, but it must be emphasized that the results presented in
this paper are independent of the particular algorithm; they hold for a wide range of different
algorithms.
To be able to represent complex linguistic information, such as phrase structure, the
notion of feature structures is usually extended. There are two different approaches for
representing phrase structure in feature structures: by adding special, designated features to
the FSs themselves; or by defining an extended notion of FSs. The first approach is employed
by HPSG: special features, such as DTRS (daughters), encode trees in TFSs as lists. This
makes it impossible to directly access a particular daughter. (Shieber, 1992) uses a variant
of this approach, where a denumerable set of special features, namely 0; are added to
encode the order of daughters in a tree. In a typed system such as ours, this method would
necessitate the addition of special types as well; in general, no bound can be placed on the
number of features and types necessary to state rules (see (Carpenter, 1992b, p. 194)).
We adopt below the other approach: a new notion of multi-rooted feature structures,
suggested by (Sikkel, 1993) and (Wintner and Francez, 1995b), is being used.
Definition 4.1 (Multi-rooted structures) A multi-rooted feature structure (MRS)
is a pair h -
is a finite, directed, labeled graph consisting of a set
Nodes of nodes and a partial function specifying the arcs, and -
Q is
an ordered (repetition-free) set of distinguished nodes in Q called roots. G is not necessarily
connected, but the union of all the nodes reachable from all the roots in -
Q is required to yield
exactly Q. The length of a MRS is the number of its roots, j -
Qj. - denotes the empty MRS
(where
is cyclic under the same conditions a TFS is. A
MRS is reentrant if it contains a node that can be reached either from two different roots
or through two different paths.
Meta-variables oe; ae range over MRSs, and ffi; Q; -
constituents. If
Q; Gi
is a MRS and -
q i is a root in -
naturally induces a feature structure A
is the set of nodes reachable from -
Thus oe can be viewed as an
ordered sequence hA necessarily disjoint) feature structures. We use the two
views of MRSs interchangeably.
Not only can nodes be shared by more than one element of the sequence; paths that start
in one root can reach a different root. In particular, cycles can involve more than one root.
Still, it is possible to define sub-structures of MRSs by considering only the sub-graph that
is accessible from a sub-sequence of the roots.
Definition 4.2 (Sub-structure) The sub-structure of induced by the
pair hi; ji and denoted oe i:::j , is hA use oe i for oe i:::i .
Definition 4.3 (Subsumption of multi-rooted structures) A MRS
Q; Gi subsumes
a MRS oe
(denoted by oe v oe 0
there exists a total
ffl for every root -
ffl for every q 2 Q, '(q) v '(h(q))
ffl for every q 2 Q and f 2 Feats, if ffi(q; f)# then h(ffi(q;
Many of the properties of TFSs are easily adaptable to MRSs. Let
q is the i-th root in -
-)#g. Then it is easy to show that if oe v ae then
every reentrancy in oe is a reentrancy in ae. Moreover, if oe ! ae (strictly)
then at least one of the three conditions listed in lemma 2.2 holds.
The well-foundedness result of the previous section are easily extended to MRSs as well.
and the same rank function
of TFSs can be used to show the well-foundedness of (acyclic) MRSs. The reverse direction
is immediate: in the presence of cycles, duplicate the example of the previous section k times
and an infinite decreasing sequence of MRSs of length k is obtained, for any k ? 0. For a
detailed discussion of the properties of MRSs, refer to (Wintner and Francez, 1995b).
Rules and grammars are defined over an additional parameter, a fixed, finite set Words
of words (in addition to the parameters Nodes, Feats and Types). The lexicon associates
with every word w a feature structure Cat(w), its category. 2 The categories are assumed to
be disjoint. The input for the parser, therefore, is a sequence of (disjoint) TFSs rather than
a string of words.
Definition 4.4 (Pre-terminals) Let defined iff
case it is the MRS hCat(w j ); Cat(w j+1
PTw (j;
2 For the sake of simplicity, we assume that lexical entries are not ambiguous. In the case of ambiguity,
Cat(w) is a set of TFSs. While the definitions become more cumbersome, all the results still obtain.
If a single word occurs more than once in the input (that is, w its category
is copied (with remaned nodes) more than once in PT .
Definition 4.5 (Grammars) A rule is an MRS of length greater than or equal to 1 with
a designated (first) element, the head of the rule. The rest of the elements form the rule's
body (which may be empty). A grammar G = (R; A s ) is a finite set of rules R and a start
A s that is a TFS.
Figure
2 depicts an example grammar (we use AVM notation for this rule; tags such as 1
denote reentrancy). The type hierarchy on which the grammar is based is omitted here.
Initial
phrase
s
Lexicon:
John her loves6 6 6 6 6 6 6 4
word
\Theta
AGR :4
agr
\Theta
3rd
\Theta
sg
sem
\Theta
john
word
\Theta
acc
AGR :4
agr
\Theta
3rd
\Theta
sg
sem
\Theta
she
word
\Theta
AGR :4
agr
\Theta
3rd
\Theta
sg
sem
\Theta
love
phrase
\Theta
s
sem
sign
\Theta
nom
sem
sign
\Theta
phrase
\Theta
sem
\Gamma!6 6 4
sign
\Theta
sign
\Theta
acc
sem
Figure
2: An example grammar
In what follows we define the notion of derivation (or rewriting) with respect to TFS-based
grammars. Informally, this relation (denoted ';') is defined over MRSs such that oe ; ae iff
ae can be obtained from oe by successive application of grammar rules. The reader is referred
to, e.g., (Sikkel, 1993; Shieber, Schabes, and Pereira, 1994; Wintner and Francez, 1995b) for
a detailed formulation of this concept for a variety of formalisms.
To define derivations we first define immediate derivation. Informally, two MRSs A and
are related by immediate derivation if there exists some grammar rule ae that licenses the
derivation. ae can license a derivation by some MRS R that it subsumes; the head of R must
be identified with some element i in A, and the body of R must be identified with a sub-structure
of B, starting from i. The parts of A prior to and following i remain intact in B.
Note that R might carry reentrancies from A to B: if a path - 2 leaving the i-th element of
A is reentrant with some path - 1 leaving the a-th element, and - 2 , starting from the head of
R, is reentrant with - 3 in some element b in R, then - 1 and - 3 are reentrant in B, starting
from the elements in B that correspond to a and b, respectively.
Definition 4.6 A MRS immediately derives a MRS
(denoted A ! B) iff there exist a rule ae 2 R of length n and a MRS R w ae, such that:
ffl R's head is identified with some element i of A: R
ffl R's body is identified with a sub-structure of B: R
ffl The first are identical: A
ffl The last k \Gamma i elements of A and B are identical: A
The reflexive transitive closure of '!', denoted '
!', is defined as follows: A
or if there exists A 0 such that A ! A 0 and A 0
A 00 .
Definition 4.7 A MRS A derives a MRS (denoted A ; B) iff there exist MRSs A
such that A v A 0 ,
Immediate derivation is based on the more traditional notion of substituting some symbol
which constitutes the head of some rule with the body of the rule, leaving the context intact.
However, as our rules are based on TFSs, the context of the "symbol" to be substituted might
be affected by the substitution. To this end we require identity, and not only unifiability, of
the contexts. MRSs related by derivations should be viewed as being "as specific as needed",
i.e., containing all the information that is added by the rule that licenses the derivation. This
is also the reason for the weaker conditions on the ';' relation: it allows an MRS A to derive
an MRS B if there is a sequence of immediate derivations that starts with a sepcification of
A and ends in a specification of B.
Figure
3 depicts a derivation of the string "John loves her" with respect to the example
grammar. The scope of reentrancy tags should be limited to one MRS, but we use the same
tags across different MRSs to emphasize the flow of information during derivation.6 6 6 6 6 6 6 6 6 6 6 6 4
phrase
\Theta
s
agr
\Theta
3rd
\Theta
sg
sem
\Theta
love
\Theta
john
\Theta
she
(1)
sign
\Theta
nom
agr
\Theta
3rd
\Theta
sg
sem
\Theta
john
sign
\Theta
sem
\Theta
love
(2)
word
\Theta
nom
agr
\Theta
3rd
\Theta
sg
sem
\Theta
john
word
\Theta
agr
\Theta
3rd
\Theta
sg
sem
\Theta
love
word
\Theta
acc
AGR :4
agr
\Theta
3rd
\Theta
sg
sem
\Theta
she
John loves her
Figure
3: A leftmost derivation
Definition 4.8 (Language) The language of a grammar G is
n)g.
The derivation example of figure 3 shows that the sentence "John loves her" is in the language
of the example grammar, since the derivation starts with a TFS that is more specific than
the initial symbol and ends in a specification of the lexical entries of the sentences' words.
Parsing is a computational process triggered by some input string of words
of length n - 0. For the following discussion we fix a particular grammar
particular input string w of length n. A state of the computation consists of a set of items.
Definition 4.9 (Items) An item is a tuple [i; oe; j; k], where oe is an MRS
joej. an item is active if k ! joej, otherwise it is complete. Items is the
collection of all items.
If [i; oe; j; k] is an item, oe 1:::k is said to span the input from position position j (the
parsing invariant below motivates this term). oe and k can be seen as a representation of
a dotted rule, or edge: during parsing all generated items are such that oe is (possibly more
specific than) some grammar rule. k is a position in oe, indicating the location of the dot.
The part of oe prior to the dot was already seen; the part following the dot is still expected.
When the entire body of oe is seen, the edge becomes complete.
A computation amounts to successively generating items; we assume that item generation
is done through a finite set of deterministic operations that create an item on the basis of
previously generated (zero or more) items. Also, if an item was generated on the basis of some
existing items, those items are not used again by the same operation. This assumption is
realized by an important class of parsing algorithms known as chart parsers. A computation
is terminating if and when no new items can be generated. A computation is successful if,
upon termination, a complete item that spans the entire input and contains the initial symbol
was generated: the final state of the computation should contain the item [0; oe; n; 1], where
A - A s and n is the input's length. Different algorithms assign different meanings to items,
and generate them in various orders (see, e.g., (Shieber, Schabes, and Pereira, 1994; Sikkel,
1993)). To be as general as possible, we only assume that the following invariant holds:
Parsing invariant In a computation triggered by w, if an item [i; oe; j; k] is generated then
One immediate consequence of the invariant is that for all the items [i; oe; j; k] generated when
parsing
A parsing algorithm is required to be correct:
Correctness A computation triggered by w is successful iff w 2 L(G).
Although (Shieber, 1992) uses a different notation than (Wintner and Francez, 1995b), this
property is proven by both.
5 Termination of parsing
It is well-known (see, e.g., (Pereira and Warren, 1983; Johnson, 1988)) that unification-based
grammar formalisms are Turing-equivalent, and therefore the parsing problem is undecidable
in the general case. However, for grammars that satisfy a certain restriction, termination of
the computation can be guaranteed. We make use of the well-foundedness of subsumption
(section to prove that parsing is terminating for off-line parsable grammars.
To assure efficient computation and avoid maintenance of redundant items, many parsing
algorithms employ a mechanism called subsumption check (see, e.g., (Shieber, 1992;
Sikkel, 1993)) to filter out certain generated items. Define a (partial) order over items:
. The subsumption
filter is realized by preserving an item x only if no item x 0 such that x 0 - x was generated
previously. Thus, for all items that span the same substring, only the most general one
is maintained. (Shieber, 1992; Wintner and Francez, 1995b) prove that by admitting the
subsumption check, the correctness of the computation is preserved.
Off-line parsability was introduced by (Kaplan and Bresnan, 1982) and was adopted
by (Pereira and Warren, 1983), according to which "A grammar is off-line parsable if its
context-free skeleton is not infinitely ambiguous". As (Johnson, 1988) points out, this restriction
(which he defines in slightly different terms) "ensures that the number of constituent
structures that have a given string as their yield is bounded by a computable function of the
length of that string". The problem with this definition is demonstrated by (Haas, 1989):
"Not every natural unification grammar has a context-free backbone".
A context-free backbone is inherent in LFG, due to the separation of c-structure from f-structure
and the explicit demand that the c-structure be context-free. However, this notion
is not well-defined in HPSG, where phrase structure is encoded within feature structures
(indeed, HPSG itself is not well-defined in the formal language sense). Such a backbone
is certainly missing in Categorial Grammar, as there might be infinitely many categories.
(Shieber, 1992) generalizes the concept of off-line parsability but doesn't prove that parsing
with off-line parsable grammars is terminating. We use an adaptation of his definition below
and provide a proof.
Definition 5.1 (Finite-range decreasing functions) A total function F : D ! D, where
D is a partially-ordered set, is finite-range decreasing (FRD) iff the range of F is finite
and for every d 2 D;F (d) - d.
Definition 5.2 (Strong off-line parsability) A grammar is strongly off-line parsable
iff there exists an FRD-function F from MRSs to MRSs (partially ordered by subsumption)
such that for every string w and different MRSs oe; ae such that oe ; ae, if oe ; PTw (i
Strong off-line parsability guarantees that any particular sub-string of the input can only be
spanned by a finite number of MRSs: if a grammar is strongly off-line parsable, there can not
exist an infinite set S of MRSs, such that for some
S. If such a set existed, F would have mapped its elements to the set fF
This set is infinite since S is infinite and F doesn't map two different items to the same
image, and thus the finite range assumption on F is contradicted.
As (Shieber, 1992) points out, "there are non-off-line-parsable grammars for which termination
holds". We use below a more general notion of this restriction: we require that F
produce a different output on oe and ae only if they are incomparable with respect to subsump-
tion. We thereby extend the class of grammars for which parsing is guaranteed to terminate
(although there still remain decidable grammars for which even the weaker restriction doesn't
hold).
Definition 5.3 (Weak off-line parsability) A grammar G is weakly off-line parsable
iff there exists an FRD-function F from MRSs to MRSs (partially ordered by subsumption)
such that for every string w and different MRSs oe; ae such that oe ; ae, if oe ; PTw (i
ae and ae 6v oe, then F (oe) 6= F (ae).
Clearly, strong off-line parsability implies weak off-line parsability. However, as we show
below, the inverse implication does not hold.
We now prove that weakly off-line parsable grammars guarantee termination of parsing
in the presence of acyclic MRSs. We prove that if these conditions hold, only a finite number
of different items can be generated during a computation. The main idea is the following:
if an infinite number of different items were generated, then an infinite number of different
items must span the same sub-string of the input (since the input is fixed and finite). By
the parsing invariant, this would mean that an infinite number of MRSs derive the same
sub-string of the input. This, in turn, contradicts the weak off-line parsability constraint.
Theorem 5.4 If G is weakly off-line parsable and MRSs are acyclic then every computation
terminates.
Proof: Fix a computation triggered by w of length n. By the consequence of the parsing
invariant, the indices that determine the span of items are limited (0 - n), as are
the dot positions (0 ! k - joej). It remains to show that for every selection of i, j and k,
only a finite number of MRSs are generated. Let be a generated item. Suppose
another item is generated where only the MRS is different: x
x 0 will not be preserved because of the subsumption test. If ae v oe, x can be replaced by
x 0 . There is only a finite number of such replacements, since subsumption is well-founded for
acyclic MRSs. Now suppose oe 6v ae and ae 6v oe. By the parsing invariant, oe 1:::k ; PTw (i+1;
and ae 1:::k ; PTw (i
the range of F is finite, there are only finitely many items with equal span that are pairwise
incomparable. Since only a finite number of items can be generated and the computation
uses a finite number of operations, every computation ends within a finite number of steps.The above proof relies on the well-foundedness of subsumption, and indeed termination
of parsing is not guaranteed by weak off-line parsability for grammars based on cyclic TFSs.
Obviously, cycles can occur during unification even if the unificands are acyclic. However,
it is possible (albeit costly, from a practical point of view) to spot them during parsing.
Indeed, many implementations of logic programming languages, as well as of unification-based
grammars (e.g., ALE (Carpenter, 1992a)) do not check for cycles. If cyclic TFSs are
allowed, the more strict notion of strong off-line parsability is needed. Under the strong
condition the above proof is applicable for the case of non-well-founded subsumption as well.
To exemplify the difference between strong and weak off-line parsability, consider a grammar
G that contains the following single rule:6 4
and the single lexical entry, w 1 , whose category is:
This lexical entry can be derived by an infinite number of TFSs:
It is easy to see that no FRD-function can distinguish (in pairs) among these TFSs, and
hence the grammar is not strongly off-line parsable. The grammar is, however, weakly off-line
parsable: since the TFSs that derive each lexical entry form a subsumption chain, the
antecedent of the implication in the definition for weak off-line parsability never holds; even
trivial functions such as the function that returns the empty TFS for every input are appropriate
FRD-functions. Thus parsing is guaranteed to terminate with this grammar.
It might be claimed that the example rule is not a part of any grammar for a natural
language. It is unclear whether the distinction between weak and strong off-line parsability
is relevant when "natural" grammars are concerned. Still, it is important when the formal,
mathematical and computational properties of grammars are concerned. We believe that
a better understanding of formal properties leads to a better understanding of "natural"
grammars as well. Furthermore, what might be seem un-natural today can be common
practice in the future.
Acknowledgments
This work is supported by a grant from the Israeli Ministry of Science: "Programming Languages
Induced Computational Linguistics". The work of the second author was also partially
supported by the Fund for the Promotion of Research in the Technion. We wish to thank
the anonymous referees for their enlightening comments.
--R
The Logic of Typed Feature Structures.
A parsing algorithm for unification grammar.
Categorial Grammar
Lexical functional grammar: A formal system for grammatical representation.
A logic for partially specified data struc- tures
Parsing as deduction.
Parsing Schemata.
An abstract machine for typed feature struc- tures
Parsing with typed feature structures.
--TR
--CTR
Efrat Jaeger , Nissim Francez , Shuly Wintner, Unification Grammars and Off-Line Parsability, Journal of Logic, Language and Information, v.14 n.2, p.199-234, March 2005
Shuly Wintner, Compositional semantics for linguistic formalisms, Proceedings of the 37th annual meeting of the Association for Computational Linguistics on Computational Linguistics, p.96-103, June 20-26, 1999, College Park, Maryland | parsing;computational linguistics;feature structures;unification |
595932 | Group Theory and Computational Linguistics. | There is currently much interest in bringing together the tradition of categorial grammar, and especially the Lambek calculus, with the recent paradigm of linear logic to which it has strong ties. One active research area is designing non-commutative versions of linear logic (Abrusci, 1995; Retor, 1993) which can be sensitive to word order while retaining the hypothetical reasoning capabilities of standard (commutative) linear logic (Dalrymple et al., 1995). Some connections between the Lambek calculus and computations in groups have long been known (van Benthem, 1986) but no serious attempt has been made to base a theory of linguistic processing solely on group structure. This paper presents such a model, and demonstrates the connection between linguistic processing and the classical algebraic notions of non-commutative free group, conjugacy, and group presentations. A grammar in this model, or G-grammar is a collection of lexical expressions which are products of logical forms, phonological forms, and inverses of those. Phrasal descriptions are obtained by forming products of lexical expressions and by cancelling contiguous elements which are inverses of each other. A G-grammar provides a symmetrical specification of the relation between a logical form and a phonological string that is neutral between parsing and generation modes. We show how the G-grammar can be oriented for each of the modes by reformulating the lexical expressions as rewriting rules adapted to parsing or generation, which then have strong decidability properties (inherent reversibility). We give examples showing the value of conjugacy for handling long-distance movement and quantifier scoping both in parsing and generation. The paper argues that by moving from the free monoid over a vocabulary V (standard in formal language theory) to the free group over V, deep affinities between linguistic phenomena and classical algebra come to the surface, and that the consequences of tapping the mathematical connections thus established can be considerable. | Introduction
There is currently much interest in bringing together the tradition of categorial
grammar, and especially the Lambek calculus [10], with the more recent
paradigm of linear logic [8] to which it has strong ties. One active research area
concerns the design of non-commutative versions of linear logic [1, 14] which
can be sensitive to word order while retaining the hypothetical reasoning capabilities
of standard (commutative) linear logic that make it so well-adapted to
handling such phenomena as quantifier scoping [4].
Some connections between the Lambek calculus and group structure have
long been known [16], and linear logic itself has some aspects strongly reminiscent
of groups (the producer/consumer duality of a formula A with its linear
negation A ? ), but no serious attempt has been made so far to base a theory of
linguistic description solely on group structure.
This paper presents such a model, G-grammars (for "group grammars"),
and argues that:
ffl The standard group-theoretic notion of conjugacy, which is central in G-
grammars, is well-suited to a uniform description of commutative and
non-commutative aspects of language.
ffl The use of conjugacy provides an elegant approach to long-distance dependency
and scoping phenomena, both in parsing and in generation.
ffl G-grammars give a symmetrical account of the semantics-phonology rela-
tion, from which it is possible to extract, via simple group calculations,
rewriting systems with strong decidability properties computing this relation
for the parsing and generation modes.
The paper is organized as follows. In Section 2 we introduce a "group com-
putation" model, using standard algebraic tools such as free groups, conjugacy
and normal subsets. The main deviation from traditional mathematical practice
is in the focus given to the notions of compatible preorder and normal submonoid,
whereas those of compatible equivalence relation and normal subgroup are more
usual in algebra. Section 3 applies this model to linguistic description, and
presents a G-grammar for a fragment of English involving quantification and
relative pronouns. Sections 4 and 5 are concerned with generation and parsing,
which correspond to two ways of exploiting the relation of preorder associated
with the G-grammar, one (generation) in which logical forms are iteratively
rewritten as combinations of logical forms and phonological forms until only
phonological forms are left, the other (parsing) in which phonological forms
are rewritten as combinations of logical forms and inverses of those until, after
cancellation of adjacent inverses, exactly one logical form is left. Section
6 introduces the concept of diagrams, which provide an intuitive and powerful
geometrical representation for G-grammars. These diagrams originate in the
work of Van Kampen [17], and have found applications in combinatorial group
theory and in studies of decidable subclasses of the word problem for groups [11].
They have also been used to produce complete term rewriting specifications for
certain classes of groups [2]. Section 7 discusses in detail the conditions under
which G-grammars and the associated rewriting systems lead to equivalent
definitions of the semantics-phonology relation. These results are used for comparing
G-grammars, context-free grammars, DCG's and categorial grammars.
The section also provides a short discussion of the advantages of G-grammars
for describing in a uniform way commutative and non-commutative aspects of
language. Section 8 applies certain group morphisms to show some strong computability
properties of G-grammars, both for parsing and for generation.
Computation
monoid M is a set M together with a product M \Theta M !M , written
ab, such that:
ffl This product is associative;
ffl There is an element 1 2 M (the neutral element) with a for all
A group is a monoid in which every element a has an inverse a \Gamma1 such that
a
A preorder on a set is a reflexive and transitive relation on this set. When
the relation is also symmetrical, that is, R(x; y) ) R(y; x), then the preorder is
called an equivalence relation. When it is antisymmetrical, that is that is,
y, it is called a partial order.
A preorder R on a group G will be said to be compatible with the group
product iff, whenever R(x; y) and R(x
2.1 Normal submonoids of a group.
We consider a compatible preorder notated x ! y on a group G. The following
properties, for any x; y 2 G, are immediate:
G:
Two elements in a group G are said to be conjugate if there exists y 2 G
such that x . The fourth property above says that the set M of
elements G such that x ! 1 is a set which contains along with an element
all its conjugates, that is, a normal subset of G. As M is clearly a submonoid
of G, it will be called a normal submonoid of G.
Conversely, it is easy to show that with any normal submonoid M of G one
can associate a preorder compatible with G. Indeed let's define x ! y as xy
M . The relation ! is clearly reflexive and transitive, hence is a preorder. It
is also compatible with G, for if x
are in M ; hence x
\Gamma1 is in M ,
implying that x 1 that is, that the preorder is compatible.
Remark. In general M is not a subgroup of G. It is iff x ! y implies y ! x,
that is, if the compatible preorder ! is an equivalence relation (and, therefore,
a congruence) on G. When this is the case, M is a normal subgroup of
G. This notion plays a pivotal role in classical algebra. Its generalization to
submonoids of G is basic for the algebraic theory of computation presented here.
If S is a subset of G, the intersection of all normal submonoids of G containing
S (resp. of all subgroups of G containing S) is a normal submonoid of G
(resp. a normal subgroup of G) and is called the normal submonoid closure
NM(S) of S in G (resp. the normal subgroup closure NG(S) of S in G).
2.2 The free group over V.
We now consider an arbitrary set V , called the vocabulary, and we form the
so-called set of atoms on V , which is notated and is obtained by
taking both elements v in V and the formal inverses v \Gamma1 of these elements.
We now consider the set F (V ) consisting of the empty string, notated 1, and
of strings of the form x 1 x 2 :::x n , where x i is an atom on V . It is assumed that
such a string is reduced, that is, never contains two consecutive atoms which
are inverse of each other: no substring vv \Gamma1 or v \Gamma1 v is allowed to appear in a
reduced string.
When ff and fi are two reduced strings, their concatenation fffi can be reduced
by eliminating all substrings of the form vv \Gamma1 or v \Gamma1 v. It can be proven
that the reduced string fl obtained in this way is independent of the order of
such eliminations. In this way, a product on F (V ) is defined, and it is easily
shown that F (V ) becomes a (non-commutative) group, called the free group
2.3 Group computation
We will say that an ordered pair is a group computation
structure if:
1. V is a set, called the vocabulary, or the set of generators
2. R is a subset of F (V ), called the lexicon, or the set of relators. 1
1 For readers familiar with group theory, this terminology will evoke the classical notion of
group presentation through generators and relators. The main difference with our definition
is that, in the classical case, the set of relators is taken to be symmetrical, that is, to contain
contains r. When this additional assumption is made, our preorder becomes an
equivalence relation.
The submonoid closure NM(R) of R in F (V ) is called the result
monoid of the group computation structure GCS. The elements of NM(R)
will be called computation results, or simply results.
If r is a relator, and if ff is an arbitrary element of F (V ), then ffrff \Gamma1 will be
called a quasi-relator of the group computation structure. It is easily seen
that the set RN of quasi-relators is equal to the normal subset closure of R in
F (V ), and that NM(RN ) is equal to NM(R).
A computation relative to GCS is a finite sequence
quasi-relators. The product r 1 evidently a result, and is called
the result of the computation c. It can be shown that the result monoid
is entirely covered in this way: each result is the result of some computation. A
computation can thus be seen as a "witness", or as a "proof", of the fact that
a given element of F (V ) is a result of the computation structure. 2
For specific computation tasks, one focusses on results of a certain sort, for
instance results which express a relationship of input-output, where input and
output are assumed to belong to certain object types. For example, in computational
linguistics, one is often interested in results which express a relationship
between a fixed semantic input and a possible textual output (generation mode)
or conversely in results which express a relationship between a fixed textual input
and a possible semantic output (parsing mode).
is a group computation structure, and if A is a given subset
of F (V ), then we will call the pair GCSA = (GCS;A) a group computation
structure with acceptors. We will say that A is the set of acceptors, or
the public interface, of GCSA. A result of GCS which belongs to the public
interface will be called a public result of GCSA.
G-Grammars
We will now show how the formal concepts introduced above can be applied to
the problems of grammatical description and computation. We start by introducing
a grammar, which we will call a G-Grammar (for "Group Grammar"),
for a fragment of English (see Fig. 1).
A G-grammar is a group computation structure with acceptors over a vocabulary
log [V phon consisting of a set of logical forms V log and a disjoint set
of phonological elements (in the example, words) V phon . Examples of phonological
elements are john, saw, every, examples of logical forms j, s(j,l),
these logical forms can be glossed respectively as
"john", "john saw louise" and "for every man x, for some woman y, x saw y".
The grammar lexicon, or set of relators, R is given as a list of "lexical
schemes". An example is given in Fig. 1. Each line is a lexical scheme and
represents a set of relators in F (V ). The first line is a ground scheme, which
corresponds to the single relator j john \Gamma1 , and so are the next four lines. The
sixth line is a non-ground scheme, which corresponds to an infinite set of relators,
2 The analogy with the view in constructive logics is clear. There what we call a result is
called a formula or a type, and what we call a computation is called a proof.
l louise
man
A
A
Figure
1: A G-grammar for a fragment of English
obtained by instanciating the term meta-variable A (notated in uppercase) to a
logical form. So are the remaining lines. We use Greek letters for expression
meta-variables such as ff, which can be replaced by an arbitrary expression of
F (V ); thus, whereas the term meta-variables A, B, ., range over logical forms,
the expression meta-variables ff, fi, ., range over products of logical forms and
phonological elements (or their inverses) in F (V ). 3
The notation P[x] is employed to express the fact that a logical form containing
an argument identifier x is equal to the application of the abstraction P
to x. The identifier meta-variable X in P[X] ranges over such identifiers (x, y, z,
.), which are notated in lower-case italics (and are always ground).
The meta-variable P ranges over logical form abstractions missing one argument
(for instance z.s(j,z)). When matching meta-variables in logical forms,
we will allow limited use of higher-order unification. For instance, one can match
P[X] to s(j,x) by taking
The vocabulary and the set of relators that we have just specified define
a group computation structure We will now describe a set of
acceptors A for this computation structure. We take A to be the set of elements
of F (V ) which are products of the following form:
where S is a logical form (S stands for "semantics"), and where each W i is a
phonological element (W stands for "word"). The expression above is a way of
encoding the ordered pair consisting of the logical form S and the phonological
string W 1 (that is, the inverse of the product Wn
A public result SWn
in the group computation structure
3 Expression meta-variables are employed in the grammar for forming the set of conjugates
ff exp ff \Gamma1 of certain expressions exp (in our example, exp is ev(N,X,P[X]) P[X] \Gamma1 ,
Conjugacy allows the enclosed material exp to move as a block
in expressions of F (V ), see sections 4 and 5.
l * louise
man
w * woman
ran
t(N) * the N
tt(N,X,P[X]) * N that ff
Figure
2: Generation-oriented rules
with acceptors ((V; R); the G-grammar -will be interpreted as meaning
that the logical form S can be expressed as the phonological string W 1
Let us give an example of a public result relative to the grammar of Fig. 1.
We consider the relators (instanciations of relator schemes):
and the quasi-relators:
Then we have:
which means that s(j,l) louise is the result of a computation
This result is obviously a public one, which means that the
logical form s(j,l) can be verbalized as the phonological string john saw louise.
Generation
Applying directly, as we have just done, the definition of a group computation
structure in order to obtain public results can be somewhat unintuitive. It is
often easier to use the preorder ! . If, for a; b; c 2 F (V ), abc is a relator,
then abc ! 1, and therefore b ! a . Taking this remark into account, it
is possible to write the relators of our G-grammar as the "rewriting rules" of
Fig. 2; we use the notation * instead of ! to distinguish these rules from the
parsing rules which will be introduced in the next section.
The rules of Fig. 2 have a systematic structure. The left-hand side of each
rule consists of a single logical form, taken from the corresponding relator in
the G-grammar; the right-hand side is obtained by "moving" all the remaining
elements in the relator to the right of the arrow.
Because the rules of Fig. 2 privilege the rewriting of a logical form into an
expression of F (V ), they are called generation-oriented rules associated with
the G-grammar.
Using these rules, and the fact that the preorder * is compatible with the
product of F (V ), the fact that s(j,l) louise
can be obtained in a simpler way than previously. We have:
l * louise
by the seventh, first and second rules (properly instanciated), and therefore, by
transitivity and compatibility of the preorder:
* john saw l * john saw louise
which proves that s(j,l) * john saw louise, which is equivalent to saying
that s(j,l) louise result.
Some other generation examples are given in Fig. 3.
The first example is straightforward and works similarly to the one we have
just seen: from the logical form i(s(j,l),p) one can derive the phonological
string john saw louise in paris.
4.1 Long-distance movement and quantifiers
The second and third examples are parallel to each other and show the derivation
of the same string every man saw some woman from two different logical forms.
The penultimate and last steps of each example are the most interesting. In the
penultimate step of the second example, fi is instanciated to saw
has the effect of "moving" as a whole the expression some woman y \Gamma1 to the
position just before y, and therefore to allow for the cancellation of y \Gamma1 and y.
The net effect is thus to "replace" the identifier y by the string some woman;
in the last step ff is instanciated to the neutral element 1, which has the effect
of replacing x by every man. In the penultimate step of the third example, ff
is instanciated to the neutral element, which has the effect of replacing x by
every man; then fi is instanciated to saw man which has the effect
of replacing y by some woman.
Remark. In all cases in which an expression similar to ff a
(with the a i arbitrary vocabulary elements), it is easily seen that, by giving
* s(j,l) in p
* john saw l in p
* john saw louise in p
* john saw louise in paris
woman
(by taking
* every man saw some woman
(by taking
ff \Gamma1 every man x
man saw y
(by taking
* every man saw some woman
(by taking man
* t(tt(m,x,s(l,x))) ran
* the tt(m,x,s(l,x)) ran
* the m that ff
* the man that ff
* the man that ff
* the man that ff
* the man that louise saw ran
(by taking
Figure
3: Generation examples
ff an appropriate value in F (V ), the a move arbitrarily to the left
or to the right, but only together in solidarity; they can also freely permute cycli-
cally, that is, by giving an appropriate value to ff, the expression ff a
ff can take on the value
a k a (other permutations are in general not possible).
The values given to the ff, fi, etc., in the examples of this paper can be understood
intuitively in terms of these two properties.
We see that, by this mechanism of concerted movement, quantified noun
phrases can move to whatever place is assigned to them after the expansion
of their "scope" predicate, a place which was unpredictable at the time of the
expansion of the quantified logical form. The identifiers act as "target markers"
for the quantified noun phrase: the only way to "get rid" of an identifier x is
by moving x \Gamma1 , and therefore with it the corresponding quantified noun phrase,
to a place where it can cancel with x .
The fourth example exploits a similar mechanism for handling relative clauses.
At the time the relative pronoun is produced, an identifier inverse x \Gamma1 is also
produced which has the capability of moving to whatever position is finally
assigned to the relative verb's argument x .
4.2 Word movement and group morphisms
The derivations of Fig. 3 show possible rewritings of the four given logical forms
into phonological strings. It is natural to ask whether these rewritings are the
only ones possible. That is in fact the case, but for now we will confine ourselves
to showing that the expression:
can only be rewritten into the phonological string:
every man saw some woman ;
whatever values one may choose for the expression meta-variables ff and fi. 4
We start by considering a variant of the original vocabulary V , namely the
vocabulary are new letters not appearing in
. We then consider the application OE reduced
expression g of F (V ) into the expression of F (V 0 ) obtained by replacing each
x by a \Gamma1 every man (resp. man \Gamma1 every \Gamma1 a), and similarly by
replacing each y (resp. y \Gamma1 ) in g by b \Gamma1 some woman (resp. woman
The application OE is clearly a group morphism from F (V ) to F (V 0 ); in fact
it is an isomorphism, where OE \Gamma1 maps a (resp. b) into every man x
some woman y
We then consider the vocabulary V and the application
obtained by mapping, in reduced expressions of F (V 0 ),
4 Of course, for certain values of ff; fi, the first expression does not rewrite into a phonological
string at all.
OE
oe
Figure
4: Group morphisms between free groups over different vocabularies.
The group F (V ) is isomorphic to F (V 0 ), which in turns projects onto F (V 00 ).
The "phonological" subgroup F (V phon ) is kept invariant in the three morphisms.
each a (resp. a 1. This is again clearly a group morphism, and
we can consider the composition of morphisms
Fig. 4). This morphism oe has the following properties:
ffl It maps all phonological strings into themselves.
ffl It maps x (resp. y) into every man (resp. some woman).
ffl It maps
into
every man saw b
some woman );
that is, into every man saw some woman :
Because phonological strings are kept invariant in the mapping oe, whenever
one gives values to ff; fi such that fl is a phonological string, then, for these
values, but we have just seen that, for any values of ff; fi one has
man saw some woman . This establishes the initial claim.
This simple proof illustrates clearly the power of group operations. By changing
the presentation of the group F (V ) into an isomorphic one in which x; y have
been reexpressed in terms of a; b and of phonological elements, one obtains effects
which can be interpreted as constituent movements which furthermore are
mandatory if the output is constrained to be a string containing only phonological
elements.
Parsing
To the compatible preorder ! on F (V ) there corresponds a "reverse" compatible
preorder defined as a equivalently, a . The
normal submonoid M 0 in F (V ) associated with + is the inverse monoid of the
normal submonoid M associated with ! , that is, M 0 contains a iff M contains
a
It is then clear that one can present the relations:
A
etc.
in the equivalent way:
ran
some
etc.
louise
man
woman
ran
in
the
every
some
that
Figure
5: Parsing-oriented rules
Suppose now that we move to the right of the + arrow all elements appearing
on the left of it, but for the single phonological element of each relator. We
obtain the rules of Fig. 5, which we call the "parsing-oriented" rules associated
with the G-grammar.
By the same reasoning as in the generation case, it is easy to show that any
derivation using these rules and leading to the relation PS +LF , where PS
is a phonological string and LF a logical form, corresponds to a public result
in the G-grammar.
A few parsing examples are given in Fig. 6; they are the converses of the
generation examples given earlier.
In the first example, we first rewrite each of the phonological elements into
the expression appearing on the right-hand side of the rules (and where the meta-variables
have been renamed in the standard way to avoid name clashes). The
rewriting has taken place in parallel, which is of course permitted (we could have
obtained the same result by rewriting the words one by one). We then perform
certain unifications: A is unified with j, C with p; then B is unified to l.
Finally
5 Another possibility at this point would be to unify l with E rather than with B. This
would lead to the construction of the logical form i(l,p), and, after unification of E with
john saw louise in paris
every man saw some woman
and then either:
the man that louise saw ran
Figure
Parsing examples
E is unified with s(j,l), and we obtain the logical form i(s(j,l),p). In this
last step, it might seem feasible to unify E to i(E,p) instead, but that is in fact
forbidden for it would mean that the logical form i(E,p) is not a finite tree, as
we do require. This condition prevents "self-cancellation" of a logical form with
a logical form that it strictly contains.
5.1 Quantifier scoping
In the second example, we start by unifying m with N and w with M; then we
next to s(A,B) by taking again we "move"
next to s(A,B) by taking unified with
A and y with B. This leads to the expression:
where we now have a choice. We can either unify s(x,y) with Q[y], or with P[x].
In the first case, we continue by now unifying P[x] with
sm(w,y,s(x,y)), leading to the output ev(m,x,sm(w,y,s(x,y))). In the second
case, we continue by now unifying Q[y] with
ev(m,x,s(x,y)), leading to the output sm(w,y,ev(m,x,s(x,y)). The two possible
quantifier scopings for the input string are thus obtained, each corresponding
to a certain order of performing the unifications.
In the last example, the most interesting step is the one (third step) in which
ff is instanciated to s(l,B) \Gamma1 , which has the effect of "moving" x close to the
"missing" argument B
of "louise saw", to cancel it by unification with B and
consequently to fill the second argument position in the logical form headed by
s. After this step, P[x] is ready to be unified with s(l,x), finally leading to
the expected logical form output for the sentence.
6 Diagrams
6.1 Definition
Definition. A diagram over the vocabulary V is a finite graph which is (1)
planar, that is, embedded in the plane in such a way that the edges do not cross;
(2) connected; (3) directed, that is, the edges carry an orientation; (4) labelled,
that is, each edge carries a label taken in V .
A diagram separates the plane in n+1 connected open sets: the exterior (set
of points that can be connected to a point at infinity without crossing an edge),
that logical form, would conduct to the output s(j,i(l,p)). If one wants to prevent this
output, several approaches are possible. The first one consists in typing the logical form with
syntactic categories. The second one is to have some notion of logical-form well-formedness
(or perhaps interpretability) disallowing the logical forms i(l,p) [louise in paris] or i(t(w),p)
[(the woman) in paris], although it might allow the form t(i(w,p)) [the (woman in paris)].
6 We have assumed that the meta-variables corresponding to identifiers in P and Q have
been instanciated to arbitrary, but different, values x and y. We leave a discussion of this
point to a future paper.
and n open internal regions each consisting of points which can be connected
without crossing an edge, but which are separated from the exterior. An internal
region will be called a cell.
An example of a diagram over the vocabulary fa; b; cg is given in Fig. 7.000000001111111111
c
a
c c O
c
a
c
a
a
Figure
7: A diagram.
The boundary of a cell is the set of edges which constitute its topological
boundary. The boundary of a diagram is the set of edges which are such that
all their points are connected to the exterior.
If one choses an arbitrary vertex (such as O in the figure) on the boundary of
a diagram, and if one moves on the boundary in a conventional clockwise fashion
(an orientation that we adopt throughout in the sequel), then one collects a list
of edges which are either directed in the same way as the movement, or contrary
to it. By producing a sequence of atoms, positive in the first case, negative in
the second one, one can then construct a word of F (V ); this word is said to be
a boundary word of the diagram.
6.2 Reduced diagrams
We will say that a diagram is reduced if there does not exist a pair of edges
with a common vertex O, with the same label, oriented oppositely relative to
O (that is, both edges point towards O or both point from O), and such that
at least one of the two "angles" formed by the two edges is "free", that is, does
not "contain" another diagram edge (see Fig. 8).
6.3 Cyclically reduced words
word w on V [ V \Gamma1 is said to be cyclically reduced iff every
cyclic permutation of it is reduced.
It is easy to see that (1) a reduced word is cyclically reduced iff it is not of
the form aw 0 a \Gamma1 with a an atom (positive or negative), (2) the conjugate class
of any word contains cyclically reduced words, which are cyclic permutations of
each other.
a
c
c
O
c
a
a
Figure
8: A reduced diagram. The diagram of the previous figure was not
reduced because of the two c edges outgoing from vertex O.
6.4 Relator cells
Consider a group computation structure loss of gener-
ality, it can be assumed that the relators in R are cyclically reduced, because
the result monoid is invariant when one considers a new set of relators consisting
of conjugates of the original ones. From now on, unless especially stated
otherwise, this assumption will be made for all relators considered.
Take any such cyclically reduced relator
construct a labelled cell in the following way: take a circle and
divide it in n arcs; label the clockwise-ith arc x i and orient it clockwise if e
anti-clockwise otherwise. The labelled cell thus obtained is call the relator
cell associated with r.
Rather than presenting the GCS through a set of relator words as we have
done before, it is now possible to present it through a set of relator cells; if one
gives such a set, a standard presentation of the GCS can be derived by taking an
arbitrary origin on each cell and "reading" the relator word clockwise from this
origin; the origin chosen does not matter: any other origin leads to a conjugate
relator, and this does not affect the notion of result.
6.5 Fundamental theorem of combinatorial group theory
We are now able to state what J. Rotman calls "the fundamental theorem of
combinatorial group theory" [15]. We give the theorem in a slightly extended
form, adapted to the case of the normal sub-monoid closure; the standard case
of normal subgroup closure follows immediately by taking a set or relators containing
along with r.
Theorem 1 Let be a group computation structure such that all
relators r 2 R are cyclically reduced. If w is a cyclically reduced word in F (V ),
then w 2 NM(R) if and only if there exists a reduced diagram having boundary
word w and whose regions are relator cells associated with the elements of R.
O
Figure
9: Star diagram.
The proof is not provided; it can easily be recovered from the property
demonstrated in [11] (chapter 5, section 1). The proof involves the following
remark. If one considers a product
arbitrary elements of F (V ), this product can be read as
the boundary word of the "star" diagram represented in Fig. 9, starting at O
and progressing clockwise.
This star diagram is in general not in reduced form, but it can be reduced
by a stepwise process of equating edges which do not respect the definition of a
reduced diagram.
Example. Let's consider a GCS with vocabulary set of
(cyclically reduced) relators
The cyclically reduced word c is an element of NM(R), for it can be
obtained by forming the product
If we form the star diagram for this product, we obtain the first diagram shown
in Fig. 10.
This diagram is not reduced, for instance the two straight edges labelled
c are offending the reduction condition. If one "stitches" these two edges
together, one obtains the second diagram in the figure. This stitching corresponds
to a one-step reduction of the boundary word of the first diagram,
into the boundary word of the second
By continuing in this way, one obtains the fifth
diagram of the figure, which is reduced, and whose boundary is the wanted
6.6 Linguistic examples
The previous considerations can be applied to the linguistic examples given in
the body of the article. Here we only consider examples which do not involve
a
c
c
O
c
a
a
a
c
c
c
c
a
O
a
a
c
c
c
a
a
c
a
c c O
a
c
c
a
c c O
a
a
c
a
c c O
c
a
c
a
a
Figure
10: Transformation of a diagram into reduced form (adapted from [11]).
long-distance dependencies; the more complex examples will be treated after we
have introduced multi-relators in 7.6.
l p
saw in
paris
louise
john
(1)
Figure
11: Cells associated with some grammar relators.
saw
john
louise
in
paris
l
Figure
12: A diagram establishing the relationship between a logical form and
a phonological string.
Let's consider the relator schemes, from Fig. 1:
l louise
A
In Fig. 11, cells (which we have numbered from 1 to 5) associated with
some instanciations of these schemes are shown. In Fig. 12 we construct a
reduced diagram whose cells are the relator cells of Fig. 11. The boundary
word of this diagram is the expression i(s(j,l),p) paris
john \Gamma1 . This proves that, in the G-grammar, the logical form i(s(j,l),p) is
associated with the phonological string john saw louise in paris. Note (1) the
analogy between reading the diagram from top to bottom (resp. bottom to top)
and a generation (resp. parsing) process. 7
7 G-grammars and rewriting
In the discussion of parsing and generation, we saw how a derivation according to
the rewriting rules of Figs. 2 and 5 is always "sound" with respect to the group
computation structure. We did not consider the opposite question, namely
whether it is "complete" with respect to it: can any public result relative to the
GCS be obtained by such rewritings? The answer to this question will be given
by theorems demonstrated below (theorems 4 and 7), which roughly state that
such a rewriting system is complete relative to the GCS if the system does not
contain "ground cycles", that is situations where a ground term T can derive
This condition is true of both the rewriting systems of Figs 2 and 5. For
instance, in the generation case, it can be checked that any ground logical form
that appears on the right-hand side of a rule of Fig. 2 is strictly smaller than the
ground logical form on the left-hand side, therefore precluding ground cycles.
This condition is related to the decidability of generation and parsing, and we
will prove in 8 that our G-grammar is finitely enumerable both in parsing and
in generation, that is, in the terminology of [6], that it is inherently reversible.
This property is difficult to guarantee in formalisms relying on empty categories
for long-distance dependencies, a problem which is avoided by the use group
structure for the same purpose.
7.1 Oriented relators and rewriting rules
Suppose an is a relator. This relator is said to be oriented at index
if a number i with 1 i n has been chosen.
A QCF rule (QCF stands for "quasi-context-free") on F (V ) is a pair,
notated a 7! ff, with a
is a group computation structure, and if r is a relator in R
such that r = a an in F (V ), then the rule
a i 7! a
an
is said to be the rule associated with the relator r oriented at index
i.
7 There is also an analogy between a bottom-up reading and a chart parsing approach in the
case of this example. In more complex examples (for instance multi-word expression parsing)
a better analogy would be with Colmerauer's Q-systems [3]. However, both analogies break
down when considering examples involving long-distance dependencies.
If for each element in a set of relators R, an orientation is chosen, one says
that an orientation has been given to the GCS. By associating a QCF rule
to each relator, one obtains the QCF system associated with the orientation.
A derivation relative to a QCF system is a finite sequence
of elements (that is, of strings formed over elements of V or
their inverses) such that, for each i, there exists ff; fi
1. and a 7! b is a rule of the rewriting system [replace-
ment step],
2. or s i
If for two strings s and t in (V one can find a derivation
are identical, then we
will say that s derives into t and we will write s 7! t (using the same notation
as for rewrite rules; the context will make clear which case is intended).
The following proposition, stating that rewriting implies preorder, is
straightforward.
Theorem 2 If 7! is the derivation relation associated with an oriented GCS,
then, for any s; t 2
Proof. Immediate consequence of the fact that if r = a an is a relator, then
and therefore
an
ut
7.2 Anteriority
Let's consider the QCF system associated with an oriented GCS. If a and b are
elements there exists a rule in the system of the form:
a 7! ffbfi;
then we will say that a is immediately anterior to b relative to the system
(or, equivalently, relative to the oriented GCS). If there exists a finite sequence
b such that c i is immediately anterior to c i+1 then we will say
that a is anterior to b, which will be noted:
a b:
We will say that the anteriority relation is acyclic iff it is never the case
that a a. We will say that it is noetherian iff any "descending" chain
a 1 a noetherian it is a fortiori acyclic.
If a rule in the QCF system has left-hand side a, then a will be called the
mother of the rule (or, equivalently, of the oriented relator corresponding to
the rule). The set M of all rule mothers is a subset of the set of atoms
called the set of potential mothers associated with the QCF system. We
will note M \Gamma1 the set of atoms which are inverses of potential mothers.
7.3 Rewriting theorem (basic case)
We are now ready to state a theorem which provides conditions under which
the reciprocal of theorem 2 holds. We will only sketch proofs.
We first need a lemma.
Lemma 3 Suppose that \Delta is a diagram relative to an oriented acyclic GCS,
and also that the set of potential mothers does not simultaneously contain an
element and its inverse. Then there is a relator cell in this diagram such that
its mother m is on the boundary of the diagram.
Proof. Take any cell \Gamma in the diagram, and consider the mother m in this cell. If
m is on the boundary of the diagram, we are done. Otherwise, m is on an edge
separating \Gamma from another cell \Gamma 0 , and therefore m \Gamma1 is on the boundary of \Gamma 0 (as
a consequence of the clockwise orientations of the cells). Because the condition
about potential mothers, m \Gamma1 cannot be the mother of \Gamma 0 , and therefore the
mother m 0 of \Gamma 0 is anterior to m. If m 0 is on the diagram boundary, we are done,
otherwise we repeat the operation. Because the anteriority relation is acyclic,
the iteration must stop at some point, which proves the lemma. ut
We can now state the theorem.
Theorem 4 If ' 7! ' is the derivation relation associated with an oriented GCS
where (i) anteriority is acyclic, and (2) the set of potential mothers does not contain
simultaneously an element and its inverse, then, for any s 2
and for any t 2 ((V
Proof. Suppose that s ! t, then there exists a diagram \Delta having k cells whose
boundary is st \Gamma1 . We will prove the result by induction on k. In the base case
the result is immediate, because in a diagram with 0 cells of boundary
st one necessarily has t.
Let's now address the case of k ? 0. From the lemma, there is a cell \Gamma in this
diagram whose mother m lies on the boundary of \Delta. Because of the condition
on t, this m cannot lie in the t portion of the boundary, and so it must lie in
the s portion (see Fig. 13).
The boundary of \Gamma can be written in the form mw \Gamma1 for some word w 2
therefore s can be expressed in the form
and s 2 subparts of s (see Fig. 14). But now one has:
by definition of the rewriting relation. Furthermore the word
is on the boundary of a diagram in cells, obtained from \Delta by removing the
we will not explain here in detail what it means to "remove a
cell", and will not justify formally why the remaining construct is still a diagram,
but the way the operation works may be understood on the basis of an example
(see Fig. 15). We now have:
and, by the induction hypothesis, one has
and therefore
ut
A
s
G
Figure
13: The diagram \Delta in k cells, whose boundary is st \Gamma1 . The word s can
be read clockwise from vertex A to vertex D, the word t counter-clockwise from
A to D. There exists a cell \Gamma whose mother m lies on the s portion of the
boundary.
7.4 G-grammars compared to CFG's, DCG's and Categorial
Grammars
Rather than starting from a G-grammar and associating rewriting systems to it,
one can start from a conventional grammar represented as a rewriting system
A
Figure
14: Removing the cell \Gamma by rewriting m into w.
and associate to it a G-grammar. An obvious question is then whether the
input-output relationship as defined in the two models agree.
Let's for instance consider the context-free grammar presented in Fig. 16, (a).
The rewriting system (a) is a QCF system associated with an orientation of the
G-grammar given in (a'), over the vocabulary U is the set
of nonterminals fs; np; vpg and W is the set of terminals john ; walked; often.
By Theorem 2, if we can derive a string of words wn from s, then
wn relative to the G-grammar.
However, the system (a) is not acyclic for anteriority, because of its fourth
rule. The translation of this rule is the relator vp vp
often \Gamma1 which is equal to
often \Gamma1 . This means that often often. This in turn,
because of the compatibility of the preorder, implies that, whenever one has
then one has s ! ff often fi, for any ff; fi 2 F (V ). In particular one has
string that cannot be derived from grammar (a). More
generally, it can be shown that, relative to the GCS, the word 'often' can be
added freely in any string generated from s!
One way of making the grammar (a) acyclic is to upgrade it to a Definite
Clause Grammar [13] such as (b). With each nonterminal is associated a term
representing the syntactic structure of the string spanned by this nontermi-
nal. The crucial point here is that the structure of the mother nonterminal (for
instance vp(.(often,VP))) strictly contains the structures of the daughter non-terminals
(for instance vp(VP)). It is then easy to show that the system is acyclic.
Then Theorem 4 holds, and the notions of derivations relative to (b) and (b')
coincide. In the example, the relator vp(:(often; VP))vp(VP)
does not
collapse to often \Gamma1 anymore, for vp(:(often; VP))
can never cancel out. From theorem 4, we now see that (b) and
(b') are equivalent.
Another way to obtain an acyclic grammar is shown in (c). Here we have
an infinite set of rules indexed by integers corresponding to string length. The
length of a mother nonterminal is strictly larger than the length of any daughter,
saw
john
louise
in
paris
l
saw
john
louise
in
paris
l
Figure
15: A cell-removal step. If one assumes that s(j,l) in p 7!
john saw louise in paris, then one has i(s(j,l),p) 7! s(j,l) in p 7! john
saw louise in paris.
and this again ensures acyclicity.
7.4.1 G-grammars and categorial grammars
The context-free grammar (a) and its associated G-grammar (a') can be used
to illustrate a crucial difference between G-grammars and categorial grammars.
Whereas, in categorial grammar, the expression vp=vp "expects" a vp on the
right - and nothing else - and then "returns" a vp, when working with groups,
an expression such as vp vp \Gamma1 is formally undistinguishable from 1. It is this
crucial property that permits G-grammars to profit from many standard mathematical
tools.
(a) s 7! np vp (a') s vp
vp 7! walked vp walked \Gamma1
vp 7! often vp vp vp
(b)
vp(walked) 7! walked vp(walked) walked \Gamma1
(c) s(x+y) 7! np(x) vp(y) (c') s(x+y) vp(x)
walked walked
Figure
G-grammars.
7.5 Mixing commutative and non-commutative phenom-
ena, logic programs
We have already seen examples where commutative and non-commutative aspects
are both present in a lexical entry. Thus, the presence of ff; ff \Gamma1 in the
entry for 'every' in Fig. 2 allows the expression every N X
to move as a block
to the position where the argument X of the verb is eventually found; in this
movement, it is however impossible for every and N to exchange their relative
positions, and it can be shown that, for the input logical forms of Fig. 3, only
the four phonological strings listed can be obtained.
Let us briefly indicate how this commutative/non-commutative partnership
could be used for error correction purposes. Suppose that a relator of the
Report is added to the grammar, where Error is some
erroneous input (for instance it could be the word 'principle' improperly used
in a situation where 'principal' is needed), Repair is what the input should have
been (in our example, the word 'principal'), and Report is a report which tells
us how the error was corrected. Then, the expression Error \Gamma1 Repair can move
in block to the spot where the error occurs, replacing the erroneous word by the
correction and allowing normal processing to continue. The report can then be
used for warning or evaluation purposes.
Fully commutative structures and logic programs Suppose that one
wants to have a group computation structure which is completely commutative,
that is, one in which elements can move freely relative to each other. This property
could be stipulated by introducing a notion of "commutative group compu-
tation" using the free commutative group FC(V ) rather than F (V ). Another
possibility, which illustrates the flexibility of the group computation approach,
is just to add a relator scheme fffiff to R, where ff and fi are expression
meta-variables. This expression is called a commutator of ff and fi because when
multiplied by fiff it yields fffi. This single relator scheme permits to permute
elements in any expression, and has the same effect as using FC(V ).
An example where commutative structures are useful is the case of logic
programs. It can be shown that if one encodes a clause of a logic program
in a commutative structure,
and defines public results to consist of a single ground predicate P , then public
results in the group computation structure coincide with consequences of the
program. 8
7.6 Multi-relators
Theorem 4 already gives interesting equivalence for several types of GCS's, such
as the ones associated with acyclic DCGs, or for a G-grammar which does not
make use of expression meta-variables, such as the G-grammar obtained by
eliminating the entries for every, some and that from the G-grammar of Fig. 1.
However, it is not sufficient for the long-dependency situations such as these
where expression meta-variables do appear; in these cases, the conditions of
Theorem 4 are not met, because by giving a well-chosen value to the expression
meta-variable, the condition of anteriority can be easily violated.
We need a stronger version of the theorem which is able to take into account
the situation where expression metavariables appear in pairs ff; ff \Gamma1 . In
order to state this extended version of Theorem 4, we need to introduce some
terminology.
Consider a finite list wn of elements of (V
wn ) be the set:
The following lemma is straightforward.
Lemma 5 . The set MC(w wn ) has the following properties:
ffl It is a normal subset of F (V ) (that is, is self-conjugate);
ffl It is invariant up to arbitrary permutations of the list
ffl It is invariant up to cyclic permutations of any of the words w
be the set:
wn ) is the set of conjugates of elements of B in F (V ).
8 This result, in contrast to the corresponding result concerning DCG's (see below) does
not depend on a condition of acyclicity. This difference is related to the fact that, in the case
of logic programs, a succesful sequence of rewritings results in the empty string, whereas in
the case of DCGs, it results into a string of words. The acyclicity condition for DCGs ensures
that this string of words contains all words that could be produced using the GCS. For logic
programs, this property is irrelevant.
l louise
man
ran
Figure
17: Multi-relator version of our example G-grammar. We have made
use of the transformations permitted by Lemma 5.
Because of the second of these properties the set MC(w wn ) is defined
as soon as the multiset (unordered list) hw wn i, which we will call a multi-
relator, is given. We will call MC(w wn ) the set of multi-conjugates
of the multi-relator hw wn i.
If we are given a (finite or infinite) collection MR of multi-relators, we can
consider the group computation structure obtained by taking as set R of relators
the set
We will call the GCS thus obtained the group computation structure
with multi-relators
When presenting a group computation structure with multi-relators, we will
sometimes use the notation:
wn
for listing the multi-relators.
With such a notation, the presentation of our example G-grammar of Fig. 1
becomes the presentation shown in Fig. 17.
The presentation of the grammar using multi-relators is more symmetrical
than that of Fig. 1. Remark that expression meta-variables are not used anymore
7.6.1 Multi-relators and diagrams
We will now state a theorem which is an extension of the the fundamental
theorem of combinatorial group theory for the case of GCS's with multi-relators.
We first need the notion of multi-cell associated with a multi-relator.
We first remark that we can always assume that a multi-relator
wn i is such that each w i is cyclically reduced, because taking the
cyclically reduced conjugate of w i does not change the notion of multi-conjugate.
We will assume this is always the case in the sequel.
wn i is a multi-relator, and if \Gamma i is the cell associated with w i in
the manner of 6.4, then we will call the multiset of cells
ng the multi-cell associated with this multi-relator.
Consider a finite multiset of multi-relators and take the multi-set obtained by
forming the multiset
U
k \Theta k of the multi-cells associated with these
multi-relators. A diagram whose cells are exactly (that is, taking account of the
cell counts) those of the
multiset\Omega will be said to be a diagram relative to
the GCS with multi-relators under consideration.
Theorem 6 . Let be a group computation structure with
multi-relators. If w is a cyclically reduced word in F (V ), then w is in the
result monoid of GCS-MR iff there exists a reduced diagram relative to GCS-MR
having boundary w.
The proof of this theorem is a straightforward extension of the proof of
Theorem 1 and is not provided.
7.6.2 Linguistic examples
These results can now be applied to a diagrammatic proof of the fact that, in
our example G-grammar, one has (see 4.1):
every man saw some woman:
In Fig. 18 we show multi-cells corresponding to the G-grammar entries relevant
for this example (see Fig. 17), and in Fig. 19 a diagrammatic proof of the
example; the multi-cells are lettered (1) to (5) for easy comparison between the
figures.
7.6.3 Multi-relators and QCF systems
One can extend the notion of orientation of 7 to multi-relators in the following
way. We will say that a multi-relator hw wn i is oriented at index
if one of the words w i has been chosen and if, writing w
, with
an index j with 1 j m i has also been chosen. The QCF rule
scheme associated with the oriented multi-relator is then the rewriting scheme:
a ij 7! a i(j \Gamma1)
Y
where the ff k are expression metavariables (which can therefore take arbitrary
values in F (V )).
One can extend the notion of anteriority to oriented multi-relators. We simply
define the atom a ij to be anterior to each of the atoms a kl \Gamma1 appearing in the
man
(1)
saw
x y
every m
woman
(2)
y
some w
Figure
18: Multi-cells for some multi-relators in the grammar. Dotted lines
indicate that two cells are part of the same multi-cell: they will appear together
in a diagram or not at all.
right-hand side of the rewriting rule, that is to say, all inverses of atoms appearing
in any of the w k , apart of course from a ij \Gamma1 itself, and not considering the
atoms appearing in any of the ff k ; ff k \Gamma1 (it follows that the anteriority relation
is defined between atoms or inverses of atoms that appear in hw wn i).
The notion of acyclic and noetherian QCF system is defined just as before
on the basis of this anteriority relation.
The following theorem is a straightforward extension of Theorem 2.
Theorem 7 If 7! is the derivation relation associated with an oriented multi-
relator GCS, then, for any s; t 2
saw
every
x
man
woman
y
some
(1)
(2)
Figure
19: A diagram using multi-cells establishing a relationship between
the sentence every man saw some woman and its logical form
ev(m,x,sm(w,y,s(x,y))).
7.6.4 Rewriting theorem (multi-relator case)
We now state a theorem which extends Theorem 4 to the case of multi-relators
GCS's. The proof is only broadly outlined.
Theorem 8 If ' 7! ' is the derivation relation associated with an oriented multi-
relator GCS where (i) anteriority is acyclic, and (2) the set of potential mothers
does not contain simultaneously an element and its inverse, then, for any s 2
Proof. Rough sketch. The proof is similar to that of theorem 4. The difference
is that we must perform multi-cell removal rather than simple cell-removal, and
that this may involve more complex "topological surgery". An example may
serve to illustrate the general method. Let's consider a GCS defined by the
three multi-relators: hfd
these multi-relators are oriented by distinguishing f in the first, d in the sec-
ond, and a in the third. Then the corresponding rewriting system has the rules:
is an expression
meta-variable. Anteriority is clearly acyclic. Let us now consider the diagram
\Delta at the top-left of Fig. 20. This diagram contains three multi-cells corresponding
to the three grammar multi-relators, one of which, \Gamma, is itself formed of two
cells, and corresponds to the third multi-relator. The mother in each multi-cell
is underlined. By reading the boundary of the diagram, we see that a ! hm.
We want to show how multi-cell removal can be used to obtain a 7! hm. First,
by a reasoning similar to the proof of Lemma 3, we know that some mother
must appear on the boundary. In the example, this is a. We want to remove
the corresponding multi-cell \Gamma from the diagram without destroying the
topological property of being a diagram, and, in particular, without destroying
simple-connectivity. In order to do that, we have to find a "subdiagram" (that,
is, a topological constructs which is itself a diagram) \Delta 0 of \Delta consisting only
of the cells appearing in the multi-cell under consideration (simple reasoning
shows this to always be possible). In our example this subdiagram is constituted
by the two cells labelled \Gamma linked by the edge labelled d. The surgery now
consists in "forming a tube" wherever a "thin" edge, that is, an edge which is
not on the surface of a subdiagram cell, such as the d edge in the example, and
in deleting from the diagram both the subdiagram cells and the "tubes" thus
formed. What remains is a well-formed diagram - which may well have thin
edges itself - in which the removed tubes leave behind couple of parallel edges
carrying the same label (second diagram in our figure, consisting of two cells).
This multi-cell removal corresponds to a rewriting of the multi-cell mother into
a right-hand side, where expression multi-variables have been given proper values
(in our example ff takes the value c \Gamma1 d) allowing for the construction of the
subdiagram. The operation is repeated until all multi-cells have been deleted,
in the same way as in the previous proof.
In the example given in illustration, after the first multi-cell, having its
mother a on the diagram boundary, has been removed, one obtains the second
diagram; at this point a has been rewritten (using the rewriting rule for a) into
a 7! bc c c. The new diagram contains two multi-cells, each
consisting of a single cell. Again, there exists a mother on the diagram bound-
ary, this time f . The corresponding cell is removed, and at this point a has been
rewritten (using the rewriting rule for f) into bdeg
The last cell, with mother d is finally removed, leaving the last diagram (with
only edges, but no cell).
At this point a has been finally rewritten (using the rewriting rule for d) into
Application to G-grammars When the G-grammar presented as a multi-
relator GCS in Fig. 17 is oriented by privileging as a left-hand side the "largest"
logical-form atom, its associated QCF system becomes the system of Fig. 2. It
can be checked that this "generation" system is acyclic and even noetherian.
The theorems 7 and 8 then say that generation by using the rewriting system
is equivalent to generation by using the G-grammar. A similar result can be
shown for the "parsing-oriented" rewriting system of Fig. 5.
f
d
c
e
d
f
a
d
c
e
G
G
e
Figure
20: Multi-cell removal and rewriting.
Computability
We will not attempt here a systematic treatment of the computability properties
of G-grammars, but will limit ourselves to prove certain strong decidability
properties of our example G-grammar. Although a general synthesis is not
proposed here, the methods show clearly the power of group morphisms to
study computability in group computation structures.
If we consider a grammar to be the specification of a recursively enumerable
list L of pairs (sem; phon), then, using the terminology of [6], we will say that
generation (resp. parsing) is finitely enumerable if the subset of L consisting of
the pairs (sem; phon) with sem known (resp. with phon known) is finite and
computable in finite time. If parsing and generation are both finitely enumer-
able, the grammar is said to be inherently reversible. We will sketch a
proof of the fact that the G-grammar of Fig. 17 is inherently reversible. 9
9 In [6], several types of computability of generation (resp. parsing) are defined and it is
shown there that, unless certain specific conditions are met, whatever the type of computability
considered, the computability of parsing and the computability of generation bear in general
no relation to each other.
8.1 Bounding of diagram complexity in function of the
input
Let's first consider a group morphism f from F (V ) to the additive group of
reals (R;+). Thus f is a real-valued function on F (V ) which is such that for
f(a)+f(b). Remark that because f takes its value
in a commutative group, f is invariant by permutations (that is,
We can therefore define the value of f on a multi-relator
be its value on any of its multi-conjugates, that is, to be f(r 1
If a result s is obtained by taking the product of multi-conjugates of the multi-
relators can be computed simply by taking the sum of
all the multi-relator components r ij , where mr
i.
Let's now suppose that there exists a strictly positive real ! such that, for
any multi-relator mr in the group computation structure, one has:
If such is the case, we will then say that f is a relator-lower-bounded or rlb
morphism.
Similarly, we will say that f is a relator-upper-bounded or rub morphism iff
there exists a strictly positive real ! such that, for any multi-relator mr in the
group computation structure, one has:
The following property is immediate.
Lemma 9 If f is an rlb morphism from F (V ) to R, and if s is a result in the
GCS, then (1) f(s) 0, and (2) if a computation of s involves k multi-relators,
then k f(s)=!. Similary, if f is an rub morphism, then, if a computation of
s involves k multi-relators, then f(s) k!.
If f is rlb, and if s an expression in F (V ) for which the value of f is known,
then we see that in order to test whether s is a result, we only need to test
diagrams with an a priori bounded number of multi-cells.
Now consider the following two real-valued functions on F (V
ffl For e 2 F (V ), e reduced, f(e) is defined as the difference between the
number of phonological elements which appear in e with a negative
polarity with the number of such elements which appear with a
positive polarity. For instance the value of f on john \Gamma1 s(j; m) in the park
ffl Suppose that the size of a term T is defined recursively by the following
equations: (1) if T is an argument identifier (such as x, y, .) then
is of arity 0, then
of arity n, of the form
being the sum of the
sizes of the terms of positive polarity minus the sum of the sizes of the
terms of negative polarity. For instance, the value of g on the expression
It is immediate that f and g are morphisms. It is also a simple observation
that, for any multirelator mr of Fig. 17, the value of both f and g on mr
is uniformly lower-bounded by and g are uniformly
equal to 1 in our example). For instance if e is any expression of the form
1. It is also clear that both f and g are uniformly upper-bounded
Let's now consider parsing. In this case, we are looking at all results of the
form sem phon \Gamma1 , with phon known, and therefore with f known (it is just the
length of the phonological string). We therefore have only to consider diagrams
with fewer than length(phon) multicells and having a boundary of the form
sem phon \Gamma1 .
If we instead consider generation, we are looking at all results of the form
sem phon \Gamma1 , with sem known, and therefore with g known. We therefore have
only to consider diagrams with fewer than size(sem) multicells and having a
boundary of the form sem phon \Gamma1 .
8.2 Restriction of the set of multi-cells to consider
We are now very close to results of finite enumerability for parsing and genera-
tion. We know a bound for the total number of cells in any relevant diagram.
Still, it could be conceivable that the repertory of relevant cells is not finite. We
will now show that this cannot be the case.
Let's introduce the notion of subharmonic function on a GCS. 10 Let h be a
function from V [ V \Gamma1 to R. We will say that h is subharmonic relative to the
GCS if, for any diagram \Delta relative to the CGS, h can only reach its maximum
on the boundary of \Delta (therefore not on an "internal" edge in the diagram).
Let's define h as the function which takes a phonological element, whatever
its polarity, to 0, and which takes a logical form T , as well as its inverse T \Gamma1 , to
From the discussion of acyclicity of our G-grammar, and from Lemma
3, we see that h is subharmonic for the G-grammar.
This means that any multi-cell appearing in a diagram which is a proof of
sem phon \Gamma1 has all its semantics (of whatever polarity) bounded by the size of
sem.
It is easy to check that there are only finitely many multi-cells according to
the G-grammar for which the largest semantic element has a bounded size. 11
10 The terminology is borrowed from analysis, where subharmonic functions are functions
which have a property of reaching their maximum only on the boundary of disks.
11 We are finessing the case of the identifier meta-variable X , whose domain of instanciation
has not been described precisely. We will assume here that its domain of instanciation is
constituted by a finite, fixed, set of identifiers x; This can be assumed both for generation
and for parsing on the basis of a simple argument. A more satisfying treatment is left to future
research.
So, if we are in generation mode, and know sem, we have only a fixed, finite,
repertory of multi-cells to consider for diagrams pretending to the status of
proofs of a result of the form sem phon \Gamma1 . Because of the fact noted above that
these cells can appear conjointly only a finite number of times, we have now
proven the finite enumerability of generation.
For parsing, we only know phon. But it is immediate from the fact that f is
rlb and g rub that sem can be bounded from the fact that phon is known. We
conclude that only a finite repertory of cells have to be considered for diagrams
pretending to the status of proof of results of the form sem phon \Gamma1 . By the
same reasoning as previously, this proves the finite enumerability of parsing.
Acknowledgements
Thanks to Sylvain Pogodalla, Christian Retor'e and to the anonymous reviewers
for their remarks and comments.
--R
'Les syst'emes-Q ou un formalisme pour analyser et synth'etiser des phrases sur ordinateur'
'Transformations de grammaires logiques et r'eversibilit'e en Traduction Automatique'.
Presentations of Groups.
Combinatorial Group Theory.
Lambek grammars are context free.
'R'eseaux et s'equents ordonn'es'.
An Introduction to the Theory of Groups.
Essays in Logical Semantics.
--TR | parsing;generation;group theory;diagrams |
595959 | On Automating Diagrammatic Proofs of Arithmetic Arguments. | Theorems in automated theorem proving are usually proved by formal logical proofs. However, there is a subset of problems which humans can prove by the use of geometric operations on diagrams, so called diagrammatic proofs. Insight is often more clearly perceived in these proofs than in the corresponding algebraic proofs; they capture an intuitive notion of truthfulness that humans find easy to see and understand. We are investigating and automating such diagrammatic reasoning about mathematical theorems. Concrete, rather than general diagrams are used to prove particular concrete instances of the universally quantified theorem. The diagrammatic proof is captured by the use of geometric operations on the diagram. These operations are the inference steps of the proof. An abstracted schematic proof of the universally quantified theorem is induced from these proof instances. The constructive -rule provides the mathematical basis for this step from schematic proofs to theoremhood. In this way we avoid the difficulty of treating a general case in a diagram. One method of confirming that the abstraction of the schematic proof from the proof instances is sound is proving the correctness of schematic proofs in the meta-theory of diagrams. These ideas have been implemented in the system, called Diamond, which is presented here. | Introduction
It requires only basic secondary school knowledge of mathematics to
realise that the diagram above is a proof of a theorem about the sum
of odd naturals.
It is an interesting property of diagrams that allows us to "see" and
understand so much just by looking at a simple diagram. Not only do
Portions of this work were published in the Proceedings of the International
Joint Conference on Artificial Intelligence in (Jamnik et al, 1997).
Mateja Jamnik et al.
we know what theorem the diagram represents, but we also understand
the proof of the theorem represented by the diagram and believe it is
correct.
Is it possible to simulate and formalise this sort of diagrammatic
reasoning on machines? Or is it a kind of intuitive reasoning particular
to humans that mere machines are incapable of? Roger Penrose claims
that it is not possible to automate such diagrammatic proofs. 1 We are
taking his position as a challenge and are trying to capture the kind of
diagrammatic reasoning that Penrose is talking about so that we will
be able to emulate it on a computer.
The importance of diagrams in many domains of reasoning has been
extensively discussed by Larkin and Simon (Larkin & Simon, 1987),
who claim that "a diagram is (sometimes) worth ten thousand words".
The advantage of a diagram is that it concisely stores information,
explicitly represents the relations among the elements of the diagram,
and it supports a lot of perceptual inferences that are very easy for
humans. Diagrams have been extensively used in the history of mathematics
to aid informal mathematical reasoning. The use of diagrams in
explanations of theorems and proofs of geometry dates back to Ancient
Greece, and the time of Aristotle and Euclid. Thus it is surprising perhaps
that more recently, starting with the invention of formal axiomatic
logic in the sense of Frege, Russell and Hilbert, diagrams have
been denied a formal role in theorem proving. It is generally thought
by logicians that diagrams have no accepted syntax nor semantic theory
in a logical formalism which would make them rigorous enough to
be used in formal proofs. Only very recently, in the last two decades,
have there been efforts to fill this gap and investigate whether and how
diagrams can be used in formal proofs. For instance, the investigation
of Pierce's existential graphs in (Sowa 84), the work on GROVER in
(Barker-Plummer & Bailin, 1997), the work on Hyperproof in (Bar-
wise & Etchemendy, 1991), the introduction of computational models
for interpreting Euler's circles in (Stenning & Oberlander 95), the analysis
of the use of Venn diagrams as a formal system in (Shin 95), and
the formalisation of a logical theory of Venn diagrams in (Hammer 95).
Our work contributes in some sense to the effort in the research
from the formal perspective on the use of diagrams, especially that of
automated reasoning systems which use diagrams in the reasoning pro-
cess. Our aim is to formalise diagrammatic reasoning and to show that
diagrams can be used for proofs. In this paper we show how diagrams
can be used for proofs in a formal system. We look into how theorems
Roger Penrose presented his position in the lecture at International Centre
for Mathematical Sciences in Edinburgh, in celebration of the 50th anniversary of
UNESCO on 8 November, 1995.
On Automating Diagrammatic Proofs of Arithmetic Arguments 3
of mathematics can be expressed as diagrams for some concrete values,
i.e., ground instantiations of a theorem. The initial diagram is manipulated
using some geometric operations. The sequence of geometric
operations on a diagram represents the inference steps of a diagrammatic
proof. Such a concrete proof instance is called an example proof.
The set of all available operations defines the proof search space. A general
pattern is extracted from these proof instances, and is captured in
a recursive program. This recursive program constitutes a general diagrammatic
proof for the universally quantified theorem. An existing
technique in logic, namely the constructive !-rule, justifies the step
from schematic proofs to theoremhood.
We also aim to investigate the relation between formal algebraic
proofs and more "informal" diagrammatic proofs. Usually, theorems
are formally proved with the use of inference steps which often do not
convey an intuitive notion of truthfulness to humans. The inference
steps of a formal symbolic (as opposed to diagrammatic) proof are
statements that follow the rules of some logic. The reason we trust
that they are correct is that the logic has been previously proved to be
sound. Following and applying the rules of such a logic guarantees that
there is no mistake in the proof. We want to have such a guarantee
in our proof system, and moreover, to gain an insight into the proof.
Ultimately, the entire process of diagrammatically proving theorems
will illuminate the issues of formality, rigour, truthfulness and power
of diagrammatic proofs.
We implemented a diagrammatic proof system called Diamond,
which automates such diagrammatic reasoning and applies it to problem
solving in mathematics. The user interactively constructs example
proofs by choosing an initial diagram which represents the theorem,
and then applies diagrammatic operations to build a proof. Diamond
then automatically extracts a general pattern from these instances, and
captures it in a recursive program.
First, we list some of the theorems and their diagrammatic proofs.
These help us define our problem domain. Second, we present Dia-
mond's architecture, some operations required, the abstraction mechanism
employed, and indicate how to verify the abstracted proof. Next,
we report on some of our results and discuss future work. Then, we discuss
some of the related diagrammatic reasoning systems. Finally, we
conclude by summarising the main points of this paper.
2. 'Diagrammatic' Theorems
We are interested in mathematical theorems that admit diagrammatic
proofs. In order to clarify what we mean by diagrammatic proofs
4 Mateja Jamnik et al.
we first list some example theorems. Then, we introduce a taxonomy
for categorising these examples in order to be able to characterise the
domain of problems under consideration.
2.1. Examples
2.1.1. Pythagoras' Theorem
Pythagoras' Theorem states that the square of the hypotenuse of a
right angle triangle equals the sum of the squares of its other two sides.
Here is one of the many different diagrammatic proofs of this theorem,
taken from (Nelsen, 1993, page 3):
a
c
a
b a
a
a
The proof consists of first taking any right angle triangle, completing a
bigger square by joining to it identical triangles and squares along its
sides, and then rearranging the triangles in a bigger square.
2.1.2. Sum of Odd Naturals
This example is also taken from (Nelsen, 1993, page 71). The theorem
about the sum of odd naturals states the following:
Note the use of parameter n. If we take a square we can cut it into
as many ells (which are made up of two adjacent sides of the square)
as the magnitude of the side of the square. Note that one ell is made
out of two sides, i.e., 2n, but the shared vertex has been counted twice.
Therefore, one ell has a magnitude of (2n \Gamma 1), where n is the magnitude
of the square.
2.1.3. Geometric Sum
This example is also taken from (Nelsen, 1993, page 118). A theorem
about a geometric sum of 1
states the following:
On Automating Diagrammatic Proofs of Arithmetic Arguments 52
1 _Note the use of ellipsis in the diagram. Take a square of unit magnitude.
Cut it down the middle. Now, cut one half of the previously cut square
into halves again. This will create two identical squares making up a
half of the original square. Take one of these two squares and continue
doing this procedure indefinitely.
2.2. Classification
From the analysis of the examples that we presented above, and many
others (see (Jamnik, 1998) and (Nelsen, 1993)), three categories of
proofs can be distinguished:
Category 1: Non-inductive theorems. Usually, there is only one representative
diagram for all instances of the theorem. There is no
need for induction to prove the general case: proofs are not schem-
atic. Simple geometric manipulations of a diagram prove the individual
case. Abstraction is required to show that this proof will
hold for all a; b. Theorems are of continuous space. Example the-
orem: Pythagoras' theorem.
Category 2: Inductive theorems with a parameter. A diagram is a representative
of a particular instance of a theorem. Proofs are schem-
atic: they require induction for the general diagram of magnitude n
(a concrete diagram cannot be drawn for this instance). An alternative
method can sometimes be used to capture the generality of
the proof. Theorems are of discrete space. Example theorem: sum
of odd naturals.
Category 3: Theorems whose proofs are inherently inductive: for each
individual concrete case of the diagram they need an inductive
step to prove the theorem. Every particular instance of a theorem,
when represented as a diagram requires the use of abstractions
to represent infinity. Theorems are of continuous space. Example
theorem: geometric sum.
6 Mateja Jamnik et al.
2.3. Problem Domain
We choose mathematics as our domain for theorems since it allows us to
make formal statements about the reasoning, proof search, induction,
generalisations, abstractions and such issues. Having introduced the
examples and their categorisation, which is by no means exhaustive, we
are now able to further restrict our domain of mathematical theorems.
First, we narrow down the domain to a subset of theorems that can
be represented as diagrams without the need for abstraction (e.g., the
use of ellipsis, as in the above example theorem for geometric sum).
Conducting proofs and using abstractions in diagrams is problemat-
ic, since it is very difficult to keep track of these abstractions while
manipulating the diagram during the proof procedure.
Second, we consider diagrammatic proofs that require induction to
prove the general case (i.e., Category 2 above). Namely, diagrams can
be drawn only for concrete situations and objects. We cannot draw, for
example, an n \Theta n square without some abstraction device, e.g., ellipsis.
Our challenge is to find a mechanism for extracting a general proof that
does not require using abstractions in diagrams. 2 The generality of the
proof will be captured in an alternative way (by using the constructive
!-rule - see x2.4).
Third, to date we consider theorems of natural number arithmetic
only. Diamond is designed to prove examples of Category 2, where diagrams
represent natural numbers. A more formal definition of diagrams
is given in x3.4.1. We may extend diagrammatic theorem proving for
examples of Category 1 as well.
One of the possibilities for future work is to consider a need for a
more formal problem domain definition.
2.4. Constructive !-Rule
As mentioned above we use the constructive !-rule to prove theorems
of Category 2. Siani Baker in (Baker et al, 1992) did some work on the
constructive !-rule and schematic proofs for theorems of arithmetic.
Here, we explain the idea behind constructive !-rule and schematic
proofs and how they can be applied to diagrammatic proofs.
2.4.1. Schematic Proof
Schematic proofs use the constructive !-rule which is an alternative
to induction. The constructive !-rule allows inference of the sentence
8xP (x) from an infinite sequence P (n) of sentences.
2 Note that (Barker-Plummer & Bailin, 1997) formalises the use of abstractions,
however in the domain of well founded relations.
On Automating Diagrammatic Proofs of Arithmetic Arguments 7
where "if each P (n) can be proved in a uniform way (from parameter
n), then conclude 8nP (n)." The criterion for uniformity of the procedure
of proof using the constructive !-rule is taken to be the provision
of a general schematic proof, namely the proof of P (n) in terms of n,
where some rules R are applied some function of n (i.e., f R (n)) times
(a rule can also be applied a constant number of times). Let the proof
of P (n) be captured using a recursive function proof(n). Now, proof(n)
is schematic in n, since we applied some rule R n times. The following
procedure summarises the essence of using the constructive !-rule in
schematic proofs:
1. Prove a few special cases (e.g. P (2), P (16), .
2. Abstract (guess) proof(n) (e.g. from proof(2), proof(16), .
3. Prove that proof(n) proves P (n) by meta-induction on n.
The general pattern is extracted (guessed) from the individual proof
instances by (learning type) inductive inference. By meta mathematical
induction we mean that we introduce system Meta such that for all n:
where ":" stands for "is a proof of ". Baker used PA ! (i.e., Peano
arithmetic with !-rule) for the system Meta (Baker et al, 1992). The
meta inductive rule is defined as follows:
This essentially says that by using the rules on P (s(n)) we can
reduce it to P (n). For more information, see (Baker et al, 1992).
2.4.2. Diagrams and Schematic Proofs
We claim that we can extend Baker's work on schematic proofs to our
diagrammatic proofs so that the generality of the diagrammatic proof
is embedded in the schematic proof. Thus, we eliminate the need for
abstractions in diagrams, and can extract a general schematic proof
from manipulations on concrete diagrams.
The diagrammatic schematic proof starts with a few particular concrete
cases of the theorem represented by the diagram. The diagrammatic
procedures (i.e., operations) on the diagram are performed next,
8 Mateja Jamnik et al.
capturing the inference steps of the diagrammatic proof. This step corresponds
to the first step of the schematic proof procedure given in the
previous section x2.4.
The second step is to abstract the operations involved in the schematic
proof for n. Note that the generality is represented as a recursive
program which specifies a sequence of diagrammatic procedures (oper-
ations) that are used on a diagram, and not as a general representation
of a diagram. More precisely, the basic idea is to consider proofs for
which can be reduced to proofs for n (or conversely, such proofs
for n which can be extended to proofs for by adding to them
some additional sequence of operations). The difference between the
proof for (n and the proof for n, i.e., the additional sequence of
operations in the proof for (n respect to the proof for n is
referred to as the step case of the abstracted schematic proof.
The last step in the schematic proof procedure is to prove by meta-
induction that the abstracted diagrammatic schematic proof is indeed
correct. One way of proving the correctness of schematic proofs is to
create a theory of diagrams that models the processes in a diagrammatic
reasoning system and prove correctness there. A formal definition of
a diagrammatic proof of an arithmetic statement, and the correctness
of this diagrammatic proof will be discussed in x3.4.
2.4.3. Schematic Diagrammatic Proof for the Sum of Odd Naturals
Now we can structure the diagrammatic proofs in a more formal way.
Here we list the proof for the theorem about the sum of odd naturals
as a sequence of steps that need to be performed on the diagram:
1. Cut a square into n ells, where an ell consists of 2 adjacent sides
of the square.
2. For each ell, continue splitting from an ell pairs of dots at the end
of two adjacent sides of the ell until only 1 dot is left (note that for
each ell of magnitude n, we will have of dots plus another
dot which is a vertex of the two adjacent sides, i.e., 1).
Identifying the operations (i.e., geometric manipulations) that were
required to prove the theorem will help us define a large repertoire of
such operations which will be used in the diagrammatic proofs. The
generality of the proof is captured by the use of the constructive !-
rule, by which we take a few special cases of the diagram (say squares
of magnitudes 15 and 16), and find the general pattern of the proof
that will hold for each case (e.g., the schematic proof given above).
On Automating Diagrammatic Proofs of Arithmetic Arguments 9
3. Diamond System
The diagrammatic proof system Diamond is an embodiment of some of
the ideas presented in this paper. Diamond stands for Diagrammatic
Reasoning and Deduction.
Clearly, an important issue in the development of Diamond is the
internal representation of diagrams and operations on them. It was
George P'olya who was first to advise us on the importance of knowledge
representation (see (P'olya, 1945) and (P'olya, 1965)). Simon argued
P'olya's point further in (Simon 96) by stating that solving a problem
means representing it so that the solution becomes trivial, or at least
transparent. In automated reasoning it is difficult to see how to use
this advice, since there is normally only one representation scheme for
the problem which is available to the system. In Diamond we choose
a representation which we hope captures the intuitiveness, rigour and
simplicity of human reasoning with diagrams. We aim to represent diagrams
in a way which enables a theorem prover to prove theorems using
diagram.
In Diamond we use a mixture of Cartesian and topological rep-
resentations. Diamond uses a primitive notion of a diagram, a dot.
All other elementary and derived diagrams (e.g., rows, columns, ells,
frames, squares, triangles, rectangles, etc.) are composed in various
ways out of dots. The advice of P'olya about alternative representations
can readily be used in Diamond. Namely, diagrams can be represented
in a variety of different ways. For instance, a square is represented as: a
sequence of rows; a sequence of columns; a concentric sequence of cir-
cumferences, each of which is called a frame; a nested sequence of ells;
a sequence of four similar squares; a matrix; a sequence of diagonals.
The choice of the representation that Diamond uses is important.
Most of the proofs that Diamond proves require some kind of recursive
decomposition of a diagram. Each alternative representation makes
available a different form of recursive decomposition. For more information
on the choice of internal representation for diagrams in Diamond
see (Jamnik, 1998).
The architecture of Diamond consists of two parts. The diagrammatic
component forms and processes the diagram. It is the interface
between Diamond and the user. The inference engine deals with the
diagrammatic inference steps. It processes the operations on the dia-
gram. An important submodule is the abstraction mechanism which is
used to extract general schematic proofs from example proofs.
The rest of this section presents the operations used to construct
proofs, the structure of proofs and the abstraction mechanism used in
Diamond.
Mateja Jamnik et al.
3.1. Geometric Operations
Geometric operations (also referred to as manipulations or procedures)
capture the inference steps of the proof. Thus, a sufficiently large number
of such operations which are then available to the user in the search
for the proof, needs to be identified and formalised. Since we are not
generating, i.e., discovering diagrammatic proofs, but rather we are
trying to understand them, we can expect from the user to input these
operations. To date, a small number of such operations has been implemented
and is available to the user.
Diamond is targeted to prove theorems of discrete arithmetic. Diagrams
are a way of representing natural numbers. The interest lies in
the effect on the numbers that diagrams represent after an operation
has been applied on the diagrams. Thus, the operations join and split
diagrams apart in various ways. Some operations are just simple ones
(e.g., split a row from a square), and some are more complicated ones
(e.g. decompose a square into a sequence of rows). Hence, Diamond
distinguishes between two types of operations, atomic and composite: 3
Atomic operations: are basic one-step operations that can be combined
into more complex operations. Examples of such operations
are: rotate, translate, cut, split, join, remove, insert a segment,.
To date, there are fourteen atomic operations implemented in Diamond
Composite operations: are more complex, typically recursive opera-
tions, composed from simple atomic ones. One can think of them as
tactics in automated reasoning. Composite operations are defined
in terms of decomposition of different recursive representations
of diagrams. Depending on the theorem at hand, the diagram is
viewed using a particular representation, which enables one to use a
particular recursive composite operation. Ideally, the internal representation
of the diagram is pertinent to the composite operation
that is being carried out on it. Such a representation would
render an operation very easy to apply. It would be just a simple
decomposition of the representation of a diagram. Examples of such
operations are: recursive decomposition of a square into rows, or
columns, or ells, or frames,.
In the example of the theorem for the sum of odd naturals the proof
consists of the following operations: lcut and split ends.
3 A complete list of operations can be found in (Jamnik, 1998), however, a more
formal definition of operations as part of the diagrammatic theory can be found in
On Automating Diagrammatic Proofs of Arithmetic Arguments 11
3.2. Constructing a Proof
Diamond's example proof consists of a sequence of applications of
geometric operations on a diagram. The abstraction is then carried out
automatically, if any such abstraction exists for the two example proofs
given. 4 Diamond expects the example proofs to be formulated in a
particular way where the order of operations in the user's formulation
of the example proofs is crucial. Both example proofs are expected
to be given with the same order of operations, but with some extra
operations in the case of the proof of (n + 1) for some particular n.
Consider the example for the sum of odd naturals. The step cases
for proofs for look as follows:
The aim is to recognise automatically the structure of the proof from
a linear sequence of applications of operations, so that the example
proofs for n and n+ 1 can be reformulated in the general case into the
where for each n, A(n) is a step case consisting of a sequence of applications
of some operations and B is a base case for Alternatively,
we seek this recursive reformulation:
Note that proof(0) is often an empty list of operations, because often
no diagram is defined for a diagram which consists of no
dots.
4 If the proof contains a case split for say, even and odd integers, and the two
example proofs given are for two different cases, then Diamond cannot abstract
from them. However, Diamond recognises that the example proofs were given for
different cases, and requests the user to supply another example proof for each case,
in order for it to be able to abstract. This will be further explained in x 3.3.2.
12 Mateja Jamnik et al.
A further issue that we are investigating currently is to relax the requirement
for a particular ordering of operations in formulating example
proofs. Sets with partial ordering could be used as an alternative.
3.3. Abstraction
Given some example proofs Diamond needs to abstract from them, so
that the final diagrammatic proof is not only for the cases of specific
n's, but holds for all n. Such a schematic proof is a general program
which specifies the applications of some operations, where the number
of application of each operation is dependent on n or is a constant.
We distinguish between two types of example proofs: destructor, i.e.,
the example proofs which are formulated so that the base case operations
are performed last (in a sense, the initial diagram is "destructed"
by the application of operations down to a trivial diagram, forming the
proof along in this way); and constructor, i.e., the base case operations
are performed first followed by the step case operations. In Diamond
we arbitrarily choose to use destructor schematic proofs.
A proof that has the same structure for all n, i.e., one recursive
function defines a complete proof for all n, is called a 1-homogeneous
proof. Proofs can be c-homogeneous; then there are c cases of the proof.
For instance, when there are two cases of a proof, one for odd and one
for even natural numbers, then there need to be two recursive functions
defining each case of the proof - the proof is 2-homogeneous. We say
that if all concrete instances of the proof (for instances of numbers that
"equal modulo c") have the same structure and can be abstracted, then
the proof is c-homogeneous. If there are c cases, then there are c different
abstracted proofs, one for each case. We seek the smallest complete
recursive definition of a proof, i.e., c potentially different schematic
proofs, if there are c cases. The following theorem and corollary will
help us define what we mean by the smallest complete proof:
THEOREM 1. If a proof is c-homogeneous, then it is also (kc)-homo-
geneous for every natural number k ? 0.
The immediate consequence of Theorem 1 is:
COROLLARY 1. If a proof is not c-homogeneous, then it is also not
f-homogeneous for every factor f of c.
In a c-homogeneous proof we will denote by B r a base case for a branch
of numbers which give remainder r when divided by c. B r is actually
a proof for the smallest natural number that gives remainder r when
divided by c.
A schematic proof is defined to be the smallest complete proof if
there is no other f-homogeneous proof obtainable from a c-homogeneous
On Automating Diagrammatic Proofs of Arithmetic Arguments 13
proof for any factor f of c, and all f schematic proofs for f cases are
defined.
The general representation of a destructor proof is formalised as
number of cases and r ! c, and
1. Then the recursive definition of a general proof is:
where A r is a step case and B r is a base case for a class of proofs where
denotes concatenation of sequences of operations: "do
operations of A(n+ 1), then proof(n)". The formalisation of abstracted
proof for constructor proofs is symmetric to the one given above.
3.3.1. Abstracting For All Linear Functions
As mentioned above, we aim to recognise the particular recursive structure
of the given example proofs. More precisely, we want to extract
the step case A and the base case B of the proof and then abstract
them for all n. The general methodology employed for doing this can
be demonstrated as:
The first step of the abstraction algorithm is to extract the difference
between the two given example proofs for
in the hope that this, when abstracted, will be the
step case A of the proof. This is done by commutative and associative
matching 5 which detects and returns the difference between the two
example proofs. Now we have a concrete step case of the proof. This
difference consists of a few operations op k each applied x k;n 1
times for
some natural k.
To make a step case general, we need to find the dependency function
between every x k;n 1
and n 1 . This demands identifying a function of n 1 ,
which would give a specific x k;n 1
for some k and
assumes that the dependency is linear: an + b. This is a
heuristically adequate choice. Thus, let us write for each op k a linear
equation an 1
, where n 1 and x k;n 1
are known.
The subsequent stage of the abstraction is to extract the next step
case from the rest of the example proof for the corresponding new n
5 Using commutative and associative matching reduces the sensitivity to the order
of proof steps (Jamnik, 1998).
14 Mateja Jamnik et al.
(i.e., n 2 ). If successful, continue extracting step cases for the corresponding
n's from the rest of the proof until only the base case is left.
Since we are dealing with inductive proofs, it is expected that every
step case of a proof will have the same structure, i.e., will consist of
the same sequence of application of operations, but a different number
of times. Thus, we could in the same way as above for every operation
op k write a linear equation an However, the number x k;n2
of applications of a particular operation op k in the next step case is not
known. A possible value of x k;n 2
is acquired by counting the number x 0
of times every operation op k of the initial step case occurs in the rest
of the proof. The actual value of the number of occurrences of each
operation could be any number from 0 to x 0 . Thus, we do branching
for all such values and thus we have:
an
an
are known, so the equations can be solved
for a and b, and x k;n 2
takes values from 0 to x 0 . This results in several
possible potential abstractions of the step case. The aim is to eliminate
those that are impossible. After checking if step cases for all n down to
the base case are structurally consistent one hopes to be left with at
least one possible abstraction of the example proofs. The step case is
rejected when the sequence of operations in the subsequent step cases is
impossible, i.e., the functions were wrong. This normally occurs when
the dependency function gives a negative number of applications of a
particular operation, when the calculated sequence is not identical to
the rest of the example proof, or when there is no integer solution to
our equations. Usually, there will be only one possible abstraction of
the two given example proofs.
The example proof for the sum of odd naturals is abstracted into the
following step case and base case:
diagonal ends,n-1)]
where the function in parentheses indicates the number of times that
the operations are applied for each particular n.
3.3.2. f-Homogeneous Proof
Assume two example proofs for the sum of odd naturals (the example
proof would consist of making n lcuts, and then showing that each ell
consists of an odd number of dots). If the user supplies two example
proofs for values of n and n + 1, for some concrete n, then there is no
On Automating Diagrammatic Proofs of Arithmetic Arguments 15
problem, so Diamond will abstract normally and determine that the
proof is 1-homogeneous. However, should the user supply proofs for
concrete n, the first stage of abstraction would
determine that the step case consists of two lcuts. However, a complete
recursive function for abstraction requires a step case to consist of one
lcut only.
Diamond checks this by trying to split the step case into a further
f structurally the same sequences of operations, for all factors f of c
in order to obtain an f-homogeneous proof. If the method fails, then
there is no such f-homogeneous further abstraction of the step case
A(n). If the method succeeds, and Diamond finds a new abstraction
of the step case, call this A 0 (n), then it also needs to find a new base
case
r 0 where the previous r for c was such that
and the new r 0 is now such that
3.4. Correctness of the Schematic Proof
The last stage of extracting a diagrammatic proof is to check that
the guessed general schematic proof is indeed correct. To prove that
the schematic proof is correct we need to show in some meta-theory
that proof(n) uniformly proves P (n) for all n, i.e., it gives a proof tree
with P (n) at its root, and axioms at its leaves. This requires reasoning
about proofs, i.e., meta-level reasoning. A meta-level proof using general
diagrams would be an obvious method for verifying our schematic
proof. However, such a meta-level proof would reintroduce the need for
abstractions (e.g. ellipsis) of diagrams, which we are trying to avoid.
One way of overcoming this problem is to define diagrams and operations
in a theory of diagrams where we can express abstract diagrams
symbolically rather than diagrammatically. In this theory we can verify
schematic proofs by defining the notion of applicability of a posited
proof. Given that a particular theorem is expressed as an equality, its
schematic proof is correct if applying the operations specified in the
schematic proof of the diagrammatic representation of the left hand
side of the theorem results in the diagrammatic representation of the
right hand side of the theorem. There are two conditions that need
to be satisfied. The first condition is that there is an appropriate diagrammatic
representation available for the conversion of the theorem
into its diagrammatic representation. The second condition is that the
operations of the schematic proof are defined on those diagrams.
Before we can state the definition of the correctness property of
schematic proofs, we need to formalise the machinery which will enable
us to model the processes of a diagrammatic proof. Therefore, we need
to formally define diagrams, operations on them, and the applicability
of operations of a schematic proof.
Mateja Jamnik et al.
3.4.1. Diagrams
Diagrams in the theory are defined to be of object type. Some examples
of the different kinds of object names in the theory are: row, column,
ell, frame, square, rectangle, and triangle.
Diagrams of the theory model natural numbers. Diamond's primitive
notion of a concrete diagram, a dot, is represented in the theory as
the natural number 1. Objects are introduced via a constructor func-
tion, diagram, which takes the name of the type of a diagram and the
list of parameters of its magnitude. Thus, the type of constructor function
diagram is name \Theta pnat list ! object. So, for instance, a square of
magnitude 4 is expressed in the theory as diagram(square,[4]). All elementary
and derived concrete diagrams are expressed using a primitive
object dot, hence in the theory they can be expressed using a constructor
function, the object name and some parameter representing a
natural number for the magnitude of the diagram.
Constant ; denotes a null diagram, or in other words an empty
diagram. We define that any diagram that is of 0 magnitude is an
empty diagram (note that a 2 b denotes that a natural number a is an
element of a list b; thus the type of an infix 2 is: pnat \Theta pnat list !
Note also, that all triangles are equilateral. 6 here are some examples
of diagrams: diagram(row,n), diagram(column,n), diagram(square,n) and
diagram(ell,n).
3.4.2. Operators
This section gives the operators available in the theory. First, we write
diagrammatic equality using d
which denotes that two lists of diagrams
are identical. here is the definition of d
where the function count can be defined by:
count(d; d ::
d
6 It is hard to represent discrete triangles that are of any magnitude, i.e., the
sides are of different and any magnitudes. Triangles are represented in a discrete
space. Hence, they appear to be right-angle triangles, despite the fact the all the
sides of any triangle are of equal discrete magnitude. Were we to extend Diamond to
prove theorems of real arithmetic (see x4), then there would be a need for continuous
space, and therefore a scope for triangles of any magnitude.
On Automating Diagrammatic Proofs of Arithmetic Arguments 17
Diagrammatic equality d
is a larger relation than an arithmetic
equality =, because it has all the properties of =, i.e., reflexivity, sym-
metry, transitivity and substitution properties, plus an additional one
- the order of elements in a list does not matter. Therefore, two lists
of diagrams, X and Y, are diagrammatically equal, X
d
even if the
orders in which the diagrams are listed in both lists differ. 7
We now define some operators that introduce the existence of several
diagrams (note that the data type pnat stands for non-negative natural
number of Peano arithmetic): @ is append on lists,; :: and nil are list
constructors (concatenation of elements onto a list, and an empty list);
\Omega is an infix operator which introduces a combination of a number
of identical lists of diagrams;
U denotes a collection of diagrams of
increasing magnitudes which are all of the same kind - it is analogous
to
for summation of integers. here is the recursive definition of
for all a b: 8
a
d
a
d
diagram(name; f(i))@
Note that f is some function which generates a list of natural numbers
for a given number i. This list denotes the parameters of a magnitude
of a diagram.
3.4.3. Operations
Diagrammatic operations are represented via a function op : opname \Theta
object list ! object list. We give here a definition of one operation only,
but there are many more operations defined in the theory - see (Jamnik,
1998).
op(lcut; diagram(square; n):: D) d
diagram(ell; n)]@D (4)
3.4.4. One Apply and Apply
here we define what it means to apply an operation on a diagram
several times. We use a function apply and function one apply. Let:
7 Note that our definition of diagrammatic equality of lists is equivalent to bag
equality. The order of the elements in a bag does not matter.
8 Note that to simplify the notation we write
D(i) instead of
U (a; b; i:D(i)).
Mateja Jamnik et al.
one apply(0; opnm; D) d
one apply(n
apply([ ]; D) d
3.4.5. Equations
here we give a theorem which will be needed. (9) is provable from (7)
and (8). Its proof is not given here, but can be found in (Jamnik, 1998).
apply(ops; D :: D s
Let dmap denote a relation between a particular class of statements of
arithmetic and their equivalent diagrammatic expressions in the theory
of diagrams. The equivalence is defined to be over the size of the
diagram. The size of a diagram is defined to be the number of counters
(dots) in the diagram, i.e., the natural number that the diagram rep-
resents. dmap takes two arguments, an arithmetic expression and a list
of diagrams which could collectively represent this expression. Hence,
the type of the relation dmap is pnat \Theta object list. here are some general
conversions:
We have now formalised enough machinery to be able to define the
correctness property of a schematic proof.
DEFINITION 1 (Correctness of Schematic Proofs).
proof is a correct schematic proof of a particular conjecture 8n
R(n) if for all n there exist two lists of diagrams D and E such that
dmap(L(n); D) and dmap(R(n); E), and
apply (proof (n); D) d
On Automating Diagrammatic Proofs of Arithmetic Arguments 19
It is possible to prove the property in Definition 1 only if L(n),
R(n) and proof are known, i.e., for a specific case of a conjecture and
a schematic proof. Knowing L(n) and R(n) allows us to infer some
conversion relations which specify two lists of diagrams D and E. This
satisfies the first part of Definition 1. In the next section we prove the
correctness of a schematic proof for a particular conjecture at hand.
3.4.7. Proof of Correctness of Schematic Proofs for an Example
here we prove the property given in Definition 1 for an example of
a schematic proof of a theorem about the sum of odd naturals. The
theorem is stated as
1). The schematic proof of this
theorem is given as: 9
The proof of correctness of a schematic proof for this particular
example requires induction on n. The base case for
since by (10) no operations are applied to an empty diagram list which
results in [ ]. We consider a step case of induction.
Step case:
Hypothesis: for n
Using
hence let
Using (13) and (12) notice dmap(
diagram(ell; [i])),
hence
diagram(ell; [i]).
diagram(ell; [i])
Conclusion: for
Similarly to the hypothesis, D and E are converted for n + 1.
diagram(ell; [i])
diagram(ell; [i])
9 For the brevity of presentation we take a simpler version of the schematic proof
which does not include the operation split ends.
20 Mateja Jamnik et al.
apply(proof(n); one apply(1; lcut;
diagram(ell; [i])
diagram(ell; [i])
diagram(ell; [i])
diagram(ell; [i])
(RHS of hypothesis)
diagram(ell;
diagram(ell; [i])
diagram(ell; [i]) d
diagram(ell; [i])
3.5. Arithmetic Conjecture and Diagrammatic Proof
Definition 1 makes no claims about the link between a schematic proof
and the theoremhood of a conjecture 8n We still need to
consider the possibility of a correct schematic proof of a false conjecture.
To establish that the conjecture is true when proved by a schematic
proof, an explicit algebraic link between them needs to be defined. We
establish this link via the size of diagrams. We first define the size of
a diagram, and later, in Theorem 2, we state the theorem about the
algebraic correctness of a schematic proof for a given conjecture.
Let us denote the size of the diagram D by j D j. here is a definition
for the size of a diagram:
DEFINITION 2 (Size of Diagrams).
The size of a list of diagrams is equal to the value of the arithmetic
expression that it represents: if dmap(e; D) then j D
Note that the type of j j is: object list ! pnat. Using the property of
size defined in Definition 2 on formulae from (10) to (13), we have the
On Automating Diagrammatic Proofs of Arithmetic Arguments 21
Apart from being diagrammatically correct, we want every schematic
proof to be algebraically correct as well. A schematic proof is algebraically
correct if the sizes of the diagrams representing both sides of
the proposition after the operations of the schematic proof have been
applied are the same. Theorem 2 states the property of algebraic correctness
for any schematic proof.
of Schematic Proofs).
For all instances of a schematic proof P and for all pairs of lists of
diagrams D and E, a schematic proof P is algebraically correct if and
only if
apply
The proof of Theorem 2 is straightforward by appealing to the properties
of diagram size invariance under applications of multiple opera-
tions. The lemmas about these properties and the proof of Theorem 2
are not given here, but can be found in (Jamnik, 1998).
There is one last theorem needed in the formalisation of diagrammatic
theory which will allow us to prove theorems of arithmetic using
diagrammatic proofs. We state in Theorem 3 the property about the
diagrammatic provability of arithmetic arguments.
THEOREM 3 (Diagrammatic Provability of Arithmetic Conjecture).
A conjecture 8n diagrammatically provable if and
only if for all n there exist two lists of diagrams D and E such that
dmap(L(n); D) and dmap(R(n); E), and
The proof of Theorem 3 is trivial by the definition of size of a list of
diagrams given in Definition 2.
3.5.1. Diagrammatic Provability for an Example
We consider now an example of an arithmetic conjecture and prove it
diagrammatically using a schematic proof that Diamond extracts. Let
the arithmetic conjecture be
22 Mateja Jamnik et al.
and the schematic proof proof that Diamond extracted be as defined
in (14) and (15). here are the reasoning steps of the proof:
1. Appealing to Theorem 3 we can discharge the conjecture by:
using (11) notice dmap(n 2 ; [diagram(square; [n])]), hence let
using (13) and (12) notice dmap(
diagram(ell; [i])),
hence
diagram(ell; [i]),
and proving for all n
diagram(ell; [i])
2. Appealing to Theorem 2 and proof(n) that Diamond extracted, we can
discharge the expression in (20) by proving for all n
apply (proof(n); [diagram(square; [n])]) d
diagram(ell; [i]) (21)
3. Finally, notice that we already proved (21) in x3.4.7.
4. Results and Further Work
Diamond is implemented in Standard ML of New Jersey, Version 109. 10
The code is available upon request to the first author.
The entire process of interactive construction of proofs, automatic
abstraction from example proofs, and automatic verification of schematic
proofs in the theory of diagrams have been implemented in Dia-
mond. In the evaluation of Diamond we distinguished between a development
and a test set of theorems which we proved using Diamond.
The development set of theorems included three theorems: the sum
of odd naturals, i.e.,
the sum of all naturals, i.e.,
i\Gamma0 i, and an odd triangular sum, i.e., T ri
3T ri n , where T ri i is an i-th triangular number (Nelsen, 1993). The
Standard ML of New Jersey (SML/NJ) is a compiler and programming environment
for the Standard ML programming language. SML/NJ is publicly available via
the internet on the following site: http://cm.bell-labs.com/cm/cs/what/smlnj/-
index.html
On Automating Diagrammatic Proofs of Arithmetic Arguments 23
test set included twenty six theorems. Some proofs of these theorems
are reported more elaborately in (Jamnik, 1998). All of these theorems
contribute to the significant range and depth of theorems proved using
Diamond. For more information, the reader is referred to (Jamnik,
1998).
We want to relax the restriction currently imposed on the formulation
of example proofs. Our abstraction mechanism can deal with a
linear sequence of operations. This sequence is in fact a linearisation of
some partially ordered sequence of operation. We want an abstraction
mechanism which would be sensitive to partially ordered sequences of
operations.
There is also a possibility of allowing non-linear dependency functions
in general schematic proofs: e.g. exponential or polynomial function
Some recognition and generalisation of diagrams using abstractions
could be an interesting issue to consider. This requires some formalisation
of abstractions (e.g. ellipsis) in diagrams.
There is a possibility to extend Diamond's problem domain from
natural number arithmetic to geometry or even further to a different
field such as hardware verification. Extending our problem domain to
geometry would enable us to prove theorems of Category 1 which are
usually geometric theorems of continuous space. These do not require
induction, hence there would be no need for Diamond's abstraction
mechanism. The generality is embedded in the use of continuous space
and diagrams of general magnitude. The existing operations and the
formalisation of schematic proofs can be used. Additional operations for
moving diagrams in various directions would need to be implemented.
For more information on the possible extension of Diamond to other
problem domains, see (Jamnik, 1998).
Diamond is an interactive proof checker. A long term goal is to
design an automated theorem prover capable of discovering diagrammatic
proofs.
5. Related Work
Several diagrammatic systems such as the Geometry Machine (Gel-
ernter, 1963), Diagram Configuration model (Koedinger & Anderson,
1990), GROVER (Barker-Plummer & Bailin, 1997), and Hyperproof
(Barwise & Etchemendy, 1991) have been implemented in the past and
are of relevance to our system. Additional information about issues in
reasoning with diagrams can be found in (Chandrasekaran et al, 1995)
which is a good reference for demonstrating how extensive and important
this field is.
Mateja Jamnik et al.
One of the first systems to use a diagram in proving theorems was
Gelernter's Geometry Machine (Gelernter, 1963). The diagram in the
geometry machine has two roles. Its negative role is to reject hypotheses
(subgoals) that are not true in the diagram. In this way the search space
is pruned. The positive role of the diagram is to shorten the inference
paths by assuming various facts that are obvious in the diagram as
true.
(Koedinger & Anderson, 1990) implemented a geometry problem
solver called the Diagram Configuration (DC) model. The key feature
of the system is that it organises its data in perceptual chunks, called
diagram configurations. These are analogical to key features of diagrams
that humans recognise when they inspect a diagram. Therefore,
during the process of generating a solution path, DC infers the key
steps first, and ignores along the way the less important features of the
diagram, i.e., the less important inference steps.
"&"/GROVER, developed by (Barker-Plummer & Bailin, 1997) is
an automated reasoning system which uses information from a diagram
to guide proof search. Its problem domain are theorems of well founded
relations. It consists of the "&" automated theorem prover, based on
the sequent calculus for Zermelo set theory, and GROVER, which is
the diagram interpreting component of the system. It passes information
extracted from the diagram and translated into logical formulae
in the language of "&" to the "&" theorem prover. These formulae are
then used as additional hypotheses to the main proof of the conjecture.
GROVER considers only subgoals that are known to be true in the
diagram.
The main common feature of these three systems is their use of dia-
grams. The diagram is used to model algebraic statements, and the
system uses these models for heuristic guidance while searching for an
algebraic proof. Thus, the basic underlying reasoning process is non-
diagrammatic. In contrast, proofs in Diamond are explicitly constructed
by operations on diagrams, thus the inference steps of the proof are
entirely diagrammatic.
Perhaps a more closely related system to Diamond is Hyperproof
(Barwise & Etchemendy, 1991). Hyperproof reasons about the blocks
world. It is an educational tool to teach principles of logic reasoning and
proof construction. Hyperproof is an interactive tool for proof checking,
as opposed to an automated theorem prover. It is a heterogeneous logic
system, because it models inferencing between different kinds of rep-
resentation. Unlike traditional systems for first-order logic, which use
sentential representation, Hyperproof uses sentential and diagrammatic
(graphical) representation. It uses a diagram for a concise representation
of a complex system aiming to aid human reasoning. The user
On Automating Diagrammatic Proofs of Arithmetic Arguments 25
can take advantage either of conventional sentential inference rules or
diagrammatic inference rules. It differs from Diamond in that Hyper-
proof's diagrammatic inference rules deduce from a diagram to a sentential
formula or vice versa. It does not have diagrammatic inference
rules between two diagrams, as it is the case in Diamond. Moreover,
in Hyperproof the sentential inference rules (as well as diagrammatic
description of a situation) are essential to construct a proof.
Closer to our work is work done by Siani Baker (Baker et al, 1992)
described in x2.4 on constructive !-rule, whereby she exploits the uniform
structure of inductive proofs to abstract from example proofs.
The main difference between Baker's work and ours is the problem
domain. Baker implemented the use of constructive !-rule for proving
theorems. Our domain, on the other hand, is diagrammatic
theorems. Furthermore, Baker's motivation was to use schematic proofs
for theorems that require a cut rule in the inductive proof, otherwise
the proof cannot be carried out automatically. Schematic proofs avoid
the need for a cut rule. On the other hand, we use the constructive
!-rule in order to justify the automatic provision of general arguments
about theorems and their proofs from particular instances.
6. Conclusion
One of the aims in the research reported here is to see whether it is
possible to automate the use of diagrams in formal proofs. The hope
is that automating the 'informal' diagrammatic reasoning of humans
will shed light on the issues of formality, informality, rigour and 'intuit-
ive' understanding of the correctness of diagrammatic proofs. We have
made good progress in exploring this important and difficult area. In
particular, we have an explicit handle on abstraction. We showed that
diagrams can be used for formal proofs. We presented, as an example, a
diagrammatic reasoning system, Diamond, which supports interactive
construction of diagrammatic proofs. Diamond applies diagrammatic
reasoning to problem solving in mathematics. The user proves concrete
examples of a theorem, and the system automatically abstracts these
instances to give a general schematic proof which we hope holds for
all n. In Diamond we have the logical machinery (meta-theory, constructive
!-rule) to subsequently justify that the schematic proof does
indeed prove the original theorem.
Acknowledgements
The research reported in this paper was supported by an Artificial Intelligence
Department Studentship, from the University of Edinburgh,
26 Mateja Jamnik et al.
and a Slovenian Scientific Foundation supplementary studentship for
the first author, and by EPSRC grant GR/L/11724 for the other two
authors.
--R
On the use of the constructive omega rule within automated deduction.
Visual information and valid reasoning.
In Zimmerman
Realization of a geometry theorem-proving machine
Logic and visual information.
Automation of diagrammatic reasoning.
In Pollack
Also available from Edinburgh as DAI Research Paper No.
Automating diagrammatic proofs of arithmetic arguments.
Forthcoming PhD thesis.
"Diagrammatic Reasoning: Cognitive and Computational Perspectives"
"Diagrammatic Reasoning: Cognitive and Computational Perspectives"
Proofs Without Words: Exercises in Visual Thinking.
How to solve it.
Mathematical discovery.
The Logical Status of Diagrams.
The Sciences of the Artificial.
Conceptual Structures: Information Processing in Mind and Machine.
A cognitive theory of graphical and linguistic reasoning: Logic and implementation.
--TR
--CTR
Oliver Lemon , Maarten De Rijke , Atsushi Shimojima, Editorial: Efficacy of Diagrammatic Reasoning, Journal of Logic, Language and Information, v.8 n.3, p.265-271, July 1999 | automated reasoning;theorem proving;diagrammatic reasoning |
595967 | A New Criterion for Comparing Fuzzy Logics for Uncertain Reasoning. | A new criterion is introduced for judging the suitability of various fuzzy logics for practical uncertain reasoning in a probabilistic world and the relationship of this criterion to several established criteria, and its consequences for truth functional belief, are investigated. | Introduction
It is a rather widespread assumption in uncertain reasoning, and one that we
shall make for the purpose of this paper, that a piece of uncertain knowledge
can be adequately captured by attaching a real number (signifying the degree of
uncertainty) on some scale to some unequivocal statement or conditional, and
that an intelligent agent's knowledge base consists of a large, but nevertheless
nite, set K of such expressions. Whether or not this is the correct picture for
animate intelligent agents such as ourselves is, perhaps, questionable, but it is
certainly the case that many expert systems (which one might feel should be
included under the vague title of 'intelligent agent') have, by design a knowledge
base which is precisely of this form.
Supported by an EPSRC Advanced Course Studentship, ref. 94416613
y Supported by EPSRC Research Assistantship, ref. GR/H/43045
Commonly the scale on which the uncertainty is measured runs between zero
and one where the two extremes represent, respectively, 'certainly not' and 'cer-
tainly' and intermediate values represent a qualied degree of condence, or be-
lief, or truth, depending on where they stand in relation to the categorical end-
points. So, for example, if an expert meterologist expressed in natural language
his 'knowledge' that
Rain tomorrow is doubtful
this might very well be represented in this form, with the expert's blessing, as
something like
Bel(Rain
where the gure 0.2, the 'belief', or `truth', value the expert gives to 'Rain to-
morrow', corresponds, in the expert's mind, to 'doubtful'.
A knowledge base K of this form where degrees of uncertainty are represented
by truth, or belief, values lying between the classical values one (i.e. true) and
zero (i.e. false) is, like a library, of little practical use without some method of
manipulating, or processing, the knowledge in order to infer truth values for other
statements as required. Whilst a multitude of methods for doing this in practical
expert systems have been tried, one commonly recurring assumption, or device,
(which dates back as far as MYCIN) is that the connectives 'and', `or', and 'not'
are, or at least may be treated as being, truth functional.
To be precise, let be a language for the propositional calculus,
so the p i are propositional variables, and let SL be the set of sentences formed
from L using the connectives ^; _; : as usual. For 2 SL let Bel() 2 [0; 1]
be the 'truth value' (whatever that means) of . So, formally Bel is a function
from SL into the interval [0; 1] and we are in the situation where our knowledge
base consists of the values of Bel on some 1 ; :::; m , or more generally certain
relations between these values, and we want to use this knowledge to infer the
value of Bel on some other sentence .
The assumption of truth functionality of the function Bel is that there are
xed functions such that for all
Three particularly popular choices here are
_
_
_
often refered to, especially the rst of these, as Fuzzy Logic (or Logics). [We
hasten to add at this point that the term Fuzzy Logic is also used to describe
the logic, or logics, of vagueness. This paper has nothing to do with vagueness,
it is to do with the assumption of truth functionality in uncertain reasoning for
infering degrees of belief. For a discussion of the dierence between these two
qualities see, for example, [Kruse 1994] or [Dubois 1988]]
The use of fuzzy logic in reasoning with uncertainty raises two questions (at
least). One is why it is justied to assume truth functionality in the rst place,
and, related to this, what such truth values could mean in this case. The second
is, having decided in favour of truth functionality in a particular situation, what
choice of F should be made? On the former we shall have something
to say later, but turning rst to the second question { what choice should be
made of F { there are, to our knowledge, two main approaches to this
question in the literature.
The rst is to argue that F should satisfy certain desirable properties,
properties that we might feel the connectives 'and', `or', 'not' exhibit in everyday
usage. Taking the case of negation rst we might feel that F : should satisfy:
That is, (N1) is saying that the negation of a certainly false statement should
be certainly true and the negation of a certainly true statement certainly false.
(N2) says that increasing one's belief in should decrease one's belief in :.
Finally (N3) says that two negations cancel each other out. In this case we have
the following rather satisfying result due to Trillas, [Trillas 1979], which justies
the choice of F : in F
3 , above.
Theorem 1 (N1-3) hold if and only if the rst order structure h[0;
isomorphic to h[0; 1]; 1 x; <i, i.e.
Proceeding similarly in the case of F ^ the following have been proposed as
desirable properties.
increasing (not necessarily strictly);
That is, (C1) is saying that the conjunction of a certainly false statement
with a certainly true statement, in either order, is certainly false, whilst the
conjunction of two certainly true statements is still certainly true. (C2) says
that the truth value of ^ should not decrease if the truth value of one of the
conjuncts increases (whilst the other remains unaltered). (C3) says, in essence,
that microscopic changes in the truth values of and, or, should not produce a
macroscopic change in the truth value of the conjuction ^. Finally (C4) might
be justied by arguing that in everday language we in no way insert 'parentheses'
when saying a multiple conjunction, suggesting that in pratice its truth value is
entirely independent of any way of 'bracketing' it.
In this case we have the following theorem which, appearing as it has in various
forms and fragments in the literature (the earliest known to us is [Ling 1965])
probably now simply deserves to be treated as folklore (see [Paris 1994a] for a
proof).
Theorem 2 Let F ^ satisfy (C1-4). Let 0 a < b
b: Then on [a; 1] [0; a] and on [0; a] [a;
isomorphic to F 2
(on [0; or to F 3
(on [0;
or
In other words this theorem says that (C1-4) force F ^ to look like a chimera
of F 1
and copies of F 2
and F 3
. Of course one might question why we should
stop at (C1-4), why not add in further desirable properties of conjuction? In
fact as Theorem 1 shows, one of the most obvious further properties, that F ^
is commutative, already follows from (C1-4) whilst adding the only remaining
clearly missing desirable property, idempotence (i.e. F ^
be F 1
min. If we were to combine both the desirable properties of negation
and conjunction, then in addition to (N1-3)+(C1-4)+idempotence certain other
natural laws seem to emerge, for example but since there is, by
the theorem, already only one choice for F ^ we no longer have any latitude in this
matter and natural laws such as the one cited may indeed have to be renounced.
[It is interesting to note here that whilst models of (N1-3)+(C1-4) may separately
have a negation isomorphic to 1 x and a conjuction isomorphic to a chimera
of F 1
it is only in the case where there is actually no contribution to this
mixture from F 2
that we can ensure that both isomorphisms coincide. (see
[Paris 1994a] for a proof)].
Exactly as for conjunction we can list some desirable properties of F _ as
(D2) F _ is increasing (not necessarily strictly);
F _ is continuous;
F _ is associative i:e: F _ (x; F _ (y;
and again prove a version of Theorem 1 with the subcript ^ replaced everywhere
by _ (and min by max).
Once the decision has been made to assume truth functionality these considerations
clearly distinguish the fuzzy logics F
3 (and especially F
leading candidates in the context of processing uncertain knowledge.
A second argument, this time for one particular choice for F ^ , has been given
by Krienovich et al in [Kreinovich 1988], [Kreinovich 1990]. The argument runs
as follows. Consider an expert giving belief values, or truth values if you prefer,
to certain statements today and then repeating the exercise tomorrow. Unless
he, or she, was prewarned that the exercise would be repeated it seems rather
unlikely that they would give exactly the same gures again, even if they had in
the meantime received no new information justifying a revision of their beliefs.
However it does seem much more reasonable to suppose that the ordering of
the values given to various statements would remain the same. [In a way we
are saying here that, apart from zero and one the actual gures given don't
mean very much, it is their relative sizes that matter.] Now if the expert was
interested simply in these statements it would not matter whether he or she was
using today's or tomorrow's values. However if the expert was combining, or
these statements truth functionally according to some F
then it would, or could, make a dierence if (which we assume are
xed) did not themselves also preserve this relative ordering.
Thinking of the drift in the expert's stated belief values between today and
tomorrow as an arbitrary rescaling, that is order preserving one to one onto map
g from [0; 1] to [0; 1] this preservation of relative ordering amongst sentences
behoves, in the case of conjunction, that
As Kreinovich et al show this requirement, for arbitrary rescalings, together with
(C1) and (C3) forces F ^ to be equal to F 1
i.e. to min: A similar argument
for disjunction forces F _ to be equal to F 1
_ , i.e. to max: Following this line of
reasoning then leads to distinguishing F 1
_
as particularly appropriate choices
_ in this context. [It should be added that in the case of negation and
assuming that F : satises (N1), (N2), the above argument yields a choice for F :
between the two functions 1 -(x); -(1 x), where -(x) takes value 1 for
and value 0 for 0 x < 1. However, both of these functions fail to satisfy (N3).]
Having described these arguments in favour of certain choices of F
under the assumption of truth functionality we now turn to examining this latter
assumption.
The most immediate criticism of this assumption is that, in requiring
no account is taken of any relationship between and . Thus, to take an extreme
example, if
(and surely this could easily happen) then we should be led to
Bel(p _
whereas the average thinking man or woman might feel that the left hand side
expressions should be 0, 1 respectively and the two right hand side expressions
equal to Bel(p). Their problem here in accepting such conclusions, and the
rules from which they are derived, is that as they stand there appears to be no
semantics for belief which could possibly support them and still make sense within
the context. Indeed the lack, up to this time, of an accepted, or even acceptable,
semantics for truth functional belief, despite its frequent and continuing presence
in expert systems is, to say the least, 'unfortunate'. [We hasten to repeat that
we are talking here of belief not vagueness.]
On the other hand there is an alternative theory which does have a supporting,
and widely accepted semantics, namely probability theory. In our context this
amounts to assuming not that the function Bel
but that Bel is a probability function, that is it satises
This interpretation of belief, or truth, values certainly can be supported in a
wide range of contexts (for example in a medical expert system) with a suitable
semantics, namely by identifying these values with frequencies. In addition there
is the rather forceful Dutch Book argument for a rational agent's belief values
being probabilities which results from identifying belief with willingness to bet.
(See, for example [Paris 1994a].) Moreover, not only are there convincing arguments
for belief being identied with probability, but there is a widespread trust
(at least amongst statisticians) that uncertainties in the real world are themselves
explainable as probabilities. That being the case it might seem reasonable
to propose that, ideally, not only should the intelligent agent's belief values be
probabilities (in the sense that they satisfy (P1-2)), but moreover that, ideally,
they correspond to actual probabilities in the real world.
If we were to accept this thesis (as we henceforth do in this paper), that
ideally an intelligent agent's belief, or truth, values should be probabilities, and
furthermore correspond to real world probabilities (without wishing to enter the
mineeld of what exactly that means at this point), then it would seem that the
problem of infering the truth values of other statements from K would move
squarely into the realm of statistical inference.
However, despite the rather general sympathy for this thesis, there is, of
course, a major problem asssociated with attempting to go down this path,
namely maintaining computational tractability (even more so it would seem for
intelligent agents like ourselves with apparently very limited computational abil-
ities).
The key computational problem associated with working with probability
functions is that if Bel is a probability function dened on SL (where
as usual) then in order to specify Bel we need, in general, to know
the value of Bel on all except one of the 2 k atoms of L, i.e. sentences of L of the
i where the i 2 f0; 1g and p i
i is dened to be p i if and to be
0: This su-ces because, by the disjunctive normal form theorem, for
each 2 SL there is a subset S of the set At L (= of atoms of L
such that
so by (P2)
[Only are needed to specify Bel since for a tautology S
by (P1)
in practical expert systems k would typically
be at least 40 it is clearly unreasonable, in general, to be able to specify Bel, nor
indeed would one expect that the 'knowledge' provided by the experts would by
itself be su-cient to determine Bel given only that Bel is a probability function.
On the other hand it is clear from (F1-3) that for truth functional Bel Bel(),
for 2 SL, is determined simply by the k values Bel(p 1 ); :::; Bel(p k ), which, in
general, will be directly available from the expert providing the knowledge base.
So, it would seem that if we accept the thesis, as we do in this paper, that
ideally an intelligent agent's belief, or truth, values should be probabilities, and
furthermore correspond to real world probabilities, then we have a choice between
moving away from probabilities, and getting the wrong answers, or sticking with
probabilities and not, in general, being able to come up with any answers at
all! [Of course this is an exaggeratedly pessimistic picture. There are, under
suitable assumptions and situatuations, honestly statistical expert systems which
have even be mooted as possible models for human uncertain reasoning (see for
example [Pearl 1988]). Overall, however, their current applicability is limited.]
Given this choice between no answer and the wrong (or, more accurately, an
unjustied) answer one would surely feel that the latter was preferable (after all
if an express train is thundering down the track towards you jumping either way
has got to be better than doing nothing). And, having made that choice, of going
for an answer which, necessarily, will sometimes be less than perfect, the next
step is clear, within the parameters left open to you minimise the error.
A new criterion
There are many ways, of course, of measuring the error resulting from using a
truth functional belief function to approximate a probability function. However
a natural rst attempt might be to take the sum of the squared dierences
where Bel() in this expression is determined, truth functionally, from F
and the Bel(p i and w is this probability function on SL representing
the 'state of nature'. Unfortunately this rst attempt fails to take into account
the practical considerations appropriate to the situation we have in mind (i.e.
of an intelligent agent reasoning in the real world). Worse still, except in very
special circumstances, this sum will not even be dened! This is because we
are summing over all the innitely many 2 SL and there is clearly no reason
why (Bel() w()) 2 should tend to zero as the length of increases, indeed
quite the opposite, we would expect that as the length of increased Bel() and
w() would become ever more unrelated so that any closeness in their values
would be simply by chance rather than by design. But clearly, from the agent's
point of view, long sentences are very largely irrelevant because in the practical
business of reasoning in the real world the agent is only going to encounter very
short sentences involving rather few connectives.
This consideration leads us to take the sum in the error not over all of SL but
instead over the set ~
n of sentences formed from f using
exactly n binary connectives chosen from f^; _g. We are thinking here, of course,
of n being small, indeed in many of our results we shall limit ourselves to
in which case the sentences in ~
are just single conjunctions or disjunctions of
literals. On the other hand we would expect k to be very large, re
ecting the very
large number of (variable) features the agent would expect to encounter in any
real world situation involving uncertainty, and, apart from this, to be essentially
unknown to him. Indeed almost all our results will be given as assymptotic results
as k tends to innity. The reason for choosing this particular class ~
n to work
with is to some extent pragmatic, just as taking the square in the error term
it helps make the mathematics more tractable (as [Paris 1994b] demonstrates).
In practice one would hope that minor variations in the class of sentences whose
probabilities we are trying to approximate truth functionally would have a rather
marginal eect, a hope which is at least reasonably consistent with the results
we shall shortly be presenting.
Returning again to the appropriateness in this context of the error term E
(now with ~
n in place of SL) we could suppose that the intelligent agent we
have in mind would, like ourselves, not just hold beliefs in a few specialised areas
where there was some hope of knowing the underlying probability distribution,
but in a whole multitude of real situations, where, with maybe a small number
of exceptions, the agent would know little or nothing about the underlying
probabilities beyond (possibly) for those basic events which correspond to the
propositional variables in our formalisation. [In fact even most expert systems,
which one might have classed as 'very specialised', in practice actually approximate
to this situation.] These considerations now lead us to make two further
renements to (1).
Firstly we shall assume that Bel(p i ) is simply a xed, increasing, function,
That is we shall assume that the agent's belief in a basic event
(such as we have denoted by a propositional variable) is purely determined by
the probability of that event and that the more probable an event is the higher
the belief the agent attaches to it. [By our earlier remarks on the ineable nature
of k it seems unreasonable that Q n should also depend on this number.]
Secondly, in view of the agent's large scale ignorance of the probability function
w whose values s/he is endeavouring to approximate, it would seem perverse
of the agent to treat all probabilty functions s/he encountered in a uniform manner
as regards the choice of F Q. For that reason rather than take
the error as in (1) for a single probability function w we shall take a weighted
average of the error over all probability functions w on SL, weighted according
to the likelihood, G L (w), that the agent will encounter that probability function.
Precisely what we mean by this last italicised phrase is not a question we wish
to discuss at length in this paper. It is, in another guise, the problem of picking
a prior in Bayesian reasoning, and as such has already generated a voluminous
literature without, apparently, any great concensus emerging. The notion might
seem to make sense if we considered, say, the(?) probability distribution over all
diseases, symptoms, signs etc. in medicine and then considered how the set of all
restrictions (i.e. marginalizations) of this to a sublanguage with 3 propositional
variables, so given by an eight-tuple of the values of the atoms, were scattered
around in
But rather than indulge in any further philosophical discussion we shall henceforth
just talk of 'likelihood of being encountered', or as we shall call it 'nat-
uralness', of a probability function and leave the reader to interpret it as s/he
wishes.
With these renements in place our new criterion can now be formalised in
terms of minimising
Z
where the intention is that n is small, k is very large, Bel(p i
xed increasing function Q n and G L (w) is some measure of the 'naturalness' of w,
or of the 'likelihood of w being encountered', in the various real world situations
that the agent might inhabit.
We make explicit two assumptions about G L which, we believe, are quite reasonable
properties to require of a measure of naturalness of probability functions
w on SL. Firstly, we assume that G L satises weak renaming, that is, whenever
is a permutation of At L resulting from transposing p
, or from transposing
probability functions w on SL, where w is the probability function satisfying
Note that this simply amounts to saying it is
irrelevant which propositional variable we use to denote a particular proposition,
and whether or not it is used to denote that proposition or its negation. The
property of weak renaming holds for all specic choices of G L that we consider
in this paper. Secondly, we shall assume that for for every 1 i < j k the
integral Z
G L (w)dw
is a non-zero, integrable function of ha; bi 2 [0; 1] 2 .
Beyond this we shall not struggle to say exactly what well-behavedness conditions
G L is to have, nor exactly how the integral is to be understood. Instead
we shall take it that all our results carry with them the implicit assumption that
all integrals appearing in the proofs are suitably well dened. In the particular
examples that we cite it will be clear that this is the case.
Returning now to the criterion of minimising the error E k
n in (2), once we have
xed n and G L we have various choices as to which of Q choose
to x and which we will allow to vary in attempting to minimise E k
n . In the next
two sections we consider two applications of this criterion. [See also [Paris 1994c],
[Bennett 1995] for earlier and related results along these lines.]
Belief values in fuzzy logic
In the introduction to this paper we provided arguments which, assuming belief
was truth functional, rather favoured the choice of F 1
(= min) for F ^ . Indeed, in
today's practical expert systems this choice is surely the most popular and is often
refered to as 'fuzzy logic' (although this is also used as a generic term for any truth
functional belief or logic of vagueness). Given its widespread use and popularity
it is then natural to ask what function Q
n , for a particular choice
of G L when we to be F 1
(i.e. min; max; 1 x) respectively.
One choice of G L for which Q n can be calculated explicitly is when G L is the
completely independent distribution. That is, if w treats the p i 2 L as completely
1 Note that this denition is similar but does not correspond exactly to the denition of
Weak Renaming for inference processes dened in [Paris 1994a] (where only the latter type of
transpose is allowed).
independent
i:e: w
then G L
otherwise. As a measure of naturalness this distribution could be 'justied' on the
grounds that in the wider world most events, or propositions, are independent. Of
course this is a gross simplication. In particular in the narrow areas of expertise
such as those covered by most expert systems we would certainly not expect,
or want, all the features to be independent. (Having said that however, even in
such situations it may not be so unreasonable to suppose that most small subsets
of L will, in practice, be completely independent.)
In this case we can show that (in the limit as k tends to innity) the Q n
exist and are increasing polynomials of degree 2n
x. [Proofs of the
results stated in this and the following two sections are given in the appendix.]
In particular we can derive a recursive formula for the Q n which for
yields
A surprising property of the Q 0 Q 15 that we have calculated explicitly is
how little they vary, and how rapidly they appear to be converging. For example
the maximum dierence between Q 0 and Q 1 is 0.093 whilst Q 7 and never
dier by more than 0.005. In consequence the actual reduction in the error
resulting from using these Q n is not staggering, an explicit calculation showing
that the improvement in square error per sentence from ~
n as k tends to innity
in using Q 1 rather than Q 0 (i.e. the identity function) is around 4% whilst the
average square error per sentence resulting from using Bel (with F 1
to approximate w is around 3%.
It is interesting to note that in a sense this gives a possible meaning, or se-
mantics, to belief values in F 1 (and for truth functional belief in general), namely
they are scaled probabilities, scaled so as to minimise the error.
Notice also what has happened here to our earlier objection to truth functional
belief that, for example, forces us to have
If we explain belief values in this way then such identities are no longer a problem,
all we need to say is that the approximations are rather poor in these cases.
Indeed since we are arguing for an agent's beliefs being truth functional on purely
practical, or pragmatic, grounds one might suppose that in simple cases like these
an intelligent agent would adopt an alternative, better, approximation strategy,
for example by simply setting
In fact as k tends to innity sentences containing a repeated propositional
variable account for an ever diminishing proportion of the sentences in ~
so
that in the limit they are essentially neglected. It might be argued that this
would not accurately re
ect the actual experience of the agent and that on the
contrary the agent would be disproportionately likely to meet such sentences.
As with the simple case mentioned above however, there would be nothing to
stop an intelligent agent in practice from adopting an alternative strategy in
such cases if s/he saw some value in doing so. For small n this need, as in the
example above, causes no problem because an intelligent agent might reasonably
be expected to recognise the necessary immediate simplication. For larger
however the problem with an agent attempting any sort of simplifying procedure
to a sentence prior to approximating its probability is that, except where this was
immediately recognisable, s/he would (apparently) risk a computationally very
expensive diversion with no guarantee of being any better of at the end of it (see
[Hopcroft 1979]).
In the above example we have taken the rather drastic step of identifying 'nat-
uralness' with `independence'. Whilst this may in some situations be a not unreasonable
assumption, it is patently rather wide of the mark in many real world situations
we could expect our intelligent agent to encounter, and these are completely
disregarded by our function G L in this case. So are there not alternatives which
might be prefered to the completely independent distribution? Unfortunately
the problem of picking a prior in situations such as these of, essentially, complete
ignorance, is one on which we continue to seek guidance from the statistics litera-
ture. [ See [Good 1965], [Jerey 1948], [Paris 1994b], [Paris 1991] for approaches
to the question in the univariate case and [Lawry 1994a], [Lawry 1994b] in the
multivariate case.]
The reader might wonder at this point why we do not simply assume that
all probability functions on SL are equally natural, equivalently, equally likely
to be encountered by our agent. In other words why not simply take G L to be
the Uniform Distribution (i.e. G L functions w on SL)?
Unfortunately such a distribution G L depends on L, or equivalently k, in a way
which is perhaps unexpected, and certainly undesirable, in our context. To see
the problem let us denote the language fp by Lm (so
A k+1
n . Then for xed (which, notice, do not depend on
the expected individual square errors
Z
or even the expected probabilities of ,
Z
w()G Lm (w)dw;
where G Lm (w) is identically 1, may dier according to whether
1. However from the point of view of our intelligent agent this seems counter
intuitive because, as we have already said, the agent would not know k in general,
nor, surely, would s/he consider its exact value at all relevant, beyond that it is
very large. (Indeed it is questionable whether it even makes sense from the agent's
standpoint to talk of 'the k'.) The underlying problem here is that if we take for
each nite language
G L to be the uniform distribution on the
probability functions on SL then the family does not satisfy marginality, that is
it does not satisfy that for L 0 L and w 0 a probability function on SL 0 ,
(w
Z
G L (w)dw:
If we wish to keep G L k as the uniform distribution and have marginality then
we must be prepared to use non-uniform distributions G L for other languages L.
One way that this can be achieved is to take the G L to be, up to normalizing
constants, the Dirichlet Priors, that is,
G
Y
for some xed > 0, where and the i run through the atoms of SL.
Taking (and indeed any G L with equal to the uniform
distribution but forces the G L to be non-uniform distributions whenever jLj 6= k.
Notice that these Dirichlet Priors do satisfy weak renaming. Unfortunately, when
does not fully satisfy the conditions we earlier imposed on G L .
As we shall see later (Theorem this family of priors has another unpleasant
failing that would seem to make a second serious dent in their credibility as
contenders for measures of naturalness (the rst dent, of course, being that we
were led to them in the rst place by the intuition that all probability functions
should be equally natural, whilst for all except possibly one value of k they fail
to achieve this).
We now see that in our context the problem of picking a prior actually involves
picking a marginalising family of priors, or distributions. Fortunately the
completely independent distributions do marginalise, which is the reason this
problem of marginalisation did not appear earlier.
Optimal choices for
As a second application of our criterion we consider optimum choices of
(which we shall denote by F opt
_ ) to
n in the limit as k !1
single conjunctions or disjunctions of literals) for a xed marginalizing
family of G L . (We may assume that Q n is the identity, i.e. Bel(p i
in this case since the Q n can be simply absorbed into the
Throughout we shall assume that the G L satisfy marginality and weak renaming
Having settled on some G L a rather vexing problem arises with specifying any
particular F opt
_ in that changing their values on a small number (or set)
of points will not alter the value of the error E k
1 . To be more precise if F : agrees
with F opt
on a 1 -measure 1 set and F agree with F opt
on a 2 -measure 1 set, where
Z
Z
then replacing F opt
_ by F in the error expression
will have no eect on its value. Having noted this problem we will however
henceforth talk about the F opt
_ , it being acknowledged here that we
mean almost everywhere (a.e.), that is to within a suitable -measure 0 set.
With the above assumptions in place
Theorem 3 Let 1. Then in the limit as k !1
F opt
F opt
R
R
Dx;y G L2 (w)dw
F opt
_
R
R
Dx;y G L 2 (w)dw
where yg. (Notice that by an earlier assumption
these denominators are non-zero.)
For proofs, see the Appendix (where (31) gives the limiting value of the resulting
mean square error). The result that F opt
completely in
agreement with the conclusion of Theorem 1 and seems to close the book on this
question. As we shall see later the situation with F ^ and F _ is not quite so clear.
Applying Theorem 3 in the case where G L is the completely independent
distribution we obtain, just as would have been expected, that
F opt
_
In other words F 2 is the optimal choice in this case.
If instead we take our G L to be the Dirichlet Priors with
the uniform distribution on the probability functions on disregarding
the ill-behaviour of the family members on SL k for k > 2 we obtain that
F opt
F opt
_
_In other words the F opt
_ in this case are the averages of their counterparts
in F
1 and F
3 .
If we now take instead the Dirichlet family with i.e. the uniform
distribution on probability functions on SL 1 (extending F opt
by continuity to
the boundary of [0;
comes out to be the value of an elliptic
integral. Much worse however is that F opt
arguments in (0; 1) 2 , not
even increasing!
Theorem 4 For the Dirichlet distribution with < 4, F opt
fails to be monotone
non-decreasing.
Turning this observation on its head however, we certainly might be justied in
adding the requirement that F opt
^ be increasing (and more generally the property
of inferential monotonicity given in [Paris 1994c]) to the list of desiderata of a
family G L of measures of naturalness.
Returning for a moment to our earlier disappointment that we cannot have
the uniform distribution for more than one value of k unless we are willing to
marginality, it might at least be some comfort to observe that if we take a
Dirichlet family in which the uniform distribution appears for some very large k
(so is also very large) then the exact value of this k makes very little dierence
to the G Lm for m small. In a sense then it could be argued that an agent who
adopted some such G Lm for m small could 'accommodate' the thought that for
a wide range of large k the corresponding G L k was the uniform distribution. In
such a case we might further argue that (assuming it exists) the agent should
take for his F ^ the limit of the F opt
for the Dirichlet families as k !1. In fact
by results in [Paris 1992] this limit of these functions does exist and on argument
hx; yi gives the value of the middle root of the cubic
d
dz
We now turn to stating some properties of the F opt
Theorem 5 For 0 x; y 1 and under the assumptions of Theorem 3
F opt
_
F opt
(v)
Notice that by using (iv) of this theorem we can obtain analogous results for
the function F opt
_ . As an immediate corollary of this result we have.
Corollary 6 For 0 x 1 and under the assumptions of Theorem 3
F opt
_ (0;
F opt
F opt
do not satisfy (ii) of Theorem 5 we also obtain
Corollary 7 Under the assumptions of Theorem 3, F 1
are never optimal
(for any such G L , with
On the other hand Theorem 5 elevates F 2
2 ) to a special status (see
Appendix for the proof).
Corollary 8 F 2
(i.e. multiplication) is the only F opt
which is associative and
continuous.
Our next result shows that in a sense the converse to Theorem 5 holds.
Theorem 9 If F ^ satises (i),(ii) of Theorem 5 then there is a marginalising
family of priors G L satisfying weak renaming for which F ^ is F opt
It should be noted here however that the G L constructed in the proof of this theorem
are rather contrived and certainly make no pretentions to being 'measures
of naturalness' !
In view of Theorem 9 it is interesting to compare the desirable properties
(C1-4) of F ^ on which Theorem 2 rests and those properties of F opt
emerging
in Theorem 5. By Corollary 6 F opt
although not necessarily (C2)
or (C4) (although the failure of (C2) should, as we have already said, be viewed
more as a question mark against the G L ).
In the other direction we have already seen that (ii) of Theorem 5 does not
follow from (C1-4) because it is not satised by either F 1
. On the other
hand by Theorem 2 commutativity does follow from (C1-4) since it holds for each
of F 1
Conclusion
In this paper we have argued that in a probabilistic world an intelligent agent,
with scant access to these probabilities and largely lacking the computational
power required to draw statistical, or probabilistic, conclusions, may be justied
in resorting to truth functional belief in order to function at all, and that in
such a case the agent should adopt those which satisfy the criterion of
minimising the resulting expected error.
In order to apply this criterion it is necessary to rst x on a 'measure of the
naturalness' of a probability distribution, that being identied with the likelihood
that the agent would encounter this probability distribution.
In this paper we have, without overwhelming enthusiasm, suggested two possible
choices for this measure, the completely independent distribution and the
Dirichlet families of priors. Other possibilities exist in the literature (see for example
[Solomono 1978], [Li 1993], [Fine 1973], [Paris 1994b]), but at this level
of generality the choice of a prior in a situation of, essentially, complete ignorance
remains problematic. It is interesting to observe that in practical applications
of statistical inference su-cient is usually known (or assumed ) about the situation
to severely restrict the possible probability distributions which might be
encountered and as a result the choice of prior is usually much less contentious.
[It should also be pointed out that the customary conditioning on the statistical
data tends to reduce the in
uence of the prior so that the particular prior chosen
is far less of an issue than in our case where we are not considering the possibility
that the agent might somehow update his/her prior, or measure of naturalness,
in the light of observations about probabilities in his/her world of experience.]
our criterion favours the choice of 1 x for F : , a result very much
in line with common practice and Trillas' earlier justication based on desirable
properties, see [Trillas 1979]. When it comes to F ^ and F _ however our criterion
as the only associative,
continuous optimal F whilst F
favoured in terms of
desirable properties is never optimal under these conditions. In view of the fact
that the case surely the most frequently encountered situation (apart
from which is irrelevant here) this seems, all other factors being equal, a
strong recommendation to use F
rather than the ubiquitous F
has to be resorted to. It would be pleasing, of course, to extend these results
to n > 1, especially if Theorems 3 and 5 still held, at least for a wide class
of measures G L . Unfortunately that appears, in general, to be a rather messy
problem.
A second generalisation of these results which we have not considered is the
inclusion of implication amongst our connectives. Clearly there is little further
interest in doing this if we are to view implication, ! , materially, as the
equivalent of : _ . However, viewing implications as conditionals (and so
as the conditional probability of given ) would appear to open up
an interesting new area for further investigation.
We close by mentioning that there is a rather natural generalisation (as it
turns out) of our criterion which, instead of attempting to minimise the expected
error incurred by using truth functional belief in place of the actual probabil-
ity, attempts instead to minimise the average error resulting from using truth
functional belief to determine truth values, on the basis of some knowledge base,
rather than by using a particular probabilistic inference process, such as the Maximum
Entropy Inference Process. Some preliminary results in this direction may
be found in [Bennett 1995].
Appendix
Calculation of the Q n for F 1 and the independent distribu-
tion
We seek an (increasing) function Q n (x) which is the limit as k ! 1 of the
increasing
n minimising the expected error
Z
-2f0;1g
completely independent probability function and
otherwise, and, in the second integral, w is the completely independent
probability function which gives p i value x i , the assertion X is true
and 0 otherwise, and ' p -
i is true if
(equivalently value Q k
n is increasing) for k. Note that
appearing in because we work with F 1 . In fact it
may hold for more than one
i with some and ~x, and thus we may be counting
some terms more than once. However, the eect of this can be ignored since the
set of the w for which this can happen has measure 0. Since ~
n is invariant under
permuting the it is clearly su-cient here to minimise
For
let neg() be the result of transposing ^=_, p i =:p i for
Then neg () :, ~
n is invariant under neg and if ' p -
1 .
It follows then that since
we obtain the same error if we use the (increasing) function 1 Q k
place
of
2 a
with equality just if y, we see that the error for2
at most that for Q k
(x). Since we are interested in the minimum error we may
assume
n (x) is already of this form, in which case it is easy to check that
and, using (5), that the expression in (4) is twice
where we can replace w(p 1 ) by x 1 .
However since we are interested in the case where k ! 1, rather than minimising
we shall instead rst attempt to minimise
n is the set of those 2 ~
n with no repeated variables, and return later
to the problem of minimising (6).
The function (not necessarily increasing) to minimise (7) (up to a set of measure
zero) is given by
To see this notice that if Q 0
other function disagreeing with Q
on a set of non-zero measure then substituting Q 0
subtracting (7) from it yields after some calculation
which is strictly positive. Of course we would now like to show that Q n
dened in (8) is increasing. Rather than do that at this point however we shall
set about giving a specic recurrence relation dening the Q
in fact. Once this is done it will be clear that Q n increasing.
In order to simplify what follows let C n be those in B k
n in which the propositional
variables are p and, with the possible exception of p 1 , this is
the order in which they appear when reading from left to right. Clearly
appears in
Let
So, by marginality of the completely independent prior, Q
Then, with the obvious abbreviations, for n > 0,
m=n j+2
is the set of those in B
k in which the variables p n j+2 , p n
appear, and in that order. Taking the sum of the rst of these expressions within
the brackets we obtain, for a xed 1 j n,X
m=n j+2
Using the fact that for such we see that this is equal
xn j+3;:::;x n+1 =0
is the set of sentences in C j 1 in which p n j+2
with the possible exception of p n j+2 , in that order when reading from left to
right, and this expression is now seen to equal
Considering now the sum of the second of the expressions within the brackets in
and noting that
equals
where is the result of transposing p m and :pm throughout , we obtain similarly
to (11)
By similar arguments the third and fourth terms in (10) each yield
Summing these contributions yields
whilst directly from the denition, P 0
Repeating a similar argument with H n (x) gives
From this it follows that H n (x) is actually independent of x, so
and the solution to this is
[see [Paris 1994b], lemma 2.2].
By induction on n we can now show that P n
is a polynomial of degree at most 2n + 1. Consequently
and dividing (14) by H n (x) and simplifying gives
d n;j
where
Again by induction on n we can show that Q n (x) is increasing. It now follows
from earlier remarks that Q n (x) is the increasing function minimizing (7).
Turning back now to the original expression (6) suppose that Q k
n is increasing
and gives a value to (6) which cannot be improved by any other increasing
function to within more than 1. Recall that we may assume that Q k
Then, as in (9), for Q n as in (8) the expected error for
Z
when calculated using Q k
n exceeds that when using
Now by a straightforward induction on n for any x
distinct [i.e. a measure one set of w] the value of
is the same [since if
exactly one of p(^)
etc. Furthermore since for
we see that X
Hence the excess error in (18) is
By the assumed 'near minimality' of Q k
n the error (3) associated with using Q k
cannot exceed that by using Q n by more than 1, so certainly, using (20),
Z
where Bel is calculated using Q n . Since
(Bel
this yields
so
1: (21)
n is increasing and Q n continuous if 0 < Q k
n (a) Q n (a) for some
a
depending only on Q n (and similarly if Q n (a) Q k
n (a)). It therefore follows
from (21) that on (0,1) the Q k
tend pointwise to Q n (x) as required.
Concerning the improvement in the average error (per sentence in B k
resulting
from using the Q n (x) rather than simply the identity function, by
where D n is the set of
n in which, reading from left to right, the propositional
variables appear in that order. Since for 2 D n and measure one
set of ~x exactly one of '
so (21) simplies to Z 1
which can now be readily calculated for small n. As earlier this is also the limiting
error with ~
n in place of B k
n as k !1.
As to the average error in using Q n , substituting (8) into (7) (which is clearly
times the average error for
simplifying yields
Dividing by jB k
using the value for H n previously shows
the average error over
n to be
d~x. Then by splitting up the cases where 2 D n is a
conjunction/disjunction we obtain that for n > 0 and d n;j as in (17),
d n;j
whilst
Since we know Q enables us to calculate the average error over
(and hence over ~
n in the limit as k !1), at least for small n.Proof of theorem 3
which give a value to
Z
which becomes arbitrarily close to the inmum (over all of values of
this expression as k !1. [Here F ()
and the identity if As
usual we shall start o by looking for to minimise the expression in
but with i 6= j. In this case, by the renaming and marginalising properties
of G, it su-ces to nd
Z
Now for w a probability function on L 2 and 1 ; 2 2 f0; 1g let be the permutation
of At L2 such that for -
renaming G L 2 whilst
It follows then that
Z
Z
(w(p 1)); F
(w(p
Z
F
since
Z
(w(p 1)); F
(w(p
Now let
F (x;
F
so
F
(w(p 1)); F
(w(p 2))):
and, trivially,
Hence replacing F in the expression in (24) for
using the inequalityX
we see that E(F It follows then that in our search for
to minimise (23) we cannot do better than take
shall shortly show that, in fact, no other F : can do this well, but for the present
we shall only assume that F : our attention to F ^ .
then by (24) and this choice of F : we seek F ^ to minimise
Z
A minimising function here (which we shall already denote by F opt
F opt
R
R
Dx;y G L 2 (w)dw
where To see this suppose F ^ was any other
possible choice (with F :
Z
Z
Dx;y
Z
Dx;y
Z
Dx;y
G L2 (w)dwdxdy
Z
Dx;y
so if E(1
must be zero and F
must
agree on a 2 -measure 1 set, as required. An exactly similar argument applies
for F opt
_ .
Returning now to F opt
us suppose that
(so by earlier results equality must hold here). Now since equality holds in (25)
just if x that we must have the F ^
all equal (on a 2 measure 1 set of < w(p 1 the average of
would give E(1
a.e. and, since E(1
E(1
(notice by weak renaming that
theorem 4(ii) (whose proof does not depend on this theorem)
F opt
and adding (29) and (30) gives F :
We have now shown that F opt
_ as dened in the theorem
when the are further restricted to be distinct. To remove
this last assumption suppose that better, choice for
arbitrarily large k. Then, by (28) and the discussion leading up to it,
Z
Dx;y
Hence
Z
Dx;y
O
so since the right hand side can be made arbitrarily small (and by the assumptions
on G L (w)dw) we must have that F
Notice that from this discussion the expected square error incurred by approximating
w() for 2 ~
A kby Bel() with
tends to Z
as k !1, where F opt
^ is given by (27).
Proof of theorem 4
Let 0 a < b < 1and < 4. We shall show that for the Dirichlet distribution
with this value of , F opt
aby Corollary 6).
1. Then from the denition of F opt
^ in this case,
F opt
Z a
y
a
Z aay
a
1 a
dy > 0
(by the change of variable y := y a)
Z a0
y
a
1 a
y
a
a
a
1 a
dy > 0
(by splitting
Z aainto
Z a0
aand making the change of variable y := y in the
latter)
Z a0
y
ay
where
a
1 a
1 a
Now since A 1 (y) A 2 (y). Hence, since < 0,
and the result follows. 2
Proof of theorem 5
(i) follows easily using the weak renaming property of G L .
To show (ii) notice that
F opt
R
R
Dx;y G L (w)dw ;
where, as usual, D
R
R
Dx;y G L (w)dw
R
R
Dx;y G L (w)dw
Let be the permutation of At L 2 such that for
. Then, since G L satises renaming
Z
Dx;y
Z
Z
Similarly Z
Dx;y
G
Z
G L (w)dw (34)
and (ii) follows from (32), (33), (34).
(iii) follows from
Z
Dx;y
Z
Dx;y
Z
Dx;y
G L (w)dw:
To show the rst part of (iv) (the second part is proved similarly) notice that
Z
Dx;y
Z
Dx;y
Z
Dx;y
Z
Dx;y
G L (w)dw
Z
by using the trick by which we derived (33). Again, as in (34),
Z
Dx;y
G
Z
G L (w)dw
and dividing both sides of (35) by this gives the required identity.
(v) follows easily from the denition of F opt
_ by noting that w(p 1
(or by straightforward manipulation using
Proof of corollary 8
Suppose that F opt
associative and continuous. We rst show by induction
on m that
F opt
For this is true by Corollary 6. Assume it is true for m. Then if
by Corollary 6 and the associativity of F opt
F opt
F opt
by the inductive hypothesis, whilst
F opt
; by the case i < 2 m above;
; as required:
Hence, since F opt
is continuous and agrees with multiplication on a dense set it
must agree with multiplication everywhere. 2
Proof of Theorem 9
First dene for
i;j;k to be the probability
function on SL k such that for 2 At L k ,
Notice that properties (i)(ii) of Theorem 5 ensure that
hence that w x;y
i;j;k is well dened, and that w x;y
Dene the probability functions w x
i;k , for 1 i k, 0 x 1, and w k such
that for 2 At L k
on the probability functions
on SL k by
Now dene the prior G L k by
It is straightforward, albeit rather tedious, to check that the G L k marginalise,
renaming and give F opt
--R
Master's Thesis
An Introduction to Possibilistic and Fuzzy Logics
Theories of Probability
The Estimation of Probabilities
Introduction to automata theory
On the foundations of fuzzy formalism: Explaining formulas for union
Foundation of Fuzzy Systems
Doctoral Thesis
Representation of Associative Functions
The uncertain reasoner's companion - a mathematical perspective
Probabilistic reasoning in intelligent systems: Networks of plaussible inference
Sobre functiones de negacion en la teoria de con- junctos difusos
--TR
--CTR
Didier Dubois , Henri Prade, Possibility Theory, Probability Theory and Multiple-Valued Logics: A Clarification, Annals of Mathematics and Artificial Intelligence, v.32 n.1-4, p.35-66, August 2001 | uncertain reasoning;truth functional belief;fuzzy logic;probability logic |
595997 | Beyond the Turing Test. | The main factor of intelligence is defined as the ability to comprehend, formalising this ability with the help of new constructs based on descriptional complexity. The result is a comprehension test, or C-test, which is exclusively defined in computational terms. Due to its absolute and non-anthropomorphic character, it is equally applicable to both humans and non-humans. Moreover, it correlates with classical psychometric tests, thus establishing the first firm connection between information theoretical notions and traditional IQ tests. The Turing Test is compared with the C-test and the combination of the two is questioned. In consequence, the idea of using the Turing Test as a practical test of intelligence should be surpassed, and substituted by computational and factorial tests of different cognitive abilities, a much more useful approach for artificial intelligence progress and for many other intriguing questions that present themselves beyond the Turing Test. | Introduction
iThe original question, 'Can machines think?' I believe to be too meaningless
to deserve discussionj (Turing 1950). Turing's intention was to leave behind
that question and motivate the endeavour for making machines intelligent.
Fifty years of philosophical discussions have shown that his goal has not
been fullled, mainly because the Turing Test (TT) has been usually misunderstood
as a test for intelligence and not simply as an imaginary test of
humanity (Fostel 1993), a philosophical exercise contrived to stop the sterile
debate that the advent of the rst computers were generating.
Turing cannot be reproached for these misunderstandings. The TT iwas
never intended as a test for intelligence, at least not by Turing himself, and
it should not be criticized for failing something that it was not supposed to
doj (Larsson 1993). In fact, there is no better way to state that intelligence
can be reasonably judged by observation than Turing's imitation game, and
that there is no reason to deny the intelligence of non-human beings.
Nonetheless, the overuse of the TT as a referent or even a test of AI
progress has had very negative consequences. AI has striven to imitate
human's behaviour in many tasks, under the slogan iArticial intelligence
is that thing that if made by humans would require intelligencej, which has
promoted the view that ihuman intelligence subsumes machine intelligencej
(Bradford and Wollowski 1995). Finally, the most negative result of the
c
Publishers. Printed in the Netherlands.
Jose Hernandez-Orallo
misinterpretation of the TT jointly with his celebrity is that there has not
been the necessary eoeort for designing new alternative intelligence tests. The
TT has even eclipsed such well-reputed proposals as Simon's early works
on the relation between IQ tests and AI (Simon and Kotovsky 1963), on
some heuristic approaches to solve analogy problems from IQ tests (Evans
1963), Chaitin's suggestion idevelop formal denitions of intelligence and
measures of its various componentsj (Chaitin 1982). Even Johnson's call
iNeeded: A New Test of Intelligencej (Johnson 1992) has been responded
by formalisations of the TT (Bradford and Wollowski 1995), once again.
From a practical point of view, it is vain to revive the little informative
question iCan Machines Think?j (Epstein 1992) which has generated many
words but few clues about how to progress in AI or how to understand
intelligence. As any other discipline, AI requires an eoeective measure of its
major issue, a gradual and detailed measure of intelligence. Concretely, a
scientic measure of intelligence should comply with some requirements:
intelligence is not an absolute attribute. From Darwin's imental
continuityj to infant psychology, there is an unquestionable certainty that
intelligence is a gradual aptitude. Any gradation of the TT as a function of the
time of the test or the score of the judges shows the inappropriateness of the
TT to measure intelligence in a gradual way, i.e., to give a continuous value of
intelligence. The reason is obvious: the TT is a test of humanity (Fostel 1993),
and the idea of being more or less human makes no sense.
intelligence is multi-dimensional. It is quite unbelievable that there is
a concrete ability that would be optimal for every context or world. Nonethe-
less, it is conceivable that a concrete ability would be almost optimal for
most contexts, and intelligence has sometimes been dened as isecond-best
in everythingj. This may justify that a wide context as everyday life, which
includes many other contexts, can distinguish a special kind of ability, the g
factor, the primitive concept found in everyday life.
Maybe the major problem of AI is that its reference
of intelligent behaviour is human intelligence. Recently, AI researchers have
paid attention to other 'intelligences': ants, rats, etc. in order to scale up
the problem. However, the reference or the goal is always human intelligence.
Nowadays the reason is not only pride and anthropocentrism but necessity,
because ithere is not yet a solid denition of intelligence that doesn't depend
on relating it to human intelligencej (McCarthy 1998).
ffl Computationally based : According to the Church-Turing thesis, there is no
reason to think that intelligent systems cannot be implemented in current
computers. The only question is whether they have the necessary speed and
memory for it. I share the opinion that icomputers of years ago were
fast enough if only we knew how to program themj (McCarthy 1998), and
the AI problem is just to discover what makes a program intelligent, or, in
other words, iWhat kind of Information Processing is Intelligence?j (Chan-
drasekaran 1990). Consequently, it is extremely signicant to be able to state
the problem computationally, namely, to give the specication of the problem
Beyond the Turing Test
in computational terms, in order to solve the problem with AI means, which
are exclusively machines and programs.
intelligence is not an ethereal ability. It cannot be dened as
iintelligence is what is measured by intelligence testsj. Intelligence must be
expressed from its original meaning, the ability to comprehend, and this ability
is what should be measured.
Psychometrics has developed measurements of intelligence according to the
rst two requirements. Since Spearman founded the eld (Spearman 1904),
psychometrics has been more and more characterised by the scientic method:
systematic experimentation and statistical rigour. iDespite the many short-comings
of an IQ score, no other measure has been found to be related to
so many other behaviors of theoretical or practical signicancej (Zigler and
Seitz 1982). However, psychometrics has neglected, or failed, to incorporate
the last three requirements, which, in fact, are highly related. Psychometrics
is anthropomorphic by denition since it is the science of measuring
human intelligence. Although there have been adaptations and essays with
chimpanzees, dolphins and other animals, the reference is always the Homo
Sapiens Sapiens. The frequently demanded theoretical foundation of psychometrics
depends on the change of the point of reference, closely connected
to the last three requirements.
On the contrary, Computational Learning Theory is non-anthropomor-
phic and computational. The question iWhat is to learn?j has been assimilated
to the formal notion of identication in the limit (Gold 1967). After
some discouraging results on the learnability of very simple languages, the
complexity of learning has been studied for other paradigms, mainly PAC
learning (Valiant 1984) and Query Learning (Angluin 1988).
However, these theoretical results have not been used to develop rigorous
measurements of learning ability. Contrarily, some contests and comparisons
have been held for practical systems, but as collections of arbitrary examples
extracted from the literature, without many justications of the theoretical
complexity of each of them. The reason is that it is diOEcult to establish the
complexity of an instance, when the results of computational learning theory
apply to classes of concepts, and most results are asymptotical. Actually, the
paradigm of identication in the limit is not applicable for nite instances,
because they can be identied by themselves.
Moreover, the philosophical problem of any measurement of learning ability
is the same as the philosophical problem of prediction: given any nite set
of examples, there are innite many concepts which are consistent with them
and diverge in their predictions. This is exactly the 'subjectivity objection'
of IQ tests: there may be controversy about the correct answer.
In the following we adopt an information-theoretic approach to solve
these problems in order to give a denition and a measure of intelligence
according to the ve prerequisites mentioned above, exclusively based on
4 Jose Hernandez-Orallo
concepts derived from the notion of Turing machine. Despite the title of this
paper, the result is a veritable tribute to Alan Turing on the 50th anniversary
of his celebrated paper.
The paper is organised as follows. The following section introduces the
necessary denitions and tools for the rest of the paper, as well as some
technical diOEculties which are solved in the subsequent sections. In par-
ticular, section 3 formalises the initially vague notion of comprehension in
information-theoretical terms and relates it with the ontology that only intelligent
systems are able to construct. Once settled on a computational setting
for comprehension, Section 4 deals with its measurement by solving the 'sub-
jectivity objection' under the notion of unquestionability, and by ordering
the diOEculty of instances. This allows the construction of a comprehension
test (C-test). Section 5 presents the results of applying it to humans and
compares it with psychometrical tests. The applicability to AI is discussed.
Section 6 studies the measurement of other factors (knowledge applicability,
contextualisation, knowledge construction) under the same conditions that
the C-test has been devised with.
After the previous results and auspices, the TT is re-examined in section
7 and reduced to its original philosophical and even metaphorical character.
Compared with the C-Test, the signicance of the TT is recognised, as well
as the acute deciencies of its misinterpretation and incarnations, like the
Loebner Prize. The nal section concludes with the proposal of a radical
change of paradigm; a science of intelligence that would make it feasible to
answer many new and fascinating questions.
2. Preliminaries and Technical Problems
We choose any nite alphabet \Sigma composed of symbols (if not specied,
f0; 1g). A string or object is any element from \Sigma , being \Delta the composition
operator, usually omitted or represented by ha; b. The empty string
or empty object is denoted by ". The term l(x) denotes the length or size of
x in bits and log n will always denote the binary logarithm of n. For every
string y, we denote with y n::m , being n m, the symbols from position n to
position m. For every natural number n,
we denote y 0::m , y n::l(y) , and y k::k+1 , respectively. A string x is a substring
of y ioe there exist two strings z, w such that what is equivalent,
string x is a prex of y ioe
exists a string z such that what is equivalent, being
Given any string x, we denote by x 0::l(x)\Gammad the prex of x
with length d, i.e. the string x without its last d elements.
Under the Church-Turing thesis, any description of any object of reality
can be converted into a description in a universal computational machine
(e.g. a universal Turing machine), so our idea of 'object' is, in this sense,
Beyond the Turing Test
universal. Given a universal descriptional machine OE, and a program p, we
denote by OE(p) the result of executing p on OE. Two descriptions p and p 0 are
extensionally equivalent (denoted It is easy to see
that any description has innite equivalent descriptions.
Denition 1. A k-projectible description for a string x is a program p
on a descriptional mechanism OE such that 9y 2 \Sigma y, and 9w
known as the prediction of p.
The compression ratio of a program p is given by: CR OE
The compression ratio of an innite projectible description is always innite.
The relative compression ratio of a projectible description p for a nite string
x is dened as CR OE
The complexity of an object can be measured in many ways, one of them
being its degree of randomness (Kolmogorov 1965), which turns out to be
equal to the shortest description of it. Descriptional Complexity, Algorithmic
Complexity or Kolmogorov Complexity was independently introduced
by Solomonooe, Kolmogorov and Chaitin to formalise this idea, and it has
been gradually recognised as a key issue in statistics, computer science, AI,
epistemology and cognitive science (see e.g. Li and Vit#nyi 1997).
Denition 2. The Kolmogorov Complexity of an object x given y on a
descriptional mechanism (or bias) fi is dened as:
where p denotes any iprex-freej fi-program, and OE fi (hp; yi) denotes the
result of executing p using input y.
The complexity of an object x is denoted by K fi It can be
seen elsewhere (e.g. Li and Vit#nyi 1997) that Kolmogorov Complexity is an
absolute and objective criterion of complexity, and it is independent (up to
a constant term) of the descriptional mechanism fi. In other words, there is
an invariance theorem that states that any universal machine can emulate
another. For this reason many properties are proven just in an asymptotic
way and fi is usually omitted. Throughout the paper we will use the relation
as the asymptotical extension of !, namely a there exists an
independent positive constant k such that a k. We will denote x as
the rst (in lexicographical order) program for x such that
K(x) also represents the idea of simplicity, deeply involved in the philosophy
of inductive reasoning and learning theory. It is not surprising that learning
and recognition were soon re-understood under this context. Solomonooe
1 It is obvious to see that 8x 2 \Sigma there is always a program of
constant size of the form iprint the inputj. It is also easy to see that 8x 2 \Sigma
because there is always a program of size less than l(x) plus a constant value of the form
iprint xj. In the case that K(x) l(x) (i.e. l(x ) l(x)) we say that x is random. It is
obvious that K(xjx since K(\Deltaj\Delta) is not computable, it is shown elsewhere
(e.g. Li and Vit\Deltaanyi 1997) that the other way is just K(x
6 Jose Hernandez-Orallo
proposed the view of unsupervised learning as information compression (Solo-
monooe 1964) and Watanabe considered ipattern recognition as information
compressionj (Watanabe 1972). The classical Occam's razor of the scien-
tic method: igiven two alternative explanations, choose the simplest onej
was formalised by Rissanen in 1978 under the name iMinimum Description
nally re-formulated in its current one part code
(Rissanen 1996).
According to the MDL principle, given any sequence x, the optimal model
in OE for it is x . If x is projectible, i.e. it allows the prediction of the
subsequent symbols of the sequence x, then OE(x ) n+1 will be the most plausible
prediction according to Occam's razor. In order to ensure that x is
projectible we need to introduce a projectible variant of K:
Denition 3. The k-Projectible Kolmogorov Complexity of an object
x given y on a descriptional mechanism (or bias) fi is dened as: K 0
any iprex-freej fi-program.
The literature has used Kolmogorov Complexity and not its projectible
variant for prediction due to the following theorem:
Theorem 1. For every string x, K 0
Proof. Every non-projectible program p can be transformed into a projectible
program us denote by c the length
of this extra coding of iand then print 1 foreverj. Hence, there exists a constant
This can be extended to the
denitions of K 0 and K, thus the theorem is proven.
The contrary relationship does not hold. Consider the
string nj. The projectible program iprint the natural
numbers, orderedj has constant size, say l(p On the contrary, the
non-projectible program iprint the rst n natural numbers, orderedj is,
in the general case, not smaller than c
Thus, the ideal MDL principle is represented by the rst (in lexicographical
projectible description for x, denoted by x + , such that
From here, a compression/prediction test based on Chaitin's
proposal (Chaitin 1982) seems to be easily applicable. However, there are
many technical reasons that explain that such an intriguing proposal has
not been addressed yet
1. K(x) is not computable, so x + cannot be eoeectively computed. If a compression
test is constructed, how do we know whether the subject's answer is a hit?
2. There are dioeerent equally alternative plausible descriptions: x + is just the rst
one in lexicographic order of all the shortest descriptions.
At least to the author's knowledge and as Chaitin himself has recognised (Chaitin
1998, personal communication).
Beyond the Turing Test
3. Despite the invariance theorem that states that x + depends on OE only up to
a constant, this constant is relevant if l(x) is small, and there is no reason to
prefer one descriptional system over another.
4. The test intends to measure the ability of compression, but this does not match
exactly 3 with the ability of comprehension, i.e., intelligence.
The rst problem can be solved by incorporating time into the denition of
K. The most appropriate way 4 to weigh space and time of a program, the
log Cost fi (p x ), was introduced by Levin in the
seventies (see e.g. Levin 1973). Then the next variant comes directly:
Denition 4. The Levin's Length-Time Complexity of an object x
given y on a descriptional mechanism fi:
Kt
where LT fi log Cost fi (hp; yi)
This is a very practical alternative of Kolmogorov Complexity, because as
well as avoiding intractable descriptions, it is computable. Moreover, it accounts
better for the idea of simplicity, and Occam's razor should be better
formalised under this variant.
To extend LT-Complexity to projectible descriptions, we must measure
Cost fi (p) in an asymptotical way. Consider a machine OE such that the output
tape cannot be rectied. Cost fi (p)[::n] is dened as the time or machine steps
such that the rst n symbols of the denite output are placed at the beginning
of the output tape and Cost fi
From here we only need LT fi (p x log Cost fi (p x )[n::m] and
log Cost fi (p x )[::n] for the following denition:
Denition 5. The k-Projectible Length-Time Complexity of an object
x given y on a descriptional mechanism fi is dened as: Kt 0
This denition will serve as a start point to face the other three unsolved
problems (2,3,4). In fact, they require rst to distinguish what is to comprehend
(problem 4), which is addressed in the following section, and later on
to solve how to measure it (problems 2 and 3).
3. Formalising Comprehension
To comprehend is to understand either the inner mechanism or the plausible
model of some evidence. In some way, comprehension is stricter than
learning in terms of justication, because comprehension usually entails
3 iI just see how Kolmogorov Complexity and Intelligence could be well related but I
don't think it would be `exactly' so.j (Hofstadter 1997, personal communication).
4 Intuitively, every algorithm must invest some eoeort either in time or demand-
ing/essaying new information, in a relation which approximates the function LT .
8 Jose Hernandez-Orallo
that the subject is able to explain the concept to others. In the case of
innite concepts, this explanation is only possible if the subject has a nite
description of the concept. Consequently, comprehension can be understood
in terms of identication. However, if a concept is nite, like most everyday
concepts, both notions diverge signicantly. A nite concept can be easily
identied by the extensional description of the concept, which has no insight
and surely has not identied any mechanism or pattern from it, if the
evidence ever had one. This question is old in logic, where comprehension
means the connotation of a term, opposed to its denotation or extension.
Hence, an extensional description (by enumeration) has no connotation and
consequently entails no comprehension at all. On the contrary, an intensional
description (by comprehension) may have not discovered the right meaning
or real mechanism of the evidence, but still has a chance of discovering it.
There is a fundamental feature that determines this dioeerence: iThe
Dened Thing CANNOT Appear in the Denitionj, which is known as
Comprehension Requirement. It is also one of the four laws of denition,
according to methodology (Bochenski 1965). It is frequently used as a criterion
by teachers when asking their pupils whether they have comprehended
a concept. In fact, the pioneer of the psychometric approach, Binet, designed
his rst tests to avoid this irote learningj.
Traditional use in mathematics also distinguishes informally an extensional
denition from an intensional denition (or by comprehension). For
innite sets, frequent in mathematics, every denition must be intensional
(or by comprehension). Nonetheless, for nite sets there is still no formal
dioeerence between an intensional description and an extensional one.
At rst sight, Kolmogorov or Descriptional Complexity seems suOEcient
to distinguish extensional descriptions from intensional ones. However, the
MDL principle, which chooses the shortest description for a given concept
x, does not ensure that the description is intensional. In the vast majority
of cases, the data is not compressible, and the MDL principle will give the
data itself, being the most extensional description, which does not give any
hint about the comprehension of that data. Even in the rare cases where
the data is compressible, a short description does not ensure that all the
data is described intensionally; there could be a part that could be highly
compressed and another part that could be quoted as an exception.
The question is then more conspicuous: is there any way to distinguish
pattern from exceptions, program from data?
Koppel introduced the notion of sophistication with the goal of distinguishing
the structural part of an object (Koppel 1988) from its data (or
non-compressible part of it). Logical Depth, as dened by Bennett (Bennett
1988), is shown to be equivalent to sophistication up to a constant (Kop-
pel 1987). Both, however, can 'disguise' a general eoeective interpreter as
ctitious pattern and leave a great amount of real pattern as data.
Beyond the Turing Test 9
It is then required a dioeerent approach to distinguish whether a description
has exceptions (partially or totally extensional) or is composed
exclusively of pattern (it is all structure or totally intensional). The idea is
to compare the part which is used for all the data to the limit (the structure),
with the part which is only used in some portion of the data (the exception).
Denition 6. A description p 0 is (n; k)-equivalent in the limit to a
description p ioe 9n 2 IN; n ? 0 and 9k 2 ZZ such that OE(p 0
Informally, two descriptions are equivalent in the limit if there is a point from
which their predictions always match. If both descriptions are k-projectible
with k nite they are always equivalent in the limit. If only one of both is 1-
projectible then they cannot be equivalent in the limit. Hence, the denition
applies when both descriptions are 1-projectible descriptions.
Denition 7. A description p is a Fully Projectible Description of x
given y ioe hp; yi is an 1-projectible description of x and :9p 0 s.t. hp
hp; yi but (n; k)-equivalent in the limit to hp; yi and LT (p
The rst condition that p 0 is not extensionally equivalent to p (p 0 6j p) is to
avoid that given two or more equivalent descriptions, only the shortest one
would be projectible. The second condition measures that this p 0 is simpler
than p. Note that LT (and only applied to the rst chunk of length l(x)
begin to be equivalent) is used instead of l.
Example 1. Given the evidence i3, 12, 21, 30, 102, 111, 120j, we can consider
several projectible descriptions. For instance,
and 1 foreverj is not fully projectible because there exists a shorter description
i1 foreverj which is equivalent in the limit. In the same way, D
number 3. The following three numbers are obtained by adding 9 to the preceding
one. Continue with number 102. The following numbers are obtained by adding 9 to
the preceding onej is not fully projectible because there exists a shorter description
iStart with number 3. The following numbers are obtained by adding 9 to the
preceding onej which is equivalent in the limit. On the contrary, the description D 3
inumbers whose digits in decimal representation amounts to 3 orderedj is fully
projectible. Similarly, the description D
everj is fully projectible. Finally, the following description is also fully projectible
values of a polynomial polynomial such that
D 4 and D 5 may seem counterintuitive but it should be realised that a fully
projectible description just formalises the idea of explanation (and not yet the
comprehension describes the evidence, it accounts for all of it (there
are no exceptions because it is fully projectible) and it can be related (explained) to
others (because of the use of LT , descriptions which are extremely time consuming
are avoided). Hence, D 4 , whether we like it or not, is an explanation for the evidence.
For the moment, we can dene a new variant of descriptional complexity:
Jose Hernandez-Orallo
Denition 8. The Explanatory Complexity of an object x given y on
a descriptional mechanism fi is dened as:
fully projectible g
The string y, which we have supposed empty in the previous example, represents
the context or previous knowledge where the explanation must be
applied. In the same way it is done with K and the MDL principle, we can
denote with SED(xjy) the Shortest (in LT terms) Explanatory Description
for x given y, i.e. the rst shorstest fully projectible (in lexicographic order)
description for x given y. Logically,
However, we still have that for most strings, SED(x) will be just the
rote description irepeat x foreverj which does not follow the comprehension
requirement. A rst idea to avoid this phenomenon is to force the description
to be shorter than the data and to say that the data has no comprehensive
explanation if this is not the case 5 . However, most of everyday data is not
compressible and it is still comprehended.
Another approach is the idea of reinforcement or cross-validation (Her-
n#ndez-Orallo 1999a). For instance, if we remove the last element of the
previous series, i.e. i3, 12, 21, 30, 102, 111j, it is not much expectable that
4 and D 0
5 would be produced but D 0
3 can still be generated. In general,
Denition 9. Stability. A string x is m-stable on the right in the descriptional
system
In other words, a string x is m-stable on the right if taking m elements from
the right, it still has the same best explanation. These m elements, if given
a posteriori, are considered reinforcement or conrmation, and, if given a
priori, are considered redundancy or hints to help to nd the explanation.
Consequently, although rote learning can be trickily used to make an extensional
description fully projectible, stability (like reinforcement or cross-
validation) is a methodological criterion to avoid this phenomenon. This
nally gives suOEcient characterisation to state that a description entails
that the learner who has generated it has comprehended the data.
There is still another reason to support the previous notion of comprehension
as an ontological principle. Why must we avoid rote learning? Why
must we anticipate? Why do children nd more complex patterns? (Marcus
et al. 1999) Why are we genetically programmed to open any black box we
are presented? This search for more informative hypotheses instead of the
easiest ones may lead to fantasy, but this is not dangerous provided that the
system can interact with the world in order to refute some of them.
This informativeness or investment in the hypotheses was advocated by
Popper for the scientic method, and as we have seen, it is equally applicable
5 A dioeerent approach is the notion of exception, studied and formalised in (Hern\Deltaandez-
Orallo and Minaya-Collado 1998) and (Hern\Deltaandez-Orallo and Garc\Deltaa-Varea 1998).
Beyond the Turing Test
for cognition. Even if we make the very strong assumption of Occam's razor,
i.e., things in nature are not complex unnecessarily, the previous rationale is
justied by the fact that, just as every incompressible string has compressible
substrings, most compressible strings have incompressible substrings,
because the shorter the less worthy that is to compress. If the evidence is
presented incrementally, it is better to invest in more informative or general
hypotheses instead of nding the optimal one for each chunk, which will
nally turn out not to be part of the whole description of the whole evidence.
This rationale leads to the next theorem:
Theorem 2. For every descriptional mechanism fi, there exists a constant
c which depends exclusively on fi such that for every string x of length n
with partition
then SED(y) is not equivalent in the limit with s.
Proof. Consider any string x and
any prex y such that It has a fully projectible description p
iprint y for everj with l(p y being the
space which is required for coding iprint . for everj. Since the computational cost
of p y is linear, say k is suOEcient to choose c c 0 to ensure that
the description p y is shorter than s, and LT fi (p y
log log l(x). Moreover, p y and s cannot be equivalent in the limit
because s is fully projectible and, by denition, there does not exist a description
with less LT equivalent in the limit.
It is clear that the idea of stability or cross-validation is supported by the previous
theorem. In fact, it is an innate aesthetic preference in the explanations
that human beings generate. Why is it more pleasant the answer 23 to the
series i3,7,11,15,19, .j than the answer 3? In Hofstadter words, iit would
be nice if we could dene intelligence in some other way than ithat which
gets the same meaning out of a sequence of symbols as we dojj (Hofstadter
1979). Theorem 2 simply states why we do in that way.
As a result of this section, stable objects give SED descriptions where
comprehension has taken place, i.e., comprehensive descriptions. The following
section is devoted to ensure that the descriptions would give the same
meaning out of a sequence, and how to measure their complexity.
4. Testing Comprehesion Ability
Theoretically, there are two ways to know whether a system's operation is
compliant with some requirements: by inspecting its code (or program) or by
testing its behaviour. In general, for complex systems, as it has been nally
recognised in software engineering, verication must be experimental, by
means of sets of tests. It is an open and hard problem to devise a complete
specication of intelligence, mainly because it depends on a consensus on
the abilities that an intelligent system must have. However, it is possible to
Jose Hernandez-Orallo
distinguish some abilities that are fundamental for intelligence. A verication
of intelligence behaviour should begin with these fundamental traits, and
gradually add more diverse test cases in order to make the test set more ro-
bust. Comprehending is the most important trait of intelligence, and we have
formalised it in a computational framework. This allows the construction of
exercises for a test which are not selected experimentally but theoretically,
so, nally, we know what is to be measured, quite unlike psychometrics.
However, if we intend to measure comprehensibility there are still two
questions to solve. First, we must design unquestionable exercises, in order
to avoid the 'subjectivity objection' of IQ tests. Secondly, we require an
absolute referent of comprehension diOEculty in order to give a non-Boolean
score independent to the mean ability of the subjects or society who have
made the test before.
Psychometrics has striven to show that it is not absurd to talk about the
'correct' solution. Its rationale is that if the great majority matches with
some solution is because there are not alternative solutions of similar com-
plexity, and, consequently, it is the most plausible. However, this assertion
is made from a very subjective and informal point of view.
Let us make formal and objective this idea. At rst sight it seems that
stability avoids this but, if we restrict to stable descriptions, we can still
modify any explanation p with the addendum iExecute p but print a '1'
every hundred symbols that are printedj which would be comprehensive for
the data but would dioeer from p in the limit, and would be only a little
longer. For this reason, we must introduce the notion of plausibility:
Denition 10. Plausibility. A fully projectible description p for a string
x is (c; m)-plausible on the right in the descriptional system fi ioe 8d; 0 d
Intuitively, a description is (c; m)-plausible if it is at most c bits longer (in LT
terms) then the best explanation for x and this holds even if we remove up
to m elements from the right of x. From here, we can face unquestionability
in the following way:
Denition 11. Unquestionability. A fully projectible description p for x
is (c; m)-unquestionable in the descriptional system fi ioe it is (c; m)-plausible
and there does not exist another (c; m)-plausible description p 0 for x.
This is a more restrictive condition as c and m are greater. In order to still
obtain some unquestionable descriptions we must make the strings larger.
However, as we will see later, if c and m are tuned conveniently for a concrete
descriptional mechanism, the tests can still be composed of short strings x
such that their SED fi (x) is (c; m)-unquestionable. 6
6 This restriction to unquestionable descriptions not only preserves the goal of the test
but even strengthens it, in ontological terms. It has been frequently argued in philosophy of
Beyond the Turing Test
Once we are able to obtain strings whose SED fi is (c; m)-unquestionable,
we should ascertain the diOEculty of each problem, in order to be able to give
a test set of exercises of dioeerent comprehensibility. The idea is to relate
this diOEculty with explanatory complexity (Et) and the explicitness of the
description wrt. the data:
Denition 12. A string x is k-incomprehensible given y, denoted by
incomp(xjy), in a descriptional system fi ioe k is the least positive integer
number such that: Et fi (xjy) \Delta G(SED(xjy)jhx; yi) k \Delta log l(x).
The use of the factor logl(x) is to compensate the fact that x must be printed
and, therefore, for all x Et(x) log l(x). Consequently, for all x; k 1.
As an example, consider a string x of length 256, with 50. The
comprehensibility of x is k= 7.
The function G corrects the degree of explicitness of the description wrt.
the data and it is dened as follows (Hern#ndez-Orallo 1999b):
Denition 13. The information gain of an object x wrt. an object y in
a descriptional system fi is given by: G fi
Denition 12 nally measures the real diOEculty of nding SED(x) from x,
because descriptions of the form irepeat x for everj which have Et high (to
quote x) are corrected by G, but the length of x is still important.
Now we are prepared to construct a generic test of the ability of comprehension
by generating a series of strings of gradual comprehensibility.
However, as we have said, it is important that the answer is unquestionable,
because if not, the answer would be an arbitrary choice from the examiner. A
way is to provide redundant information to make the answer unquestionable,
with some limitations, obviously, because if not, the problems would be much
too long. For instance, given the series ia, c, c, a, c, c, c, a, c, c, c, c, a, .j
it seems logical to expect that it would follow ic, c, c, c, c, a, c, .j, so it is
redundant to present more than the necessary symbols.
The measurement that is to be presented below requires the collaboration
of the subject, which must employ all its resources to perform the test. It is
not necessary that the subject understands the aim of the test but at least
it should be programmed to do it.
We can nally obtain the degree of intelligence of a given system as the
value which results from applying the following test:
Denition 14. C-Test. Let us select a descriptional system fi suOEciently
expressive and impartial, composed of an alphabet of
symbols\Omega fi and a set of
science and induction that the plausibility and unquestionability of a theory or explanation
not only depends on the intrinsic characteristics of the explanation but also on the ability of
nding alternative explanations. In this sense we can see intelligence as the most important
means to augment the plausibility and condence of explanations, and, consequently, the
ontology of an 'intelligent' system.
14 Jose Hernandez-Orallo
operations \Theta fi to manipulate these symbols, and their corresponding cost (or
length). We provide (or programme) to S the alphabet, operations and cost.
Depending on the expected intelligence of a system we select a suOEciently
wide range 1::K of diOEculty. For each choose randomly p
sequences x k;p , being k-incomprehensible, c-plausible, (c,m)-unquestionable
and d-stable with d r, r being the number of redundant symbols (or hints)
of each exercise. The questions are the K \Delta p sequences without their
elements
\Gamma(d+r)
We give them to S and we ask for the following element
according to the best explanation that is able to construct
with\Omega fi and \Theta fi .
We leave S a xed time t and we record its answers: guess(S; x k
\Gammad+r+1 ). The
result of this test of comprehensibility or (C-test) is measured as:
\Gammad+r+1
the function hit is usually measured as hit(a;
(negative values can be used to penalise errors). The value e is simply for
weighting the diOEcult questions means that all have the same value).
In an informal way, ithe test measures the ability of nding the best explanation
for sequences of increasing comprehensibility in a xed timej. 7
5. Measurement of Pretended Intelligent Systems
The preceding test is applicable to any system whose degree of intelligence
is questioned. Selecting appropriately the descriptional system and the rest
of parameters of the test, it can be used for humans, animals, computers,
extraterrestrial beings and any collection of the preceding working jointly.
Although Denition 14 evaluates a single ability, there are still many ways
to realise a specic test. In (Hern#ndez-Orallo and Minaya-Collado 1998) the
test was implemented by using an abstract machine quite similar to a state
machine. From here, a variety of strings of dioeerent comprehensibility in that
machine were generated. Although the set of k-potent numbers of length at
most n can be computed in polynomial time in n (see a proof in (Li and
Vit#nyi 1997)), the cost of O(n k ), forces to use some heuristics for this. In
the same way, G was approximated. Finally, a sieve was applied for obtaining
only c-plausible, (c,m)-unquestionable and d-stable sequences.
The same work presents the results of applying the test to subjects
from species Homo Sapiens Sapiens aged between 14 and jointly
7 One relevant feature of the test is that, although the subject is supposed to be a
particular universal descriptional system OE s
with a particular background knowledge (life
experience) Bs , it is given a descriptional system fi over it, which highly minimises the
inAEuence of the dioeerence between the computations performed by OE s and other subject
i.e. the dioeerence between Ets(xjhBs ; fii) and Et t (xjhB t ; fii). This makes it possible for
the notions of plausibility and unquestionability to be similar for both subjects.
Beyond the Turing Test
with a classic test of intelligence, the European IQ Test. The correlation between
both tests was 0.77. This value only justies a further more exhaustive
study over greater groups and several variations derived from Denition 14.
Another remarkable experimental result shown in Fig. 1 is that the relation
between hit ratio and k-uncomprehensibility is straight, which suggests that
comprehensibility really estimates the diOEculty of each string.
Figure
Hit
s
@
l
Logically, it is not expectable (for the moment) that contrasted and widely
used IQ tests would be substituted by these C-tests. Nonetheless, this could
be a startpoint towards a theoretical foundation of psychometrics free from
the Homo Sapiens as a reference.
However, it is not human intelligence but non-human what is urgent to
be measured. A formal declaration of what is expected from an intelligent
system should allow two important things: to derive more intelligent systems
from a more concrete specication and, secondly, to evaluate them. Denition
14 provides a rst step for both things, a detailed scale for measuring the
progress (in one intelligence factor) of generic systems in AI. As any other
eld of science, a great advance in a discipline happens when one of its topics
can be measured in an eoeective and justied way. AI, as a science, requires
measurements of intelligence and its dioeerent factors.
Modern AI systems are much more functional than systems from the
sixties or the seventies. They solve problems in an automated way that
before required human intervention. However, these complex problems are
solved because a methodical solution is found by the system's designers, not
because current systems are more intelligent than preceding ones. We share
the opinion that iit is time to begin to distinguish between general, intelligent
programs and the special performance systemsj (Nilsson 1995).
This initial aim of being more general is nowadays still represented by
two subelds of AI: automated reasoning and machine learning. Automated
theorem provers are able to solve complex problems from dioeerent elds of
mathematics. The great advance of the last two decades is mainly caused
by the existence of sets of problems to compare dioeerent systems. Even
these sets have evolved and grown to huge and complete libraries of theorem
proving problems, like TPTP (Suttner and Sutclioee 1996). Machine learning
Jose Hernandez-Orallo
is also taking a more experimental character and dioeerent systems (from
dioeerent paradigms) are evaluated according to classical problems in the
literature. However, as we said in the introduction, there is no theoretical
(nor empirical) measurement about the complexity of the problems which
compose these test sets. This complexity could be obtained by adapting
comprehensibility to several representational languages.
6. Factorisation
During this century, psychometrics have striven for dioeerentiating between
background knowledge (either evolutionary-acquired or life-acquired) and
'liquid intelligence' (or individual adaptability). Accordingly, exercises from
IQ tests are strictly selected to avoid the inAEuence of background knowledge
to be foolproof to 'idiots savants'. However, there are many knowledge-
independent abilities (or factors) to measure. Some factors usually found
in psychological tests are 'verbal ability', `visual ability', 'calculation / deductive
ability', etc.
The C-test measures one factor, which could empirically be identied
with the g factor or liquid intelligence. There are more independent factors
which could be measured by using extensions of the framework presented in
the previous section. For instance, knowledge applicability, contextualisation
and knowledge construction ability can be measured in the following way:
Knowledge Applicability (or 'crystallized intelligence'): we provide a background
knowledge B and we give a set of sequences x i such that incomp(x i
are unquestionable with
or without B. We can compare the dioeerence of performance between cases
with B and without B. This test would actually measure the application of
the background knowledge depending on two parameters: the complexity of B
(i.e. Kt(B)) and the necessity or usefulness of B, measured by u.
Contextualisation: it is measured in a similar way as knowledge applicability
but providing dioeerent contexts dioeerent sequences
x i;t such that incomp(x i;t jB t This multiplicity of background
knowledge (a new parameter T ) dioeerentiates this factor from the
previous one. Analogy tests generally resemble this type of exercises, as it
was shown in (Hern#ndez-Orallo and Minaya-Collado 1998) where a denition
(and measurement) of analogy was discussed.
Knowledge Construction: we provide a set of sequences x i such that exists a
common knowledge or context B and a constant u such that for incomp(x i jB)
signicant increase of performance must take place between
the rst sequence and the later sequences. The parameters are the same as
the rst case, the complexity of B and the constant u. This learning from
precedents has also been studied in AI (see e.g. Winston 1982).
Knowledge Applicability may also be correlated with deductive abilities and
these may also correlate with the idea of congruence or coherence, since
Beyond the Turing Test
it can be measured as constraint satisfaction (Thagard 1989). Other factors
are more related with intentionality than intensionality and general
intelligence. These are reactivity, pro-activity, interactivity and the recently
elsewhere vindicated emotional abilities, that can be measured adopting
notions from Query Learning paradigms (Angluin 1988), possibly formalised
using interactive Turing machines.
However, not every factor is meaningful for intelligence. Factors like iplay-
ing chess wellj are much too specic to be robust to background knowledge.
Other factors will result in being highly correlated (experimentally or the-
oretically) to other more distinct factors. The inAEuence of the descriptional
mechanism should also be studied for each factor.
In the end, the matter at issue is to rene and extend all the previous
ideas in order to make dioeerent and founded tests of intelligence, knowing
exactly what is measured. This is an urgent and fascinating task for AI.
7. The C-test and The Turing Test
The imitation game was conceived by Turing to dissipate the doubts about
possibly non-human intelligent beings. He left no place for human's ex-
clusivity: intelligence can be evaluated by an exclusively behavioural test.
Unfortunately, instead of recognising this his most important contribution,
the test is still understood as 'a goal' in AI. Nonetheless, this view has been
responded by many authors, which criticise that the TT does provide little
information about what intelligence is; it is just a test of humanity (Fostel
1993), that, in fact, if applied to human beings, yields many paradoxes. The
result of applying it to ourselves is a recursive trap which is unable to answer
the question of how intelligent the Homo Sapiens is.
There have been unsuccessful attempts to correct the two main problems
of the Turing Test for measuring intelligence: its informal character and its
anthropocentrism. 8 There is still a third problem, which is the necessity of
several intelligent 'judges' and a `referent' to make the test. The self-reference
question arises again: Who is the rst intelligent being to start the game?
These and other problems are incarnated in the Loebner Prize, which usually
awards the participant who has devised the system more able to cheat the
judge, because ihumans are surprisingly bad at distinguishing humans from
computersj (Johnson 1992). Furthermore, there is no way of knowing who
is cheating, the system or its designer.
However, if fairly played, the imitation game is a hard examination for
any pretended intelligent system. It is extremely diOEcult to behave like an
In some cases, this has led to disparate proposals, as the so-called formalisation of the
TT (Bradford and Wollowski 1995), sustained from the assumption that we are able to
solve NP-complete problems in polynomial time. As (McCarthy 1998) claries: ihumans
often solve problems in NP-complete domains in times much shorter than is guaranteed by
the general algorithms, but can't solve them quickly in generalj.
Jose Hernandez-Orallo
average human being of this epoch (it is even diOEcult for some average
human beings). For a non-human-contextualised being, it would be required
to comprehend the complex behaviour of human beings of these times, their
evolution-acquired traits, their language, their culture, their limitations, etc.
It is much easier then to try to cheat the judges. In fact, the judges iare
especially fooled into reading structure into chaos, reading meaning into non-
sense.) Sensitivity to subtle patterns in our environment is extremely
important to our ability to perceive, learn and communicatej (Shieber 1994).
Curiously, it is precisely this 'lack' of the judges what the C-tests measure.
However, the C-tests, as they have been presented, are necessary (at least to
obtain a minimum value of I(S)) but not suOEcient (other important factors
should be measured as well). It has been already suggested that both kind of
tests (TT and factorial) could be combined in order to give a more accurate
test of intelligence: iit is this posing of puzzles in arbitrary domains that
is the hardest part of the Turing Test, and a part that no program has yet
passedj (Shapiro 1992). This idea, however, would ultimately turn the TT
into a lightweight and less rigorous version of a factorial C-Test.
In our opinion, the TT should be celebrated as an extremely valuable
philosophical exercise about the behavioural character of intelligence. How-
ever, in practice, it should be substituted by progressively more accurate
computational tests of dioeerent cognitive abilities.
8. Conclusions
Turing devised a way for identifying intelligent beings from non-intelligent
ones without solving the problem of what intelligence is. In fact, an imitation
game is the only way to make sense from such an apparent paradox. However,
the approach has shown numerous limitations and troubles which make it
useless for AI in practice. With current theoretical and technical tools of
computer science, it is diOEcult to develop non-human intelligence without a
computational formalisation of the problem we are trying to solve.
It is high time to address the fundamental problem: what intelligence is.
This paper presents an important step in this line. A formalisation of one of
the main factors of intelligence, the g factor or liquid intelligence is dened
computationally. This denition has been used to develop an intelligence test,
very dioeerent from the TT and in compliance with classical IQ tests. Like
the latter it distinguishes acquired knowledge from liquid intelligence. More
importantly, the C-Test, unlike the TT and IQ tests, is not anthropomorphic.
The factor is dened as the ability of nding comprehensive explanations,
and thus is meaningful. This makes it philosophically acceptable: intelligence
is what allows us to comprehend the world.
Sooner or later we will need to face the fact that computers will be
closer and closer to human intelligence. Once arrived to this hallmark of
Beyond the Turing Test 19
AI, the misunderstood goal of the TT, it will be indispensable to have an
objective measure of intelligence, in order to solve the incipient technical and
ethical problems that could be derived from here. The paradigm presented
in this paper, since it is theoretically justied, allows the projection of the
measurement of intelligence beyond human intelligence.
There are many more interesting questions beyond the TT. How many
independent computational factors does human intelligence have? How intelligent
does the Homo Sapiens result in the end? Which main factors make a
chimpanzee signicantly dioeerent from us? How intelligent might machines
be with the current computational power? Psychometrics, Anthropology,
Zoology and AI have only partially dealt with some of these problems.
All these questions require new theoretical tools for a radical change of
paradigm: a science of intelligence grounded in theoretical computer science
and information theory.
To construct this science, Turing's call is now more compelling then ever:
iWe can only see a short distance ahead, but we can see plenty there that
needs to be donej.
Acknowledgements
I am much obliged to the main inspirers of this work, G. Chaitin and D. Hofstadter, for
their encouraging comments, especially during 1997, when the main ideas were taking
shape. Since then, the work has matured with the help of numerous collaborations and
suggestions: R. Beneyto and J.M. Lorente from the Dep. of Logic and Phil. of Science of
the U. of Valencia, P. Thagard from the Dep. of Phil. of the U. of Waterloo, O. Pellicer
from the Dep. of Psychobiology of the U. of Valencia and N.T. Crook from the Oxford
Brookes U. Finally, I am especially grateful for the comments from K. Araque, R. Barreiro,
E. Fueyo, I. Garc#a, E. Hern#ndez, N. Minaya and I. Soto on several drafts of this paper.
--R
Machine Learning
The Economist
Logical depth and physical complexity.
The Methods of Contemporary Thought.
A Formalization of the Turing Test (The Turing Test as an Interactive Proof System).
What kind of Information Processing is Intelligence?
Programs in the Search for Intelligent Machines: The Mistaken Foundations of AI.
Can Machines Think?
A Heuristic Program to Solve Geometric Analogy Problems.
The Structure and Measurement of Intelligence.
Language Identication in the Limit.
The inference to the best explanation.
The Turing Test Is Not a Trick: Turing Indistinguishability Is A Scientic Criterion.
The universal Turing machine: a half-century survey
of Intelligent Systems (EIS'98)
A New Test of Intelligence.
In (Herken
The Turing Test Misunderstood.
Universal search problems.
Machines and Thought.
Knowns and Unknowns.
Eye on the Prize.
Fisher information and stochastic complexity.
What is AI
The Turing Test and The Economist.
Lessons from a Restricted Turing Test.
Human acquisition of concepts for sequential patterns.
A formal theory of inductive inference.
'General Intelligence' objectively determined and measured.
Beyond Information.
The TPTP Problem Library.
On computable numbers with an application to the Entscheidungsproblem.
Computing Machinery and Intelligence.
A theory of the learnable.
Pattern Recognition as Information Compression.
Thinking Machines: Can There Be?
Learning New Principles from Precedents and Exercises.
Thinking Machines: Can There Be?
--TR
--CTR
Shane Legg , Marcus Hutter, Universal Intelligence: A Definition of Machine Intelligence, Minds and Machines, v.17 n.4, p.391-444, December 2007 | comprehension;measurement of intelligence;descriptional complexity;AI's anthropomorphism;inductive Inference;turing test;psychometrics |
596040 | The Constraint Language for Lambda Structures. | This paper presents the Constraint Language for Lambda Structures (CLLS), a first-order language for semantic underspecification that conservatively extends dominance constraints. It is interpreted over lambda structures, tree-like structures that encode -terms. Based on CLLS, we present an underspecified, uniform analysis of scope, ellipsis, anaphora, and their interactions. CLLS solves a variable capturing problem that is omnipresent in scope underspecification and can be processed efficiently. | Introduction
Underspecication is a recent approach to the issue of combinatorial
explosion caused by ambiguity. Its key idea is to derive a single, compact
description of all readings instead of the (exponential number
of) readings themselves. For as long as possible, later processing steps
operate on these descriptions; readings are only enumerated by need.
One type of ambiguity for which underspecication has been investigated
particularly well is scope ambiguity. Common to many recent
scope underspecication formalisms (Reyle, 1993; Muskens, 1995; Bos,
1996; Niehren et al., 1997b; Egg et al., 1998) is that they provide the
'semantic material' of which the description of the readings is built, plus
structural relations that constrain possible combinations of this mate-
rial. Dominance constraints, a tree logic which can express dominance
of nodes in a tree, are a very natural way for doing this. Muskens (1995)
was the rst to do this explicitly, but Reyle (1993) and Bos (1996) can
be subsumed under this kind of approach as well.
In this article, we show how to integrate a treatment of other linguistic
phenomena { in particular, anaphora and VP ellipsis { with
a scope underspecication formalism based on dominance constraints.
The interaction of these three phenomena has been considered before in
Crouch (1995) and Shieber et al. (1996). In our approach, it is modelled
by a conservative extension of the language of dominance constraints
c
2000 Kluwer Academic Publishers. Printed in the Netherlands.
Markus Egg, Alexander Koller, Joachim Niehren
by additional atomic formulas, viz., anaphoric binding constraints and
parallelism constraints. While the former are based on an idea by
Kehler (1993), the latter are formally equivalent to context unica-
tion as used in Niehren et al. (1997b), which was shown in Niehren
and Koller (1998). In addition, -binding constraints are introduced in
order to solve a capturing problem that appears in all dominance-based
underspecication formalisms.
The combination of all of these constraints, called CLLS (Constraint
Language for Lambda Structures), correctly describes many challenging
cases from the literature that exhibit interaction of scope, anaphora,
and ellipsis. In addition, its being an extension of dominance constraints
makes for some appealing dierences to existing formalisms
with comparable coverage: Unlike Shieber et al. (1996), the CLLS
analysis is completely order-independent; and in contrast to the QLF-
based analysis in Crouch (1995), it achieves a clean separation between
underspecied descriptions and the described readings.
The paper is structured as follows. In Section 2, we introduce the
phenomena under consideration and present the intuitions behind our
linguistic analysis without going into detail. Section 3 presents the formal
denitions of lambda structures and CLLS and lls in the formal
details that were omitted in Section 2. In Section 4, we extend the
analysis to more involved cases from the literature. Section 5 denes
a syntax/semantics interface that derives CLLS constraints on the basis
of a simple phrase structure syntax. In Section 6, we give a brief
overview over results on formal and computational aspects of CLLS.
Finally, Section 7 concludes and outlines directions for future work.
2. Elements of CLLS
This section introduces the three main phenomena considered in the
paper { scope, ellipsis, and anaphora { and the major concepts used
in their CLLS analyses. After discussing -structures and their correspondence
to -terms, we go through the phenomena and present the
intuitions underlying our analysis. The section does not even attempt
to be formally precise; the formal details are put section 3.
2.1. Lambda structures and lambda terms
The idea behind -structures is to represent a -term by a tree-like
graph; a node in a -structure corresponds to an occurrence of a sub-term
in the -term it represents. Consider e.g. the -term in (1), which
happens to represent one of the readings of (3) below:
The Constraint Language for Lambda Structures 3
(1)
(a workshop)(x
(every linguist)(y
(attend
We draw the corresponding -structure as the graph in (2). An
occurrence of a -abstraction corresponds to a node labelled by lam, an
occurrence of an application, to a node labelled by @, and an occurrence
of a bound variable, to a node labelled by var. Variable binding is
represented in a lambda structure by dashed arrows from the variables
to their binders. For instance, if we identify each node by its address,
i.e. the word of natural numbers that indicates the path from the root
to the node, the unique occurrence of x in (1) corresponds to the node
with the address 212 in (2); it binds the variable represented by the
node with the address 21212.
@
a workshop
lam
@
@
every linguist
lam 212
@
@
visit var
var 21212
Note that variable names in a -term (such as x and y in (1)) are
not re
ected by the node labels of the corresponding -structure. Con-
sequently, a -structure represents a closed -term uniquely modulo
consistent renaming of bound variables (-equality).
Via the detour through -structures, we can use tree descriptions in
semantic underspecication: We simply talk about -structures in the
same way one usually talks about trees. The explicit binding relation is
important in that context because variable names may not be sucient
to ensure proper binding in a radically underspecied framework; we
will come back to this in a minute.
2.2. Scope
The rst class of phenomena we are concerned with is scope ambiguity,
as in the following sentence.
(3) Every linguist attends a workshop.
This sentence has two readings, which dier in a permutation of
quantiers only: Either the sentence means that there is one specic
workshop which every linguist attends, or it means that every linguist
attends a workshop, but not necessarily the same as the others. The
rst reading is represented by the -term in (1), and the second by (4):
4 Markus Egg, Alexander Koller, Joachim Niehren
(every linguist)(y
(a workshop)(x
(attend
Closer inspection reveals that (1) and (4), and hence their corresponding
lambda structures, are closely related. The lambda structures
are composed from the same tree-like subgraphs, corresponding to
the term fragments (every linguist)(x(:)), (a workshop)(y(:)), and
((attend x) y). But these fragments are composed in dierent order.
We can describe both lambda structures at once by specifying the
fragments and their relationships. Such a description is given in (5).
a workshop
lam X 3
@
attend var
every linguist
lam X 7
Intuitively, description (5) is satised by all -structures into which
the graph in (5) can be embedded in such a way that no labelled nodes
of the graph overlap. Dotted edges in (5) signify dominance: Of the
two nodes they connect, the upper one must be above the lower one in
the lambda structure. The dashed arrows, for -binding, act like elastic
bands, which can be stretched indenitely without breaking.
The description leaves the relative ordering between the two quan-
tier fragments unspecied. But since both fragments dominate the
nuclear scope and, just like trees, -structures cannot branch in the
bottom-up direction, one of the two quantier fragments must dominate
the other. This situation is very common in scope underspecication.
Note that variable binders must always dominate their bound variables;
so the -binding relations, logically
entail the dominance relations, X 4 X 9 and X 8 X 9 . Inserting these
dominance edges in (5) only enhances readability.
In Section 3 we will give pictures like (5) a formal meaning as constraints
over -structures, i.e. logical formulas that are interpreted over
the class of -structures. Then nodes of the graph correspond to variables
denoting nodes of a -structure, whereas labels, edges, and arrows
correspond to various types of atomic constraints. In addition, such a
graphical description imposes implicit inequality constraints between
labelled nodes, which excludes proper overlap of fragments.
We have said that a description like (5) is satised by all lambda
structures into which they can be embedded. In particular, the lambda
The Constraint Language for Lambda Structures 5
structure may contain additional fragments that are not mentioned in
the description. This is a desired feature because we want to compute
with limited information that can in principle be augmented at any
later point; the fact that the information is complete must be expressed
independently. As long as one is only concerned with scope, one can
impose a general constructiveness restriction: each node in a lambda
structure that we describe must be denoted by a variable in the de-
scription. But constructiveness would be too strict for our treatment of
ellipses below and also for an underspecied account of reinterpretation
(Koller et al., 1999; Egg, 1999).
2.3. Ellipsis
The second phenomenon we treat is VP ellipsis. VP ellipsis interacts
with scope ambiguities, thus the treatment of both phenomena must be
integrated. In the framework presented in this article, this integration
simply amounts to adding further constraints on lambda structures.
For ellipses, we introduce parallelism constraints, which permit to
express structural equality between fragments of -structures. As an
example, consider the elliptical sentence (6):
Every man sleeps, and so does Mary.
The meaning of the target sentence so does Mary is exactly like
the meaning of the source sentence every man sleeps, except that the
source parallel element every man is replaced by the target parallel
element Mary. This can be modelled in two steps. First, we describe
the -structure for the source sentence, as in (7), and the -structure
for the target parallel element, as in (8).
every man
lam
sleep var
Mary Y 2 lam
var
In any lambda structure described by these constraints, the semantics
for the source sentence will be below X 1 , and the semantics for the
target sentence will be below Y 1 . The -structure for the entire sentence
will be the conjunction of source and target sentence, like this:
The second step is to impose the parallelism constraint (10), which
says that the lambda structures for the source and target sentence (i.e.
6 Markus Egg, Alexander Koller, Joachim Niehren
below X 0 and Y 0 ) are equal, with the exception of the sub-lambda
structures representing the parallel elements (below X 2 and Y 2
Indeed, the intended semantic representation of (6), shown in (11),
simultaneously solves all constraints in (7), (8), (9), and (10).
@
@
every man
lam
@
sleep var
@
Mary lam
@
sleep var
This shows that ellipsis resolution can be reduced to solving constraints
over -structures.
Since proper names and quantier NPs can be parallel elements in an
ellipsis (as in (6)), our analysis requires type-raising of proper names;
the constant Mary in (8) corresponds to a -term of type hhe; ti; ti.
Where there is no ellipsis, proper names are freely analyzed as constants
of type e, as this simplies the presentation. To distinguish the two
analyses of proper names, we will capitalize the rst letter of label used
in the former; that is, the label for the type-raised analysis of proper
nouns is Mary and the one for the non-type-raised analysis, mary.
2.4. Anaphora
Anaphora are the nal class of phenomena we consider. In order to
represent anaphora, we extend our notion of -structures. Anaphora
are represented as nodes labelled by ana which are linked to their
antecedents by anaphoric links. We draw anaphoric links as dashed
arrows using straight lines. For instance, a representation of (12) is
shown in (13). For simplicity, we use a constant mother of here; we will
analyze the possessive dierently later.
liked his j mother.
@
say @
@
like @
mother of ana X 3
In the example, the two anaphoric links form a link chain. Link
chains go back to Kehler (1993, 1995); they have been worked out in
The Constraint Language for Lambda Structures 7
this setting by Xu (1998). This representation of anaphoric reference
can cope with a series of problematic cases from the literature, such as
strict/sloppy ambiguities, the many-pronouns puzzle (of which (12) is
the source clause), and cascaded ellipses.
2.5. The Capturing Problem
A major dierence between CLLS and other underspecication formalisms
is that variable binding is modelled by explicit -binding
arrows and not by variable names. This looks like an unnecessary
deviation from standard procedure, but it turns out that variable
names are inconvenient in the context of underspecication and become
completely unusable once we add parallelism.
Let us assume that variable binding is modelled by using variable
names; for instance, that we use new labels lam x and var x for each
object-level variable x. Now imagine that a binder lam x appears twice
in a description, and that there is a scope ambiguity between the two
occurrences. In this case, it would be unclear which the intended binder
of a node with label var x is; in each solution, the lower binder wins.
The obvious way to avoid this problem is to name all variables
apart when generating a description. But this restriction cannot be
maintained once parallelism comes into play. This is best illustrated by
corrections, as in the following example.
Hans knows every student. No, Manfred knows every student.
(15) is an underspecied description of the meaning of (14):
correct
@
@
every student
lam x X 1
@
@
know var x X 3
hans X 2
@
@
every student
lam x Y 1
@
@
know var x Y 3
manfred Y 2
In the analysis, we used the same variable name x in both binders.
This is necessary since in solving the parallelism constraint, we must
make X 1 correspond to Y 1 . If these two nodes carried dierent variable
names, we would have to soften the meaning of parallelism constraints
in that the labels of corresponding nodes need not be identical, but
only uniable in some sense; but this raises very dicult problems of
8 Markus Egg, Alexander Koller, Joachim Niehren
bookkeeping which variables have been identied with which. The only
feasible option is using the same variable name twice.
There are other problems, too. We have seen in Section 2.3 that
we cannot even maintain the constructiveness restriction on satisfying
lambda structures; parallelism may force us to copy material. But if we
do not require constructiveness, we can get (16) as a solution for
correct
@
every student
lam x X 1
@
@
every student
lam x Y 0@
@
know var x X 3
hans X 2
@
every student
lam x X 0@
@
every student
lam x Y 1
@
@
know var x Y 3
manfred Y 2
More precisely, the problem is that parallelism (not only for correc-
tions) may force us to copy binders, and if we cannot always rename
variables apart, we must enforce that copying variables does not break
the intended binding relations (as the one between X 1 and X 3 in (16)).
The problems with variable binding are real problems in the presence
of parallelism only; they can be avoided otherwise by naming variables
apart and requiring constructiveness, both of which is still slightly un-
pleasant. Modelling variable binding with an explicit binding relation
between nodes oers a clean solution to all of these capturing problems:
how much and what kind of material is added between a
variable and its binder, the binding relation can never be broken.
3. Syntax and Semantics of CLLS
Section 2 presented the general intuitions behind lambda structures.
We showed how to describe -structures and how to apply their descriptions
in an underspecied analysis of scope, ellipsis, and anaphora.
Now we give a rigorous denition of the constraint language for lambda
structure (CLLS), which we will use throughout the paper. We will start
with the semantic level by rst presenting tree structures, then move
over to lambda structures as an extension of tree structures. Once the
semantics is xed, a denition of a syntax to talk about it is simple.
The Constraint Language for Lambda Structures 9
3.1. Tree Structures
A tree corresponds to a unique tree structure in the same way that
a lambda structure relates to a unique -term modulo -equivalence.
Lambda structures are extended tree structures because -terms are
extended trees (trees plus variable binding).
Let be a set of function symbols, f; g; a; b. Each function f symbol
comes with a xed arity. We write f k for a function symbol with arity
k 0. A (nite constructor) tree is simply a ground term (without
variables) built from a set of function symbols. For instance, f(g(a; a))
is a tree built from function symbols f Taking IN to be the
set of natural numbers starting at 1, we can dene a path as a word
over IN . We identify each node of a tree with the path from the root
to this node; the empty word, , identies the root. Paths are named
with lowercase Greek letters, such as Concatenation of
words and is written as , and a word is a prex of i there
is a word 1 such that
A tree structure is a rst-order model structure which characterizes
a tree. The domain of a tree structure contains all nodes of the corresponding
tree, and its relations specify labelling and childhood. E.g.,
the domain of the tree structure for f(g(a; a)) is f; 12g. The fact
that the root is labelled with f and has a single child 1 is expressed by
a relation we write as :f(1); the children and labels of the remaining
nodes are specied by the relationships 1:g(11; 12), 11:a, and 12:a.
More generally, a tree domain is a nite nonempty set of nodes
which is prexed-closed (that is, 2 implies 2 ) and closed
under left siblings (i.e. if i 2 then j 2 for all 1 j < i), and a
tree structure is dened as follows:
DEFINITION 3.1. A tree structure over consists of a tree domain
IN and a relation :f n+1 for each n-ary function symbol
, such that for all nodes 2 and the maximal n 2 IN with
there is a unique symbol f n 2 such that
Given nodes
This relation expresses that 0 is a node of
the tree structure with the label f and the children , in this
order. Note that two nodes may be labelled by the same constant
without being equal. The condition in the denition means that the
number of children of a node is specied by the arity of its label.
Markus Egg, Alexander Koller, Joachim Niehren
3.2. Lambda Structures
A -structure extends a tree structure with two additional relations for
-binding and anaphoric links. For -structures, we assume:
DEFINITION 3.2. A -structure over consists of a tree structure
over with tree domain and two additional binary relations and
ante on which satisfy the following properties.
1. is a partial function that maps every node 2 with
label var to a prex of which is labelled with lam.
2. ante is a partial function that maps every node with label
ana to another node.
The lambda structures we are interested in here have additional
properties, which we have not included in the denition because they
are not essential for what follows. For instance, there are no cyclic
anaphoric link chains, and if a link chain ends at a node with label var,
then each node in the chain (all of which are labelled by ana) must be
below the binder of that var-labelled node.
We draw lambda structures as tree-like graphs. E.g., the binding and
anaphoric linking functions of the lambda structure (17) are specied
by 1. Note that we annotate only those
nodes with addresses in the picture that we want to refer to.
@
@
like ana 2112
var 212
Lambda structures and -terms can almost be mapped to each other
one-to-one. The two exceptions are that lambda structures do not mention
variable names and that lambda structures contain anaphoric links.
We do not elaborate on the further interpretation of anaphoric links
roughly, they express that the interpretation of the last element
of the link chain determines the interpretation of all other elements of
the chain.
The Constraint Language for Lambda Structures 11
3.3. Dominance and Parallelism
Finally, we conservatively extend lambda structures by two additional
relations between nodes: dominance and parallelism. These relations
were not included in the original denition as they can be dened from
the relations specied there; but they are essential for the application.
Let be a -structure and ; two of its nodes. We say that
dominates ( ) if it lies above it, i.e. if is a prex of . The
dominance relation is a partial order on the domain of , i.e. re
exive,
transitive, and antisymmetric.
For the denition of parallelism, we rst dene for any two nodes
in the context of below in as the set of nodes of which
are dominated by , but not by . Intuitively, the context of below
is the set of nodes 'between' and . Taking the labelling relations
of into account, a context looks almost like a tree domain starting
at , except that one node (the mother of ) has one too few children.
Based on this intuition, we call the root of the context and its hole.
Intuitively, the parallelism holds for a -structure
if imposes parallel structures on the contexts between 1 and 1 and
between 2 and 2 . As it must also specify what it means for binding
and anaphoric linking to be parallel, however, the following denition
of the relation is rather involved.
DEFINITION 3.3. Let be a -structure over and 1
nodes of its domain . Parallelism holds in i there
are subsets 1 ; 2 and a bijective correspondence function c :
such that P1{P6 are satised.
P1 For 2g, the set i is the context i below i in :
and not i g
P2 imposes parallel tree relations on 1 and
In particular, this enforces that c( 1 (that is, the holes correspond
to each other) and that for all 2 IN , 1 2 1 [f 1 g )
(that is, corresponding nodes can be reached over the
same path from the roots of their respective contexts).
P3 Binding within 1 and 2 is parallel:
Markus Egg, Alexander Koller, Joachim Niehren
P4 For i 2 f1; 2g, no node below i is bound by a node inside
P5 If binds a variable node within 1 properly above 1 or the corresponding
variable node in 2 properly above 2 , then the two binder
nodes are binding equivalent ('/ proper dominance).
For the time being, we assume that binding equivalence is simply
the node identity. We will modify this denition in Section 4.5.
P6 If is an anaphoric node in 1 , then the corresponding anaphoric
node in 2 must be linked either to (strict) or, if it exists, to the
correspondence of ante() (sloppy).
P1 species the parallel contexts and the correspondence function
between them. P2 requires parallelism of tree structure. Conditions
P3{P5 are concerned with the interaction of parallelism and variable
binding. Condition P6 deals with the interaction of parallelism and
anaphora, i.e. with strict/sloppy ambiguities.
The parallelism relation is almost symmetric; the only exception is
that the strict variant of the rule P6 only allows to link the anaphoric
node in 2 to the corresponding node in 1 , but not vice versa.
3.4. The Constraint Language CLLS
Now that -structures and their relations are dened, it is straight-forward
to x a constraint language to go with them. We assume an
innite set of node variables, ranged over by X;X pick
relation symbols for all relations dened so far. To keep the presentation
simple, we use the same symbols as for the relations themselves. The
constraint language over lambda structures (CLLS) is given by the
following abstract syntax:
The Constraint Language for Lambda Structures 13
The semantics of CLLS is dened by interpretation of constraints
over the class of lambda structures in the usual Tarski style. A constraint
' of CLLS can be evaluated to a truth value if a -structure
and a variable assignment into the domain of are given. A solution
of ' is a pair (; ) which satises '.
3.5. Constraint Graphs
CLLS constraints as just dened can become unreadable rather quickly.
Throughout the paper, we will use constraint graphs instead. Constraint
graphs are an alternative, graphical syntax for CLLS; a constraint
graph corresponding to a constraint ' contains one node for
each variable in ' and labels and edges for the atomic constraints that
appear in '. A simple example is given in (18).
lam X
var Z
represents
For every dominance constraint X Y , we draw a dotted line from
X to Y . For every labelling constraint X:f(X
the graph node for X with f and draw solid lines to the nodes for
. For every -binding constraint (X)=Y , we draw a curved
dashed arrow from X to Y ; and for every anaphoric binding constraint
ante(X)=Y , we draw a dashed arrow from X to Y that only uses
straight lines. Parallelism constraints cannot be represented easily in
constraint graphs; we will simply write them next to the graph.
Finally, a constraint graph represents inequality constraints X 1 6=X 2
for each two labelled nodes in the graph. This assumption nicely
prevents 'overlaps' between the `fragments' of the constraint graph.
Now we can interpret the intuitive diagrams from Section 2 as CLLS
constraint graphs. This gives them a formal meaning as CLLS con-
straints, which can be satised by lambda structures. These lambda
structures, in turn, represent -terms which stand for the actual
meaning(s) of the sentence.
4. Interaction of Quantiers, Anaphora, and Ellipsis
Now that we know how to deal with simple examples, we turn to
some well-known, more complex challenges in the area of quantiers,
anaphora, and ellipses, in particular to involving their interactions.
We look into quantier parallelism, strict/sloppy ambiguities, nested
14 Markus Egg, Alexander Koller, Joachim Niehren
ellipses, a sentence involving interaction of all three, and antecedent-
contained deletion (ACD). There are other interesting things that the
analysis can do; e.g., to deal with gapping, parallelism could be extended
to allow two exception positions rather than one: Niehren et al.
(1997a) showed that this can be done in a dierent setting.
Throughout, we assume a xed signature:
We follow the convention that proper nouns are always analyzed as
constants of type e, except as contrasting elements in ellipses where the
other contrasting element is a quantier. We indicate the rst analysis
by labelling the corresponding nodes in lowercase letters (john), the
second one, by using labels with a capitalized rst letter (John). Fur-
thermore, we draw dominance edges wherever dominance is entailed
by -binding constraints. This is logically redundant, but may improve
readability.
4.1. Quantifier Parallelism
The rst phenomenon we consider is quantier parallelism, an interaction
of scope and ellipsis. By way of example, we continue the sentence
(3), repeated here as (19), with the elliptical sentence (20).
Every linguist attends a workshop.
Every computer scientist does, too.
This pair of sentences, modelled after an example from Hirschbuhler
(1982), has three readings: Either there is a single workshop which
both all linguists and all computer scientist attend; or there is one
workshop for all linguists and one for all computer scientists (but not
necessarily the same one); or every linguist and computer scientist can
attend a dierent workshop. This is surprising; if the target sentence
means 'Every computer scientist attends a workshop', each sentence is
two-way ambiguous, for a total of at least four readings.
In CLLS, parallelism enforces that the quantier scopes in both
sentences must be analogous; the ambiguities cannot be resolved inde-
pendently. This is re
ected by the following constraint (abbreviating
workshop to ws, linguist to ling, and computer scientist to cs):
The Constraint Language for Lambda Structures 15
@
a ws
lam
s
every ling
lam
every cs
@
@
attend var
var
s
X s is the root of the semantics of the source sentence; X t is the root
of the target sentence. The contrasting elements, every linguist and
every computer scientist, are below the variables X 0
s
tively. There is a dominance constraint between X s and X 2 , but not
between X s and X 1 , since, like most quantiers, universal quantiers
must obey a 'scope island constraint' that prevents them from escaping
from a sentence. This restriction does not hold for indenites, such as
a workshop.
There are three places where the fragment below X 1 can go in a
lambda structure satisfying the constraint: below the fragment starting
at above the conjunction. In each case,
the parallelism constraint enforces that whatever is below X s is also
below replacing what is below X 0
s
with what is below X 0
. This
produces exactly the three readings of the sentence. Note that in the
third reading, the indenite takes scope over the entire conjunction; it
is not part of the parallel contexts.
A particular consequence of the parallelism constraint enforcing
structural parallelism of the sub-lambda structures below X s and X t is
that the relative scopes of the quantiers must be identical in both the
source and the target sentence (if the indenite is below X s , of course).
4.2. Strict/sloppy Ambiguities
Strict/sloppy ambiguities are ambiguities of anaphoric reference that
occur in the context of VP ellipses. They are an important benchmark
for analyses of ellipsis. The prototypical example looks as follows:
likes his mother, and Bill does too.
This sentence has two readings: Either Bill likes John's mother (this
is the strict reading), or Bill likes his own mother (the sloppy reading).
We describe the meaning of (22) as in (23), using parallelism and
anaphoric linking constraints. We have hidden the sub-lambda struc-
Markus Egg, Alexander Koller, Joachim Niehren
ture for his mother and only drawn an empty triangle, as the only node
we are interested in is the anaphor.
ana X a
lam
@
@
like var
s
bill X 0
Except for the fact that the source clause contains an anaphor, this
constraint is totally analogous to the simple ellipses we considered
above. The parallelism constraint rst enforces that the tree part of
the lambda structure below X t is the same as the tree part of the one
below X s , except for the contrasting elements, as follows:
a
lam
@
@
like var
bill X 0
(24) is not a complete lambda structure because the anaphor at X 0
a
does not have an antecedent. According to P6 of Denition 3.3, there
are two legal antecedents that this anaphor can be linked to. It can
either be linked to the anaphor in the source context, i.e. to the node
denoted by X a . In this case, the link chain starting at X 0
a
ends at X s ,
which is labelled with john; so this is the strict reading. Or it can be
linked to the node corresponding to the antecedent of X a . As X a is
linked to the hole of the source context, X 0
a
must be linked to the hole
of the target context; this is X 0
, which produces the sloppy reading.
4.3. Nested Ellipses
This analysis of strict/sloppy ambiguity carries over to more sophisticated
cases like the Gawron and Peters (1990) example
revised his paper before the teacher did, and so did Bill.
This sentence comprises nested ellipsis: the source clause John revised
his paper before the teacher did of the ellipsis is elliptical itself;
ellipsis resolution is made even more interesting by the presence of
an anaphor. We follow Dalrymple et al. (1991) in assuming ve readings
(listed in (27)) for (25). These ve readings are described by the
constraint in (26).
The Constraint Language for Lambda Structures 17
@
ana X a
lam
@
s
s
lam
before
the teacher
Bill X 0
@
@
revise var
var
s
s
For readability, we again compressed the subconstraint describing
his paper into an empty triangle; the only visible (and interesting) node
is X a , the anaphor. The constraint contains two parallelism constraints,
one for each ellipsis. Note that the source sentence seems to contain a
scope ambiguity between the three fragments corresponding to his pa-
per, John, and before. However, the constraint entails that before takes
scope over John because Y s =Y 0
s
. The remaining
scope ambiguity between his paper and the other two fragments is
spurious; we chose to leave it in the constraint to be closer to what the
syntax/semantics interface (Section 5) would produce.
To understand how the ve (constructive) solutions come about,
let us try to 'solve' the constraint by mimicking rst resolution of the
inner and then of the outer ellipsis. An actual solution algorithm might
behave dierently; in particular, it could interleave resolution steps for
the inner and outer parallelism constraint and other constraints such
as the dominance constraints for a scope ambiguity, as the formalism is
totally declarative. We call the correspondence function on the parallel
contexts that is induced by the inner parallelism constraint c i , and that
of the outer one, c
Resolution of the parallelism constraint for the inner ellipsis will
make the description of the sentence the teacher revised his paper more
explicit. Let us say that the node denoted by the variable for the original
anaphor is a ; then its copy via this parallelism constraint is c i ( a ).
There are two options where c i ( a ) can be linked: either to a (strict {
this produces the rst three readings in (27)) or to 0
, the denotation
of Y 0
(sloppy { this produces the other two readings).
If we now resolve the parallelism constraint for the outer ellipsis,
we produce copies of a and of c i ( a )). The node
a ) can be linked either to a (strict) or to 0
, the denotation of X 0
Markus Egg, Alexander Koller, Joachim Niehren
(sloppy). Likewise, c can be linked either to c i ( a ) (strict), or
it can be linked to the respective value of c
So there are ve possible combinations of linking relations:
(27) 1. ante(c i (a))=a , ante(co(a))=a , ante(co(c i (a)))=c i (a) and
John revised John's paper before the teacher revised John's paper,
Bill revised John's paper before the teacher revised John's paper
2. ante(c i (a))=a , ante(co(a))= 0
John revised John's paper before the teacher revised John's paper,
Bill revised Bill's paper before the teacher revised John's paper
3. ante(c i (a))=a , ante(co(a))= 0
John revised John's paper before the teacher revised John's paper,
Bill revised Bill's paper before the teacher revised Bill's paper
4. ante(c i (a))= 0
John revised John's paper before the teacher revised the teacher's paper,
Bill revised John's paper before the teacher revised the teacher's paper
5. ante(c i (a))= 0
John revised John's paper before the teacher revised the teacher's paper,
Bill revised Bill's paper before the teacher revised the teacher's paper
A reading where a , c i ( a ), and c are all linked to John and
is linked to Bill, which is particularly dicult to exclude in
other approaches, is impossible here, as c must be linked either
to c i ( a ) or to c
4.4. A Complex Interaction
Now we consider an example involving quantication, anaphora, and
ellipsis where all three phenomena interact.
Mary read a book she liked before Sue did.
This sentence, modelled after a Gawron and Peters (1990) example,
has three readings. In the rst, the indenite NP a book she liked takes
wide scope over both clauses (a particular book liked by Mary is read by
both Mary and Sue). The second and third arise from the strict/sloppy
ambiguity that occurs if the operator before outscopes the indenite:
either both read a book that Mary liked, or each read a book she liked
herself. A constraint describing these three readings is shown in (29).
The Constraint Language for Lambda Structures 19
lam
before X 2
@
@
read var
mary X 0
s
sue X 0
For the sake of readability, we once again simplify the semantics of
a book she liked to a mere empty triangle with the anaphoric node X 3 .
The rst reading, with the NP taking wide scope, results when the
relative scope of X 1 and X 2 is resolved such that X 1 dominates X 2 . In
this case, the anaphoric node is not part of the parallel subdomain,
which means that there is no strict/sloppy ambiguity. A schematic
representation of this solution (in which we have compressed even more
sub-lambda structures into empty triangles) is shown in (30).
before X 2
mary X 0
s
sue X 0
The other possible scoping is for X 2 to dominate X 1 . The two
solutions this gives rise to are displayed in (31) and (32). Now the
interpretation of the indenite, below X 1 , is dominated by X s and
is copied by resolving the parallelism constraint. In particular, the
anaphoric node, denoted by X 3 , is copied; the strict/sloppy ambiguity
of its copy is dealt with in the now familiar way.
mary X 0
s
ana
sue X 0
mary X 0
s
ana
sue X 0
Markus Egg, Alexander Koller, Joachim Niehren
4.5. Antecedent-Contained Ellipsis
We conclude this section with a notoriously dicult case of ellipsis,
antecedent-contained deletion (ACD), as in (33).
John greeted every person that Max did.
The problem here is is that the ellipsis is contained in the VP that
it refers to (its 'antecedent'). A naive approach to ellipsis that simply
copies phonetic material from the source to the target sentence runs
into an innite loop as there is always an elliptic sub-sentence left.
Generative syntax solves this problem by raising the universal quan-
tier out of the sentence in LF (Sag, 1980; Fiengo and May, 1994); this
has the eect that the ellipsis is no longer contained in the copied
material. Dalrymple et al. (1991) and Crouch (1995) avoid a similar
kind of recursion by an 'occurs check' of higher-order unication.
In CLLS, the meaning of (33) can be described as follows.
@
every lam X 4
@
person var
@
lam X 2
@
var
lam X 1
@
@
greet var X 9
Like in the other analyses, the universal quantier is not contained in
the source context of the parallelism constraint. 1 As already discussed
in Section 4.3, the constraint also entails that the universal quantier
must take scope over John.
There is one subtle problem, however. Condition P5 in Denition
3.3 requires that if is labelled with var, the binders of and c()
must be binding equivalent, which we have taken to mean 'equal' so
far. However, ACD forces one to soften this restriction: The var-node
3 is bound by X 2 , but X 2 cannot bind the copy of X 3 because it does
not dominate it. Intuitively, it should be permitted for the copy (X 9 )
to be bound by X 1 because if it is, a sequence of -reductions will map
1 If the universal quantier was contained in the context, the only solutions of
the constraint would be innite lambda structures. This means that it would be
unsatisable according to Section 3, as we are interpreting CLLS over nite lambda
structures. This is reminiscent of the occurs check, as the function of an occurs check
is to avoid innite solutions to unication problems.
The Constraint Language for Lambda Structures 21
its copy to the same variable. The separation of the two binders
is merely an artifact of the type-raised analysis of every.
However, checking for -equivalence while processing the constraint
is unfeasible: It is computationally expensive, and it is unclear if it can
be done at all before all readings have been enumerated. Instead, we use
the following revised denition of binding equivalence, which is easier
to check and works for the examples:
DEFINITION 4.1. Let be a lambda structure. Binding equivalence
in is the smallest equivalence relation on nodes in the domain of
such that for all
1. if 1 :lam( 6
where Q is a quantier label, i.e. a member of
2. if 3
The rst branch models -equivalence; the precondition is shown
in (35a). The second branch models -equivalence; its precondition is
shown in (35b). If we modify our denition of the parallelism relation
in this way, the constraint in (34) has exactly the correct solution.
@ 4
lam 2
(b) lam 1
@ 3
lam 2
var 4
Note, by way of conclusion, that our analysis can also account for
the dierence between (36) and (37) (Sag, 1980), the rst of which lacks
one of the two readings of the second one (where the matrix verb want
outscopes the universal quantier).
wants Bill to read everything that Max does.
wants Bill to read everything Max wants him to read.
This blocking is achieved in the CLLS analysis because, as discussed
above, John must be in the scope of the universal quantier (it is
the contrasting element). As every NP argument outscopes the verb
of which it is a syntactic argument, John must outscope want ; so
the relative scope of the universal quantier and want is xed. If the
elliptic material of (36) is spelt out like in (37), there is no parallelism
constraint to enforce wide scope of the universal quantier over John.
22 Markus Egg, Alexander Koller, Joachim Niehren
5. The Syntax-Semantics Interface
This section denes a grammar with a syntax/semantics interface which
allows the derivation of the CLLS constraints for the example sentences
discussed in this paper. As we have used a mixture of type-raised and
rst-order representations of proper names in the examples to improve
readability, we will dene an interface for each version.
We will rst dene the grammar and then the rules for semantic
construction, starting with the type-raised version and then showing
what needs to be changed to get the rst-order representations. Finally,
we will go through an example to show how the interface works.
5.1. Grammar
The grammar is dened by the phrase structure rules in Fig. 1.
Figure
1. The grammar
Most labels for syntactic categories are self-explanatory, perhaps
except for the following: PN is a category that comprises proper nouns
and anaphora, Conj refers to the category of conjunctions like before,
Coord, to the one of sentence coordinators like and, and RP and RCl,
to the categories of relative pronoun and relative clause, respectively.
Beyond transitive and intransitive verbs, we also allow 'AcI verbs' AV
(such as expect) and sentence complement verbs SV (such as say). Conj
and Coord are distinguished because they percolate scope domains in
a dierent fashion.
The lexicon is dened by a relation Lex, which relates words W and
lexical categories 2 fDet; N; IV; TV; SV; productions
expand lexical categories to words of this category.
We make two types of simplifying assumptions about the grammar.
First, we disregard all aspects of syntactic analysis that are inconvenient
for a pure phrase structure grammar, such as agreement. Any
The Constraint Language for Lambda Structures 23
serious NLP system would employ some type of unication grammar,
in which these aspects could be taken care of easily. As a matter of fact,
we have implemented an HPSG grammar that does this and produces
essentially the same constraints as the one presented here.
Second, we assume that the syntax provides coindexation that relates
anaphoric pronouns to their antecedents and relative pronouns
to their corresponding traces, and that the parallelism constraints that
model VP ellipsis are generated by an independent source. Determining
elliptic elements is, to our knowledge, an open problem and therefore
beyond the scope of this paper.
5.2. Semantic construction
The overall strategy of our syntax-semantics interface is to factor out as
much of the constraint construction as possible into the interface rules.
This allows us to keep the entries in the semantic lexicon extremely
simple: most of them introduce just one labelling constraint. We generate
a constraint for each node in the syntax tree; the constraint for the
entire tree will then be simply the conjunction of these subconstraints.
Each node 2 N in the syntax tree is associated with two variables,
(the local scope domain of ) and X r
(the root of the subconstraint
for
denotes the root of the 'semantic contribution'
of the syntactic constituent below . X s
is referred to in scope island
constraints; for each quantier NP , except for indenites, a constraint
keeps the quantier within its scope domain. The values of
are set in the construction rules for embedded sentences; otherwise,
daughters inherit the scope domains of their mothers.
Furthermore, we associate with each NP index i that is used for
coindexation in the syntax tree a variable X i . We will use these variables
to model anaphoric binding and relative clauses.
The (semantic) variables associated with syntactic nodes are related
by the rules in Fig. 2, one for each syntactic rule from Fig. 1. Each
construction rule is applied to syntactic nodes that have been expanded
by a certain syntax rule. These rules are specied on the left hand sides
of the arrows; [ :P Q R] means that node in the syntax tree is labelled
with P , and its two daughter nodes 0 and 00 are labelled with Q and
R, respectively.
The complete constraint which the interface generates is the conjunction
of all of these local constraints, plus the dominances X s
for scope islands, plus constraints for the lexical entries. Most of the
latter constraints are simple labelling constraints; for instance, the
constraint we add for the intransitive verb sleep would be X r
:sleep.
Markus Egg, Alexander Koller, Joachim Niehren
@
000
000
@
lam
@
@
lam
lam X r
@
var
@
var
lam X r
000
Figure
2. The syntax/semantics interface
The Constraint Language for Lambda Structures 25
There are some exceptions to this general rule. First, the elliptic
does (too) does not add a labelling constraint; its semantics is
determined via a parallelism constraint. Furthermore, whenever coindexation
signies a relation between an anaphor 0 and its antecedent
, we add the constraint X r
when we process and the constraint
when we process 0 . Similarly, the constraint
for a relative pronoun with index i at is X r
and the
constraint for the corresponding trace (say, at 0 ) is X r
together with rule (b11), enforces correct binding of the trace.
Finally, the constraints for possessive pronouns, such as his, are
as in (38). Intuitively, we want to analyze the NP his i book just like
the NP the book of him i ; the diagram in (38) hides most details of
this construction for readability, but notice that there is an anaphoric
linking constraint from the anaphoric node to the antecedent X i , as
specied by the syntactic coindexation.
ana
The interface as presented so far will always produce type-raised
representations of all NPs. A version of the interface which produces
rst-order representations of proper names (i.e. as constants of type
e) can be obtained by making exactly two changes to the interface.
For one, the rule (b7) must be replaced by a rule that looks like
(b9); second, the lexicon must be changed to label the nodes with
the constants of type e (i.e., mary instead of Mary).
5.3. An Example
To see how semantic construction works, consider example (39).
person that Bill greeted
The grammar assigns to (39) the parse tree in Fig. 3. From this parse
tree, application of the synsem interface rules returns the constraint in
Fig. 4. First, rule b7 builds the fragment below X 15 plus the node
(with its -link to X 17 ). Next, rules b3 and b1 build up the
subtree below X 9 from the semantics of the verb greet and its two NP
arguments (without the label of X 12 ; recall that the corresponding trace
contributes only an unlabelled node). Then rule b11 constructs the
subtree below X 7 and introduces the -link for X 12 ; the label of X 12
comes from the semantics of the relative pronoun. The root node of the
26 Markus Egg, Alexander Koller, Joachim Niehren
person
RCl
that i
PN
Bill
greeted
Figure
3. person that Bill greeted
lam X 1
@
person X 4 var
@
lam X 7
@
greet var X 12
var
Bill lam X 17
Figure
4. Semantic representation of example (39).
constraint for the relative clause is X 7 . Finally, the subtree below X 1
(the root node of the semantics of (39)) is built according to b10. The
semantic contribution of the noun person is node X 4 .
6. Ecient Disambiguation
A good underspecication formalism should not only allow to write
down appropriate underspecied descriptions, but also to enumerate
their readings eciently. The most optimistic case is that they can be
enumerated in time polynomial in the total number of readings.
In a framework that allows the analysis of ellipsis and anaphora in
addition to scope, it is unlikely that such a low runtime can be obtained.
A prime example is the Dalrymple et al. (1991) analysis of ellipsis: It
uses higher-order unication, which is known to be undecidable.
Similarly, the problem of disambiguating arbitrary CLLS descriptions
(that is, of enumerating all most general solved forms of a
constraint) is very complex. It was shown in Niehren and Koller (1998)
that CLLS is equivalent to context unication (Schmidt-Schau and
Schulz, 1998; Niehren et al., 1997a). There are semi-decision procedures
The Constraint Language for Lambda Structures 27
for context unication, but its decidability is a prominent open problem
in theoretical computer science (RTA, 1998).
For the sublanguage of dominance constraints (which are sucient
for scope underspecication alone), the situation is better: It was shown
in Koller et al. (1998) that the satisability problem of dominance
constraints is decidable, but NP-complete. This means that the most efcient
solution procedure may take (deterministic) exponential time for
enumerating all readings, even if the number of readings is polynomial.
Nevertheless, there are solvers for dominance constraints that perform
very eciently for all constraints from scope underspecication.
These solvers are based on constraint programming with nite sets
(Koller and Niehren, 1999); the general strategy is iterating deterministic
propagation steps and non-deterministic choices. It turns out that
despite the general NP-completeness, all choices made in the disambiguation
of a constraint from scope underspecication are necessary
to distinguish dierent readings; the search never fails. Recent research
in this area focuses on obtaining formal complexity results that model
this experience and on integrating a semi-decision procedure for the
rest of CLLS with a dominance constraint solver. A demo system that
derives dominance constraints describing a scope ambiguity and solves
them eciently is available on the WWW (CHORUS Project, 1999).
7. Conclusion and Outlook
In this paper, we have presented the Constraint Language for Lambda
Structures (CLLS), a rst-order language for semantic underspecica-
tion. CLLS allows the representation of scope ambiguities, anaphora,
and ellipses in simple underspecied structures that are transparent
and suitable for processing. It is a language of tree descriptions that
conservatively extends the language of dominance constraints.
We have shown that CLLS correctly represents many notorious problems
from the literature involving scope, anaphora, ellipses, and their
interactions. An advantage over earlier approaches to this area is that
CLLS analyses are completely order-independent, and the formal foundations
are very transparent. It also provides a clean solution to a problem
with variable binding in the context of scope underspecication
that becomes most obvious in the presence of ellipses.
Although the linguistic coverage of CLLS includes various challenging
problems, it still needs to be extended. The most obvious area for
improvement is a more complete theory of ellipsis. Another interesting
extension is to build dynamic accessibility relations into the denition
of anaphoric links and make the eects of anaphora on quantier scope
28 Markus Egg, Alexander Koller, Joachim Niehren
explicit by reasoning on underspecied structures (Koller and Niehren,
2000). Finally, CLLS can be used to model reinterpretation (meaning
shift) of aspect and NPs in an underspecied way (Striegnitz, 1999; Egg,
1999; Koller et al., 1999).
On the other hand, there are various more formal aspects of CLLS
that can be pursued in the future. One essential problem for any under-
specication formalism is to raise operations on the object level, such
as deduction, to the level of underspecied descriptions. Although there
are some rst results (Jaspars and Koller, 1999), the entire eld is still
in its infancy. Furthermore, it is necessary to nd tractable algorithms
for processing parallelism constraints (Erk and Niehren, 2000).
Acknowledgements
This work was supported by the SFB 378 (project chorus) at the
Universitat des Saarlandes. The article is an updated and revised version
of Egg et al. (1998) and Egg et al. (1999); we are indebted to
Peter Ruhrberg and Feiyu Xu for their contributions to these papers.
The authors wish to thank Manfred Pinkal, Gert Smolka, all members
of the SFB 378 projects chorus, lisa, negra, and nep, and
the commentators and participants at the Bad Teinach workshop on
underspecication.
--R
CHORUS Project:
de/cl/projects/chorus/demo.
Arbeitspapiere der FG Sprachwissenschaft
de/cl/projects/chorus/papers/egg99.
Anaphora and Quanti
Pustejovsky and P.
Deletion and Logical Form.
--TR
--CTR
Manuel Bodirsky , Katrin Erk , Joachim Niehren , Alexander Koller, Underspecified beta reduction, Proceedings of the 39th Annual Meeting on Association for Computational Linguistics, p.74-81, July 06-11, 2001, Toulouse, France
Katrin Erk , Joachim Niehren, Well-nested parallelism constraints for ellipsis resolution, Proceedings of the tenth conference on European chapter of the Association for Computational Linguistics, April 12-17, 2003, Budapest, Hungary
Alexander Koller , Stefan Thater, An improved redundancy elimination algorithm for underspecified representations, Proceedings of the 21st International Conference on Computational Linguistics and the 44th annual meeting of the ACL, p.409-416, July 17-18, 2006, Sydney, Australia
Michael Schiehlen, Ellipsis resolution with underspecified scope, Proceedings of the 40th Annual Meeting on Association for Computational Linguistics, July 07-12, 2002, Philadelphia, Pennsylvania
Katrin Erk , Joachim Niehren, Dominance constraints in stratified context unification, Information Processing Letters, v.101 n.4, p.141-147, February, 2007
Manuel Bodirsky , Denys Duchier , Joachim Niehren , Sebastian Miele, A new algorithm for normal dominance constraints, Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete algorithms, January 11-14, 2004, New Orleans, Louisiana
Alexander Koller , Joachim Niehren , Stefan Thater, Bridging the gap between underspecification formalisms: hole semantics as dominance constraints, Proceedings of the tenth conference on European chapter of the Association for Computational Linguistics, April 12-17, 2003, Budapest, Hungary
Ralph Debusmann , Denys Duchier , Alexander Koller , Marco Kuhlmann , Gert Smolka , Stefan Thater, A relational syntax-semantics interface based on dependency grammar, Proceedings of the 20th international conference on Computational Linguistics, p.176-es, August 23-27, 2004, Geneva, Switzerland
Alexander Koller , Stefan Thater, Efficient solving and exploration of scope ambiguities, Proceedings of the ACL 2005 on Interactive poster and demonstration sessions, p.9-12, June 25-30, 2005, Ann Arbor, Michigan
Joachim Niehren , Stefan Thater, Bridging the gap between underspecification formalisms: minimal recursion semantics as dominance constraints, Proceedings of the 41st Annual Meeting on Association for Computational Linguistics, p.367-374, July 07-12, 2003, Sapporo, Japan
Ruth Fuchss , Alexander Koller , Joachim Niehren , Stefan Thater, Minimal recursion semantics as dominance constraints: translation, evaluation, and analysis, Proceedings of the 42nd Annual Meeting on Association for Computational Linguistics, p.247-es, July 21-26, 2004, Barcelona, Spain
Ernst Althaus , Denys Duchier , Alexander Koller , Kurt Mehlhorn , Joachim Niehren , Sven Thiel, An efficient graph algorithm for dominance constraints, Journal of Algorithms, v.48 n.1, p.194-219, August
Denys Duchier, Dominance constraints with Boolean connectives: a model-eliminative treatment, Theoretical Computer Science, v.293 n.2, p.321-343, 6 February
Manuel Bodirsky , Martin Kutz, Determining the consistency of partial tree descriptions, Artificial Intelligence, v.171 n.2-3, p.185-196, February, 2007 | underspecification;ellipsis;anaphora;tree descriptions;scope ambiguity |
596041 | Towards the Use of Automated Reasoning in Discourse Disambiguation. | In this paper, we claim that the disambiguation of referring expressions in discourse can be formulated in terms automated reasoners can address. Specifically, we show that consistency, informativity and minimality are criteria which (i) can be implemented using automated reasoning tools and (ii) can be used to disambiguate noun-noun compounds, metonymy and definite descriptions. | Introduction
It has long been thought that much of the burden of Natural Language
understanding and generation in automated systems could be carried
by inference. The most obvious early example of this is Winograd's
SHRDLU system (1973), implemented in PLANNER (Hewitt, 1969),
the earliest logic programming language. SHRDLU was a simulated,
language-understanding robot. It interpreted Natural Language input
in terms of decomposable procedures for achieving a state of the world
in which the input was true or for assessing whether it was already true,
with the resulting sub-goal structure (a plan or proof) then available
for answering questions about the system's actions. Thus SHRDLU
could understand and respond (either in language or simulated action)
to input utterances by proving that an utterance was meaningful, with
the proof providing a basis for its response.
While a full survey of inference in Natural Language understanding
is beyond the scope of this paper, besides SHRDLU it is worth mentioning
Charniak's PhD thesis (1972) on children's story understanding,
which assumes that stories are
\immediately translated into an internal representation which is
convenient for doing deduction" (Charniak, 1986), p.337.
Charniak's system used rules triggered by evidence in a story, to make
connections between story elements that are not expressed explicitly
and thereby to answer questions about the story.
In the 1980's, work on task-related dialogues by Allen and Perrault
(1982), Litman and Allen (1990) and others, showed how systematic
c
2001 Kluwer Academic Publishers. Printed in the Netherlands.
Claire Gardent and Bonnie Webber
inference on a hearer's part about a speaker's beliefs and goals could
be used in understanding questions (often fragmentary indirect speech
acts) and in responding to them cooperatively. Appelt's PhD thesis
(1985) was the most detailed study of its time of the role inference could
play in Natural Language generation, and the framework he developed
was able to produce utterances that could satisfy a hearer's domain
needs and his/her understanding abilities.
However, for a long time, formal reasoners were too slow and the
amount of knowledge they needed was too vast, to support their use in
anything other than a toy system or PhD thesis. This situation is now
changing: in Natural Language generation, fast automated reasoners
are being used in integrated systems for micro-planning (Stone, 1998;
Stone, 2000; Stone and Doran, 1997; Stone and Webber, 1998; Stone
et al., 2001; Gardent and Striegnitz, 2001), while in Natural Language
understanding { the concern of this paper { fast automated reasoners
are being employed over an ever-expanding range of problems.
In this paper, we focus on the role inference can play in disam-
biguation, provided that disambiguation problems can be formulated
in terms that automated reasoning tools can address. Here we look only
at reasoning in rst-order logic.
There are many types of ambiguities in natural language. Word
sense ambiguity arises from the fact that a word can have dierent
meanings. This has been addressed by e.g. (Charniak, 1986; Lehnert,
1986; Wilks, 1986) and (Hobbs et al., 1993) who showed how to identify
a word meaning in a given context using script-based and abductive
inference respectively. Structural ambiguity involves the possibility of
multiple syntactic analyses of a string. But since each syntactic analysis
may have a dierent semantic analysis, structural ambiguity often
correlates with semantic ambiguity as well, as for instance in prepositional
phrase and relative clause attachment (Crain and Steedman,
1985). Resolution ambiguity covers the many possible ways in which
semantically underspecied elements such as anaphors or ellipses can
be interpreted in a given context, while projection ambiguity refers to
the various ways in which a presupposition can be integrated into the
overall meaning of a text. The role that inference can play in resolving
projection ambiguity has been demonstrated by (Blackburn and Bos,
1999; Blackburn et al., 1999) who showed that existing rst-order theorem
provers and model builders can be used to weed out some of the
impossible readings. Scope ambiguity refers to the fact that a quantier
or a focus-sensitive operator such as \only" can include more or less
of its matrix utterance within its scope. Again (Blackburn and Bos,
have shown that rst-order automated reasoning tools can be
used to rule out some of the illegitimate scopings namely, those that
are incompatible with world knowledge. Finally, speech act ambiguity
refers to the alternative possible dialog functions that an utterance
can have. As mentioned earlier, plan-based inference techniques can
help deal with this problem (Allen and Perrault, 1982; Chu-Carroll
and Carberry, 1994; Litman and Allen, 1990; Lambert and Carberry,
1999), and statistical dialogue modelling may prove a help here as well
(Stolcke et al., 2000).
In this paper, we concentrate on how inference can be used to resolve
ambiguities involving referring expressions in discourse: specically, we
show that the method initiated in (Blackburn and Bos, 1999) for dealing
with projection ambiguity can be successfully used for resolving
underspecied entities and relations, by dispreferring resolutions that
lead to inconsistent or uninformative readings. Additionally, we argue
that model minimality is another factor that can be checked using automated
reasoning tools and can serve ambiguity resolution: given several
competing interpretations, these interpretations which are satised by
the smallest model (smallest domain, smallest interpretation function)
are often the preferred interpretations. The underlying intuition is that
minimal models yield interpretations that are more \coherent" than
non-minimal ones.
The paper is structured as follows. We start in Section 2 by arguing
for a certain type of interaction between NLP and automated reasoning
and show how checks for consistency, informativity and minimality can
be implemented using automated reasoning techniques. In Section 3, we
then consider the interpretation of noun-noun compounds, metonymy
and denite descriptions and show that their disambiguation through
contextual reasoning can be done through checks for consistency, informativity
and/or minimality. We conclude in Section 4 with pointers
for further research.
2. NLP and Automated Reasoning
There are essentially two ways to integrate automated reasoning into
NL understanding: one can use it to resolve underspecied interpretations
or one can use it to lter out unwanted interpretations resolved
by other means.
In the rst approach, which we will refer to as a constructive ap-
proach, an underspecied semantic representation i.e., a formula containing
rst-order and/or higher-order variables, has those variables
resolved (i.e., instantiated) in the course of being proven with respect to
the knowledge base. Thus a more specic representation is constructed
from one that is underspecied. This approach is used in (Hobbs et al.,
4 Claire Gardent and Bonnie Webber
1993; Gardent and Konrad, 2000a) and to a lesser degree in (Lascarides
and Asher, 1993). Thus (Hobbs et al., 1993) uses abduction to prove an
unresolved semantic interpretation. When this requires making assumptions
about the values of variables that make the formula true, these
assumptions become part of the interpretation, thereby specifying it
further. Similarly, (Lascarides and Asher, 1993) applies a process of
default inference to an underspecied discourse representation to compute
its semantic interpretation. Defeasible content added by default
also becomes part of the interpretation, again specifying it further.
As others have remarked, the use of abduction for NL understanding
has much in common with model-building, as in (Gardent and Konrad,
2000a; Baumgartner and Kuhn, 1999; Ramsay and Seville, 1999).
model builder is a program that takes a set of logical formulae and
returns some of the models that satisfy .) Where model-building is
used for NL interpretation, the interpretation of a formula is some
(carefully selected) model satisfying . As with abduction, a model may
make information explicit that is only implicit in the input formula
i.e. the semantic representation of the input discourse (Gardent and
Konrad, 2000a).
The merit of using reasoning to resolve underspecied interpretations
is that it integrates knowledge-based reasoning directly into the
interpretation process. In the case of model building, this has the advantage
of providing a consistency check \for free", since the only models
that will be built are both logically consistent and consistent with world
knowledge. If model building and/or abduction is used to produce a set
of possible interpretations for some input formula, members of the set
can be compared and ranked according to any desired metrics. This
provides a direct handle on the ranking of competing interpretations
for a given discourse.
The downside of using reasoning in this way is that ambiguity and
underspecication are resolved purely on the basis of semantic content.
This is in contrast with van der Sandt, who (in the case of presupposition
projection) makes essential use of the structure of the semantic
interpretation (van der Sandt, 1992). One can, of course, take this (and
anything else) into account, but it requires explicit encoding in terms
of additional predications. An approach that uses weighted abduction
to resolve interpretations also suers from the problem of motivating
the abductive cost of each type of assumption and verifying that it
produces the intended result whenever used.
The second way of integrating automated reasoning into NL understanding
is to use it to complement separate specialised algorithms for
resolving underspecication and ambiguity. In particular, when more
than one possible reading is found for the input discourse, automated
reasoning (in the form of theorem proving and/or model building)
can be used to lter out unwanted ones. For instance, (Blackburn
et al., 1999) compute all possible presupposition projections for an
input discourse using van der Sandt's projection algorithm (van der
Sandt, 1992), and then use rst-order theorem proving and model building
to apply van der Sandt's pragmatic constraints on presupposition
projection to eliminate implausible readings.
The drawback of such a ltering approach is that it requires all
ambiguities (including structural ambiguities, resolution ambiguities,
projection ambiguities, etc.) to be identied and the resulting possible
analyses enumerated. Dependencies between expressions and between
types of ambiguities can make the process of computing all and only
the possible analyses of a text, quite complex { a complexity that
the ltering methods presented here do not address. Moreover, a complete
enumeration seems far away from \how people process discourse",
although it does take advantage of what systems can do well
While a complete enumeration would be ine-cient if possible analyses
were simply ltered sequentially, ignoring commonalities that would
allow subsets to be ltered simulataneously, the input to ltering need
not be the entire set of possible interpretations of a (small) discourse. If
such interpretations could be generated in order of minimality (just as
in breadth-rst search, solutions are generated in shortest-rst order,
and in A* search, in best-rst order with respect to a given heuristic),
then consistency and informativity could be applied locally to either
accept the current interpretation, or reject it in favor of the one with
the next most minimal model that satises these tests. (This is what is
assumed in (Crain and Steedman, 1985).) Additional non-logical tests
(not described here) could then be applied to choose between readings
that were equally minimal or incomparable with respect to minimality.
In either case, we look to take advantage of the resources provided by
automated reasoners and tune them (through discourse-designed test
suites) to better satisfy our needs.
On the other hand, the value of a ltering approach is that it supports
a precise specication of what is relevant to each decision and
how it is used. For this reason, we adopt here a ltering approach,
starting with an enumeration of readings expressed in a many-sorted
rst-order logic. We then show that automated reasoning can use the
criteria of consistency, informativity and minimality to identify and
lter out unwanted readings. We shall see that in many cases, these
three criteria su-ce to eliminate linguistically invalid readings and rank
the remaining acceptable ones. First, however, we describe these criteria
and show how they can be tested using techniques from automated
reasoning.
6 Claire Gardent and Bonnie Webber
2.1. Consistency
It is well-known that rst-order consistency and validity problems are
undecidable: Given a formula , there is no guaranteed method of computing
whether or not is consistent. However (Blackburn et al., 1999)
shows that state-of-the-art, sophisticated rst-order theorem provers
and model builders can be of practical use in checking consistency for
at least some classes of linguistic problems. The idea is to use theorem
provers and model builders in parallel.
Specically, suppose we want to check the consistency of . We can
simultaneously ask the theorem prover to prove : and the model
builder to construct a model that satises . If the theorem prover
succeeds, : is valid, hence is inconsistent. (If the theorem prover
returns no result, either : is valid but the theorem prover ran of
resources, or : is invalid.) On the other hand, if the model builder
succeeds, then is satisable and hence consistent. Although there
always remains the possibility either that both theorem prover and
model builder run out resources, or that neither program terminates
on some given input (even given unlimited resources), for at least the
presupposition projection problem studied in BBKN, state-of-the-art
automated reasoning systems return an answer almost all of the time
and do so reasonably e-ciently.
The question remains however, of whether the same will hold true
of all inference tasks in discourse understanding. We can only tell this
by clearly specifying the tasks. Developers can then try to tune their
systems to perform e-ciently and eectively on these tasks. The aim
of the present paper is to provide pointers to further language-related
tasks.
2.2. Informativity
BBKN show that informativity can be treated as a validity problem.
Suppose NEW is the formula we want to test for informativity. Then
it is informative with respect to a discourse context OLD and general
world knowledge KB just in case NEW is not entailed by OLD ^ KB.
Equivalently, NEW is informative with respect to OLD and KB just
in case (OLD NEW is not valid.
2.3. Minimality
Minimality, in some form, has continually been invoked as an important
factor in choosing among competing readings of a text, including (Crain
and Steedman, 1985; Johnson-Laird, 1983) inter alia. Intuitively, minimality
resembles the early AI planning heuristic (Sacerdoti, 1977): \Use
existing objects", but extended to include not just individuals but all
semantic entities e.g., properties, relations and propositions, and taking
\existing" to mean \discourse old" or \discourse salient". Minimality
thus serves discourse coherence by favouring readings which continue
to communicate about (or in terms of) the same things over those that
introduce new ones.
Although minimality is not as straightforward a concept as consistency
and informativity, nevertheless one can begin to identify the easy
cases and specify precisely how to capture various aspects of minimality
in a framework of automated reasoning { in particular, in a framework
of model building. Within such a framework, one can also begin to lay
down guidelines for constructing models in less straightforward cases,
to produce minimal models that accord with the speaker's intended
meaning.
As noted earlier, given a set of formulae , a model builder returns
some of the models satisfying . A model is a mathematical structure
that describes how the symbols of a logical theory are interpreted.
Specically, a model for a rst-order language L is a pair hI; Di with
D a non-empty set of entities (the domain of individuals) and I an
interpretation function which maps relation symbols in L to relations
of appropriate arity in D and constant symbols in L to elements of D.
Here we identify these models with sets of positive assumptions that
unambiguously dene the interpretation of the relation symbols and x
the interpretation of terms to rst-order entities that carry a unique
name. These are known in the literature as Herbrand models.
For example, given sentence (1a) and its logical form (1b), the
set (1c) is one of the Herbrand models satisfying (1b). In this model,
there is an individual c 1 who is a friend of Jon and who Jon interred
(i.e., buried).
(1) a. Jon interred his friend.
b.
The model M 1 denes an interpretation of the predicates friend and
inter over the universe of discourse g. It can also be taken
as a valid interpretation of (1a). There are, however, innitely many
other Herbrand models for (1b) which do not adequately capture the
meaning of (1a) e.g.,
The model M 2 declares Jon to be his own interrer, which is not the
intended or even a possible meaning of (1a) 1 . In the case of M 3 , the
1 The object of \inter" is, by denition, dead or at least taken to be so.
8 Claire Gardent and Bonnie Webber
model contains an extraneous assertion namely, that Jon is married. As
this is neither expressed nor entailed by the input discourse (1a), the
model fails to appropriately capture its meaning: while it is possible
to assume married(jon), it is not necessary for explaining the meaning
or truth of (1a). In short, just as in the story The Three Bears, while
some satisfying models are too small
some seem \just right" to capture the preferred meanings that a hearer
associates with a discourse. These are the ones we are interested in for
Natural Language applications.
To eliminate models that are \too big", we restrict the set of linguistically
interesting models to those models that are in some sense
minimal. The intuition is that the linguistically interesting models are
often those that show the truth of the input theory by making the fewest
possible assumptions and by using the fewest \objects" (i.e., individu-
als, properties, relations, propositions). In what follows, we make use of
a form of minimality introduced by (Gardent and Konrad, 2000a) for
interpreting denite descriptions namely, local minimality. Since this
notion incorporates both domain minimality and subset minimality,
we rst explain these two concepts.
Domain minimality (Hintikka, 1988; Lorenz, 1994) selects from among
the many models satisfying the input specication , those models that
have the smallest universe (i.e. domain of individuals).
Domain Minimality: Let be a set of rst-order formulas and
S be the set of Herbrand models of . Then a model hI; Di 2 S is
domain minimal i there is no other model hI
the cardinality of D 0 is smaller than the cardinality of D i.e. jD 0 j < jDj.
By contrast, subset minimality (Bry and Torge, 1996; Schutz, 1999)
minimizes facts rather than individuals 2 .
Subset Minimality: Let be a set of rst-order formulas and D
be the set of Herbrand models of . Then a model hI; Di 2 D is subset
minimal i there is no other model hI such that I 0 I.
Finally, local minimality requires models that satisfy some input
within a minimal domain D of individuals and are subset-minimal with
respect to all other domain minimal models. To spell this out explicitly:
be a set of rst-order formulas and D be
the set of Herbrand models of that use some nite domain D whose
size is minimal. Then a model hI; Di 2 D is local minimal i there
is no other model hI such that I 0 I .
Subset minimality is also used in Circumscription (McCarthy, 1980), to dene a
consequence relation j=c such that j=c i is true in all subset-minimal models
of . In this paper, we do not use j=c , using subset minimality only as a way to help
determine a preferred interpretation.
Local minimal models are the simplest in the sense of Occam's Razor
and often the best explanation for the truth of an observation. By preferring
subset minimal models, for example, local minimality correctly
rules out M 3 as not yielding a correct interpretation of example (1a).
Eliminating models that are \too small" is less straightforward: the
problem is that a locally minimal model satisfying the input semantic
representation may not capture the preferred reading of the corresponding
discourse. In such cases, model theoretic semantics interacts
with other linguistic and non-linguistic knowledge sources (i.e., syntax,
prosody, pragmatics and world knowledge) to determine the preferred
reading, and it is this interaction that needs to be captured.
One simple instance of this interaction is illustrated by the discourse
(1a) and its locally minimal model M 2 , which does not adequately
capture its meaning. If the input specication were augmented with
appropriate world knowledge { namely, that one cannot inter oneself
{ then M 2 would never be constructed because the model builder can
only build models that are both logically consistent and consistent with
world knowledge. Thus M 1 would then be the locally minimal model
and hence the preferred reading for (1b).
More complex cases arise when factors other than world knowledge
contribute to ruling out locally minimal models that a hearer would
take to be \too small". For example, consider
a. Jon likes his friend.
b.
d.
Both M 1 and M 2 are satisfying models for (4b). But the locally mini-
mal, hence preferred, model for (4b) is M 2 which states that Jon likes
himself. Although this is a possible meaning for (4b) { i.e., if Jon's
only friend is himself { mutatis mutandis, M 2 is not the preferred
interpretation for (4a).
Here, pragmatics comes into play, as models such as M 2 can often
be eliminated by taking account of the Gricean maxim of manner: Be
perspicuous (Grice, 1975). Specically, if the speaker intended two NPs
to refer to the same object, she would have used a lexico-syntactic
construction that customarily implies this (i.e., Jon likes himself ).
So as long as appropriate knowledge from prosody, pragmatics, world
knowledge, etc. can be identied and included in the input specication
along with the semantic representation of the input discourse, model
building can automatically rule out any model that is inconsistent with
the overall input specication.
On the other hand, speakers often violate the Gricean maxims for
particular eects. For instance, in
Gardent and Bonnie Webber
(5) Jon admires his favorite person.
the speaker may intend for the hearer to recognise that Jon's favorite
person is Jon.
In short, minimality, even when combined with inconsistency, does
not produce a perfect test, ruling out all and only non-preferred read-
ings. But if we can characterise the situations in which it is a good test
(i.e., its false positive rate and false negative rate are low), it would be
worth applying in those cases.
Finally, note that minimality cannot, by itself, be used as a basis for
deciding between competing possible readings of anaphoric pronouns.
Consider
Jon insisted that Fred drive [but, because] he was too tired.
Models in which he co-refers with Jon and ones in which he co-refers
with Fred are equally minimal, but one seems preferred in the case
of \but" (i.e., Fred), while the other seems preferred in the case of
\because" (i.e., Jon). So the preferred interpretation must be decided
by other means.
The approximation of discourse coherence given us by local minimal
models is both less than and dierent from that used by (Lascarides
and Copestake, 1999; Asher and Lascarides, 1998) to resolve noun-noun
compounds, metonymy and denite descriptions. That treatment
is grounded in discourse coherence associated with discourse relations
(causality, narrative, background, concession etc.) that are taken to
hold between eventualities. Establishing what relation holds in a particular
case involves both logical deduction and defeasible reasoning.
In contrast, the minimality-coherence discussed here, while it does not
address the full discourse interpretation problem, involves only a simple
bias that can be checked using rst-order model building.
3. Case Studies
In the preceding section, we have proposed using automated reasoning
to lter out possible but unwanted (or non-preferred) readings of a
discourse, leaving either a single intended reading or a set of readings
among which a most preferred one can be chosen using non-logical
means (e.g., prior or conditional probabilities). We have suggested three
criteria that support this selection process { consistency, informativity
and minimality { and described how they can be assessed through automated
reasoning. Here we show how these three criteria can be used,
individually and jointly, in the discourse interpretation of three dierent
phenomena that are well-known for ambiguity: noun-noun compounds,
metonymy, and denite noun phrases.
In each case, we start with the set of possible semantic representations
of a text. Tests for consistency and informativity may then rule
some of them out. Local minimality is then applied to the set of locally
minimal models satisfying the remaining semantic representations. In
some cases, the set may contain models that do not stand in a subset
relation to each other, as when one model contains specic individuals
and another, generic ones. Such models are incomparable with respect
to local minimality. Where those models all embody legitimate and
equally preferred readings, ranking is neither required nor desired.
However, problems do arise where either incomparable models or
comparable models of equal minimality embody readings with dierent
degree of acceptability. In some cases, one may be able to appeal to
other types of minimality which draw on relations other than sub-
set. For instance, (Gardent and Konrad, 2000b) introduce conservative
minimality, a conservative extension of local minimality, to model the
interpretation of reciprocals. In other cases, factors other than minimality
will probably have to be brought into play to choose between
possible models, such as preferences for certain sources (e.g. world
knowledge versus discourse context) or types (e.g. anaphoric link versus
accommodation) of resolution, or notions of domain-specic salience or
likelihood. Our point is to show that e-cient automated reasoning can
quickly dispose of what is unwanted or non-preferred on formal grounds,
not that it solves the problem of discourse interpretation in its entirety.
3.1. Noun-Noun Compounds
Noun-noun compounds involve implicit relations between the denotations
of their component nouns. Because world knowledge admits so
many dierent relations { (Russell and Norvig, 1995) notes
Compound Relation
basketball shoes used-for
baby shoes used-by
alligator shoes made-of
designer shoes made-by
brake shoes part-of
(to which can be added \toe shoes" (used-for-standing-on) and \tap
shoes (containing), etc.) { noun-noun compounds have long held a fascination
for NLP research (Finin, 1980; Hobbs et al., 1993; Levi, 1979).
Recently, researchers such as (Lascarides and Copestake, 1999) have
begun to consider noun-noun compounds in the context of discourse
Gardent and Bonnie Webber
understanding, where new relations introduced by the discourse may
also be relevant to nding a referent for the noun phrase (NP) in which
the compound occurs. For example, in the isolated utterance
(7) The California student produced an excellent report.
the compound California student involves some relation between California
and student that can be attributed to the referent of the NP
\the California student". Here the most plausible relation holding between
a student (i.e., a person) x and a state y is known from world
knowledge to be x being from y. Thus, \the California student" most
plausibly refers to the student who is from California (whoever that is).
However, (Hobbs et al., 1993; Lascarides and Copestake, 1999) show
that in discourse, other relations are not only possible but preferred:
Each student was assigned a state to study. The California student
produced an excellent report.
While it is still possible that the intended relation between \student"
and \California" is that of being from, the most plausible relationship
between them that could be attributed to the intended referent of
the NP is student assigned to study California. This relation is one
made available by the discourse context, overriding possibilities made
available by general world or lexical knowledge.
In what follows, we assume that the possible interpretations of a
compound have already been identied by a separate process that has
access to the discourse context, lexical knowledge, and general world
knowledge. Checks for consistency, informativity and minimality can
then be used to determine which interpretation is preferred.
3.1.1. Minimality
Minimality can be used to determine the preferred interpretation of
Example (8), repeated below. 3
Each student was assigned a state to study. The California
student produced an excellent report.
As noted earlier, we assume that possible readings of each utterance
have already been identied { here, two dierent ways of resolving the
relationship between \student" and \California" { the rst (9a) arising
from the discourse context, and the second (9b), from the general world
knowledge:
a. The student assigned to study California produced an excellent
report
b. The student from California produced an excellent report.
3 In Example (7), the discourse context is empty, so the only relations available
for resolving the compounds are those provided by lexical and world knowledge.
To see how the preferred reading (9a) can be chosen on the basis of
minimality from among those oered for ltering, consider the following
models for Example (8).
Because M b1 and M b2 are both models for the same interpretation
of (8), M b2 would be eliminated from consideration by being less domain
minimal than M b1 , even though M b1 contains information not
entailed by reading (9b) { namely, that the student from California
who produced an excellent report was assigned to do that report on
California. Thus, as we saw before with Examples 1 and 4, minimality
sometimes delivers interpretations that are overly specic.
Applying local minimality to the remaining models M a and M b1 ,
the smallest model for (8) is M a . By taking the smallest (and hence,
the simplest) model explaining the truth of a discourse as yielding the
preferred reading { i.e., the one believed to be intended by the speaker
{ we can say that by minimality, (9a) is the preferred reading.
3.1.2. Consistency
Consider the following variant of (8):
After each student was assigned a state to study, the California
student, who had been assigned Ohio, started work immediately.
As with (8), there are at least two possible ways of resolving the relation
between \California" and \student". These lead to the following
meanings for the resolved discourse:
a. The student from California, who had been assigned to study
Ohio, started work immediately.
b. The student assigned to study California, who had been assigned
to study Ohio, started work immediately.
Assuming that a \quantity implicature" (Grice, 1975) leads us to
interpret \a state" in Example 11 as \exactly one state", reading (12b)
yields a contradiction. This is something that can be detected by a
consistency check, which would thereby rule it out. This leaves (12a)
as the preferred reading for (11).
Now consider another variant of Example 8:
Each student was assigned a state to study. The California student
agreed to work on Ohio.
14 Claire Gardent and Bonnie Webber
Again, there are two possible ways of resolving the relation between
\California" and \student", leading to the following further specica-
tions of the second sentence:
a. The student from California agreed to work on Ohio.
b. The student assigned to study California agreed to work on Ohio.
These interpretations are neither inconsistent nor uninformative. So
the same reasoning as in (8) would lead one to expect a preference
for (14b) by local minimality. Yet it is (14a) that seems preferred. One
possible and detectable explanation for this is that under interpretation
(14b), a presupposition triggered by the discourse becomes inconsistent.
Specically, if x agreed to P is taken to presuppose x was asked to P 4 ,
then the presuppositions of the two readings in (14) are:
a. The student from California was asked to work on Ohio.
b. The student assigned to study California was asked to work on
Ohio.
If \assigned to study California" entails \asked to work on California",
then presupposition (15b) is inconsistent. As (van der Sandt, 1992)
shows, inconsistent presuppositions result in discourses that are pragmatically
odd. 5 Assuming that consistency is applied to the presuppositions
of a discourse as well as to the discourse itself (using (Blackburn
et al., 1999) or perhaps the more e-cient approach described in (Monz,
1999)), (14a) will correctly be found to be the preferred reading for (13).
3.1.3. Informativity
Informativity can also be used to determine the preferred interpretation
of a noun-noun compound. Consider this next variant on Example 8:
Each student was assigned a state to study. The California student
was assigned California.
a. The student from California was assigned California.
b. The student assigned to study California was assigned California
Although interpretation (16b) has a smaller locally minimal model than
interpretation (16a), it is not preferred as it results in a non{informative
utterance.
As with consistency, however, informativity must also be applied to
the presuppositions of each interpretation, as in this nal variant of
Example 8:
4 This is because x didn't agree to P also seems to presuppose x was asked to P.
5 Presupposition (15b) is not inconsistent if one assumes dierent agents for
\assign" and \ask" (i.e., a dierent person assigning the student to study California
from the one asking her to work on Ohio). However, such a model would not be
constructed since it is not locally minimal.
Each student was assigned a state to study. The California student
agreed to work on California.
If the factive x agreed to P is taken to presuppose x was asked to P,
then the presuppositions of the two interpretations of (17) are:
a. The student from California was asked to work on California.
b. The student assigned to study California was asked to work on
California.
The non-informative presupposition in (18b) thereby makes its corresponding
reading dispreferred.
3.2. Metonymy
The second case we will look at involves metonymy { i.e., using a word
or phrase for another that it suggests { for example, using the container
for the thing contained or vice versa, as in
(19) The (wine, salt, meat) is on the table.
used for
(20) The (wine bottle, salt celler, platter of meat) is on the table.
Some verbs such as \start", \nish", \enjoy", \loathe", etc. that have
straightforward compositional readings when applied to events or activities
as in
nished preparing the peas.
are metonymic when applied to non-activities, as in
a. Jane nished the peas.
b. Sarah enjoyed California.
When the context is empty, as in (22), the preferred readings of
\nish the peas" and \enjoy California" are those given by lexical
knowledge i.e., nish preparing (or eating) the peas and enjoy visiting
California. Given an appropriate context however, as in
a. Jane was replenishing the shelves in the canned vegetable aisle.
After she nished the peas, she moved on to the artichokes.
b. Sarah read books about all the Western states. California she
enjoyed, but not the others.
the preferred readings are those that result in a minimal interpretation
i.e., replenish the shelves of canned peas and read about California.
We focus here on (23b), as \nish the peas" has a similar expla-
nation. To see how minimality yields the preferred reading for this
example, consider its models under the alternative reconstructions of
the metonymy. (For simplicity, we give the models for \Sarah read
about all the Western states. California she enjoyed." rather than for
the whole discourse):
Claire Gardent and Bonnie Webber
Compared with M b , M a has fewer assertions and is therefore locally
minimal. It also correctly re
ects the preferred interpretation for (23b),
the interpretation in which Sarah enjoyed reading about California
rather than visiting it.
minimality predicts that readings that \use existing objects"
are preferred over those that do not and therefore that interpreting
metonymy with respect to relations introduced by the previous discourse
will be preferred over interpreting it with respect to relations
made available by world knowledge.
In Section 2.3, we noted that minimality can make wrong predictions
in certain discourse situations and that it would be useful to be able to
avoid the expense of applying a local minimality lter there. Cases of
metonymy allow us to start identifying those situations. Consider the
following examples:
a. When Sarah read books about the American West, she really
enjoyed California.
b. After Sarah read books about the American West, she really
enjoyed California.
c. Before Sarah read books about the American West, she really
enjoyed California.
Example (25a) shows a preference for a discourse interpretation of
metonymy \reading about California", while (25b) shows a marked
dispreference, favoring the lexical interpretation { \visiting California".
(25c) is similar, although the eect seems less strong.
Since the only dierence in these examples is in the choice of con-
nective, this must be the source of the dierence in preferred readings.
What is known about \when" (Moens and Steedman, 1988) is that it
signals a causal or contingent relation between the eventuality described
in the \when" clause e when and that described in the matrix clause
e matrix . In explaining this, Moens and Steedman invoke the idea of an
event nucleus consisting of a preparatory process (prep(e)), followed by
an instantaneous culmination (cul(e)), and nally a consequent state
(conseq(e)). In these terms, a contingent relation holds between e when
and e matrix when e matrix is part of prep(e when ) (as in Example 25a) or
when it is part of conseq(e when ), as in
When Jon spilled wine over Harold, he apologised profusely.
On the other hand, \before" and \after" only convey a temporal relation
between the two eventualities. 6
Examples such as (25) therefore suggest that local minimality is
not an appropriate lter for discourse interpretations when temporally
distinct eventualities are being described. This does not mean that the
locally minimal interpretation may not, at times, be correct in such
situations { just that minimality ltering would be the wrong basis on
which to draw such a conclusion, since it will often lead to incorrect
results.
Notice that this predicts that one should also not use minimality
ltering in \when" clauses where e matrix is a separate eventuality that
is a contingent consequence of e when , as in
When Sarah read all the library's books about the American West,
she then really enjoyed California.
As predicted, minimality ltering gives an incorrect result.
The approach to metonymy presented here is complementary to
that presented in (Markert and Hahn, 1997; Hahn and Markert, 1999).
Markert and Hahn take the position that it is not type clashes that
signal to a reader that a phrase should be interpreted metonymically,
but rather a preference for interpreting denite noun phrases anaphorically
(i.e., as referring to a previously mentioned entity) or bridging
(i.e., as systematically related to such an entity). They address in
detail the complex reasoning involved in recovering relevant possible
interpretations of a metonymic phrase, as well as choosing the most
likely. Their self-imposed constraint of incrementality, however, requires
that they make this decision immediately before processing any further
material in the utterance. Thus their approach does not allow them to
take full advantage of tests provided by consistency, informativity and
minimality.
3.3. Definite Descriptions
In our nal case study, we show that minimality, consistency and informativity
can also be used in resolving denite descriptions.
Following (Strawson, 1950), singular denite descriptions (i.e. NPs of
the form the N ) are usually taken to presuppose the existence of some
6 Such a relationship does not by itself appear su-cient for coherent discourse,
and (25b) also implies positive causality (that the knowledge acquired through
reading enhanced the experience), while if anything (25c) implies negative causality
(that the knowledge acquired has now eliminated or diminished that enjoyment).
But causality is not an intrinsic feature of either \before" or \after", but rather
something deriving from the reader's beliefs about the eventualities themselves and
their possible relations.
Claire Gardent and Bonnie Webber
individual uniquely satisfying the given description. In what follows,
we will assume van der Sandt's anaphoric account of presuppositions
(van der Sandt, 1992) { that they are anaphors with an unusually rich
descriptive content. Like anaphors, presuppositions can be resolved to
some antecedent made available by the context. (Standard terminology
calls this cancelling). Unlike pronominal anaphors, however, it is
possible for a presupposition to \repair" the context by creating its
own antecedent, which is retrospectively added to the context in a
process called accommodation (Lewis, 1979). The following example
should clarify.
Suppose a story were to start o with one of the following:
a. The woman is single.
b. Terry loves Sally. The woman is single.
In (28a), the denite description the woman presupposes the existence
of a uniquely identiable woman. Since none is made available by the
null context, accommodation takes place and a woman is simply added
to the context. By contrast, in (28b) the woman can be resolved to Sally
(their referents are identied), and therefore no additional woman needs
to be accommodated.
The way a presupposition is resolved (whether and how it is resolved
or accommodated) is pragmatically constrained. In particular, the resulting
discourse must be both consistent and informative. For instance
in:
loves Sally. The woman is single.
the reading in which Mia is the single woman is ruled out by the
consistency constraint: a woman cannot simultaneously have a husband
and be single. Similarly, informativity can rule out readings that are
possible a priori. Thus in:
loves Sally. The woman is married.
although \the woman" could refer to Mia, this reading is dispreferred
as it would result in the uninformative discourse: Mia has a husband
and Mia is married.
The role of both informativity and consistency in constraining the
resolution possibilities of denite description presuppositions has been
discussed at length in (van der Sandt, 1992), and given a computational
treatment using automated inference systems in (Blackburn et al.,
1999; Monz, 1999). We will therefore concentrate here on cases where
minimality plays a decisive role in resolving denite descriptions.
As discussed at length in (Clark and Marshall, 1981), context can
make entities available for denite reference in several dierent ways,
including explicit mention (which (Clark and Marshall, 1981) call \lin-
guistic co-presence", and which we will refer to here as \anaphoric
linking") and associations grounded in world knowledge (which (Clark
and Marshall, 1981) call \indirect co-presence", which we will follow
common practice and refer to as \bridging").
As (Gardent and Konrad, 2000a) shows, local minimality nicely captures
the various ways in which a denite description can be resolved:
to some previously mentioned entity (31a, anaphoric linking), to some
associated entity (31b, bridging) or to some hearer-new entity (31c,
accommodation).
a. A woman sleeps. The woman dreams. (Anaphoric linking)
b. A car stopped. The engine had broken down. (Bridging)
c. The woman sleeps. (Accommodation)
The preference for anaphoric linking over other possibilities can be
attributed to the corresponding models having a smaller universe (do-
main minimality): the entity denoted by the denite description is the
same as that denoted by its antecedent. By contrast, both bridging
and accommodation require the denite description to denote an entity
that is distinct from all other entities explicitly introduced by the
previous discourse. The preference for bridging over accommodation
can be attributed to the corresponding models having fewer assertions
(subset minimality). For instance, with (31b), its bridging reading (32a)
is satised by model M a , whereas its accommodation reading (32b)
requires something like model M b . 7 Of the two models, M a is locally
minimal and therefore preferred.
stopped. The engine [of that car] had broken down.
b. A car stopped. The engine [unique but previously unmentioned]
broke down. (Accommodation)
broke down(c 3 )g
There are cases of bridging however, where the entity denoted by
the denite description is not itself entailed by the previous context.
For instance, in:
Jon entered the room. The chandelier was beautiful.
the rst sentence does not entail the existence of a chandelier. Neverthe-
less, \the chandelier" is interpreted as one hanging from the ceiling of
7 We assume the world knowledge that cars have engine, so that every model
\containing" a car also contains its engine.
Claire Gardent and Bonnie Webber
the room John entered. Again this preference for bridging is captured
by local minimality, as follows: if we assume that rooms have lights
and that chandeliers are lights, the following models could both be
constructed for
contains one more entity than M a , M a is locally minimal
and indicates the preferred reading.
So far we have looked at simple examples with minimal contextual
constraints. Constraints on the resolution of denite descriptions
can arise from more complex contexts however { in particular, from
relations between eventualities. Consider the following:
John rode into the oasis at 3pm. The camels were under the
palms, drinking water and resting.
John rode into the oasis at 3pm. The camels are now under the
palms, drinking water and resting.
Although a bridging reading for \the camels" is preferred in both
cases, the readings dier in what it is that \the camels" are associated
with. In (35), \the camels" must belong to the oasis, while in (36),
they could either belong to the oasis or have been John's means of
transportation for getting there. As in example (25), the dierence
between the two examples can be attributed to an interaction between
the temporal relationships between the eventualities and consistency.
Informally, the reasoning goes as follows.
In both cases, the rst clause denotes an event (e 1 ), and the second
a state (s 2 ). In (35), since both clauses are in the past tense,
we assume following (Kamp, 1979; Hinrichs, 1986), that s 2 overlaps
with e 1 . Because the eventuality e 1 denoted by the rst clause is an
accomplishment, we assume following (Moens and Steedman, 1988),
that it comprises a full event nucleus consisting of a preparatory process
prep(e 1 ), culmination point cul(e 1 ), and consequent state conseq(e 1 ).
Now e 1 (the arrival eventuality) involves a transition from John not
being at the oasis in prep(e 1 ) to John being there in conseq(e 1 ). Since
during the process of traveling, a person is collocated with their mode
of transportation, it follows that e 1 involves a transition from John's
means of transportation not being at the oasis during prep(e 1 ) to its
being there during conseq(e 1 ).
Turning to s 2 in (35), the claim in (Kamp, 1979; Hinrichs, 1986)
that it must overlap e 1 means that there are only three ways this can
happen: (1) s 2 starts during prep(e 1 ), or (2) it starts immediately at
hence one of the intrinsic consequences of e 1 , or (3) it
starts during conseq(e 1 ), with no commitment as to whether it is an
intrinsic consequence or not.
Here is where consistency and minimality interact with temporal
reasoning: In the case where s 2 overlaps with prep(e 1 ), identifying the
camels with John's means of transportation triggers an inconsistency,
since it requires temporally overlapping states to have contradictory
properties { John's camels not being at the oasis and John's camels
being there. Hence the camels cannot be taken to be John's means of
transportation and thus must be ones associated with the oasis. 8
In (36), on the other hand, the second clause is in the present tense,
so there is no assumption that its s 2 overlaps temporally with e 1 , there
is no such inconsistency. This allows \the camels" to be identied with
either the oasis or John's means of transportation. Because the models
are equally minimal by the arguments given so far, minimality can not
be used to choose between them. Still, it is clear that (36) shows a
preference for the \means of transportation" reading, and we leave for
future work whether rst-order automated reasoning systems can be of
help in nding it.
4. Conclusion
We have shown how one can come to the preferred discourse interpretation
of ambiguous sentences wholly or in part, by applying the criteria
of consistency, informativity and minimality to the possible interpretations
and their presuppositions. These were sentences with resolution
ambiguities associated with the linguistic phenomena of noun-noun
compounding, metonymy, and deniteness. As these criteria of con-
sistency, informativity and minimality can be assessed by rst-order
automated reasoning systems, we have in this way given further evidence
for BBKN's observation in (Blackburn et al., 1999) that rst-
order automated reasoning can play a role in automated discourse
understanding.
For this theoretical observation to be of practical interest however,
automated reasoners must perform e-ciently on the type of reasoning
tasks raised by the natural language data. Although Johan Bos's
DORIS (http://www.coli.uni-sb.de/~bos) system already provides an
Detecting inconsistencies based on temporal reasoning has not yet been addressed
by the current generation of model builders. This may be one of the gap
that test suites geared towards the problems of discourse understanding will cause
to be addressed.
22 Claire Gardent and Bonnie Webber
architecture in which to test this hypothesis, it only deals with a limited
set of data namely, projection ambiguity and resolution ambiguity. It
remains an open question how automated reasoners would scale to realistic
grammars, longer discourses and other types of natural language
related inference tasks such as those mentioned in the introduction.
When optimising automated reasoning systems for mathematics,
test suites of mathematics-related inference problems have allowed competing
approaches to be systematically trained and compared, pushing
them to become more sophisticated and e-cient at solving mathematics
related problems. Similarly, we believe that having test suites
for discourse understanding will allow the tuning of automated inference
systems to excel at strategies that support e-cient inference in
understanding Natural Language discourse.
Acknowledgements
We are grateful to Gann Bierner, Patrick Blackburn, Karsten Konrad,
Katja Markert, Natalia Nygren, Erik Schwarz and Mark Steedman for
helpful comments and discussion on material presented here. This work
was partially supported by the Project C2 (LISA) in SFB{378, grant by
the Deutsche Forschungsgemeinschaft to the University of Saarbrucken.
--R
Planning English Sentences.
Cambridge University Press
To appear in Journal of Language and Computation.
Mental Models: Towards a cognitive science of language
Morgan Kaufmann Publishers
th International Joint Conference on Arti
The Syntax and Semantics of Complex Nominals.
Computational Linguistics
Englewood Cli
A Structure for Plans and Behavior.
Submitted to Computational Linguistics.
Journal of Semantics
Morgan Kaufmann Publishers
Schank and K.
--TR
--CTR
Jochen L. Leidner , Gail Sinclair , Bonnie Webber, Grounding spatial named entities for information extraction and question answering, Proceedings of the HLT-NAACL workshop on Analysis of geographic references, p.31-38, May 31, | automated reasoning;discourse;semantics |
596141 | On the Complexity of Semidefinite Programs. | We show that the feasibility of a system of m linear inequalities over the cone of symmetric positive semidefinite matrices of order n can be tested in mn^O(min{m,n^2}) arithmetic operations with ln^O(min{m,n^2})-bit numbers, where l is the maximum binary size of the input coefficients. We also show that any feasible system of dimension (m,n) has a solution X such that log||X|| ln^O(min{m,n^2}). | Introduction
This paper is concerned with the general semidefinite feasibility problem
Given integral n \Theta n symmetric matrices A
whether there exists a real n \Theta n symmetric matrix X such that
where A ffl denotes the standard inner product on the space of real symmetric
matrices and the notation (\Delta) - 0 indicates that (\Delta) is a symmetric positive semidefinite matrix
We also consider the following (polynomially equivalent) problem
Given integral n \Theta n symmetric matrices Q determine whether there are
real numbers x xm such that
The complexity status of problems (F) and (G) is a fundamental open issue in the theory
of semidefinite programming. For the standard bit model of computation, it is known [7]
that either these problems belong to the complexity class NP " coNP , or they are not in
. For the real number model of computation problems (F) and (G) are known
to be in NP " coNP [7], but the question of whether they can be solved in polynomial time
remains open.
We assume throughout the paper, that n - 2, because for the problems are trivial.
The results of this paper are as follows. In Section 3, we obtain upper bounds on the norm
of feasible solutions of (1) and (2). Specifically, we show that:
(i) Any feasible system (1) has a solution in the Euclidean ball
where log l is the maximum bitlength of the input coefficients.
Moreover, the same bound applies to (2): any feasible system (2) has a solution x such
that log
If the solution sets of (1) or (2) are bounded, then the above bounds hold for any solution.
In addition, we give examples of feasible systems (1) and (2) all of whose solutions have
Euclidean norm at least R, where log
In Section 4, we state lower bounds on the discrepancy of infeasible systems (1) and (2):
(ii) If (1) is infeasible, then for any symmetric positive semidefinite matrix X 2 B,
log . The corresponding result for an infeasible
system (2) is that for any x that satisfies the upper bound of (i), the minimum
eigenvalue - n of Q negative and \Gamma log(\Gamma- n
We also give examples of infeasible systems (1) and (2) for which the quantities log max i=1;:::;m
do not exceed \Gammal2 minfm;ng=2 .
We prove the bounds of (i) and (ii) by using some results of Renegar [9] on decision
methods for the first order theory of the reals and an analogue of the fundamental theorem
of linear inequalities for positive semidefinite matrices. These auxiliary results are briefly
reviewed in Section 2.
In Section 5, we discuss the complexity of problems (F) and (G) . Due to (i) and (ii),
solving (F) with the ellipsoid method requires lmn O(minfm;n 2 g) arithmetic operations with
We use the decision method of Renegar [9] along with the derandomized
version [2] of Clarkson's algorithm [3], [1] to improve this result as follows:
(iii) Problem (F) can be solved in mn O(minfm;n 2 g) arithmetic operations over ln O(minfm;n 2 g) -
bit numbers.
In particular, (F) can be solved in strongly polynomial time for any fixed number of variables
or constraints. Note also that for const, the required number of arithmetic operations
grows linearly with m.
In Section 5 we also argue that:
Problem (G) can be solved in O(mn 4 operations over
This extends the earlier result of Ramana [6] that for any fixed m the strict version
problem (G) can be solved in polynomial time.
Note that in the bit model of computation, each arithmetic operation with
bit numbers can be replaced by n O(minfm;n 2 g) operations with l-bit numbers. For this reason,
the bounds on the operations stated in (iii) and (iv) also apply to l-bit numbers.
Finally, in Section 6 we briefly discuss some extensions of (iii) and (iv) to more general
semidefinite optimization problems.
Preliminaries
In this section we introduce some notation and record a few auxiliary propositions, which
are used in Sections 3 and 5.
2.1 Notation
denotes the space of symmetric n \Theta n real matrices. Any matrix in S n can thus be
viewed as a vector in IR 1n(n+1) . For a positive number R, we denote by CR the compact set
is the cone of symmetric positive
semidefinite matrices. - are the (real) eigenvalues of X 2
A formula (in the first-order theory of the reals) is an expression of the form
where:
are the free variables;
ffl each Q is one of the quantifiers 9 or 8;
of the form
where 4 i is one of the "standard relations" ?; !; -; =; 6=, and the g i 's are real
polynomials of degree at most d - 2:
Note that the above formula is in prenex form: all quantifiers in (SF) occur in front.
are called sentences. We say that y 2 IR k is a solution of
(SF) if the sentence obtained by substituting y into (SF) is true.
2.2 Auxiliary Propositions
Proposition 2.1 (Renegar [8]) If a formula (SF ) has only integer coefficients, each of bit
length at most B; then every connected component of the set of its solutions intersects the
ball fy 2 IR k j kyk - Rg; where R satisfies
logR - B(rd) 2 O(!) k
A quantifier elimination method for the first-order theory of the reals constructs for any
input formula (SF) an equivalent quantifier free formula.
Proposition 2.2 (Renegar [9]) There is an algorithm which, given a formula (SF ), finds
an equivalent quantifier free formula of the form
I
where:
1 In this paper, all formulae will be explicitly written using the standard connectives -; and =) :
ffl the degree of h ij (y) - (rd) 2 O(!) Q
is one of the standard relations ?; !; -; =; 6=.
The algorithm requires (rd) 2 O(!) k
operations and (rd) O(k+
evaluations of the input
formula. If the coefficients of the atomic polynomials are integers of bit
length at most B; then the algorithm works with numbers of binary length
This bound also holds for the binary length of the coefficients of the polynomials h ij .
The following special case of the above result deals with the decision problem for the
first-order theory of the reals: determine whether a sentence (SF) is true or false.
Proposition 2.3 (Renegar [9]) There is an algorithm for the decision problem of the first-order
theory of the reals that requires
operations and (rd) O(
evaluations of the input formula. When restricted to sentences
involving only polynomials with integer coefficients of bit length at most B, the procedure
works with numbers of binary length B(rd) 2 O(!) Q
The inequality below is a well-known bound on nonzero roots of univariate polynomials
(see, e.g., [5]).
Proposition 2.4 Let a d be a univariate polynomial
with integer coefficients, and let ff be a nonzero root of p(x). Then jffj
is the height of p(x).
We shall also need the following variant of the Fundamental Theorem of Linear Inequalities
(see, e.g., [11]).
Proposition 2.5 Consider a system of linear inequalities
a T
where a are non-zero vectors, b i 2 IR; let K be a convex set in
Mg is not empty, then there exists a subset
I ' M such that:
(a) jIj - minfm;ng;
Finally, for any R - 0 we have:
To show the first of these identities, observe that
where the last equality follows from the fact that A \Gamma - n (A)I n is a symmetric positive
semidefinite matrix whose minimum eigenvalue is zero. To see the second identity, note that
means
that the minimum on the l.h.s. of (4) is negative and hence it is attained at a matrix X
such that a consequence of (3).
Upper Bounds on Feasible Solutions
Theorem 3.1
(i) Any feasible system (1) has a solution X such that kXk - R, where log
(ii) Moreover, if the feasible set of (1) is bounded, then the above bound holds for any solution
of (1).
Proof: Suppose that system (1) is feasible, and let
(Recall that C is the cone of symmetric positive semidefinite matrices of order
n.) From von Neumann's saddlepoint theorem (see, e.g., [10]) and (3), it follows,
that for any R - 0,
Consider the formula
which can be written in the standard form (SF) as follows:
(R - 0)g:
It is easy to see that for any R 2 IR; the following statements are equivalent:
ffl (1) has a feasible solution
By our original assumption, (1) is feasible, and hence there is a nonnegative R
that satisfies \Phi(R). Next, \Phi(R) is a standard formula (SF) of degree at most
quantifiers. Furthermore, \Phi(R) consists
of polynomial inequalities in m+
Since det(
contains n! products of linear forms in m+1 variables
with integer coefficients of height at most 2 l , each coefficient in \Phi(R) has binary
length at most 1). Now from Proposition 2.1 it follows that
\Phi(R) can be satisfied by a positive number R such that
log
By Proposition 2.5, there is a set I ' M of size at most n(n + 1)=2 such that the
system
is feasible, and any of its solutions solves the original system (1). For this rea-
son, we can obtain a better bound on R by replacing m with minfm;n 2 g. Since
of the theorem follows.
To show part (ii), consider the formula \Phi
R) g: Note that \Phi 0 (R) can be written in prenex form as
(R
It is easy to see that \Phi 0 (R) is satisfied if and only if
Hence, we can apply Proposition 2.1 to \Phi 0 (R) to conclude that, similarly to (5),
log It remains to show that m can be replaced by minfm;n 2 g.
To this end, note that if the solution set of (1) is bounded, then there exists a
system A with at most n(n + 1)=2 inequalities whose
solution set is still bounded. This is because the solution set of (1) is bounded if
and only if the recessive cone of (1) is trivial, i.e.,
is the halfspace fX 2 S n j A i ffl X - 0g.
is equivalent to the emptiness of the intersection of the
. By Helly's theorem (see, e.g.,
[10]) there exists a system of at most 1
whose intersection is still empty. Since any such system must
contain\Omega 1 , the
claim follows.
Remark 3.2 The bounds of Theorems 3.1 apply to any mixed system of strict and/or non-strict
inequalities
where L is a linear subspace in IR n , and the constraint X -L 0 means that X is positive
definite on L. This fact follows from the observation that for any t 2 (0; 1) and any solutions
systems (7) and (1), respectively, the convex combination
satisfies (7).
Theorem 3.3
(i) Any feasible system (2) has a solution x such that log
(ii) Moreover, if the feasible set of (2) is bounded, then the above estimate holds for any
solution of (2).
Proof: We can assume without loss of generality that the input matrices
are linearly independent, and hence m - n(n 1)=2. Suppose that
(2) is feasible and consider the formula
or equivalently,
\Psi(R) is a standard formula with quantifiers in n
variables, respectively, which has
polynomial inequalities of degree at most d = n, whose integer coefficients have
at most Hence \Psi(R) can be satisfied by a
number R such that log which implies part (i) of the
theorem.
To show part (ii), apply the above arguments to the modified formula
Clearly, the bounds of Theorem 3.3 also hold for any strict and/or mixed system (2).
We close this section with examples of ill-posed feasible systems (1) and (2).
Example 3.4 Let n be an even number. Consider n \Theta n symmetric positive semidefinite
matrices X satisfying the system of linear equations:
It is easy to check that this instance of (1) is feasible and log X n;n - l2 n=2 for any of its
solutions. A similar example for problem (2) is given below.
Example 3.5 Given two matrices A 2 S n 1
, denote by
their direct sum. For
and
x
is a feasible instance of (2), any solution of
which satisfies log xm - l2 m .
Lower Bounds on the Discrepancy
l) be the bound of Theorem 3.1, and let
Rg: The discrepancy of (1) is the optimal value of the convex programming problem:
Note that because of the compactness of CR , the minimum in (8) is always attained, and
only if system (1) is feasible.
Remark 4.1 There exist infeasible systems (1) such that inff ' j A
For instance, this is true for the system of linear inequalities X 11 -
is a symmetric positive semidefinite matrix of order 2.
Theorem 4.2 If (1) is infeasible, then \Gamma log '
Although Theorem 4.2 can be proved analogously to Theorem 3.1, it is convenient to postpone
its proof until Section 5.
Now we consider systems (2). Let l) be the bound of Theorem 3.3, and let
Rg be the m-dimensional ball of radius R centered at the origin.
The discrepancy of (2) is the optimal value of the concave program:
Clearly, (2) is feasible if and only if - - 0:
Theorem 4.3 If (2) is infeasible, then \Gamma log(\Gamma-
The proof of this theorem is also postponed until Section 5. We close this section with
examples of infeasible systems (1) and (2) whose discrepancies are doubly exponentially
small.
Example 4.4 Let n be even, and consider n \Theta n symmetric positive semidefinite matrices
X satisfying the equations:
It is easy to check that this instance of (1) is infeasible and \Gamma log ' - l2
Example 4.5 For
and
is an infeasible instance of (2), and it can be
verified that \Gamma log(\Gamma-
5 Complexity Bounds
By Theorems 3.1 and 4.2, the feasibility of (1) can be determined by computing the optimal
value ' of program (8) to an absolute accuracy of ffl, where This
convex programming problem can be solved in O(n 4 log(2 l nR=ffl)) iterations of the ellipsoid
method (see, e.g., [4]), where each iteration requires O(n 2 (m+n)) arithmetic operations over
log(2 l nR=ffl)-bit numbers. Hence, we obtain an upper bound of lmn O(minfm;n 2 g) operations
with testing the feasibility of (1). This result can be improved
as follows.
Theorem 5.1 The feasibility of (1) can be tested in mn O(minfm;n 2 g) arithmetic operations
over
Proof: We start with a weaker result.
Lemma 5.2 The feasibility of (1) can be tested in (mn) O(minfm;n 2 g) arithmetic
operations over l(mn) O(minfm;n 2 g) -bit numbers.
Proof: The sentence
states that (1) is feasible. Since the characteristic polynomial det(X \Gamma
height 1, from Proposition 2.3 it follows that the
validity of the above sentence can be determined in (mn) O(n 2 ) operations
over
To finish the proof of the lemma, it remains to show that the feasibility
of (1) can also be decided in (mn) O(m) operations with l(mn) O(m) -bit
numbers. Consider the sentence
where \Phi(R) is the formula defined in the proof of Theorem 3.1. This
sentence also states that (1) is feasible. Observe that (11) consists of
polynomial inequalities of degree n in O(m) variables and
has integer coefficients of binary size at most
Since det(
can be evaluated in poly(n; m) operations
(or because all of its coefficients can be computed in n O(m) operations),
the lemma follows from Proposition 2.3.
We continue with the proof of Theorem 5.1. If m is bounded by a polynomial
in n, the theorem follows from Lemma 5.2. We next show that for large m,
determining the feasibility of (1) via Clarkson's algorithm [3] requires an expected
mn O(minfm;n 2 g) operations over ln O(minfm;n 2 g) -bit numbers.
Given a set I '
is the bound of Theorem 3.1 for the entire system (1).
With this notation, we have ' by X(I) the (unique) least
norm solution of the system A
'(I)g be the set of constraints violated by
X(I). A set I is called a basis, if V (J) 6= V (I) for any proper subset J ae I. A
basis J is a basis for I, if J ' I and V for M is called
optimal. In particular, if S is an optimal basis, then
consequently,
From Helly's theorem it follows that D :
Given an optimal basis S, we can apply Lemma 5.2 to A
and determine the feasibility of the original system (1) in n O(minfm;n 2 g) operations
over finds an optimal basis by
performing expected
log m log m) - mpoly(n) violation
tests. Each of these checks whether j 2 V (I) for a sample set I of cardinality
log D) and an index Note that the inclusion can be
written as the sentence
where S I (X; ') is the quantifier
g. Since the positive semidefiniteness of X can be expressed by the formula
follows that V I;j is equivalent to:
I (X;
Each violation test can thus be represented by a sentence in prenex form with
polynomial inequalities of degree
In fact, by using the arguments of Section 4 in [3], one can verify that the above bounds on the number
of violation tests and the size of sample sets are valid for computing an optimal basis for any mapping
that satisfies the following two conditions: (i) V (I) ' M n I and (ii)
any
Note also that the coefficients of these polynomial inequalities are integers of
binary length B - maxfl; log . Now from Proposition 2.3 it
follows that each violation test can be accomplished in n O(minfm;n 2 g) operations
over numbers. But the expected number of violation tests is
bounded by mpoly(n). Hence we conclude that for all n and m, testing the
feasibility of (1) requires expected mn O(minfm;n 2 g) operations over ln O(minfm;n 2 g) -
bit numbers.
Chazelle and Matousek [2] derandomized Clarkson's algorithm for a wide subclass
of LP-type problems, which includes linear programming and the problem of
computing the minimum volume circumscribed ellipsoid for a given m-point set
in IR n . The analysis of their algorithm is based on an additional assumption which
we state here in the following stronger form: there is a constant ~
D such that for
any subset I ' M , all subsets of I violated by some (X; ') can be computed in
D operations. Since computing the above set system can be accomplished
by constructing the arrangement of the hyperplanes A i ffl
(see the argument of [2] for linear programming), we have ~
Dg. The algorithm of [2] computes an optimal basis of (8) by
performing mD O(D) operations and mpoly(D)+D O(D) violation tests with subsets
I of size at most D. Since each violation test can be accomplished
in n O(minfm;n 2 g) operations, we conclude that the derandomized algorithm still
requires mn O(minfm;n 2 g) operations with ln O(minfm;n 2 g) -bit numbers.
Corollary 5.3 The complexity bounds of Theorem 5.1 apply to the problem of computing
an optimal basis of (8).
Theorem 5.4 Given an optimal basis S of (8), in n O(minfm;n 2 g) operations over ln O(minfm;n 2 g) -
bit numbers we can compute a univariate semialgebraic representation of ' , i.e., a system
of univariate polynomial inequalities with integer coefficients such that ' is the only real
solution of the system. In particular, ' is a root of a nontrivial polynomial h(') 2 ZZ[']
such that log
Proof: Assume w.l.o.g. that the given basis S coincides with M . In particular,
1)=2. From von Neumann's saddlepoint theorem and (4), it follows
that for R - 0
Consider the formula
where R the bound of Theorem 3.1. This formula states that ' - ' , and it can
be written as follows:
Now the formula
in the
sense that ' is the only real solution of ('). By consecutively applying Proposition
2.2 to (') and ('), the latter formula can be transformed into a quantifier
operations
with maxfl; log Rg(mn) O(m) - ln O(minfm;n 2 g) -bit numbers. (') is composed of
univariate polynomial relations h(')40, where 4 2 f -; !; =; 6=; ?; - g: Since
' is the only real solution of ('), this formula can be transformed into an
equivalent system of polynomial inequalities, which must contain a polynomial h
such that h('
Remark 5.5 Under the assumption of Theorem 5.4, ' can be approximated to an accuracy
operations (see Theorem 1.2 in
[8]). Note that unlike the upper bound on the operations stated in Theorem 5.1, this bound
depends on l.
Remark 5.6 The minimal polynomial of an algebraic number ff is the primitive irreducible
polynomial p(x) 2 ZZ[x] such that and the leading coefficient of p(x) is positive.
The height of ff is the height of its minimal polynomial. Theorem 5.4 and the well-known
inequality of Mignotte (see [5], p. 261) show that log height('
Theorem 5.4 immediately implies Theorem 4.2, whose proof was postponed in Section 4.
Proof of Theorem 4.2. Suppose that system (1) is infeasible. Then ' ? 0 and by
Theorem 5.4, the positive algebraic number ' is a root of a nontrivial polynomial h(x) 2
ZZ[x] with integer coefficients of bit length ln O(minfm;n 2 g) . Since Proposition 2.4 implies that
height(h)), the theorem follows.
The following result deals with the complexity of testing the feasibility of (2).
Theorem 5.7 The feasibility of (2) can be determined in O(mn 4 operations
over l is the maximum bit length of the entries of
1)=2, we can find a linearly independent subsystem of
operations. We can thus assume that m - n(n+1)=2.
The feasibility of (2) can be stated as the sentence
By Proposition 2.3, the validity of the above sentence can be decided in n O(m)
arithmetic operations with ln O(m) -bit numbers.
It is easy to see that the discrepancy - of (2) satisfies h(- with a nontrivial polynomial
ZZ[x] such that log This result and Proposition 2.4
imply Theorem 4.3.
6 Concluding Remarks
Theorem 5.1 can be extended to the optimization version of problem
where D is a given n \Theta n integral symmetric matrix. Specifically, in addition to testing
the feasibility of (14); each of the following problems can also be solved in mn O(minfm;n 2 g)
operations over ln O(minfm;n 2 g) -bit numbers:
Boundedness. Determine whether the objective function is bounded from below on the
set of feasible solutions.
Infimum. Find a univariate semialgebraic representation for the finite infimum ff .
Attainment. Determine whether the infimum is attained, that is, whether (14) has an
optimal solution.
Least Norm Optimal Solution. Find a univariate semialgebraic representation for each
component of the least norm optimal solution of (14).
Remark 6.1 The boundedness problem readily reduces to the feasibility problem. Although
the attainment problem can also be reduced to the feasibility problem via the duality result
of [7], the latter reduction polynomially increases both n and m and cannot be used in fixed
dimension.
Finally, for the optimization version of (G) with a given integral m-vector d:
the above four problems can be solved in O(mn 4 )+n O(minfm;n 2 g) operations over ln O(minfm;n 2 g) -
bit numbers.
We plan to address these and some other extensions of Theorems 5.1 and 5.7 in a subsequent
paper.
--R
A Randomized Scheme for Speeding Up Algorithms for Linear and Convex Programming Problems with High Constraints-to-Variables Ratio
On Linear-Time Deterministic Algorithms for Optimization Problems in Fixed Dimension
Las Vegas Algorithms for Linear and Integer Programming When the Dimension Is Small
Geometric Algorithms and Combinatorial Optimization
Bounds, in Buchberger
An Algorithmic Analysis of Multiquadratic and Semidefinite Programming Problems
An Exact Duality Theory for Semidefinite Programming and its Complexity Implications
On the Computational Complexity of Approximating Solutions for Real Algebraic Formulae
On the Computational Complexity and Geometry of the First Order Theory of the Reals.
Convex Analysis
Theory of Linear and Integer Programming
--TR
--CTR
Xun Li , Xun Yu Zhou , Mustapha Ait Rami, Indefinite Stochastic Linear Quadratic Control with Markovian Jumps in Infinite Time Horizon, Journal of Global Optimization, v.27 n.2-3, p.149-175, November | complexity;bounds on solutions;semidefinite programming |
596157 | A Stochastic/Perturbation Global Optimization Algorithm for Distance Geometry Problems. | We present a new global optimization approach for solving exactly or inexactly constrained distance geometry problems. Distance geometry problems are concerned with determining spatial structures from measurements of internal distances. They arise in the structural interpretation of nuclear magnetic resonance data and in the prediction of protein structure. These problems can be naturally formulated as global optimization problems which generally are large and difficult. The global optimization method that we present is related to our previous stochastic/perturbation global optimization methods for finding minimum energy configurations, but has several key differences that are important to its success. Our computational results show that the method readily solves a set of artificial problems introduced by Mor and Wu that have up to 343 atoms. On a set of considerably more difficult protein fragment problems introduced by Hendrickson, the method solves all the problems with up to 377 atoms exactly, and finds nearly exact solution for all the remaining problems which have up to 777 atoms. These preliminary results indicate that this approach has very good promise for helping to solve distance geometry problems. | Introduction
Distance geometry problems, which are concerned with determining spatial
structures from measurements of internal distances, arise in the structural
interpretation of nuclear magnetic resonance data and in the prediction of
protein structure. Methods of calculating the conformations of biological
molecules from distance constraints have become an important tool in structural
biochemistry. Solving the distance geometry problem in this context
would determine the three-dimension shape of the protein, which is critical
for understanding its chemical and biological properties. For general reviews
of the distance geometry problem and its relationship to the structure
of chemical molecules, see Crippen and Havel[6], Havel[8], Kuntz, Thomason
and Oshiro[10],and Br-unger and Nilges[1].
The distance geometry problem can be naturally formulated as a non-linear
global optimization, where the objective function is constructed such
that the distance constraints are satisfied at the global solutions of the prob-
lem. A simple objective function can be defined to enforce the constraints.
This optimization problem is believed to be computationally intractable in
general because it has been shown to be strongly NP-complete in the one
dimensional case [6, 13], and strongly NP-hard in the higher dimension case
[14].
A large number of such methods for solving distance geometry problems
have been proposed, such as Crippen and Havel[6], Havel[8], Hendrickson[9],
Glunt, Hayden, Raydan[7], and Mor'e and Wu[12, 13]. The method we
present in this paper is based on the stochastic/perturbation global optimization
approach[4, 2, 3, 5] with several new features. The purpose of
this paper is to describe this approach and to demonstrate its capabilities
on some difficult distance geometry problems. The larger context of this
research is to continue to develop and understand the capabilities of the
stochastic/perturbation global optimization methodology, which we have
found very successful for several large-scale global optimization problems
arising from molecular chemistry.
Our stochastic/perturbation algorithm combines a first, stochastic phase
that identifies an initial set of local minimizers, with a second, more deterministic
phase that moves from low to even lower local minimizers. In
the second phase, by incorporating the partially separable structure of the
problem, we work on very small-dimensional global optimization subproblems
and then for local minimizers in the full-dimensional space. Both the
selection of small dimensional subproblems and some other important algorithmic
features are specific to the distance geometry problem.
We experimented with our algorithm on Mor'e and Wu's artificial problems
[12] and on the protein fragment problems from Hendrickson[9]. For
the artificial problems, even our first phase can find the exact solutions with
great success. For the protein fragment problems, which are considerably
more difficult, we have found the exact solutions solutions for problems with
up to 377 atoms (1131 parameters).
Another important issue in dealing with distance constraints is that there
may not exist any molecular structure satisfying the given distance con-
straints, due to measurement or experimental errors. In practice, lower and
upper bounds on distances are specified instead of exact distances. Therefore
our algorithm is intended to deal with both exact and inexact distance
geometry problems. For the larger protein problems of Hendrickson[9], with
up to 777 atoms (2331 parameters), our algorithm has found approximate
solutions with maximum relative error of distance at most 0.04. These computational
successes on problems of considerable size appear to indicate that
our algorithm is a powerful tool for solving distance geometry problems.
The remainder of this paper is structured as follows. Section 2 describes
distance geometry problems and current approaches developed for these
problems. In section 3, we describe the stochastic/perturbation algorithm
used to deal with the distance geometry problems. The framework of our
algorithm is outlined, and several new features are discussed in the sec-
tion. These are followed by extensive experimental results for our method
on distance geometry problems in Section 4. Section 5 contains some brief
conclusions and comments about future research.
2 The Distance Geometry Problems
As mentioned earlier, solving the distance geometry problems is an important
tool in determining the three-dimensional structure of a molecule. In
the ideal case, distance geometry problems are concerned with finding positions
3 such that
where S is a subset of the atom pairs, and is the given distance
between atom i and j. Usually S has many fewer than m 2 =2 elements, that
is only a small subset of pairwise distances is known.
There may not exist any solution x to these distance con-
straints, due to the error in the theoretical or experimental data. For exam-
ple, this is guaranteed to happen if data for atoms violate the triangle
inequality.
In the more general distance geometry problem, lower and upper bounds
on the distances are specified instead of exact values. In this case, the distance
geometry problem is to find a set of positions x
l i;j -k x
where l i;j and u i;j are lower and upper bounds on the distance constraints,
respectively.
The distance geometry problems with constraints (2.1) and (2.2) can be
naturally phrased as a nonlinear global optimization problem. The objective
function is constructed so that the constraints are satisfied at the global minimizers
of the optimization problem. One simple approach, which we utilize
in this paper, is to penalize all the unsatisfied constraints. We formulate the
distance geometry problem in terms of finding the global minimizers of the
function
(i;j)2S
where
l 2
This is the approach taken by Mor'e and Wu[13]. In order to compare results
with those in Mor'e and Wu[12], we also use the following function for the
exact problem:
(i;j)2S
where w i;j are positive weights. This function is same as (2.4) for the exact
distance geometry problems if l
i;j . Clearly,
solves problem (2.2) if and only if x is the global
minimizer of f(x) in (2.4) and problem (2.1), a
solution x is equivalent to a global minimizer of the function (2.5) with
function value 0.
The difficulty in solving the distance geometry problem arises from several
sources. First, the problem in itself is strongly NP-complete in one
dimension, and strongly NP-hard in higher dimension[6, 14, 13], therefore it
is very unlikely that an efficient algorithm for solving all cases of the problem
can be found. Also there are huge numbers of local minimizers for the
functions (2.4) and (2.5), which makes it very challenging to locate the basin
of attraction of the global minimizer. It can be shown that function (2.5)
has an exponential number of local minimizers[9]. The another important
aspect is that most distance geometry problems are large and contain hundreds
or more atoms. Thus even the calculation of a local minimizer makes
heavy demands on the computer time.
Most of the previous work by chemists on the distance geometry problems
depends on the intrinsic properties of the chemical structure of solu-
tions. Often, these methods use special heuristics based on chemical properties
to generate initial configurations, and then perform local optimizations.
The method of Hendrickson[9] is of particular interest to this paper because
the more difficult test problems that we use are taken from that paper. Hen-
drickson's method also utilizes chemical structure information. It works well
on his test problems, which are generated from bovine pancreatic ribonucle-
ase, a protein containing 124 amino acids, but relies on the assumption that
the distances are highly accurate.
In contrast, general global optimization approaches to the distance geometry
problem do not utilize information about the solution structure.
While utilizing problem-specific information may ultimately be desirable,
it is important to understand the capabilities of general global optimization
approaches for distance geometry problems. Work of this type includes
the multistart method and Mor'e and Wu's continuation approach [12, 13].
In the former, a set of starting points are randomly generated and local
minimization is performed from them. This method is simple and easy to
implement. But it is highly unreliable in the context of distance geometry
because the problems are usually large and have a huge number of local min-
imizers. In the continuation approach, the original function is transformed
into a smoother function with fewer local minimizers. A series of local optimization
algorithms is then applied to the transformed function, tracing
its minimizers back to those of the original function. The experimental results
of Mor'e and Wu show that this approach is markedly superior to the
multistart method.
In the following section, we will describe our stochastic/perturbation
algorithm for the distance geometry problem. Our algorithm is a general
global optimization method, and applies to both exact and inexact problems.
We do not utilize a smoothing approach as in the work of Mor'e and Wu, but
our approach could readily be combined with smoothing techniques. Indeed,
our experience with minimum energy conformation problems is showing that
the combination of smoothing and our stochastic/perturbation global optimization
approach is a promising framework (see e.g. [15]).
3 The Stochastic/Perturbation Global Optimization
Method
Our new algorithm for the distance geometry problems is based on the
stochastic/perturbation global optimization method, which was constructed
to solve large-scale global optimization problems. This approach has been
successfully applied to Lennard-Jones problems [4], water cluster problems
[2], and protein conformation problems [3].
The basic framework of our global optimization method for distance geometry
problems is outlined in Algorithm 3.1 below. The method combines
an initial phase that locates some low local minimizers with a second phase
for moving from low to even lower local minimizers. During the first phase,
a full dimensional random sample is generated over the domain space by
randomly and independently placing each atom. The worst configurations
are discarded, and the better ones are improved by selecting and moving an
atom or a pair of atoms, until the function value for the configuration falls
below a specified threshold level. A subset of these improved configurations
is used as start points for a full dimensional local optimization algorithm.
Some of the local minimizers found in this phase are passed on to the second
phase for improvement.
In the second phase, a local minimizer is successively selected for improvement
as discussed below. A pair of atoms is chosen, and a small-scale
stochastic global optimization algorithm is applied to the configuration with
only these two atoms as variables and the remainder of the configuration
fixed. This is followed by full dimensional local minimizations starting from
the best configurations that resulted from the small-scale global optimization
step. The lowest new configurations are then merged into the list of
local minimizers, and this phase is iterated a fixed number of times.
A key feature of this approach is that both phases make use of strategies
that work on a very small subset of the atoms at once. In the initial phase
this approach is used to improve the sample points by sampling on only one
atom or a pair of atoms at a time in step 1b while leaving the remaining
atoms temporarily fixed. When a pair of atoms is chosen, it is a pair for
Algorithm 3.1 - Framework of the Large-Scale Global Optimization
Algorithm for Distance Geometry Problems
1. Initial Generation of Configurations Phase :
(a) Sampling in Full Domain : Randomly generate the coordinates of
the sample points in the sampling domain, and evaluate f(x) at each
new sample point. Discard all sample points whose function value is
below a global "cutoff level".
(b) One-atom/two-atom Sampling Improvement : For each remaining
sample point : While the energy of the sample point is above the
threshold value, Repeat:
ffl Select the atom that contributes most to the function value or a
pair of atoms in S that violates the ideal distance most
ffl Randomly sample on the location of the selected atoms
ffl Replace the atoms in the sample point with the new sample coordinates
that give the lowest energy value.
(c) Start Point Selection : Select a subset of the improved sample points
from step 1b to be start points for local minimizations.
(d) Full-Dimensional Local Minimizations: Perform a local minimization
from each start point selected in step 1c. Collect some number of
the best of these minimizers for improvement in Phase 2.
2. Improvement of Local Minimizers Phase: For some number of iterations
(a) Select a Configuration : From the list of full-dimensional local min-
imizers, select the local minimizer and a pair of atoms in S to be optimized
Transform the configuration by multiplying the position
of each atom relative to the center of mass of the configuration by a
constant factor of between 1.25 and 2.0 or larger.
(c) Two-atom Small Global Optimization : Apply a global optimization
algorithm to the expanded configuration with only the two atoms
chosen in step 2a as variables.
(d) Full-Dimensional Local Minimization : Apply a local minimization
procedure, using all the atoms as variables, to the lowest configurations
that resulted from the two-atom global optimization.
Merge the New Local Minimizers : Merge the new lowest configurations
into the existing list of local minimizers.
which a constraint distance is given in the problem formulation, that is an
We will refer to this as a "constrained pair of
atoms". When a constrained pair of atoms is used in step 1b, the sampling
is done so that the distance between the atoms is always at the constraint
value ffi i;j . In the second phase, this small subproblem approach is used
to move a constrained pair of atoms in an existing configuration to new
positions via the small-scale global optimization in step 2c. This small global
optimization locates the best possible position for the selected atoms in the
current configuration with the remaining atoms temporarily fixed. Again,
when step 2c samples on the constrained pair of atoms, the distance between
them is kept at the constraint value. All these small subproblem steps are
very efficient due to the partial separability of the objective functions for the
distance geometry problem, which make the cost of evaluating the function
when only one or two atoms are moved much less expensive than the cost
of a full function evaluation.
The atom or pair of atoms that is chosen in each of these small-scale
steps is one for which there seems to be potential for improving the overall
configuration by moving this atom or pair. In phase 1, the atom which
contributes most to the overall function value (and thus appears to have
the greatest potential for reducing the function value) is selected. In phase
2 and alternatively in phase 1, the constrained pair of atoms that has the
worst violation from the ideal distance is selected. In our early experiments,
we also employed a one-atom small-scale global optimization heuristic in
the second phase. The experimental results suggested that for some difficult
problems the two-atom approach is more effective and that it locates lower
configurations than the one-atom strategy, while for many other problems
the two strategies are about equally effective. For this reason we have used
the two-atom approach in phase 2. It may be that in some cases, moving
only one atom is not enough to force the configuration out of the region of
attraction of the current local minimizer.
The choice of which local minimizer to improve in phase 2 is an important
heuristic in this method. Through our experimentation on previous
problems, we have concluded that a strategy that balances selecting a
breadth of configurations with working on the best current configurations is
most effective. This is the approach we have used for the distance geometry
problem.
Another important feature in Algorithm 3.1 is the expansion step, step
b of phase 2, which expands the configuration around its center of mass
prior to the small-scale global optimization. The expansion step was used
first with minimum energy water cluster problems, where it significantly
improved the ability of the phase 2 iteration to find improved configurations.
This improvement apparently is due to expansion creating more room to
move the atom or atoms that are the variables in the small-scale global
optimization. The local optimization step then contracts the configuration
again, into a new and hopefully improved local minimizer. The physical
analogy of expansion is to heating in annealing. The drawback of expansion
is that the local minimizations in phase 2 become more expensive.
Our initial intuition was that the expansion would not be appropriate
for distance geometry problems, because it leads to large violations in all
the distance constraints. But we found that the algorithm without the
expansion step didn't perform well in phase 2; after step 2d, most of the
configurations returned to the local minimizer that the step had started
with in step 2a. Possibly this is due to the relatively small number of
constraints in distance geometry problems, which means that each atom is
only involved in a small number of distance constraints. Therefore moving
only the pair of atoms doesn't change the configuration sufficiently from the
current local minimum. We found that when the expansion step is added,
the small-scale global optimization step is far more successful at producing
significantly different, and improved, configurations. We have experimented
with different expansion factors in the range 1.25 to 2.5. For most of the
problems, an expansion factor between 1.25 and 2.0 is most effective, but
for some problems, an expansion factor between 2.0 and 2.5 is more helpful.
In order to be consistent with the stochastic aspect of our algorithm, for
most of the test problems in next section, the expansion factor is chosen
randomly between 1.25 and 2.0.
A final useful feature in our implementation, which is not captured in
Algorithm 3.1, is a progression of problems approach. By this we mean that
for some more difficult problems, we solve a sequence of problems of the
form (2.4), with increasingly tight constraints (i.e. lower and upper bounds
on the distances). Phase 1 is applied only to the first problem (with the
loosest constraints), and phase 2 is applied to each problem, with the best
configurations from the previous, looser-constrained problem forming the
starting set of configurations for phase 2 for the next, tighter-constrained
problem. The motivation for this approach came from experimentation.
For the easier problems, applying Algorithm 3.1 to the problem directly was
very successful. For the more difficult problems, we noticed that finding
the global minimizer of function (2.4) directly was much more difficult than
starting to work on the distance geometry problem with looser distance
constraints, and then gradually tighting the constraints and applied Phase
2 until the expected accuracy. This approach is in some sense similar to
the continuation methods. It has the additional advantage that for real
problems, we may not know exactly how accurate the given distances are,
and with this approach we can find the solutions to the best accuracy that is
possible. In fact the chemists care more about finding reasonable solutions
than exact solutions, and this approach coincides with this idea and yields
an algorithm that can be tailored to find reasonable configurations.
4 Experimental Results
We have run our algorithm on a set of artificial distance geometry problems
from Mor'e and Wu [12, 13], and on a set of protein fragment test problems
generated by Hendrickson[9]. In all of these problems, we are given the exact
distances. In order to have both exactly and inexactly constrained problems
for function (2.4), we used
l 2
with values of epsilon that are given later. Most of our test problems are
large, with hundreds or thousands of atoms. Therefore in our implemen-
tation, we used the limited memory BFGS algorithm[11] to perform the
full dimensional local minimizations, whereas the small-scale local minimizations
within the small-scale global optimization step used the standard
method. All the experiments were conducted on an Intel Paragon
multiprocessor.
In the artificial distance geometry problems from [12, 13], the molecule
has atoms located in the three-dimensional lattice
for some integer s - 1. The problem is to determine the structure of this
molecule if we are given ffi i;j 2 S, where
and r is an integer between 1 and m.
Our first experiment for the artificial problem is to find the global minimizers
using the exact function (2.5), using w First
Problem Domain B Domain 2B
m r #fval #gval #global #fval #gval #global
343
Table
4.1: Phase 1 results for Artificial Problems and Function (2.5)
we ran Phase 1 for the molecules with (m;
starting from the domain space
and the domain 2B. (These are the same problems reported in [12, 13].)
One-atom moves were used in step 1b. The numerical results are presented
in
Table
4.1, where # fval, #gval and #global are the number of function
and gradient evaluations, the global solutions out of the total minimizers,
respectively. Although Phase 1 can't find the global solution in either the
smaller domain space or the larger one for the last two problems, recall
that Phase 1 is simply designed to provide initial configurations for the
second phase, which accounts for most of the work in the algorithm. In
our experience, problems that can already be solved in Phase 1 are not
particularly difficult global optimization problems. Note also that Phase 1
is in some sense similar to the multistart algorithm except for the one-atom
or two-atom steps. Compared to the multistart results in [12], the phase 1
works quite well in this context.
We also ran the same artificial problems using the exact version of function
(2.4), i.e. with results for these runs are given in
Table
4.2. Again, one-atom moves were used in step 1b. Table 4.2 shows
that using function (2.4), Phase 1 already finds the global solutions for each
problem in both cases. This indicates that these are not particularly difficult
global optimization problems. The comparison of these to those in Table
4.1 seems to indicate that using the exact version of function (2.4) creates
an easier problem than using function (2.5). We believe that this is because
function (2.4) is smoother. Finally, there is a marked difference between
Problem Domain B Domain 2B
m r #fval #gval #global #fval #gval #global
343
Table
4.2: Phase 1 results for Artificial Problems and Function (2.4)
the results in Table 4.2 and the multistart results given for these problems
and function (2.4) in [13], in which the global minimizers were never found.
However these results are not directly comparable because the results in [13]
are for (2.4) with
Tables
4.3 and Table 4.4 give the results from applying Phase 2 to the
same set of artificial problems, again using functions (2.5), and (2.4) with
In these tables, FLS, SLS are the total number of full
dimensional and small dimensional local optimizations, respectively, and
Ffval and Pfval are the number of full function evaluations and partial (only
two atoms change) function evaluations, respectively. The results show that
for function (2.5), applying Phase 2 allows the method to readily solve the
two problems not solved in Phase 1 and to relocate the global minimizers
for all the problems many times. For function (2.4), more than half the local
minimizations find the global minimizer. These results show that Algorithm
3.1 is very successful on these artificial problems. A comparison with the
efficiency of the method of Mor'e and Wu [12, 13] is difficult in part because
they do not give costs in the second of these papers, but mainly because
smoothing is a very useful technique that makes problems easier to solve,
but has not been used in our algorithm.
We then proceeded to a set of significantly more difficult test problems.
These problems are generated by Hendrickson [9] from the bovine pancreatic
ribonuclease, a typical, rather small protein containing 124 amino acids.
Hendrickson derived the set of twelve test problems by using fragments
consisting of the first 20, 40, 60, 80, and 100 amino acids as well as the full
protein, with two sets of distance constraints for each size. The distance
information given for these problems is exact, meaning that there is a global
Problem FLS #Ffval SLS #Pfval #global
343 50 33624 15168 1827104 9/40
Table
4.3: Phase 2 results for Artificial Problems and Function (2.5)
Problem FLS #Ffval SLS #Pfval #global
343 100 17853 39068 4097761 47/81
Table
4.4: Phase 2 results for Artificial Problems and Function (2.4)
minimizer where all constraints are satisfied exactly. The problems have
from 63 to 777 atoms (189 to 2331 parameters). Mor'e and Wu [13] tested
their method on the smallest of these problems, using function (2.4), and
reported success for the values but not below.
For each of the twelve problems of Hendrickson [9], we applied the Phase
2 repeatedly to the function (2.4) with decreasing ffl until In our runs,
we usually chose the values used by
Mor'e and Wu [13]. For the two smallest problems, however, we started from
0.02, whereas for the largest problems, we may find the global solutions for
the subproblem and then proceed to the subproblems.
For each value of ffl, we generally performed 50 iterations in Phase 2. We
applied Phase 1 on the first subproblem only, using the constrained pair of
atom moves in step 1b.
Our numerical results on the Hendrickson problems are summarized in
the
Table
4.5. The first two columns record the number of atoms and the
given distance constraints, the third column is last ffl-problem which we can
solve successfully in the progression of problems approach, and the final
column is the maximum relative error of the distances with respect to the
ideal distances in our best solution to this subproblem, where the maximum
relative error is defined as
Table
4.5 shows that for the first seven problems, which have 63 to 377 atoms
(189 to 1131 parameters) we can find the global solutions to the problems.
For the remaining five problems, which have 472 to 777 atoms (1416 to
2331 parameters), we solve the problems down to relative accuracy levels
of between 0.01 and 0.04. These results indicate that our approach has the
potential to locate exact or nearly exact solutions of quite large distance
geometry problems without using any particular structural information.
Finally, we briefly discuss the costs of Algorithm 3.1 on the protein fragment
problems. We have analyzed the costs of two typical runs for the
63-atom and 102-atom problems. For the 63-atom problem, the entire solution
process required 692,488 full function evaluations and 2,416,214 partial
function evaluations. For the 102-atom problem, the entire solution process
required 498,500 full function evaluations and 952,836 partial function
evaluations. Detailed timings show that the full dimensional local optimization
steps in Phase 1 and 2 dominate the cost of the algorithm for these
problems, accounting for 80% of the total time. The other steps are relatively
inexpensive. Therefore a cheaper local optimization algorithm will
Number of Distance Final Final
Atoms Constraints Subproblem Relative Error
236 957 0.00 8.1e-4
287 1319 0.00 8.1e-4
Table
4.5: Results on Protein Fragment Problems
reduce the total cost of our algorithm. An alternative way to reduce the cost
would be to work in internal coordinates. The advantage of this approach
is that the number of variables is greatly reduced, generally by a factor of
ten or more. Although the problem is no longer partially separable in this
parameterization, the overhead in re-evaluation of the partial function and
gradient values is relatively minor compared to the reduction in the local
optimization cost. A disadvantage of this approach is that it already uses
some structural information of the problem, namely the primary structure
of the protein, which may be considered contrary to the goal of assessing
the potential of general-purpose global optimization methods for distance
geometry problems.
5 Summary and Future Research
We have presented a new global optimization algorithm intended to solve exactly
or inexactly constrained distance geometry problems. The algorithm
utilizes small-scale global optimization calculations on selected subsets of
the parameters, performed by a stochastic global optimization method, as
a key part of its approach. Its structure is related to our previous stochas-
tic/perturbation global optimization methods for molecular clusters and protein
folding, but there are several important differences. In particular, three
algorithmic choices helped in the success of the method and none were anticipated
by us initially. The first is to expand the configuration before each
small-scale global optimization. The second is to select a linked pair of atoms
rather than a single atom as the parameters for the small-scale global opti-
mization. The third is to solve a progression of distance geometry problems
where the constraint bounds become tighter and tighter.
Our computational tests on artificial problems with up to 343 atoms
(1029 variables) and on more difficult protein fragment problems with up
to 777 atoms (2331 variables) indicate that the method is very successful
in located the configurations satisfying the given distance constraints. The
results on the protein problems especially indicate that the method is quite
successful in solving large and apparently difficult distance geometry problems
without using any information about the solution structure.
There are many directions for continuing this research that we are con-
sidering. One is to use more than two atoms in the small-scale global optimization
step of phase 2. While this increases the cost of the small-scale
global optimization, this is not a dominant cost, and with such a strategy
we were able to solve the 480 atom problem at the subproblem 0.00 level.
A second possible direction is to use a buildup approach, where one finds
(approximate) solutions to subsets of the problem on the way to solving
the full problem. The third, and perhaps most intriguing direction, is to
combine a smoothing approach like that of Mor'e and Wu [12, 13] with our
stochastic/perturbation global optimization technique. Our recent research
in protein folding has shown that this combination has great potential. Fi-
nally, if this stochastic/perturbation approach were to be part of a production
distance geometry code, one would want to find ways to combine it
with the chemical structural knowledge that chemists use in the solution of
these problems.
Acknowledgement
We thank Zhijun Wu and Bruce Hendrickson for providing the test problems,
and also thank Zhijun Wu for many helpful communications about this
research.
--R
Computational Challenges for macromolecular structure determination by X-ray crystallography and solution NMR-spectroscopy
A New Stochastic/Perturbation Method for Large-Scale Global Optimization and its Application to Water Cluster Problems
A Parallel Global Optimization Method for Solving Molecular Cluster and Polymer Conformation Problems
A New Large-Scale Global Optimization Method and its Application to Lennard-Jones Problems
Global Optimization Methods for Protein Folding Problems
Distance Geometry and Molecular Conformation
Molecular Conformation from Distance Matrices
An Evaluation of Computational Strategies for Use in the Determination of Protein structure from Distance Geometry Constraints Obtained by Nuclear Magnetic Resonance
The Molecule Problem: Exploiting Structure in Global Optimization
Distance Geometry
On the Limited Memory BFGS Method for Large Scale Optimization
Global Continuation for Distance Geometry Problems
Embeddability of Weighted Graphs in k-space is Strongly NP- hard
Global Optimization for Molecular Clusters Using a New smoothing approach
--TR
--CTR
Le Thi Hoai An, Solving Large Scale Molecular Distance Geometry Problems by a Smoothing Technique via the Gaussian Transform and D.C. Programming, Journal of Global Optimization, v.27 n.4, p.375-397, December | lennard-jones cluster;global optimization;molecular conformation |
596192 | A Constraint Satisfaction Approach to a Circuit Design Problem. | A classical circuit-design problem from Ebers and Moll (1954) features a system of nine nonlinear equations in nine variables that is very challenging both for local and global methods. This system was solved globally using an interval method by Ratschek and Rokne (1993) in the box [0, 10]^9. Their algorithm had enormous costs (i.e., over 14 months using a network of but they state that at this time, we know no other method which has been applied to this circuit design problem and which has led to the same guaranteed result of locating exactly one solution in this huge domain, completed with a reliable error estimate. The present paper gives a novel branch-and-prune algorithm that obtains a unique safe box for the above system within reasonable computation times. The algorithm combines traditional interval techniques with an adaptation of discrete constraint-satisfaction techniques to continuous problems. Of particular interest is the simplicity of the approach. | Introduction
The transistor modeling problem of Ebers and Moll [6] is the system of nonlinear equations
where the constants g ik are given by
5.2095 10.0677 22.9274 20.2153
28.5132 111.8467 134.3884 211.4823
The problem is very challenging both for local and global methods because small variations in
the inputs produce large differences in the functions. Ratschek and Rokne [23] summarize various
attempts to find a solution to this problem using local methods; these descriptions are not repeated
here. It suffices to say that successful attempts require very elaborate procedures, sometimes
combining several globally convergent algorithms.
In the same paper [23], Ratschek and Rokne propose an interval method which solves the
problem globally in the box [0; 10] 9 . In particular, they show that there exists a unique solution
in this box and they provide a guaranteed error estimate by enclosing the solution in a box whose
intervals are of width smaller than 3:2 \Theta 10 \Gamma4 . The computation times to obtain this result are,
however, extremely large. No computation times were given in [23], since this was not the primary
aim of the paper. However, a preliminary draft of the paper indicated that the total process
took over 14 months using a network of workstations. Ratschek and Rokne also
recommended that such methods for solving unstable systems should be further investigated in
order to reduce the computations.
Here we present a novel interval algorithm that isolates all safe boxes (i.e., all boxes which contain
at least one solution) to nonlinear equation systems and show that the algorithm isolates a single
safe box for the circuit-design problem within reasonable computation times. 1 The main novelty
of the procedure is in the way in which constraints are used to prune the search space. The
pruning techniques, some of which were presented in [24] and some of which are novel, are based
on constraint-satisfaction techniques from artificial intelligence and are particularly effective when
far from a solution. These techniques are thus orthogonal to traditional interval techniques, which
are most effective close to a solution (when the boxes are small).
The paper is organized as follows. Section 2 gives the necessary background in interval analysis.
Section 3 discusses the problem description and the simplyfying assumptions. Section 4 presents
a generic branch-and-prune algorithm for isolating all solutions to a nonlinear system of equa-
tions, Section 5 presents the various pruning techniques, and Section 6 reconsiders the simplifying
assumptions. Section 7 reports the experimental results and Section 8 concludes the paper.
Preliminaries
Here we review some basic concepts of interval analysis to needed for this paper. More information
on interval arithmetic can be found in many places (e.g., [1, 8, 7, 17, 18, 20, 22]). Our definitions
are slightly non-standard.
2.1 Interval Arithmetic
We consider 1g, the set of real numbers extended with the two infinity symbols,
and the extension of the relation ! to this set. We also consider a finite subset F of ! 1 containing
In practice, F corresponds to the floating-point numbers used in the implementation.
is the set of real numbers
1 Proving that the safe box contains a unique solution requires some experimental trial-and-error work; see Section
6 of [23] for a discussion of this issue.
The set of intervals is denoted by I and is ordered by set inclusion. 2
S be a subset of !. The enclosure of S, denoted by S or 2S, is the
smallest interval I such that S ' I . We often write r instead of frg for r 2 !.
We denote real numbers by the letters F-numbers by the letters l; m; u, intervals by
the letter I , real functions by the letters f; g and interval functions (e.g., functions of signature
I ! I) by the letters F; G, all possibly subscripted. We use l to denote the smallest
F-number strictly greater (resp. smaller) than the F-number l. To capture outward
rounding, we use dre (resp. brc) to return the smallest (resp. largest) F-number greater (resp.
smaller) or equal to the real number r. We also use ~ I to denote a box hI and ~r to denote
a tuple hr is the set of rational numbers and N is the set of natural numbers. We also
use the following notations:
right([l;
canonical interval is an interval of the form [l; l] or [l; l
where l is a floating-point number.
The fundamental concept of interval arithmetic is the notion of interval extension.
Definition 4 [Set Extensions] Consider a set S ' ! n and a function !. The set extension
of f is defined as
I is an interval extension of
I 0 if
Example 1 The interval function \Phi defined as
is an interval extension of addition of real numbers.
In this paper, we restrict attention to monotonic interval extensions because of their fundamental
properties and because traditional interval extensions of primitive operations satisfy these requirements
naturally.
Definition 6 [Monotonic Interval Extensions] An interval function F : I n ! I is monotonic in ~
I 0
if
I 2 ' ~
I 1 ' ~
I 2
These intervals are usually called floating-point intervals in the literature.
It is important to stress that a real function can be extended in many ways. For instance, the
interval function \Phi is the most precise interval extension of addition (i.e., it returns the smallest
possible interval containing all real results), while a function always returning [\Gamma1; 1] would be
the least accurate. In the following, we assume fixed monotonic interval extensions for the primitive
operators (for instance, the interval extension of + is defined by \Phi). In addition, we overload the
real symbols and use them for their interval extensions.
2.2 Constraint Representations
It is well known that different computer representations of a real function produce different results
when evaluated with floating-point numbers on a computer. As a consequence, the way in which
constraints are written may have an impact on the behavior on the algorithm. For this reason, a
constraint or a function in this paper is considered to be an expression written in some language. In
addition, we abuse notation by denoting functions (resp. constraints) and their representations by
the same symbol. In the remaining sections, we assume that real variables in constraints are taken
from a finite (but arbitrarily large) set fx g. Similar conventions apply to interval functions
and constraints. Interval variables are taken from a finite (but arbitrarily large) set fX g.
3 Problem Description
The problem considered in this paper is finding all solutions to a system of equations
in a box ~
I
Of course, on a computer, it is generally impossible to find these solutions
exactly and interval methods aim at returning small boxes containing all solutions. Preferably,
each such box is safe, meaning that it contains a solution. For the purposes of this paper, interval
methods can thus be viewed as solving the following problem: assuming that F i is a monotonic
interval extension of f i (1 - i - n), find all canonical 3 boxes hI
I 0 satisfying
This is of course a simplification, since interval methods generally use various interval extensions.
However, restricting attention to this problem has the benefits of crystallizing the intuition underlying
our novel pruning methods. Section 6 reconsiders this simplification.
3 In practice, one may be interested in boxes of a certain width or one may want to stop as soon as a safe box is
obtained. It is easy to generalize our results to these requirements.
Notation: Let S be a system of constraints of the form
and let ~
I be a box hI We denote by S( ~
I) and S(I the fact that ~ I satisfies the
system of interval constraints S or, in symbols,
Note also that we use S to denote systems of constraints and S to denote systems of interval
constraints.
4 The Generic Branch-and-Prune Algorithm
The above problem description highlights the finite nature of the problem, since there are only
finitely many floating-point intervals. Most interval methods are thus best viewed as global search
algorithms iterating two main steps: pruning and branching. The basic schema underlying these
algorithms, the branch-and-prune schema, is depicted in Figure 1. The function Search receives a
system of interval constraints S and an initial box ~
returns the set of canonical boxes ~
I in ~
I 0
satisfying S( ~
I). The function Search first applies a pruning step that reduces the initial box. This
pruning step is the main topic of this paper. If the resulting box ~ I is empty, there is no solution to
the problem. If the box ~
I is canonical, it is returned as a result. Otherwise, the box is split along
one dimension into two subboxes, ~
I 1 and ~
I 2 , which are then explored recursively using the same
algorithm.
A specific interval algorithm can be obtained by specifying the splitting strategy and pruning
techniques. Our algorithms use a splitting strategy that consists of splitting the largest interval in
two parts. The main novelty of our algorithms lies in the pruning techniques and we will define
three pruning operators, Prune 0 , Prune 1 , and Prune 2 , that produce three distinct algorithms.
5 The Pruning Techniques
The two pruning techniques used in our algorithm are box(1)- and box(2)- consistency. To ease
understanding, these techniques are contrasted with a traditional interval technique, which we call
box(0)-consistency for reasons that will become clear below.
5.1 Box(0)-Consistency
It is traditional in branch-and-prune algorithms to use a relaxation of the problem at hand. If there
is no solution to the easier problem, it follows that there are no solutions to the original problem.
Box(0)-consistency is a weak, but very simple, relaxation used in most interval systems. Given the
function Search(S, ~
I
begin
~ I := Prune(S, ~
I 0 );
if Empty(
~
I) then
return
else if Canonical(
~
I) then
return f ~
Ig
else
I
return Search(S, ~
I 2 );
Figure
1: The Branch-and-Prune Algorithm
problem of finding canonical boxes in a box ~ I satisfying a system of interval constraints S, box(0)-
consistency consists of testing S( ~
I). If S( ~
I) does not hold, there are obviously no solutions to the
original problem, because of the definition of interval extensions. The pruning operator associated
with box(0)-consistency can thus be defined as follows:
~
I otherwise.
Box(0)-consistency can in fact be viewed as a form of projection. The original problem could be
stated as an existence question
and box(0)-consistency approximates it by replacing each interval variable by its interval to obtain
the test
which reduces to testing each constraint in S independently.
5.2 Box(1)-Consistency
This section presents the first pruning operator used in our algorithm. It starts with an informal
discussion, then specifies the pruning operator, and presents a simple implementation. 4
4 Separating the specification from the implementation has the advantage of distinguishing what is being computed
from how to compute it. There are many ways to implement the concepts described in this section, and our goal here
is to focus on the concepts, not on the technical details (which can be found elsewhere [24]).
5.2.1 Informal Presentation
The first fundamental idea underlying box(1)-consistency [2] is to project all variables but one or,
more precisely, to replace all variables but one by their intervals. This produces a stronger pruning
than box(0)-consistency but, of course, at a higher cost. The original existence problem
is thus approximated by
This relaxation can be tested relatively easily. Notice first that the conditions are independent. In
addition, a condition of the form
can be tested by considering all the canonical intervals I in I 1 and testing
Our implementation tries to be more effective by using adaptations of the interval Newton method.
The second fundamental idea underlying box(1)-consistency is to reduce the intervals associated
with the variables. Consider the relaxation
and let I l be the leftmost interval in I 1 satisfying
and I r the rightmost interval in I 1 satisfying
It should be clear that X 1 must range in the interval I 0
I
since any interval on the left or on the right of I 0 violates one of the conditions of the relaxation.
The interval associated with X 1 can thus be reduced to I 0 .
This reduction is applied for each of the variables until no more reduction takes place. The
resulting box is said to be box(1)-consistent. In the course of this process, it is possible to detect
that no solution to the original problem exists, since the intervals associated with the variables
become smaller. Note also that a variable can be considered several times in this reduction process.
5.2.2 The Pruning Operator
We now formalize the informal discussion above and present the pruning operator associated with
box(1)-consistency. Recall that all definitions assume that S is defined over the set of variables
. The main concept is box(1)-consistency, which expresses that a system cannot be
narrowed further by the reduction process described informally in the previous subsection.
Definition 7 [Box(1)-Consistency] Let S be a system of interval constraints, let ~ I be a box
n). S is box(1)-consistent in ~ I
and
S is box-consistent in ~ I if it is box(1)-consistent in ~
I wrt all i in
The pruning operator associated with box(1)-consistency simply returns the largest box in the
initial interval that is box(1)-consistent (or, more informally, the largest box in the initial interval
that cannot be narrowed further). This box always exists because of the monotonicity of interval
extensions and is unique. Of course, it can be empty.
Definition 8 [Box(1)-Consistency Pruning] Let S be a system of interval constraints and let ~
I be
a box. The pruning operator associated with box(1)-consistency can be defined as
I 0
where ~
I 0 is the largest box in ~ I such that S is box(1)-consistent in ~ I 0 .
5.2.3 A Simple Implementation
The pruning operator can be computed in many ways. Figure 2 presents a simple iterative algorithm
for this purpose; see [24] for a more efficient implementation. The algorithm is a simple fixpoint
algorithm that terminates when no further pruning can be obtained (i.e., ~
I p ). The body of the
loop applies a narrowing operation on each of the variables and produces a new box that is the
intersection of all these narrowings. The narrowing function Narrow 1 (S, ~
I,i) returns the largest
box ~
I 0 in ~
I such that S is box(1)-consistent in ~
I 0 wrt i.
5.3 Box(2)-Consistency
Box consistency has been shown to be effective for solving a variety of nonlinear applications
[24]. For some applications, however, and for the transistor modeling problem in particular, better
performance can be obtained by using a stronger local consistency condition that we call box(2)-
consistency. Box(2)-consistency is in fact an approximation of path consistency [16] and is related
to some consistency notions presented in [14].
function Prune 1 (S, ~
begin
repeat
~
I p := ~
until ~ I = ~
I
return ~ I;
function Narrow 1 (S,hI
begin
I c is canonical and S(I
return ;;
else
return
Figure
2: Implementing Box(1)-Consistency
5.3.1 Informal Presentation
Box(2)-consistency generalizes box(1)-consistency by projecting all but two variables. The original
existence problem
is thus approximated by
9X
Once again, it is possible to test this relaxation easily, at least from a conceptual standpoint. The
conditions are independent and a condition of the form
can be tested by considering all pairs of canonical intervals in I 1 and I 2 for X 1 and X 2 .
As was the case for box(1)-consistency, box(2)-consistency makes use of this relaxation to prune
the intervals associated with each variable. Consider a condition
and a canonical interval I 0
. If there is no box ~
I
such that S is box(1)-
consistent in ~ I 0 , then obviously
1 . It is thus possible to narrow the bounds of I 1 by using this
pruning rule, and this process can be iterated for all variables until no further pruning is available.
5.3.2 The Pruning Operator
The notion of box(2)-consistency is defined in terms of box(1)-consistency or, more precisely, in
terms of whether a system of interval constraints can be made box(1)-consistent in a box.
Definition 9 [Box(1)-Satisfiability] A system of interval constraints S is box(1)-satisfiable in ~
I 0 ,
denoted by BoxSat 1 (S; ~
I 0 ), if there exists a box ~
I ' ~
I 0 such that S is box(1)-consistent in ~
I.
Informally speaking, box(2)-consistency says that the bounds of each variable are box-satisfiable,
implying that they cannot be reduced further using the pruning rule described above.
S be a system of interval constraints and ~ I be a box
is box(2)-consistent in ~
I wrt i if
when l i 6= u i and if
The system S is box(2)-consistent in ~ I if it is box(2)-consistent in ~ I wrt all
It can be shown that box(2)-consistency implies box(1)-consistency.
Proposition 1 Let S be a system of monotonic interval constraints. If S is box(2)-consistent in
~
I , then S is box(1)-consistent in ~ I .
Proof Assume for simplicity that ~ I . The proof is similar
otherwise. Since S is box(2)-consistent in ~ I , S is box(2)-consistent in ~
I wrt all i (1 - i - n). Thus,
or, more explicitly,
9 ~
I
is box(1)-consistent in ~
It follows that
and, by monotonicity of F i , that
The proof that
is similar. The result follows from the definition of box(1)-consistency. 2
The pruning operator associated with box(2)-consistency simply returns the largest box in the
initial interval which is box(2)-consistent.
Definition 11 [Box(2)-Consistency Pruning] Let S be a system of interval constraints and let ~ I
be a box. The pruning operator associated with box(2)-consistency can be defined as
I 0
where ~
I 0 is the largest box in ~ I such that S is box(2)-consistent in ~ I 0 .
5.3.3 A Simple Implementation
Once again, the pruning operator can be computed in many ways. Figure 3 presents a simple
iterative algorithm close to our actual implementation. The algorithm is again a simple fixpoint
algorithm that terminates when no further pruning can be obtained. The body of the loop applies
a narrowing operation on each of the variables and produces a new box that is the intersection
of all these narrowings. The narrowing function Narrow 2 (S, ~
I,i) returns the largest box ~ I 0 in ~ I
such that S is box(2)-consistent in ~
I 0 wrt i. The pruning operator of box(1)-consistency is used to
compute this narrowing operator. Note that it would be easy to define any level of box-consistency
at this point, since box(k-1)-consistency can be used to define box(k)-consistency in a generic way.
5.4 Related Work
It is useful to relate these pruning operators to earlier work in constraint satisfaction. Projec-
tions, and approximations of projections, have been used extensively in the artificial intelligence
community (under the name consistency techniques) to solve discrete combinatorial problems (e.g.,
[16, 15]). They have been adapted to continuous problems (e.g., [5, 14]) and used inside systems
such as BNR-Prolog and CLP(BNR) [21, 3] and many systems since then. The techniques used
in systems like BNR-Prolog and CLP(BNR) are weaker than box(1)-consistency, since they
decompose all constraints into ternary constraints on distinct variables before applying a form of
box(1)-consistency. They do not scale well on difficult problems. Box(1)-consistency was introduced
in [2]. It is related to the techniques presented in [10], which uses a similar idea for the splitting
process. The consistency notions of [14] are a weaker, and less effective, form of box(k)-consistency:
it is obtained by decomposing all constraints into ternary constraints over distinct variables and by
applying a form of box(k)-consistency on the resulting constraints.
function Prune 2 (S, ~
begin
repeat
~
I p := ~
until ~ I = ~
I
return ~ I;
function Narrow 2 (S,hI
begin
I c is canonical and
return ;;
else
return
Figure
3: Implementing Box(2)-Consistency
6 The Branch-and-Prune Algorithm Revisited
We now reconsider the assumptions of Section 3. As mentioned in that section, our algorithm
uses two interval extensions, the natural interval extension and the mean value interval extension,
since distinct interval extensions may produce different prunings. In particular, the natural interval
extension is generally better when far from a solution, while the mean value interval extension is
more precise when close to a solution. This section reviews both extensions and reconsiders the
overall branch-and-prune algorithm.
6.1 The Natural Interval Extension
The simplest interval extension of a function is its natural interval extension. Informally speaking,
it consists in replacing each number by the smallest interval enclosing it, each real variable by an
interval variable and each real operation by its fixed interval extension. In the following, if f is a
real function, b
f is its natural extension.
Example 2 [Natural Interval Extension] The natural interval extension of the function x 1
is the interval function
The advantage of this extension is that it preserves how constraints are written and hence users of
the system can choose constraint representations particularly appropriate for the problem at hand.
It is useful to generalize the natural interval extension to a system of constraints.
Definition 12 [Natural Interval Extension of a System] Let S be a system of constraints
The natural extension of S, denoted by b
S, is the set of the interval constraints
The following result is easy to prove by induction.
Proposition 2 The natural interval extension of a function, a constraint, or a system of constraints
is monotonic.
6.2 The Mean Value Interval Extension
The second interval extension is based on the Taylor expansion around a point. This extension is
an example of centered forms that are interval extensions introduced by Moore [17] and have been
studied by many authors, since they have important properties. The mean value interval extension
of a function is parametrized by the intervals for the variables in the function. It also assumes that
the function has continuous partial derivatives. Given these assumptions, the key idea behind the
extension is to apply a Taylor expansion of the function around the center of the box and to bound
the rest of the series using the box.
I be a box hI be the center
of I i . The mean value interval extension of a function f in ~ I, denoted by -(f; ~
I), is the interval
function
d @f
Let S be a system of constraints
The mean value interval extension of S in ~ I , denoted by -(S; ~ I), is the system of interval constraints
function Search(S, ~
I
begin
~ I := Prune(
I 0 ), ~
I 0 );
if Empty(
~
I) then
return
else if Canonical(
~
I) then
return f ~
Ig
else
I
return Search(S, ~
I 2 );
Figure
4: The Branch-and-Prune Algorithm Revisited
Note that the mean value interval extensions is defined in terms of natural interval extensions. The
proof of the following proposition can be found in [4].
Proposition 3 The mean value interval extension of a function is a monotonic interval extension.
It is interesting to note that box consistency on the mean value interval extension of a system of
constraints is closely related to the Hansen-Sengupta operator [8], which is an improvement over
Krawczyk's operator [13]. Hansen and Smith also argue that these operators are more effective
when the interval Jacobian of the system is diagonally dominant [9] and they suggest conditioning
the system S. For the purpose of this paper, we simply assume that we have a conditioning operator
use the notation - c (S; ~ I) to denote -(cond(S; ~ I); ~
I). See [11, 12] for extensive
coverage of conditioners.
6.3 The Branch-and-Prune Algorithm
We are now in position to reconsider our branch-and-prune algorithm. The new version, given in
Figure
4, differs in two ways from the algorithm presented in Section 4. On the one hand, the
algorithm receives as input a system of constraints (instead of a system of interval constraints).
On the other hand, the operation Prune receives a system of interval constraints consisting of the
natural interval extension and the conditioned mean value interval extensions of the original system.
6.4 Existence Proof
We now describe how the algorithm proves the existence of a solution in a box. Let ff
0g be a system of equations over variables fx be a box and define the
intervals I 0
n) as follows
I 0
d
I 0
then there exists a zero in hI 0
i. A proof of this result can be found in [19].
7 Experimental Results
This section reports experimental results of the branch-and-prune algorithms. We compare the
branch-and-prune algorithm with two instantiations of the pruning operator: Prune 1 to obtain the
algorithm presented in [24] and Prune 2 to obtain a novel algorithm more effective for the transistor
modeling problem.
The Transistor Modeling Problem The box(2)-consistency algorithm was applied to find all
solutions of the transistor modeling problem. Branching was applied until a safe box or a box of
width smaller than 10 \Gamma8 was obtained. The algorithm returned a unique box
in the original range [0; 10] 9 , together with a proof that the box contains a solution. The algorithm
performs only 118 branchings and takes 2359.80 seconds (roughly 40 minutes) on a Sun Ultra-
running Solaris. This is of course a considerable improvement over the results of Ratschek
and Rokne [23]. Interestingly, the box(1)-consistency algorithm performs 135099 branchings and
takes 11841 seconds (roughly 3 hours and 20 minutes) on the same machine, still a considerable
improvement over [23].
Benchmarks from Continuation Methods It is worth comparing the box(1)- and box(2)-
consistency algorithms on some standard benchmarks from continuation methods [25]. The box(1)-
consistency algorithm compares well with continuation methods on these benchmarks [24]. Table
1 reports the results and gives, for each benchmark, the number of variables, the degree of the
polynomial system, the initial range of the variables, and the CPU time and number of branchings of
Benchmarks v d range Box(1)-Time Box(1)-Branch Box(2)-Time Box(2)-Branch
combustion
chemistry 5
Table
1: Box(1)- Versus Box(2)- Consistency on Some Benchmarks from Continuation Methods.
the box(1)- and box(2)-consistency algorithms. See [25, 24] for a description of the benchmarks. The
intention is not to compare the two algorithms systematically but rather to make readers aware that
neither of two algorithms is really superior. As can be seen, the box(2)-consistency algorithm always
performs less branchings (as should be expected) but is always slower than the box(1)-consistency
algorithm. On these problems, box(1)-consistency seems to give a better tradeoff between pruning
and pruning time. A fundamental topic for future research is thus to determine when box(2)-
consistency is more effective than box(1)-consistency and, more generally, to characterize the class
of nonlinear problems for which these techniques are effective.
8 Conclusion
This paper reconsidered the transistor modeling problem from Ebers and Moll [6], which consists
of nine nonlinear equations and is challenging both for local and global methods. The problem
was tackled by a novel branch-and-prune algorithm combining techniques from interval methods
and constraint satisfaction. In particular, the algorithm enforces a local consistency condition
called box(2)-consistency that strengthens the notion of box(1)-consistency introduced in [24]. The
algorithm was applied to find all solutions to the transistor modeling problem and returned a unique
safe box in the range [0; 10] 9 in about 40 minutes, performing only 118 branchings. The paper also
indicated that box(2)-consistency may be too strong a local condition for many problems, since it
is slower than box(1)-consistency on benchmarks from continuation methods [25]. An interesting
avenue of research is to characterize more formally the class of applications for which box(1)- and
box(2)-consistency are effective pruning techniques.
Acknowledgments
Special thanks to Christian Bliek for bringing the transistor modeling problem to our attention
and to Yves Deville for many interesting discussions. This research was partly supported by the
Office of Naval Research under grant N00014-91-J-4052 ARPA order 8225, the National Science
Foundation under grant numbers CCR-9357704, a NSF National Young Investigator Award.
--R
Introduction to Interval Computations.
CLP(Intervals) Revisited.
Applying Interval Arithmetic to Real
Mean Value Forms in Interval Analysis.
Logical Arithmetic.
An Interval Newton Method.
Bounding Solutions of Systems of Equations Using Interval Analysis.
Interval Arithmetic in Matrix Computation: Part II.
Safe Starting Regions by Fixed Points and Tightening.
Preconditioners for the Interval Gauss-Seidel Method
A Review of Preconditioners for the Interval Gauss-Seidel Method
Consistency Techniques for Numerical Constraint Satisfaction Problems.
Consistency in Networks of Relations.
Networks of Constraints
Interval Analysis.
Methods and Applications of Interval Analysis.
Safe Starting Regions for Iterative Methods.
Interval Methods for Systems of Equations.
Constraint Arithmetic on Real Intervals.
New Computer Methods for Global Optimization.
Experiments Using Interval Analysis for Solving a Circuit Design Problem.
Solving Polynomial Systems Using a Branch and Prune Approach.
Homotopies Exploiting Newton Polytopes For Solving Sparse Polynomial Systems.
--TR
--CTR
Laurent Granvilliers , Frdric Benhamou, Progress in the Solving of a Circuit Design Problem, Journal of Global Optimization, v.20 n.2, p.155-168, June 2001
Yves Deville , Micha Janssen , Pascal Van Hentenryck, Consistency Techniques in Ordinary Differential Equations, Constraints, v.7 n.3-4, p.289-315, July-October 2002
Laurent Granvilliers , Frdric Benhamou, Algorithm 852: RealPaver: an interval solver using constraint satisfaction techniques, ACM Transactions on Mathematical Software (TOMS), v.32 n.1, p.138-156, March 2006
Yahia Lebbah , Claude Michel , Michel Rueher, A Rigorous Global Filtering Algorithm for Quadratic Constraints, Constraints, v.10 n.1, p.47-65, January 2005
Yahia Lebbah , Olivier Lhomme, Accelerating filtering techniques for numeric CSPs, Artificial Intelligence, v.139 n.1, p.109-132, July 2002
Stefan Ratschan, Search Heuristics for Box Decomposition Methods, Journal of Global Optimization, v.24 n.1, p.35-49, September 2002
Frdric Benhamou , Frdric Goualard , ric Langunou, , Marc Christie, Interval constraint solving for camera control and motion planning, ACM Transactions on Computational Logic (TOCL), v.5 n.4, p.732-767, October 2004
Laurent Granvilliers , Eric Monfroy , Frdric Benhamou, Symbolic-interval cooperation in constraint programming, Proceedings of the 2001 international symposium on Symbolic and algebraic computation, p.150-166, July 2001, London, Ontario, Canada | interval methods;branch and prune;constraint satisfaction;transistor modelling;electrical circuit;global zero search |
596220 | Comparing Nonsmooth Nonconvex Bundle Methods in Solving Hemivariational Inequalities. | Hemivariational inequalities can be considered as a generalization of variational inequalities. Their origin is in nonsmooth mechanics of solid, especially in nonmonotone contact problems. The solution of a hemivariational inequality proves to be a substationary point of some functional, and thus can be found by the nonsmooth and nonconvex optimization methods. We consider two type of bundle methods in order to solve hemivariational inequalities numerically: proximal bundle and bundle-Newton methods. Proximal bundle method is based on first order polyhedral approximation of the locally Lipschitz continuous objective function. To obtain better convergence rate bundle-Newton method contains also some second order information of the objective function in the form of approximate Hessian. Since the optimization problem arising in the hemivariational inequalities has a dominated quadratic part the second order method should be a good choice. The main question in the functioning of the methods is how remarkable is the advantage of the possible better convergence rate of bundle-Newton method when compared to the increased calculation demand. | Introduction
Hemivariational inequalities introduced by Panagiotopoulos are generalizations
of variational inequalities. By means of them problems involving
nonmonotone and multivalued constitutive laws and boundary conditions
can be defined mathematically. In many cases hemivariational
inequalities can be reformulated as substationary point problems of the
corresponding nonsmooth nonconvex energy functionals. For mathematical
theory and the applications of hemivariational inequalities we
refer to [23],[22].
The aim of this paper is to apply nonsmooth nonconvex optimization
methods for the numerical solution of hemivariational inequalities
and analyse their efficiency. As a typical example of hemivariational
inequalities we consider a laminated composite structure under loading
when the binding material between laminae obeys a nonmonotone multivalued
law. This kind of a mechanical problem has been investigated
numerically in [21],[26]. There it has been replaced by a sequence of convex
subproblems which have been solved by using convex minimization
methods.
The discretization of the considered problem is realized by the finite
element method scheme for nonmonotone multivalued differential inclusions
presented in [17],[18],[19]. This scheme has been proved to be
mathematically well-posed: stable and convergent.
Bundle methods are at the moment the most promising methods
for nonsmooth optimization. Their origin is the classical cutting plane
method of [4] and [7] and they base on the piecewise linear approximation
of the objective function. Due to the numerical experiments
the proximal bundle methods (see [10], [25] and [16]) seem to work in
the most efficient and reliable way. They can be called also to diagonal
variable metric methods, since a stabilizing quadratic term in form of
diagonal matrix was added to the polyhedral approximation in order
to accumulate some second order information about the curvature of
the objective function.
However, the development of "real" second order method has been
fascinating the researchers of nonsmooth optimization during its whole
history. Several attempts has been done in order to exploit the second
order subderivative information. Already in his pioneering work [11]
Lemar'echal derived a version of variable metric bundle method utilizing
the classical BFGS secant updating formula from smooth optimization.
Due to the disappointing numerical results in [12] this idea was buried
nearly for two decades. Several modifications of the variable metric concepts
has been proposed for example in [6], [13], [3] and [20]. According
to very limited numerical experiments (see for example [6]) it seems
that the variable metric bundle methods works fairly well. However,
when proportion the results to the extra computational efforts needed
with the full matrix algebra they do not offer substantial advancement
in numerical solution process.
More recently a new second order approach has been proposed in
[15], where the bundle-Newton method was introduced. The main difference
compared to the earlier methods was include second order information
directly to the model, in other words the piecewise linear model
was replaced by piecewise quadratic model. In numerical tests of [15]
it turns out to be very effective for quadratic type of problems.
The aim of this paper is to compare the proximal bundle method
and the bundle-Newton method in solving hemivariational inequalities.
Since the optimization problem arising in the solution of hemivaria-
tional inequalities has a dominated quadratic part the second order
method should be a good choice. The main question in the functioning
of the method is how remarkable is the advantage of the possible better
convergence rate of the bundle-Newton method when compared to
the increased calculation demand. The numerical results indicate the
superiority of the bundle-Newton method for the problems having a
quadratic nature.
The paper is organized as follows. In chapter 2 we introduce the
considered optimization problem and give some definitions needed in
continuation. The chapters 3 and 4 are devoted to the proximal bundle
method and bundle-Newton method, respectively. In chapter 5 the test
hemivariational inequality problem is introduced and finally in chapter
6 we give some numerical results.
2. Nonsmooth and Nonconvex Optimization Problem
We consider the following nonsmooth and nonconvex optimization problem
ae minimize f(x)
subject to x 2 K;
where the objective function f from R n to R is supposed to be locally
Lipschitz continuous function. The feasible set K has a more specific
structure, i.e.
where x l and x u are the lower and upper bounds for variables, respec-
tively. We suppose that at each x 2 K we can evaluate the function
value f(x) and an arbitrary subgradient g(x) from the subdifferential
of Clarke (see [5])
The normal cone of K at x 2 K can be defined (see [16]) by
cl
ae [
oe
R is the distance function of K, i.e.
ck
Definition 1. Suppose that f : R n ! R is locally Lipschitz continu-
ous. Then x is called a substationary point of the problem (P) if
Now we can formulate the following necessary optimality condition.
Theorem 1. Every local minimizer of the problem (P) is substation-
ary.
For the proof we refer to [16].
In the following chapters we describe two methods: proximal bundle
method and bundle-Newton method for finding local minimizers (and
thus substationary) points of the problem (P). For the convergence of
the methods we need the following semismoothness assumption due to
[2].
Definition 2. The function f : R n ! R is said to be upper semis-
mooth, if for any x 2 R n , d 2 R n and sequences g i ae R n and t i ae (0; 1)
satisfying d) and t i # 0, one has
lim sup
3. Proximal Bundle Method
In this chapter we shortly describe the ideas of the proximal bundle
method for nonsmooth and nonconvex minimization. For more details
we refer to [10], [25] and [16].
3.1. Direction finding
Our aim is to produce a sequence fx k g 1
converging to some
local minimum of the problem (P). Suppose that the starting point x 1
is feasible and at the k-th iteration of the algorithm we have the current
iteration point x k and some trial points y j 2 R n (from past iterations)
and subgradients where the index set J k is a
nonempty subset of
The idea behind the proximal bundle method is to approximate the
objective function below by a piecewise linear function, in other words,
we replace f by so called cutting-plane model
which equivalently can be written in the form
with the linearization error
Note, that in convex case the subdifferential can be rewritten as (see
Then it is easy to proof that
In other words, if f is convex, then the cutting-plane model -
f k is an
under estimate for f and the nonnegative linearization error ff k
how good an approximation the model is to the original problem.
In nonconvex case these facts are not valid anymore: ff k
may have a tiny
(or even negative) value, although the trial point y j lies far away from
the current iteration point x k and thus the corresponding subgradient
j is useless. For these reasons the linearization error ff k
j is replaced by
so called subgradient locality measure (cf. [8])
where is the distance measure parameter
and
is the distance measure estimating
without the need to store the trial points y j . Then obviously fi k
for all j 2 J k and min x2K
min
In order to calculate the search direction d k 2 R n we replace the
original problem (P) by the cutting plane model
subject to x k
(CP)
where the regularizing quadratic penalty term 1u k d T d is added to guarantee
the existence of the solution d k and keep the approximation local
enough. The weighting parameter added to improve the
convergence rate and to accumulate some second order information
about the curvature of f around x k . It was adapted from the proximal
point algorithm by [24] and [1] and was first time used in [10] and [25].
Notice, that the problem (CP) still is a nonsmooth optimization
problem. However, due to piecewise linear nature it can be rewritten
as a (smooth) quadratic programming subproblem finding the solution
subject to \Gamma fi k
and
3.2. Line search
In previous section we calculated the search direction d k . Next we
consider the problem of determining the step size into that direction.
We assume that mL 2 (0; 1), mR 2 (mL ; 1) and - t 2 (0; 1] are fixed
line search parameters. First we shall search for the largest number
is the predicted amount of descent and it holds
due to (11). If such a parameter exists we take a long serious step
Otherwise, if (11) holds but
then a short serious step
R d k
is taken and if t k
we take a null step
L is such that
In long serious step there occurs a significant decrease in the value
of the objective function. Thus there is no need for detecting discontinuities
in the gradient of f , and so we set g k+1 2 @f(x k+1 ). In short
serious steps and null steps there exists discontinuity in the gradient of
f . Then the requirement (12) ensures that x k and y k+1 lie on the opposite
sides of this discontinuity and the new subgradient g k+1 2 @f(y k+1 )
will force a remarkable modification of the next search direction finding
problem. In what follows we are using the line search algorithm presented
in [16]. The convergence proof of the algorithm is assumed f to
be upper semismooth (see (2)).
The iteration is terminated if
final accuracy tolerance supplied by the user.
3.3. Weight updating
One of the most important questions concerning proximal bundle method
is the choice of the weight u k . The simplest strategy might be to keep
it constant u k j u fix . This, however, leads to several difficulties. Due
to Theorem 4 we observe the following:
If u fix is very large, we shall have small jv k j and kd k k, almost all steps
are serious and we have slow descent.
If u fix is very small, we shall have large jv k j and kd k k, and each serious
step will be followed by many null steps.
Therefore, we keep the weight as a variable and update it when neces-
sary. For updating u k we use the safeguarded quadratic interpolation
algorithm due to [10].
4. Bundle-Newton Method
Next we describe the main ideas of the second order bundle-Newton
method. For more details we refer to [15].
4.1. Direction finding
We suppose that at each x 2 K we can evaluate, in addition to the
function value f(x) and an arbitrary subgradient g(x) 2 @f(x), also
an n \Theta n symmetric matrix G(x) approximating the Hessian matrix
f(x). For example, at the kink point y of piecewise twice differentiable
function we can take "infinitely close"
to y.
Instead of piecewise linear cutting-pane model (3) we introduce a
piecewise quadratic model of the form
~
damping parameter. The
model (14) can again equivalently be written as
~
and for all j 2 J k the linearization error takes now the form
Note that now even in the convex case ff k
j might be negative. Therefore
we replace the linearization error (16) again by the subgradient locality
measure (7) and we remain the property (see [15])
min
~
The search direction d k 2 R n is now calculated as the solution of
minimize ~
d)
subject to x k
(CN)
Note, that since the model already has second order information no
regularizing quadratic terms are needed like in (CP). The problem (CN)
is transformed to a nonlinear programming problem, which is then
solved by a recursive quadratic programming method (see [15]). If we
denote
this procedure leads to a quadratic programming subproblem finding
the solution (d
subject to \Gamma fi k
and
where
and -
are the Lagrange multipliers of (QN) from the
previous iteration k \Gamma 1. In calculations W k is replaced by its positive
definite modification, if necessary.
4.2. Line search
The line search operation of the bundle-Newton method is following
the same principles than in section 3.2 for proximal bundle method.
The only remarkable difference occurs in the termination condition for
short and null steps, in other words (12) is replaced by two conditions
and
where supplied by the user.
The bundle-Newton method is using the line search algorithm presented
in [15]. The convergence proof of the algorithm is assumed f to
be upper semismooth (see (2)).
5. Formulation of the problem
5.1. Continuous problem
We consider a two-dimensional laminated composite structure consisting
of two elastic laminae and a interlayer binding material under loading
(see Fig.1). The mechanical behaviour of the binding material, the
interlaminar bonding forces versus the corresponding relative displacements
of the laminae, is depicted by Fig.2. This relation is typically
nonmonotone and multivalued. Therefore, this kind of mechanical
problems lead to the hemivariational inequalities or in the energy formulation
to the substationary point problems of nonconvex, nonsmooth
functionals. The similar mechanical structures have been investigated
in [21],[26].
Due to the symmetry of the structure and by assuming that the
forces applied to the upper and lower part of the structure are the
same it is enough to study the upper lamina. Next, we formulate
mathematically the problem. We denote
by\Omega ae R 2 the upper lamina
in its undeformed state. The Lipschitz boundary \Gamma
of\Omega consists
of four nonoverlapping open subsets We denote
by
i;j=1 the stress tensor,
i;j=1 the strain tensor,
F
F
G
G
G
G24
Figure
1. Laminated composite structure under loading
Relative normal displacement of laminae in mm
Interlaminar
binding
force
in
kN/m
F
G2000040000
A
Figure
2. Nonmonotone adhesive force between laminae
the displacement,
the outward unit normal
vector to \Gamma and
the boundary force.
Assuming that the deformations are small the lamina obeys the
Hooke's law of form
@x l
and
i;j;k;l=1 is the elasticity tensor satisfying the usual symmetry
and ellipticity conditions. The equation of the equilibrium state
of\Omega is as follows:
since there are no volume forces.
Next, we define the boundary conditions. On \Gamma 1 we have given displacement
and on both \Gamma 2 and \Gamma 3 given boundary forces
where F is a constant force.
Furthermore, on \Gamma 4 we have in the tangential direction a given
boundary force
On the other hand, due to the binding interlayer material it holds a
nonmonotone, multivalued boundary condition (see Fig.2) expressed
by means of the subdifferential @j of a locally Lipschitz function j
and because of the nonpenetration of the laminae a unilateral boundary
condition
in the normal direction. Note that we have to scale by 1the x 1 -axis of
the graph in Fig.2 in order to get the nonmonotone law of (26), because
in Fig.2 we have relative displacements of the laminae.
By employing Green-Gauss theorem and taking into account both
the equilibrium equation (21) and the boundary conditions (22)-(27)
we obtain the following hemivariational inequality: Find u 2 K such
that
Z
Z
where K is a set of kinematical admissible displacements defined by
G
G
F
GG
Figure
3. 32\Theta4 triangulation Th
of\Omega
(\Omega\Gamma denotes the Sobolev space), j ffi is the generalized directional
derivative of j and a the bilinear form of the linear elasticity defined
by
Z
Due to the symmetry of the bilinear form a the potential energy of
the considered mechanical system has the form:
Z
Z
Then, we can formulate the following problem: Find u 2 K such
that u is a substationary point (cf. (1)) of f on K, i.e.
where NK (u) is the normal cone to the nonempty, closed and convex
set K at u. It can be shown that the problem (28) has at least one
solution (see [22]), and that the solutions of the inclusion (33) are also
the solutions of the inequality (28) (see [19]).
5.2. Discrete problem
We apply the finite element approximation scheme developed in [17],[18].
Let h be a discretization parameter related to the mesh size of the triangulation
of\Omega (see Fig.3). The set K is approximated by the set
of piecewise linear functions over the triangulation T h defined by
For the approximation of the bilinear form a and the boundary inte-
gral
R
F (v 2 \Gammau 2 )d\Gamma we use appropriate numerical integration formulae
(this is standard in the finite element method). The nonmonotone term
in (28) is approximated by the following numerical integration formula
Z
i2I
where fx i g i2I is the set of the nodal points of the triangulation T h on
are the coefficients of the integration formula.
Let us make the identification X h with the corresponding subset of
R 2n , i.e. the displacement function v is identified with the displacement
vector of the nodal points (n is the number of the nodal points). Then
the discrete problem in the matrix form is as follows: Find u 2 K h such
that
i2I
where A is the stiffness matrix of the structure, F the (discrete) load
vector and I the set of the indices corresponding to the x 2 -displacements
of the nodal points on \Gamma 4 .
Then we can formulate the discrete substationary point problem on
where
i2I
Because of Corallary 1 of Proposition 2.3.3 in [5] and the terms j(u i ),
are independent of each others we have that
i2I
Now it holds that every solution of (38) is a solution of the problem (37)
(see [19]). Also due to the results in [18],[19] we know that the discrete
problem (38) is solvable and its solutions converge in subsequences to
the solutions of the continuous problem (33).
Remark 1. The functional f h is upper semismooth. Indeed, let u; d 2
R 2n be given. ?From Definition 2 of the upper semismoothness we see
that it is enough to study the restriction of f h onto the line
Rg, on which f h is smooth except finite number of points (cf.
and Fig.2). If f h j L is smooth at u, it is smooth also on some small
(one-dimensional) neighborhood of u and the condition
lim sup
is trivially satisfied. On the other hand, if f h j L is nonsmooth in u, there
exists small neighborhood of u in which u is the only nonsmooth point.
Therefore, f h j L is continuously differentiable in this set except at the
point u and the classical one-sided derivatives exist at u implying (41).
Since the nonlinear behaviour and the constraints of the problem
have an effect only on the x 2 -displacements on the nodes on \Gamma 4 , we can
make our computation much more effective by applying the method of
condensation of unknowns. Assuming that m components corresponding
to the index set I are listed first, we have the following decomposition
of the matrix A and the vectors F and u
A 21 A 22
where A 11 is an m \Theta m matrix and F 1 ; . Then the elimination
of u 2 (2 R 2n\Gammam ) from (37) leads to the following discrete potential
functional
~
where ~
called the Schur complement and
~
. Hence, the eliminated substationary point
problem is formulated as follows: Find u 1 2 K h such that
where K h is interpreted as a set of R m .
6. Numerical Results
The optimization algorithms has been implemented in Fortran 77 and
the test runs have been performed on an HP9000/J280 (180 MHz)
computer. The tested optimization codes are presented in Table I.
All the codes are utilizing the subgradient aggregation strategy of
[8] to keep the storage requirements bounded. The code PB is employing
the quadratic solver QPDF4, which is based on the dual active
Table
I. Tested codes and software.
Code Software Package Author(s) Method
PB NSOLIB M-akel-a Proximal bundle
PBL UFO Luk-san &Vl-cek Proximal bundle
BNL UFO Luk-san &Vl-cek Bundle-Newton
Table
II. Eliminated with discretization 16 \Theta 2.
Code Ni Nf CPU f Ni Nf CPU f
set method derived in [9], while the codes PBL and BNL are using
the solver ULQDF1 implementing the dual projected gradient method
proposed in [14].
The above optimization codes have been applied to the mechanical
structure of Fig.1 under eleven constant loadings (F=20000, 21000,
In calculation we have used the incremental procedure: the loading of
the structure is increased uniformly and as an initial guess for the
solution of the next load it is used the solution of the previous load.
The bigger increment from 25000 kN/m 2 to 26200 kN/m 2 is due to the
fact that the structure is very sensitive to the increase of the loading
between 25000-27000 kN/m 2 where the partial (branches B-G in Fig.2)
and the complete delamination (branch G-H in Fig.2) take place. With
the load 26200 kN/m 2 we can illustrate the case in which only the
partial delamination occurs. We have applied the plane stress model
Table
III. Eliminated with discretization 4.
Code Ni Nf CPU f Ni Nf CPU f
PBL 426 434 3.15 -0.871201 3007 3063 14.16 -15.21929
Table
IV. Eliminated with discretization 64 \Theta 8.
Code Ni Nf CPU f Ni Nf CPU f
Table
V. Eliminated with discretization 128 \Theta 16.
Code Ni Nf CPU f Ni Nf CPU f
with the elasticity modulus the Poissons ratio
0:3 and the thickness
The calculated results with different discretizations are presented in
Tables
II-VI, in which Ni denotes the number of iterations, Nf denotes
the number of objective function (and also subgradient) evaluations,
CPU the used total computer time in seconds and f is the objective
function value at termination. Note that the elimination, the computation
of the Schur complement ~
A and the new load vector ~
F , for the
discretization 4, 64 \Theta 8 and 128 \Theta 16 is taking about 0.67,
1.35, 23.1 and 545.0 seconds, respectively. The stopping criterions are
chosen to be comparable, in other words the relative accuracy in the
optimal objective function value is about 6 digits.
Table
VI. Not eliminated with discretization 4.
Code Ni Nf CPU f Ni Nf CPU f
PB 4458 4474 156.97 -0.880013 40112 40128 1458.51 -15.22886
Table
VII. Average error of the normal displacements on \Gamma 4 by
BNL.
Discretization Error in mm Error in mm
128 \Theta 16 *
From the numerical results in Tables II-VI we can conclude the
superiority of the bundle-Newton code BNL. In all cases it used less
computing resources and found the local minimum in the most reliable
way. Due to the matrix operations the individual iteration is more
costly than in proximal bundle methods. However, the total amount of
iterations stays very low, and thus the used CPU time of BNL is always
less than with the other codes.
Note, that the iteration number and the function evaluations of BNL
do not depend on the dimension of the problem. On the other hand,
when the size of problem is doubled, BPL needed about two times and
PB about 1.6 times more iterations and function evaluations.
When comparing the CPU times versus discretization the behaviour
is nonlinear and the multiplier is growing exponentially. We have to
remember, that especially in the large problems the elimination is taking
most of the time and the differences do not seem to be so remark-
able. For example for the discretization 128 \Theta 16 the optimization time
of BNL is only about 2 % of the total time.
By comparing the Tables III and VI we can see the influence of the
elimination; the solution of the problem without elimination is taking
nearly ten times more CPU time than the eliminated one. Note that
especially for the proximal bundle methods the elimination is essential.
Although the codes PB and PBL are realizations of the same method,
the difference in their functioning is remarkable. PBL is clearly more
effective when comparing the function evaluations and CPU times.
However, it has slight difficulties to reach the desired accuracy in larger
problems (see the function values denoted by in Tables V-VI). Notice
also, that PB converges to the different local minimum with the load
(see the function values denoted by in Tables III-V).
When we changed the starting point to be zero in all the components it
found the same optimum as the other codes. This behaviour is due the
fact that the delamination takes place between the loads 25000-27000
Normal
displacements
in
mm
Interface in mm
load 23000 kN/m^2
load 26200 kN/m^2
load 27000 kN/m^2
load 30000 kN/m^2
Figure
4. Normal displacements of the interface of the upper lamina
making the structure very unstable and sensitive to the increase
of the load.
In
Table
VII we have listed the average errors of the normal displacements
with the loads 26200 kN/m 2 and 27000 kN/m 2 obtained
by BNL. As an exact solution it is used the solution obtained by the
discretization 128 \Theta 16. Table VII indicates that the applied approximation
scheme has a very good convergence rate and the results calculated
by BNL are reliable.
In Fig.4 and Fig.5 it is presented the normal displacements of the
upper lamina (the relative displacements of laminae are twice larger)
and the binding forces between laminae. Further, Fig.6 illustrates the
progress of delamination: With the load 23000 kN/m 2 there is no damage
of the binding material, all the nodes are on the branch A-B. The
partial delamination occurs when the load is increased to 26200 kN/m 2 ,
some of the nodes are on the branch C-D, and the complete delamination
when the load is greater than 27000 kN/m 2 , most of the nodes are
on the branch G-H.
7. Conclusions
The solution of a hemivariational inequality can be found as a sub-
stationary point of some nonconvex functional being composed of a
Interlaminar
binding
force
in
Interface in mm
load 23000 kN/m^2
load 26200 kN/m^2
load 27000 kN/m^2
load 30000 kN/m^2
Figure
5. Nonmonotone adhesive force between laminae
branch G-H
F=23000 kN/m
F=27000 kN/m
F=30000 kN/m22
branch A-B branch C-D branch E-F
Figure
6. Progress of delamination
dominating quadratic part and a nonsmooth piecewise quadratic part.
We have tested the functioning of different nonconvex and nonsmooth
optimization methods in the solution of a laminated composite structure
under loading when the binding material between laminae obeys
a nonmonotone multivalued law.
Due to the strong quadratic nature of this kind of problem, the
bundle-Newton method based on the second order piecewise quadratic
model proves to be superior when compared to proximal bundle
method based on the first order polyhedral approximation. Bundle-
Newton method was clearly faster and more reliable, and what is best,
the iteration number and the function evaluations of bundle-Newton
method do not depend on the dimension of the problem. The same
trend can be seen also in the academic tests of [15].
Acknowledgements
This work was supported by the grants SA-34063 and SA-8583 given by
the Academy of Finland and the grant No. 201/96/0918 given by the
Czech Republic Grant Agency. The research was partially done during
the third author's visit at the Laboratory of Scientific Computing
--R
Numerical Methods for Nondifferentiable Convex Opti- mization
Optimization of Upper Semidifferentiable Functions
Gilbert J.
Golstein A.
Optimization and Nonsmooth Analysis
Variants to the Cutting Plane Approach for Convex Nondifferentiable Optimization
The Cutting Plane Method for Solving Convex Programs
Methods of Descent for Nondifferentiable Optimization
A Method for Solving Certain Quadratic Programming Problems Arising in Nonsmooth Optimization
Proximity Control in Bundle Methods for Convex Non-differentiable Optimization
Nonsmooth Optimization and Descent Methods
Numerical Experiments in Nonsmooth Optimization
An Approach to Variable Metric Bundle Methods
Dual Method for Solving a Special Problem of Quadratic Programming as a Subproblem at Linearly Constrained Nonlinear Minmax Approximation
A Bundle-Newton Method for Nonsmooth Unconstrained Minimization
Approximation of Non-Monotone Multivalued Differential Inclusions
Finite Element Approximation of Vector-Valued Hemivariational Inequalities
A Quasi-second-order Proximal Bundle Algorithm
Baniotopoulos C.
Mathematical Theory of Hemi- variational Inequalities and Applications
Hemivariational Inequalities
Monotone Operators and the Proximal Point Algo- rithm
A Version of the Bundle Idea for Minimizing a Nonsmooth Functions: Conceptual Idea
--TR | bundle methods;hemivariational inequalities;nondifferentiable programming;nonmonotone contact problems;substationary points |
596236 | Global Optimization by Multilevel Coordinate Search. | Inspired by a method by Jones et al. (1993), we present a global optimization algorithm based on multilevel coordinate search. It is guaranteed to converge if the function is continuous in the neighborhood of a global minimizer. By starting a local search from certain good points, an improved convergence result is obtained. We discuss implementation details and give some numerical results. | Introduction
Problems involving global optimization (traditionally usually minimization) of a multivariate
function are widespread in the mathematical modeling of real world systems
for a broad range of applications (see, e.g., Pint' er [18]). Many problems
can be described only by nonlinear relationships, which introduces the possibility
of multiple local minima. The task of global optimization is to find a solution for
with the objective function obtains its smallest value, the global minimum. When
the objective function has a huge number of local minima, local optimization techniques
are likely to get stuck before the global minimum is reached, and some kind
of global search is needed to find the global minimum with some reliability. Our
Global Optimization Homepage on the World Wide Web (WWW) at the address
http://solon.cma.univie.ac.at/ ~ neum/glopt.html contains a large number of commented
links to information and software packages relevant to global optimization.
Algorithms for solving global minimization problems can be classified into heuristic
methods that find the global minimum only with high probability, and methods that
guarantee to find a global optimum with a required accuracy. An important class
belonging to the former type are the stochastic methods (e.g., Boender & Romeijn
[3]), which involve function evaluations at a suitably chosen random sample of points
and subsequent manipulation of the sample to find good local (and hopefully global)
minima. A number of techniques like simulated annealing (e.g., Ingber [9, 10]) and
genetic algorithms (e.g., Michalewicz [13]) use analogies to physics and biology to
approach the global optimum.
The most important class of methods of the second type are branch and bound meth-
ods. They derive their origin from combinatorial optimization (e.g., Nemhauser &
Wolsey [14]), where also global optima are wanted but the variables are discrete and
take a few values only. Branch and bound methods guarantee to find a global minimizer
with a desired accuracy after a predictable (though often exponential) number
of steps. The basic idea is that the configuration space is split recursively by branching
into smaller and smaller parts. This is not done uniformly but instead some parts
are preferred and others are eliminated. The details depend on bounding procedures.
Lower bounds on the objective allow to eliminate large portions of the configuration
space early in the computation so that only a (usually small) part of the branching
tree has to be generated and processed. The lower bounds may be obtained by using
dc-methods (e.g., Horst & Tuy [8]), techniques of interval analysis (e.g., Hansen
or majorization resp. minorization methods based on the knowledge of Lipschitz
constants (e.g., Pint' er [18]). Unlike heuristic methods, however, these methods are
only applicable if something about the analytical properties of the objective is known,
since one needs to be able to compute powerful and reliable underestimating functions.
The algorithm we are going to describe in this paper is an intermediate between purely
heuristic methods and methods that allow an assessment of the quality of the minimum
obtained; it is in spirit similar to the direct method for global optimization by Jones
et al. [11]. As the latter method, our method is guaranteed to converge in the long run
if the objective is continuous in the neighborhood of a global minimizer; no additional
smoothness properties are required. In contrast to many stochastic methods that
operate only at the global level and are therefore quite slow, our algorithm contains
local enhancements that lead to quick convergence once the global part of the algorithm
has found a point in the basin of convergence of the global optimum. Moreover, for all
control variables in our algorithm meaningful default values can be chosen that work
simultaneously for most problems. Thus fine tuning is usually not required, and since
it is a deterministic method, there is no need for multiple runs.
In this paper, we consider the bound constrained optimization problem
min f(x)
(1)
with finite or infinite bounds, where we use interval notation for rectangular boxes,
ng
for . In the case where all bounds are infinite we obtain an unconstrained
optimization problem.
In direct, a finite box is normalized to [0; 1] n and a tree of boxes is constructed. Each
box is characterized by its midpoint, and the side lengths of the boxes are always of
the form 3 \Gammak , k 2 N 0 . A disadvantage of that algorithm is that infinite box bounds
cannot be handled. Moreover, since the boundary can never be reached, it converges
more slowly than necessary in cases where the minimizer lies at the boundary. For
example, in the case of functions that are monotonous in each variable the optimizer
is at a vertex, but direct converges very slowly, especially when the bounds are wide.
Inspired by direct, we devised a global optimization algorithm based on multilevel
coordinate search (MCS). In our algorithm we remedy the above shortcomings and
allow for a more irregular splitting procedure.
In Section 2, we first define a class of algorithms for solving the global optimization
problem (1) satisfying six properties A1-A6 and prove their convergence in the long
run. In addition to the splitting procedure, an enhancement is obtained by starting
local searches from certain good points, which results in in an improved convergence
result. In Section 3, an outline of our implementation of the MCS algorithm is given,
and details are explained in Sections 4 to 6. Finally, numerical results are presented in
Section 7.
Acknowledgments
The authors gratefully acknowledge partial support of this research by the Austrian
Fond zur F-orderung der wissenschaftlichen Forschung (FWF) under grant P11516-
MAT.
2. Convergence results
In this section we consider a class of algorithms for solving the minimization problem
(1) with six properties A1-A6 defined as follows.
Each box in the tree is characterized by a base point x and its function value f(x).
Moreover, we assign to each box a level s 2 g. When a box is split, its
level is set to zero; the levels of non-split boxes are positive. The level of the initial
box is 1. The base points of boxes with level s max and their function values are
put into the base list.
The levels of MCS correspond to the side lengths of direct, i.e., the boxes with small
level are the 'large' boxes that have not been split very often yet. Only boxes of the
same level compete for being chosen for branching; cf. A3.
A2: A box is always split along a single coordinate i (to be chosen appropriately), the
splitting index, into two or more (at most p - 2) parts, and the descendants of a box
with level latter only when it is - s
The base points of the descendants of a box are chosen in a natural way such that they
differ from the base point of the parent box in (at most) one coordinate and thus this
procedure of generating new function values is a variant of the standard coordinate
search method. In contrast to our algorithm, direct splits a box along all coordinates
in each step.
A3: The branching process proceeds by a series of sweeps through the levels defining
a record. A sweep is defined by the following three steps.
Step 1. Scan the list of non-split boxes and define a record list containing for each
level pointing to a box with the lowest function value among
all boxes at level s. If there is no box at level s, set b Initialize s to the lowest
level with b s 6= 0.
Step 2. The box with label b s is a candidate for splitting. If it is split, mark it as split
in the list and insert its children. Update the record list if any of the children yields
a strict improvement of f on its level. If it is not considered to be worthwhile to split
the box, its level is increased by one and possibly b s+1 has to be updated.
Step 3. Increase s by 1. If new sweep. Else if b to Step 3, else
go to Step 2.
Clearly, each sweeps ends after at most s visits to Step 3.
Like in direct, this strategy yields a combination of global and local search. The key
to balancing global and local search is the multilevel approach. The fact that we start
with the boxes at the lowest levels (i.e., the 'large' boxes) in each sweep constitutes
the global part, and the selection of the box with lowest function value at each level
forms the local part of the algorithm.
A4: For each M ? 0 there exists an r(M) 2 (0; 1) independent of the choice of s max
such that for each box [x that has been generated by splitting the box [x; y] with
along the ith coordinate we have
This assumption ensures that the descendants of a finite box will eventually become
arbitrarily narrow after sufficiently many splits along each coordinate. The worst case
r(M) of the shrinking factor may depend on the box bounds since we do not want to
overemphasize large numbers in the case of wide box bounds.
A5: The rule for splitting boxes with infinite bounds is as follows. If the ith box
bounds are (\Gamma1; 1) and we split along the ith coordinate, the interval is always split
at one or more values contained in a fixed interval [z 1
(independent of the choice of
means of which it turns into two semibounded intervals contained in (\Gamma1; z 2
possibly additional finite ones contained in [z 1
When a box with
the ith bounds [x along the ith coordinate, we obtain a box with ith
bounds one or more boxes with finite ith bounds. Generally let [x
be the unbounded part generated by splitting the ith bounds [x
the ith coordinate. There exist functions
monotonously increasing on (0; 1), such that F 2
(which implies F m
all x 0 2 R . An analogous assumption holds for successive splits of (\Gamma1; x 0 ].
The lower bound F 1 guarantees that the unbounded descendants of the interval [x
shrink sufficiently fast. However, they should not shrink too fast since then the bounded
descendants could become arbitrarily large, and therefore we impose the upper bound
Assume that a box with level s, 1 - s ! s max , is a candidate
for splitting since b s points to this box, and let n j be the number of times coordinate
j has been split in the history of this box. If s ? H(n; minn j ), the box is in any case
eligible for splitting, and the splitting index is a coordinate i with
This assumption makes sure that along each path in the tree, each coordinate is split
inifinitely often.
Proposition 1. In each sweep, one box leaves the lowest non-empty level and no box is
added at that level. Each level will eventually become empty; in particular the splitting
procedure will come to an end when all non-split boxes have level s max .
Proof. Directly from A1-A3.
Proposition 2. Let 2 - s 0 - s max . Then the levels up to s are empty after at
most (p s defined by A2. In particular, the algorithm
finishes after at most (p smax
Proof. In the course of the algorithm, the root box [u; v] with level one can at most have
descendants of level s, 2 - s - s max \Gamma1, since the worst case is splitting a box into p
parts and advancing the levels of the descendants in steps of one. By Proposition 1, the
levels 1 to s are cleared after at most
As expected, this upper bound is exponential. However, in practice, the bound is very
pessimistic since we do not only split a box at the lowest non-empty level (or advance
its level by one) in each sweep but do that at each non-empty level. Moreover, the
levels of the descendants of the boxes will sometimes advance by two, or a box will
be advanced to the next level without being split. Also, good approximations to the
global minimizer will usually have been reached long before all levels are cleared.
Proposition 3. For a box with level
0-l-m
each coordinate has been split at least m times.
Proof. This is proved by induction over m. The statement is trivial for
be a box with level s ?
i be the number of times coordinate i has been split in the history of B 0 . Then
by induction hypothesis. Assume that minn be the parent
box of B its level. Since the levels advance in steps of one
or two and s ? 2(m 1)n, it is possible to go back n times in the history of box B 0 ,
and we have s that
was obtained by splitting B i according to A6. Let n 0
i be the number of times
coordinate i has been split in the history of box B n . Since B 0 was generated from B n
by splitting n times according to A6, we have minn 0
contradiction
to the induction hypothesis. Consequently our assumption was wrong and we must
have
Proposition 4. For each exists an m i (ffi) such that the
ith side length of the box containing a point - x 2 [u; v] with finite coordinates is less
than ffi if it has been split at least m i (ffi) times along the ith coordinate.
Proof. Consider the ith side length of the box containing - x.
Case 1. u i is finite, implies that there exists an l 2 N such that
F l
after at most l splits in the ith coordinate the box containing - x has
finite ith bounds contained in [u
and the problem is reduced to Case 2. The
case treated similarly. The case reduced to
a semibounded interval contained in [z 1
or a finite interval contained
in [z 1
after one split.
Case 2. u i and v i finite, M := max(ju i j; jv i j). Then there exists a k 2 N 0 such that
defined in A4, i.e., by A4 the ith side length of the
containing - x is less than ffi if the box has been split at least k times along the ith
coordinate.
Propositions 2-4 yield the following convergence theorem.
Theorem 5. Suppose that the global minimization problem (1) has a finite solution -
R is continuous in a neighborhood of -
x. Let the algorithm satisfy the
assumptions A1-A6, and let " ? 0. Then there exists an s 0 such that for s
after at most (p s a base point x is found with
i.e., the algorithm converges if the number of levels tends to 1.
In order to enhance the performance of the algorithm, we subject a base point of a
box of level s max to local search before putting it into the base list, which is another
local feature of our algorithm. For theoretical purposes we make here the obviously
idealized assumption that the local search algorithm reaches a local minimizer after
finitely many steps if it is started in its basin of attraction.
Theorem 6. Let the assumptions of Theorem 5 be satisfied, assume that a local search
is started from each candidate for the base list, at least when its function value is smaller
than the function value of any local minimum already in the base list, and assume that
there is an " ? 0 such that f(y) ? nonglobal local minimizer y and
for any y 2 [u; v] with sufficiently large norm. Then there exist numbers L and S such
that, for any s max - L, a global minimizer is found after at most S sweeps.
Proof. By assumption there exists a
with
Propositions 3 and 4 there exists an L such that the
side lengths of the box containing -
x are smaller than ffi when its level is at least L, and by
Proposition 2 the box containing -
x reaches level L after at most S := (p
sweeps. Let s max - L. Then after at most S sweeps the box B containing -
x is at level
L, and for its base point x we have f(x) - f(-x) Two cases are possible. If
we have found a better point before, we have already made a local search from such a
point, which finds a global minimizer by assumption. In the case that x is the current
best point, at the end of that sweep a point y with f(y) - f(x) is subjected to local
search, by means of which we find a global minimizer.
3. The MCS algorithm
There are many ways to design algorithms satisfying A1-A6 and hence guaranteeing
convergence to a global minimizer. However, trivial implementations are very slow.
A number of heuristic enhancements are needed to obtain a high quality method. In
the following we describe the most useful version that we could find. We first give an
overview over the techniques used and discuss the details of each technique in Sections
4 to 6.
Unlike in direct, the base point of a box in our algorithm is usually not the midpoint
but a point at the boundary, often but not always a vertex, and a base point can belong
to more than one box. Moreover, we also assign to each box an opposite point. The
construction is such that the base point x and the opposite point y determine the box,
and we call such a box B[x; y].
The algorithm starts with a so-called initialization procedure producing an initial tree
of boxes. Whenever a box is split along some coordinate i for the first time (either
in the initialization procedure or later), this is done at three or more given values x l
(where function values are computed) and some adaptively chosen intermediate points,
and at least four subboxes are obtained.
After the initialization procedure we start with the sweeps as described in A3. When a
box with level 1 - s ! s max has been selected for splitting by the procedure described
in A3, we use the following splitting strategy: the box is
ffl either split according to A6 (splitting by rank),
ffl or it is split along a coordinate where the maximal gain in function value is
expected according to a local separable quadratic model obtained by fitting 2n+1
function values (splitting by expected gain),
ffl or, if the expected gain is not large enough, it is not split at all but its level is
increased by one.
If the box has already been split along the coordinate chosen as splitting index, only
a single new function evaluation is needed, and we obtain two or three subboxes. The
new function value is taken at a point that is predetermined by the box bounds in the
case of splitting by rank, and in the case of splitting by expected gain, at a point where
the maximal gain in function value is expected.
Before putting a base point of a box of level s max into the base list, we first check
whether it is in the the basin of attraction of a local minimum already in the base list,
and if this is not the case, we subject it to local search. The local search algorithm
used in our program essentially consists of building a local quadratic model by triple
searches, defining a promising search direction with the aid of the quadratic model
and a modified Cholesky factorization and making a line search along this direction.
This procedure is repeated until a stopping criterion is fulfilled. Moreover, devices to
handle the case that one or more coordinates of the current point are at the boundary
are included.
4. Initialization
Before building the tree of boxes, one first evaluates f at an initial point x 0 and sets
evaluated at two or more points in [u; v] that agree
with x in all coordinates k 6= i. Thus one has
x l
f l
and x . The point with smallest function value is then renamed x
before repeating the procedure with the next coordinate. The numbers x l
and the indices l i are stored in an initialization list. The choice of the initialization list
is left to the user, who may incorporate in it knowledge about the likely distribution of
good points. A good known starting point can be defined as x 0 . Some possible choices
are discussed in Section 7.
From the initialization list and the corresponding list of function values, an initial tree
of boxes is constructed as follows. The root box is B[x;
point and as y one of the corners of [u; v] farthest away from x. Note that x need not
be a vertex and that some or all coordinates of y can be infinite. For
current box is split along the ith coordinate into 2L
exactly one of the x l
i as endpoints, depending on whether two, one or none of the x l
are
on the boundary, which means that in addition to x l
we have to split at
z l
. The additional splitting points are chosen as z l
is the golden section ratio and
chosen such that the part with the smaller function value gets the larger fraction of
the interval. The resulting subboxes get as base point the point x 0 obtained from the
current by changing x i to the x l
i that is a boundary point of the corresponding
ith coordinate interval, so that f(x 0
i , and as opposite point the point obtained
from y by changing y i to the other end of that interval.
The information available so far allows us to define priorities on the coordinates. For
each i, we compute the union of the ranges of the quadratic interpolant through any
three consecutive
take the difference of the upper and lower bound obtained
as a crude measure of the variability of f with the ith component. Components with
higher variability get a higher priority, and this ranking is saved in a vector - such that
the component with index i has the - i th highest estimated variability. Moreover, if the
x obtained after splitting the ith coordinate belongs to two boxes, the one containing
the minimizer of the quadratic models is taken as current box for coordinate i + 1.
The root box gets level 1. If a box of level s is split, the boxes with the smaller
fraction of the golden section split get level s
Thus the current box for splitting in the next coordinate is in any case one with level
after finishing the initialization procedure, the first level is empty and the
non-split boxes have levels which implies that it is meaningful to take
Two examples for the set of boxes, their base points and their levels after
the initialization procedure in the two-dimensional case are shown in Figure 1 (where
6
in both cases x
It is easy to see the connection between the golden section split and the assignment of
levels. When a box B with level s is split along coordinate i according to the golden
section split and its larger part B 0 is again subjected to the golden section split along
the ith coordinate, the larger descendant of B 0 has the same ith coordinate length as
the smaller descendant of B, and these boxes both have level s 2. Moreover, the box
with the better function value gets the larger fraction of the interval and the smaller
r
r
Figure
r
r
Figure
level because then it is more likely to be split again more quickly, which was also the
strategy adopted in direct.
Any choice of x l
including the endpoints u i , v i in the list guarantees that, in the simple
case that f is monotonous in each variable, the final x of the initialization phase is
already the global minimizer.
5. Splitting
We do not store the box bounds for each box but the information in the tree (label of
the parent box, splitting index, splitting value, a label identifying which of the many
children it is etc. This keeps the amount of storage proportional to the number of
function evaluations and allows us to recover information to build a separable quadratic
model by going back in the history of the box.
Suppose that we want to split the ith coordinate interval u t fx
for is the ith component of the base point of the box being
considered. In order to fulfil assuption A4, we may not split too close to x i . If y i is
large, we also do not want the new component x 0
i to be too large and therefore force it
to be from some smaller interval u t f- g. We choose this interval according to
where the function subint is given by the following pseudo-Matlab function:
function
else
Having selected a box with level s ! s max for splitting (by the procedure described
in A3), we recover its base point x, the opposite point y and the number n i of times
coordinate i has been split in the history of the box.
Splitting by rank. Let s ? H(n; minn i ), where H is the function defined by A6.
Then we select the splitting index i among the indices i with smallest n i as the one
with lowest - i (and hence highest variability rank).
the splitting is done according to the initialization list at x l
and at the golden section split points, as discussed in Section 4, and the new base
points and opposite points are defined as before. The boxes with the smaller fraction
of the golden section split (and thus larger function values) get level min(s
and all other ones get level s + 1.
the ith component ranges between x i and y i , and the splitting value is
chosen as z The box is split at z i and
at the golden section split point, and we obtain three parts with only one additional
function evaluation at the point x 0 obtained by changing the ith coordinate of x to
z i . The smaller fraction of the golden section split gets level min(s and the
two other parts get level s + 1. Moreover, the base point of the first child is taken to
be x, the base point of the second and third child is the point x 0 defined above, and
the opposite points are obtained by changing y i to the other end of the ith coordinate
interval of the corresponding box.
Splitting by expected gain. Let s - H(n; minn i ). In order to build a local separable
quadratic model, we need two additional points and corresponding function values for
each coordinate. Whenever we have split in the ith coordinate in the history of the
box, we obtain values that can be used for quadratic interpolation in this coordinate.
For each coordinate we take the first two points and function values found by pursuing
the history of the box back to [u; v] since these points are expected to be closest to the
base point x. For coordinates that have not yet been split, we obtain this information
from the initialization list. Let
be the local separable model for f(-) generated by interpolation at x and the 2n
additional points collected as above. For each coordinate i, we define the expected
gain - e i in function value when we evaluate at a new point obtained by changing this
coordinate in the base point. Again two cases have to be distinguished.
Case 1. In the history of the current box, coordinate i was never split, i.e.,
Then we split according to the initialization list at points where we already know the
obtainable function differences, and therefore compute the expected gain as
Case 2. If n i ? 0, the ith component ranges between x i and y i , and with the quadratic
partial correction function
at our disposal, we can calculate the maximal gain expected when changing the value of
only. For the reasons discussed above, we choose the splitting value from u t f-
where
Then we compute
with minimum achieved at - . If the expected best function value satisfies
1-i-n
best ;
where f best is the current best function value (including the function values obtained
by local optimization), we expect the box to contain a better point and split, using
as splitting index the component with minimal -
e i . The condition (2) prevents wasting
function evaluations by splitting boxes with bad base point function values; these boxes
will eventually be split by rank anyway.
In Case 1 we again split according to the initialization list, and the definition of the
new base points and opposite points and the assignment of levels are as before. In Case
2 we use z i as splitting value and the box is split at z i (if z i 6= y i ) and at the golden
section split point, and we obtain two or three parts. The larger fraction of the golden
section split gets level s + 1, the smaller fraction level min(s
the third part is larger than the smaller fraction of the golden section split, it gets level
Moreover, the base point of the first child
is taken to be x, the base point of the second and third (if z i 6= y i ) child is obtained
by changing the ith coordinate of x to z i , and the opposite points are again obtained
by changing y i to the other end of the ith coordinate interval of the box.
If (2) is violated, we do not expect any improvement and therefore do not split but
increase the level by 1.
6. Local search
The theory of local optimization provides powerful tools for the task of optimizing a
smooth function when knowledge of the gradient or even the Hessian is assumed. When
no derivative information is available, the traditional methods are based on the employment
of conjugate directions and successive line searches; cf. the direction set method
of Powell [19] and a modification due to Brent [4]. These algorithms, however, do
not allow the specification of bound constraints. Elster & Neumaier [6] developed
an algorithm for optimization of low-dimensional bound constrained functions, based
on the use of quadratic models and a restriction of the evaluation points to successively
refined grids. Hoewever, the work in that algorithm grows with the dimension n as
O(n 6 ) and hence is unsuitable for larger dimensions.
The local optimization algorithm we are going to describe in the sequel also makes use of
quadratic models and successive line searches, and devices to handle bound constraints
are incorporated. We first explain the procedure of building a local quadratic model
by triple searches. Since we do not want to start local searches from points belonging
to the domain of attraction of the same local minimum and to put several copies of
essentially the same point into the base list, we have devised a criterion to avoid that;
see Step 2 in the subsection 'base list' below. We conclude with a discussion of the
validity of assumptions A4 and A5 for our algorithm.
Triple search. We want to use
function values to construct a quadratic model
best
best best
Assume that we have three vectors x l (with componentwise inequalities).
The function values are to be taken at points x with x
as follows. If
x best denotes current best point in the triple search, denote by x (i;1) and x (i;2) the points
obtained from x best by changing its ith coordinate to the other two values in fx l
and by x ik , k ! i, the points obtained by changing the ith and kth coordinate to the
ones with the smaller q(x (i) ) resp. q(x (k) ) with the current quadratic model q. Thus
we obtain the following procedure that we are going to describe in more detail in the
sequel:
best )
compute f(x (i;1) ) and f(x (i;2) ); compute g i and G ii
store x newbest but do not update x best
compute q(x (k;1) ) and q(x (k;2) ) from the current model
compute f(x ik )
update x newbest but do not update x best
compute G ik
if x newbest 6= x best , update x best , f and g 1:i
When, for an computed approximations for g l and G lk ,
by interpolating at
points that differ only in the first
best is the current best point in the triple search, we obtain
approximations for g i and G ii by determining these numbers such that the quadratic
polynomial
best best
best
interpolates at (x (i;j)
2. At this stage we do not yet update x best , but
if min(f(x (i;1) ); f(x (i;2) best ), we store this point as x bestnew .
Assume that, in addition, we have already calculated approximations for G il , 1 - l -
1. Then we can compute
best
best
best
with the current quadratic model q, and we have q(x (i;j) 2. Let
x ik be defined as above. Then we choose G ki such that the quadratic model
interpolates at x ik , i.e., such that the equation
best
best
best
best
best
best
best
is satisfied. Again we do not update x best but update x bestnew if x ik yields a strict
improvement in function value.
Only after finishing the loop over k, we reexpand the model around the best point by
G kl (x bestnew
best
l
It is easy to see that the above method gives the unique quadratic interpolant to
f at
distinct points; in particular, we recover the exact objective function as
In a diagonal triple search we only carry out the diagonal part of the above algorithm
and take the off-diagonal elements of the Hessian from the previous iteration; thus only
2n additional function values are needed.
Coordinate search. To find x l use a coordinate search based on
a line search routine. A Matlab version of the actual line search used can be obtained
electronically from http://solon.cma.univie.ac.at/ ~ neum/ms/ls/ This univariate
line search program ls0 contains a parameter smaxls limiting the number of points
used for the line search. It is possible to feed other points in addition to the starting
point and their function values into the program, and these points are included in
smaxls.
A line search with along each coordinate. The first line search
is started with the candidate for the base list. After the line search along the first
coordinate, we can take the best point and its two nearest neighbors on both sides
(or, if such points do not exist, the two nearest neighbors on one side) as fx l
g.
The subsequent line searches are started with the current best point obtained from
the previous line search. After a line search in a coordinate i ? 1, we take the best
point, the starting point of the line search (if it is different from the best point) and, if
possible, the nearest neighbor of the best point on the other side as fx l
g. The
ith coordinate of the old x best has to be among fx l
since otherwise we would
lose all points through which the surface has been fitted previously.
Local search. Now we have all ingredients at our disposal to describe the steps of the
local search algorithm used in our implementation of MCS.
Step 1. Starting with the candidate for the base list, we make a full triple search,
where fx l are found by a coordinate search as described above. This procedure
yields a new point x, its function value f , an approximation g of the gradient and an
approximation of the Hessian G.
Step 2. Set is the modified Cholesky factorization
without scaling of [15, Section 2] and the starting value " used. Set
of the current x is u k or v k and p k points outward,
set we make a line search with ls0 along x+ffp. Let ff min and ff max be the
bounds for ff obtained from the box bounds [u; v]. If p T Gp ? 0 and \Gammag T p=(p T Gp) 2
\Gammag T p=(p T Gp); otherwise we take -
as the one
where we expect the smaller function value according to the quadratic model. The
values
ff are used as input for ls0. If G is positive definite and "
is chosen, the modified Cholesky factorization is the Cholesky factorization, the search
direction is g, and we have -
positive definite
ff is close to 1. Set old is the
function value of the current point at the beginning of Step 2 and f pred is the function
value predicted by the above quadratic model with
ff, i.e., fac is a measure of
the quality of the quadratic model, and it is 1 if the line search did not improve the
function value.
Step 3. Stop if some limit on the number of visits to Step 3 (per local search) or the
limit on function calls has been exceeded. Also stop if none of the components of the
current x are at the boundary and the last triple search was a full one and the stopping
criterion is fulfilled.
Step 4. If some components of the current x are at the boundary and the stopping
criterion is fulfilled, we make line searches with at most smaxls points along these
coordinates. If the function value was not improved by these coordinate searches, stop.
Step 5. If fac ? 0:1 or the stopping criterion was fulfilled in Step 3, we make a
full triple search, otherwise we make a diagonal triple search. We make these triple
searches only in the coordinates i such that the component x i of the current x is not
at the boundary. The set fx l
is taken to consist of x i ,
two neighbors at distance ffi and 2ffi if x i lies at the boundary)
and
", where " denotes the machine accuracy. We obtain a new point x and an
approximation of its reduced gradient g and its reduced Hessian G.
Step 6. We set only in the components of the
current x that are not at the boundary (p make a line search
along x
ff as input as before. The quantity fac is defined
as in Step 2, where f old is the function value at the current point at the beginning of
Step 6. and go to Step 3.
The stopping criterion is fulfilled if the function value was not improved in Steps 5
and 6 (resp. Steps 1 and 2) or if jgj T max(jxj; jx old is an input
parameter of our program and f 0 is a 'typical' function value, e.g., the smallest function
value found in the initialization procedure.
Base list. The local searches are only carried out at the end of each sweep. Then
all candidates for the base list that have been collected in this sweep are ordered by
ascending function value, and they are gone through as follows. Let x be a candidate
for the base list.
Step 1. We check whether we have already made a local search from this point. (Often
a point belongs to two boxes.) If this is the case, we take the next candidate for the
base list and go to Step 1.
Step 2. Let w
be the points already in the base list, and by renumbering
assume that they are sorted by their distance to x, starting with the nearest point. For
we do the following.
Step 2a. Compute the function value at x increase
i by one and go to Step 2a.
Step 2b. Compute the function value at x
increase i by one and go to Step 2a. Else if
points seem to lie in the same valley. However,
we do not discard x for local search but set x to the value x 0 or x 00 with the smaller
function value, increase i by one and go to Step 2a. Else we do not subject x to local
search because the four function values are monotonous, take the next candidate for
the base list and go to Step 1.
Step 3. Local search.
Step 4. The new point x obtained from local search is subjected to a procedure similar
to Step 2 in order to find out whether we have really found a new point, and only in
that case it is put into the base list.
If we disregard the splits according to the initialization list, A4 is fulfilled for our
algorithm with 0:001. The factor
0.9 applies to the 'regular' case where for [x 00 y. For
the 'safeguarded' case of subint for large y the worst case is at most the largest of
the three numbers 1(
and
1). Moreover, A5 is satisfied for the choice
7. Numerical results
Test functions. Jones et al. [11] gave an extensive comparison of their direct
method with various methods on seven standard test functions from Dixon & Szeg-
[5] and two test functions from Yao [24]. Since our MCS algorithm is based on important
insights from [11], we first consider the same test set to evaluate the efficiency of
MCS. For each test function, the dimensions and box bounds, used by Jones et al. but
inadvertently omitted in [11], are given in Table 1. We thank Don Jones for providing
us with the code of the test functions.
Label Test function Dimension Default box bounds
GP Goldstein-Price 2 [\Gamma2; 2] 2
C6 Six-hump camel 2 [\Gamma3; 3] \Theta [\Gamma2; 2]
Table
1. Dixon & Szeg- dimensions and box bounds
All but the last four lines of Table 2 are taken from one of the tables of results of
[11]. The fourth last line contains results for the differential evolution algorithm DE
by Storn & Price [22] from http://http.icsi.berkeley.edu/ ~ storn/code.html,
using the Matlab program devec2.m with the default values for the control parame-
ters. Since this algorithm operates only at the global level, it takes a rather long time
to find a minimum with high accuracy and therefore we used obtaining a relative error
stopping criterion. The number of function evaluations needed for convergence
was averaged over 25 runs for each test function. In the case of Hartman6, one
run did not converge after 12 000 function evaluations and we averaged only over the
remaining 24 runs. The last three lines give results for MCS, first over the same bound
constraints as in [11], then averages over strongly perturbed box bounds, and finally
for the unconstrained version. Details will be given below.
When assessing the results, we have to bear in mind that the first 11 algorithms already
appeared in the 1978 anthology edited by Dixon & Szeg- are therefore are
somewhat old. The number of function calls needed for convergence is not the only
method of assessing the quality of an algorithm, but it is an important one in the case
of most real life applications, where function evaluations are expensive.
Termination. In the presentation of test results, methods are usually compared on
the basis of their performance on problems with known solutions. The algorithm is
terminated when a function value within some tolerance of the global minimum has
been found, and we also adopt this strategy. However, in practical problems, one does
not know the solution in advance and needs a criterion that tells the program when to
stop searching for a better local minimizer. This criterion should be stringent enough
that it does not waste too many function values after the global minimum has been
found, but it should also be loose enough to ensure that in typical cases, the algorithm
does not terminate before the global minimizer has been found.
Stochastic approaches to the design of suitable stopping criteria are surveyed in Section
6 of Boender & Romeijn [3]. One of the methods proposed there consists in
stopping when the number n of local searches done is larger than a function N(w)
of the number w of different local minima found so far. The function N(w) depends
on the assumptions, and several specific implicit definitions of N(w) are given in [3].
Method S5 S7 S10 H3 H6 GP BR C6 SHU
Bremmerman [5] (a) (a) (a) (a) (a) (a) 250
Mod. Bremmerman [5] (a) (a) (a) (a) 515 300 160
Zilinskas [5] (a) (a) (a) 8641 5129
Gomulka-Branin [5] 5500 5020 4860
T-orn [5] 3679 3606 3874 2584 3447 2499 1558
Gomulka-T-orn [5] 6654 6084 6144
Gomulka-V.M. [5] 7085 6684 7352 6766 11125 1495 1318
Price [5] 3800 4900 4400 2400 7600 2500 1800
Mockus [5] 1174 1279 1209 513 1232 362 189
Belisle et al. [1] (b) 339 302 4728 1846
Boender et al. [2] 567 624 755 235 462 398 235
Kostrowicki-Piela [12] (g) (g) (g) 200 200 120 120
Perttunen [16] (c) 516 371 250 264 82 97 54 197
Perttunen-
Stuckman [17] (c) 109 109 109 140 175 113 109 96 (a)
Jones et al. [11] (c) 155 145 145 199 571 191 195 285 2967
Storn-Price [22] (d)(h)6400 6194 6251 476 7220 1018 1190 416 1371
All but the last four lines are taken from [11]; missing entries were not available
from the literature.
(a) Method converged to a local minimum.
(b) Average evaluations when converges. For H6, converged only 70 % of time.
(c) Convergence defined as obtaining a relative error ! 0:01 %.
(d) Convergence defined as obtaining a relative error
Perturbed box bounds.
(f) Unconstrained optimization problem.
(g) Global minimum not found with less than 12 000 function calls.
Average over 25 cases. For H6, average over 24 cases
one case did not converge within 12 000 function values.
(i) An asterisk indicates that the first local optimization gave the local optimum.
Table
2. Number of function evaluations for various methods
compared to MCS
This result is theoretically justified for the random multiple start method only but may
serve as a guideline also for other methods that use local searches.
However, with MCS we try to do very few local optimizations only, and this reasoning
appears inadequate. So far, we have not yet found a useful general purpose stopping
criterion for MCS. For the purposes of the numerical tests reported here, the stopping
criterion for MCS was taken as obtaining a relative error ! 0:01 % in the optimal
objective function value (which happens to be nonzero always), i.e.,
\Gamma4 , which was also the criterion used by Jones et al. [11]. For the algorithms quoted in
[11], results based on the definition of convergence used by their authors are reported.
MCS control parameter settings. We applied a Matlab version of MCS with
is the dimension of the problem, H(n; m)
to the test functions and used a simple initialization list consisting of
midpoint and boundary points, i.e.,
2:
The limit on visits to Step 3 per local search was set to 50, and the parameter fl in the
stopping criterion for local optimization was taken as (cf. the subsection 'local
search' of Section 6). Note that all examples have been run with identical parameter
settings, so that no tuning to the individual test problems was involved.
Modified bounds. We also investigated the stability of our results for MCS with
respect to random perturbations of the box bounds. Instead of the default box bounds
[u; v] given in Table 1, we employed the box bounds [u
where j is a random variable that is uniformly distributed in the interval (\Gamma0:5; 0:5),
but a value of j was only accepted in a given problem if at least one of the global
minimizers was in [u The results given in the second last line of Table 2 were
taken as an average over 25 runs with different perturbed box bounds for each test
function. For Hartman6, we obtained one outlier for which the algorithm had not
found the global minimum after 12 000 function calls, and we report a result averaged
over the 24 remaining runs.
Moreover, we applied MCS to the unconstrained optimization problem for the Dixon
test set and added the results to Table 2. In this case, we cannot use an
initialization list consisting of midpoint and boundary points any more. For infinite
or very wide bounds, we suggest to use the following safeguarded version based on the
function subint and again take l 2:
if
else
Discussion. The results show that MCS seems to be strongly competitive with existing
algorithms in the case of problems with reasonable finite bound constrained. MCS with
unperturbed box bounds wins in 7 of 9 test cases against every competing algorithm
and is only beaten once by Perttunen resp. Perttunen-Stuckman for the remaining
two test functions. MCS with perturbed box bounds still wins against all competing
algorithms for 5 test functions. Only the results for Shekel's functions seem to depend
heavily on the choice of the box bounds, but they are comparable with the results of
some other algorithms, and we do not know whether direct is stable with respect to
perturbation of the box bounds.
For unconstrained problems of dimension n - 4, the performance of MCS is less
satisfactory. The reason is that in the exploration of an unbounded domain, it is easy
to miss the region where the global minimum lies if one has already found a low-lying
nonglobal minimizer. For example, for Shekel's functions the algorithm gets caught in
the second best local minimizer (1; 1; 1; 1), which is a point in the initialization list.
Further test problems. The Dixon & Szeg- test set has been criticized for containing
mainly easier test problems. A more challenging test set was used in the first
contest on evolutionary optimization (ICEO) at the ICEC'96 conference; cf. Storn
Price [23]. This test bed contains five problems, each in a 5-dimensional and a
10-dimensional version, and on these test functions, MCS showed some limitations.
The names and default box bounds of the ICEO test functions are given in Table 3,
and the results are shown in Table 4. The first two lines in Table 4 are results, taken
from [23], of two different versions of DE.
Problem Name Box bounds
1 Sphere model [\Gamma5; 5] n
3 Shekel's foxholes [0; 10] n
4 Michalewicz's function [0; -] n
5 Langerman's function [0; 10] n
Table
3. ICEO test functions and their box bounds
We applied MCS with three different choices of the initialization list to the ICEO test
functions. MCS1 is the standard version with midpoints and boundary points. For
MCS2, we took x 1
i.e., the points are uniformly spaced but do not include the boundary points.
For MCS3, we generated an initialization list with the aid of line searches. Starting with
the absolutely smallest point in [u; v], we made line searches with ls0 with
and along each coordinate, where the best point was taken as starting point
for the next line search. The parameter nloc in ls0 determines how local or global the
line search is since the algorithm tries to find up to nloc minima within smaxls function
values. For the line searches in the local search method described in Section 6,
was taken (entirely local line search). For each coordinate i, all local minimizers found
by the line searches were put into the initialization list, and if their number was less
than three, they were supplemented with the values obtained from ls0 closest to u i
and v i .
Finally, we applied MCS to the test functions used by Storn & Price [22]. Their
names and box bounds are shown in Table 5, and their definition can be found in [22].
Problem 7 is a shifted version of ICEO2 for Problems 8 and 9 have general
constraints and were therefore not used here.
The first four lines of Table 6 are taken from [22]. ANM denotes the annealed Nelder
Mead strategy of [20] and ASA the Adaptive Simulated Annealing method by Ingber
[9, 10], and DE1 and DE3 are two different versions of DE.
For MCS, we used an initialization list consisting of midpoint and boundary points
when there was no global minimizer among the points in the initialization list; in the
latter case, a different initialization list with Problem
4 contains a random variable, and the result presented for MCS was averaged over
Problem 1 Problem 2 Problem 3 Problem 4 Problem 5
5D 10D 5D 10D 5D 10D 5D 10D 5D 10D
MCS3 26 51 26956 - 32077 - 1903 -
values.
A dash indicates that a global minimizer was not found after 100 000 function
calls.
Table
4. Number of function values for the ICEO functions
Problem Name Dimension n Box bounds
4 Quartic with random noise
8 Zimmerman's problem 2 constraints
9 Polynomial fit, 9, 17 constraints
Table
5. Test functions of Storn & Price [22], their dimensions
and box bounds
ANM 95 106 90258 -
ASA 397 11275 354 4812 1379 3581 -
discontinuous test function; 2 noisy test function.
A dash indicates that a global minimizer was not
found after 100 000 function calls.
Table
6. Number of function values for the Storn & Price functions
runs, where convergence was defined as reaching a point with function value - 15.
Problem 1 has a quadratic objective function, hence is easy for MCS, and Problem 3
is easy for MCS since the objective function is monotonous.
8. Conclusions
The multilevel coordinate search algorithm MCS, presented in this paper, has excellent
theoretical convergence properties if the function is continuous in the neighborhood of
a global minimizer. In the current implementation, our test results show that MCS
is strongly competitive with existing algorithms in the case of problems with reason-able
finite bound constrained. In our comparison, MCS outperforms the competing
algorithms almost always on the classical test problems set of Dixon & Szeg- o.
For unconstrained problems of dimension n - 4, the performance of MCS is less
since in the exploration of an unbounded domain, it is easy to miss the
region where the global minimum lies if one has already found a low-lying nonglobal
minimizer. The same problem applies for some hard test problems with a huge number
of local minima.
--R
Rinnoy Kan
Algorithms for Minimization without Derivatives
The global optimization problem: an introduction
A grid algorithm for bound constrained optimization of noisy func- tions
Deterministic Approaches
Very fast simulated re-annealing
Lipschitzian optimization without the Lipschitz constant
Diffusion equation method of global minimization: performance on standard test functions
Genetic Algorithms
Integer and Combinatorial Optimization
On satisfying second-order optimality conditions using modified Cholesky factoriza- tions
The rank transformation applied to a multiunivariate method of global optimization
An efficient method for finding the minimum of a function of several variables without calculating derivatives
Numerical Recipes in C
A multistart global minimization algorithm with dynamic search trajectories
Differential evolution - a simple and efficient adaptive scheme for global optimization over continuous spaces
Minimizing the real functions of the ICEC'96 contest by differential evolution
Dynamic tunneling algorithm for global optimization
--TR
--CTR
Rong Yan , Alexander G. Hauptmann, The combination limit in multimedia retrieval, Proceedings of the eleventh ACM international conference on Multimedia, November 02-08, 2003, Berkeley, CA, USA
H.-M. Gutmann, A Radial Basis Function Method for Global Optimization, Journal of Global Optimization, v.19 n.3, p.201-227, March 2001
evket lker Birbil , Shu-Cherng Fang , Ruey-Lin Sheu, On the Convergence of a Population-Based Global Optimization Algorithm, Journal of Global Optimization, v.30 n.2-3, p.301-318, November 2004
J. M. Gablonsky , C. T. Kelley, A Locally-Biased form of the DIRECT Algorithm, Journal of Global Optimization, v.21 n.1, p.27-37, September 2001
Y. Wu , L. Ozdamar , A. Kumar, TRIOPT: a triangulation-based partitioning algorithm for global optimization, Journal of Computational and Applied Mathematics, v.177 n.1, p.35-53, 1 May 2005
U. M. Garcia-Palomares , F. J. Gonzalez-Castao , J. C. Burguillo-Rial, A Combined Global & Local Search (CGLS) Approach to Global Optimization, Journal of Global Optimization, v.34 n.3, p.409-426, March 2006
Jaewook Lee, A novel three-phase trajectory informed search methodology for global optimization, Journal of Global Optimization, v.38 n.1, p.61-77, May 2007
A. Ismael Vaz , Lus N. Vicente, A particle swarm pattern search method for bound constrained global optimization, Journal of Global Optimization, v.39 n.2, p.197-219, October 2007
Panayiotis G. Georgiou , Chris Kyriakakis, Maximum likelihood parameter estimation under impulsive conditions, a sub-Gaussian signal approach, Signal Processing, v.86 n.10, p.3061-3075, October 2006
Michael Bartholomew-Biggs , Bruce Christianson , Ming Zuo, Optimizing Preventive Maintenance Models, Computational Optimization and Applications, v.35 n.2, p.261-279, October 2006 | local optimization;coordinate search;global optimization;bound constraints |
596237 | Efficient and Adaptive Lagrange-Multiplier Methods for Nonlinear Continuous Global Optimization. | Lagrangian methods are popular in solving continuous constrained optimization problems. In this paper, we address three important issues in applying Lagrangian methods to solve optimization problems with inequality constraints.First, we study methods to transform inequality constraints into equality constraints. An existing method, called the slack-variable method, adds a slack variable to each inequality constraint in order to transform it into an equality constraint. Its disadvantage is that when the search trajectory is inside a feasible region, some satisfied constraints may still pose some effect on the Lagrangian function, leading to possible oscillations and divergence when a local minimum lies on the boundary of the feasible region. To overcome this problem, we propose the MaxQ method that carries no effect on satisfied constraints. Hence, minimizing the Lagrangian function in a feasible region always leads to a local minimum of the objective function. We also study some strategies to speed up its convergence.Second, we study methods to improve the convergence speed of Lagrangian methods without affecting the solution quality. This is done by an adaptive-control strategy that dynamically adjusts the relative weights between the objective and the Lagrangian part, leading to better balance between the two and faster convergence.Third, we study a trace-based method to pull the search trajectory from one saddle point to another in a continuous fashion without restarts. This overcomes one of the problems in existing Lagrangian methods that converges only to one saddle point and requires random restarts to look for new saddle points, often missing good saddle points in the vicinity of saddle points already found.Finally, we describe a prototype Novel (Nonlinear Optimization via External Lead) that implements our proposed strategies and present improved solutions in solving a collection of benchmarks. | Introduction
Many applications in engineering, decision science and operation research are formulated as optimization
problems. These applications include digital signal processing, structure optimization,
engineering design, neural-network learning, computer-aided design for VLSI, and chemical control
processing. High-quality solutions in these applications may have significant economical impacts,
leading to lower implementation and maintenance costs while improving the quality of outputs.
The constrained nonlinear global optimization problems that we study take the following form
subject to g(X)
where f(X) is an objective function, is a set of k inequality constraints,
and is a set of m equality constraints. All f(X), g(X), and h(X) are
assumed to be (nonlinear) differentiable real-valued continuous functions.
Global minimization looks for a solution that satisfies all the constraints and is no larger than
any other local minimum. This is a challenging problem as there may not be enough time to find a
feasible solution, or even if a feasible solution is found, there is no way to show that it is minimal. In
practice, one only seeks as many local minima as possible that satisfy the constraints, and pick the
best local minimum. Active research in the past three decades has produced a variety of methods
to find solutions to constrained nonconvex nonlinear continuous optimization problems [29, 10, 7,
In general, they are divided into transformational and non-transformational methods.
Non-transformational approaches include discarding methods, back-to-feasible-region methods,
and enumerative methods. Discarding methods [11, 15] drop solutions once they are found to be
while back-to-feasible-region methods [12] attempt to maintain feasibility by reflecting
moves from boundaries if such moves go out of the current feasible region. Both of these methods
have been combined with global search and do not involve transformations to relax constraints.
Last, enumerative methods [10] are generally too expensive to apply except for problems with linear
objectives and constraints, and for bilinear programming problems [1].
Transformational approaches, on the other hand, transform a problem into another form before
solving it. Some well-known methods include penalty, barrier, and Lagrange-multiplier methods
[14]. Penalty methods transform constraints into part of the objective function and require
tuning penalty coefficients either before or during the search. Barrier methods are similar except
that barriers are set up to prevent solutions from going out of feasible regions. Both methods have
difficulties when they start from an infeasible region or when feasible solutions are hard to find.
However, they can be combined with other methods to improve their quality.
Lagrange-multiplier methods (or Lagrangian methods) introduce Lagrange variables to gradually
resolve constraints through iterative updates. They are exact methods that optimize the
objective using Lagrange multipliers to meet the Kuhn-Tucker conditions [14]. In view of their
advantages, we use them for constraint relaxation in this paper. Given an optimization problem
with only equality constraints,
minimize f(X) (2)
subject to
the corresponding Lagrangian function and augmented Lagrangian function are defined as
is a set of Lagrange multipliers. We use the augmented Lagrangian function
in this paper as it provides better numerical stability.
According to classical optimization theory [14], all the extrema of (4) (called saddle points),
whether local or global, are roots of the following set of first-order necessary conditions.
These conditions are necessary to guarantee the (local) optimality to the solution of (2). Because
a saddle point is a local minimum of the Lagrangian function L(X; ) in the original-variable (X)
space and a local maximum of L(X; ) in the Lagrange-multiplier () space, it can be obtained by
solving the following dynamic system of equations
d
dt
d
dt
which perform descents in the original-variable space of X and ascents in the Lagrange-multiplier
space of .
The goal of this paper is to develop new strategies to improve the convergence speed and
solution quality of Lagrangian methods. We achieve this by three approaches. First, we study
in Section 2 methods to eliminate oscillations when inequality constraints are transformed into
equality constraints. These help improve convergence time as compared to existing methods of
adding slack variables. Second, we present in Section 3 a method to improve the convergence speed
of Lagrangian methods by adaptively adjusting the relative weights between the objective and the
constraints. Third, we discuss in Section 4 a global-search method that looks for multiple saddle
points in a continuous trajectory, without restarting the search from random starting points. We
also present our prototype Novel that integrates these strategies. Finally, we show in Section 5 new
improved results on a collection of benchmarks.
Handling Inequality Constraints
Lagrangian methods work well with equality constraints, but cannot directly deal with inequality
constraints (1), except in some simple cases where one can directly solve the first-order equations
in closed form. In general, inequality constraints are first transformed into equivalent equality
constraints before Lagrangian methods can be applied.
2.1 Transformation Using Slack Variables
One possible transformation [14] to handle inequality constraint is to add a
slack variable z i to transform it into an equality constraint g i (X)+z 2
simplification [14],
the augmented Lagrangian function for problem (1) becomes
where and are Lagrange multipliers. In the same way as (6), a saddle point to (7) can be
reached by doing descents in the X space and ascents in the and space.
The balance between descents and ascents depends on the magnitudes of Lagrange multipliers
and , which play a role in balancing objective f(X) and constraints h(X) and g(X) and in
controlling indirectly the convergence speed and solution quality of the Lagrangian method. At a
saddle point, the forces due to descent and ascent reach a balance through appropriate Lagrange-
multiplier values.
To emphasize how the relative weights affect the convergence speed and solution quality, we
introduce an additional weight w into (7) and get
a weight on the objective. When which is the
original Lagrangian function. The corresponding dynamic system is as follows
d
dt
d
dt
d
dt
Starting from an initial point (X(0); (0); (0)), we solve the dynamic equations (9)-(11) using
an ordinary differential equation solver LSODE 1 and observe a search trajectory (X(t); (t); (t)).
When a saddle point is on the boundary of the feasible region (which is true for most problems in
the benchmark collection [6]), the dynamic equation approaches it from both the inside and outside
of the feasible region. We observe three behaviors of the search trajectory:
ffl The trajectory gradually reduces its oscillations and eventually converges;
ffl The trajectory oscillates within some range but never converges;
ffl The magnitude of oscillations increases, and the trajectory eventually diverges.
To illustrate these three behaviors (divergence, oscillations without convergence, and reduction of
oscillations until convergence), we apply (9)-(11) to solve Problem 2.3 in [6], a quadratic programming
problem with linear inequality constraints. The problem is given as follows:
Minimize
2subject to 2x 2
It is a quadratic nonlinear programming problem with linear inequality constraints. We set
0), the initial point at 0, at the middle of the search space, i.e., x
1 LSODE is a solver for first-order ordinary differential equations, a public-domain package available from
http://www.netlib.org.
Objective
Iterations (*1000)0.51.52.5
Violation
Iterations (*1000)
Figure
1: The objective and maximum violation oscillate using the slack-variable method (w = 1).
-12.2
-11.4
-11.2
-10.4
-10.2
Objective
Iterations (*1000)0.020.060.10
Violation
Iterations (*1000)
Figure
2: The objective and maximum violation converge after oscillations subside using the slack-
variable method
We further set the maximum (logical) time for LSODE to be t
which is divided into small units of resulting in a maximum of 10 5 iterations (= t max =4t).
The stopping condition for (9)-(11) is the Lyupunov condition:
The dynamic system stops when it converges or when it reaches the maximum number of iterations.
When quickly into infinity, meaning that the original Lagrangian
method will diverge. If we scale the objective by 10 (i.e., then the objective value
oscillates within the range [\Gamma17; \Gamma10], while the maximum violation v max (t) is between 0
and 0:4, as shown in Figure 1. Here, v max (t) at time t is defined as
If we further reduce w to 1=15, then the oscillations subside, and the trajectory eventually converges
(see
Figure
2).
Intuitively, the occurrence of oscillations can be explained as follows. Suppose we start from
an infeasible point initially
As the search progresses, the corresponding i (t) increases and pushes the
trajectory towards a feasible region. At some time t, the inequality constraint g i (X(t)) 0 is
satisfied for the current point X(t). At this point, d i (t)
negative
when Hence, the trajectory decelerates but continues to move into the feasible region
even when the corresponding constraint, g i (X(t)), is satisfied. The movement of the trajectory
inside the feasible region eventually stops because the local minimum is on the boundary, and the
corresponding force due to descents in the objective space pushes the trajectory outside the feasible
region. Likewise, when the trajectory is outside the feasible region, a force due to the constraints
pushes the trajectory inside the feasible region. If these two forces are not well balanced, the search
may diverge or oscillate without convergence.
2.2 Transformation Using the MaxQ Method
To avoid oscillations in the method based on slack variables, we would like a search to converge to
a local minimum without oscillations when it is on the boundary of a feasible region and when the
trajectory is outside the feasible region. This is done by our proposed MaxQ method.
Without loss of generality, we ignore equality constraints in the following discussion for sim-
plicity, knowing that equality constraints are handled in the way described in Section 1. The MaxQ
method transforms an inequality constraint as follows.
where q i are control parameters to be determined later. For a given X , if
The augmented Lagrangian function is
It is important to choose suitable control parameters q i they affect the
convergence speed of our method. One can easily show that, when q i 1, inequality constraint
is equivalent to equality constraint Suppose that q i is a
constant. Using a dynamic system similar to that in (9)-(11) to solve Lagrangian function (16), we
need to evaluate partial derivative 5X p i (X), where
(X) is not continuous, and the derivative of L q (X; ) is not continuous when g
However, the continuity of derivatives is required by most differential-equation solvers, such as
LSODE. For this reason, we require q i ? 1 in (15).
One way of selecting q i is to make it very close to 1, namely, 1. At this point, the
dynamic system will approach a feasible region slowly when the saddle point is on the boundary
of the feasible region. This is true because p 0
independent of how far the
current point X is away from the feasible region. Thus, larger control parameters q i are needed
for fast convergence if the current point X is far from the feasible region. In contrast, if we choose
meaning that LSODE converges very slowly towards the
saddle point on the boundary of the feasible region.
Taking these facts into account, in order to have fast convergence, we should adapt q i dynamically
as the search goes to a saddle point. Since different inequality constraints may have different
convergence rates to the saddle point, we associate inequality constraint g i (X) 0 with its own
control parameter q i . Each parameter will be updated dynamically based on the value of g i (X): q i
is large if g i (X) AE 0, and q i is gradually reduced to a value approaching 1 when the search is close
to the saddle point on the boundary. One possible choice of q i is as follows.
are two parameters that control the shape of function q i (x). When g i (X)
approaches 0, q i will approach 1. The dynamic equation to solve (16) is
d
dt
d
dt
where
In the proof above, we assume that q i takes the form in (17), where s 2. With this choice,
very fast from 1 to 0 near the saddle point as making it difficult for
LSODE to find a suitable step size in order to reach the saddle point. To let the gradient change
smoothly, we set s
Note that (16) is similar to (7) in the sense that both use the max function. The main difference
is that (16) avoids the case in (7) in which inequality constraint g i (X(t)) 0 is satisfied at time t
but g i (X(t)) also appears in the Lagrangian function. When g i (X(t)) is satisfied, it is meaningful
to minimize f(X) independent of the value of g i (X(t)).
2.3 Convergence Properties of the MaxQ Method
There are two types of saddle points X as shown in Figure 3. When saddle point X is within a
feasible region, i.e., This means that
, an equilibrium point of dynamic system (18)-(19), is given by
d
dt
dt
Thus, the trajectory controlled by (18)-(19) will converge to this saddle point X .
When the saddle point X is on the boundary of the feasible region shown in Figure 3b, it will
be asymptotically approached from outside the feasible region (right side of Figure 3b). In order
to prove this, we only need to show that X is asymptotically a regular point of the constraints
transformed into an equivalent
equality constraint
Because X is on the boundary of the feasible region, In
addition, when X \Gamma! X , 1. By taking
limits, we obtain
lim
lim
Therefore, lim X!X 5 according to (20), which means that asymptotically
regular point X of p i (X) is the same as that of the original constraint g i (X) 0. Since a saddle
point, if it exists, must be a regular point of g i (X) [14], X can be asymptotically reached by the
dynamic system (18)-(19).
feasible region feasible region
(a) (b)
Figure
3: Relationship between saddle point and feasible region. (a) The saddle point is within the
feasible region; (b) The saddle point is on the boundary of feasible region.
2.4 Dynamic Conversion of Inequality Constraints to Equality Ones in MaxQ
As discussed above, if solution X is on the boundary of a feasible region, i.e., when some
equals zero, then dynamic system (18)-(19) cannot reach this point exactly. This point can only
be approached with a precision proportional to the convergence condition of the LSODE solver.
However, this may take a long time even if q i is changed dynamically. This happens because the
violation of constraint g i (X ) is small when the current point X(t) is close to the boundary X
(from the right side of Figure 3b). Consequently, the increment of the corresponding Lagrange
multiplier i will be small, leading to slow progress towards the saddle point.
Suppose we know that some g j (X solution. In this case, faster convergence
can be achieved if we consider g j (X) as an equality constraint, rather than an inequality
constraint, The difficulty, however, is that it is impossible to know in advance which
inequality constraints g j (X) 0 will satisfy the boundary condition (i.e., solution
on the boundary.
We can utilize the property that, when X(t) is very close to the boundary with respect to
a particular inequality constraint (g j (X(t)) is positive and close to zero) and convergence of this
constraint is slow, it is very likely that the saddle point is on the boundary with respect to this
constraint. At this point, we can dynamically convert inequality constraint g j (X(t)) 0 into
equality constraint g j to improve the convergence rate.
Since we solve the dynamic system using LSODE, let X and X 0 be the points of two successive
iterations. The conversion of inequality constraint occurs when the following two
conditions are satisfied.
ffl The dynamic system converges to some point X when it changes very little for a window
of 10 iterations. We define the current point to have slow convergence when #fmax
our experiments).
ffl The dynamic system converges to the boundary when g j (X) is very close to zero; that is,
our experiments).
Both conditions are very important. Without the first condition, trajectory X(t) that occasionally
passes the boundary of g j (X(t)) would erroneously cause some inequality constraints to be con-
verted. It makes sure that the trajectory really changes very little during a period of time. The
second condition guarantees that only those inequality constraints very close to the boundary can
be converted into equality ones. Note that dynamic conversion can happen to many inequality
constraints at the same time as long as they satisfy these two conditions.
If dynamic conversion is performed on inequality constraint g j (X) 0, then the terrain of
Lagrangian function L q (X; ) will be changed and be totally different. To maintain the search
direction in the original-variable space X , we have to adjust Lagrange multiplier j . Let the
current point just before the conversion be (X; j ). The Lagrangian term associated with inequality
constraint
according to the conversion conditions. The derivative of L j (X; j ) with respect to X and j are
ih
be the point after the conversion. This means that we apply equality constraint
at the current point before. The
Lagrangian term related to g j
and the derivative of "
with respect to X and "
j are
Since the control parameter q j is close to 1, the search direction in the Lagrange-multiplier
space changes very little, meaning that 5 j
independent of the value j .
To retain the search direction in the original-variable space X , we set 5 X L j (X;
and get
2.5 Illustration of the MaxQ Method
As is in the slack-variable method, we introduce an additional weight w into the original augmented
Lagrangian function in the MaxQ method.
a weight on the objective, is the Lagrange multiplier for equality constraints, ,
the Lagrange multiplier for inequality constraints, and
To show how MaxQ avoids divergence and oscillations that occur in the slack-variable method,
we consider the same problem 2.3 defined in (12) [6]. The starting point is at the middle of the
search space, the same as that used in the slack-variable method. Three cases were tested: no
scaling, scaling the objective by 10 (i.e., scaling the objective by 15. All of them
converge with similar behavior. Figure 4 shows the second case. Obviously, MaxQ has smoother
and better convergence property as compared to the slack-variable method.
The solution to problem 2.3 is on the boundary of the feasible region as shown in Figure 3b.
Since all the Lagrange multipliers are zero initially, only objective function f(X) takes effect in the
Lagrangian function, causing the trajectory to move away from the feasible region. The Lagrange
Objective
Iterations (*1000)
Violation
Iterations (*1000)
Figure
4: The objective and maximum violation converge smoothly using MaxQ for Problem 2.3
defined in (12) [6] (w = 1). The number of iterations required is large and is over 94,000.
multipliers then increase, pushing the trajectory back towards the boundary. Hence, the objective-
function value increases, and the value of the maximum violation decreases (see Figure 4).
Note that there is a gap between our current implementation of MaxQ and its theoretic result,
in the sense that the analytic proof requires s in (17) but LSODE uses s or 3:0. This
gap causes the MaxQ method to converge slowly sometimes, like the case shown in Figure 4 that
requires over 94,000 iterations. In this example, MaxQ reduces the constraint violation very quickly
in the beginning, but slowly afterwards.
This problem can be solved by two approaches. The first is to use another differential-equation
solver that is insensitive to quick changes of gradients, making the analytic result hold during the
search. This will be investigated in the future. The second is to adaptively adjust the relative weight
w between the objective and the constraints during the search. As soon as we detect divergence,
oscillations, or slow convergence, w is adjusted accordingly. When we apply this strategy in the
slack-variable method [34], it is able to eliminate divergence, reduce oscillations, and greatly speed
up convergence. We discuss the application of this strategy in the MaxQ method in the next section.
3 Adaptive Lagrange-Multiplier Method
In the last section, we have studied two methods to handle inequality constraints. We have shown
that the slack-variable method is sensitive to the relative weights between the objective and the
constraints, and that its implementation may diverge, oscillate or converge. Although the MaxQ
method does not oscillate and is not sensitive to the relative weights, careful weighting may help
accelerate its convergence speed. The proper weights for fast convergence, however, are problem-dependent
and are impossible to choose in advance. In this section, we describe a strategy for MaxQ
to dynamically adapt the weights based on the behavior of the search progress. This is based on
the strategy we have developed for the slack-variable method [34].
3.1 Dynamic Weight-Adaptation Strategy
Lagrangian methods rely on two counteracting forces to resolve constraints and find high-quality
solutions. When all the constraints are satisfied, Lagrangian methods rely on gradient descents in
the objective space to find local minima. On the other hand, when any of the constraints are not
methods rely on gradient ascents in the Lagrange-multiplier space in order to
increase the penalties on unsatisfied constraints and to force the constraints into satisfaction. The
1. Set control parameters:
time interval 4t
initial weight
maximum number of iterations i max
2. Set window size
3. is the iteration number */
4. while j i max and stopping condition is not satisfied do
5. advance search trajectory by 4t in LSODE to get to (X
6. if trajectory diverges then
reduce w; restart the algorithm by going to Step 2
7. record useful information for calculating performance metrics
8. if ((j mod Nw ) ==
/* Test whether w should be modified at the end of a window */
9. compute performance metrics based on data collected
10. change w when the conditions are satisfied
11. end while
Figure
5: Framework of the dynamic weight-adaptation algorithm
balance between gradient descents and gradient ascents depends on the magnitudes of Lagrange
multipliers and , which play a role in balancing objective f(X) and constraints h(X) and
g(X) and in controlling indirectly the convergence speed and solution quality of the Lagrangian
method. At a saddle point, the forces due to descent and ascent reach a balance through appropriate
Lagrange-multiplier values.
Combining augmented Lagrangian functions (8) and (25), we get a general augmented Lagrangian
function as follows:
where w is the relative weight, is the Lagrange multiplier for equality constraints, and for
inequality constraints. L ineq (; X) depends on the way to deal with inequality constraints. It
can be the slack-variable method or MaxQ. Starting from an initial point (X(0); (0); (0)), the
dynamic system to find saddle points is
d
dt
d
dt
d
dt
Figure
5 outlines the algorithm. Its basic idea is to first estimate the initial weight
(Step 1), measure the performance metrics of the search trajectory (X(t); (t); (t)) periodically,
and adapt w(t) to improve convergence time or solution quality.
Let t max be the total (logical) time for the search, and t max be divided into small units of
time 4t so that the maximum number of iterations i t. Further, assume a stopping
condition if the search were to stop before t max (Step 4). Given a starting point
set the initial values of the Lagrange multipliers to be zero; i.e.,
be the point of the i th iteration, and v max (i) be its maximum violation defined in (14).
Objective
Iterations (*1000)
Violation
Iterations (*1000)
Figure
The objective and maximum violation converge after 756 iterations for MaxQ using
dynamic weight adaptation (initial
To monitor the progress of the search trajectory, we divide time into non-overlapping windows
of size Nw iterations each (Step 2). In each window, we compute some metrics to measure the
progress of the search relative to that of previous windows. For the q th window
calculate the average value of v max (t) using (14) over all the iterations in this window,
During the search, we employ LSODE to solve dynamic system (27)-(29), and advance the
trajectory by time interval 4t in each iteration in order to arrive at point (X
At this point, we test whether the trajectory diverges or not (Step 6). Divergence happens when
the maximum violation v max (t) is larger than an extremely large value (e.g. 10 20 ). If it happens,
we reduce w by a large amount, say w (= w=10, and restart the algorithm. In each iteration, we
also record some statistics such as v max (t), which will be used to calculate the performance metrics
for each window (Step 7).
At the end of each window or every Nw iterations (Step 8), we decide whether to update w
based on the performance metrics (30) (Step 9). In our current implementation, we use the average
value of maximum violation v max (t). In general, other application-specific metrics can also be used.
Based on these measurements, we adjust w accordingly (Step 10).
As explained in section 2.5, the major problem with MaxQ sometimes is its slow convergence,
which can be measured by how fast the maximum violation decreases. Therefore, we monitor the
reduction of v q , the average value of the maximum violation. If it is found to decrease slowly,
i.e.,
is a threshold (e.g. reduce weight w by half
(w (= w=2). Its effect is to put more weight on the constraints, thus pushing the trajectory quickly
to a feasible region. Note that when comparing the values between two successive windows
and q, both must use the same weight w; otherwise, the comparison is not meaningful because the
terrain may be different. Hence, after adapting w, we should wait at least two windows before
changing it again.
3.2 Illustration of the Weight-Adaptation Strategy for MaxQ
To use the dynamic weight-adaptation method, we set time interval
size Corresponding to Figure 4, we start from the initial weight
the same starting point (X(0); (0); (0)). Figure 6 shows the resulting search profile, in which the
search converges using only 756 iterations, which is significantly better than the 94,000 iterations
without weight adaptation.
It is important to note that solution quality is the same as that in Figure 4, and both obtain
the objective value \Gamma11:25 when the search converges.
The remaining issue in our algorithm is to choose a good starting value for
is too large, then it is difficult for the constraints to be satisfied, resulting in slow convergence for
MaxQ. If w(0) is too small, then the objective is under-weighted, and the search may converge to
a worse saddle point. After studying many benchmark problems [6], we found that if we set the
starting points of the search to be the ones given by [6] and both the slack-variable
and MaxQ methods work well. This suggests us to start with our experiments. A small
number of the problems may still need further adaptation of w during the search.
4 Global Search for Saddle Points
The Lagrangian method presented in the last two sections only looks for a single saddle point,
behaving like a local search. To find multiple saddle points, global-search methods are needed to
bring the search out of local saddle points. In this section, we present our global search strategy,
followed by a description of our trace-based search method. We first describe some previous work
on solving unconstrained nonlinear optimization problems since the dynamic system for solving a
Lagrangian formulation can be treated as an unconstrained nonlinear optimization problem.
4.1 Previous Work on Unconstrained Nonlinear Optimization
Unconstrained nonlinear optimization, in general, is multi-modal with the following features. (a)
Flat regions may mislead any gradient-based methods. (b) Gradients may differ by many orders
of magnitude, making it difficult to use gradients in any gradient-based search method. (c) The
existence of many local minima may trap some search methods, leading to suboptimal solutions.
Based on these observations, global search methods should be able to use gradient information to
descend into local minima, and be able to escape from local minima once it gets there.
Search methods can be classified into local and global. Local search algorithms, such as
gradient-descent and Newton's methods, find local minima efficiently and work best in uni-modal
problems. Global-search algorithms, in contrast, employ some heuristic or systematic strategies to
look for global minima and do not stop after finding a local minimum [18, 29, 14]. Note that both
gradients and Hessians can be used in local- and global-search methods [29].
Local-search algorithms have difficulty when the surface is flat where gradients are close to
zero, or when gradients can be in a large range, or when the surface is very rugged. If gradients
vary greatly, a search may progress too slowly when gradients are small or may over-shoot when
gradients are large. If the function surface is rugged, a local search from a randomly chosen starting
point will most likely converge to a local minimum that is near the starting point and results in a
solution worse than the global minimum. Moreover, these algorithms may require some properly
chosen parameters as incorrectly chosen parameters may cause slow or unstable convergence.
To avoid getting stuck in local minima in local-search methods, many global-search methods
have been developed. These methods rely on local search to determine local minima, but focus on
bringing the search out of local minima when it gets there.
Few deterministic methods have been developed, most of which apply deterministic heuristics
to bring a search out of a local minimum (such as those in covering and generalized descent
methods) [29, 24, 10]. These deterministic methods do not work well when the search space is too
large to be covered adequately [29, 9, 4]. Trajectory methods rely on an internal force (such as the
momentum of the trajectory) to continue to move the trajectory once it gets to a local minimum.
They do not work well when gradients are steep and the search space is rugged.
Probabilistic methods, on the other hand, rely on probability to make decisions. The simplest
probabilistic algorithm uses restarts to bring a search out of a local minimum when little
improvement can be made locally [20, 35, 36]. More advanced methods rely on probability to indicate
whether the search should ascend from a local minimum. Simulated annealing is one of these
methods that accepts up-hill movements [22, 30, 2, 3, 21, 13]) based on some probability. Other
stochastic methods rely on probability to decide which intermediate points to be interpolated as
new starting points, such as random recombinations and mutations in evolutionary algorithms [8]).
All these algorithms are weak in either their local search [14] or their global search [9, 29, 24, 23].
For instance, gradient information useful in local search is not well used in simulated annealing
and evolutionary algorithms. In contrast, gradient-descent algorithms with multi-start are weak in
their global search.
Other probabilistic methods utilize sampling to determine the terrain and to decide where
to search [24, 16, 29, 31]. Such strategies may fail when the terrain is very rugged or when the
search gets trapped in a deep but suboptimal basin. This happens in clustering methods whose
performance is similar to that of random restarts when the terrain is rugged [24, 28]. Bayesian
methods also do not work well. Most samples that they collect randomly from the error surface
are close to the average error value, and these samples are inadequate to model the behavior at
minimal points [27, 17, 29, 31]. In addition, they are computationally expensive and are usually
not applicable for problems with over twenty variables.
4.2 Novel: A Trace-Based Search Method
To find saddle points of (26), Eq. (27) performs descents in the original-variable space to locate
local minima of the objective function when the constraints are satisfied, whereas (28)-(29) perform
ascents in the Lagrange-multiplier space when the constraints are violated.
We are interested to move the trajectory from one saddle point in a feasible space to another,
without having to restart the search. To do so, we add an external force to pull the search out of a
saddle point in the original-variable space continuously and escapes from it without restarts [32, 26].
It has three features: exploring the solution space, locating promising regions, and finding saddle
points. In exploring the solution space, the search is guided by a continuous terrain-independent
trace that does not get trapped by local saddle points. This trace is usually an aperiodic continuous
function that runs in a bounded space. It continues to move over the search space independent of
local gradients. In locating promising regions, our trace-based method uses local Lagrangian search
to attract the search to a saddle point but relies on the trace to pull it out once little improvement
can be found. Finally, our trace-based method selects one initial point from each promising local
region and uses them as initial points for a Lagrangian search to find saddle points.
In exploring the search space, the trace plays an important role in discovering regions with
new local saddle points. A trace is a continuous aperiodic function of (logical) time that generates
a trajectory. At time both the trace and the trajectory start at the same point. As the trace
moves from point X 1 to point X 2 , the trajectory moves from point Y 1 to Y 2 , where Y 2 is a function
of the local gradient at Y 1 and the distance between X 1 and Y 1 (see Figure 7). These two forces
(descent into a local saddle point and attraction exerted by the trace) form a composite vector that
represents the route taken by the trajectory.
Trace function
Trajectory 1
Trajectory 2
Trajectory 3
Trace
Trace direction
Moving
direction
Gradient direction
Trajectory
Figure
7: Novel has two phases: global search and local refinement. In the global-search phase, the
trajectory combines a Lagrangian search and the pull exerted by the moving trace. In the local-search
phase, the trajectory is sampled to collect starting points for pure Lagrangian searches.
When dealing with constrained problems formulated by Lagrangian functions, there are two
different sets of variables, the original variables X and the Lagrange multipliers and . Intuitively,
there is no need of a trace in the Lagrangian space because the Lagrange multipliers are responsible
to bring the trajectory to a feasible region and does not involve finding local minima. As the trace
pulls the search out of a local saddle point and enters an infeasible region, the corresponding
Lagrange multipliers will be automatically increased based on the dynamic system, and then push
the trajectory back into the feasible region. In this sense, the Lagrange multipliers are passive
since they change with the constraints. If one also uses a trace function in the Lagrangian space,
the force imposed by the trace and that by the Lagrange multipliers may contradict. In short, the
trace does not affect the search in the Lagrange-multiplier space defined by (28) and (29). This
strategy corrects a problem in our original trace-based strategy presented in [32] that uses a trace
in the Lagrangian space.
The overall dynamic system for nonlinear constrained optimization is as follows.
d
dt
d
dt
d
dt
where g and t are constants controlling the relative weights between local search and global
exploration.
Note that our proposed method is a trajectory-based method, but differs from existing trajectory-based
methods that rely on internal forces to modify the trajectory. Instead, it uses an external
force (a traveling problem-independent trace) to pull the trajectory out of local minima.
The design of a good trace function TX (t) is very important because our method relies on it
to travel through the solution space. Four criteria have been considered up to now. First, the trace
should be aperiodic so that it does not return to the same starting points and regenerates possibly
the same trajectory. Second, the trace needs to be continuous in order to be differentiable. This
allows the generated trajectory to follow the terrain in a continuous manner without restarting
from new starting points. Third, the trace should be bounded so that it will not explore unwanted
regions. Last, the trace should be designed to travel from coarse to fine so that it examines the
search space in greater details when more time is allowed.
Since an analytic approach to design a good trace function is intractable, we have studied some
heuristic functions and fine-tuned them [25]. In the following, we summarize our observations.
ffl Our trace-based method is a fine-level global search in the sense that the search space covered
by a trace grows linearly with the length of the trace (and, therefore, the time to complete
the algorithm). However, a search space grows exponentially with respect to the number
of dimensions. Hence, a trace-based method does not give good coverage when the search
space is large. To overcome this limitation, the method may need to be combined with other
coarse-level global searches, such as simulated annealing and genetic algorithms. This hybrid
approach does not work well for constrained optimization problems because existing coarse-level
global-search algorithms generally have difficulty in satisfying constraints. Starting from
points where constraints are violated usually do not lead to good feasible solutions.
ffl Our trace-based method relies on the distance between the current position of the trace and
that of the trajectory to pull the trajectory out of local saddle points. When local gradients
are very large, the external force due to the trace may not be enough to pull the trajectory
out of local saddle points. To address this problem, we have developed a dynamic variable
scaling method that scales a variable dimension when the gradient of the trajectory in this
dimension exceeds a threshold (e.g. Scaling not only reduces the local gradient of
the trajectory but also increases the distance between the trace and the trajectory, thereby
providing adequate force to pull the trajectory out of local saddle points. By controlling the
scaling factor, we are able to explore a larger search space.
Based on substantial experiments, we have designed an aperiodic trace function as follows.
where i represents the i'th dimension, ae is a coefficient specifying the range, and n is the dimension
of the original variable space X .
We have described our trace-based method using one trace function. In general, the method
can be cascaded, using the output trajectory of one stage as the trace of the next stage. This
bootstrapping allows trajectories in later stages to go deeper into a local region, thereby providing
better starting points for the local-search phase. In Figure 7, we have shown three stages of the
global-search phase, each of which outputs a trajectory based on (31). In the first stage of the
global search, the user-defined trace function leads the trajectory to form Trajectory 1 in
Figure
7. In the second and third stages of the global search, the trace function TX (t) is the
trajectory from the previous stage. Using the trajectories output from the three stages, we identify
a set of promising starting points and perform local Lagrangian searches from them. The final
result is the best solution among all these local searches. In our implementation, when an output
trajectory is a collection of discrete sample points of a continuous trajectory, interpolations are
performed to form a continuous trace for the next stage.
Generally, weights g and t can have different values in different global stages. For example,
t can be set to have large values relative to g in the first stage so that global search is emphasized.
In later stages, g can have larger values, and the search is more focused on a local region. In the
simplest case, g and t are set to constants and have the same values in all the stages. In our
experiments, we have set g a = 1 and stages.
We have implemented our MaxQ, adaptive weighting, and trace-based search in a prototype
Novel (Nonlinear Optimization Via External Lead) that extends our previous work in trace-based
search [32, 26]. The prototype can solve both nonlinear constrained as well as unconstrained
optimization problems. It has been applied to solve design problems in signal processing [33],
neural-network learning [26], and benchmark problems in operations research. Results on the
latter are presented in the next section.
5 Experimental Results
In this section we describe our experimental results on some existing benchmarks [6]. These benchmarks
are challenging because they model practical applications that have been studied extensively
in the past. As a result, improvements are generally difficult.
We use a common set of parameters, including step size and trace function, to solve all the
problems. The reason for not tuning the parameters is to avoid any bias, as good solutions can
always be obtained by sufficient tuning. We further set the starting points of Novel as those
suggested in the benchmark set. The only exception is the problem-specific search range of the
trace, which we set manually based on the solutions reported in the benchmarks. In practice, this
is reasonable as search ranges are generally known. In cases that the search range is not available,
we use trial and error, starting from a small range and gradually increasing it until no improvement
in solutions can be found.
In the global-search phase of Novel, we used three stages that produce three trajectories (see
Figure
7). Using chose 100 starting points from each trajectory based on their
Lagrangian values for Lagrangian searches. After 300 Lagrangian searches, we report the best
solution.
Table
1 summarizes the results found by Novel. Column 1 lists the problem identifications
that appear in the benchmark collection [6]. Column 2 shows the problem-dependent search range
that the trace covers. Column 3 shows the best known solutions reported in [6], and Column 4,
the solutions reported by Epperly [5]. Here, symbol '\Gamma' means that the method is unable to find
a solution for the corresponding problem. Column 5 shows the results obtained by Novel using
the slack-variable method where the dynamic weight-adaptation strategy described in Section 3 is
used. Without using adaptive weights, more than half of these problems cannot be solved due to
divergence and oscillations described in Section 2.1. The last column shows the results obtained by
Novel using MaxQ. Results in bold font are improved by Novel over the best known results, with
improvements of up to 10%. Our results indicate that Novel is robust in discovering new regions
and in escaping from local traps.
6 Conclusions
In this paper, we have studied three strategies to improve Lagrangian searches for solving nonlinear
constrained optimization problems. First, we have studied a new method called MaxQ to convert
inequality constraints into equality constraints. A Lagrangian search using the new constraints
approaches saddle points on boundaries of feasible regions without oscillations. This overcomes
the problems of oscillations and divergence when inequality constraints are converted by adding
slack variables. Second, we have developed a method to adaptively adjust the relative weights
between the objective and the constraints in a Lagrangian formulation. We show that adaptive
weighting can improve the convergence speed of Lagrangian methods, without affecting the solution
quality. Finally, we have applied a trace-based search to bring a trajectory from one saddle point
into another in a continuous fashion. Our method generates information-bearing trajectories in
Table
1: Results on a collection of constrained optimization benchmarks [6] comparing Novel using
MaxQ, Novel using the slack-variable method, and Epperly's method [5]. Search times are in CPU
seconds on a Sun SS 10/51. Improved solutions found by MaxQ are indicated in bold font. Symbol
'\Gamma' means that the method was not able to find a solution for the corresponding problem.
Problem Novel Search Best Known Epperly's Slack Variable MaxQ
ID Range Solutions Solutions Solutions Solutions
2.1 1.0 \Gamma17:00 \Gamma17:00 \Gamma17:00 \Gamma17:00
2.2 10.0 \Gamma213:00 \Gamma213:00 \Gamma213:00 \Gamma213:00
2.3 10.0 \Gamma15.00 \Gamma15.00 \Gamma15.00 \Gamma15.00
2.4 10.0 \Gamma11.00 \Gamma11.00 \Gamma11.00 \Gamma11.00
2.5 1.0 \Gamma268.00 \Gamma268.00 \Gamma268.00 \Gamma268.00
2.6 1.0 \Gamma39.00 \Gamma39.00 \Gamma39.00 \Gamma39.00
2.7(2) 40.0 \Gamma884.75 \Gamma884.75 \Gamma884.75 \Gamma884.75
2.8 25.0 15990.00 15990.00 15639.00 15639.00
3.1
3.2 50.0 \Gamma30665.50 \Gamma30665.50 \Gamma30665.50 \Gamma30665.50
3.3 10.0 \Gamma310.00 \Gamma310.00 \Gamma310.00 \Gamma310.00
3.4 5.0 \Gamma4.00 \Gamma4.00 \Gamma4.00 \Gamma4.00
4.3 5.0 \Gamma4.51 \Gamma4.51 \Gamma4.51 \Gamma4.51
4.4 5.0 \Gamma2.217 \Gamma2.217 \Gamma2.217 \Gamma2.217
4.5 5.0 \Gamma11.96 \Gamma13.40 \Gamma13.40 \Gamma13.40
4.6 5.0 \Gamma5.51 \Gamma5.51 \Gamma5.51 \Gamma5.51
4.7 5.0 \Gamma16.74 \Gamma16.74 \Gamma16.75 \Gamma16.75
5.2 50.0 1.567 \Gamma 1.567 1.567
5.4 50.0 1.86 \Gamma 1.86 1.86
6.2 100.0 400.00 400.00 400.00 400.00
6.3 100.0 600.00 600.00 600.00 600.00
6.4 100.0 750.00 750.00 750.00 750.00
7.2 100.0 56825.00 \Gamma 56825.00 56825.00
7.3
7.4
its global search based on a user-defined trace function, and samples these trajectories for good
starting points in its local search. This overcomes the problem of using random restarts when
the trajectory is already in the vicinity of good saddle points. We have applied MaxQ, adaptive
weighting, and trace-based search in Novel [32, 26], a global optimization system we have developed
earlier to solve constrained as well as unconstrained optimization problems.
We have tested many benchmark problems derived from manufacturing, computed aided de-
sign, and other engineering applications and have compared MaxQ to the method based on slack
variables [14] and that of Epperly [5]. Our results show that MaxQ is more robust in convergence
and has found solutions that are either better than or the same as existing solutions. Our future
work in this area will be on finding better trace functions, parallelizing the execution on massively
parallel computers, and studying other challenging applications in neural-network learning and
signal processing.
--R
Global minimization by reducing the duality gap.
Generalized simulated annealing for function optimization.
Minimizing multimodal functions of continuous variables with the simulated annealing algorithm.
An extended continuous Newton method.
Global Optimization of Nonconvex Nonolinear Programs Using Parallel Branch And Bound.
A Collection of Test Problems for Constrained Global Optimization Algorithms
Recent Advances in GLobal Optimization.
An introduction to simulated evolutionary optimization.
Global optimization using interval analysis.
Global optimization: Deterministic approaches.
Adaptive Simulated Annealing (ASA).
An adaptive simulated annealing algorithm for global optimization over continuous variables.
Random tunneling by means of acceptance-rejection sampling for global optimization
Genetic Algorithms
Bayesian Approach to Global Optimization.
Application of bayesian approach to numerical methods of global and stochastic optimization.
Complexity in numerical optimization.
Constrained Global Optimization: Algorithms and Applica- tions
Pure adaptive search in Monte Carlo optimiza- tion
A combined multistart-annealing algorithm for continuous global optimization
Simulated annealing for constrained global optimization.
On the convergence of the Baba and Dorea random optimization methods.
Stochastic techniques for global optimization: A survey on recent advances.
Global Search Methods for Solving Nonlinear Optimization Problems.
Global optimization for neural network training.
A global search method for optimizing nonlinear systems.
Topographical global optimization.
A Monte Carlo simulated annealing approach to optimization over continuous variables.
Global optimization of QMF filter-bank design using NOVEL
Improving the performance of weighted Lagrange- multiple methods for constrained nonlinear optimization
Pure adaptive search in global optimization.
Improving hit-and-run for global optimization
--TR
--CTR
Global Optimization Algorithm using Lagrangian Underestimates and the Interval Newton Method, Journal of Global Optimization, v.24 n.3, p.349-370, November 2002 | trace-based search method;adaptive weights;lagrange-multiplier method;oscillations;convergence speed;local search;nonlinear continuous constrained optimization;inequality constraints;global search |
596250 | A Geometric Approach to Global Optimization. | In this paper we consider the problem of optimizing a piecewise-linear objective function over a non-convex domain. In particular we do not allow the solution to lie in the interior of a prespecified region R. We discuss the geometrical properties of this problems and present algorithms based on combinatorial arguments. In addition we show how we can construct quite complicated shaped sets R while maintaining the combinatorial properties. | Introduction
The solution of piecewise linear programs has always played a special role in
optimization.
In general, piecewise-linearities are often employed to give a more realistic description
of costs than can be achieved by linear terms alone. Also in worst case
analysis piecewise linearity arises naturally.
Furthermore, piecewise-linear programs may be used for approximating convex
objective functions by piecewise linear functions. Such an approximation method
including error bound analysis was proposed by [BHR91].
In addition, piecewise linear programs arise in specific branches of operations
research, like for example location theory, where - given a number of existing
facilities - a new facility has to be located so that some objectives are optimized.
The objectives are often in the form of piecewise linear functions due to the fact
that typically the sum (or the maximum) of weighted distances from the existing
facilities to the new facility is chosen as a criterion. Moreover, these distances are
often derived from norms with a polyhedral unit ball. See [LMW88], [FLFMW92],
and [Nic95] for various piecewise linear models in location theory.
For an overview about methods for solving piecewise linear programs the reader
is referred to [Fou85], [Fou88], [Fou92], and references therein.
As a conclusion it is quite natural also to look at global optimization problems
with piecewise-linearities. In particular, we are interested in the problem of optimizing
a piecewise-linear objective function over a non-convex domain. These
includes problems with reverse convex constraints. For more details and an introduction
to global optimization the reader is referred to [HT96] and references
therein.
Now we will formally introducing the model we consider in this paper.
1.1 The model
Consider the following piecewise linear optimization problem in
and the f are K
different affine linear functions. This is a well-known convex problem and can
efficiently be solved by linear programming methods.
We can also easily introduce a feasibility region A, where A is a polyhedral set
with
A := fx 2
Also (OL) with the additional restriction that x 2 A can be formulated as linear
program and therefore be solved efficiently.
min z
If, however, the feasible region A cannot be described by linear inequalities, or is
not convex, we are in the area of global optimization. In particular we consider
in this paper A := cl(IR n n R), with R ' IR n . By cl(S) we denote the closure of
a set S. Now the minimization problem (ROL) reads
min
f(x) or min
where int(R) denotes the interior of R. With the help of geometric properties of
this problem we will be able to give algorithms to solve (ROL) for a large class
of possible sets R.
The remainder of the paper is organized as follows: First we state geometrical
properties of level curves and level sets. These results are used to derive a combinatorial
description of the solution set in IR n for (ROL) and convex sets R.
Section 4 shows how these results can be extended in the plane for more general
sets R while maintaining the combinatorial character of the solution. The paper
ends with some conclusions and an outview to further research.
2 The concept of cells and level sets
For any set R ' IR n let ext(R) denote the extreme points of R and @R the
boundary of R. Furthermore, let Kg. Then f(x) can be written
as
is an affine linear function and the f k are pairwise different. To denote the solution
sets we introduce
R := min
and
R g:
By defining cells
else
we get a subdivision of IR n into not more than K nonempty cells. The set of all
cells is denoted C. Some properties of C are summarized in the following lemma.
Lemma 1 For the cells C i , i 2 K the following holds:
1. For i 2 K we have that either C i is a polyhedral set with dimension n or
2. ig.
3. S
4.
Proof:
ad 1.) From the definition of C i it follows that C i is either empty or a polyhedral
set which is full-dimensional, because in that case int(C i ) 6= ;.
ad 2.) Let x 2 int(C i ) and suppose there exists k 6= i such that f i
As x is in the interior of C i there exists a ball U := U(x) around x such
that U(x) ' int(C i ). As f i 6= f k the hyperplane H
separates U into two parts U
H such that for all y
H . This is a contradiction since U ' C i .
ad 3.) Take an x 2 IR n . We then have an index i such that f g.
If i is unique, x 2 int(C i ) and we are done. If i is not unique we define
I := fi
Then there exists a ball U := U(x) around x such that
Now define for all k; l; k 6= l; k; l 2 I: g kl := fy
G as the union of all g kl . As the g kl are hyperplanes, U n G 6= ;. Take
G. Then there exists a unique j 2 I such that
meaning that the cell C j 6= ;. As also f j (x) - f k (x) for all k 2 K we can
conclude that x 2 C j .
ad 4.) This statement follows directly from 2. q.e.d.
As the lemma shows, we need only to investigate cells C and we can neglect
the empty ones. In the following we therefore will assume that all cells are
non-empty. The concept of cells has frequently been used in optimization (see
[RS72], [Ede87], [HN95], [Nic95] and references therein). From this literature the
following result is well-known, but restated here for the specific context of this
paper.
Theorem 1 X is either a whole cell or an r-dimensional facet of a cell, r 2
Proof: We can solve (OL) by inspecting all cells. For any cell C i the optimization
problem is a linear program of which the feasible set is the polyhedral set C i .
Therefore the result follows from the well known properties of linear programming
theory. q.e.d.
The following corollary says, that, for finding one optimal solution it is enough
to look at the extreme points of the cells.
Corollary 1 There always exists a point x 2 X with x is the extreme point of
a cell C i for an index i 2 K.
We define C @ as the set of all facets of all cells C 2 C.
Additionally, we define construction lines
for all j. The set of all construction lines, denoted by H,
constitutes an arrangement of hyperplanes which define a set of cells CH similar
to the ones introduced by [Ede87]. Note that CH is a subpartition of C, i.e.
denote the set of points x 2 IR n belonging
to a facet of a cell or a construction line, respectively).
The name "lines" refers to the 2-dimensional case where we in fact have 1-
dimensional construction lines. In the n-dimensional case the construction lines
are (n \Gamma 1)-dimensional sets.
Example 1 We are given
In
Figure
1 the
two cell partitions C and CH are shown. We can easily compute X
checking the extreme points of all cells C 2 C.
Figure
1: Illustration for Example 1. The bold part shows C @ . The normal and the bold lines
together constitute H.
One more definition is necessary for that paper. For t 2 IR define the level set
L- (t) and the level curve L= (t) as
Note that for any convex function f , L- (t) is a closed, convex set, which is
nonempty for all t - t .
Lemma 2 For t ? t we have that @L-
Proof: For t - t the result is obvious. For t ? t we know that any convex
function f with minimal value t is strict convex on the set fx 2
of all non-minimal solutions. That proves the lemma. q.e.d.
Using level curves and level sets we can reformulate (OL) and (ROL).
Theorem 2
a) t is the optimal objective value of (OL)
R is the optimal objective value of (ROL)
c) In a) and b) L= (t) can be replaced by L- (t)
d) x is an optimal solution of (ROL) with
R if and only if there exists a
IR, such that
and
The proof follows easily from the definition of level curves, level sets, and Lemma 2.
Lemma 3 . The level curves L= (t) are piecewise linear on C. More specific,
has one of the following shapes:
1. empty
2. the whole cell C i , in this case we have that
3. an r-dimensional facet of C
4. the intersection between C i and a hyperplane H with
it follows that t ? t
Note that only in Case 2 and Case 4 we can say something about the optimality
of t.
Proof:
Case 1: f i const 8x 2 IR n . Then H can either be empty (yielding the
first case) or yielding that L= t.
In the latter case we also have that for all x 2 C i t. Since
f is a convex function, it only can be constant on a full-dimensional set if
it is minimal on that set. Therefore that we can conclude and the
whole cell C i is optimal.
Case 2: f i (x) is not a constant function. Then H is a hyperplane in IR n and
ffl If we have that H " C i ' @C i then H is a supporting hyperplane for
since C i is a polyhedral set it follows that H " C i is a facet of
, we can conclude that int(C i
;. In this case let C
i be the two parts of the cell C i which
are separated by the hyperplane H. That means, one of C
i is
completely contained in L- (t). Let C
t . Consequently, C
which is a
contradiction, because C
Note that as C i is convex we have that
Proof: As L= there are three possibilities according to Lemma 3.
ffl If L= consequently,
ffl If
ffl If there exists a hyperplane H with C i
then suppose L=
which is a contradiction to Theorem 1. q.e.d.
The following theorem is a consequence of the convexity of f (see also [HT96]
and [HN94]).
Theorem 3 If X ' int(R) then we have X
Proof: Let x 2 X and assume that there exists y 2 IR n such that y 2 X
Then y 62 R, yielding that f(x) ! f(y) and therefore we know for all - 2 (0; 1]
that
This also holds if we choose - such that -x which proves the
theorem. q.e.d.
3 Solution for convex forbidden sets in IR n
In this section we look at forbidden sets R which are convex. As we will show in
the following theorem, for these sets there always exists an optimal solution for
the restricted problem, which is in the intersection of the boundary of R with the
the boundary of a cell C 2 C:
Theorem 4 Let R be a convex set, R ' IR n and X ' int(R). Then there exists
x
R and c 2 C @ with
x
Furthermore only intersections with dim(c " have to be investigated.
Proof: Let x
R such that x 62 C @ . Let
we know that t ? t , and consequently (see Lemma
is a hyperplane with L= Now we look at the following two
cases.
Case 1: Note that since x 62 C @ we know that x 2
Therefore we can conclude that H
a hyperplane, and x 2 @R " H i . According to Corollary 2 there exists
@R such that z 2 X
Case 2:
That means cannot be optimal for the restricted problem since
Theorem 3 tells us that X
Now suppose we have dim(c " This implies that c
coincides locally with @R and among c the objective function is linear. Assume
that there is no c every level curve
touching c " @R has to be linear throughout c " @R and therefore L= 6' R,
contradicting the optimality condition. It follows that for a x
be optimal there must exist a c
and the result follows by
replacing c by c 0 . q.e.d.
Theorem 5 Let R ' IR n be a convex polyhedron, and X ' int(R). The set
of facets of R is denoted by F . Then there exists always an optimal solution
x
R in the finite set of points
Cand
Proof: From Theorem 4 we know that for an optimal x we have x
for some H 2 H. Choose a facet F 2 F such that x 2
choose an index i such that also x 2 @C i holds. Now we have x 2
Therefore
means f is linear in F " Now we
can conclude from the theory of linear programming that there always exists an
optimal vertex v of the polyhedron F "
know that v 2 H " @R and additionally
The next theorem gives a characterization of the optimal solution for all convex
restricted sets. Note that in IR 2 this result is equivalent to Theorem 4.
Theorem 6 Let R ' IR n be convex , and X ' int(R). Then there exists always
an optimal solution x
R such that x
R is a zero-dimensional intersection
between the boundary @R and a sufficient number of construction lines H 2 H.
Proof: From Theorem 4 we know that there always exists an optimal solution
x
R such that x
only consists of one single point, we are done. If not, we consider the
following problem (ROL1) on the
Note that the optimal solutions of (ROL1) are optimal for (ROL). As the restriction
of f to the linear subspace H 1 remains piecewise linear and convex, R "
is a convex set and
are the new construction lines we can apply Theorem 4 again. We conclude that
there always exists an optimal solution x
R to (ROL1) (and therefore to (ROL))
such that x \Lambda1
according to the definition of H 1 . Then we know that
We repeat this argument until we have a number z of hyperplanes H
H such that the set
only consists of one single point, which then is an optimal solution to (ROL).
q.e.d.
The following corollary shows how Theorems 4 and 6 can be used to derive
an efficient algorithm for solving (ROL) in the plane. We use the fact that
since H is easier to compute.
Corollary 3 Let be a convex set such that X ' int(R).
Then there exists always an optimal solution x
R in the finite set of points
In the algorithm we first compute the set Cand and then look for the best candidate
Algorithm for solving (ROL) in the plane.
R
1. Compute
2. Compute
3. For all
4. Determine t )g.
5. Output: X
The complexity of the above algorithm is dominated by the complexity of Step
3 which is Int O(K 2 ) (where Int is the complexity of computing an intersection
point between a line and the boundary of the forbidden set R) and the complexity
of Step 4 being O(K 3 ). Overall we have a complexity of O(K 3
Example 2 We use the same objective function f as in Example 1. In addition
we are given a convex set R = [\Gamma10; 14] \Theta [2; 20]. By checking the set of candidates
Cand we get X
objective value 38(see
Figure
2). In Figure 3 the
reduced candidate set based on Theorem 4 is shown.
R
Figure
2: Illustration for Example 2. The bold points show the set of candidates H " @R.
When applying Theorems 4 and 5 for higher dimensions to derive efficient algorithms
a pure enumeration of the set of Candidates is not appropriate. Therefore
combined enumeration and search procedures are suggested. Instead of solv-
ing
R
Figure
3: Illustration for Example 2. The bold points show the set of candidates @C " @R.
for all facets F 2 F it is also possible to restrict the search procedure to linear
subspaces of lower dimensions and solve for all
and all facets F 2 F
Which of those alternative solution approaches is more appropriate is dependent
on the input data.
4 Extensions in the plane
In this section we consider more realistic forbidden sets. At first we examine
what happens, if the forbidden set is not connected, and then extend the results
to so-called bumpy sets.
The algorithm of the previous section can easily be modified to accommodate
the case where R is the union of pairwise disjoint, convex sets R 1
In this situation we first solve the unrestricted problem (OL). Then the following
result is an immediate consequence of Theorem 3.
Theorem 7 Let
and R i are convex sets for L. Then there exists an optimal solution x
R
such that either x
R 62 int(R) or there exists some l with X
R ' @R l .
Proof: If X ' int(R) Then the convexity of X and the assumptions on the sets
imply that there exists some l such that X ' R l . Hence we can
replace R by R l and use Theorem 3 to conclude that X
R ' @R l . q.e.d.
Our results can be extended to other cases of nonconvex restricting sets R. If
we review the proof of Theorem 4 it becomes apparent that we can apply a
combinatorial algorithm as in the case of convex sets whenever we have only a
finite set of points on @R which can lie in the (relative) interior of linear pieces
of a level curve. Therefore we introduce the concept of bumpy sets, which was
first mentioned in [HN95] in the area of location theory.
with its set of roots Roots(R) is any set
which can be constructed by a finite application of the following rules:
1. Any convex set R is a bumpy set. In this case
2. If R 0 is a bumpy set then R
is a one-dimensional, connected, proper curve segment
(i.e. there exists a bijective mapping OE : [0;
In this case R 0 is called the base of R and R 1 the bump. The two disjoint
endpoints of s are the new roots of R, i.e.
Note that dependent on the construction of the bumpy set, the same bumpy set
can have a different set of roots, i.e. Roots(R) is not uniquely defined. For the
following algorithm, however, any set of roots leads to an optimal solution. For
the running time, the smallest set of roots is preferable.
In
Figure
4 and Figure 5 some examples of bumpy sets are shown, and the
following lemmas describe some classes of bumpy sets. Some more applications
of bumpy sets will be shown at the end of this section.
Figure
4: An example for a bumpy set. The dots mark the set of roots.
Lemma 4 Let R be a strict convex set and R 0 a translate of R, such that int(R "
set.
Proof: Choose R as base and R 0 as bump.
ffl R is convex and therefore a bumpy set,
line segment as @R " @R 0
consists of only two points (see, e.g. [Kle97]). q.e.d.
is a bumpy set.
Proof: If R is convex it trivially is a bumpy set. If not we define the convex set
R 0 as the base of the bump. Let be the connected components of
As R is not convex, we know that R 0
consists of L connected, one-dimensional, proper curve segments. That means we
Figure
5: Another example for a bumpy set. The dots mark the set of roots.
can iteratively add all bumps BL to R 0 , as we know that conv(B l ) '
As mentioned, we now will extend the algorithm of the previous section to the
case, where R is a bumpy set. In the following we therefore prove that to find an
optimal solution to (ROL), it again is enough to evaluate a finite candidate set.
In order to do this one more result about the structure of bumpy sets is needed.
Lemma 6 Let R be a bumpy set and s be a line segment. If s ' R and int(s)
touches @R at a unique point x then x 2 Roots(R).
Proof: Induction over the number of bumps.
For a convex set R and a line segment s ' R we know that the interior of s
cannot touch @R from inside at a unique point.
Now take any bumpy set R with base R 0 and bump R 1 . Let s be a line segment
with its interior touching @R from inside at a unique point, i.e., s ' R and
fxg. Now we distinguish three cases:
ffl If x 62 @R 1 , we know that x 2 Roots(R 0 due to the induction
hypothesis.
by definition x 2 @R is one of the (new) roots of R.
and therefore we
again have a linear piece touching a convex set from inside at a unique
point, which is a contradiction.
q.e.d.
The following theorem shows that in order to solve (ROL) with R is a bumpy
set it suffices to examine the candidate set of the last section, i.e. the zero-dimensional
intersections between the boundary of R and the construction lines
additionally, the roots of the bumpy set R.
Theorem 8 Let R ' IR 2 be a bumpy set such that X ' int(R). Then there
always exists an optimal solution x
R in the finite set of points
Cand
Proof: With Theorem 2 we know that t
R is the optimal value of (ROL) if and
only if L- (t
We also know that L= (t
is the
set of optimal solutions. Now take any x
There exists an open set U 2 IR 2 such that we have a unique point
x
fx
As the level curve L= (t
R ) consists of linear pieces (see Lemma 3) we either
have
ffl that x
R is the endpoint of such a linear piece, in this case x
for some H 2 H (see Theorem 4) or
R is in the interior of such a linear piece, then, according to Lemma 6,
x
R is part of a linear piece s ' L= (t
we know that the endpoints x of s are also in @R and clearly f(x 1
R . At both endpoints, on the other hand, other construction lines
intersect (as the level curves are piecewise linear on the cells,
see Lemma 3), such that we have x
Algorithm for solving (ROL) in the plane with R is a bumpy set.
R
1. Compute
2. Compute
3a. For all
3b.
4. Determine t )g.
5. Output: X
Example 3 We use the same objective function f and forbidden region R as in
Example 2. In addition we are given a convex set R 2] as a bump.
By checking the extended set of candidates Cand we get the new candidates (1; 2) ,
loose the two former candidates ( 16; 2) and (2; 2). By
computing the objective function for the candidates we get X
with objective value 40(see
Figure
6).
Finally we give two examples for the application of bumpy sets. The first application
shows that we can solve the restricted problem (ROL) for any simple
polygon. These simple polygons can then be used for approximating more complex
sets R (see [BHR91], [Rot92] and [KN96] for more details).
Lemma 7 Any simple polygon is a bumpy set.
Proof: Induction over the number of vertices n of the polygon. For
a convex triangle which trivially is a bumpy set. Now take any polygon R with
more than 3 vertices. Consider a triangulation of R into (such a
triangulation always exists, see e.g. [Kle97], [O'R93]) and take any triangle R 1
of that triangulation such that R 1 has two edges on the boundary of R. Define
R 1 as bump and R 0 := R n R 1 as base. Then the triangulation of R 0 consists of
triangles, such that the number of vertices of R 0 is
is a bumpy set, R 1 is convex and
proper line segment, since it is the third edge of the triangle R 1 . q.e.d.
If R is a polygon then the set of roots in the above construction is contained in
the set of vertices of the polygon, i.e.
vertex of Rg;
R
R
Figure
Illustration for Example 3. The bold points show the set of candidates H " @R plus
the roots of the bump.
such that the set of candidates in Step 3b of the algorithm would be
Cand vertex of Rg:
This can be sharpened, as the following lemma shows.
Lemma 8 Let R be a polygon and let X ' int(R). Then there exists always an
optimal solution x
R in the finite set of points
Cand
Proof: This lemma can be shown by a special bumpy set construction using only
reflexive vertices as roots. Another possibility is to prove the result along the
lines of Theorem 8. q.e.d.
Another application is the following. Suppose we want to have m solutions
\Lambdam to the problem (OL), but have the restriction that these solutions
are not too similar,i.e.
for a given number r 2 IR and a convex distance measure d. This concept has
been used by [BW96] in the context of location theory. Then we can proceed as
follows: First we find the best solution x \Lambda1 to our problem. Then we forbid all
solutions which are too similar to x \Lambda1 , i.e. R rg. Solving that
problem we find a solution x Iterating that procedure, to find x \Lambdak we
solve problem (ROL) with
Then minimal solution to the above problem.
This problem can be solved with our algorithm, if all the sets R k
are bumpy sets. If m - 3,x Lemma 4 shows that this can be done for any strict
convex distance function d in IR 2 . If we also want to have distance functions with
linear pieces, e.g. l 1 or l 1 distances or any kind of gauges we can use Lemma 5
can be shown, that the sets R k are bumpy sets, if they
do not have any wholes. Even if they have wholes, Lemma 6 remains true, such
that the algorithm can be adopted to solve the problem.
Conclusions
In this paper we have shown how global optimization problems can be solved using
geometrical methods and combinatorial arguments. These discretization approach
proved to be very successful if the original assumptions are weakened, like
in the case of bumpy sets. Moreover, this approach yields numerically stable and
efficient procedures and allows us to easily compute the whole set of optimal solu-
tions. Of course, this approach is also useful for general convex objective functions
using approximation methods, like the ones described in [BHR91]. Therefore our
future work will include the adaption of such approximation methods to (ROL).
Also computational tests and bounding techniques are under consideration.
--R
Sandwich approximation of univariate convex functions with an application to separable convex programming.
The rectilinear distance minisum problem with minimum distance constraints.
Algorithms in Combinatorial Geometry.
A simplex algorithm for piecewise-linear programming I: derivation and proof
A simplex algorithm for piecewise-linear programming II: finiteness
A simplex algorithm for piecewise-linear programming III: computational analysis and applications
Combinatorial algorithms for some 1-facility median problems in the plane
Restricted planar location problems and applications.
Global Optimization.
Algorithmische Geometrie.
bounds for the approximative solution of restricted planar location problems.
Facilities Location: Models
Discretization of Planar Location Problems.
The convergence rate of the sandwich algorithm for approximating convex functions.
Introduction to piecewise-linear topology
--TR | discretization;piecewise linear programs;reverse convex constraints;geometric approach |
596347 | Solving the Sum-of-Ratios Problem by an Interior-Point Method. | We consider the problem of minimizing the sum of a convex function and of p1 fractions subject to convex constraints. The numerators of the fractions are positive convex functions, and the denominators are positive concave functions. Thus, each fraction is quasi-convex. We give a brief discussion of the problem and prove that in spite of its special structure, the problem is \cN\cP-complete even when only p=1 fraction is involved. We then show how the problem can be reduced to the minimization of a function of p variables where the function values are given by the solution of certain convex subproblems. Based on this reduction, we propose an algorithm for computing the global minimum of the problem by means of an interior-point method for convex programs. | Introduction
Nonlinear programming problems often involve objective functions that
can be expressed in terms of one or several ratios. Exploiting the special
structure of such fractional programs has been the subject of extensive
studies in the last few decades. For an overview of fractional program-
ming, we refer the reader to (Schaible, 1995) and the references given
therein.
Fractional programs with only a single ratio or a maximum of finitely
many ratios are fairly well understood. Under suitable conditions, these
problems still satisfy some form of generalized convexity, which can be
exploited in algorithms for the numerical solution of such problems. For
example, there are polynomial-time interior-point methods for classes of
such problems; see (Freund and Jarre, 1994, 1995; Nemirovskii, 1996).
y Numerical Analysis Manuscript No. 99-3-13, Bell Laboratories, Murray Hill,
New Jersey, June 1999.
Available on WWW at http://cm.bell-labs.com/cs/doc/99.
Roland W. Freund and Florian Jarre
On the other hand, fractional programs with sums of ratios are much
more difficult and not as well understood; see (Schaible, 1995, 1996).
Such problems possess some form of generalized convexity only in special
cases, such as the ones discussed in (Schaible, 1984; Hirche, 1985),
and in general, they have multiple maxima and minima. Algorithms
for classes of sum-of-ratios problems are described in (Cambini et al.,
1989; Chen et al., 1998; Falk and Palocsay, 1992; Konno and Kuno,
1990; Konno and Yamashita, 1998; Ritter, 1967) and in the review
article (Schaible, 1996). However, most of these algorithms are for the
optimization of linear ratios subject to linear constraints. The purpose
of this paper is to present a suitable interior-point approach for the
solution of much more general problems with convex-concave ratios
and convex constraints. Our approach is based on approximating the
sum-of-ratios problem by a sequence of convex minimization problems.
For such convex problems, interior-point methods have become the
methods of choice, both from the point of view of theoretical complexity
and of practical efficiency. By using a simple warm-start strategy, the
cost for solving the individual convex subproblems can be reduced to
very few iterations. Finally, the interior-point method provides certain
dual information needed for the overall approach.
More precisely, we consider the problem of minimizing or maximizing
the sum of a single function and of p - 1 ratios subject to convex
constraints, and we explore the use of interior-point methods for the
solution of such problems. More precisely, we study problems of the
subject to x 2
and
subject to x 2 S: (2)
Here and in the sequel, we make the following assumptions.
ASSUMPTION 1. S ae IR n is a compact convex set such that f j (x) - 0
and S. For the minimization
problem (1), the functions h and f 1 are convex and
the functions are concave. For the maximization problem
(2), the functions h and f 1 are concave and the functions
are convex.
For simplicity, from now on we restrict ourselves to minimization
problems (1). The results and algorithms for (1) in this paper can easily
Solving the Sum-of-Ratios Problem 3
be converted to maximization problems (2) by simply exchanging "min"
and "max", "convex" and "concave", and "-" and "-".
In Section 2, we first discuss the simplest case, namely the sum of
a convex function and only We show that this problem is
NP-complete and propose a method for finding the global minimizer.
In Section 3, the method is generalized to the case p - 2. In Section 4,
we report results of numerical experiments. In Section 5, we make some
concluding remarks.
2. Sum of one fraction and a convex function
Throughout this section, we assume that 1. In this case, problem
(1) reduces to the form
subject to x 2 S: (3)
Here, f; are functions that satisfy the conditions specified
in Assumption 1, i.e., f and h are convex, g is concave, and f(x) - 0
S. For any fixed r ? 0, let
ae
r
oe
and
r
g, the feasible set in (4) is empty, and in
this case, we set q(r) := 1. Note that x(r) is not necessarily unique,
but, of course, q(r) is. From the definition of q, it is obvious that x(r )
solves (3) if, and only if, r minimizes q. Thus, problem (3) is reduced
to the one-dimensional problem of minimizing the function q.
Determining x(r) for a given value r ? 0 is a convex optimization
problem, which can be solved by several methods.
If a separation oracle for S (ae IR n ) is given, the evaluation of q
for a given value of r can be done (up to a given precision) by the
ellipsoid method. Here, by "separation oracle", we mean a subprogram
that accepts as input any vector x 2 IR n and produces as output either
the information "x 2 S", or a vector h 2 IR n , h 6= 0, with h T y - h T x
for all y 2 S. In the second case, the vector h defines a hyperplane that
"separates" x from S.
If self-concordant barrier functions for the sets
ae
r
- and g(x) - r
oe
4 Roland W. Freund and Florian Jarre
for real numbers - are known, then q(r) can also be evaluated by an
interior-point method. Here, a barrier function for a convex set C is
a function that is convex and finite in the interior of C, and goes
to infinity as x approaches the boundary of C. The notion of self-
concordance was first introduced in (Nesterov and Nemirovskii, 1994).
Roughly speaking, self-concordance is defined as a local Lipschitz condition
of the Hessian of the barrier function. As shown in (Nesterov and
Nemirovskii, 1994), many convex sets possess easily computable self-
concordant barrier functions, and the concept of interior-point methods
based on self-concordance is a very general approach.
We remark that for the special case of a constant function h and
problem (1) can be reduced to a problem of the form (3),
i.e., with only one ratio, by means of the Charnes-Cooper transformation
(Charnes and Cooper, 1962); see, e.g., (Cambini et al., 1989). A
self-concordant barrier function for the conic hull introduced by this
transformation is discussed in (Freund et al., 1996). In general, when
is constant, the Charnes-Cooper transformation can be
used to reduce problem (1) to a sum-of-ratios problem with
This simple reduction may be crucial for algorithms whose computational
costs grow rapidly with the number of ratios. For example, given
a sum-of-ratios problem with will be more efficient
to first employ the Charnes-Cooper transformation and then apply the
algorithm of the present paper to the reformulation with
than using the same algorithm for the solution of the original problem
with 2.
2.1. Properties of the function q
Next, we recall some well-known properties of the function q given
by (4) and (5).
oet, and by the convexity of f , we have
s
ae f(x(r))
r
oe
Similarly, the convexity of h implies that
By the concavity of g, it also follows that g(x) - s. Hence, x is feasible
for (4), and
s
Solving the Sum-of-Ratios Problem 5
In spite of (6), (7), and (8), the function q is not quasi-convex, i.e., in
general it may happen that
Note that if q were quasi-convex, problem (3) could be solved in polynomial
time by using a golden-mean search for q.
In view of the above derivation, we may still ask ourselves whether
the function q may "smooth out" some of the local minimizers of (3),
and whether minimizing q might be easier than solving problem (3)
directly (assuming that we can evaluate q and its derivatives). The
observation that the function q is not necessarily simpler than (3) is
illustrated in Figure 1 below, which depicts the function q for a special
case where S is just a real interval. This plot shows that q may exhibit
a very "irregular" behavior.
2.2. NP-completeness
Next, we prove that problem (3) is "essentially" NP-complete. To
this end, we show that a well-known NP-complete problem, namely
the following knapsack problem, can be recast as a special instance of
problem (3).
Knapsack problem:
Let an integer d ? 1, weights
and costs c g. The problem
is to find a subset I 0 ae I such that
maximized subject
to the constraint
For a discussion of the knapsack problem and a proof of its NP-
completeness, we refer the reader to (Garey and Johnson, 1979).
Our result on the NP-completeness of problem (3) can now be
stated as follows.
THEOREM 2. Problem (3) is NP-complete in the following sense. Let
the data of a knapsack problem with d 2 IN weights be given. There exists
a convex, piecewise linear function f , a linear function g, and a linear
function h defined on the interval such that f , g, h, and
their respective derivatives can be evaluated in polynomial time, f , g,
and h take values of polynomial size, and solving problem (3) is equivalent
to solving the given knapsack problem.
REMARK 3. The right endpoint 2 d of the interval S in Theorem 2 is
not polynomial. At first sight, this might lead to the impression that the
reduction of a knapsack problem to problem (3) is exponential. This,
6 Roland W. Freund and Florian Jarre
of course, is not the case. Indeed, just as in the case of linear pro-
grams, which may also involve non-polynomial upper or lower bounds,
one only needs polynomiality in the coding length of the problem. The
coding length of problem (3) is at least d, and hence the coding length
of the endpoint 2 d is in fact polynomial in the coding length of the
problem. Finally, note that if the function f=g were convex, then an
ffl-approximation to problem (3) could be computed in polynomial time.
The NP-completeness in Theorem 2 does not result from the size of
the endpoint 2 d of S, but from the lack of convexity.
Proof of Theorem 2. Let d 2 IN , weights w
be the given data of a knapsack
problem. From this data, we now construct a special problem of the
form (3) that is "equivalent" to the knapsack problem.
To this end, we first enumerate the 2 d subsets of I
by simply counting from 1 to 2 d in the binary system. Then, for each
subset I 0 of I, there exists an index 1 - k - 2 d such that I
is the k-th subset of the enumeration. We can determine I k just by
knowing its index k, and without looking at any other subset. We can
also determine the weight
w i of the k-th subset just by knowing
the index k. For
where c :=
. Solving the knapsack problem is then equivalent
to finding
min
1-k-2 d
For later use, we note that
Next, we set S := [1; 2 d ] and define functions f;
The functions g and h are the linear functions given by
The function f is defined as the piecewise linear interpolant through the
points . Hence, on each interval k - x
Solving the Sum-of-Ratios Problem 7
Using (10), one readily verifies that the function f is convex on S.
Clearly, given any x 2 S, it is possible to evaluate f(x) in O(d)
arithmetic operations, and the number of digits needed to represent
the function values are at most 2d plus the number of digits
needed to evaluate
Finally, we show that for the set S and the functions f , g, and h
just defined, the minimizer of (3) is the index k of a k-th subset I k ae I
that solves the knapsack problem. Let 1 and consider the
objective function of (3) for By (10)-(12), the second
derivative of the objective function satisfies
for all x 2 This shows that the objective function of (3) is
concave on [k; k + 1], and thus its minimum over [k; k + 1] is attained
at 1. By (11) and (12), the corresponding function
values are
2 d for
2 d for
Therefore, problem (3) is equivalent to (9), which in turn is equivalent
to solving the knapsack problem.
For the special instance of problem (3) constructed in the proof
of Theorem 2, the evaluation of the associated function (5), q(r), is
particularly simple. Indeed, let x - r and x 2
d
dx
r
r
r
r
r
0:
This shows that the objective function in (4) is monotonically increasing
Therefore, the minimum in (4) is
attained for and the function q(r) in (5) is identical to the
objective function of (3). In Figure 1, we plot the function q for the
case of the knapsack problem with
Figure
1 displays an example where minimizing q is identical to
solving problem (3). In general, however, we may anticipate that the
8 Roland W. Freund and Florian Jarre
Value of r
Value
of
Figure
1. The objective function with random w i 's and c i 's.
structure of the higher-dimensional problem (3) is far more complicated
than the scalar function q. We propose an approach for solving problem
(3) by evaluating q for various values of r and exploiting Lipschitz
properties of q.
We emphasize that in the case where the function q has very many
local minimizers of approximately the same magnitude (as in the class
of problems constructed in the proof of Theorem 2), any approach for
solving problem (1) will necessarily be very slow (unless
2.3. A global minimization method
If f; g, and h are smooth, due to the structure of S, the function q is
generally a piecewise smooth function. To compute a global minimizer
r of q, we construct a lower-bound function q(r) - q(r) and then
minimize q.
The function q depends on a partition,
where we assume that r (1) - r and r (k) - r . Note that
Solving the Sum-of-Ratios Problem 9
so that a value for r (1) can be obtained from a given lower bound of g
on S, and a value for r (k) by solving the concave maximization problem
in (13).
Let some i and be given. Define a lower-bound
number
ae
r (i+1)
oe
so that q i - q(r) for r 2 [r (i) ; r (i+1) ]. Note that evaluating the right-hand
side of (14) amounts to solving a convex optimization problem.
Let x i be a solution of the minimization problem in (14). It follows that
Using these two inequalities, for all r 2 [r (i) ; r (i+1) ], we get
r
r
r (i+1)
r
r (i)
r
r
r (i)
r (i)
r
r (i)
where
r (i)
Note that the inequality (15) follows from r (i) =r - 1 and q i \Gammaq(r (i)
The bound (16) proves left-sided Lipschitz continuity of q. Indeed,
near the above bound is close to the value q(r (i) ). However,
for , the bound reduces to q i , which is lower than the value
q(r (i+1) ).
Roland W. Freund and Florian Jarre
Note that a bound of the form (15) with q(r (i+1) ) in place of q(r (i) )
is not possible. It may occur that q(r (i+1) ) AE q(r (i) ). Intuitively, this
will happen when no longer contains points
for which f or h are reasonably small but does.
In this case, the Lipschitz constant for q from the right may be much
larger than the one from the left. To determine a suitable Lipschitz
property from the right, we define the function
~
ae
r (i+1)
oe
Observe that ~
q i is convex (in r). Moreover, ~ q i satisfies ~
for r - r (i+1) , and ~
We remark that when evaluating
q(r (i+1) ), the problem (17) with is solved, and the
Lagrange multiplier-denoted by - g in the sequel-corresponding to
the constraint g(x) - r (i+1) can also be computed. Indeed, interior-point
methods can be implemented so that such a multiplier is obtained
at no extra cost. The Lagrange multiplier leads to the bound
for r - r (i+1) ; see, e.g., Theorem VII.3.3.2 in (Hiriart-Urruty and
Lemarechal, 1993). The lower-bound function q(r) is then defined for
as the maximum of the bounds (16) and (18),
A simple method for solving problem (3) then proceeds as follows.
Given k points
a new point -
r from the interval (r (i) ; r (i+1) ) that contains a minimizer
of minf is chosen. Then, -
r is inserted into the
list (19) (thus k is increased by one), and the process is repeated.
Note that the update of q(r) only involves the interval between r (i)
and r (i+1) neighboring -
r. This interval is split into two subintervals
r] and [-r; r (i+1) ], and the minimum of q(r) is evaluated over both
intervals. In particular, the effort for minimizing q merely consists of
bookkeeping. Figure 2 gives an example of the bounds leading to q(r).
Note that the slopes of q(r) and q(r) may be of opposite sign, so
that in the interior of [r (i) ; r (i+1) ] the function q(r) may not be a good
approximation to q(r). Hence, -
may
be a poor choice. A more reliable choice used in our numerical examples
below is - r := 1
Solving the Sum-of-Ratios Problem 11
slope q 0
arg min q(r)
ffl .
Figure
2. The functions q and q.
To keep the evaluation of q at moderate costs, it suffices to compute
only approximations to q(-r) and ~
along with some error esti-
mates. Interior-point methods are particularly suitable for computing
an approximate solution -
x(r) of the convex problem (4), along with a
certified error bound of the form jq(r) ffl. The
computation of - x(r) takes at most O(log(1=ffl)) iterations provided that
a self-concordant barrier function for S and for the level sets of the
functions f , g, and h is known. This observation is the key point for
our proposed algorithm. Next, we present a statement of the algorithm.
ALGORITHM 4. (Conceptual overall algorithm for
INPUT. Functions f , g, h and a compact convex set S defining the
single-ratio problem (3).
A stopping tolerance ffl ? 0.
Step 0. Determine r (1) and r (2) with
Roland W. Freund and Florian Jarre
If no such value r (1) exists: STOP, the problem violates Assumption
1.
Otherwise, compute q(r (1) ), q(r (2) ), and the Lagrange multipliers
for g.
(number of "support points" r (\Delta) ).
Step 1. Set -
Step 2. Compute q(-r) along with the Lagrange multiplier - g for g.
Step 3. Based on (18), evaluate
arg min
r2[r (i) ;-r]
q(r) and arg min
Step 4. Increase k by one, and insert -
r into the list of r (\Delta) 's.
Step 5. Find
Step 6. If q(~r) - min 1-k q(r (')
~
r is an approximate minimizer.
Otherwise, return to Step 1.
We remark that, in Step 3 of Algorithm 4, the bound q(r) may either
be obtained by setting q i
\Gamma1, or by solving an additional problem
of the form (14). The latter case is more expensive and results in a
better bound for q(r) since both (16) and (18) are used. In most cases
in (18) is "overly large"), it is more efficient to rely on (18)
only, and not to solve (14).
Note that the minimizers of the lower-bound function q(r) computed
in Step 3 of Algorithm 4 can be stored in a heap, so that Step 5 merely
consists of selecting the first element from this heap.
Finally, we remark that, in practice, the feasible set S will usually
be of the form
ae
oe
are given convex functions.
Solving the Sum-of-Ratios Problem 13
3. Minimizing the sum of several fractions
In this section, we return to the general problem (1) of minimizing
the sum of a convex function and p ratios. The basic idea for solving
problem (1) is similar to the special case treated in Section 2.
Assumption 1 be satisfied. In this case,
is a vector of p parameters. In analogy
to the definitions (4) and (5) of x(r) and q(r) in the case
where S(r) :=
ae
oe
and
Initially, we assume that vectors r (1) and r (2) are computed such that
there is a minimizer r of q satisfying r (1) - r - r (2) . (As usual, the
-sign is understood component wise.) Each component of r (1) and r (2)
can be computed separately as in the case
Now let r, r (i) , r (i+1) , and some direction \Deltar 2 IR p be given such
that the relations
are satisfied. The bounds (16) and (18) can be generalized to provide
bounds for q(r \Deltar). We split \Deltar
be the Lagrange multipliers for the
constraints (20). By Theorem VII.3.3.2 in (Hiriart-Urruty
and Lemarechal, 1993), a lower bound for q is given by
To obtain a lower bound for q in direction \Deltar + , we define the value
r (i+1)
r (i)
It then follows that
14 Roland W. Freund and Florian Jarre
r (i)
r (i+1)
r (i+1)
r (i)
r (i+1)
r (i+1)
r (i+1)
r (i)
r (i)
r (i+1)
where
r (i+1)
r (i+1)
r (i+1)
r (i)
r (i+1)
Combining the above relations, we get
r (i+1)
This bound is analogous to the one for
In (22), we may replace r (i) by r
and r by (r to obtain the new bound
with
r (i+1)
\Deltar
r (i+1)
r (i+1)
\Deltar
r (i+1)
Solving the Sum-of-Ratios Problem 15
Based on this bound, we can define an anisotropic trust region about
each point r, as long as some lower and some upper limits (like r (i)
and r (i+1) in the previous derivation) are given. The union of the trust
regions about all support points r (i) forms a Voronoi diagram in IR p ,
the vertices of which contain the candidates for the minimizer of the
lower-bound function q(r). For a definition of Voronoi diagrams, their
properties, and algorithms for their numerical computation, we refer
the reader to (Aurenhammer, 1991; Fortune, 1997). As in the case
these candidates for the minimizer of q(r) may not result in the
best choice for inserting a new value -
r somewhere between the known
points r (i) . In addition, the computation of the vertices of the Voronoi
diagram is complicated and expensive. We propose a simpler scheme
based on bounds analogous to (18) where the lower-bound function q(r)
is defined in the box
ae
oe
with given vectors r (i)
j . For r 2 B (i) , we obtain from (21) that
Next, we summarize the resulting overall algorithm.
ALGORITHM 5. (Conceptual overall algorithm for p - 2.)
INPUT. h, and a compact convex
set S defining the multi-ratio problem (1).
A stopping tolerance ffl ? 0.
Step 0. For all
If r (1)
j does not exist for some 1 - j - p: STOP, the problem
violates Assumption 1.
Otherwise, compute q(r (1) ), q(r (2) ), and the Lagrange multipliers
j for the g j 's.
(number of "support points" r (\Delta) ).
containing
arg min q(r)).
Roland W. Freund and Florian Jarre
Step 1. Set
(the index where a split
pays most) and define - r by
r (i)
Step 2. Compute q(-r) along with the Lagrange multiplier - j for each
function g j .
Step 3. Based on (21), evaluate
arg min
l
q(r) and arg min
l
Step 4. Increase k by one, insert - r into the list of r (\Delta) 's splitting B (i)
along the hyperplane r
r l into two boxes (one for - r and
one for r (i) ).
Step 5. Find i - k such that ~ r := arg min r q(r) 2 B (i) .
Step 6. If q(~r) - min 1-k q(r (')
~
r is an approximate minimizer.
Otherwise, return to Step 1.
4. Numerical experiments
Algorithm 4 for minimizing the sum of a convex function and of
convex-concave fraction has been implemented in Matlab. For the solution
of the convex subproblems, we use the interior-point method
described in (Jarre and Saunders, 1995). As we have seen in Figure 1,
the resulting problem (3) may be very complicated, and may have very
many local minimizers. Nevertheless, we anticipate that the parameterization
with respect to r will smooth out many of the local minimizers
of (3) and thus result in a function q that is easier to minimize than
the objective function of the original problem (3).
In this section, we report numerical results of Algorithm 4 applied
to certain examples with random data. In this case, the expectation
that the function q is easier to minimize than the original problem (3)
was fully met. In fact, the function q appeared to be unimodal with
respect to r for these examples.
Solving the Sum-of-Ratios Problem 17
Our test examples are minimization problems of the form (3), where
ae
oe
Here, the matrices H;F;G and are constructed to be
positive semidefinite. Therefore, in (23), the functions h and f are
convex, the function g is concave, and the feasible set S is convex.
The data for (23) is chosen randomly as follows. For each matrix D i , we
first generated a random lower bidiagonal matrix L i the nonzero entries
of which are uniformly distributed in [\Gamma1; 1], and then we computed
i . This guarantees that each D i is a positive semidefinite
tridiagonal matrix. Similarly, H, F , and G are constructed as random
positive semidefinite tridiagonal matrices. In (23), h, f , g, and
are vectors that were also generated randomly. Further-
more, the scalars -, ', fl, and were chosen such that the
interior of the feasible domain S is guaranteed to be nonempty, and
such that the functions f and g are guaranteed not to have a zero
in S. Finally, we have run experiments for problems (23) with values
of n ranging from and values of m ranging from
Note that the constraints in (23) are nonlinear, and
therefore, adaptations of the simplex method for solving problem (3)
with data (23) would be rather complicated.
In
Figure
3, we plot the function q for a typical example (23) with
marks a point r at which the method
has evaluated the function q in order to be able to guarantee that the
final iterate is indeed an approximate global minimizer. Thus, each
stands for the application of an interior-point method to solve a
convex problem of the form (4). Since for each " " the interior-point
method can be "warm-started" using as starting points some convex
combination of almost final iterates of two neighboring problems, the
overall number of interior-point iterations for each " " was less than
eight in the average. The curve q(r) is of course not known, in general.
(Here, it is plotted merely for illustration; its values were determined
by solving a convex problem of the form (4) for some 200 evenly spaced
values of r.)
In
Figure
4, we show a detailed enlargement of the points generated
by Algorithm 4 near the global minimizer of a problem with
20. The plot shows that the distance between support points r
on the right of the minimizer is much smaller than to the left, indicating
that in this particular case, the Lipschitz bound (16) provides a much
Roland W. Freund and Florian Jarre
-5
Value of r
Value
of
Exact function
Points generated by algorithm
Figure
3. The function q(r) for a random example,
more accurate approximation to q(r) than (18). Thus, the algorithm
did not evaluate a further refinement for the points on the left of the
minimizer.
In
Table
I, we report the number of iterations taken by our Matlab
implementation to solve problem (23) with
constraints and different dimensions n. The stopping criterion for these
examples was chosen such that
q(r final
is guaranteed. Here, q(r opt ) is the unknown global optimum of (23). The
numerical results are intended to provide a first rough estimate on the
dependence of our algorithm on the dimension n of the space. We stress
that the numbers of Newton steps and Hessian evaluations in Table I
could be further reduced by a more sophisticated implementation. The
number of Newton steps given in Table I refers to the sum of exact and
inexact Newton steps. For inexact Newton steps, the Hessian matrix of
a previous Newton step has been used in place of the current Hessian
matrix. The overall computational effort is dominated by the number of
Hessian evaluations. The number of r's refers to the number of support
points r at which q(r) was evaluated.
Solving the Sum-of-Ratios Problem 19
Value of r
Value
of
Exact function
Points generated by algorithm
Figure
4. The function q(r) near the global minimum for a random example,
Table
I. Iteration numbers.
# of r's 20 17 14 14
# of IP iterations 407 384 299 326
# of Hessians 644 584 478 548
# of Newton steps 1277 1134 980 1135
The random examples presented above exhibited only one local
minimizer of the function q, as in Figure 3. We therefore constructed
some small problems in three dimensions in such a way that there were
several local minimizers at integer values of r. If two or more of the
local minimizers have nearly the same value q(r), the method refines
about both minimizers until the global minimizer has been identified.
The plot in Figure 5 shows such a "worst-case" behavior where the
method takes a large number of steps before identifying a point near
as an ffl-global minimizer. If the stopping tolerance ffl is decreased
further, then only the bounds near are refined to increase the
accuracy of the global minimizer.
Roland W. Freund and Florian Jarre
50.20.40.60.8Value of r
Value
of
Exact function
Points generated by algorithm
Figure
5. The function q(r) for a case with several local minimia.
It is needless to say that Algorithm 4 does not lend itself to solving
the knapsack problem of Section 2.2. The structure of the knapsack
problem is not exploited by Algorithm 4, and the Lipschitz bounds (16)
and (18) are too weak to provide a sufficiently sharp lower estimate
for the function q for an interval of length more than one. Hence Algorithm
4 is at least as expensive as enumerating all possible integer
solutions. While the knapsack problem represents an example for which
Algorithm 4 is not suitable, we believe that most applications have a
structure more similar to the random problems above for which Algorithm
4 provides a reliable and reasonably fast method for identifying
the global minimum.
5. Conclusions
We considered the sum-of-ratios problem in IR n where the sum of a
convex function and p convex-concave fractions is minimized subject
to convex constraints. We proposed an approach to transform this
problem to the problem of minimizing a suitably defined function q of
variables. The function q can be evaluated by using an interior-point
method for convex minimization. We established Lipschitz bounds for
Solving the Sum-of-Ratios Problem 21
q that can also be evaluated numerically by using an interior-point
method. Based on these bounds, a method was derived to find an
ffl-approximation to the global minimizer of the sum-of-ratios problem.
We presented numerical experiments with the proposed algorithm
for the case of minimizing the sum of a convex function and of
convex-concave fraction. An implementation of the algorithm for the
case will be described elsewhere.
Acknowledgements
We would like to thank Siegfried Schaible for bringing the sum-of-
ratio problem to our attention and for providing us with a copy of
the technical report (Schaible, 1996). The authors are grateful to the
referees and the editor for their constructive comments that helped us
to improve the presentation of the paper.
--R
Voronoi diagrams-a survey of a fundamental geometric data structure
On maximizing a sum of ratios
Information and Optimization Sciences 10:
Programming with linear fractional function- als
Efficient algorithms and implementations for optimizing the sum of linear fractional func- tions
Optimizing the sum of linear fractional func- tions
Voronoi diagrams and Delaunay triangulations
An interior-point method for fractional programs with convex constraints
An interior-point method for multifractional programs with convex constraints
On self-concordant barrier functions for conic hulls and fractional programming
Computers and Intractability: A Guide to the Theory of NP-Completeness
Convex Analysis and Minimization Algorithms I
A practical interior-point method for convex programming
Generalized linear multiplicative and fractional programming
Minimization of the sum and the product of several linear fractional functions over a polytope
On polynomiality of the method of analytic centers for fractional problems
A parametric method for solving certain nonconcave maximization problems
Simultaneous optimization of absolute and relative terms
Fractional programming
Fractional programming with sums of ratios
--TR
--CTR
Takahito Kuno, A Revision of the Trapezoidal Branch-and-Bound Algorithm for Linear Sum-of-Ratios Problems, Journal of Global Optimization, v.33 n.2, p.215-234, October 2005
Yang Dai , Jianming Shi , Shouyang Wang, Conical Partition Algorithm for Maximizing the Sum of dc Ratios, Journal of Global Optimization, v.31 n.2, p.253-270, February 2005
Harold P. Benson, Using concave envelopes to globally solve the nonlinear sum of ratios problem, Journal of Global Optimization, v.22 n.1-4, p.343-364, January 2002
H. P. Benson, Global optimization algorithm for the nonlinearsum of ratios problem, Journal of Optimization Theory and Applications, v.112 n.1, p.1-29, January 2002 | convex subproblem;interior-point method;sum of ratios;knapsack problem;cNcP-completeness;fractional programming;global optimum |
596351 | On Copositive Programming and Standard Quadratic Optimization Problems. | A standard quadratic problem consists of finding global maximizers of a quadratic form over the standard simplex. In this paper, the usual semidefinite programming relaxation is strengthened by replacing the cone of positive semidefinite matrices by the cone of completely positive matrices (the positive semidefinite matrices which allow a factorization FFT where F is some non-negative matrix). The dual of this cone is the cone of copositive matrices (i.e., those matrices which yield a non-negative quadratic form on the positive orthant). This conic formulation allows us to employ primal-dual affine-scaling directions. Furthermore, these approaches are combined with an evolutionary dynamics algorithm which generates primal-feasible paths along which the objective is monotonically improved until a local solution is reached. In particular, the primal-dual affine scaling directions are used to escape from local maxima encountered during the evolutionary dynamics phase. | Introduction
A standard quadratic problem (standard QP) consists of nding global maximizers of a
quadratic form over the standard simplex, i.e. we consider global optimization problems
of the form
subject to x 2 ; (1)
Paper presented at the GO99 conference, Firenze, Sept. 28{Oct. 2, 1999. I.M.B. and M.D. thank
M. Locatelli and F. Schoen for their hospitality and perfect organization. Large part of the work was
done while T.T. was working at TU Delft.
c
1999 Kluwer Academic Publishers. Printed in the Netherlands.
I.M. Bomze, M. Dur, E. de Klerk, C. Roos, A. Quist, T.
where A is an arbitrary symmetric n n matrix; a > denotes transposition; and is
the standard simplex in the n-dimensional Euclidean space IR n ,
denotes the non-negative orthant in IR n (of course, the
region fy 2 IR n
can always be represented by IR n+1 , introducing a slack
variable). To avoid trivial cases, we assume throughout the paper that the objective is
not constant over , which means that fA; Eg are linearly independent where
is the n n matrix consisting entirely of unit entries, so that x >
. For a review on standard QPs and its applications, which also oers a justication
for terminology see [9].
Note that the maximizers of (1) remain the same if A is replaced with A
where
is an arbitrary constant. So without loss of generality assume henceforth that
all entries of A are non-negative. Furthermore, the question of nding maximizers of a
general quadratic function x > Qx can be homogenized in a similar way
by considering the rank-two update ce > in (1) which has the same
objective values on .
Of course, quadratic optimization problems like (1) are NP-hard [23]. Nevertheless,
there are several exact procedures which try to exploit favourable data structures in a
systematic way, and to avoid the worst-case behaviour whenever possible. One example
for this type of algorithms is specied in this paper: the proposed procedure exploits
extensively the special structure of a standard QP (e.g., that the feasible set is the
standard simplex), as opposed to the general formulation of a quadratic problem.
This article is organized as follows: Section 2 contains a concise exposition of primal
and dual problems in copositive programming which involves copositive rather than
positive-semidenite matrices, using an explicit characterization of the dual cone of
the convex, non-polyhedral cone of all copositive matrices. We also shortly treat the
(relaxation of copositive programming to) all-quadratic problems on the simplex as
considered in [41]. In Section 3, this will be then specialized to be applied to standard
QPs, which enjoy the property that the copositive programming relaxation becomes
an exact reformulation of (1). Here the dual is in fact a univariate copositive-feasibility
problem which can be seen as a straightforward generalization of an eigenvalue bound
problem. Section 4 contains a short review on the replicator dynamics, which by now
has become an increasingly popular local optimization procedure for standard QPs.
This technique is combined with primal-dual search directions from general conic programming
[28, 45], which are used to escape from ine-cient local solutions returned by
the replicator dynamics iteration.
On copositive programming and standard quadratic optimization problems 3
2. Copositive programming problems: general setup
Consider the following primal-dual pair of linear programming problems over a pointed
convex cone K IR d , see, e.g. [37, 17, 28, 45]:
subject to
where D is an m d matrix with full row rank and b 2 IR m while c 2 IR d , and
subject to D > y
where K Kg is the dual cone of K. In semidefinite
programming, coincides with the cone P of all symmetric
positive-semidenite n n matrices, which is self-dual under the usual inner
product trace (SX) on the d-dimensional Euclidean space S n constructed by
identifying the upper triangular half of a symmetric n n matrix with its vectorized
version.
However, we need not restrict ourselves to cases of self-dual cones K if we can handle
the dual cone K , even if the geometry of K and K becomes more complicated. In fact,
it turns out useful to study more general cases, e.g. putting K equal to the cone of
copositive matrices.
Recall that a symmetric n n matrix M is said to be copositive (more precisely,
i.e., if the quadratic form generated by M takes only non-negative values on the positive
orthant
. The matrix M is said to be strictly (IR n
-)copositive, if the inequality in (4)
is strict whenever v 6= o. Clearly, this cone K has non-empty interior and so does its
(pre-)dual cone K (see Proposition 1 below) which can be described as follows, see,
e.g. [19, 43]:
the convex hull of all symmetric rank-one matrices, i.e. dyadic products generated by
non-negative vectors. Elements of K are called completely positive matrices. Note that
dropping non-negativity requirement, we again arrive at the semidenite case. Even
without constraints, checking whether or not a matrix belongs to K is co-NP-hard [36].
Some algorithms for this problem can be found, e.g. in [33, 18, 46, 5, 47, 48, 14, 6],
to mention just a few. Less obvious is the primal feasibility problem (also without
constraints). In fact, the authors are not aware of any nite and exact procedure to
determine whether or not a given symmetric nn matrix is completely positive if
See also [32, 29, 20, 4, 3, 25, 15, 49]. However, the following result may be helpful:
4 I.M. Bomze, M. Dur, E. de Klerk, C. Roos, A. Quist, T.
PROPOSITION 1. Let K be as in (5), d = n+1 , and denote by
X has no negative
Then
is a non-negative n (d
Proof. In view of Caratheodory's theorem, the rst identity (cf. Theorem 1 of [32]) is
obvious by taking
1g, and by noting that the
middle set in (7) necessarily is a subset of K due to the fact that hM;FF >
are the columns of F . But then the inclusion
K+ K is also immediate. To nalize the proof, observe that
x > x
implies that K co K+ .
Unfortunately, the cone K+ itself is not convex and therefore strictly smaller than
K, as the following example shows:
Example 1. The nonsingular 3 3 matrix
with a =6 403
belongs to K (cf. [3]). However, its square root is approximately
0:908 0:092 0:408
0:092 0:908 0:408
0:408 0:408 1:6337 5
whence
although the rank-one matrices aa > , bb > and cc > as seen above belong
to K+ . A singular variant is obtained by aa > +bb > , i.e. replacing the lower right corner
entry of X with 2.
As a general application of the primal-dual approach given by (2) and (3) consider
the so-called all-quadratic problem on which appears as a subproblem in [41]:
subject to x 2
Note that also inhomogeneous quadratic constraints can be written in this form (see
above), so that by introducing slacks we also can write problems with quadratic inequality
constraints in the form (8). Further, additional linear constraints of the form
d can be written as hD; does not change
On copositive programming and standard quadratic optimization problems 5
sign over the feasible set (otherwise one has to subdivide this set accordingly). So the
normalization condition in can be written as hE; Hence with K
as in (5), we may view the following copositive programming problem as a relaxation
of
subject to hE;
Indeed, linearity (in fact, convexity) of the objective ensures that one solution X to
the problem (9) is attained at an extreme point of the feasible set. If X happens to
lie also on an extreme ray of K, then automatically so that this condition
can be dropped without loss of generality. In this case, the relaxation (9) becomes an
exact reformulation of (8). Unfortunately, this is not always the case, as the following
example shows:
Example 2. Consider the problem (9) to maximize hA subject to
and, of course, X 2 K as well as hE; 1. Obviously, the
only solution to this problem is given by the rank-two matrix X with x
We proceed as in the general case with the primal-dual pair (2),(3) to establish the
dual problem of (9) which has m+ 1 structural variables y 0 and
also d slacks contained in S:
subject to y
Given that we can solve the primal and dual feasibility problems with limited eort, it
is possible to use the search directions for a feasible primal-dual interior point algorithm.
Indeed, the following results of Nesterov and Nemirovskii [37] are valid for a general
class of convex cones which include the cone K given by (5):
There exist so-called self-concordant barrier functions for the cones K and K
Interior point methods which converge in a polynomially bounded number of steps
can be formulated using the self-concordant barriers.
Unfortunately, the self-concordant barriers for K and K are not known, for an elaborate
discussion on this topic see [43]. However, Tuncel [45] has recently noticed that even in
this case one can still formulate a class of interior point methods known as primal{dual
a-ne scaling algorithms.
For ease of reference we now reproduce a generic roster for a primal-dual interior-point
method from [21, 27, 34]. Of course, it is in general not harder to solve (8) to
6 I.M. Bomze, M. Dur, E. de Klerk, C. Roos, A. Quist, T.
optimality than to resolve the feasibility questions (i.e., to check membership of K or
there could be special instances where the procedure is still helpful.
Generic Interior-Point Primal-Dual Algorithm
1. Choose an initial point (X
and that
2. Until a stopping criterion is satised, repeat the following step: choose an improving
feasible direction (dX; dy; dS) and step length > 0 such that still X+dX 2 int K
as well as S
Feasibility w.r.t. the equality constraints is maintained by the so-called primal-dual
a-ne scaling (or zero-order) search direction provided by Kojima and Tuncel [28, 45].
Slightly simplied, this class of directions is the solution of the linear system in S n
where H is an arbitrary positive-denite, symmetric linear operator on S n and
As usual, the remaining (strict) feasibility requirements are guaranteed by a suitable
choice of the step lengths. Note that a solution to (11) always exists as also QH
is positive-denite provided hX; Si > 0 which is guaranteed for interior point pairs
Theorem 3.3 in [45]), since we assume that fE; A
are linearly independent, in correspondence with the full row rank assumption on D
in (2). Thus we have the same situation as in the classical SDP case for the search
direction commonly used there, cf., e.g. [16].
Kojima and Tuncel prove in [28] (cf. Theorem 3.4 in [45]) that if we choose the search
directions from (12), then the duality gap decreases linearly with a factor essentially
being the step length, and both primal and dual objectives will be improved, unless
optimality is reached. Decisive for their arguments is the positive deniteness of H and
the property that
Looking at formula (12), it is evident that much would be gained if the terms
containing HS vanished, which of course is impossible if H is positive-denite. We
On copositive programming and standard quadratic optimization problems 7
therefore propose a positive-semidenite variant of the above-mentioned result where
H has a single zero eigenvalue belonging to the direction S. Note that we no longer
assume that (X; S) 2 int Kint K , but only hX; Si > 0. Recall that the latter relation
characterizes non-optimality of pairs (X; S).
THEOREM 2. Suppose that H is a positive-semidenite, symmetric linear operator on
Consider a pair (X; S) 2 K K with hX; Si > 0 and dene the symmetric linear
operator RH on S n by
Then RH is positive-denite and satises
Furthermore, the solution (dX; dy; dS) to the system in S n IR m+1 S n
is unique and satises hX
Proof. The rst argument is quite similar to that in Theorem 3.3 of [45]. For any
which is non-negative and can vanish only if both hX;
O this is absurd as the latter relation implies
assumption whereas hX; again by assumption, hX; Si > 0. Hence
the operator is positive-denite. Finally,
Turning to system (14), we show that the related homogeneous system in (dX; dy; dS)
has only the trivial solution. Indeed, substituting for dS in the equation
yields
dy
and substituting then for dX in the rst m+ 1 equations of (14) gives, after changing
the signs, a homogeneous system in dy with coe-cient matrix6 6 6 4
8 I.M. Bomze, M. Dur, E. de Klerk, C. Roos, A. Quist, T.
which is, due to linear independence of fE; A easily seen to be positive-
denite as RH is so. Thus dy = o, yielding Hence (14) has always
a unique solution. To establish reduction of the duality gap, let us rst deal with the
second-order term hdX; dSi which vanishes because of the feasibility conditions imposed
on (dX; dy; dS) in (14): indeed,
Now the rst-order terms hX; dSi because of
This establishes hX
Using similar arguments as in [28], one can also show that both primal and dual
objectives are improved by the directions given by (14). We will establish this result
directly in the next section for the special case we focus upon in this paper.
Remarks
In semidenite programming (SDP) where there are many possible choices
of the operator RH ; only one choice is known to allow convergent algorithms, namely
the Nesterov-Todd primal{dual a-ne-scaling direction, where
Note that that RH is a positive denite linear operator. Also note
that this choice of RH is not possible for copositive programming, since
X is
not positive-denite for all copositive matrices S. For SDP, the primal-dual algorithm
using this search direction is globally convergent and polynomial for a suitable choice
of the step length [26].
Another choice of primal-dual scaling direction is the so-called (primal) HKM a-ne-
scaling direction, where
. As mentioned, this search
direction is not globally convergent for any choice of step length. In particular, it
can converge to a non-optimal point [35]. Moreover, it cannot be used for copositive
programming because a copositive matrix S can be singular despite hX; Si > 0 for all
, which is linearly independent from E.
Finally, a primal-dual a-ne scaling direction for SDP which is also dened for
copositive programming is the so-called dual HKM direction, which is given as the
On copositive programming and standard quadratic optimization problems 9
solution of
As with the (primal) HKM direction, no primal-dual SDP algorithm using this search
direction is globally convergent [35].
The preceding observations prove two things:
Using only primal-dual a-ne scaling directions in interior point methods for conic
programming does not necessarily lead to a globally convergent algorithm;
One cannot guarantee a xed feasible step length for all primal-dual a-ne scaling
directions (even in the SDP case); in other words, 'jamming' can occur.
For these reasons we will discuss a hybrid algorithm in Section 4 which uses primal-dual
a-ne-scaling steps only as an escape strategy.
3. Standard quadratic optimization and copositive programming
First note that the standard QP (1) is a special case of the all-quadratic problem (8)
with no quadratic constraints and A A. Hence in this case we arrive at the copositive
programming problem (9) with a single constraint:
subject to hE;
so that the dual has only one structural variable
subject to yE
This amounts to search for the smallest y such that yE A is copositive. In this sense,
the dual problem (16) is related to the question of eigenvalue bounds (replace E with
the identity matrix I and \copositive" with \semidenite").
Further observe that in this case, (15) is no relaxation but indeed an exact reformulation
of the standard QP (1), due to the following
LEMMA 3. The extremal points of the feasible set of (15) are exactly the rank-one
matrices
1 From this point on y will denote a scalar variable.
I.M. Bomze, M. Dur, E. de Klerk, C. Roos, A. Quist, T.
Proof. Of course all belong to 1g. Now
suppose that for a vector x 2 , we have xx
and some with 0 < < 1. Choose an orthogonal basis fx 1 of IR n with
. Then since Z and U also are positive semidenite, we get from
that x >
both Z and U have rank one. As
both belong to K, we thus obtain
. But then
we obtain x >
Z and U must be positive multiples of
xx > . The requirement hE; shows that
To show the converse, suppose that X is an extremal point of M K. Then
as well as
i. Hence
is, due to (17), a convex combination of matrices U i in M, whence by the extremality
assumption is of the form stated.
In principle, the roster of the algorithm of Section 2 applies, but the update equations
now reduce to
which for the dual part means simply that we have to continue the line search for the
generalized eigenvalue bound of A as in (16). Of course, a similar reduction applies to
the Kojima-Tuncel search directions from (11), where QH replaces RH .
Now let us calculate the update steps explicitly, in order to avoid unnecessary
numerical complications. Remember that we have still freedom in choosing the positive-
semidenite operator H as long as S gives the unique direction to the zero eigenvalue of
H (note that by assumption on linear independence of fA; Eg, the matrix
never can vanish regardless whether it belongs to K or not). For instance, we may
assume that the orthoprojection of E onto the orthogonal complement of S in S n is
also an eigenvector of H with a suitably chosen eigenvalue > 0. As this is
On copositive programming and standard quadratic optimization problems 11
equivalent to imposing
THEOREM 4. Put and denote by (dX; dy; dS) the
solution of (18). Then (19) implies
Proof. From Inserting
further obtain
the result for dy, observing that hE;
Similarly, we derive
hX;Si X, and
the proof is complete.
For further formulation, it may be convenient to write X
with
We now directly show that both objectives are indeed improved by the chosen
directions.
THEOREM 5. Assume that (X; S) 2 KK with hX; Si > 0. If the improving feasible
direction (dX; dy; dS) is chosen as in Theorem 4, then for > 0 both primal and dual
objective function improve strictly, i.e.
Proof. First, dy is strictly negative, since n 2 hE;Si 2
by the
Cauchy-Schwarz inequality (note that also fE; Sg are linearly independent).
To see the strict monotonicity in the primal objective function, compare the reduction
of the duality gap with the improvement in the dual objective. From Theorem 2, we
know that the reduction of the duality gap is hX; Si. Therefore, to show that also the
primal objective contributes to this reduction, we have to show that dy < hX; Si.
But
since the denominator of the above fraction is a positive number bigger than 1.
12 I.M. Bomze, M. Dur, E. de Klerk, C. Roos, A. Quist, T.
For the sake of completeness, we now also provide explicit update formulae for the
original Kojima/Tuncel search direction, i.e. for the solutions to the system
with H now again positive-denite but otherwise arbitrary, and QH from (12). Of
course, for concrete implementation it remains to specify the values HE and
HA.
THEOREM 6. Assume that (X; S) 2 K K with hX; Si > 0. Put
denote by (dX; dy; dS) the solution of (22). Then
Furthermore, both primal and dual objectives are strictly improved if > 0.
Proof. The arguments are very similar to that of Theorems 4 and 5, and therefore
omitted.
4. A hybrid method: replicator dynamics and primal-dual escape steps
To nd local solutions to the standard QP (1), we propose to use replicator dynamics.
For the reader's convenience, we here provide a short overview, and refer for more detail
to [7, 11, 12]. Consider the following dynamical system operating on :
_
where a dot signies derivative w.r.t. time t, and a discrete time version
ng : (25)
Note that x(0) 2 IR n
implies
since A is nonnegative by
assumption.
The stationary points under (24) and (25) coincide, and all local solutions of (1)
are among these. Of course, there are quite many stationary points, e.g. all vertices
of . However, it can be shown [7] that x is a strict local solution if and only if x is
On copositive programming and standard quadratic optimization problems 13
asymptotically stable, i.e. every solution to (24) or (25) which starts close enough to x,
will converge to x as t %1.
Both (24) and (25) arise in population genetics under the name selection equations
where they are used to model time evolution of haploid genotypes, A being the
(symmetric) tness matrix, and x i (t) representing the relative frequency of allele i in
the population. The Fundamental Theorem of Selection states that average tness,
i.e. the objective function x(t) > Ax(t) is (strictly) increasing over time along trajectories
[13, 22], and moreover every trajectory x(t) converges to a stationary point [31, 22].
Furthermore, one can prove [7, 12] the following facts: if no principal minor of
vanishes, then with probability one any trajectory converges to a strict local solution
x of (1); further, if ng
with y 6= x; and -
is contained in the basin of attraction of x, where for a subset
we shall denote the face of corresponding to by
and its relative interior by
The dynamical systems (24) and (25) are frequently called replicator dynamics, and
are well suited for implementation in practical applications, see [40, 11, 8]. This is
re
ected also in theory by the result that (24) is most e-ciently approaching xed points
in the sense that it is a Shahshahani gradient system [44]. The discrete time version (25)
also corresponds to a particular instance of an algorithm widely popular in computer
vision. These relaxation labeling processes are closely related to articial neural network
learning systems, and have found applications in a variety of practical tasks, e.g. to
solve certain labeling problems arising in the 3-D interpretation of ambiguous line
drawings [42, 24, 39]. Furthermore, the dynamics (25) belongs to a class of dynamical
systems investigated in [1, 2], which has proven to be useful in the speech recognition
domain [30].
Although strictly increasing objective values are guaranteed as we follow trajectories
under (24) or (25), we could get stuck in an ine-cient local solution x of (1). From the
preceding results, then necessarily x One possibility to escape from x
is by the G.E.N.F. approach [12]. An alternative is to merge the replicator dynamics
method with the usual interior-point steps borrowed from semidenite programming,
and this will be described in the sequel. But given any escape procedure, we are now
ready to describe the principal algorithm for solving (1) globally. Note that this procedure
stops after nitely many repetitions, since it yields strict local solutions (in every
14 I.M. Bomze, M. Dur, E. de Klerk, C. Roos, A. Quist, T.
there is at most one of these) with strictly increasing objective
values:
Replicator Dynamics Algorithm
1. Start with
n e or nearby, iterate (25) until convergence; the limit
lim t!1 x(t) is a strict local solution with probability one (provided all principal
minors of A do not vanish);
2. call an escape procedure to improve the objective, if this is still possible; denote
the improving point e x;
3. repeat 1., starting with
x.
Now we are ready to present a combination of the above procedure and the interior-point
method yielding improving direction, in the hope that it will be possible to escape
from ine-cient local solutions.
A Hybrid Algorithm
1. Initialisation: choose
n e or nearby. Put y
2. Replicator dynamics for fast primal updates: starting from x(0) iterate (25) until
convergence; the limit is a strict local solution with probability
3. Dual update: check copositivity of yE A via shortcuts (cf. Fig. 1 in [6], for a
special case see [10]).
In the a-rmative, x is the global solution of (1), since the duality gap is zero (cf.
also Theorem 7 in [7]); stop.
If however a point e
is found such that e x > (yE A)ex < 0, then e x improves the
objective; repeat step 2 starting with this point.
Else (no decision), keep the old value of y 0 , and proceed to step 4.
4. Step back from the boundary: Choose > 0 so small, that the point
and the matrix
I satises (with b x the previous iterate,
so that x > Ax b
x > Abx is the previously obtained improvement)
x > Abx 1
This is a quadratic inequality for . Note that by construction, X is both positive-
denite and has a non-negative square root:
r
On copositive programming and standard quadratic optimization problems 15
5. Since X is both positive-denite and has a non-negative square root, one can choose
Y as in (21) and > 0 su-ciently small such that e
the same properties. This is possible because the mapping X 7!
X is Holder
continuous around X. Hence primal feasibility of e
X is maintained (cf. Lemma 1),
and we get an explicit positive (square root) factorization of e
are all non-negative. Thus e
with i 0 and x
1g.
6. Primal update: Now x > Ax hA; Xi < hA; e
possible, choose
e
x such that
x >
This will always be possible if hA; e
Repeat from step 2, starting with
The following small example illustrates the ideas behind the hybrid algorithm. In par-
ticular, the example is meant to illustrate how the escape strategy in steps 4 through
6 works.
Example 3. Let A =
and suppose we arrived via replicator dynamics starting
at
already at the (suboptimal) local solution x
. Then
and improvement
As x is not the global solution, the matrix
is not copositive.
Following step 3 of the hybrid algorithm, we return to the old y
arrive at the dually feasible (i.e., copositive) matrix
which
incidentially coincides with the optimal S (see below). Note that although
neither X nor S is interior, we have hX;
Suppose for the moment we ignored step 4 above and tried to proceed directly in
forming the matrix
Y (the signshall emphasize the preliminarity of this trial) for the
escape step along (20) and (21). The key quantities in (20) and (21) are hE;
9. Hence
I.M. Bomze, M. Dur, E. de Klerk, C. Roos, A. Quist, T.
and, furthermore,
Therefore
dy
9
which is positive-denite but has negative o-diagonal entries so that
Y
is infeasible for all positive . This shows that the step back from the boundary, i.e. step 4
in the hybrid algorithm is really necessary. Note that ignoring primal feasibility in this
respect, one could investigate instead whether the vector
Y e belongs
to (i.e., has no negative coordinate, as automatically e >
improves the objective. With regard to the latter aim, it is desirable to take as large
as possible (recall that x is locally optimal and the objective is quadratic so that the
improvement will be largest for the largest possible distance { if there is one at all). In
our case, this means considering as a candidate for an improving point in the vector
3+9
38
as
and indeed we manage to escape because we get an improvement if is chosen large
enough, as (
But let us return to the hybrid algorithm as proposed above: choose, e.g.,
step 4, so that
0:9
0:1
and xx
0:81 0:09
0:09 0:01
as well as
I
0:748 0:072
0:072 0:108
with
so that the duality gap will be slightly increased, as expected. Note that S and the update
part (26) of Y remain the same as the dual variable y does not change, and observe
that, as required in step 4, the choice of
Now
Motivated by the trial with
above, we choose large enough to enable an escape, e.g.
and arrive at the positive-denite matrix
On copositive programming and standard quadratic optimization problems 17
Hence the primal feasibility requirement e
will be met if and
only if all entries of the latter matrix are non-negative, which means 0:864
1:792 0:482.
A typical choice of in step 5 would be
2 (cf.[45]), but for simplicity we choose
here
3 . Then
e
0:6306 0:0222
0:0222 0:3250
int K with
0:7939 0:0163
0:0163 0:5699
and h e
In step 6 of the hybrid algorithm we therefore
obtain
by normalizing the last column of
X, with objective value e
x > Aex 2:8912 > 2. The
last steps in the hybrid algorithm are as follows: use the improving point e x as the starting
vector for the replicator dynamics iteration, which nally leads to the global solution
. For the nal check for optimality we now calculate X
5. Conclusions
The problem of maximizing a quadratic form over the simplex has an exact reformulation
as a copositive programming problem, i.e. a conic programming problem over the
cone of copositive matrices. The advantage of such a reformulation is that successful
ideas from the theory of interior point methods can thus be applied to nonconvex
quadratic optimization. In particular, primal-dual a-ne scaling directions can be used
in escape strategies if ine-cient local solutions are obtained from local optimization
procedures like replicator dynamics.
--R
An inequality with applications to statistical estimation for probabilistic functions of Markov processes and to a model for ecology.
Complete positivity.
Remarks on the recursive structure of copositivity.
An introduction to population genetics theory
A recursive algorithm to detect (strict) copositivity of a symmetric matrix.
Completely positive matrices associated with M- matrices
Exploiting sparsity in primal-dual interior-point methods for semide nite programming
On copositive matrices.
An interior-point method for semide nite programming
The Theory of Evolution and Dynamical Systems.
Introduction to Global Optimization
On the foundations of relaxation labeling processes.
On nonnegative factorization matrices.
Polynomial primal-dual a-ne scaling algorithms in semide nite programming
Square triangular factorizations of completely positive matrices.
An introduction to the application of the theory of probabilistic functions of a Markov process to automatic speech recognition.
Factorizations of completely positive matrices.
Copositive matrices and de
Some NP-complete problems in quadratic and linear program- ming
Interior point methods in convex programming: theory and applications.
A new semide
On the dynamics of relaxation labeling processes.
Nonconvex all-quadratic global optimization problems: solution methods
Scene labeling by relaxation operations.
Copositive relaxation for general quadratic programming.
Game dynamics
Notes on completely positive matrices.
--TR
--CTR
Kurt M. Anstreicher , Samuel Burer, D.C. Versus Copositive Bounds for Standard QP, Journal of Global Optimization, v.33 n.2, p.299-312, October 2005
Immanuel M. Bomze , Etienne De Klerk, Solving Standard Quadratic Optimization Problems via Linear, Semidefinite and Copositive Programming, Journal of Global Optimization, v.24 n.2, p.163-185, October 2002
Immanuel M. Bomze, Branch-and-bound approaches to standard quadratic optimization problems, Journal of Global Optimization, v.22 n.1-4, p.17-37, January 2002 | positive semidefinite matrices;copositive programming;standard quadratic optimization;global maximization |
596362 | Global Optimization of Marginal Functions with Applications to Economic Equilibrium. | We discuss the applicability of the cutting angle method to global minimization of marginal functions. The search of equilibrium prices in the exchange model can be reduced to the global minimization of certain functions, which include marginal functions. This problem has been approximately solved by the cutting angle method. Results of numerical experiments are presented and discussed. | Introduction
Marginal functions, that is, functions of the form
where a is a set-valued mapping, have been intensively studied by many researches, (see,
for example, [11, 16, 14] and references therein).
Note, that the so-called max function:
is the simplest example of a marginal function. Here Y can be considered as the image
of a constant mapping a. We assume that the set Y in (1.2) is nite dimensional, innite
and compact.
Marginal functions arise in the study of many problems of mathematical economics.
Global minimization of marginal functions (in particular, max functions) is a very
complicated problem. Indeed, almost all known methods of global minimization require
This research was supported by the Australian Research Council
to compute values of the objective function many times. However, the value of marginal
function of (1.1) at a point p can be found only by solving the optimization problem
subject to y 2 a(p);
so the calculation of the value of is very time consuming.
Recently the so-called cutting angle method for global optimization of Lipschitz function
has been developed (see [2, 23, 6, 7]). We need to compute only a few values of the
objective function at each iteration of the cutting angle method, so we can hope that this
method is suitable for minimizing some marginal functions.
In this paper we apply the cutting angle method to solving some problems of global
optimization, which arise in the theory of economic equilibrium. The objective functions
of these problems are not always Lipschitz, so we need to transform objective functions in
order to obtain Lipschitz continuity. Note that the data in models of economic equilibrium
often is not very precise. Thus, we can restrict ourselves to the search of approximate
solutions of corresponding problems of global optimization. We show that the cutting
angle method, which can nd an approximate solution fairly quickly, can serve for solving
these problems.
Consider a market economy with m consumers (agents) and n goods. The consumer j
has a utility function U j and a vector of initial endowments ! j . It has been shown in [20]
that, under some natural assumptions, a vector of equilibrium prices of this model can be
found as a solution of the following problem:
subject to p 2 ri
with are special marginal functions (see
Section 5). Problem (1.3) has been studied from various points of view in [1] and [5]. The
similar approach for Arrow-Debreu equilibrium model was proposed in [21].
The equilibrium exists if and only if the value of problem (1.3) is equal to zero. It is
well known that the equilibrium does exist if the utility function U j is quasiconcave and
j is a strictly positive vector for all j. If these conditions hold, we need to solve problem
(1.3) with the known value of global minimum. If at least one of these conditions is not
valid, problem (1.3) can serve for recognition of the existence of the equilibrium.
The structure of this paper is as follows. In Section 2 we discuss problems, which arise
under minimization of marginal functions. In Section 3 we recall brie
y the cutting angle
method and in Section 4 we recall the exchange model of economic equilibrium. Section 5
provides a discussion of a reformulation of an equilibrium problem as a special optimization
problem. In Section 6, we study Lipschitz continuity of the objective function of this
optimization problem. Section 7 provides a discussion of the calculation of equilibrium
prices by the cutting angle method. We record results of numerical experiments in this
section. Appendix contains data, which were used for numerical experiments.
2 Minimization of marginal functions
Let a be a set-valued mapping transforming a set P into the set of all non-empty subsets
of a set Y . Consider a function function dened on P by
is called a marginal function. In this paper we assume that P and Y are closed subsets
of nite-dimensional spaces and images of the mapping a are compact sets. Assume also
that the function y 7! f(p; y) is upper semicontinuous for all . Then the supremum
in (2.1) is attained. Continuity, Lipschitz continuity and directional dierentiability of
marginal functions have been intensively studied (see, for example, [4, 11, 14, 16] and
references therein).
A well-known example of marginal functions is delivered by a parametric problem of
mathematical programming:
subject to g i (p; y) 0 (i 2 I); h j (p;
Here J)g. It is assumed that the set
a(p) is nonempty and compact for all
Marginal functions arise in the study of many problems of mathematical economics.
Assume, for example, that a is a production mapping of a producer, that is, a(x) is the
set of all outputs, which can be produced by the producer from an input x. Let p be a
price vector (that is a vector with positive coordinates). Then the maximal prot (x),
which can be obtained by the producer, is equal to (max y2a(x) [p; y]) [p; x], where [u; v]
is the inner product of vectors u and v. The marginal function max y2a(x) [p; y] describes
the revenues of the producer. A dierent kind of marginal functions arises in the study
of a consumer behaviour. Assume that a consumer has a utility function U . Then the
maximal utility, which can be obtained by the consumer is
where B(p) is the set of vectors of goods, which are available for the consumer, if there is
a price vector p at the market.
are marginal
functions and let P be a compact set. Consider the following problem of global optimization
subject to p 2 P: (2.2)
Many problems from various elds of mathematics and its applications can be represented
in form (2.2). We mention here only bilevel programming (see for example [24] and
references therein) and problems of economic equilibrium (see [20]).
Consider the simplest version of (2.2), namely the problem
subject to p 2
where is a marginal function dened by (2.1). A very special case of problem (2.3),
where the mapping a in (2.1) is constant: known as a minimax
problem. Thus the minimax problem has a form: to nd a point (~p; ~
Y such that
If Y is nite, we have a discrete minimax problem, if Y is a compact innite set, we have
a continuous minimax problem.
Discrete minimax problems have been studied by many authors (see, for example
[10, 17] and references therein). We consider here only continuous minimax problems,
which are much more complicated.
We mention three numerical methods, which were proposed for solving continuous minimax
problems in the seventies and earlier: Arrow - Hurwicz method (see [3, 15]), the net
method (see [10]); and the method of extremal basis (see [9]). Modern approaches to solving
these problems can be found in the book [17] by E. Polak. The main attention in this
book is paid to the minimization of convex functions of the form
The net method and the method of consistent approximation [17] can be applied for the
search for local minima of , when this function is non-convex. These methods are based
on an approximation of the given set Y by a nite set Y 0 . Having such an approximation
we can substitute a continuous minimax problem for a sequence of discrete minimax problems
and then solve these problems by known algorithms (see, for example [10, 17]. These
methods require to use large nite sets Y 0 , hence we need to minimize the maximum of a
large number of functions.
The calculation of local minima of a non-convex marginal function is very time-
consuming. Indeed, the application of a majority of known numerical methods for local
optimization is based on the calculation of the objective function and its subgradients (in
a certain sense) in many dierent points. Sometimes it is possible to use only approximate
values of the function and its subgraients, however, in order to nd an approximate value
of the function at a point
p we need to nd an approximate solution of the problem
subject to y 2 a(p): (2.5)
Thus the search for a local minimum of the function requires to solve (approximately)
problem (2.5) very often.
Note that as a rule the calculation of subgradients of a non-convex marginal function is
more complicated than the calculation of a value of this function. It leads to the following
conclusion: optimization methods, which are based on the calculation both functions
and its subgradients, as a rule are not applicable for the local minimization of non-convex
marginal functions. Methods, which are based only on calculation of values of the objective
function (so-called derivative-free methods), are more preferable.
any convexity assumptions a marginal function may have a lot of local mini-
mizers, so we need to use methods of global optimization for solving problem (2.2). How-
ever, the majority of these methods (branch-and-bound, random search etc) require very
many objective function evaluations. So, these methods are not applicable for minimization
of marginal functions (and even for solving minimax problems) if the dimension of the
problem is suciently high. For global optimization of marginal functions we need to nd
methods, which require a small amount of objective functions evaluations. One of such
methods is the so-called cutting angle method, which uses only few function evaluations
at each iteration. So we can propose that the cutting angle method is applicable for the
global minimization of marginal functions.
Cutting angle method
ng. Consider the space IR n of all vectors We shall use the following
notations.
is the i-th coordinate of a vector x 2
is the inner product of vectors l and x.
A function f dened on the cone IR n
of all n-vectors with nonnegative coordinates is called
an IPH function if f is increasing (x y =) f(x) f(y)) and positively homogeneous
of the rst degree 0). The following result holds
(see [23]).
Theorem 3.1 Let f be a Lipschitz function dened on the unit simplex
1g. Then there exists a constant c > 0 such that for all c 0 c the function
is the restriction of a certain IPH function g to S.
Thus the minimization of a Lipschitz function f over S is reduced to the minimization
of an IPH function g over S. The minimization of a Lipschitz function subject to linear
constraints can be transformed to the minimization of another Lipschitz function over the
simplex (see [23] for details), hence the minimization of a Lipschitz function subject to
linear constraints is reduced to the minimization of an IPH function over the simplex.
The cutting angle method was proposed (see [2] and also [22]) for the minimization of
a so-called ICAR (increasing convex-along-rays) function dened on IR n
over a compact
subset of IR n
. We consider here only a version of this method, which is suitable for the
minimization of an IPH (increasing positively homogeneous of degree one) function over
the unit simplex. This version has been proposed and discussed in detail in [6, 7]. It
follows from monotonicity of an IPH function f that f(x)
. We
assume in the sequel that f(x) > 0 for all x 6= 0. For x 2 IR n
we shall use the following
c=x is the vector with the following coordinates:
x
The cutting angle method is based on the following result (see [22] and references therein).
Theorem 3.2
! IR be a function such that f(x) > 0 for all x 6= 0. Then
f is IPH if and only if there exists U IR n
f0g such that
l2U
min
l
min
l
and min
l
be the unit vector such that I(e k
First we present the simplest version of the cutting angle method.
The cutting angle method for minimizing an IPH function
over the unit simplex
Dene the function h
kn
min
l k
kn
l k
and set
Step 1. Find a solution x of the problem
subject to x 2 S: (3.1)
Step 2. Set
Step 3. Compute dene the function
l j
min
l k
and go to Step 1.
The convergence of the cutting angle method has been proved under very mild assumptions
(see [16], where the convergence of much a more general method was established,
and also [22]).
Remark 3.1 The solution of the auxiliary problem (3.1) is the most dicult part of
the algorithm. The special method for the solution of this problem has been developed
in [6, 7]. We do not discuss this method here. Dierent approaches are possible in lower
dimensions ([2, 23]): in particular, the auxiliary problem can be reduced to a mixed-integer
linear programming problem, which can be solved by standard optimization packages (for
example, CPLEX).
Remark 3.2 Only one value of the objective function f should be calculated at each
iteration.
Remark 3.3 A more advanced version of the cutting angle method was proposed in [7].
All approximate solutions of the problem (3.1) are considered in this version. We shall
use the advanced version in this paper, since it allows us to fasten the search for a global
minimizer (see [7] for details). The advanced version may require a few calculation of the
objective function at each iteration.
Remark 3.4 Let
It follows from Theorem 3.2 that h j (x) f(x) for all x 2 S. Hence
Thus j is a lower estimate of the global minimum of f over S. Let It can
be shown (see, for example [22] and references therein) that j is an increasing sequence
and j we have a stopping criterion, which enables us (at least
theoretically) to obtain an approximate solution with an arbitrary given tolerance.
Remark 3.5 The cutting angle method can be considered as a special case of many well-known
algorithms (see [22] for a short survey of some of these algorithms). However, the
numerical implementation of the cutting angle method has demonstrated that it works
much better than many other versions of these algorithms.
4 The equilibrium model
We study the so-called exchange models of economic equilibrium. First we consider a
classical version of this model. The classical exchange model describes a market, where n
goods are circulated. Let I ng. There is a nite number, say m, of economical
agents, which are called consumers, at the market. Let
is described by a pair (U is a utility function (objective function) of the
consumer
is a vector of her initial endowments.
A state of economy is a vector
. A state X is called feasible
if it belongs to the
set
where
is the vector of all products available on the market.
A vector p 2 IR n
n f0g is called a price vector. Having a price vector p, the consumer
can sell her initial endowment ! j and can buy a vector x j from the set
This set is called the budget set of the consumer j.
Note that B j so we can assume without loss of generality
that the mapping B j is dened only on the unit simplex
1g. We
shall denote the model under consideration by M:
A semi-equilibrium of the model M is a pair (p;
X), where p is a price vector and
is a feasible state, such that
x j is a solution of the consumer problem:
subject to x
The vector
p is called equilibrium prices and the vector x j is called an equilibrium state of
the agent j.
It is well known that a semi-equilibrium exists if functions U j are quasiconcave and
vectors ! j are strictly positive (see, for example, [13] and references therein). We assume
in the rest of this paper that
We shall consider both models with quasiconcave U j and without quasiconcave U j .
Let (p;
X) be a semi-equilibrium of the model M. Since
X is a feasible state, the
inequality
is dened by (4.2). A semi-equilibrium (p;
X) is
called an equilibrium if
It is well-known (and easy to check), that each semi-
X) with
is an equilibrium.
We accept the following
Assumption 4.1 There exists j 2 J such that the utility function U j is non-satiated
in the following sense: for each x 2 IR n
and each i 2 I there exists i > 0 such that
is the i-th unit vector.
Then each vector of equilibrium prices
p is strictly positive. Indeed, assume that
Let
x j be an equilibrium state of the consumer j. Then the budget set B
of this consumer contains the ray fx there exists
(p) such that U j which contradicts the denition of
the semi-equilibrium. Thus Assumption 4.1 allows us to consider only strictly positive
equilibrium prices (therefore, an equilibrium is guaranteed to exist by the above).
We also consider one more type of exchange models, namely a model of exchange with
xed budgets. In contrast with the classical version, it is assumed that each agent j has a
xed budget, that is, a special sum of money d j , which does not depend on market prices
. The budget mapping B j (p) should be replaced for the mapping
~
Having mappings ~
(p), we can dene the semi-equilibrium and equilibrium in this model
in the same way as in the classical case. Note that in contrast with the classical model,
~
so we need to consider mappings ~
on the cone IR n
f0g.
The existence results for the model with xed budgets are similar to those for the classical
model. If Assumption 4.1 holds then equilibrium prices are strictly positive.
Remark 4.1 It is known [18, 13] that an equilibrium for a model with xed budgets and
positively homogeneous utility functions can be found by solving a convex programming
problem. However this does not hold if utility functions are not positively homogeneous. In
this paper we consider a search for an economical equilibrium as an example of application
of the cutting angle method. From this point of view models with xed budget is of a
special interest since they can be reduced to a problem of global optimization, which is
dierent from that for classical exchange models.
5 Equilibrium prices as a solution of a special optimization
problem
It is not hard to formulate a bilevel problem such that its solution set coincides with the
set of equilibrium prices. Let Assumption 4.1 hold. Consider the set ri
++ . Assume for the sake of simplicity that the utility functions U
are strictly concave. Then the consumer's problem
subject to x
has a unique solution for each p 2 ri S. Denote this solution by x j (p). Consider a function
only if p is a vector of equilibrium prices. Thus
equilibrium prices can be found as a solution of the following bilevel problem:
min subject to p 2 ri S (5.2)
where x j (p) is a solution of problem (5.1). The optimal value of problem (5.2) is known
(and equal to zero). However, this problem is very complicated. Note that the set-valued
mapping B j is not Lipschitz on ri S. (See, for example, [4] for the denition of Lipschitz
set-valued mappings.) So we cannot hope that the mappings x j (p) (j 2 J) and the
function
(p) are Lipschitz for an arbitrary functions U j . Hence we cannot guarantee that
problem (5.2) can be solved by the cutting angle method.
We now consider a certain dierent type of optimization problems, which can serve
for the search of economic equilibrium. Such problems were suggested in [20]. For each
ri S consider sets
A
Y
and
Both sets A (p) and A(p) are compact for p 2 ri S, so the following functions are well
ri S (5.5)
and
ri S: (5.6)
0: The following assertion holds (see [20]).
Lemma 5.1 Let Assumption 4.1 holds. and let
ri S. The equality
if and only if p is a vector of equilibrium prices.
Thus in order to nd a vector of equilibrium prices we need to solve the following problem
of global optimization:
subject to p 2 ri S: (5.7)
The objective function of this problem is the dierence of two marginal functions H 1 and
. If the equilibrium exists then the minimal value of this problem is known and equal
to zero.
We accept the following assumption.
Assumption 5.1 (1) For each j 2 J there exists a point a j 0 such that the utility
function U j is twice continuously dierentiable on the set a
++ and
++ and y j 6= 0: (5.8)
(2) The utility function U j (j 2 J) is increasing in the following sense: if x 1 x 2 then
It follows from (5.8) that U j is a strictly concave function. If Assumption 5.1 holds then
for each p 0 and each j 2 J the consumer's problem
subject to x
has a unique solution x Hence, the problem
subject to
which serves for the denition of the function H 1 , has a unique solution
The problem X
subject to
which serves for the denition of H 2 also has a unique solution ~
It has been proved in [21] that the function H 1 is Frechet dierentiable with the piece-wise
mapping rH 1 . We have
is an arbitrary index belonging to I j (p) :=
0g. The function
H 2 is directionally dierentiable and, under some additional assumptions, also Frechet
dierentiable with the piece-wise C 1 gradient mapping. Assume that there exist
I and a sequence p (k) 2 ri S such that
It follows from (5.11) that
So we cannot hope that H(p) is a Lipschitz function on the set ri
all quasiconcave utility functions U j and we cannot guarantee that the global minimizer
of H over the simplex S can be found by the cutting angle method.
In order to get a Lipschitz function we shall slightly change the denition of the function
H. First we note that the function H 2 is bounded on ri S. Indeed, let p 2 ri S and let
Since the utility
functions U j are increasing, we have
where
However the function H 1 can be unbounded on S. Since we are interested in the global
minimum of the function points where the function H 1 is
very large. For this purpose we consider the function
where d is an arbitrary positive number, which is bigger than a global minimum of the
function H. Clearly global minimizers of functions H and L coincide so if the equilibrium
exists, then a point p 2 ri S is an equilibrium prices if and only if
Thus a vector of equilibrium prices can be found as a solution of the following problem:
subject to p 2 ri S: (5.14)
6 Lipschitz continuity of the function L.
In this section we shall check that the function L is Lipschitz. Let dg.
It is sucient to verify that L is Lipschitz on the set E. First we prove the following simple
Proposition.
Proposition 6.1 The function H 1 is bounded on the set E.
Proof: If dened by (5.12). 2
Corollary 6.1 There exists a vector a 2 IR n
++ such that x j (p) a for all
Indeed, U j (x(p)) H 1 (p). So Proposition 6.1 and Assumption 5.1(3) imply the boundness
of the set fx Jg.
We need the following theorem which is a special case of a general result from [19].
(This special case and its relation with the mentioned general result were discussed in
Theorem 6.1 Let P be an open subset of a nite dimensional space and
x (p) be a solution of the following parametric convex programming problem:
subject to
where K and R are nite sets, a k (k 2 K); h r (r 2 R) are vectors and A r (r 2 R) are
matrices. Assume that T is a twice continuously dierentiable concave function dened
on an open
set
such that
Assume also that the Mangasarian-Fromovitz constraint qualication holds at the point
x (p), that is, there exists y 2 IR n such that
where
Then the function x (p) is piece-wise continuously dierentiable near the point p. In
particular, x (p) is a locally Lipschitz function near the point p.
In order to apply this theorem, we need to consider an open set P S such that
for all Such a set exists since ! j 0 for all j 2 J . For
the following two optimization problems.
Problem
subject to [p; x]
where a is a vector from Corollary 6.1. Problem P 1 has a unique solution x
(p).
Problem
subject to
This problem has a unique solution ~
(p)) j2J .
Proposition 6.2 1) For each p 2 P the Mangasarian-Fromovitz constraint qualication
holds for problem P 1 at the point x j
(p).
2)For each p 2 P the Mangasarian-Fromovitz constraint qualication holds for problem
P 2 at the point ~
We leave the simple but cumbersome proof of this proposition to the reader.
Proposition 6.3 Let
Then the function H is locally Lipschitz on the set P .
Proof: It follows from Theorem 6.1 and Proposition 6.2 a that functions x
(p) and ~ x j
(p)
are locally Lipschitz. Functions U j are locally Lipschitz as well. Hence H (p) is locally
Corollary 6.2 The function H (p) is Lipschitz on the compact set S.
Theorem 6.2 The function L dened by (5.13) is Lipschitz on the simplex S.
Proof: It is sucient to prove that the function H is Lipschitz on the set
H(p) dg. Since x j (p) a for
(p) for
(p) for all p 2 S. Hence
The result follows from Corollary 6.2. 2
7 The calculation of equilibrium prices by the cutting angle
method
In this section we discuss results of numerical experiments, which were carried out in order
to nd an approximate equilibrium prices or to verify that the equilibrium does not exist.
The problem (5.14):
subject to p 2 ri S
has been solved by the cutting angle method.
First we give some remarks.
1. We consider a search of an economical equilibrium as an example of applications of the
cutting angle method to approximate global optimization of a complicated function, which
is the dierence of two marginal functions. Currently the developed approach can mainly
be used for research purposes. We hope that the further development of the cutting angle
method will allow one to use this approach for many real problems of economic equilibrium.
2. Assume that the equilibrium exists. We have actually we are
looking for a global minimum of the function H, which is equal to zero. We also use the
function H for determining the precision of results of calculations. This function is dened
with the help of utility functions U j , which describe the preferences of agents. Note that
the function j U j with j > 0 and function U j describes the same preferences (see [20] for
a corresponding discussion). Thus if we replace the function H for the function H with
arbitrary , we obtained the same approximate global minimizers, however the measure
of the precision will be changed. In order to avoid this situation, we need to consider only
functions U j , which are normalized in a certain sense.
All numerical experiments were carried out with utility functions of the form
are dened by maximization of the sum
we consider the following normalization of function H:
3. The cutting angle method is suitable for the search of approximate solution of a global
optimization problem. If there exists the equilibrium of the model under consideration,
then the optimal value of the normalized function H is equal to zero. We search for
vectors p such that H(p) 0:0010:003. Assume that we consider a model, for which the
existence of the equilibrium are not proved and we want to learn whether the equilibrium
exists. Recall (see Section 3) that the cutting angle method produces the lower estimates
j of the global minimum. If j > 0 for some j, then the equilibrium does not exist.
4. We used the exact penalty method for solving internal problems, which are problems of
convex programming (maximization of a concave function subject to linear constraints).
Thus, the exact penalty functions have been constructed; for their minimization we used
the so-called discrete gradient method ([5]). Since the precision of the results obtained by
the cutting angle method is approximately 0:001 0:003, internal problems were solved
with the precision 10 4 .
5. We used a computer IBM Pentium-S CPU 150 MHz. Problems with
were mainly considered. It takes approximately 15-18 minutes to nd a solution of such
a problem with the precision 0:001 0:003. Results of numerical experiments show that
the solution of internal problems takes the main part of CPU time.
Our aim is to show that the cutting angle method can be successfully applied for
solving the problem (5.14). Using more eective methods of convex optimization for
solving internal problems and more iterations of the cutting angle method we can nd a
more precise solution of problem (5.14).
Classical exchange models with concave utility functions
First we consider a classical exchange model such that Assumption 4.1 and Assumption
5.1 hold. Then the equilibrium does exist, so the value of problem (5.14) is known and
equal to zero. Since the function L is Lipschitz over the unit simplex, the cutting angle
method can be applied.
Example 7.1 Consider the economical system with 8 consumers and 4 goods. The utility
functions are dened as follows:
Vectors
are the rows of the matrices
are rows of
matrix
1 . Coecients
are coordinates of the vector c 1 . Matrices A
1 and vector c 1 can be
found in Appendix.
Numerical results for Example 7.1. The point
with found by the cutting angle method after iterations. It takes
22 objective function evaluations.
Example 7.2 We again consider the same economical system. Utility functions have
the same form with the same vector of coecients c 1 and the same matrix B 1 . However
coecients j
are dened in dierent way. We assume now thatX
Vectors
are the rows of the matrix A 0
1 , which is in
Appendix
.
Numerical results for Example 7.2. The point
with found by the cutting angle method after 17 iterations. It takes
objective function evaluations.
Exchange model with xed budgets and concave utility functions
Consider a model with xed budgets such that Assumption 4.1 and Assumption 5.1
hold. We now use the approach similar to that for the classical model. Let p 2 IR n
++ .
Consider set-valued mappings
~
A
~
where ~
dened by (4.5). Let ~
~
Further, let ~
d), where d is an arbitrary positive number. The same
argument as in Section 5 demonstrates that a vector of equilibrium prices can be found as
a solution of the problem:
~
subject to p 2 IR n
In order to apply the cutting angle method we need to transform this problem to a problem
with a simplicial constraint. For this purpose we introduce constraints p i M where M
is a suciently large number. (It is assumed that there exist a vector
p of equilibrium
prices such that
Consider the set
i2I
Clearly this set contains the set fp Adding a
new variable p n+1 and replacing p i =t by q i we transform the set D to the unit simplex
.
Example 7.3 Consider the economical system of Example 7.2. It is assumed now that
each consumer j has the xed budget d j and her budget set ~
(p) has the following form
~
Vector can be found in Appendix.
Numerical results for Example 7.3. The point
with found by the cutting angle method after 5 iterations. It takes 24
objective function evaluations. Note that
3. Classical exchange model with not necessarily concave utility functions
The existence of the equilibrium in classical model can be proved if utility functions U
are quasiconcave. If at least one of these functions is not quasiconcave we cannot guarantee
that the equilibrium exists. However, we also cannot guarantee that the equilibrium does
not exist. In order to check the existence of the equilibrium we can solve problem (5.14).
If the value of this problem is equal to zero then the equilibrium exists and a global
minimizer of the function L is a vector of equilibrium prices. Otherwise, the equilibrium
does not exist. Some numerical experiments have been carried out in order to check the
existence of equilibrium. We consider utility functions, which can be represented as the
maximum of two concave functions. (Functions of such structure arise when indivisible
goods are considered.)
We now describe numerical experiments which were carried out.
1. A number of models with two goods and two consumers has been examined. Each
consumer has a utility functions, which is the maximum of two functions of the form
(*). Coecients c j and b i were chosen at random. Coecients j
were chosen also at
random, however it is assumed that either
0:8. A model with three
goods and three consumers, which have utility functions of the same form with chosen
at random coecients, also has been examined. Numerical experiments showed that all
models under consideration possess equilibrium. These results allow us to consider the
following conjecture: if the number of goods is equal to the number of consumers and a
utility function of each consumer is the maximum of two functions, for which Assumption
4.1 and Assumption 5.1 hold, then the classical exchange model has an equilibrium. This
conjecture was discussed with Professor J.-M. Bonnisseau, who suggested the following
counter-example.
Example 7.4 (J.-M. Bonnisseau, [8] Consider a classical exchange model with two goods
and two consumers. Utility functions U j and vectors ! j (J =1,2) of consumers have the
following
The demand of the consumers can be explicitly calculated. This calculations showed that
an equilibrium does nor exist.
Numerical experiments, based on the approach suggested in this paper, also conrmed
that the model under consideration and also some similar models have no equilibrium.
Nevertheless our numerical experiments which were performed by a random choice of
coecients show that there exists many models, which have the described above form and
possess an equilibrium.
2 A model with two products and three consumers has been examined. Each consumer
has a utility function, which is the maximum of two functions of the form (*) with chosen
at random coecients. This model has no equilibrium, however each its submodel with
two consumers possesses an equilibrium.
We now present one of the corresponding examples.
Example 7.5 Consider two economical systems, one of them has 3 consumers and 2
goods, the other has 3 consumers and 3 goods. Assume the consumer j has a utility
function
where
U jk
Y
jk
2:
For the rst system vectors
are the rows of matrices A 3
and
respectively, which can be found in Ap-
pendix. Coecients (c 1
3 are coordinates of the vector c 2 (see Appendix).
For the second system vectors
and are the rows of matrices A 3
and
3 , respectively (see Appendix).
Coecients
3 are coordinates of the vector c 2 .
First we describe our approach for solving internal problems.
Note that the function H 1 has the form
ri S:
Hence, we can nd the value H 1 (p) of the function H 1 at a point p by solving the
convex programming problems:
U ji
We also have for p 2 ri S:
In order to nd the value H 2 (p) of the function H 2 at the point p we consider all possible
combinations:
2:
Then we solve the convex programming problems :
and calculate H 2 (p) by (7.4).
Solving problems (5.14) for the described models, we found that the rst economic
system does not possesses the equilibrium. However, all its subsystems consisting of 2
consumers and 2 goods have the equilibrium. The second system also has the equilibrium.
Appendix
In this Appendix we report the data, which were used for numerical experiments.
Examples 8.1 { 8.3
0:05205 0:35366 0:24230 0:15199
0:23562 0:08699 0:30802 0:16937
0:25335 0:17358 0:10888 0:26420
0:09515 0:33689 0:18525 0:18271
0:21114 0:13245 0:32138 0:13503
0:25861 0:14220 0:14025 0:25893
0:13280 0:32224 0:13540 0:20955
0:18448 0:18196 0:33593 0:09763C C C C C C C C C C C C A
0:06506 0:44207 0:30288 0:18999
0:29452 0:10874 0:38502 0:21171
0:31668 0:21697 0:13610 0:33025
0:11893 0:42112 0:23156 0:22839
0:26393 0:16556 0:40172 0:16879
0:32326 0:17775 0:17532 0:32367
0:16601 0:40281 0:16925 0:26194
0:28793 0:06658 0:23274 0:20954
0:24972 0:22317 0:10869 0:29905
0:12910 0:22351 0:19709 0:20271
0:28129 0:05614 0:27284 0:17613
0:26395 0:16693 0:16528 0:28286
0:09218 0:19242 0:20010 0:20564
0:25339 0:06827 0:29563 0:12479
0:22732 0:17509 0:41652 0:27501
0:03812 0:02936 0:06985 0:04612
0:20445 0:15747 0:37461 0:24734
0:25905 0:19953 0:47466 0:31340
0:07548 0:05814 0:13831 0:09132
0:26728 0:20586 0:48973 0:32334C C C C C C C C C C C C A
Example 8.4
0:12829 0:87171 0:73035 0:26965
0:59343 0:40657 0:22022 0:77978
0:61452 0:38548 0:64521 0:35479C A
0:28793 0:06658 0:24972 0:22317
0:12910 0:22351 0:28129 0:05614
0:26395 0:16693 0:09218 0:19242C A
0:22732 0:17509
0:03812 0:02936C A
A 3 =B @
0:08032 0:54576 0:37392 0:37362 0:13794 0:48843
0:47284 0:32395 0:20321 0:15414 0:54576 0:30010
0:31752 0:19918 0:48330 0:47796 0:26282 0:25922C A
C A
Acknowledgement
The authors wish to thank Professor J.-M. Bonnisseau for very useful discussions and
two anonymous referees for valuable comments.
--R
A parametric approach to global optimization problems of a special kind
Cutting angle method in global opti- mization
Studies in Linear and Nonlinear Program- ming
Global optimization of increasing positively homogeneous functions over the unit simplex
Method of extremal basis
Constructive nonsmooth analysis
Mathematical Theory of Economic Dynamic and Equilibria
Numerical Methods for Deterministic and Stochastic Minimax Prob- lems
Foundation of Mathematical Optimization
Economic equilibrium and optimum
Directional derivatives of the solution of a parametric nonlinear program
On some problems of non-smooth optimization in economic theory
Reformulation of a problem of economic equilib- rium
Kluwer Academic Pub- lishers
Bilevel and multilevel programming: a bibliography review
--TR
--CTR
A. M. Bagirov , A. M. Rubinov, Cutting Angle Method and a Local Search, Journal of Global Optimization, v.27 n.2-3, p.193-213, November | global optimization;exchange model;cutting angle method;marginal function;economic equilibrium |
596473 | Solving Standard Quadratic Optimization Problems via Linear, Semidefinite and Copositive Programming. | The problem of minimizing a (non-convex) quadratic function over the simplex (the standard quadratic optimization problem) has an exact convex reformulation as a copositive programming problem. In this paper we show how to approximate the optimal solution by approximating the cone of copositive matrices via systems of linear inequalities, and, more refined, linear matrix inequalities (LMI's). In particular, we show that our approach leads to a polynomial-time approximation scheme for the standard quadratic optimzation problem. This is an improvement on the previous complexity result by Nesterov who showed that a 2/3-approximation is always possible. Numerical examples from various applications are provided to illustrate our approach. | Introduction
A standard quadratic optimization problem (standard QP) consists of nding global minimizers of a
quadratic form over the standard simplex, i.e. we consider global optimization problems of the form
x > Qx (1)
where Q is an arbitrary symmetric n n matrix; a > denotes transposition; and is the standard
simplex in the n-dimensional Euclidean space IR n ,
denotes the non-negative orthant in IR n . To avoid trivial cases,
we assume throughout the paper that the objective is not constant over , which means that fQ; En g
are linearly independent where ee > is the n n matrix consisting entirely of unit entries, so
that x > on . For a review on standard QPs and its applications, see [3]. We
only mention here that this problem is known to be NP-hard, and contains the max-clique problem
in graphs as special case.
Note that the minimizers of (1) remain the same if Q is replaced with Q+
En where
is an arbitrary
constant. So without loss of generality assume henceforth that all entries of Q are non-negative.
Furthermore, the question of nding minimizers of a general quadratic function x > Ax
can be homogenized considering the rank-two update ce > in (1) which has the same
objective values on .
ISDS, Universitat Wien, Austria. E-mail: immanuel.bomze@univie.ac.at
y Faculty of Information Technology and Systems, Delft University of Technology, P.O. Box 5031, 2600 GA Delft,
The Netherlands. E-mail: E.deKlerk@ITS.TUDelft.NL
In this paper we will show how to derive approximation guarantees for this problem via semidenite
programming (SDP). The main idea is as follows: we can give an exact reformulation of the standard
quadratic optimization problem as a copositive programming problem, and subsequently approximate
the copositive cone using either linear inequality systems, yielding LP relaxations; or, more rened,
systems of linear matrix inequalities (LMI's), yielding an SDP formulation. Both SDP and copositive
programming problems are examples of conic programming problems, and we begin by reviewing these
concepts.
1.1 Preliminaries; conic programming
We dene the following convex cones:
The n n symmetric matrices:
the n n symmetric positive semidenite matrices:
the n n symmetric copositive matrices:
the n n symmetric completely positive matrices:
the n n symmetric nonnegative matrices:
the n n symmetric doubly nonnegative matrices:
We consider the usual inner product hX; Y i := Tr(XY ) on Sn and recall that the completely positive
cone is the dual of the copositive cone, and that the nonnegative and semidenite cones are self-dual
with respect to this inner product. Furthermore, the dual cone of Dn is D
a cone which
is contained in Cn and which will play an important role in the relaxations to follow.
For a given cone K and its dual cone K we dene the primal and dual pair of conic linear programs:
(D) d := sup y
(2)
If
n we refer to semidenite programming, if to linear programming, and if
copositive programming.
The well-known conic duality theorem, see, e.g., [15], gives the duality relations between (P ) and (D).
Theorem 1.1 (Conic duality theorem) If there exists an interior feasible solution X
of (P ), and a feasible solution of (D) then p and the supremum in (D) is attained. Similarly,
if there exist y
feasible solution of (P ), then
the inmum in (P ) is attained.
As is well known [10], optimization over the cones S
n and Nn can be done in polynomial time (to
compute an -optimal solution), but copositive programming is NP-hard, as we will see in the next
section.
1.2 Standard quadratic optimization via copositive programming
In [4] it is shown that we can reformulate problem (1) as the copositive programming problem
Problem (3) is called a copositive program because of its dual formulation
(note that the optimal values of both (3) and (4) are attained and equal due to Theorem 1.1; see [4]).
The reformulation makes it clear that copositive programming is not tractable (see e.g. [16, 4]). In
fact, even the problem of determining whether a matrix is not copositive is NP-complete [9].
In [4], some ideas from interior point methods for semidenite programming are adapted for the
copositive programming case, but convergence cannot be proved. The absence of a computable self-
concordant barrier for this cone basically precludes the application of interior point methods to copos-
itive programming.
A solution to this problem was recently proposed by Parillo [12], who showed that one can approximate
the copositive cone to a given accuracy by a suciently large set of linear matrix inequalities. In other
words, each copositive programming problem can be approximated to a given accuracy by a suciently
large SDP. Of course, the size of the SDP can be exponential in the size of the copositive program.
In the next section we will review the approach of Parillo, and subsequently work out the implications
for the copositive formulation of the general quadratic optimization problem by applying the
approach of De Klerk and Pasechnik [5]. The basic idea is to replace the copositive cone in (4) by an
approximation: either a polyhedral cone or a cone dened by linear matrix inequalities. In this way
we obtain a tractable approximation problem.
2 Approximations of the copositive cone
Since any y 2 IR n
can be written as indicates the componentwise
(Hadamard) product, we can represent the copositivity requirement for an (n n) symmetric matrix
M as
There are many possible representations of the polynomial P as a homogeneous polynomial of degree
four, if we allow for nonzero coecients of terms like
In particular, if we represent
M is a symmetric matrix of order n+ 1n(n 1),
then f
M is not uniquely determined. The non-uniqueness follows from the identities:
It is easy to see that the possible choices for f
dene an ane space (see below for a closer description
of that space).
2.1 Sum-of-squares decompositions
Condition (5) will certainly hold if the polynomial P can be written as a sum of squares (s.o.s., in
for some polynomial functions f sum of squares decomposition is possible if
and only if a representation of P (x) exists where f
M in (6) is positive semidenite. We will show
this for any homogeneous polynomial of degree 2r below, but introduce some convenient notation
beforehand: for any x 2 IR n and any multi-index m 2 IN n
(with IN
i the corresponding monomial of degree jmj. Also, denote
by I n
sg the set of all possible exponents of monomials of degree s (there are
s
of them) and, as usual, 2I n (s)g. Finally, given a set of multi-indices
I , we dene [x] m2I as the vector with components x m for each m 2 I .
Lemma 2.1 If
P (x) is a homogeneous polynomial of degree 2s in n variables
has a representation
l
for some polynomials f i (x) then there are polynomials h i (x) which are homogeneous of
degree s for all i such that
P has a s.o.s. representation
as above if and only if there is a symmetric positive-semidenite matrix d d matrix f
d such
that
s
and e
Proof: It is easy to see that the degree of f i is at most s for each i: if we assume to the contrary
that f j has maximal degree of all f i and its degree exceeds s, then the square of its leading term which
appears in the s.o.s. will never cancel out, since there can be no monomials of the same degree with
negative coecients.
We can therefore decompose each f i as f is homogeneous of degree s (or zero, but
without loss of generality we assume that this happens only if t < i l, including the possibility of
and the degree of g i is less than s. Now
that g has degree less than 2s while h, as
P itself, is homogeneous
of degree 2s. Thus
that any homogeneous h i can be
written as h i
a i a >
d . The
converse is obvious via spectral decomposition of f
Next let us characterize all the matrices f
which allow for a representation
x >f Me x for
a given homogeneous polynomial
Lemma 2.2 Let
2m be a homogeneous polynomial of degree 2s in n variables
d as in Lemma 2.1. Then
only
if
(j;k)2[I
f
(j;k)2[I
f
Proof: Observe that f
. The assertion now follows by equating the corresponding
coecients of the polynomials e x >f Me x and
Parillo showed [12] that P (x) in (5) allows a sum of squares decomposition if and only if M
which is a well-known sucient condition for copositivity. For completeness of presentation, we give
a new proof here, which follows easily from the preceding lemmas.
Let us dene the cone K 0
n , the cone dual to that of all doubly nonnegative matrices.
Theorem 2.1 (Parillo [12]) P allows for a polynomial s.o.s. if and only if
Proof: In this case, the degree 2s of P equals four, so that Obviously,
A 2e i
of M . Therefore Lemma 2.2 yields
f
M is assumed to
be symmetric. Note that we may and do assume that f
M is positive-semidenite by Lemma 2.1. Now
diagonal elements of f
cannot be negative. Further,
for all i; j, which means that S is
a principal submatrix of the positive-semidenite matrix f
M . Hence also S
n , which shows the
necessity part of the assertion. To establish suciency, observe that (x x) > S(x x) is, by spectral
decomposition of S, even a s.o.s. in the variables z
obviously a s.o.s. Hence (x x) > M(x x) is, as the sum of two s.o.s. decompositions, itself a s.o.s. 2
Higher order sucient conditions can be derived by considering the polynomial:
and asking when P (r) (x) has a sum of squares decomposition. It is clear from Lemma 2.1 that the
set of matrices M which satisfy this condition forms a convex cone.
Denition 2.1 (De Klerk and Pasechnik [5]) The convex cone K r
n consists of the matrices for
which P (r) (x) in (10) allows a polynomial sum of squares decomposition.
Obviously, these cones are contained in each other: K r
n for all r. This follows from
By explicitly calculating the coecients Am (M) of the homogeneous polynomial P (r) (x) of degree
summarizing the above auxiliary results, we arrive at a characterization of K r
n which has
not appeared in the literature before.
Theorem 2.2 Let n; r 2 IN and
. Further, abbreviate m(i;
and introduce the multinomial coecients
For a symmetric matrix M 2 Sn , dene
n if and only if there is a symmetric positive-semidenite dd matrix f
d such that
(j;k)2[I
f
(j;k)2[I
f
Proof: By the multinomial law,
c(k)x 2k
The last identity follows by setting Hence Am (M) as given by (12) are the coecients
of P (r) , and the assertions follow by observing with the help of Lemma 2.1 and Lemma 2.2. 2
The following auxiliary result simplies the expressions Am (M) considerably.
Lemma 2.3 Let M be an arbitrary n n matrix, and denote by diag the vector
obtained by extracting the diagonal elements of M . If Am (M) is dened as in (12), then
diag M
for all m 2 I n
Proof: Note that by denition, c(m(i; case i 6= j while even c(m(i;
so that nonzero coecients of M ij occur only for some (i; pairs depending on m. Hence
straightforward calculation shows, using
which exactly corresponds to (15). 2
Observe that for we have, from m >
Parillo [12] showed that M 2 K 1
n if the following system of linear matrix inequalities has a solution.
where M (i) 2 Sn for
The converse is also true: if M 2 K 1
n then the system of LMI's (17){(20) has a solution; this was used
by De Klerk and Pasechnik [5] without giving a rigorous proof. We will now give a complete proof,
by using our new characterizations of the cones K r
n in Theorem 2.2 for 1. Note that
in this case. We will use a shorthand notation where ijk as a subscript indicates the multi-index
Theorem 2.3 M 2 K 1
n if and only if there are n symmetric nn matrices M (i) 2 Sn for
such that the system of LMI's (17){(20) is satised.
Proof: First assume that M 2 K 1
. By Theorem 2.2 there exists a f
d satisfying (13) such
that
where e
By (15), we have A iii
n. Similarly, the left-hand sides of (13) read in case
f
f
f
Now put S (i)
M ijj;ikk for all triples (ijk). Then S (i)
since it is a principal submatrix of the
positive-semidenite matrix f
M . Hence setting M we see that condition (17) is satised.
It remains to show that (18){(20) hold. Now
and similarly
ii 2S (i)
whereas
f
f
because the diagonal entries of f
M cannot be negative. Thus we have constructed a solution to the
system of LMI's (17){(20).
Conversely, assume that a solution to (17){(20) is given. Observe that
The rst sum is obviously a s.o.s., since M M (i)
n for every i. The second sum can likewise be
written as a s.o.s. because of
i<j<k
ii x 3
i<j<k
rh
where we have used the non-negativity condition (20) to obtain the last equality. Note that the rst
two sums of the last expression vanish due to (18) and (19). Thus P (1) (x) is represented as a s.o.s. 2
By closer inspection of the preceding proof we see that the condition (17) can be relaxed, to arrive at
a (seemingly) less restrictive system of LMI's, namely:
Indeed, the rst sum in (22) is still a s.o.s., since M M (i)
n for every i, and because
of Theorem 2.1. Hence (24){(27) constitute an alternative characterization of K 1
n , which in the next
section will turn out to be quite insightful. There we will also specify an (apparently) even more
relaxed characterization of K 1
n , see (40)|(43) in Subsection 2.2 below. With slightly more eort, one
could derive similar systems of LMI's for the cones K r
2. However, d then increases so rapidly
with n (recall that that the resulting problems become too large for current SDP solvers
| even for small values of n.
We therefore change our perspective in the next subsection, to arrive at a series of LP approximations
of the copositive cone. These approximations are weaker than the SDP ones, but can be solved more
easily.
2.2 LP relaxations yielded by nonnegativity
We start with a simple observation: If the polynomial P (r) (x) has only nonnegative coecients, then
it is already allows a sum-of-squares decomposition. This motivates the following denition.
Denition 2.2 (De Klerk and Pasechnik [5]) The convex cone C r
n consists of the matrices for
which P (r) (x) in (10) has no negative coecients. Hence for any r, we have C r
Again, we obviously have C r
n for all r. We can immediately derive a polyhedral representation
of the cones C r
this characterization has not appeared in the literature.
Theorem 2.4 For any m 2 IR n , dene Diag m as the n n diagonal matrix containing m as its
diagonal, i.e., satisfying diag (Diag m) = m. Then for all r 2 IN 0 and n 2 IN,
Proof: Follows from (14) in Theorem 2.2 and Lemma 2.3, with the help of the basic relations
Note that C 0
n if and only if M 2 Sn with
This follows from Theorem 2.4 by the same arguments as in Theorem 2.3. We can also establish an
alternative characterization of C 1
n similar to that in Theorem 2.3:
Theorem 2.5 M 2 C 1
n if and only if if and only if there are n symmetric n n matrices M (i) 2 Sn
such that the following system of linear inequalities has a solution:
Proof: Suppose that M 2 C 1
n and dene N (i)
jk as follows:
Then N (i) 2 Sn and because of (28) and (29) we get N (i) 2 Nn . Further, M
Finally, (30) implies (34) because M (i)
contains three distinct elements due to the
denition of N (i) . The converse follows as in the proof of Theorem 2.3, without taking square roots
in (23). 2
By comparing (31){(34) to (24){(27) we see that merely S
in (24) has been shrunk to Nn
in (31). This re
ects the fact that C 1
Further, the two equalities (32) and (33) can be replaced with inequalities, without changing the
characterization:
n if and only if there are n symmetric nn matrices M (i) 2 Sn for
such that the following system of linear inequalities has a solution:
Similarly, also M 2 K 1
n if and only if there are n symmetric n n matrices M (i) 2 Sn for
such that the following system of LMI's has a solution:
ii 0;
Indeed, we may use non-negativity via (41), (42) and (43) in (23) to obtain the desired s.o.s. decomposition
there, and an analoguous argument without taking square roots applies to establish suciency
of (36)|(39).
Every strictly copositive matrix M lies in some cone C r
suciently large; this follows from a
famous theorem of Polya [13]. In summary, we have the following theorem.
Theorem 2.6 (De Klerk and Pasechnik [5]) Let
n +Nn be strictly copositive. Then there
are integers r K (M) and r C (M) with 1 r K (M) r C (M) < +1, such that
for all r r K (M) while
n , and similarly
for all r r C (M) while
n .
The rst part of the theorem (concerning the cones K r
already follows from arguments by Parillo
[12].
In order to bound the number r C (M) from above we need the following result from De Klerk and
Pasechnik [5], which in turn is a consequence of a result of Powers and Reznick [14].
Theorem 2.7 (De Klerk and Pasechnik [5]) If a symmetric (n n) matrix M is strictly copos-
itive, the function
has no negative coecients, and hence allows for a sum of squares decomposition, if
r > L= 2;
where
and
z > Mz: (45)
In other words, if a strictly copositive matrix M satises L= 1 r for some integer r, where L and
are respectively dened in (44) and (45), then M 2 C r
equivalently,
r K (M) r C (M) dL= 1e :
Note that is a 'condition number' of M which can be arbitrarily small in general, and which is
NP-hard to compute.
3 Approximation results
In this section we consider families of LP and SDP approximations to p
prove a bound on the quality of these approximations.
3.1 LP-based approximations
Let us dene:
for which has dual formulation
Note that problem (47) is a relaxation of problem (4) where the copositive cone is approximated by
n . It therefore follows that p (r)
C p for all r. We now provide an alternative representation of p (r)
C .
This representation uses the following rational grid which approximates the standard simplex:
r+2 I n (r fy
A naive approximation of problem (1) would be
The next theorem shows that there is a close link between p (r)
C and the naive approximation p (r) . In
particular, one can obtain p (r)
C in a similar way as the naive approximation p (r) is obtained, i.e. by
only doing function evaluations at points on the grid (r).
Theorem 3.1 For any r 2 IN 0 consider the rational discretization (r) of the standard simplex
from (48). If Q is an arbitrary symmetric n n matrix and q
r+2 diag Q, then
Proof: First we use the representation of C r
n from Theorem 2.4, putting
observing that from (15) and (16),
diag Q
Then by (47) we have
diag Q
which gives (49) by putting
3.2 SDP-based approximations
Similarly as in the denition of p (r)
C , we can dene SDP-based approximations to p using the cones
n instead of C r
for which has dual formulation
It may not immediately be clear that the optimal values in (50) and (51) are attained and equal.
However, this follows from Theorem 1.1 by noting that
feasible in problem
(50) as well as strictly completely positive and therefore in the interior of (K r
similarly, feasible solution of (51) in the interior of K 0
n , and consequently in the
interior of K r
n for all
Note that p (r)
C for all
n .
3.3 A bound on the quality of approximation
We will show that the dierence p p (r)
C can be bounded in terms of r and of the range Qmax Q min
of the data, where we put
Recall that we assumed linear independence of fQ; En g which implies in particular Q min p < Qmax
(indeed, otherwise we got 0 z > (QmaxEn Q)z Qmax p which were only
possible
Theorem 3.2 Consider an instance of the standard quadratic optimization problem (1). For a given
integer r 1, dene p (r)
C as in (47), and Qmax and Q min as in (52). One has
Proof: First note that the assertion is trivial in the exact case p (r)
whence we assume that
in the sequel. Further, as Q Q min En 2 Nn C r
C Q min . Next,
without loss of generality we may and do assume that p Qmin
if the contrary were
the case, then we are done because of
If now p Qmin
holds, then in particular necessarily p > Q min . Let us consider the
function
which is continuous, positive and strictly increasing on the interval [Q min
while '(p) % +1 as p % p . Hence there is a p 2]Q min ; p [ such that
pEn .
We claim that M 2 C r
. To this end, we proceed to bound the parameters and L in Theorem 2.7
for this matrix M :
z
z > Qz
and also
Hence
and by Theorem 2.7, we obtain M 2 C r
n . Invoking again (47), we deduce
C < p . Now ' is
increasing, thus
'(p (r)
Finally, the obvious relation Qmax Q min maxfQmax p (r)
yields
'(p (r)
which in turn immediately implies the assertion via (54). 2
Finally we notice that a direct derivation of this approximation result via the alternative grid representation
in Theorem 3.1 does not seem to be straightforward.
4 Comparison with known approximation results
Consider the generic optimization problem:
:=
for some nonempty, bounded convex set S, and let
Denition 4.1 ([11]) A value approximates with relative accuracy 2 [0; 1] if
We say approximates with relative accuracy 2 [0; 1] in the weak sense if
The approximation is called implementable if .
It is known from Bellare and Rogaway [1] that there is no -approximation of the optimal value of
the problem
for some 2 0; 1 in the weak sense, unless
Using semidenite programming techniques, the problem
can be approximated with the relative accuracy (1 O(1= log(n))), see [11] and the references therein.
Note the the standard quadratic optimization problem (1) is a special case of this problem where
we pass from minimization to maximization. The result in Theorem 3.2 can be restated
as: p (r)
C is a -approximation of p in the weak sense for
r Qmax Q min
1:
Thus p (r)
C is only a polynomial-time -approximation of p for instances where Qmax Q
4.1 Special case: the maximal stable set problem
E) be a simple graph and let (G) denote its stability number (cardinality of the largest
stable set). It is known from Motzkin-Straus [8] (see also De Klerk and Pasechnik [5])
x
where A is the adjacency matrix of G and I n denotes, as usual, the n n identity matrix.
The stability number (G) cannot be approximated in polynomial time to within a factor jV j 1
2 for
any > 0 unless or within a factor jV j 1 for any > 0 unless
If we denote I n and dene
C is dened in (46), then we may assume
without loss of generality (r) 2 (assume G is not a complete graph). This means p (r)
2 and
hence with and ' from (53), we get
(p p (r)
Now we apply the inequality (54), to arrive at(G) (r)
(r)
If we set then we can rewrite (56) as the equivalent inequality, by isolating (r)
and subtracting (G):
Hence we get (r) (G) < 1 which implies b (r)
This was the main result by De Klerk and Pasechnik [5]; in other words, Theorem 3.2 generalizes this
result.
5 Examples
Here we give some examples for problems of various origin.
Example 5.1 Consider an instance of the standard quadratic optimization problem (1), where the
matrix Q is given by:
This example corresponds to computation of the largest stable set in a pentagon (see Section 4.1 and
[5]). We have p (0)
5 0:44721, and p (1)
1. The proof that p (1)
1requires the observation that the matrix
is known to be in K 1
(but it is not in K 0
n +Nn ); for a proof, see [12].
Example 5.2 Consider an instance of the standard quadratic optimization problem (1), where the
matrix Q is given by:
This example corresponds to computation of the largest stable set in the complement of the graph
dened by the skeleton of a dodecahedron (see Section 4.1 and [5]). Here p
0:309 but the
approximation yield the trivial lower bound: p (1)
This example shows that { even though the
approximation p (1)
is much more expensive to compute than p (1)
(see Section { it can yield a much
better lower bound on p . This example | rst considered in [5] | is the smallest problem we know
where the p (1)
approximation to p is not exact. It remains an open problem to nd the smallest value
of n where the p (1)
K approximation to p is not exact.
Example 5.3 This example is from a mathematical model in population genetics [18], where, among
others, the following matrix 410A is considered:
and the objective is to maximize x >
Qx subject to x 2 . There are 5 dierent local solutions to
this problem. The globally optimal value here is 16 1which corresponds to
changing to a minimization problem of the form (1) with a nonnegative coecient matrix, we obtain the
upper bound 21 for the optimal value via computation of p (1)
, while the approximation via computation
of p (1)
K is exact.
Example 5.4 This example deals with portfolio optimization and is taken from Berkelaar et al. [2].
Here, x 2 corresponds to a portfolio: x i is the fraction of your capital to be invested in investment i.
Given a portfolio x 2 there is a risk x >
Qx associated with the portfolio which should be minimized,
and an expected return r > x to be maximized. An example from [2] has data:
0:82 0:23 0:155 0:013 0:314
0:23 0:484 0:346 0:197 0:592
0:155 0:346 0:298 0:143 0:419
0:013 0:197 0:143 0:172 0:362
and
(note that the matrix
Q is not positive semidenite). We can formulate this (multi-objective) problem
in the form (1) as follows:
min x2
x >
for some parameter c > 0 measuring risk-aversion; this problem is now of the form (1) if we set
. For
K 0:4839 and p (1)
yields the objective value 0:3015, which suggests that the SDP relaxation is exact.
6 Numerical results
We rst compare the LP approximation p (1)
C of p with the stronger approximation p (1)
K .
To this end, we generated 1000 instances of (1) with and where the matrices Q are symmetric
with entries uniformly distributed in [0; 1].
In
Figure
1 we show a histogram with the 'distribution' of the ratios p (1)
K for the 1000 test
problems. Note that in about 3
4 of the cases the ratio is (close to) unity. This shows that the LP-based
approximations are comparable to the SDP ones in this sense. However, the computation of
C is much cheaper than that of p (1)
K | in
Table
some typical solution times are given for growing
values of n. In all cases the computer used was a Pentium II (450 MHz). The LP and SDP solver was
SeDuMi [17] by Jos Sturm running under Matlab 5.3.
K (sec)
25 4.12 not run
6.86 not run
11.2 not run
40 26.5 not run
Table
1: Typical CPU times for solving the respective LP and SDP relaxations for growing n.
The next set of experiments we performed was to approximate the stability number of random graphs
by computing the p (1)
and p (1)
approximations to the optimal value of problem (55). For this purpose
we generated 20 graphs on 12 vertices to have stability number 6. The edges outside the maximal
of LP:SDP approximation
Figure
1: Histogram showing the distribution of the ratio p (1)
K approximation values for 1000
random instances of (1) with
stable set were generated at random with the probability of including an edge between two given
vertices outside the maximal stable set being 1. In all cases the p (1)
approximation was exact while
the p (1)
approximation gave the trivial zero lower bound. 1 This indicates that Example 5.2 is quite
special | it is dicult to nd a graph on 12 vertices where p (1)
K does not give the stability number.
It also shows that | although the p (1)
C approximation is quite useful for random instances of (1) | it
fails for most maximum stable set problems.
Conclusions
We have suggested a novel approach to approximating the optimal value of the standard quadratic
optimization problem (1) | the problem (1) is rst rewritten as a copositive programming problem,
and subsequently the copositive cone is approximated by using systems of linear or linear matrix
inequalities. The resulting approximations are therefore LP's or SDP's, depending on which approximation
scheme is used. Higher order approximations are also possible, where the resulting LP's and
SDP's become larger, but the approximation is also provably better. In particular, we have quantied
the quality of the approximation as a function of the order of approximation (Theorem 3.2).
Moreover, we have presented numerical evidence showing the quality of the approximations.
Acknowledgement
The authors would like to thank Kees Roos for his comments on a draft version of this paper.
1 It is possible to see a priori that the p
(1)
approximation will be useless, by using Theorem 2.4; see also De Klerk
and Pasechnik [5].
--R
The complexity of approximating a nonlinear program.
Sensitivity analysis in (degenerate) quadratic programming.
On standard quadratic optimization problems.
Approximation of the stability number of a graph via copositive programming.
Improved approximation algorithms for maximum cut and satis
Clique is hard to approximate within jV 1
Maxima for graphs and a new proof of a theorem of T
Some NP-complete problems in quadratic and linear programming
Interior point methods in convex programming: theory and applications.
Nonconvex quadratic optimization.
Structured Semide
A new bound for P
A mathematical view of interior-point methods in convex optimization
Copositive relaxation for general quadratic programming.
Using SeDuMi 1.02
Patterns of ESS's I.
--TR
--CTR
Kurt M. Anstreicher , Samuel Burer, D.C. Versus Copositive Bounds for Standard QP, Journal of Global Optimization, v.33 n.2, p.299-312, October 2005
E. Klerk , D. V. Pasechnik, A linear programming reformulation of the standard quadratic optimization problem, Journal of Global Optimization, v.37 n.1, p.75-84, January 2007
Etienne de Klerk , Monique Laurent , Pablo A. Parrilo, A PTAS for the minimization of polynomials of fixed degree over the simplex, Theoretical Computer Science, v.361 n.2, p.210-225, 1 September 2006 | linear matrix inequalities;approximation algorithms;stability number;standard quadratic optimization;semidefinite programming;copositive cone |
596513 | Active Management Framework for Distributed Multimedia Systems. | The successful deployment of next-generation distributed multimedia systems is significantly dependent on the efficient management support that improves the performance and reliability of such applications at run-time. In this paper, we describe an active management framework based on programmable monitoring agents and event-filter-action recursive model. Active management enables users to define reconfigurable and self-directed monitoring tasks that can be automatically customized at run-time in order to track the system behavior. Using this active management framework, the monitoring agents can be programmed to modify their monitoring tasks dynamically based on observed events information, and initiate the appropriate management actions accordingly. This paper also emphasizes the importance of active management for supporting a scalable, highly responsive and nonintrusive distributed management infrastructure. The presented framework, which is referred to as HiFi monitoring system, supports a comprehensive environment including code instrumentation, user subscription, agents administration, event filtering and action service. Examples of using HiFi in managing large-scale distributed multimedia systems are also shown. | Introduction
The next-generation distributed multimedia systems are large-scale, resource intensive and
highly dynamic. With the increasing demands of deploying large-scale distributed multi-media
(LDM) systems, an efficient on-line monitoring and control has become an essential
service for improving the performance and reliability of such complex applications. Examples
of LDM systems include large-scale collaborative distance learning, video telecon-
ferencing, distributed interactive simulation, and reliable multi-point applications. In an
LDM environment, large numbers of events are generated by system components during
their execution and interaction with external objects (e.g. users or processes). These events
must be monitored to accurately determine the run-time behavior of an LDM system and
to obtain status information that is required for management operations such as steering
applications or performing a corrective action [7, 16]. However, the manner in which events
are generated in an LDM system is complex and represents a number of challenges for an
on-line monitoring system. Correlated events are generated concurrently and can occur
from multiple locations distributed throughout the environment. This makes monitoring
an intricate task and complicates the management decision process. Furthermore, the large
number of entities and the geographical distribution inherent with LDM systems increases
the challenge of addressing important issues, such as performance bottlenecks, scalability,
and application perturbation.
HiFi active monitoring system is an attempt to deliver a management architecture that
explicitly addresses the challenges and requirements associated with managing large-scale
distributed multimedia systems. HiFi active monitoring system supports dynamic and automatic
customization of the management operations as a response to changes in LDM systems
behavior [19, 24]. This is achieved through programmable monitoring agents that re-direct
their monitoring activities on-the-fly upon users' requests and based on the information
(events) collected during the monitoring operation. For instance, instead of monitoring
all events and processes in the system, the agents monitor a subset of events/processes
and the monitoring activities expand based on the information of the generated events.
Therefore, active monitoring reduces the monitoring space significantly and offers a scalable
management architecture. The monitoring intrusiveness is also minimized because
this architecture enables initiating few monitoring tasks (targets) at the proper time. In
addition, HiFi active monitoring enables the agents to react spontaneously (e.g., corrective
actions) which improves the management operations response time compared with human-
in-the-loop model [21].
A number of monitoring approaches and systems for monitoring distributed systems have
been proposed (e.g., [5, 11, 15, 17, 21, 22, 23]). Although some of these systems provide
mechanisms for modifying the monitoring requests dynamically, these mechanisms are manual
(i.e., they require human intervention) and insufficient to support a programmable or
self-directed monitoring tasks (actions) as described in this paper. In addition, they do
not support a scalable and fine grain event filtering mechanism which is significant for
monitoring "large-scale" distributed systems such as Internet-based applications.
This paper is organized as follows: Section 2 explains the monitoring model and language
specifications, Section 3 gives an overview of HiFi monitoring architecture and process,
Section 4 describes our active monitoring approach and its impact on the management
infrastructure, Section 5 provides an overview of the monitoring system implementation,
Section 6 illustrates, by example, the effectiveness of using HiFi for steering distributed
multi-point applications, Section 7 shows the evaluation of HiFi performance, scalability
and system perturbation, and Section 8 presents the summary and concluding remarks.
Monitoring Model
In order to present a complete abstraction of the active monitoring architecture, our work
must include modeling the application behavior, the monitoring demands, and the monitoring
mechanism with considering the design objectives presented in Section 1. The program
behavior can be expressed in a set of events revealed by the application during execution.
In our monitoring model, we call the monitored programs event producers which continuously
emit events that express the execution status. An event is a significant occurrence
in a system that is represented by a notification message. A notification message typically
contains information that captures event characteristics such as event type, event values,
event generation time, event source, and state changes. Event signaling is the process of
generating and reporting an event notification. We classify two types of events used in our
model: primitive events which are based on a single notification message, and composite
events which depend on more than one notification message. In the monitoring language,
the event format (notification) is a variable sequence of event attributes determined by the
user but it has a fixed header used in the monitoring process. An event attribute is a predicate
that contains the attribute name which typically represents a variable in the producer
(i.e, program) and a value. The event format also determines the type of event signaling:
Immediate to forward the generated event immediately, or Delayed to allow buffering or
batching events in the producer before sending them. Table I shows the High-level Event
Specification Language (HESL) in BNF. This event abstraction enables consumers (1) to
specify any arbitrary event format in a declarative way, and (2) to construct a complex
(multi-level) abstraction of a program behavior using composite events. In addition, the
event abstraction enables the consumers/users to assign values to the event attributes and
does not require specifying attribute type (e.g., int, float or string). This provides a
simpler interface than CORBA IDL [11].
We call the monitoring objects (e.g., human or software programs) event consumers since
they receive and present the forwarded monitoring information. The consumers specify
their monitoring demands via sending a filter program via the subscription process which
configures the monitoring system accordingly (see Section 3). The monitoring operation is
an event-demand-driven model. In other words, the producer behavior is observed based
on the event generated (event-based) and on the monitoring requests (subscription-based).
Therefore, as illustrated in Figure 1, events received in the monitoring system are classified
based on exiting filters. If an event is detected, the action specified in the filter is performed
such as forwarding the monitoring information to the corresponding consumers. The filter
and action specifications are described in Section 4. We show in Figure 1 three management
applications of this model: manual fault recovery that requires forwarding the monitoring
information, automatic fault recovery that permit the monitoring system to perform actions
on the event producers, and application steering in which the application acts as an event
producer and consumer in order to tune its parameters.
3 Overview of HiFi Monitoring Architecture
HiFi employs a hierarchical event filtering-based monitoring architecture to distribute the
monitoring load in application environment. Based on a user's monitoring requests, the
monitoring system determines the appropriate agent or set of agents within the hierarchy
to be tasked with inspection and evaluation of application events. The monitoring system
uses fine grain decomposition and allocation mechanisms to ensure that filtering tasks are
efficiently distributed among the monitoring agents and prevent events propagation in the
network. Since our focus in this paper is on the programmable monitoring environment in
HiFi, we give a brief overview of the HiFi system and refer to [1, 3, 4] for more details.
Hierarchical Monitoring Agents: In HiFi monitoring system, the task of detecting
primitive and composite events is distributed among dedicated monitoring programs called
monitoring agents (MA). MA is an application-level monitoring program that runs independently
of other applications in the system and that communicates with the outside world
(including producers and consumers) via message-passing. HiFi has two types of MAs: local
monitoring agents (LMA), and domain monitoring agents (DMA) (see Figure 2). The former
is responsible of detecting primitive events generated by local applications in the same
machine while the latter is responsible of detecting composite events which are beyond the
LMA scope of knowledge. One or more producer entities (i.e., processes) are connected to
a local LMA in the same machine. Every group of LMAs related to one domain (geograph-
ical or logical domain) is attached to one DMA. These DMAs are also connected to higher
DMAs to form a hierarchical structure for exchanging the monitoring information. Because
of the different roles of LMA and DMA, LMAs use Direct Acyclic Graph (DAG) [6], how-
ever, DMAs use Petri Nets (PN) in order to record and track the event history [9].
Subscription Process: The monitoring process starts by a consumer sending a filter
program that describes the monitoring request to the local MA. The filter is validated and
decomposed into subfilters (e.g. F1, F2,.,Fn) using the decomposition algorithms in such a
manner that each one represents a primitive event [1]. Then, each decomposed subfilter is
assigned to one or more LMAs using the allocation algorithms based on the event sources
and application distribution. The decomposition and allocation algorithms are described
in [1]. The monitoring system also determines the proper DMAs for evaluating the event
and the filter expression of the filter program. When MAs receive delegated monitoring
tasks (subfilters) [10], they configure themselves accordingly by inserting this subfilter in
the filtering internal representation which is a direct acyclic graph (DAG) for LMAs and
Petri Nets (PN) for DMAs [4]. This architecture alleviates any performance bottlenecks
or scalability problems by distributing the monitoring load among MAs and limiting the
events' propagation to the originating sources [1].
4 Techniques for Active Monitoring
The main goal of active monitoring is to offer dynamically customizable monitoring tasks.
This provides a flexible management infrastructure that scales well with number of producers
and causes a minimal overhead in the application environment as shown in Section 7.
In addition, active monitoring, in HiFi, reduces the monitoring latency because monitoring
agents can customize their monitoring tasks automatically without users involvement. In
this section, we describe the HiFi active monitoring architecture and its impact on improving
scalability and reducing the perturbation of the monitoring system.
4.1 Filter-based Programmable Agents
In HiFi, users (or event consumers) describe their monitoring demands via programs called
filters submitted to the monitoring system at run-time. A filter is a set of predicates where
each predicate is defined as a boolean-valued expression that returns true or false. Predicates
may be joined by logical operators (such as AND and OR) to form an expression. In our model,
the filter consists of three major components: the event expression which specifies the
relation between the interesting event, filter expression which specifies the attributes value
or the relation between the attributes of different events, and the action to be performed if
both event and filters expressions are true. Table II shows the High-level Filter Specification
Language (HFSL) in BNF.
Consumers may add, modify or delete filters on-the-fly through the subscription component
interface described in Section 5. When a consumer performs filter subscription, the
monitoring agents reconfigure itself accordingly by updating their internal filtering representation
[4]. Different consumers can potentially send different filters simultaneously.
However, since the dynamic subscription may create an inconsistency in the monitoring
environment, HiFi uses the subscription protocol, described in [3], to ensure an atomic state
update and synchronization among the monitoring agents.
As the event abstraction emphasizes the declarative aspect of the model, the filter-based
programming abstraction enables consumers to describe the relation expression between
different events and their attributes as well, which improves the expressive power and the
usability of the monitoring language. This feature permits the agent to perform fine-grain
filtering based on regular expressions. For example, assume agents have been configured
through filter to detect warning events, AudioWarning and VidWarning, generated from
Audio and Video processes, respectively. Consumers can limit the monitoring granularity
by re-programming the MAs at run-time to detect only the event correlation between these
two events such that they are both generated by the same machines via sending the following
filter.
[FORWARD];Warnings Correlation Filter.
After decomposing and allocating this filter, the DMA will only forward Audio and Video
warning events that are generated in the same machine. Consumers can also deactivate or
modify an existing filter using DEL and MOD in the action part (see Table III). In addition,
the programming environment permits consumers to overload the attributes values in the
events in order to create a different event instance in the filter program.
4.2 Event Incarnation
Actions in the monitoring model can be simply executing a program (local or remote) or
forwarding the detected event to the corresponding consumers which are both necessary
for automatic fault recovery and application steering, respectively. In order to improve
the dynamism and the expressive power of the monitoring system, the model provides more
complex actions: event and filter incarnation. In HiFi, generating new events as an action is
called event incarnation in HiFi. This feature improves the performance, expressive power,
and usability of the active management system as follows:
ffl The event incarnation enables the consumer to activate a sequence of monitoring
operations automatically using event-filter-action programming model (see Figure 1)
without having the user to intervene in the monitoring process. This new event may
trigger other filters which in turn causes performing further actions such as checking
the status of other running processes. For example, a failure may occur in a producer
(process) as a result of abnormal close of a communication channel (primitive event).
In this case, the management operation involves failure recovery as well as sending
an event that triggers a new filter to further diagnose the process that closed the
connection.
ffl An action could generate a "summary" event which summarizes the information of
detecting a composite event (e.g., the event expression consists of multiple events).
This enables suppressing the information of multiple events into one event (summary
thereby avoiding event report implosion and reducing the event traffic. For
example, a monitoring agent may be requested to generate a summary event that
conveys the drop rate average of a set of receivers. We will present an application
example of summary events in Section 6.
ffl Performing an action such as executing a program may change the state of a running
program. Therefore, sending an event that reveals the state change to the monitoring
system is important to allow re-observing the behavior, and enabling automatic application
steering. This significantly important for attaining system stability during
the steering process as shown in Section 6.
4.3 Filter Incarnation
In addition to the manual reconfiguration via dynamic users subscription described in Section
3, HiFi active monitoring also supports programmable agents that reconfigure themselves
automatically based on events occurrences. A filter action can be a filter manipulation
(typically, adding a new filter, deleting a filter, and modifying a filter). Thus, for example,
another new filter can be activated in the monitoring environment as a result of detecting
an event. We call this filter incarnation and shown in Figure 1. Filter incarnation is formally
defined in Table III of the monitoring language. Adding a new filter means activating
a pre-defined filter that has not been submitted to the system. This is specified in the
monitoring language using a special reserved word (ADD) with the pre-defined filter name.
On the other hand, deletion or modification must be performed on an existing filter that
consumers subscribed to. This is specified using the reserved words, MOD and DEL, with an
active filter name. When modifying an active filter, consumers must specify which parts to
modify: event expression (EX), filter expression (FX), or both. This can be designated by
appending the filter name as a prefix to EX and/or FX. The resulting EX and/or FX are the
effective filter parts after the subscription is completed.
Filter incarnation enables users to define "general" monitoring tasks that can be automatically
customized by the agents at run-time in order to track and diagnose specific system
behavior such as failures or performance bottlenecks. This avoids overwhelming the system
by a large number of "static" (hardwired) monitoring tasks to observe all or most system
activities. Consequently, consumers can initiate filters that can modify (change or expand)
their monitoring scope in order to include other monitoring targets (events and processes)
whenever certain events are detected. In the following, we describe various applications of
filter incarnation in active monitoring.
Adding/Deleting Filters for controlling monitor timing: Consumers can specify
start and end times for any given monitoring activity based on events. In other words, consumers
can specify to start/stop a monitoring activity when a certain event (primitive or
composite) is detected. This minimizes the monitoring overhead and produces concise event
traces. For example, assume a consumer wants to monitor the drop rate in the "receiving"
events (RecvEvent) of bar program only when the transmission rate in the "transmission"
event (TransEvent) of foo program drops below a certain threshold (STHRESHOLD). In
this case, the consumer can specify a filter (MonitorSender) that monitors the "transmis-
sion" events of foo which will trigger another filter (MonitorReceiver) that monitors the
"receiving" events of bar if the transmission rate drops below the threshold. The filters
example is shown below.
[ADD MonitorReceiver]; MonintorSender:
[F ORWARD]; MonintorReceiver:
The MonitorReceiver filter monitors "receiving" events (RecvEvent) from foo and forwards
them to consumers if their drop rate exceeds RTHRESHOLD. Similarly, the MonitorReceiver
filter can be deactivated (deleted) based on the transrate value changes in the TransEvent.
This permits activating MonitorReceiver filter at the proper time automatically and minimizing
the monitoring perturbation in the application environment.
Modifying Filters Specifications: Usually, monitoring tasks are static and defined prior
to any monitoring operation. However, using filter incarnation, the filter information (e.g.,
attribute values) can be determined during the monitoring process itself based on the contents
of the detected events. For this purpose, the HASL provides a set of virtual registers
called filter registers that consumers can use for loading/restoring variables in/from monitoring
agents. These registers are used by MAs to restore attribute values of received
events. Consumers can simply assign the attribute value of an event used in EX or FX
to a filter register and vice versa for this purpose. For example, consumers may want to
monitor all events (trace) of the processes that have generated a security warning event
(WarningEvent). In this case, the monitoring agents can not identify the module name
information from the monitoring request (i.e., filter subscription). However, the monitoring
agents can determine the module name during the monitoring operations. This is achieved
by using the filer registers to save and restore the event information. In the following, the
DynamicErrorTrace is a filter specification example that uses filter registers and filter incarnation
to program the agent operations dynamically. In the following example, ThisMod
is a filter register that restores the module name (ModuleName) after the occurrence of
WarningEvent of type SECURITY. Then, the filer incarnation is used to modify the filter
expression of TraceProcess filter in order to monitor/trace all events from this particular
process/module only.
MOD T raceP rocess:F
TraceProcess:
The TraceProcess is a "generic" filter that monitors and forwards all events from all modules
to the corresponding consumers (Notice that "ANY" is a language keyword that indicates
any string value). However, this general filter is customize by DynamicErrorTrace filter
in order to perform a specific monitoring operation. As a result, this technique enables
activating/deactivating the appropriate monitoring operations (or filters) at the right time
and avoiding the overhead of launching multiple filters or monitoring requests
simultaneously. It also reduces the monitoring latency since monitoring agents can be
programmed to react spontaneously without consumers intervention. Moreover, the filter
incarnation feature provides an extendible programming environment utilizing the power of
the event-filter-action recursive model as shown in Section 6.
5 HiFi Monitoring System Implementation
HiFi consists of four main components: Instrumentation, Subscription Service, Event Filtering
and Control. Figure 3 shows the design of the monitoring system in component level
and their interactions. Here, we provide an overview of the HiFi design components but
detailed description is presented in [4] and [1].
Instrumentation Component: The process of inserting monitoring instructions inside
the code of observed programs is called the instrumentation process. The instrumentation
component utilizes the event information (HESL) supplied by the subscription component
to construct low-level event formats called Event Reporting Criteria (ERC) that contains
events information such as event location, reporting mode, event attributes, and the type of
each attribute. The ERC is then used by the Event Reporting Stub (ERS) for constructing
and reporting the event notification. The ERS is a HiFi library linked with the monitored
application during compilation to facilitate event reporting. The main function of the instrumentation
component is to facilitate the process of inserting the monitoring instruction
(sensors) inside the program code. In many monitoring systems [17, 20], programmers
write a considerable size of code for each generated event. This makes the instrumentation
task tedious and error-prone. In HiFi, users only insert the user sense that specifies
just the event name (e.g., ReportEvent(WarningEvent)). The instrumentation component
then pre-processes the instrumented code and replaces user sensors with extended system
sensors that contain all events related information such as machine name, process name,
report mode and the attributes types and values. When the program starts executing, the
control is transferred to the ERS which creates (i.e., forks) the LMA and initiates the agents
organization protocol (described in [3]) in order to establish the agents' hierarchy described
in Section 3.
Subscription Service Component: The monitoring subscription is the process by which
the consumers would express their monitoring demands represented in filter programs using
HFSL. There are two major subcomponents in the subscription service: (1) Monitoring
Language Processor which is used for validating, parsing, and constructing the monitoring-
knowledge necessary for distributing events and filtering tasks, and (2) Monitoring Information
Processor which is used for decomposing and allocating such information to generate
monitoring tasks executable by the monitoring agents, and packaging and disseminating
the produced information such as event and environment information to the agent networks
using reliable multicasting. The subscription component is also responsible for receiving
and presenting the event notifications forwarded from the MAs.
Event Filtering Component: The event filtering component is the core component of
the monitoring system and it constitutes the internal architecture of the monitoring agents,
LMA or DMA. Its main functionality is (1) receiving and processing filtering tasks delegated
from the subscription component after decomposition and allocation, and (2) inspecting in-coming
events based on the event attributes and the filters information (i.e., filter internal
representation) to determine if this event is interesting (detected) or irrelevant (rejected) [4].
This component operates on the event filtering internal representation that represent the
monitoring information such as consumers' subscriptions and event specifications. The internal
filtering representation can be Direct Acyclic Graph (DAG) or Petri Nets (PN). In
particular, because of the different roles of LMA and DMA, LMAs use DAG, however,
DMAs use PN in order to keep track of the event history. In other words, each filter is
implemented in the monitoring agents as sequence of DAG and PN nodes.
Control Component: The control component is provided to support reactive control
management applications. The main function of this component is to perform the actions
specified in a filter program. There are four types of actions supported by the monitoring
architecture: program execution, information dissemination, event generation (incarnation)
and filter incarnation (see Table III). As shown in Figure 3, the control component has two
major subcomponents: dissemination service which uses multicasts information to the corresponding
consumers, and action service which is used to execute local or remote programs,
send a new event and/or perform filter incarnation (i.e., adding, modifying or deleting an
existing filter).
6 Active Management for Steering Distributed Multi-point
Applications
The HiFi monitoring system is being used in a number of management applications such as
application steering, fault recovery and debugging of distributed multimedia systems. In this
section, we present an example of using HiFi for monitoring and steering Reliable Multicast
Server (RMS) [2]. One of the known problems in some reliable multicasting, is the effect of
slow members (e.g., machines) in group communication. A machine is described as a slow
machine if its receiving rate is "much" less than the other members in the group. In this case,
a slow machine could typically slow down the communication to the entire group because
the sender transmission rate, in RMS, eventually adapts to the rate of the slowest receiver.
Developing a solution for slow members in multicast groups is beyond the scope of this paper.
However, this application example is to show the effectiveness of HiFi active monitoring
approach in supporting a dynamic discovery mechanism of slow members (or machines)
during a multicast session, and providing an automatic feedback to the RMS senders which
make the proper steering management decision accordingly. The criteria of slow members
are defined based on the user specifications. For example, the user (or manager) may define
a slow member whose performance is below a certain threshold. In our example below,
the RMS sender acts as a manager and sends the threshold information. Figure 4 shows
the event (HESL) and the filter (HFSL) specifications used to discover slow members in
multicast groups, and Figure 5 shows the Petri Nets of these filters as constructed in HiFi
agents. Each RMS receiver is instrumented using HiFi instrumentation component to send
McastRec event that contains the machine name, the domain name, the multicast group
name, total bytes received (KBrec) so far, and number of NACKs scheduled (NackSch)
which equals to the number of Nacks sent plus number of Nacks cancelled. Because of
NACK suppression mechanism [8], the number of NackSch gives more accurate estimation
of the drop rate than number of Nacks sent. The McastRec event is sent periodically based
on time limit or maximum number of bytes received. And the RMS senders send McastSend
events to indicate two things: the transmission rate (TransRate), and the drop rate threshold
(threshold) for receivers in the group. Thus, the McastSend and McastRecieved events
convey the status of the senders and the receivers, respectively. In order to activate this
management operation at the proper time and avoid unnecessary use of resources, the
slow members discovery process should be initiated only when the sender suffers some
performance degradation (i.e., low transmission rate) due to the existence of slow members.
This sender is called the unhappy sender and represented with US event in Figure 5. For
this reason, the TransRate (in McastSend event) is first checked by the MonMcastSender
filter (T1 transition in Figure 5) in order to identify the unhappy senders and their group
names, and consequently activate other slow members discovery filters that monitor the
receivers and update the threshold. If TransRate is found below the STHRESHOLD, then
the Slow Members filter is modified to get the GrpName value stored in the filter register as
described in Section 4, and both Slow Members and Update Threshold filter are activated
is fired in Figure 5). The activated Slow Members filter compares the NackSch in
McastRec and threshold in McastSend to identify slow members. However, because the
threshold value is dynamic and may be determined from the overall performance of the
participants, another filter (Update Threshold) is used to provide a feedback on the overall
drop rate average to senders which consequently re-adjust the threshold value accordingly.
Each LMA forwards McastSend and McastRec primitive events to its DMA that evaluates
the filter expression upon receiving both events. The second filter, Slow Members, waits to
receive one McastSend and McastRec events from all LMAs in the domain before the filter
expression is evaluated. The ctr and LMAs are HiFi reserved key words and used to denote
the number of the event occurrences and the number of LMAs in the domain, respectively.
The filter expression evaluates to true if all RMS receivers in the domain send McastRec
event from the indicated group name (GrpName) and the NackSch of one receiver or more
is higher than the threshold. If the filter expression becomes true, then T2 (in Figure 5) fires
and three actions are performed: (1) the average of scheduled Nacks for receivers in same
domain is calculated by CalcAVG action, which fires T3 transition, (2) the DomAVG, which
represents a summary event, is sent to the containing DMA to reveal the domain average,
and (3) the McastRec event that matches the slow member criteria represented in the filter
expression (i.e., NackSch ! threshold) is forwarded to the manager (RMS sender). The third
filter, Update Threshold, receives the DomAVG events from the DMAs and then calculates the
total NackSch average, updates the threshold and sends the McastSend with new threshold
to the LMAs/DMAs again. This causes T4 and T5 transitions to fire and an event S (in
Figure
5) to be sent with the new threshold. This filter can be a DMA task, instead of
RMS senders. However, users must provide the action UpdateThreashold to the DMA which
then can update the threshold and notify the RMS senders automatically. Since senders
or receivers could be members in various multicast groups, the group name (GrpName)
is used to limit this management activities (filters) on the multicast groups suffering from
slow members. In addition, another filter can be used to de-activate Slow Members filter
when the TransRate becomes less then STHRESHOLD. This way the slow members filter
can activated and deactivated dynamically based on the condition of the multicast group.
So in summary, three filters are used in this application: MonMcastSender that discovers
unhappy senders and initiate the discovery process, Slow Members that identifies receivers
below threshold, and Update Threshold that update the threshold value continuously base
on the overall session performance.
The slow members and NackSch average information are collected from each receiver via
LMAs and then combined and propagated in hierarchical fashion via DMAs to the RMS
of the sender. This mechanism is scalable because it avoids the notifications implosion
that may occur when McastRec are forwarded to one RMS sender from group of receivers.
Furthermore, distributing the processing load such as calculating the average drop rate
contributes to the monitoring performance.
7 Performance Evaluation
This section describes a performance evaluation study of the HiFi monitoring system. We
conducted number of benchmarking and simulation experiments to assess the application
perturbation, scalability and latency of HiFi. This section presents the numerical results as
well as the conclusions obtained from this performance study.
Application Perturbation Measurements: The application perturbation can be measured
by the execution time overhead caused by the monitoring operations including the
ERS event reporting process, and monitoring agents (LMAs and DMAs) operations. The
first experiment is performed to evaluate the ERS overhead with respect to the event length.
In order to show the effect of EventReport() function in ERS, used for constructing and reporting
events, we compare its overhead with the traditional C printf() function which is
frequently used by programmers as a simplest way for debugging and inspecting the program
state and behavior. Figure 6 shows that the overhead of EventReport() is very comparable
with printf() and ranges between 100 to 200 microseconds based on the event length. This
figure also shows that ERS overhead grows slowly (about 2% per event attribute) when the
event length is increased.
We then measured the actual overhead caused by the monitoring system including reporting
time (ERS processing), primitive event filtering time (LMAs Processing), event correlation
time (DMAs Processing), UNIX socket communication and the RMS communication. In
order to measure this experimentally, we use a filter correlation example called HelloWorld
filter. In this experiment, two event emulation processes called Random Event Generator
(REG) are used to generate up to 5000 events randomly using Bernoulli distribution. Both
REG processes are located in different hosts (Sun Sparc 5 running Solaris 2.5) in the same
Mbps Ethernet LAN. At each event time, REG process may choose to generate or not
generate Hello or World events, which are 8 attributes long, with a probability of P . Each
REG program is connected to an LMA residing in the same machine. The DMA sends a
notification message to the manager if both Hello event and World event have the same
sequence number (TStamp) but generated from two different REG processes (i.e., machines).
In these experiments, REG programs are fist run without instrumentation or monitoring.
Then programs are instrumented and run in HiFi environment to detect the event of interest.
Figure
7-A depicts the results of this experiment with various event generation probabilities
are developed to minimize the application perturbation including
dynamic signaling and events batching. Using dynamic signaling, ERS only generates the
events which are contained in the expressions of any existing filter. Other events which are
defined but not used in any filter program are suppressed by ERS, even if they are invoked
by event producers. The event batching is a mechanism to buffer more events before sending
them and it is used if Delayed mode is selected in HESL as described in Section 2.
To measure the effect of dynamic signaling, the REG programs were changed such that 50%
of the generated events are filtered out by ERS. And to measure the impact of both dynamic
signaling and event batching with maximum of 5 events, REG and ERS programs has been
changed to reflect this effect. Figure 7-A shows a substantial improvement in reducing the
application perturbation. These experiments also show a low perturbation figure, less than
when P as low as 0.1 which what we believe a typical program generates in distributed
environment. It is important to mention that agents communication primitives are the
primary source of overhead in the monitoring operation [1].
Scalability Analysis: Our approach for evaluating the scalability of HiFi is by measuring
the impact of increasing the event frequency and number of event producers on the mean
response time or the monitoring latency. In this paper, we present the later case since the
results are similar. The monitoring latency is the elapsed time between the event occurrence
and the manager notification. In these experiments, we developed simulation routines to
compare the Mean Response Time (MRT) [14] (monitoring latency) of hierarchical filtering
approach with the centralized and decentralized monitoring approaches [5, 12, 13, 15, 17, 18,
22, 25]. The simulation routines assume that event arrivals (-) are exponentially distributed,
and the average monitoring/filtering service rate (-) of an agent is 8000 events/second which
was experimentally derived from a benchmarking experiments of LMA filtering. Therefore,
the mean response time (MRT) for the centralized architecture is as follows:
is the event
frequency and N the number of event producers. In decentralized monitoring architecture,
there are two levels of processing/filtering: in the producer agent, and in the centralized
monitoring node. Thus,
However, in HiFi which is hierarchical filtering-based monitoring, the latency is:
dlog x (N)e such that x: branching factor and N : number of producers. The EGT and C
can be neglected since it is a comparison study. Thus, the mean response time can be
expressed as follows:
The first factor represents the LMA filtering and the second represent the DMA filtering.
Notice that the LMA receives only 0.5*f of the events since 50% of such event on average are
filtered by ERS. Since not every event is necessarily forwarded up all the way in the DMA
hierarchy, we calculate the MRT considering three different probabilities for forwarding an
event: 10%; 50% and 90% of the events are forwarded. We also assume that there are 10
LMAs maximum are connected to one DMA in any domain (i.e.,
The simulation results of MRT verses number of producers of three approaches are depicted
in and
Figure
7-B. The event frequency (f) is considered 20 events per second. The figure
shows the high superiority of the response time (latency) of the hierarchical architecture over
the centralized and decentralized ones. The saturation points in the figures indicates a buffer
overflow and indefinite response time since ae ? 1 in this case. The hierarchical architecture
with probability 0.9 is still superior over the other architecture because of the use of dynamic
signaling. This figure also shows that the MRT of hierarchical architecture grow slowly
with respect of number of producers. In fact, the "jump points" in hierarchical graphs
in
Figure
7-B represent creating a new level in the hierarchy to accommodate additional
producers. These figures also show that the centralized and decentralized approaches have
a better MRT than the hierarchical approach when event frequency is low and very small
number of event producers exist in the system.
8 Conclusion and Future Work
This paper describes a novel active monitoring architecture (called HiFi) for distributed multimedia
systems. The presented monitoring system organizes the monitoring agents in a
hierarchical structure that distributes the monitoring load and limits the event propagation.
The monitoring agents are programmable and can be reconfigured manually through users'
interactions, or automatically by the agents based on the detected events. Users utilize a
simple language interface, called filter, to define their monitoring demands and associated
actions. Users can specify "general" monitoring tasks that can be customized dynamically
by the monitoring agents in order to perform special monitoring tasks. We developed several
techniques to support a programmable agents environment for active monitoring. This
includes event incarnation to enable event-filter-action programming model, filter incarnation
and filter registers to enable self-configurable monitoring operations, and dynamic
subscription that enables users to add, delete or modify their requests at run-time. In this
paper, we also demonstrate number of examples for using HiFi in monitoring and steering
large-scale distributed multimedia systems.
The active monitoring architecture offers significant advantages in the scalability and performance
of the monitoring systems. It also enables the consumer to control the monitoring
granularity, and thereby minimizing its intrusiveness. The scalability testing results shows
an improvement of 37% and 29% (on average) of HiFi mean response time over centralized
and decentralized architecture, respectively, with the increase of event producers. The
primary source for these improvements is attributable to the programmable agents environment
that permits distributing of monitoring load among the LMA and DMA groups and
increasing concurrency of monitoring tasks. The HiFi active architecture also enables the
localization of event filtering and classification in the area from which the events originate,
which is necessary for reducing monitoring intrusiveness. HiFi's dynamic signaling inherent
with the active monitoring, and event batching techniques significantly minimize the
application perturbation to about 50%.
Although HiFi was developed and used to monitor existing applications such as RMS, it
remains a prototype monitoring system. Many open issues remain to be addressed by our
research plan. These include: the integration of fault tolerance to make HiFi resilient to
network and application failures, improved filter incarnation mechanisms to provide higher
abstraction such that users can specify the ultimate monitoring target without having to
specify intermediate monitoring tasks, and extended monitoring language and architecture
that addresses temporal events.
--R
HiFi: A New Monitoring Architecture for Distributed System Management.
Dynamic Monitoring Approach for Multi-point Multimedia Systems
Adaptive Object-Oriented Filtering Framework for Event Management Applications
High Speed and Robust Event Correlation.
A Pattern-Based Packet Classifier
Managing Multimedia Network Services.
A Reliable Multicast Framework for Light-weight Sessions and Application Level Framing
Detecting Composite Events in Active Database Systems Using Petri Nets.
Network Management by Delegation - the MAD approach
Object Management Group.
Distributed Performance Monitoring: Methods
The Arts of Computer Systems Performance Analysis.
Monitoring Distributed Systems.
A Generic Model for Fault Isolation in Integrated Management System.
Tools for distributed Application Management.
Debugging Concurrent Programs.
The tempest: A practical framework for network programmability.
An architecture for monitoring
Network and Distributed System Management.
Managing Communication Networks by Monitoring Databases.
--TR
--CTR
Salvatore Gaglio , Luca Gatani , Giuseppe Re , Alfonso Urso, A Logical Architecture for Active Network Management, Journal of Network and Systems Management, v.14 n.1, p.127-146, March 2006
Al-Shaer , Yongning Tang, QoS Path Monitoring for Multicast Networks, Journal of Network and Systems Management, v.10 n.3, p.357-381, September 2002 | multimedia systems;application steering;active networks;event correlation;distributed systems management |
596514 | Open Extensible Network Control. | Network control is decomposed in six parts: switch control, resource partitioning, virtual network building, virtual network control, generic services, and data-path components. Each of these parts can benefit from support for dynamically loadable code, which allows users to extend and customize the basic functionality. This is related to active networks, exept that dynamic code exercises control at the granularity of connections (flows), rather than individual packets and all aspects of network control are explicitly considered. Network resources are recursively partitionable, so that dynamic code is able to control partitions of virtual networks in any way it sees fit. Policing these partitions may occur at varying levels of "strictness". | Introduction
Recent years have seen a flurry of papers on new directions in network control, either by opening
up network control [1, 2], or by allowing packets on the data-path to program the network nodes, as
proposed by the active networks community [3, 4]. Drawing from experience in both of these areas,
we designed and implemented a framework that enables clients to program all aspects of network
control in a controlled fashion. This is done by dynamically injecting code into the various entities
that constitute the network control system, subject to access control restraints. This will be defined
as elastic network control, an implementation of which is called Haboob 1 .
1 The term elastic was borrowed from [5].
1.1 Contribution
The Haboob not only opens up the interfaces used to control and manage networks, but also allows
extension and modification of existing components that exercise such control. These components need
not necessarily reside on routing/switching nodes, as is generally the case in active networks. While
the key idea in the Haboob is also 'activating the network' (and as such could be placed under the
active networks umbrella), the location and role played by the active code is different from that in
most active networks (see also Section 3). As such, the Haboob is an attempt to bridge the gap between
active networks and open control.
Moreover, by now we consider the problem of making networks programmable by dynamically
loadable code (or 'active packets') to be a well-established research area for which many solutions
have been proposed. Although certain issues still need to be resolved, we are more interested in the
next step: how best to exploit such programmability. For this purpose, an approach is taken at a
slightly higher level than how active code is classified, demultiplexed, run by the appropriate execution
environment, etc. However, it's also not our intention to discuss specific applications or services built
with dynamically loadable code (an approach that was taken in [6, 7] and others). Instead, this paper
presents both a framework and its implementation in which such questions are addressed as: which
aspects of network control and management can be distinguished and how can they benefit from
programmability by dynamically loadable code?
It should be noted that the programming of network nodes is nothing new: switch vendors do it all
the time and reprogramming happens whenever network operators update switch software by loading
in new images. What makes work like the Haboob different from these traditional approaches is that it
(1) allows reprogramming at a much shorter time scale, (2) without having to take the controller out
of service and (3) with access control at a very fine granularity (instead of only allowing the system
administrator to update the control software, it is possible to specify the amount of customisation
of network control a client is allowed to do on a per-client basis). Although the implementation is
ATM-based (combined with IP over ATM), the issues may be relevant to any network technology with
end-to-end resource reservation.
1.2
Overview
In Section 2, we clarify the terminology and overall view of network control and management maintained
in this paper. In Section 3, the execution environment for dynamically loadable code is dis-
cussed. Sections 4-6 discuss how such code is loaded into the heart of various components that make
up network control and management. In Section 4, it will also be explained how resource partitioning
and differentiation of such policies as policing and interoperability have been implemented in a specific
control system. We will show how more traditional active networks are implemented in the Haboob
in Section 7. As an application of dynamically loadable code a continuous media video server was
built. This is discussed in Section 8. Some performance figures are given in Section 9. Related work
is mentioned in Section 10. Finally, in Section 11, we summarise and draw conclusions.
Henceforth, the term active networks as used in this paper, refers to such approaches as advocated
in either the ANTS [3], or the SwitchWare [4] projects, i.e. where all or some packets on the data-path
carry programs specifying how to deal with these or subsequent data packets. Using the term in this
narrow sense, allows us to contrast it with the Haboob more easily.
2 Terminology and model
We define control architecture as the set of protocols, policies and algorithms used to control a (partition
of a) network. Traditionally, telecommunication networks' control architectures have been monolithic
and closed, but recent research aimed at opening up control and management has achieved promising
results [1], allowing, for example, multiple independent network operators to be present in the same
physical network and a speedup of the time in which new services can be developed and deployed in
the network. The goals of this approach are what we will call open network control, i.e. network control
based on public interfaces that can be used by any party to implement new services, independent of
vendor-specific solutions. We argue that most current implementations offer only limited openness,
namely at the interface level. This paper shows that it is useful also to allow dynamic extensions to
these interfaces, and customisation of the components that implement them. Only then all aspects of
control and management are truly open.
2.1 Decomposition of control
We identify six more or less orthogonal levels related to open network control. These levels have been
implemented as separate components, allowing for independent development.
The first level in the model considers the switch control interface, the interface between control
software and physical switch. In traditional telecommunication systems this interface is closed, but
it was shown in the Tempest [1] how an open, generic switch control interface called Ariel allows for
non-proprietary network control systems, i.e. that work with any switch that implements the interface.
Ariel is sufficiently simple to be implementable for even the simplest switches. Similar interfaces have
been proposed elsewhere, e.g. by the IEEE P1520 Standards Initiative [8].
The second level comprises the partitioning of network resources by a process called the divider.
The divider is capable of making hard partitions on a switch where each of the partitions may be
controlled by a different control architecture. These partitions, known as switchlets, all have their own
VCI space on switchports and other resources as well. In fact, to the software that is controlling the
switchlet, it seems as if it is controlling its own (albeit smaller) switch, because the divider exports an
Ariel interface for each of the switchlets. Switchlets allow a number of different control architectures
to be active simultaneously on the same physical switch.
At the third level we find the netbuilder, the process responsible for combining switchlets to create
virtual networks. Again, such virtual networks are hard partitions of the network resources and each
virtual network looks exactly like a somewhat smaller physical network.
The fourth level, considers the control architecture. This is the software that sets up and tears
down connections, and in short, actually controls the virtual network. Figure 1 shows three control
architectures that are simultaneously active on two switches. One of them controls two switchlets on
two switches. Whatever happens in these switchlets will never interfere with the other two switchlets:
the operations of each control architecture are limited to its own partition of the resources.
Ariel Ariel
Ariel Ariel Ariel Ariel Ariel Ariel
Switch Divider Switch Divider
Manager Manager
RSVP Experimental Control Architecture
P-NNI
ATMF
P-NNI
ATMF
The manager interface is used
by the netbuilder to create
switchlets and other switchlet
management tasks
Physical
Switch
Figure
1: Multiple control architectures in a single physical network, partitioned by dividers
The general sequence of events in our implementation of this model is as follows. At start of day, the
control architecture requests a virtual network from the netbuilder. The netbuilder in turn requests the
corresponding switch dividers to create the appropriate switchlets on the switches, making sure that
the virtual network is sensible (e.g. that the VPI/VCI ranges on neighbouring switchlets overlap, etc.
The dividers create the switchlets and return switchlet Ariel interface references to the netbuilder,
which returns them to the control architecture. The control architecture subsequently makes calls
directly over the switchlets' Ariel interfaces to set up and tear down connections, etc. Finally, the
control architecture makes a call to the netbuilder to destroy the virtual network.
The fifth level in our model concerns generic services: processes providing functionality that may
be used by a wide variety of clients. An example of generic services is a federated trader. A trader is
used by servers to export offers for their services, which can subsequently be imported and bound to
by clients. Another example of generic servers is the traffic server, discussed in Section 4.1.5, which
provides applications flexible access to measurements taken from a switch.
The sixth and last level comprises data-path components, i.e. components that reside on the data-path
and participate in network control. Examples include filters, transcoders, and other datapro-
cessing engines. Unlike such active networks approaches as ANTS [9] and SwitchWare [4], we treat
data-path components separately from the other components. Normally, there will be no interference
with the data-path at all. Only in the (exceptional) event that data processing is needed, will
data-path components be instantiated. An example is given in Section 7.
We now have a complete decomposition of network control and management. The model can easily
be extended if necessary in the future. The question that we ask ourselves is: how can each of these
levels benefit from dynamically loadable code and what are the issues? This paper argues that it is
useful to provide such dynamic customisability in all of these levels.
2.2 Lack of flexibility
Open control such as described above (and in projects such as xbind [10]) allows for a speedup in
the development and introduction of new services compared to traditional control of communication
systems. However, so far the functionality of each of the levels in the model is still fixed (specific
problems resulting from this rigidness will be discussed throughout the text). This paper argues that
it is useful to allow clients to extend and override the functionality of all levels of network control and
management in a controlled way. Furthermore, although in principle it is possible to build and use
the ideal control architecture for every application that has specific network needs, it seems unlikely
in practice that there will be more than a few of these control architectures active at the same time.
The reason is that rather than implementing a special-purpose control architecture, most application
writers will be content with using an existing control architecture that is closest in functionality to
what the application really needs. Allowing clients to customise existing network control solutions
allows them to provide this extra functionality themselves.
3 Loadable code
The active networks community states that instead of standardising the computation performed on
every packet, we should standardise the computational model [3]. No distinction is made between
control and data. Although we agree with the statement in principle, we think that it should be
extended explicitly to the control plane. As mentioned above, the Haboob treats processing on the data-path
as the exception rather than the rule and therefore the role played by customised computation
on individual data packets at every node in the network is relatively minor. Although we do allow
such customised computation, as will be shown in Section 7, its applicability is considered to be
rare, as most packets will probably want to be switched at the highest possible speed (i.e. without
interference by application-specific computation). For the control plane, however, the inverse is true.
As the execution of control code has no direct impact on the speed at which the data travels, the
control plane is the ideal location to allow application-specific code to implement new services. The
granularity of control by dynamic code is the connection (or flow) rather than individual packets that
make up these flows (except for data-path components).
The active networks' approach is to treat every packet on the data-path as a program (or capsule) as
in [3], or at least allow some of the packets to carry program code as in [4]. Instead, we propose not to
interfere with the data path at all. Also, if the network technology allows the separation of control from
data, this allows important signalling messages to get through even in the face of congestion. These
messages may contain the code (in the form of DLAs) to deal with the congestion. This separation is
a standard feature of ATM, but requires some work in technologies like IP (e.g. different queues for
these two classes of traffic). Fortunately, quite some research is currently directed towards achieving
this, e.g. IntServ [11].
Moreover, instead of simply allowing clients to push code into routers, we consider each of the tasks
in Section 2. In other words, we address such questions as: how can we allow clients to extend the
functionality of the switch interface, who should we allow to do this, what does it mean when we
allow clients to program a control architecture and to repartition resources, how much freedom do
we give them when controlling these resources (e.g. with respect to policing), how can we permit an
application A to specify the way in which interoperability between its own control architecture and
neighbouring control architectures should be handled (for A's flows only and not for all others), etc.
We will show that this approach is also different from what is commonly known as intelligent
networks (INs) [12], in that the code can be both active and passive (e.g. waiting for a trigger).
Additionally, elastic control operates at all levels of network control, rather than just the call state.
Another way of saying this is that INs are easy to implement in the Haboob, while an inverse mapping
is not possible.
3.1 The Sandbox
The elastic behaviour starts with the instantiation of an execution environment for the DLAs. This
environment will be called the Sandbox and is implemented as a single object. The Sandbox is language
and implementation-independent and only its interfaces are specified. Apart from the default language
support in a Sandbox, functionality can be added in the form of modules.
A full implementation of the Sandbox comes with at least one module, which implements the simple
uniform framework for interaction (SUFI). The SUFI provides operations that allow DLAs in different
Sandboxes to communicate, whilst preserving location transparency, either via remote evaluation [13],
or via more traditional remote procedure calls (RPCs). These SUFI operations are extremely simple.
For example, parameters in remote evaluations are always treated as byte sequences. The SUFI relies
on adaptors to do the marshalling, unmarshalling and type checking of the parameters at runtime.
In the case of RPC, adaptors could be generated from interfaces automatically and prepended to a
remote evaluation call that encapsulates the RPC (as a remote evaluation). This is currently not
done. The SUFI also provides operations to the DLAs for:
ffl exporting a DLA's interfaces;
access control to a DLA's operations (currently based on capabilities);
ffl security: for example, it provides a method for establishing trust using a trusted third party;
ffl reflection: DLAs can find out information about the Sandbox and also which interfaces and
operations it supports and how to use them;
ffl threading and semaphores for intra-DLA interaction.
It is possible to register new modules with the Sandbox, the result of which is that the commands
contained in the module's interface are made available to the DLAs. The remote evaluation paradigm
is quite powerful and allows clients to extend the functionality of a Sandbox. It works as follows. A
client with the appropriate access rights presents a bit of code, called a granule, to a remote Sandbox
for evaluation. Granules may be active or passive. For example, an active granule may iterate over a
switch's management information base to see whether particular connections exist and send back the
result. Passive granules may simply install the function for doing the iteration; the code will not be
activated until it is explicitly called. DLAs can be thought of as being made up of granules. Granules
are defined as fragments of code that can be autonomously evaluated.
Remote evaluation of granules, combined with the ability to destroy granules, provides a way to
implement replicating and migrating DLAs. Whether or not the state is automatically sent as part
of the migration is beyond the scope of the SUFI. This depends on the language environment. The
current implementations require programmers to explicitly gather the state that they would like to
use at the remote Sandbox. Note that granules and migration also allows for disintegration and
integration of DLAs. We speak of disintegration when a DLA is decomposed in a number of granules
which migrate to different sites ("spreading out" the DLA). Integration is the opposite effect.
3.2 Implementation
Sandboxes have been implemented for Tcl 2 and Java, while work on Python is underway. In each
case, the underlying Sandbox for the language was implemented as a single C++ class, so it can be
easily incorporated in existing code that was not written with elastic functionality in mind. Note that
remote evaluation of Java granules by a Tcl Sandbox is bound to fail. Instead, the SUFI demands
that in the case of different language environments, RPC can still be used for interaction according
to a traditional client/server paradigm.
Quite some thought has been given to safety and security. Careful shielding, strict access control,
trust establishment and controlled access to resources are part of the full Sandbox implementation.
Controlled access to resources should also prevent DLAs from using too much CPU time, memory, etc.
This can be enforced by using an operating system such as Nemesis [14], which allows one to partition
resources in the operating system itself. The current implementation, however, still uses Solaris Unix,
which is not capable of strict resource control. A thorough discussion of security issues is beyond the
scope of this paper.
4 Elastic control architectures
There are many ways to build a control architecture, each of which may be useful in certain envi-
ronments, but not in others. Another way of saying this is that if control architectures represent the
boundary between client applications and the network and its primitives may be considered the API
for dealing with the network, this API is tailored to a certain class of applications. Even so, we have
made an attempt at a general solution for control architectures in the Noman class of control archi-
tectures. Noman will be discussed in Section 4.2. First we will deal with some aspects of a specific
control architecture called the Sandman, as it demonstrates some of the power of elastic control.
4.1 Sandman
Sandman is a distributed control architecture, built on top of a CORBA compliant DPE. Figure 2
shows the components that make up the basic Sandman. An hierarchical trading mechanism allows
clients to find the control architecture and other services. At start of day, the Sandman obtains a
virtual network from the netbuilder in the form of interface references for switchlets. It performs
control operations, such as connection setup, teardown, etc., by calls over the Ariel interfaces of these
switchlets. The important control decisions are made by the connection manager and its support
2 a parameter supplied to the constructor decides whether to use Safe-Tcl instead of standard Tcl
modules, such as call admission control (CAC), routing, etc. The switch fabric components are
responsible for actual connection setup across individual switches, while the local host managers
represent the local interface to the control architecture. Clients make requests to the host manager,
which tries to reserve the local resources and if successful, forwards the request to the connection
manager. Once a connection has been successfully established the host manager calls back the client,
providing it with information about the established connection (e.g. the VPI/VCI pair in the ATM
implementation). As we shall see, the Sandman has strong support for advance reservations.
Endpoint
CAC Router .
Manager
Local Host Connection Local Host
Manager
Endpoint
Switch Fabric
Component
Switch Fabric
Component
Manager
Figure
2: Components of a control architecture
4.1.1 Basic operations
In its default configuration, the Sandman offers only a few commonly used operations that are expected
to be sufficient for a large class of applications:
1. Unicast connection.
The simplest and probably most common operation is the connection from source to one or
more sinks for a particular time interval with particular characteristics (e.g. a peak rate of 1000
cells/s). A clients submits such a request to the control architecture and if the call admission
control (CAC) module accepts the request, the client is guaranteed that the connection will be
set up in that time interval. Traditional, immediate, connections simply leave out the interval,
in which case it defaults to [now; 1i.
2. Multi-source, multi-sink connections.
There is also a small number of more complicated types of connections, such as a connection
that is time-shared by multiple sources and which may have multiple sinks each with its own
and possibly overlapping time interval. For more details, see [15].
3. Information gathering.
This is a rather wide-ranging class of operations to discover certain things about the state of the
network, the topology, routes, available bandwidth on a certain switch port, etc.
4. Loading application-specific code.
Allowing users or applications to load their own code into the Sandman allows them to exploit
application-specific knowledge at a very low level. We will discuss loadable code in Section 4.1.3.
5. Reservation of arbitrary sets of resources.
The reservation of arbitrary sets resources by partitioning (and repartitioning) existing sets is
described in Section 4.1.4.
The first two of these operations allow for reservation in advance, so that guarantees about the
availability of the required resources at some time in the future can be given. These are probably also
the most commonly used operations that are expected to be sufficient for the majority of applications.
We call these the primary operations. All other operations mentioned above are called secondary
operations.
4.1.2 Call admission control
Admission control in the Sandman is based on the conviction that it is prohibitively difficult to
accurately characterise the behaviour of unknown sources. This means that statistical multiplexing
cannot be derived from careful analysis of the supplied traffic descriptors. Instead, we base our CAC
decision on a new connection's supplied peak rate only. To alleviate this potentially over-conservative
reservation mechanism, we extend it with measurement-based effective bandwidth estimation, based
on [16]. For this purpose, we introduce traffic servers.
Traffic servers take continuous measurements of the traffic on the ports of a switch and compute
the effective bandwidth of connections belonging to the Sandman's virtual network. This effective
bandwidth is subsequently used for CAC decisions. In other words, for unknown sources, CAC is
based on peak rate alone, but once connections become active an estimation is made of how much
bandwidth they really need and this is used for any further CAC decisions. Traffic servers may vary
from switch to switch and can be plugged in on the fly. It is conceivable that traffic servers are plugged
in for certain switches and indeed certain switch ports, but not for others (in which case the default
conservative CAC is used). A more detailed explanation of the Sandman's CAC can be found in [15].
4.1.3 Dynamic code loading
Dynamic code loading is supported by the instantiation of Sandboxes in the control architecture into
which clients can load their DLAs. The DLAs have access to all primary and secondary operations.
Observe that this does not really alter the functionality of the Sandman. DLAs simply act as normal
Sandman clients that have moved into the Sandman's address space, so all it potentially gains is an
improvement in performance. Next, we will demonstrate how the functionality can be easily extended
using the same principle.
It is important to make a distinction between an application's resource manipulation behaviour and
its resource reservation behaviour. Resource manipulation behaviour is defined by the application's
actions and operations on resources under the implicit assumption that the resources are available for
it to use. This type of behaviour includes allocating resources to connections, freeing a connection's
resources, etc. In resource manipulation behaviour, applications generally don't worry about the
availability of the resources. Resource reservation behaviour on the other hand concerns itself solely
with ensuring that certain resources are available at certain times. In general, it does not care what
the resources are used for (or whether they are used at all) 3 .
Due to space limitations, this paper focuses on how DLAs can be loaded that specify mainly a
client's resource manipulation. However, the Sandman also gives applications complete freedom in
specifying their reservation behaviour, again in the form of DLAs. For example, it is possible to
specify that every day from 9am to 5pm a network should be reserved with a capacity equal to f(t)
bps, where f(t) may be as arbitrary as "the number of seconds remaining until the year 2000". Note
that such DLAs give rise to issues to do with scheduling; for example because a resource reservation
DLA has to be evaluated each time a new reservation is made for any of the resources associated with
it. In practice therefore, one will probably want to restrict both the amount of resources (e.g. CPU
time) that a DLA can use and the expressiveness of the language for this type of DLAs.
4.1.4 Recursively partitioning networks
The primary operations are expected to be sufficiently expressive for a large number of applications.
Some applications, however, have specific needs, so in order not to restrict them, we propose to give
these applications a number of resources which are theirs to use as they please (i.e. without any connections
imposed on them). For this purpose, the Sandman includes the possibility to make (possibly
advance) reservations for what we have called netlets, i.e. small virtual networks in a larger virtual
3 Note that many of the basic operations, such as to set up end-to-end connections incorporate both reservation and
manipulation behaviour
network. Netlets consist of (a share of) an arbitrary number of resources within the encompassing
virtual network. The Sandman exports low-level primitives to control the individual resources of a
netlet. For example, it is possible to create arbitrary connections across a single switch (assuming the
resources for this connection are part of the netlet). This is quite different from traditional control
primitives in communication systems, which allow clients to set up connections between endpoints
only.
We call these low-level primitives the Sandman's tertiary operations. Tertiary operations are currently
only accessible to DLAs. It is possible to associate a DLA with a netlet, which means that DLAs
can control the netlet's resources at any level of granularity it chooses. It can implement application-specific
functionality in an efficient manner (all communication takes place in the same address space
rather than across the network). In this way, DLAs can also implement new functions (e.g. to create
up a new type of connection), which it subsequently exports. From then onwards, external clients with
the appropriate access rights, can call these functions, as if they are part of the normal control archi-
tecture's repertoire. This is one of the things that distinguish netlets from normal virtual networks
(and from such parent-child virtual networks as discussed in Genesis [17]). The interfaces and DLAs
are illustrated in Figure 3.
load
DLA TERTIARY OPERATIONS
PRIMARY OPERATIONS
Figure
3: DLAs in the Sandman
Netlets can be created recursively. In other words, it is possible to create netlets in netlets, which
enables applications to repartition network resources in an almost unrestricted manner. In fact, the
encompassing virtual network of Section 2 itself is really a netlet (the so-called level-0 netlet). Repartitioning
network resources extends the idea of switchlets into the control architecture. Additionally,
netlets present new opportunities for specialising policies in virtual networks. As examples, we will
consider policing and interoperability.
4.1.5 Application-specific policing
netlets must be policed, because misbehaviour in one level-0 netlet N should not affect connections
in any of the other level-0 netlets. Given this policing, however, we can decide not to police
at the netlet level (or police more loosely), for example because we trust the applications in the netlet
to behave. The reason for this is that even if connections in a netlet misbehave, the problems will be
limited to N only and not propagate to the outside world.
Netlets therefore allow us to differentiate the policing policy in the network. Given hard (in-band)
policing for level-0 networks, we can now decide to police specific higher-level netlets only very loosely
(e.g. by periodically taking measurements from switches to see if they have exceeded their allocated
bandwidths) and certain other netlets not at all. In fact, the looseness may vary from netlet to netlet 4 .
For loose policing, we modified the traffic servers of Section 4.1.2 by extending it with a Sandbox.
A client of the traffic server (such as the Sandman) is able to load DLAs into this Sandbox, which
determines in what sort of statistics the client is interested. For example, it is possible to load code
that specifies (1) that a certain netlet should be checked every second to see if its connections stay
within the capacity allocated to the netlet, and (2) that the control architecture be informed if this
is not the case. This is an example of loose, or a posteriori, policing. Elastic traffic servers allow
clients to program exactly what sort of information they receive about the measured traffic. In other
words, the elasticity makes them much more general-purpose than the simple CAC tools introduced
in Section 4.1.2. Such traffic servers are examples of elastic generic services.
4.1.6 Interoperability
Interoperability between control architectures is extremely important in an environment where multiple
control architectures are expected to coexist. Existing solutions simply map the primitives of
one control architecture to their nearest match in the neighbouring control architecture. For example,
suppose that two endpoints A and B in neighbouring control architectures CAA and CAB need to
communicate and that CAA supports advance reservations and CAB doesn't. In all probability, an
advance reservation request from A in CAA will then be mapped onto a direct reservation in CAB , so
the availability of the resources at the time when they are needed is ensured. We call this the simple
hop-by-hop solution. There are two problems with hop-by-hop interoperability.
The first problem concerns the functionality degradation at the domain boundaries. This is a serious
problem if two feature-rich control architectures communicate via a third control architecture that has
a less sophisticated API. Following through the example of advance reservations, if CAA and CAB both
support advance reservations, but some intermediate control architecture CAC (located between CAA
and CAB ) doesn't, an advance reservation request initiated in CAA will be translated to an immediate
reservation in CAC and will never be "upgraded" to an advance reservation again. In other words, the
functionality degrades as domain boundaries are crossed. Our solution involves the establishment of
4 In other words, netlets are light-weight virtual networks. In this sense the relation between a higher-level netlet and
a virtual network is similar to that between a thread and process.
explicit inter-domain signalling channels between CAA and CAB using the simple hop-by-hop solution.
The inter-domain signalling channel is used to carry higher-level control messages between feature-rich
control architectures. The control messages are simply forwarded by CAC (tunnelling). A complete
description of inter-domain signalling channels is given in [18].
The second problem concerns the rigidness of existing interoperability solutions. For example, in
the above it was assumed that an advance reservation is always translated to an immediate reservation
in CAC . This may be the right solution in some cases, but it is not necessarily the best solution in
all cases. Rather than making an immediate reservation to emulate an advance reservation, pinning
down resources for a very long time, an application may prefer not to prereserve in CAC at all and
simply hope for the best, i.e. only try to reserve the resources when they are needed and accept the
consequences if this fails. This would be a very good solution if the application knows that bandwidth
will not be a problem in CAB in the requested time interval.
The point is that only applications know which mapping is best for them. To overcome the problem
of fixed primitive mapping, the Sandman allows applications to load in their own specific mapping
policies which overrule the default mapping. Observe that this is not without risks. For example, we
must guard against an application overriding the default operation mapping with its own application-specific
mapping (which may well be faulty), thereby affecting the interoperability of all applications.
This is where netlets are useful: we restrict the application-specific mapping to a specific netlet.
Other netlets or connections outside the netlet are not affected by the new policies at all. Moreover,
DLAs can be employed to extend the functionality of the control architecture, by creating innovative
connection types with the help of netlets. These functions can then be exported and called from
external clients. It is now possible to specify the interoperability of particular new connection types
in application-specific manners, which would be hard to do without netlets.
4.2 Noman control architectures
The Sandman is an example of a home-grown control architecture. It is useful in environments where
such things as resource repartitioning (netlets) with DLAs, or advance reservations are required, but
maybe not in many others. It is very difficult to solve the control architecture problem in a general
way, without referring to a context. Noman, our attempt at finding a general solution, therefore, does
not aim at designing the ultimate control architecture with functionality that will satisfy all. In fact,
Noman offers no control architecture functionality at all, instead providing clients with the means to
implement their own functionality. Noman consists of a Sandbox which is extended with a network
control module, known as the netcontrol module. The module provides DLAs with a simple API
which allows them to build, expand, control and destroy virtual networks. So on top of the Noman, a
DLA can be loaded which contacts the netbuilder and creates a virtual network, consisting of a set of
switchlets. The DLA obtains handles on the interface references for the switchlets that are returned as
a result of this. These handles can subsequently be used to invoke Ariel operations on the switchlets,
e.g. to set up or tear down connections. When the DLA is done with the virtual network, it calls
an operation in the netcontrol module to remove it. In other words, Noman is not really a control
architecture at all. It is merely a component that allows rapid development of new Noman-based
control architectures. The dynamically loadable control architectures will be called Noman control
architectures.
Using Noman, clients are able to upload their favourite control architecture functionality ("dial a
control architecture") and even modify, or add to it, on the fly. This is attractive for at least two
reasons. First, it is possible to generate libraries of various control architecture components (e.g.
routing, connection setup and CAC components), out of which components can be picked and added
to the Noman in a mix-and-match fashion, in order to create the control architecture of choice. This
is related to the way components are bound together in xbind [2], but is slightly more general as
components can be customised and replaced on the fly. Second, it allows for vertical integration. For
example, it is possible to load the application on top of a set of Noman components to make an
application manage its own resources. Application and control architecture tasks are then integrated
in the same address space, resulting in considerable performance improvement. The underlying Noman
components could be shared by a number of applications or they could belong exclusively to a single
application, in order to prevent something similar to what in the context of operating systems is called
crosstalk in shared components [14].
5 Elastic dividers and switch interfaces
It is the switch divider's task to partition resources on a switch. In the simplest case, this means that
each partition (switchlet) obtains its own VPI/VCI space (and possibly some other simple resources
as well). It interacts with the outside world via two types of interface: (1) the management interface,
which provides operations for the creation or destruction of switchlets, and (2) Ariel interfaces (one per
switchlet) to perform control operations. There are therefore also two places where the instantiation
of Sandboxes would be useful. The first is in the management component where new switchlets are
created. The second is in the Ariel instantiation itself, i.e. in the switchlet.
5.1 DLAs in an Ariel Sandbox
Placing a Sandbox in a switchlet itself allows one to load application-specific code as close as possible
to the switch (this could be on the switch itself). By using a new module, known as the Sandbox
Ariel module, this code is able to call any switch control operation available to a traditional control
architecture, the only difference being that the call need not be transmitted over the network. If the
divider runs on the switch, this could even be a simple function call in the same address space. Such
active switchlet DLAs are called micro control achitectures. Micro control architectures are either
controlled from external applications, or in a more extreme case, contain their own application code.
The latter case will be termed application-specific micro control achitecture. Micro control achitectures
that are controlled from external applications can easily extend Ariel's functionality by implementing
for example such things as batch connection setup or teardown. The external application simply calls
the new operation once with the appropriate parameters and the micro control achitecture sets up (or
tears down) the appropriate connections.
Furthermore, the Ariel Sandbox supports an override operation, which allows it to safely replace,
modify, or extend the standard Ariel operations. Such functionality enables one to change the behaviour
of a switchlet. As a trivial example, consider a DLA which overrides the connection setup
and teardown operation with the empty operation. This effectively removes these operations from
the switchlet's repertoire. The control architecture controlling the switchlet can still perform all other
Ariel operations (e.g. gather port and connection statistics), but it is not allowed to create or delete
connections.
A more interesting example that has been implemented, deals with VPI/VCI space virtualisation
in an ATM network. Recall that switchlets constitute a partitioning of (among other things) the
VPI/VCI space. This means that CAA obtains a different VPI/VCI range than CAB . However it is
well-known that certain control architectures depend on specific VPI/VCI values for signalling. UNI
signalling, for example, uses VCI 5 on VPI 0 for signalling messages [19], while both IP Switching [20]
and FORE SPANS [21] depend on VPI 0 and VCI 15. Problems arise when one wants to start up
a control architecture that relies on a particular VPI/VCI value V , when V was already assigned to
another switchlet. This can be solved easily, using the override operation in the Ariel Sandbox. All
operations may be overridden to map V onto one of the switchlet's own VPI/VCI values V . This is
transparent to the control architecture, which sends the usual control messages for VPI/VCI value V .
In fact, it is possible to completely virtualise the VPI/VCI space. In other words: allow the control
architectures to use the entire spectrum of VPI/VCI values supported by the switch (or even more)
and install a DLA at the switchlet, which maps these virtual VPI/VCI values to real VPI/VCI values
in the switchlet's address space (if needed, the Haboob allows real VCIs to be pinned down at the edge
of the network).
If control architectures span multiple switches, this means that for each of these the virtualisa-
tion DLA needs to be installed. This is a responsibility for the netbuilder (discussed in Section 6),
which knows about the allocated resources of netlets and is therefore able to install automatically the
appropriate mappings in the switchlets at network creation time.
5.2 DLAs in the switchlet management component
The need for elastic runtimes in the process of creating switchlets itself may be less obvious. One
simple use is that it allows network administrators to install simple extensions to the default network
functionality by automatic instantiation of an appropriate DLA in an Ariel Sandbox whenever a
switchlet is created. This DLA can then extend or override the Ariel operations as described in the
previous section. For example, the management DLA may be triggered each time a "create switchlet"
operation is called (i.e. it has overridden the method to create switchlets). It can then examine the
request and depending on certain conditions (e.g. the identity of the requester) it may create a new
switchlet with an Ariel DLA which overrides the operations to create and delete connections with
the empty operation. This ensures that this switchlet's control architecture is allowed to do anything
on the network, except create and delete connections. A more interesting use of management DLAs
implements switchlet aggregation, whereby the creation of a switchlet really creates a whole cluster
of switchlets which are presented to the control architecture as a single (large switchlet). These
aggregate switchlets are used to improve scalability. Due to space limitations we will not discuss
aggregate switchlets any further
6 Elastic network builders
Netbuilders are responsible for combining switchlets into virtual networks (level-0 netlets). Because
they are essentially shared servers with very little functionality that is specific to any particular control
architecture, netbuilders are interesting when it comes to adding elasticity to them. The question
arises: who decides how virtual networks should be created? Until now, this is decided once and for
all by the implementers of the netbuilder. The static netbuilder has a fixed functionality-virtual
networks are built by associating switchlets in a very implementation-specific manner. This paper
argues that this is unnecessarily restrictive. Although it is beyond the scope of this paper to discuss
the netbuilder in much detail, we briefly outline the issues and show where the use of DLAs has lead
to improvements compared to implementations that only use static code.
For example, there is no reason why control architectures should not be able to push code into
the netbuilder when this code is restricted to using only those operations that were exported by
the netbuilder anyway. In other words, it should be possible to load active or passive DLAs into
a netbuilder which, besides the SUFI, offers the exact same API as offered to control architectures.
Doing this may optimise performance (especially since netbuilders may run very close to or even on
a switch as well). The DLAs in turn are able to build new services by combining existing netbuilder
services and exporting interface references for these services.
however, only the ability to allow DLAs to (re-)combine existing netbuilder functionality
has been discussed. A more interesting question is: who is allowed to add to, remove from or modify
the netbuilder's default functionality? It seems reasonable to give at least the system administrators
such powers. After all, they may want to override certain operations to make them include extensive
logging, or to disable certain functions, or even to preclude the use of certain switches for certain
operations. The system administrators then, should also be allowed to grant these privileges to other
network users (in the same way as a system administrator is allowed to grant the root password of
machines to certain, trusted users).
The new functionality that is thus created by the system administrators can subsequently be used by
non-privileged DLAs that present the appropriate capability. In this way, the netbuilder's functionality
can be changed and extended on the fly in a safe manner. In the Haboob, the netbuilder allows clients
to load code into a shared Sandbox. The code is able to use all the basic operations offered by the
netbuilder, as well as modified or extended operations implemented by the system administrator's
DLAs (provided the right capability is presented).
A very simple example of a netbuilder extension is one which automatically pushes DLAs in the
switchlets that are created on its behalf by the divider. In this way, we made a netbuilder push
'virtualisation DLAs' in each of the switchlets, so that the VPI/VCI spaces of these switchlets were
completely virtualised (as discussed in Section 5.1). The netbuilder makes sure that each virtual VCI
is mapped on the appropriate 'real' VCI (taking into account that neighbouring switchlets need the
same mapping).
7 Active Networks
We recognise the value of in-band computation, as advocated by the active network community,
in certain cases. For example, [7] shows as an example how a protocol "booster" can extend the
functionality of a protocol on the fly, by adding forward error correction (FEC) on the datapath when
it is found that one of the links is very slow and unreliable. The booster only affects that particular
link. Similarly, [6] shows how an "active bridge" between two ethernet segments allows for upgrading
to new versions of network software with minimal disruption.
So how do we deal with these problems in the Haboob? The answer is simple: if and when necessary
we build a simple active network node on the fly. Consider the example of a protocol booster. Whenever
the decision is made that a particular link is unreliable and needs FEC, it is simple to dispatch a
DLA that reroutes the existing connection to a control entity near the link. The control entity adds
the FEC and returns the code to the data path. The FEC addition can be done by a DLA running in
a Sandbox in the control entity. The protocol booster mechanism is illustrated in Figure 4. Note that
this does not differ in any way from the protocol boosters in [7]. In fact, we have built a very simple
active node. This is an example of an elastic datapath component.
remove FEC
(Lossy
A
add FEC
Figure
4: Active protocol booster in the Haboob
8 A Distributed Video Server
As a further demonstration of the Haboob, a distributed video server (DVS) was built on top of
Sandman. The aim of the DVS was to provide a virtual big disk to low-end users that do not
have enough storage space to store, for example, feature-length films on their local disks. The DVS,
which is entirely implemented in dynamically loadable code, is able to use all disks in the network,
not just the user's local disk, for storing very long video files. In recording mode, the video data is
automatically striped over the various disks (using coarse-grained striping), according to a user-defined
load-balancing policy. This means that the appropriate connections are set up at the appropriate
times to each disk on which a particular segment should be stored. In playout mode, the DVS finds
all the segments that make up the video and sets up connections from the corresponding disks at the
appropriate fashion to ensure smooth playback. The sink is not aware of this. It simply receives on
a single VPI/VCI pair. The sources are merged in a resource efficient manner, by reusing as much of
the existing connection as possible. The DVS is described in detail in [22].
9 Performance
Because of space limitations, we are not able to discuss results in great detail. As an indication
of performance we measured the connection setup and teardown times in a configuration where the
endpoints of communication reside on Sun UltraSparcs and the control architecture, divider and
netbuilder all run off-switch (also on UltraSparcs). As shown in Table I, a setup across a single FORE
ASX-200 switch using Sandman took as little as 7:5 ms 5 . A teardown took on average 2:6 ms. This
compares favourably with both ATMF UNI signalling as reported in [23] and xbind open control as
reported in [10] (see Section 10). This should be taken as a rough comparison only, as the configuration
and load of the switches in the various scenarios were almost certainly different (which has significant
effect on the performance). Replacing Sandman with a Noman control architecture adds approximately
1 ms to the setup and teardown time. These figures are very good and prove that off-switch control
using DLAs need not result in poor performance.
switch software location t (ms)
Unknown Xbind/GSMP off-switch
DEC AN/2 UNI (Q.Port) off-switch 21
ASX-200WG UNI on-switch 20
ASX-1000 Sandman/GSMP off-switch 15
ASX-200 Sandman/SNMP off-switch 7:5
Table
1: Comparison of switch setup times
Related work
Several solutions to make networks programmable have been proposed in the last few years. We briefly
discuss active networks, open control and intelligent networks. Active Networks are packet-switched
networks where each packet may carry executable code. In [3] these packets are called capsules, i.e.
little programs with embedded data that are evaluated in a transient execution environment, allowing
network nodes to process the data in an application-specific way. The execution of the packets in the
data path is strongly related to the speed with which these packets can travel through the network.
Note that the Operation, Administration and Maintenance (OAM) cells in ATM offer a similar, albeit
much more restricted functionality (the OAM cell effectively carries one of a finite number of pre-defined
programs).
5 The GSMP server used for the ASX-1000 was a rather buggy experimental implementation, which explains why it
is so much slower than the SNMP server on the ASX200. In addition, its control processor, a i-960, is much slower than
the Pentium II used for the ASX200.
The Switchware project [4] at the University of Pennsylvania, is similar to this, but does not require
each packet to be a capsule (although some packets may carry code). SwitchWare is designed as a
three-level architecture, where the first level comprises the active packets, the second level concerns so-called
active extensions (programs that can be dynamically loaded over the network and offer functions
that can be used by active packets) and the third layer is the infrastructure that enforces the rules
for dynamic code loading and takes care of resource allocation. Formal methods are used to prove
security properties of the dynamically loadable programs.
In [5] a solution to network management using delegated agents is proposed, where the agents are
dynamically loadable code that can be dispatched using a so-called delegation protocol to an executing
elastic (extensible) server. This helps prevent the explosion of management traffic from all over the
network to a central site. Delegating management also makes the control loop (from managing code
to managed device) smaller, decreasing the probability of failure at times when there are problems
(and management is needed the most). The delegated agents approach has been quite influential. For
example, another project that investigates the use of agents for network and systems management is
INSERT [24], where Java agents are used to implement managed objects (similar to those of SNMP
and CMIP) and can be instantiated dynamically.
The second approach to making networks programmable is known as open control. Early implementations
of such control are xbind [10] and the Tempest [1] (of which the Haboob is a continuation).
Xbind constitutes a framework for the creation, deployment and management of multimedia services
on ATM networks with end-to-end QoS guarantees. Services are created by interconnecting (binding)
abstract representations that model the local states of network resources including links and switches.
For this purpose, these abstractions are stored as an organised collection of interfaces, called the
Binding Interface Base (BIB).
Closely related to netlets is the more recent Genesis project [17] (netlets were introduced in a
primitive form in [15]). Like the research presented here, Genesis enables recursive partitioning of
network resources. The partitions of network nodes, called "routelets", are created by a parent control
program, but controlled by an independent child control program. However, the Genesis model is
much more complex than that of netlets. More serious is that the hierarchy of nested routelets seems
reflected in the datapath. Each routelet consist of a myriad of components and services and part of
this comprises the routelet's transport module, which resides on the datapath. The transport module
includes a virtual input port, a forwarding engine (that processes the data) and a virtual output port.
An incoming packet is classified, for example, as belonging to a specific (higher-level) routelet and
demultiplexed to the routelet's transport module accordingly. It arrives at the routelet's virtual input
port, is processed in the forwarding engine and sent out on the virtual output port. However, it is
not sent to the next node yet. It first arrives at the virtual input port of its parent routelet. Here
the process is repeated and so on, until it arrives at the root routlet's input port. Here it is processed
for the last time and finally forwarded to the next node in the network. This is rather inefficient as
the data is touched, not just once, but potentially many times. This is an example of multiplexing
at many layers. Contrast this with the "flat" model of netlets. Here netlets form simple partitions
of lower-level netlets that can be controlled in arbitrary ways, e.g. by setting up connections from
one endpoint to another. The data simply flows through these connections and is not touched at all.
Multiplexing happens once and at the lowest possible level.
Intelligent Networks (IN) [25] allow the introduction of new services by associating them with
signalling endpoints. Basic calls are separated from IN-based calls. For example, dialling an 0-
800 number will trigger a temporary suspension of call-processing and initiate a series of transactions
between the Service Switching Point (SSP) and the Service Control Point (SCP), which is essentially a
real-time database. A lookup in this database (e.g. for a 0-800 number) tries to find the corresponding
service logic, i.e. the code which is then executed. The code sends back instructions to the SSP on
how to process the call. The bulk of current IN transactions consist of translating the number dialled
by the caller into another number.
Conclusions
We have discussed the Haboob, which represents a direction in network control, called elastic control,
that combines elements from active networks and open control. It is like open control (and intelligent
networks) in that it maintains a separation between control and data and attempts to open up the
traditionally closed communication systems, and like active networks in the ease with which new code
can be added to existing network control by loading it up in an execution environment known as the
Sandbox. It also tries to standardise a computational model and defines the Sandbox SUFI to provide
DLAs with a uniform interface for communication, code loading, security and other aspects. Above all,
the Haboob considers the various aspects of network control independently and enables extensibility
and customisability for all of them.
Acknowledgements
Thanks to Ian Leslie, Rebecca Isaacs and Richard Mortier of the Cambridge Computer Laboratory
for their useful comments on earlier versions of this paper.
--R
Open Service Support for ATM.
"Realizing a foundation for programmability of ATM networks with the binding architecture,"
"Towards an active network architecture,"
"The SwitchWare active network implementation,"
"Delegated Agents for Network Management,"
"Active bridging,"
"Protocol boosters: Applying programmability to network infrastructures,"
"The IEEE 1520 Standards Initiative for Programmable Network Interfaces,"
"ANTS: A Toolkit for Building and Dynamically Deploying Network Protocols,"
"Programming telecommunication networks,"
"Specification of Guaranteed Quality of Service (RFC 2212),"
"Intelligent Network Overview,"
"Implementing remote evaluation,"
"The Design and Implementation of an Operating System to Support Distributed Multimedia Applications,"
"ATM Admission Control based on Measurements and Reservations,"
"Measurement-based connection admission control,"
"The Genesis Kernel: A Virtual Network Operating System for Spawning Network Architectures,"
"Application-specific policies: Beyond the domain boundaries,"
"ATM User-Network Interface Specification - Version 4.0,"
"General switch management protocol specification-version 1.1."
"SPANS UNI: Simple protocol for ATM signalling, release 3.0,"
"Building a distributed video server using advanced ATM network support,"
"Per- formance benchmarking of ATM networks,"
"Mobile Agent based management in the INSERT project,"
"Recommendation M.3010. Principals for a Telecommunications Management Network,"
--TR
--CTR
Simon Crosby , Sean Rooney , Rebecca Isaacs , Herbert Bos, A perspective on how ATM lost control, ACM SIGCOMM Computer Communication Review, v.32 n.5, November 2002 | policing;virtual networks;active networks;open control;elastic control |
596687 | Edge Provisioning and Fairness in VPN-DiffServ Networks. | Customers of Virtual Private Networks (VPNs) over Differentiated Services (DiffServ) infrastructure are most likely to demand not only security but also guaranteed Quality-of-Service (QoS) in pursuance of their desire to have leased-line-like services. However, expectedly they will be unable or unwilling to predict the load between VPN endpoints. This paper proposes that customers specify their requirements as a range of quantitative services in the Service Level Agreements (SLAs). To support such services Internet Service Providers (ISPs) would need an automated provisioning system that can logically partition the capacity at the edges to various classes (or groups) of VPN connections and manage them efficiently to allow resource sharing among the groups in a dynamic and fair manner. While with edge provisioning a certain amount of resources based on SLAs (traffic contract at edge) are allocated to VPN connections, we also need to provision the interior nodes of a transit network to meet the assurances offered at the boundaries of the network. We, therefore, propose a two-layered model to provision such VPN-DiffServ networks where the top layer is responsible for edge provisioning, and drives the lower layer in charge of interior resource provisioning with the help of a Bandwidth Broker (BB). Various algorithms with examples and analyses are presented to provision and allocate resources dynamically at the edges for VPN connections. We have developed a prototype BB performing the required provisioning and connection admission. | INTRODUCTION
There is a growing demand that since private networks built on using
dedicated lines offer guaranteed bandwidth and latency, similar guarantees
be provided in IP based Virtual Private Networks (VPNs) [9], [14].
While the internet has not been designed to deliver performance guar-
antees, with the advent of differentiated services [3], [2], IP backbones
can now provide various levels of quality of service.Recently proposed
Expedited Forwarding (EF) [10] Per Hop Behaviour (PHB) is the recommended
method of build such an Virtual Leased Line Line (VLL)
type point-to-point connection for VPN.
To provide such service we have (and others, for example [16],[17])
recently implemented [12], [13] a Bandwidth Broker [15] that allows
an user to specify a single quantitative value (i.e 1 Mbps or 2 Mbps
etc.) and based on this specification the edge routers establish VPN
connections dynamically. However, it is expected that users will be unable
or unwilling to predict load between VPN endpoints [7]. From the
provider's point of view also, guaranteeing exact quantitative service
might be a difficult job at the beginning of VPN-Diffserv deployment
[2]. We, therefore, propose that users specify their requirements as a
range of quantitative service. For example, a user who wants to establish
a VPN between stub Networks A and B (Figure 1), and is not sure
whether he needs 0.5 Mbps or 0.6 Mbps or 1 Mbps, and only knows
the lower and upper bounds of his requirements approximately, can
specify a range 0.5- 1 Mbps as his requirement from the ISP when he
outsources his service to the latter. An ISP can offer multiple such options
via a website (Figure 6) to help customers to select any suitable
option to activate services dynamically on the fly.
This has several advantages: Users do not need to specify the exact
capacity but it gives the flexibility to specify only a range. The price
that customers have to pay is higher than one pays for the lower bound
capacity but lower than what is normally needed to be paid for upper
bound capacity. During low load it is possible that users might enjoy the
upper bound rate (say 1 Mbps in the example) without paying anything
extra. This kind of pricing might be attractive to users and ISPs can
take advantage of that to attract more customers without breaking the
commitment.
This, however, poses significant challenge to the ISPs as they would
need to deploy automated provisioning system that are able to logically
partition the capacity at the edges to various classes (or groups where
each group is identified from it's offer, for example 0.5- 1 Mbps could
represent one group, 1-2 Mbps could represent another) of VPNs and
manage them efficiently to allow resource sharing among the groups
in a dynamic and fair manner.Also, they must provision the interior
nodes in the network to meet the assurance offered at the boundaries
of the network We have, therefore, proposed a two-layered model in
section II to provision such VPN-Diffserv Networks where the top
layer is responsible for edge provisioning and drives the lower layer in
charge of interior resource provisioning with the help of a Bandwidth
Broker (BB).
We have restricted this paper to edge provisioning only considering
the fact that most of complexities lie at the boundaries of the network
and is the main driving force for overall provisioning. In section III
various algorithms with examples and analysis have been presented to
provision and allocate resources dynamically at the edges. Fairness issues
while allocating unused resources have been addressed in section
III-D. A prototype BB performing the required provisioning and connection
admission has been described in section IV. Section V concludes
the paper with a summary of our contributions and a discussion
of future research directions.
Edge
Router 3
Interior
Router 1
Interior
Interior
Edge
Router 1
Edge
Router 3
Edge
Router 5
Edge
Router 4
ISP
Stub
Network
Customer
Customer
Stub
Network
A 1A
Network Stub
Customer
Customer
Stub
Network C 1C
Fig. 1. VPN Diffserv deployment scenario
II. PROVISIONING REQUIREMENTS FOR VPN-DIFFSERV
NETWORKS: A MODEL
Provisioning in Diffserv Networks does not only mean determination
and allocation of resources necessary at various points in the network,
but also modification of existing resources to be shared dynamically
among various VPN classes (i.e. groups). Both quantitative, as it is
the case with VPNs, and qualitative traffic (some assured service) are
required to be provisioned at the network boundaries and in the network
interior.
Determination of resources required at each node for quantitative
traffic needs the estimation of volume of traffic that will traverse each
network node. While an ISP naturally knows from the SLA the amount
of VPN quantitative traffic that will enter the transit network through
a specific edge node, this volume cannot be estimated with exact accuracy
at various interior nodes that will be traversed by VPN connections
if we do not know the path of such connections [1]. However,
if the routing topology is known, this figure can be almost accurately
estimated. If the default path doesn't meet the requirements of an in-coming
connection, alternate and various QoS routing [6], [5] can also
be used to find a suitable path and enforced by MPLS techniques [8].
A. Role of Bandwidth Broker for Automated Provisioning
Based on the basic needs of provisioning a VPN-Diffserv network to
support quantitative service we consider the provisioning as a two layered
model - the top layer responsible for edge provisioning and driving
the bottom layer which is in charge of interior provisioning (Figure 2).
As we seek to provide a system where VPN services are available on
demand, we find that Bandwidth Broker [15],[17] is the right choice,
because it is not only capable of performing dynamic end-to-end admission
control to setup a leased line like VPN by maintaining the topology
as well as policies and states of all nodes in the network, but also capable
of managing and provisioning network resources of a separately
administered DS domain and cooperating with other similar domains.
Edge Provisioning
Interior Provisioning
Bandwidth Broker
CR CR CR
ER
CR
CR
CR
ER
Fig. 2. Layered Provisioning view of VPN-Diffserv Networks
B. A Novel Bandwidth Specified as an Interval
To overcome users' difficulty in specifying the exact amount of quantitative
bandwidth required while outsourcing the VPN service to ISP
our model supports a flexible way to express SLAs where users specify
a range of quantitative amounts rather than a single value. Although
it has several advantages, this also makes the edge and interior provisioning
difficult. This complexity can be explained with a simple ex-
ample. Referring to Figure 1 once again, assume that edge router 1 has
been provisioned to provide 20 Mbps quantitative resources to establish
VPN connections elsewhere in the network and ISP has provided
two options via a web interface to the VPN customers to select the rate
of the connections dynamically: 1 Mbps or 2 Mbps. It is easy to see
that at any time there can be 20 connections each having 1 Mbps, or 10
connections each enjoying 2 Mbps, or even a mixture of the two (e.g. 5
connections with connections with 1 Mbps). When a new
connection is accepted or an active connection terminates, maintaining
the network state is simple and doesn't cause either reductions or
forces re-negotiations to existing connections. If there are 20 connections
of 1 Mbps, and one connection leaves then there will be simply
19 connections of 1 Mbps. Admission process is equally simple.
Now if the ISP provides a new option ( for example, as shown in Figure
6(b)) by which users can select a range 1Mbps - 2 Mbps (where 1
and 2 are the minimum and maximum offered guaranteed bandwidth),
maintaining the state and admission control can be difficult. A detailed
example can be found in section III-B.When there are up to 10 users
each connection would get the maximum rate of 2 Mbps, but as new
connections start arriving, the rate of existing connections would de-
crease. For example, when there are 20 connections this rate would and then at that stage if an active connection terminates
the rate of every single connection would be expanded from 1 Mbps Mbps. This is a simple case when we have a single resource
group supporting a range 1Mbps-2 Mbps. In reality, we might have several
such groups as shown in Figure 6(b). In such cases, renegotiation
for possible expansion of existing connections, admission control and
maintenance of network states will not be simple. The idea presented
here is illustrated in figure 3.
BE traffic
EF traffic
C user_max(i)
C user_min(i)
user(i)
user(i)
VPN Pipe
VPN connection demand
(a) (b)
Fig. 3. The SLA (a) Bandwidth is specified as an interval of C user min(i)
and C user min(i) for any group i. Actual rate of a VPN connection C user(i) varies
between this range but never gets below C user min(i) . (b) C user(i) is the rate that
is configured in the edge router as the policing rate. Traffic submitted at a rate higher
than this rate is marked as best effort traffic or dropped depending on the policy
C. The Model and Notations
In our model, we address this novel approach to SLA and provide
policies and algorithms for automated resource provisioning and admission
control. However, to support such provisioning, we first start
by allocating a certain percentage of resources at each node (edge and
interior) to accommodate quantitative traffic. At the edge this quantitative
portion is further logically divided between dedicated VPN tunnels
(i.e. require 1Mbps or 2 Mbps explicitly) and those connections that
wish to have rates defined by a range (i.e 0.5-1 Mbps or 1-2 Mbps etc.
This top level bandwidth apportionment is shown in Figure 4. The
notations are :
ffl CT is the total capacity of a node interface.
ffl Cded is the capacity to be allocated to VPN connections requiring
absolute dedicated service
ffl Cshared is the capacity apportioned for those VPN connections who
describe their requirement as a range.
ffl C qual is the remaining capacity for qualitative traffic.
ffl Cquan is the capacity provisioned for quantitative traffic and is equal
to (Cded+ Cshared ).
C quan
C quan shared
ded
C qual
z.
shared
y.
a.
C qual
C qual
(b)
(a)
b.
Fig. 4. Top level Bandwidth Apportionment: (a) logical partitioning at the edge, (b) logical
partitioning at an interior
While at the edge Cquan is rate controlled by policing or shaping,
at the interior this Cquan indicates that this amount of capacity will
be allocated (actually protected) to quantitative traffic if need arises.
All the values can be different at different nodes. This kind of logical
partitioning is helpful because capacity is never wasted even if portions
of resources allocated to quantitative traffic are not used by VPN
connections. Unused capacity naturally goes to qualitative portion and
enhances the best effort and other qualitative service. This is true both
at the edge and in the interiors. Cshared , as shown in Figure 4, can
be logically divided to multiple groups where each group supports a
different range (Figure 5). As there might be multiple of such groups,
for any group i we define the following notations:
ffl C base(i) is the the base capacity for group i which is shared by the
VPN connections belonging to that group.
ffl C user min(i) is the ISP offered minimum guaranteed bandwidth that
a user can have for a VPN connection.
ffl C user max(i) is the ISP offered maximum guaranteed bandwidth that
a user can have for a VPN connection.
ffl N shared(i) is the current number of shared VPN connections in
ffl C shared(i) is the amount of capacity currently used by group i.
ffl C user(i) is the actual rate of active connections in group i and is
equal to C shared(i)
(in section 3).
Cshared unused is the total unused bandwidth from all shared service
groups.
shared-unused C base(i)
ded
shared
shared
qual
C00000000000000000001111111111111111111Unused
Fig. 5. Microscopic View of Bandwidth Apportionment at Edge
There are numerous sharing policies that we can apply to these
shared service groups. We call them shared service groups because
in reality the base capacity is shared by a certain number of VPN connections
and sharing policy might allow a group to share it's resources
not only among it's own connections, but also share with other groups'
VPN connections in case there is some unused capacity. This may also
apply to dedicated capacity. Priority can be given to certain groups
while allocating unused resources. Actually, fair sharing is a challenging
problem, and we will address all these issues in the following sections
while developing provisioning mechanisms.
III. EDGE PROVISIONING POLICIES: ANALYSIS AND
ALGORITHMS
Based on the model described in section II, various allocation policies
could be adopted by the ISPs at the ingress point to allocate capacity
dynamically to maintain and guarantee the quality of service of various
types of incoming and existing VPN connections as we will have
multiple classes of VPNs each supporting different bandwidth specifi-
cations. Some suitable policies are :
ffl Policy I: Capacity unused by one group cannot be used by any other
groups. This means that if we have multiple shared service groups, one
group whose resources have been exhausted while supporting numerous
connections doesn't borrow resources from others even when those
groups have unused capacity.Also, none of the groups are allowed to
use unused capacity of dedicated service group.
ffl Policy II: Capacity unused by one shared service group can be borrowed
by another shared service group. However, like the previous pol-
icy, they are not supposed to borrow from the dedicated service group.
ffl Policy III: Capacity unused by dedicated service group can be borrowed
by tunnels of shared service groups. Also, these groups can share
resources among themselves.
In this section, we will start with VPN Connection Acceptance algorithms
at Ingress point where all admission complexities lie. This
complexities are introduced because of the need to partition and share
resources to support our model and policies presented above. Further
analysis with examples of algorithms for Policy I,II and III clarify those
in detail.
A. VPN Call Acceptance at Ingress
The job of admission control is to determine whether a VPN connection
request is accepted or rejected. If the request is accepted,
the required resources must be guaranteed. For any group i a new
VPN establishment request is admitted only if at least the minimum
bandwidth as stated in the offer can be satisfied while also retaining
at least the minimum requirements for the existing users, i.e. if
C user min(i)
a new VPN connection request can be
accepted. This ensures that, an admitted VPN connection will always
receive at least the minimum offered bandwidth C user min(i) in group
by restricting the number of maximum connections that can join the
group. How much capacity the accepted connection will actually have
is decided by connection state in that group and sharing policies that
we are going to discuss in the next subsections.
B. Capacity Allocation with no sharing among groups: Policy I
The base capacity allocated to a group is solely used by the VPN
connections belonging to that group only. Under no circumstance resources
assigned to one group can be borrowed by others, even if that
capacity is unused. This makes allocation simple not only at the edges,
but also in the interior and from an implementation point of view it
is simple. Since the unused capacity is not used by any other groups,
qualitative services, as we mentioned earlier, are also enhanced.
If a VPN connection is accepted the system checks if that connection
can be allocated the maximum rate. This is possible if
the base capacity C base(i) is enough to assign all the existing connections
the maximum rate C user max(i) . Otherwise, the base capacity
is shared among all the existing and new VPN connec-
tion. Therefore, we can express this admission policy as follows:
Example 1: For the following example assume that the total link
bandwidth Mbps and there
is only one ( shared user group .Also assume that ISP offers
this group as C user
Base capacity C base(1) allocated to this group is 20 Mbps.
Mbps
Calls are accepted as long as the condition
C user min(i)
of section III-A is met. When the number of calls exceed
C user min(i)
a new arriving call is rejected. For example, if the
21st call in the example were accepted then C user(1) would have been21 , and the minimum bandwidth could no longer be guaranteed. There-
fore, the call is rejected.
C. Capacity Allocation with sharing among groups: Policy II
If the capacity allocated to a group is not fully used by VPN con-
nections, then this capacity can be borrowed by connections of other
shared service groups if needed. However, borrowed capacity must
be relinquished when needed by the group from which capacity was
borrowed. Although this borrowing and deallocation adds some complexity
in edge provisioning, connections from various groups, how-
ever, have better chances of enjoying higher rates. In the following we
present algorithms regarding VPN connection arrival, termination and
possible expansion of existing connections as a result of the termination
of a connection from a shared service group.
C.1 VPN Connection Arrival
Like the previous case, VPN connection arrival essentially involves
checking the availability of resources that can be used by the new con-
nection, and if available, allocating this capacity to an incoming call.
Even if the base capacity of a certain group allows the new connection
belonging to that group to assign maximum ISP offered rate (i.e.
- C user max(i) ), because of the resource
sharing among various groups it might happen that resources from that
group has been borrowed by other group(s) not leaving the required resources
(i.e. Cshared unused ! C user max(i) ). In such a case resource
must be relinquished from the appropriate groups(s). Any such de-allocation
from existing connections leads to rearrangement of capacity
of those connections. It should be noted that capacity should be relinquished
the way it was borrowed. There are numerous ways unused capacity
can be borrowed by competing groups which we will see in sections
III-C.3 and III-D. For the sake of simplicity, the group which has
the maximum excess bandwidth, C
should release first, and then the next, and so on.
/* if the group has enough base capacity to support
a new connection with max. offered rate. */
if
hi
/* if the shared unused capacity is also enough to support
the new connection with max. offered rate. See Example 2 */
if
Cshared unused - C user max(i)
/* if the shared unused capacity has been borrowed then
capacity is relinquished from borrower(s). See Example 3 */
else n
relinquish C user max(i) from group(s) which has max excess bw
rearrange bandwidth of that group(s)
We have just mentioned that capacity can be borrowed from one
group by the others. When does one group borrows resources? Natu-
rally, when the base capacity is less than what is needed i.e
How much can one group borrow? This depends on
how much unused resources are available. If this is at least equal to
the maximum offered rate C user max(i) , then that amount is allocated,
otherwise (i.e. Cshared unused ! C user max(i) ) the whole unused resource
goes to the group in question and is then divided among all the
connections in that group
/* if the shared capacity is equal to or has exceeded the base capacity */
if
hi
/* but the unused capacity can still support the new connection
with rate. Capacity is then borrowed. See Example 4 */
if
Cshared unused - C user max(i)
/*if the unused capacity is less than the max. rate. Capacity is then
shared by existing and the new connection. See Example 5 */
else n
Cshared unused
We will now consider several numerical examples in this section to
clarify the algorithms and analysis presented above. For all the following
examples we assume that the total link bandwidth
Mbps and there are only two shared
users groups i.e. 2. For group 1 C user
C user
C user
Prior to VPN connection request in group 1:
Here, for group 1, C
and C user
C user max(1) . Also, Cshared unused
which is greater than C user max(1) . Hence, C
Prior to VPN connection request in group 1:
In this example, C
is greater than C user Mbps. This means that group 1
hasn't used all it's base bandwidth and a new connection can have the
maximum offered bandwidth 1 Mbps. However, Cshared unused at the
time of request arrival is Cshared \Gamma
Mbps. This indicates that another group has has borrowed
capacity from group 1. If that group had left at least C user
Mbps then the request could have been assigned the desired amount of
resource. Therefore, the only option left is to relinquish 1 Mbps from
the group that has borrowed it. Searching the table we find that the only
other group 2 has taken that bandwidth. Therefore, we need to deduct
1 Mbps from group 2 and recompute the individual share of a VPN
connection as C
C shared(2) \GammaC user max(1)
Mbps. Obviously, C
Mbps.
Prior to VPN connection request in group 2:
This is a case where one group has used it's full allocated base capacity
but can borrow resources from the other group which has left some
spare capacity. Here, C
the total spared capacity Cshared unused
and this value is greater than C user max(2) (i.e 2 Mbps). Therefore,
the new VPN connection request can be allocated the maximum offered
value (i.e. 2 Mbps) by even exceeding the base capacity of group
2.
Example 5 :Prior to VPN connection request in group 2:
The example here depicts a scenario where one group which has
already exceeded it's base capacity and has to accommodate a new
connection request when there is no unused resource left by other
group(s).Here, even before the new call arrival, Group 2 has borrowed
Mbps. So, the current capacity allocated to group
will have to be equally distributed among all the existing and the
new arriving VPN connection. Therefore, C
Mbps.
C.2 VPN Connection Termination
When a VPN connection terminates, resources might have to be released
from the relevant group depending on the current rate every connection
is enjoying in that group. If the rate is less than or equal to
the maximum offered rate then no capacity is released from the groups
current share and as a result all the connections in that group increases
equally. This is because the same capacity is shared by a lower number
of connections. If, however, the current rate of every connection
is already equal to the maximum offered rate, then this termination
would trigger a deduction of C user max(i) from the shared resource
C shared(i) . If all the connections were already enjoying C user max(i) ,
no rate change occurs in any of the existing connections.The algorithm
is stated as follows:
if
/*See Example 6 */
Cshared unused = Cshared unused
if
Cshared unused = Cshared unused
To clarify the VPN connection termination process will now consider
similar examples as presented in the previous section.
Example connection termination from group 1:
Here, C shared(1)
user
1. This means that
the capacity used by this group before the connection termination will
remain unchanged even after the termination. So, the new value of
C shared(1) is also 10 Mbps and each VPN connection will equally
share this capacity which is C shared(1)
capacity is deducted from this group, the total unused shared capacity
will also remain unchanged.
Example 7: Before VPN connection departure from group 1:
In this example, C shared(1)
user
states the fact that prior to this departure all active VPN connections
were using the maximum possible offered bandwidth C user
1 Mbps and in total were having
Hence, the departure should trigger a deduction of C user
Mbps from the total capacity used by this group prior to the departure
as the capacity even after the deduction will be good enough to satisfy
active connections offering highest possible
rate of 1 Mbps. Therefore, C Mbps and and
each VPN connection will receive C shared(1)
the termination process triggers deduction of C user max(1) from the
capacity used by group 1, the unused shared capacity will increase by
the same value. So, Cshared unused
C.3 VPN Capacity Expansion
Unused shared capacity left by some groups can be distributed
among others. Priority can be given to certain groups while allocating
unused capacity. In the next section we will present various policies to
allocate unused dedicated capacity and those might apply here as well.
Here we consider only one case where preference is given to the needy
groups where need is determined from the ratio C user(i)
C user max(i)
. So, we
order the groups according to this ratio where in reordered groups the
first one has the lowest C user(i)
C user max(i)
and the last one has the highest
C user(i)
C user max(i)
. Once reordering has been done the expansion algorithm
starts allocating unused bandwidth to the first group, then the next, and
so on based on the availability of resources. This can be stated as :
if
shared unused
shared
Cshared unused \Gamma [N shared(i) :C user
if
shared unused
+Cshared unused
Cshared unused
Example 8: Before VPN connection termination from group 2:
After the termination of a VPN connection from group 2,
Cshared unused Mbps. If there is need of resources by other
group(s), this capacity can be used partly or fully. We find that group
1 has need for this resource since C user(1)
user max(1)
1. Now it remains
to be seen to what extent we could use this unused capac-
ity. Here, C shared(1) +C shared unused
11 and is greater
than C user max(1) which is 1 Mbps. Therefore, capacity for group
1 can be expanded to N shared(1) :C user
Mbps allocating each existing connection C user
The remaining unused capacity will be reduced to Cshared unused \Gamma
[N shared(1) :C user
Mbps.
Example 9: Before VPN connection departure from group 2:
Unlike the previous example where group 1 only needed to use a
portion of the unused resources, all the remaining capacity can be allocated
to existing group 1 VPN connections in order to enhance the
service. C shared(1) will be increased to 10+ 2=12 Mbps and each existing
connection will receive C shared(1)
12Mbps.
D. Fair Allocation of Unused Dedicated Resources: Policy III
In the previous section we have discussed methods where one shared
service group can borrow resources from another similar group. In this
section, we will discuss the possibilities of sharing the unused dedicated
resources among various shared service groups. If the shared
service groups are allowed to borrow resources from unused dedicated
resources, we then define a new term:
shared Cded unused
The question here is how we can allocate the unused dedicated resources
fairly among the competing groups. If all VPN tunnels want
the maximum bandwidth as offered in ISP policy offer, then it is possible
that at some point:
shared
If
shared
, the quantity that is
needed to allocated the maximum possible offered rates to all connections
even after allowing the unused dedicated resources to be used by
shared service groups, is greater than 0, we need to define a fair set of
user throughput values (i.e. C user(i) ) given the set of maximum offered
loads C user max(i) and C
shared . In other words, we need to divide
this extra capacity Cded unused among all the needy groups in a fair
manner. However, fair sharing of extra resources is not a trivial issue
and was addressed by others for different network situations [20], [11],
[18], [19] . Some proposals [11] are in favour of sharing the bottleneck
capacity equally among users independent of their requirements , and
others [20], [18] advocate to penalize users causing overloads.
While we do share the resources among VPN connections in each
group, equal sharing of unused dedicated capacity will not help much
to some groups where connections are already enjoying rates close to
C user max(i) . At the same time it also doesn't alleviate the problem
of other groups having rates above C user min(i) but much less than
C user max(i) . The fairness criterion of [20] also doesn't fit here as
that would deprive the heavy user groups to gain share from unused
dedicated resources even when they are enjoying rates much below
C user max(i) . Our case is further complicated by the fact that while
penalizing heavy user groups we cannot reduce their current share, and
this is what might happen in certain cases while trying to maximize the
rates of lower user groups. In the following sections we will discuss
various fair sharing methods at the edges.
D.1 Allocation of unused resources to lower user groups first
In this case, we first need to order the user groups based on their
C user max(i) values. The objective is to satisfy the lower user groups
first by trying to allocate maximum offered values while higher user
groups have less chances to acquire resources left by dedicated service
group. The rationale behind this is that more VPN users can be satisfied
and allocating to higher user groups might bring little changes in many
cases if sufficient extra resource is not available.
If the ordering leads to service groups
it is possible that if we expand K groups the VPN tunnels
belonging to those group will enjoy the maximum offered band-
th group receives rest of unused dedicated resource,
and other tunnels remain unchanged. The total enhanced shared capacity
can then be computed as follows:
shared
N shared(i) :C user max(i)
Cded unused
[N shared(i) :C user
The above computation helps us to view how C
shared is shared
by different groups. However, this general case is true when K -
2. The other cases are:
shared
C shared(1) +Cded unused if
Cded unused
In practice, when there is unused dedicated capacity the process
starts by asking the first group if the unused capacity is enough to satisfy
all the VPN connections. If so, each connection receives a maximum
value C user max(i) and then queries the second group. Other-
wise, the whole amount of capacity is allocated to the first group and
divided among the competing connections. The process continues as
long as unused capacity is a positive figure.
Assume a situation where we have 3 groups where
VPN connections in each of them were having capacity below their
respective C user max(i) . Also, Cshared = Mbps, and for group
1: C
0:25 Mbps, for group 2: C
Mbps, C user Mbps, and for group 3: C
Mbps, C user Mbps. Prior to the
availability of Cded unused = 7 Mbps we had :
Here the groups are already ordered. Applying the algorithms we
see that the first two groups can be allocated the maximum rates.
Therefore, they are both expanded to 15 \Theta
and 12 \Theta respectively. Rest of the unused capacity
Cded unused \Gamma
Mbps goes to the third group.
D.2 Allocation of unused resources to highest needy groups first
This is much like the process as described above with the only difference
that groups are ordered based on their needs. Apportionment
mechanisms and algorithms remain the same. Here, need is determined
from the ratio of C user(i)
C user max(i)
. So, groups with lower ratios get preference
over groups with higher ratios. Therefore, the process starts feeding
the most needy group and continues as long as it has some unused
capacity.
of previous section:
C user max(3)
C user max(1)
0:67, and C user(2)
C user max(2)
0:83.
Clearly, group 3 is the most needy group. If we have Cded unused
Mbps then that can serve the the most needy group 3 and enhance it's
service. The new C
C user
0:67. In the previous examples, this group never had the chance to grab
portion of the unused bandwidth, but the new policy here allows it to
improve the service substantially.
D.3 Allocation of unused resources based on proportional needs
Although the above mechanism seems to be fair since it allocates
based on the group's need, but in many cases there will be several
needy groups with little differences in their needs, and in such
cases the apportionment might not be always fair if unused dedicated
resources are exhausted while trying to feed first few groups
and other remain deprived to get a share. In this section, we there-
fore, present a way to allocate unused resources based on proportional
need. Any group that is in need of resource, i.e, having ratio
C user(i)
C user max(i)
receives a portion of unused resource that is proportional
to the group's need. Therefore, any group i, after receiving
the extra resource based on this proportional need, is expanded to
ded unused :C shared excess(i)
shared excess
need
for group i C shared excess(i) , is actually excess quantity that is needed
to offer all connections in that group the maximum value C user max(i) .
Therefore, C shared
Example 12: Once again, let us consider example to illustrate
the use of proportional need. No ordering is needed here as allocation
of extra capacity is solely based on proportional need. Here for
group 1: C user(1)
C user max(1)
0:67, for group 2: C user(2)
C user max(2)
and for group 3: C user(3)
C user max(3)
0:5.Application of this allocation
policy will expand the capacity of group 1 to: C
7[(0:5)15\Gamma5]
connections are improved with new C
C user max(1)
0:79. Similarly, for group 2: C
Mbps, C
C user max(2)
0:89 and for group 3:
C user
0:68. This clearly shows that proportional sharing fairly enhances the
rate of most needy group 3. This wouldn't have been the case had we
applied other fairness methods.
IV. IMPLEMENTATION OF BANDWIDTH BROKER FOR DYNAMIC
CONFIGURATION
As the underlying network may provide different classes of service
to satisfy various VPN customers, by identifying the generic functionality
provided by any resource and policy options, we present the BB
with a standard WEB interface as shown in Figure 6(b). The Band-width
Broker manages the outsourced VPNs for corporate customers
that have Service Level Agreements (SLAs) with their ISPs and allows
one such user to specify demand through a WWW interface to establish
a VPN with certain QoS between two endpoints.
A. The Essential Components of Bandwidth Broker
The BB needs to keep track of existing connections and available
resources and update relevant databases to reflect the most recent net-work
state. The BB interacts with specialized configuration daemons
(CD) when a certain user request arrives to setup a tunnel and the BB
has to decide whether it can allocate enough resources to meet the demand
of that tunnel. While the BB invokes a SLA database to check
the validity of the user request, it essentially needs to maintain a connection
database that contains a list of currently active VPNs and an
edge resource database to keep track of records of quantitative resource
available (base capacity) and current resource consumption of various
router interfaces.
Fig. 6. BB WEB interface for Users
B. Examples of Dynamic Configuration
SWITCH Network
Public Internet
130.92.66.22
Univ. of Geneve
Univ. of Berne
Univ. of Berne
Fig. 7. Experimental Setup of VPN
A resource controller in the Bandwidth Broker checks resource and
connection databases whenever there is any new connection arrival or
departure that might trigger modification of rates of existing connec-
tions. For better understanding of how edge routers are dynamically
configured to meet the user demand and conform SLA we will now
demonstrate some examples of dynamic rate allocations of VPN connections
in commercial Cisco routers. By considering similar examples
as detailed in section III we will see how the simple algorithms are really
applied to the edge devices. Let us consider an experimental setup
Figure
of Difserv-VPNs where we have three VPN and QoS capable
edge routers each having private network behind them.
Configuration 1: User 'A' wants to establish a VPN connection
for source 172.17.0.100 and destination 172.20.0.100 and chooses a
menu (1-2 Mbps) from ISP provided website and submits his request.
The resource group definition and edge resource database entries are
as shown in Figure 8. Applying algorithm presented in section 3, the
policing rate C user(1) that is configured in edge router 130.92.70.101
is C Mbps. If user 'B' chooses the same
menu he also gets C since capacity in group 1 has
the ability to support that. Assume that two more users 'C' and 'D'
decide to have VPN connection with capacity varying between 0.5 and
Mbps. Group 2 can support both the connections with the maximum
available rate of 1 Mbps. Therefore, C
Mbps is also configured in the router for these connections as we see in
the following:
/*policing individual VPN connection at the inbound with C
for users 'A' and 'B' and C users 'C' and 'D'*/
rate-limit input access-group 140 2000000 2000000 8000000
conform-action set-prec-transmit 1 exceed-action set-prec-transmit 2
rate-limit input access-group 141 2000000 2000000 8000000
conform-action set-prec-transmit 1 exceed-action set-prec-transmit 2
rate-limit input access-group 142 1000000 2000000 8000000
conform-action set-prec-transmit 1 exceed-action set-prec-transmit 2
rate-limit input access-group 143 1000000 2000000 8000000
conform-action set-prec-transmit 1 exceed-action set-prec-transmit 2
/*Classifying the requested VPN traffic/
access-list 140 permit ip host 172.17.0.100 host 172.20.0.100
access-list 141 permit ip host 172.17.0.101 host 172.20.0.100
access-list 142 permit ip host 172.17.0.102 host 172.20.0.100
access-list 143 permit ip host 172.17.0.103 host 172.20.0.100
Here, we show only the ingress router policing and marking since
diffserv is unidirectional. We assume that bit precedence 1 is used for
EF traffic marking and traffic that exceed the specified rate are marked
as best effort (bit precedence 2). Users not familiar with Cisco routers,
should only notice the first of the traffic rate parameters (for example
2000000 in '2000000 2000000 8000000') in rate-limit
policing and marking commands. This is the rate that we refer to as
C user(i) for any group i. The other two are burst parameters.
Controller
Resource
A 172.17.0.100 140 172.20.0.100
resource definition
connection database
edge resource database
Network Elements (Edge Routers)
Request from WEB interface
Edge Router Group Base
Capacity Used
Capacity
Resource Group user-min user-max
User
ID
Source
Address ID Time
ID
Source Tun. Dest
Address Dest Tun. Resource Group Usage
Current Activation
Fig. 8. Partial entries of Connection and Resource Databases.A scenario when all connections
receive the maximum offered value
Configuration 2: Now if users 'A' and 'B' also want to establish
connections from the same sources to 172.18.0.100 and 172.18.0.101
respectively and choose a menu (0.5 - 1 Mbps) i.e. group 2, we see
that capacity is exhausted in group 2, and therefore, these two new
connections and other two existing connections share the base capacity
of 2 Mbps and each connection is configured with C
C user Mbps. This is shown in Figure 9 and the
new configuration script that is used at this point is as follows:
rate-limit input access-group 140 2000000 2000000 8000000
conform-action set-prec-transmit 1 exceed-action set-prec-transmit 2
rate-limit input access-group 141 2000000 2000000 8000000
conform-action set-prec-transmit 1 exceed-action set-prec-transmit 2
rate-limit input access-group 142 500000 2000000 8000000
conform-action set-prec-transmit 1 exceed-action set-prec-transmit 2
rate-limit input access-group 143 500000 2000000 8000000
conform-action set-prec-transmit 1 exceed-action set-prec-transmit 2
rate-limit input access-group 144 500000 2000000 8000000
conform-action set-prec-transmit 1 exceed-action set-prec-transmit 2
rate-limit input access-group 145 500000 2000000 8000000
conform-action set-prec-transmit 1 exceed-action set-prec-transmit 2
access-list 144 permit ip host 172.17.0.100 host 172.18.0.100
access-list 145 permit ip host 172.17.0.101 host 172.18.0.101
V.
AND CONCLUSION
In this paper, we have proposed a novel range based SLA that allows
customers to specify their requirements as a range of quantitative service
for VPN connections since they are unable or unwilling to predict
load between the VPN endpoints. To support such services we have
proposed and developed a prototype Bandwidth Broker (BB) that can
logically partition the capacity at the edges to various service classes (or
groups) of VPNs and manage them efficiently to allow resource shar-
Controller
Resource
A 172.17.0.100 140 172.20.0.100
resource definition
connection database
edge resource database
Network Elements (Edge Routers)
Request from WEB interface
Edge Router Group Base
Capacity Used
Capacity
Resource Group user-min user-max
User
ID Source
Address ID Time
ID
Source Tun. Dest
Address Dest Tun. Resource Group Usage
Current Activation
A 172.17.0.100 144 172.20.0.100 151 2 0.5 Mbps 17:20
Fig. 9. A scenario when rate of existing connections are reduced to accommodate new
connections
ing among the groups in a dynamic and fair manner. Various algorithms
with examples and analysis have been presented to provision resource
dynamically at the edges to support QoS for VPN connections.
One obvious advantage of our system is the pricing gain. The price
that customers have to pay is higher than one pays for the lower bound
capacity but lower than what is normally needed to be paid for upper
bound capacity. During low load it is possible that users might enjoy
the upper bound rate without paying anything extra. Such pricing might
be attractive to users and ISPs can take advantage of that to attract more
customers. With all these advantages we believe that our model can be
quite attractive to the ISPs willing to deploy it in a real world scenario.
VI.
ACKNOWLEDGEMENT
The work described in this paper is part of the work done in
the project Charging and Accounting Technologies for the Internet
(CATI) [4] funded by the Swiss National Science Foundation
(Project no. 5003-054559/1 and 5003-054560/1), the SNF R' Equip
project no. 2160-053299.98/1 and the foundation F-orderung der wissenschaftlichen
Forschung an der Universit?t Bern
--R
Routing Guidelines for Efficient Routing Methods.
A Framework for Differentiated Services.
An Architecture for Differentiated Services
An Overview of Quality of Service Routing for Next-Generation High-Speed Networks: Problems and Solutions
A framework for qos-based routing in the internet
A Flexible Model for Resource Management in Virtual Private Networks.
MPLS Support of Differentiated Services.
A Framework for IP Based Virtual Private Networks.
An Expedited Forwarding phb
Bottleneck Flow Control.
Implementation of a Bandwidth Broker for Dynamic End-to-End Resource Reservation in Outsourced Virtual Private Networks
Implementation of a Service Broker for Management of QoS enabled VPNs.
Core MPLS IP VPN Architecture.
Benjamin Teitelbaum and
Fairness in Window Flow Controlled Computer Networks.
A study of fairness in packet switching networks.
Fairness in ATM networks.
--TR
--CTR
Raffaele Bolla , Roberto Bruschi , Franco Davoli, Capacity planning in IP virtual private networks under mixed traffic, Computer Networks: The International Journal of Computer and Telecommunications Networking, v.50 n.8, p.1069-1085, 6 June 2006
Haci A. Mantar , Ibrahim T. Okumus , Junseok Hwang , Steve J. Chapin, A scalable intra-domain resource management architecture for DiffServ networks, Journal of High Speed Networks, v.15 n.2, p.185-205, January 2006 | fairness;resource provisioning;Bandwidth Broker BB;connection admission;dynamic configuration;Service Level Agreement SLA;Virtual Private Network VPN;Quality-of-Service QoS;Differentiated Services DiffServ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.