You are on page 1of 1770

Wiley Encyclopedia of Computer

Science and Engineering


Applications
A
ASYNCHRONOUS TRANSFER MODE peak rate, statistical multiplexing allows a large number of
NETWORKS bursty sources to share the networks bandwidth.
Since its birth in the mid-1980s, ATM has been fortified
Asynchronous transfer mode, or ATM, is a network transfer by a number of robust standards and realized by a signifi-
technique capable of supporting a wide variety of multi- cant number of network equipment manufacturers. Inter-
media applications with diverse service and performance national standards-making bodies such as the ITU and
requirements. It supports traffic bandwidths ranging from independent consortia like the ATM Forum have developed
a few kilobits per second (e.g., a text terminal) to several a significant body of standards and implementation agree-
hundred megabits per second (e.g., high-definition video) ments for ATM (1,4). As networks and network services
and traffic types ranging from continuous, fixed-rate traffic continue to evolve toward greater speeds and diversities,
(e.g., traditional telephony and file transfer) to highly ATM will undoubtedly continue to proliferate.
bursty traffic (e.g., interactive data and video). Because
of its support for such a wide range of traffic, ATM was ATM STANDARDS
designated by the telecommunication standardization sec-
tor of the International Telecommunications Union (ITU-T, The telecommunication standardization sector of the ITU,
formerly CCITT) as the multiplexing and switching tech- the international standards agency commissioned by the
nique for Broadband, or high-speed, ISDN (B-ISDN) (1). United Nations for the global standardization of telecom-
ATM is a form of packet-switching technology. That is, munications, has developed a number of standards for ATM
ATM networks transmit their information in small, fixed- networks. Other standards bodies and consortia (e.g., the
length packets called cells, each of which contains 48 octets ATM Forum, ANSI) have also contributed to the develop-
(or bytes) of data and 5 octets of header information. The ment of ATM standards. This section presents an overview
small, fixed cell size was chosen to facilitate the rapid of the standards, with particular emphasis on the protocol
processing of packets in hardware and to minimize the reference model used by ATM (2).
amount of time required to fill a single packet. This is
particularly important for real-time applications such as Protocol Reference Model
voice and video that require short packetization delays.
ATM is also connection-oriented. In other words, a The B-ISDN protocol reference model, defined in ITU-T
virtual circuit must be established before a call can take recommendation I.321, is shown in Fig. 1(1). The purpose of
place, where a call is defined as the transfer of information the protocol reference model is to clarify the functions that
between two or more endpoints. The establishment of a ATM networks perform by grouping them into a set of
virtual circuit entails the initiation of a signaling process, interrelated, function-specific layers and planes. The refer-
during which a route is selected according to the calls ence model consists of a user plane, a control plane, and a
quality of service requirements, connection identifiers at management plane. Within the user and control planes is a
each switch on the route are established, and network hierarchical set of layers. The user plane defines a set of
resources such as bandwidth and buffer space may be functions for the transfer of user information between
reserved for the connection. communication endpoints; the control plane defines control
Another important characteristic of ATM is that its functions such as call establishment, call maintenance, and
network functions are typically implemented in hardware. call release; and the management plane defines the opera-
With the introduction of high-speed fiber optic transmis- tions necessary to control information flow between planes
sion lines, the communication bottleneck has shifted from and layers and to maintain accurate and fault-tolerant
the communication links to the processing at switching network operation.
nodes and at terminal equipment. Hardware implementa- Within the user and control planes, there are three
tion is necessary to overcome this bottleneck because it layers: the physical layer, the ATM layer, and the ATM
minimizes the cell-processing overhead, thereby allowing adaptation layer (AAL). Figure 2 summarizes the functions
the network to match link rates on the order of gigabits per of each layer (1). The physical layer performs primarily bit-
second. level functions, the ATM layer is primarily responsible for
Finally, as its name indicates, ATM is asynchronous. the switching of ATM cells, and the ATM adaptation layer is
Time is slotted into cell-sized intervals, and slots are responsible for the conversion of higher-layer protocol
assigned to calls in an asynchronous, demand-based man- frames into ATM cells. The functions that the physical,
ner. Because slots are allocated to calls on demand, ATM ATM, and adaptation layers perform are described in more
can easily accommodate traffic whose bit rate fluctuates detail next.
over time. Moreover, in ATM, no bandwidth is consumed
unless information is actually transmitted. ATM also gains Physical Layer
bandwidth efficiency by being able to multiplex bursty The physical layer is divided into two sublayers: the phy-
traffic sources statistically. Because bursty traffic does sical medium sublayer and the transmission convergence
not require continuous allocation of the bandwidth at its sublayer (1).
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 ASYNCHRONOUS TRANSFER MODE NETWORKS

error control is the insertion of an 8-bit CRC in the ATM cell


header to protect the contents of the ATM cell header. Cell
delineation is the detection of cell boundaries. Transmis-
sion frame adaptation is the encapsulation of departing
cells into an appropriate framing structure (either cell-
based or SDH-based).

ATM Layer
The ATM layer lies atop the physical layer and specifies the
functions required for the switching and flow control of
ATM cells (1).
There are two interfaces in an ATM network: the user-
network interface (UNI) between the ATM endpoint and
the ATM switch, and the network-network interface (NNI)
Figure 1. Protocol reference model for ATM. between two ATM switches. Although a 48-octet cell pay-
load is used at both interfaces, the 5-octet cell header differs
slightly at these interfaces. Figure 3 shows the cell header
structures used at the UNI and NNI (1). At the UNI, the
Physical Medium Sublayer. The physical medium (PM)
header contains a 4-bit generic flow control (GFC) field, a
sublayer performs medium-dependent functions. For
24-bit label field containing virtual path identifier (VPI)
example, it provides bit transmission capabilities including
and virtual channel identifier (VCI) subfields (8 bits for the
bit alignment, line coding and electrical/optical conversion.
VPI and 16 bits for the VCI), a 2-bit payload type (PT) field, a
The PM sublayer is also responsible for bit timing (i.e., the
1-bit cell loss priority (CLP) field, and an 8-bit header error
insertion and extraction of bit timing information). The PM
check (HEC) field. The cell header for an NNI cell is
sublayer currently supports two types of interface: optical
identical to that for the UNI cell, except that it lacks the
and electrical.
GFC field; these four bits are used for an additional 4 VPI
bits in the NNI cell header.
Transmission Convergence Sublayer. Above the physical
The VCI and VPI fields are identifier values for virtual
medium sublayer is the transmission convergence (TC)
channel (VC) and virtual path (VP), respectively. A virtual
sublayer, which is primarily responsible for the framing
channel connects two ATM communication endpoints. A
of data transported over the physical medium. The ITU-T
virtual path connects two ATM devices, which can be
recommendation specifies two options for TC sublayer
switches or endpoints, and several virtual channels may
transmission frame structure: cell-based and synchronous
be multiplexed onto the same virtual path. The 2-bit PT
digital hierarchy (SDH). In the cell-based case, cells are
field identifies whether the cell payload contains data or
transported continuously without any regular frame struc-
control information. The CLP bit is used by the user for
ture. Under SDH, cells are carried in a special frame
explicit indication of cell loss priority. If the value of the
structure based on the North American SONET (synchro-
CLP is 1, then the cell is subject to discarding in case of
nous optical network) protocol (3). Regardless of which
congestion. The HEC field is an 8-bit CRC that protects the
transmission frame structure is used, the TC sublayer is
contents of the cell header. The GFC field, which appears
responsible for the following four functions: cell rate decou-
only at the UNI, is used to assist the customer premises
pling, header error control, cell delineation, and transmis-
network in controlling the traffic flow. At the time of writ-
sion frame adaptation. Cell rate decoupling is the insertion
ing, the exact procedures for use of this field have not been
of idle cells at the sending side to adapt the ATM cell
agreed upon.
streams rate to the rate of the transmission path. Header

Figure 2. Functions of each layer in the protocol reference model.


ASYNCHRONOUS TRANSFER MODE NETWORKS 3

Figure 3. ATM cell header structure.

ATM Layer Functions bit rate (UBR). ITU-T defines four service categories,
namely, deterministic bit rate (DBR), statistical bit rate
The primary function of the ATM layer is VPI/VCI transla-
(SBR), available bit rate (ABR), and ATM block transfer
tion. As ATM cells arrive at ATM switches, the VPI and VCI
(ABT). The first of the three ITU-T service categories
values contained in their headers are examined by the
correspond roughly to the ATM Forums CBR, VBR, and
switch to determine which outport port should be used to
ABR classifications, respectively. The fourth service cate-
forward the cell. In the process, the switch translates the
gory, ABT, is solely defined by ITU-T and is intended for
cells original VPI and VCI values into new outgoing VPI
bursty data applications. The UBR category defined by the
and VCI values, which are used in turn by the next ATM
ATM Forum is for calls that request no quality of service
switch to send the cell toward its intended destination. The
guarantees at all. Figure 4 lists the ATM service categories,
table used to perform this translation is initialized during
their quality of service (QoS) parameters, and the traffic
the establishment of the call.
descriptors required by the service category during call
An ATM switch may either be a VP switch, in which case
establishment (1,4).
it translates only the VPI values contained in cell headers,
The constant bit rate (or deterministic bit rate) service
or it may be a VP/VC switch, in which case it translates the
category provides a very strict QoS guarantee. It is targeted
incoming VPI/VCI value into an outgoing VPI/VCI pair.
at real-time applications, such as voice and raw video,
Because VPI and VCI values do not represent a unique end-
which mandate severe restrictions on delay, delay variance
to-end virtual connection, they can be reused at different
(jitter), and cell loss rate. The only traffic descriptors
switches through the network. This is important because
required by the CBR service are the peak cell rate and
the VPI and VCI fields are limited in length and would be
the cell delay variation tolerance. A fixed amount of band-
quickly exhausted if they were used simply as destination
width, determined primarily by the calls peak cell rate, is
addresses.
reserved for each CBR connection.
The ATM layer supports two types of virtual connec-
The real-time variable bit rate (or statistical bit rate)
tions: switched virtual connections (SVC) and permanent,
service category is intended for real-time bursty applica-
or semipermanent, virtual connections (PVC). Switched
tions (e.g., compressed video), which also require strict QoS
virtual connections are established and torn down dyna-
guarantees. The primary difference between CBR and
mically by an ATM signaling procedure. That is, they exist
VBR-rt is in the traffic descriptors they use. The VBR-rt
only for the duration of a single call. Permanent virtual
service requires the specification of the sustained (or aver-
connections, on the other hand, are established by network
age) cell rate and burst tolerance (i.e., burst length) in
administrators and continue to exist as long as the admin-
addition to the peak cell rate and the cell delay variation
istrator leaves them up, even if they are not used to trans-
mit data.
Other important functions of the ATM layer include cell
multiplexing and demultiplexing, cell header creation and
extraction, and generic flow control. Cell multiplexing is
the merging of cells from several calls onto a single trans-
mission path, cell header creation is the attachment of a 5-
octet cell header to each 48-octet block of user payload, and
generic flow control is used at the UNI to prevent short-
term overload conditions from occurring within the net-
work.

ATM Layer Service Categories


The ATM Forum and ITU-T have defined several distinct
service categories at the ATM layer (1,4). The categories
defined by the ATM Forum include constant bit rate (CBR),
real-time variable bit rate (VBR-rt), non-real-time variable
bit rate (VBR-nrt), available bit rate (ABR), and unspecified Figure 4. ATM layer service categories.
4 ASYNCHRONOUS TRANSFER MODE NETWORKS

tolerance. The ATM Forum also defines a VBR-nrt service


category, in which cell delay variance is not guaranteed.
The available bit rate service category is defined to
exploit the networks unused bandwidth. It is intended
for non-real-time data applications in which the source is
amenable to enforced adjustment of its transmission rate. A
minimum cell rate is reserved for the ABR connection and
therefore guaranteed by the network. When the network Figure 5. Service classification for AAL.
has unused bandwidth, ABR sources are allowed to
increase their cell rates up to an allowed cell rate (ACR),
a value that is periodically updated by the ABR flow control
mechanism (to be described in the section entitled ATM AAL service class A corresponds to constant bit rate
Traffic Control). The value of ACR always falls between services with a timing relation required between source
the minimum and the peak cell rate for the connection and and destination. The connection mode is connection-
is determined by the network. oriented. The CBR audio and video belong to this class.
The ATM Forum defines another service category for Class B corresponds to variable bit rate (VBR) services.
non-real-time applications called the unspecified bit rate This class also requires timing between source and desti-
(UBR) service category. The UBR service is entirely best nation, and its mode is connection-oriented. The VBR audio
effort; the call is provided with no QoS guarantees. The and video are examples of class B services. Class C also
ITU-T also defines an additional service category for non- corresponds to VBR connection-oriented services, but the
real-time data applications. The ATM block transfer ser- timing between source and destination needs not be
vice category is intended for the transmission of short related. Class C includes connection-oriented data transfer
bursts, or blocks, of data. Before transmitting a block, such as X.25, signaling, and future high-speed data ser-
the source requests a reservation of bandwidth from the vices. Class D corresponds to connectionless services. Con-
network. If the ABT service is being used with the immedi- nectionless data services such as those supported by LANs
ate transmission option (ABT/IT), the block of data is sent and MANs are examples of class D services.
at the same time as the reservation request. If bandwidth is Four AAL types (Types 1, 2, 3/4, and 5), each with a
not available for transporting the block, then it is simply unique SAR sublayer and CS sublayer, are defined to
discarded, and the source must retransmit it. In the ABT support the four service classes. AAL Type 1 supports
service with delayed transmission (ABT/DT), the source constant bit rate services (class A), and AAL Type 2 sup-
waits for a confirmation from the network that enough ports variable bit rate services with a timing relation
bandwidth is available before transmitting the block of between source and destination (class B). AAL Type 3/4
data. In both cases, the network temporarily reserves was originally specified as two different AAL types (Type 3
bandwidth according to the peak cell rate for each block. and Type 4), but because of their inherent similarities, they
Immediately after transporting the block, the network were eventually merged to support both class C and class D
releases the reserved bandwidth. services. AAL Type 5 also supports class C and class D
services.
ATM Adaptation Layer
AAL Type 5. Currently, the most widely used adaptation
The ATM adaptation layer, which resides atop the ATM
layer is AAL Type 5. AAL Type 5 supports connection-
layer, is responsible for mapping the requirements of
oriented and connectionless services in which there is no
higher layer protocols onto the ATM network (1). It oper-
timing relation between source and destination (classes C
ates in ATM devices at the edge of the ATM network and is
and D). Its functionality was intentionally made simple in
totally absent in ATM switches. The adaptation layer is
order to support high-speed data transfer. AAL Type 5
divided into two sublayers: the convergence sublayer (CS),
assumes that the layers above the ATM adaptation layer
which performs error detection and handling, timing, and
can perform error recovery, retransmission, and sequence
clock recovery; and the segmentation and reassembly
numbering when required, and thus, it does not provide
(SAR) sublayer, which performs segmentation of conver-
these functions. Therefore, only nonassured operation is
gence sublayer protocol data units (PDUs) into ATM cell-
provided; lost or corrupted AAL Type 5 packets will not be
sized SAR sublayer service data units (SDUs) and vice
corrected by retransmission.
versa.
Figure 6 depicts the SAR-SDU format for AAL Type 5
In order to support different service requirements, the
(5,6). The SAR sublayer of AAL Type 5 performs segmenta-
ITU-T has proposed four AAL-specific service classes.
tion of a CS-PDU into a size suitable for the SAR-SDU
Figure 5 depicts the four service classes defined in recom-
payload. Unlike other AAL types, Type 5 devotes the entire
mendation I.362 (1). Note that even though these AAL
48-octet payload of the ATM cell to the SAR-SDU; there is
service classes are similar in many ways to the ATM layer
no overhead. An AAL specific flag (end-of-frame) in the
service categories defined in the previous section, they are
not the same; each exists at a different layer of the protocol
reference model, and each requires a different set of func-
tions.
Figure 6. SAR-SDU format for AAL Type 5.
ASYNCHRONOUS TRANSFER MODE NETWORKS 5

the CS-PDU, and handling of lost and misinserted cells. At


the time of writing, both the SAR-SDU and CS-PDU for-
mats for AAL Type 2 are still under discussion.

AAL Type 3/4. AAL Type 3/4 mainly supports services


that require no timing relation between the source and
destination (classes C and D). At the SAR sublayer, it
defines a 48-octet service data unit, with 44 octets of
user payload; a 2-bit payload type field to indicate whether
the SDU is at the beginning, middle, or end of a CS-PDU; a
4-bit cell sequence number; a 10-bit multiplexing identifier
that allows several CS-PDUs to be multiplexed over a single
Figure 7. CS-PDU format, segmentation and reassembly of AAL VC; a 6-bit cell payload length indicator; and a 10-bit CRC
Type 5. code that covers the payload. The CS-PDU format allows for
up to 65535 octets of user payload and contains a header
and trailer to delineate the PDU.
The functions that AAL Type 3/4 performs include seg-
ATM PT field of the cell header is set when the last cell of a mentation and reassembly of variable-length user data and
CS-PDU is sent. The reassembly of CS-PDU frames at the error handling. It supports message mode (for framed data
destination is controlled by using this flag. transfer) as well as streaming mode (for streamed data
Figure 7 depicts the CS-PDU format for AAL Type 5 transfer). Because Type 3/4 is mainly intended for data
(5,6). It contains the user data payload, along with any services, it provides a retransmission mechanism if neces-
necessary padding bits (PAD) and a CS-PDU trailer, which sary.
are added by the CS sublayer when it receives the user
information from the higher layer. The CS-PDU is padded ATM Signaling
using 0 to 47 bytes of PAD field to make the length of the CS-
ATM follows the principle of out-of-band signaling that was
PDU an integral multiple of 48 bytes (the size of the SAR-
established for N-ISDN. In other words, signaling and data
SDU payload). At the receiving end, a reassembled PDU is
channels are separate. The main purposes of signaling are
passed to the CS sublayer from the SAR sublayer, and CRC
(1) to establish, maintain, and release ATM virtual con-
values are then calculated and compared. If there is no
nections and (2) to negotiate (or renegotiate) the traffic
error, the PAD field is removed by using the value of length
parameters of new (or existing) connections (7). The ATM
field (LF) in the CS-PDU trailer, and user data is passed to
signaling standards support the creation of point-to-point
the higher layer. If an error is detected, the erroneous
as well as multicast connections. Typically, certain VCI and
information is either delivered to the user or discarded
VPI values are reserved by ATM networks for signaling
according to the users choice. The use of the CF field is
messages. If additional signaling VCs are required, they
for further study.
may be established through the process of metasignaling.
AAL Type 1. AAL Type 1 supports constant bit rate
services with a fixed timing relation between source and ATM TRAFFIC CONTROL
destination users (class A). At the SAR sublayer, it defines a
48-octet service data unit (SDU), which contains 47 octets of The control of ATM traffic is complicated as a result of
user payload, 4 bits for a sequence number, and a 4-bit CRC ATMs high-link speed and small cell size, the diverse
value to detect errors in the sequence number field. AAL service requirements of ATM applications, and the diverse
Type 1 performs the following services at the CS sublayer: characteristics of ATM traffic. Furthermore, the configura-
forward error correction to ensure high quality of audio and tion and size of the ATM environment, either local or wide
video applications, clock recovery by monitoring the buffer area, has a significant impact on the choice of traffic control
filling, explicit time indication by inserting a time stamp in mechanisms.
the CS-PDU, and handling of lost and misinserted cells that The factor that most complicates traffic control in ATM
are recognized by the SAR. At the time of writing, the CS- is its high-link speed. Typical ATM link speeds are 155.52
PDU format has not been decided. Mbit/s and 622.08 Mbit/s. At these high-link speeds, 53-
byte ATM cells must be switched at rates greater than one
AAL Type 2. AAL Type 2 supports variable bit rate cell per 2.726 ms or 0.682 ms, respectively. It is apparent
services with a timing relation between source and desti- that the cell processing required by traffic control must
nation (class B). AAL Type 2 is nearly identical to AAL Type perform at speeds comparable to these cell-switching rates.
1, except that it transfers service data units at a variable bit Thus, traffic control should be simple and efficient, without
rate, not at a constant bit rate. Furthermore, AAL Type 2 excessive software processing.
accepts variable length CS-PDUs, and thus, there may Such high speeds render many traditional traffic control
exist some SAR-SDUs that are not completely filled with mechanisms inadequate for use in ATM because of their
user data. The CS sublayer for AAL Type 2 performs the reactive nature. Traditional reactive traffic control
following functions: forward error correction for audio and mechanisms attempt to control network congestion by
video services, clock recovery by inserting a time stamp in responding to it after it occurs and usually involves sending
6 ASYNCHRONOUS TRANSFER MODE NETWORKS

feedback to the source in the form of a choke packet. call at the time of call set-up. This decision is based on the
However, a large bandwidth-delay product (i.e., the traffic characteristics of the new call and the current net-
amount of traffic that can be sent in a single propagation work load. Usage parameter control enforces the traffic
delay time) renders many reactive control schemes ineffec- parameters of the call after it has been accepted into the
tive in high-speed networks. When a node receives feed- network. This enforcement is necessary to ensure that the
back, it may have already transmitted a large amount of calls actual traffic flow conforms with that reported during
data. Consider a cross-continental 622 Mbit/s connection call admission.
with a propagation delay of 20 ms (propagation-bandwidth Before describing call admission and usage parameter
product of 12.4 Mbit). If a node at one end of the connection control in more detail, it is important to first discuss the
experiences congestion and attempts to throttle the source nature of multimedia traffic. Most ATM traffic belongs to
at the other end by sending it a feedback packet, the source one of two general classes of traffic: continuous traffic and
will already have transmitted over 12 Mb of information bursty traffic. Sources of continuous traffic (e.g., constant
before feedback arrives. This example illustrates the inef- bit rate video, voice without silence detection) are easily
fectiveness of traditional reactive traffic control mechan- handled because their resource utilization is predictable
isms in high-speed networks and argues for novel and they can be deterministically multiplexed. However,
mechanisms that take into account high propagation-band- bursty traffic (e.g., voice with silence detection, variable bit
width products. rate video) is characterized by its unpredictability, and this
Not only is traffic control complicated by high speeds, kind of traffic complicates preventive traffic control.
but it also is made more difficult by the diverse QoS require- Burstiness is a parameter describing how densely or
ments of ATM applications. For example, many applica- sparsely cell arrivals occur. There are a number of ways to
tions have strict delay requirements and must be delivered express traffic burstiness, the most typical of which are the
within a specified amount of time. Other applications have ratio of peak bit rate to average bit rate and the average
strict loss requirements and must be delivered reliably burst length. Several other measures of burstiness have
without an inordinate amount of loss. Traffic controls also been proposed (8). It is well known that burstiness
must address the diverse requirements of such applica- plays a critical role in determining network performance,
tions. and thus, it is critical for traffic control mechanisms to
Another factor complicating traffic control in ATM net- reduce the negative impact of bursty traffic.
works is the diversity of ATM traffic characteristics. In
ATM networks, continuous bit rate traffic is accompanied Call Admission Control. Call admission control is the
by bursty traffic. Bursty traffic generates cells at a peak process by which the network decides whether to accept
rate for a very short period of time and then immediately or reject a new call. When a new call requests access to the
becomes less active, generating fewer cells. To improve the network, it provides a set of traffic descriptors (e.g., peak
efficiency of ATM network utilization, bursty calls should rate, average rate, average burst length) and a set of quality
be allocated an amount of bandwidth that is less than their of service requirements (e.g., acceptable cell loss rate,
peak rate. This allows the network to multiplex more calls acceptable cell delay variance, acceptable delay). The net-
by taking advantage of the small probability that a large work then determines, through signaling, if it has enough
number of bursty calls will be simultaneously active. This resources (e.g., bandwidth, buffer space) to support the new
type of multiplexing is referred to as statistical multiplex- calls requirements. If it does, the call is immediately
ing. The problem then becomes one of determining how best accepted and allowed to transmit data into the network.
to multiplex bursty calls statistically such that the number Otherwise it is rejected. Call admission control prevents
of cells dropped as a result of excessive burstiness is network congestion by limiting the number of active con-
balanced with the number of bursty traffic streams allowed. nections in the network to a level where the network
Addressing the unique demands of bursty traffic is an resources are adequate to maintain quality of service guar-
important function of ATM traffic control. antees.
For these reasons, many traffic control mechanisms One of the most common ways for an ATM network to
developed for existing networks may not be applicable to make a call admission decision is to use the calls traffic
ATM networks, and therefore novel forms of traffic control descriptors and quality of service requirements to predict
are required (8,9). One such class of novel mechanisms that the equivalent bandwidth required by the call. The
work well in high-speed networks falls under the heading of equivalent bandwidth determines how many resources
preventive control mechanisms. Preventive control need to be reserved by the network to support the new
attempts to manage congestion by preventing it before it call at its requested quality of service. For continuous,
occurs. Preventive traffic control is targeted primarily at constant bit rate calls, determining the equivalent band-
real-time traffic. Another class of traffic control mechan- width is simple. It is merely equal to the peak bit rate of the
isms has been targeted toward non-real-time data traffic call. For bursty connections, however, the process of deter-
and relies on novel reactive feedback mechanisms. mining the equivalent bandwidth should take into account
such factors as a calls burstiness ratio (the ratio of peak bit
Preventive Traffic Control rate to average bit rate), burst length, and burst interarri-
val time. The equivalent bandwidth for bursty connections
Preventive control for ATM has two major components: call
must be chosen carefully to ameliorate congestion and cell
admission control and usage parameter control (8). Admis-
loss while maximizing the number of connections that can
sion control determines whether to accept or reject a new
be statistically multiplexed.
ASYNCHRONOUS TRANSFER MODE NETWORKS 7

for violating cells. When traffic is bursty, a large number of


cells may be generated in a short period of time, while
conforming to the traffic parameters claimed at the time of
call admission. In such situations, none of these cells should
be considered violating cells. Yet in actual practice, leaky
bucket may erroneously identify such cells as violations of
admission parameters. A virtual leaky bucket mechanism
(also referred to as a marking method) alleviates these
Figure 8. Leaky bucket mechanism. disadvantages (11). In this mechanism, violating cells,
rather than being discarded or buffered, are permitted to
enter the network at a lower priority (CLP 1). These
violating cells are discarded only when they arrive at a
Usage Parameter Control. Call admission control is congested node. If there are no congested nodes along the
responsible for admitting or rejecting new calls. However, routes to their destinations, the violating cells are trans-
call admission by itself is ineffective if the call does not mitted without being discarded. The virtual leaky bucket
transmit data according to the traffic parameters it pro- mechanism can easily be implemented using the leaky
vided. Users may intentionally or accidentally exceed the bucket method described earlier. When the queue length
traffic parameters declared during call admission, thereby exceeds a threshold, cells are marked as droppable
overloading the network. In order to prevent the network instead of being discarded. The virtual leaky bucket method
users from violating their traffic contracts and causing the not only allows the user to take advantage of a light network
network to enter a congested state, each calls traffic flow is load but also allows a larger margin of error in determining
monitored and, if necessary, restricted. This is the purpose the token pool parameters.
of usage parameter control. (Usage parameter control is
also commonly referred to as policing, bandwidth enforce- Reactive Traffic Control
ment, or flow enforcement.)
Preventive control is appropriate for most types of ATM
To monitor a calls traffic efficiently, the usage para-
traffic. However, there are cases where reactive control is
meter control function must be located as close as possible
beneficial. For instance, reactive control is useful for service
to the actual source of the traffic. An ideal usage parameter
classes like ABR, which allow sources to use bandwidth not
control mechanism should have the ability to detect para-
being used by calls in other service classes. Such a service
meter-violating cells, appear transparent to connections
would be impossible with preventive control because the
respecting their admission parameters, and rapidly
amount of unused bandwidth in the network changes
respond to parameter violations. It should also be simple,
dynamically, and the sources can only be made aware of
fast, and cost effective to implement in hardware. To meet
the amount through reactive feedback.
these requirements, several mechanisms have been pro-
There are two major classes of reactive traffic control
posed and implemented (8).
mechanisms: rate-based and credit-based (12,13). Most
The leaky bucket mechanism (originally proposed in
rate-based traffic control mechanisms establish a closed
Ref. 10) is a typical usage parameter control mechanism
feedback loop in which the source periodically transmits
used for ATM networks. It can simultaneously enforce the
special control cells, called resource management cells, to
average bandwidth and the burst factor of a traffic source.
the destination (or destinations). The destination closes the
One possible implementation of the leaky bucket mechan-
feedback loop by returning the resource management cells
ism is to control the traffic flow by means of tokens. A
to the source. As the feedback cells traverse the network,
conceptual model for the leaky bucket mechanism is
the intermediate switches examine their current conges-
illustrated in Fig. 5.
tion state and mark the feedback cells accordingly. When
In Fig. 8, an arriving cell first enters a queue. If the
the source receives a returning feedback cell, it adjusts its
queue is full, cells are simply discarded. To enter the net-
rate, either by decreasing it in the case of network conges-
work, a cell must first obtain a token from the token pool; if
tion or increasing it in the case of network underuse. An
there is no token, a cell must wait in the queue until a new
example of a rate-based ABR algorithm is the Enhanced
token is generated. Tokens are generated at a fixed rate
Proportional Rate Control Algorithm (EPRCA), which was
corresponding to the average bit rate declared during call
proposed, developed, and tested through the course of ATM
admission. If the number of tokens in the token pool exceeds
Forum activities (12).
some predefined threshold value, token generation stops.
Credit-based mechanisms use link-by-link traffic con-
This threshold value corresponds to the burstiness of the
trol to eliminate loss and optimize use. Intermediate
transmission declared at call admission time; for larger
switches exchange resource management cells that contain
threshold values, a greater degree of burstiness is allowed.
credits, which reflect the amount of buffer space available
This method enforces the average input rate while allowing
at the next downstream switch. A source cannot transmit a
for a certain degree of burstiness.
new data cell unless it has received at least one credit from
One disadvantage of the leaky bucket mechanism is that
its downstream neighbor. An example of a credit-based
the bandwidth enforcement introduced by the token pool is
mechanism is the Quantum Flow Control (QFC) algorithm,
in effect even when the network load is light and there is no
developed by a consortium of reseachers and ATM equip-
need for enforcement. Another disadvantage of the leaky
ment manufacturers (13).
bucket mechanism is that it may mistake nonviolating cells
8 ASYNCHRONOUS TRANSFER MODE NETWORKS

HARDWARE SWITCH ARCHITECTURES FOR ATM


NETWORKS

In ATM networks, information is segmented into fixed-


length cells, and cells are asynchronously transmitted
through the network. To match the transmission speed
of the network links and to minimize the protocol proces-
sing overhead, ATM performs the switching of cells in
hardware-switching fabrics, unlike traditional packet
switching networks, where switching is largely performed
in software.
A large number of designs has been proposed and imple-
mented for ATM switches (14). Although many differences
exist, ATM switch architectures can be broadly classified Figure 10. A 8  8 Banyan switch with binary switching ele-
into two categories: asynchronous time division (ATD) and ments.
space-division architectures.

Asynchronous Time Division Switches switched through the fabric. Three typical types of space-
division switches are described next.
The ATD, or single path, architectures provide a single,
multiplexed path through the ATM switch for all cells.
Banyan Switches. Banyan switches are examples of
Typically a bus or ring is used. Figure 9 shows the basic
space-division switches. An N  N Banyan switch is con-
structure of the ATM switch proposed in (15). In Fig. 6, four
structed by arranging a number of binary switching ele-
input ports are connected to four output ports by a time-
ments into several stages (log2N stages). Figure 10 depicts
division multiplexing (TDM) bus. Each input port is allo-
an 8  8 self-routing Banyan switch (14). The switch fabric
cated a fixed time slot on the TDM bus, and the bus is
is composed of twelve 2  2 switching elements assembled
designated to operate at a speed equal to the sum of the
into three stages. From any of the eight input ports, it is
incoming bit rates at all input ports. The TDM slot sizes are
possible to reach all the eight output ports. One desirable
fixed and equal in length to the time it takes to transmit one
characteristic of the Banyan switch is that it is self-routing.
ATM cell. Thus, during one TDM cycle, the four input ports
Because each cross-point switch has only two output lines,
can transfer four ATM cells to four output ports.
only one bit is required to specify the correct output path.
In ATD switches, the maximum throughput is deter-
Very simply, if the desired output addresses of a ATM cell is
mined by a single, multiplexed path. Switches with N input
stored in the cell header in binary code, routing decisions
ports and N output ports must run at a rate N times faster
for the cell can be made at each cross-point switch by
than the transmission links. Therefore, the total through-
examining the appropriate bit of the destination address.
put of ATD ATM switches is bounded by the current cap-
Although the Banyan switch is simple and possesses
abilities of device logic technology. Commercial examples of
attractive features such as modularity, which makes it
ATD switches are the Fore Systems ASX switch and Digi-
suitable for VLSI implementation, it also has some disad-
tals VNswitch.
vantages. One of its disadvantages is that it is internally
blocking. In other words, cells destined for different output
Space-Division Switches
ports may contend for a common link within the switch.
To eliminate the single-path limitation and increase total This results in blocking all cells that wish to use that link,
throughput, space-division ATM switches implement mul- except for one. Hence, the Banyan switch is referred to as a
tiple paths through switching fabrics. Most space-division blocking switch. In Fig. 10, three cells are shown arriving
switches are based on multistage interconnection net- on input ports 1, 3, and 4 with destination port addresses of
works, where small switching elements (usually 2  2 0, 1, and 5, respectively. The cell destined for output port 0
cross-point switches) are organized into stages and provide and the cell destined for output port 1 end up contending for
multiple paths through a switching fabric. Rather than the link between the second and third stages. As a result,
being multiplexed onto a single path, ATM cells are space- only one of them (the cell from input port 1 in this example)
actually reaches its destination (output port 0), while the
other is blocked.

BatcherBanyan Switches. Another example of space-


division switches is the BatcherBanyan switch (14).
(See Fig. 11.) It consists of two multistage interconnection
networks: a Banyan self-routing network and a Batcher
sorting network. In the BatcherBanyan switch, the incom-
ing cells first enter the sorting network, which takes the
cells and sorts them into ascending order according to their
output addresses. Cells then enter the Banyan network,
Figure 9. A 4  4 asynchronous time division switch. which routes the cells to their correct output ports.
ASYNCHRONOUS TRANSFER MODE NETWORKS 9

more cells may still contend for the same output port in a
nonblocking switch, resulting in the dropping of all but one
cell. In order to prevent such loss, the buffering of cells by
the switch is necessary. Figure 13 illustrates that buffers
may be placed (1) in the inputs to the switch, (2) in the
outputs to the switch, or (3) within the switching fabric
itself, as a shared buffer (14). Some switches put buffers in
both the input and output ports of a switch.
Figure 11. BatcherBanyan switch. The first approach to eliminating output contention is to
place buffers in the output ports of the switch (14). In the
worst case, cells arriving simultaneously at all input ports
As shown earlier, the Banyan switch is internally block- can be destined for a single output port. To ensure that no
ing. However, the Banyan switch possesses an interesting cells are lost in this case, the cell transfer must be per-
feature. Namely, internal blocking can be avoided if the formed at N times the speed of the input links, and the
cells arriving at the Banyan switchs input ports are sorted switch must be able to write N cells into the output buffer
in ascending order by their destination addresses. The during one cell transmission time. Examples of output
BatcherBanyan switch takes advantage of this fact and buffered switches include the knockout switch by AT&T
uses the Batcher soring network to sort the cells, thereby Bell Labs, the Siemens & Newbridge MainStreetXpress
making the BatcherBanyan switch internally nonblock- switches, the ATMLs VIRATA switch, and Bay Networks
ing. The Starlite switch, designed by Bellcore, is based on Lattis switch.
the BatcherBanyan architecture (16). The second approach to buffering in ATM switches is to
place the buffers in the input ports of the switch (14). Each
Crossbar Switches. The crossbar switch interconnects N input has a dedicated buffer, and cells that would otherwise
inputs and N outputs into a fully meshed topology; that is, be blocked at the output ports of the switch are stored in
there are N2 cross points within the switch (14). (See input buffers. Commercial examples of switches with input
Fig. 12.) Because it is always possible to establish a con- buffers as well as output buffers are IBMs 8285 Nways
nection between any arbitrary input and output pair, inter- switches, and Ciscos Lightstream 2020 switches.
nal blocking is impossible in a crossbar switch. A third approach is to use a shared buffer within the
The architecture of the crossbar switch has some advan- switch fabric. In a shared buffer switch, there is no buffer at
tages. First, it uses a simple two-state cross-point switch the input or output ports (14). Arriving cells are immedi-
(open and connected state), which is easy to implement. ately injected into the switch. When output contention
Second, the modularity of the switch design allows simple happens, the winning cell goes through the switch, while
expansion. One can build a larger switch by simply adding the losing cells are stored for later transmission in a shared
more cross-point switches. Lastly, compared to Banyan- buffer common to all of the input ports. Cells just arriving at
based switches, the crossbar switch design results in low the switch join buffered cells in competition for available
transfer latency, because it has the smallest number of outputs. Because more cells are available to select from, it is
connecting points between input and output ports. One possible that fewer output ports will be idle when using the
disadvantage to this design, however, is the fact that it shared buffer scheme. Thus, the shared buffer switch can
uses the maximum number of cross points (cross-point achieve high throughput. However, one drawback is that
switches) needed to implement an N  N switch. cells may be delivered out of sequence because cells that
The knockout switch by AT&T Bell Labs is a nonblock- arrived more recently may win over buffered cells during
ing switch based on the crossbar design (17,18). It has N contention (19). Another drawback is the increase in the
inputs and N outputs and consists of a crossbar-based number of input and output ports internal to the switch.
switch with a bus interface module at each output (Fig. 12). The Starlite switch with trap by Bellcore is an example of
the shared buffer switch architecture (16). Other examples
Nonblocking Buffered Switches of shared buffer switches include Ciscos Lightstream 1010
switches, IBMs Prizma switches, Hitachis 5001 switches,
Although some switches such as BatcherBanyan and
and Lucents ATM cell switches.
crossbar switches are internally nonblocking, two or

CONTINUING RESEARCH IN ATM NETWORKS

ATM is continuously evolving, and its attractive ability to


support broadband integrated services with strict quality of
service guarantees has motivated the integration of ATM
and existing widely deployed networks. Recent additions to
ATM research and technology include, but are not limited
to, seamless integration with existing LANs [e.g., LAN
emulation (20)], efficient support for traditional Internet
IP networking [e.g., IP over ATM (21), IP switching (22)],
and further development of flow and congestion control
Figure 12. A knockout (crossbar) switch.
10 ASYNCHRONOUS TRANSFER MODE NETWORKS

Figure 13. Nonblocking buffered


switches.

algorithms to support existing data services [e.g., ABR flow 12. ATM Forum, ATM Forum Traffic management specification
control (12)]. Research on topics related to ATM networks is version 4.0, af-tm-0056.000, April 1996, Mountain View, CA:
currently proceeding and will undoubtedly continue to ATM Forum.
proceed as the technology matures. 13. Quantum Flow Control version 2.0, Flow Control Consortium,
FCC-SPEC-95-1, [Online], July 1995. http://www.qfc.org
14. Y. Oie et al., Survey of switching techniques in high-speed
BIBLIOGRAPHY networks and their performance, Int. J. Satellite Commun., 9:
285303, 1991.
1. CCITT Recommendation I-Series. Geneva: International Tele- 15. M. De Prycker and M. De Somer, Performance of a service
phone and Telegraph Consultative Committee. independent switching network with distributed control, IEEE
2. J. B. Kim, T. Suda and M. Yoshimura, International standar- J. Select. Areas Commun., 5: 12931301, 1987.
dization of B-ISDN, Comput. Networks ISDN Syst., 27: 1994. 16. A. Huang and S. Knauer, Starlite: A wideband digital switch.
3. CCITT Recommendation G-Series. Geneva: International Tel- Proc. IEEE GLOBECOM84, 1984.
ephone and Telegraph Consultative Committee. 17. K. Y. Eng, A photonic knockout switch for high-speed packet
4. ATM Forum Technical Specifications [Online]. Available www: networks, IEEE J. Select. Areas Commun., 6: 11071116, 1988.
www.atmforum.com 18. Y. S. Yeh, M. G. Hluchyj, and A. S. Acampora, The knockout
5. Report of ANSI T1S1.5/91-292, Simple and Efficient Adapta- switch: A simple, modular architecture for high-performance
tion Layer (SEAL), August 1991. packet switching, IEEE J. Select. Areas Commun., 5: 1274
6. Report of ANSI T1S1.5/91-449, AAL5A New High Speed 1283, 1987.
Data Transfer, November 1991. 19. J. Y. Hui and E. Arthurs, A broadband packet switch for
7. CCITT Recommendation Q-Series. Geneva: International Tel- integrated transport, IEEE J. Select. Areas Commun., 5:
ephone and Telegraph Consultative Committee. 12641273, 1987.
8. J. Bae and T. Suda, Survey of traffic control schemes and 20. ATM Forum, LAN emulation over ATM version 1.0. AF-LANE-
protocols in ATM networks, Proc. IEEE, 79: 1991. 0021, 1995, Mountain View, CA: ATM Forum.
9. B. J. Vickers et al., Congestion control and resource manage- 21. IETF, IP over ATM: A framework document, RFC-1932, 1996.
ment in diverse ATM environments, IECEJ J., J76-B-I (11): 22. Ipsilon Corporation, IP switching: The intelligence of
1993. routing, The Performance of Switching [Online]. Available
10. J. S. Turner, New directions in communications (or which way www.ipsiolon.com
to the information age?), IEEE Commun. Mag., 25 (10): 1986.
11. G. Gallassi, G. Rigolio, and L. Fratta, ATM: Bandwidth
assignment and bandwidth enforcement policies. Proc. TATSUYA SUDA
GLOBECOM89. University of California, Irvine
Irvine, California
A
AIRCRAFT COMPUTERS smaller, more powerful, and easier to integrate into multi-
ple areas of aircraft applications.
AIRCRAFT ANALOG COMPUTERS Landau (1) defines a digital computer as a computer for
processing data represented by discrete, localized physical
Early aircraft computers were used to take continuous signals, such as the presence or absence of an electric
streams of inputs to provide flight assistance. Examples current. These signals are represented as a series of bits
of aircraft analog inputs are fuel gauge readings, throttle with word lengths of 16, 32, and 64 bits. See micro-
settings, and altitude indicators. Landau (1) defines an computers for further discussion.
analog computer as a computer for processing data repre- Wakerly (2) shows number systems and codes used to
sented by a continuous physical variable, such as electric process binary digits in digital computers. Some impor-
current. Analog computers monitor these inputs and imple- tant number systems used in digital computers are binary,
ment a predetermined service when some set of inputs calls octal, and hexadecimal numbers. He also shows conver-
for a flight control adjustment. For example, when fuel sion between these and base-10 numbers, as well as simple
levels are below a certain point, the analog computer would mathematical operations such as addition, subtraction,
read a low fuel level in the aircrafts main fuel tanks and division, and multiplication. The American Standard Code
would initiate the pumping of fuel from reserve tanks or the for Information Interchange (ASCII) of the American
balancing of fuel between wing fuel tanks. Some of the first National Standard Institute (ANSI) is also presented,
applications of analog computers to aircraft applications which is Standard No. X3.4-1968 for numerals, symbols,
were for automatic pilot applications, where these analog characters, and control codes used in automatic data
machines took flight control inputs to hold altitude and processing machines, including computers. Figure 1 shows
course. The analog computers use operational amplifiers to a typical aircraft central computer.
build the functionality of summers, adders, subtracters,
and integrators on the electric signals. Microcomputers
The improvements in size, speed, and cost through compu-
Aircraft Digital Computers ter technologies continually implement new computer con-
As the technologies used to build digital computers evolved, sumer products. Many of these products were unavailable
digital computers became smaller, lighter, and less power- to the average consumer until recently. These same break-
hungry, and produced less heat. This improvement made throughs provide enormous functional improvements in
them increasingly acceptable for aircraft applications. aircraft computing. Landau (1) defines microcomputers
Digital computers are synonymous with stored-program as very small, relatively inexpensive computers whose
computers. A stored-program computer has the flexibility central processing unit (CPU) is a microprocessor. A
of being able to accomplish multiple different tasks simply microprocessor (also called MPU or central processing
by changing the stored program. Analog computers are unit) communicates with other devices in the system
hard-wired to perform one and only one function. Analog through wires (or fiber optics) called lines. Each device
computers data, as defined earlier, are continuous physical has a unique address, represented in binary format, which
variables. Analog computers may be able to recognize and the MPU recognizes. The number of lines is also the
process numerous physical variables, but each variable has address size in bits. Early MPU machines had 8-bit
its unique characteristics that must be handled during addresses. Machines of 1970 to 1980 typically had 16-bit
processing by the analog computer. The range of output addresses; modern MPU machines have 256 bits.
values for the analog computer is bounded as a given Common terminology for an MPU is random access
voltage range; if they exceed this range, they saturate. memory (RAM), read only memory (ROM), input-output,
Digital computers are not constrained by physical vari- clock, and interrupts. RAM is volatile storage. It holds both
ables. All the inputs and outputs of the digital computer data and instructions for the MPU. ROM may hold both
are in a digital representation. The processing logic and instructions and data. The key point of ROM is that it is
algorithms performed by the computer work in a single nonvolatile. Typically, in an MPU, there is no operational
representation of the cumulative data. It is not uncommon difference between RAM and ROM other than its volatility.
to see aircraft applications that have analog-to-digital Input-output is how data are transferred to and from the
and digital-to-analog signal converters. This method is microcomputer. Output may be from the MPU, ROM, or
more efficient than having the conversions done within RAM. Input may be from the MPU or the RAM. The clock of
the computers. Analog signals to the digital computer an MPU synchronizes the execution of the MPU instruc-
are converted to digital format, where they are quickly tions. Interrupts are inputs to the MPU that cause it to
processed digitally and returned to the analog device (temporarily) suspend one activity in order to perform a
through a digital-to-analog converter as an analog output more important activity.
for that device to act upon. These digital computers are An important family of MPUs that greatly improved the
performance of aircraft computers is the Motorola M6800
family of microcomputers. This family offered a series of
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 AIRCRAFT COMPUTERS

AVIONICS

In the early years of aircraft flight, technological innovation


was directed at improving flight performance through
rapid design improvements in aircraft propulsion and
airframes. Secondary development energies went to areas
such as navigation, communication, munitions delivery,
and target detection. The secondary functionality of
aircraft evolved into the field of avionics. Avionics now
provides greater overall performance and accounts for a
greater share of aircraft lifecycle costs than either propul-
sion or airframe components.
Landau (1) defines avionics [avi(ation) (electr)onics] as
the branch of electronics dealing with the development and
use of electronic equipment in aviation and astronautics.
The field of avionics has evolved rapidly as electronics has
improved all aspects of aircraft flight. New advances in
these disciplines require avionics to control flight stability,
which was traditionally the pilots role.

Aircraft Antennas
An important aspect of avionics is receiving and transmit-
ting electromagnetic signals. Antennas are devices for
Figure 1. Typical aircraft central computer.
transmitting and receiving radio-frequency (RF) energy
from other aircraft, space applications, or ground applica-
tions. Perry and Geppert (4) illustrate the aircraft electro-
improvements in memory size, clock speeds, functionality, magnetic spectrum, influenced by the placement and usage
and overall computer performance. of numerous antennas on a commercial aircraft. Golden (5)
illustrates simple antenna characteristics of dipole, horn,
Personal Computers cavity-backed spiral, parabola, parabolic cylinder, and
Cassegrain antennas.
Landau (1) defines personal computers as electronic
Radiation pattern characteristics include elevation and
machines that can be owned and operated by individuals
azimuth. The typical antenna specifications are polariza-
for home and business applications such as word proces-
tion, beam width, gain, bandwidth, and frequency limit.
sing, games, finance, and electronic communications.
Computers are becoming increasingly important for the
Hamacher et al. (3) explain that rapidly advancing very
new generation of antennas, which include phased-array
large-scale integrated circuit (VLSI) technology has
antennas and smart-skin antennas. For phased-array
resulted in dramatic reductions in the cost of computer
antennas, computers are needed to configure the array
hardware. The greatest impact has been in the area of small
elements to provide direction and range requirements
computing machines, where it has led to an expanding
between the radar pulses. Smart-skin antennas comprise
market for personal computers.
the entire aircrafts exterior fuselage surface and wings.
The idea of a personally owned computer is fairly new.
Computers are used to configure the portion of the aircraft
The computational power available in handheld toys today
surface needed for some sensor function. The computer also
was only available through large, costly computers in
handles sensor function prioritization and deinterleaving
the late 1950s and early 1960s. Vendors such as Atari,
of conflicting transmissions.
Commodore, and Compaq made simple computer games
household items. Performance improvements in memory,
Aircraft Sensors
throughput, and processing power by companies such as
IBM, Intel, and Apple made facilities such as spreadsheets Sensors, the eyes and ears of an aircraft, are electronic
for home budgets, automated tax programs, word proces- devices for measuring external and internal environmental
sing, and three-dimensional virtual games common house- conditions. Sensors on aircraft include devices for sending
hold items. The introduction of Microsofts Disk Operating and receiving RF energy. These types of sensors include
System (DOS) and Windows has also added to the accep- radar, radio, and warning receivers. Another group of
tance of the personal computers through access to software sensors are the infrared (IR) sensors, which include lasers
applications. Improvements in computer technology offer and heat-sensitive sensors. Sensors are also used to mea-
continual improvements, often multiple times a year. The sure direct analog inputs; altimeters and airspeed indica-
durability and portability of these computers is beginning tors are examples. Many of the sensors used on aircraft
to allow them to replace specialized aircraft computers have their own built-in computers for serving their own
that had strict weight, size, power, and functionality functional requirements such as data preprocessing, filter-
requirements. ing, and analysis. Sensors can also be part of a computer
AIRCRAFT COMPUTERS 3

interface suite that provides key aircraft computers with Aircraft Navigation
the direct environmental inputs they need to function.
Navigation is the science of determining present location,
desired location, obstacles between these locations, and
Aircraft Radar
best courses to take to reach these locations. An interesting
Radar (radio detection and ranging) is a sensor that trans- pioneer of aircraft navigation was James Harold Doolittle
mits RF energy to detect air and ground objects and deter- (18861993). Best known for his aircraft-carrier-based
mines parameters such as the range, velocity, and direction bomber raid on Tokyo in World War II, General Doolittle
of these objects. The aircraft radar serves as its primary received his Masters and Doctor of Science degrees in
sensor. Several services are provided by modern aircraft aeronautics from Massachusetts Institute of Technology,
radar, including tracking, mapping, scanning, and identi- where he developed instrumental blind flying in 1929.
fication. Golden (5) states that radar is tasked either to He made navigation history by taking off, flying a set
detect the presence of a target or to determine its location. course, and landing without seeing the ground. For a
Depending on the function emphasized, a radar system modern aircraft, with continuous changes in altitude, air-
might be classified as a search or tracking radar. speed, and course, navigation is a challenge. Aircraft com-
Stimson (6) describes the decibel (named after Alexander puters help meet this challenge by processing the multiple
Graham Bell) as one of the most widely used terms in the inputs and suggesting aircrew actions to maintain course,
design and description of radar systems. The decibel (dB) is a avoid collision and weather, conserve fuel, and suggest
logarithmic unit originally devised to express power ratios, alternative flight solutions.
but also used to express a variety of other ratios. The power An important development in aircraft navigation is the
ratio in dB is expressed as 10 log10 P2/P1, where P2 and P1 are Kalman filter. Welch and Bishop (7) state that in 1960, R.E.
the power levels being compared. Expressed in terms of Kalman published his famous paper describing a recursive
voltage, the gain is (V2/V1)2 dB provided the input voltage solution to the discrete-data linear filtering problem. Since
V1 and output voltage V2 are across equal resistances. that time, due in large part to advances in digital comput-
Stimson (6) also explains the concept of the pulse repeti- ing, the Kalman filter has been the subject of extensive
tion frequency (PRF), which is the rate at which a radar research and application, particularly in the area of auton-
systems pulses are transmitted: the number of pulses per omous or assisted navigation. The Kalman filter is a set of
second. The interpulse period T of a radar is given by mathematical equations that provides an efficient compu-
T 1=PRF. For a PRF of 100 Hz, the interpulse period tational (recursive) implementation of the least-squares
would be 0.01 s. method. The filter is very powerful in several aspects: It
The Doppler Effect, as described by Stimson (6), is a shift supports estimation of past, present, and even future
in the frequency of a radiated wave, reflected or received by states, and it can do so even when the precise nature of
an object in motion. By sensing Doppler frequencies, radar the modeled system is unknown.
not only can measure range rates, but can also separate The global positioning system (GPS) is a satellite refer-
target echoes from clutter, or can produce high-resolution ence system that uses multiple satellite inputs to determine
ground maps. Computers are required by an aircraft location. Many modern systems, including aircraft, are
radar to make numerous and timely calculations with equipped with GPS receivers, which allow the system
the received radar data, and to configure the radar to access to the network of GPS satellites and the GPS ser-
meet the aircrews needs. vices. Depending on the quality and privileges of the GPS
receiver, the system can have an instantaneous input of its
Aircraft Data Fusion current location, course, and speed within centimeters of
accuracy. GPS receivers, another type of aircraft computer,
Data fusion is a method for integrating data from multiple
can also be programmed to inform aircrews of services
sources in order to give a comprehensive solution to a
related to their flight plan.
problem (multiple inputs, single output). For aircraft com-
Before the GPS receiver, the inertial navigation systems
puters, data fusion specifically deals with integrating data
(INS) were the primary navigation system on aircraft. Fink
from multiple sensors such as radar and infrared sensors.
and Christiansen (8) describe inertial navigation as the
For example, in ground mapping, radar gives good surface
most widely used self-contained technology. In the case of
parameters, whereas the infrared sensor provides the
an aircraft, the INS is contained within the aircraft, and is
height and size of items in the surface area being investi-
not dependent on outside inputs. Accelerometers con-
gated. The aircraft computer takes the best inputs from
stantly sense the vehicles movements and convert them,
each sensor, provides a common reference frame to inte-
by double integration, into distance traveled. To reduce
grate these inputs, and returns a more comprehensive
errors caused by vehicle attitude, the accelerometers are
solution than either single sensor could have given.
mounted on a gyroscopically controlled stable platform.
Data fusion is becoming increasingly important as air-
crafts evolving functionality depends on off-board data
Aircraft Communications
(information) sources. New information such as weather,
flight path re-routing, potential threats, target assignment, Communication technologies on aircraft are predominately
and enroute fuel availability are communicated to the air- radio communication. This technology allows aircrews to
craft from its command and control environment. The air- communicate with ground controllers and other aircraft.
craft computer can now expand its own solution with these Aircraft computers help establish, secure, and amplify
off-board sources. these important communication channels.
4 AIRCRAFT COMPUTERS

These communication technologies are becoming in microseconds. These camps are now merging, because
increasingly important as aircraft become interoperable. their requirements are converging. MIS increasingly needs
As the dependency of aircraft on interoperability increases, real-time performance, while real-time systems are required
the requirements to provide better, more reliable, secure to handle increased data processing workloads. The
point-to-point aircraft communication also increases. The embedded information system addresses both needs.
aircraft computer plays a significant role in meeting this
challenge by formatting and regulating this increased flow Aircraft and the Year 2000
of information.
The year 2000 (Y2K) was a major concern for the aircraft
computer industry. Many of the embedded computers on
Aircraft Displays
aircraft and aircraft support functions were vulnerable to
Displays are visual monitors in aircraft that present Y2K faults because of their age. The basic problem with
desired data to aircrews and passengers. Adam and Gibson those computers was that a year was represented by its low-
(9) illustrate F-15E displays used in the Gulf War. These order two digits. Instead of the year having four digits,
illustrations show heads-up displays (HUDs), vertical these computers saved processing power by using the last
situation displays, radar warning receivers, and low- two digits of the calendar year. For example, 1999 is repre-
altitude navigation and targeting system (Lantirn) displays sented as 99, which is not a problem until you reach the year
typical of modern fighter aircraft. Sweet (10) illustrates the 2000, represented as 00. Even with this representation,
displays of a Boeing 777, showing the digital bus interface to problems are limited to those algorithms sensitive to calen-
the flight-deck panels and an optical-fiber data distribution dar dates. An obvious problem is when an algorithm divides
interface that meets industry standards. by the calendar date, which is division by 0. Division by 0 is
an illegal computer operation, causing problems such as
Aircraft Instrumentation infinite loops, execution termination, and system failure.
The most commonly mentioned issue is the subtraction of
Instrumentation of an aircraft means installing data col- dates to determine time durations and to compare dates. The
lection and analysis equipment to collect information about problem is not that the computer programs fail in a very
the aircrafts performance. Instrumentation equipment obvious way (e.g., divide-by-zero check) but rather that the
includes various recorders for collecting real-time flight program computes an incorrect result without any warning
parameters such as position and airspeed. Instruments or indication of error. Lefkon and Payne (11) discuss Y2K
also capture flight control inputs, environmental para- and how to make embedded computers Y2K-compliant.
meters, and any anomalies encountered in flight test or
in routine flight. One method of overcoming this limitation
Aircraft Application Program Interfaces
is to link flight instruments to ground recording systems,
which are not limited in their data recording capacities. A An application programming interface (API) is conven-
key issue here is the bandwidth between the aircraft being tionally defined as an interface used by one program to
tested and its ground (recording) station. This bandwidth is make use of the services of another program. The human
limited and places important limitations on what can be interface to a system is usually referred to as the user
recorded. This type of data link is also limited to the range of interface, or, less commonly, the humancomputer inter-
the link, limiting the aircrafts range and altitude during face. Application programs are software written to solve
this type of flight test. Aircraft computers are used both in specific problems. For example, the embedded computer
processing the data as they are being collected on the aircraft software that paints the artificial horizon on a heads-up
and in analyzing the data after they have been collected. display is an application program. A switch that turns the
artificial horizon on or off is an API. Gal-Oz and Isaacs (12)
Aircraft Embedded Information Systems discuss APIs and how to relieve bottlenecks of software
debugging.
Embedded information system is the latest terminology for
an embedded computer system. The software of the
Aircraft Control
embedded computer system is now referred to as embedded
information. The purpose of the aircraft embedded infor- Landau (1) defines a control as an instrument or apparatus
mation system is to process flight inputs (such as sensor and used to regulate a mechanism or a device used to adjust or
flight control) into usable flight information for further control a system. There are two concepts with control. One
flight system or aircrew use. The embedded information is the act of control. The other is the type of device used to
system is a good example of the merging of two camps of enact control. An example of an act of control is when a pilot
computer science applications. The first, and larger, camp initiates changes to throttle and stick settings to alter flight
is the management of information systems (MIS). The MIS path. The devices of control, in this case, are the throttle
dealt primarily with large volumes of information, with and stick.
primary applications in business and banking. The timing Control can be active or passive. Active control is force-
requirements of processing these large information records sensitive. Passive control is displacement-sensitive.
are measured in minutes or hours. The second camp is the Mechanical control is the use of mechanical devices,
real-time embedded computer camp, which was concerned such as levers or cams, to regulate a system. The earliest
with processing a much smaller set of data, but in a very form of mechanical flight control was wires or cables, used
timely fashion. The real-time camps timing requirement is to activate ailerons and stabilizers through pilot stick and
AIRCRAFT COMPUTERS 5

foot pedal movements. Today, hydraulic control, the use of among the pooled processors to decrease the time it takes to
fluids for activation, is typical. Aircraft control surfaces are form solutions. Usually, one of the processors acts as the
connected to stick and foot pedals through hydraulic lines. lead processor, or master, while the other processor(s) act
Pistons in the control surfaces are pushed or pulled by as slave(s). The master processor schedules the tasking and
associated similar pistons in the stick or foot pedal. The integrates the final results, which is particularly useful on
control surfaces move accordingly. aircraft in that processors are distributed throughout the
Electronic control is the use of electronic devices, such as aircraft. Some of these computers can be configured to be
motors or relays, to regulate a system. A motor is turned on parallel processors, offering improved performance and
by a switch, and it quickly changes control surfaces by redundancy. Aircraft system redundancy is important
pulling or pushing a lever on the surface. Automatic control because it allows distributed parallel processors to be
is a system-initiated control, which is a system-initiated reconfigured when there is a system failure. Reconfigur-
response to a known set of environmental conditions. Auto- able computers are processors that can be reprogrammed
matic control was used for early versions of automatic pilot to perform different functions and activities. Before com-
systems, which tied flight control feedback systems to puters, it was very difficult to modify systems to adapt to
altitude and direction indicators. The pilot sets his desired their changing requirements. A reconfigurable computer
course and altitude, which is maintained through the flight can be dynamically reprogrammed to handle a critical
controls automatic feedback system. situation, and then it can be returned to its original
To understand the need for computers in these control configuration.
techniques, it is important to note the progression of the
complexity of the techniques. The earliest techniques con-
Aircraft Buses
nected the pilot directly to his control surfaces. As the
aircraft functionality increased, the pilots workload also Buses are links between computers (processors), sensors,
increased, requiring his (or his aircrews) being free to and related subsystems for transferring data inputs and
perform other duties. Additionally, flight characteristics outputs. Fink and Christiansen (8) describe two primary
became more complex, requiring more frequent and instan- buses as data buses and address buses. To complete the
taneous control adjustments. The use of computers helped function of an MPU, a microprocessor must access memory
offset and balance the increased workload in aircraft. The and peripheral devices, which is accomplished by placing
application of computers to flight control provides a means data on a bus, either an address bus or a data bus, depend-
for processing and responding to multiple complex flight ing on the function of the operation. The standard 16-bit
control requirements. microprocessor requires a 16-line parallel bus for each
function. An alternative is to multiplex the address or
Aircraft Computer Hardware data bus to reduce the number of pin connections. Common
buses in aircraft are the Military Standard 1553 Bus (Mil-
For aircraft computers, hardware includes the processors,
Std-1553) and the General-Purpose Interface Bus (GPIB),
buses, and peripheral devices inputting to and outputting
which is the IEEE Standard 488 Bus.
from the computers. Landau (1) defines hardware as appa-
ratus used for controlling a spacecraft; the mechanical,
Aircraft Software
magnetic, and electronic design, structure, and devices of
a computer; and the electronic or mechanical equipment Landau (1) defines software as the programs, routines, and
that uses cassettes, disks, and so on. The computers used so on for a computer. The advent of software has provided
on an aircraft are called processors. The processor takes great flexibility and adaptability to almost every aspect of
inputs from peripheral devices and provides specific com- life, which is especially true in all areas of aerospace
putational services for the aircraft. sciences, where flight control, flight safety, in-flight enter-
There are many types and functions of processors on an tainment, navigation, and communications are continu-
aircraft. The most obvious processor is the central compu- ously being improved by software upgrades.
ter, also called the mission computer. The central computer
provides direct control and display to the aircrew. The Operation Flight Programs. An operational flight pro-
federated architecture (discussed in more detail later) is gram (OFP) is the software of an aircraft embedded com-
based on the central computer directing the scheduling and puter system. An OFP is associated with an aircrafts
tasking of all the aircraft subsystems. Other noteworthy primary flight processors, including the central computer,
computers are the data processing and signal processing vertical and multiple display processors, data processors,
computers of the radar subsystem and the computer of the signal processors, and warning receivers. Many OFPs in
inertial navigation system. Processors are in almost every use today require dedicated software integrated support
component of the aircraft. Through the use of an embedded environments to upgrade and maintain them as the mission
processor, isolated components can perform independent requirements of their parent aircraft are modified. The
functions as well as self-diagnostics. software integrated support environment [also called avio-
Distributed processors offer improved aircraft perfor- nics integrated support environment (AISE), centralized
mance and, in some cases, redundant processing capability. software support activity (CSSA), and software integration
Parallel processors are two or more processors configured laboratory (SIL)] not only allows an OFP to be updated and
to increase processing power by sharing tasks. The maintained, but also provides capabilities to perform unit
workload of the shared processing activity is distributed
6 AIRCRAFT COMPUTERS

testing, subsystem testing, and some of the integrated discussions of software lifecycle engineering and main-
system testing. tenance are presented, and the concept of configuration
management is presented.
Assembly Language. Assembly language is a machine The package concept is one of the most important devel-
(processor) language that represents inputs and outputs opments to be found in modern programming languages,
as digital data and that enables the machine to perform such as Ada, Modula-2, Turbo Pascal, C, and Eiffel. The
operations with those data. For a good understanding of the designers of the different languages have not agreed on what
Motorola 6800 Assembler Language, refer to Bishop (13). terms to use for this concept: Package, module, unit, and
According to Seidman and Flores (14), the lowest-level class are commonly used. It is generally agreed, however,
(closest to machine) language available to most computers that the package (as in Ada) is the essential programming
is assembly language. When one writes a program in tool to be used for going beyond the programming of very
assembly code, alphanumeric characters are used instead simple class exercises to what is generally called software
of binary code. A special program called an assembler engineering or building production systems. Packages and
(provided with the machine) is designed to take the assem- package-like mechanisms are important tools used in soft-
bly statements and convert them to machine code. Assem- ware engineering to produce production systems. Feldman
bly language is unique among programming languages in (17) illustrates the use of Ada packages to solve problems.
its one-to-one correspondence between the machine code
statements produced by the assembler and the original Databases. Database are essential adjuncts to computer
assembly statements. In general, each line of assembly programming. Databases allow aircraft computer appli-
code assembles into one machine statement. cations the ability to carry pertinent information (such
as flight plans or navigation waypoints) into their missions,
Higher-Order Languages. Higher-order languages (HOLs) rather than generating them enroute. Databases also allow
are computer languages that facilitate human language the aircrew to collect performance information about the
structures to perform machine-level functions. Seidman aircrafts various subsystems, providing a capability to
and Flores (14) discuss the level of discourse of a pro- adjust the aircraft in flight and avoid system failures.
gramming language as its distance from the underlying Elmasri and Navathe (18) define a database as a collec-
properties of the machine on which it is implemented. A tion of related data. Data are described as known facts that
low-level language is close to the machine, and hence can be recorded and have implicit meaning. A simple
provides access to its facilities almost directly; a high-level example consists of the names, telephone numbers, and
language is far from the machine, and hence insulated addresses of an indexed address book. A database manage-
from the machines peculiarities. A language may provide ment system (DBMS) is a collection of programs that enable
both high-level and low-level constructs. Weakly typed users to create and maintain a database. The DBMS is
languages are usually high-level, but often provide some hence a general-purpose software system that facilitates
way of calling low-level subroutines. Strongly typed lan- the processes of defining, constructing, and manipulating
guages are always high-level, and they provide means for databases for various applications.
defining entities that more closely match the real-world
objects being modeled. Fortran is a low-level language that Verification and Validation. A significant portion of the
can be made to function as a high-level language by use of aircraft computers lifecycle cost is system and software
subroutines designed for the application. APL, Sobol, and testing, performed in various combinations of unit-level,
SETL (a set-theoretic language) are high-level languages subsystem-level, integrated-system-level, developmental,
with fundamental data types that pervade their language. and operational testing. These types of tests occur fre-
Pascal, Cobol, C, and PL/I are all relatively low-level lan- quently throughout the life of an aircraft system because
guages, in which the correspondence between a program there are frequent upgrades and modifications to the air-
and the computations it causes to be executed is fairly craft and its various subsystems. It is possible to isolate
obvious. Ada is an interesting example of a language acceptance testing to particular subsystems when minor
with both low-level properties and high-level properties. changes are made, but this is the exception. Usually, any
Ada provides quite explicit mechanisms for specifying change made to a subsystem affects other multiple parts of
the layout of data structures in storage, for accessing the system. As aircraft become increasingly dependent on
particular machine locations, and even for communicating computers (which add complexity by the nature of their
with machine interrupt routines, thus facilitating low-level interdependences), and as their subsystems become
requirements. Adas strong typing qualities, however, also increasingly integrated, the impact of change also
qualify it as a high-level language. increases drastically. Cook (19) shows that a promising
High-level languages have far more expressive power technology to help understand the impact of aircraft com-
than low-level languages, and the modes of expression puter change is the Advanced Avionics Verification and
are well integrated into the language. One can write quite Validation (AAV&V) program developed by the Air Force
short programs that accomplish very complex operations. Research Laboratory.
Gonzalez (15) developed an Ada Programmers Handbook Sommerville (20) develops the concepts of program ver-
that presents the terminology of the HOL Ada and exam- ification and validation. Verification involves checking
ples of its use. He also highlights some of the common that the program conforms to its specification. Validation
programmer errors and examples of those errors. Sodhi involves checking that the program as implemented meets
(16) discusses the advantages of using Ada. Important the expectations of the user.
AIRCRAFT COMPUTERS 7

mendous opportunities to capture complex representations


of data and then save these representations in reusable
objects. Instead of using several variables and interactions
to describe some item or event, this same item or event is
described as an object. The object contains its variables,
control-flow representations, and data-flow representa-
tions. The object is a separable program unit, which can
be reused, reengineered, and archived as a program unit.
The power of this type of programming is that when large
libraries of OO programming units are created, they can be
called on to greatly reduce the workload of computer soft-
ware programming. Gabel (21) says that OO technology lets
an object (a software entity consisting of the data for an
action and the associated action) be reused in different
parts of the application, much as an engineered hardware
product can use a standard type of resistor or micropro-
cessor. Elmasri and Navathe (18) describe an OO database
Figure 2. An aircraft avionics support bench. as an approach with the flexibility to handle complex
requirements without being limited by the data types and
Figure 2 shows an aircraft avionics support bench, query languages available in traditional database systems.
which includes real components from the aircraft such as
the FCC line replaceable unit (LRU) sitting on top of the Open System Architecture. Open system architecture is
pictured equipment. Additional equipment includes the a design methodology that keeps options for updating sys-
buses, cooling, and power connection interfaces, along tems open by providing liberal interfacing standards.
with monitoring and displays. On these types of benches, Ralston and Reilly (22) state that open architectures per-
it is common to emulate system and subsystem responses tain primarily to personal computers. An open architecture
with testing computers such as the single-board computers is one that allows the installation of additional logic
illustrated. cards in the computer chassis beyond those used with
Figure 3 shows another verification and validation asset the most primitive configuration of the system. The cards
called the workstation-based support environment. This are inserted into slots in the computers motherboardthe
environment allows an integrated view of the aircrafts main logic board that holds its CPU and memory chips. A
performance by providing simulations of the aircrafts computer vendor that adopts such a design knows that,
controls and displays on computer workstations. The because the characteristics of the motherboard will be
simulation is interfaced with stick and throttle controls, public knowledge, other vendors that wish to do so can
vertical situation displays, and touch-screen avionics design and market customized logic cards. Open system
switch panels. architectures are increasingly important in modern air-
craft applications because of the constant need to upgrade
Object-Oriented Technology. Object-oriented (OO) tech- these systems and use the latest technical innovations. It is
nology is one of the most popular computer topics of the extremely difficult to predict interconnection and growth
1990s. OO languages such as C and Ada 95 offer tre- requirements for next-generation aircraft, which is exactly
what an open architecture attempts to avoid the need for.

Client-Server Systems. A client-server system is one in


which one computer provides services to another computer
on a network. Ralston and Reilly (22) describe the file-
server approach as an example of client-server interaction.
Clients executing on the local machine forward all file
requests (e.g., open, close, read, write, and seek) to the
remote file server. The server accepts a clients requests,
performs its associated operation, and returns a response to
the client. Indeed, if the client software is structured
transparently, the client need not even be aware that files
being accessed physically reside on machines located else-
where on the network. Client-server systems are being
applied on modern aircraft, where highly distributed
resources and their aircrew and passenger services are
networked to application computers.

Subsystems. The major subsystems of an aircraft are its


Figure 3. A workstation-based aircraft avionics support envi- airframe, power plant, avionics, landing gear, and controls.
ronment. Landau (1) defines a subsystem as any system that is part of
8 AIRCRAFT COMPUTERS

a larger system. Many of the subsystems on an aircraft have cles are becoming increasingly dependent on information
one or more processors associated with them. It is a complex gleaned from ground stations, satellites, other air-space
task to isolate and test the assorted subsystems. vehicles, and onboard sensors to perform their mission.
Another layer of testing below subsystem testing is unit These vehicles use signals across the electromagnetic spec-
testing. A unit of a subsystem performs a function for it. For trum. Antennas can be found in multiple locations on
example, in the radar subsystem, the units include its wings, the fuselage, tails, and draglines. If antennas are
signal processor and its data processor. In order to test a located too close together, their signals can interfere with
system adequately, each of its lowest-level items (units) each other, called crossed frequency transmission. This
must be tested. As the units affect and depend on each interference reduces the efficiency of each affected
other, another layer of testing addresses that layer of antenna. Placement of multiple antennas requires mini-
dependences. In the same fashion, subsystem testing is mizing the effects of crossed frequency transmissions.
performed and integrated with associated subsystems. It is Techniques for minimization include antenna placement,
important to test not only at the unit and the subsystem filtering, and timing, which presents another challenge for
level, but at the system and operational level. The system aircraft computers to sort and process these multiple sig-
level is where the subsystems are brought together to offer nals. Perry and Geppert (4) show how the aircraft electro-
the system functionality. System integration is the process magnetic spectrum is becoming busy, and thus, dangerous
of connecting subsystem components into greater levels of for aerospace communications.
system functionality until the complete system is realized.
The operational level of testing is where the subsystem is Legacy Systems
exercised in its actual use.
Legacy systems are fielded aircraft, or aircraft that are in
active use. Probably the only nonlegacy aircraft are experi-
Line Replaceable Units. LRUs are subsystems or subsys-
mental or prototype versions. Legacy aircraft are often
tem components that are self-contained in durable boxes
associated with aging issues, more commonly known as
containing interface connections for data, control, and
parts obsolescence. A growing problem in these systems is
power. Many LRUs also contain built-in test (BIT) capabil-
the obsolescence of entire components, including the many
ities that notify air and maintenance crews when a failure
computers used on them. Aircraft, like many other systems,
occurs. A powerful feature of LRUs is that functionality can
are designed with expected lifetimes of 10 to 15 years.
be compartmentalized. When a failure is detected, the LRU
Because of the high replacement costs, lifetimes are often
can easily be pulled and replaced, restoring the aircraft to
doubled and tripled by rebuilding and updating the air-
service within moments of detection.
craft. To reduce costs, as many of the original aircraft
components as possible are kept. Problems develop when
Graceful Degradation. All systems must have plans to
these components are no longer produced or stockpiled.
address partial or catastrophic failure. System failure in
Sometimes, subsystems and their interfaces have to be
flight controls is often catastrophic, whereas system failure
completely redesigned and produced at great cost in order
in avionics can be recovered from. For this reason, most
to keep an aircraft in service. System architectures and
flight-critical systems have built-in redundant capabilities
standard interfaces are constantly being modified to
(sometimes multiple layers of redundancy), which are auto-
address these issues. Aircraft evolve during their lifetimes
matically activated when the main system or subsystem
to a more open architecture. This open architecture, in
fails. Degraded system behavior occurs when the main
turn, allows the aircraft components to be more easily
system fails and backup systems are activated. The critical
replaced, thus making further evolution less expensive.
nature of system failure requires immediate activation of
backup systems and recognition by all related subsystems
Unmanned Air Vehicles
of the new state of operation. Graceful degradation is the
capability of aircraft computers to continue operating after Unmanned air vehicles (UAVs) are aircraft that are flown
incurring system failure. Graceful degradation is less than without aircrews. Their use is becoming increasingly pop-
optimal performance, and may activate several layers of ular for military applications. Many of the new capabilities
decreasing performance before the system fails. The value of of UAVs come from the improved computers. These com-
graceful degradation is that the aircrew has time to respond puters allow the vehicles to have increased levels of auton-
to the system failure before a catastrophic failure occurs. omy and to perform missions that once required piloted
aircraft. Some of these missions include reconnaissance
and surveillance. These same types of missions are finding
AEROSPACE
increasing commercial importance. UAVs offer tremen-
dous advantages in lifecycle cost reductions because of
Computer technologies have helped provide a continuum of
their small size, ease of operation, and ability to be
improvements in aircraft performance that has allowed the
adapted to missions.
airspace where aircraft operate to increase in range and
altitude. Landau (1) defines aerospace as the Earths atmo-
sphere and the space outside it, considered as one contin- MANMACHINE SYSTEMS
uous field. Because of its rapidly increasing domain of air
and space travel, the U. S. Air Force is beginning to refer to An aircraft is an example of a manmachine system. Other
itself as the U. S. Aerospace Force. Modern air-space vehi- examples are automobiles and boats. These machines
AIRCRAFT COMPUTERS 9

have the common attribute of being driven by a human. to early 1990s, it required about 2 weeks to visually verify
Landau (1) defines manmachine systems as sets of manu- the suite of an advanced fighter systems avionics. This
ally performed and machine-performed functions, oper- verification can no longer be accomplished at all with
ated in conjunction to perform an operation. The aircraft current verification and validation techniques. Several
computer is constantly changing the role of the human in months would be required to achieve some level of confi-
the aircraft machine. The earliest aircraft required the dence that todays modern fighters are flight-safe.
constant attention of the pilot. Improved flight control
devices allowed the pilot freedom for leisure or for other Air Traffic Control
tasks. Modern aircraft computers have continued the
trend of making the aircraft more the machine and less Air traffic control is the profession of monitoring and
the man system. controlling aircraft traffic through an interconnected
ground-based communication and radar system. Perry
Human Factors of Aircraft Computers (23) describes the present capabilities and problems in
air traffic control. He also discusses the future require-
Human factors is the science of optimal conditions for ments for this very necessary public service. Air traffic
human comfort and health in the human environment. controllers view sophisticated displays, which track multi-
The human factors of aircraft computers include the posi- ple aircraft variables such as position, altitude, velocity,
tioning of the controls and displays associated with the and heading. Air traffic control computers review these
aircrews workloads. They also provide monitoring and variables and give the controllers continuous knowledge of
adjustment of the aircraft human environment, including the status of each aircraft. These computers continuously
temperature, oxygen level, and cabin pressure. update and display the aircraft in the ground-based radar
range. When potential emergency situations, such as
ManMachine Interface collision, develop, the computer highlights the involved
The manmachine interface is the place where mans inter- aircraft on the displays, with plenty of lead time for the
actions with the aircraft coordinate with the machine controller to correct each aircrafts position.
functionality of the aircraft. An example of a manmachine
interface is the API, which is where a person provides AIRCRAFT CONTROL AND COMPUTERS
inputs to and receives outputs from computers. These types
of interfaces include keyboards (with standard ASCII char- D Azzo and Houpis (24) give a good explanation of the
acter representation), mouse pads, dials, switches, and complexity of what is needed for an aircraft control sys-
many varieties of monitors. A significant interface in air- tem. The feedback control system used to keep an airplane
craft comprises their associated controls and displays, on a predetermined course or heading is necessary for
which provide access to the flight controls, the sensor suite, the navigation of commercial airliners. Despite poor
the environmental conditions, and the aircraft diagnostics weather conditions and lack of visibility, the airplane
through the aircrafts central computer. Control sticks, must maintain a specified heading and altitude in order
buttons, switches, and displays are designed based on to reach its destination safely. In addition, in spite of rough
human standards and requirements such as seat height, air, the trip must be made as smooth and comfortable as
lighting, accessibility, and ease of use. possible for the passengers and crew. The problem is
considerably complicated by the fact that the airplane
Voice-Activated Systems. Voice-activated systems are has six degrees of freedom, which makes control more
interfaces to aircraft controls that recognize and respond difficult than control of a ship, whose motion is limited
to aircrews verbal instructions. A voice-activated input to the surface of the water.
provides multiple input possibilities beyond the limited A flight controller is used to control aircraft motion. Two
capabilities of hands and feet. Voice-activated systems typical signals to the system are the correct flight path,
have specified sets of word commands and are trained to which is set by the pilot, and the level position of the
recognize a specific operators voice. airplane. The ultimately controlled variable is the actual
course and position of the airplane. The output of the
Aircraft Computer Visual Verification control system, the controlled variable, is the aircraft
Visual verification is the process of physically verifying heading.
(through sight) the correct aircraft response to environ- In conventional aircraft, three primary control surfaces
mental stimuli. This visual verification is often a testing are used to control the physical three-dimensional atti-
requirement. It is usually done through the acceptance test tude of the airplane: the elevators, the rudder, and the
procedure (ATP) and visual inspections of displays through ailerons. A directional gyroscope (gyro) is used as the
a checklist of system and subsystem inputs. Until recently, error-measuring device. Two gyros must be used to pro-
visual verification has been a requirement for pilots, who vide control of both heading and attitude of the airplane.
have desired the capability to see every possibility that The error that appears in the gyro as an angular displace-
their aircraft might encounter. This requirement is becom- ment between the rotor and case is translated into a
ing increasingly difficult to implement because of the grow- voltage by various methods, including the use of transdu-
ing complexity and workload of the aircrafts computers cers such as potentiometers, synchros, transformers, or
and their associated controls and displays. In the late 1980s microsyns. Selection of the method used depends on the
10 AIRCRAFT COMPUTERS

preference of the gyro manufacturer and the sensitivity loose coupling allows the multiple subsystems to operate
required. Additional stabilization for the aircraft can be somewhat autonomously, but have the advantage of the
provided in the control system by rate feedback. In other shared resources of the other subsystems. A typical aircraft
words, in addition to the primary feedback, which is the federated system might include its central computer, its
position of the airplane, another signal proportional to the INS, its radar system, and its air-vehicle management
angular rate of rotation of the airplane around the vertical system. The INS provides the radar with the aircrafts
axis is fed back in order to achieve a stable response. A rate present position, which is reported to the pilot through
gyro is used to supply this signal. This additional stabili- displays put forth by the central computer. The pilot
zation may be absolutely necessary for some of the newer adjusts his course through the air-vehicle management
high-speed aircraft. system, which is updated by the INS, and the cycle is
In reading through this example, it should be obvious repeated. These subsystems perform their individual func-
that as the complexity of the control feedback system of the tionality while providing services to each other.
aircraft increases, a need for computer processing to eval-
uate the feedback and to adjust or recommend flight control Cyclic Executive
adjustments exists. Additional feedback may come from
A cyclic executive on an aircraft computer provides a
global positioning, from ground-based navigation systems
means to schedule and prioritize all the functions of the
through radio inputs, and from other aircraft. The compu-
computer. The executive routine assigns the functions and
ter is able to integrate these inputs into the onboard flight
operations to be performed by the computer. These assign-
control inputs and provide improved recommendations for
ments are given a specific amount of clock time to be
stable flight.
performed. If the assignment does not complete its task
in its allocated time, it is held in a wait state until its next
clock period. From the beginning of the clock period to its
REAL-TIME SYSTEMS
end is one clock cycle. High-priority functions are assigned
faster clock cycles, whereas low-priority functions are
The computers on aircraft are required to perform
assigned slower cycles. For example, the high-priority
their functions within short times. Flight control systems
executive function might be assigned a speed of 100 cycles
must make fine adjustments quickly in order to main-
per second, whereas some lower-priority function might
tain stable flight. Sensor suites must detect and analyze
have 5 cycles per second to complete its tasks. Sometimes,
potential threats before it is too late. Cabin pressure and
the latter might take several clock cycles to perform a task.
oxygen must be regulated as altitude changes. All these
An additional feature of cyclic executives is that they are
activities, plus many others on aircraft, must happen in
equipped with interrupts, which allow higher-priority
real time.
systems to break into the executive assignments for
Nielsen (25) defines a real-time system as a controlled
system-level assigned tasking.
(by software or firmware) system that performs all of
There are several types of scheduling methodologies
its process functions within specified time constraints. A
that provide performance improvements in cyclic exe-
real-time system usually includes a set of independent
cutives. One of the more prominent is rate monotonic
hardware devices that operate at widely differing speeds.
analysis (RMA), which determines the time requirement
These devices must be controlled so that the system as a
for each function and the spare time slots, and then makes
whole is not dependent on the speed of the slowest device.
time assignments.
Hatley and Pirbhai (26) describe timing as one of the most
critical aspects of modern real-time systems. Often, the
systems response must occur within milliseconds of a given THE NETWORK-CENTRIC AIRCRAFT
input event, and every second it must respond to many such
events in many different ways. In the age of the World Wide Web (www), it is hard to
imagine the concept of platform-centric systems, such as
Flight-Critical Systems many of the aircraft that are in service today. These air-
craft were built with the requirement to be self-sufficient,
Flight-critical systems are those activities of an aircraft safe, and survivable. Dependency on off-board inputs was
that must be completed without error in order to maintain minimized as advanced avionics technologies allowed air-
life and flight. The aircraft flight controls, engines, landing craft to assess and respond to their environment flight
gear, and cabin environment are examples of flight-critical dynamics independently. These aircraft have been con-
systems. Failures in any of these systems can have cata- ceived, created, and maintained right up to this new
strophic results. Flight-critical systems are held to tight information age. It takes significant effort to open the
levels of performance expectations, and often have redun- architectures of these aircraft, in order for their existing
dant backups in case of failure. capabilities to be enhanced by outside information. For-
tunately, the adaptability and flexibility of aircraft com-
Federated Systems puters makes this process possible for many of these
aircraft.
Federated systems are loosely coupled distributed systems
The modern aircraft (conceived, created, and main-
frequently used in aircraft system architectures to tie
tained since the mid-1990s) is a network-centric aircraft.
multiple processors in multiple subsystems together. The
These aircraft take full advantage of the platform-centric
AIRCRAFT COMPUTERS 11

systems with independent suites of avionics and aircraft 16. J. Sodhi, Managing Ada Projects. Blue Ridge Summit, PA: TAB
computers. However, they have the additional ability to Books, 1990.
adapt to their environmental flight dynamics, which is 17. M. B. Feldman and E. B. Koffman, Ada Problem Solving and
possible because these systems have access to the most Program Design. Reading, MA: Addison-Wesley, 1992.
recent information about their environment. They can 18. R. Elmasri and S. B. Navathe, Fundamentals of Database
interactively communicate with other aircraft entering Design, 2nd ed. Redwood City, CA: Benjamin/Cummings, 1994.
and leaving their environment, as well as take advantage 19. R. Cook, The advanced avionics verification and validation II
of the information services available in that environment. final report, Air Force Research Laboratory Technical Report
The aircraft computers work very much the same as in the ASC-99-2078, Wright-Patterson AFB.
platform-centric aircraft, but with improved and broader 20. I. Sommerville, Software Engineering, 3rd ed. Reading, MA:
information than was available before (27,28). Addison-Wesley, 1989.
The network-centric aircraft can take full advantage of 21. D. Gabel, Software engineering, IEEE Spectrum, 31(1): 3841,
route changes caused by heavy air traffic, threats, or 1994.
weather. It can send its systems self-diagnostics ahead to 22. A. Ralston and E. Reilly, Encyclopedia of Computer Science.
maintenance crews, who can have parts and resources New York: Van Nostrand Reinhold, 1993.
available reducing the service re-cycling time of the air- 23. T. Perry, In search of the future of air traffic control, IEEE
craft. It can inform passengers and crew about their indi- Spectrum, 34(8): 1835, 1997.
vidual travel plans and the options available to them as 24. J. J. D Azzo and C. H. Houpis, Linear Control System Analysis
they arrive at their destinations. It can help air traffic and Design, 2nd ed. New York: McGraw-Hill, 1981, pp. 143
controllers and flight planners manage the dynamic work- 146.
load of the many aircraft in service. 25. K. Nielsen, Ada in Distributed Real-Time Systems. New York:
Intertext, 1990.
26. D. J. Hatley and I. A. Pirbhai, Strategies for Real-Time System
BIBLIOGRAPHY Specification. New York: Dorset House, 1988.
27. D. S. Alberts, J. J. Garstka, and F. P. Stein, Network Centric
1. S. Landou, Webster Illustrated Contemporary Dictionary, Warfare. Washington D.C.: CCRP Publication Series, 2000.
Encyclopedic Edition. Chicago: J. G. Ferguson, 1992. 28. D. S. Alberts and R. E. Hayes, Power to the Edge. Washington
2. J. F. Wakerly, Digital Design Principles and Practices. Engle- D.C.: CCRP Publication Series, 2003.
wood Cliffs, NJ: Prentice-Hall, 1985, pp. 148, 53138.
3. V. C. Hamacher, Z. G. Vranesic, and S. G. Zaky, Computer
Organization, 2nd ed. New York: McGraw-Hill, 1984.
FURTHER READING
4. T. Perry and L. Geppert, Do portable electronics endanger
flight, IEEE Spectrum, 33(9): 2633, 1996.
G. Buttazo, Hard Real-Time Computing Systems. Norwell, MA:
5. A. Golden, Radar Electronic Warfare. Washington: AIAA Edu- Kluwer, 1997.
cation Series, 1987.
R. Comerford, PCs and workstations, IEEE Spectrum, 30(1): 26
6. G. W. Stimson, Introduction to Airborne Radar. El Segundo, 29, 1993.
CA: Hughes Aircraft, 1983, pp. 107, 151231.
D. Dooling, Aerospace and military, IEEE Spectrum, 35(1): 9094,
7. G. Welch and G. Bishop, An introduction to the Kalman filter, 1998.
Department of Computer Science, University of North Caro-
J. Juliussen and D. Dooling, Small computers, aerospace & mili-
lina at Chapel Hill, Chapel Hill, NC, http://www.cs.unc.edu/
tary, IEEE Spectrum, 32(1): 4447, 7679, 1995.
~welch/media/pdf/kalman.pdf, 1997.
K. Kavi, Real-Time Systems, Abstractions, Languages, and Design
8. D. Fink and D. Christiansen, Electronics Engineers Handbook,
Methodologies. Los Alamitos, CA: IEEE Computer Society Press,
3rd ed., New York: McGraw-Hill, 1989.
1992.
9. J. Adam and T. Gibson, Warfare in the information age, IEEE
P. Laplante, Real-Time Systems Design and Analysis, an Engineers
Spectrum, 28(9): 2642, 1991.
Handbook. Piscataway, NJ: IEEE Press, 1997.
10. W. Sweet, The glass cockpit, IEEE Spectrum, 32(9): 3038,
M. S. Roden, Analog and Digital Communication Systems, 2nd ed.
1995.
Englewood Cliffs, NJ: Prentice-Hall, 1985.
11. D. Lefkon and B. Payne, Making embedded systems year 2000
H. Taub, Digital Circuits and Microprocessors. New York:
compliant, IEEE Spectrum, 35(6): 7479, 1998.
McGraw-Hill, 1982.
12. S. Gal-Oz and M. Isaacs, Automate the bottleneck in embedded
C. Weitzman, Distributed Micro/Minicomputer. Englewood Cliffs,
system design, IEEE Spectrum, 35(8): 6267, 1998.
NJ: Prentice-Hall, 1980.
13. R. Bishop, Basic Microprocessors and the 6800. Hasbrouck
Heights, NJ: Hayden, 1979.
14. A. Seidman and I. Flores, The Handbook of Computers and CHARLES P. SATTERTHWAITE
Computing. New York: Van Norstrand Reinhold, 1984, pp. United States Air Force
327502. Wright-Patterson AFB, Ohio.
15. D. W. Gonzalez, Ada Programmers Handbook. Redwood City,
CA: Benjamin/Cummings, 1991.
C
COMPUTERIZED DICTIONARIES: Akbulut (911) compared the supposed advantage that
INTEGRATING PORTABLE DEVICES, adding various types of multimedia glossing might bring
TRANSLATION SOFTWARE, AND WEB to language learners. Two crucial findings are well
DICTIONARIES TO MAXIMIZE LEARNING summarized in Chun (12): . . .previous studies have found
that L2 vocabulary is remembered better when learners
BACKGROUND STUDIES ON BILINGUAL look up picture or video glosses in addition to translations of
AND ELECTRONIC DICTIONARIES unfamiliar words, but that when given the choice, learners
tend to prefer and use the simple translation of words. . . In
Many articles comparing various types of dictionaries summary, research during the last ten years (19952005)
may be found in the first fully annotated bibliographic has found that bilingual dictionaries and multimedia
review of studies in this broad field of lexicography glosses have a more direct impact on vocabulary acquisition
(the making of dictionaries, whether print or electronic), than on overall reading comprehension. . . . (pp. 7881).
entitled Pedagogical Lexicography Today by Dolezal and A history of lexicography and dictionary development in
McCreary (1), under either the learner dictionary category Japan may be found in Nakaos (13)The State of Bilingual
or under traditional dictionaries designed for native read- Lexicography in Japan: Learners English-Japanese/
ers. Articles on learner dictionaries are grouped by their Japanese-English Dictionaries. Other researchers who
central focus, namely by whether they are mainly dealing have examined the individual preferences, needs, and
with bilingual (giving first language or L1 translations), skills of dictionary users (both monolingual and bilingual)
bilingualized (including both L1 and L2 information), or include Baxter (14), Tomaszczyk (15), Hartmann (16),
only monolingual (providing only English-to-English or Piotrowski (17), Atkins and Knowles (18), and Nuccorini
other L2 to/from L2 definitions) explanations of target (19). Hulstijn and Atkins (20) suggested that use of electro-
language (TL) vocabulary. Laufer and Kimmel (2) des- nic dictionaries be studied more systematically. Laufer and
cribed patterns of use, comparing a particular dictionarys Hill (21) examined how users CALL dictionary look-up
degree of accessibility versus difficulty for learners, finding behaviors affected their retention. Those who design dic-
that Each learner was classified by his favorite look-up tionaries for language learners, whether traditional text or
pattern. . .on the basis of these, we argue that the bilin- electronic types of dictionaries, can gain much insight from
gualised dictionary is very effective as it is compatible with more individualized, long-term studies done in countries
all types of individual preferences. (p. 361) (for more where they have a consumer base.
information on computerized dictionary writing systems, Tomaszczyk (15), who first questioned foreign language
see http://nlp.fi.muni.cz/dws06/). learners regarding their preferences and dictionary usage,
Lexical computing is a field of most concern to language stated that the vast majority of his close to 450 Polish
teachers, computational linguists, and lexicographers respondents would like their dictionaries to give much
involved in making dictionary writing systems (DWS), more extensive treatment to every type of information. . .
software for writing and producing a dictionary. It might would like to have an omnibus dictionary which would
include an editor, a database, a web interface, and various cover everything anyone has ever thought of including in
management tools (for allocating work, etc.), operating dictionaries and encyclopedias (p. 115). Today, Internet
with a dictionary grammar, which specifies the internal search engines seem to do just that, but are often far too
structure of the dictionary. Robert Lew (3), whose disserta- broad, especially for limited English proficiency (LEPs)
tion provides a massive database for further research in learners to use efficiently. One solution to this problem is
this field, considered the receptive use of bilingual, mono- to use the writers Virtual Language Learning Encyclope-
lingual, and semi-bilingual dictionaries by Polish learners dia site at www.CALL4ALL.us. Providing instant links to
of English, asking the most basic question for language most web dictionaries found on its Dictionaries (D) page
teachers and dictionary designers (lexicographers) to <at http://www.call4all.us///home/_all.php?fi=d>, this site
consider, namely the question of which dictionary is best enables anyone to find vocabulary information for 500
for whom? Other studies have compared the use of language pairs systematically, by giving simultaneous
various types of glosses, such as (paper, electronic textual, instant free access to over 2500 online dictionaries. More-
electronic pictorial, electronic, and video) on reading com- over, this online multilingual dictionary portal now inte-
prehension, translation, the number of words looked up, grates the many functions of Wordchamp.coms versatile
time-on-task and satisfaction of dictionary users. Others Webreader on each of its pages, thereby providing auto-
investigated incidental vocabulary learning via computer matic glossing from English into over 100 languages for
glosses, as reported by Laufer and Levitzky-Aviad (4). any website, including 40 online newspapers in 10 major
Loucky (58) compared Japanese college students languages.
accessing speeds for portable devices with using software
or mobile phone dictionaries. Paper Versus Electronic Dictionaries
Electronic dictionaries are undoubtedly greatly gaining in
popularity, so much so that they will soon dominate the
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 COMPUTERIZED DICTIONARIES

dictionary scene (2226). Lew (3) noted these recent trends production. Their results demonstrated the superiority of
stating: fully bilingualized L1-L2-L2 dictionaries and some unique
advantages of the electronic format. Their literature review
It has been claimed that with the move from paper to online provides a good overview of this field:
dictionaries, restrictions of space would disappear. That, how-
ever, is a simplification at best. While storage space may indeed Surveys of dictionary use indicate that the majority of foreign
become irrelevant, there are still severe restrictions as to how language learners prefer bilingual L2-L1 dictionaries and use
much information can be displayed at a time. In fact, even the them mainly to find the meaning of unknown foreign (L2) words
best currently available display devices are still easily beaten by (Atkins 1985; Piotrowsky 1989). However, if learners writing in
the old-fashioned printed paper in terms of visual resolution. So L2 need an L2 word designating a familiar L1 concept, they do
space-saving issues will still be with for at least as long as the not readily turn to an L1-L2 dictionary for help. The reason for
visual modality is primarily used for information transfer from this may lie in a serious limitation of most L1-L2 bilingual
dictionary to user. . .on-screen presentation of entries has much dictionaries. They rarely differentiate between the possible L2
to offer. . .to the researcher by way of convenience, including a translations of the L1 word, nor do they provide information
potential to log responses automatically, thus obviating the regarding the use of each translation option. . . An electronic
need for the laborious paperwork and keyboarding at the dictionary can fulfill the above requirements since it can com-
data entry stage, as well as allowing unobtrusive observation. bine the features of an L2-L1bilingual dictionary, an L1-L2
(p. 157) bilingual dictionary and an L2 monolingual dictionary. The
advent of electronic dictionaries has already inspired research
The equivalence of on-screen and paper formats should into their use and their usefulness as on-line helping tools and
not be taken for granted, as Laufer (27) found significant as contributors to incidental vocabulary learning. The built in
and substantial differences in word recall scores between log files can keep track of words looked up, type of dictionary
marginal paper glosses and on-screen pop-up window information selected (definition, translation, example, etc.), the
number of times each word was looked up, and the time spent on
glosses.
task completion. (pp. 12)

DOING LEXICOGRAPHY IN AN ELECTRONIC AGE Although most electronic dictionaries do auto-


archiving of any new words by means of their history
Tono (28) predicted the advantages of online media using search function, most online dictionaries do not have
machine translation, saying Electronic dictionaries have a means of tracking student use, except for programs
great potential for adjusting the user interface to users like Wordchamp.com or Rikai.com, which give students a
skill level[s] so that learners with different needs and skills way to archive words they have double-clicked. These
can access information in. . . different way[s]. (p. 216) words may later be seen, printed, and reviewed. In
First of all, one must note that electronic dictionaries fact, Wordchamp.com, by far the most sophisticated online
have developed based on a healthy integration of develop- electronic dictionary and vocabulary development pro-
ments in computerized corpus linguistics and modern gram, allows users to make online flashcards with sentence
technology, used to enhance learning in many fields, examples and links to online texts where target words are
particularly computer-assisted language learning found in context. It can also automatically generate about
(or CALL) or computer-mediated communications 10 types of online vocabulary quizzes and provides a free
(CMC). course management system (CMS) for monitoring stu-
Laufer and Kimmel (2) provide a clear summary of this dents work online. Wordchamps Webreader provides the
field, noting that most versatile online glossing engine known, already for
over 100 languages, with more being added regularly.
If the consumer is to benefit from the lexicographers product, Teachers need to show learners how to best inte-
the dictionary should be both useful and usable. We suggest a grate the use of such portable and online dictionaries to
definition of dictionary usefulness as the extent to which a make them maximally effective for their language develop-
dictionary is helpful in providing the necessary information ment, in both receptive and productive aspects. Chun (12)
to its user. Dictionary usability, on the other hand, can be
noted that learners who could read online text with access
defined as the willingness on the part of the consumer to use
to both internally (instructor-created) glossed words as well
the dictionary in question and his/her satisfaction from it.
Studies of dictionary use by L2 learners . . . reveal that dic- as externally glossed words. . . recalled a significantly
tionary usefulness and dictionary usability do not necessarily greater number of important ideas than when they read
go hand in hand. (pp. 361362) an online text and had access only to an external (portable
electronic) dictionary (p. 75).
Laufer and Levitzky-Aviads (4) study recommends Loucky (29) also examined how to best maximize L2
working toward designing a bilingualized electronic dic- vocabulary development by using a depth of lexical proces-
tionary (BED) more clear and useful for second language sing (DLP) scale and vocabulary learning strategies (VLSs)
production. Whereas conventional bilingual L1-L2 diction- taxonomy together with online CALL resources and sys-
aries list translation options for L1 words without explain- tematic instruction in the use of such strategies. It used
ing differences between them or giving much information 40 of the 58 VLSs identified in Schmitts earlier taxonomy.
about how to use various functions, Laufer and Levitzky- An electronic dictionary use survey (see Appendix) was
Aviad (4) examined the usefulness of an electronic Hebrew- designed to solicit information about how students used
English-English (L1-L2-L2) minidictionary designed for various computerized functions of electronic or online
COMPUTERIZED DICTIONARIES 3

dictionaries at each major phase of lexical processing to using EDs for more rapid accessing of new target vocabu-
help learners maximize processing in the following eight lary. They also point out the need for further study of
stages of vocabulary learning: (1) assessing degree of word archiving, and other lexical processing steps to investigate
knowledge, (2) accessing new word meanings, (3) archiving the combined effect of how much computers can enhance
new information for study, (4) analyzing word parts and overall lexical and language development when used more
origins, (5) anchoring new words in short-term memory, intelligently and systematically at each crucial stage of first
(6) associating words in related groups for long-term reten- or second language learning. Regular use of portable or
tion, (7) activating words through productive written or online electronic dictionaries in a systematic way that uses
oral use, and (8) reviewing/recycling and then retesting these most essential phases of vocabulary acquisition cer-
them. Portable devices or online programs that could moni- tainly does seem to help stimulate vocabulary learning and
tor and guide learners in using these essential strategies retention, when combined with proper activation and recy-
should be further developed. cling habits that maximize interactive use of the target
In Louckys (7) findings, despite being one grade level language. A systematic taxonomy of vocabulary learning
higher in their proficiency, English majors were out- strategies (VLSs) incorporating a 10-phase set of specific
performed on all types of electronic dictionaries by Com- recyclable strategies is given by Loucky (7,29) to help
puter majors. The author concluded that familiarity with advance research and better maximize foreign language
computerized equipment or computer literacy must have vocabulary development (available at http://www.call4all.
accounted for this, and therefore should be carefully con- us///home/_all.php?fi=../misc/forms).
sidered when developing or using electronic dictionary A summary of Laufer and Levitzky-Aviads (4) findings
programs of any sort for language or content learning. is useful for designers, sellers, and users of electronic
His study compared vocabulary learning rates of Japanese dictionaries to keep in mind, as their study showed that:
college freshmen and functions of 25 kinds of electronic the best dictionaries for L2 written production were the
dictionaries, charting advantages, disadvantages, and L1-L2-L2 dictionaries. . . Even though the scores received
comments about the use of each (for details, see Loucky with the paper version of the L1-L2-L2 dictionary were just
(7) Table 1 and Appendix 3; Loucky (8) Tables 1 and 2. as good, the electronic dictionary was viewed more favor-
For a comparative chart of six most popular EDs for ably than the paper alternative by more learners. Hence, in
English<->Japanese use, see www.wordtankcentral.com/ terms of usefulness together with user preference, the
compare.html). electronic version fared best (p. 5). Such results should
Generally speaking, language learners prefer access to motivate CALL engineers and lexicographers to produce
both first and second language information, and beginning fully bilingualized electronic dictionaries (as well as print
to intermediate level learners are in need of both kinds of versions), specifically designed not merely to access recep-
data, making monolingual dictionaries alone insufficient tive information to understand word meanings better, but
for their needs. As Laufer and Hadar (30) and others have also for L2 production, to practically enable students to
shown the benefits of learners using fully bilingualized actively use new terms appropriately as quickly as possible.
dictionaries, the important research question is to try to
determine which kinds of electronic portable, software, or
SURVEYING USE OF ELECTRONIC DICTIONARIES
online dictionaries offer the best support for their needs.
Grace (31) found that sentence-level translations should be
To more thoroughly analyze and compare the types of
included in dictionaries, as learners having these showed
dictionaries being used by Japanese college students in
better short- and long-term retention of correct word mean-
three college engineering classes, two kinds of surveys
ings. This finding suggests a close relationship exists
were designed by Loucky (29). The first was a general
between processing new terms more deeply, verifying their
survey about purchase, use, and preferences regarding
meanings, and retaining them.
electronic dictionaries. The second survey (shown in the
Loucky (32) has researched many electronic dictionaries
Appendix) asked questions about how various computer-
and software programs, and more recently organized links
ized functions were used at each major phase of lexical
to over 2500 web dictionaries, which are now all accessible
processing. The aim was to help learners maximize these
from the site http://www.call4all.us///home/_all.php?fi=d.
eight essential phases of vocabulary learning: (1) assessing
His aim was to find which kind of EDs could offer the most
degree of word knowledge; (2) accessing new word mean-
language learning benefits, considering such educational
ings; (3) archiving new information for study; (4) analyzing
factors as: (1) better learning rates, (2) faster speed of
word parts and origins; (5) anchoring new words in
access, (3) greater help in pronunciation and increased
short-term memory; (6) associating words in related groups
comprehensibility, (4) providing learner satisfaction with
for long-term retention; (7) activating words through pro-
ease of use, or user-friendliness, and (5) complete enough
ductive written or oral use; and (8) reviewing/recycling and
meanings to be adequate for understanding various read-
re-testing them. After re-evaluating how well new words
ing contexts.
are learned by post-tests, any words not fully understood
As expected, among learners of a common major, more
should be remet through planned re-encounters, retellings,
proficient students from four levels tested tended to use
and activities that encourage learners to repeat the voca-
EDs of all types more often and at faster rates than less
bulary learning cycle again so that relearning and reacti-
language-proficient students did. In brief, the authors
vation can take place.
studies and observations and those of others he has cited
[e.g., Lew (3)] have repeatedly shown the clear benefits of
4 COMPUTERIZED DICTIONARIES

Table 1. Comparative Chart of Some Translation Software*


Al Misbar Translation 1 Language Pair

http://www.almisbar.com/salam_trans.html  English <-> Arabic


 Paid Subscription

Amikai 13 Language Pairs


http://www.amikai.com/products/enterprise/
(under Translation Demo)
 Free demo version (up to 100 characters)
 Full version can be customized with dictionaries.

Babel Fish 18 Language Pairs


http://babelfish.altavista.com/
 Can translate a web page or up to 150 words of text.

Ectaco LingvoBit 1 Language Pair


http://www.poltran.com/  English <-> Polish

Kielikone WebTranSmart 1 Language Pair


https://websmart.kielikone.fi/eng/kirjaudu.asp  English <-> Finnish
 Registration Required
 Per-word fee must be paid in advance for translations.

ParsTranslator 1 Language Pair


http://www.parstranslator.com/  English <-> Farsi

PROMT-Online 7 Language Pairs


http://translation2.paralink.com/
Reverso 5 Language Pairs
http://www.reverso.net/text_translation.asp
 Can translate text or web pages.
 Special characters can be inserted onscreen.

SDL Enterprise Translation Server 5 Language Pairs


http://www.sdl.com/enterprise-translation-server
 Free demonstration (up to 200 words)
 Can translate text or web pages.
 Used by FreeTranslation.com

SYSTRANBox 16 Language Pairs

http://www.systranbox.com/
 Can translate a web page or up to 150 words of text.
 Used by AOL, Lycos, Terra, Google, Voila, Wanadoo, Free.fr, and others.
 Check results with a human translator.

SYSTRANet 18 Language Pairs


http://www.systranet.com/systran/net
 More tools than SYSTRANsoft
 More language pairs
 Quality varies by language pair and subject matter. Check results
with a human translator.
 Must sign up for a password, but delivery of password is in seconds.
COMPUTERIZED DICTIONARIES 5

SYSTRANSoft 15 Language Pairs


http://www.systransoft.com/
 Can translate a web page, a file (TXT, RTF, or HTML) or up to 150 words of text.
 Quality varies by language pair and subject matter. Check results with a human
translator.

Tarjim (Registration Required) 1 Language Pair


http://tarjim.ajeeb.com/  English > Arabic

Wordchamp.com Over 100 Language Pairs


http://wordchamp.com Instant Glossing; Auto-Archiving; Online
 Free to all. Flashcard and Test Creation; Files can be
shared internationally between distance
learners, as well as internally within intact
classes, using its currently free Course
Management System (CMS).
*
Free unless stated otherwise. Summarized from site by author.

The first survey described Japanese college students 1. More than two-thirds of the students owned a PED, and
preferences and reasons for purchasing EDs. The second most of those who owned a PED exclusively used it regard-
showed self-reported use of PEDS and how their respective less of purposes.
functions were seen to aid in different phases of L2 voca- 2. The PEDs owned by most students cost $100$400, were
bulary learning. Students compared their use to that of of high quality, and did not have the disadvantages
print dictionaries. A majority of East Asian students sur- identified in other studies, such as brief definitions, the
veyed expressed a preference for using mobile or online absence of examples, and inaccurate information.
dictionaries rather than carry bulkier book dictionaries, 3. Most students were satisfied with their PEDs, especially
although a few English students carry both. These ED with their portability, and ease to look up a word, and ease
preferences and patterns of use need more investigation, to change from one dictionary to another.
but probably hold true wherever the level of economic 4. The perceived disadvantages included the relative una-
development is sufficient to support their purchase, as vailability (or inaccessibility) of detailed usage informa-
well as the use and availability of Internet access to online tion, examples, and grammatical information.
dictionary and Webreader glossing functions. 5. PEDs enabled students to use different types of diction-
Kobayashi (33) compared the use of pocket electronic aries in different places.
versus printed dictionaries to examine the effects of their 6. Although both PED users and PD users depended on
use on LPSs used. The three major strategies she distin- dictionaries, PED users used dictionaries more often.
guished were consulting, inferring versus ignoring new This was especially the case with smaller vocabulary
terms. She found that Pocket electronic dictionaries size students.
(PEDs) are rapidly becoming popular among L2 learners. 7. PD users and PED users did not significantly differ
Although many L2 learners depend on dictionaries, the in terms of their LPS use, except for the sheer frequency
prevalent view among L2 researchers and educators is that of dictionary consultation.
learners should use dictionaries sparsely. They encourage 8. There was a possibility that PED users consulted diction-
students to use another lexical processing strategy (LPS), aries at the expense of contextual guessing.
contextual guessing, for better vocabulary learning and 9. Although students depended on dictionaries, whether
reading comprehension. [But] are dictionaries indeed so PEDs or PDs, they also used guessing strategies fre-
harmful? (p. 2). quently. They often used a dictionary to confirm guessed
As some educators and researchers have been con- meaning. This was particularly the case with successful
cerned about the pedagogical value of EDs because of their students.
perceived limitations, such as insufficient information 10. Larger and smaller vocabulary size students differed in
provided, the possibility of discouraging contextual gues- their use of LPSs such as basic dictionary use, extended
sing, and a supposed negative impact on word retention dictionary use for meaning, extended dictionary use for
usage, extended dictionary use for grammatical informa-
(34-38), these educators and researchers concerns require
tion, lookup strategies, note-taking strategies, guessing
more investigation. So far, however, language learners strategies using immediate context, guessing strategies
preference for them, and EDs rapidly improving functions using wider context, combined use of LPSs, and selective
appear to be scuttling most of these previous claims. use of LPSs.
Although native readers have far larger working vocabul- 11. Higher and lower reading ability students differed in their
aries to guess from context, most second language readers use of LPSs such as basic dictionary use, extended dic-
prefer and benefit greatly from having both monolingual tionary use for meaning, extended dictionary use for usage,
and bilingual/mother tongue glosses available to them. extended dictionary use for grammatical information,
Kobayashi (39) found that lookup strategies, self-initiation, note-taking strategies,
6 COMPUTERIZED DICTIONARIES

guessing strategies using immediate context, guessing Translation Software


strategies using wider context, and selective use of LPSs
(p.2). For example, Ectaco has devices featuring a wide range of
software products, over 220 titles, translation tools, and
learning aids for over 35 languages designed for all standard
SURVEYING AND MONITORING USE OF VOCABULARY computer platforms, such as Windows, Pocket PC, and Palm
LEARNING STRATEGIES OS. Many devices have tools for various language goals (e.g.,
text translators, accent removers, bidirectional talking dic-
Vocabulary researchers such as Schmitt (40), Kudo (41), tionaries, localization tools, and language office tools), which
Orita (42), and Loucky (29) have examined more than include speaking and nonspeaking EOs, voice and travel
50 other effective vocabulary learning strategies, coming language translators, handheld PDAs, and software bun-
up with some useful taxonomies that makers of dic- dles for Pocket PCs, Windows, Palm OS, and Cell phones.
tionaries should be aware of and seek to maximize in their Although some online dictionaries charge fees, a major-
design of electronic features and functions in particular. ity are now available for free use. Most of these are now
Language learners do appear to benefit greatly from spe- organized at the authors www.CALL4ALL.us site, under
cific strategy training in this essential area of language Dictionaries Galore! http://www.call4all.us///home/_all.
development (43). php?fi=d. Many examples of excellent translation software
Loucky (29) has presented useful surveys of CBDs or programs and portable, software, and online dictionaries
EDs presented in CALICO Journal. He also included many can be seen and even ordered from these sites directly, or
recommendations for how to properly integrate computer- from those shown in Table 1.
ized lexicons, both portable and online, into CALL as
effectively and enjoyably as possible. He explained a useful 1. http://www.ectaco.co.uk/how-find/ (Ectaco).
taxonomy of VLS for all designers and users of computer- 2. http://www.call4all.us///prod/_order.php?pp=2 (For
ized dictionaries to help students maximize their learning language learning software, http://www. call4all.
of target language vocabulary. CALL Journal in December, us///home/_all. php?fi=d links to most web diction-
2005, highlighted the www.CALL4All.us website, showing aries).
how learners and teachers may use its extensive encyclo- 3. http://www.wor.com/shopping/ (World of Reading
pedia of preorganized online dictionaries and language Language Learning Software).
learning links to produce more effective and enjoyable 4. http://speedanki.com/ (Speedanki.com offers Kanji
reading and vocabulary learning lessons. These tools Level Tests and flash cards to help one learn and
include the use of online glossing engines and reading review for national Japanese Proficiency Tests).
labs, word-surfing games, vocabulary profilers most useful
5. http://quinlanfaris.com/?cat=3 (Compares technical
for text analysis and simplification, readability analyzers,
functions and differences between Seiko and Canon
and so on.
Wordtanks and the Seiko SR-E9000 PEDs).
State-of-the-Art Technical Features 6. http://flrc.mitre.org/Tools/reports/products_list.pl?
LID=199# (Translation software and professional
Probably the company offering the largest variety of func- tools used for customized and specialized dictionary
tions and types of computerized dictionaries for the most creations. Completeness of report is dependent on
languages is Ectaco, whose U.K. site enables one to search the completeness of the data entries and is expected
for both type of software/platform and particular language to improve rapidly over time. Information is pro-
pair combination sought. It can be accessed at http:// vided by each developer or vendor).
www.ectaco.co.uk/how-find/. Their programs for handheld, 7. http://flrc.mitre.org/Tools/internetMT.pl * (These
portable devices may be found at http://www.ectaco.co.uk/ translation programs are intended for giving a
Software-for-Pocket-PC/. general gist of meaning, not as a substitute for
human translation. However, this site is the best
Electronic Dictionaries quick view of machine translation options online,
Electronic dictionary and electronic translator handhelds covering 13 online translation engines).
are modern, lightweight, and fashionable gadgets with a
great variety of features. An electronic translator or dic- Computerized Dictionaries and Translation Software
tionary is becoming a definite must-have in many areas of Programs Available
business. More expensive devices are based on advanced
speech recognition and text-to-speech technologies. The most detailed and extensive table of translation soft-
Advanced models may include these useful functions: ware and computerized dictionary products may be found
1) a business organizer, 2) bidirectional, 3) voice recognition at the Foreign Language Resource Centers http://flrc.
or synthesis, 4) extensive vocabularies (up to 1,000,000 mitre.org/Tools/reports/products_list.pl?LID=202. Informa-
words), 5) grammar references, and 6) phrase banks con- tion provided by each developer or vendor at that site
taining colloquial expressions and common phrases, irre- includes company, product names and version, and des-
gular verbs, and more. Ectaco offers more than 70 titles for criptions of languages and functions included. As about 75
over 20 languages at: http://www.ectaco.co.uk/Electronic- companies are listed, only the list of companies providing
Dictionaries/. these kinds of products will be listed here to make online
COMPUTERIZED DICTIONARIES 7

searches possible. Computerized translation software dictionaries and contextual guessing more often
companies include the following: ABLE Innovations, Alis than less successful learners. Dictionary use should
Technologies; Acapela Group; Agfa Monotype Corporation; not be frowned on for the reason that it hinders
Al-Buraq; Arabeyes; Arabic OCR; arabsun.de; ARA- contextual guessing.
BVISTA; AramediA; Arava Institute for Environmental 4. Many LPSs involving dictionary use and guessing
Studies; ATA Software Technology Limited; Alchemy Soft- are helpful for both vocabulary learning and read-
ware Development; Abbyy Software House; Applications ing. These strategies should be taught to students.
Technology; Ascender Corporation; Atril UK, Ltd.; Atten- a. Teachers should give students instruction in how
sity Corporation; Basic Language Systems Corporation; to use a dictionary effectively, particularly how to
Basis Technology; CACI, Inc.; Ciyasoft Corporation; look for a variety of information and what diction-
CIMOS; Automatic Vocalization for Arabic; Automatic- aries are available.
TopicDetection/ Abstract of Document; Compure, Compu-
b. Guessing is also important for vocabulary learning
ter & Language Technology; Ectaco; Galtech Soft, Ltd.;
and reading. Teachers should give students
GlobalSight Corporation; International Systems Consul-
instruction in how to guess at word meaning using
tancy; IBM; Ice-LC Software; Idiom Technologies, Inc.;
wider and immediate contexts.
Jubilant Technologies, Inc.; Language Analysis Systems;
Language Engineering Company; Language Weaver, Inc., c. The ability to use a dictionary selectively is also
LLC; Lingua; Linguists Software; Lockheed-Martin; important. Teachers should instruct students when
Marine Acoustics, Inc.VoxTec; Paragon Software GmbH to use a dictionary and when to turn to other LPSs.
piXlogic; Postchi.com; Melingo, Ltd.; MetaTexis Software 5. Some strategies are more important for vocabulary
and Services; Microsoft Corporation; MultiCorpora R&D, learning than reading comprehension, and some
Inc.; Nattiq Technologies; Nisus Software; NovoDynamics.- strategies are more important for reading com-
com (Detects new application programming interface, API); prehension than for vocabulary learning. These
Paragon Software; Sakhr Software Company; SDL Inter- strategies should be taught considering the desired
national; SIL International Publishing Services; Smart skills and purposes of a reader or language learner
Link Corporation; Tavultesoft Pty, Ltd.; Telelingua; (29,33).
THUNDERSTONE SOFTWARE; TM SYSTEMS; TRA- 6. Successful language learners tend to use a much
DOS Corporation; Transclick, Inc.; Translation Experts; wider variety of effective lexical and text processing
translation.net; United Nations Educational, Scientific and strategies than do less proficient, unsuccessful lear-
Cultural Organization (UNESCO); United Nations; Uni- ners, regardless of whether they use electronic or
versity of California, Davis; University of Maryland; U.S. print dictionaries.
Army Intel Center; Verity; WORDFAST; World Health 7. Teachers often observe that the more frequently
Organization; WorldLanguage Resources; and XeroxThe EDs are used in a consistent manner with regular
Document Company. archiving and activation of new word information,
Among the various types of advanced applications and the more systematically new vocabulary is used
provided by innumerable types of software from these and reviewed, that retention results are better.
companies are multilingual translation; dictionaries; lan-
guage learning applications and toolkits; speech recogni- Quality and amount of review techniques or media
tion; information retrieval; multilingual word processing, functions used by a learner largely determine both their
spelling, and grammar; optical character recognition with degree of retention and speed and percentage of retrieval of
easy insertion into Windows word processing; and web new target terms and language forms. Reaction and retrie-
development and browsing. val times can be improved by giving more recent and
frequent encounters with target terms, helping to reactivate
Discussion and Pedagogical Implications them by building further memory traces. Along with recy-
Common findings can now be summarized about elec- cling and review techniques to improve recognition and
tronic lexicons from a broad reading of research in the field prediction skills, reassessing of learning must be done
by Kobayashi (33), Laufer and Hill (44), and Hill and Laufer regularly with frequent individual feedback to maximize
(45), combined with the authors findings as follows: motivation and acquisition. CALL should capitalize on
these language learning insights to design maximally effi-
1. PEDs facilitate L2 learning rather than hindering cient vocabulary learning programs for use both online and
it. Regardless of whether they are using electronic with portable devices.
or print dictionaries, successful students use effec- When constructing or using online vocabulary learn-
tive lexical processing strategies. Moreover, PEDs ing programs, these same crucial vocabulary learning
facilitate dictionary use. Therefore, the use of PEDs steps and strategies need to be encouraged by specific
should not be discouraged. questions in text and functions used by the programs. There
2. Rather than discouraging the use of PEDs, teachers should also be a tracking or feedback mechanism to help
could advise students to use a PED and a PD for teachers monitor learning, and to guide and prompt lear-
different purposes. ners not to forget to do any of these essential phases of
lexical processing.
3. Dictionary use and contextual guessing are not
mutually exclusive. Successful learners use both
8 COMPUTERIZED DICTIONARIES

GENERAL TRENDS AND FUTURE FRUITFUL students, to activities that require deeper and more com-
RESEARCH AREAS plex lexical processing for more advanced language lear-
ners using various kinds of EDs, both online and offline,
Major benefits of using portable devices include their mobi- whether stationary or mobile. It is also important for
lity and instant archiving or storage in history memos for teachers to give more clear guidance about particular kinds
future useful quick review. Web dictionaries like those of EDs, especially including good online programs for
organized at the authors site, however, provide much learning, to help maximize the use of their functions for
more potential, as one can copy and paste between any of education. We can only help maximize each programs
over 2000 online lexicons organized there for over 500 effectiveness if students learn how to use their various
language pairs. www.CALL4ALL.us provides a Virtual functions as efficiently as possible to help them at each
Rosetta Stone, not only of the full range of monolingual stage of processing new words outlined above. Further
and multilingual web dictionaries, but also a vast language helpful guidelines and goals to examine when seeking to
education links library for studying most of these lan- integrate new insights and innovations from CALL into the
guages as well. field of foreign language reading and vocabulary develop-
Another main advantage of modern translation technol- ment are given by Sokmen (46). In her words, among the
ogy is that it is much more efficient. One saves a lot of time, many areas in need of further systematic research in this
as there is no more turning of book pages and searching for field, we need to take advantage of the possibilities inher-
words endlessly. Words you are looking for are at your ent in computer-assisted learning, especially hypertext
fingertips, just one click away. Each online dictionary has linking, and create software which is based on sound prin-
400,000 entries, for example, in the case of Ectaco pro- ciples of vocabulary acquisition theory . . . programs which
grams, and far more are freely available from web diction- specialize on a useful corpus. . . provide. . .[for] expanded
aries organized at www.CALL4ALL.uss dictionaries page rehearsal, and engage the learner on deeper levels and in a
at http://www.call4all.us///home/_all.php?fi=d. Recommen- variety of ways as they practice vocabulary. There is also
dations for integrating the use of web dictionaries with the fairly unchartered world of the Internet as a source for
language learning programs online are given in Loucky meaningful activities for the classroom and for the inde-
(32). The 10 types of sites are organized to help teachers and pendent learner (p. 257).
students more efficiently combine the benefits of electronic In this way, using proven portable devices, multimedia
and online dictionaries with CALL websites to produce translation software, and well-designed, interactive web-
more effective and enjoyable content and language learning sites as much as possible, language learning can be made
lessons. much more interesting and effective as these CALL
The general trends over the past 10 years have been for resources are all used as tools for developing more balanced
PEDs to become more prevalent because of their speedy communication skills, which emphasize blending active
access to language meanings, grammar data, collocations/ production and interactive, content-based learning with
corpus examples, compact size, improved features, and authentic tasks and materials made much more accessible,
convenience of use as well as economical pricing. Some comprehensible, and memorable with the help of modern
feature as many as 32 lexicons or more, pronunciation technology. All in all, we can be quite optimistic about the
support, Internet connectivity, review games, automatic future of EDs, as de Schryver (25) is. Listing 118 lexico-
history of searches for review, and so on. Translation soft- graphers dreams in summarized tables, he masterfully
ware and CD-ROM dictionaries, being more expensive and incorporates almost every speculation ever made about
limited to the location of ones PC, have not become as electronic dictionaries (EDs) (p. 61) in Robys terms (47).
popular. Web and phone dictionaries appear to be the tool Roby (47) further notes that not only technical hard-
of choice of most students, as these functions are often ware, but also human fleshware is the most crucial ele-
provided at their schools or included in their cell phone ment when designing EDs, otherwise users may drown in
services at little or no extra charge. Assistive reading pens a sea of data. One cannot drink efficiently from a fire hose.
made by Quickionary also offer promise to those who can As he states, Sophisticated software and huge hardware
afford them. They also seem to enhance learners interest cannot guarantee the quality of an electronic dictionary. . .
and motivation levels, and thus help to contribute to higher Good online dictionaries will be equipped with spigots
levels of vocabulary retention, although how to best do that allow users to draw manageable amounts of
so online is a major question in need of further study. information. . . Information must be internalized for it to
Some of the most promising online glossing programs being be considered knowledge. In the vast reaches of virtual
tested now can be recommended for further research in this e-learning cyberspace, one does indeed require a common
area: 1) Wordchamp.com, 2) Rikai.com, 3) Wordsurfing.- gold standard compass, or better yet, a virtual Rosetta
com, and 4) Babelfish.com. Stone for language learning, such as those helpful sites
provided here.
As second language learners venture into terra incog-
CONCLUSIONS AND RECOMMENDATIONS
nita they do need clear maps and strategies to improve
their navigation on various WebQuests for knowledge.
To conclude, CALL and website e-learning developers need
Roby (47, p. 63) correctly asserts that Dictionaries can
to remember that teachers need to be able to scale their
be guides because they potentially intersect with every text
language and vocabulary learning activities from those
of the language: in a sense all texts lead to the dictionary
that require simpler and easier processing for lower level
(quoting Nathan). . . Learners can make forays into cyber-
COMPUTERIZED DICTIONARIES 9

space with an electronic dictionary as a navigational [tool].


And in a real sense, one can expect to see portable, wireless 1. Assessing Vocabulary Size:
dictionaries that will both allow physical mobility and Check your manual to see how many words it has for
afford Internet access. (In fact, most mobile phones and a. English:
WiFi laptops already do). b. Japanese(or other L1):
Tailoring computerized dictionaries to effectively sup- c. Kanji Study
port learners needs will require specific attention to their d. How many words do you think you know in English?
types, functions, and uses to best guide learners and tea-
chers to most effective integration of these portable and 2. AccessingFrequency of UseHow many times
online tools into language and science education. Research do you use it each day?
is showing us that all future EDs would do well to include a. For English to Japanese what % of the time?
preorganized categories of terms, searchable by topic and b. For Japanese to English, what % of the time?
semantic field. Five examples of these already found online c. To check unknown Kanji, what % of the time?
include: 1) UCRELs Semantic Analysis System located at
http://www.comp.lancs.ac.uk/ucrel/usas/ with 21 major
3. ArchivingHow do you record new words found?
AZ discourse fields; 2) Variation in English Words and
a. In my textbook in the margins
Phrases (VIEW) at http://view.byu.edu/; 3) this writers
b. On paper or in a Vocabulary Notebook
bilingualized Semantic Field Keyword Approach covering
c. I dont record new words
about 2000 intermediate to advanced terms in nine aca-
d. My CBD can record and save new words Ive looked
demic disciplines found at: http://www.call4all.us///misc/
up. If so, tell how:
sfka.php; 4) ThinkMaps Visual Thesaurus at http://
e. Can it do Automatic Recording and Review (of last 1
www.visualthesaurus.com/index.jsp?vt ; and 5) Wordnet
20 words) (called a History Search)
found at http://wordnet.princeton.edu/. This writers
f. Can you save and store new words manually?
www.CALL4ALL.us site helps to integrate essential, com-
g. Can you Save and Print Text Files or Notes on new
mon core vocabulary in many of these academic disciplines
words?
with most web dictionaries for 500 major world language
pairs. For an overview, see its site map at ( http://www.
call4all.us///home/_all.php?fi=0) or see Loucky (32,48,49). 4. Analyzing Special Functions or FeaturesDoes
In the final analysis, probably what learners are guided your CBD have any Special Functions or Features which
to do with new terms will prove to be a more important help you to break up new words into parts to better
learning factor than multimedia glossing and text concor- understand their grammar, origins or meaning?
dancer options alone can provide. New technologies do If so, please try to explain how to use them and tell how
indeed offer more powerful resources than ever before for often you do so. (Use Manual)
independent or classroom study of languages. Word learn- Does it give special information about word parts, gram-
ing options will probably be best maximized when comput- mar, or the origin of words?
ing power is used to enhance learners access to various Does it give any common phrases? _____Yes ______No
types of EDs of high quality simultaneously in all fields, ____Not Sure
while likewise providing them with the means to auto- Does it give any sentence examples? ____Yes ____No
archive and organize new target vocabulary as they are ____Not Sure
shown how to actively use these new terms productively as
soon as possible. 5. Anchoring New Words in MemoryDoes your Elec-
tronic Dictionary have any special Visual Images or
Auditory Sounds or other special functions to help illus-
APPENDIX
trate new word meanings, forms or use to help you better
Survey of Computerized Bilingual Dictionaries (27) remember them? ___Yes _____No
If so, tell what these special functions are and try to
Name your Book Dictionary or Electronic/Compu-
explain how they work to help you fix new words in
terized Bilingual Dictionary:
your memory.
Model #: Cost:
NAME: ID/YEAR: Reading Level: 6. Associating FunctionsDoes your Electronic
a. Grade: Dictionary help you to organize your vocabulary
b. Headwords: learning in any way?
Accessing & Archiving
For example, can you put words into Study Groups?
Time: ____________minutes c. %VLS Used:
(for 15 Laufer & Hadar
Do you organize your vocabulary learning or notebook
terms) d. DLP Level: in any special order or way to help you remember
e. AVQ/IP: new words? Do you group any words together to
better remember or learn them? If so, please tell
how you do so.
10 COMPUTERIZED DICTIONARIES

If your computerized dictionary, translation website, 7. J. P. Loucky, Improving access to target vocabulary using
or software helps you to do this in any way, please tell computerized bilingual dictionaries, ReCALL, 14 (2): 293
how: 312, 2003.
8. J. P. Loucky, Using computerized bilingual dictionaries to help
maximize English vocabulary learning at Japanese colleges,
7. Activating FunctionsDoes your Electronic Dic-
CALICO J.21, (1): 105129, 2003.
tionary give you any ways to USE new words right
9. Y. Akbulut, Exploration of the effects of multimedia annota-
away? ____Yes ____No If so, how?
tions on L2 incidental vocabulary learning and reading com-
Can you think of some ways ON YOUR OWN that you prehension of freshman ELT students. Paper presented at
could USE new words you have looked up more EuroCALL, Vienna, Austria, 2004.
actively or creatively? If so, tell how: 10. Y. Akbulut, Factors affecting reading comprehension in a
hypermedia environment. Paper presented at EuroCALL,
8. Review: Do you review any new words after find- Vienna, Austria, 2004.
ing their meanings? 11. Y. Akbulut, Foreign language reading through hypermedia:
____No ____Sometimes ____Yes, usually If so, tell how predictors of vocabulary learning and reading comprehen-
does your Electronic Dictionary help you to review or sion, 6th International Educational Technology Conference,
retest new words? Does your ED/CBD have any Famagusta, Northern Cyprus, April 1921, 2006, pp. 4350.
Vocabulary Practice Games that you can use for 12. D. Chun, CALL technologies for L2 reading, in L. Ducate and
review and practice? If so describe. If it had, what N. Arnold (eds.), Calling on CALL: From Theory and Research
level would you start to study at? to New Directions in Foreign Language Teaching, CALICO
Does your CBD have any Special Functions or Features Monograph Series, Volume 5, 2006 pp. 6998.
which help you study new words, such as challenge 13. K. Nakao, The state of bilingual lexicography in Japan:
games, memos, word search history, and so on to help learners English-Japanese/Japanese-English dictionaries,
In. J. Linguist., 11 (1): pp. 3550, 1998.
you learn, analyze, review or remember new words?
____Yes _____No _____Not Sure If so, please explain 14. J. Baxter, The dictionary and vocabulary behaviour: a single
word or a handful?, TESOL Quarterly, 14: 325336, 1980.
how to use them:
15. J. Tomaszczyk, On bilingual dictionaries: the case for bilingual
dictionaries for foreign language learners, in R. R. K.
Hartmann (ed.), Lexicography: Principles and Practice, New
FURTHER READING York: Academic Press, 1983, pp. 4151.
16. R. R. K. Hartmann, What we (dont) know about the English
G. Cumming S. Cropp, and R. Sussex, On-line lexical resources language learner as a dictionary user: a critical select biblio-
for language learners: assessment of some approaches to word graphy, in M. L. Tickoo (ed.), Learners Dictionaries: State of the
formation, System, 22 (3): 369377, 1994. Art, (Anthology Series 23). Singapore: SEAMO Regional Lan-
J. H. Hulstijn When do foreign-language readers look up the guage Centre, 1989, pp. 213221.
meaning of unfamiliar words? The influence of task and learner 17. T. Piotrowski, Monolingual and bilingual dictionaries: funda-
variables, Modern Lang. J. 77 (2): 139147, 1993. mental differences, in M. L. Tickoo (ed.), Learners Diction-
aries: State of the Art, Singapore: SEAMO Regional Language
Centre, 1989, pp. 7283.
BIBLIOGRAPHY 18. B. T. S. Atkins, and F. E. Knowles, Interim report on the
Euralex/AILA research project into dictionary use, in T. Magay
1. F. T. Dolezal and D. R. McCreary, Pedagogical Lexicography and J. Zigany, (eds.), Budalex 88 proceedings: Papers from the
Today: A Critical Bibliography on Learners Dictionaries with Euralex Third International Congress, Budapest: Akademiai
Special Emphasis on Language Learners and Dictionary Kiado, 1990, pp. 381392.
Users. Lexicographica, Series Maior 96. Tubingen: Max 19. S. Nuccorini, Monitoring dictionary use, in H. Tommola,
Niemeyer Verlag, 1999. K. Varantola, T. Salmi-Tolonen, and J. Schopp (eds.), Euralex
2. B. Laufer and M. Kimmel, Bilingualized dictionaries: how 92 Proceedings I-II (Part I), Studia Translatologica, Series A,
learners really use them, System, 25: 361362, 1997. 2, 89102, 1992, Tampere, Finland: University of Tampere.
3. R. Lew, Which dictionary for whom? Receptive use of bilingual, 20. J. H. Hulstijn and B. T. S. Atkins, Empirical research on
monolingual and semi-bilingual dictionaries by Polish lear- dictionary use in foreign-language learning: survey and dis-
ners of English. Poznan: Motivex, 2004. cussion, in B. T. S. Atkins, (ed.), Using dictionaries. Studies
4. B. Laufer and T. Levitzky-Aviad, Towards a bilingualized of Dictionary Use by Language Learners and Translators,
dictionary for second language production. AsiaLEX, Singa- (Lexicographica Series Maior 88.) Tubingen: Niemeyer,
pore, 2005, pp. 16. 1998, pp.719.
5. J. P. Loucky, Assessing the potential of computerized bilingual 21. B. Laufer and M. Hill, What lexical information do L2
dictionaries for enhancing English vocabulary learning, in learners select in a CALL dictionary and how does it affect
P. N. D. Lewis, (ed.), The Changing Face of CALL: A Japanese retention?, Language Learn. Technol., 3, (2): 5876, 2002.
Perspective,Lisse: Swets & Zeitlinger, 2002, pp. 123137. Available: http://llt.msu.edu/.
6. J. P. Loucky, Comparing translation software and OCR read- 22. S. Koren, Quality versus convenience: comparison of modern
ing pens. In M. Swanson, D. McMurray, and K. Lane (eds.), dictionaries from the researchers, teachers and learners
Pan-Asian Conference 3 at 27thInternational Conference of points of view, TESL Electron. J., 2 (3): 116, 1997.
JALT, National Conference Proceedings CD, Kitakyushu,
Japan, 2002, pp. 745755.
COMPUTERIZED DICTIONARIES 11

23. W. J. Meijs, Morphology and word-formation in a machine- 37. H. Nesi and G. Leech, Moving towards perfection: the lear-
readable dictionary: problems and possibilities, Folia ners (electronic) dictionary of the future, in H. Thomas and
Linguistica, 24 (12): 4571, 1990. P. Kerstin (eds.), The Perfect Learners Dictionary?, Tubingen:
24. H. Nesi, Electronic dictionaries in second language vocabulary Max Niemeyer Verlag, 1999, pp. 295306.
comprehension and acquisition: the state of the art, in U. Heid, 38. T. Koyama and O. Takeuchi, Comparing electronic and
S. Event, E. Lehmann, and C. Rohrer (eds.), Proceedings of the printed dictionaries: how the difference affected EFL learn-
Ninth EURALEX International Congress, EURALEX 2000, ing, JACET Bull., 38: 3346, 2004.
Stuttgart, Germany, Stuttgart: Institut for Maschinelle 39. C. Kobayashi, Examining the effects of using pocket electronic
Sprachverarbeitung, Universitat Stuttgart, 2000, pp. 839841. versus printed dictionaries on lexical processing strategies.
25. G-M. de Schryver, Lexicographers dreams in the electronic- Handout at JALT National Convention, Nara, 2004.
dictionary age, Int. J. Lexicography, 16 (2): 143199, 2003. 40. N. Schmitt, Vocabulary: Description, Acquisition and
26. P. Sharpe, Electronic dictionaries with particular reference Pedagogy, Cambridge:Cambridge University Press, 1997,
to the design of an electronic bilingual dictionary for English- pp. 200203.
speaking learners of Japanese, Int. J. Lexicography, 8 (1): 41. Y. Kudo, L2 vocabulary learning strategies. Available: http://
3954, 1995. www.nrc.hawaii.edu/networks/NW14/NW14.pd.
27. B. Laufer, Electronic dictionaries and incidental vocabulary 42. M. Orita, Vocabulary learning strategies of Japanese EFL
acquisition: does technology make a difference?, in Proceedings learners: their actual use and perception of usefulness, in
of the Ninth EURALEX International Congress, EURALEX M. L. Kyuoki (ed.), JACET Annual Review of English Learning
2000, Stuttgart, Germany,U. Heid, S. Evert, E. Lehmann, and and Teaching, 8: 2741, 2003, Miyazaki, Japan: Miyazaki
C. Rohrer (eds.), Stuttgart: Institut fur Maschinelle Sprach- University.
verarbeitung, Universitat Stuttgart, 2000, pp. 849853.
43. I. Kojic-Sabo and P. Lightbown, Student approaches to voca-
28. Y. Tono, On the effects of different types of electronic dic- bulary learning and their relationship to success, Modern
tionary interfaces on L2 learners reference behaviour in Lang. J., 83 (2): 176192, 1999.
productive/receptive tasks, in U. Heid, S. Evert, E. Lehmann,
44. B. Laufer and M. Hill, What lexical information do L2
and C. Rohrer (eds.), EURALEX 2000 Proceedings, Stuttgart,
learners select in a call dictionary and how does it affect
Germany, 2000, pp. 855861.
word retention?, Lang. Learn. Technol., 3 (2): 5876, 2000.
29. J. P. Loucky, Maximizing vocabulary development by sys-
45. M. Hill and B. Laufer, Type of task, time-on-task and electronic
tematically using a depth of lexical processing taxonomy,
dictionaries in incidental vocabulary acquisition, Int. Rev.
CALL resources, and effective strategies, CALICO J., 23,
Applied Linguist., 41 (2): 87106, 2003.
(2): 363399, 2006.
46. A. Sokmen, Current trends in teaching second language
30. B. Laufer and L. Hadar, Assessing the effectiveness of mono-
vocabulary, in N. Schmitt and M. McCarthy (eds.), Vocabulary:
lingual, bilingual, and bilingualized dictionaries in the com-
Description, Acquisition and Pedagogy, Cambridge:
prehension and production of new words, Modern Lang. J., 81:
Cambridge University Press, 1997, pp. 237257.
189196, 1997.
47. W. B. Roby, The internet, autonomy, and lexicography: a
31. C. A. Grace, Retention of word meaning inferred from context
convergence?, Melanges CRAPEL, No. 28. Centre de Recherche
and sentence level translations: implications for the design of
et dApplications Pedagogiques En Langues, Publications
beginning level CALL software, Modern Lang. J., 82 (4): 533
Scientifiques, 2006.
544, 1998.
48. J. P. Loucky, Harvesting CALL websites for enjoyable and
32. J. P. Loucky, Combining the benefits of electronic and online
effective language learning, in The Proceedings of JALT
dictionaries with CALL Web sites to produce effective and
CALL 2005, Glocalization: Bringing people together, Ritsumeikan
enjoyable vocabulary and language learning lessons, Comp.
University, BKC Campus, Shiga, Japan, June 35, 2005,
Assisted Lang. Learning, 18, (5): pp. 389416, 2005.
pp. 1822.
33. C. Kobayashi, Pocket electronic versus printed dictionaries:
49. J. P. Loucky, Developing integrated online English courses
the effects of their use on lexical processing strategies, On
for enjoyable reading and effective vocabulary learning, in The
JALT 2004: Language Learning for Life Conference CD, K.
Proceedings of JALT CALL 2005, Glocalization: Bringing Peo-
Bradford-Watts, C. Ikeuchi, and M. Swanson (eds.). JALT 2004
ple Together, Ritsumeikan University, BKC Campus, Shiga,
Conference Proceedings.Tokyo: JALT, 2005, pp. 395415.
Japan, June 35, 2005, pp. 165169.
34. A. Taylor and A. Chan, Pocket electronic dictionaries and
their use, in W. Martin et al. (eds.), Euralex 1994 Proceedings
Amsterdam: Vrije Universiteit, 1994, pp. 598605. JOHN PAUL LOUCKY
35. G. M. Tang, Pocket electronic dictionaries for second language Seinan JoGakun University
learning: help or hindrance?, TESL Canada J.,15: 3957, 1997. Fukuokaken, Japan
36. H. Nesi, A users guide to electronic dictionaries for language
learners, Int. J. Lexicography, 12 (1): 5566, 1999.
12 COMPUTERIZED DICTIONARIES
G
GEOGRAPHIC INFORMATION SYSTEMS in detail. The main component is the computer (or compu-
ters) on which the GIS run. Currently, GIS systems run on
A geographic information system (GIS) is a set of computer- desktop computers mainframes (used as a stand-alone or as
based tools to collect, store, retrieve, manipulate, visualize, part of a network), and servers connected to the Internet. In
and analyze geo-spatial information (information identi- general, GIS operations require handling large amounts of
fied by its location on the surface of reference, for example, information (50 megabytes or larger file sizes are not
the Earth). Some definitions of GIS include institutions, uncommon), and in many cases, GIS queries and graphic
people, and data, besides the computer-based tools. These displays must be generated very quickly. Therefore, impor-
definitions refer more to a total GIS implementation than to tant characteristics of computers used for GIS are proces-
the technology. Examples of GIS definitions can be found in sing speed, quantity of random access memory (RAM), size
Maguire (1), Chrisman (2), Foote and Lynch (3) among of permanent storage devices, resolution of display devices,
others. Our definition is discussed next. and speed of communication protocols.
Computer-based tools are hardware (equipment) and Several peripheral hardware components may be part of
software (computer programs). Geo-spatial information the system: printers, plotters, scanners, digitizing tables,
describes facts about the Earths features, for example, and other data collection devices. Printers and plotters are
the location and characteristics of rivers, lakes, buildings, used to generate text reports and graphics (including
and roads. Collection of geo-spatial information refers to maps). High-speed printers with graphics and color cap-
the process of gathering, in computer-compatible form, abilities are commonplace today. The number and sophis-
facts about features of interest. Facts usually collected tication of the printers in a GIS organization depend on the
are the location of features given by sets of coordinate amount of text reports and small size (typically 8.5 by 11)
values (such as latitude, longitude, and sometimes eleva- maps and graphics to be generated. Plotters allow the
tion), and attributes such as feature type (e.g., highway), generation of oversized graphics. The most common gra-
name (e.g., Interstate 71), and unique characteristics (e.g., phic products of a GIS system are maps. As defined by
the northbound lane is closed). Storing of geo-spatial infor- Thompson (5), Maps are graphic representations of the
mation is the process of electronically saving the collected physical features (natural, artificial, or both) of a part or the
information in permanent computer memory (such as a whole of the Earths surface. This representation is made by
computer hard disk). Information is saved in structured means of signs and symbols or photographic imagery, at an
computer files. These files are sequences of only two char- established scale, on a specified projection, and with the
acters (0 and 1) called bits, organized into bytes (8 bits) and means of orientation indicated. As this definition indi-
words (1664 bits). These bits represent information stored cates, there are two different types of maps: (1) line
in the binary system. Retrieving geo-spatial information is maps, composed of lines, the type of map we are most
the process of accessing the computer-compatible files, familiar with, in paper form, for example a road map;
extracting sets of bits, and translating them into informa- and (2) image maps, which are similar to a photograph.
tion we can understand (for example, information given in A complete discussion of maps is given by Robinson et al.
our national language). Manipulation of geo-spatial data is (6). Plotters able to plot only line maps usually are less
the process of modifying, copying, or removing selected sets sophisticated (and less expensive) than those able to plot
of information bits or complete files from computer perma- high-quality line and image maps. Plotting size and resolu-
nent memory. Visualization of geo-spatial information is tion are other important characteristics of plotters. With
the process of generating and displaying a graphic repre- some plotters, it is possible to plot maps with a size larger
sentation of the information, complemented with text and than 1 m. Higher plotting resolution allows plotting a
sometimes with audio. Analysis of geo-spatial information greater amount of details. Plotting resolution is very impor-
is the process of studying, computing facts from the geo- tant for images. Usually, the larger the map size needed,
spatial information, forecasting, and asking questions (and and the higher the plotting resolution, the more expensive
obtaining answers from the GIS) about features and their the plotter.
relationships. For example, what is the shortest route from Scanners are devices that sense and decompose a hard-
my house to my place of work? copy image or scene into equal-sized units called pixels and
store each pixel in computer-compatible form with corre-
sponding attributes (usually a color value per pixel). The
HARDWARE AND ITS USE
most common use of scanning technology is in fax
machines. They take a hardcopy document, sense the docu-
Computer hardware changes at a very fast pace most all the
ment, and generate a set of electric pulses. Sometimes, the
time. Better and better computers are available every year.
fax machine stores the pulses to be transferred later; other
This evolution impacts GIS and makes this description
times they are transferred right away. In the case of
difficult in terms of covering what is the state-of-art in
scanners used in GIS, these pulses are stored as bits in a
hardware. A good introduction to GIS hardware is given by
computer file. The image generated is called a raster image.
UNESCO (4). Our goal here is to overview the major hard-
A raster image is composed of pixels. Generally, pixels are
ware components of GIS without trying to discuss any one
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 GEOGRAPHIC INFORMATION SYSTEMS

square units. Pixel size (the scanner resolution) ranges Raster


from a few micrometers (for example, 5 microns) to hun- 00000000000
01100000100
dreds of microns (for example, 100 microns). The smaller 01100000010
the pixel size, the better the quality of the scanned images, 00110000001
Finite number 00011000000
but the larger the size of the computer file, the higher the of fixed area 00001100000
scanner cost. Scanners are used in GIS to convert hardcopy and dimension 00001100000
documents to computer-compatible form, especially paper pixels 00001100000
00001110000
maps. Wempen (7) gives a complete discussion of scanning 00000111000
technology. 00000011000
00000000000
Some GISs cannot use raster images to answer geo-
Area covered Feature Data stored
spatial questions (queries). Those GISs that can are usually
(a) (b) (c)
limited in the types of queries they can perform (they can
perform queries about individual locations but not geo- Vector
graphic features). The reason of this limitation is the
1
lack of explicit information in raster images. Only the 1 X 1, Y 1
location of each pixel in a grid array and a value per pixel 2 X 2, Y 2
(such as color) are the explicit information of raster images. Infinite number 2 X 3, Y 3
of dimensionless 3 X 4, Y 4
Explicit information is the information that can be
arealess geometric X 5, Y 5
expressed without vagueness, implication, or ambiguity,
points 4
leaving no quetion as to meaning or intent. Computer X1, Y 1
programs can recognize explicit information. Raster X2, Y 2
5
images mainly carry tacit information. Tacit information
is information that is difficult to express, often personal or Area covered Feature Data stored
context-speciific, hard to communicate, and even harder to (a) (b) (c)
represent in a formal way. In general, computer programs
Figure 1. The different structures of raster and vector informa-
cannot recognize tacit information. Most queries need
tion, feature representation, and data storage.
information in vector form (that carries a lot more explicit
information). Vector information represents individual
geo-spatial features (or parts of features) and is an ordered
list of vertex coordinates and alphanumeric and graphic
attributes. Vector information is used for representation
and analysis in most GIS. Figure 1 shows the differences SOFTWARE AND ITS USE
between raster and vector.
Digitizing tables are devices that collect vector informa- Software, as defined by the AGI dictionary (9), is the
tion from hardcopy documents (especially maps), and they collection of computer programs, procedures, and rules
consist of a flat surface on which documents can be for the execution of specific tasks on a computer system.
attached, and a cursor or puck with several buttons, A computer program is a logical set of instructions that tells
used to locate and input coordinate values (and sometimes a computer to perform a sequence of tasks. GIS software
attributes) into the computer. Attributes are commonly provides the functions to collect, store, retrieve, manipu-
input via keyboard. The result of digitizing is a computer late, query and analyze, and visualize geo-spatial informa-
file with a list of coordinate values and attributes per tion. An important component of software today is a
feature. This method of digitizing is called heads-down graphical user interface (GUI). A GUI is set of graphic tools
digitizing. Digitizing tables were the most common tools (icons, buttons, and dialog boxes) that can be used to
for digitizing maps, but their use has decreased in the last communicate with a computer program to input, store,
decade. retrieve, manipulate, visualize, and analyze information
Currently, there is a different technique to generate and generate different types of output. Pointing with a
vector information. This method uses a raster image as a device such as a mouse to select a particular software
backdrop on the computer terminal. These images are the application operates most GUI graphic tools. Voice can
result of scanning paper maps or derive from digital photos. also be used in a GUI to communicate with a computer
Usually, the image are geo-referenced (transformed into a program. Figure 2 shows a GUI.
coordinate system related in some way to the Earth). The GIS software can be divided into five major components
raster images are displayed on the computer screen, and (besides the GUI): input, manipulation, database manage-
the operator uses the computer mouse to collect the vertices ment system, query and analysis, and visualization. Input
of a geo-spatial feature and to attach attributes (the key- software allows the import of geo-spatial information (loca-
board or audio may be also used). As in the previous case, tion and attributes) into the appropriate computer-compa-
the output is a computer file with a list of coordinate values tible format. Three different issues need to be considered:
and attributes for each feature. This method is called how to transform (convert) analog (paper-based) informa-
heads-up digitizing. A more in-depth discussion on geo- tion into digital form, how to accept digital information
spatial data acquisition in vector or raster format is given collected by different devices, and how to store information
by GEOWEB (8). in the appropriate format. Scanning, as well as heads-down
and heads-up digitizing software with different levels of
GEOGRAPHIC INFORMATION SYSTEMS 3

same layer: hydrography). Then, one can manipulate all


Order Drinks Food Shortest Food &
Empty taken served ready route drinks Reset features in this layer by a single command. For example,
served one could change the color of all rivers of the hydrography
layer from light to dark blue by a single command.
Database management system (DBMS) is a collection of
Out Kitchen In software for organizing information in a database. This
software performs three fundamental operations: storage,
1 2 3 4 5 6 manipulation, and retrieval of information from the data-
base. A database is a collection of information organized
9 8 7 according to a conceptual structure describing the charac-
14 12 11 10 teristic of the information and the relationship among their
corresponding entities (9). In a database, usually at least
Bar
18 two computer files or tables and a set of known relation-
15 16 17
ships, which allows efficient access to specific entities, exist.
Food ready
Entities in this concept are geo-spatial objects (such as a
21 20 19 Food & drink served
road, house, and tree). Multipurpose DBMS are classified
Drinks served into four categories: inverted list, hierarchical, network,
Shortest route to Order taken and relational. Healy (10) indicates that there are two
and from table 18
Empty table common approaches to DBMS for GIS: the hybrid and
the integrated. The hybrid approach is a combination of
a commercial DBMS (usually relational) and direct access
Figure 2. GUI for a GIS in a restaurant setting and the graphic
answers to questions about table occupancy, service, and shortest
operating system files. Positional information (coordinate
route to Table 18. values) is stored in direct access files and attributes in the
commercial DBMS. This approach increases access speed to
positional information and takes advantage of DBMS func-
tions, minimizing development costs. Guptill (11) indicates
that, in the integrated approach, the standard query
language (SQL) used to ask questions about the database
automation, transforms paper-based information (espe- is replaced by an expanded SQL with spatial operators able
cially graphic) into computer-compatible form. Text infor- to handle points, lines, polygons, and even more complex
mation (attributes) can be imported by a combination of structures and graphic queries. This expanded SQL sits on
scanning and character recognition software, or can be top of the relational database, which simplifies geo-spatial
imported manually using keyboards or voice recognition information queries.
software. In general, each commercial GIS software pack- Query and analysis software provides new explicit infor-
age has a proprietary format used to store locations and mation about the geo-spatial environment. The distinction
attributes. Only information in that particular format can between query and analysis is somewhat unclear. Maguire
be used in that particular GIS. When information is con- and Dangermond (12) indicate that the difference is a
verted from paper into digital form using the tools from that matter of emphasis: Query functions are concerned with
GIS, the result is in the appropriate format. When informa- inventory questions such as Where is. . .? Analysis func-
tion is collected using other devices, then a file format tions deal with questions such as What if. . .?. In general,
translation needs to be made. Translators are computer query and analysis use the location of geo-spatial features,
programs that take information stored in a given format distances, directions, and attributes to generate results.
and generate a new file (with the same or similar informa- Two characteristic operations of query and analysis are
tion) in a different format. In some cases, translation buffering and overlay. Buffering is the operation that finds
results in information loss. and highlights an area of user-defined dimension (a buffer)
Manipulation software allows changing the geo-spatial around a geo-spatial feature (or a portion of a geo-spatial
information by adding, removing, modifying, or duplicating feature) and retrieves information inside the buffer or
pieces or complete sets of information. Many tools in manip- generates a new feature. Overlay is the operation that
ulation software are similar to those in word processors, for compares layers. Layers are compared two at a time by
example, create, open, and save a file; cut, copy, paste; and location or attributes. Query and analysis use mathema-
undo graphic and attribute information. Many other tical or logical models to accomplish their objectives. Dif-
manipulation tools allow drafting operations of the infor- ferent GISs may use different mathematical or logical
mation, such as drawing parallel lines, square, rectangles, models and, therefore, the results of querying or analyzing
circles, and ellipses; moving graphic elements; and chan- the same geo-spatial data in two different GISs may be
ging colors, line widths, and line styles. Other tools allow different.
the logical connection of different geo-spatial features. For Mathematical or logical models are of two kinds: (1)
example, geo-spatial features that are physically different Embedded models and (2) external models. Embedded
and unconnected can be grouped as part of the same layer, models are the kind of models that are used by any GIS
level, or overlay (usually, these words have the same mean- user to perform query and analysis; they are an integral
ing), by which they are considered part of a common theme part of a GIS. For example, the models used to perform
(for example, all rivers in a GIS can be considered part of the buffering and overlay are embedded models. Embedded
4 GEOGRAPHIC INFORMATION SYSTEMS

Figure 3.

models in many commercial systems are similar to black Visualization in this context refers to the software for
boxes: You input the data and you obtain results but, in visual representation of geo-spatial data and related facts,
general, you do not know how these results are generated. facilitating the understanding of geo-spatial phenomena,
External models are mathematical or logical models pro- their analysis, and inter-relations. The term visualization
vided by the user. In some quarters, the use of external in GIS encompasses a larger meaning. As defined by But-
models is known as GIS modeling. tenfield and Mackaness (17), visualization is the process of
There is not a clear distinction between the discipline of representing information synoptically for the purpose of
scientific modeling and GIS modeling. We would hypothe- recognizing, communicating, and interpreting pattern and
size that there are two instants of modeling in GIS: (1) when structure. Its domain encompasses the computational, cog-
the input of scientific modeling is the outcome of GIS, and nitive, and mechanical aspects of generating, organizing,
GIS is the only way to produce such outcome, and the manipulating, and comprehending such representation.
scientific model can be programmed or interfaced with Representation may be rendered symbolically, graphically,
GIS; (2) When the input of scientific modeling can be or iconically and is most often differentiated from other
collected or generated by means different than GIS, but forms of expression (textual, verbal, or formulaic) by virtue
GIS may be the simple way or the most cost-efficient way to of its synoptic format and with qualities traditionally
provide the input data or the software implementation of described by the term Gestalt, and it is the confluence
the scientific model. In our opinion, only the first instant of computation, cognition, and graphic design.
should be called GIS modeling. Todorov and Jeffress (13), Traditional visualization in mapping and GIS is accom-
White et al. (14), and Lauver et al. (15) present examples of plished through maps, diagrams, and perspective views. A
GIS modeling. Wilson (16) presents an example of scientific large amount of information is abstracted into graphic
modeling using GIS. symbols. These symbols are endowed with visual variables
Query and analysis are the capabilities that differenti- (size, value, pattern, color, orientation, and shape) that
ate GIS from other geographic data applications such as emphasize differences and similarities among those facts
computer-aided mapping, computer-aided drafting (CAD), represented. The joint representation of the facts shows
photogrammetry, and mobile mapping. explicit and tacit information. Explicit information can be
accessed by other means such as tables and text. Tacit
GEOGRAPHIC INFORMATION SYSTEMS 5

information requires, in some cases, performing operations How long will it be before food is served to table 11 if the
with explicit information, such as computing the distance same dish has been ordered nine times in the last few
between two points on a road. In other cases, by looking at minutes?
the graphic representation, we can access tacit informa- Many problems require a complex data model. A non-
tion. For example, we can find an unexpected relationship exhaustive list of GIS applications that require complex
between the relief and erosion that is not obvious from the models is presented next. This list gives an overview of
explicit information. This example represents the power of many fields and applications of GIS:
visualization!
The most noticeable improvement in GIS recently is in Siting of a store: Find, based on demographics, the best
visualization. Multimedia visualization that combines ras- location in a region for a new store. Retailers collect
ter, vector, audio, panoramic views, digital video, and so on ZIP codes information, the corresponding sale
is gaining acceptance in the GIS community. Experimental amount, and the store location for each transaction.
systems with these capabilities are being demonstrated in This information can be used in a GIS to show the
university research centers and by some commercial ven- volume of sales coming from each ZIP code region.
dors. Multimedia visualization systems offer the possibility Using additional information for each ZIP code
of overcoming many of the problems of traditional visuali- region, such as income, lifestyle retailers can deter-
zations. These systems allows dynamic, multisource, multi- mine how far a customer is willing to drive to go to a
sense, multiquality, representations of the environment store. This information can be used to determine the
instead of static, single-source, single-sense, single-quality best site for a new store.
representations. Figure 3 shows a prototype system devel- Network analysis: Find, for a given school, the shortest
oped by the Center for Mapping of The Ohio State Uni- bus routes to pick up students. School districts use
versity. the postal addresses of students, school locations, and
student distribution to plan cost-efficient school bus
routes. Some of the products of network analysis for
USING GIS
school routing are find students homes, bus stops, and
schools on maps; assigns students to closest stop;
GIS is widely used. Users include national, state, and local
assign stops to a run and runs to a route; identify
agencies; private business (from delivery companies to
district boundaries, walk-zones, and hazardous
restaurants, from engineering to law firms); educational
streets; and generate stop times and driver directions
institutions (from universities to school districts, from
for runs.
administrators to researchers); and private citizens. As
indicated earlier, the full use of GIS requires software Utility services: Applications for utility services
(that can be acquired from a commercial vendor), hardware include service interruption management, emer-
(which allows running the GIS software), and data (with gency response, distribution, network operation,
the information of interest). Partial use of GIS is possible planning, research, sales, engineering, and construc-
today with access to the Internet. As indicated by Worboys tion. An electric company, for example, provides ser-
(18), data are only useful when they are part of a structure vices to residential, commercial, government,
of interrelationships that form the context of the data. Such nonprofit, and others clients. These services are loca-
a context is provided by the data model. Depending on the tion-based and require a fast response to irregular
problem of interest, the data model maybe simple or com- situations such as an outage. Outage are responded to
plex. In a restaurant, information about seating arrange- by priority. Generally, an outage in a hospital
ment, seating time, drinks, and food are well defined and requires a faster response than to a residence. Using
easily expressed by a simple data model. Fundamentally, GIS, this response is efficient and timely.
you have information for each table about its location, the Land information system: Generate, using land par-
number of people it seats, and the status of the table (empty cels as the basic unit, an inventory of the natural
or occupied). Once a table is occupied, additional informa- resources of a region and the property-tax revenue.
tion is recorded: How many people occupy the table? At The geo-spatial description of each parcel, their attri-
what time was the table occupied? What drinks were butes such as owner, area, number of rooms, value,
ordered? What food was ordered?. What is the status of use, and so on, together with the basic geographic
the order (drinks are being served, food is being prepared, features of the region, such as roads, rivers, streams,
etc.) Questions are easily answered from the above infor- and lakes; vegetation; political boundaries; and so on,
mation with a simple data a model (see Fig. 2) such as allows the study and analysis of the region.
follows: What table is empty? How many people can be Automated car navigation: Having a dataset with
seated at a table? What table seats seven people? Has the enough route information such as the geo-spatial
food ordered by table 11 been served? How long before table description of roads, their speed limit, number of
11 is free again? Of course, a more sophisticated data model lanes, traffic direction, status of roads, construction
will be required if more complex questions are asked of the projects,and so on, it is possible to use GIS for real-
system. For example, What is the most efficient route to time car navigation. Questions such as: the recom-
reach a table based on the current table occupancy? If mended speeds, the path to be followed, street classi-
alcoholic drinks are ordered at a table, how much longer fication, and route restrictions to go from location A to
will it be occupied than if nonalcoholic drinks are ordered? location B can be answered during navigation.
6 GEOGRAPHIC INFORMATION SYSTEMS

Tourist information system: Integrating geo-spatial many cases, a GIS user has no way to know how good
information describing roads and landmarks such the embedded models of the system are, which is proble-
as restaurants, hotels, motel gasoline stations, and matic in GIS because perfect geo-spatial data used with
so on, allows travelers to answer questions such as poor-quality embedded models generates poor results and
follows: What is the difference in driving time to go the user may not be aware of that.
from location A to location B following the scenic From the viewpoint of data, quality is defined by the U.S.
route instead of the business route? Where, along National Committee Digital Cartographic Data Standard
the scenic route, are the major places of interest (NCDCDS)(19) as fitness for use. This definition states
located? How far is the next four-star hotel? How that quality is a relative term: Data may be fit to use in a
far am I from the next gasoline station? Some systems particular application but unfit for another. Therefore, we
allow to reserve a hotel room, rent a car, buy tickets to need to have a very good understanding of the scope of our
a concert or a movie, and so on, from the route. application to judge the quality of the data to be used. The
Political campaigns: How to maximize funds and to same committee identifies, in the Spatial Data Transfer
reach the larger sympathetic audience is basic in a Standard (SDTS), five quality components in the context of
political campaign. Based on population information, GIS: lineage, positional accuracy, attribute accuracy, logi-
political trends, cost, and social-economic level, it is cal consistency, and completeness.
possible, for example, to set the most time-efficient SDTS is the U.S. Federal Information Processing Stan-
schedule to visit the largest possible number of cities dard173 and states lineage is information about the
where undecided voters could make the difference sources and processing history of the data. Positional
during the last week of a political campaign. accuracy is the correctness of the spatial (geographic)
Marketing branch location analysis: Find, based on location of features. Attribute accuracy is the correctness
population density and consumer preferences, the of semantic (nonpositional) information ascribed to spatial
location and major services to be offered by a new (geographic) features. Logical consistency is the validity
bank branch. of relationships (especially topological ones) encoded in the
data, and completeness is the mapping and selection
Terrain analysis: Find the most promising site in a
rules and exhaustiveness of feature representation in the
region for oil exploration, based on topographic, geo-
data. The International Cartographic Association (ICA)
logical, seismic, and geo-morphological information.
has added two more quality components: semantic accu-
Driving directions: Find how to go from Point A to racy and temporal information. As indicated by Guptill and
Point B based on the postal addresses, which is one Morrison (20), semantic accuracy describes the number of
of the most popular applications of GIS, and one that features, relationships, or attributes that have been cor-
only requires access to the Internet. Most computer rectly encoded in accordance with a set of feature repre-
users are familiar with this application. You type the sentation rules. Guptill and Morrison (20) also indicate
postal address of your departure place and the postal temporal information describes the date of observation,
address of your destination. A computer program will type of update (creation, modification, deletion,
generate a set of directions to travel. These instruc- unchanged), and validity periods for spatial (geographic)
tions will be given by naming the major streets and data records. Most of our understanding about the quality
highways you will drive, indicating how to connect of geo-spatial information is limited to positional accuracy,
from one to the next, and the distance to be traveled in specifically point positional accuracy. Schmidley (21) has
each segment, and time of traveling (based on the conducted research in line positional accuracy. Research in
legal speed limit). The program will provide you with attribute accuracy has been done mostly in the remote
written instructions or a map displaying the route to sensing area, and some in GIS (see Chapter 4 of Ref. 20).
be traveled. Very little research has been done in the other quality
components (see Ref. 20).
To make the problem worse, because of limited digital
QUALITY AND ITS IMPACT IN GIS vector geo-spatial coverage worldwide, GIS users combine,
many times, different sets of geo-spatial information, each
The unique advantage of GIS is the capability to analyze set of a different quality level. Most GIS commercial pro-
and answer geo-spatial questions. If no geo-spatial data is ducts have no tools to judge the quality of the data used;
available for a region, of course, it is not possible to use GIS. therefore, it is up to the GIS user to judge and keep track of
On the other hand, the validity of the analysis and quality of information quality.
the answers in GIS are closely related to the quality of the Another limitation of GIS technology today is the fact
geo-spatial data used and the quality of the embedded that GIS systems, including analysis and query tools, are
models and the external models. If poor quality or incom- sold as black boxes. The user provides the geo-spatial
plete data were used, the query and analysis would provide data, and the GIS system provides results. In many cases,
poor or incomplete results. The same will happen if the the methods, algorithms, and implementation techniques
quality of the models was poor. Therefore, it is fundamental are considered proprietary and there is no way for the user
to know the quality of the information in a GIS and the to judge their quality. More and more users are starting to
quality of the models. Generally, the quality of the recognize the importance of quality GIS data. As result,
embedded models in commercial GIS is unknown. In many experts are conducting research into the different
aspects of GIS quality.
GEOGRAPHIC INFORMATION SYSTEMS 7

Quality of external models usually can be evaluated. data and technology into mainstream computing and the
Generally, the user knows in detail the external model to be widespread use of standards-compliant GIS software
used and can derive means to evaluate its quality. Models throughout the information infrastructure. Current speci-
can be evaluated by comparing their results with data of fications from the Open GIS Consortium include (1) Refer-
higher quality. For example, a rain prediction model can be ence Model; (2) Abstract Specification; (3) Implementation
evaluated by comparing the predicted rain with the actual Specifications; (4) Recommendation Papers; (5) Discussion
rain. If this comparison is done enough times, it is possible Papers; and (6) Conformant Products. The Open GIS Con-
to have a good estimator of the quality of the model. sortium is currently working on eight interoperability
initiatives (22), and their effort will continue for several
years to come.
THE FUTURE OF GIS
GIS capabilities will improve, which is reflected in the
large amount of ongoing research, published results, and
GIS is in its formative years. All types of users have
products and services. This work includes visualization,
accepted the technology, and it is a worldwide multibil-
user interfaces, spatial relation languages, spatial analysis
lion-dollar industry. This acceptance has created a great
methods, geo-spatial data quality, three-dimensional and
demand in digital geo-spatial information and improved
spatio-temporal information systems, open GIS software
technology to be satisfied in the near future. High-resolu-
design and access, and more. A search in the Internet of the
tion (1 meter or less) commercial satellites and multisensor
topic visualization research produced than 300,000 hits.
platforms (for example, global position system technology,
Noticeable among them are entries from AT&T Informa-
inertial navigation systems, high-resolution digital images,
tion Visualization Research Group (23) and the Stanford
laser scanners, multispectral, hyperspectral, etc.) generat-
Computer Graphics Laboratory of Stanford University
ing high-resolution images, positions, attitude, and so on
(24). In the field of user interfaces, a search in the Internet
mobile mapping technology generating high-resolution
found less than 200 hits. However, there are many profes-
images and geo-spatial positions and attitude; efficient
sional associations such as the User Interface Engineering,
analog-to-digital data conversion systems; and so forth
which in 2003 had its eighth Conference. In the case of
are some of the promising approaches to the generation
Spatial Relation Languages, we received than 20,000 hits
of geo-spatial data.
in our Internet search. Many interesting topics, such as
At the same time, the use of the Internet is creating new
visual languages for static and dynamic cases; Spatial
opportunities and new demands in GIS. Opportunities
Query Languages; Spatial reasoning; and so on are found
generated by the Internet include allowing access to a
under this topic. In the area of Spatial Analysis Methods,
very large number of datasets all over the world and World
we found more than 230,000 hits. Spatial analysis has been
Wide Web mapping. World Wide Web mapping is based on
around for a long time, but GIS makes its use easy. Spatial
the easy-to-use browser-based format that is both simple
data mining is a new topic in spatial analysis and generates
and cost-effective to implement, which allows the common
a lot of interest among researchers. Data mining is dis-
individual to use the Web to access maps and GIS-based
covering knowledge from large databases. As indicated by
data. Sophisticated GIS applications become usable by
Ramirez (25), simply put, data mining is basically a mod-
everyone over the Internet.
eling activity. You need to describe the data, build a pre-
New demands in GIS generated by the Internet include
dictive model describing a situation you want to investigate
better and faster analysis and query tools as well as better
based on patterns determined from known results, and
visualization systems; better tools to access and merge
verify the model. Once these things are done, the model
remote data without creating new datasets are needed;
is used to test the data to see what portions of the data
an integrated format for raster, vector, video, panoramic
satisfy the model. If you find that the model is satisfied, you
views, audio, spectral, multispectral data, and so on is
have discovered something new about your data that is of
fundamental, which will allow integration of multimedia
value to you. We found more than 46,000 hits searching
data into a single format and will simplify the storage and
specifically for Spatial Data Mining on the Internet. This
manipulation of geo-spatial data. The Open GIS Consor-
topic is of great interest that would provide a major payoff to
tium will help in satisfying some of the above demands. The
the user of geo-spatial data. Searching for the topic Geo-
Open GIS Consortium is an international industry consor-
Spatial Data Quality, we found more than 2500 hits on the
tium founded in 1994 by several GIS organizations. The
Internet. Many of these hits are related to metadata, but
purpose was to address the issue of incompatibility stan-
efforts in other aspects of data quality and visualization of
dards in GIS technology. Today, more than 220 companies,
geo-spatial quality were also found. The search of Three-
government agencies, and universities participate in a
Dimensional and Spatio-Temporal Information Systems
consensus process to develop publicly available specifica-
on the Internet was conducted in two steps. We searched for
tions for interfaces and protocols that enable interoperable
Three-Dimensional Information Systems and received
geo-processing services, data, and applications.
than 290,000 hits. We found a large variety of subjects
The vision of the Open GIS Consortium is a world in
such as machine vision, three-dimensional databases, and
which everyone benefits from geographic information and
three-dimensional display systems that are more or less
services made available across any network, application, or
related to GIS. We also searched for Spatio-Temporal
platform, and its mission is to deliver spatial interface
Information Systems and received than 16,000 hits. It is
specifications that are openly available for global use (22).
obvious that the subject of three-dimensional information
The Open GIS Consortium envisions the integration of GIS
systems is more advanced than spatio-temporal systems,
8 GEOGRAPHIC INFORMATION SYSTEMS

but there is ongoing research in both subjects. Finally, in limited in the types of queries they can perform (they can
the topic of Open GIS Software Design and Access, we perform queries about individual locations but not geo-
discussed earlier the work of the Open GIS Consortium that graphic features). Most queries need information in vector
is the best link to this topic. These research and develop- form. Vector information represents individual geographic
ment efforts will result in better, reliable, faster, and more features (or parts of features) and is an ordered list of vertex
powerful GIS. coordinates. Figure 1 shows the differences between raster
Several peripheral hardware components may be part of and vector. Digitizing tables are devices that collect vector
the system: printers, plotters, scanners, digitizing tables, information from hard-copy documents (especially maps).
and other data collection devices. Printers and plotters are They consist of a flat surface on which documents can be
used to generate text reports and graphics (including attached and a cursor or puck with several buttons, used to
maps). High-speed printers with graphics and color cap- locate and input coordinate values (and sometimes attri-
abilities are commonplace today. The number and sophis- butes) into the computer. The result of digitizing is a
tication of the printers in a GIS organization depend on the computer file with a list of coordinate values and attributes
amount of text reports to be generated. Plotters allow the per feature. This method of digitizing is called heads-down
generation of oversized graphics. The most common gra- digitizing.
phic products of a GIS system are maps. As defined by Currently, there is a different technique to generate
Thompson (1), Maps are graphic representations of the vector information. This method uses a raster image as a
physical features (natural, artificial, or both) of a part or the backdrop on the computer terminal. Usually, the image has
whole of the earths surface. This representation is made by been geo-referenced (transformed into a coordinate system
means of signs and symbols or photographic imagery, at an related in some way to the earth). The operator uses the
established scale, on a specified projection, and with the computer mouse to collect the vertices of a geographic
means of orientation indicated. As this definition indi- feature and to attach attributes. As in the previous case,
cates, there are two different types of maps: (1) line the output is a computer file with a list of coordinate values
maps, composed of lines, the type of map we are most and attributes for each feature. This method is called
familiar with, usually in paper form, for example a road heads-up digitizing.
map; and (2) image maps, which are similar to a photo-
graph. Plotters able to plot only line maps are usually less
SOFTWARE AND ITS USE
sophisticated (and less expensive) than those able to plot
high-quality line and image maps. Plotting size and resolu-
Software, as defined by the AGI dictionary (2), is the
tion are other important characteristics of plotters. With
collection of computer programs, procedures, and rules
some plotters it is possible to plot maps with a size larger
for the execution of specific tasks on a computer system.
than one meter. Higher plotting resolution allows plotting a
A computer program is a logical set of instructions, which
greater amount of details. Plotting resolution is very impor-
tells a computer to perform a sequence of tasks. GIS soft-
tant for images. Usually, the larger the map size needed,
ware provides the functions to collect, store, retrieve,
and the higher the plotting resolution, the more expensive
manipulate, query and analyze, and display geographic
the plotter.
information. An important component of software today
Scanners are devices that sense and decompose a hard-
is a graphical user interface (GUI). A GUI is set of graphic
copy image or scene into equal-sized units called pixels and
tools (icons, buttons, and dialogue boxes) that can be used to
store each pixel in computer-compatible form with corre-
communicate with a computer program to input, store,
sponding attributes (usually a color value per pixel). The
retrieve, manipulate, display, and analyze information
most common use of scanning technology is in fax
and generate different types of output. Pointing with a
machines. They take a hardcopy document, sense the docu-
device such as a mouse to select a particular software
ment, and generate a set of electric pulses. Sometimes, the
application operates most GUI graphic tools. Figure 2
fax machine stores the pulses to be transferred later; other
shows a GUI.
times they are transferred right away. In the case of
GIS software can be divided into five major components
scanners used in GIS, these pulses are stored as bits in a
(besides the GUI): input, manipulation, database manage-
computer file. The image generated is called a raster image.
ment system, query and analysis, and visualization. Input
A raster image is composed of pixels. Generally, pixels are
software allows the import of geographic information (loca-
square units. Pixel size (the scanner resolution) ranges
tion and attributes) into the appropriate computer-compa-
from a few micrometers (for example, five) to hundreds of
tible format. Two different issues need to be considered:
micrometers (for example, 100 micrometers). The smaller
how to transform (convert) analog (paper-based) informa-
the pixel size the better the quality of the scanned images,
tion into digital form, and how to store information in the
but the larger the size of the computer file and higher the
appropriate format. Scanning, and heads-down and heads-
scanner cost. Scanners are used in GIS to convert hardcopy
up digitizing software with different levels of automation,
documents to computer-compatible form, especially paper
transforms paper-based information (especially graphic)
maps.
into computer-compatible form. Text information (attri-
Some GIS cannot use raster images to answer geo-
butes) can be imported by a combination of scanning and
graphic questions (queries). Those GIS that can are usually
character recognition software, and/ or by manual input
GEOGRAPHIC INFORMATION SYSTEMS 9

using a keyboard and/or voice recognition software. In BIBLIOGRAPHY


general, each commercial GIS software package has a
proprietary format, used to store locations and attributes. 1. D. J. Maguire, The history of GIS, in D. J. Maguire, M. F.
Only information in that particular format can be used in Goodchild, and D. W. Rhind (eds.), Geographical Information
that particular GIS. When information is converted from Systems, Harlow, U.K.: Logman Scientific Group, l991.
paper into digital form using the tools from that GIS, the 2. Chrisman A Revised Information of Geographic Information
result is in the appropriate format. When information is Systems. University of Washington, 1998. Available: http://
collected using other alternatives, then a file format trans- faculty.washington.edu/chrisman/G460/NewDef.html.
lation needs to be made. Translators are computer pro- 3. K. E. Foote and M. Lynch. Geographic Information Systems as
grams that take information stored in a given format and an Integrating Technology: Context, Concepts, and Defini-
generate a new file (with the same information) in a dif- tions, University of Texas, 1997. Available: http://www.color-
ado.edu/geography/gcraft/notes/intro/intro.html.
ferent format. In some cases, translation results in infor-
mation loss. 4. UNESCO. UNESCO Hardware Requirement, 1999. Available:
http://gea.zyne.fer.hr/module_a/module_a6.html.
Manipulation software allows changing the geographic
information by adding, removing, modifying, or duplicating 5. M. M. Thompson, Maps for America, 2nd ed. Reston, Virginia:
U.S. Geological Suervey, 1981. p. 253.
pieces or complete sets of information. Many tools in manip-
6. A. H. Robinson, J. L. Morrison, P. C. Muehrcke, A. J. Kimerling,
ulation software are similar to those in word-processors:
and S. C. Guptill, Elements of Cartography 6th ed. New York,
create, open, and save a file; cut, copy, paste, undo graphic
Wiley, 1995.
and attribute information. Many other manipulation tools
7. F. Wempen. Unlock the secrets of scanner technology, 2002.
allow drafting operations of the information, such as: draw
Available: http://www.techrepublic.com/article_guest.jhtml?-
a parallel line, square, rectangle, circle, and ellipse; move a idr00320020311fair01.htm&fromtme015.
graphic element, change color, line width, line style. Other
8. GEOWEB Spatial Data Acquisition Specific Theory. Depart-
tools allow the logical connection of different geographic ment of Geomatics, The University of Melbourne, 2000. Avail-
features. For example, geographic features that are phy- able: http://www.sli.unimelb.edu.au/gisweb/SDEModule/
sically different and unconnected, can be grouped as part of SDETheory.doc.
the same layer, level, or overlay (usually, these words have 9. Association for Geographic Information AGI GIS Dictionary
the same meaning). By doing this, they are considered part 2nd ed., 1993. Available: http://www.geo.ed.ac.uk/agidexe/
of a common theme (for example, all rivers in a GIS can be term/638.
considered part of the same layer: hydrography). Then, one 10. R. G. Healey, Database management systems, in D. J. Maguire,
can manipulate all features in this layer by a single com- M. F. Goddchild, and D. W. Rhind (eds.), Geographical Infor-
mand. For example, one could change the color of all rivers mation Systems, Harlow, U.K.: Logman Scientific Group, l991.
of the hydrography layer from light to dark blue by a single 11. S. C. Guptill, Desirable characteristics of a spatial database
command. management system, Proceedings of AUTOCARTO 8, ASPRS,
Database management system (DBMS) is a collection of falls Church, Virginia1987.
software for organizing information in a database. This 12. D. J. Maguire and J. Dangermond, The functionality of GIS, D.
software performs three fundamental operations: storage, J. Maguire, M. F. Goodchild, and D. W. Rhind (eds.), Geogra-
manipulation, and retrieval of information from the data- phical Information Systems, Harlow U.K.: Logman Scientific
base. A database is a collection of information organized Group, l991.
according to a conceptual structure describing the charac- 13. N. Todorov and G. Jeffress GIS Modeling of Nursing Workforce
teristic of the information and the relationship among their and Health-Risk Profiles, Available: http://www.spatial.mai-
corresponding entities (2). Usually, in a database there are ne.edu/ucgis/testproc/todorov.
at least two computer files or tables and a set of known 14. W. S. White, P. J. Mizgalewich, D. R. Maidment, and M. K.
relationships, which allows efficient access to specific enti- Ridd, GIS Modeling and Visualization of the Water Balance
During the 1993 Midwest Floods, Proceedings AWRA Sympo-
ties. Entities in this concept are geographic objects (such as
sium on GIS and Water Resources, Ft. Lauderdale, Florida,
a road, house, and tree). Multipurpose DBMS are classified 1996.
into four categories: inverted list, hierarchical, network,
15. C. L. Lauver, W. H. Busby, and J. L. Whistler, Testing a GIS
and relational. Healy (3) indicates that for GIS, there are model of habitat suitable for a decling grassland bird, Envir-
two common approaches to DBMS: the hybrid and the onment. Manage., 30(1): 8897, 2002.
integrated. The hybrid approach is a combination of a 16. J. P. Wilson, GIS-based Land Surface/Subsurface Modeling:
commercial DBMS (usually, relational) and direct access New Potential for New Models? Proceedings of the Third
operating system files. Positional information (coordinate International Conference/Workshop on Integrating GIS and
values) is stored in direct access files and attributes, in the Environmental Modeling, Santa Fe, New Mexico, 1996.
commercial DBMS. This approach increases access speed to 17. B. P. Buttenfield and W. A. Mackaness, Visualization, in D. J.
positional information and takes advantage of DBMS func- Maguire, M. F. Goodchild, and D. W. Rhind (ed), Geographical
tions, minimizing development costs. Guptill (4) indicates Information Systems, Harlow, U.K.: Logman Scientific Group,
that in the integrated approach the Standard Query Lan- l991.
guage (SQL) used to ask questions about the database is 18. M. F. Worboys, GIS: A Computing Perspective, London: Taylor
& Francis, 1995, p. 2.
10 GEOGRAPHIC INFORMATION SYSTEMS

19. Digital Cartographic Data Standard Task Force, The proposed 24. Stanford University. Stanford University Stanford Computer
standard for digital cartographic data, The American Carto- Graphics Laboratory, 2003. Available: http://www.graphics.-
grapher15: 9140, 1988. stanford.edu/.
20. S. C. Guptill and J. L. Morrison, Elements of Spatial Data 25. J. R. Ramirez, A user-friendly data mining system, Proceedings
Quality, Kidlington, U.K.: Elsevier Science, 1995. 20th International Cartographic Conference, Beijing, China,
21. R. W. Schmidley, Framework for the Control of Quality in 2001, pp 16131622.
Automated Mapping, Unpublished dissertation, The Ohio
State University, Columbus, Ohio, 1996.
22. OGC. Open GIS Consortium (2003, June 28)). Open GIS
J. RAUL RAMIREZ
Consortium, Inc., Available: http://www.opengis.org/. The Ohio State University
Columbus, Ohio
23. AT&T. AT&T AT&T Information Visualization Research
Group, 2003. Available: http://www.research,att.com/areas/
visualization/projects_software/index.html, [2003. June 29].
H
HOME AUTOMATION security system can be linked with video cameras, the VCR,
the telephone network, and the local police station. A smoke
HOME AUTOMATION detector can be linked to the heating, ventilating, and air
conditioning system, and to lighting controls so that, in case
It needs to be noted that home automation systems are a fire breaks out, smoke can be cleared and hallways can
intended for homes, so they do not usually address the be appropriately illuminated to help people move out of
issues of working environment, multiparty cooperation, the house.
ergonomics, and floor planning that are usually the Having such a system with so many differing applica-
problems addressed in the intelligent building design tions brings forth a wealth of problems in terms of the
literature. required integration. High-definition video requires sev-
Home developers and builders are offering community eral megahertz of bandwidth, whereas a room thermostat
linkage and links with schools in their new construction requires a minimum bandwidth occasionally. High-fidelity
projects. Thus, the physical community is connected to the audio or video traffic requires very strict limits on delays,
virtual community. The creation of community centers (let whereas a washing machine control signal does not have
them be physical or virtual) is the end result of such efforts. these requirements.
Home automation systems in various forms have
appeared in the market for many years. Thus, we have From Home Automation to Intelligent Buildings
seen many intelligent security systems, energy manage-
Advances in hardware and software technology have
ment units, lighting controllers, entertainment systems,
affected not only the home automation market but the
and so on. Interfacing of these products has been limited,
market of intelligent buildings as well. Intelligent build-
however, and has been usually rather costly, especially in
ings is a term used to describe buildings that are not
the U.S. market. Some products have received a wide
passive toward their occupants and the activities that
market acceptance and have become de facto standards
take place in them but can program their own systems
in a limited home automation market.
and manage the consumption of energy and materials. In
Home automation products can, in general, be categor-
an intelligent building, sensors receive information on the
ized as follows:
status of the building and, through the communication
system of the building, transfer it to a central controller
 Interactive smart products
where, after the necessary comparisons and processing,
 Intelligent subsystems actions are taken. An intelligent building consists of the
 Central automation systems peripheral units, the units that monitor the proper func-
tioning of the equipment and regulate it if needed, and the
Most of us have extensively used interactive smart field elementsthat is, the sensors, indicators, and acti-
systemsthat is, devices that previously required manual vators present in the building.
control but now have a wide set of programmable features.
The cases of programmable video cassette recorders
(VCRs), automated door openers, and automated sprinkler APPLICATIONS
systems fall into this category. Intelligent subsystems con-
sist of two or more interactive smart systems that are able Several applications have been envisioned by designers of
to exchange information to accomplish more sophisticated home automation systems and standards organizations.
tasks. The interaction between a TV and a programmable The following categories of applications have been
VCR falls into this category, as well as an interface of a presented in the literature:
telephone answering machine with the lighting or the
security system. The ultimate and most comprehensive
 Control of homes heating, lighting, windows, doors,
home automation system would be one that integrates a screens, and major appliances via a TV or TV-like
number of smart systems or intelligent subsystems into a screen.
system that can be thoroughly and seamlessly controlled by  Remote control of the house environment via a touch-
the home owner. Such a system would provide a compre- tone key telephone.
hensive system of home information, telecommunication,  Detectors to identify rooms that have been empty for
entertainment, and control. more than a specified period of time and possibly
Several advantages are realized through the use of such transfer this information to the security system or
an integrated system. A smart microwave can have its regulate the heating of the room.
cooking schedule controlled through a central database  Help for the elderly and disabled.
that stores all the home inhabitants schedules and habits.
A VCR can record only the satellite or cable TV programs In the initial phases of research and development
that the users like or allow to be viewed and then selectively efforts, the following applications were identified:
broadcast them to the TV sets in the house. An integrated
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 HOME AUTOMATION

 Load management; Lonworks


 Domestic appliance system; For designers who will be involved in home automation
 Environment control; designs, companies like Texas Instruments, Motorola, and
 Lighting control; Toshiba have been very active in developing the tools and
 Security; components that will make this process easier.
Home automation systems have borrowed extensively
 Safety;
from the developments in the networking community. The
 Access control; idea of using a local area network (LAN) to control and
 Voice communication; connect devices was implemented in Echelons Lonworks.
 Data communication (including telecontrol); and Lonworks is based on a distributed control LAN using its
 Entertainment. local operating network (LON). Communications media,
network communication protocols, and application soft-
Several other applications that can make use of the ware are integrated. The LAN implements a predictive
communications that exist outside the home include: p-persistent CSMA protocol and can handle rates up to
1.25 Mbps. In the physical layer, transceivers for a variety
 Home banking; of media are offered. The Neuron C application language,
an extension of ANSI C, adds several features that allow
 Information services;
efficient input/output (I/O) operations and efficient
 Working from home; network management.
 Health monitoring (health check, health security); International efforts have been under way to develop
 Telecontrol (appliances security heating, video record- standards covering the communication between home
ing); and automation system modules. Most of these efforts use a
 Telemetering (gas, electricity, water). LAN environment and follow standard layered approaches,
such as the ones advocated by OSI.
Looking at the previously presented classifications of
applications, one sees that there is a big difficulty in finding CEBus
and imposing the most appropriate classification and iden- In the United States, the Electronic Industry Association
tifying non-overlapping definitions, and then identifying (EIA) recognized the need to develop standards covering all
functional links between different applications. Entertain- aspects of home automation systems communication. A
ment applications usually receive the most attention in committee was organized in 1983 to carry out the task.
standardization activities and market products because In 1988, a home automation system communication stan-
a large market already exists that has been accustomed dard known as CEBus (consumer electronic bus) was made
to integration and common formats. Thus, the integration available by the EIA committee for comments. It was
of audio devices such as DAT players, record players, upgraded and re-released in December 1989 after under-
cassette players, CD/DVD players, radio tuners, micro- going several changes. A final document became available
phones, headphones, and remote controls has seen a very in 1992 (1). The CEBus document covers the electrical and
large market. The same concepts apply to video equipment; procedural characteristics of systems modules communica-
that is, the integration of TV display screens, VCRs, TV tion. The CEBus powerline technology was one of the first
tuners, video cameras, video disk players, DVD players, attempts to transport messages between household
video printers, and satellite dish platforms through a devices, using the 110I20VAC electrical wiring in U.S.
common interface has received considerable attention. households. More than 400 companies have occasionally
Security applications are the most advanced appli- attended the CEBus committee meetings, providing a com-
cations at homes today in terms of providing an integration prehensive standard, intended for the consumer electronics
of controller sensors, actuators, video camera, camera plat- industry. The main objectives of CEBus have been:
form, microphones, door phone, push buttons/key access,
and timers.  Low-cost implementation;
A considerable number of electric utilities have been
 Home automation for retrofit into existing cabling
involved with using advanced techniques of home automa-
networks;
tion for load management.
 To define minimum subsets per appliance intelligence
and functional requirements;
PRODUCTS AND STANDARDS  Distributed communication and control strategy;
As in many other industries, home automation products
 Basic plug-and-play functionality allowing devices to
were first introduced before a complete set of standards be added or removed from the network without inter-
was specified. So in tracing the market and product dev- rupting the communication of other subsystems; and
elopment, we see a large number of products that do not  To accommodate a variety of physical media.
follow any standard specifications but are absolutely
proprietary. However, CEBus faced only the home automation area
and never offered truly multimedia capabilities. In late
HOME AUTOMATION 3

1995, CEBus became part of an umbrella standard known high-frequency signal superimposed on the voltage of the
as Home Plug and Play (HPnP). main. Sensitivity to electrical noise remains a problem,
and filters are necessary to eliminate unwanted interfer-
Home Plug and Play ence. Other media used include coaxial cable (to carry
frequency-multiplexed TV/digital audio signals and con-
Additions to the application layer of the original CEBus
trol packets, 9.6 kbps), two twisted pair cables (telephone
standards have been made in order to create the HPnP
and general purpose, 9.6 kbps and 64 kbps), radio, and
specification, transforming standalone products into inter-
infrared (1 kbps).
active network products. This specification is expected to
make systems easier to install and combine in a reliable in-
EIBA Technologies
home network. Among the objectives to be covered by HPnP
standards is transport protocol independence, so more than The European Installation Bus Association (EIBA) has
one networking protocol can be used in the same home. assumed the role of the integrator in the European mar-
HPnP has three object types: status, listener, and ket. The EIB system for home and building automation is
request objects, which adapt the system in which the status another topology-free, decentralized system with distrib-
information is given to the other systems. By the use of uted intelligence, based on a CSMA/CA protocol for serial
these objects, products from different producers can be used communication. Currently, various EIBA bus access units
without detailed knowledge of their inner workings. for twisted pair are commercially available. The bus access
An important feature of HPnP is that it enables con- unit includes a transceiver; it locally implements the
sumers to install more complex systems incrementally operating system and caters for user RAM and EEPROM
without complicating their use or requiring burdensome space.
upgrades. EIBAs objectives include the development of a unified
concept for electrical fitting and home and building man-
X.10 agement. EIBA is a multivendor body that aims to establish
a standard for building system technology on the European
Like CEBus, the X.10 specification defines a communica-
market. It makes the EIB system know-how available to
tion language that allows compatible home appliances to
members and licensees, provides members and licensees
talk to each other based on assigned addresses. X.10 is a
with support and documentation, establishes standards
broadcasting protocol. When an X.10 transmitter sends a
among its members, and specifies appropriate criteria for
message, any X.10 receiver plugged into the household
quality and compatibility, with the help of external test
power line tree receives and processes the signal, and
institutes. It also maintains the position of the EIB Tool
responds only if the message carries its address. X.10
Environment (ETE) as an unrivaled platform for open
enables up to 256 devices to be uniquely addressed, while
software tool development, at the heart of which is the
more than one device can be addressed simultaneously if
EIB Tool Software (ETS), offering a common tool for the
they are assigned the same address.
configuration of EIB installations.
EIB components, actuators, and monitoring and control
HBS
devices communicate via a standardized data path or bus,
The Japanese home bus system (HBS) has been developed along which all devices communicate. Little wiring is
as the national standard in Japan for home automation required, which in turn results in lower fire risk and mini-
after several years of research and trials. HBS uses a mized installation effort. Home automation systems pro-
frequency-division-multiplexing system using coaxial vided by Siemens (see www.siemens.de) follow the EIBA
cable. Three bands are used for transmission of control standards and have several desirable features. Siemens
signals: baseband, for high-speed data terminals; sub- Home Electronic System (HES) provides:
band; and, for transmission of visual information, the
FM-TV band. Recent efforts have concentrated on the  Security due to the continuous control of active pro-
expansion of the traditional idea of a home automation cesses around the house at the homeowners fingertips;
system into one that incorporates multimedia capabilities  Economy in the use of utilities such as water, electri-
by using standard telecommunication services, such as city, and heating energy;
ISDN BRI, and controls that provide low noise and low  Convenience through simplifying operation and redu-
distortion. cing the burden of routine tasks; and
 Communication by integrating the household manage-
EHS
ment system into external communications facilities.
The European home systems (EHS) specification has been
developed under European Commission funding under the
IEEE 1394
ESPRIT program. Its aim was to interconnect electrical and
electronic appliances into the home in an open way so that In order to combine entertainment, communication, and
different manufacturers can offer compatible products. An computing electronics in consumer multimedia, digital
EHS product consists of three parts: a modem chip, a interfaces have been created. Such is the case of IEEE
microcontroller, and a power supply. The main power 1394, which was conceived by Apple Computer as a desktop
cabling is used to carry the command and control signals LAN, and then was standardized by the IEEE 1394 working
at a speed of 2.4 kbps. Digital information is carried by a group.
4 HOME AUTOMATION

IEEE 1394 can be described as a low-cost digital inter- and provide both asynchronous and isochronous transmis-
face with the following characteristics: sion.

 High speed. It is able to achieve 100 Mbit/s, 200 Mbit/s, HomePlug


and 400 Mbit/s; extensions are being developed to
The HomePlug Powerline Alliance is a rather newly
advance speeds to 1.6 Mbit/s and 3.2 Mbit/s and
founded nonprofit industry association established to pro-
beyond.
vide a forum for the creation of an open specification for
 Isochronous support. Bandwidth for time-sensitive home powcrlinc networking products and services. The
applications is guaranteed by a deterministic band- HomePlug mission is to promote rapid availability, adop-
width allocation for applications such as real-time tion, and implementation of cost-effective, interoperable,
video feeds, which otherwise could be disrupted by and specifications-based home power networks and pro-
heavy bus traffic. ducts enabling the connected home. Moreover, HomePlug
 Flexible topology. There is no central bus supervision; aims to build a worldwide standard, pursuing frequency
therefore, it is possible to daisy-chain devices. division for coexistence with access technologies in North
 Hot-plug capability. There is no need for the user to America, Europe, and Asia. For medium access control,
configure node IDs or unique termination schemes Homeplug 1.0 extends the algorithm used in IEEE 802.11
when new nodes are added; this action is done dyna- to avoid collisions between frames that have been trans-
mically by the bus itself. mitted by stations (2).
 Cable power. Peripherals of low cost can be powered
directly from the IEEE 1394 cable. HomePNA
 Open standard. The IEEE is a worldwide standards HomePNA is defined by the Home Phoneline Networking
organization. Association in order to promote and standardize technolo-
 Consolidation of ports of PCs. SCSI, audio, serial, and gies for home phone line networking and to ensure compat-
parallel ports are included. ibility between home-networking products.
 There is no need to convert digital data into analog HomePNA takes advantage of existing home phone
data, and loss of data integrity can be tolerated. wiring and enables an immediate market for products
with Networking Inside. Based on IEEE 802.3 framing
 There are no licensing problems.
and Ethernet CSMA/CD media access control (MAC),
 A peer-to-peer interface can be provided. HomePNA v 1.0 is able to provide 1 Mbps mainly for control
and home automation applications, whereas HomePNA
The EIA has selected IEEE 1394 as a point-to-point v2.0 (3), standardized in 2001, provides up to 14 Mbps.
interface for digital TV and a multipoint interface for Future versions promise bandwidths up to 100 Mbp/s.
entertainment systems; the European Digital Video Broad-
casters (DVB) have selected it as their digital television
interface. These organizations proposed IEEE 1394 to the COMMUNICATIONS AND CONTROL MEDIA
Video Experts Standards Association (VESA) as the home
network media of choice. VESA adopted IEEE 1394 as the Several media, individually or in combination, can be used
backbone for its home network standard. in a home automation system. Power line carrier, twisted
pair, coaxial cable, infrared, radio communications, Digital
PLC Subscriber Loop (DSL) technologies, cable modems, and
fiber optics have been proposed and investigated. Each
At the end of 1999, the Consumer Electronics Association medium has a certain number of advantages and disad-
(CEA) formed the Data Networking Subcommittee R7.3, vantages. In this section, we will present some of the most
and began work on a High-speed PowerLine Carrier (PLC) profound features of the media.
standard. PLC technology aims to deliver burst data rates The power line carrier (PLC) or mains has been proposed
up to 20 Mbps over powerline cables. However, like CEBus in several applications. It is the natural medium of choice in
and X10, PLC shares the same power network with motors, load management applications. No special cables need to be
switch-mode power supplies, fluorescent ballasts, and installed because the power line is the bus itself. From one
other impairments, which generate substantial impulse side, the power line medium already has a large number of
and wideband noise. To face this difficult environment, appliances connected to it, but on the other side it is not a
different technologies take widely differing approaches very friendly medium for transmission of communication
depending on the applications they are pursuing. Technol- signals because there is a fluctuation of the power line
ogies and algorithms including orthogonal frequency- impedance and a high noise level on the line. There is
division multiplexing (OFDM), rapid adaptive equalization, also interference with communication caused by other
wideband signaling, Forward Error Correction (FEC), houses. Spread spectrum or ASK techniques have been
segmentation and reassembly (SAR), and a token-passing proposed for efficient modulation of the signal in PLC.
MAC layer are employed over the powerline physical layer Recent advances in twisted pair (TP) transmissions,
technologies in order to enhance transmission robustness, especially in telecommunications and computer network-
increase the required bandwidth, guarantee the quality, ing applications, make it very attractive for applications
that use standard computer interfaces. TP can be the
HOME AUTOMATION 5

generic system for the home system datagram services; if examples of what users will be able to do with products that
new communication technologies reach the home, TP can adhere to the SWAP specification include:
be used for high-bandwidth applications as well. TP can be
easily assembled and installed, and connectors can be  Set up a wireless home network to share voice and data
easily attached to it. among peripherals, PCs, and new devices such as
Coaxial cables have not been extensivelyexcept for the portable, remote display pads.
Japanese marketused in home automation systems.  Review incoming voice, fax, and e-mail messages from
Their high bandwidth and the experience technical people a small cordless telephone handset.
have amassed through the cable systems make them a very  Intelligently forward incoming telephone calls to
attractive medium. Retrofitting them in existing houses is multiple cordless handsets, fax machines, and voice
one of their major disadvantages. mailboxes.
Infrared (IR)that is, electromagnetic radiation with
 Access the Internet from anywhere in and around the
frequencies between 1010 and 1024 Hzhas been used
home from portable display devices.
extensively in remote control applications. Its use in
home automation systems will require line-of-sightthat  Activate other home electronic systems by simply
is, detectors in every single room so that there is a full speaking a command into a cordless handset.
coverage.  Share an ISP connection between PCs and other new
Radio wavesthat is, electromagnetic signals whose devices.
frequency covers the range of 3 kHz to 300 MHzdo not  Share files, modems, and printers in multi-PC homes.
need direct vision between the transmitter and the recei-  Accommodate multiplayer games or toys based on PC
ver, but there is a need for a license and problems with or Internet resources.
interference. Radio-frequency technology is being used for
real-time data management in LANs in order to give free Bluetooth
access to the host system from multiple mobile data input
devices. Wireless home networking technology will The Bluetooth program, backed by Ericsson, IBM, Intel,
operate in the large-bandwidth radio-frequency ranges Nokia, and Toshiba, is already demonstrating prototype
and will use proprietary compression techniques. In the devices that use a two-chip baseband and RF module and
future, consumers might receive e-mail messages hit data rates of 730 kbit/s at 2.4 GHz. Bluetooth uses a
wirelessly from a compliant handheld device or view proprietary MAC that diverges from the IEEE 802.11
enhanced Web content on their connected television standard. Bluetooth has already managed to serve as a
sets. The use of a radio frequency of 2.4 GHz will cut universal low-cost, user-friendly air interface that will
down on noise within the home and provide some replace the plethora of proprietary interconnect cables
security. between a variety of personal devices and peripherals.
Home networking opens up new opportunities for cost- Bluetooth is a short-range (10 cm to 10 m) frequency-
effective phones that include Internet capabilities. By shar- hopping wireless system. There are efforts to extend the
ing resources, manufacturers should be able to reduce the range of Bluetooth with higher-power devices.
cost of an Internet phone by using the processor and modem Bluetooth supports both point-to-point and point-to-
of a connected PC. Currently, a number of major manu- multipoint connections. Currently, up to 7 slave devices
facturers are developing their own wireless home network- can communicate with a master radio in one device. It also
ing products. Two major industry groups, the Home provides for several piconets to be linked together in an ad
Phoneline Networking Alliance (HPNA) and the HomeRF, hoc networking mode, which allows for extremely flexible
are attempting to develop standards for two different configurations such as might be required for meetings and
technology sets. conferences.
The HomeRF Working Group (HRFWG) was formed to The Bluetooth protocol stack architecture is a layered
provide the foundation for a broad range of interoperable stack that supports physical separation between the Link
consumer devices by establishing an open industry speci- Manager and the higher layers at the Host Interface, which
fication for wireless digital communication between PCs is common in most Bluetooth implementations.
and consumer electronic devices anywhere in and around Bluetooth is ideal for both mobile office workers and
the home. HRFWG, which includes the leading companies small office/home office (SOHO) environment as a flexible
from the PC, consumer electronics, peripherals, commu- cable replacement that covers the last meters. For example,
nications, software, and semiconductor industries, has once a voice over internet protocol (VoIP) call is established,
developed a specification for wireless communications in a Bluetooth earphone may automatically switch between
the home called the Shared Wireless Access Protocol cellular and fixed telephone networks, when one enters his
(SWAP). home or office. Of course, the low-bandwidth capability
The specification developed by the HRFWG operates in permits only limited and dedicated usage and inhibits
the 2.4-GHz band and uses relaxed IEEE 802.11 wireless Bluetooth from in-house multimedia networking.
LAN and digital European cordless telephone (DECT)
protocols. It also describes wireless transmission devices IEEE 802.11
and protocols for interconnecting computers, peripherals, IEEE 802.11 is the most mature wireless protocol for
and electronic appliances in a home environment. Some wireless LAN communications, deployed for years in
6 HOME AUTOMATION

corporate, enterprise, private, and public environments the discovery and control of networked devices and ser-
(e.g., hot-spot areas). The IEEE 802.11 standards support vices. UPnP in supported and promoted by the UPnP
several wireless LAN technologies in the unlicensed bands forum. UPnP is led by Microsoft, while some of the major
of 2.4 and 5 GHz, and share use of direct-sequence spread UPnP forum members are HP, Honeywell, Intel, Mitsu-
spectrum (DSSS) and frequency hopping spread spectrum bishi, and Philips. The scope of UPnP is large enough to
(FHSS) physical layer RF technologies. encompass many existing, as well as new and exciting,
Initially, the IEEE 802.11 standard provided up to consumer electronics networking and automation scenar-
2 Mbps at the 2.4-GHz band, without any inherent quality ios including home automation/security, printing and ima-
of service (QoS). The wide acceptance, however, initiated ging, audio/video entertainment, kitchen appliances, and
new versions and enhancements of the specification. The automobile networks.
first and most important is the IEEE 802.11b specification, In order to ensure interoperability between vendor
which achieves data rates of 5.5 and 11 Mbps. Recently, the implementations and gain maximum acceptance in the
IEEE 802.1lg task group has formed a draft standard that existing networked environment, UPnP leverages many
achieves data rates higher than 22 Mbps. In the 5-GHz existing, mature, standard protocols used on the Internet
band, the IEEE 802.1la technology supports data rates up and on LANs like IP, HTTP, and XML.
to 54 Mbps using OFDM schemes. OFDM is very efficient in UPnP enables a device to dynamically join a network,
time-varying environments, where the transmitted radio obtain an IP address, convey its capabilities, and be
signals are reflected from many points, leading to different informed about the presence and capabilities of other
propagation times before they eventually reach the recei- devices. Devices can automatically communicate with
ver. Other 802.11 task groups targeting specific areas of each other directly without any additional configuration.
the protocol are 802.11d, 802.11e, 802.11f, and 802.11h. UPnP can be used over most physical media including
Radio Frequency (RF, wireless), phone line, power line,
HIPERLAN/2 IrDA, Ethernet, and IEEE 1394. In other words, any med-
ium that can be used to network devices together can enable
HIPERLAN/2 is a broadband wireless LAN technology that
UPnP. Moreover, other technologies (e.g., HAVi, CeBus,
operates at rates as high as 54 Mbps in the 5-GHz frequency
orXlO) could be accessed via a UPnP bridge or proxy,
band. HIPERLAN/2 is a European proposition supported
providing for complete coverage.
by the European Telecommunications Standards Institute
UPnP vendors, UPnP Forum Working Committees, and
(ETSI) and developed by the Broadband Radio Access Net-
the UPnP Device Architecture layers define the highest-
works (BRAN) team. HIPERLAN/2 is designed in a flexible
layer protocols used to implement UPnP. Based on the
way so as to be able to connect with 3G mobile networks, IP
device architecture specification, the working committees
networks, and ATM networks. It can be also used as a
define information global to specific device types such as
private wireless LAN network. A basic characteristic of this
VCRs, HVAC systems, dishwashers, and other appliances.
protocol is its ability to support multimedia traffic i.e., data,
UPnP device vendors define the data specific to their
voice, and video providing quality of service. The physical
devices such as the model name, URL, and so on.
layer uses OFDM, a technique that is efficient in the
transmission of analog signals in a noisy environment.
DSL and Cable Modems
The MAC protocol uses a dynamic TDMA/TDD scheme
with centralized control. Digital subscriber line (DSL) is a modem technology
that increases the digital speed of ordinary telephone lines
Universal Serial Bus (USB) by a substantial factor over common V.34 (33,600 bps)
modems. DSL modems may provide symmetrical or asym-
As most PCs today have at least 2 USB ports, accessible
metrical operation. Asymmetrical operation provides
from outside the case, connecting new USB devices is a very
faster downstream speeds and is suited for Internet usage
simple Plug-n-Play process. Moreover, USB is able to cover
and video on demand, where the heaviest transmission
limited power requirements of the devices, in many cases
requirement is from the provider to the customer.
eliminating the need for additional power cables. USB 1.1
DSL has taken over the home network market. Chip sets
provides both asynchronous data transfer and isochronous
will combine home networking with V.90 and ADSL modem
streaming channels for audio/video streams, voice tele-
connectivity into one system that uses existing in-home
phony, and multimedia applications, and bandwidth up
telephone wiring to connect multiple PCs and peripherals
to 12 Mbps adequate even for compressed video distribu-
at a speed higher than 1 Mbps.
tion. USB v2.0 transfers rates up to 460480 Mbps, about
A cable modem is another option that should be con-
40 times faster than vl.l, covering more demanding con-
sidered in home network installations. Cable modem ser-
sumer electronic devices such as digital cameras and DVD
vice is more widely available and significantly less
drives. USB may not dominate in the Consumer Electronics
expensive than DSL in some countries. Cable modems
Networks in the short term, but it will certainly be among
allow much faster Internet access than dial-up connec-
the major players.
tions. As coaxial cable provides much greater bandwidth
than telephone lines, a cable modem allows downstream
Universal Plug-and-Play (UPnP)
data transfer speeds up to 3 Mbps. This high speed,
UPnP aims to extend the simplicity and auto-configuration combined with the fact that millions of homes are already
features from device PnP to the entire network, enabling wired for cable TV, has made the cable modem one of the
HOME AUTOMATION 7

top broadband contenders. The advent of cable modems  Multiple data channels and a single, digital control
also promises many new digital services to the home, channel.
including video on demand, Internet telephony and video-
conferencing, and interactive shopping and games. The network should meet the following physical require-
At first glance, xDSL (i.e., DSL in one of the available ments:
varieties) appears to be the frontrunner in the race between
cable modems and DSL. After all, it can use the phone wire  Low installation costs and ease of installation;
that is already in place in almost every home and business.  High reliability;
Cable modems require a television cable system,which is  Easy attachment of new devices;
also in many homes and businesses but does not have
nearly the same penetration as basic telephone service.
 No interruption of service while a new node is being
One important advantage that cable modem providers do connected; and
have is a captive audience. All cable modem subscribers go  Access to the network via taps in each room.
through the same machine room in their local area to get
Internet access. The FOBus standard should also have a layered archi-
In contrast to cable modem service, xDSLs flexibility tecture in which layers above the physical layer are iden-
and multi vendor support is making it look like a better tical to the corresponding CEBus layers in other media.
choice for IT departments that want to hook up telecom- Some of the applications of a fiber optic network in the
muters and home offices, as well as for extranet applica- home that will drive the design of the fiber optic home
tions. Any ISP will be able to resell xDSL connections, and network are: the connection to emerging all-fiber networks,
those connections are open to some competition because of which will provide high-quality, high-bandwidth audio/
the Telecommunications Act of 1996. The competitive visual/data services for entertainment and information;
multi-vendor environment has led to a brisk commodity fiber network connection to all-fiber telephone networks
market for xDSL equipment and has made it a particularly to allow extended telephone services such as ISDN, video-
attractive and low-cost pipe. Although new services are telephone, and telecommuting; transport of high-quality
sure to be spawned by all that bandwidth, xDSL providers audio/video between high-bandwidth consumer devices
are able to depend on the guaranteed captive audience of such as TVs and VCRs; and transport of control and data
their cable modem counterparts. signals for a high degree of home automation and
integration.
Fiber Optics
Fiber optics at home have also been evaluated in the SECURITY
literature. The well-known advantages of fiber, such as
increased bandwidth, immunity to electromagnetic noise, Security (the need to prevent unauthorized nodes from
security from wiretaps, and ease of installation, compete reading or writing information) is an issue of concern for
with its disadvantages, such as higher cost, difficulty in every networking product. Many manufacturers have
splicing, and requirement of an alternate power supply. A decided to create a security context on their products and
standard for a fiber optic CEBus (FOBus) has been have the key information on them, which means that one
developed. object of one context sends a message to another context
One of the major drives behind the use of fiber optics is object, and thus both have to be built by the same company
the ability to carry multimedia traffic in an efficient way. so that the security encoding algorithm can be exchanged
As telecommunication companies are planning to bring between them.
fiber to the home, a fiber optic network in the house will Security in the home automation systems literature is
make the Internet working with places outside the house seen as follows:
cost effective and convenient. Connection with multimedia
libraries or with other places offering multimedia services  Security in terms of physical access control and alarm
will be easily accomplished to the benefits of the house systems.
occupants, especially students of any age who will be able to  Security in terms of the well being of house inhabitants
access, and possibly download and manage, these vast pools through systems that monitor health status and
of information. prevent health problems.
Several minimum requirements of a FOBus are set  Security of the building itself in terms of a safe con-
forth. In terms of service, the FOBus should provide the struction and the subsequent monitoring of this status.
following services:  Security in terms of confidentiality of the information
exchanged.
 Voice, audio, interactive, bulk data, facsimile, and
video; The latter is being achieved by the use of various security
 One-way, two-way, and broadcast connectivity; techniques in use, including message authentication algo-
 Transport of continuous and bursty traffic; rithms, which are of two main types. Two-way authentica-
 Interfaces to external networks and consumer tion algorithms require the nodes involved in the checking
products; and to know the encoding algorithm, and each node must have
an authentication key in order to accept the command
8 HOME AUTOMATION

issued. A one-way authentication algorithm verifies only telephone service (POTS) as well as extended network
the transmitter and the information that goes on the services. Initially, the service to the home will be provided
APDTU (packet in the application layer); it requires only on copper medium, but it will eventually be replaced with
one authentication key, but the encoding algorithm must be fiber as well. The FITL system will support broadband
known by the nodes. Both types of algorithm require a communications, especially interactive applications.
random number that is encoded with the authentication Another external network that will impact the FOBus
keys. design is the cable television network, which is also gra-
Encryption is also used in order to obtain greater secur- dually being replaced by fiber. The FOBus specification will
ity in the message and in the data sent on the APDU. The have to accommodate the high-bandwidth services deliv-
algorithm or technique used has to be known by the receiver ered by the cable network (generally in the form of broad-
and transmitter. Encryption is implemented with the help cast channels); it may also have to support interactive
of the authentication algorithm ID in the second byte. services that are envisioned for the future.
The other developing technology that will impact the
design of the fiber optic CEBus is the emerging advanced
FUTURE DIRECTION
television (ATV) standard, which will most likely include
HDTV. In the United States, the EIA is examining digital
Home automation systems have been presented as a pro-
standards for HDTV transmission. Most require band-
mising technology for bringing the computer and commu-
width of 20 Mbps, which the proponents of the standards
nications revolution that has swept the office and industrial
claim can be transmitted on a standard 6-MHz channel
environments in the last decade to the home environment.
using modulation techniques such as quadrature ampli-
However, we have not seen an use of home automation
tude multiplexing. In addition, the ATV receiver will likely
systems and an increase in the market share as predicted
have separate input ports for RF, baseband digital, and
from market analysts. This lack of acceptance can be
baseband analog signals. The choice of which of these ports
attributed to marketing problems, costs of installation
to use for the CEBus/ATV interface has not been made. Each
and retrofitting, slow growth of new housing, and a lack
has its own advantages. Using the RF port would allow a
of standards that synchronize with the developments in the
very simple design for the in-home fiber distribution net-
other technological areas.
work, and the interface would only have to perform optical-
The wide availability of powerful computers at homes
to-electrical conversion. The digital port would remove band-
and the availability of high-speed telecommunications lines
width constrictions from the broadcast signal and also allow
(in the form of cable TV, satellite channels, and, in the near
for interactive programming and access to programming
future, fiber) make a redirection of the home automation
from various sources. The ATV could become the service
industry necessary. More emphasis should be on applica-
access point for all audio/visual services in the home.
tions that require access to external sources of informa-
An important issue in home automation is the integra-
tionsuch as video-on-demand and the Internetor on
tion of Internet technologies in the house. Several compa-
access from outside the home to home servicessuch as the
nies have proposed technologies to embed network
load management application discussed above from utili-
connectivity. The idea is to provide more control and mon-
ties or individuals and remote surveillance.
itoring capability by the use of a Web browser as a user
User-friendly customer interfaces combined with rea-
interface. In this new technology, Java and http (standard
sonable pricing will certainly move the industry ahead. The
Internet technologies) are accessed through a gateway that
availability of the Internet and the World Wide Web should
manages the communication between the Web browser and
be exploited in different ways. First, the interfaces and the
the device.
click-and-drag operations could be adopted and then the
Among the advantages of this new technology are the
high use of bandwidth could be accomplished. The above
following:
considerations should be viewed in light of cost and retro-
fitting issues in existing dwellings and the availability of  Manufacturers can provide their products with strong
appliances that are compatible with standards and that can
networking capabilities, and increase the power of the
be purchased from multiple vendors.
Internet and the available intranets.
Wireless technologies seem to dominate the future of
home automation systems. With regard to the future of
 The use of a graphical user interface (GUI) allows a
fiber optics at home, several observations can be made. simple display of the status, presence, and absence of
External or non premises service providing networks, and devices from the network.
second-generation television, receivers such as high-defi-  Java, Visual Basic, and Active X development envir-
nition television (HDTV) are two main areas in which onments reduce the development time of device net-
developing technologies will impact the design of the working projects.
FOBus. One external network that the FOBus will have  Interface development is easy.
to accommodate is the public telephone network. The cur-  Batch processes to gather data are easy and fast.
rent public switched network uses copper wire in its local
loop to provide service to a neighborhood; but in the future, Standard technologies to network devices via the
the use of fiber in the loop (FITL) will be gradually phased Internet provide for the development of internetworking
in. Neighborhood curbside boxes will be replaced with solutions without the added time and costs of building
optical network units (ONUs) that will provide plain old
HOME AUTOMATION 9

proprietary connections and interfaces for electronic C. Douligeris, Intelligent home systems, IEEE Commun. Mag.
devices. (Special Issue on Intelligent Buildings: From Materials to Multi-
Manufacturers of home automation systems must media), 31(10): 5261, 1993.
take into account several factors. The users are the first M. Friedewald, O. Da Costa, Y. Punie, P. Alahuhta, and S.
to be considered. Their physiological and psychological Heinonen, Perspectives of ambient intelligence in the home envir-
capabilities as well as their socioeconomic characteris- onment, Telematics and Informatics. New York: Elsevier, 2005.
tics must be considered before a new technology is C. Khawand, C. Douligeris, and J. Khawand, Common application
adopted. language and its integration into a home automation system, IEEE
Trans. Consum. Electron., 37(2): pp. 157163, 1991.
Another issue is the added value provided by such
J. Khawand, C. Douligeris, and C. Khawand, A physical layer
systems in terms of the reduction of repetitive tasks and
implementation for a twisted pair home automation system;
the skills and knowledge required to operate them. Health
IEEE Trans. Consum. Electron., 38(3): 530536, 1992.
and safety considerations must be taken into account. Also,
B. Rose, Home networks: A standards perspective, IEEE Commun.
one needs to examine the current status of technologies and
Mag., 7885, 2001.
the dynamics of these technologies in order to offer a
N. Srikanthan, F. Tan, and A. Karande, Bluetooth based home
successful product in the market and, mainly, in order to
automation system, Microprocessors Microsyst., 26: 281289,
create a new healthy market sector. 2002.
The suggested technologies should be able to enhance
N. C. Stolzoff, E. Shih, and A. Venkatesh, The home of the future:
the life in a household but certainly not dominate it. The An ethnographic study of new information technologies in the
systems should be reliable and controllable but also adap- home, Project Noah, University of California at Irvine.
tive to specific user needs and habits. They should also be T. Tamura, T. Togawa, M. Ogawa, and M. Yuda, Fully automated
able to adapt to changing habits. health monitoring system in the home, Med. Eng. Phys., 20:
573579, 1998.
BIBLIOGRAPHY J. Tidd, Development of novel products through intraorganiza-
tional and interorganizational networks: The case of home auto-
mation, J. Product Innovation Manag., 12: 307322, 1995.
1. Draft CEBUS FO network requirements document, Washington
DC: EIA, May 15, 1992. T. B. Zahariadis, Home Networking: Technologies and Standards.
Norwood, MA: Artech House, 2003.
2. HomePlug 1.0 Specification, HomePlug Alliance, June 2001.
T. Zahariadis, K. Pramataris, and N. Zervos, A comparison of
3. Interface Specification for HomePNA 2.0: 10M8 technology,
competing broadband in-home technologies, IEE Electron. Commun.
December 1999.
Eng. J. (ECEJ), 14 (4): 133142, 2002.

CHRISTOS DOULIGERIS
FURTHER READING University of Piraeus
Piraeus, Greece
The EIA/CEG Home Automation Standard, Electronics Industries
Association, Wahsington, DC, Dec. 1989.
C. Douligeris, C. Khawand, and J. Khawand, Network layer
design issues in a home automation system; Int. J. Commun.
Sys., 9: 105113, 1996.
10 HOME AUTOMATION
H
HOME COMPUTING SERVICES household related, but they require integration of home and
business technologies. A key trend observed during the
INTRODUCTION past decade has been the convergence of technologies, of
content, and of applications.
Relevance of the Topic
Structure of this Article
The 1990s and the current decade have experienced tre-
mendous growth in computers and telecommunications, Although understanding the technological advances in
and, for the first time, developments in technologies in this area is important, much of the technology is derived
the home followed in close proximity to their correlates from corporate computing applications and adopted for
in the corporate world. Notably, the diffusion of the Inter- home use. Thus, this article will focus on content and usage
net into the private sector has proceeded at enormous of home computing more so than on technical details.
pace. Not only has the number of households with Internet This article explores key issues pertaining to home
access skyrocketed, but also access speed, number of users computing products and services. In particular, it will
within the household, types of uses, and mobility of access discuss convergence of technology and other current tech-
have expanded. nological trends related to end-user devices and network-
In some cases, corporate use of technologies followed ing. Selected services for the home will be addressed in light
private home use (e.g., for Instant Messenger and other of technological changes.
chat applications). Popular private applications such as As the technology becomes more available and common,
music and video downloads initially required access to large concepts such as computerized homes, Home-IT, infor-
corporate or academic networks because of capacity needs. mation society, or networked society are increasingly
Such applications encouraged the increasing diffusion of defined by the services with which they are associated.
broadband into private homes. The article concludes with future Home-IT trends.
Home and business technologies are increasingly inter-
twined because of the increasingly rapid pace of innovation.
DRIVERS OF TECHNOLOGY ADOPTION
Also, home information technology (IT) may experience
IN THE PRIVATE HOME
growth during times of economic slowdown because of price
decline or network effects (DVD; Internet in the early
Convergence
1990s; wireless today).
Although convergence is a predominant trend, a market Convergence of technologies has a critical impact on home
for private IT applications separate from the corporate computing as well as information and entertainment.
market is evolving as well. Price decline and miniaturiza- Although analog technologies generally coincided with a
tion encourage the perspective of ubiquitous computing limited one-on-one relationship of applications and appli-
and of a networked society. ances, digital technologies have made it possible to per-
form multiple functions with the same piece of equipment,
Definitions which has lead to an increasing overlap between the
telecommunications, television, and consumer electronics
A range of concepts have evolved that permit the con-
industries. For the user, it means that the same appliance
ceptual separation of business/public computing services
can be used for work-at-home, chat, childrens entertain-
from those related to the home or private use. One defini-
ment, and online shopping or banking. Apart from techno-
tion points to all the infrastructures and applications the
logical innovation and cooperation among industry sectors,
private user can take advantage of for private uses. This
adoption of interactive media consumption patterns by
definition encompasses most applications discussed in
the users is the third dimension of convergence. There is
this article, notably entertainment, information, commu-
a continuing debate as to how rapidly convergence will be
nication, and shopping. Some other applications cross over
embraced by consumers. Although it has been technically
into the public or business realm, in particular telework
feasible for some time, convergence is seen as limited
and distance learning. Although this article focuses on
because of demographics, lifestyle preferences, and other
services in the home, more recently miniaturization and
factors (1). For instance, the convergence of television (TV)
mobile technologies have blurred the line between home
and computers on the user side has not advanced as rapidly
and other locations. Mobile phones, personal digital assis-
as expected, even though streaming video of television
tants (PDAs), personal entertainment technologies all are
programming is available on the Internet, cable systems
designed to extend applications that are conveniently avail-
offer Digital Cable, and cell phones have cameras that
able in the home to any location the user chooses.
permit instant e-mailing of pictures. Most Americans still
Home computing trends revolve around various house-
watch television one program at a time, even though many
hold functionalities, notably entertainment, information,
rely increasingly on the Internet for news, weather, stock
purchasing, education, work, and health. During an age of
market, and other information.
networks, these applications are often no longer merely

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 HOME COMPUTING SERVICES

However, at least on the supply side, convergence is By contrast, TV sets last for decades, they are easy to use,
gradually advancing. Responding to digital satellite not prone to viruses, and are less expensive.
competition, cable companies have enhanced the existing Worldwide, TV consumption is still the prevalent leisure
fiber/coax physical plant of their systems with digital set- activity, mainly because of its universal, low-cost accessi-
top boxes and digital distribution technology. These bility and its ability to afford hours of entertainment and
upgrades permit greater channel capacity, as well as inter- information with minimal effort. Although usage patterns
active features. On-screen program guides, several dozen are changing rapidly, for some time consumers may con-
pay-pv-view (PPV) channels as well as multiplexed tinue to choose TV for news and entertainment and PC for
premium cable channels and digital music channels are other sources of information and electronic commerce.
common. Digital picture, flat-screen technology, surround Also, there seems to be a demographic pattern in that
sound, and high-definition television (HDTV) encourage young viewers increasingly stray away from conventional
the trend toward home theaters. In a typical digital cable TV news either to Internet news or entertainment/news
offering interactivity is limited to two levels of information, programs (e.g., Comedy Central). Although it is a digital
which can be retrieved while watching a program or technology, the tremendously rapid adoption of the DVD
perusing the on-screen program guide; PPV ordering, as player is largely a replacement for VHS home video with
well as selection, programming, and recording of future higher video quality.
programs through the on-screen guide are also inter- Although the expectation was that video delivery would
active features. The systems are designed to allow for increasingly involve home computing devices, such as com-
future expansion, especially online ordering of services bination PC-TV or Web-TV and digital recording technol-
as well as other purchases. Some systems offer Video on ogy such as TiVo (5), most households invest in big-screen
Demand (VoD), in which users can order movies and other televisions and surround sound. TiVo was also adopted
videos from a large selection in a real-time setting. The more slowly than expected.
more common in-demand offerings simulate a near-VoD A third popular user interface is the telephone. As a
experience, in which the most popular movies are available result of their rapid replacement cycle compared with
at half-hour starting times. regular-line phones, cellular phones in particular tend to
Several providers experiment with interactive applica- be equipped with the latest technological gadgets. As prime
tions that give the viewer options beyond simply choosing a value is placed on instant 24/7 communication, mobile
program, including game show participation, choice of technology epitomizes trends in personal technology. As a
camera angles at sports games, access to background infor- result of simple use, ubiquity, and compatibility with
mation for products advertised in commercials, and choice existing technology (i.e., the existing telephone network),
of plot lines and endings in movies. Other interactive uses of adoption and upgrading of mobile phones are rapid.
TV are calling up additional information on news and Besides regular voice use, text messaging has gained
sports or TV/PC multitasking. Increasingly, TV and radio popularity among younger users, especially in Europe
are supplemented by websites for information retrieval as and Japan. Currently, web access is available via narrow-
well as audience feedback and service applications (such as band channels. However, the next generation of mobile
buying tickets or merchandise). broadband is currently being deployed. In concert with
In the consumer electronics sector, convergence is cur- smartphones and wireless PDAs, broadband mobile net-
rently taking place both from computer companies and works (e.g., those based on the UMTS (Universal Mobile
from home entertainment companies. Microsoft has devel- Telecommunications System) standard) provide multi-
oped a media player that allows integration of video, audio, media services such as videophone or content streaming.
photos, and even TV content, and Intel is making a sig- The first rollout in Asia started in 2003. Pricing and com-
nificant investment in companies creating digital consumer pelling services are again key to success.
products (2). On the other hand, Sharp is planning to debut
liquid crystal display (LCD) TVs with PC card slots that Interactive Entertainment
enable the addition of digital-video recording functions or
Content is the key to adoption of advanced interactive
a wireless connection to a home computer network (3).
services. As a result of the high visibility of movies, the
great public interest in this type of content, and their easy
User Interface: TV, PC, Phone
availability, Movies-on-Demand was the offering of choice
Much discussion of Home-IT focuses on the Internet. Inno- for early interactive trials. Meanwhile, cable systems and
vations associated with traditional media also offer con- satellite providers offer near PPV with 50100 channels
siderable potential, in part because all electronic media offering current movies as well as specialized (e.g., adult)
are evolving rapidly, converging with other media, and programming and sports or music events.
becoming increasingly interactive. These hybrid media Music, sports, and special interest programming also
often reach the majority of the population (in some coun- have received their share of attention by the programmers
tries, a vast majority) that lacks regular, adequate Internet of interactive cable systems. Interactive game channels are
access (4, 5). Also, in spite of improvements in user friend- added to some systems. In-home gambling has strong
liness, many users see the PC as work-related, difficult to economic appeal; regulatory barriers prevail, however.
use (requires typing), and prone to breakdowns and Anecdotal evidence suggests that participants in interac-
viruses. PCs also tend to be outdated within a few years. tive trials enjoyed watching regular TV programs they
HOME COMPUTING SERVICES 3

missed during the week, newscasts tailored to individual might expect that demographic trends will drive such
preferences (6), as well as erotica. adoption: Aging baby boomers have an increased need
Several television providers have experimented with for home-based conveniences and efficiencies; young
interactive applications that give the viewer options home buyers have grown up with network technologies
beyond simply choosing a program, including participation and may expect a high level of technology in their
in game shows such as Wheel of Fortune and Jeopardy, future homes. Also, elderly family members need in-
pick-the-play games for Monday Night Football, ordering creased attention, which may be facilitated via available
pizza using Web-TV during a Star Trek marathon, access to technologies.
background information for products advertised in com- However, services to be delivered to the home not only
mercials, and choice of plot lines and endings in movies. require in-home technologies. Service providers such as
Compared with the massive number of traditional banks or media firms need to prepare back-end infra-
movies available, interactive movies are few and far structures such as fault-tolerant servers, load-balancing
between. They are difficult to produce and require consid- access pipes, and real-time databases with information
erable technology. Even most sites for Internet video pro- on availability or price quotes. Those out-of-home infra-
vide mainly repackaged conventional programming. structures are connected to the home via networks such as
Audience demand for interactivity is not yet understood. cable, telephone, powerline, or wireless connections.
Many children and teens feel comfortable with it because of
exposure to video and computer games; in fact, a consider-
SERVICES FOR THE HOME
able number of toys now include interactive components
and interface with the world wide web (WWW) (7). Most
Media attention has been focused on innovative infra-
likely the push for greater interactivity will come from
structures for the residential area such as wireless LAN
advertising, which already relies on cross-promotion
in the home or broadband connections to the Internet.
between different media including TV and Internet. As
However, the private household, even more than a
the marketing increasingly focuses on individualization,
corporate user, is interested in the application side (i.e.,
the ability to provide targeted advertising even within the
an easy-to-use, reasonably-priced, and fun service provi-
same program is likely to have great appeal to advertisers.
sion). Many applications exist in reality, yet they provide a
Also, because commercial avoidance is increasingly com-
quite unstructured picture.
mon, the push for product placement within programs may
Kolbe (11) proposed a classification scheme for ana-
also lead to increasingly individualized product inserts.
lyzing and describing the respective classes of home appli-
Broadcast television stations are expanding their
cations in existence. According to Brenner and Kolbe (12),
channel offerings as a result of conversion to HDTV and
there are eight main services for the private household
the resulting availability of greater channel capacity.
that can be supported by IT (see Fig. 1):
However, the expectation is that they will, at least initially,
The basic services information and communication
offer greater selection and targeting rather than actual
take mutual advantage of each other: There is no com-
interactivity.
munication possible without at least basic information
provided on one end, sometimes referred to as message
The Digital Home
or content. In turn, information needs to be conveyed in
The ultimate interactive experience may involve a home order to provide any benefit. For example, any news story
that is equipped with technology that can respond to the posted by an Internet portal is meant as communicating
residents needs. Smart house technology typically is devel-
oped for high-end or special needs homes, and these tech-
nologies filter down into existing and mid-level homes.
Some smart-house solutions for the elderly use the TV Core services:
set as an interface for appliance control and surveillance. Information
A key feature of future smart-house technology is the
ability of various appliances to talk to the Internet and Communication
to each other (8), which allows a maximum of control by the
user, as well as coordination of technologies. In the long
run, shifting control onto the Web could generate consider- Home services:
able cost savings by reducing the complexity of the technol- Health
ogy within each device.
Especially home networking technologies such as the Home services
European EIBus or the US-led CEBus enable the inter- Travel
connection of different household devices such as heating,
shades, or lighting. In addition, wireless local area net- Transactions
works (LANs) are gaining ground in the private sphere, Entertainment
connecting IT devices. Eventually, audio/video, PC, and
other household networks will converge (9,10) . Education
Although many such technologies are available, they
have not been adopted on a broad scale. However, one Figure 1. IT-influenced services for of the private household.
4 HOME COMPUTING SERVICES

information to the (anonymous or personalized) users of like sports or stock exchange news as examined by
that portal. MITs Media Lab.
They are referred to as core services whereas the other  Electronic books and newspapers such as the electro-
ones are looked on as primary home services because they nic version of the New York, Times, which is available
are based on information and communication features. online for a fraction of the newsstand price. Electronic
Nevertheless, communication and information are books with portable e-book players are one of the most
described separately as some services exclusively provide notable examples for pure information. Encyclopedias,
bilateral or multilateral information (e.g., electronic books, magazines, dictionaries, or special topics are available
news) or communication (e.g., e-mail, short message service on different formats for proprietary players. Hyperlink
(SMS)) benefits. Market revenues are most substantial functionality, connectivity to video printers, and find-
in those basic areas. and-select algorithms are advantages that traditional
Miles (13) and others (10) after him observed that more books do not share.
and more aspects of private life are affected by home  Push services of events and product news: Mobile
services. We can differentiate three forms of usage accord- marketing is gaining ground fast. The latest research
ing to the degree of networking. Prior to widespread in Finland shows that 23% of all mobile-phone-using
networking, stand-alone applications such as an electronic Finns (80% of all Finns) have received SMS push
encyclopedia or a game on a PC were common. The next step marketing (14).
is locally interconnected applications within the confines of
 Information kiosks, which provide basic information
the private home such as entertainment networks for
for travelers or shoppers.
home cinema applications or controlling the heating via
TV or PC. The third form is the out-of-the-home connected
Communication. Communication enables the private
applications such as applications using the Internet for
household to establish bilateral or multilateral contact
e-mail or shopping as well as remote monitoring services.
with the immediate or extended environment. This core
All services can be structured a long these three areas.
service provides information as the basis for a variety of
In practice, these types of services are used in conjunc-
further services. However, communication as a basic need
tion with each other, for example, during activities on
of users is evident in the residential home. Traditional
the Internet the household seeks weather information
media like telephone and fax have been complemented
(information and travel) for air travel via a portal or a price
by innovative media such as e-mail or mobile communica-
comparison for airfares (travel), then executes the
tions, both text and voice.
purchase (transactions) using a travel portal and then
SMS has achieved near 80% usage rates in some
pays online using a credit card (transactions), and finally
European countries, and SMS advertising has exploded.
gets an e-mail or mobile message confirmation of this
Mobile text messages generate a substantial part of telecom
order (communication). Another example is the Info- or
operators revenue. In Europe, SMS revenues were at 12
Edutainment area that unites information, entertain-
billion Euros for 2002 (15).
ment, and education aspects (e.g., in interactive multime-
Mobile phone users in the United Kingdom sent over one
dia encyclopedias or electronic learning toys for children).
billion text messages during April 2002. The Mobile Data
Work, transaction, and private aspects of life are con-
Association predicts that the total number of text messages
verging as are technologies and applications. In some
for 2002 will reach 16 billion by the end of the year (16).
instances, private and business usage is almost indistin-
guishable (e.g., the use of an Internet portal or some smart
phone features). Therefore, some of the services described Home Services
below may also provide business value as selective busi- Health. Health refers to all applications concerned with
ness applications benefit the private user, especially in a making provision for, maintaining, and monitoring the
home office environment. health of a person or social group.
Related services in the area are:
Core Services
Information. Information is offered by all services in
 Telemedicine with patient monitoring (surveillance
which the dissemination of information to the private of vital signs outside the hospital setting) and mon-
household is central. Information provides the basis for itoring of dosage (including real-time adjustment
more complex service types to be discussed later. based on the patients response). Wireless sensors
The following residential applications fall into this can be attached to the body and send signals to
category: measurement equipment. They are popular in
countries with widely dispersed populations (e.g.,
 News portals providing up-to-date coverage such as Norway) and increasingly developing countries.
news or weather information. Together with search  Electronic fitness devices that support training and
capabilities, they provide access to the vast resources wellness of the private user.
of the Internet to the private user. Interactive TV and  Health-related websites.
multimedia broadband networks are prerequisites for
customized individual news services that compile ones Health applications for todays household are very
own newspaper on personal preferences and interests limited in its range. In some countries, smart cards carry
HOME COMPUTING SERVICES 5

patients data for billing and insurance companies or The main applications of administration, e-banking,
health consultancy software for private diagnosis and and e-shopping are applications serving traditional
information about certain diseases. In the future, expert functions (17). Those services help the home to fulfill
systems will enable medical advice from each home without necessary administrative obligations with more efficiency
leaving the private bed. and ease.
Using the PC and Internet connection, the private user
Home Services. Home services consist of systems that can perform his bank business or order certain merchan-
support home security, safety, meal preparation, heating, dise. Todays services (e.g., management of payments) will
cooling, lighting, and laundry. extend to a broader range (e.g., complete investment and
Currently, home services comprise only special devices mortgage affairs).
such as those in a networked kitchen. Future scenarios Of particular importance are the following transaction-
project comprehensive home automation with intercon- oriented services:
nected kitchen appliances, audio and video electronics,
and other systems like heating or laundry. Some proto-  Electronic execution of administrative activities such
types by the German company Miele (called Miele @ home) as monitoring the households budget with spread-
showed early in the development of smart homes that sheets or planning software such as Quicken.
the TV can control the washing machine. The intercon-  Using personal information management (PIM) soft-
nection to out-of-home cable TV or telephone networks ware such as scheduling, personal address book, or
leads to the remote control services (e.g., security). Much task lists, often provided in combination with PDAs
media attention was received by the Internet refrigerator or smart phone software.
by NCR, which orders needed groceries without human  Deployment of productivity tools such as word proces-
interaction. sing, presentations, or spreadsheets for private letters,
Key areas comprise: invitations, or planning purposes.
 Electronic banking and investing is the main service
 Central control of heating or air conditioning from
in this category. Although the focus is still on well-
home computer or TV.
structured transactions such as payments (e.g., elec-
 Lighting, shutters, and temperature control. tronic bill presentment and payment (EBPP)), more
 Remote monitoring of home devices for security, laun- complex tasks such as investment advice and research
dry, refrigeration, or cooking. is delivered to private banking clients.
In Switzerland, more than 50% of all private bank-
Intelligent clothing and wearable computing are seen as ing clients use the Internet for banking. Overall, 13%
emerging areas. of all brokerage transactions and 26% of all payments
are done via e-banking. Financial information is also
Travel. Travel includes all applications that support the accessed by the households. The big Swiss bank, UBS,
selection, preparation, and undertaking of journeys. Travel lists prices of more than 370,000 stocks. Alerts can be
applications make the central booking information systems sent to a mobile device. Some banks offer mobile bank-
for hotel or flight reservation accessible to the residential ing services that resemble the features of the Internet
user. Individual preferences provide a search pattern for offering.
finding the places of interest. Future visions includes inter-  Shopping on the Internet has become an important
active, multimedia booking from the TV chair via broad- service. Although purchases focus on standardized
band network with instant acknowledgements. products, everything from furniture to groceries is
Main focus areas are: available. The percentage of online purchases relative
to total shopping revenue remains at moderate levels
 Travel planning on the Internet ranges from planning but is gradually increasing. The 2003 Christmas
the entire trip via travel portals Travelocity or Expedia season experienced a strong increase in Internet
to selected information on public transportation or sales: 18 billion (out of 217.4 billion total sales), up
plane departures. These travel data can also be pushed from 13.8 billion in the last quarter of 2002. More
to mobile devices or delivered according to the geo- importantly, many retailers have offered a seamless
graphic position of the user. shopping experience of catalogs, Internet, and stores
 Automotive services. Increasingly, the car becomes (18). Especially auctions like eBay have received
an entertainment and information center with com- much attention from the private user: Amazon.com,
plete audio and video system. In addition, global a Fortune 500 company based in Seattle, opened its
positioning functionality helps planning and under- virtual doors on the World Wide Web in July 1995.
taking trips. Amazon.com and other sellers list millions of unique
 Ticketless travel, such as e-ticket of airlines and new and used items in categories such as apparel and
ticketless boarding with contactless smart cards. accessories, sporting goods, electronics, computers,
kitchenware and housewares, books, music, DVDs,
Transactions. Transactions combine all the administra- videos, cameras and photo items, toys, baby items
tive services and transactions, such as shopping and bank- and baby registry, software, computer and video
ing, of the private household. games, cell phones and service, tools and hardware,
6 HOME COMPUTING SERVICES

Type of Service area Status quo Scenario 2007 Scenario 2010


service 2004

CORE Information Electronic Fully electronic Electronic


SERVICES books, news newspaper newspaper on e-
portals based on paper
personalized
profile

Communication Home-fax and E-mail from Worldwide


mobile digital every mobile multimedia video
telephone device communications

HOME Health Consultancy Interactive, Medicinal


SERVICES software remote health diagnostics at
services home by expert
systems

Home services Only special Increased home All household


interconnected automation via equipment
household standard networked to in-
technologies, no interfaces, and out-of-home
standards, entertainment devices, the
remote and home wired home
monitoring services
converge

Travel Travel portals, Intelligent Automatic driving


complete guiding services services, fully
journey booking for cars, telematic
from home, location-based information for
GPS services services, the car
Internet access
in cars

Transactions Home shopping Multimedia Virtual electronic


over the Internet home shopping shopping mall
Integration of also for complex
clicks and products
bricks

Home-banking Home-banking Multimedia


for selected for all activities banking,
transactions cybercash

Entertainment One way pay- Pay-per-view, Fully


TV, interactivity limited number communicative
via telephone of services TV (personal
lines influence on
action) and
Video-on-
demand

Education Computer Distant Individual virtual


Based Training multimedia teachers using
software or learning at artificial
Internet home, public intelligence and
offerings electronic virtual reality
libraries simulations

Figure 2. The evolution of home computing services.

travel services, magazine subscriptions, and outdoor  Home cinema with digital surround audio and home
living items. media server that connect flat plasma or LCD-TVs,
audio systems, and multimedia PC environments with
Entertainment. Entertainment includes those applica- the Internet. In 2003, U.S. DVD sales surpassed video-
tions that can be used for leisure activities or for the tape figures for the first time.
purpose of entertaining household members.  On-demand digital TV with hundreds of channels of
Particular areas of entertainment services are: audio and video content.
HOME COMPUTING SERVICES 7

 Games and gambling both via the Internet and mobile 2. Computer companies muscle into field of consumer electronics
networks and in electronic stand-alone devices such as Providence Sunday Journal, January 11, 2004, 15.
game boys and gambling machines. 3. Consumer electronics show is packed with Jetson-style
gadgets Providence Journal, January 10, 2004, B1,8.
 Digital toys such as Sonys smart dog or Legos
4. F. Cairncross, The Death of Distance, Boston, MA: Harvard
Mindstorms programmable brick sets developed in
Business School Press, 1997.
collaboration with MITs MediaLab. Here, a close rela-
tionship to the learning component is evident. 5. E. Schonfeld, Dont just sit there, do something. E-company,
2000, pp. 155164.
 Using multimedia devices such as digital video cam-
6. Time Warner is pulling the plug on a visionary foray into
eras or digital photography in combination with home Interactive TV, Providence Journal, May 11, 1997, A17.
PCs and video authoring software for creating multi-
7. N. Lockwood Tooher, The next big thing: Interactivity, Provi-
media shows at home. dence Journal, February 14, 2000, A1, 7.
 Free and premium Internet radio with endless options 8. S. Levy, The new digital galaxy, Newsweek, May 31, 1999,5763.
of genres and downloadable music on portable devices 9. B. Lee, Personal Technology, in Red Herring, 119, 5657, 2002.
such as MP3 players or smartphones.
10. A. Higgins, Jetsons, Here we come!, in Machine Design, 75 (7):
 Adult content. 5253, 2003.
11. L. Kolbe, Informationstechnik fur den privaten Haushalt
Education. Education refers to all applications that (Information Technology for the Private Household), Heidel-
train and educate members of the household in special berg: Physica, 1997.
skills or knowledge. In an increasingly dynamic private 12. W. Brenner and L. Kolbe, Information processing in the
environment, this function will gain in importance. private household, in Telemat. Informat.12 (2): 97110, 1995.
Distance Learning (DL) is frequently a self-selected 13. I. Miles, Home Informatics, Information Technology and the
activity for students with work and family commitments. Transformation of Everyday Life, London, 1988.
Effects of social isolation should thus be limited. For 14. A. T. Kearney, Cambridge business school mobile commerce
instance, DL can facilitate daycare arrangements. In study 2002. Available: http://www.atkearney.com/main.
some circumstances, exclusion from the social network of taf?p=1,5,1,106. Jan. 10. 2004.
the face-to-face classroom can be one of the drawbacks 15. Economist 2001: Looking for the pot of gold, in Economist,
of DL (21). The private household uses this type of Special supplement: The Internet, untethered, October 13,
education for the training of special skills it is inter- 2001, 1114.
ested in using off-line computer-based training (CBT) soft- 16. O. Juptner, Over five billion text messages sent in UK. Avail-
ware on CD-ROM or DVD to improve, for example, on a able: http://www.e-gateway.net/infoarea/news/news.cfm?nid=
foreign language for the next holiday abroad or naval rules 2415. January 9, 2003.
in order to pass the sailing exam. In addition, electronic 17. Jupiter Communications Company, Consumer Information
accessible libraries and content on the Internet open the Appliance, 5 (2): 223, 1994.
field for self-education processes to the private area. The 18. P. Grimaldi, Net Retailers have season of success. Providence
usage artificial intelligence will substitute human teachers Journal, December 27, 2003, B1, 2.
as far as possible and make them more efficient for special 19. J. Lee, An end-user perspective on file-sharing systems, in
tasks. Virtual reality will help by visualization and demon- Communications of the ACM, 46 (2): 4953, 2003.
stration of complex issues. Increasingly, colleges and uni- 20. Mundorf, Distance learning and mobility, in IFMO, Institut fur
versities offer DL classes based on strong demand from Mobilitatsforschung Auswirkungen der virtuellen Mobilitat
traditional and nontraditional students. Besides the added (Effects of virtual mobility), 2004, pp. 257272.
flexibility and benefit for students who are reluctant to 21. N. Dholakia, N. Mundorf, R. R. Dholakia, and J. J. Xiao,
speak up in class, DL benefits those students living far from Interactions of transportation and telecommunications
the place of instruction. Dholakia et al. (22) found behaviors, University of Rhode Island Transportation Center
that DL has the potential to reduce or modify student Research Report 536111.
commutes.

FURTHER READING
OUTLOOK
N. Mundorf and P. Zoche, Nutzer, private Haushalte und Infor-
Figure 2 summarizesthehomeservicesandshowssomeofthe mationstechnik, in P. Zoche (ed.), Herausforderungen fur die
expected developments for the next several years. It sum- Informationstechnik, Heidelberg 1994, pp. 6169.
marizes three possible scenarios (status quo 2004, scenario A. Reinhardt, Building the data highway, in Byte International
2007, and scenario 2010) based on the assessment of past, Edition, March 1994, pp. 4674.
current, and future trends, and developments of services. F. Van Rijn and R. Williams, Concerning home telematics, Proc.
IFIP TC 9, 1988.

BIBLIOGRAPHY NORBERT MUNDORF


University of Rhode Island
1. H. Stipp, Should TV marry PC? American Demographics, Kingston, Rhode Island
July 1998, pp. 1621. LUTZ KOLBE
R
REMOTE SENSING INFORMATION example is the restoration of images from the Hubble Space
PROCESSING Telescope.
Image segmentation attempts to define the regions
INTRODUCTION and boundaries of the regions. Techniques are developed
that preserve the edges and smooth out the individual
With the rapid advance of sensors for remote sensing, regions. Image segmentation may involve pixel-by-pixel
including radar, microwave, multispectral, hyperspectral, classification, which often requires using pixels of known
infrared sensors, and so on the amount of data available classification for training. Segmentation may also involve
has increased dramatically from which detailed or specific region growing, which is essentially unsupervised. A good
information must be extracted. Information processing, example is to extract precisely the lake region of Lake
which makes extensive use of powerful computers and Mulargias on the island of Sardinia in Italy (10). The
techniques in computer science and engineering, has played original image is shown in Fig. 1a. The segmentation result
a key role in remote sensing. In this article, we will review is shown in Fig.1b, for which the exact size of the lake can
some major topics on information processing, including be determined. For land-based remote sensing images,
image processing and segmentation, pattern recognition pixel-by-pixel classification allows us to determine pre-
and neural networks, data and information fusion, cisely the area covered by each crop and to assess the
knowledge-based system, image mining, image compres- changes from one month to the next during the growing
sion, and so on. References (15) provide some useful refer- season. Similarly, flood damage can be determined from
ences on information processing in remote sensing. the satellite images. These examples are among the many
In remote sensing, the large amount of data makes it applications of image segmentation.
necessary to perform some type of transforms that pre-
serve the essential information while considerably redu-
PATTERN RECOGNITION AND NEURAL NETWORKS
cing the amount of data. In fact, most remote sensing image
data are redundant, correlated, and noisy. Transform
A major topic in pattern recognition is feature extraction.
methods can help in three ways: by effective data repre-
An excellent discussion of feature extraction and selection
sentation, effective feature extraction, and effective image
problem in remote sensing with multispectral and hyper-
compression. Component analysis is key to transform
spectral images is given by Landgrebe (5). In remote
methods. Both principal component analysis and inde-
sensing, features are usually taken from the measure-
pendent component analysis will be examined for remote
ments of spectral bands, which this means 6 to 8 features
sensing.
in multispectral data, but a feature vector dimension of
several hundred in hyperspectral image data. With a lim-
IMAGE PROCESSING AND IMAGE SEGMENTATION ited number of training samples, increasing the feature
dimension in hyperspectral images may actually degrade
The motivation to enhance the noisy images sent back the classification performance, which is referred to as the
from satellites in the early 1960s has had significant Hughes phenomenon. Reference (5) presents procedures to
impact on subsequent progress in digital image proces- reduce such phenomena. Neural networks have found
sing. For example, digital filtering such as Wiener filter- many uses in remote sensing, especially with pattern clas-
ing allows us to restore the original image from its noisy sification. The back-propagation trained network, the
versions. Some new image processing, such as wavelet radial basis function network, and the support vector
transforms and morphological methods, have been useful machine are the three best-performing neural networks
in remote sensing images. One important activity in for classification. A good discussion on statistical and
remote sensing is the speckle reduction of SAR (synthetic neural network methods in remote sensing classification
aperture radar) images. Speckles appearing in SAR is contained in Ref. 11 as well as many other articles that
images is caused by the coherent interference of waves appear in Refs. 3, 4, and 12. A major advantage of neural
reflected from many elementary scatters. The statistics networks is that learning is from the training data only,
of SAR speckle has been well studied (6). Over a 100 and no assumption of the data model such as probability
articles have been published on techniques to remove density is required. Also, it has been found that combin-
the speckles. One of the most well-known techniques ing two neural network classifiers such as combining
is the Lees filter, which makes use of the local statistics SOM, the self-organizing map, with a radial basis function
(7). More recent studies of the subject are reported in network can achieve better classification than either one
Refs. 8 and 9. used alone (13).
Image restoration in remote sensing is required to One problem that is fairly unique and significant to
remove the effects of atmospheric and other interference, remote sensing image recognition is the use of contextual
as well as the noises presented by the sensors. A good information in pattern recognition. In remote sensing

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 REMOTE SENSING INFORMATION PROCESSING

Figure 1. Original image of Lake


Mulargias region in Italy (A) and
the result of region growing to
extract the lake area (B).

image data, there is a large amount of contextual infor- semantic interpretation. For image compression of hyper-
mation that must be used to improve the classification. spectral images, Qian et al. (21) provide a survey of major
The usual procedure for contextual pattern recognition is approaches including vector quantization, discrete cosine
to work with image models that exploit the contextual transform and wavelet transform, and so on. A more com-
dependence. Markov random field models are the most prehensive survey of remote sensing image compression is
popular, and with only a slightly increased amount of provided by Aiazzi et al.(22). Besides its important cap-
computation, classification performance can be improved ability in image compression, wavelet transform has a
with the use of such models (2,4,12). major application in de-noising SAR images (23). The
Another pattern recognition topic is the change detec- wavelet analysis of SAR images can also be used for
tion. The chapters by Serpico and Bruzzone (14) and Moser near-real-time quick look screening of satellite data,
et al.(15) are recommended reading. data reduction, and edge linking (24).

DATA FUSION AND KNOWLEDGE-BASED SYSTEMS COMPONENT ANALYSIS

In remote sensing, there are often data from several sensors Transform methods are often employed in remote sens-
or sources. There is no optimum or well-accepted approach ing. A key to the transform methods is the component
to the problem. Approaches can range from more theoretic, analysis, which, in general, is the subspace analysis. In
like consensus theory (16), to fuzzy logic, neural networks, remote sensing, component analysis includes the principal
multistrategy learning to fairly ad hoc techniques in some component analysis (PCA), curvilinear component analysis
knowledge-based system to combine or merge information (CCA), and independent component analysis (ICA). The
from different sources. In some cases, fusion at decision three component analysis methods are different concep-
level can be more effective than fusion at data or feature tually. PCA is to look for the principal components accord-
level, but the other way can be true in other cases. Readers ing to the second-order statistics. CCA performs nonlinear
are referred to chapters by Solaiman (17), Benediktsson feature space transformation while trying to preserve as
and Kanellopoulos (18), and Binaghi et al. (19) for detailed much as possible the original data information in the
discussion. lower-dimensional space see Ref. 25. ICA looks for
independent components from the original data assumed
to be linearly mixed from several independent sources.
IMAGE MINING, IMAGE COMPRESSION,
Nonlinear PCA that makes use of the higher-order statis-
AND WAVELET ANALYSIS
tical information (26) can provide an improvement over the
linear PCA that employs only the second-order covariance
To extract certain desired information from a large remote
information.
sensing image database, we have the problem of data
ICA is a useful extension of the traditional PCA.
mining. For remote sensing images, Aksoy et al. (20) des-
Whereas PCA attempts to decorrelate the components in
cribe a probabilistic visual grammar to automatically
a vector, ICA methods are to make the components as
analyze complex query scenarios using spatial relation-
independent as possible. There are currently many
ships of regions, and to use it for content-based image
approaches available for ICA (27). ICA applications in
retrieval and classification. Their hierarchical scene mod-
remote sensing study have become a new topic in recent
eling bridges the gap between feature extraction and
REMOTE SENSING INFORMATION PROCESSING 3

years. S. Chiang et al. employed ICA in AVIRIS (airborne


visible infrared imaging spectrometer) data analysis (28).
T. Tu used a noise-adjusted version of fast independent
component analysis (NAFICA) for unsupervised signature
extraction and separation in hyperspectral images (29).
With remote sensing in mind, we developed a new (ICA)
method that makes use of the higher-order statistics The
work is quite different from that of Cardoso (30). We name it
the joint cumulant ICA (JC-ICA) algorithm (31,32). It can
be implemented efficiently by a neural network. Experi-
mental evidence (31) shows that, for the SAR image pixel
classification, a small subset of ICA features perform a few
percentage points better than the use of original data or
PCA as features. The significant component images
obtained by ICA have less speckle noise and are more
informative. Furthermore, for hyperspectral images, ICA
can be useful for selecting or reconfiguring spectral bands
so that the desired objects in the images may be enhanced
(32). Figures. 2 and 3 show, respectively, an original
AVIRIS image and the enhanced image using the JC-
ICA approach. The latter has more desired details.

CONCLUSION
Figure 3. Enhanced image using JC-ICA.
In this article, an overview is presented of a number of
topics and issues on information processing for remote
sensing. One common theme is the effective use of comput-
ing power to extract the desired information from the large BIBLIOGRAPHY
amount of data. The progress in computer science and
engineering certainly presents many new and improved 1. J. A. Richard and X. Jin, Remote sensing digital image analy-
procedures for information processing in remote sensing. sis, 3rd ed., New York: Springer, 1991.
2. R. A. Schowengerdt, Remote sensing: Models and methods for
image processing, New York: Academic Press, 1977.
3. C. H. Chen (ed.), Information processing for remote sensing,
Singapore: World Scientific Publishing, 1999.
4. C. H. Chen (ed.), Frontiers of remote sensing information
processing, Singapore, World Scientific Publishing, 2003.
5. D. Landgrebe, Signal theory methods in multispectral remote
sensing, New York: Wiley, 2003.
6. J. S. Lee, et al., Speckle filtering of synthetic aperture radar
images: a review, Remote Sens. Rev., 8: 313340, 1994.
7. J. S. Lee, Digital image enhancement and noise filtering by use
of local statistics, IEEE Trans. Pattern Anal. Machine Intell.,
2(2): 165168, 1980.
8. J. S. Lee, Speckle suppression and analysis for synthetic
aperture radar images, Op. Eng.,25(5): 636643, 1996.
9. J. S. Lee and M. Grunes, Polarimetric SAR speckle filtering and
terrain classification-an overview, in C. H. Chen (ed.), Infor-
mation processing for remote sensing, Singapore: World Scien-
tific Publishing, 1999.
10. P. Ho and C. H. Chen, On the ARMA model based region
growing method for extracting lake region in a remote sensing
image, SPIE Proc., Sept. 2003.
11. J. A. Benediktsson, On statistical and neural network pattern
recognition methods for remote sensing applications, in C. H.
Chen et al. (eds.), Handbook of Pattern Recognition and
Compter Vision, 2nd ed., (ed.) Singapore: World Scientific
Publishing, 1999.
12. E. Binaghi, P. Brivio, and S. B. Serpico, (eds.), Geospatial
Figure 2. An AVIRIS image of Moffett field.
Pattern Recognition, Research Signpost, 2002.
4 REMOTE SENSING INFORMATION PROCESSING

13. C. H. Chen and B. Sherestha, Classification of multi-source 23. H. Xie, et al., Wavelet-based SAR speckle filters, Chapter 8 in
remote sensing images using self-organizing feature map and C. H. Chen (ed.), Frontiers of remote sensing information
radial basis function networks, Proc. of IGARSS 2000. processing, Singapore, World Scientific Publishing, 2003.
14. S. B. Serpico and L. Bruzzone, Change detection, in C. H. Chen 24. A. Liu, et al., Wavelet analysis of satellite images in ocean
(ed.), Information processing for remote sensing, Singapore: applications, Chapter 7 in C. H. Chen (ed.), Frontiers of remote
World Scientific Publishing, 1999. sensing information processing, Singapore, World Scientific
15. G. Moser, F. Melgani and S. B. Serpico, Advances in unsuper- Publishing, 2003.
vised change detection, Chapter 18 in C. H. Chen (ed.), 25. M. Lennon, G. Mercier, and M. C. Mouchot, Curvilinear com-
Frontiers of remote sensing information processing, Singapore: ponent analysis for nonlinear dimensionality reduction of
World Scientific Publishing, 2003. hyperspectral images, SPIE Remote Sensing Symposium Con-
16. J. A. Benediktsson and P. H. Swain, Consensus theoretic ference 4541, Image and Signal Processing for Remote Sensing
classification methods, IEEE Trans. Syst. Man Cybernet., VII, Toulouse, France, 2001.
22(4): 688704, 1992. 26. E. Oja, The nonlinear PCA learning rule in independent com-
17. B. Solaiman, Information fusion for multispectral image ponent analysis, Neurocomputing, 17(1): 1997.
classificatin post processing, in C. H. Chen (ed.), Information 27. A. Hyvarinen, J. Karhunen, and E. Oja, Independent Compo-
processing for remote sensing, Singapore: World Scientific nent Analysis, New York: Wiley, 2001.
Publishing, 1999. 28. S. Chiang, et al., Unsupervised hyperspectral image analysis
18. J. A. Benediktsson and I. Kanellopoulos, Information extrac- using independent component analysis, Proc. of IGARSS 2000,
tion based on multisensor data fusion and neural networks, in Hawaii, 2000.
C. H. Chen (ed.), Information processing for remote sensing, 29. T. Tu, Unsupervised signature extraction and separation in
Singapore: World Scientific Publishing, 1999. hyperspectral images: A noise-adjusted fast independent com-
19. E. Binaghi, et al., Approximate reasoning and multistrategy ponent analysis approach, Opt. Eng., 39: 2000.
learning for multisource remote sensing daa interpretation, in 30. J. Cardoso, High-order contrasts for independent component
C. H. Chen (ed.), Information processing for remote sensing, analysis, Neural Comput., 11: 157192, 1999.
Singapore: World Scientific Publishing, 1999.
31. X. Zhang and C. H. Chen, A new independent component
20. S. Aksoy, et al., Scene modeling and image mining with a visual analysis (ICA) method and its application to remote sensing
grammar, Chapter 3 in C. H. Chen (ed.), Frontiers of remote images, J. VLSI Signal Proc., 37 (2/3): 2004.
sensing information processing, Singapore, World Scientific
32. X. Zhang and C. H. Chen, On a new independent component
Publishing, 2003.
analysis (ICA) method using higher order statistics with
21. S. Qian and A. B. Hollinger, Lossy data compression of application to remote sensing image, Opt. Eng., July 2002.
3-dimensional hyperspectral imagery, in C. H. Chen (ed.),
Information processing for remote sensing, Singapore: World
Scientific Publishing, 1999. C. H. CHEN
22. B. Aiazzi, et al., Near-lossless compression of remote-sensing University of Massachusetts,
data, Chapter 23 in C. H. Chen (ed.), Frontiers of remote Dartmouth
sensing information processing, Singapore, World Scientific North Dartmouth, Massachusetts
Publishing, 2003.
T
TRANSACTION PROCESSING As wireless computing leads to situations where machines
and data no longer have fixed locations in the network,
A business transaction is an interaction in the real world, distributed transactions will be difficult to coordinate, and
usually between an enterprise and a person, in which data consistency will be difficult to maintain. In this article,
something, such as money, products, or information, is we will also briefly discuss the problems and possible solu-
exchanged (1). It is often called a computer-based transac- tions in mobile transaction processing.
tion, or simply a transaction, when some or the whole of the This paper is organized as follows. First, we will intro-
work is done by computers. Similar to the traditional duce traditional database TP, including concurrency con-
computer programs, a transaction program includes func- trol and recovery in centralized database TP. The next
tions of input and output and routines for performing section covers the topics on distributed TP. Then, we dis-
requested work. A transaction can be issued interactively cuss advanced TP and define an advanced transaction
by users through a Structured Query Language (SQL) or model and a correctness criterion. Mobile TP is also pre-
some sort of forms. A transaction can also be embedded in sented. Finally, future research directions are included.
the application program written in a high-level language
such as C, Pascal, or COBOL.
DATABASE TRANSACTION PROCESSING
A transaction processing (TP) system is a computer
system that processes the transaction programs. A collec-
As database systems are the earlier form of TP systems, we
tion of such transaction programs designed to perform the
will start with database TP.
functions necessary to automate given business activities is
often called an application program (application software).
Databases Transactions
Figure 1 shows a transaction processing system. The trans-
action programs are submitted to clients, and the requests A database system refers to a database and the access
will be scheduled by the transaction processing monitor and facilities (DBMS) to the database. One important job of
then processed by the servers. A TP monitor is a piece of DBMSs is to control and coordinate the execution of con-
software that connects multiple clients to multiple servers current database transactions.
to access multiple data resources (databases) in TP sys- A database is a collection of related data items that
tems. One objective of the TP monitor is to optimize the use satisfy a set of integrity constraints. The database should
of system and network resources when clients and servers reflect the relevant state as a snapshot of the part of the real
execute on different processors. world it models. It is natural to assume that the states of the
TP is closely associated with database systems. In fact, database are constrained to represent the legal (permissi-
most earlier TP systems, such as banking and airlines ble) states of the world. The set of intintegrity constraints
reservation systems, are database systems, in which such as functional dependencies, referential integrity,
data resources are organized into databases and TP is inclusion, exclusion constraints, and some other user-
supported by database management systems (DBMSs). defined constraints are identified in the process of informa-
In traditional database systems, transactions are usually tion analysis of the application domain. These constraints
simple and independent, and they are characterized as represent real-world conditions or restrictions (7). For
short duration in that they will be finished within minutes example, functional dependencies specify some constraints
(probably seconds). Traditional transaction systems have between two sets of attributes in a relation schema,
some limitations for many advanced applications such as whereas referential integrity constraints specify con-
cooperative work, in which transactions need to cooperate straints between two sets of attributes from different rela-
with each other. For example, in cooperative environments, tions. For detailed definitions and discussions on various
several designers might work on the same project. Each constraints, we refer readers to Refs. 7 and 8. Here, we
designer starts up a cooperative transaction. Those coop- illustrate only a few constraints with a simple example.
erative transactions jointly form a transaction group. Coop- Suppose that a relational database schema has the
erative transactions in the same transaction group may following two table structures for Employee and Depart-
read or update each others uncommitted (unfinished) data. ment with attributes like Name and SSN:
Therefore, cooperative transactions may be interdepen-
dent. Currently, some research work on advanced TP Employee (Name, SSN, Bdate, Address, Dnumber)
has been conducted in several related areas such as com- Department (Dname, Dnumber, Dlocation).
puter-supported cooperative work (CSCW) and groupware,
workflow, and advanced transaction models (26). In this Name employee name
article, we will first discuss traditional transaction concepts SSN social security number
and then examine some advanced transaction models.
Bdate birth date
Because of recent developments in laptop or notebook
computers and low-cost wireless digital communication, Address living address
mobile computing began to emerge in many applications. Dnumber department number

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 TRANSACTION PROCESSING

T
T

Monitor


T
Figure 1. TP monitor between cli-
ents Data resources and data
resources. Transactions Clients Servers Data resources

Dname department name a read-only transaction. The goal of query processing is


Dlocation department location extracting information from a large amount of data to assist
a decision-making process. A transaction is a piece of
Each employee has a unique social security number (SSN) programming that manipulates the database by a sequence
that can be used to identify the employee. For each SSN of read and write operations.
value in the Employee table, there will be only one asso-
ciated value for Bdate, Address, and Dnumber in the table,
respectively. In this case, there are functional dependen- read(X) or R(X), which transfers the data item X from the
cies from SSN to Bdate, Address, Dnumber. If any Dnum- database to a local buffer of the transaction
ber value in the Employee relation has the same Dnumber write(X) or W(X), which transfers the data item X from
value in the Department relation, there will be a referential the local buffer of the transaction back to the data-
integrity constraint from Employees Dnumber to Depart- base
ments Dnumber.
A database is said to be consistent if it satisfies a set of In addition to read and write operations, a transaction
integrity constraints. It is assumed that the initial state of starts with a start (or begin) operation and ends with a
the database is consistent. As an empty database always commit operation when the transaction succeeds or an
satisfies all constraints, often it is assumed that the initial abort when the transaction fails to finish. The following
state is an empty database. It is obvious that a database example shows a transaction transferring funds between
system is not responsible for possible discrepancies two bank accounts (start and end operations are omitted).
between a state of the real world and the corresponding
state of the database if the existing constraints were inade-
quately identified in the process of information analysis.
The values of data items can be queried or modified by a set
of application programs or transactions. As the states of the T1 T2 Tn-1 Tn Transactions
database corresponding to the states of the real world are
consistent, a transaction can be regarded as a transforma-
tion of a database from one consistent state to another
consistent state. Users access to a database is facilitated Transaction manager
by the software system called a DBMS, which provides
services for maintaining consistency, integrity, and secur- DBMS
Transaction scheduler
ity of the database. Figure 2 illustrates a simplified data- recovery manager
base system. The transaction scheduler provides functions
for transaction concurrency control, and the recovery man-
ager is for transaction recovery in the presence of failures,
which will be discussed in the next section.
The fundamental purpose of the DBMS is to carry out Database
queries and transactions. A query is an expression, in a
suitable language, that determines a portion of the data
contained in the database (9). A query is considered as Figure 2. Database system and DBMS.
TRANSACTION PROCESSING 3

Example 1. Bank transfer transaction. executed concurrently, the DBMS must ensure the
consistency of the database.
readX  Isolation is the property that an incomplete transac-
X ! X 100 tion cannot reveal its results to other transactions
writeX before its commitment, which is the requirement for
readY avoiding the problem of cascading abort (i.e., the
Y ! Y  100 necessity to abort all the transactions that have
writeY observed the partial results of a transaction that
was later aborted).
Here, X and Y stand for the balances of savings and
credit accounts of a customer, respectively. This transac-
 Durability means that once a transaction has been
tion transfers some money ($100) from the savings account committed, all the changes made by this transaction
to the credit account. It is an atomic unit of database work. must not be lost even in the presence of system failures.
That is, all these operations must be treated as a single unit.
Many database systems support multiple user accesses The ACID properties are also defined in RM-ODP
or transactions to the database. When multiple transac- (Reference Model of Open Distributed Processing) (12).
tions execute concurrently, their operations are inter- ODP is a standardization in a joint effort of the Interna-
leaved. Operations from one transaction may be executed tional Standardization Organization (ISO) and Interna-
between operations of other transactions. This interleaving tional Telecommunication Union (ITU), which describes
may cause inconsistencies in a database, even though the systems that support heterogeneous distributed processing
individual transactions satisfy the specified integrity con- both within and between organizations through the use of a
straints. One such example is the lost update phenomenon. common interaction model.
Consistency and isolation properties are taken care of by
Example 2. For the lost update phenomenon, assume the concurrency control mechanisms, whereas the main-
that two transactions, crediting and debiting the same tenance of atomicity and durability are covered by the
bank account, are executed at the same time without any recovery services provided in transaction management.
control. The data item being modified is the account bal- Therefore, concurrency control and recovery are the most
ance. The transactions read the balance, calculate a new important tasks for transaction management in a database
balance based on the relevant customer operation, and system.
write the new balance to the file. If the execution of the
two transactions interleaves in the following pattern (sup- Concurrency Control and Serializability
posing the initial balance of the account is $1500), the The ACID properties can be trivially achieved by the
customer will suffer a loss: sequential execution of transactions, which, however, is
not a practical solution because it severely damages system
Debit Transaction Credit Transaction performance. Usually, a database system is operating in
a multiprogramming, multiuser environment, and the
read balance ($1500) read balance ($1500)
transactions are expected to be executed in the database
withdraw ($1000) deposit ($500)
system concurrently. In this section, the concepts of
balance : $1500  $1000 balance : $1500 $500
Write balance ($500) Write balance ($2000) transaction concurrency control, the schedule of transac-
tions, and the correctness criterion used in concurrency
control are discussed.
The final account balance is $500 instead of $1000. A database system must monitor and control the con-
Obviously, these two transactions have produced an incon- current executions of transactions so that overall correct-
sistent state of the database because they were allowed to ness and database consistency are maintained. One of the
operate on the same data item and neither of them was primary tasks of the DBMS is to allow several users to
completed before another. In other words, neither of these interact with the database simultaneously, giving users the
transactions was treated as an atomic unit in the execution. illusion that the database is exclusively for their own use
Traditionally, transactions are expected to satisfy the fol- (13). This feat is accomplished through a concurrency con-
lowing four conditions, known as ACID properties (911): trol mechanism.
Without a concurrency control mechanism, numerous
 Atomicity is also referred to as the all-or-nothing prop- problems can occur: the lost update (illustrated earlier in an
erty. It requires that either all or none of the transac- example), the temporary update (or the uncommitted
tions operations are performed. Atomicity requires dependency), and the incorrect summary problems
that if a transaction fails to commit, its partial results (7,14). The unwanted results may vary from annoying to
cannot remain in the database. disastrous in the critical applications. Example 3 shows a
 Consistency requires a transaction to be correct. In problem of temporary updates where a transaction TB
other words, if a transaction is executed alone, it takes updates a data item f1 but fails before completion. The
the database from one consistent state to another. value of f1 updated by TB has been read by another transac-
When all the members of a set of transactions are tion TA.
4 TRANSACTION PROCESSING

Example 3. Consider an airline reservation database the same order in two different schedules, the two sche-
system for customers booking flights. Suppose that a trans- dules are conflict equivalent.
action A attempts to book a ticket on flight F1 and on flight
F2 and that a transaction B attempts to cancel a booking on Definition 2. Two operations are in conflict if
flight f1 and to book a ticket on flight F3.
Let f1, f2, and f3 be the variables for the seat numbers 1. they come from different transactions and
that have been booked on flights F1, F2, and F3, respec- 2. they both operate on the same data item and at least
tively. Assume that transaction B has been aborted for one of them is a write operation.
some reason so that the scenario of execution is as follows:
Definition 3. Two schedules S1 and S2 are conflict
equivalent if for any pair of transactions Ti and Tj in
Transaction A Transaction B
both schedules and any two conflicting operations
R[f1] R[f1] Oi p 2 Ti and O jq 2 T j , when the execution order Oip pre-
f1 f1 1 f1 f1  1 cedes Ojq in one schedule, say S1, the same execution order
W[f1] W[f1] must exist in the other schedule, S2.
R[f2] R[f3]
f2 f2 1 f3 f3 1
W[f2] W[f3]
Definition 4. A schedule is conflict serializable if it
Commit transaction A Abort transaction B is conflict equivalent to a serial schedule. A schedule
is view serializable if it is view equivalent to a serial
schedule.
It is obvious that both transactions are individually A conflict serializable schedule is also view serializable
correct if they are executed in a serial order (i.e., one but not vice versa because definition of view serializability
commits before another). However, the interleaving of accepts a schedule that may not necessarily be conflict
the two transactions shown here causes a serious problem serializable. There is no efficient mechanism to test sche-
in that the seat on fight F1 canceled by transaction B may be dules for view serializability. It was proven that checking
the last seat available and transaction A books it before for view serializability is an NP-complete problem (17). In
transaction B aborts, which results in one seat being booked practice, the conflict serializability is easier to implement in
by two clients. the database systems because the serialization order of a
Therefore, a database system must control the interac- set of transactions can be determined by their conflicting
tion among the concurrent transactions to ensure the over- operations in a serializable schedule.
all consistency of the database. The execution sequence of The conflict serializability can be verified through a
operations from a set of transactions is called a sche- conflict graph. The conflict graph among transactions is
dule(15,16). A schedule indicates the interleaved order in constructed as follows: For each transaction Ti, there is a
which the operations of transactions were executed. If the node in the graph (we also name the node Ti). For any pair of
operations of transactions are not interleaved (i.e., the conflicting operations (oi, oj), where oi from Ti and oj from Tj,
executions of transactions are ordered one after another) respectively, and oi comes before oj, add an arc from Ti to Tj
in a schedule, the schedule is said to be serial. As we in the conflict graph.
mentioned earlier, the serial execution of a set of correct Examples 4 and 5 present schedules and their conflict
transactions preserves the consistency of the database. As graphs.
serial execution does not support concurrency, the equiva-
lent schedule has been developed and applied for compar- Example 4. A nonserializable schedule is shown here. Its
isons of a schedule with a serial schedule, such as view conflict graph is shown in Fig. 3.
equivalence and conflict equivalence of schedules. In gen-
eral, two schedules are equivalent if they have the same set
of operations producing the same effects in the database
(15).

Definition 1. Two schedules S1, S2 are view equivalent if

1. for any transaction Ti, the data items read by Ti in


both schedules are the same; and
2. for each data item x, the latest value of x is written by T1 T3
the same transaction in both schedules S1 and S2.

Condition 1 ensures that each transaction reads the


same values in both schedules, and
Condition 2 ensures that both schedules result in the T2
same final systems.
In conflict equivalence, only the order of conflict opera-
tions needs to be checked. If the conflict operations follow Figure 3. Conflict graph 1 (with a cycle).
TRANSACTION PROCESSING 5

Schedule T1 T2 T3
Intuitively, if a conflict graph is acyclic, the transactions
of the corresponding schedule can be topologically sorted
read(A) read(A) such that conflict operations are consistent with this order,
read(B) read(B) and therefore equivalent to a serial execution in this order.
A A1 A A1
A cyclic graph implies that no such order exists. The
read(C) read(C)
B B2 B B2
schedule in Example 4 is not serializable because there
write(B) write(B) is cycle in the conflict graph; however, the schedule in
C C3 C C3 Example 5 is serializable. The serialization order of a set
write(C) write(C) of transactions can be determined by their conflicting
write(A) write(A) operations in a serializable schedule.
read(B) read(B) In order to produce conflict serializable schedules, many
read(A) read(A) concurrency control algorithms have been developed such
A A4 A A4 as two-phase locking, timestamp ordering, and optimistic
read(C) read(C) concurrency control.
write(A) write(A)
C C5 C C5
write(C) write(C)
The Common Concurrency Control Approaches
B 6B B 6B Maintaining consistent states in a database requires such
write(B) write(B) techniques as semantic integrity control, transaction con-
currency control, and recovery. Semantic integrity control
ensures database consistency by rejecting update programs
Example 5. A serializable schedule is shown here. Its that violate the integrity constraints of the database, which
conflict graph is shown in Fig. 4. is done by specifying the constraints during the database
design. Then the DBMS checks the consistency during
transaction executions. Transaction concurrency control
Schedule T1 T2 T3
monitors the concurrent executions of programs so that
read(A) read(A) the interleaved changes to data items still preserve the
A A1 A A1 database consistency. Recovery of a database system
read(C) read(C) ensures that the system can cope with various failures in
write(A write(A) the system and recover the database to a consistent state.
C C5 C C5
A number of concurrency control algorithms have been
read(B) read(B)
write(C) write(C)
proposed for the DBMSs. The most fundamental algo-
read(A) read(A) rithms are two-phase locking (18,19), timestamp ordering
read(C) read(C) (20,21), optimistic concurrency control (22), and serializa-
B B2 B B2 tion graph testing (23,24).
write(B) write(B) Two-phase locking (2PL) is one of the most popular
C 3C C 3C concurrency control algorithms based on the locking tech-
read(B) read(B) nique. The main idea of locking is that each data item must
write(C) write(C) be locked before a transaction accesses it (i.e., if conflicting
A A4 A A4 operations exist, only one of them can access the data at a
write(A) write(A)
time, and the other must wait until the previous operation
B 6B B 6B
write(B) write(B)
has been completed and the lock has been released). A
transaction may involve accesses to many data items.
The rule of 2PL states that all locks of the data items
The following theorem shows how to check the serial- needed by a transaction should be acquired before a lock
izability of a schedule. is released. In other words, a transaction should not release
a lock until it is certain that it will not request any more
Theorem 1. A schedule is conflict serializable if and only locks. Thus, each transaction has two phases: an expanding
if its conflict graph is acyclic (15). phase during which new locks on data items can be acquired
but none can be released and a shrinking phase in which the
transaction releases locks and no new locks are required.
The 2PL algorithm is a very secure way to ensure that
T1 T3 the order of any two transactions is compatible with the
order of their conflicting operations. More precisely, if
oi p 2 Ti precedes o jq 2 T j in the schedule and oip is in conflict
with ojq, then all other conflicting operations of Ti, Tj must
have the same order of precedence. The 2PL algorithms
guarantee the conflict serializability of a schedule for con-
T2 current transactions. However, 2PL algorithms may lead to
deadlocks when a set of transactions wait for each other in a
circular way. For example, two transactions T1 and T2 both
Figure 4. Conflict graph 2 (without cycle).
6 TRANSACTION PROCESSING

write data items a and b. T1 holds a lock on a and waits for a the transaction manager, it first adds a node for Ti in the
lock on b, whereas T2 holds a lock on b and waits for a lock on serialization graph (SG). The scheduler then checks
a. In this case, T1 and T2 will be waiting for each other, and a whether there exists a previously scheduled operation ok
deadlock occurs. When a deadlock occurs, some transac- of transaction Tk conflicting with oi. If there is one, an arc
tions need to be aborted to break the cycle. from Tk to Ti is added to the SG. The operations of transac-
Timestamp ordering (TO) is used to manage the order of tion Ti can be executed as long as the graph is acyclic.
the transactions by assigning timestamps to both transac- Otherwise, the transaction, which causes a cycle in the
tions and data items. Each transaction in the system is graph, is aborted. As the acyclic serialization graph guar-
associated with a unique timestamp, assigned at the start antees the serializability of the execution, the SGT sche-
of the transaction, which is used to determine the order of duler produces the correct schedules for the concurrent
conflicting operations between transactions. Each data transactions. However, it is not necessarily recoverable
item is associated with a read timestamp, which is the and is much less cascadeless or strict (14) as defined later.
timestamp of the latest transaction that has read it, and A schedule S is said to be recoverable if, for every
a write timestamp, which is the timestamp of the latest transaction Ti that reads data items written by another
transaction that has updated it. Conflicting operations transaction Tj in S, Ti can be committed only after Tj is
must be executed in accordance with their corresponding committed. That is, a recoverable schedule avoids the
transaction timestamps. A transaction will be aborted situation where a committed transaction reads the data
when it tries to read or write on a data item whose time- items from an aborted transaction. A recoverable schedule
stamp is greater than that of the transaction. The serial- may still cause cascading aborts because it allows the
izable order of transactions is the order of their timestamps. transactions to read from uncommitted transactions. For
Both 2PL and TO concurrency control algorithms are example, a transaction T2 reads a data item x after x is
considered pessimistic approaches. The algorithms check updated by a transaction T1, which is still active in an
every operation to determine whether the data item is execution. If T1 is aborted during the processing, T2 must be
available according to the locking or timestamp, even aborted. Cascading aborts are undesirable.
though the probability of conflicts between transactions To avoid cascading abortion in a schedule S, every
is very small. This check represents significant overhead transaction should read only those values written by com-
during transaction execution, with the effect of slowing mitted transactions. Thus, a cascadeless schedule is also a
down the TP. recoverable schedule.
Optimistic concurrency control (OCC) (22) is another As a cascadeless schedule allows a transaction to write
approach in which no check is done while the transaction data from an uncommitted transaction, an undesirable
is executing. It has better performance if it is used in the situation may occur (14). For instance, consider the sce-
environment where conflicts between transactions are nario of an execution
rare. During transaction execution, each transaction exe-
cutes three phases in its life time. The following three WT1 x; 2WT2 x; 4: AbortT1 AbortT2
phases are used in the OCC protocol:
where two transactions T1 and T2 write the same data item
1. Read Phase. The values of the data items are read and x, with values 2 and 4, respectively, and both are aborted
stored in the local variables of the transaction. All later. The value of the data item x is called a before image if
modifications on the database are performed on tem- it will be replaced by a new value. The before image is saved
porary local storage without updating the actual in the log. In this case, the before image of data item x for
database. transaction T2 is 2 written by an aborted transaction T1.
2. Validation Phase. According to the mutually exclu- The term strict schedule was introduced in Ref. 14 to
sivity rules, a validation test is performed to deter- describe a very important property from a practical view-
mine whether the updates can be copied to the actual point. A schedule of transactions is called strict if the
database. transactions read or write data items only from committed
3. Write Phase. If the transaction succeeds in the vali- transactions. Strict schedules avoid cascading aborts and
dation phase, the actual updates are performed to the are recoverable. They are conservative and offer less con-
database; otherwise, the transaction is aborted. currency.
The concurrency control algorithms presented above,
Optimistic approaches are generally used in conjunction such as 2PL, TO, and SGT, do not necessarily produce strict
with timestamps. A timestamp is assigned to a transaction schedules by themselves.
at the end of its read phase or before the validation phase. If a strict schedule using 2PL algorithm is required, the
The serialization order of transactions is then validated locks being held by any transaction can be released only
using the timestamps. after the transaction is committed.
In a serialization graph-based concurrency control pro- A TO approach with a strict schedule will not allow a
tocol, an online serialization graph (conflict graph) is expli- transaction T to access the data items that have been
citly maintained. The serialization graph testing (SGT) updated by a previous uncommitted transaction even if
scheduler maintains a serialization graph for the history transaction T holds a greater timestamp.
that represents the execution it controls. When a SGT SGT can produce a strict schedule in such a way that
scheduler receives an operation oi of transaction Ti from each transaction cannot be committed until it is a source
TRANSACTION PROCESSING 7

node of the serialization testing graph. That is, a transac- is stored permanently on stable storage. The updates on a
tion T could not be involved in a cycle of the serializable database by a transaction are not directly written into the
testing graph if previous transactions that T reads or writes database immediately. The operations of the transactions
from have all been committed. are implemented in the database buffer located in main
memory (also referred to as volatile storage). It is only when
Recoverability of Transactions the contents of the database buffer have been flushed to
stable storage that any update operation can be regarded as
In addition to concurrency control, another important goal
durable.
of transaction management is to provide a reliable and
It is essential that the log record all the updates on the
consistent database in the presence of various failures.
database that have been carried out by the transactions in
Failures may corrupt the consistency of the database
the system before the contents of the database buffer have
because the execution of some transactions may be only
been written to database, which is the rule of write-ahead
partially completed in the database. In general, database
log.
systems are not failure-free systems. A number of factors
A log contains the information for each transaction as
cause failures in a database system (9) such as:
follows:
1. Transaction Abortions. The situation can be caused
by the transaction itself, which is caused by some
 transaction identifier;
unsatisfactory conditions. Transaction abortion can  list of update operations performed by the transaction
also be forced by the system. These kinds of failure do (for each update operation, both the old value and the
not damage the information stored in memory, which new value of the data items are recorded); and
is still available for recovery.  status of the transaction: tentative, committed, or
2. System Crashes. The typical examples of this type of aborted.
failure are system crashes or power failures. These
failures interrupt the execution of transactions, and The log file records the required information for undoing or
the content of main memory is lost. In this case, the redoing the transaction if a failure occurs. As the updates
only available accessible information is from a stable were written to the log before flushing the database buffer
storage, usually a disk. to the database, the RM can surely preserve the consistency
3. Media Failures. Failures of the secondary storage of the database. If a failure occurs before the commit point of
devices that store the database are typical of media a transaction is reached, the RM will abort the transaction
failure. As the content of stable storages has been lost, by undoing the effect of any partial results that have been
the system cannot be recovered by the system soft- flushed into the database. On the other hand, if a transac-
ware only. The common technique to prevent such tion has been committed but the results have not been
unrecoverable failures is to replicate the information written into the database at the time of failure, the RM
on several disks. would have to redo the transaction, using the information
from the log, in order to ensure transaction durability.
The first two types of failures are considered in the recovery
of transactions. Transactions represent the basic units of DISTRIBUTED TRANSACTION PROCESSING
recovery in a database system. If the automicity and dur-
ability of the execution of each transaction have been In many applications, both data and operations are often
guaranteed in the presence of failures, the database is distributed. A database is considered distributed if a set of
considered to be consistent. data that belongs logically to the same system is physically
Typically, the piece of software responsible for recovery spread over different sites interconnected by a computer
of transactions is called the recovery manager (RM). It is network. A site is a host computer and the network is a
required to ensure that whenever a failure occurs, the computer-to-computer connection via the communication
database is brought back to the consistent state it was in system. Although the software components that are typi-
before the failure occurred. In other words, the RM should cally necessary for building a DBMS are also the principal
guarantee that updates of the database by the committed components for a distributed DBMS (DDBMS), some addi-
transactions are permanent, in contrast to any partial tional capacities must be provided for a distributed data-
effects of uncompleted transactions that should be aborted. base, such as the mechanisms of distributed concurrency
The basic technique for implementing transactions in control and recovery.
the presence of failures is based on the use of logs. A log is a One of the major differences between a centralized and a
file that records all operations on the database carried out distributed database system lies in the TP. In a distributed
by all transactions. It is supposed that a log is accessible database system, a transaction might involve data residing
after the failures occur. The log is stored in stable storage, on multiple sites (called a global transaction). A global
which is the most resilient storage medium available in the transaction is executed on more than one site. It consists
system. Stable storage is also called secondary storage. of a set of subtransactions, each subtransaction involving
Typically, it is implemented by means of duplexed magnetic data residing on one site. As in centralized databases,
tapes or disks that store duplicate copies of the data. The global transactions are required to preserve the ACID
replicated stable storage is always kept mutually consis- properties. These properties must be maintained individu-
tent with the primary copy of the disk or tape. The database ally on each site and also globally. That is, the concurrent
8 TRANSACTION PROCESSING

global transactions must be serializable and recoverable in 3. All updates are directed first to a primary copy replica
the distributed database system. Consequently, each sub- (one copy has been selected as the primary copy for
transaction of a global transaction must be either per- updates first and then the updates will be propagated
formed in its entirety or not performed at all. to other copies).

Serializability in a Distributed Database Any one of these rules will guarantee consistency among
the duplicates.
Global transactions perform operations at several sites in a
distributed database system (DDBS). It is well understood
Atomicity of Distributed Transactions
that the maintenance of the consistency of each single
database does not guarantee the consistency of the entire In a centralized system, transactions can either be pro-
distributed database. It follows, for example, from the fact cessed successfully or aborted with no effects left on the
that serializability of executions of the subtransactions on database in the case of failures. In a distributed system,
each single site is only a necessary (but not sufficient) however, additional types of failure may happen.
condition for the serializability of the global transactions. For example, network failures or communication fail-
In order to ensure the serializability of distributed transac- ures may cause network partition, and the messages sent
tions, a condition stronger than the serializability of single from one site may not reach the destination site. If there is a
schedule for individual sites is required. partial execution of a global transaction at a partitioned site
In the case of distributed databases, it is relatively easy in a network, it would not be easy to implement the atom-
to formulate a general requirement for correctness of global icity of a distributed transaction. To achieve an atomic
transactions. The behavior of a DDBS is the same as a commitment of a global transaction, it must be ensured
centralized system but with distributed resources. The that all its subtransactions at different sites are capable
execution of the distributed transactions is correct if their and available to commit. Thus, an agreement protocol has
schedule is serializable in the whole system. The equivalent to be used among the distributed sites. The most popular
conditions are: atomic commitment protocol is the two-phase commitment
(2PC) protocol.
 Each local schedule is serializable, and In the basic 2PC, there is a coordinator at the originating
 The subtransactions of a global transaction must have site of a global transaction. The participating sites that
a compatible serializable order at all participating execute the subtransactions must commit or abort the
sites. transaction unanimously. The coordinator is responsible
for making the final decision to terminate each subtrans-
The last condition means that, for any two global transac- action. The first phase of 2PC is to request from all
tions Gi and Gj, their subtransactions must be scheduled in participants the information on the execution state of sub-
the same order at all the sites on which these subtransac- transactions. The participants report to the coordinator,
tions have conflicting operations. Precisely, if Gik and Gjk which collects the answers and makes the decision. In the
belongs to Gi and Gj, respectively, and the local serializable second phase, that decision is sent to all participants. In
order is Gik precedes Gjk at site k, then all the subtransac- detail, the 2PC protocol proceeds as follows for a global
tions of Gi must precede the subtransactions of Gj at all sites transaction Ti(9):
where they are in conflict.
Various concurrency control algorithms such as 2PL and Two-Phase Commit Protocol Phase 1: Obtaining a
TO have been extended to DDBS. As the transaction man- Decision.
agement in a DDBS is implemented by a number of iden-
tical local transaction managers, the local transaction 1. Coordinator asks all participants to prepare to com-
managers cooperate with each other for the synchroniza- mit transaction Ti:
tion of global transactions. If the timestamp ordering tech- a. Add [prepare Ti] record to the log.
nique is used, a global timestamp is assigned to each b. Send [prepare Ti] message to each participant.
subtransaction, and the order of timestamps is used as 2. When a participant receives [prepare Ti] message, it
the serialization order of global transactions. If a two-phase determines if it can commit the transaction:
locking algorithm is used in the DDBS, the locks of a global
a. If Ti has failed locally, respond with [abort Ti].
transaction cannot be released at all local sites until all
the required locks are granted. In distributed systems, the b. If Ti can be committed, send [ready Ti] message to
data item might be replicated. The updates to replicas must the coordinator.
be atomic (i.e., the replicas must be consistent at different 3. Coordinator collects responses:
sites). The following rules may be used for locking with n a. All respond ready; decision is commit.
replicas: b. At least one response is abort; decision is abort.
c. At least one fails to respond within time-out period,
1. Writers need to lock all n replicas; readers need to lock
decision is abort.
one replica.
2. Writers need to lock all m replicas (m > n/2); readers
need to lock n  m 1 replicas.
TRANSACTION PROCESSING 9

Phase 2: Recording the Decision in the Database1. actions (25) for transactional properties of concurrency and
recovery. A TP monitor is a piece of software that connects
1. Coordinator adds a decision record ([abort Ti] or multiple clients to multiple servers to access multiple
[commit Ti]) in its log. databases/data resources as shown in Fig. 1. Further dis-
2. Coordinator sends a message to each participant cussions on TP monitors can be found in Ref. 1.
informing it of the decision (commit or abort).
3. Participant takes appropriate action locally and ADVANCED TRANSACTION PROCESSING
replies done to the coordinator.
In traditional database applications such as banking and
The first phase is that the coordinator initiates the protocol airline reservation systems, transactions are short and
by sending a prepare-to-commit request to all participat- noncooperative and usually can be finished in minutes.
ing sites. The prepare state is recorded in the log, and the The serializability is a well-accepted correctness criterion
coordinator is waiting for the answers. A participant will for these applications. TP in advanced applications such as
reply with a ready-to-commit message and record the cooperative work will have different requirements, need
ready state at the local site if it has finished the operations different correctness criteria, and require different systems
of the subtransaction successfully. Otherwise, an abort supports to coordinate the work of multiple designers/users
message will be sent to the coordinator, and the subtran- and to maintain the consistency. Transactions are often
saction will be rolled back accordingly. called advanced transactions if they need nonserializable
The second phase is that the coordinator decides correctness criteria. Many advanced transaction models
whether to commit or abort the transaction based on the have been discussed in the literature 25. In this section,
answers from the participants. If all sites answered ready- we will briefly examine some advanced transaction models
to-commit, then the global transaction is to be committed. and then present a general advanced transaction model
The final decision-to-commit is issued to all participants. and its correctness criterion.
If any site replies with an abort message to the coordi-
nator, the global transaction must be aborted at all the Advanced Transaction Model
sites. The final decision-to-abort is sent to all the parti-
cipants who voted the ready message. The global transac- In addition to advanced transactions, we can also see other
tion information can be removed from the log when the similar terms such as nontraditional transactions, long
coordinator has received the completed message from all transactions, cooperative transactions, and interactive
the participants. transactions. We will briefly list some work on advanced
The basic idea of 2PC is to make an agreement among all TP or cooperative TP in advanced database transaction
the participants with respect to committing or aborting all models (2,3), groupware (4,26,27), and workflow systems
the subtransactions. The atomic property of global transac- (5,28).
tion is then preserved in a distributed environment.
The 2PC is subject to the blocking problem in the pre- Advanced Database Transaction Models (3).
sence of site or communication failures. For example, sup-
1. Saga (29). A transaction in Saga is a long-lived trans-
pose that a failure occurs after a site has reported ready-to-
action that consists of a set of relatively independent
commit for a transaction, and a global commitment mes-
steps or subtransactions, T1, T2 ,. . ., Tn. Associated
sage has not yet reached this site. This site would not be
with each subtransaction Ti is a compensating trans-
able to decide whether the transaction should be committed
action Ci, which will undo the effect of Ti. Saga is
or aborted after the site is recovered from the failure. A
based on the compensation concept. Saga relaxes the
three-phase commitment (3PC) protocol (14) has been
property of isolation by allowing a Saga transaction to
introduced to avoid the blocking problem. But 3PC is
reveal its partial results to other transactions before
expensive in both time and communication cost.
it completes. As a Saga transaction can interleave its
subtransactions with subtransactions of other sagas
Transaction Processing in Heterogeneous Systems
in any order, consistency or serializability is compro-
Traditional DDBS are often homogeneous because local mised. Saga preserves atomicity and durability of
database systems are the same, using the same data mod- traditional transaction by using forward and back-
els, the same languages, and the same transaction manage- ward recoveries.
ments. However, in the real world, data are often 2. Cooperative Transaction Hierarchy (30). This model
partitioned across multiple database systems, file systems, supports cooperative applications like computer-
and applications, all of which may run on different aided design (CAD). It structures a cooperative appli-
machines. Users may run transactions to access several cation as a rooted tree called a cooperative transac-
of these systems as single global transactions. A special tion hierarchy. The external nodes represent the
case of such systems are multidatabase systems or feder- transactions associated with the individual
ated database systems. designers. An internal node is called a transaction
As the 2PC protocol is essential to support the atomicity group. The term cooperative transaction refers to
of global transactions and, at the same time, the local transactions with the same parent in the transaction
systems may not provide such support, layers of software tree. Cooperative transactions need not to be serial-
are needed to coordinate and the execution of global trans-
10 TRANSACTION PROCESSING

izable. Isolation is not required. Users will define Based on this summary, we give the following definition.
correctness by a set of finite automata to specify
the interaction rules between cooperative transac- Definition 5. An advanced transaction (cooperative
tions. transaction group) is defined as a set (group) of cooperative
3. Cooperative SEE Transactions (31). This model sup- transactions T1, T2, . . ., Tn, with the following properties:
ports cooperative work in software engineering envir-
onments (SEEs). It uses nested active transactions 1. Each cooperative transaction is a sequence (or partial
with user-defined correctness. ACID properties are order) of read(x) and write(y) operations.
not supported. 2. For the same data item, there might be more than one
4. DOM Transaction Model for distributed object man- read(x), written as read1(x), read2(x), . . ., in a coop-
agement (32). This model uses open and closed nested erative transaction, and each read(x) will get a dif-
transactions and compensating transactions to undo ferent value depending on the time and interaction
the committed transactions. It also use contingency with other transactions.
transactions to continue the required work. It does 3. Similarly, for each y, there might be more than one
not support ACID properties. write(y), written as write1(y),,write2(Y), . . ., each of
5. Others (3). Open nested transactions, ConTract, Flex, which will produce an individual version of data
S, and multilevel transactions models use compen- item y.
sating transactions and contingency transactions.
The ACID properties are compromised. The polytran- The first part shows that an advanced transaction is a
saction model uses user-defined correctness. Tool Kit cooperative transaction group. If the size of the group is
also uses user-defined correctness and contingency one, it will become a single transaction. The property 1 is
transactions to achieve the consistency. the same as that in traditional transactions. The second
and third properties indicate some cooperative features.
The first read(x) may read other transactions committed or
Groupware (2,26,33). Most groupware systems synchro-
uncommitted data depending on the concurrency control
nize cooperative access to shared data in a more or less
employed. After the first read operation on x, the data item
ad hoc manner. Groupware systems involve multiple con-
might be updated by another transaction or another coop-
current users or several team members at work on the same
erative transaction; then it can read the new value in the
task. The members, or users, are often in different locations
next read(x). Similarly, after the first write operation on x,
(cities or even countries). Each team member starts up a
because of the cooperative feature, a transaction may read
cooperative transaction, each cooperative transaction
some new data from other transactions and then issue
should be able to see the intermediate result of other
another write(x) to incorporate it to the current processing.
cooperative transactions, and these cooperative transac-
The later write(x) can undo the previous write or do a
tions jointly form a cooperative transaction group. When
further update to show the new semantics.
they read or update the uncommitted data from other
To further justify the second and third properties of the
cooperative transactions, nonserializable synchronization
definition, we discuss their compatibilities with interactive
and concurrency mechanisms are required to maintain
and noninteractive transactions in advanced transaction
consistency. A cooperative editing system is an example.
applications.
Workflow Applications (5). Workflow is used to ana-
Interactive Transactions. A cooperative transaction can
lyze and control complicated business processes. A large
be formed with great flexibility because a user can dyna-
application often consists of a collection of tasks. Each
mically issue an operation depending on the most current
task can be viewed as a cooperative transaction processed
information. If a data item has been updated recently after
by one user or designer, and these tasks are partially
the first read, the cooperative transaction may wish to read
ordered by control and data flow dependencies. The work-
the data again because of the cooperative feature. In order
flow supports the task coordination specified in advance
to incorporate the recent changes in to its own transaction,
through the control flow. Serializability is not preserved
it can perform additional operations or compensate for the
either.
previous operations, which is also the flexibility of inter-
These applications have some common properties:
active work.
(1) users are often distributed; (2) they conduct some
cooperative work in an interactive fashion; and (3) this
Noninteractive Transactions. In some database transac-
interactive cooperative work may take a long time. These
tion models, the transactions are not as interactive as those
applications have the following special consistency
online transactions from groupwares and transaction
requirements:
workflow applications (3). To maintain system consistency
and meet the application requirements, all of them use
1. A transaction may read intermediate results pro-
compensating transactions, contingency transactions, or
duced by other transactions.
triggers, where a compensating transaction is a transaction
2. The consistency between individual and group needs undoing the effect of a previous transaction; a contingency
to be maintained. transaction is a transaction to continue or extend a previous
transaction; and the trigger is a mechanism to invoke
TRANSACTION PROCESSING 11

another transaction (if the trigger condition is true) to before another transaction starts and also read the data
restore the consistency. A compensating transaction, a updated by the same transaction. If so, the schedule
contingency transaction, or a trigger can be viewed as an between these two transactions will not be serializable.
extension of a transaction that violates the consistency However, from the semantic point of view, the most impor-
requirements during the execution, and the extended tant read or write on the same data item will be the last read
part will have the read and write operations on some or write. If we give high priority to the last read or write
data items in common. They are another type of interaction. conflicts in developing the correctness criteria, we could
These interactions need to be programmed in advance; have an f-conflict (final conflict) graph, based on which
therefore, they are not as flexible as interactive transac- we will present an f-conflict serializability theorem as a
tions. But the interactive features are still required even for general correctness criterion for advanced TP.
these noninteractive database transaction applications.
Similar to distributed database transactions, the Definition 7. The f-conflict graph among transactions is
advanced transaction definition could be extended to a constructed as follows. For each transaction Ti, there is a
distributed advanced transaction as follows: node in the graph (we also name the node Ti). For any pair of
final conflicting operations (Oi, Oj), where Oi from Ti and Oj
Definition 6. A distributed advanced transaction (dis- from Tj, respectively, and Oi comes earlier than Oj, add an
tributed cooperative transaction group) is defined as a set arc from Ti to Tj in the conflict graph.
(group) of cooperative transactions T1, T2,. . ., Tn, with the
following properties: Definition 8. A schedule is f-conflict serializable if and
only if its f-conflict graph is acyclic. The f-conflict serial-
1. Each transaction Ti consists of a set of subtransac- ization order of a set of transactions can be determined by
tions Tij at site j, j 2 1  m, m is the number of sites in their f-conflicting operations in an f-conflict serializable
a distributed system. Some Tij might be empty if Ti schedule. From the definitions, we can see the relationship
has no subtransaction at site j. between conflict serializability and f-conflict serializability.
2. Each subtransaction is a sequence (or partial order) of
read(x) and write(y) operations. Theorem 2. If a schedule is conflict serializable, it is also
3. For the same data item x, there might be more than f-conflict serializable; the reverse is not true.
one read(x), denoted as read1(x), read2(x),. . ., in a The conflict serializability is a special case of f-conflict
cooperative transaction, each read(x) will get a dif- serializability in traditional TP.
ferent value depending on the time and interaction
with other transactions. Definition 9. A schedule of distributed advanced trans-
actions is f-conflict serializable if and only if
4. Similarly, for each y, there might be more than
one write(y), denoted as write1(y), write2(y),. . .,
1. the schedule of subtransactions at each site is f-con-
each of which will produce an individual version of
flict serializable, and
data item y.
2. the f-conflict serialization order at all sites are the
same.
Just as the serializability theory plays an important role in
the traditional transaction model in developing concur-
rency control and recovery algorithms, a general correct- Advanced transactions or cooperative transactions may
ness theory for advanced transactions is also required to have different application-dependent requirements and
guide transaction management for advanced applications. require different system supports to coordinate the work
In the next subsection, we will present such a correctness of multiple users and to maintain the consistency. As a
criterion. result, different synchronization, coordination, and control
mechanisms within a cooperative transaction group are
f-Conflict Serializability developed. The f-conflict serializability in conjunction with
application-dependent semantics could be used for design-
As in the traditional transactions, we can assume that, for ing and testing advanced TP approaches. The application-
write operations on x, there must be a read operation before dependent requirements can be reflected in the detailed
the first write in a cooperative transaction. It is natural to transaction structures. For example, when there are sev-
read the data first before the update [i.e., ones update may eral write operations on the same x, the later write might be
depend on the read value or one may use a read operation to to undo and then redo the operation (or perform a different
copy the data into the local memory, then update the data operation). The undo operations might be reversing opera-
and write it back (when the transaction commits)]. tions or compensating operations, and the redo operations
In advanced transaction applications, cooperative trans- could be contingency operations or new operations that may
actions could read and write a data item more than once, need to keep the intention (user intention) of the original
which is different from traditional transactions. The reason write (6,27) or to incorporate the new semantics.
for reading a data item more than once is to know the recent In a recent work, we have verified a cooperative editing
result and therefore make the current transaction more system, REDUCE, according to this theory, and have
accurate, which, however, will violate the serializability, shown that the schedules from this system is f-conflict
because a cooperative transaction may read a data item serializable (34).
12 TRANSACTION PROCESSING

Cell

Station Mobile host


Network
Support
station
Station

Mobile station
Support
station
Support station Cell

Figure 5. Wired and wireless


net-working environment. Station

Advanced transactions are very long when compared its cell, the geographical area it covers. Figure 5 shows both
with traditional transactions. The arbitrary abortion of a wired and wireless connected networking environment.
such long transactions is not appropriate because aborting Mobile computing systems can be viewed as an exten-
long transactions means increasing the processing cost and sion of distributed systems (36). However, to support TP in
response time. In an environment with short (traditional) the mobile computing environment, physical limitations
transactions and long/cooperative transactions, long/coop- imposed by the nature of the networking environment have
erative transactions should not be aborted because of con- to be taken into consideration (37,38).
flict operations with short transactions. On the other hand,
because the quick response is often required or preferred for
short transactions, long transactions should not block the  Communication between mobile hosts and mobile sup-
short transactions. port stations is asymmetric. Bandwidth in the
Based on the f-conflict serializability, a timestamp upstream direction from mobile hosts to mobile sup-
ordering concurrency control algorithm (35) is developed port stations is low, resulting in excessive latency.
to support both traditional short transactions and long  Portable computing devices have a limited battery life,
cooperative transactions. With this new timestamp order- processing capability, and storage capacity.
ing method, short transactions can be processed in the  Most mobile hosts do not stay continuously connected,
traditional way, as if there are no cooperative transactions.
for a number of reasons, including reducing connection
Therefore, they will not be blocked by long transactions; a
charges and saving power. Mobile hosts can also move
cooperative transaction will not be aborted when there is a
between cells, disconnecting one cell to connect to
conflict with short transactions, rather, it will incorporate
another.
the recent updates into its own processing. The serializ-
abilities, among short transactions, and between a coop-
In such an environment, the characteristics of mobile
erative transaction (group) and other short transactions,
transactions can differ in a number of ways from transac-
are all preserved.
tions in distributed systems (39,40).
Mobile Transaction Processing
In both centralized and DDBS, data and machines have  When a mobile host moves to a new cell during the
fixed locations. As a result of recent advances in the devel- execution of a transaction, it might need to continue its
opment of portable computing devices and wireless com- execution in another cell. Therefore, a mobile transac-
munication networks, mobile computing began to emerge tion might have to split its computation in that some
in many database applications. The mobile computing parts of the computation are executed on the mobile
environment consists of mobile computers, known as host and others on different fixed hosts.
mobile hosts, and a wired network of computers, some of  A mobile transaction tends to be long-lived because of
which are mobile support stations through which mobile the high latency of wireless communication and long
hosts can communicate with the wired network. Each disconnection time.
mobile support station manages those mobile hosts within  A mobile transaction tends to be prone to failure.
TRANSACTION PROCESSING 13

 A mobile transaction may be running in a distributed To reduce the impact on local transactions due to the
and heterogeneous system. processing of the long-lived global transactions submitted
by mobile users, the Pre-Serialization technique allows
Traditional TP protocols may not address these distinctive global transactions to establish their serialization order
characteristics of mobile computing systems and mobile before completing execution (43). In this way, subtransac-
transactions. To support TP in a mobile computing envir- tions of a global transaction can be committed indepen-
onment efficiently and effectively, a number of desirable dently at local sites and resources may be released in a
features should be supported. timely manner.
Guaranteeing the consistency of data processed by
 Operations on shared data must ensure correctness of mobile hosts is harder because mobile hosts are often dis-
transactions executed on both mobile hosts and fixed connected from the rest of the network while still in
hosts. operation. For instance, if a data item cached in a mobile
 Transaction aborts and blocking should be minimized computer is updated by another computer while the
to save resources and to increase concurrency. Early mobile computer is disconnected, the cached data will
detection of data conflicts leading to transaction become inconsistent or out of date. If a conventional lock-
restarts is required. based approach is adopted in the mobile computing envir-
onment to maintain data consistency, the system could
 Communication between mobile hosts and support
suffer from significant performance degradation as the
stations should be minimized and adaptable to the
data items held by a long-lived mobile transaction could
network connectivity.
not be released until the transaction commits. To improve
 Autonomy for mobile transactions to be processed data availability, a transaction can pre-commit at the
locally during disconnection should be supported. mobile host (44) so that the future value of a data object
can be made visible to other transactions before the delayed
A traditional distributed transaction consists of a set of final commit of the transaction at the mobile support sta-
subtransactions that are executed concurrently at multiple tion, which reduces the blocking of other transactions to
sites and there is one coordinator to coordinate the execu- increase concurrency and costly transaction aborts can
tion and commitment of these subtransactions. A mobile also be avoided as a pre-committed transaction is guaran-
transaction is another kind of distributed transaction. The teed to commit.
entire transaction can be submitted in a single request from During disconnection, mobile host users may issue
the mobile host, or the operations of a transaction are query or update transactions on the data that reside locally.
submitted in multiple requests, possibly to different sup- Data are often replicated or cached at mobile hosts for
port stations in different cells. The former method involves reasons of performance and availability. To support TP
a single coordinator for all the operations of the transaction, in a networking environment with intermittent links,
whereas the latter may involve multiple coordinators. For weak transactions(45) let users access local data in mobile
example, after submitting some operations (and getting computing applications where bounded inconsistency is
partial results back), the mobile host might need to submit acceptable. In a weak transaction, weak read operations
the remaining operations to another cell because it has read local, potentially inconsistent copies and weak write
moved to a new cell. The execution of the mobile transaction operations perform tentative updates. Data reconciliation
is not fully coordinated by a single coordinator because, to a can be activated when the mobile computer is reconnected
certain extent, it depends on the movement of the mobile to the wired network.
computer. The kangaroo transaction model (41) uses a split In mobile computing systems, the number of mobile
operation to create a new subtransaction when the mobile hosts is far greater than the number of support stations,
computer hops from one cell to another. A subtransaction is and support stations have a relatively abundant down-
a global or a local transaction that can be committed stream bandwidth. The pull-based architecture in tradi-
independently and the failure of one may result in the tional distributed systems, where data items are delivered
entire kangaroo transaction being undone. To manage from servers to clients on a demand basis, is no longer a
the execution of a kangaroo transaction, a data structure good match in mobile computing systems. In contrast,
is maintained between the mobile support stations push-based data delivery fits well the inherent communi-
involved. cation asymmetry to exploit the abundant downstream
In typical multidatabase systems where users may bandwidth in mobile computing systems. In the push-based
simultaneously access heterogeneous data from different architecture called Broadcast Disks(46), data items are
local databases, a global locking table can be maintained for continuously and repetitively broadcast to mobile hosts
correct execution of concurrent global and local transac- without any specific request, and the mobile hosts listen
tions. In the mobile environment, intensive communication to the broadcast channel and retrieve data of their interest.
of locking information between the local sites and the global Data dissemination can be found in many applications,
transaction manager is impractical because of the physical including stock trading and electronic auctions. In these
limitations of the networking environment. A hierarchical applications, data updates must be disseminated promptly
concurrency control algorithm using global locking table and consistently to a large community of mobile users.
with semantic information contained within the hierarchy In the broadcast environment, data items may be
can be used to dynamically adjust the amount of commu- updated by transactions executed at the server while
nication required to detect and resolve data conflicts (42). they are being broadcast. To ensure the consistency of
14 TRANSACTION PROCESSING

mobile transactions, the broadcast channel can be used to ACKNOWLEDGMENT


transmit concurrency control-related information to the
mobile hosts to perform all or part of the transaction We thank Anne Fuller for her comments and review on an
validation function (4749). In this way, data conflicts earlier version of this article.
can be detected earlier at the mobile hosts to avoid any
computing and communication resources being wasted, as
well as helping to improve the performance of mobile
BIBLIOGRAPHY
transactions. In addition, transaction restarts are more
costly in the mobile environment. Excessive transaction
1. P. A. Bernstein and E. Newcomer, Principles of Transaction
aborts because of ineffectiveness of the concurrency control
Processing, San Mateo, CA: Morgan Kaufmann, 1997.
mechanisms or unnecessary restrictive correctness criteria
2. K. Abrer et al., Transaction models supporting cooperative
should be avoided (50).
work-TransCoop experiences, in Y. Kambayashi and K. Yokota
To increase the concurrency of mobile transactions,
(eds.), Cooperative Databases and Applications, Singapore:
multiple versions of data items can be broadcast (51). A World Scientific, 1997, pp. 347356.
mobile read-only transaction can choose to read the data
3. A. K. Elmagarmid, Database Transaction Models for Advanced
versions, if they exist, that correspond to a single database Applications, San Mateo, CA: Morgan Kaufmann, 1992.
state. With multiversioning, mobile transactions can
4. C. A. Ellis and S. J. Gibbs, Concurrency control in groupware
resume execution after temporary disconnection, as long systems, Proc. ACM SIGMOD, 1989, pp. 399407.
as the required versions are still on the broadcast. To
5. M. Rusinkiewicz and A. Sheth, Specification and execution of
provide better currency, additional information in the transactional workflows, in W. Kim (ed.), Modern Database
form of an invalidation report consisting of a list of data Systems, Reading, MA: Addison-Wesley, 1994, pp. 592620.
items that have been updated can periodically be broadcast 6. C. Sun et al., A generic operation transformation scheme for
to the mobile hosts. consistency maintenance in real-time cooperative editing sys-
Mobile transactions also introduce some other new pro- tems, Proc. ACM Group97, Phoenix, AZ, 1997, pp. 425434.
blems, such as awareness of location. In wired DDBSs, 7. R. Elmasri and S. B. Navathe, Fundamentals of Database
location transparency is an important feature. However, Systems, Menlo Park, CA: Benjamin/Cummins, 1989.
mobile applications may be location-dependent, for 8. A. Silberschatz , H. Korth, and S. Sudarshan, Database Sys-
instance, the current position of a mobile host may be tems Concepts, New York: McGraw-Hill, 1991.
accessed by a mobile transaction. Moreover, failures occur 9. S. Ceri and G. Pelagate, Distributed Databases: Principles and
more often in mobile computing because of the frequent Systems, New York: McGraw-Hill, 1984.
switching on and off of mobile computers and the frequent 10. T. Haerder and A. Reuter, Principles of transaction-oriented
handoff when mobile computers move across the boundary database recovery, ACM Comput. Surv., 15 (4): 287317, 1983.
of cells. Another new challenge in the mobile computing 11. J. N. Gray, The transactions concept: Virtues and limitations,
environment is failure handling and recovery. Proc. 7th Int. Conf. Very Large Data Base, 1981, pp. 144154.
12. ISO/IEC DIS 10746-2, Basic reference model of open distrib-
FUTURE RESEARCH DIRECTIONS uted Processing - Part 2: descriptive model [Online]. Available:
http://www.dstc.edu.au/AU/ODP/standards.html.
The future work on TP will continue in the direction on new 13. D. Agrawal and A. El. Abbadi, Transaction management in
database systems, Database Trans. Models Adv. Appl., 132,
transaction models. Although the advanced transaction
1992.
model and f-conflict serializability provide a guideline for
14. C. J. Date, An Introduction to Database System, Vol. 2, Read-
advanced application, many particular applications still
ing, MA: Addison-Wesley, 1982.
need user-defined correctness and often employ the seman-
15. P. A. Bernstein, V. Hadzilacos, and N. Goodman, Concurrency
tic information for semantic serializability and semantic
Control and Recovery in Database Systems, Reading, MA:
atomicity. Addison-Wesley, 1987.
In advanced database applications such as CAD and
16. H. Korth, A. Silberschatz, Database Systems Concepts, 2nd ed.
cooperative work, the transactions are often cooperative or New York: McGraw-Hill, 1991.
interactive or online analysis processing. We need to design
17. C. Papadimitriou, The Theory of Database Concurrency
mechanisms for advanced models to support partial Control, Rockville MD: Computer Science Press, 1986.
rollbacks, reread, and rewrite operations to reflect the
18. K. P. Eswaran et al., The notions of consistency and predicate
cooperative features. locks in a database system, Commun. ACM, 19 (11): 624633,
As database systems are being deployed in more and 1976.
more complex applications, the traditional data model (e.g., 19. J. N. Gray, Notes on database operating systems, Lect. Notes
the relational model) has been found to be inadequate and Comput. Sci., 6: 393481, 1978.
has been extended (or replaced) by object-oriented data 20. P. A. Bernstein and N. Goodman, Timestamp based algorithms
models. Related to this extension is another research direc- for concurrency control in distributed database systems, Proc.
tion: TP in object-oriented databases, including semantic- 6th Int. Conf. VLDB, 285300, 1980.
based concurrency control and recovery in object-oriented 21. L. Lamport, Time, clocks and the ordering of events in a
databases. Ref. 52 presents a brief introduction and some distributed system, Commun. ACM, 21 (7): 558565, 1978.
future research topics on this area as well as a comprehen- 22. H. T. Kung and J. T. Robinson, On optimistic methods for
sive list of references on advanced TP. concurrency control, Proc. Conf. VLDB, 1979.
TRANSACTION PROCESSING 15

23. D. Z. Badal, Correctness of concurrency control and implica- 41. M. H. Dunham, A. Hedal, and S. Balakrishnan, A mobile
tions in distributed databases, COMPSAC Conf., 1979, pp. transaction model that captures both the data and movement
588593. behavior, Mobile Networks Applicat., 2: 149162, 1997.
24. M. A. Casanova, Concurrency control problem of database 42. J. B. Lim and A. R. Hurson, Transaction processing in mobile,
systems, Lect. Notes Comput. Sci., 116: 1981. heterogeneous database systems, IEEE Trans. Knowledge
25. A. Silberschatz, H. Korth, and S. Sudarshan, Database Systems Data Eng., 14 (6): 13301346, 2002.
Concepts, 3rd ed., New York: McGraw-Hill, 1991. 43. R. A. Dirckze and L. Gruenwald, A pre-serialization transac-
26. S. Greenberg and D. Marwood, Real time groupware as a tion management technique for mobile multidatabases, Mobile
distributed system: Concurrency control and its effect on the Networks Applicat., 5: 311321, 2000.
interface, Proc. ACM Conf. CSCW94, 1994, pp. 207217. 44. S. Madria and B. Bhargava, A transaction model to improve
27. C. Sun et al., Achieving convergency, causality-preservation data availability in mobile computing, Distributed Parallel
and intention preservation in real-time cooperative editing Databases, 10: 127160, 2001.
systems, ACM Trans. Comput.-Hum. Interact., 5 (1): 142, 45. E. Pitoura and B. Bhargava, Data consistency in intermittently
1998. connected distributed systems, IEEE Trans. Knowledge Data
28. D. Jean, A. Cichock, and M. Rusinkiewicz, A database Eng., 11 (6): 896915, 1999.
environment for workflow specification and execution, in 46. S. Acharya et al., Broadcast disks: Data management for
Y. Kambayashi and K. Yokota (eds.), Cooperative Databases aymmetric communication environments, ACM SIGMOD
and Applications, Singapore: World Scientific, 1997, pp. 402 Record, Proc. 1995 ACM SIGMOD Int. Conf. Management of
411. Data, 24 (2): 199210, 1995.
29. H. Garcia-Molina and K. Salem, Sagas, Proc. ACM SIGMOD 47. D. Barbara, Certification reports: Supporting transactions in
Conf. Manage. Data, 1987, pp. 249259. wireless systems, Proc. 17th Int. Conf. Distributed Computing
30. M. Nodine and S. Zdonik, Cooperative transaction hierarchies: Systems, 1997, pp. 466473.
A transaction model to support design applications, in A. K. 48. E. Pitoura and P. K. Chrysanthis, Scalable processing of read-
Elmagarmid (ed.), Database Transaction Models for Advanced only transactions in broadcast push, Proc. 19th IEEE Int. Conf.
Applications, San Mateo, CA: Morgan Kaufmann, 1992, Distributed Computing Systems, 1999, pp. 432439.
pp. 5386. 49. V. C. S. Lee et al., On transaction processing with partial
31. G. Heiler et al., A flexible framework for transaction manage- validation and timestamp ordering in mobile broadcast envi-
ment in engineering environments, in A. Elmagarmid (ed.), ronments, IEEE Trans. Comput., 51 (10): 11961211, 2002.
Transaction Models for Advanced Applications, San Mateo, 50. J. Shanmugasundaram et al., Efficient concurrency control for
CA: Morgan Kaufmann, 1992, pp. 87112. broadcast environments, ACM SIGMOD Record, Proc. 1999
32. A. Buchmann, M. T. Ozsu, and M. Hornick, A transaction ACM SIGMOD Int. Conf. Management of Data, 28 (2): 8596,
model for active distributed object systems, in A. Elmagarmid 1999.
(ed.), Transaction Models for Advanced Applications, San 51. E. Pitoura and P. K. Chrysanthis, Multiversion data broadcast,
Mateo, CA: Morgan Kaufmann, 1992, pp. 123158. IEEE Trans. Compu., 51 (10): 11961211, 2002.
33. C. A. Ellis, S. J. Gibbs, and G. L. Rein, Groupware: Some issues 52. K. Ramamritham and P. K. Chrysanthis, Advances in
and experiences, Commun. ACM, 34 (1): 3958, 1991. Concurrency Control and Transaction Processing, Los Alami-
34. Y. Zhang et al., A novel timestamp ordering approach for tos, CA: IEEE Computer Society Press, 1997.
co-existing traditional and cooperation transaction processing,
to appear inInt. J. Intell. and Cooperative Inf. Syst., an earlier
version in Proc. 3rd IFCIS Conf. Cooperative Information FURTHER READING
Systems, New York, 1998.
35. Y. Zhang, Y. Kambayashi, X. Jia, Y. Yang, and C. Sun, On R. Alonso, H. Garcia-Molina, and K. Salem, Concurrency control
interactions between coexisting traditional and cooperative and recovery for global procedures in federated database systems,
transactions, Int. J. Coop. Inform. Syst., 8 (2,3): 87109, 1999. Q. Bull. Comput. Soc. IEEE Tech. Comm. Database Eng., 10 (3):
36. M. H. Dunham and A. Helal, Mobile computing and databases: 511, 1987.
Anything new?SIGMOD Rec., 24 (4): 59, 1995. P. A. Bernstein and N. Goodman, Concurrency control in distrib-
37. E. Pitoura and G. Samaras, Data Management for Mobile uted database systems, Comput. Surv., 13 (2): 188221, 1981.
Computing, Dordrecht, the Netherlands: Kluwer Academic J. Cao, Transaction management in multidatabase systems. Ph.D.
Publishers, 1998. thesis, Department of Mathematics and Computing, University of
38. D. Barbara, Mobile computing and databases a survey, IEEE Southern Queensland, Australia, 1997.
Trans. Knowledge Data Eng., 11 (1): 108117, 1999. U. Dayal, M. Hsu, and R. Latin, A transactional model for long
39. A. K. Elmagarmid, J. Jing, and T. Furukawa, Wireless client/ running activities, Proc. 17th Conf. Very Large Databases, 1991,
server computing for personal information services and appli- pp. 113122.
cations, SIGMOD Rec., 24 (4): 1621, 1995. C. A. Ellis, S. J. Gibbs, and G. L. Rein, Design and use of a group
40. S. Madria et al., Data and transaction management in a mobile editor, in G. Cockton (ed.), Enginering for Human Computer
environment, in S. Upadhyaya, A. Chaudhury, K. Kwiat, and Interaction, Amsterdam: North-Holland, 1990, pp. 1325.
M. Weiser (eds.), Mobile Computing Implementing Pervasive J. N. Gray, Transaction Processing: Implementation Techniques,
Information and Communications Technologies, Dordrecht, San Mateo, CA: Morgan Kaufmann, 1994, pp. 207217.
the Netherlands Kluwer Academic Publishers, 2002, pp.
167190.
16 TRANSACTION PROCESSING

G. Kaiser and C. Pu, Dynamic restructuring of transactions, in A. Y. Zhang and Y. Yang, On operation synchronization in cooperative
Elmagarmid (ed.), Transaction Models for Advanced Applications, editing environments, in IFIP Transactions A-54 on Business
San Mateo, CA: Morgan Kaufmann, 1992. Process Re-engineering, 1994, pp. 635644.
M. T. Ozsu and P. Valduriez, Principles of Distributed Database
Systems. Englewood Cliffs, NJ: Prentice-Hall, 1991.
Y. Kambayashi and K. Yokota (eds.), Cooperative Databases and Y. ZHANG
Applications, Singapore: World Scientific, 1997. Victoria University
Melbourne, Australia
C. Mohan et al., ARIES: A transaction recovery method supporting
X. JIA
fine-granularity locking and partial rollbacks using write-ahead
logging, ACM Trans. Database Syst., 17 (1): 94162, 1992. V. C. S. LEE
City University of Hong Kong
C. Pu, G. Kaiser, and N. Huchinson, Split transactions for open- Hong Kong
ended activities, Proc. 14th Conf. Very Large Databases, Los
Angeles, CA, 1988, pp. 2637.
T. Rodden, A survey of CSCW systems, Interact. Comput. Interdisc.
J. Hum.-Compu. Interac., 3 (3): 319353, 1991.
Computer Vision
A
ACTIVE CONTOURS: SNAKES Eexternal, accounts for the user-defined constraints. Tra-
ditionally, researchers define Eexternal in terms of a known
The shape of a real-world object can be represented by its set of shapes the object can have.
outline in the image plane. In computer vision, the outline
of the object is referred to as the object contour. A funda- VISUAL CUES
mental approach to finding automatically the object con-
tour is the snakes framework, which was introduced by The snakes attraction to distinctive local features on the
the seminal work of Kass et al. in 1987 (1). For the last two object boundary signifies the role of feature extraction in the
decades, snakes have been used successfully in the context snake framework. Traditionally, feature extraction is
of facial animation, visual speech analysis, traffic mon- achieved by convolving an image with a mask. In its simplest
itoring, surveillance, medical imaging (tracking and seg- form, the convolution mask H can be considered a small
mentation of organs), and blue screening in Hollywood image, usually an n  n matrix, and the convolution opera-
movies. tion  between the image I and the mask H is performed by
A snake is an elastic model of a continuous and flexible
curve that is fitted on the boundary between the object and n X
X n
the rest of the image by analyzing the visual image content. Ix; y  H Ix i=2; y j=2Hi; j 2
The process of fitting iteratively an initial snake to the i1 j1
object, such that the snake encloses the object tightly, is
called snake evolution. During its evolution, the snake The convolution of the image with a filter generates a
imposes continuity and smoothness constraints on the feature image in which the boundaries are expected to be
evolved contour, which relax the requirement of a noise- highlighted while the other regions are suppressed. For
free image. In addition to the continuity and smoothness instance, convolving an image shown in Fig. 1(c) using
constraints, snake have the capability to be attracted to the vertical and horizontal edge filters shown in Fig. 1(a)
certain shape configurations known a priori. The evolution and Fig. 1(b) produces the edge responses shown in Fig. 1(d)
of a snake from one configuration to another in consecutive and Fig. 1(e). The gradient magnitude feature computed
frames of a video clip attributes a dynamic behavior to from these edge responses emphasizes the object boundary
the contour and provides object-tracking capabilities. to which the snake will be attracted.
The snake performing object tracking is considered a The convolution operation is a local operation, which
dynamic contour moving from frame to frame. does not guarantee the generation of expressive features.
This operation can be exemplified as shown in Fig. 2(a)
where the background clutter and the object texture gen-
THE SNAKE FORMULATION
erate ambiguous edges, causing the snake to get attracted
to the wrong configurations. A solution to this problem is to
The snake is composed of a set of control points marked in
use global features computed in the regions defined by the
the spatial image coordinates (x,y). The control points
inside and the outside of the object contour (4). The simi-
initially can reside inside or outside the object region.
larity between the colors observed inside and outside
From its initial configuration, the snake evolves by chan-
the object is a common measure used by researchers (see
ging the positions of the control points while minimizing
Fig. 2(b) for the definition of the snake inside and outside).
an associated cost (energy) function evaluated on the
This similarity measure can be computed by means of the
contour:
distance between the probability distribution functions
Z 1 (pdf) associated with the inside and outside regions. Based
Esnake aEimage bEinternal gEexternal ds 1 on this distance, the snake evolves by moving the control
0 points inward or outward.

Where E denotes energy, s denotes the contour arc-length


and a, b, and g are the control parameters (1). The final CURVE SMOOTHNESS
position of the control points provides the final configura-
tion of the snake which is obtained by the equilibrium of all In the case when the object is not distinctive from its
three terms, Eimage, Einternal, and Eexternal, in the snake background or when the image contains noise, the snake
energy [Equation (1)] (2). In particular, the image energy may not converge to a final configuration, which represents
term, Eimage, attracts the snake to a desired configuration the object shape. To overcome this problem, it is necessary
by evaluating the visual features in the image. During its to stabilize the contour evolution to keep the shape of the
evolution, the internal energy term, Einternal, imposes a snake intact and to not resonate from one configuration to
regularity constraint to enforce the contour continuity another. Stabilization of the contour is achieved by the
and smoothness. The last term in the energy function, internal energy term, Einternal, given in Equation (1).

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 ACTIVE CONTOURS: SNAKES

Figure 1. The convolution mask to detect (a) the


vertical edges and (b) the horizontal edges, (c) An
input image. Resulting (d) vertical edges after con-
volving (a) with (c), and (e) horizontal edges after
convolving (b) with (c). (f) The gradient magnitude
image generated using (d) and (e) for highlighting the
boundary of the object.

Figure 2. (a) The edges obtained by applying the Canny edge


detector (3) with different thresholds. Note the ambiguity of the
features that will guide the snake evolution. (b) The inside and
outside regions defined by the snake.

This term includes a weighted combination of a membrane whereas w1  w2 forces the curve to bend slowly. A common
function and a thin plate function shown in Fig. 3: practice is to use different weights for each control point, so
that both w1 and w2 become functions of s. This approach
   2 2 allows parts of the snake to have corners and allows the
@Gs2  
Einternal w1 Gs  w2 Gs@ Gs 3 others parts to be smooth.
@s   @s 
2
|{z} |{z}
membrane thin plate
SNAKE EVOLUTION
where G(s) denotes the curve and w1 and w2 are the weights.
Practically, when w1  w2, the curve is allowed to kink, The motion of each control point, which is governed by
Equation (1), evolves the underlying curve to new a con-

Figure 3. (a) The membrane function and (b) the


thin plate function, which are a regularization filter (a) (b)
of order 1 and 2, respectively.

Figure 4. The evolution of an initial


snake using the gradient magnitude
image shown in Fig. 1(f) as its feature.
ACTIVE CONTOURS: SNAKES 3

figuration. This process is shown in Fig. 4. Computing the compact curve representation that provides a simple tech-
motion of a control point si requires the evaluation of the nique to compute geometric features of the curve, such as
first- and the second- order curve derivatives in a neighbor- the curvature, and the moments of the object region, such as
hood G(si). An intuitive approach to evaluate the curve the object area.
derivatives is to use the finite difference approximation: The algorithms developed for the snake framework per-
form near real time when the initial snake is placed close to
@Gsi Gsi  Gsi1 the objects of interest. Their performance, however,
4
@s d degrades in the presence of background clutter. To over-
2
@ Gsi Gsi1  2Gsi Gsi1 come this limitation, researchers have proposed various
5 shape models to be included in the external energy term.
@s2 d2
One of the main concerns about the snakes is the amount
The finite difference approximation, however, is not applic- of control points chosen initially to represent the object
able in regions where two control points overlap, resulting shape. Selection of a few control points may not define the
in zero Euclidean distance between the neighboring control object, whereas selecting too many control points may not
points: d 0. Hence, a special handling of the displace- converge to a solution. For instance, if the object circum-
ment between the control points is required, so they do not ference is 50 pixels and the snake is initialized with 100
overlap during their motion. Another approach to compute control points, snake iterations will enter a resonant state
the derivatives is to fit a set of polynomial functions to caused by the regularity constraint, which prevents the
neighboring control points and to compute the derivatives control points from overlapping. A heuristic solution to this
from these continuous functions. In the snake literature, problem would be to add or remove control points when
the parametric spline curve is the most common polynomial such cases are observed during the snake evolution.
approximation to define the contour from a set of control Images composed of multiple objects require initializa-
points. As shown in Fig. 5, the spline curve provides natu- tion of several independent snakes surrounding each
rally a smooth and continuous approximation of the object object. Multiple snakes are required because both the finite
contour. This property waives the requirement to include difference approximation and the splines prevents the
regularization terms in the energy function. Hence, the snake from changing its topology by splitting of one curve
complexity of the snake energy formulation is simplified. into two or merging of two curves into one. For topology
The complexity of the snake formulation can also be changing curves, we refer the reader to the article on the
reduced by using a greedy algorithm (4,5). The greedy Level Set Methods.
algorithms move the control points on an individual basis
by finding a set of local solutions to the regular snake BIBLIOGRAPHY
energy Equation (1). computing locally the energy at
each control point requires analytical equations to evaluate 1. M. Kass, A. Witkin, and D. Terzopoulos, Snakes: active contour
the snake regularity and curvature (5). An alternative models, Internation. Conf. of Comp. Vision, London, UK,
greedy formulation is to move each control point individu- pp.259268, 1987.
ally based on similarity in appearance between local 2. A. Blake and M. Isard, Active Contours: The Application of
regions defined inside and outside of the curve (4). Practi- Techniques from Graphics, Vision, Control Theory and Statis-
cally, if the appearance of the outside is similar to that of the tics to Visual Tracking of Shapes in Motion., New York:
inside, the control point is moved inside; if not, it is moved Springer, 2000.
outside. In either approach, the assumption is that each 3. J. Canny, A computational approach to edge detection, Putt.
local solution around a control point is correct and contri- that. Machine Intell., 8 (6): 679698, 1986.
butes to the global solution defined by the object boundary. 4. R. Ronfard, Region based strategies for active contour models,
Iternat. J. Comp. Vision, 13 (2): 229251, 1994.
5. D. Williams and M. Shah, A fast algorithm for active contours
DISCUSSION
and curvature estimation, Comp. Vision Graphics Imag. Pro-
cess, 55 (1): 1426, 1992.
The snakes framework has been very useful to overcome
the limitations of the segmentation and tracking methods
for cases when the features generated from the image are ALPER YILMAZ
not distinctive. In addition, its parametric form results in a The Ohio State University
Columbus, Ohio

Figure 5. Spline function estimated from four control points. The


gray lines denote the control polygons connecting the control
points.
C
COLOR PERCEPTION at these luminance levels, our visual acuity is extre-
mely poor. This specific property of the visual system
INTRODUCTION is a function of the low spatial density of the rod
photoreceptors in the foveal region of the retina.
Color as a human experience is an outcome of three con- 2. The cones are activated only at significantly higher
tributors: light, the human eye, and the neural pathways of luminance levels (about 10 lux and higher), at which
the human brain. Factors such as the medium through time, the rods are considered to be bleached. This type
which the light is traveling, the composition of the light of vision is referred to as photopic vision. The corre-
itself, and anomalies in the human eye/brain systems are sponding sensitivity function that corresponds to
important contributors. The human visual system, which luminance sensitivities is shown in Fig. 3. The green
includes the optical neural pathways and the brain, curve is called the luminous efficiency curve. In this
responds to an extremely limited part of the electromag- article we will consider photopic vision only. Inter-
netic (EM) spectrum, approximately 380 nm to 830 nm but estingly, the retinal density of the three types of cones
concentrated almost entirely on 400 nm to 700 nm. We are is not uniform across the retina; the S cones are more
blind, basically, to the rest of the EM spectrum, in terms of numerous than the L or M cones. The human retina
vision. For normal observers, this wavelength range has an L, M, S cone proportion as high as 40:20:1,
roughly corresponds to colors ranging from blue to red respectively, although some estimates (2,3) put them
(as shown in Fig. 1). The red end of the spectrum is at 12:6:1. This proportion is used accordingly in com-
associated with long wavelengths (toward 700 nm) and bining the cone responses to create the luminous
the blue end with short wavelengths (400 nm). efficiency curve. However, the impact of these propor-
tions to visual experiences is not considered a sig-
COLOR VISION nificant factor and is under investigation (4). What is
referred to as mesopic vision occurs at mid-luminance
The structure in the eye that enables color vision is the levels, when the rods and cones are active simulta-
retina, which contains the necessary color sensors. Light neously.
passes through the cornea, lens, and iris; the functionality 3. The pupillary opening, along with independently
of these is roughly comparable with the similar parts of scalable gains on the three cone output, permits
most common cameras. The pupillary opening functions in operation over a wide range of illuminant variations,
a fashion similar to the aperture in a camera and results in both in relative spectral content and in magnitude.
the formation of an upside-down image of the outside world 4. Color stimuli are different from color experiences. For
on the back face of the eye, the retinaa dense collection of the purposes of computational color science, the dif-
photoreceptors. Normal human color vision is enabled by ferences between color measurements and color
four different photoreceptors in the retina. They are called experiences sometimes may not be considered, but
the rods and the L, M, and S cones (for long, medium, and often the spatial and temporal relations among sti-
short wavelength sensitive); each has a different spectral muli need to be taken into account.
sensitivity within the range of approximately 400 nm to
700 nm (1). Figure 2 shows the (normalized) spectral sen- L, M, and S cone functions may be represented as a
sitivities of the cones. Note that color as we know it is function of wavelength as l(l), m(l), and s(l). In the pre-
specifically a human experience and that a different species sence of a light source (illuminant), represented by i(l), the
of animals respond differently to spectral stimuli. In other reflectance function of an arbitrary surface [described by
words, a bee would see the same spectral stimulus drama- r(l)] is modified in a wavelength-selective fashion to create
tically differently than a human would. In fact, bees are a stimulus ir(l) to the eye given by
known to have their spectral sensitivities shifted toward
the lower wavelengths, which gives them the ability to see ir l ilrl 1
ultraviolet light. The following salient points must be con-
sidered for a holistic understanding of human color percep- Let us denote the cone functions as a vector given by
tion:
lmsl ll; ml; sl 2
1. The rods are activated for vision at low luminance
levels (about 0.1 lux) at significantly lower spatial We denote the signals measured in the cones of the eye by
resolution than the cones. This kind of vision is called c [cl, cm, cs], given by
scotopic vision. The corresponding spectral sensitiv-
ity function is shown in Fig. 3. At these luminances, Z l 830 nm
normal humans do not have any perception of color. c lmslir ldl 3
l 380 nm
This lack is demonstrated easily by trying to look at a
colored painting at low luminance levels. Moreover,
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 COLOR PERCEPTION

Frequency Wavelength 1
(MHz) (nm) Scotopic Vision
0.9
Photopic Vision
Radio/TV
700nm 0.8
10 7 30m

Relative Sensitivity
0.7
3m
0.6
30cm
Radar 0.5
3cm
0.4
0.3cm
0.3

10 12 300um
0.2
30um
0.1
Infrared
3um
400 450 500 550 600 650 700 750 800
Visible
1015 0.3um Wavelength(nm)

300A Figure 3. Sensitivity functions for photopic and scotopic vision in


normal human observers.
Ultraviolet 30A

3A
charge-transfer compounds like sapphire; (4) energy-bands
19 0.3A 400nm in brass, gold, diamonds, and so on; and (5) geometric and
10
physical optical effects like interference, diffraction, scat-
tering, refraction, and so forth. The Nassau book on this
Figure 1. Electromagnetic spectrum, showing the limited range
topic is a thorough reference (5). In the case of emissive
of human vision and color perception.
sources of stimuli (e.g. traffic lights, or television sets),
Equation (3) is rewritten as
On an aside, although it is shown here that a color stimulus
Z l830 nm
is formed by the process of reflection of the spectral energy
i(l) of an illuminant off a surface r(l), it is only one man- c lmsleldl 4
l380 nm
ifestation of the cause of a color stimulus. The source for all
colors at an elemental level may be grouped into 15 basic where e(l) denotes the spectral stimulus that excites the
causes in five groups: (1) vibrations, rotations, and excita- cones.
tions, as in flames, neon lights, and so on; (2) ligand-field A glance at the L, M, and S cone functions in Fig. 2
effects in transition metal compounds like turquoise, clearly highlights that the three measurements c, resulting
including impurities, as in rubies or emeralds; (3) molecu- from stimulating these cones, is not going to reside in an
lar orbitals of organic compounds like chlorophyll and orthogonal three-dimensional color spacethere will be
correlation among L, M, and S. As a result of psychophy-
1 sical testing, it is understood that human color vision
L operates on the basis of opponent color theory, which
0.9 M was first proposed by Ewald Hering in the latter half of
S
0.8 the nineteenth century (2,6,7). Hering used a simple experi-
ment to provide the primary proof of opponent color pro-
Relative Sensitivity

0.7
cesses in the human visual system. An older hypothesis
0.6 about the human visual system (works of Hermann von
Helmholtz and James Maxwell in the mid-nineteenth cen-
0.5
tury) suggested that the human visual system perceives
0.4 colors in three independent dimensions (each correspond-
ing to the three known color-sensitive pigments in the eye,
0.3 roughly approximated by red, green, and blue axes).
0.2 Although conceptually correct, this hypothesis could not
explain some of the effects (unique hues and afterimages)
0.1 that Hering observed. In a series of published works, Her-
0
ing suggested that the visual system does not see colors as a
400 450 500 550 600 650 700 750 800 combination of red and green (a reddish-green color). In
Wavelength(nm) fact, a combination of a red stimulus with a green stimulus
produces no hue sensation at all. He suggested also that the
Figure 2. Cone sensitivity functions of normal human observers.
COLOR PERCEPTION 3

3
x 10
L M S 10 Luminance
RedGreen
YellowBlue
8

Normalized Sensitivity
6

Achromatic Red-Green Yellow-Blue 2

Figure 4. Weighted linear combinations of the L, M, S cone 0


stimulations result in opponent color functions and an achromatic
signal. 2

400 450 500 550 600 650 700 750 800


human visual system has two different chromatic dimen- Wavelength(nm)
sions (one corresponding to an orthogonal orientation of a
redgreen axis and another with a yellowblue axis), not Figure 5. Normalized functions showing resultant redgreen
three. These concepts have been validated by many and yellowblue sensitivities, along with the luminance channel.
researchers in the decades since and form the framework
of modern color theories. Similarly, staring at the bright set
of headlights of an approaching car leaves a black or dark viewing fields, whereas all of our color experiences are
image after the car passes by, which illustrates that based on complex images that involve complex illumination
humans also see colors along a luminance dimension settings. It is instructive, nonetheless, to visit some com-
(absence or presence of white.) This finding has formed mon local color appearance descriptors that do not take into
the backbone of modern color theory. Opponent color theory account spatial relationships such as the surroundings
suggests that at least at the first stage, human color vision around a viewed scene. The terminology used below is
is based on simple linear operations on the signals mea- used commonly in the color appearance work published
sured by the L, M, and S cones. In other words, from the L, by the Commission Internationale del Eclairage in its
M, and S cone stimulations c, three resulting signals are standard documents (e.g. See Ref. 9) and in some popular
computed that perform the task of reducing the interde- textbooks on this subject (2,10). Groups involved in color
pendence between the measurements, somewhat orthogo- ordering work and computational color technology, how-
nalizing the space and hence reducing the amount of ever, may define these terms differently based on their
information transmitted through the neural system from specific needs.
the eye to the brain (see Fig. 4). This functionality is enabled
by the extensive neural system in the retina of the eye. The Hue
opponent colors result in opponent cone functions (plotted
Hue is defined as the property of a color that describes it as a
in Fig. 5), which clearly suggests a fundamental conclusion
red, green, yellow, or blue or a combination of these unique
of modern human color perception research: The three
hues. By definition, grays are not associated with any hue.
independent axes are luminance, rednessgreenness,
A hue scale is defined typically as an angle. Figure 6 has
and yellownessblueness (8). In other words, we have three
magenta/violet hues at one end and reds at the other.
sets of opposing color perception: black and white, red and
green, and yellow and blue. In the figure, the redgreen
Brightness
process appears as it does because colors on the ends of the
spectrum appear similar (deep red is similar to purple) The property of a color that makes it appear to emit more or
the hue wraps around and often is portrayed in a circle. less light.
Not surprisingly, much of the field of color science has
been involved in trying to determine relationships between Lightness
stimuli entering the eye and overall color experiences. This
The property of a color that describes its brightness relative
determination requires the ability to isolate color stimuli
to that of the brightest white object in the visual field. A
not just from their spatial relationships but also from the
typical lightness scale is shown in Fig. 7.
temporal relationships involved. Additionally, it requires a
clear understanding of perceptual color appearance phe-
nomena. As data have become available via a variety of
experiments, the linear relationships between cone signals
and color specifications has needed to be revised into a
complex set of nonlinear relationships. Note that most color
Figure 6. A typical hue scale.
appearance phenomena have been developed for simplistic
4 COLOR PERCEPTION

Luminance

constant chroma constant hue


Figure 7. A typical lightness scale, with black at one end and the
brightest possible white at the other.
constant saturation
yellow-blue
Colorfulness
constant lightness
The property of a color that makes it appear more or less
chromatic.

Chroma red-green

The property of a color that describes its colorfulness


relative to the brightness of the brightest white object in
the visual field. In general, the relationship that exists
between brightness and lightness is comparable with the
relationship between colorfulness and chroma. Figure 8
shows a chroma scale for a hue of red and yellow. Note that Figure 10. Loci of constant hue, saturation, lightness, and
chroma shown in a perceptual color space.
in this example the chroma of yellows extends much farther
than that of reds, as yellows appear much brighter than
reds in nature and in most display systems. observed devoid of any relationships. This setup is typically
the only one where colors are unrelated and are associated
Saturation with attributes like brightness, hue, and saturation.
Related colors, on the other hand, are observed in relation-
The property of a color that describes its colorfulness in
ship with their surrounding and nearby colors. A simple
proportion to its brightness. A typical saturation scale
example involves creating an image with a patch of brown
(shown here for a red and yellow hue) is displayed in
color on a background with increasing white brightness,
Fig. 9. Note that by definition, saturation is normalized
from black to white. The brown color is observed as a bright
and hence unlike chroma; the same scale exists for both
yellow color when on a black background but as a muddy
reds and yellows (and for other hues as well).
brown on the brightest white background, which illustrates
To aid in understanding these properties, Fig. 10 shows
its relationship to the background (for neutral background
the locus of lines with constant hue, saturation, lightness,
colors). In practice, related colors are of great importance
and chroma if we fix the brightness of white. By definition,
and are associated with perceptual attributes such as hue,
saturation and hue are independent of the lightness of
lightness, and chroma, which are attributes that require
white.
relationships with the brightness of white. To specify a
color completely, we need to define its brightness, lightness,
Related and Unrelated Colors
colorfulness, chroma, and hue.
In its simplest form, a color can be assumed to be indepen-
dent of everything else in the viewing field. Consider, for Metamerism
illustrative purposes, a small patch of a color displayed in a
According to Equation (3) , if we can control the stimulus
dark room on a monitor with black background. This color is
that enters the eye for a given color, then to match two
colors we merely need to match their resulting stimulus
measurements c. In other words, two different spectra can
be made to appear the same. Such stimuli are called meta-
mers. If c1 c2, then
Z l 830 nm Z l 830 nm
Figure 8. A typical chroma scale for red and yellow, starting with
zero chroma on left and moving to maximum chroma on the right.
lmslir1 ldl lmslir2 ldl
l 380 nm l 380 nm
5

Different manifestations of the above equality carry differ-


ent names: observer, illuminant, and object metamer-
ism, depending on whether equal stimuli c result from
changing the sensor functions lms(l), the light i(l), or
the surface r(l). So, two completely different spectral sti-
muli can be made to generate the same cone stimuli for the
Figure 9. A typical saturation scale for red, starting with zero same observera property that color engineers in fields
saturation on the left and moving to a saturation of 1 for pure color ranging from textiles to televisions have considered a bles-
on the right. sing for decades, because changes of pigments, dyes, phos-
COLOR PERCEPTION 5

1 L
1.8 0
M
0
0.9 S
1.6 L
0

1
0.8 M
1
1.4

Relative Sensitivity
S
1
0.7
Relative Energy

1.2
0.6
1
0.5
0.8
0.4
0.6
0.3
0.4
0.2
r ()
0.1
1 0.2
r ()
2
i()
0 0
400 450 500 550 600 650 700 400 450 500 550 600 650 700

Wavelength(nm) Wavelength(nm)

Figure 11. Metameric reflectances r1(l) and r2(l). Although their Figure 12. Different observer cone functions showing observer
reflectance functions differ, under the illuminant i(l), their stimu- variances.
lation of the cones is identical and color perceived is the same.

phors, and color filters can achieve a consistent perception expected given the types of illuminants with which humans
of colors across various media. Equal colors are called have been most familiar.
metameric. Consider, for example, two color samples This ability is explained best by means of an example. As
that have reflectance functions r1(l) and r2(l), as in one walks out of a relatively dark movie theater to bright
Fig. 11. When plotted on a wavelength scale, it may appear afternoon sunlight, it takes only a few seconds for the visual
that these two reflectance functions must result in com- system to adapt to as much as two orders of magnitude
pletely different perceptions to the observer. However, if we change in the intensity of the illuminant, without change in
were to apply the same illuminant and observer sensitivity visual experience. Here, the cones are the dominant photo-
functions to these otherwise different colors, they result in receptors, and the rods have become bleached (unable to
identical colors being perceived by the eye. These two colors replenish their photopigments). This type of adaptation is
(reflectance functions) hence are called metamers, and this referred to as luminance or light adaptation. Similarly,
is an example of object metamerism. entering a dimly lit movie theater from the bright sunny
On a similar note, consider two patches of color with outdoors again requires time to adapt to the dark conditions,
reflectance functions r3(l) and r4(l) being viewed under after which our visual system has adapted well to the
identical illumination conditions by two different observers surroundings. This, however, takes slightly longer than
(observers whose cone functions are not the same), as in the former situation because now the rods need to become
shown in Fig. 12. One observer would view these patches active, requiring them to unbleach, which is a comparatively
as being the same (they are metameric), whereas the other longer process. This kind of adaptation is called dark adap-
would view this exact same pair as distinctly different tation. The ability to dark and light adapt gives us the ability
resulting in observer metamerism. This kind of metamer- to have reasonable visual capability in varying illuminant
ism is relatively common, because most, if not all, concepts conditions while taking maximal advantage of the otherwise
related to color are built around a standard or average limited dynamic range of the photoreceptors themselves.
observer, whereas in fact significant variation exists A second, and perhaps the most fascinating, mode of
between observers. The final type of metamerism, illumi- adaptation is called chromatic adaptation. This term refers
nant metamerism, consists of metameric colors that arise to the ability of the visual system to maintain color percep-
from the same observer and reflectance but different lights. tion under small, but significant, changes in the spectral
content of the illuminant. A newspaper seems to maintain
its mostly white background independent of whether we
Adaptation
look at it outdoors under an overcast sky, indoors under a
Arguably, the most remarkable capability of the human fluorescent lamp, or under an incandescent lamp. Consider
visual system is its ability to adapt to changes in the looking at a bowl of fruit that contains a red apple, a yellow
illuminant. This ability may be classified broadly as light- banana, and other fruit under an incandescent illuminant.
ness and chromatic adaptation. The resulting effect is that The apple will appear red and the banana yellow. Changing
despite changes in the spectral content of the light or its the illuminant to a typical fluorescent lamp, which greatly
absolute power, the visual system maintains quite constant alters the spectral content of the light, does not appear to
overall perception. However, certain limitations apply to change the color of the apple or the banana, after a few
these abilities; these changes are limited mainly to changes seconds of adaptation. The human visual system maintains
in natural illuminants and objects. This occurnance is to be its perception; our visual system has adapted chromati-
6 COLOR PERCEPTION

cally. Interestingly, our ability to adapt to changes in Simultaneous Lightness and Color Contrast
spectral content of the illuminant are limited mostly to
Consider an achromatic color placed in a relatively simple
changes in natural illuminants such as sunlight.
scene as shown in the upper half of Fig. 13. Both central
squares seem to have the same luminance. However, if we
Color Constancy
reduce the luminance of the background in one half and
The phenomenon of objects maintaining their appearance increase it in the other while keeping the same central
under varying illuminants is referred to as color constancy. achromatic patches as shown in the lower half of the figure,
For example, the appearance of a dress that looks red in the one patch appears brighter than the other although in fact
store might look nothing like a red under street lighting they have exactly the same luminance. This occurrence
(e.g., sodium-vapor lamps); the visual system cannot adapt may be attributed to the presence of reinforcing and inhi-
as well to a sodium-vapor lamp as it can to a fluorescent or biting ONOFF receptive fields that work locally to enhance
incandescent lamp; thus it inconsistently renders the differences. A similar phenomenon occurs when we change
perception of this dress fabric color. This subject is inter- the color of the background. The achromatic patches would
esting given the formation model described in Equation (3). seem to have the opponent color of the background and no
The information the eye receives from the object changes longer retain their achromatic nature. In Fig. 14, all four
with the illuminant athough, given the premise of color inner squares are the same achromatic color. However,
constancy, the net result of the visual system needs to stay each square contrasts with its surrounding, resulting in
the same. This occurrence is known however, to be untrue the appearance of opponent colors. Note that the upper left
for humans as we take informational cues from the color of square has a greenish tint, the upper right a bluish tint, the
the illuminant and perform some form of chromatic adap-
tation (11). The study of color constancy provides us with
clues that describe how the human visual system operates
and is used often by computational color technologists in
maintaining numerical color constancy.
Color inconstancy is a battle that textile and paint
manufacturers, camera and display manufacturers, and
printer manufacturers regularly have to fight because sig-
nificant changes may take place between illuminants in
retail stores and in the home or between hardcopy and on-
screen imaging. In each case, the color data reside in a
different color space with its own color appearance models.
Moreover, illuminants are difficult to control because we
typically have mixed illuminants (not just one specific type)
in whatever surrounding we are in.

After Images Figure 13. A simple example that demonstrates simultaneous


lightness contrast. Notice that the same gray patches as in the
When stimulated for an extended period of time by a strong upper half of the image seem to have different brightnesses when
stimulus, the human visual system adapts, and when the the background luminance is changed.
source of this stimulus is removed, a negative after image
appears for a short period of time, most commonly attrib-
uted to sensor fatigue. Many forms of after images have
been shown to be valid. The most commonly known type of
after images is the one formed via color responses, known as
chromatic after images. For example, if individuals fix their
gaze on a picture of a brightly colored set of squares for some
time and then a plain white stimulus is presented quickly to
the eye, the individuals experience a negative image of
corresponding opponent colors. Other forms of after images
and visual stimulus adaptation that may be of interest
to the reader have been demonstrated by Fairchild and
Johnson (12).

SIMPLE COLOR APPEARANCE PHENOMENA

Specifying a color merely by its physical attributes has its Figure 14. A simple example that demonstrates simultaneous
advantages but has drawbacks, too, when describing the color contrast. Notice that the same gray patches as in the upper
appearance of colors, especially in somewhat complex half of the image seem to have different hues when the background
scenes. We illustrate these difficulties via some examples. luminance is changed.
COLOR PERCEPTION 7

ena that are easy to observe and do not need in-depth study.
Color appearance phenomena are the primary drivers of
image quality assessments in the imaging industry. The
interested reader is referred to books on this topic included
in the Bibliography.

ORDER IN COLOR PERCEPTION

From the preceding sections on the various color appear-


ance terms, one may gather that many potential candidates
exist for ordering color perceptions. One means is based
on the somewhat-orthogonal dimensions of redness
greenness, yellownessblueness, and luminance. These
axes may be placed along Euclidean axes, as shown in
Fig. 16. Color spaces with such an ordering of axes form
the basis of all computational color science.
Another method for ordering color perceptions could
be based on hue, chroma, and lightness, which again
Figure 15. An example that demonstrates lightness crispening. could be placed along the Euclidean axes as in Fig. 17.
Notice that the difference between the gray patches in the white It turns out that the two orderings are related to each
and black backgrounds is hardly noticeable, but when the lightness other: The huechromalightness plot is simply another
of the background is in between that of the two patches the representation of the opponent-color plot. Such a rela-
appearance of the difference is accentuated. tionship was found also by extensive studies on color
orderings performed by Munsell in the early 1900s. In
his publications, Munsell proposed a color ordering in
which the spacing between each color and its neighbor
bottom left a yellowish tint, and the bottom right a reddish
would be perceived as equal. This resulted in a color space
tint.
referred to as the Munsell color solid, which to date is the
most organized, successful, and widely used color order
Lightness and Chromatic Crispening
system. Munsell proposed a notation for colors that spe-
The difference between two colors that are only slightly cifies their exact location in the color solid. A vertical
different is heightened if the color of the background that value (V) scale in ten steps denotes the luminance axis.
surrounds them is such that its color lies between those of Two color samples along the achromatic axis (denoted by
the two patches. Figure 15 illustrates this phenomenon for the letter N for neutrals) are ordered such that they are
lightness. Note that the difference between the two patches spaced uniformly in terms of our perception; for example,
is hardly noticeable when the background is white or black, a sample with a value of 4 would correspond to one that is
but when the luminance of the background is in between half as bright as one with a value of 8. Munsell defined
the colors of the patches, the difference is accentuated basic hues (H) of red (R), yellow (Y), green (G), blue (B),
greatly. and purple (P) and combinations (RP for red-purples and
Only a few color appearance phenomena have been so on) that traverse the circumference of a circle, as
addressed in this article. We have looked at some phenom- shown in Fig. 18. A circle of constant radius defines

Figure 16. A plot of lightness, rednessgreenness, and yellownessblueness ordered along Euclidean axes.
8 COLOR PERCEPTION

Figure 17. A plot of lightness, chroma, and hue ordered along the Euclidean axes.

Value

YG Y
GY
YR
G
RY

GB
N R

BG
RP

B
PR
BP P Chroma
PB

Figure 18. A plot of a constant value plane (left) that shows the various hue divisions of a constant chroma circle in the Munsell notation,
alongside a constant hue plane (right).

the locus of colors with the same chroma (C) or deviations W


from the achromatic axis.
Increasing radii denote higher chroma colors on an open-
ended scale. In this fashion, a color is denoted by H V/C
(Hue Value/Chroma). For example, 5GY6/10 denotes a hue Y
of 5GY (a greenyellow midway between a green and a G R
yellow) at value 6 and chroma 10. Most modern computa- B
tional color models and color spaces are based on the
fundamentals of the Munsell color order system.
The NCS color order system is another ordering scheme,
S
much more recent and gaining acceptance (13). The NCS
color ordering system is based on the work of the Hering
Figure 19. A schematic plot of the NCS color space.
opponent color spaces. The perceptual axes used in the
NCS are blacknesswhiteness, rednessgreenness, and
yellownessblueness; these colors are perceived as being
pure (see Fig. 19). The whitenessblackness describes the
yellow with 70% red in its mixture. A good reference that
z-dimension, whereas the elementary colors (red, green
details the history and science of color order systems was
yellow, and blue) are arranged such that they divide the xy
published recently by Kuehni (14).
plane into four quadrants. Between two unique hues, the
space is divided into 100 steps. A color is identified by its
blackness (s), its chromaticness (c), and its hue. For exam- CONCLUSIONS
ple, a color notated by 3050-Y70R denotes a color with a
blackness value of 30 (on a scale of 0 to 100), a chromatic- The multitide of effects and phenomena that need to be
ness of 50 (an open-ended scale), and a hue described as a explored in color vision and perception is profound. One
COLOR PERCEPTION 9

would imagine that color science, a field with such everyday 6. R. G. Kuehni, Color: An Introduction to Practice and Princi-
impact and so interwoven with spoken and written ples, 2nd ed. New York: Wiley-Interscience, 2004.
languages, would be understood thoroughly by now and 7. R. S. Berns, Billmeyer and Saltzman s Principles of Color
formalized. But the mechanisms of vision and the Technology, 3rd ed. New York: John Wiley & Sons, 2000.
human brain are so involved that researchers only have 8. P. K. Kaiser and R. Boynton, Human Color Vision, 2nd ed.
begun unraveling the complexities involved. Starting from Optical Society of America, 1996.
the works of ancient artisans and scientists and passing 9. Commission Internationale de l Eclairage, A Color Appearance
through the seminal works of Sir Issac Newton in the mid- Model for Colour Management Systems: CIECAM02. CIE Pub.
1600s to the works of the most recent researchers in this 159, 2004.
field, our knowledge of the complexities of color has 10. R. Hunt, The Reproduction of Colour, 6th ed. New York: John
increased greatly, but much remains to be understood. Wiley & Sons, 2004.
11. D. Jameson and L. Hurvich, Essay concerning color constancy,
Ann. Rev. Psychol., 40: 122, 1989.
BIBLIOGRAPHY 12. M. Fairchild and G. Johnson, On the salience of novel stimuli:
Adaptation and image noise, IS&T 13th Color Imaging Con-
1. G. Wyszecki and W. S. Stiles, Color Science: Concepts and ference, 2005, pp. 333338.
Methods, Quantitative Data and Formulae, 2nd ed. New 13. A. Hard and L. Sivik, NCS-natural color system: A Swedish
York: Wiley-lnterscience, 2000. standard for color notation, Color Res. Applicat., 6(3): 129138,
2. M. D. Fairchild, Color Appearance Models, 2nd ed. New York: 1981.
John Wiley & Sons, 2005. 14. R. G. Kuehni, Color Space and Its Divisions: Color Order from
3. A. Roorda and D. Williams, The arrangement of the three Antiquity to the Present. New York: Wiley-Interscience, 2003.
cone classes in the living human eye, Nature, 397: 520522,
1999.
4. D. Brainard, A. Roorda, Y. Yamauchi, J. Calderone, A. Metha, RAJEEV RAMANATH
M. Neitz, J. Neitz, D. Williams, and G. Jacobs, Consequences of Texas Instruments Incorporated
the relative numbers of 1 and m cones, J. Optical Society of Plano, Texas
America A, 17: 607614, 2000. MARK S. DREW
5. K. Nassau, The Physics and Chemistry of Color: The Fifteen Simon Fraser University
Causes of Color. New York: John Wiley & Sons, 1983. Vancouver, British Columbia,
Canada
C
CONTOUR TRACKING ments that lie on the locus of circles that are tangent to the
object contour at two or more points [see in Fig. 1(c)]. Use of
Object tracking is a fundamental area of research that finds the contour as a boundary condition requires explicit detec-
application in a wide range of problem domains including tion of the object and prohibits defining a cost function that
object recognition, surveillance, and medical imaging. The evolves an initial contour to its final configuration. Hence,
main goal of tracking an object is to generate a trajectory in the remainder of the text, we will discuss the contour-
from a sequence of video frames. In its simplest form, an based representation and related contour evolution
object trajectory is constituted from the spatial positions of techniques.
the object centroid and resides in a three-dimensional space A contour can be represented explicitly or implicitly.
defined by the image and time coordinates. In the case when Explicit representations define the underlying curve
the changes in the object size and orientation are tracked para-metrically and perform tracking by changing the
also, such as by a bounding box around the object, the parameters that, in turn, evolve the contour. Parametric
dimensionality of the trajectory is increased by two and representations require analytical expressions that provide
includes the scale and orientation, in addition to time and a means to compute the geometric features used during the
image dimensions. contour evolution. The most common parametric represen-
A trajectory in a higher dimensional space provides a tation in the context of contour tracking uses a set of control
more descriptive representation of the object and its points positioned on the object boundary. The use of differ-
motion. Depending on the application domain, an increase ent control points for different objects generates a unique
in the trajectory dimensionality may be desirable. For coordinate system for each object, which is referred to as the
instance, in the context of motion-based object recognition, Lagrangian coordinates [see Fig. 1(e)]. In the Lagrangian
a trajectory that encodes the changes in the object shape coordinates, the relations between the control points play an
over a time period increases the recognition accuracy. The important role for computing the geometric properties of the
additional information encoded in the trajectory also underlying curve. These relations can be realized by either
provides a means to identify the actions performed by the finite difference approximation or the finite element
the objects, such as sign language recognition, where the analysis. The finite difference approximation treats each
shape of the hands and their interactions define the sign control point individually and assumes that they are con-
language vocabulary. nected by lines. On the contrary, the finite element analysis
The most informative trajectory is the one that encodes defines the relations by a linear combination of a set of
the deformation in the object shape. This task requires functions referred to as the splines. The splines generate
tracking the area occupied by the object from one video continuous curves that have parametric forms. Their para-
frame to the next. A common approach in this regard is to metric nature permits the computation of the geometric
track the contour of an object, which is known also as the curve features analytically. The contour tracking in these
contour evolution. The contour evolution process is representations is achieved by moving the control points
achieved by minimizing a cost function that is constituted from one place to another. For more information, we refer
of competing forces trying to contract or expand the curve. the reader to the article on Snakes: Active Contours.
The equilibrium of the forces in the cost function concludes Contrary to the explicit representation, the implicit
the evolution process. These forces include regularization contour representations for different objects lie in the
terms, image-based terms, and other terms that attract the same Cartesian coordinates, namely the Eulerian coordi-
contour to a desired configuration. The latter of these terms nates (grid). The contour in the Eulerian coordinates is
traditionally encodes a priori shape configurations that defined based on the values for the grid positions. For
may be provided ahead of time. instance, one common approach used in fluid dynamics
research, which investigates the motion of a fluid in an
environment, is to use volumetric representation. In volu-
REPRESENTING THE OBJECT AND ITS CONTOUR metric representation, each grid is considered a unit
volume that is filled with water, such that inside the
The object contour is a directional curve placed on the contour (or surface in higher dimensions) the unit volumes
boundary of the object silhouette [see Fig. 1(c) and (d)] . are filled, whereas for outside they are empty. In the field of
The contours are used either in a contour-based represen- computer vision, the most common implicit representation
tation or in a boundary condition in a region-based repre- is the level-set method. In the level-set method, the grid
sentation. The region-based representation uses the positions are assigned a signed Euclidean distance from the
distance transform, Poisson equation, of the medial axis. closest contour point. This method is similar to the distance
The distance transform assigns each silhouette pixel with transformation discussed for representing regions, with
its shortest distance from the object contour (1). In a similar the difference of including a sign. The sign is used to label
vein, the Poisson equation assigns the mean of the inside and outside the contour, such that grid positions
distances computed by random walks reaching the object inside the closed contour are positive, whereas the outside
contour (2). The medial axis generates skeletal curve seg- grid positions are negative. The signed distances uniquely

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 CONTOUR TRACKING

Figure 1. Possible representations for the object shape given in (a):(b) object silhouette, (c) skeleton and (d) its contour. Representing the
contour by using (e) a set of control points in the Lagrangian coordinates and (f) level-sets in the Eulerian coordinates.

locate the contour, such that it resides on the zero-crossings govern the contour motion. In this model, the state variables
in the grid. The zero-crossings are referred to as the zero include the stiffness of the spring placed at each control
level-set. The evolution of the contour is governed by chan- point. Once the object state is estimated, a correction is made
ging the grid values based on the speed computed at each by evaluating the gradient magnitude from the image. Isard
grid position. For more information, we refer the reader to and Blake (5) model the shape and rigid motion by using two
the article on the Level-Set Methods. state variables that correspond to the spline parameters and
the affine motion. The image measurements used to correct
the estimated state include the edges in the image observed
THE STATE SPACE MODELS FOR CONTOUR TRACKING
in the normal direction to the contour [see Fig. 2(a)]. This
approach has been extended recently to include nonrigid
The state space models define the object contour by a set of
contour deformations that are computed after the rigid
states, X t : t 1; 2 . . .. Tracking then is achieved by updat-
object state is recovered (6).
ing the contour state in every frame:

X t f t X t1 W t 1 DIRECT MINIMIZATION OF THE COST FUNCTION

where Wt is the white noise. This update eventually max- The methods falling under this category iteratively evolve
imizes the posterior probability of the contour. The poster- the contour by minimizing an associated cost function. The
ior probability depends on the prior contour state and the cost function is constituted of the optical flow field or the
current likelihood, which is defined in terms of the image appearance observed inside and outside the object and is
measurements Zt. A common measurement used for con- minimized by a greedy algorithm or a gradient descent
tour tracking is the distance of the contour from the edges in method.
the image. The contour tracking based on the optical flow field
The state space models-based contour tracking involve exploits the constancy of the brightness of a pixel in time:
two major steps. The first step predicts the current location
of the contour, such as the new position of each control I t1 x; y  It x  u; y  v 0 2
point, and the second step corrects the estimated state,
according to the image observations. The state prediction where I is the imaging function, t denotes the frame num-
and correction is performed by using various statistical ber, and (u,v) is the optical flow vector. The optical flow
tools. Among others, the Kalman filtering and the particle during the contour evolution can be computed by searching
filtering are the most common statistical tools. Computa- for similar color in a neighborhood of each pixel (7). Once
tionally, the Kalman filter is more attractive because only the flow vectors for all the object pixels are computed, the
one instance of the object state is required to perform cost of moving the contour can be evaluated by accumulat-
prediction and correction. However, the Kalman filter ing the brightness similarities using Equation (2). Tracking
assumes that the object state is distributed by a Gaussian,
which may result in a poor estimation of the state variables
that are not Gaussian distributed. The particle filtering
overcomes this limitation by representing the distribution
of the object state by a set of samples, referred to as the
particles (3). Each particle has an associated weight that
defines the importance of that particle. Keeping a set of
samples for representing the current state requires main-
taining and updating all the instances during the correction
step, which is a computationally complex task.
Tracking the object contour using the state space
methods involves careful selection of the state variables
that represent the object shape and motion. For this pur- Figure 2. Edge observations along the contour normals.
pose, Terzopoulos and Szeliski (4) use a spring model to (Reprinted with permission from the IEEE.)
CONTOUR TRACKING 3

Figure 3. Tracking results of the methods proposed in (a) Ref. 7, (b) Ref. 8, and (c) Ref. 9. (Reprinted with permission from the IEEE.)

results of this approach are shown in Fig. 3(a). An alter- THE SHAPE PRIORS
native approach to computing the optical flow is to adopt a
morphing equation that morphs the intensities in the pre- Including a shape model in the contour cost function
vious frame to the intensities in the current frame (8). The improves the estimated object shape. A common approach
intensity morphing equation, however, needs to be coupled to generate a shape model of a moving object is to estimate
with a contour tracking function, such that the intensities the shape distribution associated with the contour defor-
are morphed for the contour pixels in the previous and the mations from a set of contours extracted online or off line.
current frame. The speed of the contour is computed accord- The shape distribution can be in the form of a Gaussian
ing to the difference between the intensities of the distribution, a set of eigenvectors, or a kernel density
corresponding pixels. For instance, if the difference is estimate. The cost function associated with these distribu-
high, then the contour moves with the maximum speed tions contains contour probabilities conditioned on the
in its normal direction and while the morphing function is estimated shape distribution.
evaluated by considering the new position of the contour. For the explicit contour representations, the shape
The tracking results using this approach are shown in model is generated using the spatial-position statistics of
Fig. 3(b). The cost function based on the optical flow also the control points. A simple shape prior in this context is to
can be written in terms of the common motion constraint use a Gaussian distribution (10):
(10). The common motion constraint assumes that the
motion inside the contour is homogenous, such that the 1 xi  mxi 2 yi  myi 2
contour is evolved to a new position if the difference pxi p exp  3
s 2p 2s 2xi 2s 2yi
between neighboring motion vectors is high.
In contrast to the cost functions using brightness
where m denotes the mean, s denotes the standard devia-
constancy, the statistics computed inside and outside the
tion, and xi xi ; yi is the position of the ith control point.
object contour impose a less strict constraint. An important
Before modeling, this approach requires registration of the
requirement of statistics-based methods is the initialization
contours to eliminate the translational effects. Registration
of the contour in the first frame to generate the appearance
can be performed by mean normalization of all the contours.
statistics. Region statistics can be computed by piecewise
An alternative shape model can be computed by apply-
stationary color models generated from the subregions
ing the principal component analysis (PCA) to the vectors of
around each control point (11). This model can be extended
the control points. The PCA generates a new coordinate
to include the texture statistics generated from a band
system that emphasizes the differences between the con-
around the contour (9). Using a band around the contour
tours, such that selecting a subset of principal components
combines image gradient-based and region statistics-based
(eigenvectors with the highest eigenvalues) models the
contour tracking methods into a single framework, such
underlying contour distribution. Given an input contour,
that when the width of the band is set to one, the cost
the distance is computed by first reconstructing the input
function is evaluated by image gradients. The contour
using a linear combination of the selected principal com-
tracking results using region statistics is shown in Fig. 3(c).
ponents and then evaluating the Euclidean distance
4 CONTOUR TRACKING

Figure 4. (ae) A sequence of level-sets generated from walking action. (f) Mean level-set and (g) standard deviation level-set. (h) Tracking
results for occluded person using the shape model given in (f) and (g). (Reprinted with permissions from the IEEE.)

between the input vector and the reconstructed contour. surfaces. The implicit representation, however, requires
The weights in the linear combination are computed by re-initialization of the grid at each iteration, which makes it
projecting the input contour to the principal components. a computationally demanding procedure compared with an
The shape priors generated for implicit contour explicit representation.
representations do not model explicitly the contour shape. The choice of the cost function is another important step
This property provides the flexibility to model the objects in the design of a contour tracker and is independent of the
with two or more split regions. Considering the level-set contour representation. The cost functions traditionally
representation, which defines the contour by zero crossings include terms related to the contour smoothness, image
on the level-set grid, a shape model can be generated by observations, and additional constraints. Among these
modeling distance values in each grid position by a Gaussian three terms, recent research concentrates on developing
distribution (9). This modeling two level-set functions for cost functions that effectively use the image observations
each set of contours, as shown in Fig. 4(ag), that correspond while adding additional constraints such as shape priors.
to the mean and the standard deviation of the distances from Especially, the research on the use of innovative constraints
the object boundary. to guide the evolution of the contour is not concluded. One
such constraint is the use of shape priors, which becomes
eminent in the case of an occlusion during which parts of the
DISCUSSION
tracked object are not observed. Improved tracking during
an occlusion is shown in Fig. 4(h) where using the shape
Compared with tracking the centroid, a bounding box, or a
priors successfully resolves the occlusion.
bounding ellipse, contour tracking provides more detailed
As with other object tracking approaches, in a contour
object shape and motion that is required in certain applica-
tracking framework, the start or end of an object trajectory
tion domains. For instance, the contour trackers commonly
plays a critical role in its application to real-world
are used in medical imaging, where a more detailed ana-
problems. The starting of a contour trajectory requires
lysis of the motion of an organ, such as the heart, is
segmentation of the object when it first is observed. The
required. This property, however, comes at the expense
segmentation can be performed by using a contour segmen-
of computational cost, which is evident from the iterative
tation framework, as discussed in the chapter on Level-Set
updates performed on all the grid positions or the control
Methods, or by using the background subtraction method,
points, depending on the contour representation chosen. In
which labels the pixels as foreground or background
cases when the domain of tracking does not tolerate high
depending on their similarity to learned background
computational costs, such as real-time surveillance, the
models. Most segmentation approaches, however, do not
contour trackers may be less attractive. This statement,
guarantee an accurate object shape and, hence, may result
however, will change in coming years, considering the
in poor tracking performance.
ongoing research on developing evolution strategies that
will have real-time performance (12).
The design of a contour tracker requires the selection of a BIBLIOGRAPHY
contour representation. Depending on the application
domain, both the implicit and explicit representations 1. A. Rosenfeld and J. Pfaltz, Distance functions in digital pic-
have advantages and disadvantages. For instance, tures, in Pattern Recognition, vol. l. 1968, pp. 3361.
although the implicit representations, such as the level- 2. L. Gorelick, M. Galun, W. Sharon, R. Basri, and A. Brandt,
set method, inherently can handle breaking and merging of Shape representation and classification using the poisson
the contours, the explicit representations require including equation, IEEE Conf. an Computer Vision and Pattern Recog-
complex mechanisms to handle topology changes. In addi- nition, 2004.
tion, the implicit representations naturally extend tracking 3. H. Tanizaki, Non-gaussian state-space modeling of nonsta-
two-dimensional contours to three or more-dimensional tionary time series, J. American Statistical Association, 82:
10321063, 1987.
CONTOUR TRACKING 5

4. D. Terzopoulos and R. Szeliski, Tracking with kalman snakes, IEEE Trans. on Pattern Analysis and Machine Intelligence,
in A. Blake and A. Yuille (eds.) Active Vision. MIT Press, 1992. 26(11): pp. 15311536, 2004.
5. M. Isard and A. Blake, Condensationconditional density 10. D. Cremers and C. Schnorr, Statistical shape knowledge in
propagation for visual tracking, Int. Jrn. on Computer Vision, variational motion segmentation, Elsevier Jrn. on Image and
29(1): 528, 1998. Vision Computing, 21: pp. 7786, 2003.
6. J. Shao, F. Porikli, and R. Chellappa, A particle filter based 11. R. Ronfard, Region based strategies for active contour models.
non-rigid contour tracking algorithm with regulation, Int. Int. Jrn. on Computer Vision, 13(2): pp. 229251, 1994.
Conf. on Image Processing, 2006, pp. 3441. 12. Y. Shi and W. Karl, Real-time tracking using level sets, IEEE
7. A. Mansouri, Region tracking via level set pdes without motion Conf. on Computer Vision and Pattern Recognition, 2005, pp.
computation, IEEE Trans. on Pattern Analysis and Machine 3441.
Intelligence, 24(7): pp. 947961, 2002.
8. M. Bertalmio, G. Sapiro, and G. Randall, Morphing active
contours, IEEE Trans. on Pattern Analysis and Machine Intel- ALPER YILMAZ
ligence, 22(7): pp. 733737, 2000. The Ohio State University
9. A. Yilmaz, X. Li, and M. Shah, Contour based object tracking Columbus, Ohio
with occlusion handling in video acquired using mobile cameras,
E
EDGE DETECTION IN GRAYSCALE, COLOR, show one-dimensional profiles of step, line, ramp, and roof
AND RANGE IMAGES edge, respectively.

INTRODUCTION
EDGE DETECTION METHODS IN GRAY-LEVEL IMAGES
In digital images, edge is one of the most essential and
Because edges are, based on the definition, image pixels
primitive features for human and machine perception; it
that have abrupt changes (or discontinuities) in image
provides an indication of the physical extent of objects in
intensity, the derivatives of the image intensity function
an image. Edges are defined as significant local changes
(10) can be used to measure these abrupt changes. As shown
(or discontinuities) in brightness or color in an image.
in Fig. 2(a) and (b), the first derivative of the image inten-
Edges often occur at the boundaries between two differ-
sity function has a local peak near the edge points. There-
ent regions. Edge detection plays an important role in
fore, edges can detect by thresholding the first derivative
compute vision and image processing. It is used widely as
values of an image function or by the zero-crossings in the
a fundamental preprocessing step for many computer
second derivative of the image intensity as shown in
vision applications, including robotic vision, remote sen-
Fig. 2(c).
sing, fingerprint analysis, industrial inspection, motion
Edge detection schemes based on the derivatives of
detection, and image compression (1,2). The success of
the image intensity function are very popular, and they
high-level computer vision processes heavily relies on the
can be categorized into two groups: gradient-based and
good output from the low-level processes such as edge
zero-crossing-based (or called Laplacian) methods. The
detection. Because edge images are binary, edge pixels
gradient-based methods find the edges by searching for
are marked with value equal to 1, whereas others are
the maxima (maximum or minimum) in the first
0; edge detection sometimes is viewed as an informa-
derivatives of the image function. The zero-crossing
tion reduction process that provides boundary informa-
(Laplacian) methods detect the edges by searching for
tion of regions by filtering out unnecessary information
the zero crossings in the second derivatives of the image
for the next steps of processes in a computer vision
function.
system (3).
Many edge detection algorithms have been proposed in
the last 50 years. This article presents the important edge Gradient-Based Edge Detection
detection techniques for grayscale, color, and range images.
An edge is associated with a local peak in the first deriva-
tive. One way to detect edges in an image is to compute the
EDGE AND EDGE TYPES gradient of local intensity at each point in the image. For an
image, f(x, y) with x and y, the row and the column coordi-
Several definitions of edge exist in computer vision lit- nates, respectively, its two-dimensional gradient is defined
erature. The simplest definition is that an edge is a sharp as a vector with two elements:
discontinuity in a gray-level image (4). Rosenfeld and
2 3
Kak (5) defined an edge as an abrupt change in gray level @f x; y
 
or in texture where one region ends and another begins. Gx 6 @x 7
G 6 7
4 @f x; y 5
An edge point is a pixel in an image where significant Gy
local intensity change takes place. An edge fragment is an @y
edge point and its orientation. An edge detector is an  
f x dx; y  f x; y=dx
algorithm that produces a set of edges from an image. The 1
f x; y dy  f x; y=dy
term edge is used for either edge points or edge frag-
ments (68).
where Gx and Gy measure the change of pixel values in the
Edge types can be classified as step edge, line edge, ramp
x- and y-directions, respectively. For digital images, dx
edge, and roof edge (7 9 ). Step edge is an ideal type that
and dy can be considered in terms of number of pixels
occurs when image intensity changes significantly from one
between two points, and the derivatives are approxi-
value on one side to a different value on the other. Line
mated by differences between neighboring pixels. Two
edges occur at the places where the image intensity changes
simple approximation schemes of the gradient for
abruptly to a different value, stays at that value for the next
dx dy 1 are
small number of pixels, and then returns to the original
value. However, in real-world images, step edge and line
Gx  f x 1; y  f x; y ; Gy  f x; y 1  f x; y
edge are rare because of various lighting conditions and
Gx  f x 1; y f x1; y; Gy  f x; y1  f x; y  1
noise introduced by image-sensing devices. The step edges
often become ramp edges, and the line edges become the 2
roof edges in the real-world image (7,8). Figure 1(a)(d)

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES

Two important quantities of the gradient are the mag-


nitude and the direction of the gradient. The magnitude of
the gradient Gm is calculated by
q
(a) step edge (b) line edge Gm G2x G2y 3

To avoid the square root computation, the gradient mag-


nitude is often approximated by

Gm  jGx j jGy j or 4
(c) ramp edge (d) roof edge

Figure 1. One-dimensional profiles of four different edge types. Gm  maxjGx j; jGy j 5

The direction of the gradient is given by


8  
These derivative approximation schemes are called the > 1 Gy
first difference and the central difference, respectively. >
< tan if Gx 6 0
G x
The convolution masks for the first difference and the ug 6
>
> 00 if Gx 0 \ Gy 0
central difference can be represented as follows, respec- : 0
90 if Gx 0 \ Gy 6 0
tively (11):
    where the angle ug is measured with respect to the x-axis.
1 0 1 1
Gx ; Gy ; In general, a gradient-based edge detection procedure
1 0 0 0 consists of the following three steps:
2 3 2 3
0 1 0 0 0 0
6 7 6 7 1. Smoothing filtering: Smoothing is used as a prepro-
Gx 4 0 0 0 5; Gy 4 1 0 15
cessing step to reduce the noise or other fluctua-
0 1 0 0 0 0
tions in the image. Gaussian filtering (1013) is a
well-known low-pass filter, and s parameter con-
The first difference masks cause the edge location bias
trols the strength of the smoothing. However,
because the zero crossings of its vertical and horizontal
smoothing filtering can also blur sharp edges,
masks lie at different positions. On the other hand, the
which may contain important features of objects
central difference masks avoid this position mismatch
in the image.
problem because of the common center of horizontal
and vertical masks (11). Many edge detectors have 2. Differentiation: Local gradient calculation is imple-
been designed using convolution masks using 3  3 mented by convolving the image with two masks, Gx
mask sizes or even larger. and Gy, which are defined by a given edge detector.
Let us denote the convolution of a mask Mkxk and an

150

100
f(x)

50
(a)
0

50
Threshold
x2 x3
f'(x)

0
x0 x1
Threshold
(b)
50

20 Zero Crossing Zero Crossing


Figure 2. Edge detection by the deriva-
f"(x)

tive operators: (a) 1-D profile of a smoothed 0


step edge, (b) the first derivative of a step
edge, and (c) the second derivative of a step 20
edge. (c) 40
EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES 3

image fmxn as Nmxn. For every pixel (i, j) in the image f, The main advantage of using Roberts cross edge opera-
we calculate: tor is its fast computational speed. With a 2  2 convolu-
tion mask, only four pixels are involved for the gradient
Ni; j M f i; j computation. But the Roberts cross edge operator has
k k
several undesirable characteristics. Because it is based
X
2 X
2
on the first difference, its 2  2 diagonal masks lie off grid
M k1; k2  f i k1; j k2 7 and cause edge location bias. The other weak points
k2k2 k1k2
are that it is sensitive to noise and that its response to
the gradual( or blurry) edge is weak. Figure 3(b)(g) show
for 1  i  m; 1  j  n the Roberts cross edge maps with various threshold
values. The experiment shows that the Roberts cross
3. Detection: Detecting edge points based on the local edge detector is sensitive to the noise with low threshold
gradients. The most common approach is to apply a values. As the threshold value increases, noise pixels are
threshold to image gradients. If the magnitude of the removed, but also real edge pixels with weak response are
gradient of an image pixel is above a threshold, the removed (11).
pixel is marked as an edge. Some techniques such as
the hysteresis method by Canny (3) use multiple Prewitt Edge Operator. The Prewitt edge operator uses
thresholds to find edges. The thinning algorithm is the central difference to approximate differentiation. Two
also applied to remove unnecessary edge points after Prewitt convolution masks at x- and y-directions are shown
thresholding as necessary (14,15). below:
2 3 2 3
Roberts Cross Edge Detector. The Roberts cross edge 1 0 1 1 1 1
14 1
detector is the simplest edge detector. It rotated the first Gx 1 0 1 5; Gy 4 0 0 05
3 3
difference masks by an angle of 458. Its mathematic expres- 1 0 1 1 1 1
sions are (10,12)
Because it has the common center of Gx and Gy masks, the
Gx f x; y 1  f x 1; y;
Prewitt operator has less edge-location bias compared with
Gy f x; y  f x 1; y 1 8 the first difference-based edge operators. It also accom-
plishes noise reduction in the orthogonal direction by
Gx and Gy can be represented in the following convolution means of local averaging (11).
masks: The local gradient at pixel (x, y) can be estimated by
    convolving the image with two Prewitt convolution
0 1 1 0 masks, G x and G y, respectively. Mathematically we
Gx ; Gy
1 0 0 1 have

These two convolution masks respond maximally to edges


1
in diagonal directions (458) in the pixel grid. Each mask Gx f x  1; y 1 f x; y 1 f x 1; y 1
is simply rotated 908 from the other. The magnitude of 3
f x  1; y  1 f x; y  1 f x 1; y  1
the gradient is calculated by Equation (3). To avoid the 1
square root computation, the computationally simple form Gy f x 1; y  1 f x 1; y f x 1; y 1
3
of the Robert cross edge detector is the Roberts absolute f x  1; y  1 f x  1; y f x  1; y 1
value estimation of the gradient given by Equation (4). 9

Figure 3. Roberts cross edge maps by


using various threshold values: as thresh-
old value increases, noise pixels are
removed, but also real edge pixels with
weak responses are removed.
4 EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES

Figure 4. Prewitt edge maps: (a) original


image, (b) vertical edge map generated by
Gx, (c) horizontal edge map generated by
Gy, and (d) complete edge map, T 15.

The Prewitt operators can be extended to detect edges Figure5(j)(l) show the edge detection results generated
tilting at 458 and 1358 by using the following two by the Sobel edge detector with the threshold value, T 20.
masks. Figure 5 also shows the performance analysis of each
gradient-based edge detector in the presence of noises.
2 3 2 3
1 1 0 0 1 1 To evaluate the noise sensitivity of each edge detector,
4 1 0 1 5; 4 1 0 1 5 5% and 10% Gaussian noise are added into the original
0 1 1 1 1 0 image as shown in Fig. 5(b) and (c), respectively. For fair
comparisons, a fixed threshold value is used (T 20) for all
edge detectors. Figure 5(e) and (f) show that the Roberts
Figure 4(b) shows the vertical edge map generated by
cross edge detector is sensitive to noises. On the other hand,
the Prewitt Gx mask, and the horizontal edge map gener-
the Sobel and the Prewitt edge detectors are less sensitive
ated by the Prewitt Gy mask is shown in Fig. 4(c). Combin-
to noises. The Sobel operators provide both differencing and
ing these two horizontal and vertical edge maps, the
smoothing effects at the same time. Because of these char-
complete edge map is generated as shown in Fig. 4(d).
acteristics, the Sobel operators are widely used for edge
extraction. The smoothing effect is achieved through the
Sobel Edge Detector. The Sobel gradient edge detector is
involvement of 3  3 neighbors to make the operator less
very similar to the Prewitt edge detector except it puts
sensitive to noises. The differencing effect is achieved
emphasis on pixels close to the center of the masks. The
through the higher gradient magnitude by involving
Sobel edge detector (10,12) is one of the most widely used
more pixels in convolution in comparison with the Roberts
classic edge methods. Its x- and y-directional 3  3 con-
operator. The Prewitt operator is similar to the Sobel edge
volution masks are as follows:
detector. But the Prewitt operators response to the diag-
2 3 2 3 onal edge is weak compared with the response of the Sobel
1 0 1 1 2 1
14 1 edge operator. Prewitt edge operators generate slightly less
Gx 2 0 2 5; Gy 4 0 0 05
4 4 edge points than do Sobel edge operators.
1 0 1 1 2 1
Non-Maximum Suppressiona Postprocessing After Gra-
The local gradient at pixel (x,y) can be estimated by dient Operation. One difficulty in gradient edge detectors
convolving the image with two Sobel convolution masks, (and also in many other edge detectors) is how to select
Gx and Gy, respectively, the best threshold (16) used to obtain the edge points. If
the threshold is too high, real edges in the image can be
1 missed. If the threshold is too low, nonedge points such as
Gx f x  1; y 1 2f x; y 1 f x 1; y 1
4 noise are detected as edges. The selection of the threshold
f x  1; y  1 2  f x; y  1 f x 1; y  1 critically affects the edge output of an edge operator.
1
Gy f x 1; y  12f x 1; y f x 1; y 1 Another problem related with the gradient edge detectors
4 is that edge outputs from the gradient-based method
f x  1; y  1 2  f x  1; y f x  1; y 1
appear to be several pixels wide rather than a single pixel
10
(see Figs. 35). This problem is because most edges in the
real-world images are not step edges and the grayscales
The Sobel operator puts more weights on the pixels near the
around the edges change gradually from low to high
center pixel of the convolution mask. Both masks are applied
intensity, or vice versa. So a thinning process such as
to every pixel in the image for the calculation of the gradient
nonmaximum suppression (14,15,1719) may be needed
at the x- and y-directions. The gradient magnitude is calcu-
after the edge detection.
lated by Equation (3). The Sobel edge detectors can be
The method of nonmaximum suppression is used to
extended to detect edges at 458 and 1358 by using the two
remove weak edges by suppressing the pixels with non-
masks below:
maximum magnitudes in each cross section of the edge
2 3 2 3 direction (15). Here, we introduce the algorithm proposed
2 1 0 0 1 2 by Rosenfeld and Thursten(14,15,1719). Let u(i) denote
4 1 0 1 5; 4 1 0 1 5 the edge direction at pixel i, and let Gm(i) denote the
0 1 2 2 1 0 gradient magnitude at i.
EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES 5

Figure 5. Performance evaluation in the presence of noises for gradient-based edge operators: (a) original image, (b) add 5% Gaussian noise,
(c) add 10% Gaussian noise, (d)(f) Roberts edge maps, (g)(i) Prewitt edge maps, and (j)(l) Sobel edge maps. Used the same threshold
(T 20) for fair comparisons.

Step 0: For every edge point, p(x,y), do the following after the nonmaximum suppression is applied to the edge
steps. images in Fig. 5(c) and (f), respectively. Figure 5(d) gener-
Step 1: Find two nearest neighboring pixels q1 and q2 ated 71.6% less edge pixels compared with the edge pixels in
that are perpendicular to the edge direction Fig. 5(c). Figure 5(g) has 63.6% less edge pixels compared
associated with the edge pixel p. with the edge pixels in Fig. 5(f). In our experiments, more
Step 2: If (ju p  uq1 j  a and ju p  uq2 j  a), than 50% of the edge points that were generated by the
then go to Step 3 else return to Step 0. gradient-based edge operator are considered as nonlocal
maximal and suppressed.
Step 3: If (Gm p  Gm q1 or Gm p  Gm q2 ), then
suppress the edge at pixel p.
Second-Derivative Operators
Figure 6(a) shows how to choose q1 and q2 when edge The gradient-based edge operators discussed above produce
direction at pixel p is vertical (top-to-down), which is shown a large response across an area where an edge presents. We
in an arrow. Four edge directions are often used in the use an example to illustrate this problem. Figure 2(a) shows
nonmaximum suppression method: 08, 458, 908, and 1358, a cross cut of the smooth step edge, and its first derivative (or
respectively, and all edge orientations are quantized to gradient) is shown in Fig. 2(b). After a threshold is applied to
these four directions. Figure 5(d) and (g) shows the results the magnitude of the gradient and to all pixels above the
6 EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES

Figure 6. Experiments with nonmaximum suppression: (a) an example of how to select q1, and q2 when edge direction is top-to-down, (b) and
(e) original input images, (c) and (f) Sobel edge maps (T 20) before nonmaximum suppression, and (d) and (g) edge maps after nonmaximum
suppression is applied to (c) and (f), respectively.

threshold, for example, the pixels in Fig. 2(b) between This approximation is centered at the pixel (x 1, y). By
x0  x1 and x2  x3 are considered as edge points. As a replacing x 1 with x, we have
result, too many edge points occur, which causes an edge
2 3
localization problem: Where is the true location of the edge? 1
@ 2 f x; y 42 5
Therefore, a good edge detector should not generate f x 1; y  2 f x; y f x  1; y
multiple responses to a single edge. To solve this problem, @x2 1
the second-derivative-based edge detectors have been
developed. Similarly,

Laplacian Edge Detector. The Laplacian of a function @ 2 f x; y


f(x, y) is given by Equation (11) f x; y 1  2 f x; y f x; y  1
@y2

@ 2 f x; y @ 2 f x; y 1 2 1 13
r2 f x; y 11
@x2 @y2
By combining the x and y second partial derivatives, the
Because the Laplacian edge detector defines an edge as the
Laplacian convolution mask can be approximated as fol-
zero crossing of the second derivative, a single response is
lows:
generated to a single edge location as observed in Fig. 2(c).
The discrete Laplacian convolution mask is constructed as 2 3 2 3
follows: 1 0 1 0
For a digital image, Gx is approximated by the difference r f x; y 42 5 1 2
2
1  4 1 4 1 5
1 0 1 0
@ f x; y
Gx  f x 1; y  f x; y; so
@x
Other Laplacian convolution masks are constructed
similarly by using the different derivative estimation
  and different mask size (11). Two other 3  3 Laplacian
@ 2 f x; y @ @f x; y @Gx a f x 1; y f x; y
 masks are
@x2 @x @x @x @x
af x 1; y @f x; y 2 3 2 3
 1 1 1 1 2 1
@x @x 4 1 8
f x 2; y f x1; y f x 1; y f x; y 1 5 or 4 2 4 2 5
f x 2; y  2 f x 1; y f x; y 1 1 1 1 2 1
12
EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES 7

After the convolution of an image with a Laplacian mask, Then, the Laplacian (the second derivative) of the con-
edges are found at the places where convolved image values volved image S is obtained by
change sign from positive to negative (or vice versa) passing
through zero. The Laplacian edge detector is omnidirec- r2 Sx; y r2 Gx; y  f x; y
tional (isotropic), and it highlights edges in all directions.
Another property of the Laplacian edge detector is that it r2 Gx; y  f x; y 15
generates closed curves of the edge contours. But the Lapla-
cian edge detector alone is seldom used in real-world com-
puter vision applications because it is too sensitive to image The computation order of Laplacian and convolution
noise. As shown in Fig. 7(c), the very small local peak in the operations can be interchanged because these two opera-
first derivative has its second derivative cross through zero. tions are linear and shift invariant (11) as shown in Equa-
The Laplacian edge detector may generate spurious edges tion (15). Computing the Laplacian of the Gaussian filtered
because of image noise. To avoid the effect of noise, a image r2 Gx; y  f x; y yields the same result with con-
Gaussian filtering is often applied to an image before the volving the image with the Laplacian of the Gaussian filter
Laplacian operation. (r2 Gx; y  f x; y). The Laplacian of the Gaussian filter
r2 Gx; y is defined as follows:
Marr HildrethLaplacian of Gaussian. Marr and Hil-  2 2  x2 y2
dreth (13) combined the Gaussian noise filter with the 1 1  x y e 2s2
LoGx; y r2 Gx; y ps 16
4
Laplacian into one edge detector called the Laplacian of 2s2
Gaussian (LoG). They provided the following strong argu-
ment for the LoG: where s is the standard deviation, which also determines
the spatial scale of the Gaussian. Figure 8(a) shows a one-
1. Edge features in natural images can occur at various dimensional (1-D) LoG profile and (b) shows a 2-D LoG
scales and different sharpness. The LoG operator can profile. A 2-D LoG operation can be approximated by a
be applied to detecting multiscales of edges. convolution kernel. The size of the kernel is determined by
2. Some form of smoothing is essential for removing the scale parameter s. A discrete kernel that approximates
noise in many real-world images. The LoG is based the LoG with s 1.4 is shown in Fig. 9. In summary, edge
on the filtering of the image with a Gaussian smooth- detection using the LoG consists of the following two steps:
ing filter. The Gaussian filtering reduces the noise
sensitivity problem when zero crossing is used for 1. Convolve the image with a 2-D LoG mask at a selected
edge detection. scale s.
3. A zero crossing in the LoG is isotropic and corre- 2. Consider as edges only those zero-crossing pixels
sponds to an extreme value in the first derivative. whose corresponding first derivatives are above a
threshold. To find a zero crossing, we need to check
Theoretically the convolution of the input image f(x,y) four cases for the signs of the two opposing neighbor-
with a two-dimensional (2-D) Gaussian filter G(x,y) can be ing pixels: up/down, right/left, and the two diagonals.
expressed as
Note that results of edge detection depend largely on
Sx; y Gx; y  f x; y; where Gx; y the s value of the LoG. The convolution mask is larger for
1 x2 y2 a larger s, which is suitable for detecting large-scale
p e s2 14 edges. Figure 10 shows edge maps generated by the
2ps

150

100
f(x)

50

(a) 0
30
20
10
f'(x)

0
10
(b) 20
40 Figure 7. Illustration of spurious edges
Zero crossing generated by zero crossing: (a) 1-D profile
20
of a step edge with noise, (b) the first deri-
f"(x)

0 vative of a step edge, and (c) the second


x0 x2 x3 x4 derivative of a step edge. The zero crossing
x1
20
of f(x) creates several spurious edges points
(c) 40 (x0, x1, x2, and x3).
8 EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES

x 103
1
0
4 2 2 4
0.5 1
2
1
3
1.5 4
4
2 2
2 0 0
2 2
4 y
X
Figure 8. (a) a 1-D LoG profile and (b)
a 2-D LoG profile. (a) (b)

LoG operator with various scales. Figure 10(b)(e) show 2. Good detection with low error rate: An optimal edge
the LoG edge maps with s 1.0, 1,5, 2.0, and 2.5, respec- detector should respond only to true edges. In other
tively. In Fig. 10(f), two different scales s1 0.7, s2 2.3 words, no spurious edges should be found, and true
are used, and the result is obtained by selecting the edge edges should not be missed.
points that occurred in both scales. Figure 10(g) and (h) 3. Single response to a single edge: The optimal edge
use the gradient magnitude threshold to reduce noise and detector should not respond with multiple edge pixels
break contours. to the place where only a single edge exists.
In comparison with the edge images based on the
gradient methods in Figs. 35, the edge maps from the Following these design criteria, Canny developed an
LoG is thinner than the gradient-based edge detectors. optimal edge detection algorithm based on a step edge
Because of the smoothing filtering in the LoG operator, its model with white Gaussian noise. The Canny edge detector
edge images (Fig. 10) are robust to noise; however, sharp involves the first derivative of a Gaussian smoothing filter
corners are lost at the same time. Another interesting with standard deviation s. The choice of s for the Gaussian
feature of the LoG is that it generates the closed-edge filter controls the filter width and the amount of smoothing
contours. However, spurious edge loops may appear in (11). Steps for the Canny edge detector are described as
outputs and edge locations may shift at large scales (8). follows:
Both the LoG and the Laplacian edge detectors are iso-
tropic filters, and it is not possible to extract directly the 1. Smoothing using Gaussian filtering: A 2-D Gaussian
edge orientation information from these edge operators. filter G(x,y) by Equation (14) is applied to the image to
Postprocesses such as nonmaxima suppression and hys- remove noise. The standard deviation s of this Gaus-
teresis thresholding are not applicable. sian filter is a scale parameter in the edge detector.
2. Differentiation: Compute the gradient Gx in the
Advanced Edge Detection MethodCanny Edge Detection x-direction and Gy in the y-direction using any of
The Canny edge detector (3,16,20) is one of the most widely the gradient operators (Roberts, Sobel, Prewitt,
used edge detectors. In 1986, John Canny proposed the etc.). The magnitude Gm and direction ug of the gra-
following three design criteria for an edge detector: dient can be calculated as

q  
1. Good localization: Edge location founded by the edge 2 2 1 Gy
Gm G x G y ; ug tan 16
operator should be as close to the actual location in Gx
the image as possible.

3. Nonmaximum suppression: Apply the nonmaximum


0 1 1 2 2 2 1 1 0 suppression operation (see the section on Nonmax-
1 2 4 5 5 5 4 2 1 imum Suppression for details) to remove spurious
1 4 5 3 0 3 5 4 1
edges.
4. Hysteresis process: The hysteresis step is the unique
2 5 3 -12 -24 -12 3 5 2
feature of the Canny edge operator (20). The hyster-
2 5 0 -24 -40 -24 0 5 2 esis process uses two thresholds, a low threshold tlow,
2 5 3 -12 -24 -12 3 5 2 and a high threshold thigh. The high threshold is
usually two or three times larger than the low thresh-
1 4 5 3 0 3 5 4 1
old. If the magnitude of the edge value at the pixel p is
1 2 4 5 5 5 4 2 1 lower than t1ow, then the pixel p is marked immedi-
0 1 1 2 2 2 1 1 0 ately as a non-edge point. If the magnitude of the edge
value at pixel p is greater than thigh, then it is imme-
Figure 9. A discrete kernel that approximates the LoG with diately marked as an edge. Then any pixel that
s 1.4. is connected to the marked edge pixel p and its
EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES 9

Figure 10. The LoG operator edge maps:


(b) s 1.0, (c) s 1.5, (d) s 2.0, (e)
s 2.5, (f) two scales used s1 0.7 and
s2 2.3, (g) s 2.0 and T 15, and (h)
s 2.0 and T 20.

magnitude of the edge value is greater than a low time. The effect of the hysteresis threshold is shown in
threshold tlow, it is also marked as an edge pixel. The Fig. 12. Figure 12(a) and (c) are edge maps with the
edge marking of the hysteresis process is implemen- hysteresis threshold. Edge maps with a hysteresis thresh-
ted recursively. This hysteresis producer generates old have less broken contours than edge maps with one
the effects of reducing the broken edge contours and of threshold: Compare Fig. 12(a) with Fig. 12(b). Table 1
removing the noise in adaptive manner (11). summarized the computational cost of each edge opera-
tors used in gray images. It is noticed that the computa-
The performance of the Canny operator is determined tional cost of the Canny operator is higher than those of
by three parameters: the standard deviation s of the other operators, but the Canny operator generates the
Gaussian filter and the two thresholds tlow and thigh, more detailed edge map in comparison with the edge maps
which are used in the hysteresis process. The noise elim- generated by other edge operators.
ination and localization error are related to the standard
deviation s of the Gaussian filter. If s is larger, the noise
EDGE DETECTION IN COLOR IMAGES
elimination is increased but the localization error can also
be more serious. Figures 11 and 12 illustrate the results of
What is the Color Image?
the Canny edge operator. Figure 11 demonstrate the
effect of various s values with the same upper and lower An image pixel in the color image is represented by a vector
threshold values. As the s value increases, noise pixels that is consisted of three components. Several different
are removed but the sharp corners are lost at the same ways exist to represent a color image, such as RGB, YIQ,

Figure 11. The effect of the standard


deviation s of the Gaussian smoothing filter
in the Canny operator: (b) s 0.5, (c)
s 1.0, (d) s 1.5, (e) s 2.0, (f)
s 2.5, and (g) s 3.0, Thigh 100,
Tlow 40.
10 EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES

Figure 12. The effect of the hysteresis


threshold in the Canny operator: fixed
s 1.5 (a) thigh 100, tlow 20; (b)
thigh = tlow = 100; (c) thigh = 60, tlow = 20;
(d) thigh = 60, tlow = 60.

HIS, and CIE Luv. The RGB, the YIQ, and the HSI are The intensity is associated with the overall brightness of a
the color models most often used for image processing (10). pixel (21).
The commonly known RGB color model consists of three
colors components: Red(R), Green (G) and Blue (B). The Color Edge Detection versus Gray-Level Edge Detection
RGB color model represents most closely to the physical
The use of color in edge detection implies that more infor-
sensors for colored light in most color CCD sensors (21).
mation for edges is available in the process, and the edge
RGB is a commonly used color model for the digital pictures
detection results should be better than those of the gray-
acquired by digital cameras (22). The three components in
level images. Novak and Shafer (27) found that 90% of edge
the RGB model are correlated highly, so if the light changes,
pixels are about the same in edge images obtained from
all three components are changed accordingly (23).
gray-level and from color images. But 10% of the edge pixels
The YIQ color space is the standard for color television
left are as undetected when gray-level information is used
broadcasts in North America. The YIQ color space is
(28). It is because edge may not be detected in the intensity
obtained from the RGB color model by linear transforma-
component in low contrast images, but it can be detected in
tion as shown below (10):
the chromatic components. For some applications, these
2 3 2 32 3 undetected edges may contain crucial information for a
Y 0:299 0:587 0:114 R
4 I 5 4 0:596 0:275 0:321 54 G 5 later processing step, such as edge-based image segmenta-
17
Q 0:212 0:523 0:311 B tion or matching (29). Figure 13 demonstrates the typical
example of the differences between color edge detectors and
gray-level edge detectors. The gray-level Sobel edge detec-
In the YIQ color space, Y measures the luminance of the
tor missed many (or all) real edge pixels because of the low
color value and I and Q are two chromatic components called
contrast in the intensity component as shown in Fig. 13(c)
in-phase and quadrature. The main advantage of YIQ color
and (d).
model in image processing is that luminance (Y) and two
A color image is considered as a two-dimensional array
chromatic components (I and Q) are separated (10,24).
f(x,y) with three components for each pixel. One major
The HSI (hue, saturation, intensity), also known as
concern in color edge detection is the high computational
HSB (hue, saturation, brightness), and its generalized
complexity, which has increased significantly in compar-
form HSV (hue, saturation, value) models are also used
ison with the edge detection in gray value images (see
frequently in color image processing (2426). The HSI
Table 2 for the computational cost comparison between
model corresponds more accurately to the human percep-
the color Sobel operator and the gray-level Sobel operator
tion of color qualities. In the HSI model, hue, the dominant
with various size of images).
color, is represented by an angle in a color circle where
primary colors are separated by 1208 with Red at 08, Green
Definition of Edge in Color Images
at 1208, and Blue at 2408. Saturation is the purity of the
color. The high saturated values are assigned for pure The approaches for detecting edges in color images depend
spectral colors and the low values for the mixed shades. on the definition of an edge. Several definitions have been

Table 1. Computational cost comparison


Image Size

Computational Time (Seconds) 680 by 510 1152 by 864 1760 by 1168


Robert 0.032 0.125 0.219
Prewitt 0.062 0.234 0.422
Sobel 0.047 0.187 0.343
Gray image Robert+NMS 0.141 0.438 0.1
Edge operator Prewitt+NMS 0.14 0.516 1.188
Sobel+NMS 0.109 0.531 1.234
LOG 0.5 1.453 2.984
Canny 0.469 1.531 3.172

NMS Nonmaximum suppression.
EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES 11

Table 2. Computational cost comparison: the gray-level Sobel edge detector versus the color-Sobel edge detector
Image Size

Computational time (Seconds) 680 by 510 1152 by 864 1760 by 1168


Gray-level Sobel operator 0.047 0.187 0.343
Color Sobel operator 0.172 0.625 1.11

proposed, but the precise definition of color edge has not (32,35) and Zenzo (36) defined edge points at the locations
been established for color images so far (30). G. S. Robinson of directional maxima of the contrast function. Cumani
(24) defined a color edge as the place where a discontinuity suggested a method to calculate a local measure of direc-
occurs in the image intensity. Under this definition, edge tional contrast based on the gradients of the three color
detection would be performed in the intensity channel of a components.
color image in the HIS space. But this definition provides no
explanation of possible discontinuities in the hue or satura- Color Edge Detection Methods
tion values. Another definition is that an edge in a color
image is where a discontinuity occurs in one color compo- Monochromatic-Based Methods. The monochromatic-
nent. This definition leads to various edge detection meth- based methods extend the edge detection methods devel-
ods that perform edge detection in all three color oped for gray-level images to each color component. The
components and then fuses these edges to an output edge results from all color components are then combined to
image (30). One problem facing this type of edge detection generate the final edge output. The following introduces
methods is that edges in each color component may contain commonly used methods.
inaccurate localization. The third definition of color edges is
based on the calculation of gradients in all three color Method 1: the Sobel operator and multidimensional
components. This type of multidimensional gradient meth- gradient method
ods combines three gradients into one to detect edges. The
(i) Apply the Sobel operator to each color component.
sum of the absolute values of the gradients is often used to
combine the gradients. (ii) Calculate the mean of the gradient magnitude
Until now, most color edge detection methods are based values in the three color components.
on differential grayscale edge detection methods, such as (iii) Edge exists if the mean of the gradient magnitude
finding the maximum in the first derivative or zero crossing exceeds a given threshold (28,30).
in the second derivative of the image function. One diffi-
Note the sum of the gradient magnitude in the three
culty in extending these methods to the color image origi-
color components can also be used instead of the mean in
nates from the fact that the color image has vector values.
Step ii).
The monochromatic-based definition lacks the considera-
tion about the relationship among three color components. Method 2: the Laplacian and fusion method
After the gradient is calculated at each component, the
(i) Apply the Laplacian mask or the LoG mask to each
question of how to combine the individual results remains
open (31). color component.
Because pixels in a color image are represented by a (ii) Edge exists at a pixel if it has a zero crossing in at
vector-valued function, several researchers have proposed least one of the three color components (28,31).
vector-based edge detection methods (3236). Cumani

Figure 13. Color versus gray edge detec-


tors: (a) color image [used with permission
from John Owens at the University of
California, Davis], (b) edge map generated
by the color edge detector, and (c) and
(d) edge map generated by the gray-level
Sobel operator.
12 EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES

Figure 14. Experiments with the color


Sobel operator: (a) color input; (b) and (c)
color Sobel operator with T 15, and
T 20, respectively; and (d) gray Sobel
operator with T 20.

Experimental results with multidimensional Sobel with the edge map [Fig. 15(d)] generated by the gray- level
operator are shown in Fig. 14(b)(c). The color Sobel opera- Canny operator.
tor generates the more detailed edge maps [Fig. 14(b) and
(c)] compared with the edge map generated by the gray- Cumani Operator. Cumani (32,35) proposed a vector-
level Sobel operator in Fig. 14(d). But the computational based color edge detection method that computes the
cost of the color Sobel operator increases three times more zero crossings in the second directional derivatives of a
than the cost of the gray-level Sobel operator as shown in color image. He defined a local measure of directional
Table 2. contrast based on the gradients of the image components.
Then, edge points are detected by finding zero crossings of
Vector-Based Methods. Color Variants of the Canny the first derivative of the contrast function in the direction
Edge Operator. Kanade (37) introduced an extension of of the maximal contrast.
the Canny edge detector (3) for edge detection in color Let a three-channel color image be represented by a two-
images. Let a vector C(r(x,y),g(x,y),b(x,y)) represent a color dimensional vector field as follows:
image in the RGB color space. The partial derivatives of the
color vector can be expressed by a Jacobian matrix J as f x; y f1 x; y; f2 x; y; f3 x; y
below:
2 3 The squared local contrast S of f(x,y) at point P (x,y) in the
!
@r @r direction of the unit vector u u1 ; u2 is

6
 6 @x @y 7
7   
@C @C 6 @g @g 7 E F u1
J ; 6 7 Gx ; Gy 18 SP; u ut Ju u1 ; u2
@x @y 6
6 @x @y 7
7 F G u2
4 @b @b 5
Eu21 2Fu1 u2 Gu22
@x @y

The direction u and the magnitude Gm of a color edge are where


given by
  3 
X 
E F @ fi 2
tan2u
2 Gx Gy
19 J r f r f T ;E ;
F G @x
kGx k2  kGy k2 i1
21
X3    X3  
@ fi @ fi @ fi 2
F ; and G
q i1
@x @y i1
@y
Gm kGx k2 cos2 u2 Gx Gy sinu cosukGy k2 sin2 u
The maximal value l of S(P, u) is
20
s
where Gx, Gy are the partial derivatives of the three color E  G2
components and k k is a mathematical norm. Several l
E Gz
F2 22
4
variations exist based on different mathematical norms
!
such as the L1-norm (sum of the absolute value), L2-norm This maximum l occurs when u is the corresponding
(Euclidean distance), and L1-norm (maximum of the eigenvector (35)
absolute value). Kanade (37) summarizes detailed experi-
mental results obtained with various mathematical r r!
! 1C 1C
norms. After the edge direction and magnitude of the u ; ; where C
2 2
edge have been calculated for each pixel, the rest of the
steps are the same with the Canny operator for gray-level EG
q 23
images (see the section on the advanced edge detection
method). Figure 15 shows edge maps generated by the E  G2 2F2
color Canny operator with various scales and threshold
values. The edge maps generated by the color Canny Edge points are defined at the locations where l has a local
!
operator have the more detailed edge images compared maximum along the direction of the unit vector u . So the
EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES 13

Figure 15. Experiments with the color


Canny operator: color Canny edge maps
(a) s 0.8, thigh 50, tlow 10; (b)
s 0.8, thigh 100, tlow 10; (c) s 1.0,
thigh 100, tlow 10; and (d) the edge map
generated by the gray-level Canny operator
s 1.5, thigh 100, tlow 20.

!
zero crossings of l in the direction of u are candidates of Hoffman and Jain (38) described three edge types in
edges (33). To find the zero crossing of l, the directional range images: step edges, roof edges, and smooth edges.
derivative is defined as Step edges are those composed pixels in which the actual
depth values are significantly discontinuous as compared
rl u rSP; u u with their neighboring pixels. Roof edges are where the
  depth values are continuous, but the directions of the sur-
@E 3 @E @F 2
u1 2 u u2 face normal change abruptly. Smooth edges are related
@x @y @x 1
  with discontinuities in the surface curvature. But smooth
@F @G @G 3
2 u1 u22 u 24 edges relatively seldom occur in range images. Step edges
@y @x @y 2 in range images can be detected with ordinary gradient
edge operators, but roof edges are difficult to be detected
where E, F, and G are defined in Equation (21). Finally, (39). Thus, an edge detection method for a range image
edge points are determined by computing the zero crossing must take into account these two types of edges such as
of rl u and the sign of rl u along a curve tangent to discontinuities in depth and discontinuities in the direction
u at point P. of surface normal.
Cumani tested this edge detector with color images in
the RGB space with the assumption that the Euclidean Edge Detection Using Orthogonal Polynomials
metric exists for the vector space (32). Figure 16(b), (c), and
(d) show the edge detection results generated by the Besl and Jain (40,41) proposed a method that uses ortho-
Cunami color edge operator at different scales. It seems gonal polynomials for estimating the derivatives in range
that the Cunami color edge operator generated the more images. To estimate the derivatives, they used the locally fit
detailed edge images in comparison with the edge images discrete orthogonal polynomials with an unweighted least-
generated by the monochromatic-based methods. squares technique. Using smooth second-order polynomials,
range images were approximated locally. This method pro-
vided the smoothing effect and computational efficiency by
EDGE DETECTION METHOD IN RANGE IMAGES obtaining the coefficient of the polynomials directly. But
unweighted least squares could cause errors in image dif-
Range images are a special class of digital images. The range ferentiation. To overcome this problem, a weighted least-
images encode the distance information from the sensor to squares approach was proposed by Baccar and Colleagues
the objects. Pixel values in the range images are related to (42,43).
the positions of surface geometry directly. Therefore, range
images provide an explicit encoding of the local structure Extraction of Step Edges. The step edge detection method
and geometry of the objects in the scene. Edge detection proposed by Baccar and Colleagues (42) is based on the use
methods developed for intensity images mainly focused on of locally fit discrete orthogonal polynomials with a
the detection of step edges. In the range imagers, it is weighted least-squares technique. For the weighted
possible to detect correctly both the step edges and the least-squares approximation W(x), a one-dimensional
roof edges because of the available depth information. Gaussian kernel of unit amplitude with zero mean and

Figure 16. Experiments with the Cumani


operator: (a) color input image and the
Cumani edge maps (b) s 1.0, (c)
s 1.2, and (d) s 1.5.
14 EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES

standard deviation s is used. The two-dimensional Gaus- surface normal at a differentiable point of a surface is
sian kernel at the center of the window can be represented defined in Equation (27). The approximation to the surface
x2 normal, which is the angle between the two projections of
by the product of W(x) and W(y). Let Wx e2s2 . Then a one-
the normal vector n on the (x, z)- and (y, z)-planes, is
dimensional set of second-degree orthogonal polynomials
computed using
w0 , w1 , w2 is defined as
gx; y tan1 ry =rx ; where
w0 x 1; w1 x x; w2 x x2  A; where T
P n rx ; ry ; 1 =1 r2x r2y 1=2 30
xWxw1 xw0 x
A P 25
The partial derivatives rx and ry of the function r(x, y) are
Wxw20 x
calculated using the same Gaussian weighted least squares
in Equation (28). The quantity g(x, y) represents the surface
A locally approximated range image r^x; y is calculated normal, and a 5  5 median filtering is applied to produce
with a second-degree Gaussian weighted orthogonal poly- the final surface normal image. The roof edge image
nomial as follows (42): groof(x,y) is computed from the final surface image by using
the weighted Gaussian approach (42,43). The final edge
X map is generated after implementing a fusion step that
r^x; y ai j wi xw j y combined step edge image gstep(x,y) and roof edge image
i j2 groof(x,y) and a subsequent morphological step (42).
a00 a10 w1 x a01 w1 y a11 w1 xw1 y Edge Detection via Normal Changes
a20 w2 x a02 w2 y Sze et al. (44) as well as Mallet and Zhong (45) presented
26
a00 a10 x a01 y a11 xy a20 x2  a20 an edge detection method for range images based on
normal changes. They pointed out that depth changes of
a02 y2  a02 a point in a range image with respect to its neighbors are
a10 x a01 y a11 xy a20 x2 a02 y2 not sufficient to detect all existent edges and that normal
changes are much more significant than those of depth
a00  Aa02 a20 changes. Therefore, the step and roof edges in range
images are identified by detecting significant normal
At a differentiable point of the surface, the quantity of the changes.
surface normal is defined as pu; v be a point on a differentiable surface S and
Let ~
pu; v u; v; f u; v. If we denote ~
~ pu and ~ pv as the
partial derivatives of ~ pu; v at u- and v-directions, respec-
1 X tively; then the partial derivatives of ~ pu; v are given as
ai j rx; yWxWywi xw j y; where follows (44):
@i @ j x;y
pu; v
@~
X
M pu
~ 1; 0; fu u; v
@i Wxw2i x 27 @u 31
pu; v
@~
xM pv
~ 0; 1; fv u; v
@v

The partial derivatives of the approximated range image pu; v is defined as


The normal of a tangent plane at ~
r^x; y are defined by the following equations:
pu  ~
~ v ~ pv
Nu; 32
r^x x; y a10 a11 y 2a20 x; k~
pu  ~
pv k
r^y x; y a01 a11 x 2a 02 y 28 If we replace Equation (32) with Equation (31), the value of
~ v can be rewritten as below:
norm Nu;
At the center of the discrete window for (x, y) (0, 0), the !
partial derivatives are computed by !  fu  fv 1
N u; v p ; p
; p
1 fu fv 2 2 1 fu fv 2 2 1 fu2 fv2
r^x 0; 0 a10 ; r^y 0; 0 a01 29
n1 u; v; n2 u; v; n3 u; v;

The gradient magnitude at the center of this discrete where fu @ f u; v=@u and fv @ f u; v=@v 33
q
window is a210 a201 . The step edge image, gstep(x,y), is
Steps for edge detection in range images via normal
obtained directly from the coefficients of the polynomials. changes are summarized as follows (44):

Extraction of Roof Edges. The roof edges are defined as 1. Calculate the normal of every point in a range image:
the discontinuities in the orientation of the surface normal the partial derivatives are essential to derive the nor-
of objects in a range image. The quantity that defines the mal value at each data point as shown in Equation (33).
EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES 15

However, the partial derivative shown in Equation (33) are used to calculate the normal values for the comparison
cannot be computed directly because the range image purpose. After the normal values are decided, the dyadic
data points are discrete. To calculate the normal on a transforms proposed by Mallat and Zhong (45) are applied to
set of discrete data points, the locally fit discrete ortho- detect the normal changes at every point in a range image. In
gonal polynomials, originally proposed by Besl and their experiments, the nonorthogonal wavelet-based
Jain (40,41) and explained earlier, can be used. Other approach used to estimate the normal values generated
exiting methods are the orthogonal wavelet-based the best results in comparison with the other methods.
approach (46) and the nonorthogonal wavelet-based
approach (45). CONCLUSION
2. Find the significant normal changes as edge point:
Using the dyadic wavelet transform proposed by Edge detection has been studied extensively in the last 50
Mallat and Zhong (45), the significant normal years, and many algorithms have been proposed. In this
changes (or local extrema) are selected as edge points. article, we introduced the fundamental theories and the
The dyadic wavelet transform of a f(x,y) at scale 2j popular technologies for edge detection in grayscale, color,
along the x- and y-directions can be expressed by and range images. More recent edge detection work can be
found in Refs.16, 30, 47 and 48. We did not touch on the
W21 j f x; y f  1=22 j w1 x=2 j ; y=2 j topic of evaluating edge detectors. Interested readers can
34 find such research work in Refs. 4953.
W22 j f x; y f  1=22 j w2 x=2 j ; y=2 j
BIBLIOGRAPHY
where w1 x; y @ux; y=@x, w2 x; y @ux; y=@y, and
ux; y is a smoothing function that satisfies the following 1. Z. He and M. Y. Siyal, Edge detection with BP neural networks,
conditions: Its integration over the full domain is equal Signal Processing Proc. ICSP98, 2: 382384, 1988.
to 1 and converges to 0 at infinity. The dyadic wavelet 2. E. R. Davies, Circularity- a new principle underlying the design
transformation of the vector of normal changes Nu; ~ v of accurate edge orientation operators, Image and Vision com-
j
at scale 2 is given by puting, 2(3): 134142, 1984.
3. J. Canny, A computational approach to edge detection, IEEE
~ v W 1 Nu;
W j Nu; ~ vdu W 2 Nu;
~ vdv 35 Trans. Pattern Anal. Machine Intell., 8(6): 679698, 1986.
2j 2j
4. Z. Hussain, Digital Image Processing- Partial Application of
Parallel Processing Technique, Cluchester: Ellishorwood, 1991.
where 5. A. Rosenfeld and A. C. Kak, Digital Picture Processing, New
York: Academic Press, 1982.
~ v W i n1 u; v; W i n2 u; v; W i n3 u; v,
W2i j Nu; 2j 2j 2j 6. R. M. Haralick and L. G. Shapiro, Computer and Robot Vision,
i 1; 2. Reading, MA: Addison-Wesley Publishing Company, 1992.
7. R. Jain, R. Kasturi, and B. G. Schunck, Machine Vision, New
Their associated weights can be the normal changes York: McGraw-Hill, Inc., 1995.
~ v along the du- and dv-directions.
(or gradient) of Nu; 8. Y. Lu and R. C. Jain, Behavior of edges in scale space, IEEE
Two important values for edge detection can be calcu- Trans. on Pattern Anal. Machine Intell., 11(4): 337356, 1989.
lated as follows: The magnitude of the dyadic wavelet 9. M. Shah, A. Sood, and R. Jain, Pulse and staircase edge models,
~ v at scale 2j is computed as
transformation of W j Nu; Computer Vis. Graphics Image Proc., 34: 321343, 1986.
r 10. R. Gonzalez and R. Woods, Digital Image Processing, Reading,
! ! MA: Addison Wesley, 1992.
M2 j N u; v kW 1 N ~ ! u; vk2 kW 2 N u; vk2
2j 2j 11. P. Mlsna and J. Rodriguez, Gradient and Laplacian-Type Edge
36 Detection, Handbook of Image and Video Processing, New
York: Academic Press, 2000.
12. E. R. Davies, Machine Vision, New York: Academic Press, 1997.
and the angle with respect to the du-direction is
13. D. Marr and E. C. Hildreth, Theory of edge detection, Proc. Roy.
!
 !
 Society, London, Series B, vol. 207(1167): 187217, 1980.
~ vk ikW 2 N u; vk
A2 j N u; v argument kW21 j Nu; 14. L. Kitchen and A. Rosenfeld, Non-maximum suppression of
2j
gradient magnitude makes them easier to threshold, Pattern
37 Recog. Lett., 1(2): 9394, 1982.
15. K. Paler and J. Kitter, Grey level edge thinning: a new method,
Pattern Recog. Lett., 1(5): 409416, 1983.
Every point in the range image will be associated with two
16. S. Wang, F. Ge, and T. Liu, Evaluation edge detection through
important values: magnitude of normal changes with
boundary detection, EURASIP J. Appl. Signal Process., 2006:
respect to its certain neighbors and the direction tendency 115, 2006.
of the point (44). Edge points can be detected by thresholding
17. T. Pavlidis, Algorithms for Graphics and Image Processing,
the normal changes. Experimental results are provided for New York: Springer, 1982.
synthetic and real 240  240 range images in Ref 44. Three
18. L. Kitchen and A. Rosenfeld, Non-maximum suppression of
different methods such as quadratic surface fitting and gradient magnitude makes them easier to threshold, Pattern
orthogonal and nonorthogonal wavelet-based approaches Recogn. Lett., 1(2): 9394, 1982.
16 EDGE DETECTION IN GRAYSCALE, COLOR, AND RANGE IMAGES

19. J. Park, H. C. Chen, and S. T. Huang, A new gray-level edge 39. N. Pal and S. Pal, A review on Image segmentation technique,
thinning method, Proc. of the ISCA 13th International Con- Pattern Recogn., 26(9): 12771294, 1993.
ference: Computer Applications in Industry and Engineering, 40. P. Besl and R. Jain, Invariant surface characteristics for 3D
2000, pp. 114119. object recognition in range images, Comp. Vision, Graphics
20. J. R. Parker, Home page. University of Calgary. Available: Image Image Process., 33: 3380, 1984.
http://pages.cpsc.ucalgary.co/parker/501/edgedetect.pdf. 41. P. Besl and R. Jain, Segmentation through variable-order
21. S. Wesolkowski and E. Jernigan, Color edge detection in RGB surface fitting, IEEE Trans. Pattern Anal. Mach. Intell.,
using jointly Euclidean distance and vector angle, Vision Inter- 10(3): 167192, 1988.
face99: Troi-Rivieres, Canada, 1999, pp. 916. 42. M. Baccar, L. Gee, R. Gonzalez, and M. Abidi, Segmentation of
22. H. D. Cheng, X. H. Jiang, Y. Sun, and J. Wang, Color image range images via data fusion and Morphological watersheds,
segmentation: advance and prospects, Pattern Recogn., 34: Pattern Recogn., 29(10): 16731687, 1996.
22592281, 2001. 43. R. G. Gonzalez, M. Baccar, and M. A. Abidi, Segmentation of
23. M. Pietikainen, S. Nieminen, E. Marszalec, and T. Ojala, range images via data fusion and morphlogical watersheds,
Accurate color discrimination with classification based on fea- Proc. of the 8th Scandinavian Conf. on Image Analysis, vol. 1,
ture distributions, Proc. 13th International Conference on Pat- 1993, pp. 2139.
tern Recognition, Vienna, Austria, 3, 1996, pp. 833838. 44. C. Sze, H. Liao, H. Hung, K. Fan, and J. Hsieh, Multiscale edge
24. G. Robinson, Color edge detection, Optical Engineering, 16(5): detection on range images via normal changes, IEEE Trans.
126133, 1977. Circuits Sys. II: Analog Digital Signal Process., vol. 45(8):
25. T. Carron and P. Lambert, Color edge detector using jointly 10871092, 1998.
hue, saturation and intensity, ICIP 94, Austin, Texas, 1994, 45. S. Mallat and S. Zhong, Characterization of signal from multi-
pp. 977981. scale edges, IEEE Trans. Pattern Anal. Machine Intell., 14(7):
26. P. Tsang and W. Tang, Edge detection on object color, IEEE 710732, 1992.
International Conference on Image Processing, C, 1996, pp. 46. J. W. Hsieh, M. T. Ko, H. Y. Mark Liao, and K. C. Fan, A new
10491052. wavelet-based edge detector via constrained optimization,
27. C. Novak and S. Shafer, Color edge detection, Proc. of DARPA Image Vision Comp., 15: 511527, 1997.
Image Understanding Workshop, vol. I, Los Angeles, CA, 1987, 47. R. Zhang, G. Zhao, and L. Su, A new edge detection method in
pp. 3537. image processing, Proceedings of ISCIT 2005, 2005, pp.
28. A. Koschan, A comparative study on color edge detection, Proc. 430433.
2nd Asian Conference on Computer Vision ACCV95, vol III, 48. S. Konishi, A. L. Yuille, J. M. Coughlan, and S. C. Zhu, Statis-
Singapore, 1995, pp. 574578. tical edge detection: learning and evaluating edge cues, IEEE
29. J. Fan, W. Aref, M. Hacid, and A. Elmagarmid, An improved Trans. Pattern Anal. Machine Intell., 25(1): 5773, 2003.
isotropic color edge detection technique, Pattern Recogn. Lett., 49. M. C. Shin, D. B. Goldgof, K. W. Bowyer, and S. Nikiforou,
22: 14191429, 2001. Comparison of edge detection algorithms using a structure
30. A. Koshen and M. Abidi, Detection and classification of edges in from motion task, IEEE Trans. on System, Man, and Cyberne.
color images, IEEE Signal Proc. Mag., Jan: 6473, 2005. Part B: Cybernetics, 31(4): 589601, 2001.
31. T. Huntsberger and, M. Descalzi, Color edge detection, Pattern 50. T. Peli and D. Malah, A study of edge detection algorithms,
Recogn. Lett., 3: 205209, 1985. Comput. Graph. Image Process., 20(1): 121, 1982.
32. A. Cumani, Edge detection in multispectral images, CVGIP: 51. P. Papachristou, M. Petrou, and J. Kittler, Edge postprocessing
Grap. Models Image Proc., 53(I): 4051, 1991. using probabilistic relaxation, IEEE Trans. Syst., Man, Cybern.
B, 30: 383402, 2000.
33. L. Shafarenko, M. Petrou, and J. Kittler, Automatic watershed
segmentation of randomly textured color images, IEEE Trans. 52. M. Basu, Gaussian based edge detection methodsa survey,
Image Process., 6: 15301544, 1997. IEEE Trans. Syst., Man, Cybern.-part C: Appl. Rev., 32(3): 2002.
34. Y. Yang, Color edge detection and segmentation using vector 53. S. Wang, F. Ge, and T. Liu, Evaluating Edge Detection through
analysis, Masters Thesis, University of Toronto, Canada, 1995. Boundary Detection, EURASIP J. Appl. Signal Proc., Vol.
2006, pp. 115.
35. A. Cumani, Efficient contour extraction in color image, Proc. of
3rd Asian Conference on Computer Vision, vol. 1, 1998, pp.
582589.
JUNG ME PARK
36. S. Zenzo, A note on the gradient of a multi-image, CVGIP, 33:
YI LU MURPHEY
116125, 1986.
University of MichiganDearborn
37. T. Kanade, Image understanding research at CMU, Proc. Dearborn, Michigan
Image Understading Workshop, vol II, 1987, pp. 3240.
38. R. Hoffman and A. Jain, Segmentation and classification of
range image, IEEE Trans. On PAMI 9-5, 1989, pp. 643649.
F
FACE RECOGNITION TECHNIQUES In many situations, contextual knowledge is also applied
(e.g., the context plays an important role in recognizing
INTRODUCTION TO FACE RECOGNITION faces in relation to where they are supposed to be located).
However, the human brain has its limitations in the total
Biometrics1 is becoming a buzzword due to increasing number of persons that it can accurately remember. A key
demand for user-friendly systems that provide both secure advantage of a computer system is its capacity to handle
and efficient services. Currently, one needs to remember large numbers of facial images.
numbers and/or carry IDs all the time, for example, a A general statement of the problem of the machine
badge for entering an office building, a password for recognition of faces can be formulated as follows: Given
computer access, a password for ATM access, and a still or video images of a scene, identify or verify one or more
photo-ID and an airline ticket for air travel. Although persons in the scene using a stored database of faces.
very reliable methods of biometric personal identification Available collateral information, such as race, age, gender,
exist, e.g., fingerprint analysis and iris scans, these meth- facial expression, or speech, may be used to narrow the
ods rely on the cooperation of the participants, whereas a search (enhancing recognition). The solution to the problem
personal identification system based on analysis of frontal involves face detection (recognition/segmentation of face
or profile images of the face is often effective without the regions from cluttered scenes), feature extraction from the
participants cooperation or knowledge. It is due to this face regions (eyes, nose, mouth, etc.), recognition, or iden-
important aspect, and the fact that humans carry out face tification (Fig. 3).
recognition routinely, that researchers started an inves-
tigation into the problem of machine perception of human Brief Development History
faces. In Fig. 1, we illustrate the face recognition task of
The earliest work on face recognition in psychology can be
which the important first step of detecting facial regions
traced back at least to the 1950s (4) and to the 1960s in the
from a given image is shown in Fig. 2.
engineering literature (5). Some of the earliest studies
After 35 years of investigation by researchers from
include work on facial expression of emotions by Darwin
various disciplines (e.g., engineering, neuroscience, and
(6) [see also Ekman (7) and on facial profile-based bio-
psychology), face recognition has become one of the most
metrics by Galton (8)]. But research on automatic machine
successful applications of image analysis and understand-
recognition of faces really started in the 1970s after the
ing. One obvious application for face recognition technology
seminal work of Kanade (9) and Kelly (10). Over the past 30
(FRT) is law-enforcement. For example, police can set up
years, extensive research has been conducted by psycho-
cameras in public areas to identify suspects by matching
physicists, neuroscientists, and engineers on various
their imagaes against a watch-list facial database. Often,
aspects of face recognition by humans and machines.
low-quality video and small-size facial images pose signifi-
Psychophysicists and neuroscientists have been con-
cant challenges for these applications. Other interesting
cerned with issues such as whether face perception is a
commercial applications include intelligent robots that can
dedicated process [this issue is still being debated in the
recognize human subjects and digital cameras that offer
psychology community(11,12)], and whether it is done
automatic focus/exposure based on face detection. Finally,
holistically or by local feature analysis. With the help of
image searching techniques, including those based on
powerful engineering tools such as functional MRI, new
facial image analysis, have been the latest trend in the
theories continue to emerge (13). Many of the hypotheses
booming Internet search industry. Such a wide range of
and theories put forward by researchers in these disciplines
applications pose a wide range of technical challenges and
have been based on rather small sets of images. Never-
require an equally wide range of techniques from image
theless, many of the findings have important consequences
processing, analysis, and understanding.
for engineers who design algorithms and systems for the
machine recognition of human faces.
The Problem of Face Recognition
Until recently, most of the existing work formulates the
Face perception is a routine task of human perception recognition problem as recognizing 3-D objects from 2-D
system, although building a similar robust computer sys- images. As a result, earlier approaches treated it as a 2-D
tem is still a challenging task. Human recognition pro- pattern recognition problem. During the early and middel
cesses use a broad spectrum of stimuli, obtained from 1970s, typical pattern classification techniques, were used
many, if not all, of the senses (visual, auditory, olfactory, that measured attributes of features (e.g., the distances
tactile, etc.). between important points) in faces or face profiles (5,9,10).
During the 1980s, work on face recognition remained lar-
gely dormant. Since the early 1990s, research interest in
FRT has grown significantly. One can attribute this growth
1
Biometrics: the study of automated methods for uniquely recog- to several reasons: the increase in interest in commercial
nizing humans based on one or more intrinsic physical or behavior opportunities, the availability of real-time hardware, and
traits. the emergence of surveillance-related applications.
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 FACE RECOGNITION TECHNIQUES

Figure 1. An illustration of the face recognition task [55]: given an input facial image (left column: many variants of the facial image are
used to illustrate image appearance change due to natural variations in lighting and pose, and electronic modifications that simulate more
complex variations), matching it against a database of facial images (center column), and finally outputting the matched database image
and/or the ID of the input image (right column).

Over the past 18 years, research has focused on how to from video can increase significantly the difficulty in
make face recognition systems fully automatic by tackling recognition.
problems such as localization of a face in a given image or a More recently, significant advances have been made on
video clip and by extraction features such as eyes, mouth, 3-D based face recognition. Although it is known that face
and so on. Meanwhile, significant advances have been recognition using 3-D images has more advantages than face
made in the design of classifiers for successful face recogni- recognition using a single or sequence of 2-D images, no
tion. Among appearance-based holistic approaches, eigen- serious effort was made for 3-D face recognition until
faces (14,15) and Fisherfaces (1618) have proved to be recently. This delay caused by was mainly the feasibility,
effective in experiments with large databases. Feature- complexity and computational cost to acquire 3-D data in
based graph matching approaches (19) have also been real-time. Now, the availability of cheap, real-time 3-D sen-
successful. Compared with holistic approaches, feature- sors (21) makes it much easier to apply 3-D face recognition.
based methods are less sensitive to variations in illumina- Recognizing a 3-D object from its 2-D images poses many
tion and viewpoint and to inaccuracy in face localization. challenges. The illumination and pose problems are two
However, the feature extraction techniques needed for this prominent issues for appearance-based or image-based
type of approach are still not reliable or accurate (20). approaches (22). Many approaches have been proposed to
During the past 815 years, much research has been handle these issues, and the key here is to model the 3-D
concentrated on video-based face recognition. The still geometry and reflectance properties of a face. For example,
image problem has several inherent advantages and dis- 3-D textured models can be built from given 2-D images,
advantages. For applications such as airport surveil- and the images can then be used to synthesize images under
lance, the automatic location and segmentation of a various poses and illumination conditions for recognition
face could pose serious challenges to any segmentation or animation. By restricting the image-based 3-D object
algorithm if only a static picture of a large, crowded area modeling to the domain of human faces, fairly good recon-
is available. On the other hand, if a video sequence is struction results can be obtained using the state-of-the-art
available, segmentation of a moving person can be accom- algorithms. Other potential applications in which modeling
plished more easily using motion as a cue. In addition, a is crucial includes computerized aging, where an appro-
sequence of images might help to boost the recognition priate model needs to be built first and then a set of model
performance if we can use all these images effectively. parameters are used to create images that simulate the
But the small size and low image quality of faces captured aging process.
FACE RECOGNITION TECHNIQUES 3

Figure 2. Detection/Segmentation/Recognition of facial regions an image .

Methods for Machine Recognition of Faces on each subtask is critical. This is not only because the
techniques used for the individual subtasks need to
As illustrated in Fig. 4, the problem of automatic face
be improved, but also because they are critical in many
recognition involves three key steps/subtasks:
different applications (Fig. 5). For example, face detection
is needed to initialize face tracking, and extraction of
1. Detection and coarse normalization of faces
facial features is needed for recognizing human emotion,
2. Feature extraction and accurate normalization of which in turn is essential in humancomputer inter-
faces action (HCI) systems. Without considering feature loca-
3. Identification and/or verification tions, face detection is declared as successful if the
presence and rough location of a face has been correctly
Sometimes, different subtasks are not totally separated. identified.
For example, facial features (eyes, nose, mouth) are often
used for both face recognition and face detection. Face Face Detection and Feature Extraction
detection and feature extraction can be achieved simulta-
neously as indicated in Fig. 4. Depending on the nature of Segmentation/Detection. Up to the mid-1990s, most
the application, e.g., the sizes of the training and testing work on segmentation was focused on single-face segmen-
databases, clutter and variability of the background, tation from a simple or complex background. These
noise, occlusion, and speed requirements, some subtasks approaches included using a whole-face template, a
can be very challenging. A fully automatic face recognition deformable feature-based template, skin color, and a
system must perform all three subtasks, and research neural network.
4 FACE RECOGNITION TECHNIQUES

Figure 3. Configuration of a generic face recognition/proceeding system. We use a dotted line to indicate cases when both face detection
and feature extraction work together to achieve accurate face localization and reliable feature extraction [e.g. (3)].

Figure 4. Mutiresolution seach from a displaced position using a face model (30).

Significant advances have been made in recent years in 1. Generic methods based on edges, lines, and curves
achieving automatic face detection under various condi- 2. Feature-template-based methods that are used to
tions. Compared with feature-based methods and tem- detect facial features such as eyes
plate-matching methods, appearance, or image-based 3. Structural matching methods that take into consid-
methods (53) that train machine systems on large numbers eration geometrical constraints on the features
of samples have achieved the best results (refer to Fig. 4).
This may not be surprising since complicated face objects Early approaches focused on individual features; for
are different from non-face objects, although they are very example, a template-based approach is described in
similar to each other. Through extensive training, compu- Ref. 36 to detect and recognize the human eye in a frontal
ters can be good at detecting faces. face. These methods have difficulty when the appearances
of the features change significantly, e.g., closed eyes, eyes
Feature Extraction. The importance of facial features for with glasses, or open mouth. To detect the features more
face recognition cannot be overstated. Many face recogni- reliably, recent approaches use structural matching meth-
tion systems need facial features in addition to the holistic ods, for example, the active shape model (ASM) that repre-
face, as suggested by studies in psychology. It is well known sents any face shape (a set of landmark points) via a mean
that even holistic matching methods, e.g., eigenfaces (46) face shape and principle components through training (46).
and Fisherfaces (43), need accurate locations of key facial Compared with earlier methods, these recent statistical
features such as eyes, nose, and mouth to normalize the methods are much more robust in terms of handling varia-
detected face (54). tions in image intensity and in feature shape. The advan-
Three types of feature extraction methods can be dis- tages of using the so-called analysis through synthesis
tinguished:
FACE RECOGNITION TECHNIQUES 5

Figure 5. Original image [size 48  42 (i.e., 2016)] and the reconstructed image using 300, 200, 100, 50, 20, and 10 leading components,
respectively (32).

approach come from the fact that the solution is constrained recognition of faces was made by Turk and Pentland (15)
by a flexible statistical model. To account for texture varia- using eigenpictures (also known as eigenfaces) for face
tion, the ASM model has been expanded to statistical detection and identification. Given the eigenfaces, every
appearance models including a flexible appearance model face in the database is represented as a vector of weights
(28) and an active appearance model (AAM)(29). In Ref. 29, obtained by projecting the image into a subset of all eigen-
the proposed AAM combined a model of shape variation face components (i.e., a subspace) by a simple inner product
(i.e., ASM) with a model of the appearance variation of operation. When a new test image whose identification is
shape-normalized (shape-free) textures. A training set of required is given, the new image is represented by its vector
400 images of faces, each labeled manually with 68 land- of weights. The test image is identified by locating the
mark points and approximately 10,000 intensity values image in the database whose weights are the closest (in
sampled from facial regions were used. To match a given Euclidean distance) to the weights of the test image. By
image with a model, an optimal vector of parameters (dis- using the observation that the projection of a facial image
placement parameters between the face region and the and a nonface image are different, a method to detect the
model, parameters for linear intensity adjustment, and presence of a face in a given image is obtained. Turk and
the appearance parameters) are searched by minimizing Pentland illustrate their method using a large database of
the difference between the synthetic image and the given 2500 facial images of 16 subjects, digitized at all combina-
image. After matching, a best-fitting model is constructed tions of three head orientations, three head sizes, and three
that gives the locations of all the facial features so that the lighting conditions.
original image can be reconstructed. Figure 5 illustrates the In a brief summary, eigenpictures/eigenfaces are effec-
optimization/search procedure to fit the model to the image. tive low-dimensional representations of facial images
based on KarhunenLoeve (KL) or principal component
Face Recognition analysis projection (PCA)(14). Mathematically speaking,
sample facial images (2-D matrix format) can be converted
As suggested, three types of FRT systems have been inves-
into vector representations (1-D format). After collecting
tigated:recognition based on still images, recognition based
enough sample vectors, one can perform statistical analysis
on a sequence of images, and, more recently, recognition
(i.e., PCA) to construct new orthogonal bases and then can
based on 3-D images. All types of FRT technologies have
represent these samples in a coordinate system defined by
their advantages and disadvantages. For example, video-
these new bases. More specifically, mean-subtracted sam-
based face recognition can use temporal information to
ple vectors x can be expressed as a linear combination of the
enhance recognition performance. Meanwhile, the quality
orthogonal bases Fi (typically m << n):
of video is low and the face regions are small under typical
acquisition conditions (e.g., in surveillance applications).
X
n X
m
Rather than presenting all three types of FRT systems, we x ai Fi  ai Fi (1)
focus on still-image-based FRT systems that form the i1 i1
foundations for machine recognition of faces. For details
on all three types of FRT systems, please refer to a recent via solving an eigenproblem
review article (the first chapter in Ref. 3).
Face recognition is such an interesting and challenging CF FL (2)
problem that it has attracted researchers from different
fields: psychology, pattern recognition, neural networks, where C is the covariance matrix for input x and L is a
computer vision, and computer graphics. Often, a single diagonal matrix consisting of eigenvalues li . The main
system involves techniques motivated by different princi- point of eigenfaces is that it is an efficient representation
ples. To help readers that are new to this field, we present a of the original images (i.e., from n coefficients to m coeffi-
class of linear projection/subspace algorithms based on cient). Figure 5 shows a real facial image and several
image appearances. The implementation of these algo- reconstructed images based on several varying number
rithms is straightforward, yet they are very effective under of leading principal components Fi that correspond to
constrained situations. These algorithms helped to revive the largest eigenvalues li . As can be seen from the plots,
the research activities in the 1990s with the introduction of 300 leading principal components are sufficient to repre-
eigenfaces (14,15) and are still being researched actively for sent the original image of size 48  42 (2016).2
continuous improvements.
2
Eigenface and the Projection-Based Appearance Meth- Please note that the reconstructed images are obtained by con-
verting from 1-D vector format back to 2-D matrix format and
ods. The first successful demonstration of the machine
adding back the average/mean facial image.
6 FACE RECOGNITION TECHNIQUES

Figure 6. Electronically modified images that have been identified correctly using eigenface representation (18).

Figure 7. Reconstructed images using 300 PCA projection coefficients for electronically modified images (Fig. 7) (26).

Another advantage of using such a compact representa- projection algorithms, classification is performed (1) by
tion is the reduced sensitivity to noise. Some of these noise projecting the input x into a subspace via a projection/basis
could be caused by small occlusions as long as the topologic matrix Proj (Proj is F for eigenfaces, W for Fisherfaces with
structure does not change. For example, good performance pure LDA projection, and WF for Fisherfaces with sequen-
against blurring, (partial occlusion) has been demonstrated tial PCA and LDA projections; these three bases are shown
in many eigenpicture based systems and was also reported for visual comparison in Fig. 8),
in Ref. 18 (Fig. 6), which should not come as a surprise
because the images reconstructed using PCA are much z Pro j x (3)
better than the original distorted images in terms of the
global appearance (Fig. 7). (2) by comparing the projection coefficient vector z of the
In addition to eigenfaces, other linear projection algo- input with all the pre-stored projection vectors of labeled
rithms exist, including ICA (independent component ana- classes to determine the input class label. The vector com-
lysis) and LDA/FLD (linear discriminant analysis/Fishers parison varies in different implementations and can influ-
linear discriminant analysis) to name a few. In all these ence the systems performance dramatically (33). For

Figure 8. Different projection bases constructed from a set of 444 individuals, where the set is augmented via adding noise and mirroring.
(Improved reconstruction for facial images outside the training set using an extended training set that adds mirror-imaged faces was
suggested in Ref. 14.).The first row shows the first five pure LDA basis images W, the second row shows the first five subspace LDA basis
images WF, the average face and first four eigenfaces F are shown on the third row (18).
FACE RECOGNITION TECHNIQUES 7

example, PCA algorithms can use either the angle or the change of variables to y:
Euclidean distance (weighted or unweighted) between two
projection vectors. For LDA algorithms, the distance can be z WT
by (8)
unweighted or weighted.
Face recognition systems using LDA/FLD (called Fish- Combining Equations (6) and (8), we have the following
erfaces in Ref. 16) have also been very successful (16,17,34). relationship: z WbT L1=2 T x and W simply is
Ww
w
LDA training is carried out via scatter matrix analysis (35).
For an M-class problem, the within-class and between-class 1=2
W Ww Lw Wb (9)
scatter matrices Sw , Sb are computed as follows:
To improve the performance of LDA-based systems, a
X
M
regularized subspace LDA system that unifies PCA and
Sw Prwi Ci (4)
i1
LDA was proposed in Refs. 26 and 32. Good generalization
capability of this system was demonstrated by experiments
X
M on new classes/individuals without retraining the PCA
Sb Prwi mi  m0 mi  m0 T bases F, and sometimes even the LDA bases W. Although
i1 the reason for not retraining PCA is obvious, it is interesting
to test the adaptive capability of the system by fixing the
where Prvi is the prior class probability and usually is LDA bases when images from new classes are added.3 The
replaced by 1=M in practice with the assumption of equal fixed PCA subspace of dimensionality 300 was trained from
priors. Here Sw is the within-class scatter matrix, showing a large number of samples. An augmented set of 4056 mostly
the average scatter Ci of the sample vectors x of different frontal-view images constructed from the original 1078
classes vi around their respective means mi : Ci Exv  images of 444 individuals by adding noisy and mirrored
mi xv  mi T jv vi . Similarly, Sb is the between-class images was used in Ref. 32. At least one of the following
scatter matrix, which represents the scatter of the condi- three characteristics separates this system from other LDA-
tional mean vectors mi around the overall mean vector m0 . based systems (33,34)): (1) the unique selection of the uni-
A commonly used measure to quantify the discriminatory versal face subspace dimension, (2) the use of a weighted
power is the ratio of the determinant of the between-class distance measure, and (3) a regularized procedure that
scatter matrix of the projected samples to the determinant of modifies the within-class scatter matrix Sw . The authors
the within-class scatter matrix: J T jTT Sb Tj=jTT Sw Tj. selected the dimensionality of the universal face subspace
The optimal projection matrix W that maximizes J T based on the characteristics of the eigenvectors (face-like or
can be obtained by solving a generalized eigenvalue not) instead of the eigenvalues (18), as is done commonly.
problem: Later, it was concluded in Ref. 36 that the global face sub-
space dimensionality is on the order of 400 for large data-
Sb W Sw WLL (5) bases of 5000 images. The modification of Sw into Sw dI
has two motivations (1): first, to resolve the issue of small
There are several ways to solve the generalized eigen- sample size (37) and second, to prevent the, significantly
problem of Equation (5). One is to compute directly the discriminative information4 contained in the null space of
inverse of Sw and solve a nonsymmetric (in general) eigen- Sw (38) from being lost.
problem for matrix S1 w Sb . But this approach is unstable To handle the non-linearity caused by pose, illumina-
numerically because it involves the direct inversion of a tion, and expression variations presented in facial images,
potentially very large matrix that probably is close to being the above linear subspace methods have been extended to
singular. A stable method to solve this equation is to solve kernel faces (3941) and tensorfaces (42).
the eigen-problem for Sw first (32,35), [i.e., to remove the
within-class variations (whitening)]. Because Sw is a real Categorization of Still-Image Based FRT. Many methods of
symmetric matrix, orthonormal Ww and diagonal Lw exist face recognition have been proposed during the past 30
such that Sw Ww Ww Lw . After whitening, the input x years from researchers with different backgrounds.
becomes y: Because of this fact, the literature on face recognition is
vast and diverse. To have a clear and high-level categoriza-
y L1=2
w WT
wx (6) tion, we follow a guideline suggested by the psychological
study of how humans use holistic and local features. Spe-
The between-class scatter matrix for the new variable y can cifically, we have the following categorization (see table 1
be constructed similar to Equation (5). for more information):

X
M
Syb Prvi myi  my0 myi  my0 T (7)
3
i1 This makes sense because the final classification is carried out in
the projection space z by comparison with pre-stored projection
Now the purpose of FLD/LDA is to maximize the class vectors with nearest-neighbor rule.
4
separation of the now whitened samples y, which leads to The null space of Sw contains important discriminant information
another eigenproblem: Syb Wb Wb Lb . Finally, we apply the because the ratio of the determinants of the scatter matrices would
be maximized in the null space.
8 FACE RECOGNITION TECHNIQUES

1. Holistic matching methods. These methods use ments show only slight improvements over holistic eigen-
the whole face region as the raw input to a recognition faces or eigenmodules based on structural matching, we
system. One of the widely used representations of the believe that these types of methods are important and
face region is eigenpictures (14), which are based on deserve further investigation. Perhaps many relevant pro-
principal component analysis. blems need to be solved before fruitful results can be
2. Feature-based (structural) matching methods. expected (e.g., how to arbitrate optimally the use of holistic
Typically, in these methods, local features such as the and local features).
eyes, nose, and mouth are first extracted and their Many types of systems have been applied successfully to
locations and local statistics (geometric and/or the task of face recognition, but they all have some advan-
appearance) are fed into a structural classifier. tages and disadvantages. Appropriate schemes should be
3. Hybrid methods. Just as the human perception chosen based on the specific requirements of a given task.
system uses both local features and the whole face
region to recognize a face, a machine recognition COMMERCIAL APPLICATIONS AND ADVANCED
system should use both. One can argue that these RESEARCH TOPICS
methods could offer potentially the best of the two
types of methods Face recognition is a fascinating research topic. On one
hand, many algorithms and systems have reached a certain
Within each of these categories, additional classification level of maturity after 35 years of research. On the other
is possible. Using subspace analysis, many face recognition hand, the success of these systems is limited by the condi-
techniques have been developed: eigenfaces (15), which use tions imposed by many real applications. For example,
a nearest-neighbor classifier; feature-line-based methods, automatic focus/exposure based on face detection has
which replace the point-to-point distance with the distance been built into digital cameras. However, recognition of
between a point and the feature line linking two stored face images acquired in an outdoor environment with
sample points (46); Fisherfaces (16,18,34), which use Fish- changes in illumination and/or pose remains a largely
ers Linear Discriminant Analysis (57); Bayesian methods, unsolved problem. In other words, current systems are still
which use a probabilistic distance metric (43); and SVM far away from the capability of the human perception
methods, which use a support vector machine as the clas- system.
sifier (44). Using higher-order statistics, independent com-
ponent analysis is argued to have more representative Commercial Applications of FRT
power than PCA, and, in theory, it can provide better
recognition performance than PCA (47). Being able to offer In recent years, we have seen significant advances in
potentially greater generalization through learning, automatic face detection under various conditions. Conse-
neural networks/learning methods have also been applied quently, many commercial applications have emerged. For
to face recognition. One example is the probabilistic example, face detection has been employed for automatic
decision-based neural network method (48) and the other exposure/focus in digital cameras, such as Powershot
is the evolution pursuit method (45). SD800 IS from Canon and FinePix F31fd from Fuji. These
Most earlier methods belong to the category of structural smart cameras can zero in automatically on faces, and
matching methods, which use the width of the head, the photos will be properly exposed. In general, face detection
distances between the eyes and from the eyes to the mouth, technology is integrated into the cameras processor for
and so on (10), or the distances and angles between eye increased speed. For example, FinePix F31fd can identify
corners, mouth extrema, nostrils, and chin top (9). faces and can optimize image settings in as little as 0.05
Recently, a mixture-distance-based approach using manu- seconds.
ally extracted distances was reported. Without finding the One interesting application of face detection technology
exact locations of facial features, hidden markov model is the passive driver monitor system installed on 2008
based methods use strips of pixels that cover the forehead, Lexus LS 600hL. The system uses a camera on the steering
eye, nose, mouth, and chin (51,52). Reference 52 reported column to keep an eye on the driver. If he or she should be
better performance than Ref. 51 by using the KL projection looking away from the road ahead and the pre-collision
coefficients instead of the strips of raw pixels. One of the system detects something beyond the car (through stereo
most successful systems in this category is the graph vision and radar), the system will sound a buzzer, flash a
matching system (39), which is based on the Dynamic light, and even apply a sharp tap on the brakes.
Link Architecture (58). Using an unsupervised learning Finally, the popular application of face detection tech-
method based on a self-organizing map, a system based on a nology is an image-based search of Internet or photo
convolutional neural network has been developed (53). albums. Many companies (Adobe, Google, Microsoft, and
In the hybrid method category, we have the modular many start-ups) have been working on various prototypes.
eigenface method (54), a hybrid representation based on Often, the bottle-neck for such commercial applications is
PCA and local feature analysis (55), a flexible appearance the difficulty to recognize and to detected faces. Despite the
model-based method (28), and a recent development (56) advances, todays recognition systems have limitations.
along this direction. In Ref. 54, the use of hybrid features by Many factors exist that could defeat these systems: facial
combining eigenfaces and other eigenmodules is explored: expression, aging, glasses, and shaving.
eigeneyes, eigenmouth, and eigennose. Although experi- Nevertheless, face detection/recognition has been criti-
cal for the success of intelligent robots that may provide
FACE RECOGNITION TECHNIQUES 9

Table 1. Categorization of Still-Image-Based Face Recognition Techniques


Approach Representative Work

Holistic methods
Principal Component Analysis
Eigenfaces Direct application of PCA (15)
Probabilistic Eigenfaces Two-class problem with prob. measure (43)
Fisherfaces/Subspace LDA FLD on eigenspace (16,18)
SVM Two-class problem based on SVM (44)
Evolution Pursuit Enhanced GA learning (45)
Feature Lines Point-to-line distance based (46)
ICA ICA-based feature analysis (47)
Other Representations
LDA/FLD FLD/LDA on raw image (17)
PDBNN Probabilistic decision-based NN (18)
Kernel faces Kernel methods (3941)
Tensorfaces Multilinear analysis (42,49)
Feature-based methods
Pure geometry methods Earlier methods (9,10); recent methods (20,50)
Dynamic Link Architecture Graph matching methods (19)
Hidden Markov Model HMM methods (51,52)
Convolution Neural Network SOM learning based CNN methods (53)
Hybrid methods
Modular Eigenfaces Eigenfaces and eigenmodules (54)
Hybrid LFA Local feature method (55)
Shape-normalized Flexible appearance models (28)
Component-based Face region and components (56)

important services in the future. Prototypes of intelligent occluded, or the system needs to recognize a person from an
robots have been built, including Hondas ASIMO and image in the database that was acquired some time ago. In
Sonys QRIO. an extreme scenario, for example, the search for missing
children, the time interval could be up to 10 years. Such a
Advanced Research Topics scenario poses a significant challenge to build a robust
system that can tolerate the variations in appearances
To build a machine perception system someday that is close
across many years.
to or even better than the human perception system,
Real problems exist when face images are acquired
researchers need to look at both aspects of this challenging
under uncontrolled and uncooperative environments, for
problem: (1) the fundamental aspect of how human percep-
example, in surveillance applications. Although illumina-
tion system works and (2) the systematic aspect of how to
tion and pose variations are well-defined and well-
improve system performance based on best theories and
researched problems, other problems can be studied sys-
technologies available. To illustrate the fascinating char-
tematically, for example, through mathematical modeling.
acteristics of the human perception system and how it is
Mathematical modeling allows us to describe physical
different from currently available machine perception sys-
entities mathematically and hence to transfer the physical
tems, we plot the negative and upside-down photos of a
person in Fig. 9. It is well known that negative or upside-
down photos make human perception of faces more difficult
(59)). Also we know that no difference exists in terms of
information (bits used to encode images) between a digi-
tized normal photo and a digitized negative or upside-down
photo (except the sign and orientation information).
From the system perspective, many research challenges
remain. For example, recent system evaluations (60) sug-
gested at least two major challenges: the illumination
variation problem and the pose variation problem.
Although many existing systems build in some sort of Figure 9. Typical limitation of human perception system with
performance invariance by applying pre-processes, such negative and upside-down photos: which makes it difficult or takes
as histogram equalization or pose learning, significant much longer for us to recognize people from the photos. Interest-
illumination or pose change can cause serious performance ingly, we can manage eventually to overcome this limitation when
degradation. In addition, face images could be partially recognizing famous people (President Bill Clinton in this case).
10 FACE RECOGNITION TECHNIQUES

phenomena into a series of numbers (3). The decomposition 6. C. Darwin, The Expression of the Emotions in Man and
of a face image into a linear combination of eigenfaces is a Animals, London: John Murray, 1872.
classic. example of mathematical modeling. In addition, 7. P. Ekman, (ed.), Charles Darwins THE EXPRESSION OF
mathematical modeling can be applied to handle the issues THE EMOTIONS IN MAN AND ANIMALS, London and New
of occlusion, low resolution, and aging. York: 1998.
As an application of image analysis and understanding, 8. F. Galton, Personal identification and description, Nature,
machine recognition of faces benefits tremendously from (June 21): 173188, 1888.
advances in many relevant disciplines. To conclude our 9. T. Kanade, Computer Recognition of Human Faces, Basel,
article, we list these disciplines for further reading and Switzerland: Birkhauser, 1973.
mention their direct impact on face recognition briefly 10. M. Kelly. Visual identification of people by computer. Technical
Report AI 130, Stanford, CA, 1970.
 Pattern recognition. The ultimate goal of face recog- 11. I. Biederman and P. Kalocsai, Neural and psychophysical
nition is recognition of personal ID based on facial analysis of object and face recognition. In H. Wechsler, P. J.
Phillips, V. Bruce, F. Soulie, and T. S. Huang (eds), Face
patterns, including 2-D images, 3-D structures, and
Recognition: From Theory to Applications, Berlin: springer-
any pre-processed features that are finally fed into a
Verlag, 1998, pp. 325.
classifier.
12. I. Gauthier and N. Logothetis, Is face recognition so unique
 Image processing. Given a single or a sequence of after all? J. Cognit. Neuropsychol. 17: 125142, 2000.
raw face images, it is important to normalize the image 13. J. Haxby, M. I. Gobbini, M. Furey, A. Ishai, J. Schouten, and P.
size, enhance the image quality, and to localize local Pietrini, Distributed and overlapping representations of faces
features before recognition. and objects in ventral temporal cortex, Science, 293: 425430,
 Computer vision. The first step in face recognition 2001.
involves the detection of face regions based on appear- 14. M. Kirby and L. Sirovich, Application of the karhunen-loeve
ance, color, and motion. Computer vision techniques procedure for the characterization of human faces, IEEE
also make it possible to build a 3-D face model from a Trans. on Patt. Analy. Mach. Intell., 12: 103108, 1990.
sequence of images by aligning them together. Finally, 15. M. Turk and A. Pentland. Eigenfaces for recognition. J. Cog-
3-D face modeling holds great promises for robust face nitive Neurosc., 3: 7286, 1991.
recognition. 16. P.N. Belhumeur, J. Hespanha, and D. J. Kriegman, Eigenfaces
 Computer graphics. Traditionally, computer gra- vs. fisherfaces: Recognition using class specific linear projec-
tion, IEEE: Trans. Pa. Anal. Mac. Intell., 19: 711720, 1997.
phics are used to render human faces with increasingly
realistic appearances. Combined with computer 17. K. Etemad and R. Chellap, Discriminant analysis for Recogni-
tion of human face images, J. Optical Soc. Amer., 14: 1724
vision, it has been applied to build 3-D models from
1733, 1997.
images.
18. W. Zhao, R. Chellappa, and A. Krishnaswamy, Discriminant
 Learning. Learning plays a significant role to build- analysis of principal components for face recognition, Proc. of
ing a mathematical model. For example, given a train- International Conference on Automatic Face and Gesture
ing set (or bootstrap set by many researchers) of 2-D or Recognition, 1998 pp. 336341.
3-D images, a generative model can be learned and 19. L. Wiskott, J.-M. Fellous, and C. v. d. Malsburg, Face recogni-
applied to other novel objects in the same class of face tion by elastic bunch graph matching, IEEE Trans. Patt. Anal.
images. Mach. Intell., 19: 775779, 1997.
 Neuroscience and Psychology. Study of the amaz- 20. I. Cox, J. Ghosn, and P. Yianilos, Feature-based face recogni-
ing capability of human perception of faces can shed tion using mixture-distance, Proc. of IEEE Conference on
some light on how to improve existing systems for Computer Vision and Pattern Recognition, pp. 209216, 1996.
machine perception of faces. 21. International Workshop on Real Time 3D Sensor and Their
Use 2004.
22. W. Zhao, R. Chellappa, P. J. Phillips, and A. Rosenfeld, Face
recognition: A literature survey, ACM Comput. Surv.35:
BIBLIOGRAPHY 399458, 2003.
23. K. Sung and T. Poggio, Example-based learning for view-based
1. W. Zhao, Tutorial on face recognition, European Conference on human face detection, IEEE Trans. Patt. Anal. Mach., 20: 39
Computer Vision, 2004. 51, 1997.
2. H. Rowley, S. Baluja, and T. Kanade, Neural network based 24. A. Martinez, Recognizing imprecisely localized, partially
face detection, IEEE Trans. Patt. Anal. Mach. Intell., 20: occluded and expression variant faces from a single sample
3951, 1998. per class, Trans. on Patt. Anal. Mach. Intel., 24: 748763, 2002.
3. T. Cootes, C. Taylor, D. Cooper, and J. Graham, Active shape 25. M. H. Yang, D. Kriegman, and N. Ahuja, Detecting faces in
modelstheir training and application, Comp. Vis. Image images: A survey, Trans. Patt. Anal. Mach. Intell., 24: 3458,
Understand., 61: 1823, 1995. 2002.
4. I. Bruner and R. Tagiuri, The perception of people, In G. 26. W. Zhao, Robust Image Based 3D Face Recognition, PhD
Lindzey (ed.), Handbook of Social Psychology, Reading, MA: thesis, College Park, MD: University of Maryland, 1999.
Addision-Wesley, 1954. 27. P. Hallinan, Recognizing human eyes, SPIE Proc. of Vol.
5. M. Bledsoe, The model method in facial recognition, Technical 1570: Geometric Methods In Computer Vision, 1991. pp.
Report PRI 15, Palo Alto, CA: Panoramic Research Inc., 1964. 214226,
FACE RECOGNITION TECHNIQUES 11

28. A. Lanitis, C. Taylor, and T. Cootes, Automatic face identifica- 47. M. Bartlett, H. Lades, and T. Sejnowski, Independent compo-
tion system using flexible appearance models, Image Vision nent representation for face recognition, Proc. of SPIE Sym-
Comput., 13: 393401, 1995. posium on Electronic Imaging: Science and Technology, pp.
29. T. Cootes, G. Edwards, and C. Taylor, Active appearance 528537. 1998.,
models, IEEE Trans. Patt. Anal. Mach. Intell. 23: 681685, 48. S. Lin, S. Kung, and L. Lin, Face recognition/detection by
2001. probabilistic decision-based neural network, IEEE Trans.
31. W. Zhao and R. Chellappa, eds. Face Processing: Advanced Neural Netw., 8: 114132, 1997.
Modeling and Methods, Burlington, VT: Academic Press, 2006. 49. L. R. Tucker, Some mathetical notes on three-mode factor
32. W. Zhao, R. Chellappa, and P. Phillips, Subspace linear dis- analysis, Psychometrika, 31: 279311, 1996.
criminant analysis for face recognition. Technical Report CAR- 50. B. Majunath, R. Chellappa, and C. v. d. Malsburg, A feature
TR 914, College Park, MD: University of Maryland, 1999. based approach to face recognition, Proc. of IEEE Conference
33. H. Moon and P. Phillips, Computational and performance on Computer Vision and Pattern Recognition, 1992, pp. 373
aspects of pca-based face recognition algorithrns, Perception, 378.
30: 301321, 2001. 51. F. Samaria and S. Young, HMM based architecture for face
34. D. Swets and J. Weng, Using discriminant eigenfeatures for identification, Image and Vision Computing, 12: 537583,
image retrieval, IEEE Trans. Patt. Anal. Mach. Intell., 18: 1994.
831836, 1996. 52. A. Nefian and M. Hayes III, Hidden markov models for face
35. K. Fukunaga, Statistical Pattern Recognition, Academic Press, recognition, Proc. of International Conference on Acoustics,
New York: 1989. Speech, and Signal Proceeding, 1998, pp. 27212724.
36. P. Penev and L. Sirovich, The global dimensionality of face 53. S. Lawrence, C. Giles, A. Tsoi, and A. Back, Face recognition: A
space, Proc. of the 4th International Conference on Automatic convolutional neural-network approach, IEEE Trans. Neural
Face and Gesture Recognition, 2000, pp. 264. Netw., 8: 98113, 1997.
37. Z. Hong and J. Yang, Optimal disciminant plane for a small 54. A. Pentland, B. Moghaddam, and T. Straner, View-based and
number of samples and design method of classifier on the plane, modular eignespaces for face recognition, Proc. of IEEE Con-
Patt. Recog., 24: 317324, 1991. ference on Computer Vision and Pattern Recognition, 1994,
38. L. Chen, H. Liao, M. Ko, J. Lin, and G. Yu, A new Ida-based face pp. 8491.
recognition system which can solve the small sample size 55. P. Penev and J. Atick, Local feature analysis: A general sta-
problem, Patt. Recogn., 33: 17131726, 2000. tistical theory for object representation, Network: Computat.
39. M.-H. Yang, Kernel eigenfaces vs. kernel fisherfaces: Face Neural Sys., 7: 477500, 1996.
recognition using kernel methods, Proc. of International Con- 56. J. Huang, B. Heisele, and V. Blanz, Component-based face
ference on Automatic Face and Gesture Recognition, 2002 pp. recognition with 3d morphable models, Proc. of International
215220. Conference on Audio- and Video-Based Person Authentication,
40. B. Schlkopf, A. Smola, and K.-R. Muller, Nonlinear component 2003.
analysis as a kernel eigenvalue problem. Neural Computat., 57. R. Fisher, The statistical utilization of multiple measureme-
10: 12991319, 1998. ents, Annals Eugen., 8: 376386, 1938.
41. S. Mika, G. Ratsch, J. Weston, B. Schlkopf, and K.-R. Muller, 58. M. Lades, J. Vorbruggen, J. Buhmann, J. Lange, C. V. Mals-
Fisher discriminant analysis with kernels, Proc. of Neural burg, R. Wurtz, and W. Konen, Distortion invariant object
Networks for Signal Processing IX 1999, pp. 4148. recognition in the dynamic link architecture, IEEE Trans.
42. M. A. Vasilescu and D. Terzopoulos, Multilinear analysis of Comp., 42: 300311, 1993.
image ensembles: Tensorfaces, Proc. of European Conference 59. R. Yin, Looking at upside-down faces, J. Experim. Psychol., 81:
on Computer Vision, 2002 pp. 447460 141151, 1969.
43. B. Moghaddam and A. Pentland, Probabilistic visual learning 60. P. J. Phillips, H. Moon, S. Rizvi, and P. Rauss, The feret
for object representation, IEEE Trans. Patt. Anal. Mach. evaluation methodology for face-recognition algoithms, IEEE
Intell.19: 696710, 1997. Trans. Patt. Analy. Mach. Intell., 22: 10901104, 2000.
44. P. Phillips, Support vector machines applied to face recogni-
tion, Proc. of Neural Information Processing Systems, 1998, pp.
803809.
WENYI ZHAO
Institutive Surgical, Inc.
45. C. Liu and H. Wechsler, Evolutionary pursuit and its applica- Sunnyvale, California
tion to face recognition, IEEE Trans. Patt. Anal. Mach. Intell.
22: 570582, 2000.
46. S. Z. Li and J. Lu, Face recognition using the nearest feature
line method, IEEE Trans. Neural Netw.10: 439443, 1999.
F
FINGERPRINT IDENTIFICATION image and the orientation image. Core and delta
are singular points that are defined as the points where
HISTORY OF FINGERPRINTS the orientation field of a fingerprint is discontinuous.
Core is the topmost point on the innermost recurving
Sir William Herschel discovered that fingerprints remain ridge, and delta is the center of a triangular region
stable over time and distinct across individuals. In 1877, he where flows from three different directions meet.
commenced placing the inked palm and thumb impressions Figure 2 is an example of the core and delta in a
of some members of the local population on contracts. These fingerprint. Fingerprints generally are classified into
prints were used as a form of signature on the documents. five classes: right loop (R), left loop (L), whorl (W), arch
However, Herschel never claimed that he had developed a (A), and tented arch (T). Figure 3 shows examples of
method to identify criminals. the fingerprints from these five classes.
In the late 1800s, the most advanced findings in finger-  Level 2 features are the points of the fingerprints. They
print study was made by Dr. Henry Faulds. He found that include minutiae, scar, crease, and dot (7). A finger-
fingerprints will not change even with superficial injury print consists of white and dark curves. The white
and that the latent prints left on objects can be used to curves are called the valley and the dark curves are
identify criminals. In 1892, Sir Francis Galton published an called the ridge. Minutiae features are the ridge char-
accurate and in-depth study of fingerprint science in a book acteristics that correspond to the crossings and end-
called Finger Prints, in which he described an attempt at a ings of ridges. They include endpoint, bifurcation,
fingerprint classification system to facilitate the handling forks, island, and enclosures. The endpoint and bifur-
of large collections of fingerprints. Although the work of cation are used commonly in fingerprint recognition.
Galton proved to be sound and became the foundation of Figure 4 is an example of the endpoint and bifurcation.
modern fingerprint science, his approach to classification Scar is the crossing of two or more adjacent ridges.
was inadequate. Juan Vucetich, an Argentinian police Figure 5 (a) shows an example of a scar. A crease
officer who corresponded with Galton, devised his own appears as a white line in a fingerprint. It is a linear
fingerprint classification system, which was put into prac- depression (or grooves) in the skin. Figure 5 (b) shows
tice in September 1891. In 1897, Sir Edward Henry estab- an example of a crease. A dot is an isolated ridge unit
lished the famous Henry System(2), which is a systematic with a pore on it. Figure 5 (c) shows an example of a dot.
and effective method of classifying fingerprints. He pub-  Level 3 features (5) describe the fingerprint shape that
lished the book Classification and Uses of Fingerprints in refers to pores and ridge contours. Pores are small
1900. About 10 years later, his classification system was openings on ridges. We need a high resolution sensor
being used widely by police forces and prison authorities in (1000 pixels per inch (ppi)) to get this feature.
the English-speaking world. Figure 6 is an example of sweat pores. Ridge contours
Since the early 1960s, researchers have begun to develop are morphological features that include ridge width,
an automatic fingerprint identification system (AFIS) to shape, path deviation, and so forth.
improve the efficiency of fingerprint recognition. Today, Fingerprint sensors, the very front end of the fin-
almost all law enforcement agencies around the world use gerprint recognition systems, are used to capture the
an AFIS. And fingerprint science is a well-researched field fingerprint images. The kinds of fingerprint sensors
with research and development activities worldwide. Sev- are: optical sensors, semiconductor sensors, and ultra-
eral publicly available databases (3,4) exist for evaluating sound sensors. Among these sensors, optical sensors
the performance of various fingerprint recognition algo- are considered to be stable and reliable, semiconductor
rithms. New high-resolution electronic sensors, which are sensors are considered to be low cost and portable, and
quite affordable (5,6), are available for use in portable ultrasound sensors are considered to be accurate but
laptop computers, mobile phones, and personal digital more expensive.
assistants (PDAs).

FINGERPRINT FEATURES FINGERPRINT RECOGNITION

Fingerprints are represented by features that are classified Depending on an application two kinds of fingerprint recog-
at three levels. nition systems exist: verification systems and identification
systems (8). A verification system generally stores the
fingerprint images or feature sets of users in a database.
 Level 1 features describe the patterns of the finger- At a future time, it compares the fingerprint of a person
prints, which include ridge flow, core and delta, and with her/his own fingerprint image or feature set to verify
pattern type. Ridge flow is the orientation image of the that this person is, indeed, who she/he claims to be. This
fingerprint. This feature commonly is used for classi- problem is a one-to-one matching problem. The system can
fication. Figure 1 shows an example of the original accept or reject this person, according to the verification
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 FINGERPRINT IDENTIFICATION

Figure 1. An example of the original image and the orientation


image: (a) original image, (b) orientation image. The orientation
is shown by the arrows above the ridges.

result. An identification system is more complex where, for Three kinds of approaches (see Fig. 7) exist to solve the
a query fingerprint, the system searches the entire data- fingerprint identification problem (10): (1) Repeat the ver-
base to find out if any fingerprint images or feature sets ification procedure for each fingerprint in the database and
saved in the database can match it. It conducts one-to-many select the best match; (2) use fingerprint classification
matching (8). Two kinds of identification systems exists: the followed by verification; and (3) use fingerprint indexing
closed-set identification system and the open-set identifica- followed by verification (10,11). Fingerprint matching, clas-
tion system (9). The closed-set identification system is the sification, and indexing are three basic problems in finger-
identification system for which all potential users are print identification.
enrolled in the system. Usually, the closed-set identifica-
tion is used for research purposes. The open-set identifica- Fingerprint Matching
tion system is the identification system for which some
A fingerprint matching algorithm aligns the two given
potential users are not enrolled in the system. The open-
fingerprints, finds the correspondences between them,
set identification is performed in real operational systems.
and returns a measure of the degree of similarity. Usually,
The verification and the closed-set identification are special
the similarity score is used to represent the degree of
cases of the open-set identification.
similarity between the two given fingerprints. Fingerprint
matching is a challenging problem because different
impressions of the same finger could be very different
because of distortion, displacement, rotation, noise, skin
condition, pressure, noise, and so forth (8). Furthermore
the impressions from different fingers could be quite simi-
lar. Figure 8 shows two impressions of one fingerprint from
the NIST-4 database (10). The fingerprint matching algo-
rithms can be classified into three different types: (1) the
correlation-based approach, (2) the minutiae-based
approach, and (3) the ridge feature-based approach.

1. Correlation-based matching: The correlation-based


approach uses the gray-level information of finger-
prints. For a template fingerprint (in the database)
and a query fingerprint, it computes the sum of the
squared differences in gray values of all the pixels to
Figure 2. Level 1 features: core and delta. evaluate the diversity of the template fingerprint and
the query fingerprint. To deal with the distortion

Figure 3. Examples of fingerprints for each class


based on the Henry System: (a) right loop, (b) left
loop, (c) whorl, (d) arch, and (e) tented.
FINGERPRINT IDENTIFICATION 3

Figure 6. Example of sweat pores.

 Feature extraction: The first step of the minutiae-


matching algorithm is the minutiae extraction. Figure 9
Figure 4. Minutiae: endpoint and bifurcation. is the block diagram of the minutiae-based feature
extraction procedure, which is used widely in most
fingerprint recognition systems. As an example, Bhanu
problem, it computes the correlation in local regions and Tan present a learned template-based algorithm for
instead of the global correlation on the entire image. In feature extraction (15). Templates are learned from
Bazen et al. (12), the correlation-based evaluation is examples by optimizing a criterion function using the
used to find the distinctive regions of the template Lagrange method. To detect the presence of minutiae in
fingerprint. These local regions fit very well at the fingerprints, templates for endpoints and bifurcations
original locations and much worse at other locations. are applied with appropriate orientation to the binary
During the matching, they compute the gray-level fingerprints at selected potential minutiae locations.
distance between the distinctive regions of a template  Matching: Tan and Bhanu (13,14) present a fingerprint-
and the corresponding areas in the query fingerprints. matching approach, based on genetic algorithms (GA).
Then, they sum up the squared gray-level difference This method can achieve a globally optimized solution
for each local region. The position of a region of the for the transformation between two sets of minutiae
template with the minimal distance is considered as extracted from two different fingerprints. In their
the corresponding region in the query fingerprint. approach, the fitness function is based on the local
Compared with the other matching algorithms properties of triplets of minutiae, such as minimum
described below, correlation-based matching appro- angle, maximum angle, triangle handedness, triangle
aches use gray-level information of the fingerprint. direction, maximum side, minutiae density, and ridge
When the quality of the fingerprint image is not good, counts. These features are described in the Fingerprint
especially when a large number of minutiae are miss- Indexing section below.
ing, the correlation-based matching algorithm may be Jiang and Yau (16) use both the local and global
considered. However, it is expensive computationally. structures of minutiae in their minutiae-matching
2. Minutiae-based matching: Minutiae-based matching approach. The local structure of a minutia describes
is the most commonly used method for fingerprint the features independent of the rotation and transla-
recognition systems. In this approach, a fingerprint is tion in its l-nearest neighborhood. The global structure
represented by a set of minutiae features. Thus, the is variant with the rotation and translation. Using the
fingerprint recognition problem is reduced to a point- local structure, the best matched minutiae pair is
matching problem. Therefore, any point matching found and used to align the template and query fin-
approach, such as the relaxation algorithms, can be gerprint. Then, the elastic bounding box of the global
used to recognize the fingerprints (13,14). features is used for the fingerprint matching.

Figure 5. Level 2 features: (a) scar, (b) crease, and


(c) dot.
4 FINGERPRINT IDENTIFICATION

Classification Indexing
Verification one by one
(R, L, W, A, T)
Top
Selected class hypotheses
Select the best match
Verification within class Verification

Results Results
Results

Figure 7. Block diagram of three kinds of (1) Repeat verification (2) Classification followed by verification (3) Indexing followed by verification
approaches to solve the identification problem.

for the triangular minutiae matching, hundreds of


thousands of triangles could exist. So, the minutiae
matching approach needs high computational power.
However, when the image quality is not good, the
minutiae extraction would be difficult. Because fin-
gerprints consist of natural valley and ridges,
researchers have used them for fingerprint matching.
Maltoni et al. (8) present a filter-based algorithm for
fingerprint recognition. It is based on the grayscale
image. First, they determine a reference point with
the maximum curvature of the concave ridges and an
Figure 8. Two impressions of one fingerprint. interest region in the fingerprint. After tessellating
the interest region around the reference point, they
use a bank of Gabor filters to capture both local and
Kovacs-Vajna (17) used triangular matching to deal global details in a fingerprint. Then, they compute the
with deformations of fingerprints. In this approach, average absolute deviation from the mean to define
the minutiae regions of the template fingerprint are the compact fixed-length FingerCode as the feature
moved around the query fingerprint to find the possible vector. Finally, they match the fingerprint by com-
correspondence. The triangular matching algorithm is puting the Euclidean distance between the corre-
used to obtain the matching minutiae set. Then, the sponding FingerCode between the template and
dynamic time-warping algorithm is applied to validate query fingerprints.
the final matching results.
With the improvement of the fingerprint sensor technol-
3. Ridge feature-based matching: For a good quality
ogy, now it is possible to extract features at a high resolu-
fingerprint with size 480  512 [500 pixels per inch
tion. In Jain et al. (5), authors use pores and ridge contours
(ppi)], about 80 minutiae features could exist. Thus,
combined with minutiae features to improve fingerprint
recognition performance. In their approach, they use Gabor
filter and wavelet transform to extract pores and ridge
Fingerprint image contours. During the matching process, they extract orien-
tation field and minutiae features and establish alignment
between the template and query fingerprint. If the orienta-
Gray scale enhancement
tion fields match, then the system uses a minutiae-based
matching algorithm to verify the query fingerprint or to
reject the query fingerprint. If the number of the corre-
Binarization sponding minutiae between the template fingerprint and
query fingerprint is greater than a threshold, then these
two fingerprints match; if not, then the system extracts
Thinning pores and ridge contours and they use the Iterative Closest
Point (ICP) algorithm to match these features. This hier-
archical matching system requires 1000 ppi resolution for
the sensor.
Minutiae detection

FINGERPRINT CLASSIFICATION
Post processing
Most fingerprint classification systems use the Henry sys-
tem for fingerprint classification, which has five classes as
Minutiae shown in Fig. 3. The most widely-used approaches for
fingerprint classification are based on the number and
Figure 9. Block diagram for minutiae-based feature extraction. relations of the singular points, including the core and
FINGERPRINT IDENTIFICATION 5

the delta. Karu and Jain (8) present a classification (HMM), decision trees, and PCASYS (3). Yao et al. (22)
approach based on the structural information around the present new fingerprint classification algorithms based on
singular points. Three steps are in this algorithm: (1) two machine learning approaches: support vector machines
Compute the ridge direction in a fingerprint image; (2) (SVMs) and recursive neural networks (RNNs). In their
find the singular points based on the changes in the direc- approach, the fingerprints are represented by the relational
tional angle around the curve; and (3) classify the finger- graphs. Then, RNNs are used to train these graphs and
prints according to the number and locations of the core and extract distributed features for the fingerprints. SVMs inte-
delta. Other researchers use a similar method: first, find grated with distributed features are used for classification.
the singular point; then use a classification algorithm to To solve the ambiguity problem in fingerprint classification,
find the difference in areas, which are around the singular an error-correcting code scheme is combined with SVMs.
points for different classes. Several representations based Tan et al. (23) present a fingerprint classification
on principal component analysis (PCA) (3), a self-organiz- approach based on genetic programming (GP) to learn
ing map (18), and Gabor filters (8) are used. The problems composite operators that help to find useful features. Dur-
with these approaches are: ing the training, they use GP to generate composite opera-
tors. Then, the composite operators are used to generate the
 It is not easy to detect singular points, and some feature vectors for fingerprint classification. A Bayesian
fingerprints do not have singular points. classifier is used for classification. Fitness values are com-
 Uncertainty in the location of the singular points is puted for the composite operators based on the classifica-
large, which has a great effect on the classification tion results. During the testing, the learned composite
performance because the features around the singular operator is applied directly to generate feature vectors.
points are used. In their approach, they do not need to find the reference
points. Table 1 summarizes representative fingerprint clas-
Cappelli et al. (19) present a structural analysis or the sification approaches.
orientation field of a fingerprint. In their approach, the
directional image is calculated and enhanced. A set of FINGERPRINT INDEXING
dynamic masks is used in the segmentation step, and
each dynamic mask is adapted independently to best fit The purpose of indexing algorithms is to generate, in an
the directional image according to a cost function. The efficient manner, a set of hypotheses that is a potential
resulting cost constitutes a basis for the final classification match to a query fingerprint. Indexing techniques can be
(3). Based on the orientation field, cappelli et al. also pre- considered as front-end processing, which then would be
sent a fingerprint classification system based on the multi- followed by back-end verification processing in a complete
space KL transform (20). It uses a different number of fingerprint recognition system.
principal components for different classes. Jain and Minut A prominent approach for fingerprint indexing is by
(8) propose a classification algorithm based on finding the Germain et al. (11). They use the triplets of minutiae in
kernel that best fits the flow field of a given fingerprint. For their indexing procedure. The features they use are: the
each class, a kernel is used to define the shape of the length of each side, the ridge count between each pair of
fingerprint in that class. In these approaches, it is not vertices, and the angles that the ridges make with respect
necessary to find the singular points. to the x-axis of the reference frame. The number of corre-
Researchers also have tried different methods to combine sponding triangles is defined as the similarity score
different classifiers to improve the classification perfor- between the query and the template fingerprints. In their
mance. Senior (21) combines the hidden Markov model approach, a hash table is built where all possible triplets are

Table 1. Representative fingerprint classification approaches


Authors Approach
Candela et al. (3), 1995 Probabilistic neural network (PNN)
Karu and Jain (24), 1996 Rule-based classification
Halici and Ongun (18), 1996 Neural network based on self-organizing feature maps (SOM)
Cappelli et al. (19), 1997 Multispace principal component analysis
Qi et al. (25), 1998 Probabilistic neural network based on genetic algorithm (GA) and feedback mechanism
Jain et al. (28), 1999 K-nearest neighbor and neural network based on Gabor features (FingerCode)
Cappelli et al. (26), 1999 Classification based on partitioning of orientation image
Kamijo (27), 1999 A four-layered neural network integrated in a two-step learning method
Su et al. (28), 2000 Fractal analysis
Pattichis et al. (29), 2001 Probabilistic neural network and AMFM representation for fingerprints
Bernard et al. (30), 2001 Kohonen topological map
Senior (21), 2001 Hidden Markov model and decision tree and PCASYS
Jain and Minut (31), 2002 Model-based method based on hierarchical kernel fitting
Mohamed and Nyongesa (32), 2002 Fuzzy neural network
Yao et al. (22), 2003 Support vector machine and recursive neural network based on FingerCode
Tan et al. (23), 2005 Genetic programming
6 FINGERPRINT IDENTIFICATION

Figure 10. An example of two corresponding triangles in a pair


of fingerprints.

saved. For each triplet, a list of IDs, including the finger- one fingerprint. In the first impression, three noncolinear
prints that have this triplet, is saved. During the identifica- minutiae A, B, and C are picked randomly to form a
tion process, the triplets of the query fingerprint are triangle DABC. The features in this triangle are famin
extracted andby a hashing process described below 30 ; amed 65 ; f 1; h 6; l jACj; x f0; 0; 0g; Dj
the potential IDs of the query fingerprint are determined. f6; 5; 12gg. Similarly, three noncolinear minutiae a, b,
Because some features in Ref. (11) may not be reliable, and c in the second impression form Dabc. Its features
Bhanu and Tan (33) use a novel set of features of a triplet for are famin 31 ; amed 63 ; f 1; h 6; l jacj; x
fingerprint indexing. These features are: f0; 2; 0g; j f6; 5; 12gg. If the error between these two
triangles are within the error tolerance (34), then these
 Minimum angle amin and median angle amed . Assume two triangles are considered the corresponding triangles.
ai are three angles in a triplet, where i = 1, 2, 3. amin The output of this process, carried out for all the triplets, is a
minfai g; amax maxfai g; amed 180  amin  amax . list of hypotheses, which is sorted in the descending order of
 Triangle handedness f. Let Zi xi jyi be the com- the number of potential corresponding triangles. Top T
plex number corresponding to the location xi ; yi of hypotheses are the input to the verification process.
point Pi,i = 1,2, 3. Define Z21 = Z2  Z1, Z32 = Z3  Z2,
and Z13 = Z1  Z3. Let triangle handedness f sign PERFORMANCE EVALUATION
Z21  Z32 , where sign is the signum function and  is
the cross product of two complex numbers. Points P1, Two classes in the fingerprint recognition systems exist:
P2, and P3 are noncolinear points, so f = 1 or 1. match and nonmatch. Let s and n denote match and
 Triangle direction h. Search the minutiae in the image non-match. Assume that x is the similarity score. Then,
from top to bottom and left to right. If the minutiae is f(x|s) is the probability density function given s is true, and
the start point, then y 1; otherwise y 0. Let f(x|n) is the probability density function given n is true.
h 4y1 2y2 y3 , where yi is the y value of point Pi, Figure 11 is an example of these two distributions. For a
i = 1,2,3, and 0  h  7. criterion k, one can define
 Maximum side l. Let l maxfLi g, where L1
jZ21 j; L2 jZ32 j, and L3 jZ13 j.
 Minutiae density x. In a local area (32  32 pixels) 0.018
centered at the minutiae Pi, if xi minutiae exists then 0.016
the minutiae density for Pi is xi . Minutiae density x is a
vector consisting of all xi . 0.014 f(x|n)
 Ridge counts j. Let j1 , j2 , and j3 be the ridge counts of 0.012
Probability

sides P1P2, P2P3, and P3P1, respectively. Then, j is a f(x|s)


vector consisting of all ji . 0.010

0.008 CR
During the offline hashing process, the above features
Hit
for each template fingerprint (33) are computed and a hash 0.006
table Hamin ; amed ; f; h; l; x; j is generated. During the
online hashing process, the same features are computed 0.004

for each query fingerprint and compared with the features 0.002
represented by H. If the difference in features is small
FR FA
enough, then the query fingerprint is probably the same 0
k 0.4
0 0.1 0.2 0.3 0.5 0.6 0.7 0.8
as the stored fingerprints that have similar features.
Figure 10 is an example of two corresponding triangles Similarity scores
in a pair of fingerprints that are two impressions of Figure 11. Densities of the match and nonmatch scores.
FINGERPRINT IDENTIFICATION 7

on the analysis of feature space and derive an expression


R 1the probability that x is above k given s, where Hit
Hit:


k f xjsdx to estimate the probability of false match based on the


 False alarm: Rthe probability that x is above k given n, minutiae between two fingerprints. It measures the
1
where FA k f xjndx amount of information needed to establish correspon-
dence between two fingerprints. Tan and Bhanu (42)
R k the probability that x is below k given s,
False rejection:

present a two-point model and a three-point model to
where FR 1 f xjsdx
estimate the error rate for the minutiae-based fingerprint
Correct rejection:R kthe probability that x is below k given

recognition. Their approach not only measures the posi-
n, where CR 1 f xjndx tion and orientation of the minutiae but also the relations
between different minutiae to find the probability of cor-
A receiver operating characteristic (ROC) curve is a respondence between fingerprints. They allow the overlap
graphical plot whose x-axis is the false alarm (FA) rate of uncertainty area of any two minutiae. Tabassi et al. (43)
and y-axis is the hit (Hit) rate. A ROC curve is used to and Wein and Baveja (44) use the fingerprint image
evaluate the performance of a recognition system because quality to predict the performance. They define the quality
it represents the changes in FA rate and Hit rate with as an indication of the degree of separation between
different discrimination criteria (thresholds). A detection the match score and non-match score distributions. The
error tradoff (DET) curve plots the FA rate and the false farther these two distributions are from each other, the
rejection (FR) rate with the change of discrimination better the system performs.
criteria. A confidence interval is an interval within which Predicting large population recognition performance
the estimation is likely to be determined. The ISO based on a small template database is another important
standard performance testing report gives the detail of topic for the fingerprint performance characterization.
recommendations and requirements for the performance Wang and Bhanu (45) present an integrated model that
evaluations (9). considers data distortion to predict the fingerprint identi-
Public fingerprint databases are used to evaluate the fication performance on large populations. Learning is
performance of different fingerprint recognition algorithms incorporated in the prediction process to find the optimal
and fingerprint acquisition sensors. The National Institute small gallery size. The Chernoff and Chebychev inequal-
of Standards and Technology (NIST) provides several spe- ities are used as a guide to obtain the small gallery size
cial fingerprint databases with different acquisition meth- given the margin of error and confidence interval. The
ods and scenarios. Most images in these databases are confidence interval can describe the uncertainty associated
rolling fingerprints that are scanned from paper cards. with the estimation. This confidence interval gives an
The NIST special database 24 is a digital video of live- interval within which the true algorithm performance for
scan fingerprint data. The detail of the NIST special data- a large population is expected to fall, along with the prob-
bases can be found in Ref. (35). Since 2000, fingerprint ability that it is expected to fall there.
verification competition (FVC) has provided public data-
bases for a competition that is held every 2 years. For each
FINGERPRINT SECURITY
competition, four disjoint databases are created that are
collected with different sensors and technologies. The per-
Traditionally, cryptosystems use secret keys to protect
formance of different recognition algorithms is addressed
information. Assume that we have two agents, called Alice
in the reports of each competition (3639). The fingerprint
and Bob. Alice wants to send a message to Bob over
vendor technology evaluation (FpVTE) 2003 is conducted by
the public channel. Eve, the third party, eavesdrops over
NIST to evaluate the performance of the fingerprint recog-
the public channel and tries to figure out what Alice and
nition systems. A total of 18 companies competed in the
Bob are saying to each other. When Alice sends a message to
FpVTE, and 34 systems from U.S government were exam-
Bob, she uses a secret encryption algorithm to encrypt the
ined. The performance of different recognition algorithms
message. After Bob gets the encrypted message, he will
is discussed in Ref. (40).
use a secret decryption algorithm to decrypt the message.
The secret keys are used in the encryption and decryption
PERFORMANCE PREDICTION processes. Because the secret keys can be forgotten, lost,
and broken, biometric cryptosystems are possible for
Several research efforts exist for analyzing the perfor- security.
mance of fingerprint recognition. Galton (41) assumes Uludag et al. (46) propose a cryptographic construct that
that 24 independent square regions could cover a finger- combines the fuzzy vault with fingerprint minutiae data to
print and that he could reconstruct correctly any of the protect information. The procedure for constructing the
regions with a probability of 1/2 by looking at the sur- fuzzy vault is like what follows in the example of Alice
rounding ridges. Accordingly, the Galton formulation of and Bob. Alice places a secret value k in a vault and locks it
the distinctiveness of a fingerprint is given by (1/16)  using an unordered set A of the polynomial coefficients. She
(1/256)  (1/2)24, where 1/16 is the probability of the selects a polynomial p of variable x to encode k. Then, she
occurrence of a fingerprint type and 1/256 is the prob- computes the polynomial projections for the elements of A
ability of the occurrence of the correct number of ridges and adds some randomly generated chaff points that do not
entering and exiting each of the 24 regions. Pankanti et al. lie on p to arrive at the final point set R. Bob uses an
(8) present a fingerprint individuality model that is based unordered set B of the polynomial coefficients to unlock
8 FINGERPRINT IDENTIFICATION

the vault only if B overlaps with A to a great extent. He tries est because the traditional secret key can be forgotten, lost,
to learn k, that is to find p. By using error-correction coding, and broken.
he can reconstruct p. Uludag et al. (46) present a curve-
based transformed minutia representation in securing the
BIBLIOGRAPHY
fuzzy fingerprint vault.
We know that the biometrics is permanently related
1. R. Wang and B. Bhanu, Predicting fingerprint biometric per-
with a user. So if the biometrics is lost, then the bio-
formance from a small gallery, Pattern Recognition Letters, 28
metrics recognition system will be compromised forever. (1): 4048, 2007.
Also, a user can be tracked by cross-matching with all the
2. E. R. Henry, Classification and Uses of Fingerprints. George
potential uses of the fingerprint biometrics, such as Routledge and Sons, 1900.
access to the house, bank account, vehicle, and laptop
3. G. T. Candela, P. J. Grother, C. I. Watson, R. A. Wilkinson, and
computer. Ratha et al. (47) presents a solution to over- C. L. Wilson, PCASYS-A pattern-level classification automa-
come these problems in the fingerprint recognition sys- tion system for fingerprints, NIST Technical Report. NISTIR
tems. Instead of storing the original biometrics image, 5467, 1995.
authors apply a one-way transformation function to the 4. D. Maio, D. Maltoni, R. Cappelli, J. L. Wayman, and A. K. Jain,
biometrics. Then, they store the transformed biometrics FVC2000: fingerprint verification competition, IEEE Trans.
and the transformation to preserve the privacy. If a Pattern Analysis and Machine Intelligence, 24 (3): 402412,
biometrics is lost, then it can be restored by applyings 2002.
a different transformation function. For different appli- 5. A. K. Jain, Y. Chen, and M. Demirkus, Pores and ridges: High
cations of the same biometrics, they use different trans- resolution fingerprint matching using level 3 features, IEEE
formation functions to avoid a user being tracked by Trans. Pattern Analysis and Machine Intelligence, 29 (1):
performing a cross match. 1527, 2007.
Like other security systems, fingerprint sensors are 6. http://authentec.com.
prone to spoofing by fake fingerprints molded with arti- 7. Scientific Working Group on Friction Ridge Analysis,
ficial materials. Parthasaradhi et al. (48) developed an Study and Technology (SWGFAST), Available: http://
anti spoofing method that is based on the distinctive fingerprint.nist.gov/standard/cdef f s/Docs/SWGFAST_
moisture pattern of live fingers contacting fingerprint Memo.pdf.
sensors. This method uses the physiological process of 8. D. Maltoni, D. Maio, A. K. Jain, and S. Prabhakar, Handbook of
perspiration to determine the liveness of a fingerprint. Fingerprint Recognition. New York: Springer, 2003.
First, they extract the gray values along the ridges to form 9. ISO/IEC19795-1, Information Technology-Biometric Perfor-
a signal. This process maps a 2 fingerprint image into a mance Testing and Reporting-Part 1: Principles and Frame-
work. ISO/IEC JTC1/SC37 N908, 2006.
signal. Then, they calculate a set of features that are
represented by a set of dynamic measurements. Finally, 10. X. Tan and B. Bhanu, A robust two step approach for finger-
print identification, Pattern Recognition Letters, 24 (13): 2127
they use a neural network to perform classification
2134, 2003.
(live vs. not live).
11. R. S. Germain, A. Califano, and S. Colville, Fingerprint match-
ing using transformation parameter clustering, IEEE Compu-
tational Science and Engineering, 4 (4): 4249, 1997.
CONCLUSIONS
12. A. M. Bazen, G. T. B. Verwaaijen, S. H. Gerez, L. P. J. Vee-
lenturf, and B. J. vander Zwaag, A correlation-based finger-
Because of their characteristics, such as distinctiveness,
print verification system, Proc. IEEE Workshop on Circuits
permanence, and collectability, fingerprints have been Systems and Signal Processing, Utrecht, Holland, 2000,
used widely for recognition for more than 100 years. pp. 205213.
Fingerprints have three levels of features: pattern, point, 13. X. Tan and B. Bhanu, Fingerprint matching by genetic algo-
and shape. With the improvement of the sensor resolu- rithm, Pattern Recognition, 39 (3): 465477, 2006.
tion, more and better fingerprint features can be extracted 14. B. Bhanu and X. Tan, Computational Algorithms for Finger-
to improve the fingerprint recognition performance. print Recognition. Kluwer Academic Publishers, 2003.
Three kinds of approaches exist to solve the fingerprint 15. B. Bhanu and X. Tan, Learned templates for feature extraction
identification problem: (1) Repeat the verification proce- in fingerprint images, Proc. IEEE Computer Society Conf. on
dure for each fingerprint in the database and select the Computer Vision and Pattern Recognition, Hawaii, 2001, Vol 2,
best match; (2) perform fingerprint classification followed pp. 591596.
by verification; and (3) create fingerprint indexing, fol- 16. X. Jiang and W. Y. Yau, Fingerprint minutiae matching based
lowed by verification. Fingerprint verification is done by on the local and global structures, Proc. IEEE Int. Conf. Pattern
matching a query fingerprint with a template. The feature Recognition, Barcelona, Spain, 2000, pp. 10381041.
extraction, matching, classification, indexing and perfor- 17. Z. M. Kovacs-Vajna, A fingerprint verification system based on
mance prediction are the basic problems for fingerprint triangular matching and dynamic time warping, IEEE Trans.
recognition. Pattern Analysis and Machine Intelligence, 22 (11): 12661276,
Fingerprint prediction, security, liveness detection, and 2000.
cancelable biometrics are the important current research 18. U. Halici and G. Ongun, Fingerprint classification through
problems. The area of biometric cryptosystems, especially self-organizing feature maps modified to treat uncertainties,
the fingerprint cryptosystem, is an upcoming area of inter- Proc. IEEE, 84 (10): 14971512, 1996.
FINGERPRINT IDENTIFICATION 9

19. R. Cappelli, D. Maio, and D. Maltoni, Fingerprint classification 34. X. Tan and B. Bhanu, Robust fingerprint identification, Proc.
based on multi-space KL, Proc. Workshop Autom. Identific. IEEE Int. Conf. on Image Processing, New York, 2002, pp. 277
Adv. Tech., 1999, pp. 117120. 280.
20. N. K. Ratha and R. Bolle, Automatic Fingerprint Recognition 35. http://www.itl.nist.gov/iad/894.03/databases/defs/dba-
Systems. Springer, 2003. ses.html.
21. A. Senior, A combination fingerprint classifier, IEEE Trans. 36. http://bias. csr. unibo. it/fvc2000/.
Pattern Analysis and Machine Intelligence, 23 (10): 11651174, 37. http://bias.csr.unibo.it/fvc2002/.
2001. 38. http://bias. csr. unibo. it/fvc2004/.
22. Y. Yao, G. L. Marcialis, M. Pontil, P. Frasconi, and F. Roli, 39. http://bias.csr.unibo.it/fvc2006/.
Combining flat and structured representations for finger-
print classification with recursive neural networks and sup- 40. C. Wilson, R. A. Hicklin, M. Bone, H. Korves, P. Grother, B.
Ulery, R. Micheals, M. Zoepfl, S. Otto, and C. Watson, Finger-
port vector machines, Pattern Recognition, 36, (2): 397406,
2003. print Vendor Technology Evaluation 2003: Summary of Results
and Analysis Report, 2004.
23. X. Tan, B. Bhanu, and Y. Lin, Fingerprint classification based
on learned features, IEEE Trans. on Systems, Man and Cyber- 41. F. Galton, Finger Prints. McMillan, 1892.
netics, Part C, Special issue on Biometrics, 35, (3): 287300, 42. X. Tan and B. Bhanu, On the fundamental performance for
2005. fingerprint matching, Proc. IEEE Computer Society Conf.
24. K. Karu and A. K. Jain, Fingerprint classification, Pattern on Computer Vision and Pattern Recognition, Madison,
Recognition, 29, (3): pp. 389404, 1996. Wisconsin, 2003, pp. 1820.
25. Y. Qi, J. Tian and R. W. Dai, Fingerprint classification system 43. E. Tabassi, C. L. Wilson, and C. I. Watson, Fingerprint image
quality, National Institute of Standards and Technology Inter-
with feedback mechanism based on genetic algorithm, Proc.
Int. Conf. Pattern Recog., 1: 163165, 1998. national Report 7151, 2004.
26. R. Cappelli, A. Lumini, D. Maio, and D. Maltoni, Fingerprint 44. L. M. Wein and M. Baveja, Using fingerprint image quality to
classification by directional image partitioning, IEEE Trans. improve the identification performance of the U.S. visitor and
immigrant status indicator technology program, The National
Pattern Analysis and Machine Intelligence, 21 (5): 402421,
Academy of Sciences, 102 (21): 77727775, 2005.
1999.
27. M. Kamijo, Classifying fingerprint images using neural net- 45. R. Wang and B. Bhanu, Learning models for predicting recog-
work: Deriving the classification state, Proc. Int. Conf. Neural nition performance, Proc. IEEE Int. Conf. on Computer Vision,
Network, 3: 19321937, 1993. Beijing, China, 2005, pp. 16131618.
46. U. Uludag, S. Pankanti, and A. K. Jain, Fuzzy vault for
28. F. Su, J. A. Sun, and A. Cai, Fingerprint classification based on
fractal analysis, Proc. Int. Conf. Signal Process., 3: 14711474, fingerprints, Proc. Audio- and Video-based Biometric Person
2000. Authentication, Rye Brook, New York, 2005, pp. 310319.
29. M. S. Pattichis, G. Panayi, A. C. Bovik, and S. P. Hsu, Finger- 47. N. K. Ratha, S. Chikkerur, J. H. Connell, and R. M. Bolle,
Generating cancelable fingerprint templates, IEEE Trans.
print classification using an AM-FM model, IEEE Trans.
Pattern Analysis and Machine Intelligence, 29 (4): 561572,
Image Process., 10 (6): 951954, 2001.
2007.
30. S. Bernard, N. Boujemaa, D. Vitale, and C. Bricot, Fingerprint
classification using Kohonen topologic map, Proc. Int. Conf. 48. S. T. V. Parthasaradhi, R. Derakhshani, L. A. Hornak, and
Image Process.,3: 230233, 2001. S. A. C. Schuckers, Time-series detection of perspiration as a
liveness test in fingerprint devices, IEEE Trans. on System,
31. A. K. Jain and S. Minut, Hierarchical kernel fitting for finger- Man, and Cybernetics-Part C: Applications and Reviews, 35
print classification and alignment, Proc. IEEE Int. Conf. Pat-
(3): 335343, 2005.
tern Recognition, 2: 469473, 2002.
32. S. M. Mohamed and H. O. Nyongesa, Automatic fingerprint
classification system using fuzzy neural techniques, Proc. Int. RONG WANG
Conf. Fuzzy Systems, 1: 358362, 2002. BIR BHANU
33. B. Bhanu and X. Tan, Fingerprint indexing based on novel University of California
features of minutiae triplets, IEEE Trans. Pattern Analysis Riverside, California
and Machine Intelligence, 25, (5): 616622, 2003.
L
LEVEL SET METHODS The surface dimension, z 2 R, encodes the signed Eucli-
dean distance from the contour. More specifically, the value
The shape of a real-world object can be represented by a of z inside the closed contour has a negative sign, and
parametric or a nonparametric contour in the image plane. outside the contour has a positive sign [see Fig. 1(b)]. At
The parametric contour representation is referred to as an any given time instant t, the cross section of the surface at
explicit representation and is defined in the Lagrangian z 0 corresponds to the contour, which is also referred to as
coordinate system. In this coordinate system, two different the zero-level set.
objects have two different representations stemming from The time dimension t is introduced as an artificial
the different sets of control points that define the object dimension to account for the iterative approach to finding
contours. The control points constitute the finite elements, the steady state of an initial configuration. In computer
which is a common formalism used to represent shapes in vision, the initial configuration of the level set surface
the Lagrangian coordinates. In contrast to the parametric relates to an initial hypothesis of the object boundary,
Lagrangian representation, the nonparametric represen- which is evolved iteratively to the correct object boundary.
tation defines the object contour implicitly in the Eulerian The iterations are governed by a velocity field, which
coordinates, which remains constant for two different specifies how the contour moves in time. In general, the
objects. The level set method is a nonparametric represen- velocity field is defined by the domain-related physics. For
tation defined in the Eulerian coordinate system and is instance, in fluid mechanics, the velocity of the contour is
used commonly in the computer vision community to repre- defined by the physical characteristics of the fluid and the
sent the shape of an object in an image. environment in which it will dissolve; whereas in computer
The level set method has been introduced in the field of vision, the velocity is defined by the appearance of the
fluid dynamics by the seminal work of Osher and Sethian in objects in the image.
1988 (1). After its introduction, it has been applied success- At each iteration, the equations that govern the contour
fully in the fields of fluid mechanics, computational physics, evolution are derived from the zero-level set at time
computer graphics, and computer vision. In the level set t: Fxt; t 0, where x x; y. Because the moving con-
representation, the value of each grid point (pixel) is set tour is always at the zero level, the rate of contour motion in
traditionally to the Euclidean distance between the grid time is given by:
point and the contour. Hence, moving the contour from one
configuration to the other is achieved by changing @Fxt; t
0 1
the distance values in the grid points. During its motion, @t
the contour can change implicitly its topology by splitting
into two disjoint contours or by merging from two contours By applying the chain rule, Equation (1) becomes Ft DF
to one. xt; tx0 t 0. In Fig. 2, a contouris present that evolves
The implicit nature of the representation becomes essen- using the curvature flow, which moves rapidly in the areas
tial to handle the topology changes for the case when an where the curvature is high.
initial configuration is required to solve a time-dependent An important aspect of the level set method is its ability
problem. Upon initialization, the level set converges to a to compute the geometric properties of the contour G from
solution by re-evaluating the values at the grid points the level set grid by implicit differentiation. For instance,
DF
~  jDFj
iteratively. This iterative procedure is referred to as the the contour normal is computed by n . Hence, divid-
contour evolution. ing both sides by jDFj and replacing xt~ n by F results in the
well-known level set evolution equation:

CONTOUR EVOLUTION Ft jDFjF 0 2

Without loss of generality, I will discuss the level set which evolves the contour in the normal direction with
formalism in the two-dimensional image coordinates speed F. The sign of F defines whether the contour will
(x, y), which can be extended to higher dimensions without move inward or outward. Particularly, a negative F value
complicating the formulation. Let there be a closed contour shrinks the contour and a positive F value expands the
G defined in the image coordinates as shown in Fig. 1(a). contour. In computer vision, F is computed at each grid
The contour can be visualized as the boundary of an object point based on its appearance and the priors defined from
in an image. To represent the evolution of the contour, the the inside and the outside of the contour. As Equation (2)
level set formalism introduces two additional dimensions includes only first-order derivatives, it can be written as a
that define the surface in z and the time t: [0,T): HamiltonJacobi equation Ft Hfx; fy 0, where
Hfx; fy jDFjF. Based on this observation, the
z Fx; y; t numerical approximations of the implicit derivatives can
be computed by using the forward Euler time-discretization
(see Ref. 2 for more details).

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 LEVEL SET METHODS

Figure 1. (a) The contour is denned in the spatial image


coordinates, (x,y). Each black dot represents a grid point on
the plane, (b) The level set function denning the contour given
in (a). The blue-colored grid points denote positive values, and
the red-colored grid points denote negative values. The dis-
tance of a grid point from the contour is expressed by the
variation in the color value from light to dark.

REINITIALIZATION OF THE LEVEL SET FUNCTION An alternate approach to level set reinitialization is to
use an additional partial differential equation (PDE) eval-
To eliminate numeric instabilities during the contour eva- uated on the level set function. In this approach, after the
luation, it is necessary to reinitialize the level set function PDE, which operates on the level set, moves the contour, a
at each evolution iteration. This requirement, however, is a second PDE re-evaluates the grid values while preserving
major limitation of the level set framework when fast the zero crossings and geometric properties of the contour
convergence is required, such as in video-based surveil- (4). The level set reinitialization PDE is given by:
lance. An intuitive approach to reinitialize the level set grid
is to follow a two-step approach. The first step is to recover ft signf0 1  jDfj
the contour by detecting the zero crossings. The second step
is to regenerate the level set surface to preserve the geo- where the sign function defines the update of all the levels
metric properties of the new contour. In computer vision, except for the zero-level. An example sign function is
the second step is to apply the Euclidean distance trans-
form to find the distance of each grid point from the recov- f0
signe f0 q
ered contour.
f20 e2
Application of the distance transform to update the level
set is a time-consuming operation, especially considering
that it needs to be done at every iteration. One way to reduce FAST MARCHING LEVEL SET
the complexity of the level set update is to apply the narrow
band approach (3). The narrow band approach performs Constraining the contour to to either shrink or to expand
reinitialization only in a neighborhood denned by a band. eliminates the limitations posed by the level set reinitiali-
This band also defines the limits in which the distance zation. In this case, the sign of F in Equation (2) is constant.
transform is applied. The procedure involves recovering Practically, the constant sign guarantees a single visit to
the contour, positioning the band-limits from the extracted each level set grid point. This property results in a very
contour, reinitializing the values residing in the band, and useful formulation referred to as the fast marching level
updating the level set bounded by the band. The narrow set.
band approach still must recover the contour and reinitia- Compared with the aforementioned approaches, the fast
lizate the level set function before a solution is reached; marching method moves the contour one pixel at a time.
hence, the error during the evolution may accumulate from Hence the distance traveled by the contour becomes con-
one iteration to the next. stant, d 1. The traveled distance also is attributed to the
speed of the contour, F(x, y), as well as the time it takes to
travel it, T(x, y). Constrained by these observations, the

Figure 2. A contour moving with the


curvature flow in the level set frame-
work. Note the fast evolution in the
regions where the contour bends
more than the other regions.
LEVEL SET METHODS 3

Figure 3. The fast marching level set iterations. The black nodes denote the active contour pixels, the red nodes denote the alive level set
grid points, the blue nodes are the nodes that are not considered during the iteration (faraway), and the white nodes denote already visited
nodes.

level set becomes a stationary formulation given by In the context of level sets, the cost or gain function is
1 FjDTj, such that at time t the contour is denned by required to be in the form of a HamiltonJacobi equation,
fGjTx; y tg. Based on the stationary formation, the time ft Hfx ; fy 0 that allows only the first-order differen-
1
required to move the contour is computed by Tx; y Fx;y . tiation of (f). Hence, given a task, the first goal is to come up
Comparatively, the implementation of the fast matching with a cost function that can be converted to a Hamiltonian
method is easier than its alternatives. Given an initial Hfx ; fy . Let us consider the object segmentation problem
contour, the pixels on the contour are labeled as active, as an example. In the following discussion, a region-based
the pixels within the reach of the contour in the next object segmentation approach will be considered that is
iteration are labeled as alive (pixels with distance of  1), formulated in terms of the appearance similarity inside and
and the pixels that the contour cannot reach are labeled as outside of the contour (see Fig. 4). Practically, the appear-
faraway. The iterations start by computing the time ance of the object inside and outside the contour should be
required T(x, y) to travel to each alive pixel. From among different, hence, to minimize this similarity would result in
alive pixels, the pixel with the lowest arrival time changes the segmentation of the object. Let us assume the contour is
its status to active (new contour position). This change initialized outside the object (inside initialization is also
introduces new set of alive points. This process is iteratively possible), such that the appearance of the region outside the
performed until F 0 for all live pixels. See Fig. 3 for a contour serves as a prior. Using this prior, the likelihood of
visualization of this iterative process. object boundary can be denned in terms of the probability of
inside pixels given the outside prior: pIRinside jRoutside .
Maximizing the gain function formulated using this like-
AN EXAMPLE: OBJECT SEGMENTATION
lihood measure segments the object as follows:
The level set method has become a very successful tool to Z
solve problems ranging from noise removal, image segmen- EG  log pIxjRoutside dx 3
tation, registration, object tracking, and stereo. A common x 2 Rinside

property in all these domains is to formulate the problem by


a partial differential equation that is solved using the level Equation (3), however, is not in the form of a Hamiltonian.
set formalism. Application of Greens theorem converts this gain function

Figure 4. (a) The inside and outside regions denned by the object contour, (b) Some segmentation results, (c) The zero level set during the
segmentation iterations based on the appearance similarity between the inside and outside regions.
4 LEVEL SET METHODS

Figure 5. Initialization of the


contour, (a) The contour is com-
pletely inside the object, (b) out-
side the object, (c) includes both
inside and outside regions of the
object.

to a Hamiltonian and results in the level set propagation surveillance scenario. The other possible solution to the
speed given by Fx; y log pIx; yjRoutside (see Ref. (5), complexity problem is the fast marching approach, which
Chapter 5] for application of Greens theorem). In Fig. 5, works in real time when implemented carefully. However,
several segmentation results are shown for different the fast marching method evolves the contour only in one
domains. direction. Hence, the initial position of the contour becomes
very important. For instance, the contour has to be either
outside or inside the object of interest, and the initializa-
DISCUSSION
tions that involve both inside and outside of the object may
not converge.
Because of its robustness, its efficiency, and its applicability
to a wide range of problems, the level set method has become
very popular among many researchers in different fields. BIBLIOGRAPHY
The HamiltonJacobi formulation of the level set can be
extended easily to higher dimensions. It can model any 1. S. Osher and J. Sethian, Fronts propagating with curvature
topology including sharp corners, and can handle the dependent speed: Algorithms based on hamilton-jacobi formu-
changes to that topology during its evolution. The level lation, Computat. Phys., 79: 1249, 1988.
set method has overcome the contour initialization problems 2. J. Sethian, Level Set methods: Evolving Interfaces in Geometry,
associated with the classic active contour approach to seg- Fluid mechanics Computer Vision and Material Sciences,
ment images, such that the initial contour can include part Cambridge, UK: Cambridge University Press, 1996.
of the object and part of the background simultaneously (see 3. D. Chop, Computing minimal surfaces via level set curvature
Fig. 5 for possible contour initialization). These properties, flow, J. Computat. Phys., 106: 7791, 1993.
however, come at the price of requiring careful thinking to 4. I. Sussman, P. Smereka, and S. Osher, A level set approach for
formulate the problem to be solved using the level set computing solutions to incompressible two-phase flow, J. Com-
framework. Especially, converting a computer vision pro- putat. Phys.,114: 146159, 1994.
blem to a PDE may require considerable attention. 5. A. Yilmaz, Object Tracking and Activity Recognition in Video
Acquired Using Mobile Cameras. PhD Thesis, Orlando, FL:
On the down side, because of the reinitialization of the
University of Central Florida, 2004.
level set after each iteration, the level set method becomes a
computationally expensive minimization technique. The
narrow band approach is proposed to overcome this ALPER YILMAZ
limitation by bounding the region for reinitialization to a The Ohio State University
band around the contour. Despite reduced complexity, the Columbus, Ohio
narrow band method remains unsuitable for tasks that
require realtime processing, such as object tracking in a
M
MEDICAL IMAGE PROCESSING of functional imaging data (6), and computer-integrated
surgery (7,8).
INTRODUCTION Technological advances in medical imaging modalities
have provided doctors with significant capabilities for accu-
The discovery of x rays in 1895 by Professor Wilhelm rate noninvasive examination. In modern medical imaging
Conrad Rontgen led to a transformation of medicine and systems, the ability to effectively process and analyze
science. In medicine, x rays provided a noninvasive way to medical images to accurately extract, quantify, and inter-
visualize the internal parts of the body. A beam of radiation pret information to achieve an understanding of the inter-
passing through the body is absorbed and scattered by nal structures being imaged is critical in order to support a
tissue and bone structures in the path of the beam to spectrum of medical activities from diagnosis, to radiother-
varying extents depending on their composition and the apy, to surgery. Advances in computer technology and
energy level of the beam. The resulting absorption and microelectronics have made available significant computa-
scatter patterns are captured by a film that is exposed tional power in small desktop computers. This capability
during imaging to produce an image of the tissues and has spurred the development of software-based biomedical
bone structures. By using varying amounts of energy levels image analysis methods such as image enhancement and
of different sources of radiant energy, radiographic images restoration, segmentation of internal structures and fea-
can be produced for different tissues, organs and bone tures of interest, image classification, and quantification.
structures. In the next section, different medical imaging modalities
The simple planar x-ray imaging, the main radiologic are discussed before the most common methods for medical
imaging method used for most of the last century, produced image processing and analysis are presented. An exhaus-
high-quality analog two-dimensional (2-D) projected tive survey of such methods can be found in Refs. 9 and 10.
images of three-dimensional (3-D) organs. Over the last
few decades, increasingly sophisticated methods of diag-
ACQUISITION OF MEDICAL IMAGES
nosis have been made possible by using different types of
radiant energy, including X rays, gamma rays, radio waves,
A biomedical image analysis system comprises three major
and ultrasound waves. The introduction of the first x-ray
elements: an image acquisition system, a computer for
computed tomography (x-ray CT) scanner in the early
processing the acquired information, and a display system
1970s totally changed the medical imaging landscape.
for visualizing the processed images. In medical image
The CT scanner uses instrumentation and computer tech-
acquisition, the primary objective is to capture and record
nology for image reconstruction to produce images of cross
information about the physical and possibly functional
sections of the human body. With the clinical experience
properties of organs or tissues by using either external
accumulated over the years and the establishment of its
or internal energy sources or a combination of these energy
usefulness, the CT scanner became very popular.
sources.
The exceptional multidimensional digital images of
internal anatomy produced by medical imaging technology
Conventional Radiography
can be processed and manipulated using a computer to
visualize subtle or hidden features that are not easily In conventional radiography, a beam of x rays from an
visible. Medical image analysis and processing algorithms external source passing through the body is differentially
for enhancing the features of interest for easy analysis and absorbed and scattered by structures. The amount of
quantification are rapidly expanding the role of medical absorption depends on the composition of these structures
imaging beyond noninvasive examination to a tool for aid- and on the energy of the x ray beam. Conventional imaging
ing surgical planning and intraoperative navigation. methods, which are still the most commonly used diagnos-
Extracting information about the shape details of anato- tic imaging procedure, form a projection image on standard
mical structures, for example, enables careful preoperative radiographic film. With the advent of digital imaging tech-
planning of surgical procedures. nology, radiographs, which are x-ray projections, are
In medical image analysis, the goal is to accurately and increasingly being viewed, stored, transported, and
efficiently extract information from medical images to sup- manipulated digitally. Figure 1 shows a normal chest x-
port a range of medical investigations and clinical activities ray image.
from diagnosis to surgery. The extraction of information
about anatomical structures from medical images is fairly Computed Tomography
complex. This information has led to many algorithms that
The realization that x-ray images taken at different angles
have been specifically proposed for biomedical applications,
contain sufficient information for uniquely determining the
such as the quantification of tissue volumes (1), diagnosis
internal structures, led to the development of x-ray CT
(2), localization of pathology (3), study of anatomical struc-
scanners in the 1970s that essentially reconstruct accurate
tures (4), treatment planning (5), partial volume correction
cross-sectional images from x-ray radiographs. The

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 MEDICAL IMAGE PROCESSING

Figure 2. CT images of normal liver and brain.

organs and tissues. Unlike the CT, which depicts the x-


ray opacity of the structure being imaged, MRIs depict the
Figure 1. X-ray image of a chest. density as well as biochemical properties based on physio-
logic function, including blood flow and oxygenation. A
major advantage of the MRI is the fast signal acquisition
with a very high spatial resolution.
conventional x-ray CT consists of a rotating frame that has Radiographic imaging modalities such as those based on
an x-ray source at one end and an array of detectors that x rays provide anatomical information about the body but
accurately measure the total attenuation along the path of not the functional or metabolic information about an organ
the x ray at the other end. A fan beam of x rays is created as or tissue. In addition to anatomical information, MRI
the rotating frame spins the x-ray tube and detectors methods are capable of providing some functional and
around the patient. During the 3608 rotation, the detector metabolic information. Nuclear medicine-based imaging
captures numerous snapshots of the attenuated x-ray beam systems image the distribution of radioisotopes distributed
corresponding to a single slice of tissue whose thickness is within specific organs of interest by injection or inhalation
determined by the collimation of the x-ray beam. This of radio-pharmaceuticals that metabolize the tissue, which
information is then processed by a computer to generate makes them a source of radiation. The images acquired by
a 2-D image of the slice. Multiple slices are obtained by these systems provide a direct representation of the meta-
moving the patient in incremental steps. In the more recent bolism or function of the tissue or organ being imaged as it
spiral CT (also known as the helical CT), projection acquisi- becomes a source of radiation that is used in the imaging
tion is carried out in a spiral trajectory as the patient
continuously moves through the scanner. This process
results in faster scans and higher definition of internal
structures, which enables greater visualization of blood
vessels and internal tissues. CT images of a normal liver
and brain are shown in Fig. 2. In comparison with conven-
tional x-ray imaging, CT imaging is a major breakthrough.
It can image the structures with subtle differences in x-ray
absorption capacity even when almost obscured by a struc-
ture with a strong ability on x-radiation absorption. For
example, the CT can image the internal structures of the
brain, which is enclosed by the skull [as shown in Fig. 2(b)],
whereas the x ray fails to do so.

Magnetic Resonance Imaging


Medical imaging methods using magnetic resonance
include MRI, PET, and SPECT. MRI is based on the prin-
ciples of nuclear magnetic resonance (NMR), which is a
spectroscopic technique used to obtain microscopic chemi-
cal and physical information about molecules. An MRI can
produce high-quality multidimensional images of the
inside of the human body, as shown in Fig. 3, providing
both structural and physiologic information of internal
Figure 3. MRI of the brain.
MEDICAL IMAGE PROCESSING 3

Figure 4. SPECT and PET


sequences of a normal brain.

process. SPECT and PET are nuclear medicine-based ima- ultrasound waves traveling through the body (Fig. 5). It has
ging systems. been successfully used for imaging of anatomical struc-
SPECT systems use gamma cameras to image photons tures, blood flow measurements, and tissue characteriza-
that are emitted during decay. Like the x-ray CT, many tion. A major advantage of this method, which does not
SPECT systems rotate a gamma camera around the object involve electromagnetic radiation, is that it is almost non-
being imaged and process the acquired projections using a intrusive, and hence, the examined structures can be sub-
tomographic reconstruction algorithm to yield a 3-D recon- jected to uninterrupted and long-term observations while
struction. SPECT systems do not provide good resolution the subject does not suffer any ill effects.
images of anatomical structures like CT or MR images, but
they show distribution of radioactivity in the tissue, which
IMAGE ENHANCEMENT AND RESTORATION
represents a specific metabolism or blood flow as shown in
Fig. 4(a). PET systems, like SPECT, also produce images of
In image enhancement, the purpose is to process an
the body by detecting the emitted radiation, but the radio-
acquired image to improve the contrast and visibility of
active substances used in PET scans are increasingly used
the features of interest. The contrast and visibility of
with CT or MRI scans so as to provide both anatomical and
images actually depend on the imaging modality and on
metabolic information. Some slices of a PET brain image
the nature of the anatomical regions. Therefore, the type of
are shown in Fig. 4(b).
image enhancement to be applied has to be suitably chosen.
Image restoration also leads to image enhancement, and
Ultrasound Imaging
generally, it involves mean-squared error operations and
Ultrasound or acoustic imaging is an external source-based other methods that are based on an understanding of the
imaging method. Ultrasound imaging produces images of type of degradation inherent in the image. However, pro-
organs and tissues by using the absorption and reflection of cedures that reduce noise tend to reduce the details,
whereas those that enhance details also increase the noise.
Image enhancement methods can be broadly classified into
two categories: spatial-domain methods(11) and frequency-
domain methods(12).
Spatial-domain methods involve manipulation on a
pixel-to-pixel basis and include histogram-based methods,
spatial filtering, and so on. The histogram provides infor-
mation about the distribution of pixel intensities in an
image and is normally expressed as a 2-D graph that
provides information of the occurrence of specific gray-level
pixel values in the image. Histogram equalization is a
commonly used technique that involves spreading out
or stretching the gray levels to ensure that the gray levels
are redistributed as evenly as possible (12,13). Minor var-
iations in structures or features are better visualized
within regions that originally looked uniform by this opera-
tion. Figure 6 shows the result of applying histogram
equalization to a CT image.
Figure 5. Ultrasound image of a normal liver.
4 MEDICAL IMAGE PROCESSING

Figure 6. CT images of the liver and the associated histo-


grams: (a) original image and (b) enhanced image.

In some instances, however, global equalization across MEDICAL IMAGE SEGMENTATION


all possible pixel values could result in loss of important
details and/or high-frequency information. For such situa- A fundamental operation in medical image analysis is the
tions, local histogram modifications, including localized or segmentation of anatomical structures. It is not surprising
regional histogram equalization, can be applied to obtain that segmentation of medical images has been an important
good results (14). In spatial-domain methods, pixel values research topic for a long time. It essentially involves parti-
in an image are replaced with some function of the pixel and tioning an image into distinct regions by grouping together
its neighbors. Image averaging is a form of spatial filtering neighboring pixels that are related. The extraction or seg-
where each pixel value is replaced by the mean of its mentation of structures from medical images and recon-
neighboring pixels and the pixel itself. Edges in an image structing a compact geometric representation of these
can be enhanced easily by subtracting the pixel value with structures is fairly complex because of the complexity
the mean of its neighborhood. However, this approach and variability of the anatomical shapes of interest. Inher-
usually increases the noise in the image. Figure 7 shows ent shortcomings of the acquired medical images, such as
the results of applying local spatial-domain methods. sampling artifacts, spatial aliasing, partial volume effects,
Frequency-domain methods are usually faster and sim- noise, and motion, may cause the boundaries of structures
pler to implement than spatial domain methods (12). The to be not clearly distinct. Furthermore, each imaging mod-
processing is carried out in the Fourier domain for remov- ality with its own characteristics could produce images that
ing or reducing image noise, enhancing edge details, and are quite different when imaging the same structures.
improving contrast. A low-pass filter can be used to sup- Thus, it is challenging to accurately extract the boundaries
press noise by removing high frequencies in the image, of the same anatomical structures. Traditional image pro-
whereas a high-pass filter can be used to enhance the high cessing methods are not easily applied for analyzing med-
frequencies resulting in an increase of detail and noise. ical images unless supplemented with considerable
Different filters can be designed to selectively enhance or amounts of expert intervention (15).
suppress features or details of interest. There has been a significant body of work on algorithms
for the segmentation of anatomical structures and other

Figure 7. Ultrasound images of


liver. (a) Original image. (b) The
result of image averaging where
the image becomes smoother. (c)
The image of edge enhancement
where the image becomes sharper
but with increased noise levels.
MEDICAL IMAGE PROCESSING 5

Figure 8. Binary thresholding of MR image of the brain.

regions of interest that aims to assist and automate specific segmented. Neighboring pixels with similar properties are
radiologic tasks (16). They vary depending on the specific evaluated to determine whether they should also be con-
application, imaging modality, and other factors. Cur- sidered as being part of the object, and those pixels that
rently, no segmentation method yields acceptable results should be are added to the region. The process continues as
for different types of medical images. Although general long as new pixels are added to the region. Region growing
methods can be applied to a variety of data (10,15,17), algorithms differ in that they use different criteria to decide
they are specific for particular applications and can often whether a pixel should be included in the region, the
achieve better performance by taking into account the strategy used to select neighboring pixels to evaluate,
specific nature of the image modalities. In the following and the stopping criteria that stop the growing. Figure 9
subsections, the most commonly used segmentation meth- illustrates several examples of region growing-based seg-
ods are briefly introduced. mentation. Like thresholding-based segmentation, region
growing is seldom used alone but usually as part of set of
Thresholding image-processing operations, particularly for segmenting
small and simple structures such as tumors and lesions
Thresholding is a very simple approach for segmentation
(23,24). Disadvantages of region growing methods include
that attempts to partition images by grouping pixels that
the need for manual intervention to specify the initial seed
have similar intensities or range of intensities into one class
point and its sensitivity to noise, which causes extracted
and the remaining pixels into another class. It is often
regions to have holes or to even become disconnected.
effective for segmenting images with structures that
Region splitting and merging algorithms (25,26) evaluate
have contrasting intensities (18,19). A simple approach
the homogeneity of a region based on different criteria such
for thresholding involves analyzing the histogram and
as the mean, variance, and so on. If a region of interest is
setting the threshold value to a point between two major
found to be inhomogeneous according to some similarity
peaks in the distribution of the histogram. Although there
constraint, it is split into two or more regions. Since some
are automated methods for segmentation, thresholding is
neighboring regions may have identical or similar properties
usually performed interactively based on visual assess-
after splitting, a merging operation is incorporated that
ment of the resulting segmentation (20). Figure 8 shows
compares neighboring regions and merges them if necessary.
the result of a thresholding operation on an MR image of
brain where only pixels within a certain range of intensities
Segmentation Through Clustering
are displayed.
The main limitations of thresholding are that only two Segmentation of images can be achieved through clustering
classes are generated, and that it typically does not take pixel data values or feature vectors whose elements consist
into account the spatial characteristics of an image, which of the parameters to be segmented. Examples of multi-
causes it to be sensitive to noise and intensity inhomogene- dimensional feature vectors include the red, green, and
ities which tend to occur in many medical imaging mod- blue (RGB) components of each image pixel and different
alities. Nevertheless, thresholding is often used as an attenuation values for the same pixel in dual-energy x-ray
initial step in a sequence of image-processing operations. images. Such datasets are very useful as each dimension of
data allows for different distinctions to be made about each
Region-Based Segmentation pixel in the image.
In clustering, the objective is to group similar feature
Region growing algorithms (21) have proven to be an
vectors that are close together in the feature space into a
effective approach for image segmentation. The basic
single cluster, whereas others are placed in different clus-
approach in these algorithms is to start from a seed point
ters. Clustering is thus a form of classification. Sonka and
or region that is considered to be inside the object to be
6 MEDICAL IMAGE PROCESSING

Figure 9. Segmentation results of region growing with various seed points obtained by using Insight Toolkit (22).

Fitzpatrick (27) provide a thorough review of classification have been applied successfully in medical image analysis
methods, many of which have been applied in object recog- (3336), most commonly for segmentation of MRI images of
nition, registration, segmentation, and feature extraction. the brain. Pham and Prince (33) were the first to use
Classification algorithms are usually categorized as unsu- adaptive fuzzy k-means in medical imaging. In Ref. 34,
pervised and supervised. In supervised methods, sample Boudraa et al. segment multiple sclerosis lesions, whereas
feature vectors exist for each class (i.e., a priori knowledge) the algorithm of Ahmed et al. (35) uses a modified objective
and the classifier merely decides on how to classify new data function of the standard fuzzy k-means algorithm to com-
based on these samples. In unsupervised methods, there is pensate for inhomogeneities. Current fuzzy k-means meth-
no a priori knowledge and the algorithms, which are based ods use adaptive schemes that iteratively vary the number
on clustering analysis, examine the data to determine of clusters as the data are processed.
natural groupings or classes.
Supervised Clustering. Supervised methods use sample
Unsupervised Clustering. Unlike supervised classifica- feature vectors (known as training data) whose classes are
tion, very few inputs are needed for unsupervised classifi- known. New feature vectors are classified into one of the
cation as the data are clustered into groupings without any known classes on the basis of how similar they are to the
user-defined training. In most approaches, an initial set of known sample vectors. Supervised methods assume that
grouping or classes is defined. However, the initial set could classes in multidimensional feature spaces can be described
be inaccurate and possibly split along two or more actual by multivariate probability density functions. The prob-
classes. Thus, additional processing is required to correctly ability or likelihood of a data point belonging to a class is
label these classes. related to the distance from the class center in the feature
The k-means clustering algorithm(28,29) partitions the space. Bayesian classifiers adopt such probabilistic
data into k clusters by optimizing an objective function of approaches and have been applied to medical images
feature vectors of clusters in terms of similarity and dis- usually as part of more elaborate approaches (37,38).
tance measures. The objective function used is usually the The accuracy of such methods depends very much on hav-
sum of squared error based on the Euclidean distance ing good estimates for the mean (center) and covariance
measure. In general, an initial set of k clusters at arbitrary matrix of each class, which in turn requires large training
centroids is first created by the k-means algorithm. The datasets.
centroids are then modified using the objective function When the training data are limited, it would be better to
resulting in new clusters. The k-means clustering algo- use minimum distance or nearest neighbor classifiers that
rithms have been applied in medical imaging for segmenta- merely assign unknown data to the class of the sample
tion/classification problems (30,31). However, their vector that is closest in the feature space, which is mea-
performance is limited when compared with that achieved sured usually in terms of the Euclidean distance. In the k-
using more advanced methods. nearest neighbor method, the class of the unknown data is
While the k-means clustering algorithm uses fixed the class of majority of the k-nearest neighbors of the
values that relate a data point to a cluster, the fuzzy k- unknown data. Another similar approach is called the
means clustering algorithm (32) (also known as the fuzzy c- Parzen windows classifier, which labels the class of the
means) uses a membership value that can be updated based unknown data as that of the class of the majority of samples
on distribution of the data. Essentially, the fuzzy k-means in a volume centered about the unknown data that have the
method enables any data sample to belong to any cluster same class. The nearest neighbor and Parzen windows
with different degrees of membership. Fuzzy partitioning is methods may seem easier to implement because they do
carried out through an iterative optimization of the objec- not require a priori knowledge, but their performance is
tive function, which is also a sum of squared error based on strongly dependent on the number of data samples avail-
the Euclidean distance measure factored by the degree of able. These supervised classification approaches have been
membership with a cluster. Fuzzy k-means algorithms used in various medical imaging applications (39,40).
MEDICAL IMAGE PROCESSING 7

Figure 10. Different views of the


MRA segmentation results using
the capillary active contour.

Model Fitting Approaches advantage of these models over parametric deformable


models is topological flexibility because of their implicit
Model fitting is a segmentation method where attempts are
representation. During the past decade, tremendous effo-
made to fit simple geometric shapes to the locations of
rts have been made on various medical image segmentation
extracted features in an image (41). The techniques and
applications based on level set methods (60). Many new
models used are usually specific to the structures that need
algorithms have been reported to improve the precision and
to be segmented to ensure good results. Prior knowledge
robustness of level set methods. For example, Chan and
about the anatomical structure to be segmented enables the
Vese (61) proposed an active contour model that can detect
construction of shape models. In Ref. 42, active shape
objects whose boundaries are not necessarily defined by
models are constructed from a set of training images. These
gray-level gradients.
models can be fitted to an image by adjusting some para-
When applying for segmentation, an initialization of the
meters and can also be supplemented with textural infor-
deformable model is needed. It can be manually selected or
mation (43). Active shape models have been widely used for
generated by using other low-level methods such as thresh-
medical image segmentation (4446).
olding or region growing. An energy functional is designed so
that the model lies on the object boundary when it is mini-
Deformable Models
mized. Yan and Kassim (62,63) proposed the capillary active
Segmentation techniques that combine deformable models contour for magnetic resonance angiography (MRA) image
with local edge extraction have achieved considerable suc- segmentation. Inspired by capillary action, a novel energy
cess in medical image segmentation (10,15). Deformable functional is formulated, which is minimized when the
models are capable of accommodating the often significant active contour snaps to the boundary of blood vessels. Figure
variability of biological structures. Furthermore, different 10 shows the segmentation results of MRA using a special
regularizers can be easily incorporated into deformable geometric deformable model, the capillary active contour.
models to get better segmentation results for specific types
of images. In comparison with other segmentation meth-
MEDICAL IMAGE REGISTRATION
ods, deformable models can be considered as high-level
segmentation methods (15).
Multiple images of the same subject, acquired possibly
Deformable models (15) are referred by different names
using different medical imaging modalities, contain useful
in the literature. In 2-D segmentation, deformable models
information usually of complementary nature. Proper inte-
are usually referred to as snakes (47,48), active contours
gration of the data and tools for visualizing the combined
(49,50), balloons (51), and deformable contours (52). They
information offers potential benefits to physicians. For this
are usually referred to as active surfaces (53) and deform-
integration to be achieved, there is a need to spatially align
able surfaces (54,55) in 3-D segmentation.
the separately acquired images, and this process is called
Deformable models were first introduced into computer
image registration. Registration involves determining a
vision by Kass et al. (47) as snakes or active contours, and
transformation that can relate the position of features in
they are now well known as parametric deformable models
one image with the position of the corresponding features in
because of their explicit representation as parameterized
another image. To determine the transformation, which is
contours in a Lagrangian framework. By designing a global
also known as spatial mapping, registration algorithms use
shape model, boundary gaps are easily bridged, and overall
geometrical features such as points, lines, and surfaces that
consistency is more likely to be achieved. Parametric
correspond to the same physical entity visible in both
deformable models are commonly used when some prior
images. After accurate registration, different images will
information of the geometrical shape is available, which
have the same coordinate system so that each set of points
can be encoded using, preferably, a small number of para-
in one image will occupy the same volume as the corre-
meters. They have been used extensively, but their main
sponding set of points in another image. In addition to
drawback is the inability to adapt to topology (15,48).
combining images of the same subject from different mod-
Geometric deformable models are represented implicitly
alities, the other applications of image registration include
as a level set of higher dimensional, scalar-level set func-
aligning temporal image sequences to compensate for
tions, and they evolve in an Eulerian fashion (56,57). Geo-
motion of the subject between scans and image guidance
metric deformable models were introduced more recently
during medical procedures.
by Caselles et al. (58) and by Malladi et al. (59). A major
8 MEDICAL IMAGE PROCESSING

Figure 11. (a) Result of direct overlapping of brain


MR images without registration. (b) Result of over-
lapping of images after rigid registration.

The evaluation of the transformation parameters can be target image to be segmented. The warping usually consists
computationally intensive but can be simplified by assum- of a combination of linear and nonlinear transformations to
ing that the structures of interest do not deform or distort ensure good registration despite anatomical variability.
between image acquisitions. However, many organs do Even with nonlinear registration methods, accurate
deform during image acquisition, for example, during the atlas-based segmentation of complex structures is difficult
cardiac and respiratory cycles. Many medical image regis- because of anatomical variability, but these approaches are
tration algorithms calculate rigid body or affine transfor- generally suited for segmentation of structures that are
mations, and thus, their applicability is restricted to parts stable in large numbers of people. Probabilistic atlases
of the body where deformation is small. As bones are rigid, 7275 help to overcome anatomical variability.
rigid body registration is widely used where the structures
of interest are either bone or are enclosed in bone. The
CONCLUDING REMARKS
brain, which is enclosed by the skull, is reasonably non-
deformable, and several registration approaches have
Significant advances made in medical imaging modalities
been applied to the rigid body registration of brain images.
have led to several new methodologies that provide signifi-
Figure 11 shows an example of rigid registration of brain
cant capabilities for noninvasive and accurate examination
MR images. Image registration based on rigid body trans-
of anatomical, physiological, metabolic, and functional
formations is widely used for aligning multiple 3-D tomo-
structures and features. three- and four dimensional med-
graphic images of the same subject acquired using different
ical images contain a significant amount of information
modalities (intermodality registration) or using the same
about the structures being imaged. Sophisticated software-
modality (intramodality registration) (6466).
based image processing and analysis methods enhance the
The problem of aligning images of structures with
information acquired by medical imaging equipment to
deformed shapes is an active area of research. Such deform-
improve the visibility of features of interest and thereby
able (nonaffine) registration algorithms usually involve the
enable visual examination, diagnosis, and analysis. There
use of an initial rigid body or affine transformation to
are, however, several challenges in medical imaging ran-
provide a starting estimate (6568).
ging from accurate analysis of cardiac motion and tumors to
After registration, fusion is required for the integrated
nonaffine registration applications involving organs other
display. Some fusion methods involve direct combination of
than the brain and so on (76,77). Also, new imaging mod-
multiple registered images. One example is the superim-
alities, such as optical (78), microwave, and electrical
position of PET data on MRI data to provide a single image
impedance (79) imaging methods hold the promise of break-
containing both structure and function (69). Another exam-
throughs when new associated algorithms for processing
ple involves the use of MR and CT combined to delineate
and analyzing the resulting information acquired via these
tumor tissues (70).
modalities are available.
Atlas-Based Approaches
ACKNOWLEDGMENTS
In atlas-based registration and segmentation of medical
images, prior anatomical and/or functional knowledge is
The authors would like to thank the Department of Nuclear
exploited. The atlas is actually a reference image in which
Medicine at the Singapore General Hospital for providing
objects of interest have been carefully segmented. In this
the PET image and Prof. S. C. Wang of the Department of
method (65,66,71), the objective is essentially to carry out a
Diagnostic Imaging at the National University Hospital for
nonrigid registration between the image of the patient and
providing the images used in this chapter. The authors are
the atlas. The first step, known as atlas warping, involves
also grateful to Dr. P. K. Sadasivan for his valuable inputs.
finding a transformation that maps the atlas image to the
MEDICAL IMAGE PROCESSING 9

BIBLIOGRAPHY 20. N. Otsu, A threshold selection method from gray level histo-
grams, IEEE Trans. Sys., Man Cybernet., 9: pp. 6266, 1979.
1. S. M. Lawrie and S. S. Abukmeil, Brain abnormality in schizo- 21. R. Adams and L. Bischof, Seeded region growing, IEEE Trans.
phrenia: A systematic and quantitative review of volumetric Pattern Anal. Mach. Intell., 16 (6): 641647, 1994.
magnetic resonance imaging studies, Br. J. Psychiat., 172: 22. L. Ibanez, W. Schroeder, L. Ng, and J. Cates, The ITK Software
110120, 1998. Guide. Kitware Inc., 2003. Available: http://www.itk.org.
2. P. Taylor, Computer aids for decision-making in diagnostic radi- 23. P. Gibbs, D. Buckley, S. Blackband, and A. Horsman, Tumour
ologyaliteraturereview, Br. J. Radiol. 68 (813): 945957, 1995. volume determination from MR images by morphological seg-
3. A. P. Zijdenbos and B. M. Dawant, Brain segmentation and mentation, Phys. Med. Biol., 41: 24372446, 1996.
white matter lesion detection in MR images, Crit. Rev. Biomed. 24. S. Pohlman, K. Powell, N. Obuchowski, W. Chilcote, and S.
Engineer., 22 (6): 401465, 1994. Broniatowski, Quantitative classification of breast tumors in
4. A. Worth, N. Makris, V. Caviness, and D. Kennedy, Neuroa- digitized mammograms, Med. Phys., 23: 13371345, 1996.
natomical segmentation in MRI: technological objectives, 25. R. Ohlander, K. Price, and D. Reddy, Picture segmentation
Internat. J. Patt. Recog. Artificial Intell., 11: 11611187, 1997. using recursive region splitting method, Comput. Graph.
5. V. Khoo, D. P. Dearnaley, D. J. Finnigan, A. Padhani, S. F. Image Proc., 8: 313333, 1978.
Tanner, and M. O. Leach, Magnetic resonance imaging (MRI): 26. S.-Y. Chen, W.-C. Lin, and C.-T. Chen, Split-and-merge image
Considerations and applications in radiotherapy treatment segmentation based on localized feature analysis and statis-
planning, Radiother. Oncol., 42: 115, 1997. tical tests, CVGIP: Graph. Models Image Process., 53 (5): 457
6. H. Muller-Gartner, J. Links, J. Prince, R. Bryan, E. McVeigh, J. 475, 1991.
P. Leal, C. Davatzikos, and J. Frost, Measurement of tracer 27. M. Sonka and J. M. Fitzpatrick, (eds.), Handbook of Medical
concentration in brain gray matter using positron emission Imaging, vol. 2, ser. Medical Image Processing and Analysis.
tomography: MRI-based correction for partial volume effects, Bellingham, WA: SPIE Press, 2000.
J. Cerebral Blood Flow Metabol., 12 (4): 571583, 1992. 28. A. K. Jain and R. C. Dubes, Algorithms for Clustering Data.
7. N. Ayache, P. Cinquin, I. Cohen, L. Cohen, F. Leitner, and O. Upper Saddle River, NJ: Prentice-Hall, Inc., 1988.
Monga, Segmentation of complex three-dimensional medical 29. S. Z. Selim and M. Ismail, K-means-type algorithms: A general-
objects: A challenge and a requirement for computer-assisted ized convergence theorem and characterization of local optim-
surgery planning and performance, in R. Taylor, S. Lavallee, G. ality, IEEE Trans. Pattern Anal. and Machine Intell., 6: 8187,
Burdea, and R. Mosges, (eds), Computer-Integrated Surgery, 1984.
Cambridge MA: The MIT Press, 1996, pp. 5974.
30. M. Singh, P. Patel, D. Khosla, and T. Kim, Segmentation of
8. W. E. L. Grimson, G. J. Ettinger, T. Kapur, M. E. Leventon, W. functional MRI by k-means clustering, IEEE Trans. Nucl. Sci.,
M. Wells, and R. Kikinis, Utilizing segmented MRI data in 43: 20302036, 1996.
image-guided surgery, Internat. J. Patt. Recog. Artificial
31. A. P. Dhawan and L. Arata, Knowledge-based 3-D analysis
Intell., 11 (8): 13671397, 1997.
from 2-D medical images, IEEE Eng. Med. Biol. Mag., 10:
9. D. L. Pham, C. Xu, and J. L. Prince, Current methods in 3037, 1991.
medical image segmentation, Annu. Rev. Biomed. Eng., 2:
32. L. C. Bezdek, Pattern Recognition with Fuzzy Objective Func-
315337, 2000.
tion Algorithms. New York: Plenum Press, 1981.
10. J. S. Duncan and N. Ayache, Medical image analysis: Progress
33. D. L. Pham and J. L. Prince, Adaptive fuzzy segmentation of
over two decades and the challenges ahead, IEEE Trans.
magnetic resonance images, IEEE Trans. Med. Imag., 18:
Pattern Anal. and Machine Intell., 22 (1): 85106, 2000.
193199, 1999.
11. P. Perona and J. Malik, Scale-space and edge detection using
34. A. O. Boudraa, S. M. Dehak, Y. M. Zhu, C. Pachai, Y. G. Bao,
anisotropic diffusion, IEEE Trans. Pattern Anal. and Machine
and J. Grimaud, Automated segmentation of multiple sclerosis
Intell., 12: 629639, 1990.
lesions in multispectral MR imaging using fuzzy clustering,
12. R. C. Gonzalez and R. E. Woods, Digital Image Processing, 2nd Comput. Biol. Med., 30: 2340, 2000.
ed. Upper Saddle River: Prentice Hall, 2002.
35. M. N. Ahmed, S. M. Yamany, N. Mohamed, A. A. Farag, and T.
13. T. Acharya and A. K. Ray, Image Processing: Principles and Morianty, A modified fuzzy c-means algorithm for bias field
Applications, New York: Wiley-Interscience, 2005. estimation and segmentation of MRI data, IEEE Trans. Med-
14. K. Zuiderveld, Contrast limited adaptive histogram equaliza- ical Imaging, 21: 193199, 2002.
tion. P. Heckbert in (ed.), Graphic Gems IV, New York: Aca- 36. C. Zhu and T. Jiang, Multicontext fuzzy clustering for separa-
demic Press, 1994. tion of brain tissues in magnetic resonance images, Neurom-
15. T. McInerney and D. Terzopoulos, Deformable models in med- image, 18: 685696, 2003.
ical image analysis: A survey, Med. Image Anal., 1 (2): 91108, 37. P. Spyridonos, P. Ravazoula, D. Cavouras, K. Berberidis, and
1996. G. Nikiforidis, Computer-based grading of haematoxylin-eosin
16. A. Dhawan, Medical Image Analysis. New York: Wiley, 2003. stained tissue sections of urinary bladder carcinomas, Med.
17. J. Suri, K. Liu, S. Singh, S. Laxminarayana, and L. Reden, Inform. Internet Med., 26: 179190, 2001.
Shape recovery algorithms using level sets in 2-D/3-D medical 38. F. Chabat, G.-Z. Yang, and D. M. Hansell, Obstructive lung
imagery: A state-of-the-art review, IEEE Trans. Inform. Tech- diseases: texture classification for differentiation at CT, Radi-
nol. Biomed., 6: 828, 2002. ology, 228: 871877, 2003.
18. P. Sahoo, S. Soltani, and A. Wong, A survey of thresholding 39. K. Jafari-Khouzani and H. Soltanian-Zadeh, Multiwavelet
techniques, Comput. Vision. Graph. Image Process., 42 (2): grading of pathological images of prostate, IEEE Trans.
233260, 1988. Biomed. Eng., 50: 697704, 2003.
19. M. Sezgin and B. Sankur, Survey over image thresholding 40. C. I. Christodoulou, C. S. Pattichis, M. Pantziaris, and A.
techniques and quantitative performance evaluation, J. Elec- Nicolaides, Texture-based classification of atherosclerotic aro-
tron. Imaging, 13 (1): 146168, 2004. tid plaques, IEEE Trans. Med. Imag., 22: 902912, 2003.
10 MEDICAL IMAGE PROCESSING

41. S. D. Pathak, P. D. Grimm, V. Chalana, and Y. Kim, Pubic arch and Computer-Assisted Intervention, Palm Springs, CA,
detection in transrectal ultrasound guided prostate cancer 2005, pp. 5158.
therapy, IEEE Trans. Med. Imag., 17: 762771, 1998. 63. P. Yan and A. A. Kassim, MRA image segmentation with
42. T. F. Cootes, C. J. Taylor, D. H. Cooper, and J. Graham, Active capillary active contours, Med. Image Anal., 10 (3): 317329,
shape models their training and application, Comput. Vision 2006.
Image Understand., 61 (1): 3859, 1995. 64. L. G. Brown, A survey of image registration techniques, ACM
43. T. F. Cootes, C. Beeston, G. J. Edwards, and C. J. Taylor, A Comput. Surveys, 24 (4): 325376, 1992.
unified framework for atlas matching using active appearance 65. J. B. Antoine Maintz and M. A. Viergever, A survey of medical
models, Proc. Int. Conf. on Image Processing in Medical Ima- image registration, Med. Image Anal., 2 (1): 136, 1998.
ging., 1999, pp. 322333.
66. D. L. G. Hill, P. G. Batchelor, M. Holden, and D. J. Hawkes,
44. T. F. Cootes and C. J. Taylor, Statistical models of appearance Medical image registration, Phys. Med. Biol., 46: 145, 2001.
for medical image analysis and computer vision, SPIE Med.
67. W. M. Wells, W. E. L. Grimson, R. Kikinis, and F. A. Jolesz,
Imag., San Diego, CA: 2001, 236248.
Adaptive segmentation of MRI data, IEEE Trans. Med. Imag.,
45. J. Xie, Y. Jiang, and H. T. Tsui, Segmentation of kidney from 15 (4): 429442, 1996.
ultrasound images based on texture and shape priors, IEEE
68. F. Maes, A. Collignon, D. Vandermeulen, G. Marchal, and P.
Trans. Med. Imag., 24 (1): 4557, 2005.
Suetens, Multimodality image registration by maximization of
46. P. Yan and A. A. Kassim, Medical image segmentation using mutual information, IEEE Trans. Med. Imag., 16 (2): 187198,
minimal path deformable models with implicit shape priors, 1997.
IEEE Trans. Inform. Technol. Biomed., 10 (4): 677684, 2006.
69. Y. Shimada, K. Uemura, B. A. Ardekani, T. Nagakota, K.
47. M. Kass, A. Witkin, and D. Terzopoulos, Snakes: Active contour Ishiwata, H. Toyama, K. Ono, M. Senda, Application of PET-
models, Int. J. Comp. Vision, 1 (4): 321331, 1987. MRI registration techniques to cat brain imaging, J. Neurosci.
48. C. Xu and J. L. Prince, Snakes, shapes, and gradient vector Methods, 101: 17, 2000.
flow, IEEE Trans. Image Process., 7: 359369, 1998. 70. D. L. Hill, D. J. Hawkes, M. J. Gleason, T. C. Cox, A. J. Strang,
49. V. Caselles, R. Kimmel, and G. Sapiro, Geodesic active con- and W. L. Wong, Accurate frameless registration of MR and CT
tours, Int. J. Comp. Vision, 22 (1): 6179, 1997. images of the head: Applications in planning surgery and
50. S. Kichenassamy, A. Kumar, P. J. Olver, A. Tannenbaum, and radiation theraphy, Radiology, 191: 447454, 1994.
A. J. Yezzi, Gradient flows and geometric active contour mod- 71. B. Zitova and J. Flusser, Image registration methods: a survey,
els, in IEEE Int. Conf. Computer Vision, Cambridge, MA: 1995, Image Vis. Comput., 21: 9771000, 2003.
pp. 810815. 72. M. R. Kaus, S. K. Warfield, A. Nabavi, P. M. Black, F. A. Jolesz,
51. L. D. Cohen, On active contour models and balloons, CVGIP: and R. Kikinis, Automated segmentation of MR images of brain
Image Understand., 53 (2): 211218, 1991. tumors, Radiology, 218: 586591, 2001.
52. L. H. Staib and J. S. Duncan, Parametrically deformable con- 73. [Online]. Available: http://www.loni.ucla.edu/ICBM/.
tour models, Proc. IEEE Conf. Computer Vision and Pattern 74. B. Fischl, D. H. Salat, E. Busa, M. Albert, M. Dieterich, C.
Recognition., San Diego, CA, 1989, pp. 98103. Haselgrove, et al., Whole brain segmentation: Automated
53. J. W. Snell, M. B. Merickel, J. M. Ortega, J. C. Goble, J. R. labeling of neuroanatomical structures in the human brain,
Brookeman, and N. F. Kassell, Model-based boundary estima- Neuron, 33 (3): 341355.
tion of complex objects using hierarchical active surface tem- 75. M. B. Cuadra, L. Cammoun, T. Butz, O. Cuisenaire, and J.-P.
plates, Patt. Recog., 28 (10): 15991609, 1995. Thiran, Validation of tissue modelization and classification
54. I. Cohen, L. Cohen, and N. Ayache, Using deformable surfaces techniques in t1-weighted MR brain images. IEEE Trans.
to segment 3D images and infer differential structures, CVGIP: Med. Imag., 24: 15481565, 2005.
Image Understand., 56 (2): 242263, 1992. 76. K. Wong, H. Liu, A. J. Sinusas, and P. Shi, Multiframe nonrigid
55. L. H. Staib and J. S. Duncan, Model-based deformable surface motion analysis with anisotropic spatial constraints: Applica-
finding for medical images, IEEE Trans. Med. Imag., 15 (5): tions to cardiac image analysis, Internat. Conf. Image Proc., 1:
720731, 1996. 131134, 2004.
56. S. Osher and J. A. Sethian, Fronts propagating with curvature- 77. A. Mohamed, D. Shen, and C. Davatzikos, Deformable regis-
dependent speed: Algorithms based on Hamilton-Jacobi for- tration of brain tumor images via a statistical model of tumor-
mulations, J. Computational Physics, 79: 1249, 1988. induced deformation, Proc. Medical Image Computing and
57. J. A. Sethian, Level Set Methods and Fast Marching Methods, Computer-Assisted Intervention, 2, 263270, 2005.
2nd ed. New York: Cambridge University Press, 1999. 78. H. Jiang, Y. Xu, N. Iftimia, L. Baron, and J. Eggert, Three-
58. V. Caselles, F. Catte, T. Coll, and F. Dibos, A geometric model dimensional optical tomographic imaging of breast in a human
for active contours, Numerische Mathematik, 66: 131, 1993. subject, IEEE Trans. Med. Imag., 20 (12): 13341340, 2001.
59. R. Malladi, J. A. Sethian, and B. C. Vermuri, Shape modeling 79. J. Jossinet, E. Marry, and A. Montalibet, Inverse impedance
with front propagation: A level set approach, IEEE Trans. tomography: Imaging tissue from inside, IEEE Trans. Med.
Pattern Anal. Mach. Intell., 17 (2): 158174, 1995. Imag., 21 (6): 560565, 2002.
60. J. S. Suri, K. Liu, L. Reden, and S. Laxminarayan, A review on
MR vascular image processing: skeleton versus nonskeleton
approaches: part II, IEEE Trans. Inform. Technol. Biomed., 6
ASHRAF KASSIM
(4): 338350, 2002. PINGKUN YAN
National University of Singapore
61. T. F. Chan and L. A. Vese, Active contours without edges, IEEE
Singapore
Trans. Image Proc., 10 (2): 266277, 2001.
62. P. Yan and A. A. Kassim, MRA image segmentation with
capillary active contours, Proc. Medical Image Computing
ST
SCALE-SPACE been formalized in a variety of ways by different authors,
and a noteworthy coincidence is that similar conclusions
THE NEED FOR MULTI-SCALE REPRESENTATION can be obtained from several different starting points. A
OF IMAGE DATA fundamental result of scale-space theory is that if general
conditions are imposed on the types of computations that
An inherent property of real-world objects is that only they are to be performed in the earliest stages of visual proces-
exist as meaningful entities over certain ranges of scale. A sing, then convolution by the Gaussian kernel and its
simple example is the concept of a branch of a tree, which derivatives provide a canonical class of image operators
makes sense only at a scale from, say, a few centimeters to with unique properties. The requirements (scale-space
at most a few meters; it is meaningless to discuss the tree axioms; see below) that specify the uniqueness essentially
concept at the nanometer or kilometer level. At those are linearity and spatial shift invariance, combined with
scales, it is more relevant to talk about the molecules different ways of formalizing the notion that new struc-
that form the leaves of the tree or the forest in which tures should not be created in the transformation from fine
the tree grows. When observing such rea-world objects to coarse scales.
with a camera or an eye, an addition scale problem exists In summary, for any two-dimensional (2-D) signal
because of perspective effects. A nearby object will seem f : R2 ! R, its scale-space representation L : R2  R ! R
larger in the image space than a distant object, although is defined by (16)
the two objects may have the same size in the world. These
Z
facts, that objects in the world appear in different ways
depending on the scale of observation and in addition may Lx; y; t f x  x; y  hgx; h; t dx dh (1)
x;h 2 R2
undergo scale changes during an imaging process, have
important implications If one aims to describe them. It
shows that the notion of scale is fundamental to under- where g : R2  R ! R denotes the Gaussian kernel
stand both natural and artificial perception.
In computer vision and image analysis, the notion of 1 x2 y2 =2t
scale is essential to design methods for deriving informa- gx; y; t e (2)
2pt
tion from images and multidimensional signals. To
extract any information from image data, obviously
one must interact with the data in some way, using and the variance t s2 of this kernel is referred to as the
some operator or measurement probe. The type of infor- scale parameter. Equivalently, the scale-space family can
mation that can be obtained is largely determined by the be obtained as the solution of the (linear) diffusion
relationship between the size of the actual structures in equation
the data and the size (resolution) of the operators
1
(probes). Some very fundamental problems in computer @t L r2 L (3)
vision and image processing concern what operators to 2
use, where to apply them, and how large they should be. If
these problems are not addressed appropriately, then the with initial condition L; ; t f . Then, based on this
task of interpreting the operator response can be very representation, scale-space derivatives at any scale t can
hard. Notably, the scale information required to view the be computed either by differentiating the scale-space
image data at an appropriate scale may in many cases be directly or by convolving the original image with Gaussian
a priori unknown. derivative kernels:
The idea behind a scale-space representation of image
data is that in the absence of any prior information about Lxa yb ; ; t @xa yb L; ; t @xa yb g; ; t  f ;  (4)
what scales are appropriate for a given visual task, the
only reasonable approach is to represent the data at multi-
ple scales. Taken to the limit, a scale-space representation Because scale-space derivatives can also be computed by
furthermore considers representations at all scales simul- convolving the original image with Gaussian derivative
taneously. Thus, given any input image, this image is operators gxa yb ; ; t they are also referred to as Gaussian
embedded into a one-parameter family of derived signals, derivatives. This way of defining derivatives in scale-space
in which fine-scale structures are suppressed progres- makes the inherently ill-posed problem of computing
sively. When constructing such a multiscale representa- image derivatives well-posed, with a close connection to
tion, a crucial requirement is that the coarse-scale generalized functions.
representations should constitute simplifications of cor- For simplicity, we shall here restrict ourselves to 2-D
responding structures at finer scalesthey should not be images. With appropriate generalizations or restrictions,
accidental phenomena created by the smoothing method however, most of these concepts apply in arbitrary dimen-
intended to suppress fine scale structures. This idea has sions.

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 SCALE-SPACE

Figure 1. (top left) A gray-level image of size 560420 pixels, (top right)(bottom right) Scale-space representations computed at scale
levels t j, 8, and 64 (in pixel units).

FEATURE DETECTION AT A GIVEN SCALE IN SCALE-SPACE A theoretically well-founded approach to feature detec-
tion is to use rotationally variant descriptors such as the
The set of scale-space derivatives up to order N at a given N-jet, directional filter banks, or rotationally invariant
image point and a given scale is referred to as the N- differential invariants as primitives for expressing visual
jet(7,8). and corresponds to a truncated Taylor expansion modules. For example, with v denoting the gradient direc-
of a locally smoothed image patch. Together, these deri- tion Lx ; Ly T a differential geometric formulation of edge
vatives constitute a basic type of feature within the scale- detectionat a given scale can be expressed from the image
space framework and provide a compact characterization points for which the second-order directional derivative in
of the local image structure around the image point at that the gradient direction Lvv is zero and the third-order
scale. For N 2, the 2-jet at a single scale contains the directional derivative Lvvv is negative:
partial derivatives
8
< L L2x Lxx 2 Lx Ly Lxy L2y Lyy 0;
vv
Lx ; Ly; Lxx; Lxy; Lyy (5)
: Lvvv L3 Lxxx 3 L2 Ly Lxxy 3 Lx L2 Lxyy L3 Lyyy < 0
x x y y
(8)
and directional filters in any direction cos w; sin w can be
obtained from A single-scale blob detector that responds to bright and
dark blobs can be expressed from the minima and the
maxima of the Laplacian response r2 L. An affine covariant
@w L coswLx sinwLy and blob detector that also responds to saddles can be expressed
(6)
@w w L cos wLxx 2 cos w sin w Lxy sin2 w Lyy
2 from the maxima and the minima of the determinant of the
Hessian det HL. A straight forward and affine covariant
corner detector can be expressed from the maxima and
From the five components in the 2-jet, four differential minima of the rescaled level curve curvature kL With p
invariants can be constructed, which are invariant to local denoting the main eigendirection of the Hessian matrix,
rotations: the gradient magnitude jrLj; the Laplacian which is parallel to the vector
r2 L, the determinant of the Hessian det HL, and the
rescaled level curve curvature kL: 0
v
u Lxx  Lyy
Bu
cos w; sin we@t1 q;signLxy
8
> 2 2 2 Lxx  Lyy 2 4L2xy
> jrLj Lx Lyx
>
> v 1
< r2 L  L L u
xx yyl
(7) u Lxx  Lyy
> 2 u C
>
> det HL L xx yy  Lxyy
L t1  q A 9
>
:k Lxx  Lyy 4Lxy 2 2
~L L2x Lyy L2y Lxx  2Lx Ly Lxy
SCALE-SPACE 3

dependent) methods for image-based object recognition can


expressed in terms of vectors or (global or regional) histo-
grams of multi-scale N-jets (1114) Methods for rotation-
ally invariant image-based recognition can formulated in
terms of histograms of multiscale vectors of differential
invariants.

WINDOWED IMAGE DESCRIPTORS WITH TWO SCALE


PARAMETERS

The image descriptors considered so far are all dependent


on a single scale parameter t. For certain problems, it is
useful to introduce image descriptors that depend on two
scale parameters. One such descriptor is the second-
moment matrix (structure tensor) denned as

Z
Figure 2. The Gaussian kernel and its derivatives up to order two mx; y; t; s
in the 2-D case. x;h 2 R2
 
L2x x; h; t Lx x; h; tLy x; h; t
a differential geometric ridge detectorat a fixed scale can be Lx x; h; tLy x; h; t L2y x; h; t
expressed from the zero-crossings of the first derivative Lp gx  x; y  h; sdx dh 10
in this direction for which the second-order directional
derivative Lpp is negative and in addition jL p p j  jLqq j.
Similarly, valleys can be extracted from the zero-crossings where t is a local scale parameter that describes the scale of
of Lq that satisfy Lqq  0 and jLqq j  jL p p j. differentiation, and s is an integration scale parameter that
describes the extent over which local statistics of deriva-
tives is accumulated. In principle, the formulation of this
FEATURE-CLASSIFICATION AND IMAGE MATCHING FROM descriptor implies a two-parameter variation. In many
THE MULTISCALE N-IET practical applications, however, it is common practice to
couple the two scale parameters by a constant factor C such
By combining N-jet representations at multiple scales, that s Ct where C > 1.
usually with the scale levels distributed by ratios of two One common application of this descriptor is for a multi-
when the scale parameter p is measured in units of the scale version of the Harris corner detector(15), detecting
standard deviation s t of the Gaussian, we obtain a positive spatial maxima of the entity
multiscale N-jet vector. This descriptor is useful for a vari-
ety of different tasks. For example, the task of texture
classification can be expressed as a classification and/or H detm  k trace2 m (11)
clustering problem on the multi-scale N-jet over regions in
the image (9). Methods for stereo matching can be formu-
lated in terms of comparisons of local N-jets (10), either in where k  0:04 is a constant. Another common application
terms of explicit search or coarse-to-fine schemes based on is for affine normalization/shape adaptation and will be
differential corrections within the support region of the developed below. The eigenvalues l1;2 m11 m22 
q
multi-scale N-jet. Moreover, straightforward (rotationally m11  m22 2 4m212 and the orientation argm11 

Figure 3. Edge detection: (left) A gray-level image of size 180  180 pixels, (middle) The negativepvalue
of the gradient magnitude jrLj
computed at t 1. (right) Differential geometric edges at t 1 with a complementary low threshold tjrLj  1 on the gradient magnitude.
4 SCALE-SPACE

Figure 4. Differential descriptors for blob detection/interest point detection: (left) A gray level image of size 210  280 pixels, (middle) The
Laplacian r2 L computed at t 16. (right) The determinant of the Hessian det HL computed at t 16.

m22 ; 2m12 of m are also useful for texture segmentation and Gaussian scale-space smoothing, Gaussian derivatives, and
for texture classification. differential invariants can then be defined from the IUV
Other commonly used image descriptors that depend an color channels separately. The luminance channel I will
additional integration scale parameter include regional then reflect mainly, the interaction between reflectance,
histograms obtained using Gaussian window functions illuminance direction, and intensity, whereas the chromatic
as weights (16). channels, Uand V, will largely make the interaction between
illumination color and surface pigmentation more explicit.
SCALE-SPACE REPRESENTATION OF COLOR IMAGES This approach has been applied successfully to the tasks of
image feature detection and image-based recognition based
The input images f considered so far have all been assumed on the N-jet. For example, red-green and blue-yellow color
to be scalar gray-level images. For a vision system, however, opponent receptive fields of center-surround type can be
color images are often available, and the use of color cues can obtained by applying the Laplacian r2 L to the chromatic U
increase the robustness and discriminatory power of image and V channels.
operators. For the purpose of scale-space representation of An alternative approach to handling colors in scale-
color images, an initial red green blue-yellow color opponent space is provided by the Gaussian color model, in which
transformation is often advantageous (17). Although the the spectral energy distribution El over all wave-
combination of a scale-space representation of the RGB lengths l is approximated by the sum of a Gaussian
channels independently does not necessarily constitute function and first- and second-order derivatives of
the best way to define a color scale-space, by performing Gaussians (18). In this way a 3-D color space is obtained,
where the channels E; ^ E^ l and E^ ll correspond to a sec-
the following pretransformation prior to scale-space
smoothing ond-order Taylor expansion of a Gaussian-weighted
8 spectral energy distribution around a specific wave-
< I R G B=3 length l0 and smoothed to a fixed spectral scale tl0 . In
U RG (12) practice, this model can be implemented in different
: ways. For example, with l0 520 nm and tl0 55 nm,
V B  R G=2

Figure 5. Fixed scale valley detection: (left) A gray-level image of size 180  180 pixels, (middle) The negative value of the valley strength
measure Lqq computed at t 4. (right) Differential geometric valleys detected at t 4 using a complementary low threshold on tjLqq j  1 and
then overlayed on a bright copy of the original gray-level image.
SCALE-SPACE 5

the Gaussian color model has been approximated by the affine transformations. This property has been used to
following color space transformation (19): express affine invariant interest point operators, affine
invariant stereo matching, as well as affine invariant
0 1 0 1 texture segmentation and texture recognition methods.
E^ 0:019 0:048 0:011 (2125). [26, 1, 28, 33, 20] In practice, affine invariants
B C B C
B E^ C @ 0:019 0 0:016 A at a given image point can (up to an unknown scale factor
@ l A
0:047 0:052 0 and a free rotation angle) be accomplished by shape
E^ll
0 10 1 adaptation, that is by estimating the second-moment
0:621 0:113 0:194 R matrix m using a rotationally symmetric scale-space and
B CB C P
@ 0:297 0:563 0:049 A@ G A 13 thenP iteratively by choosing the covariance matrices t
1
and s proportional to m until the fixed-point has been
0:009 0:027 1:105 B
reached or equivalently by warping the input image by
linear transformations proportional to A m1=2 until the
using the CIE 1931 XYZ color basis as an intermediate second-moment matrix is sufficiently close to a constant
representation. In analogy with the IUV color space, times the unit matrix.
spatio-spectral Gaussian, derivatives and differential
invariants can then be defined by applying Gaussian AUTOMATIC SCALE SELECTION AND SCALE INVARIANT
smoothing and Gaussian derivatives to the channels in IMAGE DESCRIPTORS
this representation. This approach has been applied
for constructing approximations of color invariants Although the scale-space theory presented so far pro-
assuming specific models for illumination and/or sur- vides a well-founded framework for expressing visual
face properties (20). operations at multiple scales, it does not address the
problem of how to select locally appropriate scales for
AFFINE SCALE-SPACE, AFFINE IMAGE DEFORMATIONS, additional analysis. Whereas the problem of finding the
AND AFFINE COVARIANCE best scales for handling a given data set may be regarded
as intractable unless more information is available, in
The regular linear scale-space representation obtained by many situations a mechanism is required to generate
smoothing with the rotationally symmetric Gaussian hypotheses about interesting scales for additional ana-
kernel is closed under translations, rotations, and rescal- lysis. Specifically, because the size of and the distance to
ings. This finding means that image transformations objects may vary in real-life applications, a need exists to
within this group can be captured penectly by regular define scale invariant image descriptors. A general meth-
scale-space operators. To obtain a scale-space represen- odology (28) for generating hypotheses about in teresting
tation that is closed under affine transformations, a nat- scale levels is by studying the evolution properties over
ural generalization is to consider an affine scale-space(3) scales of (possibly non-linear) combinations of g-normal-
obtained by the convolution with Gaussian kernels with ized derivatives defined by
their shapes
P determined by positive definite covariance
matrices : @x tg=2 @x and @h tg=2 @y (16)

! where g is a free parameter to be determined for the task


X 1 P1
xT x=2 at hand. Specifically, scale levels can be selected from the
g x; p
P e t (14)
t 2p det t scales at which g-normalized derivative expressions
assume local extrema with respect to scale. A general
rationale for this statement is that under a scaling trans-
where x x; yT : This affine scale-space combined with formation x0 ; y0 sx; sy for some scaling factor s with
directional derivatives can serve as a model for oriented f 0 sx; sy f x; y, if follows that for matching scale
elongated filter banks. Consider two input images f and f 0 levels t0 s2 t the m:th order normalized derivatives at
that are related by an affine transformation x0 Ax such corresponding scales t0 s2 t in scale-space transform
that f 0 Ax f x. Then, the affine scale-space represen- according to
tations L and L0 of f and f 0 are related according to
L0 x0 ; S0 Lx; S where S0 ASAT . A second-moment
L0x0 m x0 ; y0 ; t0 smg1 Lxm x; y; t (17)
matrix [Equation 10] defined from an affine scale-space
with covariance matrices St and Ss transforms according
to Hence, for any differential expression that can be
expressed as a homogeneous polynomial in terms of g-
X X X X normalized derivatives, it follows that local extrema over
m0 Ax; A AT ; A AT AT mx; ; A1 (15) scales will be preserved under scaling transformations. In
t s t s other words, if a g-normalized differential entity Dnorm L
assumes an extremum over scales at the point x0 ; y0 ; t0
If we can determine covariance matrices St and Ss such in scale-space, then under a rescaling transformation an
that mx; St ; Ss c1 S1 1
t c2 S s for some constants c1 extremum in the transformed differential invariant is
and c2, we obtain a fixed-point that is preserved under assumed at sx0 ; sy0 ; s2 t0 , in the scale-space L0 of the
6 SCALE-SPACE

Figure 6. Affine normalization by shape adaptation in affine scale-space: (left) A gray-level image with an oblique view of a book cover.
(middle) The result of effine normalization of a central image patch using iterative shape adaptation with affine transformations proportional
to A m1=2 (right) An example of computing differential geometric descriptors, here the Laplacian r2 L at scale t 2, in the affinely
normalized frame.

transformed image. This general property means that if any vision system intended to function robustly in a
we can find an expression based on g-normalized Gaussian complex dynamic world.
derivatives that assumes a local extremum over scales for By studying the g-normalized derivative response to a
a suitable set of image structures, then we can define a one-dimensional sine wave f x sinox, for which the
scale invariant feature detector and/or image descriptor maximum over scales in the m:th order derivative is
by computing it at the scale at which the local extremum assumed at scale smax (measured in units of the standard
over scales is assumed. deviation of the Gaussian) proportional to the wavelength
The scale estimate t^ obtained from the scale selection l 2p=o of the signal, one can see that a qualitative
step and therefore can be used for tuning or for guiding similarity exists between this construction and a peak in
other early visual processes to be truly scale invariant a local Fourier transform. However, also two major differ-
(3,26) . With the incorporation of a mechanism for auto- ence exist: (1) no window size is needed compute the Fourier
matic scale selection, scale-tuned visual modules in a transform and (2) this approach applies also to nonlinear
vision system could handle objects of different sizes as differential expressions.
well as objects with different distances to the camera in Specifically, if we choose g1, then under scaling trans-
the same manner. These requirements are essential for formations the magnitudes of normalized scale-space deri-

Figure 7. Automatic scale selection from local extrema over scales of normalized derivatives: (top row) Subwindows showing different
details from Fig. 4 with image structures of different size, (bottom row) Scale-space signaturesof the scale normalized determinant of the
Hessian det Hnorm L accumulated at the centre of each window. The essential property of the scale dependency of these scale normalized
differential entities is that the scale at which a local extremum over scales is assumed is proportional to the size of the corresponding image
structure in the image domain. The horizontal axis on these graphs represent effective scale, which corresponds roughly to the logarithm of
the scale parameter: t  log2 t.
SCALE-SPACE 7

vatives in Equation (17) are equal at corresponding points For both scale invariant blob detectors, the selected scale
in scale-space. For g 6 1 they are related according to a reflects the size of the blob. For the purpose of scale
(known) power of the scaling factor (see also Ref. 27 for invariance, it is, however, not necessary to use the
earlier work on receptive field responses under similarity same entity determine spatial interest points as to deter-
transformations). mine interesting scales for those points. An alternative
approach to scale interest point detection is to use the
Harris operator in Equation (11) to determine spatial
SCALE INVARIANT FEATURE DETECTORS WITH interest points and the scale normalized Laplacian for
INTERGRATED SCALE SELECTION MECHANISM determining the scales at these points (23). Affine covar-
iant interest points can in turn be obtained by combining
The most commonly used entity for automatic scale selec- any of these three interest point operators with subse-
tion is the scale normalized Laplacian (3,26) quent affine shape adaptation following Equation (15)
combined with a determination of the remaining free
rotation angle using, for example, the orientation of the
r2norm L tLxx Lyy (18)
image gradient.
The free parameter g in the g-normalized derivative
with g 1. A general motivation for the usefulness of this concept can be related to the dimensionality of the type of
descriptor for general purpose scale selection can be image features to be detected or to a normalization of the
obtained from the fact that the scale-space representation Gaussian derivative kernels to constant L p norm over
at any point can be decomposed into an integral of Lapla- scales. For blob-like image descriptors, such as the inter-
cian responses over scales: est points described above, g 1 is a good choice and
corresponds to L1normalization. For other types of
image structures, such as thin edges, elongated ridges,
Lx; y; t0 Lx; y; 1  Lx; y; t0 or rounded corners, other values will be preferred. For
Z 1 example, for the problem of edge detection, g 1/2 is a
 @t Lx; y; t dt useful choice to capture the width of diffuse edges,
tt0
R1 whereas for the purpose of ridge detection, g 3/4 is
1
 2 tt0 r2 Lx; y; t dt (19) preferable for tuning the scale levels to the width of an
elongated ridge (2830).

After a reparameterization of the scale parameter into


SCALE-SPACE AXIOMS
effective scale t log t, we obtain:
Besides its Practical use for computer vision problems, the
R1
Lx; y; t0  12 tt0 tr2 Lx; y; t dt scale-space representation satisfies several theoretic prop-
t
R1 erties that define it as a unique form of multiscale image
2
 tt0 rnorm Lx; y; t dt (20) representation: The linear scale-space representation is
obtained from linear and shift-invariant transformations.
Moreover, the Gaussian kernels are positive and satisfy the
By detecting the scale at which the normalized Laplacian semi group property
assumes its positive maximum or negative minimum over
scales, we determine the scale for which the image in a g; ; t1  g; ; t2 g; ; t1 t2 (22)
scale-normalized bandpass sense contains toe maximum
amount of information.
Another motivation for using the scale-normalized which implies that any coarse-scale representation can be
Laplacian operator for early scale selection is that it serves computed from any fine-scale representation using a simi-
as an excellent blob detector. For any (possibly nonlinear) g- lar transformation as in the transformation from the ori-
normalized differential expression Dnorm L, let us first ginal image
define a scale-space maximum (minimum) as a point for
which the g-normalized differential expression assumes a L; ; t2 g; t2  t1  L; ; t1 (23)
maximum (minimum) over both space and scale. Then, we
obtain a straightforward blob detector with automatic scale
In one dimension, Gaussian smoothing implies that new
selection that responds to dark and bright blobs, from the
local extrema or new zero-crossings cannot be created with
scale-space maxima and the scale-space minima of r2norm L
increasing scales (1,3). In 2-D and higher dimensions scale-
Another blob detector with automatic scale selection that
space representation obeys nonenhancement of local
also responds to saddles can be defined from the scale-space
extrema (causality), which Implies that the value at a local
maxima and minima of the scale-normalized determinant
maximum is guaranteed not to increase while the vaiue at a
of the Hessian (26):
local minimum is guaranteed to not decrease (2,3,31). The
regular linear scale-space is closed under translations, rota-
tions and scaling transformations. In fact, it can be shown
det H norm L t2 Lxx Lyy  L2xy (21) that Gaussian smoothing arises uniquely for different sub-
8 SCALE-SPACE

Figure 8. Scale-invariant feature detection: (top) Original gray-level image, (bottom left) The 1000 strongest scale-space extrema of the
scale normalized Laplacian r2norm . (bottom right) The 1000 strongest scale-space extrema of the scale normalized determinant of the Hessian
det Hnorm L Each feature is displayed by a circle with its size proportional to the detection scale. In addition, the color of the circle indicates the
type of image feature: red for dark features, blue for bright features, and green for saddle-like features.

sets of combinations of these special and highly useful RELATIONS TO BIOLOGIC, VISION
properties. For partial views of the history of scale-space
axiomatics, please refer to Refs. 31 and 32 and the references Interestingly, the results of this computationally motivated
therein. analysis of early visual operations are in qualitative agree-
Concerning the topic of automatic scale selection, it can ment with current knowledge about biologic vision. Neu-
be shown that, the notion of g-normalized derivatives in rophysiologic studies have shown that receptive field
Equation (16) devlops necessity from the requirement that profiles exists in the mammalian retina and the visual
local extrema over scales should be preserved under scaling cortex that can be well modeled by Gaussian derivative
transformations (26). operators (33,34).

Figure 9. Affine covariant image features: (left) Original gray-level image. (right) The result of applying affine shape adaptation to the 500
strongest scale-space extrema of the scale normalized determinant of the Hessian det Hnorm L (resulting in 384 features for which the iterative
scheme converged). Each feature is displayed by an ellipse with its size proportional to the detection scale and the shape determined from a
linear transformation A determined from a second-moment matrix m. In addition, the color of the ellipse indicates the type of image feature:
red for dark features, blue for bright features, and green for saddle-like features.
SCALE-SPACE 9

SUMMARY AND OUTLOOK 8. J. J. Koenderink, and A. J. van Doorn, Generic neighborhood


operations, IEEE Trans. Pattern Anal. Machine Intell.
Scale-space theory provides a well-founded framework for 14(6): 597605, 1992.
modeling image structures at multiple scales, and the out- 9. T. Leung, and J. Malik, Representing and recognizing the
put from the scale-space representation can be used as visual appearance of materials using three-dimensional tex-
input to a large variety of visual modules. Visual operations tons, Int. J. of Computer Vision, 43(1): 2944, 2001.
such as feature detection, feature classification, stereo 10. D. G. Jones, and J. Malik, A computational framework for
matching, motion estimation, shape cues, and image-based determining stereo correspondences from a set of linear spatial
filters, Proc. Eur. Conf. Comp. Vis., 1992, pp. 395410.
recognition can be expressed directly in terms of (possibly
11. C. Schmid, and R. Mohr, Local grayvalue invariants for image
nonlinear) combinations of Gaussian derivatives at multi-
retrieval, IEEE Trans. Pattern Anal. Machine Intell. 19(5):
ple scales. In this sense, scale-space representation can
530535, 1997.
serve as a basis for early vision.
12. B. Schiele, and J. Crowley, Recognition without correspon-
The set of early uncommitted operations in a vision
dence using multidimensional receptive field histograms,
system, which perform scale-space smoothing, compute Int. J. of Computer Vision, 36(1): 3150, 2000.
Gaussian derivatives at multiple scales, and combine these
13. D. Lowe, Distinctive image features from scale-invariant
into differential invariants or other types of general pur- keypoints, Int. J. of Computer Vision, 60: (2), 91110,
pose features to be used as input to later stage visual 2004.
processes, is often referred to as a visual front-end. 14. H. Bay, T. Tuytelaars, and Luc van Gool SURF: speeded up
Pyramid representation is a predecessor to scale-space robust features, Proc. European Conf. on Computer Vision,
representation, constructed by simultaneously smoothing Springer LNCS 3951, I: 404417, 2006.
and subsampling a given signal (35,36) In this way, com- 15. C. Harris, and M. Stevens, A combined corner and edge
putationally highly efficient algorithms can be obtained. A detector, Proc. Alvey Workshop on Visual Motion, 1988, pp.
problem with pyramid representations, how-ever, is that 156162.
it is algorithmically harder to relate structures at differ- 16. J. J. Koenderink and A. J. van Doorn, The structure of locally
ent scales, due to the discrete nature of the scale levels. In orderless images, Int. J. of Computer Vision, 31 (2): 159168,
a scale-space representation, the existence of a continuous 1999.
scale parameter makes it conceptually much easier to 17. D. Hall, V. de Verdiere, and J. Crowley, Object recognition
express this deep structure. For features defined as using coloured receptive fields, Proc. European Conf. on Com-
zero-crossings of differential invariants, the implicit func- puter Vision, Springer LNCS 1842, I: 164177, 2000.
tion theorem defines trajectories directly. across scales, 18. J. J. Koenderink, and A. Kappers, Colour space, unpublished
and at those scales where bifurcations occur, the local lecture notes, Utrecht University, The Netherlands.
behavior can be modeled by singularity theory. Never- 19. J. M. Geusebroek, R. van den Boomgaard, A. W. M. Smeulders,
theless, pyramids are frequently used to express compu- and A. Dev, Color and scale: The spatial structure of color
tationally more efficient approximations to different images. proc. European Conf. on Computer Vision, Springer
scale-space algorithms. LNCS 1842, I: 331341, 2000.
Extensions of linear scale-space theory concern the for- 20. J. M Geusebroek, R. van den Boomgaard, A. W. M. Smeulders,
mulation of nonlinear scale-space concepts more committed and H. Geerts, Color invariance, IEEE Patt. Anal. Mach. Intell,
to specific purposes (37,38). Strong relations exist between 23: 12; 13381346, 2001.
scale-space theory and wavelets, although these two 21. T. Lindeberg, and J. Garding, Shape-adapted smoothing in
notions of multiscale representations have been developed estimation of 3-D depth cues from affine distortions of local 2-
D structure, Image and Vision Computing 15: 415434,
from somewhat different premises.
1997.
22. A. Baumberg, Reliable feature matching across widely sepa-
BIBLIOGRAPHY rated views Proc:Comp:VisionPatt:Recogn:; I: 17741781,
2000.
1. A. P. Witkin, Scale-space filtering, Proc. 8th Int. Joint Conf. 23. K. Mikolaiczyk, and C. Schmid, Scale and affine invariant
Art. Intell., 1983, pp. 10191022. interest point detectors, Int. J. Comp. Vision, 60: 1, 6386, 2004.
2. J. J. Koenderink, The structure of images, Biological Cyber- 24. F. Schaffahtzky, and A. Zisserman, Viewpoint invariant tex-
netics 50: 363370, 1984. ture matching and wide baseline stereo, Proc. Int. Conf. Comp.
3. T. Lindeberg, Scale-Space Theory in Computer Vision, Dor- Vis., 2: 636644, 2001.
drecht: Kluwer/Springer, 1994. 25. S. Lazebnik, C. Schmid, and J. Ponce, Affine-invariant local
4. J. Sporring, M. Nielsen, L. Florack and P. Johansen, eds. descriptors and neighbourhood statistics for texture recogni-
Gaussian Scale-Space Theory: Proc. PhD School on Scale- tion, Proc. Int. Conf. Comp. Vis., I: 649655, 2003.
Space Theory, Dordrecht: Kluwer/Springer, 1996. 26. T. Lindeberg, Feature detection with automatic scale selection,
5. L. M. J. Florack, Image Structure, Dorarecht: Kluwer/ Int. J. of Computer Vision 30(2): 77116, 1998.
Springer, 1997. 27. D. J. Field, Relations between the statistics of natural images
6. B. t. H. Romeny, Front-End Vision and Multi-Scale Image and the response properties of cortical cells, J. Opt. Soc. Am.4:
Analysis, Dordrecht: Kluwer/Springer, 2003. 23792394, 1987.
7. J. J. Koenderink, and A. J. van Doorn, Representation of local 28. T. Lindeberg, Edge detection and ridge detection with auto-
geometry in the visual system, Biological Cybernetics 55: 367 matic scale selection, Int. J. of Computer Vision, 30 (2): 117
375, 1987. 154, 1998.
10 SCALE-SPACE

29. A. F. Frangi, W. J. Niessen, R. M. Hoogeveen, T. van Walsum, 35. P. J. Burt, and E. H. Adelson, The Laplacian pyramid as a
M. A. Viergever, Model-based detection of tubular structures in compact image code, IEEE Trans. Comm. 9:4, 532540,
3D images, IEEE Trans. Med. Imaging, 18(10): 946956, 2000. 1983.
30. K. Krissian, G. Malandain, N. Avache, R. Vaillant and Y. 36. J. Crowley, and A. C. Parker, A representation for shape based
Trousset, Model-based detection of tubular structures in 3D on peaks and ridges in the difference of low-pass transform,
images, Comput. Vis. Image Underst., 80(2): 130171, 2000. IEEE Trans. Pattern Anal. Machine Intell. 6(2): 156170, 1984.
31. T. Lindeberg, On the axiomatic foundations of linear scale- 37. B. t. H. Romeny, ed. Geometry-Driven Diffusion in Computer
space: Combining semi-group structure with causailty vs. scale Vision, Dordrecht: Kluwer/Springer, 1997.
invariance, In: J. Sporring et al. (eds.) Gaussian Scale-Space 38. J. Weickert, Anisotropic Diffusion in Image Processing, Ger-
Theory, pp. Kluwer/Springer, 1997, 7598. many: Teubner-Verlag, 1998.
32. J. Weickert, Linear scale space has first been proposed in
Japan, J. Math. Imaging and Vision, 10(3): 237252, 1999.
33. R. A. Young, The Gaussian derivative model for spatial vision, TONY LINDEBERG
Spatial Vision 2: 273293, 1987. KTH (Royal Institute
34. G. C. DeAngelis, I. Ohzawa and R. D. Freeman, Receptive field of Technology)
dynamics in the central visual pathways, Trends Neurosc. 18 Stockholm, Sweden
(10): 451457, 1995.
Author Query

Q1 Au: Please check editing at 22 ?


Computing Milieux
B
BEHAVIORAL SCIENCES AND COMPUTING another? What are the implications of lack of either access
or acceptance of computers in modern cultures? These
This article presents an overview of behavioral science three categories of work in behavioral science computing
research on humancomputer interactions. The use of are not mutually exclusive as the boundaries between any
high-speed digital computers in homes, schools, and the two of them are not fixed and firm.
workplace has been the impetus for thousands of research
studies in the behavioral sciences since the 1950s. As ANTECEDENT-CONSEQUENCE RESEARCH
computers have become an increasingly important part
of daily life, more studies in the behavioral sciences have Personality
been directed at humancomputer use. Research continues
to proliferate, in part, because rapid technological advances Research conducted since the 1970s has sought to
continue to lead to the development of new products and identify what type of person is likely to use computers
applications from which emerge new forms of human and related information technologies, succeed in learning
computer interactions. Examples include engaging in about these technologies and pursue careers that deal with
social interactions through electronic mail, chat, and dis- the development and testing of computer products. Most
cussion groups; using commercial websites for shopping recently a great deal of attention has been given to human
and banking; using Internet resources and multimedia behavior on the Internet. Personality factors have been
curriculum packages to learn in schools and at home; using shown to be relevant in defining Internet behavior. Studies
handheld computers for work and personal life; collaborat- indicate that extroversion-introversion, shyness, anxiety,
ing in computer-supported shared workspaces; tele- and neuroticism are related to computer use. Extroverts
commuting via the Internet; engaging in onemany or are outer directed, sociable, enjoy stimulation, and are
manymany synchronous and asynchronous communica- generally regarded to be people oriented in contrast to
tions; and performing in virtual environments. Given the introverts who are inner directed, reflective, quiet, and
sheer quantity of empirical investigations in behavioral socially reserved. The degree of extroversion-introversion
sciences computing research, the reader should appreciate is related to many aspects of everyday life, including
the highly selective nature of this article. Even the reading vocational choice, performance in work groups, and inter-
list of current journals and books included at the end of personal functioning. Early studies suggested that heavy
this article is highly selective. computer users tended to be introverts, and programming
We present behavioral science computing research ability, in particular, was found to be associated with
according to the following three categories: (1) antece- introversion. Recent studies reveal less relationship
dent-consequence effects, (2) model building, and (3) indi- between introversion-extroversion and degree of computer
vidual-social perspectives. The first category, antecedent- use or related factors such as computer anxiety, positive
consequent effects, asks questions such as follows: How attitudes toward computers, and programming aptitude or
does variability in human abilities, traits, and prior per- achievement. However, the decision to pursue a career in
formance affect computer use? How does use of computers computer-related fields still shows some association with
affect variability in human abilities, traits, and subsequent introversion.
performance? The second category, model building, con- Neuroticism is a tendency to worry, to be anxious and
sists of research on the nature of human abilities and moody, and to evidence negative emotions and outlooks.
performance using metaphors from computer science and Studies of undergraduate students and of individuals using
related fields. Here, the behavioral scientist is primarily computers in work settings have found that neuroticism is
interested in understanding the nature of human beings associated with anxiety about computers and negative
but uses computer metaphors as a basis for describing and attitudes toward computers. Neurotic individuals tend to
explaining human behavior. Model building can also start be low users of computers, with the exception of the Inter-
with assumptions about the nature of human beings, for net, where there is a positive correlation between neuroti-
example, limitations on human attention or types of moti- cism and some online behavior. Neurotic people are more
vation that serve as the basis for the development of new likely than others to engage in chat and discussion groups
products and applications for human use. In this case, the and to seek addresses of other people online. It is possible
behavioral scientist is mainly interested in product devel- that this use of the Internet is mediated by loneliness, so
opment but may investigate actual use. Such data may that as neurotic people alienate others through their nega-
serve to modify the original assumptions about human tive behaviors, they begin to feel lonely and then seek
performance, which in turn lead to refinements in the relationships online (1). Anxious people are less likely,
product. The third category, individual-social perspective, however, to use the Internet for information searches
investigates the effects of increased access to and accep- and may find the many hyperlinks and obscure organiza-
tance of computers in everyday life on human social rela- tion disturbing. Shyness, a specific type of anxiety related
tions. Questions addressed here are those such as follows: to social situations, makes it difficult for individuals to
Do computers serve to isolate or connect persons to one interact with others and to create social ties. Shy people

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 BEHAVIORAL SCIENCES AND COMPUTING

are more likely to engage in social discourse online than in general rather than an isolated fear of computers
they are offline and can form online relationships more exacerbated by lack of experience with technology.
easily. There is a danger that as they engage in social
discourse online, shy people may become even less likely Gender
to interact with people offline. There has been some indica-
Studies over many years have found that gender is an
tion, however, that shy people who engage in online rela-
important factor in humancomputer interaction. Gender
tionships may become less shy in their offline relationships
differences occur in virtually every area of computing
(2).
including occupational tasks, games, online interaction,
As people spend time on the Internet instead of in the
and programming, with computer use and expertise gen-
real world, behavioral scientists are concerned that they
erally higher in males than in females, although recent
will become more isolated and will lose crucial social sup-
studies indicate that the gender gap in use has closed and
port. Several studies support this view, finding that Inter-
in expertise is narrowing. This change is especially notice-
net use is associated with reduced social networks,
able in the schools and should become more apparent in
loneliness, and difficulties in the family and at work.
the workforce over time. In the case of the Internet, males
Caplan and others suggest that these consequences may
and females have a similar overall level of use, but they
result from existing psychosocial conditions such as depres-
differ in their patterns of use. Males are found to more
sion, low self-efficacy, and negative self-appraisals, which
often engage in information gathering and entertainment
make some people susceptible to feelings of loneliness,
tasks, and women spend more time in communication
guilt, and other negative outcomes, so that significant
functions, seeking social interaction online (7). Females
time spent online becomes problematic for them but not
use e-mail more than males and enjoy it more, and they
for others (3). There is some evidence of positive effects of
find the Internet more useful overall for social interaction.
Internet use: Involvement in chat sessions can decrease
These differences emerge early. Girls and boys conceptua-
loneliness and depression in individuals while increasing
lize computers differently, with boys more likely to view
their self-esteem, sense of belonging, and perceived avail-
computers as toys, meant for recreation and fun, and to be
ability of people whom they could confide in or could pro-
interested in them as machines, whereas girls view com-
vide material aid (4). However, Caplan cautions that the
puters as tools to accomplish something they want to do,
unnatural quality of online communication, with its
especially in regard to social interaction (8). This may be
increased anonymity and poor social cues, makes it a
due, in part, to differences in gender role identity, an aspect
poor substitute for face-to-face relationships, and that
of personality that is related to, but not completely deter-
this new context for communication is one that behavioral
mined by, biological sex. Gender role identity is ones sense
scientists are just beginning to understand.
of self as masculine and/or feminine. Both men and women
As computer technologies become more integral to
have traits that are stereotypically viewed as masculine
many aspects of life, it is increasingly important to be
(assertiveness, for example) and traits that are stereo-
able to use them effectively. This is difficult for indi-
typically viewed as feminine (nurturance, for example)
viduals who have anxiety about technology that makes
and often see themselves as possessing both masculine
them excessively cautious near computers. Exposure to
and feminine traits. Computer use differs between people
computers and training in computer use can decrease
with a high masculine gender role identity and those with
this anxiety, particularly if the training takes place in a
a high feminine gender role identity (9). Some narrowing
relaxed setting in small groups with a user-friendly inter-
of the gender gap in computer use may be due to changing
face, provides both demonstrations and written instruc-
views of gender roles.
tions, and includes important learning strategies that help
to integrate new understanding with what is already
Age
known (5). However, some individuals evidence such a
high degree of anxiety about computer use that they Mead et al. (10) reviewed several consequences of compu-
have been termed computerphobics. Here the fear of ter use for older adults, including increased social interac-
computers is intense and irrational, and exposure to com- tion and mental stimulation, increased self-esteem, and
puters may cause distinct signs of agitation including improvements in life satisfaction. They noted, however,
trembling, facial expressions of distress, and physical or that older adults are less likely to use computers than
communicative withdrawal. In extreme cases, a general- younger adults and are less likely to own computers;
ized anxiety reaction to all forms of technology termed have greater difficulty learning how to use technology;
technophobia has been observed. Personality styles differ and face particular challenges adapting to the computer-
when individuals with such phobias are compared with based technologies they encounter in situations that at one
those who are simply uncomfortable with computer use. time involved personal interactions, such as automated
Individuals with great anxiety about computers have check-out lines and ATM machines. They also make more
personality characteristics of low problem-solving persis- mistakes and take more time to complete computer-based
tence and unwillingness to seek help from others (6). The tasks. In view of these factors, Mead et al. suggested
training methods mentioned above are less likely to benefit psychologists apply insights gained from studying the
individuals who evidence severe computerphobia or very effects of age on cognition toward the development of
high levels of neuroticism. Intensive intervention efforts appropriate training and computer interfaces for older
are probably necessary because the anxiety about compu- adults. Such interfaces could provide more clear indi-
ters is related to a personality pattern marked by anxiety cations to the user of previously followed hyperlinks, for
BEHAVIORAL SCIENCES AND COMPUTING 3

example, to compensate for failures in episodic memory, on individuals views of computer use by others and their
and employ cursors with larger activation areas to com- attitudes toward technological change in a range of
pensate for reduced motor control. settings.
Numerous studies have shown that anxiety about
Aptitudes using computers is negatively related to amount of experi-
ence with computers and level of confidence in human
Intelligence or aptitude factors are also predictors of com-
computer interaction. As discussed, people who show
puter use. In fact, spatial ability, mathematical problem-
anxiety as a general personality trait evidence more
solving skills, and understanding of logic may be better
computer use anxiety. In addition, anxiety about mathe-
than personality factors as predictors. A study of learning
matics and a belief that computers have a negative influ-
styles, visualization ability, and user preferences found
ence on society are related to computer anxiety. Thus, both
that high visualizers performed better than low visualizers
types of attitudesattitudes about ones own computer
and thought computer systems were easier to use than did
use and attitudes about the impact of computers on
low visualizers (11). High visualization ability is often
societycontribute to computer anxieties (12).
related to spatial and mathematical ability, which in
With training, adult students attitudes about compu-
turn has been related to computer use, positive attitudes
ters become more positive. That is, attitudes about ones
about computers, and educational achievement in compu-
own interaction with computers and attitudes about the
ter courses. Others have found that, like cognitive abilities,
influence of computers on society at large generally become
the amount of prior experience using computers for activ-
more positive as a result of instruction through computer
ities such as game playing or writing is a better predictor of
courses in educational settings and of specific training in
attitudes about computers than personality characteris-
a variety of work settings. Figure 1 presents a general
tics. This may be because people who have more positive
model of individual differences in computer use. The model
attitudes toward computers are therefore more likely to
indicates that attitudes are affected by personality and
use them. However, training studies with people who
cognitive factors, and that they in turn can affect computer
have negative views of computers reveal that certain types
use either directly or by influencing values and expecta-
of exposure to computers improve attitudes and lead to
tions. The model also indicates that computer use can
increased computer use. Several researchers have sug-
influence attitudes toward computers and personality fac-
gested that attitudes may play an intermediary role in
tors such as loneliness.
computer use, facilitating experiences with computers,
which in turn enhance knowledge and skills and the
Influence of Gender on Attitudes. Gender differences in
likelihood of increased use. Some have suggested that
attitudes toward computer use, although becoming less
attitudes are especially important in relation to user appli-
pronounced, appear relatively early, during the elementary
cations that require little or no special computing skills,
school years, and persist into adulthood. Male students
whereas cognitive abilities and practical skills may play a
have more positive attitudes than female students, express
more important role in determining computer activities
greater interest in computers and greater confidence in
such as programming and design.
their own abilities, and view computers as having greater
utility in society than females at nearly every age level. One
Attitudes
study revealed a moderate difference between males and
Attitudes about self-use of computers and attitudes about females in their personal anxiety about using computers,
the impact of computers on society have been investigated. with women displaying greater levels than men, and hold-
Research on attitudes about self-use and comfort level with ing more negative views than men about the influence of
computers presumes that cognitive, affective, and beha- computers on society. The findings of this study suggest
vioral components of an attitude are each implicated in a that gender differences in computer-related behavior are
persons reaction to computers. That is, the person may due in part to differences in anxiety. When anxiety about
believe that computers will hinder or enhance performance computers was controlled, there were few differences
on some task or job (a cognitive component), the person may between males and females in computer behavior: It seems
enjoy computer use or may experience anxiety (affective that anxiety mediates some gender differences in compu-
components), and the individual may approach or avoid ter-related behavior (13). Other studies confirm that gen-
computer experiences (behavioral component). In each der differences in computer behavior seem to be due to
case, a persons attitude about him- or herself in interaction attitudinal and experiential factors. Compared with men,
with computers is the focus of the analysis. Attitudes are an women report greater anxiety about computer use, lower
important mediator between personality factors and cog- confidence about their ability to use the computer, and
nitive ability factors and actual computer use. lower levels of liking computer work. However, when inves-
Individuals attitudes with respect to the impact of tigators control the degree to which tasks are viewed as
computers on society vary. Some people believe that masculine or feminine and/or control differences in prior
computers are dehumanizing, reduce humanhuman experiences with computers, gender differences in atti-
interaction, and pose a threat to society. Others view tudes are no longer significant (14).
computers as liberating and enhancing the development Middle-school students differ by gender in their reac-
of humans within society. These attitudes about computers tions to multimedia learning interfaces and may have
and society can influence the individuals own behavior different sources for intrinsic satisfaction when using com-
with computers, but they also have potential influence puters. Boys particularly enjoy control over computers and
4 BEHAVIORAL SCIENCES AND COMPUTING

Cognitive Ability Factors:


Analytical
Mathematical
Visual-Spatial

Personality Factors:
Attitudes:
Sociability
Neuroticism Self-efficacy
Gender role identity Affective reactions
Psychosocial health Views of computers
and society

Computer Use:
Quantity and quality
Training and support Expectations and
Problems and successes Perceptions:
Advantages of use
Ease of use
Level of support
Anticipated enjoyment
and success

Figure 1. General model of individual differences in computer use.

look for navigational assistance within computer games, about ones own computer use are related to personal
whereas girls prefer calmer games that include writing and anxiety about computer use as well as to math anxiety.
ask for assistance rather than try to find navigational These relationships are more likely to occur in women than
controls (15). This indicates that gender differences in in men. However, when women have more computer
attitudes about computers may be influenced in part experiences, the relationship between anxiety and compu-
through experience with gender-preferred computer inter- ter use is diminished and the gender difference is often not
faces, and that attitudes of girls toward computer use observed. Several attitudinal factors seem to be involved in
improve when gender-specific attention is paid to the computer use, including math anxiety, feelings of self-
design of the interface and the type of tasks presented. efficacy and confidence, personal enjoyment, and positive
The differences by gender in patterns of Internet use by views of the usefulness of computers for society.
adults support this conclusion. When individuals are free to
determine what type of tasks they do online, gender differ- Workplace
ences in overall use disappear, although males are more
Computers are used in a variety of ways in organizations,
likely to gather information and seek entertainment and
and computing attitudes and skills can affect both the daily
women are more likely to interact socially.
tasks that must be performed in a routine manner and the
Other studies suggest that gender differences in atti-
ability of companies to remain efficient and competitive.
tudes toward computers may vary with the nature of the
The degree of success of computer systems in the workplace
task. In one study, college students performed simple or
is often attributed to the attitudes of the employees who are
more complex computer tasks. Men and women did not
end users of Inter- and intranet-based applications for
differ in attitudes following the simple tasks. However, the
communications and workflow, shared workspaces, finan-
men reported a greater sense of self-efficacy (such as feel-
cial applications, database management systems, data
ings of effective problem-solving and control) than the
analysis software, and applications for producing Web
women after completing the complex tasks (16). Such find-
resources and graphics. A study of factors influencing
ings suggest that, in addition to anxiety, a lack of confi-
attitudes about computing technologies and acceptance
dence affects women more than men in the area of computer
of particular technologies showed that three factors were
use. Training does not always reduce these differences:
most important in determining user acceptance behaviors:
Although people generally become less anxious about
perceived advantages to using the technology for improving
computer use over the course of training, in some cases
job performance, perceived ease of use, and degree of enjoy-
women become more anxious (17). This increase in anxiety
ment in using the technology. Anticipated organizational
may occur even though women report a concomitant
support, including technical support as well as higher
increase in a sense of enjoyment with computers as training
management encouragement and resource allocation,
progressed. With training, both men and women have more
had a significant effect on perceived advantage toward
positive social attitudes toward computers and perceive
improving job performance, so is an additional factor in
computers to be more like humans and less like machines.
determining whether users make use of particular systems
To summarize the state of information on attitudes
(18). The study also showed that the perceived potential for
about computer use thus far, results suggest that attitudes
BEHAVIORAL SCIENCES AND COMPUTING 5

improving job performance was influenced by the extent to usable shared workspaces can be customized to different
which the system was observed as consistent with existing cooperation scenarios.
needs, values, and past experiences of potential adopters. Differences in computer anxiety and negative attitudes
Overall, however, this and other research shows that the about the social impact of computers are more likely to
perception that systems will improve job performance is by occur in some occupations than in others. Individuals in
far the strongest predictor of anticipated use. professional and managerial positions generally evidence
Research on the attitudes of employees toward com- more positive attitudes toward computers. Particular
puters in the workplace reveals that, for the most part, aspects of some jobs may influence individuals attitudes
computers are observed as having a positive effect on jobs, and account for some of these differences. Medcof (22) found
making jobs more interesting, and/or increasing employee that the relative amounts of computing and noncomputing
effectiveness. Employees who report negative attitudes cite tasks, the job characteristics (such as skill variety, level of
increased job complexity with the use of computers instead significance of assigned tasks, and autonomy), and the
of increased effectiveness. They also report negative atti- cognitive demand (e.g., task complexity) of the computing
tudes about the necessity for additional training and refer tasks interact with one another to influence attitudes
to a reduction in their feelings of competence. These mixed toward computer use. When job characteristics are low
feelings may be related to their job satisfaction attitudes. and the computing components of the job also have low
When confusion and frustration about computer systems cognitive demand on the user (as in the case of data entry in
increase, job satisfaction decreases. The negative feelings a clerical job), attitudes toward computer use are negative,
about their own ability to use computers effectively lead and the job is viewed as increasingly negative as the
employees to express greater dissatisfaction with the job as proportion of time spent on the low cognitive demand
a whole (19). task increases. If a larger proportion of the work time is
Work-related computer problems can increase stress. spent on a high cognitive demand task involving computer
Problems with computer systems (e.g., downtime, difficul- use, attitudes toward computer use and toward the job
ties with access, lack of familiarity with software, etc.) often will be more positive.
result in an increase of overall work time, a perception Medcofs findings suggest that under some conditions
of increased workload and pressure, and less feeling of job quality is reduced when computers are used to fulfill
control over the job. In these situations, computers can assigned tasks, although such job degradation can be mini-
be viewed as a detrimental force in the workplace even mized or avoided. Specifically, when jobs involve the use
when users have a generally positive attitude toward of computers for tasks that have low levels of cognitive
them. There is some indication that individuals differ in challenge and require a narrow range of skills, little auto-
their reactions to problems with computers, and that these nomy, and little opportunity for interaction with others,
differences play a role in views of the utility of computers on attitudes toward computer use, and toward the job, are
the job. Older staff who feel threatened by computers negative. But varying types of noncomputing tasks within
tend to complain more about time pressures and health- the job (increased autonomy or social interaction in non-
related issues related to computer use, whereas same-age computing tasks, for example) reduces the negative impact;
peers who view computers more neutrally or positively inclusion of more challenging cognitive tasks as part of
report few problems (20). the computing assignment of the job is especially effective
Computer-supported collaborative work systems can in reducing negative views of computer use. The attitudes
facilitate group projects by allowing people to work together about computers in the workplace therefore depend on
from different places and different times. Kunzer et al. (21) the relative degree of computer use in the entire job, the
discuss guidelines for their effective design and use. For a cognitive challenge involved in that use, and the type of
system to be effective, it is important that its functions are noncomputing activities.
transparent so that it is highly usable, and that it provides Older workers tend to use computers in the workplace
an information space structured for specific tasks for a less often than younger workers, and researchers have
particular group. Web-based portals that include these found that attitudes may be implicated in this difference.
workspaces can greatly enhance collaborative activities. As older workers tend to have more negative attitudes
However, systems that are not highly usable and do not toward computers than younger workers or those with
consider the unique requirements of the user are not well less seniority, they use them less. Negative attitudes
accepted and therefore not used. For example, inadequate toward computer use and computer anxiety are better
consideration of user preferences regarding software appli- predictors of computer use than age alone (23).
cations can make it impossible for users to work with
familiar sets of tools. Users then are likely to find other
MODEL BUILDING
ways to collaborate either offline or in separate, more poorly
coordinated applications. Successful shared workspace Cognitive Processes
systems provide basic features such as a document compo-
nent that allows various file formats with revision control Modifications in theories of human behavior have been
and audit trails; calendars with search capabilities, both the cause and the effect of research in behavioral
schedule-conflict notification, and priority settings; science computing. A cognitive revolution in psychology
threaded discussions with attachments, e-mail notifica- occurred during the 1950s and 1960s, in which the human
tion, and specification of read rights; and contact, project, mind became the focus of study. A general approach called
and workflow management components. Finally, the most information processing, inspired by computer science,
6 BEHAVIORAL SCIENCES AND COMPUTING

became dominant in the behavioral sciences during this individuals need the motivation and capacity to be more
time period. Attempts to model the flow of information from actively in charge of their own learning.
input-stimulation through output-behavior have included
considerations of human attention, perception, cognition, Human Factors
memory, and, more recently, human emotional reactions
Human factors is a branch of the behavioral sciences that
and motivation. This general approach has become a stan-
attempts to optimize human performance in the context of
dard model that is still in wide use.
a system that has been designed to achieve an objective or
Cognitive sciences interest in computer technologies
purpose. A general model of human performance includes
stems also from the potential to implement models and
the human, the activity being performed, and the context
theories of human cognition as computer systems, such as
(25). In the area of humancomputer interactions, human
Newell and Simons General Problem Solver, Chomskys
factors researchers investigate such matters as optimal
transformational grammar, and Andersons Atomic Com-
workstation design (e.g., to minimize soft tissue and joint
ponents of Thought (ACT). ACT represents many compo-
disorders); the perceptual and cognitive processes involved
nents and activities of human cognition, including
in using software interfaces; computer access for persons
procedural knowledge, declarative knowledge, proposi-
with disabilities such as visual impairments; and charac-
tions, spreading activation, problem solving, and learning.
teristics of textual displays that influence reading com-
One benefit to implementing models of human thought on
prehension. An important principle in human factors
computers is that the process of developing a computer
research is that improvements to the system are limited
model constrains theorists to be precise about their the-
if considered apart from interaction with actual users. This
ories, making it easier to test and then refine them. As more
emphasis on contextual design is compatible with the
has been learned about the human brains ability to process
ethnographic movement in psychology that focuses on
many inputs and operations simultaneously, cognitive
very detailed observation of behavior in real situations
theorists have developed connectionist computer models
(24). A human-factors analysis of human learning from
made up of large networks of interconnected computer
hypermedia is presented next to illustrate this general
processors, each network comprising many interconnected
approach.
nodes. The overall arrangement of interconnected nodes
Hypermedia is a method of creating and accessing non-
allows the system to organize concepts and relationships
linear text, images, video, and audio resources. Information
among them, simulating the human mental structure of
in hypermedia is organized as a network of electronic
knowledge in which single nodes may contain little mean-
documents, each a self-contained segment of text or other
ing but meaning emerges in the pattern of connections.
interlinked media. Content is elaborated by providing
These and other implementations of psychological theories
bridges to various source collections and libraries. Links
show how the interactions between computer scientists and
among resources can be based on a variety of relations,
behavioral scientists have informed understandings of
such as background information, examples, graphical
human cognition.
representations, further explanations, and related topics.
Other recent theoretical developments include a focus
Hypermedia is intended to allow users to actively explore
on the social, contextual, and constructive aspects of
knowledge, selecting which portions of an electronic
human cognition and behavior. From this perspective,
knowledge base to examine. However, following links
human cognition is viewed as socially situated, collabora-
through multiple resources can pose problems when users
tive, and jointly constructed. Although these developments
become disoriented and anxious, not knowing where they
have coincided with shifts from stand-alone computers to
are and where they are going (26). Human factors research
networks and Internet-based systems that feature shared
has been applied to the hypermedia environments of digi-
workspaces, it would be erroneous to attribute these
tal libraries, where users search and examine large-scale
changes in theoretical models and explanation solely to
databases with hypermedia tools.
changes in available technology. Instead, many of todays
Rapp et al. (27) suggest that cognitive psychologys
behavioral scientists base their theories on approaches
understanding of human cognition should be considered
developed by early twentieth-century scholars such as
during the design of digital libraries. Hypermedia struc-
Piaget and Vygotsky. Here the focus shifts from examining
tures can be fashioned with an awareness of processes and
individual cognitive processing to evaluating how people
limitations in human text comprehension, mental repre-
work within a dynamic interplay of social factors, tech-
sentations, spatial cognition, learning, memory, and other
nological factors, and individual attitudes and experi-
aspects of cognitive functioning. Digital libraries can in
ences to solve problems and learn (24). This perspective
turn provide real-world environments to test and evaluate
encourages the development of systems that provide
theories of human information processing. Understandings
mechanisms for people to scaffold other learners with sup-
of both hypermedia and cognition can be informed through
ports that can be strengthened or faded based on the
an iterative process of research and evaluation, where
learners understanding. The shift in views of human learn-
hypotheses about cognitive processes are developed and
ing from knowledge transfer to knowledge co-construction
experiments within the hypermedia are conducted. Results
is evident in the evolution of products to support learning,
are then evaluated, prompting revisions to hypermedia
from early computer-assisted instruction (CAI) systems,
sources and interfaces, and generating implications for
to intelligent tutoring systems (ITS), to learning from
cognitive theory. Questions that arise during the process
hypertext, to computer-supported collaborative learning
can be used to evaluate and improve the organization and
(CSCL). An important principle in this evolution is that
BEHAVIORAL SCIENCES AND COMPUTING 7

interfaces in digital library collections. For example, how personalities, and experiencing appropriate emotions
might the multiple sources of audio, video, and textual when flattered or ignored. For example, when a computers
information in digital libraries be organized to promote voice is gendered, people respond according to gender-
more elaborated, integrated, and better encoded mental stereotypic roles, rating the female-voiced computer as
representations? Can the goal-directed, active exploration more knowledgeable about love and the male voice as
and search behaviors implicit in hypermedia generate more knowledgeable about technical subjects, and con-
the multiple cues and conceptual links that cognitive forming to the computers suggestions if they fall within
science has found best enhance memory formation and its gender-specific area of expertise (31). Picard and Klein
later retrieval? lead a team of behavioral scientists who explore this
The Superbook hypertext project at Bellcore was an willingness to ascribe personality to computers and to
early example of how the iterative process of human-factor interact emotionally with them. They devise systems
analysis and system revision prompted modifications in that can detect human emotions, better understand human
original and subsequent designs before improvements over intentions, and respond to signs of frustration and other
traditional text presentations were observed. Dillon (28) negative emotions with expressions of comfort and support,
developed a framework of readerdocument interaction so that users are better able to meet their needs and achieve
that hypertext designers used to ensure usability from their objectives (32). The development and implemen-
the learners perspective. The framework, intended to be tation of products that make use of affective computing
an approximate representation of cognition and behavior systems provide behavioral theorists a rich area for ongoing
central to reading and information processing, consists of study.
four interactive elements: (1) a task model that deals
with the users needs and uses for the material; (2) an
INDIVIDUAL-SOCIAL PERSPECTIVE
information model that provides a model of the information
space; (3) a set of manipulation skills and facilities that
In a previous section we presented an overview of research
support physical use of the materials; and (4) a processor
on gender differences, attitudes toward the impact of com-
that represents the cognitive and perceptual processing
puters on society, and the use of computers in the work-
involved in reading words and sentences. This model pre-
place. Each of these issues relates to the effects of
dicts that the users acts of reading will vary with their
computers on human social relations. One prevalent
needs and knowledge of the structure of the environment
perception is that as people spend time on the Internet
that contains textual information, in addition to their gen-
instead of engaging with people face-to-face they will
eral ability to read (i.e., acquire a representation that
become more isolated, lonely, and depressed, and that as
approximates the authors intention via perceptual and
the kinds of social discourse available online to them may be
cognitive processes). Research comparing learning from
less meaningful and fulfilling, they could lose social sup-
hypertext versus traditional linear text has not yielded a
port. As we discussed, increased Internet use may at times
consistent pattern of results (29). User-oriented models
be a result of loneliness, not a cause of it. The emerging
such as Dillons enable designers to increase the yield
research about this concern is inconclusive, making this an
from hypertext versus traditional text environments.
important area for further research. Kling (33) lists addi-
Virtual environments provide a rich setting for human
tional social controversies about the computerization of
computer interaction where input and output devices are
society: class divisions in society; human safety and critical
adapted to the human senses. Individuals using virtual
computer systems; democratization; the structure of labor
reality systems are immersed into a virtual world that
markets; health; education; military security; computer
provides authentic visual, acoustic, and tactile informa-
literacy; and privacy and encryption. These controversies
tion. The systems employ interface devices such as data
have yet to be resolved and are still being studied by
gloves that track movement and recognize gestures, stereo-
behavioral scientists.
scopic visualizers that render scenes for each eye in real
Psychologists explore the influence of computers on
time, headphones that provide all characteristics of realis-
relationships among people, not only in terms of their
tic sound, and head and eye tracking technologies. Users
online behaviors and interactions, but also their per-
navigate the world by walking or even flying through it,
ceptions of themselves and one another. Power among
and they can change scale so they effectively shrink to look
relationships is sometimes renegotiated because of dif-
at smaller structures in more detail. Krapichler et al. (30)
fering attitudes and competencies with technology. One
present a virtual medical imaging system that allows phy-
researcher proposed that relatively lower computer
sicians to interactively inspect all relevant internal and
expertise among fathers in contrast to their sons, and a
external areas of a structure such as a tumor from any
sense of dependence on their sons for technical support,
angle. In these and similar applications, care is taken to
can change the family dynamic and emasculate fathers,
ensure that both movement through the virtual environ-
reducing perceptions of their strength and of their own
ment and feedback from it are natural and intuitive.
sense of competence (34).
The emerging field of affective computing applies
human factors research to the emotional interaction
Computer-Mediated Communication
between users and their computers. As people seek mean-
ing and patterns in their interactions, they have a tendency Much research on computerhuman interactions is devel-
to respond to computers as though they were people, oped in the context of using computers to communicate
perceiving that that they have human attributes and with other people. Computer-mediated communication
8 BEHAVIORAL SCIENCES AND COMPUTING

(CMC) is a broad term that covers forms of communication Access


including e-mail, listservs, discussion groups, chat,
Behavioral scientists are interested in what inequities exist
instant messaging, and videoconferencing. In comparison
in access to technology, how the inequities developed, and
with face-to-face communication, CMC has fewer social
what can be done to reduce them. Until recently, the
and nonverbal cues but allows people to communicate
number of computers in schools was significantly lower
easily from different places and different times. Compu-
for poorer communities. These data are changing, and
ter-supported collaborative work systems we discussed in
the differences are diminishing. However, socioeconomic
regard to computers in the workplace are examples of
factors continue to be powerful predictors for whether
specialized CMC systems that facilitate collaborative
people have computers or Internet access in their homes.
group work. They include many forms of communication,
The National Telecommunications and Information
allowing both synchronous and asynchronous interac-
Administration (NTIA) (38) reported that, although Inter-
tions among multiple participants. In the cases of chat,
net use is increasing dramatically for Americans of all
instant messaging, and videoconferencing, people com-
incomes, education levels, ages, and races, many inequities
municate at the same time but may be in different loca-
remain. Individuals in high-income households are much
tions. E-mail, listservs, and discussion groups have the
more likely to be computer and Internet users than those in
added benefits and difficulties of asynchronous commu-
low-income households (over 80% for the highest income
nication. The reduction in social and nonverbal cues in
households; 25% for the lowest income households). Age
these forms of communication can be problematic, as
and level of education are also powerful predictors: Com-
people misinterpret messages that are not carefully con-
puter and Internet use is higher among those who are
structed and may respond negatively. It has been found
younger and those who are more highly educated. In addi-
that these problems diminish with experience. As users
tion, people with mental or physical disabilities are less
adapt to the medium and create means of improving com-
likely than others to use computers or the Internet.
munication, and become more adept using linguistic cues,
Many inequities in access to computers are declining.
differences between CMC and face-to-face communica-
According to the NTIAs report, rates of use are rising much
tion may be lessened. Social norms and conventions
more rapidly among poorer, less educated, and elderly
within groups serve to reduce individual variability
people, the very groups who have been most disadvantaged.
across formats rendering CMC similar to face-to-face
The report attributes this development to the lowering cost
communication, especially in established organizations.
of computer technology, and to the expanding use of the
For example, messages from superiors receive more
Internet at schools, work, and libraries, which makes these
attention than messages from coworkers or from subordi-
resources available to people who do not own computers.
nates.
Research on learning in the workplace and in educa-
tional institutions has examined CMCs ability to support Journals
the transfer of knowledge (an instructional perspective)
Applied Ergonomics
and the social, co-construction of knowledge (a conver-
Behavior and Information Technology
sational perspective) (35). Grabe and Grabe (36) discuss
how CMC can change the role of the teacher, effectively Behavior Research Methods, Instruments and Computers
decentering interactions so that students feel freer to Computers in Human Behavior
communicate and to become more involved in their own CyberPsychology and Behavior
learning. CMC results in more diverse participation and a Ergonomics Abstracts
greater number of interactions among students when Hypertext and Cognition
compared with traditional classroom discussion charac- Interacting with Computers
terized by longer periods of talking by the teacher and International Journal of Human Computer Interaction
shorter, less complex individual responses from students. International Journal of Human Computer Studies
With CMC, instructors can focus on observing and facil-
Journal of Educational Computing Research
itating student learning and can intervene to help with
Journal of Educational Multimedia and Hypermedia
scaffolding or direct instruction as needed. Structure
Journal of Occupational and Organizational Psychology
provided by the teacher during CMC learning is impor-
tant to help create a social presence and to encourage
participation. Grabe and Grabe suggest that teachers Books
assume responsibility for managing the discussion by E. Barrett (ed.), Sociomedia, Multimedia, Hypermedia, and the
defining the overall purpose of the discussion, specifying Social Construction of Knowledge. Cambridge, MA: The MIT Press,
roles of participants, establishing expectations, and 1992.
responding to negative or passive behaviors. In a study C. Cook, Computers and the Collaborative Experience of Learning.
of interaction in an online graduate course, increased London: Routledge, 1994.
structure led to more interaction and increased dialogue S. J. Derry, M. Siegel, J. Stampen, and the STEP Research Group,
(37). The STEP system for collaborative case-based teacher education:
Another potential area for discussion, computer-sup- Design, evaluation and future directions, in Proceedings of Com-
ported collaborative learning, is somewhat beyond the puter Support for Collaborative Learning (CSCL) 2002. Mahwah,
scope of this article but is included in our reading list. NJ: Lawrence Erlbaum Associates, 2002, pp. 209216.
BEHAVIORAL SCIENCES AND COMPUTING 9

D. H. Jonassen, K. Peck, and B. G. Wilson, Learning With Tech- 12. F. Farina et al., Predictors of anxiety towards computers,
nology: A Constructivist Perspective. Columbus, OH: Merrill/Pre- Comput. Hum. Behav., 7(4): 263267, 1991.
ntice-Hall, 1999. 13. B. E. Whitley, Gender differences in computer related atti-
D. H. Jonassen (ed.), Handbook of Research on Educational Com- tudes: It depends on what you ask, Comput. Hum. Behav.,
munications and Technology, 2nd ed. Mahwah, NJ: Lawrence 12(2): 275289, 1996.
Erlbaum Associates, 2004. 14. J. L. Dyck and J. A.-A. Smither, Age differences in computer
T. Koschmann (ed.), CSCL: Theory and Practice of an Emerging anxiety: The role of computer experience, gender and educa-
Paradigm. Mahwah, NJ: Lawrence Erlbaum Associates, 1996. tion, J. Educ. Comput. Res., 10(3): 239248, 1994.
J. A. Oravec, Virtual Individual, Virtual Groups: Human Dimen- 15. D. Passig and H. Levin, Gender interest differences with
sions of Groupware and Computer Networking. Melbourne, Aus- multimedia learning interfaces, Comput. Hum. Behav.,
tralia: Cambridge University Press, 1996. 15(2): 173183, 1999.
D. Reinking, M. McKenna, L. Labbo and R. Kieffer (eds.), 16. T. Busch, Gender differences in self-efficacy and attitudes
Handbook of Literacy and Technology: Transformations in a toward computers, J. Educ. Comput. Res., 12(2): 147158,
Post-typographic World. Mahwah, NJ: Lawrence Erlbaum Associ- 1995.
ates, 1998. 17. L. J. Nelson, G. M. Wiese, and J. Cooper, Getting started with
S. Vosniadou, E. D. Corte, R. Glaser and H. Mandl, International computers: Experience, anxiety and relational style, Comput.
Perspectives on the Design of Technology-Supported Learning Hum. Behav., 7(3): 185202, 1991.
Environments. Mahwah, NJ: Lawrence Erlbaum Associates, 1996. 18. S. Al-Gahtani and M. King, Attitudes, satisfaction and
B. B. Wasson, S. Ludvigsen, and U. Hoppe (eds.), Designing for usage: Factors contributing to each in the acceptance of infor-
Change in Networked Learning Environments: Proceedings of the mation technology, Behav. Inform. Technol., 18(4): 277297,
International Conference on Computer Support for Collaborative 1999.
Learning 2003. Boston, MA: Kluwer Academic, 2003. 19. A. J. Murrell and J. Sprinkle, The impact of negative attitudes
towards computers on employees satisfaction and commit-
ment within a small company, Comput. Hum. Behav., 9(1):
5763, 1993.
BIBLIOGRAPHY
20. M. Staufer, Technological change and the older employee:
Implications for introduction and training, Behav. Inform.
1. Y. Amichai-Hamburger and E. Ben-Artzi, Loneliness and Technol., 11(1): 4652, 1992.
Internet use, Comput. Hum. Behav., 19(1): 7180, 2000.
21. A. Kunzer , K. Rose, L. Schmidt, and H. Luczak, SWOFAn
2. L. D. Roberts, L. M. Smith, and C. M. Polluck, U r a lot bolder open framework for shared workspaces to support different
on the net: Shyness and Internet use, in W. R. Crozier(ed.), cooperation tasks, Behav. Inform. Technol., 21(5): 351358,
Shyness: Development, Consolidation and Change. New York: 2002.
Routledge Farmer: 121138, 2000.
22. J. W. Medcof, The job characteristics of computing and non-
3. S. E. Caplan, Problematic Internet use and psychosocial well- computing work activities, J. Occupat. Organizat. Psychol.,
being: Development of a theory-based cognitive-behavioral 69(2): 199212, 1996.
measurement instrument, Comput. Hum. Behav., 18(5):
23. J. C. Marquie et al., Age influence on attitudes of office workers
553575, 2002.
faced with new computerized technologies: A questionnaire
4. E. H. Shaw and L. M. Gant, Users divided? Exploring the analysis, Appl. Ergon., 25(3): 130142, 1994.
gender gap in Internet use, CyberPsychol. Behav., 5(6):
24. J. M. Carrol, Human-computer interaction: Psychology as a
517527, 2002.
science of design, Annu. Rev. Psychol., 48: 6183, 1997.
5. B. Wilson, Redressing the anxiety imbalance: Computer-
25. R. W. Bailey, Human Performance Engineering: Designing
phobia and educators, Behav. Inform. Technol., 18(6):
High Quality, Professional User Interfaces for Computer
445453, 1999.
Products, Applications, and Systems, 3rd ed. Upper Saddle
6. M. Weil,L. D. Rosen, and S. E. Wugalter, The etiology of River, NJ: Prentice Hall, 1996.
computerphobia, Comput. Hum. Behav., 6(4): 361379, 1990.
26. P. A. Chalmers, The role of cognitive theory in human-compu-
7. L.A. Jackson, K.S. Ervin, and P.D. Gardner, Gender and the ter interface, Comput. Hum. Behav., 19(5): 593607, 2003.
Internet: Women communicating and men searching, Sex
27. D. N. Rapp, H. A. Taylor, and G. R. Crane, The impact of
Roles, 44(5/6): 363379, 2001.
digital libraries on cognitive processes: Psychological issues
8. L. M. Miller, H. Schweingruber, and C. L. Brandenberg, Middle of hypermedia, Comput. Hum. Behav., 19(5): 609628,
school students technology practices and preferences: Re- 2003.
examining gender differences, J. Educ. Multimedia Hyperme-
28. A. Dillon, Myths, misconceptions, and an alternative perspec-
dia, 10(2): 125140, 2001.
tive on information usage and the electronic medium, in J. F.
9. A. M. Colley, M. T. Gale, and T. A. Harris, Effects of gender Rouetet al. (eds.), Hypertext and Cognition. Mahwah, NJ:
role identity and experience on computer attitude compo- Lawrence Erlbaum Associates, 1996.
nents, J. Educ. Comput. Res., 10(2): 129137, 1994.
29. A. Dillon and R. Gabbard, Hypermedia as an educational
10. S. E. Mead, P. Batsakes, A. D. Fisk, and A. Mykityshyn, technology: A review of the quantitative research literature
Application of cognitive theory to training and design solutions on learner expectations, control and style, Rev. Educ. Res.,
for age-related computer use, Int. J. Behav. Develop.23(3): 68(3): 322349, 1998.
553573, 1999.
30. C. Krapichler, M. Haubner, A. Losch, D. Schumann, M. See-
11. S. Davis and R. Bostrom, An experimental investigation of the man, K. Englmeier, Physicians in virtual environments
roles of the computer interface and individual characteristics Multimodal human-computer interaction, Interact. Comput.,
in the learning of computer systems, Int. J. Hum. Comput. 11(4): 427452, 1999.
Interact., 4(2): 143172, 1992.
10 BEHAVIORAL SCIENCES AND COMPUTING

31. E. Lee, Effects of gender of the computer on informational J. M. Carrol, Human-computer interaction: Psychology as a science
social influence: The moderating role of the task type, Int. J. of design, Annu. Rev. Psychol., 48: 6183, 1997.
Hum.-Comput. Studies, 58(4): 347362, 2003. E. C. Boling, The Transformation of Instruction through Technol-
32. R. W. Picard and J. Klein, Computers that recognise and ogy: Promoting inclusive learning communities in teacher educa-
respond to user emotion: Theoretical and practical implica- tion courses, Action Teacher Educ., 24(4), 2003.
tions, Interact. Comput., 14(2): 141169, 2002. R.A. Davis, A cognitive-behavioral model of pathological Internet
33. R. Kling, Social controversies about computerization, in use, Comput. Hum. Behav., 17(2): 187195, 2001.
R. Ming (ed.), Computerization and Controversy, Value C. E. Hmelo, A. Nagarajan, and R. S. Day, Effects of high and low
Conflicts and Social Choices, 2nd ed. New York: Academic prior knowledge on construction of a joint problem space, J. Exper.
Press, 1996. Educ., 69(1): 3656, 2000.
34. R. Ribak, Like immigrants: Negotiating power in the face of R. Kraut, M. Patterson, and V. Ludmark, Internet paradox: A
the home computer, New Media Soci., 3(2), 220238, 2001. social technology that reduces social involvement and psychologi-
35. A. J. Romiszowski and R. Mason, Computer-mediated commu- cal well-being, Amer. Psychol., 53(9), 10171031, 1998.
nication, in D. H. Jonassen (ed.), Handbook of Research for K.Y.A. McKenna and J.A. Bargh, Plan 9 from cyberspace: The
Educational Communications and Technology. New York: implications of the Internet form personality and social psychology,
Simon & Schuster Macmillan, 1996. Personality Social Psychol. Rev., 4: 5775, 2000.
36. M. Grabe and C. Grabe, Integrating Technology for Meaningful A. G. Namlu, The effect of learning strategy on computer anxiety,
Learning. New York: Houghton Mifflin, 2004. Comput. Hum. Behav., 19(5): 565578, 2003.
37. C. Vrasidas and M. S. McIsaac, Factors influencing interaction L. Shashaani, Gender differences in computer experiences and
in an online course, The Amer. J. Distance Educ., 13(3): 2236, its influence on computer attitudes, J. Educ. Comput. Res., 11(4):
1999. 347367, 1994.
38. National Telecommunications and Information Administra- J. F. Sigurdsson, Computer experience, attitudes towards compu-
tion. (February 2002). A nation online: How Americans are ters and personality characteristics in psychology undergraduates,
expanding their use of the Internet. [Online]. Available: Personality Individual Differences, 12(6): 617624, 1991.
http://www.ntia.doc.gov/ntiahome/dn/index.html, Accessed C. A. Steinkuehler, S. J. Derry, C. E. Hmelo-Silver, and M. Del-
December 10, 2003.
Marcelle, Cracking the resource nut with distributed problem-
based learning in secondary teacher education, J. Distance
Educ., 23: 2339, 2002.
FURTHER READING

Journal Articles
M. J. Alvarez-Torrez, P. Mishra, and Y. Zhao, Judging a book by
its cover! Cultural stereotyping of interactive media and its effect
STEVEN M. BARNHART
on the recall of text information, J. Educ. Media Hypermedia,
10(2): 161183, 2001.
RICHARD DE LISI
Rutgers, The State University of
Y. Amichai-Hamburger, Internet and Personality, Comput. Hum. New Jersey
Behav., 18(1): 110, 2002. New Brunswick, New Jersey
B. Boneva, R. Kraut, and D. Frohlich, Using email for personal
relationships, Amer. Behav. Scientist, 45(3): 530549, 2001.
B
BIOLOGY COMPUTING Syntenic distance is a measure of distance between
multi-chromosome genomes (where each chromosome is
INTRODUCTION viewed as a set of genes). Applications of computing dis-
tances between genomes can be traced back to the well-
The modern era of molecular biology began with the dis- known Human Genome Project, whose objective is to
covery of the double helical structure of DNA. Today, decode this entire DNA sequence and to find the location
sequencing nucleic acids, the determination of genetic and ordering of genetic markers along the length of the
information at the most fundamental level, is a major chromosome. These genetic markers can be used, for exam-
tool of biological research (1). This revolution in biology ple, to trace the inheritance of chromosomes in families and
has created a huge amount of data at great speed by directly thereby to find the location of disease genes. Genetic mar-
reading DNA sequences. The growth rate of data volume is kers can be found by finding DNA polymorphisms (i.e.,
exponential. For instance, the volume of DNA and protein locations where two DNA sequences spell differently).
sequence data is currently doubling every 22 months (2). A key step in finding DNA polymorphisms is the calcu-
One important reason for this exceptional growth rate of lation of the genetic distance, which is a measure of the
biological data is the medical use of such information in the correlation (or similarity) between two genomes.
design of diagnostics and therapeutics (3,4). For example, Multiple sequence alignment is an important tool for
identification of genetic markers in DNA sequences would sequence analysis. It can help extracting and finding bio-
provide important information regarding which portions of logically important commonalities from a set of sequences.
the DNA are significant and would allow the researchers to Many versions have been proposed and a huge number of
find many disease genes of interest (by recognizing them papers have been written on effective and efficient methods
from the pattern of inheritance). Naturally, the large for constructing multiple sequence alignment. We will
amount of available data poses a serious challenge in stor- discuss some of the important versions such as SP-align-
ing, retrieving, and analyzing biological information. ment, star alignment, tree alignment, generalized tree
A rapidly developing area, computational biology, is alignment, and fixed topology alignment with recombina-
emerging to meet the rapidly increasing computational tion. Recent results on those versions are given.
need. It consists of many important areas such as informa- We assume that the reader has the basic knowledge of
tion storage, sequence analysis, evolutionary tree construc- algorithms and computational complexity (such as NP, P,
tion, protein structure prediction, and so on (3,4). It is and MAX-SNP). Otherwise, please consult, for example,
playing an important role in some biological research. Refs. 79.
For example, sequence comparison is one of the most The rest of this chapter is organized as follows. In the
important methodological issues and most active research next section, we discuss construction and comparison
areas in current biological sequence analysis. Without the methods for evolutionary trees. Then we discuss briefly
help of computers, it is almost impossible to compare two or various distances for comparing sequences and explain in
more biological sequences (typically, at least a few hundred details the syntenic distance measure. We then discuss
characters long). multiple sequence alignment problems. We conclude
In this chapter, we survey recent results on evolutionary with a few open problems.
tree construction and comparison, computing syntenic dis-
tances between multi-chromosome genomes, and multiple
CONSTRUCTION AND COMPARISON
sequence alignment problems.
OF EVOLUTIONARY TREES
Evolutionary trees model the evolutionary histories of
input data such as a set of species or molecular sequences.
The evolutionary history of organisms is often conveniently
Evolutionary trees are useful for a variety of reasons, for
represented as trees, called phylogenetic trees or simply
example, in homology modeling of (DNA and protein)
phylogenies. Such a tree has uniquely labeled leaves and
sequences for diagnostic or therapeutic design, as an aid
unlabeled interior nodes, can be unrooted or rooted if the
for devising classifications of organisms, and in evaluating
evolutionary origin is known, and usually has internal
alternative hypotheses of adaption and ancient geographi-
nodes of degree 3. Figure 1 shows an example of a phylo-
cal relationships (for example, see Refs. 5 and 6 for discus-
geny. A phylogeny may also have weights on its edges,
sions on the last two applications). Quite a few methods are
where an edge weight (more popularly known as branch
known to construct evolutionary trees from the large
length in genetics) could represent the evolutionary dis-
volume of input data. We will discuss some of these methods
tance along the edge. Many phylogeny reconstruction
in this chapter. We will also discuss methods for comparing
methods, including the distance and maximum likelihood
and contrasting evolutionary trees constructed by various
methods, actually produce weighted phylogenies. Figure 1
methods to find their similarities or dissimilarities, which
also shows a weighted phylogeny (the weights are for
is of vital importance in computational biology.
illustrative purposes only).

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 BIOLOGY COMPUTING

Phylogenetic Construction Methods or by the same method on different data. Several distance
models for evolutionary trees have been proposed in the
Phylogenetic construction methods use the knowledge of
literature. Among them, the best known is perhaps the
evolution of molecules to infer the evolutionary history of
nearest-neighbor interchange (nni) distance introduced
the species. The knowledge of evolution is usually in the
independently in Refs. 21 and 22. Other distances include
form of two kinds of data commonly used in phylogeny
the subtree-transfer distance introduced in Refs. 23 and 24
inference, namely, character matrices (where each position
and the the linear-cost subtree-transfer distance(25,26).
(i, j) is base j in sequence i) and distance matrices (where
Below, we discuss very briefly a few of these distances.
each position (i, j) contains the computed distance between
sequence i and sequence j). Three major types of phyloge-
Nearest-Neighbor Interchange Distance
netic construction methods are the parsimony and compat-
ibility method, the distance method, and the maximum- An nni operation swaps two subtrees that are separated
likelihood method, Below, we discuss each of these methods by an internal edge (u, v), as shown in Fig. 2. The nni
briefly. See the excellent survey in Refs. 10 and 11 for more operation is said to operate on this internal edge. The nni
details. distance, Dnni(T1, T2), between two trees T1 and T2 is
Parsimony methods construct phylogenetic trees for the denned as the minimum number of nni operations required
given sequences such that, in some sense, the total number to transform one tree into the other. Culik II and Wood (27)
of changes (i.e., base substitutions) or some weighted sum of [improved later by Tramp and Zhang (28)] proved that
the changes is minimized. See Refs. 1214 for some of the nlogn On nni moves are sufficient to transform a tree
papers in this direction. of n leaves to any other tree with the same set of leaves.
Distance methods (15)(17) try to fit a tree to a matrix of Sleator et al. (29) proved an Vnlogn lower bound for most
pairwise distances between a set of n species. Entries in the pairs of trees. Although the distance has been studied
distance matrices are assumed to represent evolutionary extensively in the literature (21,22,2734), the computa-
distance between species represented by the sequences in tional complexity of computing it has puzzled the research
the tree (i.e., the total number of mutations in both lineages community for nearly 25 years until recently, when the
since divergence from the common ancestor). If no tree fits authors in Ref. 25 showed this problem to be NP-hard an
the distance matrix perfectly, then a measure of the dis- erroneous proof of the NP-hardness of the nni distance
crepancy of the distances in the distance matrix and those between unlabeled trees was published in Ref. 34. As
in the tree is taken, and the tree with the minimum dis- computing the nni distance is shown to be NP-hard, the
crepancy is selected as the best tree. An example of the next obvious question is: Can we get a good approximation
measure of the discrepancy, which has been used in the of the distance? The authors in Ref. 28 show that the nni
literature (15,16), is a weighted least-square measure, for distance can be approximated in polynomial time within a
example, of the form factor of logn O1.
X
wi j Di j  di j 2 Subtree-transfer Distances
1i; jn
An nni operation can also be viewed as moving a subtree
past a neighboring internal node. A more general operation
where Dij are the given distances and dij are the distances is to transfer a subtree from one place to another arbitrary
computed from the tree. place. Figure 3 shows such a subtree-transfer operation.
Maximum-likelihood methods (12,18,19) relies on the The subtree-transfer distance, Dst(T1, T2), between two
statistical method of choosing a tree that maximizes trees T1 and T2 is the minimum number of subtrees we
the likelihood (i.e., maximizes the probability) that the need to move to transform T1 into T2(2326,35).
observed data would have occurred. Although this method It is sometimes appropriate in practice to discriminate
is quite general and powerful, it is computationally inten- among subtree-transfer operations as they occur with dif-
sive because of the complexity of the likelihood function. ferent frequencies. In this case, we can charge each subtree-
All the above methods have been investigated by simu- transfer operation a cost equal to the distance (the number
lation and theoretical analysis. None of the methods work of nodes passed) that the subtree has moved in the current
well under all evolutionary conditions, but each works well tree. The linear-cost subtree-transfer distance, Dlcst(T1,
under particular situations. Hence, one must choose the T2), between two trees T1 and T2 is then the minimum
appropriate phylogeny construction method carefully for total cost required to transform T1 into T2 by subtree-
the best results (6). transfer operations (25,26). Clearly, both subtree-transfer
and linear-cost subtree-transfer models can also be used as
Comparing Evolutionary Trees alternative measures for comparing evolutionary trees
As discussed in the previous section, over the past few generated by different tree reconstruction methods. In
decades, many approaches for reconstructing evolutionary fact, on unweighted phylogenies, the linear-cost subtree-
trees have been developed, including (not exhaustively) par- transfer distance is identical to the nni distance (26).
simony, compatibility, distance, and maximum-likelihood The authors in Ref. (35) show that computing the
methods. As a result, in practice, they often lead to different subtree-transfer distance between two evolutionary trees
trees on the same set of species (20). It is thus of interest to is NP-hard and give an approximation algorithm for this
compare evolutionary trees produced by different methods, distance with performance ratio 3.
BIOLOGY COMPUTING 3

Cat Dog
Cat Dog
0.8 1.1
Seal 2 0.3 Seal

Whale 1.1 2.2 Whale

Goose 0.5 Goose


Horse Horse
0.3 1
Ostrich 5.5 Ostrich
Platypus 2.2 1 3
Platypus
3.3 0.7
Figure 1. Examples of unweighted and
Reptilian Ancestor Reptilian Ancestor weighted phylogenies.

Distances on Weighted Phylogenies


A C
Comparison of weighted evolutionary trees has recently
u v
been studied in Ref. 20. The distance measure adopted is
B D based on the difference in the partitions of the leaves
induced by the edges in both trees, and it has the drawback
B C B D of being somewhat insensitive to the tree topologies. Both
the linear-cost subtree-transfer and nni models can be
naturally extended to weighted trees. The extension for
A B A C
nni is straightforward: An nni is simply charged a cost
equal to the weight of the edge it operates on. In the case of
u v u v
D B linear-cost subtree-transfer, although the idea is immedi-
C D
ate (i.e., a moving subtree should be charged for the
Figure 2. The two possible nni operations on an internal edge (u, weighted distance it travels), the formal definition needs
v): exchange B $ C or B $ D. some care and can be found in Ref. 26.
As computing the nni distance on unweighted phylo-
genies is NP-hard, it is obvious that computing this
distance is NP-hard for weighted phylogenies also. The
authors in Ref. 26 give an approximation algorithm for
the linear-cost subtree-transfer distance on weighted
s5 s5 phylogenies with performance ratio 2. In Ref. 25, the
authors give an approximation algorithm for the nni dis-
tance on weighted phylogenies with performance ratio of
O(log n). It is open whether the linear-cost subtree-transfer
one subtree transfer
problem is NP-hard for weighted phylogenies. However, it
has been shown that the problem is NP-hard for weighted
trees with non-uniquely labeled leaves (26).

s1 s2 s3 s4 s1 s2 s3 s4
COMPUTING DISTANCES BETWEEN GENOMES
Figure 3. An example of a subtree-transfer operation on a tree.
The definition and study of appropriate measures of dis-
tance between pairs of species is of great importance in

Rotation Distance v u
rotation at u
Rotation distance is a variant of the nni distance for rooted, u v
ordered trees. A rotation is an operation that changes one
rooted binary tree into another with the same size. Figure 4 C rotation at v A
shows the general rotation rule. An easy approximation
algorithm for computing distance with a performance ratio A B B C
of 2 is given in Ref. 36. However, it is not known if comput-
ing this distance is NP-hard or not. Figure 4. Left and right rotation operations on a rooted binary
tree.
4 BIOLOGY COMPUTING

computational biology. Such measures of distance can be 19 25 1 12 3 7 5 19 2 4


1 12 5 3
used, for example, in phylogeny construction and in tax-
onomic analysis.
As more and more molecular data become available,
methods for denning distances between species have
focused on such data. One of the most popular distance 135 12 3 5 4
12 1925 1 19 2 7
measures is the edit distance between homologous DNA or
amino acid sequences obtained from different species. Such Fission Fusion Translocation
measures focus on point mutations and define the distance Breaks a chromosome Joins two chromosomes Transfers genes between
between two sequences as the minimum number of these into two into one chromosomes
moves required to transform one sequence into another. It
Figure 6. Different mutation operations.
has been recognized that the edit-distance may underesti-
mate the distance between two sequences because of the
possibility that multiple point mutations occurring at the
same locus will be accounted for simply as one mutation.
The problem is that the probability of a point mutation is Ferretti et al. (44) to be the number of such moves required
not low enough to rule out this possibility. to transform the genome of one species to the genome of the
Recently, there has been a spate of new definitions of other.
distance that try to treat rarer, macro-level mutations as Notice that any recombination of two chromosomes is
the basic moves. For example, if we know the order of genes permissible in this model. By contrast, the set of legal
on a chromosome for two different species, we can define the translocations (in the translocation distance model) is
reversal distance between the two species to be the number severely limited by the order of genes on the chromosomes
of reversals of portions of the chromosome to transform the being translocated. Furthermore, the transformation of the
gene order in one species to the gene order in the other first genome into the second genome does not have to
species. The question of finding the reversal distance was produce a specified order of genes in the second genome.
first explored in the computer science context by Kece- The underlying justification of this model is that the
cioglu and Sankoff and by Bafna and Pevzner, and there exchange of genes between chromosomes is a much rarer
has been significant progress made on this question by event than the movement of genes within a chromosome
Bafna, Hannenhalli, Kececioglu, Pevzner, Ravi, Sankoff, and, hence, a distance function should measure the mini-
and others (3741). Other moves besides reversals have mum number of such exchanges needed.
been considered as well. Breaking off a portion of the In Ref. 45, the authors prove various results on the
chromosome and inserting it elsewhere in the chromosome syntenic distance. For example, they show that computing
is referred to as a transposition, and one can similarly the syntenic distance exactly is NP-hard, there is a simple
define the transposition distance (42). Similarly, allowing polynomial time approximation algorithm for the synteny
two chromosomes (viewed as strings of genes) to exchange problem with performance ratio 2, and computing the
suffixes (or sometimes a suffix with a prefix) is known as a syntenic distance is fixed parameter tractable.
translocation, and this move can also be used to define an The median problem develops in connection with the
appropriate measure of distance between two species for phylogenetic inference problem (44) and denned as follows:
which much of the genome has been mapped (43). Given three genomes G1 , G2 , and G3 , we are required to
Ferretti et al. (44) proposed a distance measure that is at construct a genome G such that the median distance aG
P 3
an even higher level of abstraction. Here, even the order of i1 DG; Gi is minimized (where D is the syntenic dis-
genes on a particular chromosome of a species is ignored or tance). Without any additional constraints, this problem is
presumed to be unknown. It is assumed that the genome of trivial, as we can take G to be empty (and then aG 0). In
a species is given as a collection of sets. Each set in the the context of syntenic distance, any one of the following
collection corresponds to a set of genes that are on one three constraints seem relevant: (cl) G must contain all
chromosome and different sets in the collection correspond genes present in all the three given genomes, (c2) G must
to different chromosomes (see Fig. 5). In this scenario, one contain all genes present in at least two of the three given
can define a move to be an exchange of genes between two genomes, and (c3) G must contain all genes present in at
chromosomes, the fission of one chromosome into two, or least one of the three given genomes. Then, computing the
the fusion of two chromosomes into one (see Fig. 6). The median genome is NP-hard with any one of the three
syntenic distance between two species has been defined by constraints (cl), (c2), or (c3). Moreover, one can approximate
the median problem in polynomial time [under any one of
the constraints (cl), (c2), or (c3)] with a constant perfor-
mance ratio. See Ref. 45 for details.
2 8 1 3 7 5 4 6 9 10 11 12
MULTIPLE SEQUENCE ALIGNMENT PROBLEMS
gene chromosome
Multiple sequence alignment is the most critical cutting-
Figure 5. A genome with 12 genes and 3 chromosomes. edge tool for sequence analysis. It can help extracting, find-
ing, and representing biologically important commonalities
BIOLOGY COMPUTING 5

from a set of sequences. These commonalities could repre- produced by the center star algorithm is at most twice
sent some highly conserved subregions, common functions, the optimum (47,53). Some improved results were reported
or common structures. Multiple sequence alignment is also in Refs. 54 and 59.
very useful in inferring the evolutionary history of a family Another score called consensus score is denned as fol-
of sequences (4649). lows:
A multiple alignmentA of k  2 sequences is obtained
as follows: Spaces are inserted into each sequence so that X
k
the resulting sequences s0i i 1; 2; . . . k have the same ms01 i; s02 i; . . . s0k i min ms0j i; s
s2S
length l, and the sequences are arranged in k rows of l j1
columns each. P
The value of the multiple alignment A is denned as where is the set of characters that form the sequences.
Here, we reconstruct a character for each column and thus
X
l obtain a string. This string is called a Steiner consensus
ms01 i; s02 i; . . . s0k i string and can be used as a representative for the set of
i1 given sequences. The problem is called the Steiner consen-
sus string problem.
where s0l i denotes the ith letter in the resulting sequence The Steiner consensus string problem was proved to be
s0l , and ms01 i; s02 i; . . . s0k i denotes the score of the ith NP-complete (60) and MAX SNP-hard (58). In the proof of
column. The multiple sequence alignment problem is to MAX SNP-hardness, it is assumed that there is a wild
construct a multiple alignment minimizing its value. card, and thus the triangle inequality does not hold.
Many versions have been proposed based on different Combining with the results in Ref. 61, it shows that there
objective functions. We will discuss some of the important is no polynomial time approximation scheme for this pro-
ones. blem. Interestingly, the same center star algorithm also has
performance ratio 2 for this problem (47).
SP-Alignment and Steiner Consensus String
For SP-score (Sum-of-the-Pairs), the score of each column Diagonal Band Alignment. The restriction of aligning
is denned as: sequences within a constant diagonal band is often used
in practical situations. Methods under this assumption
X have been extensively studied too. Sankoff and Kruskal
ms01 i; s02 i; . . . s0k i ms0j i; s0l i
discussed the problem under the rubric of cutting corners
1 j < lk
in Ref. 62. Alignment within a band is used in the final stage
of the well-known FASTA program for rapid searching of
where ms0j i; s0l i is the score of the two opposing letters
protein and DNA sequence databases (63,64). Pearson
s0j i and s0l i. The SP-score is sensible and has previously
showed that alignment within a band gives very good
been studied extensively.
results for many protein superfamilies (65).
SP-alignment problem is to find an alignment with the
Other references on the subject can be found in Refs. 51
smallest SP-score. It is first studied in Ref. 50 and subse-
and 6669. Spouge gives a survey on this topic in Ref. 70.
quently used in Refs. 5154. SP-alignment problem can be
Let S fs1 ; s2 ; . . . ; sk g be a set of k sequences, each of
solved exactly by using dynamic programming. However, if
length m (for simplicity), and M an alignment of the k
there are k sequences and the length of sequences is n, it
sequences. Let the length of the alignment M be M. M is
takes O(nk) time. Thus, it works for only small numbers of
called a c-diagonal alignment if for any p  m and
sequences. Some techniques to reduce the time and space
1 < i < j < k, if the pth letter of si is in column q of M and
have been developed in Refs. 51 and 5557. With these
the pth letter of sj is in column r of M, then jq  rj  c. In
techniques, it is possible to optimally align up to six
other words, the inserted spaces are evenly distributed
sequences of 200 characters in practice.
among all sequences and the ith position of a sequence is
In fact, SP-alignment problem is NP-hard (58). Thus, it
about at most c positions away from the ith. position of any
is impossible to have a polynomial time algorithm for this
other sequence.
problem. In the proof of NP-hardness, it is assumed that
In Ref. 71 Li, et al. presented polynomial time approx-
some pairs of identical characters have a non-zero score. An
imation schemes of c-diagonal alignment for both SP-score
interesting open problem is if each pair of two identical
and consensus score.
characters is scored 0.
The first approximation algorithm was given by Gusfield
Tree Alignment
(53). He introduced the center star algorithm. The center
star algorithm is very simple and efficient. It selects a Tree score: To define the score ms01 i; s02 i; . . . s0k i of
sequence (called center P string) sc in the set of k given the ith. column, an evolutionary (or phylogenetic) tree
k
sequences S such that i1 distsc ; si is minimized. It T V; E with k leaves is assumed, each leaf j cor-
then optimally aligns the sequences in S  fsc g to sc and responding to a sequence Sj. (Here, V and E denote the
gets k  1 pairwise alignments. These k  1 pairwise sets of nodes and edges in T, respectively.) Let k 1; K
alignments lead to a multiple alignment for the k sequences 2; . . . ; k m be the internal nodes of T. For each inter-
in S. If the score scheme for pairs of characters satisfies the nal node j,Preconstruct a letter (possibly a space) s0j i
triangle inequality, the cost of the multiple alignment such that p;q 2 E ms0p i; s0q i is minimized. The score
6 BIOLOGY COMPUTING

ms01 i; s02 i; . . . s0k i of the ith column is thus denned as Ref. 77. The algorithm also must do local optimizations for
depth-t subtrees. For a fixed t, the performance ratio of the
X  
ms01 i; s02 i; . . . s0k i m s0p i; s0q i new PTAS is 1 2t  t22t and the running time
p;q 2 E is Ominf2t ; kgkdMdeg; t  1; n, where d is the depth of
the tree. Presently, there are efficient programs (72) to do
This measure has been discussed in Refs. 14,48,51,59 local optimizations for three sequences (t 2). In fact, we
and 72. Multiple sequence alignment with tree score is can expect to obtain optimal solutions for five sequences
often referred to as tree alignment in the literature. (t 3) of length 200 in practice as there is such a program
Note that a tree alignment induces a set of reconstructed (55,56) for SP-score and similar techniques can be used to
sequences, each corresponding to an internal node. Thus, it attack the tree alignment problem. Therefore, solutions
is convenient to reformulate a tree alignment as follows: with costs at most 1.583 times the optimum can be obtained
Given a set X of k sequences and an evolutionary tree T with in practice for strings of length 200.
k leaves, where each leaf is associated with a given For tree alignment, the given tree is typically a binary
sequence, reconstruct a sequence for each internal node tree. Recently, Wang et al. (79) designed a PTAS for binary
to minimize the cost of T. Here, the cost of T is the sum of the trees. The new approximation scheme adopts a more clever
edit distance of each pair of (given or reconstructed) partitioning strategy and has a better time efficiency for
sequences associated with an edge. Observe that once a the same performance ratio. For any fixed r, where r
sequence for each internal node has been reconstructed, a 2t1 1  q and 0  q  2t2  1, the new PTAS runs in
multiple alignment can be obtained by optimally aligning time O(kdnr) and achieves an approximation ratio of
2t1
the pair of sequences associated with each edge of the tree. 1 2t2 t1q. Here, the parameter r represents the size
Moreover, the tree score of this induced multiple alignment of local optimization. In particular, when r 2t1 1, its
2
equals the cost of T. In this sense, the two formulations of approximation ratio is simply 1 t1 .
tree alignment are equivalent.
Sankoff gave an exact algorithm for tree alignment that Generalized Tree Alignment
runs in O(nk), where n is the length of the sequences and k is In practice, we often face a more difficult problem called
the number of given sequences. Tree alignment was proved generalized tree alignment. Suppose we are given a set of
to be NP-hard (58). sequences. The problem is to construct an evolutionary
Therefore, it is unlikely to have a polynomial time algo- tree as well as a set of sequences (called reconstructed
rithm for tree alignment. Some heuristic algorithms have sequences) such that each leaf of the evolutionary tree is
also been considered in the past. Altschul and Lipman tried assigned a given sequence, each internal node of the tree
to cut down the computation volume required by dynamic is assigned a reconstructed sequence, and the cost of the
programming (51). Sankoff, et al. gave an iterative tree is minimized over all possible evolutionary trees and
improvement method to speed up the computation reconstructed sequences.
(48,72). Waterman and Perlwitz devised a heuristic method Intuitively, the problem is harder than tree alignment
when the sequences are related by a binary tree (73). Hein because the tree is not given and we have to compute the
proposed a heuristic method based on the concept of a tree structure as well as the sequences assigned to internal
sequence graph (74,75). Ravi and Kececioglu designed an nodes. In fact, the problem was proved to be MAX SNP-hard
approximation algorithm with performance ratio deg1 deg1 (58) and a simplified proof was given in Ref. 80. It implies
when the given tree is a regular deg-ary tree (i.e., each that it is impossible to have a PTAS for generalized tree
internal node has exactly deg children) (76). alignment unless PNP (61), which confirms the observa-
The first approximation algorithm with a guaranteed tion from an approximation point of view.
performance ratio was devised by Wang, et al. (77). A ratio- Generalized tree alignment problem is, in fact, the
2 algorithm was given. The algorithm was then extended Steiner tree problem in sequence spaces. One might use
to a polynomial time approximation scheme (PTAS) (i.e., the approximation algorithms with guaranteed perfor-
the performance ratio could arbitrarily approach 1). The mance ratios (81) to graph Steiner trees, which, however,
PTAS requires computing exact solutions for depth-t sub- may lead to a tree structure where a given sequence is an
trees. For a fixed t, the performance ratio was proved to internal node. Sometimes, it is unacceptable. Schwikowski
be 1 3tt1
, and the running time was proved to be Ok= and Vingron give a method that combines clustering algo-
degt deg 2 M2; t  1; n, where deg is the degree of the rithms and Heins sequence graph method (82). The pro-
given tree, n is the length of the sequences, and Mdeg; t  duced solutions contain biologically reasonable trees and
1; n is the time needed to optimally align a tree with keep the guaranteed performance ratio.
t1
degt1 1 leaves, which is upper-bounded by Ondeg 1 .
Based on the analysis, to obtain a performance ratio less Fixed Topology History/Alignment with Recombination
than 2, exact solutions for depth-4 subtrees must be com-
puted, and thus optimally aligning nine sequences at a time Multigene families, viruses, and alleles from within popu-
is required, which is impractical even for sequences of lations experience recombinations (23,24,83,84). When
length 100. recombination happens, the ancestral material on the pre-
An improved version was given in Ref. 78. They proposed sent sequence s1 is located on two sequences s2 and s3. s2
a new PTAS for the case where the given tree is a regular and s3 can be cut at k locations (break points) into k 1
deg-ary tree. The algorithm is much faster than the one in pieces, where s2 s2;1 s2 . . . s2;l1 and s3 s3;1 s3;2 . . . s3;l1 .
^ s3;2
s1 can be represented as s2;1 ^ s2;3
^ . . . s2;i
^ s3;i1
^ . . ., where
BIOLOGY COMPUTING 7

subsequences s2;i^ and s3;i1


^ differ from the corresponding an approximation point of view, FTHR and FTAR are much
s2;i and s3;i1 by insertion, deletion, and substitution of harder than tree alignment. It is shown that FTHR and
letters. k, the number of times s1 switches between s2 FTAR cannot be approximated within any constant perfor-
and s3, is called the number of crossovers. The cost of the mance ratio unless P NP (86).
recombination is A more restricted case, where each internal node has at
most one recombination child and there are at most six
^ dists2;2 ; s2;2
dists1;1 ; s1;1 ^ ; . . . dists1;i ; s1;i
^ dist
parents of recombination nodes in any path from the root to
a leaf in the given topology, is also considered. It is shown
 s2;i1 ; s2;i1
^    kx that the restricted version for both FTHR and FTAR is
MAX-SNP-hard. That is, there is no polynomial time
^ is the edit distance between the two
where dists2;i1 ; s2;i1 approximation scheme unless P NP (86).
sequences s2;i1 and s2;i1 ^ , k is the number of crossovers, The above hardness results are disappointing. However,
and x the crossover penalty. The recombination distance to recombination occurs infrequently. So, it is interesting
produce s1 from s2 and s3 is the cost of a recombination that to study some restricted cases. A merge node of recombi-
has the smallest cost among all possible recombinations. nation node v is the lowest common ancestor of vs two
We use r dists1 ; s2 ; s3 to denote the recombination dis- parents. The two different paths from a recombination
tance. For more details, see Refs. 83 and 85. node to its merge node are called merge paths. We then
When recombination occurs, the given topology is no study the case, where
longer a binary tree. Instead, some nodes, called recombi-
nation nodes, in the given topology may have two parents  (C1) each internal node has at most one recombination
(23,24). In a more general case, as described in Ref. 83, the child and
topology may have more than one root. The set of roots is  (C2) any two merge paths for different recombination
called a pro-toset. The edges incident to recombination nodes do not share any common node.
nodes are called recombination edges [see Fig. 7 (b)]. A
node/edge is normal if it is not a recombination node/edge. Using a method similar to the lifting method for tree
The cost of a pair of recombination edges is the recom- alignment, one can get a ratio-3 approximation algorithm
bination distance to produce the sequence on the recombi- for both FTHR and HTAR when the given topology satisfies
nation node from the two sequences on its parents. The cost (C1) and (C2). The ratio-3 algorithm can be extended to a
of other normal edges is the edit distance between two PTAS for FTAR with bounded number of crossovers (see
sequences. A topology is fully labeled if every node in the Ref. 86).
topology is labeled. For a fully labeled topology, the cost of Remarks: Hein might be the first to study the method to
the topology is the total cost of edges in the topology. Each reconstruct the history of sequences subject to recombina-
node in the topology with degree greater than 1 is an tion (23,24). Hein observed that the evolution of a sequence
internal node. Each leaf/terminal (degree 1 node) in the with k recombinations could be described by k recombina-
topology is labeled with a given sequence. The goal here is to tion points and k 1 trees describing the evolution of the
construct a sequence for each internal node such that the k 1 intervals, where two neighboring trees were either
cost of the topology is minimized. We call this problem fixed identical or differed by one subtree transfer operation (23
topology history with recombination (FTHB). 26,35). A heuristic method was proposed to find the most
Obviously, this problem is a generalization of tree align- parsimonious history of the sequences in terms of mutation
ment. The difference is that the given topology is no longer a and recombination operations.
binary tree. Instead, there are some recombination nodes Another strike was given by Kececioglu and Gusfield
that have two parents instead of one. Moreover, there may (83). They introduced two new problems, recombination
be more than one root in the topology. distance and bottleneck recombination history. They tried
A different version called fixed topology alignment to include higher-order evolutionary events such as block
with recombination (FTAR) is also dicsussed (86). From insertions and deletions (68) as well as tandem repeats
(87,88).

CONCLUSION

recombination In this article, we have discussed some important topics in


the field of computational biology such as the phylogenetic
construction and comparison methods, syntenic distance
between genomes, and the multiple sequence alignment
crossover problems. Given the vast majority of topics in computa-
(a) (b) tional biology, these discussed topics constitute only a part
of them. Some of the important topics that were not covered
Figure 7. (a) Recombination operation, (b) The topology. The in this articls are as follows:
dark edges are recombination edges. The circled node is a recom-
bination node.  protein structure prediction,
 DNA physical mapping problems,
8 BIOLOGY COMPUTING

 metabolic modeling, and Mable (eds.), Molecular Systematics, (2nd ed.) Sunderland,
MA: Sinauer Associates, 1996, pp. 515543.
 string/database search problems.
7. M. R. Garey and D. S. Johnson, Computers and Intractability:
A Guide to the Theory of NF-completeness, New York: W. H.
We hope that this survey article will inspire the readers
Freeman, 1979.
for further study and research of these and other related
8. D. Hochbaum, Approximation Algorithms for NP-hard Pro-
topics.
blems, Boston, MA: PWS Publishers, 1996.
Papers on compuational molecular biology have started
9. C. H. Papadimitriou, Computational Complexity, Reading,
to appear in many different books, journals, and confer-
MA: Addison-Wesley, 1994.
ences. Below, we list some sources that could serve as
10. J. Felsenstein, Phylogenies from molecular sequences: infer-
excellent starting points for various problems that occur
ences and reliability, Annu. Rev. Genet., 22: 521565, 1988.
in computational biology:
11. D. L. Swofford, G. J. Olsen, P. J. Waddell, and D. M. Hillis,
Phylogenetic inference, in D. M. Hillis, C. Moritz, and B. K.
Books: See Refs. 49,53,62 and 8992.
Mable (eds.), Molecular Systematics, (2nd ed.), Sunderland,
Journals: Computer Applications in the Biosciences MA: Sinauer Associates, 1996, pp. 407514.
(recently renamed as Bioinformatics), Journal of 12. A. W. F. Edwards and L. L. Cavalli-Sforza, The reconstruc-
Computational Biology, Bulletin of Mathematical tion of evolution, Ann. Hum. Genet, 27: 105, 1964, (also in
Biology, Journal of Theoretical Biology, and so on. Heredity 18: 553, 1964).
Conferences: Annual Symposium on Combinatorial 13. W. M. Fitch, Toward denning the course of evolution: minimum
Pattern Matching (CPM), Pacific Symposium on Bio- change for a specified tree topology, Syst Zool., 20: 406416,
computing (PSB), Annual International Conference 1971.
on Computational Molecular Biology (RECOMB), 14. D. Sankoff, Minimal mutation trees of sequences, SIAM J.
Annual Conference on Intelligent Systems in Mole- Appl. Math., 28: 3542, 1975.
cular Biology (ISMB), and so on. 15. L. L. Cavalli-Sforza and A. W. F. Edwards, Phylogenetic ana-
Web pages: http://www.cs.Washington.edu/ lysis: models and estimation procedures, Evolution, 32: 550
570, 1967, (also published in Am. J. Hum. Genet., 19: 233257,
education/courses/590bi, http://www.cse.
1967.)
ucsc.edu/research/compbio, http://www.
16. W. M. Fitch and E. Margoliash, Construction of phylogenetic
cs.jhu.edu/salzberg/cs439. html, and so on.
trees, Science, 155: 279284, 1967.
17. N. Saitou and M. Nei, The neighbor-joining method: a new
method for reconstructing phylogenetic trees, Mol. Biol. Evol.,
ACKNOWLEDGMENTS 4: 406425, 1987.
18. D. Barry and J. A. Hartigan, Statistical analysis of hominoid
We thank Prof. Tao Jiang for bringing the authors together. molecular evolution, Stat. Sci., 2: 191210, 1987.
We also thank Dr. Todd Wareham for carefully reading 19. J. Felsenstein, Evolutionary trees for DNA sequences: a max-
the draft and giving valuable suggestions. Bhaskar imum likelihood approach, J. Mol. Evol., 17: 368376, 1981.
DasGuptas work was partly supported by NSF grants 20. M. Kuhner and J. Felsenstein, A simulation comparison of
CCR-0296041, CCR-0206795, and CCR-0208749. Lusheng phylogeny algorithms under equal and unequal evolutionary
Wangs work was fully supported by the Research Grants rates. Mol. Biol. Evol. 11 (3): 459468, 1994.
Council of the Hong Kong Special Administrative Region, 21. D. F. Robinson, Comparison of labeled trees with valency three,
China (Project No. CityU 1070/02E). J. Combinatorial Theory, Series B, 11: 105119, 1971.
22. G. W. Moore, M. Goodman, and J. Barnabas, An iterative
approach from the standpoint of the additive hypothesis to
BIBLIOGRAPHY the dendrogram problem posed by molecular data sets, J.
Theoret. Biol., 38: 423457, 1973.
1. M. S. Waterman, Sequence alignments, in M. S. Waterman 23. J. Hein, Reconstructing evolution of sequences subject to
(ed.), Mathematical Methods for DNA Sequences, Boca Raton, recombination using parsimony, Math. Biosci., 98: 185200,
FL: CRC Press, 1989, pp. 5392. 1990.
2. W. Miller, S. Scbwartz, and R. C. Hardison, A point of contact 24. J. Hein, A heuristic method to reconstruct the history of
between computer science and molecular biology, IEEE Com- sequences subject to recombination, J. Mol. Evol., 36: 396
putat. Sci. Eng., 6978, 1994. 405, 1993.
3. K. A. Frenkel, The human genome project and informatics, 25. B. DasGupta, X. He, T. Jiang, M. Li, J. Tromp, and L. Zhang, On
Commun. ACM, 34, (11): 4151, 1991. distances between phylogenetic trees, Proc. 8th Annual ACM-
4. E. S. Lander, R. Langridge, and D. M. Saccocio, Mapping and SIAM Symposium on Discrete Algorithms, 1997, pp. 427436.
interpreting biological information, Commun. ACM, 34, (11): 26. B. DasGupta, X. He, T. Jiang, M. Li, and J. Tromp, On the
3339, 1991. linear-cost subtree-transfer distance, to appear in the special
5. V. A. Funk, and D. R. Brooks, Phylogenetic Systematics as the issue in Algorithmica on computational biology, 1998.
Basis of Comparative Biology, Washington, DC: Smithsonian 27. K. Culik II and D. Wood, A note on some tree similarity
Institution Press, 1990. measures, Information Proc. Lett., 15: 3942, 1982.
6. D. M. Hillis, B. K. Mable, and C. Moritz, Applications of 28. M. Li, J. Tromp, and L. X. Zhang, On the nearest neighbor
molecular systematics, in D. M. Hillis, C. Moritz, and B. K. interchange distance between evolutionary trees, J. Theoret.
Biol., 182: 463467, 1996.
BIOLOGY COMPUTING 9

29. D. Sleator, R. Tarjan, W. Thurston, Short encodings of evolving and J. Kruskal (eds.), Time Warps, String Edits, and Macro-
structures, SIAM J. Discr. Math., 5: 428450, 1992. molecules: The Theory and Practice of Sequence Comparison,
30. M. S. Waterman and T. F. Smith, On the similarity of dendro- Reading, MA: Addison Wesley, 1983, pp. 253264.
grams, J. Theoret. Biol., 73: 789800, 1978. 49. M. S. Waterman, Introduction to Computational Biology:
31. W. H. E. Day, Properties of the nearest neighbor interchange Maps, Sequences, and Genomes, London: Chapman and
metric for trees of small size, J. Theoretical Biol., 101: 275288, Hall, 1995.
1983. 50. H. Carrillo and D. Lipman, The multiple sequence alignment
32. J. P. Jarvis, J. K. Luedeman, and D. R. Shier, Counterexamples problem in biology, SIAM J. Appl. Math., 48: 10731082, 1988.
in measuring the distance between binary trees, Math. Social 51. S. Altschul, and D. Lipman, Trees, stars, and multiple
Sci., 4: 271274, 1983. sequence alignment, SIAM J. Applied Math., 49: 197209,
33. J. P. Jarvis, J. K. Luedeman, and D. R. Shier, Comments on 1989.
computing the similarity of binary trees, J. Theoret. Biol., 100: 52. D. Baconn, and W. Anderson, Multiple sequence alignment, J.
427433, 1983. Molec. Biol., 191: 153161, 1986.
34. M. Krivanek, Computing the nearest neighbor interchange 53. D. Gusfield, Efficient methods for multiple sequence alignment
metric for unlabeled binary trees is NP-complete, J. Classifica- with guaranteed error bounds, Bull. Math. Biol., 55: 141154,
tion, 3: 5560, 1986. 1993.
35. J. Hein, T. Jiang, L. Wang, and K. Zhang, On the complexity of 54. P. Pevzner, Multiple alignment, communication cost, and
comparing evolutionary trees, Discrete Appl. Math., 7: 153 graph matching, SIAM J. Appl. Math., 56 (6): 17631779, 1992.
169, 1996. 55. S. Gupta, J. Kececioglu, and A. Schaffer, Making the shortest-
36. D. Sleator, R. Tarjan, and W. Thurston, Rotation distance, paths approach to sum-of-pairs multiple sequence alignment
triangulations, and hyperbolic geometry, J. Amer. Math. Soc., more space efficient in practice, Proc. 6th Symposium on
1: 647681, 1988. Combinatorial Pattern Matching, Springer LNCS937, 1995,
37. V. Bafna and P. Pevzner, Genome rearrangements and sorting pp. 128143.
by reversals, 34th IEEE Symp. on Foundations of Computer 56. J. Lipman, S. F. Altschul, and J. D. Kececioglu, A tool for
Science, 1993, pp. 148157. multiple sequence alignment, Proc. Nat. Acid Sci. U.S.A.,
38. V. Bafna, and P. Pevzner, Sorting by reversals: genome rear- 86: 44124415, 1989.
rangements in plant organelles and evolutionary history of X 57. G. D. Schuler, S. F. Altschul, and D. J. Lipman, A workbench
chromosome, Mol. Biol. Evol, 12: 239246, 1995. for multiple alignment construction and analysis, in Proteins:
39. S. Hannenhalli and P. Pevzner, Transforming Cabbage into Structure, function and Genetics, in press.
Turnip (polynomial algorithm for sorting signed permutations 58. L. Wang and T. Jiang, On the complexity of multiple sequence
by reversals), Proc. of 27th Ann. ACM Symp. on Theory of alignment, J. Computat. Biol., 1: 337348, 1994.
Computing, 1995, pp. 178189. 59. V. Bafna, E. Lawer, and P. Pevzner, Approximate methods for
40. J. Kececioglu and D. Sankoff, Exact and approximation algo- multiple sequence alignment, Proc. 5th Symp. on Combinator-
rithms for the inversion distance between two permutations, ial Pattern Matching. Springer LNCS 807, 1994, pp. 4353.
Proc. of 4th Ann. Symp. on Combinatorial Pattern Matching, 60. E. Sweedyk, and T. Warnow, The tree alignment problem is
Lecture Notes in Comp. Sci., 684: 87105, 1993. NP-complete, Manuscript.
41. J. Kececioglu, and D. Sankoff, Efficient bounds for oriented 61. S. Arora, C. Lund, R. Motwani, M. Sudan, and M. Szegedy, On
chromosome inversion distance, Proc. of 5th Ann. Symp. on the intractability of approximation problems, 33rd IEEE Sym-
Combinatorial Pattern Matching, Lecture Notes in Comp. Sci., posium on Foundations of Computer Science, 1992, pp. 1423.
807: 307325, 1994.
62. D. Sankoff and J. Kruskal (eds.). Time Warps, String Edits, and
42. V. Bafna, and P. Pevzner, Sorting by transpositions, Proc. of Macro-Molecules: The Theory and Practice of Sequence Com-
6th Ann. ACM-SIAM Symp. on Discrete Algorithms, 1995, parison, Reading, MA: Addison Wesley, 1983.
pp. 614623.
63. W. R. Pearson and D. Lipman, Improved tools for biological
43. J. Kececioglu and R. Ravi, Of mice and men: evolutionary sequence comparison, Proc. Natl. Acad. Sci. USA, 85: 2444
distances between genomes under translocation, Proc. of 6th 2448, 1988.
Ann. ACM-SIAM Symp. on Discrete Algorithms, 1995, pp. 604
64. W. R. Pearson, Rapid and sensitive comparison with FASTP
613.
and FASTA, Methods Enzymol., 183: 6398, 1990.
44. V. Ferretti, J. H. Nadeau, and D. Sankoff, Original synteny, in
65. W. R. Pearson, Searching protein sequence libraries: compar-
Proc. of 7th Ann. Symp. on Combinatorial Pattern Matching,
ison of the sensitivity and selectivity of the Smith-Waterman
1996, pp. 159167.
and FASTA algorithms, Genomics, 11: 635650, 1991.
45. B. DasGupta, T. Jiang, S. Kannan, M. Li, and E. Sweedyk, On
66. K. Chao, W. R. Pearson, and W. Miller, Aligning two sequences
the complexity and approximation of syntenic distance, 1st
within a specified diagonal band, CABIOS, 8: 481487, 1992.
Annual International Conference On Computational Molecu-
lar Biology, 1997, pp. 99108 (journal version to appear in 67. J. W. Fickett, Fast optimal alignment, Nucleic Acids Res., 12:
Discrete and Applied Mathematics). 175180, 1984.
46. S. C. Chan, A. K. C. Wong, and D. K. T. Chiu, A survey of 68. Z. Galil and R. Ciancarlo, Speeding up dynamic programming
multiple sequence comparison methods, Bull. Math. Biol., 54, with applications to molecular biology, Theoret. Comp. Sci., 64:
(4): 563598, 1992. 107118, 1989.
47. D. Gusfield, Algorithms on Strings, Trees, and Sequences: 69. E. Ukkonen, Algorithms for approximate string matching,
Computer Science and Computational Biology, Cambridge, Inform. Control, 64: 100118, 1985.
UK: Cambridge University Press, 1997. 70. J. L. Spouge, Fast optimal alignment, CABIOS, 7: 17, 1991.
48. D. Sankoff, and R. Cedergren, Simultaneous comparisons
of three or more sequences related by a tree, in D. Sankoff,
10 BIOLOGY COMPUTING

71. M. Li, B. Ma, and L. Wang, Near optimal multiple alignment 83. J. Kececioglu and D. Gusfield, Reconstructing a history of
within a band in polynomial time, 32th ACM Symp. on Theory recombinations from a set of sequences, 5th Annual ACM-
of Computing, 2000, pp. 425434. SIAM Symposium on Discrete Algorithms, pp. 471480, 1994.
72. D. Sankoff, R. J. Cedergren, and G. Lapalme, Frequency of 84. F. W. Stahl, Genetic Recombination, New York: Scientific
insertion-deletion, transversion, and transition in the evolu- American, 1987, pp. 90101.
tion of 5S ribosomal RNA, J. Mol. Evol., 7: 133149, 1976. 85. J. D. Watson, N. H. Hopkins, J. W. Roberts, J. A. Steitz, and A.
73. M. S. Waterman and M. D. Perlwitz, Line geometries for M. Weiner, Molecular Biology of the Gene, 4th ed.Menlo Park,
sequence comparisons, Bull. Math. Biol, 46: 567577, 1984. CA: Benjamin-Cummings, 1987.
74. J. Hein, A tree reconstruction method that is economical in the 86. B. Ma, L. Wang, and M. Li, Fixed topology alignment with
number of pairwise comparisons used, Mol. Biol. Evol., 6, (6): recombination, CPM98, to appear.
669684, 1989. 87. S. Kannan and E. W. Myers, An algorithm for locating non-
75. J. Hein, A new method that simultaneously aligns and recon- overlapping regions of maximum alignment score, 3rd
structs ancestral sequences for any number of homologous Annual Symposium on Combinatorial Pattern Matching,
sequences, when the phylogeny is given, Mol. Biol. Evol., 6: 1993, pp. 7486.
649668, 1989. 88. G. M. Landau and J. P. Schmidt, An algorithm for approximate
76. R. Ravi and J. Kececioglu, Approximation algorithms for tandem repeats, 3rd Annual Symposium on Combinatorial
multiple sequence alignment under a fixed evolutionary Pattern Matching, 1993, pp. 120133.
tree, 5th Annual Symposium on Combinatorial Pattern Match- 89. J. Collado-Vides, B. Magasanik, and T. F. Smith (eds.), Inte-
ing, 1995, pp. 330339. grative Approaches to Molecular Biology, Cambridge, MA: MIT
77. L. Wang, T. Jiang, and E. L. Lawler, Approximation algorithms Press, 1996.
for tree alignment with a given phylogeny, Algorithmica, 16: 90. L. Hunter (ed.), Artificial Intelligence in Molecular Biology,
302315, 1996. Cambridge, MA: MIT Press, 1993.
78. L. Wang and D. Gusfield, Improved approximation algorithms 91. J. Meidanis and J. C. Setubal, Introduction to Computational
for tree alignment, J. Algorithms, 25: 255173, 1997. Molecular Biology, Boston, MA: PWS Publishing Company,
79. L. Wang, T. Jiang, and D. Gusfield, A more efficient approx- 1997.
imation scheme for tree alignment, SIAM J. Comput., 30: 283 92. G. A. Stephens, String Searching Algorithms, Singapore:
299, 2000. World Scientific Publishers, 1994.
80. H. T. Wareham, A simplified proof of the NP-hardness and
MAX SNP-hardness of multiplel sequence tree alignment, J.
Computat. Biol., 2: 509514, 1995. BHASKAR DASGUPTA
81. A. Z. Zelikovsky, The 11/6 approximation algorithm for the University of Illinois at Chicago
Steiner problem on networks, Algorithmica, 9: 463470, 1993. Chicago, Illinois
82. B. Schwikowski and M. Vingron, The deferred path heuristic LUSHENG WANG
for the generalized tree alignment problem, 1st Annual Inter- City University of Hong Kong
national Conference On Computational Molecular Biology, Kowloon, Hong Kong
1997, pp. 257266.
C
COMPUTATIONAL INTELLIGENCE probability of reproduction that is proportional to its fit-
ness. In a Darwinian system, natural selection controls
INTRODUCTION evolution (10). Consider, for example, a collection of arti-
ficial life forms with behaviors resembling ants. Fitness will
Several interpretations of the notion of computational be quantified relative to the total number of pieces of food
intelligence (CI) exist (19). Computationally intelligent found and eaten (partially eaten food is counted). Repro-
systems have been characterized by Bezdek (1,2) relative to duction consists in selecting the fittest individual x and the
adaptivity, fault-tolerance, speed, and error rates. In its weakest individual y in a population and replacing y with a
original conception, many technologies were identified to copy of x. After reproduction, a population will then have
constitute the backbone of computational intelligence, two copies of the fittest individual. A crossover operation
namely, neural networks (10,11), genetic algorithms consists in exchanging genetic coding (bit values of one or
(10,11), fuzzy sets and fuzzy systems (10,11), evolutionary more genes) in two different chromosomes. The steps in a
programming (10,11), and artificial life (12). More recently, crossover operation are as follows: (1) Randomly select a
rough set theory (1333) has been considered in the context location (also called the interstitial location) between two
of computationally intelligent systems (3, 611, 1316, 29 bits in a chromosome string to form two fragments, (2)
31, 34, 35) that naturally led to a generalization in the select two parents (chromosomes to be crossed), and (3)
context of granular computing (32). Overall, CI can be interchange the chromosome fragments. Because of the
regarded as a field of intelligent system design and analysis complexity of traits represented by a gene, substrings of
that dwells on a well-defined and clearly manifested bits in a chromosome are used to represent a trait (41). The
synergy of genetic, granular, and neural computing. A evolution of a population resulting from the application of
detailed introduction to the different facets of such a genetic operations results in changing the fitness of indi-
synergy along with a discussion of various realizations of vidual population members. A principal goal of GAs is to
such synergistic links between CI technologies is given in derive a population with optimal fitness.
Refs. 3, 4, 10, 11, 19, 36, and 37. The pioneering works of Holland (38) and Fogel et al.
(42) gave birth to the new paradigm of population-driven
computing (evolutionary computation) resulting in struc-
GENETIC ALGORITHMS
tural and parametric optimization. Evolutionary program-
ming was introduced by Fogel in the 1960s (43). The
Genetic algorithms were proposed by Holland as a search
evolution of competing algorithms defines evolutionary
mechanism in artificially adaptive populations (38). A
programming. Each algorithm operates on a sequence of
genetic algorithm (GA) is a problem-solving method that
symbols to produce an output symbol that is likely to
simulates Darwinian evolutionary processes and naturally
maximize an algorithms performance relative to a well-
occurring genetic operations on chromosomes (39). In nat-
defined payoff function. Evolutionary programming is the
ure, a chromosome is a thread-like linear strand of DNA
precursor of genetic programming (39). In genetic program-
and associated proteins in the nucleus of animal and plant
ming, large populations of computer programs are bred
cells. A chromosome carries genes and serves as a vehicle in
genetically. One may also refer to biologically inspired
transmitting hereditary information. A gene is a hereditary
optimization, such as particle swarm optimization (PSO),
unit that occupies a specific location on a chromosome and
ant colonies, and others.
that determines a particular trait in an organism. Genes
can undergo mutation (alteration or structural change). A
consequence of the mutation of genes is the creation of a FUZZY SETS AND SYSTEMS
new trait in an organism. In genetic algorithms, the traits of
artificial life forms are stored in bit strings that mimic Fuzzy systems (models) are immediate constructs that
chromosome strings found in nature. The traits of indivi- result from a description of real-world systems (say, social,
duals in a population are represented by a set of evolving economic, ecological, engineering, or biological) in terms of
chromosomes. A GA transforms a set of chromosomes to information granules, fuzzy sets, and the relationships
obtain the next generation of an evolving population. Such between them (44). The concept of a fuzzy set introduced
transformations are the result of applying operations, such by Zadeh in 1965 (45,46) becomes of paramount relevance
as reproduction based on survival of the fittest, and genetic when formalizing a notion of partial membership of an
operations, such as sexual recombination (also called cross- element. Fuzzy sets are distinguished from the fundamen-
over) and mutation. tal notion of a set (also called a crisp set) by the fact that
Each artificial chromosome has an associated fitness, their boundaries are formed by elements whose degree of
which is measured with a fitness function. The simplest belonging is allowed to assume numeric values in the
form of fitness function is known as raw fitness, which interval [0, 1]. Let us recall that the characteristic function
is some form of performance score (e.g., number of pieces for a set X returns a Boolean value {0, 1} indicating whether
of food found, amount of energy consumed, or number of an element x is in X or is excluded from it. A fuzzy set is
other life forms found). Each chromosome is assigned a noncrisp inasmuch as the characteristic function for a fuzzy
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 COMPUTATIONAL INTELLIGENCE

~ and x be a universe
set returns a value in [0, 1]. Let U, X, A, have been used successfully in system modeling, pattern
of objects, subset of U, fuzzy set in U, and an individual recognition, robotics, and process control applications
object x in X, respectively. For a set X, m A~ : X ! 0; 1 is a (10,11,35,57,58).
function that determines the degree of membership of an
object x in X. A fuzzy set A~ is then defined to be a set of
ROUGH SETS
ordered pairs, where A~ fx; m A ~ xjx 2 Xg. The counter-
parts of intersection and union (crisp sets) are the t-norm
Zdzislaw Pawlak (1316,59,60) introduced rough sets
and s-norm operators in fuzzy set theory. For the intersec-
in 1981 (24,25). The rough set approach to approximation
tion of fuzzy sets, the min operator was suggested by Zadeh
and classification was then elaborated and refined in
(29), and it belongs to a class of intersection operators (min,
Refs. 1321, 2431, 33, 61, and 62. Rough set theory offers
product, and bold intersection) known as triangular or t-
an approach to CI by drawing attention to the importance
norms. A t-norm is a mapping t : 0; 12 ! 0; 1. The s-norm
of set approximation in knowledge discovery and informa-
(t-conorm) is a mapping s : 0; 12 ! 0; 1 (also a triangular
tion granulation (32).
conorm) that is commonly used for the union of fuzzy sets.
In particular, rough set methods provide a means of
The properties of triangular norms are presented in
approximating a set by other sets (17,18). For computa-
Ref. 84.
tional reasons, a syntactic representation of knowledge is
Fuzzy sets exploit imprecision in conventional systems
provided by rough sets in the form of data tables. In general,
in an attempt to make system complexity manageable. It
an information system (IS) is represented by a pair (U, F),
has been observed that fuzzy set theory offers a new model
where U is a nonempty set of objects and F is a nonempty,
of vagueness (1316). Many examples of fuzzy systems are
countable set of probe functions that are a source of mea-
given in Pedrycz (47) and in Kruse et al. (48)
surements associated with object features (63). For exam-
ple, a feature of an image may be color with probe functions
NEURAL COMPUTING that measure tristimulus values received from three pri-
mary color sensors, brightness (luminous flux), hue (domi-
Neural networks offer a powerful and distributed comput- nant wavelength in a mixture of light waves), and
ing architecture equipped with significant learning abil- saturation (amount of white light mixed with a hue).
ities (predominantly as far as parametric learning is Each f 2 F maps an object to some value in a set Vf. In
concerned). They help represent highly nonlinear and effect, we have f : U ! V f for every f 2 F.
multivariable relationships between system variables. The notions of equivalence and equivalence class are
Starting from the pioneering research of McCulloch and fundamental in rough sets theory. A binary relation R  X 
Pitts (49), Rosenblatt (50) as well as Minsky and Pappert X is an equivalence relation if it is reflexive, symmetric, and
(51) neural networks have undergone a significant meta- transitive. A relation R is reflexive if every object x 2 X has
morphosis and have become an important reservoir of relation R to itself. That is, we can assert x R x. The sym-
various learning methods (52) as well as an extension of metric property holds for relation R if xRy implies yRx for
conventional techniques in statistical pattern recognition every x, y 2 X. The relation R is transitive for every x, y, z 2 X;
(53). Artificial neural networks (ANNs) were introduced to then xRy and yRz imply xRz. The equivalence class of an
model features of the human nervous system (49). An object x 2 X consists of all objects y 2 X so that xRy. For each
artificial neural network is a collection of highly inter- set of functions B  F; an equivalence relation  B
connected processing elements called neurons. In ANNs, a fx; x0 j 8 a 2 B: ax ax0 g (indiscernibility relation)is
neuron is a threshold device, which aggregates (sums) associat with it. If x; x0 2  B, we say that objects x and x
its weighted inputs and applies an activation function to are indiscernible from each other relative to attributes from
each aggregation to produce a response. The summing B. This concept is fundamental to rough sets. The notation
part of a neuron in an ANN is called an adaptive linear [x]B is a commonly used shorthand that denotes the equiva-
combiner (ALC) in Refs. 54 and 55. For instance, a McCul- lence class defined by x relative to a feature set B. In effect,
lochPitts neuron ni is a binary threshold unit with an xB fy 2 Ujx  B yg. Furthermore, Ul  B denotes the
Pn that computes a weighted sum net, where net
ALC partition of U defined by relation  B. Equivalence classes
j0 w j x j  A weight wi associated with xi represents the xB represent B-granules of an elementary portion of knowl-
strength of connection of the input to a neuron. Input x0 edge that we can perceive as relative to available data. Such
represents a bias, which can be thought of as an input with a view of knowledge has led to the study of concept approx-
weight 1. The response of a neuron can be computed in imation (64) and pattern extraction (65). For X  U, the set X
several ways. For example, the response of neuron ni can can be approximated only from information contained in B
be computed using sgn(net), where sgn(net) 1 for net > 0, by constructing a B-lower approximation B  X
sgn(net) 0 for net 0, and sgn(net) 1, if net < 0. A [ fxB jxB 2 Ul  B and xB  Xg and a B-upper approxima-
neuron comes with adaptive capabilities that could be tion B  X [ fxB jxB 2 Ul  B and xB \ X 6 ? g, respec-
exploited fully assuming that an effective procedure is tively. In other words, a lower approximation B  X of a
introduced to modify the strengths of connections so that a set X is a collection of objects that can be classified with full
correct response is obtained for a given input. A good certainty as members of X using the knowledge represented
discussion of learning algorithms for various forms of by B. By contrast, an upper approximation B  X of a set X is
neural networks can be found in Freeman and Skapura a collection of objects representing both certain knowledge
(56) and in Bishop (53). Various forms of neural networks (i.e., classes entirely contained in X) and possible uncertain
COMPUTATIONAL INTELLIGENCE 3

knowledge (i.e., possible classes partially contained in X). In BIBLIOGRAPHY


the case in which B  X is a proper subset of B  X, then the
objects in X cannot be classified with certainty and the set X 1. J. C. Bezdek, On the relationship between neural networks,
is rough. It has recently been observed by Pawlak (1316) pattern recognition and intelligence, Int. J. Approx. Reasoning,
that this is exactly the idea of vagueness proposed by Frege 6: 85107. 1992.
(65). That is, the vagueness of an approximation of a set 2. J. C. Bezdek, What is computational intelligence? in J. Zurada,
stems from its borderline region. R. Marks, C. Robinson (eds.), Computational Intelligence:
The size of the difference between lower and upper Imitating Life, Piscataway, NJ: IEEE Press, 1994,
approximations of a set (i.e., boundary region) provides a pp. 112.
basis for the roughness of an approximation, which is 3. W. Pedrycz, Computational Intelligence: An Introduction, Boca
important because vagueness is allocated to some regions Raton, FL: CRC Press, 1998.
of what is known as the universe of discourse (space) 4. W. Pedrycz, J. F. Peters (eds.), Computational intelligence in
rather than to the whole space as encountered in fuzzy software engineering, Advances in Fuzzy SystemsApplica-
tions and Theory, vol. 16. Singapore: World Scientific, 1998.
sets. The study of what it means to be a part of provides a
basis for what is known as mereology, which was intro- 5. D. Poole, A. Mackworth, R. Goebel, Computational Intelli-
gence: A Logical Approach. Oxford: Oxford University Press,
duced by Lesniewski in 1927 (66). More recently, the
1998.
study of what it means to be a part of to a degree has
6. N. Cercone, A. Skowron, N. Zhong (eds.), Rough sets, fuzzy sets,
led to a calculus of granules (23, 6770). In effect, gran-
data mining, and granular-soft computing special issue, Com-
ular computing allows us to quantify uncertainty and to put. Intelli.: An Internat. J., 17(3): 399603, 2001.
take advantage of uncertainty rather than to discard it
7. A. Skowron, S. K. Pal (eds.), Rough sets, pattern recognition
blindly. and data mining special issue, Pattern Recog. Let., 24(6):
Approximation spaces introduced by Pawlak (24) 829933, 2003.
which were elaborated by Refs. 1719, 22, 23, 29, 30, 8. A. Skowron, Toward intelligent systems: calculi of information
61, 62, 70, 71, and applied in Refs. 68, 35, 64, 72, and granules, in: T. Terano, T. Nishida, A. Namatane, S. Tsumoto,
73 serve as a formal counterpart of our perception ability Y. Ohsawa, T. Washio (eds.), New Frontiers in Artificial Intel-
or observation (61,62), and they provide a framework for ligence, Lecture Notes in Artificial Intelligence 2253. Berlin:
perceptual reasoning at the level of classes (63). In its Springer-Verlag, 2001, pp. 2839.
simplest form, an approximation space is denoted by 9. J. F. Peters, A. Skowron, J. Stepaniuk, S. Ramanna, Towards
U; F;  B, where U is a nonempty set of objects (called an ontology of approximate reason, Fundamenta Informaticae,
a universe of discourse), F is a set of functions represent- 51(1-2): 157173, 2002.
ing object features, B  F; and  B is an equivalence 10. IEEE World Congress on Computational Intelligence, Vancou-
relation that defines a partition of U. Equivalence classes ver B.C., Canada, 2006.
belonging to a partition Ul  B are called elementary sets 11. M. H. Hamaza, (ed.), Proceedings of the IASTED Int. Conf. on
(information granules). Given an approximation space Computational Intelligence. Calgary, AB, Canada, 2005.
S U; F;  B, a subset X of U is definable if it can be 12. R. Marks, Intelligence: computational versus artificial, IEEE
represented as the union of some elementary sets. Not all Trans. on Neural Networks, 4: 737739, 1993.
subsets of U are definable in space S(61,62). Given a 13. Z. Pawlak and A. Skowron, Rudiments of rough sets, Informa-
nondefinable subset X in U, our observation restricted tion Sciences, 177(1): 327, 2007.
by  B causes X to be perceived relative to classes in the 14. J. F. Peters and A. Skowron, Zdzislaw Pawlak life and work
partition Ul  B. An upper approximation B X is the set of (19262006), Information Sciences, 177(1): 12, 2007.
all classes in Ul  B that have elements in common with X, 15. Z. Pawlak and A. Skowron, Rough sets: Some extensions,
and the lower approximation B  X is the set of all classes Information Sciences, 177(1): 2840, 2007.
in Ul  B that are proper subsets of X. 16. Z. Pawlak, and A. Skowron, Rough sets and Boolean reasoning,
Fuzzy set theory and rough set theory taken singly and Information Sciences, 177(1): 4173, 2007.
in combination pave the way for a variety of approximate 17. Z. Pawlak, Rough sets, Int. J. of Informat. Comput. Sciences,
reasoning systems and applications representing a synergy 11(5): 341356, 1982.
of technologies from computational intelligence. This 18. Z. Pawlak, Rough Sets. Theoretical Aspects of Reasoning about
synergy can be found, for example, in recent work on the Data, Dordrecht: Kluwer Academic Publishers, 1991.
relation among fuzzy sets and rough sets (1316,35,37, 19. L. Polkowski, Rough sets, Mathematical Foundations.
74,75), rough mereology (19,37,6769), rough control Advances in Soft Computing, Heidelberg: Physica-Verlag, 2002.
(76,77), fuzzyroughevolutionary control (36), machine 20. Z. Pawlak, Some issues on rough sets, Transactions on Rough
learning (18,57,72,78), fuzzy neurocomputing (3), rough Sets I, LNCS 3100, 2004, pp. 158.
neurocomputing (35), data mining (6,7,1316,31), diagnos- 21. Z. Pawlak, A treatise on rough sets, Transactions on Rough
tic systems (18,79), multiagent systems (8,9,80), real-time Sets IV, LNCS 3700, 2005, pp. 117.
decision making (34,81), robotics and unmanned vehicles 22. A. Skowron, and J. Stepaniuk, Generalized approximation
(57,82,83), intelligent systems (8,13,29,57), signal analysis spaces, in: T. Y. Lin, A. M. Wildberger, (eds.), Soft Computing,
(84), perception and classification of perceptual objects (29, San Diego, CA: Simulation Councils, 1995, pp. 1821.
30,6163), software engineering (4,8487), a dominance- 23. A. Skowron, J. Stepaniuk, J. F. Peters and R. Swiniarski,
based rough set approach to multicriteria decision making Calculi of approximation spaces, Fundamenta Informaticae,
and data mining (31), VPRS (33), and shadowed sets (75). 72(13): 363378, 2006.
4 COMPUTATIONAL INTELLIGENCE

24. Z. Pawlak, Classification of Objects by Means of Attributes. 45. L. A. Zadeh, Fuzzy sets, Information and Control, 8: 338353,
Institute for Computer Science, Polish Academy of Sciences, 1965.
Report 429: 1981. 46. L. A. Zadeh, Outline of a new approach to the analysis of
25. Z. Pawlak, Rough Sets. Institute for Computer Science, Polish complex systems and decision processes, IEEE Trans. on Sys-
Academy of Sciences, Report 431: 1981. tems, Man, and Cybernetics, 2: 2844, 1973.
26. Z. Pawlak, Rough classification, Int. J. of ManMachine 47. W. Pedrycz, Fuzzy Control and Fuzzy Systems, New York: John
Studies, 20(5): 127134, 1984. Wiley & Sons, Inc., 1993.
27. Z. Pawlak, Rough sets and intelligent data analysis, Informa- 48. R. Kruse, J. Gebhardt and F. Klawonn, Foundations of Fuzzy
tion Sciences: An Internat, J., 147(14): 112, 2002. Systems. New Yark: John Wiley & Sons, Inc., 1994.
28. Z. Pawlak, Rough sets, decision algorithms and Bayes theorem, 49. W. S. McCulloch and W. Pitts, A logical calculus of ideas
European J. Operat. Res., 136: 181189, 2002. immanent in nervous activity, Bulletin of Mathemat. Biophy.,
29. M. Kryszkiewicz, J. F. Peters, H. Rybinski and A. Skowron 5: 115133, 1943.
(eds.), rough sets and intelligent systems paradigms, Lecture 50. F. Rosenblatt, Principles of Neurodynamics: Perceptrons and
Notes in Artificial Intelligence 4585 Berlin: Springer, the Theory of Brain Mechanisms, Washington, D.C: Spartan
2007. Press, 1961.
30. J. F. Peters and A. Skowron, Transactions on Rough Sets, 51. M. Minsky and S. Pappert, Perceptrons: An Introduction to
volumes I-VII, Berlin: Springer, 20042007. Avaiilable: Computational Geometry, Cambridge: MIT Press, 1969.
http://www.springer.com/west/home/computer/ 52. E. Fiesler and R. Beale (eds.), Handbook on Neural Computa-
lncs?SGWID=41646996270. tion. oxford: Institute of Physics Publishing and Oxford Uni-
31. R. Slowinski, S. Greco and B. Matarazzo, Dominance-based versity Press, 1997.
rough set approach to reasoning about ordinal data, in: M. 53. C. M. Bishop, Neural Networks for Pattern Recognition.
Kryszkiewicz, J. F. Peters, H. Rybinski and A. Skowron, eds., Oxford: Oxford University Press, 1995.
Rough Sets and Intelligent Systems Paradigms, Lecture Notes
54. B. Widrow and M. E. Hoff, Adaptive switching circuits, Proc.
in Artificial Intelligence, Berlin: Springer, 2007, pp. 511.
IRE WESCON Convention Record, Part 4, 1960, pp. 96104.
32. L. Zadeh, Granular computing and rough set theory, in: M.
55. B. Widrow, Generalization and information storage in net-
Kryszkiewicz, J. F. Peters, H. Rybinski, and A. Skowron, (eds.),
works of adaline neurons. in M. C. Yovits, G. T. Jacobi,
Rough Sets and Intelligent Systems Paradigms, Lecture Notes
and G. D. Goldstein (eds.), Self-Organizing Systems. Washing-
in Artificial Intelligence, Berlin: Springer, 2007, pp. 14.
ton, D.C.: Spartan, 1962.
33. W. Ziarko, Variable precision rough set model, J. Comp. Sys.
56. J. A. Freeman and D. M. Skapura, Neural Networks: Algo-
Sciences, 46(1): 3959, 1993.
rithms, Applications and Programming Techniques. Reading,
34. J. F. Peters, Time and clock information systems: concepts MA: Addison-Wesley, 1991.
and roughly fuzzy petri net models, in J. Kacprzyk (ed.),
57. D. Lockery, and J. F. Peters, Robotic target tracking with
Knowledge Discovery and Rough Sets. Berlin: Physica Ver-
approximation space-based feedback during reinforcement
lag, 1998.
learning, Springer best paper award, Proceedings of Eleventh
35. S. K. Pal, L. Polkowski and A. Skowron (eds.), Rough-Neuro International Conference on Rough Sets, Fuzzy Sets, Data
Computing: Techniques for Computing with Words. Berlin: Mining and Granular Computing (RSFDGrC 2007), Joint
Springer-Verlag, 2003. Rough Set Symposium (JRS 2007), Lecture Notes in Artificial
36. T. Y. Lin, Fuzzy controllers: An integrated approach based on Intelligence, vol. 4482, 2007, pp. 483490.
fuzzy logic, rough sets, and evolutionary computing, in T. Y. Lin 58. J. F. Peters, L. Han, and S. Ramanna, Rough neural computing
and N. Cercone (eds.), Rough Sets and Data Mining: Analysis in signal analysis, Computat. Intelli., 1(3): 493513, 2001.
for Imprecise Data. Norwell, MA: Kluwer Academic Publishers,
59. E. Orlowska, J. F. Peters, G. Rozenberg and A. Skowron, New
1997, pp. 109122.
Frontiers in Scientific Discovery. Commemorating the Life and
37. L. Polkowski, Rough mereology as a link between rough and Work of Zdzislaw Pawlak, Amsterdam: IOS Press, 2007.
fuzzy set theories: a survey, Trans. Rough Sets II, LNCS 3135,
60. J. F. Peters, and A. Skowron, Zdzislaw Pawlak: Life and Work.
2004, pp. 253277.
19262006, Transactions on Rough Sets, V, LNCS 4100, Berlin:
38. J. H. Holland, Adaptation in Natural and Artificial Systems, Springer, 2006, pp. 124.
Ann Arbor, MI: University of Michigan Press, 1975.
61. E. Orlowska, Semantics of Vague Concepts. Applications of
39. J. R. Koza, Genetic Programming: On the Progamming of Rough Sets. Institute for Computer Science, Polish Academy of
Computers by Means of Natural Selection. Cambridge, MA: Sciences, Report 469: 1981.
MIT Press, 1993.
62. E. Orlowska, Semantics of vague concepts, in: G. Dorn, and P.
40. C. Darwin, On the Origin of Species by Means of Natural Weingartner, (eds.), Foundations of Logic and Linguistics,
Selection, or the Preservation of Favoured Races in the Struggle Problems and Solutions, London: Plenum Press, 1985, pp.
for Life. London: John Murray, 1959. 465482.
41. L. Chambers, Practical Handbook of Genetic Algorithms, vol. 1. 63. J. F. Peters, Classification of perceptual objects by means of
Boca Raton, FL: CRC Press, 1995. features, Internat. J. Informat. Technol. Intell. Comput., 2007.
42. L. J. Fogel, A. J. Owens, and M. J. Walsh, Artificial Intelligence in Press.
through Simulated Evolution, Chichester: J. Wiley, 1966. 64. H. S. Bazan, Nguyen, A. Skowron, and M. Szczuka, A view on
43. L. J. Fogel, On the organization of the intellect. Ph. D. Dis- rough set concept approximation, in: G. Wang, Q. Liu, Y. Y.
sentation, Los Angeles: University of California Los Angeles, Yao, A. Skowron, Proceedings of the Ninth International Con-
1964. ference on Rough Sets, Fuzzy Sets, Data Mining and Granular
44. R. R. Yager and D. P. Filev, Essentials of Fuzzy Modeling and Computing RSFDGrC2003), Chongqing, China, 2003, pp.
Control. New York, John Wiley & Sons, Inc., 1994. 181188.
COMPUTATIONAL INTELLIGENCE 5

65. J. Bazan, H. S. Nguyen, J. F. Peters, A. Skowron and M. 81. A. Skowron and Z. Suraj, A parallel algorithm for real-time
Szczuka, Rough set approach to pattern extraction from clas- decision making: a rough set approach. J. Intelligent Systems,
sifiers, Proceedings of the Workshop on Rough Sets in Knowl- 7: 528, 1996.
edge Discovery and Soft Computing at ETAPS2003, pp. 23. 82. M. S. Szczuka and N. H. Son, Analysis of image sequences for
66. S. Lesniewski, O podstawach matematyki (in Polish), Przeglad unmanned aerial vehicles, in: M. Inuiguchi, S. Hirano, S.
Filozoficzny, 30: 164206, 31: 261291, 32: 60101, 33: 142 Tsumoto (eds.), Rough Set Theory and Granular Computing.
170, 1927. Berlin: Springer-Verlag, 2003, pp. 291300.
67. L. Polkowski and A. Skowron, Implementing fuzzy contain- 83. H. S. Son, A. Skowron, and M. Szczuka, Situation identification
ment via rough inclusions: Rough mereological approach to by unmanned aerial vehicle, Proc. of CS&P 2000, Informatik
distributed problem solving, Proc. Fifth IEEE Int. Conf. on Berichte, Humboldt-Universitat zu Berlin, 2000, pp. 177188.
Fuzzy Systems, vol. 2, New Orleans, 1996, pp. 11471153. 84. J. F. Peters and S. Ramanna, Towards a software change
68. L. Polkowski and A. Skowron, Rough mereology: A new para- classification system: A rough set approach, Software Quality
digm for approximate reasoning, Internat. J. Approx. Reason- J., 11(2): 87120, 2003.
ing, 15(4): 333365, 1996. 85. M. Reformat, W. Pedrycz, and N. J. Pizzi, Software quality
69. L. Polkowski and A. Skowron, Rough mereological calculi of analysis with the use of computational intelligence, Informat.
granules: A rough set approach to computation, Computat. Software Technol., 45: 405417, 2003.
Intelli. An Internat. J., 17(3): 472492, 2001. 86. J. F. Peters and S. Ramanna, A rough sets approach to asses-
70. A. Skowron, R. Swiniarski, and P. Synak, Approximation sing software quality: concepts and rough Petri net models, in:
spaces and information granulation, Trans. Rough Sets III, S. K. Pal and A. Skowron, (eds.), Rough-Fuzzy Hybridization:
LNCS 3400, 2005, pp. 175189. New Trends in Decision Making. Berlin: Springer-Verlag,
71. A. Skowron and J. Stepaniuk, Tolerance approximation spaces, 1999, pp. 349380.
Fundamenta Informaticae, 27(23): 245253. 1996. 87. W. Pedrycz, L. Han, J. F. Peters, S. Ramanna and R. Zhai,
72. J. F. Peters and C. Henry, Reinforcement learning with approx- Calibration of software quality: fuzzy neural and rough neural
imation spaces. Fundamenta Informaticae, 71(23): 323349, approaches. Neurocomputing, 36: 149170, 2001.
2006.
73. J. F. Peters, Rough ethology: towards a biologically-inspired
FURTHER READING
study of collective behavior in intelligent systems with approx-
imation spaces, Transactions on Rough Sets III, LNCS 3400,
2005, pp. 153174. G. Frege, Grundlagen der Arithmetik, 2, Verlag von Herman Pohle,
Jena, 1893.
74. W. Pedrycz, Shadowed sets: Representing and processing fuzzy
sets, IEEE Trans. on Systems, Man, and Cybernetics, Part B: W. Pedryz, Granular computing in knowledge intgration and
Cybernetics, 28: 103108, 1998. reuse, in: D. Zhang, T. M. Khoshgoftaar and M. -L. Shyu, (eds.),
IEEE Int. conf. on Information Reuse and Intergration. Las Vegas,
75. W. Pedrycz, Granular computing with shadowed sets, in: D.
NV: 2005, pp.1517.
Slezak, G. Wang, M. Szczuka, I. Duntsch, and Y. Yao (eds.),
Rough Sets, Fuzzy Sets, Data Mining, and Granular Comput- W. Pedrycz and G. Succi, Genetic granular classifiers in modeling
ing, LNAI 3641. Berlin: Springer, 2005, pp. 2331. software quality, J. Syste. Software, 76(3): 277285, 2005.
76. T. Munakata and Z. Pawlak, Rough control: Application of W. Pedrycz and M. Reformat, Genetically optimized logic models,
rough set theory to control, Proc. Fur. Congr. Fuzzy Intell. Fuzzy Sets & Systems, 150(2): 351371, 2005.
Techool. EUFIT96, 1996, pp. 209218, A. Skowron and J. F. Peters, Rough sets: trends and challenges, in
77. J. F. Peters, A. Skowron, Z. Suraj, An application of rough set G. Wang, Q., Liu, Y. Yao, and A. Skowron, (eds.), Proceedings 9th
methods to automatic concurrent control design, Fundamenta Int. Conf. on Rough Sets, Fuzzy Sets, Data Mining, and Granular
Informaticae, 43(14): 269290, 2000. Computing (RSFDGrC2003), LNAI 2639, Berlin: Springer-Verlag,
2003, pp. 2534.
78. J. Grzymala-Busse, S. Y. Sedelow, and W. A. Sedelow, Machine
learning & knowledge acquisition, rough sets, and the English J.F. Peters, Near sets: General theory about nearness of objects,
semantic code, in T. Y. Lin and N. Cercone (eds.), Rough Sets Appl. Math. Sci., 1(53): 26092629, 2007.
and Data Mining: Analysis for Imprecise Data. Norwell, MA: J.F. Peters, A. Skowron, and J. Stepanuik, Nearness of objects:
Kluwer Academic Publishers, 1997, pp. 91108. Extension of approximation space model, Fundamenta Informati-
79. R. Hashemi, B. Pearce, R. Arani, W. Hinson, and M. Paule, A cae, 79: 497512, 2007.
fusion of rough sets, modified rough sets, and genetic algo-
rithms for hybrid diagnostic systems, in T. Y. Lin, N. Cercone
(eds.), Rough Sets and Data Mining: Analysis for Imprecise JAMES F. PETERS
Data. Norwell, MA: Kluwer Academic Publishers, 1997, pp. University of Manitoba
149176. Winnipeg, Manitoba, Canada
80. R. Ras, Resolving queries through cooperation in multi-agent WITOLD PEDRYCZ
systems, in T. Y. Lin, N. Cercone (eds.), Rough Sets and Data University of Alberta
Mining: Analysis for Imprecise Data. Norwell, MA: Kluwer Edmonton, Alberta, Canada
Academic Publishers, 1997, pp. 239258.
C
COMPUTING ACCREDITATION: EVOLUTION primary body responsible for specialized program-level
AND TRENDS ASSOCIATED WITH U.S. accreditation in computing. AACSB, on the other hand,
ACCREDITING AGENCIES provides specialized accreditation at the unit level and
accredits business schools only. The latter implies that
INTRODUCTION all the programs offered within the unit are accredited,
including any computing programs that it may offer.
Accreditation is the primary quality assurance mechanism Both accrediting bodies have concentrated primarily on
for institutions and programs of higher education, which the accreditation of programs housed within U.S. institu-
helps a program prove that it is of a quality acceptable to tions. ABET has evaluated programs outside the United
constituents (1). Its original emergence in the United States for substantial equivalency, which means the
States was to ensure that federal student loans were program is comparable in educational outcomes with a
awarded in support of quality programs. Since then, the U.S.-accredited program. Substantial equivalency has
need for accreditation has strengthened considerably, as been phased out, and international accreditation pilot vis-
the need for quality assurance continues to be in the fore- its are now being employed for visits within the United
front of educational concerns. For example, a recent report States. In 2003, AACSB members approved the interna-
from the Commission on Higher Education (2) identified tional visits as relevant and applicable to all business
several problems with the education system in the United programs and have accredited several programs outside
States, a central one being the overall quality of higher of the United States.
education. The purpose of this article is to (1) review key concepts
The continuing interest in accreditation emerges of associated with accreditation, (2) discuss the state of com-
three factors. First, recognition exists that the public is puting accreditation by U.S. accrediting organizations and
not always in a position to judge quality, certainly not for how accreditation has evolved through recent years, (3)
programs or institutions for higher education. Therefore, a describe the criteria for accreditation put forth by the
need exists for an independently issued stamp of approval primary agencies that review computing programs, and
for programs and institutions of higher education. (4) review the typical process of accreditation. Although
Second, a lack of oversight exists in higher education. many concepts are applicable to any accreditation process,
Unlike the public school system, colleges and universities we refer to AACSB and ABET, Inc., which well are recog-
have considerable freedom when it comes to curriculum nized agencies that ensure quality in educational units that
design, hiring practices, and student expectations (1). This include technology or specialized computing programs.
lack of oversight requires a different mechanism to ensure ABETs Computer Accreditation Commission (CAC), as
quality, and higher education has opted to use accreditation the primary agency targeting computing programs, is
for this purpose. Finally, many organizations have recog- emphasized.
nized the importance of continuous quality improvement,
and higher education is no exception. As explained in this KEY CONCEPTS OF ACCREDITATION
article, recent developments in accreditation reflect this
trend. The objective of accreditation is not only to ensure For many years, accrediting organizations established
that educational institutions strive for excellence but also focused and specific guidelines to which a program had
to make certain that the process for ensuring high quality is to adhere to receive its stamp of approval. For instance, a
apposite. fixed number of credits, required in a specific area, had been
Two major types of accreditation are available in the the norm, and any program that wished to be granted
United States: (1) institutional accreditation (also called accreditation had to offer the required number of credits
regional accreditation in the United States) and (2) specia- in relevant areas. Quality was measured through a check-
lized accreditation. Specialized accreditation includes both list of attributes that were expected to be met by the various
program and school-specific accreditation, with the former inputs into learning processes, such as curriculum, teach-
applied to a unique program and the latter applied to an ing faculty, laboratory, and other facilities and resources.
administrative unit within an institution. In the United The definition of quality, implicit in this approach to accred-
States, institutional accreditation is generally the respon- itation, was that of meeting specific standards, to be fol-
sibility of a regional accreditation body such as the Southern lowed by every institution.
Association of Colleges and Schools (SACS) (www.sacs.org) Some proof exists that in computer science education,
or the Middle States Commission on Higher Education this approach is successful. In a study of accredited and
(www.msche.org). nonaccredited programs, Rozanski (3) reports that
This article concentrates on accreditation in the comput- although similarities and differences exist between these
ing discipline, focusing on the primary accreditation bodies programs, accredited programs have more potential to
accrediting U.S. programs, namely ABET, Inc. (www.abet. increase specific quality indicators.
org) and the Association to Advance Collegiate Schools of In the past it was straightforward to determine whether
Business (AACSB) (www.aacsb.edu). ABET, Inc. is the a program or institution met the accreditation criteria. A

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 COMPUTING ACCREDITATION: EVOLUTION AND TRENDS ASSOCIATED WITH U.S. ACCREDITING AGENCIES

major drawback of this approach was that it forced uni- recognize an accreditation agency before students enrolled
formity among institutions, preventing innovation and the in programs or institutions accredited by it can receive
consideration of specialized needs of a programs or schools federal funding.
constituencies. Other controversies centered on the Also, several professional organizations recognize
expense and time necessary to navigate successfully the accreditation agencies, chief among then are the Interna-
process. Smaller schools especially felt the guidelines tional Network for Quality Assurance Agencies in Higher
were targeted toward the larger institution (3). Education (INQAAHE) and the Council of Higher Educa-
Partly in response to concerns and to the danger of a lack tion Accreditation (CHEA) in the United States.
of innovation and, at least in the United States, partly
under pressure from the federal government, accreditation
agencies have moved to an outcomes-based approach, and ACCREDITATION AGENCIES RELEVANT TO COMPUTING
accreditation criteria now embody a definition of quality
more in line with that adopted by many quality improve- The AACSB
ment approaches, namely fitness for purpose (4). The The AACSB International accredits both undergraduate
basis for this approach is the premise that quality is and graduate education for business and accounting.
multifaceted. Founded in 1916, the first standards were adopted in
From the overall mission of an institution, units or 1919 (6). The AACSB accredits computing programs, typi-
programs are expected to establish long-term educational cally in Management Information Systems (MIS) or Infor-
objectives or goals, which describe achievements of gradu- mation Systems (IS), only as part of an evaluation of a
ates a few years after graduation, and to derive a set of business program, and it does not review any one specific
learning outcomes, which are statements defined as the program. By accrediting the unit that offers the various
aforementioned skills, knowledge, and behaviors that stu- business-related programs, it accredits indirectly any
dents are expected to acquire in their matriculation specific program offered within the unit. The one exception
through the program (5). Additionally, an institution or is accounting, which can receive a program-specific
program is expected to establish an assessment process to evaluation.
determine how well its graduates are achieving its objec- Both undergraduate and graduate programs must be
tives and outcomes and to establish a quality enhancement evaluated in making an accreditation decision. The AACSB
program that uses the data collected through this assess- puts forth standards for continuous quality improvement.
ment process to improve the program. Assessment pro- Important in the process is the publication of a mission
cesses foster program improvement by enabling visit statement, academic and financial considerations, and stu-
teams to make judgments about program effectiveness in dent support.
preparing graduates for entry into a field. AACSB International members approved mission-
Some differences exist between the various accredita- linked accreditation standards and the peer review process
tion agencies concerning the range of decisions that they in 1991, and in 2003, members approved a revised set of
can make. Clearly, each will have the option of whether to worldwide standards. The application of the AACSBs
accredit or not. However, different options are available accreditation standards is based on the stated mission of
should it be determined that a program or institution does each institution, and the standards thus provide enough
not meet all criteria. For example, some accreditation flexibility so that they can be applied to a wide variety of
agencies may reduce the period for which the program or business schools with different missions. This flexibility
institution is accredited. Alternatively, they may provision- offers the opportunity for many institutions that offer
ally accredit but make a final decision contingent on an online and other distance learning programs, as well as
interim report by the program or institution in which it the more conventional on-campus programs, to be accre-
makes clear how it has addressed any weaknesses or con- dited.
cerns identified during the team visit.
Programs continue to be reviewed cyclically. Again, ABET Inc.
differences exist between the various agencies relative to
the maximum length for which a program or institution can In the early 1980s, computer science accreditation was
be accredited. The ABET CAC maximally accredits a pro- initiated by groups from the Association for Computing
gram for 6 years, whereas the AACSB has operated on a 5- Machinery, Inc. (ACM) and the Institute of Electrical and
or 10-year cycle and is moving more toward the use of Electronics Engineers, Inc. Computer Society (IEEE-CS).
maintenance reports. Criteria for accreditation of computer science were estab-
Clearly, given the importance of the agency in the lished, and visits started in 1984. The initial visits were
accreditation process, the question develops concerning made by the Computer Science Accreditation Commission
the basis used to determine whether an organization can (CSAC), which in 1985 established the Computer Science
become an accreditation agency. The answer differs from Accreditation Board (CSAB) with the explicit purpose to
country to country. In many countries, accreditation agen- advance the development and practices of computing dis-
cies are governmental or quasi-governmental organiza- ciplines in the public interest through the enhancement of
tions established through an act or parliament. In the quality educational degree programs in computing (http://
United States, most accreditation agencies are essentially www.csab.org).
private organizations. However, under the Higher Educa- Eventually CSAC was incorporated into ABET with
tion Act, the U.S. Secretary of Education is required to CSAB remaining as the lead society within ABET for
COMPUTING ACCREDITATION: EVOLUTION AND TRENDS ASSOCIATED WITH U.S. ACCREDITING AGENCIES 3

accreditation of programs in computer science, information criteria focus on learning goals applied to each degree
systems, information technology, and software engineer- rather than an separate majors.
ing. It should be noted that the ABET Engineering  The requirements of direct measures measuring
Accreditation Commission (EAC) is responsible for soft- knowledge or skills that students will expected to
ware engineering accreditation visits. In this capacity, attain by the time they graduate.
the CSAB is responsible for recommending changes to  The development of learning goals for the overall
the accreditation criteria and for the recruitment, selection, degree program.
and training of program evaluators (PEVs). All other
 Involvement of faculty members to a far greater extent
accreditation activities, which were conducted previously
than under prior standards.
by the CSAC, are now conducted by the ABET CAC.
The CSAB is governed by a Board of Directors whose  The involvement of faculty to effect improvement.
members are appointed by the member societies. The cur-
rent member societies of the CSAB, which include the ACM
and the IEEE-CS, as well as its newest member, the Asso- The ABET Criteria
ciation for Information Systems (AIS), are the three largest
For several reasons, the ABET CAC revised significantly its
technical, educational, and scientific societies in the com-
accreditation criteria, a copy of which is available for
puter and computer-related fields.
inspection and comment from the ABET website (www.a-
Since the incorporation of the CSAC into the ABET,
bet.org). The ABET is currently piloting the proposed cri-
computing programs have been accredited by the ABET
teria, which are expected to be officially in place for the
CAC. The first programs accredited by the ABET CAC were
20082009 accreditation cycle.
in computer science (CS). In 2004, IS criteria were com-
Two significant revisions were made to the criteria.
pleted and partly funded by a National Science Foundation
First, following the lead of, in particular, the ABETs Engi-
grant. With the addition of IS criteria, the scope of comput-
neering Accreditation Commission (EAC), the criteria have
ing program accreditation was enlarged. This addition has
been reorganized into a set of general criteria that apply to
been followed by the addition of information technology
all programs in computing, and program-specific criteria
(IT), with criteria currently being piloted.
for programs in CS, IS, and IT. For any program to be
The CAC recognized a need to address the growing
accredited in one of these specific disciplines, it must meet
number of programs in emerging computing areas, which
both the general and the associated program-specific
has resulted in even more revision of accreditation criteria,
criteria. However, programs in emerging areas of
allowing such programs to apply for accreditation under
computing that are not strictly CS, IS or IT, such as
computing general criteria. Thus, these areas can benefit
programs in computer game design, or telecommunica-
from accreditation as well. We discuss these revisions in the
tions, will be accredited under the ABET CACs general
next section.
criteria. The revision thus broadened the range of
computing programs that can benefit from the ABET
THE AACSB AND ABET CAC ACCREDITATION CRITERIA CAC accreditation.
Second, although criteria have required programs to
The AACSB Criteria establish program educational objectives and outcomes,
and to set up an assessment and quality improvement
Although the AACSB does not accredit IS programs by
process, it was not emphasized sufficiently. The revised
themselves, the standards used support the concept of
criteria place greater emphasis on the need to set up a
continuous quality improvement and require the use of a
continuous improvement process.
systematic process for curriculum management. Normally,
The proposed CAC criteria for all computing programs
the curriculum management process will result in an
are divided into nine major categories (9):
undergraduate degree program that includes learning
experiences in such general knowledge and skill areas as
1. Students
follows (7):
2. Objectives
 Communication abilities 3. Outcomes
 Ethical understanding and reasoning abilities 4. Continuous improvement
 Analytic skills 5. Curriculum
 Use of information technology 6. Faculty
 Multicultural and diversity understanding 7. Facilities
 Reflective thinking skills 8. Support
9. Program criteria
Recent changes required of schools seeking accredita-
tion include (8): The criteria are outcomes based, and it is expected that
program outcomes are to be based on the needs of the
 Assessment activities are focused toward degree pro- programs constituencies. However, the criteria also will
grams rather than toward the majors within a degree specify a minimum set of skills and knowledge that stu-
program (AACSB, 2006). In other words, recent dents must achieve by graduation. The general criteria
4 COMPUTING ACCREDITATION: EVOLUTION AND TRENDS ASSOCIATED WITH U.S. ACCREDITING AGENCIES

specify that students must be able to demonstrate mini- Similarities and Differences
mally the following (9):
Many similarities exist between accreditation criteria for-
(a) An ability to apply knowledge of computing and mulated by the ABET CAC and the AACSB. Both organiza-
mathematics appropriate to the discipline tions stress the need for explicit learning outcomes for
graduating students and for explicitly documented assess-
(b) An ability to analyze a problem and to identify and
ment and quality improvement processes. Both organiza-
define the computing requirements appropriate to
tions also recognize the need for graduates to be well
its solution
rounded with qualities beyond skills needed to understand
(c) An ability to design, implement, and evaluate a specialized areas. Both accrediting bodies, as do many
computer-based system, process, component, or others, now require more than perceptions of constituents
program to meet desired needs to determine the level of program accomplishments. A need
(d) An ability to function effectively on teams to accom- for more direct assessment of knowledge and skills is
plish a common goal required.
(e) An understanding of professional, ethical, legal, It should also be noted that IS programs offered through
security, and social issues and responsibilities institutions accredited by the AACSB may also be accre-
(f) An ability to communicate effectively with a range of dited by the ABET. Indeed, a handful of ABET-accredited
audiences programs in IS are offered in AACSB-accredited business
schools. Programs that are accredited by both organiza-
(g) An ability to analyze the local and global impact of
tions offer constituencies the added benefit of knowing that
computing on individuals, organizations, and
IS is offered within a high-quality business program and
society
that it has a quality technology component integrated into
(h) Recognition of the need for, and an ability to engage the program.
in, continuing professional development Both agencies include in their accreditation criteria
(i) An ability to use current techniques, skills, and tools similar sets of attributes that they expect graduating stu-
necessary for computing practice dents to achieve. For instance, the AACSB includes a
management of curricula criterion that requires an under-
To this criteria, computer science adds the following: graduate degree program to include learning experiences
in specific general knowledge and skill areas as depicted
(j) An ability to apply mathematical foundations, algo- above.
rithmic principles, and computer science theory in The difference in level of detail between the minimal
the modeling and design of computer-based systems learning outcomes in the ABET CAC accreditation criteria
in a way that demonstrates comprehension of the and those in the AACSB accreditation can be explained by
tradeoffs involved in design choices the fact that the ABET CAC criteria are more focused. Both
(k) An ability to apply design and development prin- sets of evaluative rules promote continuous quality
ciples in the construction of software systems of improvement. Rather than being designed for a class of
varying complexity programs, as the AACSB criteria are, the ABET CAC
criteria focus on a single type of program. They can, there-
Information systems adds: fore, be more specific about the expectations of graduates,
especially in the technology area. Note, however, that both
the ABET CAC and the AASCB merely formulate a mini-
(j) An understanding of processes that support the mal set of guidelines. Specific programs, whether they
delivery and management of information systems apply for accreditation under the ABET CAC criteria or
within a specific application environment under the AACSB criteria, are expected to formulate their
own sets of objectives and learning goals (AACSB termi-
Whereas information technology adds: nology) or outcomes (ABET terminology). Moreover, both
insist that the specific objectives adopted be based on the
(j) An ability to use and apply current technical needs of their specific constituencies rather than on the
concepts and practices in the core information tech- whims of faculty or other involved parties.
nologies Although the ABET CAC is more specific in the speci-
(k) An ability to identify and analyze user needs and fication of minimal outcomes, the AACSB is generally more
take them into account in the selection, creation, specific when it comes to some other criteria. For example,
evaluation, and administration of computer-based the ABET CAC provides relatively general requirements
systems for faculty. The faculty responsible for the program must
have the required skills to deliver the program and to
(l) An ability to effectively integrate IT-based solutions
modify it, and some of them must also possess terminal
into the user environment
degrees. The AACSB, on the other hand, provides a set of
(m) An understanding of best practices and standards detailed guidelines that spell out the qualifications that
and their application faculty must have and what percentage of courses within a
(n) An ability to assist in the creation of an effective program must typically be covered by qualified faculty.
project plan. However, such differences should not detract from the
COMPUTING ACCREDITATION: EVOLUTION AND TRENDS ASSOCIATED WITH U.S. ACCREDITING AGENCIES 5

Determine whether
program is Send materials Prepare for visit
accreditable to review team

Make sure Team is assigned


administration is by accrediting Visit
on board agency

Apply for Prepare self- Receive report


accreditation study from agency
(REF)
Figure 1. The process of accreditation.

fact that in both cases, continuous quality improvement is accreditation process, and academic and industry volun-
of central importance. teers in the areas being evaluated create the criteria.
Associated tasks are summarized as (1) the identification
of team chairs, (2) the selection and identification of insti-
THE TYPICAL ACCREDITATION PROCESS
tutions to visit, (3) the assignment and training of team
chairs and a review team, and (4) the preparation of sample
Program or Unit Being Accredited
forms and reports (8).
The process of obtaining accreditation typically begins with
the institution or program completing a self-analysis to CONCLUSION
determine whether the program meets the demands of
the accrediting agency. Gorgone et al. (10) recommend Quality assurance in higher education has become an
that the accreditation process needs to begin at least a important issue for many. This article describes the pri-
year before the time of an anticipated visit. Given that mary quality assurance mechanism for higher education,
this step goes well, and the administration is supportive, namely accreditation. It has emphasized accreditation for
a Request for Evaluation (RFE) begins the formal process. programs in computing.
Figure 1 illustrates these and subsequent steps that include Programs or institutions that have voluntarily assented
the preparation of a self-study, collection of materials for a to the accreditation process and have achieved accredita-
review team, and the culminating accreditation visit. Most tion meet the quality that reasonable external stakeholders
accreditation agencies prefer a program or institution to can expect them to have. Moreover, the emphasis on
have completed its self-study before it applies for accredita- outcome-based criteria and the concomitant requirements
tion (and pays its fees). that programs or institutions put in place for accreditation
Once the request for accreditation has been received by provides constituents with the assurance of quality and
the accreditation agency, it appoints several program eva- continuous quality improvement. Although we do dispute
luators, typically in consultation with the program or insti- the fact that accreditation is the only way to assure quality
tution seeking accreditation. Program evaluators are peers, in higher education, we do believe that accreditation is an
often drawn from academia but not infrequently drawn from excellent method for doing so and that every program or
industry. The accreditation agency also appoints a team institution that has been accredited by a reputable accred-
chair, again typically in consultation with the program or itation agency is of high quality.
institution.
The remainder of the process is driven by the self-study.
The visiting team will visit the program or institution. The BIBLIOGRAPHY
primary purpose of the site visit is to verify the accuracy of
the self-study and to make observations regarding issues 1. D. K. Lidtke and G. J. Yaverbaum, Developing accreditation for
that are hard to gauge from a self-study, such as faculty and information system education, IT Pro, 5(1): 4145, 2003.
staff morale and the students view of the institution or 2. U.S. Department of Education, [Online] A test of leadership:
program. The team writes a report of its findings, which is charting the future of U.S. Higher Education. Washington, D.C.,
submitted to the accreditation agency. Generally, the insti- U. S. Department of Education, 2006. Available: http://www.ed.-
gov/about/bdscomm/list/hiedfuture/reports/pre-pub-report.pdf.
tution or program is allowed to make comments on early
drafts of the report, which may lead the visiting team to 3. E. P. Rozanski, Accreditation: does it enhance quality, ACM
SIGCSE Bulletin, Proceedings of the Twenty-fifth SIGCSE
revise its report. Eventually, the accreditation agency will
Symposium on Computer Science Education, 26(1): 145149,
make its decision. 1994.
4. D. Garvin, What does product quality really mean? Sloan
The Accrediting Agency Management Review, 26(1): 2543, 1984.
The accrediting agency has an enormous amount of 5. ABET, Inc., Accreditation policy and procedure manual, 2007.
responsibility. Typically a professional staff supports the Available: http://www.abet.org/forms.shtml.
6 COMPUTING ACCREDITATION: EVOLUTION AND TRENDS ASSOCIATED WITH U.S. ACCREDITING AGENCIES

6. AACSB International. Accreditation standards, 2007. Avail- J. Gorgone, D. Feinstein, and D. Lidtke, Accreditation criteria
able: http://www.aacsb.edu/accreditation/standards.asp. format IS/IT programs, Informa. Syst., 1: 166170, 2000.
7. AACSB International, Eligibility procedures and accreditation L. G. Jones and A. L. Price, Changes in computer science accred-
standards for business accreditation, 2007. Available: http:// itation, Communicat. ACM, 45: 99103, 2002.
www.aacsb.edu/accreditation/process/documents/AACSB_ W. King, J. Gorgone, and J. Henderson, Study feasibility of accred-
STANDARDS_Revised_Jan07.pdf. itation of programs in computer information science/systems/tech-
8. C. Pringle, and M. Mitri, Assessment practices in AACSB nology. NSF Grant, 19992001.
business schools, J. Educ. Business, 4(82), 202212, 2007. D. K. Lidtke, K. Martin, L. Saperstein, and D. Bonnette, Whats
9. ABET, Inc. Criteria for accrediting programs, 2007. Available: new with ABET/CSAB integration, Proceedings of the 31st
http://www.abet.org/forms.shtml#For_Computing_Programs_ SIGCSE Technical Symposium on Computer Science Education,
Only. ACM Press, 2001, p. 413.
10. J. Gorgone, D. Lidtke and D. Feinstein, Status of information K. You, Effective course-based learning outcome assessment for
systems accreditation, ACM SIGCSE Bulletin, 33(1): 421422, ABET accreditation of computing programs, Consortium for Com-
2001. puting Sciences in Colleges, South Central Conference, 2007.

FURTHER READING GAYLE J. YAVERBAUM


Penn State Harrisburg
D. Crouch and L. Schwartzman, Computer science accreditation, Harrisburg, Pennsylvania
the advantages of being different, ACM SIGCSE Bulletin, 35(1): HAN REICHGELT
3640, 2003. Southern Polytechnic State
J. Impagliazzo, J. Gorgone, Professional accreditation of informa- University
tion systems programs, Communications of the AIS, 9: 2002. Marietta, Georgia
C
CYBERNETICS in New York and sponsored by the Josiah Macy, Jr.
Foundation between 1946 and 1953. Ten meetings took
The word cybernetics was coined by Norbert Wiener (1) and place, chaired by Warren McCulloch (2) and with the
denotes a subject area that he indicated by the subtitle of participation of scientists from different specializations,
his 1948 book: control and communication in the animal especially bringing together biological and nonbiological
and the machine. It is derived from the Greek word for sciences. The first five meetings, which were not recorded
steersman, and the word governor comes from the same in print, had various titles that referred to circular
root. The word had been used in a related but more mechanisms and teleology. From the sixth meeting
restricted sense by Ampre in the nineteenth century to onward, the proceedings were edited by Heinz von Foer-
denote a science of government, but Wiener initially was ster and published. Wieners book had appeared in the
not aware of this. It also was used much earlier by Plato meantime, and in honor of his contribution, the reports on
with a similar meaning. the last five meetings were entitled: Cybernetics: Circular,
The linking of animal and machine implies that Causal and Feedback Mechanisms in Biological and
these have properties in common that allow description Social Systems.
in similar terms. At a simple level this view was not new, Relevant developments were not confined, however to
because nerves were identified as communication path- the, United States. In Britain, an informal group called
ways by Descartes in the seventeenth century; however, the Ratio Club was founded in 1949 and developed many of
later developments, especially during world war II and the basic ideas of cybernetics at first independently of the
including the emergence of analog and digital electronic American work, although links were formed later. It also
computers, allowed a deeper and more fruitful unified is noteworthy that the book by wiener was published in
approach. It also was intended that animal should be French before the appearance of the English version and
understood to include organizations and societies, and later gave rise to a Circle of Cybernetic Studies in Paris. The
work increasingly has focused on them. A revised definition Ratio Club was considered to have served its purpose,
that has been suggested is: communication and control and the transatlantic separation ended by a conference
within and between man, organizations and society. in the National Physical Laboratory in Teddington,
United Kingdom in 1958.
HISTORY OF CYBERNETICS
FEEDBACK AND SERVOMECHANISMS
The publication of the book by wiener gave name and status
to the subject area, but earlier origins can be traced. At the What has been termed circular causation is a central
time of the publication, the ideas also were promoted characteristic of living systems as well as of many modern
vigorously by Warren McCulloch (2), and the emergence artifacts. The flow of effect, or causation, is not linear from
of cybernetics has been attributed to the meeting and input to output but has loops or feedbacks. The system is
collaboration of Wiener with McCulloch and Walter Pitts sensitive to what it, itself, influences, and it regulates its
(3). McCulloch was a neurophysiologist who epitomized his influence so as to achieve a desired result. Conscious mus-
own lifetime quest as the attempt to answer the question: cular movement is an obvious example, where the actual
What is a number, that a man may know it, and a man, that movement is monitored by proprioceptors in joints and
he may know a number? This question led him to study muscles and perhaps also visually and the force exerted
medicine and, particularly, neurophysiology. An interna- by the muscles is regulated using this feedback so as to keep
tional center for studies of what became known as cyber- the movement close to what is wanted despite unknown
netics was planned by him in the 1920s but had to be weight to be lifted, friction, and inertia. The feedback that
abandoned for financial reasons in the 1930s. produces stability is negative feedback, which is to say that
Before the meeting with McCulloch, (2) a number of an excessive movement in the desired direction must cause
influences guided Wiener toward the initiative, a major one diminution of muscular effort and conversely for insuffi-
being his wartime work on the possibility of a predictor to cient movement.
extrapolate the curving path of an enemy aircraft so as to Servomechanisms are artificial devices that similarly
direct anti-aircraft gunfire more effectively. He had expo- use negative feedback. They featured strongly in wartime
sure to biological studies in a number of contexts, including applications, such as control of aircraft gun turrets, but
introduction to electroencephalography by W. Grey Walter were known much earlier, examples being the steering
in the United Kingdom (4) and work on heart muscle with engines of ships and Watts governor to regulate the speed
the Mexican physiologist Rosenblueth; he also had learned of a steam engine. The use of the term governor here
about biological homeostasis in discussions with Walter encouraged the later appellation of wiener. Negative feed-
Cannon. He also had been involved with analog and digital back also appears in a crude but effective form in the
computing. familiar ball-cock valve of the toilet cistern, which regulates
The topic area, and its designation by name, were inflow according to the sensed water level, and in thermo-
advanced greatly by a series of discussion meetings held stats in rooms, ovens, and refrigerators. Regulation of
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 CYBERNETICS

temperature and many other variables by feedback from spontaneous emergence in an isolated system would be
sensors also is a vital feature of biological systems. contrary to the second law. More recently, self-organization
Servomechanisms are required to respond rapidly to has been discussed rather differently with emphasis on the
disturbances and, at the same time, to give stable control emergence of structure as such, independent of learning or
without large overshoots or oscillation. The achievement of goal-seeking.
this stability where the environment includes inertia and Ilya Prigogine (5) and his followers have resolved the
elasticity and viscous friction depends on the mathematical contradiction between the apparent implications of the
methods of Wiener and others, including Bode and Nyquist. second law of thermodynamics, that entropy or disorder
One connection with biology noted by Wiener is that the can increase only, and the observed increase of order in
tremors of a patient with Parkinsons disease are similar to biological evolution. The contradiction is resolved by obser-
the operation of a maladjusted servo. Negative feedback ving that the second law applies to systems close to equili-
also is applied in electronic amplification and allows high- brium, and living systems only exist far from equilibrium
fidelity audio reproduction despite the nonlinear charac- and can be termed dissipative structures as they receive
teristics of the active components, whether vacuum tubes energy and pass it to their environments. It has been shown
or transistors; important mathematical theory has been that spontaneous emergence of structure is natural in such
developed in this context. conditions. Implications for psychology and social systems,
as well as cosmology, are drawn.
NEUROPHYSIOLOGY AND DIGITAL COMPUTING
INFORMATION THEORY
The nervous system is the most obvious and complex form of
communication in the animal, although the endocrine An important part of cybernetics commonly is called infor-
system also operates in a broadcast or to whom it may mation theory, although arguably more appropriately
concern fashion and other forms are playing a part. McCul- termed communication theory. It depends on the fact
loch looked to neurophysiology for answers to the question that information, in a certain sense of the word, can be
he posed, and 5 years before the appearance of the book by measured and expressed in units. The amount of such
wiener, he and Walter Pitts published a mathematical information in a message is a measure of the difficulty of
proof of the computational capabilities of networks of model transmitting it from place to place or of storing it, not a
neurons that have some correspondence to the real kind. measure of its significance. The unit of information is the
Much speculation was aroused by the apparent correspon- bit, the word being derived from binary digit. It is the
dence between the all-or-nothing response of neurons and amount of information required to indicate a choice bet-
the use of binary arithmetic and two-valued logic in digital ween two possibilities that previously were equally prob-
computers. able. The capacity of a communication channel can be
In this and other ways, interest in cybernetics arose from expressed in bits per second. The principal author of the
advances in electronics, especially those stimulated by modern theory is Claude Shannon (6), although a similar
world war II. Young scientists who had worked on military measure of information was introduced by R. V. L. Hartley
projects wanted to turn their skills to something to help as early as 1928. The later work greatly extends the theory,
humanity, such as biological research. Ways were found of particularly in taking account of noise.
making micro electrodes that allowed recording from single In its simple form, with reference to discrete choices, the
neurons and stimulating them, and it looked as though the theory accounts nicely for some biological phenomena, for
nervous system could be analyzed like an electronic device. instance, the reaction times of subjects in multiple-choice
A great deal has been learned about the nervous system experiments. It is extended to apply to continuous signals
using microelectrodes, not least by a group around Warren and to take account of corruption by random disturbances
McCulloch in the Massachusetts Institute of Technology in or noise. The mathematical expressions then correspond,
the 1950s and 1960s. Further insight came from theoretical with a reversal of sign, to those expressions for the evalua-
treatments, including the idealization of neural nets as tion of entropy in thermodynamics. The theory applies to
cellular automata by John von Neumann and the mathe- the detection of signals in noise and, therefore, to percep-
matical treatment of morphogenesis (the development of tion generally, and one notable treatment deals with its
pattern or structure in living systems) pioneered by Alan application to optimal recovery and detection of radar
Turing. Nevertheless, much of the working of the central echoes in noise.
nervous system remains mysterious, and in recent decades, The effects of noise often can be overcome by exploiting
the main focus of cybernetics has shifted to a higher-level redundancy, which is information (in the special quantita-
view of thought processes and to examination of inter tive sense) additional to that needed to convey the message
personal communication and organizations. in the absence of noise. Communication in natural lan-
A recurring theme is that of self-organization, with guage, whether spoken or written, has considerable redun-
several conferences in the 1950s and 1960s nominally dancy, and meaning usually can be guessed with a fair
devoted to discussion of self-organizing systems. The aim degree of confidence when a substantial number of letters,
was to study learning in something like a neural net, syllables, or words effectively are lost because of noise,
associated with the spontaneous emergence of structure interference, and distortion. Much attention has been given
or at least a major structural change. Von Foerster treated to error-detecting and error-correcting coding that allow
the topic in terms of thermodynamics and pointed out that the introduction of redundancy in particularly effective
CYBERNETICS 3

ways. One theorem of information theory refers to the but leave much to be desired. Early optimistic predic-
necessary capacity of an auxiliary channel to allow the tions of computer performance in this area have not
correction of a corrupted message and corresponds to materialized fully. This lack is largely because the
Ashbys (7) principle of requisite variety, which has found understanding of text depends on semantic as well
important application in management. as syntactical features and, therefore, on the huge
amount of knowledge of the world that is accumulated
by a person.
ARTIFICIAL INTELLIGENCE
Robotics. Robotics has great practical importance in, for
In the attempt to understand the working of the brain in example, space research, undersea exploration, bomb
mechanistic terms, many attempts were made to model disposal, and manufacturing. Many of its challenges
some aspect of its working, usually that of learning to are associated with processing sensory data, including
perform a particular task. Often the task was a form of video images, so as to navigate, recognize, and manip-
pattern classification, such as recognition of hand-blocked ulate objects with dexterity and energy efficiency.
characters. An early assumption had that an intelligent Apart from their immediate use, these developments
artifact should model the nervous system and should con- can be expected to throw light on corresponding
sist of many relatively simple interacting units. Variations biological mechanisms. Bipedal locomotion has been
on such a scheme, indicated by the term perceptron achieved only with great difficulty, which shows the
devised by Frank Rosenblatt, could learn pattern classifi- complexity of the biological control of posture and
cation but only of a simple kind without significant, learned balance. For practical mobile robots, wheeled or
generalization. The outcomes of these early attempts to tracked locomotion is used instead. A topic area
achieve artificial intelligence were not impressive, and at associated with advanced robotics projects is that of
a conference in 1956 the term Artificial Intelligence (with virtual reality, where a person is given sensory input
capitals), or AI, was given a rather different meaning. and interactions that simulate a nonexistent environ-
The aim of the new AI was to use the full power of ment. Flight simulators for pilot training were an
computers, without restriction to a neural net or other early example, and computer games implement the
prescribed architecture, to model human capability in effect to varying degrees.
areas that are accepted readily as demonstrating intelli- Expert Systems. This term has been used to refer to
gence. The main areas that have received attention are as systems that explicitly model the responses of a
follows: human domain expert, either by questioning the
expert about his/her methods or deriving rules from
Theorem Proving. The automatic proving of mathema- examples set to him/her. A favourite application area
tical theorems has received much attention, and has been the medical diagnosis in various specializa-
search methods developed have been applied in other tions, both for direct use and for training students.
areas, such as path planning for robots. They also are The general method has been applied to a very wide
the basis of ways of programming computers declara- range of tasks in which human judgement is superior
tively, notably using the language PROLOG, rather to any known analytic approach. Under the general
than procedurally. In declarative programming, the heading of diagnosis, this range of topics includes
required task is presented effectively as a mathema- fault finding in computers and other complex machin-
tical theorem to be proved and, in some application ery or in organizations. Other applications are made
areas, allows much faster program development than to business decisions and military strategy.
is possible by specifying procedures manually.
Game Playing. Chess has been seen as a classical chal- A great deal has been achieved under the heading of AI.
lenge, and computers now can compete at an extre- It has underlined the importance of heuristics, or rules
mely high level, such that a computer beat the that do not always work (in the sense of leading directly
highest-scoring human chess player in history, to a solution of a problem). Heuristics indicate where it
Gary Kasparov. Important pioneering work was may be useful to look for solutions and are certainly a
done using the game of checkers (or draughts). feature of human, as well as machine, problem-solving. In
this and other ways, studies of AI have contributed to the
Pattern Recognition. Pattern recognition can refer to
understanding of intelligence, not least by recognizing the
visual or auditory patterns; or patterns in other or
complexity of many of the tasks studied. Apart from this,
mixed modalities; or in no particular modality, as
the influence of AI studies on computer programming
when used to look for patterns in medical or weather
practice has been profound; for example, the use of
data. Attention also has been given to the analysis of
list-processing, which has sometimes been seen as pecu-
complete visual scenes, which presents special diffi-
liar to AI programs, is used widely in compilers and
culty because, among other reasons, objects can have
operating systems.
various orientations and can obscure each other par-
Nevertheless, progress in AI is widely felt to have been
tially. Scene analysis is necessary for advanced devel-
disappointing. Mathematical theorem-proving and chess
opments in robotics.
playing are forms of intellectual activity that people find
Use of Natural Language. Question-answering systems difficult, and AI studies have produced machines proficient
and mechanical translation have received attention, in them but unable to perform ordinary tasks like going a
and practical systems for both have been implemented
4 CYBERNETICS

round a house and emptying the ashtrays. Recognizing trolley. The task is to control the trolley so that the pole does
chairs, tables, ashtrays, and so forth in their almost infinite not fall and the trolley remains within a certain length of
variety of shapes and colors is hard because it is hard to track. The input data to the learning controller are indica-
define these objects in a way that is understandable to a tions of the position of the trolley on the track and of the
robot and because more problems arise in manipulation, angle of the pendulum, and its output is a signal to drive
trajectory planning, and balance. If the evolution of the trolley. In one study, the controller was made to copy the
machine intelligence is to have correspondence to that of responses of a human performing the task; in others, it
natural intelligence, then what are seen as low-level man- developed its own control policy by trial.
ifestations should appear first. The ultimate possibilities Learning, unless purely imitative, requires feedback of
for machine intelligence were discussed comprehensively success or failure, referred to as reinforcement. The term
by Turing and more recently and sceptically using the reinforcement learning, however, has been given special
parable of Searles Chinese Room in which an operator significance as indicating methods that respond not only to
manipulates symbols without understanding. an immediate return from actions but also to a potential
In relatively recent decades a revival of interest has return associated with the change of state of the environ-
grown in artificial neural nets (ANNs). This revival of ment. A means of estimating an ultimate expected return,
interest is attributable partly to advances in computer or value, for any state has to exist. The most favorable
technology that make feasible the representation and action is chosen to maximize the sum of the immediate
manipulation of large nets, but a more significant factor return and the change in expected subsequent return.
is the invention of useful ways of implementing learning in The means of evaluating states is subject, itself to modifica-
ANNs. The most powerful of these ways is backpropaga- tion by learning.
tion, which depends on information pathways in the net This extension of the meaning of reinforcement learn-
that are additional to those serving its primary function, ing, having some correspondence to the dynamic pro-
conducting in the opposite direction. Some applications are gramming of Richard Bellman, has led to powerful
of a control or continuous-variable kind where the net learning algorithms and has been applied successfully to
provides a means of learning the continuous relation the pole-balancing problem as well as to writing a program
between a number of continuous variables, one of them a that learned to play a very powerful game of backgammon.
desired output that the net learns to compute from the
others. Other application areas have an entirely different
CYBERSPACE
nature and include linguistics.
These relatively recent studies have been driven mainly
Interactions using the Internet and other channels of ready
by practical considerations, and the correspondence to
computer communication are said to occur in, and to define,
biological processing often is controversial. The backpro-
cyberspace. The new environment and resulting feeling of
pagation of error algorithm, the basis of the majority of
community are real and amenable to sociological examina-
applications, has been argued to be unlikely to operate in
tion. The prefix cyber- is applied rather indiscriminately
biological processing. However, other forms of backpropa-
to any entity strongly involving computer communication,
gation probably do play a part, and biological considera-
so that a cafe offering its customers Internet access is
tions are invoked frequently in arguing the merits of
termed a cybercafe, the provision of bomb-making
schemes using ANNs.
instructions on the Internet is described as cyberterror-
ism, and so on. In science fiction, such terms as cybermen
CYBERNETIC MACHINES have been used to refer to humans who are subject to
computer control. These uses of the prefix must be depre-
Because a main aim of many cyberneticians is to under- cated as supporting an erroneous interpretation of cyber-
stand biological learning, various demonstrations have netics.
involved learning machines realized either as computer
programs or as special-purpose hardware. The various
SECOND-ORDER CYBERNETICS
schemes for artificial neural nets are examples, and an
earlier one was the Homeostat of Ross Ashby (7), which
The idea of the circular causality implicit in cybernetics has
sought a stable equilibrium despite disturbances that
been extended, originally by Heinz von Foerster, to include
could include alteration of its physical structure. A num-
the circle comprising an observed system and the observer.
ber of workers, starting with Grey Walter (4), made mobile
This extension is a departure from traditional Newtonian
robots or tortoises (land turtles) that showed remark-
science and from earlier views of cybernetics where the
ably lifelike behavior from simple internal control
observer is assumed to have autonomy that puts him or her
arrangements. They could avoid obstacles and would
outside any causal loop. The earlier version of cybernetics is
seek food (electric power) at charging stations when
termed first-order; the extension is called second-order
hungry. The Machina speculatrix by grey walter did
or cybernetics of cybernetics.
not learn, actually, but later developments implemented
The extension is most clearly relevant to the observation
learning in various forms.
of social systems and, hence also, to teaching and manage-
A task that has been used in a number of studies is pole-
ment. In these contexts, an observer must either be part of
balancing, where the pole is an inverted pendulum con-
the observed system or have involvement with it. In other
strained to pivot about a single axis and mounted on a
contexts, such as those of the so-called exact sciences, the
CYBERNETICS 5

involvement of the observer may be less obvious, but still, in works of Ashby (7), Pask (10,11), and Beer (8,9). No firm
complete objectivity is impossible. distinction, exists between cybernetics and systems science
The impossibility of access to anything to be called reality except for a difference of emphasis because of the essen-
also has been recognized under the heading of constructi- tially biological focus of cybernetics. However, the seminal
vism, a philosophical viewpoint that predates cybernetics. work of Ludwig von Bertalanffy (12)on systems theory has
Clearly the construction formed by an individual has to very substantial biological content.
allow effective interaction with the environment if he or
she is to operate effectively and, indeed, to survive, but no
SOCIOCYBERNETICS
precise image or model is implied by this construction.
Cybernetics has social implications under two distinct
MANAGEMENT headings. One is the social effect of the introduction of
automation, including, with computers and advanced
The application of cybernetics to management was pio- robots, the automation of tasks of intellectual and skilled
neered by Stafford Beer (8,9) and is a major field of interest. nature. Norbert Wiener, in his book The Human Use of
In an early paper, he listed characteristics of a cybernetic, Human Beings(13), expressed his grave concern over these
or viable, system that include internal complexity and the aspects.
capability of self-organization, along with a means of inter- The topic that has come to be termed sociocybernetics is
acting appropriately with its environment. He indicated not concerned primarily with these aspects but with the
points of similarity between the communications and con- examination of social systems in terms of their control and
trol within a firm and a human or animal central nervous informational features and with the use of concepts from
system. For example, he likened the exclusive pursuit of cybernetics and systems theory to describe and model
short-term profit by a firm to the behavior of a spinal dog them. The need for second-order cybernetics became parti-
deprived of cerebral function. cularly clear in this context, and its use has allowed valu-
The view of human organizations as viable is supported able analyses of, for example, international and inter faith
by the observation that groups of people in contact sponta- tensions and aspects of the war on terror.
neously form a social structure. The viability of organiza- The theory of autopoiesis, or self-production, developed
tions has been described as social autopoiesis, as part of originally by Humberto Maturana (14) and Francisco
sociocybernetics where autopoiesis is a principle originally Varela with reference to living cells, has been applied to
used with reference to biological systems to indicate self- the self-maintenance of organizations in society as social
production. autopoiesis. This term is applied by Niklas Luhmann (15)
The Beer Viable System Model (8,9) has found wide to various entities, including the legal system. The autop-
application in management studies and depends on his oietic character is indicated by the reference to organiza-
listing of a set of components that are essential for viability. tional (or operative) closure. In management and social
Failures or inadequacies of management performance may studies, the correspondence of a social entity to a living
be attributed to absence or weakness of one or more of these organism is emphasized frequently by reference to pathol-
components. It is asserted that viable systems have recur- ogy and diagnosis. The theoretical treatment of self-
sive character in that they have other viable systems organization because of Prigogine (5), mentioned earlier,
embedded in them and are themselves components of lar- has been applied in social studies.
ger ones. The cells of the body are viable systems that are A range of topics bearing on psychology and sociology
embedded in people, who in turn form organizations, and so were treated in cybernetic terms by Gregory Bateson (16)
on. Connections to higher and lower viable systems are part and his wife the anthropologist Margaret Mead, both par-
of the model. ticipants in the Macy conference series. His insights were
An aspect emphasized by Beer (8,9) is the need for a rapid based on experience of anthropological fieldwork in Bali
response to disturbances, achieved in the nervous system by and New Guinea, as well as psychiatry among schizophre-
local reflexes, which respond automatically but also are nics and alcoholics and the study of communication beha-
subject to higher-level control. His work also makes exten- vior in octopi and dophins. Another study that bears
sive use of the Ashby (7) principle of Requisite Variety, particularly on education is the conversation theory of
which corresponds to a theorem of the Shannon Information Gordon Pask (10,11), with the aim of exteriorizing thought
Theory and states that a disturbance of a system only can be processes in managed conversations.
corrected by a control action whose variety, or information
content, is at least equal to that of the disturbance. This view
GAIA
has been epitomized as: only variety can absorb variety.
Beer (8,9) analyzed many management situations in terms
In 1969 James Lovelock (17) advanced the suggestion that
of variety, alternatively termed complexity, and claimed to
the totality of living things in the biosphere acts like one
be practising complexity engineering.
large animal to regulate environmental variables. This
hypothesis has been termed the Gaia hypothesis, where
SYSTEMS SCIENCE the name Gaia was one given to the Greek earth goddess. It
was assumed previously that environmental conditions on
Cybernetics is concerned essentially with systems, and the earth (temperature, ocean salinity, oxygen concentra-
valuable discussions of the meaning of system appear tion of the atmosphere, and so on) just happened to be
6 CYBERNETICS

compatible with life. Lovelock points out that these vari- 8. S. Beer, Cybernetics and Management.London: English Uni-
ables have remained remarkably steady despite distur- versities Press, 1959.
bances, including a large change in the strength of solar 9. S. Beer, Towards the cybernetic factory, in H. vonFoerster and
radiation. G. W. Zopf (eds.), Principles of Self-Organization.Oxford: Per-
The environment is influenced by biological activity to a gamon, 1962, pp. 2589.
greater extent than usually is realized; for example, with- 10. G. Pask, An Approach to Cybernetics. London: Hutchinson,
out life almost no atmosphere would exist. This influence 1961.
makes regulation feasible, and the Lovelock theory (17) has 11. G. Pask, Conversation Theory: Applications in Education and
given accurate predictions, including a gloomy view of the Epistemology. Amsterdam: Elsevier, 1976.
likely consequences of the effects of human activity on Gaia, 12. L. von Bertalanffy, General Systems Theory. Harmondsworth:
especially with regard to carbon emissions and other fac- Penguin, 1973. (First published in the United States in 1968).
tors that contribute to global warming. It is, widely 13. N. Wiener, The Human Use of Human Beings: Cybernetics and
accepted in fact, that the greatest threat to humanity is Society, Boston MA: Houghton Mifflin, 1954.
that the feedback mechanisms that regulate the tempera- 14. H. R. Maturana and B. Poerksen, From Being to Doing: The
ture of the planet may be overwhelmed by the ignorant, Origins of the Biology of Cognition., Carl-Auer Heidelberg,
selfish, and short-sighted behavior of humans and that a 2002.
greater understanding of these issues urgently is required. 15. N. Luhmann, Law as a Social System. Oxford University Press,
Lovelock (17) has suggested how regulation could have 2004.
come into being, with the help of a parable called Daisy- 16. G. Bateson, Steps to an Ecology of Mind, London: Paladin, 1973.
world. Daisyworld is a simple model of a planet on which 17. J. E. Lovelock, Gaia: A New Look at Life on Earth.Oxford
two species of plant (daisies) grow, one species black and University Press, 1979.
the other white. The dependence of growth rate on tem- 18. L. A. Zadeh, Fuzzy sets, Information and Control, 8: 338353,
perature is the same for both species. The spread of black 1965.
daisies causes the planet to become warmer, and the spread
of white daisies affects the planet conversely.
FURTHER READING
It has been shown that with reasonable assumptions
about heat conductivity of the planet, such that black
C. Adami, Introduction to Artificial Life, New York: Springer, 1998.
daisies are a little warmer than the planet generally and
A. M. Andrew, F. Conway, and J. Siegelman, Appendix to review of
white ones a little cooler, effective regulation of tempera-
Dark Hero of the Information Age: In Search of Norbert Wiener, the
ture can result. Apart from its environmental significance, Father of Cybernetics, (2005). Reviewed in: Kybernetes, 34(7/8):
the mechanism is interesting as an example of control 12841289, 2005.
without an obvious set-point. M. A. Arbib (ed.), The Handbook of Brain Theory and Neural
Networks. Cambridge, MA: MIT Press, 1998.
OTHER TOPICS S. Beer, Brain of the Firm, 2nd ed. Chichester: Wiley, 1981.
F. Conway and J. Siegelman, Dark Hero of the Information Age: In
Other topics, among many, that impinge on cybernetics Search of Norbert Wiener, the Father of Cybernetics, New York:
include the use of fuzzy methods to allow operation under Basic Books, 2005.
uncertainty, based on the introduction of the fuzzy set B. J. Copeland (ed.), The Essential Turing: The Ideas that Gave
theory by Lotfi Zadeh (18), as well as methods for the study Birth to the Computer Age. Oxford University Press, 2004.
of complex systems under headings of chaos and fractals E. A. Feigenbaum and J. Feldman, (eds.), Computers and Thought.
and artificial life. New York: McGraw-Hill, 1963.
F. Geyer and J. van derZouwen, Cybernetics and social science:
theories and research in sociocybernetics, Kybernetes, 20(6), 8192,
BIBLIOGRAPHY 1991.
O. Holland and P. Husbands, The origins of british cybernetics: The
1. N. Wiener, Cybernetics or Control and Communication in the ratio club, Kybernetes, 2008. In Press.
Animal and the Machine, New York: Wiley, 1948. J. Lovelock, The Revenge of Gaia: Why the Earth is Fighting Back
2. W. S. McCulloch, What is a number, that a man may know it, and How We Can Still Save Humanity. London: Allen Lane, 2006.
and a man, that he may know a number?, General Semantics P. R. Masani, Norbert Wiener, 18941964, Birkhauser, Basel,
Bulletin, 26 & 27: 718; reprinted in W. S. McCulloch, Embodi- 1990.
ments of Mind. Cambridge, MA: MIT Press, 1965, pp. 118.
H.-O. Peitgen, H. Jurgens and D. Saupe, Chaos and Fractals: New
3. W. S. McCulloch and W. Pitts, A logical calculus of the ideas Frontiers of Science, New York: Springer, 1992.
immanent in nervous activity, Bull. Math. Biophyics, 5:
J. Preston and J. M. Bishop, (eds.), Views into the Chinese Room:
115133, 1943.
New Essays on Searle and Artificial Intelligence. Oxford University
4. W. G. Walter, The Living Brain, London: Duckworth, 1953. Press, 2002.
5. I. Prigogine and I. Stengers, Order Out of Chaos: Mans New H. Rheingold, Virtual Reality, London: Seeker and Warburg,
Dialogue with Nature. London: Flamingo, 1985. 1991.
6. C. E. Shannon and W. Weaver, The Mathematical Theory of D. E. Rumelhart, J. L. McClelland and the PDP [Parallel Distrib-
Communication. Urbana: University of Illinois Press, 1949. uted Processing] Research Group (eds.), Parallel Distributed
7. W. R. Ashby, An Introduction to Cybernetics.New York: Wiley, Processing: Explorations in the Microstructure of Cognition, 2
1956. Vols. Cambridge, MA: MIT Press, 1986.
CYBERNETICS 7

R. S. Sutton and A. G. Barto, Reinforcement Learning: An Intro- P. M. Woodward, Probability and Information Theory with Appli-
duction, Cambridge, MA: MIT Press, 1998. cations to Radar, 2nd ed. Oxford: Pergamon, 1964.
H. Von Foerster and B. Poerksen, Understanding Systems: Con- M. Zeleny (ed.), Autopoiesis: A Theory of Living Organization,
versations on Epistemology and Ethics. New York: Kluwer/Ple- New York: North Holland, 1981.
num, 2002.
A. J. Watson and J. E. Lovelock, Biological homeostasis of the
global environment: The parable of Daisyworld, Tellus35B:
284289, 1983. ALEX M. ANDREW
N. Wiener, I am a Mathematician. London: Gollancz, 1956. University of Reading
Berkshire, United Kingdom
E
EDUCATION AND TRAINING IN SOFTWARE  Information on software engineering education con-
ENGINEERING ferences and publications.

INTRODUCTION HISTORY

Although the term software engineering has been used In the spring of 1968, Douglas T. Ross taught a special
widely since the late 1960s, the question of whether to treat topics graduate course on the topic of software engineering
it as a distinct academic discipline has only been addressed at the Massachusetts Institute of Technology (1). Ross
during the past 15 years. The fact that a steadily increasing claims that it is the first academic course with a title that
number of software engineering degree programs in col- used the term software engineering, James Tomayko, in
leges and universities exists throughout the world indi- his excellent article on the history of software engineering
cates a greater (although still far from unanimous) education (2), agrees that no apparent evidence exists to the
acceptance of software engineering as a separate discipline contrary. This was several months before the now-famous
of study. first Conference on Software Engineering sponsored the
These software engineering degree programs emerged North Atlantic Treaty Organization (NATO)!
first at the masters level, and then more recently at the The idea fostered by that first NATO conference of
bachelors and doctoral levels, in a process paralleling the applying engineering concepts such as design, reliability,
development of computer science programs in the 1960s performance, and maintenance to software was revolution-
and 1970s. In both cases, the process began with the ary. As early as 1969, the software community began to
introduction of specialized elective courses in an existing recognize that the graduates of the fledgling computer
curriculum. With computer science, as the body of knowl- science programs in universities were not prepared for
edge grew, more courses were introduced, relationships industrial software development. In response, the industry
among topics were better understood, textbooks were started to ask for software engineering education rather
written, and better teaching methods were developed. than computer science education, including separate
Eventually, the fundamentals of computer science were degree programs (3). Sketches of model curricula for soft-
codified in an undergraduate curriculum that provided ware engineering programs also began to appear in the
the necessary skills to meet the increasing demand for literature (4,5).
computing practitioners, whereas the growth of computer
science research and the demand for new faculty in the Early Software Engineering Courses
discipline led to doctoral programs in the field. Currently, The most common form of software engineering education,
software engineering is following this same pattern. even today, is a one-semester survey course, usually with a
In addition, the evolution of software engineering has toy project built by groups of three students. In the
meant that industry and government both need to retrain extended decade between the first appearance of these
workers from other fields as software engineer and to courses and the establishment for the first software engi-
provide additional software engineering skills to current neering degree programs, they became the mechanism for
computing practitioners. Therefore, a variety of software academia to experiment with teaching software engineer-
engineering training courses and techniques has also been ing concepts.
developed over the years. Throughout the 1970s, industry continued to struggle to
This article contains: build larger and more complex software systems, and edu-
cators continued to create and teach the new discipline of
 A history of software engineering in academia, computer science. Recognizing the problem of the diver-
 The role of accreditation in various countries, gence of these two communities, in 1976 Peter Freeman of
 Various curriculum models that have been proposed, the University of California, Irvine, and Anthony I. Wasser-
 The gap between academic education and professional man of the University of California, San Francisco, orga-
knowledge required, nized the first U.S. workshop on software engineering
education. The 40 participants represented academia,
 An overview of software engineering training issues
industry, and government, including companies involved
and academic certificate programs,
in building large software systems. The workshop focused
 University/industry collaborations in software engi- on the kind of work a professional software engineer actu-
neering education,
ally did and on what the academic preparation for such a
 Distance learning and web-based education in soft- profession should be. The proceedings of the workshop (6)
ware engineering, were published and distributed widely, and it still influ-
 The role of professional issues in software engineering ences software engineering education today.
education, and

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 EDUCATION AND TRAINING IN SOFTWARE ENGINEERING

ACM Curriculum 68 and 78 Recommendations Tyngsboro, Massachusetts, were donated to Boston Uni-
versity, and its last few students were permitted to com-
ACM Curriculum 68, the first major undergraduate com-
plete their degrees at that school. During its existence, the
puter science curriculum modeling effort (7), said little
Wang program was considered to be the premier program of
about learning how to develop complex software, except
its kind.
through work opportunities (e.g., through summer employ-
According to Tomayko (2), by the mid-1980s, these three
ment) or special individual project courses. (The latter
programs had similar curricula. The core courses at these
became the basis for the senior project courses that are
institutions focused on various stages of the life cycle such
commonplace today of the undergraduate level, and the
as analysis, design, implementation, and testing, whereas
software studio courses in some graduate curricula.)
each of the programs had a capstone project course lasting
Later, ACM Curriculum 78 (8) listed a course in soft-
one or more semesters. These curricula were to have a large
ware design and development; however, it was not
impact not only for future graduate programs, but for
required in this undergraduate model. Therefore, although
undergraduate curricula as well.
some growth occurred in software engineering undergrad-
uate education, it remained limited to one or two semesters
Academic Certificate Programs
for the next 10 years. Meanwhile, software engineering as a
graduate discipline would grow at a faster rate. Many higher education institutions around the world offer
graduate-level academic certificates in software engineer-
First Masters Degree Programs ing. Although such certificate programs are targeted pri-
marily toward those that received their undergraduate
Of course, one or two courses do not make a full curriculum.
degrees in a non computing field, they differ from training
So, by the late 1970s, a few schools had started Masters
programs in that they typically consist of several software
degree programs in software engineering, primarily
engineering courses offered for graduate course credit at
because of the pressure from local industry. To date, most
that institution. Typically, such graduate certificate pro-
graduate software engineering degree programs have used
grams typically the completion of a series of semester-long
the model of a professional degree such as an MBA. (The
courses, constituting some portion of what might be
degree title Master of Software Engineering, or MSE, will
required for a Bachelors degree or Masters degree pro-
be used here, although variations of this name are used.) A
gram. These academic certificate programs should not be
professional masters degree is a terminal degree, with
confused with professional certification in software engi-
graduates going into industry rather than academia. In
neering, which will be addressed later in this article.
particular, a software engineering masters degree has
been a professional degree where the students in the pro-
gram are already programmers or software developers in Development of Undergraduate Degree Programs
the workplace, with either a bachelors degree in another Undergraduate degree programs in software engineering
computing discipline, or having completed sufficient under- have been slow to develop in most countries. One exception
graduate leveling to do the graduate coursework. is the United Kingdom, where the British Computer
The first three U.S. MSE-type programs were developed Society (BCS) and the Institution of Electrical Engineers
at Seattle University, Texas Christian University, and the (IEE) have worked together to promote software engineer-
now-defunct Wang Institute of Graduate Studies in the late ing as a discipline. One of the oldest undergraduate soft-
1970s. Texas Christian University, located in Fort Worth, ware engineering degree programs in the world is at the
established a graduate degree program in software engi- University of Sheffield (10), which started in 1988.
neering in 1978 (9). The original curriculum was influenced Several Australian universities have also created bache-
greatly by the 1976 workshop. Because of external pressure lors degree programs since the 1990 creation of an under-
prompted by the absence of an engineering college at the graduate program at the University of Melbourne.
university, the program name was changed in 1980 to The first undergraduate software engineering program
Master of Software Design and Development, and Texas in the United States started at the Rochester Institute of
Christian later discontinued the program. Technology in the fall of 1996, and now over 30 such
In 1977, Seattle University initiated a series of discus- programs exist (11).
sions with representatives from local business and industry, Several software engineering undergraduate programs
during which software engineering emerged as a critical have been implemented in Canada. The program at
area of need for specialized educational programs. Leading McMaster University is probably the closest to a traditional
software professionals were invited to assist in the devel- engineering program of all those in software engineering,
opment of an MSE program, which was initiated in 1979. including requirements for courses in materials, thermo-
The Wang Institute of Graduate Studies was founded in dynamics, dynamics, and engineering economics, using a
1979 by An Wang, founder and chairman of Wang Labora- model outlined by its chair, David Lorge Parnas (12).
tories. It offered an MSE degree beginning in 1978. The
Institute continued to depend heavily on Wang for financial
support, because of the relatively low tuition income from SOFTWARE ENGINEERING ACCREDITATION
the small student body (typically 2030 students per year).
Business declines at Wang Laboratories in the early 1980s Usually, accreditation of educational degree programs in a
reduced the ability to continue that support, and the particular country is performed either by organizations in
institute closed in the summer of 1987. Its facilities in conjunction with professional societies or directly by the
EDUCATION AND TRAINING IN SOFTWARE ENGINEERING 3

societies themselves. The mechanisms for software engi- standard engineering degree, with students highly constrained
neering accreditation in several different countries are in their options and with the focus heavily on specific software
provided below. More details are available in Ref. 13. engineering topics. The CSAC programs are offered as varia-
tions of standard computer science programs, with more flex-
ibility for student choice and with the focus on a wider range of
United States
applied computer science topics than just software engineering.
Accreditation of engineering programs in the United States
is conducted by the Engineering Accreditation Commission Despite the end of the five-year moratorium in July
(EAC) of the Accreditation Board of Engineering and Tech- 2005, both CEAB and CSAC continue to accredit software
nology (ABET) and until recently, accreditation of computer engineering degree programs.
science programs had been conducted by a commission of the
Computer Science Accreditation Board (CSAB). United Kingdom
In the late 1990s, the Institute of Electrical and Elec-
The BCS and the Institution of Engineering and Technology
tronics Engineers (IEEE) developed criteria for the
(IET) have accredited software engineering programs in the
accreditation of software engineering programs by
United Kingdom for several years. As of 2007, 64 schools
ABET/EAC (14). ABET and CSAB subsequently merged,
with degree courses (programs) that have the words soft-
with CSAB reinventing itself as a participating society
ware engineering in their titles are accredited by BCS,
of ABET. (As part of this change, ABET is not considered
according to their website at www.bcs.org.
an acronym, and the organization bills itself as the accred-
itation body for applied science, computing, engineering,
and technology education.) CSAB has lead responsibility Japan
for the accreditation of software engineering programs by In 2000, the Japan Board for Engineering Education
ABET, which accredited its first programs during the (JABEE) applied a trial software engineering accreditation
20022003 academic year, and as of October 2006 it has program (18). The Osaka Institute of Technology (OIT) was
13 schools accredited. chosen for this trial, and was visited by a JABEE examina-
tion team in December 2000. The criteria used for examin-
Canada ing the OIT program included the J97 curriculum model for
Canada had a legal dispute over the use of the term engi- Japanese computer science and software engineering pro-
neering by software engineers and in universities (15). The grams and the IEEE-ACM Education Task Force recom-
Association of Professional Engineers and Geoscientists of mended accreditation guidelines (both are discussed in the
Newfoundland (APEGN) and the Canadian Council of Pro- Curriculum Models section below).
fessional Engineers (CCPE) filed a Statement of Claim
Australia
alleging trademark violation by Memorial University of
Newfoundland (MUN) for using the name software engi- The Institution of Engineers, Australia (IEAust) has been
neering for a baccalaureate program. The APEGN and the accrediting software engineering programs since 1993. A
CCPE claimed the program was not accreditable as an discussion of the IEAust accreditation process, and how the
engineering program. University of Melbourne developed an undergraduate soft-
Subsequently, the parties came to an agreement: MUN ware engineering degree program that was accredited in
dropped the use of the title software engineering for its 1996, in described in Ref. 19.
program, APEGN and CCPE discontinued their lawsuit
(with a five-year moratorium placed on new legal action), CURRICULUM MODELS
and the three organizations agreed to work together to
define the appropriate uses of the term software engineer-
ing within Canadian universities (16). As a result of this Curriculum Development Issues
action, the Canadian Engineering Accreditation Board
(CEAB) began to develop criteria for accreditation of soft- Below are some primary issues frequently addressed when
ware engineering undergraduate degree programs. CEAB developing or evaluating a software engineering curricu-
first accreditations were of three software engineering pro- lum model.
grams during the 20002001 academic year; nine programs
are accredited as of 2007.  Software engineering content
In part because of the five-year moratorium, the  Computer science content
Computer Science Accreditation Council (CSAC), an accred-  The role of calculus, laboratory sciences, and engineer-
iting body for computing programs in Canada sponsored by ing sciences
the Canadian Information Processing Society (CIPS), also  Application domain-specific topics
started accrediting software engineering programs in
 Capstone experience
20002001, and also now has nine accredited schools
(some schools are accredited by both CSAC and CEAB).  Flexibility
McCalla (17) claims that
The curriculum models below include some of the ear-
The difference between the CEAB and CSAC programs is liest, the most recent, and the most widely distributed in
substantial. The CEAB programs are offered as part of a the field of software engineering.
4 EDUCATION AND TRAINING IN SOFTWARE ENGINEERING

Software Engineering Institute MSE Model Software Systems Engineering


The mission of the Software Engineering Institute (SEI) at Software Project Management
Carnegie Mellon University, in Pittsburgh, Pennsylvania
is to provide leadership in advancing the state of the The topics and content of these courses were in many
practice of software engineering to improve the quality of ways an outgrowth of the common courses identified in the
systems that depend on software. Recognizing the impor- first MSE programs. These courses would likely be taken in
tance of education in the preparation of software profes- the first year of a two-year MSE sequence. The bulk of the
sionals, the institutes charter required it to influence report consists of detailed syllabi and lecture suggestions
software engineering curricula throughout the education for these six courses.
community. Thus, the SEI Education Program began in The project experience component took the form of the
1985, only one year after the Institutes founding. This capstone project, and might require different prerequisites
program emerged at the right time to play a key role in according to the project. The electives could be additional
the development of software engineering education in the software engineering subjects, related computer science
United States. The program was organized with a perma- topics, system engineering courses, application domain
nent staff of educators along with a rotating set of visiting courses, or engineering management topics.
professors. Although the final version of the SEI model for an MSE
Under the direction of Norman Gibbs (19851990) and was released almost 15 years ago, it remains today the most
Nancy Mead (19911994), the SEI Education Program influential software engineering curriculum model for
accomplished a wide variety of tasks, including developing Masters degree programs.
a detailed Graduate Curriculum Model, several curriculum
BCS/IEE Undergraduate Model
modules on various topics, an outline of a undergraduate
curriculum model; compiling a list of U.S. graduate soft- As stated previously, the BCS and the IET have cooperated
ware engineering degree programs; creating a directory of for many years in the development and accreditation of
software engineering courses offered in U.S. institutions; software engineering degree programs, dating back to the
developing educational videotape series for both academia IEE, one of the two societies that merged to form the IET.
and industry; and creating and initial sponsoring of the Therefore, it is not surprising that the first major effort to
Conference on Software Engineering Education. Although develop a curriculum model for the discipline was a joint
the Education Program was phased out at SEI in 1994, its effort by these two societies (23).
work is still influential today. The curriculum content defined in the report was delib-
With regard to curriculum models, the SEI concen- erately designed to be non-prescriptive and to encourage
trated initially on masters level programs for two reasons. variety (p. 27). Three types of skills are defined: central
First, it is substantially easier within a university to software engineering skills, supporting fundamental skills
develop and initiate a one-year masters program than a (technical communication, discrete math, and various com-
four-year bachelors program. Second, the primary client puter science areas), and advanced skills.
population at the time was software professionals, nearly At the end of the section on curriculum content, the
all of whom already have a bachelors degree in some authors state the topics alone do not define a curriculum,
discipline. In 1987, 1989, and 1991, the SEI published since it is also necessary to define the depth to which they
model curricula for university MSE programs (described may be taught. The same topic may be taught in different
below) (2022). disciplines with a different target result. . . (p. 31). This
Because the goal of an MSE degree program is to produce reinforces the comments concerning the variety and non
a software engineer who can assume rapidly a position of prescriptive nature of the recommendations at the begin-
substantial responsibility within an organization, SEI pro- ning of that section.
posed a curriculum designed to give the student a body of It is interesting to note that the curriculum content does
knowledge that includes balanced coverage of the software not include a need for skills in areas traditionally taught to
engineering process activities, their aspects, and the pro- engineers (e.g., calculus, differential equations, chemistry,
ducts produced, along with sufficient experience to bridge physics, and most engineering sciences). It is remarkable
the gap between undergraduate programming and profes- that the computer scientists and electrical engineers on
sional software engineering. Basically, the program was the working party that produced this report were able to
broken into four parts: undergraduate prerequisites, core agree on a curriculum that focused primarily on engineer-
curriculum, the project experience component, and elec- ing process and computer science skills, and did not tie itself
tives. The minimal undergraduate prerequisites were dis- to traditional engineering courses.
crete mathematics, programming, data structures,
assembly language, algorithm analysis, communication SEI Undergraduate Model
skills, and some calculus. Laboratory sciences were not In making undergraduate curriculum recommendations,
required. The six core curriculum courses were: Gary Ford (24) of SEI wanted a curriculum that would be
compatible with the general requirements for ABET and
Specification of Software Systems CSAB and the core computing curriculum in the IEEE-CS/
Software Verification and Validation ACM Curricula 91 (which was then in draft form). Also,
Software Generation and Maintenance although he was complimentary of the BCS/IEE recom-
Principles and Applications of Software Design mendations, Ford was more precise in defining his model
EDUCATION AND TRAINING IN SOFTWARE ENGINEERING 5

curriculum. The breakdown (for a standard 120 semester (WGSEET). The Working Group was a think tank of
hour curriculum) was as follows: about 30 members of the software engineering and training
communities, who come together twice a year to work on
Mathematics and Basic Sciences 27 semester hours major projects related to the discipline. WGSEET was
Software Engineering Sciences established in 1995 in part to fill a void left by the demise
and Design 45 semester hours of the SEI Education Program.
Humanities and Social Sciences 30 semester hours At the November 1997 Working Group meeting, work
began on what was originally called the Guidelines for
Electives 18 semester hours
Software Education. A major difference in goals of the
Guidelines with the previously discussed projects is that
The humanities & social sciences and electives were
the latter developed computer science, computer engineer-
included to allow for maximum flexibility in implementing
ing, and information systems curricula with software engi-
the curriculum. Mathematics and basic sciences consisted
neering concentrations in addition to making recomm-
of two semesters of both discrete mathematics and calculus,
endations for an undergraduate software engineering
and one semester of probability and statistics, numerical
curriculum. (This article will focus only on the software
methods, physics, chemistry, and biology.
engineering model.)
In designing the software engineering science and
Here are the recommended number of hours and courses
design component, Ford argues that the engineering
for each topic area in the software engineering model, from
sciences for software are primarily computer science,
Ref. 26.
rather than sciences such as statics and thermodynamics
(although for particular application domains, such knowl-
edge may be useful). Four different software engineering Software Engineering Required (24 of 120 Semester
areas are defined: software analysis, software architec- Hours)
tures, computer systems, and software process.
Ford goes on to define 14 courses (totaling 42 semester Software Engineering Seminar (One hour course for
hours; one elective is allowed), with 3 or 4 courses in each of first-semester students)
these four areas, and places them (as well as the other Introduction to Software Engineering
aspects of the curriculum) in the context of a standard four-
Formal Methods
year curriculum. The four software process courses were
placed in the last two years of the program, which allowed Software Quality
for the possibility of a senior project-type experience. Software Analysis and Design I and II
Thus, several similarities existed between the BCS/IEE Professional Ethics
and SEI recommended undergraduate models: they Senior Design Project (capstone experience)
focused on similar software engineering skills, did not
require standard engineering sciences, and (interestingly)
did not require a capstone experience.
Computer Science Required (21 Semester Hours)

IEEE-ACM Education Task Force Introduction to Computer Science for Software Engi-
The Education Task Force of an IEEE-ACM Joint Steering neers 1 and 2
Committee for the Establishment of Software Engineering (Similar to first year computer science, but oriented to
developed some recommended accreditation criteria for software engineering)
undergraduate programs in software engineering (25). Data Structures and Algorithms
Although no accreditation board has yet adopted these Computer Organization
precise guidelines, it has influenced several accreditation
Programming Languages
and curriculum initiatives.
According to their accreditation guidelines, four Software Systems 1 and 2
areas exist (software engineering, computer science, (Covers operating systems, databases, and other appli-
and engineering, supporting areas suchc technical cation areas)
communication and mathematics, and advanced work
in one or more area) that are each about three-sixteenths
of the curriculum, which amounts to 2124 semester Computer Science / Software Engineering Electives (9
hours for each area in a 120-hour degree plan. (The Semester Hours)
remaining hours were left open, to be used by, for
instance, general education requirements in the United Various topics
States). As in the SEI graduate guidelines, a capstone
project is addressed explicitly.
Lab Sciences (12 Semester Hours)
Guidelines for Software Engineering Education
This project was created by a team within the Working Chemistry 1
Group for Software Engineering Education and Training Physics 1 and 2
6 EDUCATION AND TRAINING IN SOFTWARE ENGINEERING

Engineering Sciences (9 Semester Hours) Probability and Information Theory


Basic Logic
Engineering Economics
Engineering Science 1 and 2
(Provides an overview of the major engineering sciences) Computing Courses

Digital Logic
Mathematics (24 Semester Hours) Formal Languages and Automata Theory
Data Structures
Discrete Mathematics
Computer Architecture
Calculus 1, 2 and 3
Programming Languages
Probability and Statistics
Operating Systems
Linear Algebra
Compilers
Differential Equations
Databases
Software Engineering
Communication/Humanities/Social Sciences (18 Semester The Human-Computer Interface
Hours)
Note that, unlike most computing curriculum models,
Communications 1 and 2 (first year writing courses) basic programming skills are considered part of basic
Technical Writing computer literacy, whereas algorithm analysis (comput-
Humanities/Social Sciences electives ing algorithms) is treated as part of the mathematics
component. The units listed above provide for a broad
background in computer science as well as an education
Open Electives (3 Semester Hours) in basic computer engineering and software engineering
fundamentals.
Any course
This model is intended to be consistent with the IEEE-ACM Computing Curricula Software Engineering
Education Task Force recommendations and criteria for all Over the years, the ACM/IEEE-CS joint Education Task
engineering programs accredited by ABET. The nine hours Force went through several changes, eventually aligning
of engineering sciences is less than for traditional engineer- itself with similar projects being jointly pursued by the two
ing disciplines and that contained in the McMaster societies. The Software Engineering 2004 (SE 2004) project
University degree program, but more than that is required (as it was eventually named) was created to provide
in the other software engineering curriculum models. detailed undergraduate software engineering curriculum
Not much flexibility exists in this model, because only guidelines which could serve as a model for higher educa-
one technical elective outside of Computer Science/Soft- tion institutions across the world. The result of this project
ware Engineering can be taken (using the open elective). was an extensive and comprehensive document which has
However, note that the model is for a minimal number of indeed become the leading model for software engineering
semester hours (120), so additional hours could provide undergraduate curricula (27). SE 2004 was defined using
that flexibility. the following principles:
Information Processing Society of Japan (IPSJ)
1. Computing is a broad field that extends well beyond
IPSJ has developed a core curriculum model for computer the boundaries of any one computing discipline.
science and software engineering degree programs com- 2. Software Engineering draws its foundations from a
monly called J97 (18). Unlike the other curriculum models wide variety of disciplines.
discussed above, J97 defines a common core curriculum for 3. The rapid evolution and the professional nature of
every undergraduate computer science and software engi- software engineering require an ongoing review of
neering program. This core curriculum includes the follow- the corresponding curriculum. The professional asso-
ing learning units: ciations in this discipline.
Computer Literacy Courses 4. Development of a software engineering curriculum
must be sensitive to changes in technologies, prac-
Computer Science Fundamentals tices, and applications, new developments in peda-
Programming Fundamentals gogy, and the importance of lifelong learning. In a
field that evolves as rapidly as software engineering,
educational institutions must adopt explicit strate-
Mathematics Courses gies for responding to change.
5. SE 2004 must go beyond knowledge elements to offer
Discrete Mathematics significant guidance in terms of individual curricu-
Computing Algorithms lum components.
EDUCATION AND TRAINING IN SOFTWARE ENGINEERING 7

6. SE 2004 must support the identification of the Software design


fundamental skills and knowledge that all software Software verification & validation
engineering graduates must possess. Software evolution
7. Guidance on software engineering curricula must be Software process
based on an appropriate definition of software engi-
Software quality
neering knowledge.
Software management
8. SE 2004 must strive to be international in scope.
9. The development of SE2004 must be broadly based. Those KAs are then divided even more into units, and
10. SE 2004 must include exposure to aspects of profes- finally, those units are divided into topics. For example,
sional practice as an integral component of the DES.con.7 is a specific topic (Design Tradeoffs) in the
undergraduate curriculum. Design Concepts unit of the Software Design knowledge
11. SE 2004 must include discussions of strategies and area. Each topic in SEEK is also categorized for its impor-
tactics for implementation, along with high-level tance: Essential, Desired, or Optional.
recommendations. The SE 2004 document also contains recommendations
for possible curricula and courses, tailored towards models
The SE 2004 document also defines student outcomes; for specific countries and specific kinds of institutions of
that is, what is expected of graduates of a software higher-level education. Software engineering topics con-
engineering program using the curriculum guidelines con- sisted of at least 20% of the overall curriculum in each case.
tained within: Most of the models recommended for use in the United
States included some type of introduction to software engi-
1. Show mastery of the software engineering knowledge neering during the first two years of study, followed by six
and skills, and professional issues necessary to begin SE courses, with a capstone project occurring throughout
practice as a software engineer. the fourth and final (senior) year of study.
2. Work as an individual and as part of a team to develop
and deliver quality software artifacts. THE GAP BETWEEN EDUCATION AND INDUSTRY
3. Reconcile conflicting project objectives, finding accep-
table compromises within limitations of cost, time, Tim Lethbridge of the University of Ottawa has done a
knowledge, existing systems, and organizations. considerable amount of work in attempting to determine
4. Design appropriate solutions in one or more applica- what industry thinks is important knowledge for a software
tion domains using software engineering approaches professional to receive through academic and other educa-
that integrate ethical, social, legal, and economic tional venues through a series of surveys (28). The results of
concerns. these surveys show that a wide gap still exists between
5. Demonstrate an understanding of and apply current what is taught in education versus what is needed in
theories, models, and techniques that provide a basis industry. For instance, among the topics required of profes-
for problem identification and analysis, software sionals that had to be learned on the job include negotiation
design, development, implementation, verification, skills, human-computer interaction methods, real-time
and documentation. system design methods, management and leadership skills,
6. Demonstrate an understanding and appreciation for cost estimation methods, software metrics, software relia-
the importance of negotiation, effective work habits, bility and fault tolerance, ethics and professionalism prac-
leadership, and good communication with stake- tice guidelines, and requirements gathering and analysis
holders in a typical software development environ- skills. Among the topics taught in most educational pro-
ment. grams but not considered important to industry included
digital logic, analog systems, formal languages, automata
7. Learn new models, techniques, and technologies as
theory, linear algebra, physics and chemistry. Industry and
they emerge and appreciate the necessity of such
academia agreed that a few things were important,
continuing professional development.
including data structures, algorithm design, and operating
systems.
The next step was to define Software Engineering Edu-
The survey results also demonstrate that it is essential
cation Knowledge (SEEK), a collection of topics considered
for industry and academia to work together to create future
important in the education of software engineering stu-
software engineering curricula, for both groups to use their
dents. SEEK was created and reviewed by volunteers in the
resources more wisely and effectively in the development of
software engineering education community. The SEEK
software professionals in the future.
body is a three-level hierarchy, initially divided into knowl-
Another excellent article outlining the industrial view
edge areas (KAs) as follows:
was by Tockey (29). Besides stressing the need for software
practitioners to be well-versed in computer science and
Computing essentials
discrete mathematics, he identified software engineering
Mathematical and engineering fundamentals economics as an important missing link that current
Professional practice software professionals do not have when entering the work-
Software modeling and analysis force.
8 EDUCATION AND TRAINING IN SOFTWARE ENGINEERING

TRACKING SOFTWARE ENGINEERING DEGREE


PROGRAMS This paper also provided details on three successful
formal university/industry partnerships in software
Over the years, several surveys have been attempted to engineering. Through evaluation of these and other
determine what software engineering programs exist in a evaluations, Beckman et al. (36), developed a model for a
particular country or for a particular type of degree. By successful collaboration which included:
1994, 25 graduate MSE-type programs existed in the
United States, and 20 other programs with software  Formation by the university of an advisory board made
engineering options were in their graduate catalogs, up of representatives of its industrial partners.
according to an SEI survey (30) that was revised slightly  A clear definition of the goals and expectations of the
for final release in early 1996. collaboration.
Thompson and Edwards excellent article on software  Developing and executing a multiphase process for the
engineering education in the United Kingdom (31) provides
collaboration project.
an excellent list of 43 Bachelors degree and 11 Masters
programs in software engineering in the UK.
 Defining, measuring, and evaluating effectively
Doug Grant (32) of the Swinburne University of metrics for project success.
Technology reported that Bachelors degree programs
insoftware engineering were offered by at least 9 of WGSEET has documented several innovative formal
Australias 39 universities, with more being planned. industry-university collaborations in software engineering
In June 2002, Fred Otto of CCPE provided the author over the years; (37) Ref. 37 is the seventh and latest edition
with a list of 10 Canadian schools with undergraduate of their directory of such collaborations, providing details of
software engineering degree programs. 23 such formal partnerships, including the three described
Bagert has in recent years published a list of 32 under- above. The initial results of an even more recent survey by
graduate (11) and 43 Masters level (33) SE programs in the this group can be found in Ref. 38.
United States, along with some information concerning
those programs.
Currently, few doctoral programs in software engineer- TRAINING IN SOFTWARE ENGINEERING
ing exist. In the late 1990s, the first Doctor of Philosophy
(Ph.D.) programs in software engineering in the United To this point, this discussion has concentrated on academic
States were approved at the Naval Postgraduate School education, as opposed to education within industry
(34) and at the Carnegie Mellon University (35). Also, in (training). The term software engineering education and
1999, Auburn University changed its doctoral degree in training is used commonly to encompass both academic
Computer Science to Computer Science and Software education and industrial training issues.
Engineering. Starting over 20 years ago, several large companies
involved in software development began to embrace the
concept of software engineering. Faced with both a software
INDUSTRY/UNIVERSITY COLLABORATIONS development workforce mostly untrained in software
engineering skills and paucity of academic coursework in
Collaborations between industry and higher education are software engineering available, many companies began
common in engineering disciplines, where companies can developing an array of in-house courses to meet the
give students experience with real-world problems through need. Among the first of these companies was the IBM
project courses. However, formal collaborations between Software Engineering Education Program, which was
university and industry have become more frequent in the started in the late 1970s. This program was influenced
last decade. Beckman et al. (36) discussed the benefits to greatly by software engineering pioneer Harlan Mills,
industry and academia of such collaborations: who worked for IBM from 1964 to 1987.
Also among the oldest software engineering training
 Benefits to industry: programs is that of the Texas Instruments Defense Sys-
tems and Electronics Group (DSEG), which is now part of
Cost-effective, customized education and training
Influence on academic programs
Raytheon. Moore and Purvis (39) discussed the DSEG
Access to university software engineering research software training curriculum as it existed then. First, those
New revenue sources engineers assigned to develop software would take a three-
day Software Engineering Workshop for engineers,
which would introduce the workers to DSEG software
 Benefits to academia:
practices and standards, as well as DoD life cycle require-
Placement of students ments. This workshop could be followed with courses such
Insight into corporate issues at the applied, practical as software quality assurance, software configuration man-
level agement, introduction to real-time systems, structured
Research and continuing education opportunities for analysis, software design, software testing and software
faculty management.
Special funding from a corporate partner to the coop- Motorola is another example of a company that has
erating university invested considerably in the software engineering training
EDUCATION AND TRAINING IN SOFTWARE ENGINEERING 9

of its employees. Sanders and Smith (40) estimated that its THE ROLE OF PROFESSIONAL ISSUES
software engineering population at the time required
160,000 person-hours of training per year, which it pro- As software engineering has begun to evolve as a distinct
vided both through its own Motorola University, as well as discipline, various efforts have been related to profes-
through collaborations with various universities (such as sional issues in software engineering, including accred-
the one with Florida Atlantic University discussed in the itation of degree programs, the identification of the
previous section). software engineering body of knowledge, the licensing
Over the years, several companies have offered a wide and certification of software engineers, and the develop-
variety of software engineering training courses to both ment of a code of ethics and professional practices for
companies and individuals . Construx Software lists on its software engineering. The software engineering educa-
web page (41) a wide variety of training seminars. In tion and training community, recognizing the impact of
addition, Construx has a significant professional develop- professional issues on their curricula, has begun to
ment program for its own employees, employing readings, address such matters in education and training confer-
classes, discussion groups, mentoring, and so on. ences and publications.
Typically software engineering training courses offered
by companies are of length anywhere from a half-day course
SOFTWARE ENGINEERING EDUCATION CONFERENCES
associated with a meeting such as the International Con-
AND PUBLICATIONS
ference on Software Engineering to a one or two-week
stand-alone course. Generally, such courses cost
Since 1987, the Conference on Software Engineering Edu-
$5001000 U.S. per day for each registrant.
cation (CSEE&T) has become tremendously influential to
Software process improvement training has increased
the software engineering education and training commu-
significantly over the past 10 years. For instance, several of
nity worldwide. Originally created and run by the SEI, the
companies offer training services to corporations that want
conference has in recent years been sponsored by the IEEE
their software divisions to obtain ISO 9000 registration or a
Computer Society. As the conference evolved, it grew to
certain level of the Capability Maturity Model Integration
include training (hence the name change) and professional
(registered in the U.S. Patent and Trademark office). In
issues, and for a time was colocated with the ACM SIGCSE
addition, also many training courses exist in both the
(Special Interest Group on Computer Science Education)
Personal Software Process and the related Team Software
Symposium on Computer Science Education, giving edu-
Process (e.g., Ref. 42 ) (Personal Software Process and Team
cators in computer science and software engineering an
Software Process are service marks of Cargegie Mellon
opportunity to meet together and discuss issues of common
University, Pittsburgh, PA).
concern. Today, CSEE&T remains the worlds premiere
conference dedicated to software engineering education,
DISTANCE LEARNING AND WEB-BASED EDUCATION training, and professional issues.
FASE (Forum for Advancing Software engineering Edu-
Both software engineering academic and training courses cation) was started in 1991 by members of the software
have been available through various distance means over engineering education community to have an electronic
the years. A early example was the Software Engineering forum for the dissemination and discussion of events
Institutes Video Dissemination Project begun the early related to software engineering education. The original
1990s, which provided two series of courses: one to support acronym for FASE was Forum for Academic Software
academic instruction and the other to continue education. Engineering, but it was subsequently changed so that it
With the advent of the Internet and advanced was more inclusive to industrial and government training
multimedia technology, software engineering distance edu- issues. In the last few years, FASE has also covered a wide
cation has increased significantly. Synchronous and asyn- variety of professional issues. During the last few years,
chronous distance education and training in software FASE has limited its coverage mostly to announcements of
engineering allows for increased schedule flexibility for upcoming events and faculty openings. An archive of all
the participant, and it also helps to satisfy the demand issues through February 2004 is available at http://cstl-
for such courses despite the limited number of instructors csm.semo.edu/dbagert/fase.
available. Although currently no refereed journals are devoted
Carnegie Mellon offers its entire MSE degree online exclusively to software engineering education, several pub-
through the use various media. The first group of Carnegie lications have devoted special issues to the subject over the
Mellon students to graduate with an MSE without ever years, including IEEE Software, IEEE Transactions on
setting foot on campus was in August 2000 (43). Software Engineering, Journal of Systems and Software,
A survey of Masters level software engineering pro- Information and Software Technology, and Computer
grams in the United States by Bagert and Mu (33) found Science Education.
that of the 43 schools that had software engineering as the
name of the Masters degree, 24 schools deliver the pro- CONCLUSIONS AND FUTURE DIRECTIONS
grams only face-to-face, three only online, and 16 schools
provide for both or have a curriculum that has both face-to- Only a few years ago, the number of software engineer-
face and online courses. ing degree programs were consistently increasing, giving
great hope for the future. However, the rate of increase
10 EDUCATION AND TRAINING IN SOFTWARE ENGINEERING

of such programs has slowed [e.g., its status in the 2. J. E. Tomayko, Forging a discipline: an outline history of
United States was discussed by Bagert and Chenoweth software engineering education, Annals Soft. Engineer. 6: 3
(11)]. A unique opportunity in software engineering 18, 1998.
education is before the computing and engineering dis- 3. F. F. Kuo, Lets make our best people into software engineers
ciplines, one that has the potential to open both to and not computer scientists, Computer Decisions1(2): 94, 1969.
tremendous possibilities. However, this can be done 4. R. E. Fairley, Toward model curricula in software engineering,
only by a joint effort of the computing and engineering SIGCSE Bulletin, 10(3): 7779, 1978.
communities, just as BCS and IEE did in the United 5. R. W. Jensen and C. C. Tonies, Software Engineering,
Kingdom almost 20 years ago. In other countries, the Englewood Cliffs, NJ: Prentice Hall, 1979.
results of such attempted collaborations in other coun- 6. A. I. Wasserman and P. Freeman, eds., Software Engineering
tries have been at best mixed. Education: Needs and Objectives, New York: Springer-Verlag,
Industrial education, both through training courses and 1976.
from collaborations with academic institutions, will con- 7. ACM Curriculum Committee on Computer Science, Curricu-
lum 68: Recommendations for the undergraduate program in
tinue to expand as the demand for software engineers also
computer science, Communicat. ACM, 11(3): 151197, 1968.
continues to increase. This requires the continuing educa-
tion of software professionals as well as the retraining of 8. ACM Curriculum Committee on Computer Science, Curricu-
lum 78: Recommendations for the undergraduate program in
workers with backgrounds from related disciplines. The
computer science, Communicat. ACM, 22(3): 147166, 1979.
need for more collaboration between industry/university is
9. J. R. Comer and D. J. Rodjak, Adapting to changing needs: a
especially important in the face of surveys that demon-
new perspective on software engineering education at Texas
strate a distinct gap between academic educational Christian University, in N. E. Gibbs and R. E. Fairley, eds.,
outcomes and the industrial knowledge required for Software Engineering Education: The Educational Needs of the
software professionals. Software Community, New York: Springer-Verlag, 1987, pp.
It is likely that distance education will be impacting all 149171.
academic and professional disciplines in the near future. In 10. A. J. Cowling, The first decade of an undergraduate degree
addition, distance learning will be especially important for programme in software engineering, Annals Software Engi-
the software engineering community as long as instructor neer., 6: 6190, 1999.
shortages remain. 11. D. J. Bagert and S. V. Chenoweth, Future growth of software
Finally, perhaps the most critical step required for the engineering baccalaureate programs in the United States,
future of software engineering education and training is Proc. of the ASEE Annual Conference, Portland, Oregon,
the need for a true internationalization of major initia- 2005, CD-ROM, 8 pp.
tives. Many projects discussed in this article were success- 12. D. L. Parnas, Software engineering programmes are not com-
ful efforts that were developed within a single country. puter science programmes, Annals Soft. Enginee.6: 1937,
The SE 2004 project was notable in part for the fact that it 1998.
went to great lengths to be a document truly international 13. D. J. Bagert and N. R. Mead, Software engineering as a
in development and scope. Not enough communication of professional discipline, Comp. Sci. Educ., 11(1): 2001 7387,
the successes of a particular country to the international 2001.
community exists; for instance, the accomplishments of 14. G. Gillespie, ABET asks the IEEE to look at software engineer-
BCS and IEE regarding software engineering education in ing accreditation, IEEEThe Institute 21 (7): 1, 1997.
the United Kingdom over past dozen years is largely 15. D. K. Peters, Update on lawsuit about use of the term Software
unknown in the United States even today. The challenge Engineering, Forum for Advancing Software engineering Edu-
cation (FASE), 9(3): 1999.
is to use the Internet, the World Wide Web, and other
technological innovations (which were, after all, devel- 16. Association of Universities and Colleges of Canada and Council
of Professional Engineers, Software Engineering Lawsuit Dis-
oped in large part by software professionals!) to advance
continued, communique reprinted under the heading Cana-
the discipline itself even more by creating an effective and dian Lawsuit Discontinued in Forum for Advancing Software
truly global software engineering education and training engineering Education (FASE), 9(10): 1999.
community. 17. G. McCalla, Canadian news and views, Comput. Res. News,
16(4): 2004.
ACKNOWLEDGMENTS 18. Y. Matsumoto, Y. Akiyama, O. Dairiki, and T. Tamai, A case of
software engineering accreditation, Proc. of the 14th Conference
This article builds on the excellent Education and Curri- on Software Engineering Education and Training, Charlotte,
NC, 2001, pp. 201209.
cula in Software Engineering by Gary A. Ford and James
E. Tomayko, which appeared in the first edition (1994) of 19. P. Dart, L. Johnston, C. Schmidt, and L. Sonenberg, Develop-
ing an accredited software engineering program, IEEE Soft-
the Encyclopedia of Software Engineering, also published
ware, 14(6): 6671, 1997.
by John Wiley and Sons.
20. G. A. Ford, N. E. Gibbs, and J. E. Tomayko, Software Engineer-
ing Education: An Interim Report from the Software Engineer-
BIBLIOGRAPHY ing Institute, CMU/SEI-TR-87-109, Pittsburgh, PA: Carnegie
Mellon University, 1987.
1. D. T. Ross, The NATO conferences from the perspective of an 21. M. A. Ardis and G. A. Ford, 1989 SEI Report on Graduate
active software engineer, Annals Hist. Comput., 11(2): 133 Software Engineering Education, CMU/SEI-89-TR-2, Pitts-
141, 1989. burgh, PA: Carnegie Mellon University, 1989.
EDUCATION AND TRAINING IN SOFTWARE ENGINEERING 11

22. G. A. Ford, 1991 SEI Report on Graduate Software Engineering Mellon University, Forum for Advancing Software engineering
Education, CMU/SEI-91-TR-2, Pittsburgh, PA: Carnegie Mel- Education (FASE), 10(2): 2000.
lon University, 1991. 36. K. Beckman, N. Coulter, S. Khajenoori and N. Mead, Industry/
23. British Computer Society and The Institution of Electrical university collaborations: closing the gap between industry
Engineers, A Report on Undergraduate Curricula for Software and academia, IEEE Software, 14(6): 4957, 1997.
Engineering, Institution of Electrical Engineers, 1989. 37. K. Beckman, Directory of Industry and University Collabora-
24. G. A. Ford, 1990 SEl Report on Undergraduate Software tions with a Focus on Software Engineering Education and
Engineering Education, CMU/SEI-90-TR-3, Pittsburgh, PA: Training, Version 7, CMU/SEI-99-SR-001, Pittsburgh, PA:
Carnegie Mellon University, 1990. Carnegie Mellon University, 1999.
25. G. L. Engel, Program criteria For software engineering accred- 38. S. Ellis, N. R. Mead and D. Ramsey, Summary of the initial
itation programs, IEEE Software, 16(6): 3134, 1999. results of the university/industry survey performed by the
26. D. J. Bagert, T. B. Hilburn, G. Hislop, M. Lutz, M. McCracken, university/industry subgroup of the working group on software
and S. Mengel, Guidelines for Software Engineering Education engineering education and training, Forum for Advancing
Version 1.0. CMU/SEI-99-TR-032, Pittsburgh, PA: Carnegie Software Engineering Education (FASE), 11(1): 2001.
Mellon University, 1999. 39. F. L. Moore and P. R. Purvis, Meeting the training needs of
27. Joint Task Force on Computing Curricula, Software Engineer- practicing software engineers at Texas Instruments, Proc. of
ing 2004, Piscataway, NJ: IEEE Computer Society and the the Second Conference on Software Engineering Education,
Association for Computing Machinery. Fairfax, VA, 1988, pp. 3244.
28. T. Lethbridge, What knowledge is important to a software 40. G. Sanders and G. Smith, Establishing Motorola-university
professional?, IEEE Computer, 33(5): 4450, 2000. relationships: a software engineering training perspective,
29. S. Tockey, A missing link in software engineering, IEEE Soft- Proc. of the Fourth Conference on Software Engineering Edu-
cation, Pittsburgh, PA, 1990, pp. 212.
ware, 14(6): 3136, 1997.
30. G. A. Ford, A Progress Report on Undergraduate Software 41. Construx Software Construx Public Seminars. [Online]. Con-
Engineering Education, CMU/SEI-94-TR-11, Pittsburgh, strux Software, Bellvue, Washington. 2001. Available: http://
PA: Carnegie Mellon University, 1994. www.construx.com/Page.aspx?nid=12.
42. T. Hilburn, Personal Software ProcessSM and Team Software
31. J. B. Thompson and H. M. Edwards, Software engineering in
ProcessSM 2001 summer faculty workshops, Forum for Advan-
the UK 2001, Forum for Advancing Software engineering
cing Software Engineering Education (FASE), 11(3): 2001.
Education (FASE), 11(11): 2001.
43. J. E. Tomayko, Master of Software Engineering, Carnegie
32. D. Grant, Undergraduate software engineering degrees in
Mellon University, Forum for Advancing Software engineering
Australia, Proc. of the 13th Conference on Software Engineering
Education (FASE), 10: 2000.
Education and Training, Austin, Te, 2000, pp. 308309.
33. D. J. Bagert and X. Mu, Current state of software engineering
Masters X. degree programs in the United States, Proc. of the DONALD J. BAGERT
Frontiers in Education Conference, Indianapolis, Indiana, Southeast Missouri State
2005, F1G1F1G6. University
34. Luqi, Naval Postgraduate School Offers First USA PhD in Cape Girardeau, Missouri
Software Engineering, Forum for Advancing Software engi-
neering Education (FASE), 9(7): 1999.
35. D. Garlan, P. Koopman, W. Scherlis, and M. Shaw, PhD in
Software Engineering: A New Degree Program at Carnegie
E
ETHICS AND PROFESSIONAL RESPONSIBILITY resemble recognized professions such as medicine, law,
IN COMPUTING engineering, counseling, and accounting? In what ways
do computing professions resemble occupations that are
INTRODUCTION not thought of traditionally as professions, such as plum-
bers, fashion models, and sales clerks?
Computing professionals perform a variety of tasks: They Professions that exhibit certain characteristics are
write specifications for new computer systems, they design called strongty differentiated professions (1). These profes-
instruction pipelines for superscalar processors, they diag- sions include physicians and lawyers, who have special
nose timing anomalies in embedded systems, they test and rights and responsibilities. The defining characteristics
validate software systems, they restructure the back-end of a strongly differentiated profession are specialized
databases of inventory systems, they analyze packet traffic knowledge and skills, systematic research, professional
in local area networks, and they recommend security poli- autonomy, a robust professional association, and a well-
cies for medical information systems. Computing profes- defined social good associated with the profession.
sionals are obligated to perform these tasks conscientiously Members of a strongly differentiated profession have
because their decisions affect the performance and func- specialized knowledge and skills, often called a body
tionality of computer systems, which in turn affect the of knowledge, gained through formal education and prac-
welfare of the systems users directly and that of other tical experience. Although plumbers also have special
people less directly. For example, the software that controls knowledge and skills, education in the trades such as
the automatic transmission of an automobile should mini- plumbing emphasizes apprenticeship training rather
mize gasoline consumption and, more important, ensure than formal education. An educational program in a pro-
the safety of the driver, any passengers, other drivers, and fessional school teaches students the theoretical basis of
pedestrians. a profession, which is difficult to learn without formal
The obligations of computing professionals are similar to education. A professional school also socializes students
the obligations of other technical professionals, such as civil to the values and practices of the profession. Engineering
engineers. Taken together, these professional obligations schools teach students to value efficiency and to reject
are called professional ethics. Ethical obligations have been shoddy work. Medical schools teach students to become
studied by philosophers and have been articulated by reli- physicians, and law schools teach future attorneys.
gious leaders for many years. Within the discipline of Because professional work has a significant intellectual
philosophy, ethics encompasses the study of the actions component, entry into a profession often requires a
that a responsible individual should choose, the values that post-baccalaureate degree such as the M.S.W. (Master of
an honorable individual should espouse, and the character Social Work) or the Psy.D. (Doctor of Psychology).
that a virtuous individual should have. For example, every- Professionals value the expansion of knowledge through
one should be honest, fair, kind, civil, respectful, and systematic research; they do not rely exclusively on the
trustworthy. Besides these general obligations that every- transmission of craft traditions from one generation to the
one shares, professionals have additional obligations that next. Research in a profession is conducted by academic
originate from the responsibilities of their professional members of the professioin and sometimes by practitioner
work and their relationships with clients, employers, other members too- Academic physicians, for example, conduct
professionals, and the public. medical research. Because professionals understand that
The ethical obligations of computing professionals go professional knowledge always advances, professionals
beyond complying with laws or regulations; laws often lag should also engage in continuing education by reading
behind advances in technology. For example, before the publications and attending conferences. Professionals
passage of the Electronic Communications Privacy Act of should share general knowledge of their fields, rather
1986 in the United States, government officials did not than keeping secrets of a guild. Professionals are obligated,
require a search warrant to collect personal information however, to keep specific information about clients confi-
transmitted over computer communication networks. dential.
Nevertheless, even in the absence of a privacy law before Professionals tend to have clients, not customers.
1986, computing professionals should have been aware of Whereas a sales clerk should try to satisfy the customers
the obligation to protect the privacy of personal informa- desires, the professional should try to meet the clients
tion. needs (consistent with the welfare of the client and the
public). For example, a physician should not give a patient a
prescription for barbiturates just because the patient wants
WHAT IS A PROFESSION? the drugs but only if the patients medical condition war-
rants the prescription.
Computing professionals include hardware designers, soft- Because professionals have specialized knowledge, cli-
ware engineers, database administrators, system analysts, ents cannot fully evaluate the quality of services provided
and computer scientists. In what ways do these occupations by professionals. Only other members of a profession, the

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING

professionals peers, can sufficiently determine the quality manufacturer. Furthermore, the software engineer should
of professional work. The principle of peer review underlies prevent harm to the ultimate users of the appliance and to
accreditation and licensing activities: Members of a profes- others who might be affected by the appliance. Thus, the
sion evaluate the quality of an educational program for computing professionals relationship with a client and
accreditation, and they set the requirements for the licen- with the public might be indirect.
sing of individuals. For example, in the United States, a The obligations of computing professionals to clients,
lawyer must pass a states bar examination to be licensed to employers, and the public are expressed in several codes of
practice in that state. (Most states have reciprocity ethics. The later section on codes of ethics reviews two codes
arrangementsa professional license granted by one state that apply to computing professionals.
is recognized by other states.) The license gives profes- Although the computing professions meet many criteria
sionals legal authority and privileges that are not available of other professions, they are deficient in significant ways.
to unlicensed individuals. For example, a licensed physi- Unlike academic programs in engineering, relatively few
cian may legitimately prescribe medications and perform academic programs in computing are accredited. Further-
surgery, which are activities that should not be performed more, in the United States, computing professionals cannot
by people who are not medical professionals. be licensed, except that software engineers can be licensed
Through accreditation and licensing, the public cedes in Texas. As of this writing, the Association for Computing
control over a profession to members of the profession. In Machinery (ACM) has reaffirmed its opposition to state-
return for this autonomy, the profession promises to serve sponsored licensing of individuals (2). Computing profes-
the public good. Medicine is devoted to advancing human sionals may earn proprietary certifications offered by cor-
health, law to the pursuit of justice, and engineering to the porations such as Cisco, Novell, Sun, and Microsoft. In the
economical construction of safe and useful objects. As an United States, the American Medical Association domi-
example of promoting the public good over the pursuit of nates the medical profession, and the American Bar Asso-
self-interest, professionals are expected to provide services ciation dominates the legal profession, but no single
to some indigent clients without charge. For instance, organization defines the computing profession. Instead,
physicians volunteer at free clinics, and they serve in multiple distinct organizations exist, including the ACM,
humanitarian missions to developing countries. Physicians the Institute of Electrical and Electronics Engineers Com-
and nurses are expected to render assistance in cases of puter Society (IEEE-CS), and the Association of Informa-
medical emergencyfor instance, when a train passenger tion Technology Professionals (AIPT). Although these
suffers a heart attack. In sum, medical professionals have organizations cooperate on some projects, they remain
special obligations that those who are not medical profes- largely distinct, with separate publications and codes of
sionals do not have. ethics.
The purposes and values of a profession, including its Regardless of whether computing professions are
commitment to a public good, are expressed by its code of strongly differentiated, computing professionals have
ethics. A fortiori, the creation of a code of ethics is one mark important ethical obligations, as explained in the remain-
of the transformation of an occupation into a profession. der of this article.
A professions code of ethics is developed and updated by
a national or international professional association. This
WHAT IS MORAL RESPONSIBILITY IN COMPUTING?
association publishes periodicals and hosts conferences to
enable professionals to continue their learning and to net-
In the early 1980s Atomic Energy of Canada Limited
work with other members of the profession. The association
(AECL) manufactured and sold a cancer radiation treat-
typically organizes the accreditation of educational pro-
ment machine called the Therac 25, which relied on com-
grams and the licensing of individual professionals.
puter software to control its operation. Between 1985 and
Do computing professions measure up to these criteria
1987, the Therac-25 caused the deaths of three patients and
for a strongly differentiated profession? To become a com-
serious injuries to three others (3). Who was responsible for
puting professional, an individual must acquire specialized
the accidents? The operator who administered the massive
knowledge about discrete algorithms and relational data-
radiation overdoses, which produced severe burns? The
base theory and specialized skills such as software devel-
software developers who wrote and tested the control soft-
opment techniques and digital system design. Computing
ware, which contained several serious errors? The system
professionals usually learn this knowledge and acquire
engineers who neglected to install the backup hardware
these skills by earning a baccalaureate degree in computer
safety mechanisms that had been used in previous versions
science, computer engineering, information systems, or a
of the machine? The manufacturer, AECL? Government
related field. As in engineering, a bachelors degree cur-
agencies? We can use the Therac-25 case to distinguish
rently suffices for entry into the computing professions. The
among four different kinds of responsibility (4,5).
knowledge base for computing expands through research in
computer science conducted in universities and in indus-
Causal Responsibility
trial and government laboratories.
Like electrical engineers, most computing professionals Responsibility can be attributed to causes: For example,
work for employers, who might not be the professionals the tornado was responsible for damaging the house. In
clients. For example, a software engineer might develop the Therac-25 case, the proximate cause of each accident
application software that controls a kitchen appliance; the was the operator, who started the radiation treatment. But
engineers employer might be different from the appliance just as the weather cannot be blamed for a moral failing, the
ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING 3

Therac-25 operators cannot be blamed because they fol- have an obligation to seek the assistance of a statistician
lowed standard procedures, and the information displayed who can analyze the data correctly. Different team mem-
on the computer monitors was cryptic and misleading. bers might work with the statistician in different ways, but
they should hold each other accountable for their individual
Role Responsibility roles in correcting the mistakes. Finally, the team has a
collective moral responsibility to inform readers of the
An individual who is assigned a task or function is con- teams initial report about the mistakes and the correction.
sidered the responsible person for that role. In this sense, Moral responsibility for recklessness and negligence is
a foreman in a chemical plant may be responsible for not mitigated by the presence of good intentions or by the
disposing of drums of toxic waste, even if a forklift opera- absence of bad consequences. Suppose a software tester
tor actually transfers the drums from the plant to the neglects to sufficiently test a new module for a telephone
truck. In the Therac-25 case, the software developers and switching system, and the module fails. Although the sub-
system engineers were assigned the responsibility of sequent telephone service outages are not intended, the
designing the software and hardware of the machine. software tester is morally responsible for the harms caused
Insofar as their designs were deficient, they were respon- by the outages. Suppose a hacker installs a keystroke
sible for those deficiencies because of their roles. Even if logging program in a deliberate attempt to steal passwords
they had completed their assigned tasks, however, their at a public computer. Even if the program fails to work, the
role responsibility may not encompass the full extent of hacker is still morally responsible for attempting to invade
their professional responsibilities. the privacy of users.
An individual can be held morally responsible both for
Legal Responsibility acting and for failing to act. For example, a hardware
An individual or an organization can be legally responsible, engineer might notice a design flaw that could result in a
or liable, for a problem. That is, the individual could be severe electrical shock to someone who opens a personal
charged with a crime, or the organization could be liable for computer system unit to replace a memory chip. Even if the
damages in a civil lawsuit. Similarly, a physician can be engineer is not specifically assigned to check the electrical
sued for malpractice. In the Therac-25 case, AECL could safety of the system unit, the engineer is morally respon-
have been sued. One kind of legal responsibility is strict sible for calling attention to the design flaw, and the engi-
liability: If a product injures someone, then the manufac- neer can be held accountable for failing to act.
turer of the product can be found liable for damages in a Computing systems often obscure accountability (5). In
lawsuit, even if the product met all applicable safety stan- particular, in an embedded system such as the Therac-25,
dards and the manufacturer did nothing wrong. The prin- the computer that controls the device is hidden. Computer
ciple of strict liability encourages manufacturers to be users seem resigned to accepting defects in computers and
careful, and it provides a way to compensate victims of software that cause intermittent crashes and losses of data.
accidents. Errors in code are called bugs, regardless of whether they
are minor deficiencies or major mistakes that could cause
fatalities. In addition, because computers seem to act
Moral Responsibility
autonomously, people tend to blame the computers them-
Causal, role, and legal responsibilities tend to be exclusive: selves for failing, instead of the professionals who designed,
If one individual is responsible, then another is not. In programmed, and deployed the computers.
contrast, moral responsibility tends to be shared: many
engineers are responsible for the safety of the products that
WHAT ARE THE RESPONSIBILITIES OF COMPUTING
they design, not just a designated safety engineer. Further-
PROFESSIONALS?
more, rather than assign blame for a past event, moral
responsibility focuses on what individuals should do in the
future. In the moral sense, responsibility is a virtue: A
Responsibilities to Clients and Users
responsible person is careful, considerate, and trust-
worthy; an irresponsible person is reckless, inconside- Whether a computing professional works as a consultant to
rate, and untrustworthy. an individual or as an employee in a large organization, the
Responsibility is shared whenever multiple individuals professional is obligated to perform assigned tasks compe-
collaborate as a group, such as a software development tently, according to professional standards. These profes-
team. When moral responsibility is shared, responsibility is sional standards include not only attention to technical
not atomized to the point at which no one in the group is excellence but also concern for the social effects of compu-
responsible. Rather, each member of the group is accoun- ters on operators, users, and the public. When assessing the
table to the other members of the group and to those whom capabilities and risks of computer systems, the professional
the groups work might affect, both for the individuals own must be candid: The professional must report all relevant
actions and for the effects of their collective effort. For findings honestly and accurately. When designing a new
example, suppose a computer network monitoring team computer system, the professional must consider not only
has made mistakes in a complicated statistical analysis of the specifications of the client but also how the system
network traffic data, and that these mistakes have changed might affect the quality of life of users and others. For
the interpretation of the reported results. If the team example, a computing professional who designs an infor-
members do not reanalyze the data themselves, they mation system for a hospital and should allow speedy access
4 ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING

by physicians and nurses and yet protect patients medical professional must keep this information confidential.
records from unauthorized access; the technical require- Besides trade secrets, the professional must also honor
ment to provide fast access may conflict with the social other forms of intellectual property owned by the employer:
obligation to ensure patients privacy. The professional does not have the right to profit from
Computing professionals enjoy considerable freedom in independent sale or use of this intellectual property, includ-
deciding how to meet the specifications of a computer ing software developed with the employers resources.
system. Provided that they meet the minimum perfor- Every employee is expected to work loyally on behalf of
mance requirements for speed, reliability, and functional- the employer. In particular, professionals should be aware
ity, within an overall budget, they may choose to invest of potential conflicts of interest, in which loyalty might be
resources to decrease the response time rather than to owed to other parties besides the employer. A conflict of
enhance a graphical user interface, or vice versa. Because interest occurs when a professional is asked to render a
choices involve tradeoffs between competing values, com- judgment, but the professional has personal or financial
puting professionals should identify potential biases in interests that may interfere with the exercise of that judg-
their design choices (6). For example, the designer of a ment. For instance, a computing professional may be
search engine for an online retailer might choose to display responsible for ordering computing equipment, and an
the most expensive items first. This choice might favor the equipment vendor owned by the professionals spouse
interest of the retailer, to maximize profit, over the interest might submit a bid. In this case, others would perceive
of the customer, to minimize cost. that the marriage relationship might bias the professionals
Even moderately large software artifacts (computer judgment. Even if the spouses equipment would be the best
programs) are inherently complex and error-prone. choice, the professionals judgment would not be trust-
Furthermore, software is generally becoming more com- worthy. In a typical conflict of interest situation, the pro-
plex. It is therefore reasonable to assume that all software fessional should recuse herself: that is, the professional
artifacts have errors. Even if a particular artifact does not should remove herself and ask another qualified person
contain errors, it is extremely difficult to prove its correct- to make the decision.
ness. Faced with these realities, how can a responsible Many computing professionals have managerial duties,
software engineer release software that is likely to fail and some are solely managers. Managerial roles complicate
sometime in the future? Other engineers confront the the responsibilities of computing professionals because
same problem, because all engineering artifacts eventually managers have administrative responsibilities and inter-
fail. Whereas most engineering artifacts fail because phy- ests within their organizations in addition to their profes-
sical objects wear out, software artifacts are most likely to sional responsibilities to clients and the public.
fail because of faults designed into the original artifact. The
intrinsically faulty nature of software distinguishes it from Responsibilities to Other Professionals
light bulbs and I-beams, for example, whose failures are
Although everyone deserves respect from everyone else,
easier to predict statistically.
when professionals interact with each other, they should
To acknowledge responsibilities for the failure of soft-
demonstrate a kind of respect called collegiality. For exam-
ware artifacts, software developers should exercise due
ple, when one professional uses the ideas of a second
diligence in creating software, and they should be as candid
professional, the first should credit the second. In a
as possible about both known and unknown faults in the
research article, an author gives credit by properly citing
softwareparticularly software for safety-critical systems,
the sources of ideas from other authors in previously pub-
in which a failure can threaten the lives of people. Candor
lished articles. Using these ideas without attribution con-
by software developers would give software consumers
stitutes plagiarism. Academics consider plagiarism
a better chance to make reasonable decisions about soft-
unethical because it represents the theft of ideas and the
ware before they buy it (7). Following an established tradi-
misrepresentation of those ideas as the plagiarists own.
tion in medicine, Miller (8) advocates software informed
Because clients cannot adequately evaluate the quality
consent as a way to formalize an ethical principle that
of professional service, individual professionals know that
requires openness from software developers. Software
their work must be evaluated by other members of the same
informed consent requires software developers to reveal,
profession. This evaluation, called peer review occurs in
using explanations that are understandable to their cus-
both practice and research. Research in computing is pre-
tomers, the risks of their software, including the likelihoods
sented at conferences and is published in scholarly jour-
of known faults and the probabilities that undiscovered
nals. Before a manuscript that reports a research project
faults still exist. The idea of software informed consent
can be accepted for a conference or published in a journal,
motivates candor and requires continuing research into
the manuscript must be reviewed by peer researchers who
methods of discovering software faults and measuring risk.
are experts in the subject of the manuscript.
Because computing professionals work together, they
Responsibilities to Employers
must observe professional standards. These standards of
Most computing professionals work for employers. The practice are created by members of the profession or within
employment relationship is contractual: The professional organizations. For example, in software development, one
promises to work for the employer in return for a salary and standard of practice is a convention for names of variables
benefits. Professionals often have access to the employers in code. By following coding standards, a software devel-
proprietary information such as trade secrets, and the oper can facilitate the work of a software maintainer who
ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING 5

subsequently modifies the code. For many important issues ment of the Bay Area Rapid Transit (BART) system near
for which standards would be appropriate theoretically, San Francisco (9). In the early 1970s, three BART engi-
however, standards in software engineering are contro- neers became alarmed by deficiencies in the design of the
versial, informal, or nonexistent. An example of this pro- electronics and software for the automatic train control
blem is the difficulties encountered when the IEEE and the system, deficiencies that could have endangered passen-
ACM attempted to standardize a body of knowledge for gers on BART trains. The engineers raised their concerns
software engineering to enable the licensing of software within the BART organization without success. Finally,
engineers. they contacted a member of the BART board of directors,
Senior professionals have an obligation to mentor junior who passed their concerns to Bay Area newspapers. The
professionals in the same field. Although professionals are three engineers were immediately fired for disloyalty. They
highly educated, junior members of a profession require were never reinstated, even when an accident proved their
additional learning and experience to develop professional concerns were valid. When the engineers sued the BART
judgment. This learning is best accomplished under the managers, the IEEE filed an amicus curiae brief on the
tutelage of a senior professional. In engineering, to earn a engineers behalf, stating that engineering codes of ethics
P.E. license, a junior engineer must work under the super- required the three engineers to act to protect the safety of
vision of a licensed engineer for at least four years. More the public. The next section describes codes of ethics for
generally, professionals should assist each other in conti- computing professionals.
nuing education and professional development, which are
generally required for maintaining licensure.
CODES OF ETHICS
Professionals can fulfill their obligations to contribute to
the profession volunteering. The peer review of research
For each profession, the professionals obligations to cli-
publications depends heavily on volunteer reviewers and
ents, employers, other professionals, and the public are
editors, and the activities of professional associations are
stated explicitly in the professions code of ethics or code of
conducted by committees of volunteers.
professional conduct. For computing professionals, such
codes have been developed by ACM, the British Computer
Responsibilities to the Public
Society (BCS), the, IEEE-CS, the AITP, the Hong Kong
According to engineering codes of ethics, the engineers Computer Society, the Systems Administrators Special
most important obligation is to ensure the safety, health, Interest Group of USENEX (SAGE), and other associa-
and welfare of the public. Although everyone must avoid tions. Two of these codes will be described briefly here:
endangering others, engineers have a special obligation to the ACM code and the Software Engineering Code jointly
ensure the safety of the objects that they produce. Comput- approved by the IEEE-CS and the ACM.
ing professionals share this special obligation to guarantee The ACM is one of the largest nonprofit scientific and
the safety of the public and to improve the quality of life of educational organization devoted to computing. In 1966 and
those who use computers and information systems. 1972, the ACM published codes of ethics for computing
As part of this obligation, computing professionals professionals. In 1992, the ACM adopted the current Code
should enhance the publics understanding of computing. of Ethics and Professional Conduct (10), which appears in
The responsibility to educate the public is a collective Appendix 1. Each statement of the code is accompanied by
responsibility of the computing profession as a whole; interpretive guidelines. For example, the guideline for state-
individual professionals might fulfill this responsibility ment 1.8, Honor confidentiality, indicates that other ethical
in their own ways. Examples of such public service include imperatives such as complying with a law may take prece-
advising a church on the purchase of computing equipment dence.Unlike ethicscodesforotherprofessions,one sectionof
and writing a letter to the editor of a newspaper about the ACM code states the ethical obligations of organiza-
technical issues related to proposed legislation to regulate tional leaders, who are typically technical managers.
the Internet. The ACM collaborated with the IEEE-CS to produce the
It is particularly important for computing professionals Software Engineering Code of Ethics and Professional
to contribute their technical knowledge to discussions Practice (11). Like the ACM code, the Software Engineering
about public policies regarding computing. Many commu- Code also includes the obligations of technical managers.
nities are considering controversial measures such as the This code is notable in part because it was the first code to
installation of Web filtering software on public access com- focus exclusively on software engineers, not on other com-
puters in libraries. Computing professionals can partici- puting professionals. This code is broken into a short ver-
pate in communities decisions by providing technical facts. sion is composed of and a long version. The short version is
Technological controversies involving the social impacts of composed of a preamble and eight short principles; this
computers are covered in a separate article of this encyclo- version appears in Appendix 2. The long version expands on
pedia. the eight principles with multiple clauses that apply the
When a technical professionals obligation of loyalty to principles to specific issues and situations.
the employer conflicts with the obligation to ensure the Any code of ethics is necessarily incompleteno docu-
safety of the public, the professional may consider whistle- ment can address every possible situation. In addition, a
bhwing, that is, alerting people outside the employers code must be written in general language; each statement
organization to a serious, imminent threat to public safety. in a code requires interpretation to be applied in specific
Computer engineers blew the whistle during the develop- circumstances. Nevertheless, a code of ethics can serve
6 ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING

multiple purposes (12,13). A code can inspire members of a tions. For example, a hacker may try to justify gaining
profession to strive for the professions ideals. A code can unauthorized access to unsecured data by reasoning that
educate new members about their professional obligations, because the data are not protected, anyone should be able to
and tell nonmembers what they may expect members to do, read it. But by analogy, someone who finds the front door of
A code can set standards of conduct for professionals and a house unlocked is not justified in entering the house and
provide a basis for expelling members who violate these snooping around. Entering an unlocked house is trespas-
standards. Finally, a code may support individuals in sing, and trespassing violates the privacy of the houses
making difficult decisions. For example, because all engi- occupants.
neering codes of ethics prioritize the safety and welfare of When making ethical decisions, computing profes-
the public, an engineer can object to unsafe practices not sionals can rely not only on general moral reasoning but
merely as a matter of individual conscience but also with also on specific guidance from codes of ethics, such as the
the full support of the consensus of the profession. The ACM Code of Ethics (10). Here is a fictional example of that
application of a code of ethics for making decisions is high- approach.
lighted in the next section.

Scenario: XYZ Corporation plans to monitor secretly


ETHICAL DECISION MAKING FOR COMPUTING
the Web pages visited by its employees, using a data
PROFESSIONALS
mining program to analyze the access records. Chris, an
engineer at XYZ, recommends that XYZ purchase a data
Every user of e-mail has received unsolicited bulk commer-
mining program from Robin, an independent contractor,
cial e-mail messages, known in a general way as spam. (A
without mentioning that Robin is Chriss domestic part-
precise definition of spam has proven elusive and is
ner. Robin had developed this program while previously
controversial; most people know spam when they see it,
employed at UVW Corporation, without the awareness
but legally and ethically a universally accepted definition
of anyone at UVW.
has not yet emerged.) A single spam broadcast can initiate
Analysis: First, the monitoring of Web accesses
millions of messages. Senders of spam claim that they are
intrudes on employees privacy; it is analogous to eaves-
exercising their free speech rights, and few laws have been
dropping on telephone calls. Professionals should
attempted to restrict it. In the United States, no federal law
respect the privacy of individuals (ACM Code 1.7,
prohibited spamming before the CAN-SPAM Act of 2003.
Respect the privacy of others, and 3.5, Articulate and
Even now, the CAN-SPAM law does not apply to spam
support policies that protect the dignity of users and
messages that originate in other countries. Although some
others affected by a computing system). Second, Chris
prosecutions have occurred using the CAN-SPAM Act,
has a conflict of interest because the sale would benefit
most people still receive many e-mail messages that they
Chriss domestic partner. By failing to mention this
consider spam.
relationship, Chris was disingenuous (ACM Code 1.3,
Some spam messages are designed to be deceptive and
Be honest and trustworthy). Third, because Robin devel-
include intentionally inaccurate information, but others
oped the program while working at UVW, some and
include only accurate information. Although most spam-
perhaps all of the property rights belong to UVW. Robin
ming is not illegal, even honest spamming is considered
probably signed an agreement that software developed
unethical by many people, for the following reasons. First,
while employed at UVW belongs to UVW. Professionals
spamming has bad consequences: It wastes the time of
should honor property rights and contacts (ACM Code
recipients who must delete junk e-mail messages, and these
1.5, Honor property rights including copyrights and
messages waste space on computers; in addition, spam-
patent, and 2.6, Honor contracts, agreements, and
ming reduces users trust in e-mail. Second, spamming is
assigned responsibilities).
not reversible: Senders of spam do not want to receive spam.
Third, spamming could not be allowed as a general practice:
If everyone attempted to broadcast spam messages to wide Applying a code of ethics might not yield a clear solution
audiences, computer networks would become clogged with of an ethical problem because different principles in a code
unwanted e-mail messages, and no one could communicate might conflict. For instance, the principles of honesty and
via e-mail at all. confidentiality conflict when a professional who is ques-
The three reasons advanced against spam correspond to tioned about the technical details of the employers forth-
three ways in which the morality of an action can be eval- coming product must choose between answering the
uated: first, whether on balance the action results in more question completely and keeping the information secret.
good consequences than bad consequences; second, whether Consequently, more sophisticated methods have been
the actor would be willing to trade places with someone developed for solving ethical problems. Maner (14) has
affected by the action: and third, whether everyone (in a studied and collected what he calls procedural ethics,
similar situation) could choose the same action as a general step-by-step ethical reasoning procedures . . . that may
rule. These three kinds of moral reasons correspond to three prove useful to computing professionals engaged in ethical
of the many traditions in philosophical ethics: consequenti- decision-making. Maners list includes a method specia-
alism, the Golden Rule, and duty-based ethics. lized for business ethics (15), a paramedic method (16), and
Ethical issues in the use of computers can also be eval- a procedure from the U.S. Department of Defense (17).
uated through the use of analogies to more familiar situa- These procedures appeal to the problem-solving ethos of
ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING 7

engineering, and they help professionals avoid specific addresses additional, more specific considerations of pro-
traps that might otherwise impair a professionals ethical fessional conduct. Statements in Section 3 pertain more
judgment. No procedural ethics method should be inter- specifically to individuals who have a leadership role,
preted as allowing complete objectivity or providing a whether in the workplace or in a volunteer capacity such
mechanical algorithm for reaching a conclusion about an as with organizations like ACM. Principles involving
ethical problem, however, because all professional ethics compliance with this Code are given in Section 4.
issues of any complexity require subtle and subjective The Code shall be supplemented by a set of Guidelines,
judgments. which provide explanation to assist members in dealing
with the various issues contained in the Code. It is expected
that the Guidelines will be changed more frequently than
COMPUTING AND THE STUDY OF ETHICS: THE ETHICAL the Code.
CHALLENGES OF ARTIFICIAL INTELLIGENCE The Code and its supplemented Guidelines are intended
AND AUTONOMOUS AGENTS to serve as a basis for ethical decision making in the conduct
of professional work. Secondarily, they may serve as a basis
Many ethical issues, such as conflict of interest, are com- for judging the merit of a formal complaint pertaining to
mon to different professions. In computing and engineer- violation of professional ethical standards.
ing, however, unique ethical issues develop from the It should be noted that although computing is not men-
creation of machines whose outward behaviors resemble tioned in the imperatives of Section 1, the Code is concerned
human behaviors that we consider intelligent. As with how these fundamental imperatives apply to ones
machines become more versatile and sophisticated, and conduct as a computing professional. These imperatives are
as they increasingly take on tasks that were once assigned expressed in a general form to emphasize that ethical
only to humans, computing professionals and engineers principles which apply to computer ethics are derived
must rethink their relationship to the artifacts they design, from more general ethical principles.
develop, and then deploy. It is understood that some words and phrases in a code of
For many years, ethical challenges have been part of ethics are subject to varying interpretations, and that any
discussions of artificial intelligence. Indeed, two classic ethical principle may conflict with other ethical principles
references in the field are by Norbert Wiener in 1965 (18) in specific situations. Questions related to ethical conflicts
and by Joseph Weizenbaum in 1976 (19). Since the 1990s, can best be answered by thoughtful consideration of funda-
the emergence of sophisticated autonomous agents, mental principles, rather than reliance on detailed regula-
including Web bots and physical robots, has intensified tions.
the ethical debate. Two fundamental issues are of immedi-
ate concern: the responsibility of computing professionals
who create these sophisticated machines, and the notion 1. GENERAL MORAL IMPERATIVES
that the machines themselves will, if they have not
already done so, become sufficiently sophisticated so As an ACM member I will . . ..
that they will be considered themselves moral agents,
capable of ethical praise or blame independent of the 1.1 Contribute to society and human well-being
engineers and scientists who developed them. This area
This principle concerning the quality of life of all people
of ethics is controversial and actively researched. A full
affirms an obligation to protect fundamental human rights
discussion of even some of the nuances is beyond the scope
and to respect the diversity of all cultures. An essential aim
of this article. Recent essays by Floridi and Sanders (20)
of computing professionals is to minimize negative conse-
and Himma (21) are two examples of influential ideas in
quences of computing systems, including threats to health
the area.
and safety. When designing or implementing systems,
computing professionals must attempt to ensure that the
APPENDIX 1. ACM CODE OF ETHICS AND PROFESSIONAL products of their efforts will be used in socially responsible
CONDUCT ways, will meet social needs, and will avoid harmful effects
to health and welfare.
http://www.acm.org/about/code-of-ethics. In addition to a safe social environment, human well-
being includes a safe natural environment. Therefore,
computing professionals who design and develop systems
PREAMBLE must be alert to, and make others aware of, any potential
damage to the local or global environment.
Commitment to ethical professional conduct is expected of
every member (voting members, associate members, and
1.2 Avoid harm to others
student members) of the Association for Computing
Machinery (ACM). Harm means injury or negative consequences, such as
This Code, consisting of 24 imperatives formulated as undesirable loss of information, loss of property, property
statements of personal responsibility, identifies the ele- damage, or unwanted environmental impacts. This prin-
ments of such a commitment. It contains many, but not ciple prohibits use of computing technology in ways that
all, issues professionals are likely to face. Section 1 out- result in harm to any of the following: users, the general
lines fundamental ethical considerations, while Section 2 public, employees, employers. Harmful actions include
8 ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING

intentional destruction or modification of files and Inequities between different groups of people may
programs leading to serious loss of resources or unneces- result from the use or misuse of information and technol-
sary expenditure of human resources such as the time ogy. In a fair society, all individuals would have equal
and effort required to purge systems of computer opportunity to participate in, or benefit from, the use of
viruses. computer resources regardless of race, sex, religion, age,
Well-intended actions, including those that accom- disability, national origin or other such similar factors.
plish assigned duties, may lead to harm unexpectedly. However, these ideals do not justify unauthorized use of
In such an event the responsible person or persons are computer resources nor do they provide an adequate
obligated to undo or mitigate the negative consequences basis for violation of any other ethical imperatives of
as much as possible. One way to avoid unintentional harm this code.
is to carefully consider potential impacts on all those
affected by decisions made during design and implemen- 1.5 Honor property rights including copyrights and patent
tation.
To minimize the possibility of indirectly harming others, Violation of copyrights, patents, trade secrets and the terms
computing professionals must minimize malfunctions by of license agreements is prohibited by law in most circum-
following generally accepted standards for system design stances. Even when software is not so protected, such
and testing. Furthermore, it is often necessary to assess the violations are contrary to professional behavior. Copies
social consequences of systems to project the likelihood of of software should be made only with proper authorization.
any serious harm to others. If system features are misre- Unauthorized duplication of materials must not be con-
presented to users, coworkers, or supervisors, the indivi- doned
dual computing professional is responsible for any
resulting injury. 1.6 Give proper credit for intellectual property
In the work environment the computing professional Computing professionals are obligated to protect the
has the additional obligation to report any signs of system integrity of intellectual property. Specifically, one must
dangers that might result in serious personal or social not take credit for others ideas or work, even in cases
damage. If ones superiors do not act to curtail or mitigate where the work has not been explicitly protected by copy-
such dangers, it may be necessary to blow the whistle to right, patent, etc.
help correct the problem or reduce the risk. However,
capricious or misguided reporting of violations can, itself,
1.7 Respect the privacy of others
be harmful. Before reporting violations, all relevant aspects
of the incident must be thoroughly assessed. In particular, Computing and communication technology enables the
the assessment of risk and responsibility must be credible. collection and exchange of personal information on a scale
It is suggested that advice be sought from other computing unprecedented in the history of civilization. Thus there is
professionals. See principle 2.5 regarding thorough evalua- increased potential for violating the privacy of individuals
tions. and groups. It is the responsibility of professionals to
maintain the privacy and integrity of data describing
1.3 Be honest and trustworthy individuals. This includes taking precautions to ensure
the accuracy of data, as well as protecting it from unauthor-
Honesty is an essential component of trust. Without trust
ized access or accidental disclosure to inappropriate
an organization cannot function effectively. The honest
individuals. Furthermore, procedures must be established
computing professional will not make deliberately false
to allow individuals to review their records and correct
or deceptive claims about a system or system design, but
inaccuracies.
will instead provide full disclosure of all pertinent system
This imperative implies that only the necessary
limitations and problems.
amount of personal information be collected in a system,
A computer professional has a duty to be honest about
that retention and disposal periods for that information
his or her own qualifications, and about any circumstances
be clearly defined and enforced, and that personal infor-
that might lead to conflicts of interest.
mation gathered for a specific purpose not be used for
Membership in volunteer organizations such as ACM
other purposes without consent of the individual(s).
may at times place individuals in situations where their
These principles apply to electronic communications,
statements or actions could be interpreted as carrying the
including electronic mail, and prohibit procedures that
weight of a larger group of professionals. An ACM mem-
capture or monitor electronic user data, including mes-
ber will exercise care to not misrepresent ACM or positions
sages, without the permission of users or bona fide
and policies of ACM or any ACM units.
authorization related to system operation and mainte-
nance. User data observed during the normal duties
1.4 Be fair and take action not to discriminate
of system operation and maintenance must be treated
The values of equality, tolerance, respect for others, and the with strictest confidentiality, except in cases where it is
principles of equal justice govern this imperative. Discri- evidence for the violation of law, organizational regula-
mination on the basis of race, sex, religion, age, disability, tions, or this Code. In these cases, the nature or contents
national origin, or other such factors is an explicit violation of that information must be disclosed only to proper
of ACM policy and will not be tolerated. authorities.
ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING 9

1.8 Honor confidentiality 2.5 Give comprehensive and thorough evaluations of


computer systems and their impacts, including analysis
The principle of honesty extends to issues of confidentiality
of possible risks
of information whenever one has made an explicit promise
to honor confidentiality or, implicitly, when private infor- Computer professionals must strive to be perceptive, thor-
mation not directly related to the performance of ones ough, and objective when evaluating, recommending, and
duties becomes available. The ethical concern is to respect presenting system descriptions and alternatives. Compu-
all obligations of confidentiality to employers, clients, and ter professionals are in a position of special trust, and
users unless discharged from such obligations by require- therefore have a special responsibility to provide objective,
ments of the law or other principles of this Code. credible evaluations to employers, clients, users, and the
public. When providing evaluations the professional must
also identify any relevant conflicts of interest, as stated in
2 MORE SPECIFIC PROFESSIONAL RESPONSIBILITIES imperative 1.3.
As noted in the discussion of principle 1.2 on avoiding
As an ACM computing professional I will . . .. harm, any signs of danger from systems must be reported to
those who have opportunity and/or responsibility to resolve
2.1 Strive to achieve the highest quality, effectiveness them. See the guidelines for imperative 1.2 for more details
and dignity in both the process and products concerning harm, including the reporting of professional
of professional work violations.
Excellence is perhaps the most important obligation of a
professional. The computing professional must strive to
2.6 Honor contracts, agreements, and assigned
achieve quality and to be cognizant of the serious negative
responsibilities
consequences that may result from poor quality in a
system. Honoring ones commitments is a matter of integrity
and honesty. For the computer professional this includes
2.2 Acquire and maintain professional competence ensuring that system elements perform as intended. Also,
when one contracts for work with another party, one has an
Excellence depends on individuals who take responsibility obligation to keep that party properly informed about pro-
for acquiring and maintaining professional competence. A gress toward completing that work.
professional must participate in setting standards for A computing professional has a responsibility to
appropriate levels of competence, and strive to achieve request a change in any assignment that he or she feels
those standards. Upgrading technical knowledge and com- cannot be completed as defined. Only after serious con-
petence can be achieved in several ways: doing independent sideration and with full disclosure of risks and concerns to
study; attending seminars, conferences, or courses; and the employer or client, should one accept the assignment.
being involved in professional organizations. The major underlying principle here is the obligation to
accept personal accountability for professional work. On
2.3 Know and respect existing laws pertaining to professional some occasions other ethical principles may take greater
work priority.
A judgment that a specific assignment should not be
ACM members must obey existing local, state, province,
performed may not be accepted. Having clearly identified
national, and international laws unless there is a compel-
ones concerns and reasons for that judgment, but failing
ling ethical basis not to do so. Policies and procedures of the
to procure a change in that assignment, one may yet be
organizations in which one participates must also be
obligated, by contract or by law, to proceed as directed.
obeyed. But compliance must be balanced with the recogni-
The computing professionals ethical judgment should be
tion that sometimes existing laws and rules may be
the final guide in deciding whether or not to proceed.
immoral or inappropriate and, therefore, must be chal-
Regardless of the decision, one must accept the respon-
lenged. Violation of a law or regulation may be ethical
sibility for the consequences.
when that law or rule has inadequate moral basis or
However, performing assignments against ones own
when it conflicts with another law judged to be more
judgment does not relieve the professional of responsibil-
important. If one decides to violate a law or rule because
ity for any negative consequences.
it is viewed as unethical, or for any other reason, one must
fully accept responsibility for ones actions and for the
consequences. 2.7 Improve public understanding of computing and its
consequences
2.4 Accept and provide appropriate professional review
Computing professionals have a responsibility to share
Quality professional work, especially in the computing technical knowledge with the public by encouraging
profession, depends on professional reviewing and criti- understanding of computing, including the impacts of
quing. Whenever appropriate, individual members should computer systems and their limitations. This imperative
seek and utilize peer review as well as provide critical implies an obligation to counter any false views related to
review of the work of others. computing.
10 ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING

2.8 Access computing and communication resources only dards should be considered in system design and in the
when authorized to do so workplace.
Theft or destruction of tangible and electronic property is
prohibited by imperative 1.2 - Avoid harm to others. 3.3 Acknowledge and support proper and authorized uses
Trespassing and unauthorized use of a computer or com- of an organizations computing and communication
munication system is addressed by this imperative. Tres- resources
passing includes accessing communication networks and Because computer systems can become tools to harm as well
computer systems, or accounts and/or files associated with as to benefit an organization, the leadership has the respon-
those systems, without explicit authorization to do so. sibility to clearly define appropriate and inappropriate uses
Individuals and organizations have the right to restrict of organizational computing resources. While the number
access to their systems so long as they do not violate the and scope of such rules should be minimal, they should be
discrimination principle (see 1.4), No one should enter or fully enforced when established.
use anothers computer system, software, or data files
without permission. One must always have appropriate 3.4 Ensure that users and those who will be affected by a
approval before using system resources, including commu- system have their needs clearly articulated during the
nication ports, file space, other system peripherals, and assessment and design of requirements; later the system must
computer time. be validated to meet requirements
Current system users, potential users and other persons
3. ORGANIZATIONAL LEADERSHIP IMPERATIVES whose lives may be affected by a system must have their
needs assessed and incorporated in the statement of
As an ACM member and an organizational leader, I will . . ..
requirements. System validation should ensure compliance
with those requirements.
BACKGROUND NOTE: This section draws exten-
sively from the draft IFIP Code of Ethics, especially its
sections on organizational ethics and international con- 3.5 Articulate and support policies that protect the dignity
cerns. The ethical obligations of organizations tend to be of users and others affected by a computing system
neglected in most codes of professional conduct, perhaps Designing or implementing systems that deliberately or
because these codes are written from the perspective of the inadvertently demean individuals or groups is ethically
individual member. This dilemma is addressed by stating unacceptable. Computer professionals who are in decision
these imperatives from the perspective of the organiza- making positions should verify that systems are designed
tional leader. In this context leader is viewed as any and implemented to protect personal privacy and enhance
organizational member who has leadership or educational personal dignity.
responsibilities. These imperatives generally may apply
to organizations as well as their leaders. In this context
3.6 Create opportunities for members of the organization
organizations are corporations, government agencies,
to learn the principles and limitations of computer systems
and other employers, as well as volunteer professional
organizations. This complements the imperative on public understanding
(2.7). Educational opportunities are essential to facilitate
3.1 Articulate social responsibilities of members optimal participation of all organizational members.
of an organizational unit and encourage full acceptance Opportunities must be available to all members to help
of those responsibilities them improve their knowledge and skills in computing,
including courses that familiarize them with the conse-
Because organizations of all kinds have impacts on
quences and limitations of particular types of systems. In
the public, they must accept responsibilities to society.
particular, professionals must be made aware of the dan-
Organizational procedures and attitudes oriented
gers of building systems around oversimplified models, the
toward quality and the welfare of society will reduce
improbability of anticipating and designing for every pos-
harm to members of the public, thereby serving public
sible operating condition, and other issues related to the
interest and fulfilling social responsibility. Therefore,
complexity of this profession.
organizational leaders must encourage full participation
in meeting social responsibilities as well as quality per-
formance. 4. COMPLIANCE WITH THE CODE

3.2 Manage personnel and resources to design and build As an ACM member I will . . ..
information systems that enhance the quality of working life
4.1 Uphold and promote the principles of this code
Organizational leaders are responsible for ensuring that
computer systems enhance, not degrade, the quality of The future of the computing profession depends on both
working life. When implementing a computer system, orga- technical and ethical excellence. Not only is it important for
nizations must consider the personal and professional ACM computing professionals to adhere to the principles
development, physical safety, and human dignity of all expressed in this Code, each member should encourage and
workers. Appropriate human-computer ergonomic stan- support adherence by other members.
ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING 11

4.2 Treat violations of this code as inconsistent 8. SELF - Software engineers shall participate in life-
with membership in the ACM long learning regarding the practice of their profes-
sion and shall promote an ethical approach to the
Adherence of professionals to a code of ethics is largely a
practice of the profession.
voluntary matter. However, if a member does not follow
this code by engaging in gross misconduct, membership in
This Code may be published without permission as long
ACM may be terminated.
as it is not changed in any way and it carries the copyright
notice. Copyright (c) 1999 by the Association for Computing
This Code may be published without permission as long
Machinery, Inc. and the Institute for Electrical and Elec-
as it is not changed in any way and it carries the copyright
tronics Engineers, Inc.
notice. Copyright (c) 1997, Association for Computing
Machinery, Inc.
BIBLIOGRAPHY
APPENDIX 2: SOFTWARE ENGINEERING CODE OF ETHICS
AND PROFESSIONAL PRACTICE (SHORT VERSION) 1. A. Goldman. The Moral Foundation of Professional Ethics,
Totowa, NJ: Rowman & Littlefield, 1980.
http://www.acm.org/about/se-code/ 2. J. White and B. Simons, ACMs position on the licensing of
Short Version software engineers, Communications ACM, 45(11): 91, 2002.
3. N. G. Leveson and C. S. Turner, An investigation of the Therac-
25 accidents, Computer, 26(7): 1841, 1993.
PREAMBLE 4. J. Ladd, Collective and individual moral responsibility in
engineering: some questions, IEEE Technology and Society
The short version of the code summarizes aspirations at a Magazine, 1(2): 310, 1982.
high level of the abstraction; the clauses that are included 5. H. Nissenbaum, Computing and accountability, Communica-
in the full version give examples and details of how these tions of the ACM, 37(1): 7380, 1994.
aspirations change the way we act as software engineer- 6. B. Friedman and H. Nissenbaum, Bias in computer systems,
ing professionals. Without the aspirations, the details can ACM Transa. Informa. Sys., 14(3): 330347, 1996.
become legalistic and tedious; without the details, the 7. C. Kaner, Blog: Software customer bill of right. Available: from
aspirations can become high sounding but empty; http://www.satisfice.com/kaner/.
together, the aspirations and the details form a cohesive 8. K. Miller, Software informed consent: docete emptorem,
code. not caveat emptor, Science Engineer. Ethics, 4(3): 357362,
Software engineers shall commit themselves to making 1998.
the analysis, specification, design, development, testing 9. G. D. Friedlander, The case of the three engineers vs. BART,
and maintenance of software a beneficial and respected IEEE Spectrum, 11(10): 6976, 1974.
profession. In accordance with their commitment to the 10. R. Anderson, D. G. Johnson, D. Gotterbarn, and J. Perrolle,
health, safety and welfare of the public, software engineers Using the new ACM code of ethics in decision making, Com-
shall adhere to the following Eight Principles: munications ACM, 36(2): 98107, 1993.
11. D. Gotterbarn, K. Miller, and S. Rogerson, Software engineer-
1. PUBLIC - Software engineers shall act consistently ing code of ethics is approved, Communications ACM, 42(10):
with the public interest. 102107, 1999.
2. CLIENT AND EMPLOYER - Software engineers 12. M. Davis, Thinking like an engineer: the place of a code of ethics
shall act in a manner that is in the best interests of in the practice of a profession, Philosophy and Public Affairs,
their client and employer consistent with the public 20(2): 150167, 1991.
interest. 13. D. Gotterbarn, Computing professionals and your responsibil-
ities: virtual information and the software engineering code of
3. PRODUCT - Software engineers shall ensure that
ethics, in D. Langford (ed.), Internet Ethics, New York: St.
their products and related modifications meet the Martins Press, 2000, pp. 200219.
highest professional standards possible.
14. W. Maner, Heuristic methods for computer ethics, Metaphilo-
4. JUDGMENT - Software engineers shall maintain sophy, 33(3): 339365, 2002.
integrity and independence in their professional 15. D. L. Mathison, Teaching an ethical decision model that skips
judgment. the philosophers and works for real business students, Pro-
5. MANAGEMENT - Software engineering managers ceedings, National Academy of Management, New Orleans:
and leaders shall subscribe to and promote an ethical 1987, pp. 19.
approach to the management of software develop- 16. W. R. Collins and K. Miller, A paramedic method for computing
ment and maintenance. professionals, J. Sys. Software, 17(1): 4784, 1992.
6. PROFESSION - Software engineers shall advance 17. United States Department of Defense. Joint ethics regulation
the integrity and reputation of the profession consis- DoD 5500.7-R. 1999. Available: http://www.defenselink.mil/
dodg/defense_ethics/ethics_regulation/jerl-4.doc.
tent with the public interest.
18. N. Wiener, Cybernetics: or the Control and Communication
7. COLLEAGUES - Software engineers shall be fair to in the Animal and the Machine, Cambridge, MA: MIT Press,
and supportive of their colleagues. 1965.
12 ETHICS AND PROFESSIONAL RESPONSIBILITY IN COMPUTING

19. J. Weizenbaum, Computer Power and Human Reason: H. Tavani, Professional ethics, codes of conduct, and moral respon-
From Judgment to Calcution, New York: WH Freeman & sibility, in Ethics and Technology: Ethical Issues in an Age of
Co., 1976. Information and Communication Technology, New York: Wiley,
20. L. Floridi and J. Sanders On the morality of artificial agents, 2004, pp. 87116.
Minds and Machines, 14(3): 349379, 2004.
21. K. Himma, Theres something about Mary: the moral value of
things qua information objects, Ethics Informat. Technol.,
6(3): 145159, 2004.
MICHAEL C. LOUI
University of Illinois at
Urbana-Champaign
FURTHER READING Urbana, Illinois
KEITH W. MILLER
rd University of Illinois at
D. G. Johnson, Professional ethics, in Computer Ethics, 3 ed.,
Springfield
Upper Saddle River, NJ: Prentice Hall, 2001, pp. 5480.
Springfield, Illinois
M. J. Quinn, Professional ethics, in Ethics for the Information Age,
Boston, MA: Pearson/Addison-Wesley, 2005, pp. 365403.
F
FIXED-POINT COMPUTER ARITHMETIC Table 1. 4-Bit fractional twos complement numbers
Decimal Fraction Binary Representation
INTRODUCTION
7/8 0111
3/4 0110
This article begins with a brief discussion of the twos 5/8 0101
complement number system in the section on Number 1/2 0100
Systems. The section on Arithmetic Algorithms provides 3/8 0011
examples of implementations of the four basic arithmetic 1/4 0010
operations (i.e., add, subtract, multiply, and divide). 1/8 0001
Regarding notation, capital letters represent digital 0 0000
numbers (i.e., n-bit words), whereas subscripted lowercase 1/8 1111
letters represent bits of the corresponding word. The sub- 1/4 1110
3/8 1101
scripts range from n 1 to 0 to indicate the bit position
1/2 1100
within the word (xn1 is the most significant bit of X, x0 is 5/8 1011
the least significant bit of X, etc.). The logic designs pre- 3/4 1010
sented in this chapter are based on positive logic with AND, 7/8 1001
OR, and INVERT operations. Depending on the technology 1 1000
used for implementation, different logical operations (such
as NAND and NOR) or direct transistor realizations may be
used, but the basic concepts do not change significantly.
Twos complement numbers are negated by inverting all
bits and adding a ONE to the least significant bit position.
NUMBER SYSTEMS For example, to form 3/8:

At the current time, fixed-point binary numbers are repre-


sented generally using the twos complement number sys-
tem. This choice has prevailed over the sign magnitude and
ones complement number systems, because the frequently +3/8 = 0011
performed operations of addition and subtraction are
easiest to perform on twos complement numbers. Sign invert all bits = 1100
magnitude numbers are more efficient for multiplication,
but the lower frequency of multiplication and the develop- add 1 0001
ment of the efficient Booths twos complement multiplica- 1101 = 3/8
tion algorithm have resulted in the nearly universal
selection of the twos complement number system for
most implementations. The algorithms presented in this
article assume the use of twos complement numbers. Check: invert all bits = 0010
Fixed-point number systems represent numbers, for add 1 0001
example A, by n bits: a sign bit, and n1 data bits. By
convention, the most significant bit, an1, is the sign bit, 0011 = 3/8
which is generally a ONE for negative numbers and a ZERO
for positive numbers. The n1 data bits are an2, an3,. . .,
a1, a0. In the twos complement fractional number system,
the value of a number is the sum of n1 positive binary
fractional bits and a sign bit which has a weight of 1: Truncation of twos complement numbers never increa-
ses the value of the number. The truncated numbers have
X
n 2
values that are either unchanged or shifted toward nega-
A an1 ai 2in1 1 tive infinity. This shift may be seen from Equation (1), in
i0
which any truncated digits come from the least significant
Examples of 4-bit fractional twos complement fractions end of the word and have positive weight. Thus, to remove
are shown in Table 1. Two points are evident from the table: them will either leave the value of the number unchanged
First, only a single representation of zero exists (specifically (if the bits that are removed are ZEROs) or reduce the value
0000) and second, the system is not symmetric because a of the number. On average, a shift toward 1 of one-half
negative number exists, 1, (1000), for which no positive the value of the least significant bit exists. Summing many
equivalent exists. The latter property means that taking truncated numbers (which may occur in scientific, matrix,
the absolute value of, negating or squaring a valid number and signal processing applications) can cause a significant
(1) can produce a result that cannot be represented. accumulated error.
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 FIXED-POINT COMPUTER ARITHMETIC

significant adder stage (i.e., the stage which computes


the sign bit). If the carries differ, the addition has over-
3/8 = 0011 flowed and the result is invalid. Alternatively, if the sign
of the sum differs from the signs of the two operands, the
+ 1/2 = 0100
addition has overflowed.
0111 = 7/8

ADDITION IMPLEMENTATION

3/8 = 1101 A wide range of implementations exist for fixed point


addition, which include ripple carry adders, carry looka-
1/2 = 1100
head adders, and carry select adders. All start with a full
Ignore Carry Out (1) 1001 = 7/8 adder as the basic building block.

Full Adder
3/8 = 0011
The full adder is the fundamental building block of most
1/2 = 1100 arithmetic circuits. The operation of a full adder is defined
by the truth table shown in Table 2. The sum and carry
1111 = 1/8 outputs are described by the following equations:

sk ak bk ck 2
3/8 = 1101
ck1 ak bk ak ck bk ck 3
+ 1/2 = 0100

Ignore Carry Out (1) 0001 = 1/8 where ak, bk, and ck are the inputs to the k-th full adder
stage, and sk and ck1 are the sum and carry outputs,
respectively, and  denotes the Exclusive-OR logic opera-
tion.
In evaluating the relative complexity of implementa-
tions, often it is convenient to assume a nine-gate realiza-
5/8 = 0101 tion of the full adder, as shown in Fig. 1. For this
implementation, the delay from either ak or bk to sk is six
+ 1/2 = 0100
gate delays and the delay from ck to ck1 is two gate delays.
MSB Cin Cout 1001 = 7/8 Some technologies, such as CMOS, form inverting gates
(e.g., NAND and NOR gates) more efficiently than the
noninverting gates that are assumed in this article. Cir-
cuits with equivalent speed and complexity can be con-
5/8 = 1011
structed with inverting gates.
1/2 = 1100
Ripple Carry Adder
MSB Cin Cout 0111 = 7/8
A ripple carry adder for n-bit numbers is implemented by
concatenating n full adders, as shown in Fig. 2. At the k-th
bit position, bits ak and bk of operands A and B and the carry
signal from the preceding adder stage, ck, are used to
ARITHMETIC ALGORITHMS generate the kth bit of the sum, sk, and the carry, ck+1, to

This section presents a reasonable assortment of typical


fixed-point algorithms for addition, subtraction, multipli- Table 2. Full adder truth table
cation, and division. Inputs Outputs

Addition ak bk ck ck1 sk

Addition is performed by summing the corresponding bits 0 0 0 0 0


of the two n-bit numbers, which includes the sign bit. 0 0 1 0 1
Subtraction is performed by summing the corresponding 0 1 0 0 1
bits of the minuend and the twos complement of the 0 1 1 1 0
1 0 0 0 1
subtrahend.
1 0 1 1 0
1 1 0 1 0
Overflow is detected in a twos complement adder by 1 1 1 1 1
comparing the carry signals into and out of the most
FIXED-POINT COMPUTER ARITHMETIC 3

HALF ADDER
ak HALF ADDER

sk

bk

c k +1
ck
Figure 1. Nine gate full adder
.
the next adder stage. This adder is called a ripple carry This equation helps to explain the concept of carry
adder, because the carry signals ripple from the least generation and propagation: A bit position generates
significant bit position to the most significant. a carry regardless of whether there is a carry into that bit
If the ripple carry adder is implemented by concatenat- position if gk is true (i.e., both ak and bk are ONEs), and a
ing n of the nine gate full adders, which were shown in stage propagates an incoming carry to its output if pk is
Fig. 1, an n-bit ripple carry adder requires 2n 4 gate true (i.e., either ak or bk is a ONE). The eight-gate modified
delays to produce the most significant sum bit and 2n 3 full adder is based on the nine-gate full adder shown on
gate delays to produce the carry output. A total of 9n logic Fig. 1. It has AND and OR gates that produce gk and pk with
gates are required to implement the n-bit ripple carry no additional complexity.
adder. In comparing the delay and complexity of adders, Extending Equation (6) to a second stage:
the delay from data input to most significant sum output
denoted by DELAY and the gate count denoted by GATES
ck2 gk1 pk1 ck1
will be used. These DELAY and GATES are subscripted by
gk1 pk1 gk pk ck
RCA to indicate ripple carry adder. Although these simple gk1 pk1 gk pk1 pk ck 7
metrics are suitable for first-order comparisons, more accu-
rate comparisons require more exact modeling because the
implementations may be realized with transistor networks Equation (7) results from evaluating Equation (6) for the
(as opposed to gates), which will have different delay and (k 1)th stage and substituting ck1 from Equation (6).
complexity characteristics. Carry ck+2 exits from stage k1 if: (1) a carry is generated
there, (2) a carry is generated in stage k and propagates
DELAYRCA 2n 4 4 across stage k1, or (3) a carry enters stage k and propa-
gates across both stages k and k1, etc. Extending to a
GATESRCA 9n 5 third stage:

Carry Lookahead Adder ck3 gk2 pk2 ck2


gk2 pk2 gk1 pk1 gk pk1 pk ck
Another popular adder approach is the carry lookahead gk2 pk2 gk1 pk2 pk1 gk pk2 pk1 pk ck 8
adder (1,2). Here, specialized logic computes the carries
in parallel. The carry lookahead adder uses eight gate
modified full adders that do not form a carry output Although it would be possible to continue this process
for each bit position and lookahead modules, which indefinitely, each additional stage increases the fan-in
form the carry outputs. The carry lookahead concept is (i.e., the number of inputs) of the logic gates. Four inputs
best understood by rewriting Equation (3) with gk akbk [as required to implement Equation (8)] frequently are
and pk ak bk. the maximum number of inputs per gate for current
technologies. To continue the process, block generate
ck1 gk pk ck 6 and block propagate signals are defined over 4-bit blocks

an1 bn1 a2 b2 a1 b1 a0 b0

Full cn1 Full c2 Full c1 Full c0


Adder Adder Adder Adder

cn sn1 s2 s1 s0

Figure 2. Ripple carry adder.


4 FIXED-POINT COMPUTER ARITHMETIC

(stages k to k + 3), gk:k 3 and pk:k 3, respectively: computed in only four gate delays [the first to comp-
ute pi and gi for i k through k 3, the second to
gk:k3 gk3 pk3 gk2 pk3 pk2 gk1 evaluate pk:k 3, the second and third to evaluate
9 gk:k 3, and the third and fourth to evaluate ck 4 using
pk3 pk2 pk1 gk
Equation (11)].
and An n-bit carry lookahead adder requires d n  1=
r  1 e lookahead logic blocks, where r is the width of
the block. A 4-bit lookahead logic block is a direct imple-
pk:k3 pk3 pk2 pk1 pk 10 mentation of Equations (6)(10), with 14 logic gates. In
general, an r-bit lookahead logic block requires 123r r2
Equation (6) can be expressed in terms of the 4-bit block logic gates. The Manchester carry chain (3) is an
generate and propagate signals: alternative switch-based technique to implement a looka-
head logic block.
ck4 gk:k3 pk:k3 ck 11 Figure 3 shows the interconnection of 16 adders and five
lookahead logic blocks to realize a 16-bit carry lookahead
Thus, the carry out from a 4-bit wide block can be adder. The events that occur during an add operation are:

s3 a3 b3 s2 a2 b2 s1 a1 b1 s0 a0 b0 c0

Modified Modified Modified Modified


Full Full Full Full
Adder Adder Adder Adder

p3 g3 c3 p2 g2 c2 p1 g1 c1 p0 g0

Lookahead Logic

p0:3 g0:3

s7 a7 b7 s6 a6 b6 s5 a5 b5 s4 a4 b4

Modified Modified Modified Modified


Full Full Full Full
Adder Adder Adder Adder

p7 g7 c7 p6 g6 c6 p5 g5 c5 p4 g4

Lookahead Logic

p4:7 g4:7

s11 a11 b11 s10 a10 b10 s9 a9 b9 s8 a8 b8

Modified Modified Modified Modified


Full Full Full Full
Adder Adder Adder Adder

p11 g11 c11 p10 g10 c10 p9 g9 c9 p8 g8

Lookahead Logic

p8:11 g8:11

s15 a15 b15 s14 a14 b14 s13 a13 b13 s12 a12 b12

Modified Modified Modified Modified


Full Full Full Full
Adder Adder Adder Adder

p15 g15 c15 p14 g14 c14 p13 g13 c13 p12 g12

Lookahead Logic

p12:15 g12:15 c c8 c4
12

Lookahead Logic

g0:15 p0:15

c16

Figure 3. 16-bit carry lookahead adder.


FIXED-POINT COMPUTER ARITHMETIC 5

(1) apply A, B, and carry in signals at time 0, (2) each of a ripple carry adder). It is important to realize that most
modified full adder computes P and G, at time 1, (3) first carry lookahead adders require gates with up to 4 inputs,
level lookahead logic computes the 4-bit block propagate at whereas ripple carry adders use only inverters and two
time 2 and block generate signals by time 3, (4) second level input gates.
lookahead logic computes c4, c8, and c12, at time 5, (5) first
level lookahead logic computes the individual carries at Carry Select Adder
time 7, and (6) each modified full adder computes the sum
The carry select adder divides the words to be added into
outputs at time 10. This process may be extended to larger
blocks and forms two sums for each block in parallel
adders by subdividing the large adder into 16-bit blocks and
(one with a carry in of ZERO and the other with a carry
by using additional levels of carry lookahead (e.g., a 64-bit
in of ONE). As shown for a 16-bit carry select adder in Fig. 4,
adder requires three levels).
the carry out from the previous block controls a multiplexer
The delay of carry lookahead adders is evaluated by
that selects the appropriate sum. The carry out is computed
recognizing that an adder with a single level of carry looka-
using Equation (11), because the block propagate signal is
head (for r-bit words) has six gate delays, and that each
the carry out of an adder with a carry input of ONE, and the
additional level of lookahead increases the maximum word
block generate signal is the carry out of an adder with a
size by a factor of r and adds four gate delays. More gen-
carry input of ZERO.
erally, the number of lookahead levels for an n-bit adder is
If a constant block width of k is used, d n=k e blocks will
d Logr n e where r is the width of the lookahead logic block
exist and the delay to generate the sum is 2k 3 gate
(generally equal to the maximum number of inputs per logic
delays to form the carry out of the first block, two gate
gate). Because an r-bit carry lookahead adder has six gate
delays for each of the d n=k e  2 intermediate blocks, and
delays and four additional gate delays exist per carry looka-
three gate delays (for the multiplexer) in the final block.
head level after the first,
To simplify the analysis, the ceiling function in the count
of intermediate blocks is ignored. The total delay is
DELAYCLA 2 4 d Logr n e 12 thus

The complexity of an n-bit carry lookahead adder imple- DELAYCSEL 2k 2n=k 2 15


mented with r-bit lookahead logic blocks is n modified full
adders (each of which requires eight gates) and d n  1= where DELAYCSEL is the total delay. The optimum block
r  1 e lookahead logic blocks (each of which requires size is determined by taking the derivative of DELAYCSEL
13r r2 gates). In addition, two gates are used to calculate
2 with respect to k, setting it to zero, and solving for k. The
the carry out from the adder, cn, from p0:n1 and g0:n1. result is

k n:5 16
GATESCLA 8n 12 3r r2 d n  1=r  1 e 2 13
DELAYCSEL 2 4n:5 17

If r 4
GATESCLA  12 23 n  2 23 14 The complexity of the carry select adder is 2n  k ripple
carry adder stages, the intermediate carry logic and
d n=k e  1 k-bit wide 2:1 multiplexers for the sum bits
The carry lookahead approach reduces the delay of and one 1-bit wide multiplexer for the most significant
adders from increasing in proportion to the word size (as carry output.
is the case for ripple carry adders) to increasing in propor-
tion to the logarithm of the word size. As with ripple carry GATESCSEL 21n  12k 3 d n=k e  2 18
adders, the carry lookahead adder complexity grows line-
arly with the word size (for r 4, the complexity of a carry This result is somewhat more than twice the complexity of
lookahead adder is about 40% greater than the complexity a ripple carry adder.

a15:12 b15:12 a11:8 b11:8 a7:4 b7:4 a3:0 b3:0 c0

g11:8 g7:4
4-Bit RCA 0 4-Bit RCA 0 4-Bit RCA 0

p11:8 p7:4
4-Bit RCA 1 4-Bit RCA 1 4-Bit RCA 1 4-Bit RCA

2:1 MUX 2:1 MUX 2:1 MUX 2:1 MUX c4


c12 c8

c16 s15:12 s11:8 s7:4 s3:0

Figure 4. 16-bit carry select adder.


6 FIXED-POINT COMPUTER ARITHMETIC

an-1 bn-1 a2 b2 a1 b1 a0 b0

n-Bit Adder c0 1

cn sn-1 s2 s1 s0

Figure 5. Twos complement subtracter.

Slightly better results can be obtained by varying the Booth Multiplier


width of the blocks. The optimum is to make the two least
The Booth multiplier (4) and the modified Booth multiplier
significant blocks the same size and make each successively
are attractive for twos complement multiplication, because
more significant block one bit larger than its predecessor.
they accept twos complement operands, produce a twos
With four blocks, this gives an adder that is 3 bits wider
complement product, directly, and are easy to implement.
than the conventional carry select adder.
The sequential Booth multiplier requires n cycles to form the
product of a pair of n-bit numbers, where each cycle consists
SUBTRACTION of an n-bit addition and a shift, an n-bit subtraction and a
shift, or a shift without any other arithmetic operation. The
As noted previously, subtraction of twos complement num- radix-4 modified Booth multiplier (2) takes half as many
bers is accomplished by adding the minuend to the inverted cycles as the standard Booth multiplier, although
bits of the subtrahend and adding a one at the least the operations performed during each cycle are slightly
significant position. Figure 5 shows a twos comple- more complex (because it is necessary to select one of five
ment subtracter that computes A B. The inverters com- possible addends, namely, 2B, B, or 0 instead of one of
plement the bits of B; the formation of the twos complement three).
is completed by setting the carry into the least significant
adder stage to a ONE.
Modified Booth Multiplier
To multiply A B, the radix-4 modified Booth multiplier [as
MULTIPLICATION
described by MacSorley (2)] uses n/2 cycles where each cycle
examines three adjacent bits of A, adds or subtracts 0, B, or
The bit product matrix of a 5-bit by 5-bit multiplier for
2B to the partial product and shifts the partial product two
unsigned operands is shown on Fig. 5. The two operands, A
bits to the right. Figure 7 shows a flowchart for a radix-4
and B, are shown at the top, followed by n rows (each
modified Booth multiplier. After an initialization step, there
consisting of n bit products) that compose the bit product
are n/2 passes through a loop where three bits of A are tested
matrix. Finally, the product (2n bits wide) is at the bottom.
and the partial product P is modified. This algorithm takes
Several ways exist to implement a multiplier. One
half the number of cycles of the standard Booth multiplier
of the oldest techniques is to use an n bit wide adder to
(4), although the operations performed during a cycle are
sum the rows of the bit product matrix in a row by row
slightly more complex (because it is necessary to select one of
fashion. This process can be slow because n  1 cycles
four possible addends instead of one of two). Extensions to
(each long enough to complete an n bit addition) are
higher radices that examine more than three bits per cycle
required. If a ripple carry adder is used, the time to
(5) are possible, but generally not attractive because the
multiply two n-bit numbers is proportional to n2. If a
addition/subtraction operations involve nonpower of two
fast adder such as a carry lookahead adder is used, the
time is proportional to n Log2 (n).

b4 b3 b2 b1 b0
a4 a3 a2 a1 a0
a0 b4 a0 b3 a0 b2 a0 b1 a0 b0
a1 b4 a1 b3 a1 b2 a1 b1 a1 b0
a2 b4 a2 b3 a2 b2 a2 b1 a2 b0
a3 b4 a3 b3 a3 b2 a3 b1 a3 b0
a4 b4 a4 b3 a4 b2 a4 b1 a4 b0
p9 p8 p7 p6 p5 p4 p3 p2 p1 p0

Figure 6. 5-bit by 5-bit multiplier for unsigned operands.


FIXED-POINT COMPUTER ARITHMETIC 7

P=0
i=0
a1 = 0

a i+1, a i, a i1

001 000 101


or 011 or 100 or
010 111 110

P=P+B P = P + 2B P = P 2B P=PB

LT
i:n P=4P
i=i+2

GE

P=AB

Figure 7. Flowchart of radix-4 modified booth multiplication.

multiples of B (such as 3B, 5B, etc.), which raises the left edge and the bottom row are the complement of the
complexity. normal terms (i.e., a4 NAND b0) as indicated by the over
The delay of the radix-4 modified Booth multiplier is bar. The most significant term a4b4 is not complemented.
relatively high because an n-bit by n-bit multiplication Finally, ONEs are added at the sixth and tenth columns. In
requires n/2 cycles in which each cycle is long enough to practice, the ONE at the tenth column is usually omitted.
perform an n-bit addition. It is low in complexity because it Figure 9 shows an array multiplier that implements a
requires only a few registers, an n-bit 2:1 multiplexer, an 6-bit by 6-bit array multiplier realizing the algorithm
n-bit adder/subtracter, and some simple control logic for its shown on Fig. 8. It uses a 6 column by 6 row array of cells
implementation. to form the bit products and do most of the summation and
five adders (at the bottom of the array) to complete the
evaluation of the product. Five types of cells are used in the
Array Multipliers
square array: AND gate cells (marked G in Fig. 9) that form
A more hardware-intensive approach to multiplication xiyj, NAND gate cells (marked NG) that form x5 NAND yj,
involves the combinational generation of all bit products half adder cells (marked HA) that sum the second input to
and their summation with an array of full adders. The bit the cell with xiyj, full adder cells (marked FA) that sum the
product matrix of a 5-bit by 5-bit array multiplier for twos second and third inputs to the cell with xiyj, and special full
complement numbers (based on Ref. 6, p. 179) is shown in adder cells (marked NFA) that sum the second and third
Fig. 8. It consists of a 5 by 5 array of bit product terms where inputs to the cell with xi NAND y5. A special half adder,

most terms are of the form ai AND bj. The terms along the HA, (that forms the sum of its two inputs and 1) and

b4 . b3 b2 b1 b0
a 4 . a3 a2 a1 a0
____
1
____ a0 b4 a0 b 3 a0 b2 a0 b1 a0 b0

____ a1 b4 a1 b 3 a1 b2 a1 b1 a1 b0
a2 b4 a2 b 3 a2 b2 a2 b1 a2 b0
____
a3 b 4 a3 b 3 a3 b2 a3 b1 a3 b0
____ ____ ____ ____
1 a4 b4 a4 b3 a4 b2 a4 b 1 a4 b0
p9 p8 . p7 p6 p5 p4 p3 p2 p1 p0

Figure 8. 5-bit by 5-bit multiplier for twos complement operands


.
8 FIXED-POINT COMPUTER ARITHMETIC

x5 x4 x3 x2 x1 x0

y0
NG G G G G G p0

y1
NG HA HA HA HA HA
cs cs cs cs c
s p1

y2
NG FA FA FA FA FAs
cs cs cs cs c
p2

y3
NG FA FA FA FA FAs
cs cs cs cs c
p3

y4
NG FA FA FA FA FAs
cs cs cs cs c
p4

y5
G NFA NFA NFA NFA NFA
cs cs cs cs c
s p5

FA FA FA FA *
HA
c s c s c s c s c s

p10 p9 p8 p7 p6

Figure 9. 6-bit by 6-bit twos complement array multiplier.

standard full adders are used in the five-cell strip at the a complex process, it yields multipliers with delay propor-
bottom. The special half adder takes care of the extra 1 in tional to the logarithm of the operand word size, which is
the bit product matrix. faster than the array multiplier, which has delay propor-
The delay of the array multiplier is evaluated by follow- tional to the word size.
ing the pathways from the inputs to the outputs. The The second step in the fast multiplication process is
longest path starts at the upper left corner, progresses shown for a 6-bit by 6-bit Dadda multiplier on Fig. 10.
to the lower right corner, and then progresses across An input 6 by 6 matrix of dots (each dot represents a bit
the bottom to the lower left corner. If it is assumed that product) is shown as matrix 0. Regular dots are formed
the delay from any adder input (for either half or full with an AND gate, and dots with an over bar are formed
adders) to any adder output is k gate delays, then the total with a NAND gate. Columns that have more than four dots
delay of an n-bit by n-bit array multiplier is: (or that will grow to more than four dots because of carries)
are reduced by the use of half adders (each half adder takes
DELAYARRAY MPY k2n  2 1 19 in two dots and outputs one in the same column and one in
2
The complexity of the array multiplier is n AND and the next more significant column) and full adders (each full
NAND gates, n half adders (one of which is a half adder), adder takes in three dots from a column and outputs one in
and n2  2n full adders. If a half adder is realized with four the same column and one in the next more significant
gates and a full adder with nine gates, the total complexity column) so that no column in matrix 1 will have more
of an n-bit by n-bit array multiplier is than four dots. Half adders are shown by two dots connected
by a crossed line in the succeeding matrix and full adders
GATESARRAY MPY 10n2  14n 20 are shown by two dots connected by a line in the succeeding
matrix. In each case, the right-most dot of the pair that are
Array multipliers are laid out easily in a cellular fashion connected by a line is in the column from which the inputs
which makes them attractive for VLSI implementation, were taken in the preceding matrix for the adder. A special
where minimizing the design effort may be more important half adder (that forms the sum of its two inputs and 1) is
than maximizing the speed. shown with a doubly crossed line. In the succeeding steps
reduction to matrix 2, with no more than three dots per
Wallace/Dadda Fast Multiplier
column, and finally matrix 3, with no more than two dots
A method for fast multiplication was developed by Wallace per column, is performed. The reduction shown on Fig. 10
(7) and was refined by Dadda (8). With this method, a three- (which requires three full adder delays) is followed by an
step process is used to multiply two numbers: (1) The bit 10-bit carry propagating adder. Traditionally, the carry
products are formed, (2) the bit product matrix is reduced propagating adder is realized with a carry lookahead adder.
to a two row matrix whose sum equals the sum of the bit The height of the matrices is determined by working
products, and (3) the two numbers are summed with a fast back from the final (two row) matrix and limiting the height
adder to produce the product. Although this may seem to be of each matrix to the largest integer that is no more than 1.5
FIXED-POINT COMPUTER ARITHMETIC 9

MATRIX 0

MATRIX 1

MATRIX 2

MATRIX 3

Figure 10. 6-bit by 6-bit twos complement Dadda multiplier.

times the height of its successor. Each matrix is produced product matrix exist, (n  2)2 full adders, n  1 half adders
from its predecessor in one adder delay. Because the num- and one special half adder for the matrix reduction and a
ber of matrices is related logarithmically to the number of 2n  2-bit carry propagate adder for the addition of the final
rows in matrix 0, which is equal to the number of bits in the two row matrix. If the carry propagate adder is realized
words to be multiplied, the delay of the matrix reduction with a carry lookahead adder (implemented with 4-bit
process is proportional to log n. Because the adder that lookahead logic blocks), and if the complexity of a full adder
reduces the final two row matrix can be implemented as a is nine gates and the complexity of a half adder (either
carry lookahead adder (which also has logarithmic delay), regular or special) is four gates, then the total complexity
the total delay for this multiplier is proportional to the is:
logarithm of the word size.
The delay of a Dadda multiplier is evaluated by following 2
GATESDADDA MPY 10n2  6 n  26 22
the pathways from the inputs to the outputs. The longest 3
path starts at the center column of bit products (which
require one gate delay to be formed), progresses through The Wallace tree multiplier is very similar to the Dadda
the successive reduction matrices (which requires approxi- multiplier, except that it does more reduction in the first
mately Log1.44 (n) full adder delays) and finally through the stages of the reduction process, it uses more half adders,
2n 2-bit carry propagate adder. If the delay from any and it uses a slightly smaller carry propagating adder. A dot
adder input (for either half or full adders) to any adder diagram for a 6-bit by 6-bit Wallace tree multiplier for twos
output is k gate delays, and if the carry propagate adder complement operands is shown on Fig. 11. This reduction
is realized with a carry lookahead adder implemented with (which requires three full adder delays) is followed by an 8-
4-bit lookahead logic blocks (with delay given by bit carry propagating adder. The total complexity of the
Equation (12), the total delay (in gate delays) of an n-bit Wallace tree multiplier is a bit greater than the total
by n-bit Dadda multiplier is: complexity of the Dadda multiplier. In most cases, the
Wallace and Dadda multipliers have about the same delay.
DELAYDADDA MPY 1 k LOG1:44 n 2
4 d Logr 2n  2 e 21 DIVISION

The complexity of a Dadda multiplier is determined by Two types of division algorithms are in common use: digit
evaluating the complexity of its parts. n2 gates (2n  2 are recurrence and convergence methods. The digit recurrence
NAND gates, the rest are AND gates) to form the bit approach computes the quotient on a digit-by-digit basis,
10 FIXED-POINT COMPUTER ARITHMETIC

MATRIX 0

MATRIX 1

MATRIX 2

MATRIX 3

Figure 11. 6-bit by 6-bit Twos Complement Wallace Multiplier.

hence they have a delay proportional to the precision of the Binary SRT Divider
quotient. In contrast, the convergence methods compute an
The binary SRT division process (also known as radix-2
approximation that converges to the value of the quotient.
SRT division) selects the quotient from three candidate
For the common algorithms the convergence is quadratic,
quotient digits {1, 0}. The divisor is restricted to .5 
which means that the number of accurate bits approxi-
D < 1. A flowchart of the basic binary SRT scheme is shown
mately doubles on each iteration.
in Fig. 12. Block 1 initializes the algorithm. In step 3, 2 Pk
The digit recurrence methods that use a sequence of
and the divisor are used to select the quotient digit. In step
shift, add or subtract, and compare operations are rela-
4, Pk+1 2 Pk  q D. Step 5 tests whether all bits of the
tively simple to implement. On the other hand, the con-
quotient have been formed and goes to step 2 if more need to
vergence methods use multiplication on each cycle. This
be computed. Each pass through steps 25 forms one digit of
fact means higher hardware complexity, but if a fast
the quotient. The result upon exiting from step 5 is a
multiplier is available, potentially a higher speed may
collection of n signed binary digits.
result.
Step 6 converts the n digit signed digit number into an n-
bit twos complement number by subtracting, N, which has a
Digit Recurrent Division 1 for each bit position where qi 1 and 0 elsewhere from,
P, which has a 1 for each bit position where qi 1 and 0
The digit recurrent algorithms (9) are based on selecting
elsewhere. For example:
digits of the quotient Q (where Q N/D) to satisfy the
following equation:
Q = 0 . 1 1 1 0 1 = 21/32

Pk1 rPk  qnk1 D for k 1; 2; . . . ; n  1 23 P=0.11001

N=0.00100
where Pk is the partial remainder after the selection of the
kth quotient digit, P0 N (subject to the constraint |P0| < Q=0.110010.00100
|D|), r is the radix, qnk1 is the kth quotient digit to the
right of the binary point, and D is the divisor. In this Q=0.11001+1.11100
subsection, it is assumed that both N and D are positive,
see Ref. 10 for details on handling the general case.
Q = 0 . 1 0 1 0 1 = 21/32
FIXED-POINT COMPUTER ARITHMETIC 11

1. P0 = N
k = 1

2. k = k + 1

3. Select qn-k-1
Based on 2 Pk & D

4. Pk+1 = 2 Pk qn-k-1 D

LT 5.
k:n1

GE

6. Form P & N
Q=PN

Q = N/D

Figure 12. Flowchart of binary SRT division.

The selection of the quotient digit can be visualized with by the following relations:
a P-D Plot such as the one shown in Fig. 13. The plot shows If Pk > :5; qnk1 1 and Pk1 2Pk  D 24
the divisor along the x axis and the shifted partial remain-
der (in this case 2 Pk) along the y-axis. In the area where 0.5 If  :5 < Pk < :5; qnk1 0 and Pk1 2Pk 25
 D < 1, values of the quotient digit are shown as a function If Pk  :5; qnk1 1 and Pk1 2Pk D 26
of the value of the shifted partial remainder. In this case,
the relations are especially simple. The digit selection and Computing an n-bit quotient will involve selecting n quo-
resulting partial remainder are given for the k-th iteration tient digits and up to n 1 additions.

2
SHIFTED PARTIAL REMAINDER (2PK)

qi = 1

qi = 0

0
0.25 0.5 0.75 1
DIVISOR (D)

qi = 1

Figure 13. P-D plot for binary SRT division.


12 FIXED-POINT COMPUTER ARITHMETIC

2
qi = 3

1.5

1 qi = 2

SHIFTED PARTIAL REMAINDER (4Pk)


0.5 qi = 1

0
0.25 0.5 0.75 1
qi = 0 DIVISOR (D)
0.5

qi = 1
1

qi = 2
1.5

2 qi = 3

2.5

Figure 14. P-D Plot for radix-4 maximally redundant SRT division.

Radix-4 SRT Divider 1. Calculate a starting estimate of the reciprocal


of the divisor, R(0). If the divisor, D, is normalized
The higher radix SRT division process is similar to the
(i.e., 12  D < 1), then R(0) 3  2D exactly computes 1/
binary SRT algorithms. Radix 4 is the most common higher
D at D .5 and D 1 and exhibits maximum
radix SRT division algorithm with either a minimally :5
error (of approximately 0.17) at D 12 . Adjusting
redundant digit set of {2, 1, 0} or the maximally redun-
R(0) downward to by half the maximum error
dant digit set of {3, 2, 1, 0}. The operation of the
gives
algorithm is similar to the binary SRT algorithm shown
on Fig. 12, except that in step 3, 4 Pk, and D are used to
R0 2:915  2D 27
determine the quotient digit. A P-D Plot is shown on Fig. 14
for the maximum redundancy version of radix-4 SRT
division. Seven values are possible for the quotient digit This produces an initial estimate, that is within
at each stage. The test for completion in step 5 becomes about 0.087 of the correct value for all points in the
k : n2 1. Also the conversion to twos complement in step 6 is interval 12  D < 1.
modified slightly because each quotient digit provides two 2. Compute successively more accurate estimates of the
bits of the P and N numbers that are used to form the twos reciprocal by the following iterative procedure:
complement number.
Ri1 Ri 2  D Ri for i 0; 1; . . . ; k 28
NewtonRaphson Divider
The second category of division techniques uses a multi- 3. Compute the quotient by multiplying the dividend
plication-based iteration to compute a quadratically con- times the reciprocal of the divisor.
vergent approximation to the quotient. In systems that
include a fast multiplier, this process may be faster than Q N Rk 29
the digit recurrent methods. One popular approach is the
Newton-Raphson algorithm that computes an approxima- where i is the iteration count and N is the numerator.
tion to the reciprocal of the divisor that is then multiplied by Figure 15 illustrates the operation of the Newton
the dividend to produce the quotient. The process to compute Raphson algorithm. For this example, three itera-
Q N/D consists of three steps: tions (which involve a total of four subtractions and
FIXED-POINT COMPUTER ARITHMETIC 13

A = .625
B = .75

R(0) = 2.915 2 B 1 Subtract


= 2.915 2 .75

R(0) = 1.415

R (1) = R (0) (2 B R (0)) 2 Multiplies, 1 Subtract


= 1.415 (2 .75 1.415)
= 1.415 .95875
R(1) = 1.32833125

R (2) = R (1) (2 B R(1) ) 2 Multiplies, 1 Subtract


= 1.32833125 (2 .75 1.32833125)
= 1.32833125 1.00375156
R (2) = 1.3333145677

R(3) = R (2) (2 B R(2) ) 2 Multiplies, 1 Subtract


= 1.3333145677 (2 .75 1.3333145677)
= 1.3333145677 1.00001407
R(3) = 1.3333333331

Q = A R(3) 1 Multiply
= .625 1.3333333331
Q = .83333333319

Figure 15. Example of NewtonRaphson division.

seven multiplications) produces an answer accurate arithmetic units, often an opportunity exists to optimize
to nine decimal digits (approximately 30 bits). the performance and the complexity to match the
With this algorithm, the error decreases quadratically requirements of the specific application. In general,
so that the number of correct bits in each approximation is faster algorithms require more area and power; often
roughly twice the number of correct bits on the previous it is desirable to use the fastest algorithm that will fit the
iteration. Thus, from a 3.5-bit initial approximation, two available area and power bugdets.
iterations produce a reciprocal estimate accurate to 14-bits,
four iterations produce a reciprocal estimate accurate to BIBLIOGRAPHY
56-bits, and so on.
The efficiency of this process is dependent on the availa- 1. A. Weinberger and J. L. Smith, A logic for high-speed addition,
bility of a fast multiplier, because each iteration of National Bureau of Standards Circular, 591: 312, 1958.
Equation (28) requires two multiplications and a subtrac- 2. O. L. MacSorley, High-speed arithmetic in binary computers,
tion. The complete process for the initial estimate, three Proceedings of the IRE, 49: 6791, 1961.
iterations, and the final quotient determination requires 3. T. Kilburn, D. B. G. Edwards, and D. Aspinall, A parallel
four subtraction operations and seven multiplication opera- arithmetic unit using a saturated transistor fast-carry circuit,
tions to produce a 16-bit quotient. This process is faster Proceedings of the IEEE, Part B, 107: 573584, 1960.
than a conventional nonrestoring divider if multipli- 4. A. D. Booth, A signed binary multiplication technique, Quar-
cation is roughly as fast as addition, which is a condition terly J. Mechanics Appl. Mathemat., 4: 236240, 1951.
that is satisfied for some systems that include a hardware 5. H. Sam and A. Gupta, A generalized multibit recoding of twos
multiplier. complement binary numbers and its proof with application in
multiplier implementations, IEEE Trans. Comput., 39: 1006
1015, 1990.
CONCLUSIONS 6. B. Parhami, Computer Arithmetic: Algorithms and Hardware
Designs, New York: Oxford University Press, 2000.
This article has presented an overview of the twos 7. C. S. Wallace, A suggestion for a fast multiplier, IEEE Trans.
complement number system and algorithms for the basic Electron. Comput, 13: 1417, 1964.
fixed-point arithmetic operations of addition, subtrac- 8. L. Dadda, Some schemes for parallel multipliers, Alta Fre-
tion, multiplication, and division. When implementing quenza, 34: 349356, 1965.
14 FIXED-POINT COMPUTER ARITHMETIC

9. J. E. Robertson, A new class of digital division methods, IEEE 13. I. Koren, Computer Arithmetic Algorithms, 2nd Edition,
Trans. Electr. Comput, 7: 218222, 1958. Natick, MA: A. K. Peters, 2002.
10. M. D. Ercegovac and T. Lang, Division and Square Root: Digit-
Recurrence Algorithms and Their Implementations, Boston,
MA: Kluwer Academic Publishers, 1994. EARL E. SWARTZLANDER, JR.
11. IEEE Standard for Binary Floating-Point Arithmetic, IEEE University of Texas at Austin
Std 7541985, Reaffirmed 1990. Austin, Texas
12. M. D. Ercegovac and T. Lang, Digital Arithmetic, San
Francisco, CA: Morgan Kaufmann Publishers, 2004.
F
FLUENCY WITH INFORMATION TECHNOLOGY Allen Tucker, Bowdoin College
Jeffrey Ullman, Stanford University
Fluency with Information Technology specifies a degree of Andries Van Dam, Brown University
competency with computers and information in which
users possess the skills, concepts, and capabilities needed Herbert Lin of the NRC staff assisted the committee.
to apply Information Technology (IT) confidently and effec-
tively and can acquire new knowledge independently. Flu- Meeting over a two-year period, the committee broadly
ency with Information Technology transcends computer solicited information, using invited testimony from var-
literacy and prepares students for lifelong learning of IT. ious stakeholders, electronic queries to the community at
The concept of Fluency with Information Technology large, and a public forum. The broad range of views
derives from a National Research Council (NRC) study expressed indicated that computer literacy, which cur-
initiated in 1997 and funded by the National Science rently is understood to teach students how to use specific
Foundation (NSF). The study focused on defining what applications, does not have the staying power to prepare
everyone should know about Information Technology. For people for the continual change that is so familiar in IT.
the purposes of the study, everyone meant the population Users must be trained to be more adaptive and ready and
at large, and IT was defined broadly to include computers, willing to change. The committee decided that a deeper,
networking, software and applications, as well as informa- more foundational understanding was needed that would
tion resourcesvirtually anything one would encounter allow people to respond to change through a process of
using a network-connected personal computer. lifelong learning. The term fluency, suggested by Yasmin
The NSF motivation for requesting the study was driven Kafai of UCLA, became the moniker for that deeper,
by the belief that much of the United States population is foundational knowledge.
already computer literate, but that literacy is not enough. The committee issued its report, Being Fluent with
With more knowledge, people would make greater use of IT, Information Technology, in June 1999, published by
and doing so would generally be beneficial. Specifically, the the National Academy Press (1). The report attracted
NSF noted these points: considerable interest, and some schools immediately began
offering college-level classes. By July 2002 Addison Wesley
 Most users have had no formal training in the use of IT published the first textbook Fluency with Information
because of the relatively brief period during which it Technology. And in the fall of 2003, an online course to
has entered our society; more complete knowledge teach the content was launched with NSF funding.
could be useful.
 Many users seem to have only a limited understanding
of the applications they use and (probably correctly) CONTENT OF FLUENCY WITH INFORMATION
assume they are underutilizing them. TECHNOLOGY
 Many users are not confident nor do they feel in control
To provide the necessary foundation to support lifelong
when confronted with Information Technology oppor-
learning in IT, the committee recommended a tripartite
tunities or problems.
body of knowledge that covers contemporary skills, funda-
 Extravagant claims have been made about the poten- mental concepts, and intellectual capabilities:
tial benefits of IT, but most citizens do not enjoy them;
they want to apply IT to personally relevant goals. Skillsthe ability to use contemporary computer
 Informed participation in certain contemporary social applications. Skills knowledge makes computers
and political discussionsstrong encryption, copy- and information resources useful immediately; it
right, spam, privacy, and so forthrequires a sound provides valuable employment training and sup-
understanding of IT. ports the other aspects of fluency education. Exam-
ples include word processing, web searching, and so
What knowledge would address these concerns? forth.
Conceptsthe fundamental information about IT
The NRC, under the auspices of the Computer Science drawn from its supporting fields. Concepts knowl-
and Telecommunication board, appointed seven experts to edge includes both general science knowledge, such
the ad hoc Committee on Information Technology Literacy: as how a computer works, that educated citizens
should know and directly applicable knowledge,
Lawrence Snyder, University of Washington, Chair such as algorithmic thinking, that underpins future
Alfred V. Aho, Lucent Technologies applications of IT by users.
Marcia Linn, University of California at Berkeley Capabilitiesthe higher-level thinking skills needed for
Arnold Packer, The Johns Hopkins University everything from finding new ways to exploit IT to

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 FLUENCY WITH INFORMATION TECHNOLOGY

recovering from errors. Capabilitiesreasoning, An important aspect of the recommended topics is that
debugging, problem solving, and so forthapply in the skills, built around contemporary software and sys-
everyday life as well as in IT. However, because they tems, can be expected to change over time. The concepts and
occur often and intensively in IT, it is essential that capabilities, focused on fundamental ideas and intellectual
users be accomplished with them. processes, are generally time-invariant.

Notice that skills generally align with traditional com- PROJECTS AS AN INTEGRATING MECHANISM
puter literacy, so fluency includes literacy as a component.
The committee asserted that skills, concepts, and capabil-
The committee, charged with developing the content,
ities are separate but interdependent types of knowledge.
chose not to enumerate every conceivable skill, concept or
Furthermore, because most nontrivial applications of infor-
capability but rather to identify the top ten most important
mation technology rely on applying all three kinds of knowl-
items in each category. Their recommendation (1, p. 4) is
edge seamlessly, it is best not to teach them in isolation.
shown in the companion table. NRC Recommended Flu-
Rather, the material should be integrated using projects.
ency Topics
Projectsmulti week activities that produce a specific IT
product such as a web page or databasecan be designed
Skills
to use several components from each list to give students an
experience that approximates realistic IT situations.
Set up a personal computer
Through the projects, fluency becomes a coherent body of
Use basic operating system facilities knowledge rather than a set of 30 disparate topics.
Use a word processor An example of a project might be to build a database to
Use a graphics/artwork/presentation tool support patient processing at a storefront medical clinic.
Connect a PC to a network Students would set up the database tables, define the
Search the Internet to locate information queries, and design the user interfaces to track patients
through processing at the clinic. In addition to a record of
Send and receive e-mail
the visit, documents would be generated for follow-up
Use a spreadsheet actions such as referral letters, labels for specimens for
Query a database laboratory tests, prescriptions, (possibly) payment invoices
Use online help and tutorial facilities and receipts, and so foth.
The medical database example combines the use of
Concepts several skills, concepts, and capabilities. Among the skills
applied might be Web searching to find out privacy require-
Principles of computer operation ments, database querying, using basic operating system
Enterprise information systems facilities, using online help facilities, and probably others.
Networking Among the concepts applied might be fundamentals of
database design, information representation, information
Digital representation of information
structure and organization, social implications of comput-
Information structure and assessment ing, and probably others. Among the capabilities applied
Modeling the world with computers might be sustained logical reasoning, debugging, solution
Algorithmic thinking and programming testing, communicating a technological solution, and prob-
Universality of computers ably others. When working on a project, a student is focused
Limitations of computers on solving the problem, not on which of the curricular
components he or she is applying at the moment. As a
Information and society
result, projects produce an integrated application of IT
that conforms closely to how it is used under non academic
Capabilities
circumstances. Furthermore, successful completion of such
Engage in sustained reasoning substantial efforts can give students a greater degree of
confidence as computer users than can exercises specia-
Manage complexity
lized to a particular topic.
Test a solution Appendix A of the report (1, pp. 6777) gives a listing of
Locate bugs in an IT solution other sample projects.
Organize and navigate information structures
Collaborate using IT ALGORITHMIC THINKING AND PROGRAMMING
Communicate an IT solution to others
Expect the unexpected Since the introduction of the first computer courses for non
Anticipate technological change specialists in the 1970s, the question has been debated
whether programming should be a component of the com-
Think technologically
puting knowledge of the general population. The subject is
complex and often has been divisive. Fair-minded commen-
FLUENCY WITH INFORMATION TECHNOLOGY 3

tators have offered thoughtful and substantive arguments nology. The implementation of FITnessthe term used by
on both sides, but no clear resolution has emerged. Curri- the committee to identify those who are fluent with informa-
cula have been developed taking each position. tion technologyeducation would be left until later. But the
The NRC committee was confronted with the question, committee was composed of academics, so, inevitably, teach-
too: Should programming be listed among the skills, con- ing fluency at the college level was addressed.
cepts, and capabilities? The matter took on a crisp form in the The committee began by noting the desirability of FIT-
testimony presented to the committee. Most contributors ness as a post condition of college, that is, knowledge with
recommended that algorithmic thinking be a part of what which students leave college. Eventually, the report stated,
everyone should know about Information Technology. They FITness should be a pre condition of college, like basic
asserted that educated people should be able to formulate knowledge of science, math, and foreign languages.
procedural solutions to problems with sufficient precision Although appropriate for pre-college, the challenges are
that someone (or something) else could implement them. It so great for implementing fluency instruction in K12 that
also was common for the committee to be advised not to it will be years before FITness can be an entrance require-
include programming as a requirement for the general ment. Therefore, teaching fluency in college is essential in
population. Programming embodies professional knowledge the short run. Also, compared with K12 public instruction,
that is too advanced and too detail-oriented to be of value to post secondary institutions are far more flexible in terms of
users. That is, the committee was told that algorithmic their ability to develop curricula and infrastructure for new
thinking was essential and programming was not. pedagogical endeavors.
Although algorithmic thinking and programming are The NRC committee did not define a curriculum, only the
distinct, they overlap substantially. The committee wrestled content. Curriculum development began in the spring term
with how to interpret these largely contradictory inputs. of 1999 with the offering of the first FITness class, CSE100
Was the committee being told to prescribe those aspects of Fluency with Information Technology at the University of
algorithmic thinking that do not involve programming in Washington. The goal of this class is to teach the recom-
any way? Or was it being told to prescribe algorithmic mended skills, concepts and capabilities to freshmen in one
thinking in full but to include programming only to support 10-week quarter. The class has three lectures and two labs
it, not a full, professional-level programming course? In per week, each of 50 minutes. Skills are taught primarily in
addition to the algorithmic thinking/programming ques- the labs, capabilities are presented primarily as lecture
tion, related issues existed: What were those individuals demonstrations, and concepts are learned primarily through
who recommended programming including in their recom- reading. [Course notes from early offerings of this program
mendation, passing familiarity to programming or deep became the textbook, Fluency with Information Technology,
knowledge? Also, because programming is a challenging published by Addison Wesley (2).] Three projects integrate
engineering discipline, how much aptitude for learning pro- the material. Other universities, colleges, and community
gramming does the general population possess? colleges have developed FITness curricula since then.
The committee finally resolved these difficult issues by Because the skills, concepts, and capabilities are such
including algorithmic thinking and programming as item different kinds of knowledge, teaching fluency requires a
# 7 among the concepts. In explaining the recommendation varied strategy.
(1, pp. 4148), the committee stated that programming is
included to the extent necessary to support a thorough Skills materialword processing, browsing, processing
development of algorithmic thinking. It did not recommend e-mail, and so onis best taught in a lab with a video
majors -level programming knowledge. Specifically, the projector connected to the computer of the instructor.
committee identified a small list of programming concepts In the lab, students learn through doing, and,
that it regarded as sufficiently fundamental and generally because an important part of learning an application
accessible to be considered part of that programming con- is familiarity with the GUI, the video display facil-
tent. These concepts include name and value, assignment, itates demonstrations. Furthermore, the detailed
conditional execution, and repeated execution. It supported click here, click there instruction should give way
the choice by presenting examples where the ideas occur quickly to more generic instruction that describes
both within and beyond IT. Since the publication of the general properties of PC applications. This process
report, its wide distribution has exposed the approach to allows students to learn how to learn an application,
considerable scrutiny. Because the fluency concept has which makes them more independent.
been embraced widely and its algorithmic thinking/pro- Concepts materialcomputer operation, database prin-
gramming resolution has engendered almost no comment ciples, network protocols, and so forthis effectively
of any kind, it must be concluded that the committee science and can be learned most efficiently through a
recommendation settlesyes, but only a littlethe long- combination of textbook reading and lectures that
standing programming question. amplify and illustrate the ideas. Because computers
are so fast and the common applications are built with
IMPLEMENTING FLUENCY WITH INFORMATION millions of lines of software, students will not be able
to recognize the instruction interpretation cycle of a
TECHNOLOGY
computer or TCP/IP in their direct experience. So, the
The charge of the NRC committee was to specify only the goal is simply to explain, as is done in physics or
content that everyone should know about Information Tech- biology, how basic processes work.
4 FLUENCY WITH INFORMATION TECHNOLOGY

Capabilities materiallogical reasoning, complexity United States are beginning to promote FITness. These
management, debugging, and so forthis higher- courses typically replace traditional computer literacy
level thinking that often is learned through life classes both because fluency provides a more useful body
experience. Because capabilities generally are non of knowledge and because a majority of students are com-
algorithmic, they are somewhat more challenging to puter literate when they enter post secondary schools. So,
teach. Lecture demonstrations are effective because college-age students are becoming FIT, but what about the
the class can, say, debug a problem together, which remainder of the population?
illustrates the process and provides a context for The original NSF question asked what the population
commentary on alternative techniques. The capabil- at large should know about IT. Enrolled college students
ities, being instances of thinking, are not learned are only a small part of that, which raises the question of
entirely in a FITness course; students will continue how the adult population not in school is to become fluent.
to hone their knowledge throughout life. This problem remains unsolved. One small contribution to
the effort is a free, online, self-study version of the Uni-
As noted, projects provide the opportunity to apply and versity of Washington Fluency with Information Technol-
integrate these three kinds of knowledge. ogy course, called BeneFIT100. Any person with a
The committee recommended that the ideal case computer and Internet connection who speaks basic Eng-
would be for fluency instruction to be incorporated into lish, is computer literate enough to browse to the Uni-
discipline-specific IT instruction when possible. That is, versity of Washington Website, is disciplined enough to
as architecture students, business majors, and pharmacists take an online class, and is motivated to become fluent can
learn the technology that supports their specialties, they use BeneFIT100 to do so. Although many people doubtless
also learn the recommended skills, concepts, and capabil- meet those five qualifications, still they are a minority.
ities. Projects could be specialized to their area of study, and Expanding access to fluency instruction likely will remain
problem solving could incorporate discipline-specific meth- a difficult problem and the main challenge for the foresee-
odologies. Although it has advantages, the recommenda- able future.
tion implies that students learn FITness relatively late in
their college career, that is, after choosing a major. Because
BIBLIOGRAPHY
the material applies across the curriculum, it is advanta-
geous to learn it much earlier, for example, freshman year
1. National Research Council, Being Fluent with Information
or before college, so that it can support the whole academic
Technology, Washington, D. C.: National Academy Press, 1999.
program. A compromise would be to offer generic FITness,
2. L. Snyder, Fluency with Information Technology: Skills, Con-
as described above, as early as possible, and then to give
cepts, and Capabilites, 3rd ed., Reading, MA: Addison Wesley,
further instruction on the capabilities in a research meth-
2007.
ods or career tools class once students have specialized in a
major.
LAWRENCE SNYDER
University of WashingtonSeattle
NEXT STEPS FOR FLUENCY
Seattle, Washington

Universities, colleges, and community colleges are adopt-


ing fluency courses at a rapid rate, and schools outside the
Q
QUALITY IN COMPUTER SCIENCE AND learning outcomes? Do modern approaches to learn-
COMPUTER ENGINEERING EDUCATION ing and teaching by current developments and scho-
larship influence the discipline?
INTRODUCTION 3. Assessment. Does the assessment process enable
students to demonstrate acquisition of the full range
Any attempt to define the concept of quality, as it exists in of intended learning objectives? Does criteria exist to
higher education, tends to reveal the fact that in some sense define different levels of achievement? Are full secur-
it is elusive; on the other hand, you know it when you see ity and integrity associated with the assessment
it. In his article, Peter Knight (1) articulates some of the processes? Does the program require formative as
dilemmas such as efficiency or effectiveness, emphasis on well as summative assessment? Does the program
measurement or emphasis on process, and well-specified meet benchmarking standards?
procedures or well-rehearsed goals. In some sense, one 4. Enhancement. Does the program use an activity that
must achieve a proper balance. Of necessity, students seeks to improve standards regularly, (e.g., via inter-
themselves must be active, engaged, with and committed nal or external reviews, appropriate communication
to the educational process. Given the current recognition of with the external examiner(s), accreditation activity)
the phenomenon of the globalization of the workforce, it is and how deep and thorough is that activity? Are data
very important for students to be competitive in the inter- analyzed regularly and are appropriate actions
national workplace by the time they graduate. taken?
The approaches to quality are many and varied, with
5. Teaching and learning. Are the breadth, depth, and
different mechanisms and approaches. In turn these
challenge of the teaching of the full range of skills as
approaches produce different emphases, and inevitably,
well as the pace of teaching appropriate? Does the
these tend to condition the behavior of those involved.
program implement a suitable variety of appropriate
Invariably, the mechanisms should place an emphasis on
methods? If so, do these methods truly engage and
improvement or enhancement, although judgements inevi-
motivate the students? Are the learning materials of
tably have some role when it comes to assessing quality
high quality? Are the students participating in learn-
either through accreditation or through some other process.
ing?
The purpose of this article is to focus on the quality
issues within computer science and computer engineering 6. Student progression. Does the program have an
degree programs. In some countries, program quality is appropriate strategy for academic support? Is admis-
fostered through an accreditation process, whereas in sions information clear and does it reflect the course
others, slightly different approaches are employed. Here of study faithfully? Are supervision arrangements in
we attempt to span that spectrum. place? Do students receive appropriate induction
throughout their course?
7. Learning resources. Are the teaching staff appropri-
THE CONCEPT OF QUALITY ately qualified to teach the given program of study
and do they have the opportunity to keep teaching
Many definitions of the term quality exist as it applies in the materials as well as their competences up-to-date? is
context of higher education. Even in the context of indivi- effective support provided in laboratories and for
dual programs of study, Different ways exist to define in the practical activity? How does the institution use
concept. In the United Kingdom, for instance, many differ- resources for the purposes of learning? Is the student
ent interpretations exist. Earlier definitions proved exces- working space attractive and is the general atmo-
sively complex to manage and to operate. A relatively
sphere in the department conducive to learning?
recent document outlines certain principles that auditors
should use during the review of programs of study (see Ref.
2). In this document, only seven aspects are most impor-
PARTICULAR APPROACHES
tant, which include the following:

1. Aims and outcomes. What are the intended learning


The U.S. SituationABET and CC2001
outcomes of the program and how were these
obtained (e.g., from guidance from benchmarking Within the United States, ABET, Inc. (formerly known as
standards, professional body requirements, local the Accreditation Board for Engineering and Technology,
needs)? How do these out comes relate to the overall established in 1932) undertakes accreditation in the field
aims of the provision? Are staff and students familiar of applied sciences, computing, engineering, and technol-
with these outcomes? ogy. In this capacity, it undertakes the accreditation of
2. Curricula. Does the design and content of the curri- individual programs of study. It recognizes accreditation
culum encourage achievement of the full range of that is a process whereby programs are scrutinized to
ascertain whether they meet quality standards estab-
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 QUALITY IN COMPUTER SCIENCE AND COMPUTER ENGINEERING EDUCATION

lished by the professions. The view is that accreditation Computer Science Component. Specifically, the study of
benefits: computer science must include a broad-based core of com-
puter science topics and should have at least 16 semester
 Students who choose programs of study with careers in hours; the program should have at least 16 hours of
mind advanced material that builds on that core. Core material
 Employers to enable them to recognize graduates who must cover algorithms, data structures, software design,
will meet these standards concepts in programming languages, and computer archi-
 Institutions that are provided with feedback and even tecture and organization. The program must stress theo-
guidance on their courses. retical considerations and an ethos of problem solving and
design must exist. In addition, students require exposure to
a variety of programming languages and systems and they
Within ABET, CSAB, Inc. (formerly known as the Com- must become proficient in at least one high-level program-
puting Sciences Accreditation Board) is a participating ming language.
body and it is the lead society to represent programs in
computer science, information systems, software engineer- Mathematics and Science Component. The program must
ing, and information technology. It is also a cooperating contain at least 15 semester hours of mathematics; the
society (with the IEEE as the lead society) that represents mathematical content must include discrete mathematics,
programs in computer engineering. However, within differential and integral calculus, as well as probability and
ABET, its computing accrediting commission (CAC) is statistics. In addition, the program must contain at least 12
responsible to conduct the accreditation process for pro- semester hours of science to include an appropriate two-
grams in computer science, information systems, and infor- semester sequence of a science course.
mation technology. engineering accreditation commission
(EAC) is responsible for the accreditation of programs in Additional Areas of Study. Oral and written communica-
software engineering and in computer engineering. tion skills must be well developed and be applied through-
out the program. Additionally, students must be
Criteria for Accrediting Computer Science Programs. The knowledgeable about legal, ethical, and professional issues.
ABET criteria for computer science programs may be Beyond these matters of a technical nature, the program is
found in Ref. 3. What follows is based directly on that also required to have laboratories and general facilities of a
publication. high standard; moreover, the institution must have suffi-
Each program of study will possess some published cient resources (interpreted in the broadest sense) to pro-
overall set of objectives that aim to capture the philosophy vide a good environment that is aligned with the objectives
of the program. Typically, these objective might address of the program.
now students are prepare for a variety of possible careers in
computer science or possible advanced study in that field. Criteria for Accrediting Computer Engineering Pro-
A program of study, as defined by the individual mod- grams. The ABET criteria for computer engineering pro-
ules, must be consistent with these objectives. Beyond grams can be found in Ref. 4. What follows is based directly
this, the program requires additional elements phrased on that publication.
in terms of a general component, a technical computer The criteria here take a different form from those out-
science component, a mathematics and science compo- lined above for computer science; they are phrased in terms
nent, and a component that addresses additional areas of general criteria that are applicable to all engineering
of study. The requirements themselves stipulate mini- programs followed by criteria that are specific to computer
mum times to devote to particular areas and issues that engineering. Thus, the general criteria mention students,
rate to content. program educational objectives, associated outcomes and
To quantify the time element, a typical academic year assessment, and a professional component. We now
consists of two semester terms (though three quarter terms describe these four areas.
are also possible). A semester consists of 15 weeks and one
semester hour is equivalent to meeting a class for 50 Students. The quality and performance of students is an
minutes one time a week for 15 weeks; that is, it is equiva- important measure of the health of the program. Of course,
lent to 750 minutes of class time during a semester. Stu- appropriate advice and guidance must be available to
dents take courses minimally worth 30 semester hours per enhance that quality. Mechanisms must be in place to
year for four years; this is equivalent to 120 semester hours ensure that all students meet the stated learning objectives
for a baccalaureate degree. of the program. Firther more, it is imperative that institu-
tions not only have policies to accept students from else-
General Component. The general component of the where (and recognizing credit gained) but also to validate
accreditation criteria stipulates that a degree in computer courses taken in other institutions.
science must contain at least 40 semester hours of appro-
priate and up-to-date topics in computer science. In addi- Program Educational Objectives. The criteria indicate
tion, the degree program must contain 30 semester hours of that detailed published objectives (validated and reviewed
mathematics and science, 30 hours of study in the huma- at regular intervals) must exist for each program of study
nities, social sciences, and the arts to provide a broadening and these objectives must be consistent with the mission of
education. the institution. The educational programs must provide
QUALITY IN COMPUTER SCIENCE AND COMPUTER ENGINEERING EDUCATION 3

classes whose successful completion implies that the broad The System in the United Kingdom
program meets its aims and objectives.
In the United Kingdom, the benchmarking standards cap-
ture important aspects of the quality of programs of study in
Program Outcomes and Assessment. This aspect of the
individual disciplines. Representative groups from the
criteria relates to the expected profile of a student when
individual subject communities have developed these stan-
program of study is completed successfully. Thus, success-
dards. In the context of computing, the relevant document
ful completion of the individual classes should produce a
(included in Ref. 10) the Quality Assurance Agency (the
graduate who possesses a range of skill or attributes. These
government body with general responsibility for quality in
attributes include appropriate knowledge and skills, the
higher education is published in the united kingdom by).
ability to design and conduct experiments, the ability to
This document also forms the basis for the accreditation of
work in multi-disciplinary teams, the ability to communi-
computing programs in the United Kingdom, an activity to
cate effectively, the understanding of professional and
ensure that institutions provide within their courses the
ethical issues, and the ability to apply their skills to under-
basic elements or foundations for professionalism.
take effective engineering practice.
The benchmarking document in computing is a very
general outline in the sense that it must accommodate a
Professional Component. This aspect relates to the inclu- wide range of existing degree programs; at the time of its
sion of one year of a combination of mathematics and basic development, an important consideration was that it had
science, one and a half years of relevant engineering topics, not to stifle, but rather facilitate, the development of new
and a general education program that complements the degree programs. The approach adopted was not to be
technical aspects of the program. dogmatic about content but to place a duty on institutions
to explain how they met certain requirements.
Additional Criteria. Beyond the previous criteria, addi- The benchmarking document contains a set of require-
tional requirements exist concerning the setting in which ments that must be met by all honors degrees in computing
the program is based. Thus, the teaching staff must have an offered by U.K. institutions of higher education. This docu-
appropriate background, the facilities must be of high ment defines minimal criteria for the award of an honors
quality, and the institution must have the general degree, but it also addresses the criteria expected from an
resources to provide an environment in which successful average honors student; in addition, it indicates that cri-
and fruitful study can take place. teria should exist to challenge the higher achieving stu-
The specific computer engineering criteria include the dents (e.g., the top 10%) and it provides guidance on
requirement that the program should exhibit both the possible programs.
breadth and depth across a range of engineering topics The benchmarking document addresses knowledge and
in the area of the program of study. This range must include understanding, cognitive skills, and practical and transfer-
knowledge of probability and statistics, mathematics, able skills; it views professional, legal, and ethical issues as
including the integral and differential calculus, computer
important. It recognizes these aspects as interrelated deli-
science, and the relevant engineering sciences needed to cately but intimately. Several aspects of the requirements
design and develop complex devices. contained within the benchmarking document require
mentioning these because indicate nequirements funda-
Computing Curricula 2001. Within the ABET criteria, mental thinking.
core, advanced topics, and so on are mentioned. To provide a First, all degree programs should include some theory
meaning for these terms, several professional societies, that acts as underpinning and institutions are required to
such as the ACM and the IEEE Computer Society, have defend their position on this matter. The theory need not be
worked together to produce curriculum guidance that mathematical (e.g., it might be based on psychology), but it
includes mention of these terms. will serve to identify the fundamentals on which the pro-
We refer to this recent guidance as Computing Curricula gram of study is based. This requirement should guarantee
2001 (or CC 2001 for short). Earlier documents were pub- some level of permanence to benefit the educational provi-
lished as single volumes and they tended to focus on com- sion.
puter science programs. The expansion in the field of Furthermore, all degree programs must take students to
computing resulted in an effort to culminate the publishing the frontiers of the subject. Institutions must identify themes
of five volumes that cover computer science, information developed throughout the course of study, from the basics
systems, computer engineering, software engineering, as through to the frontiers of current knowledge. In addition, all
well as information technology (see Refs. 58). A sixth students should undertake, usually in their final year, an
volume is intended to provide an overview of the entire activity that demonstrates an ability to tackle a challenging
field (see Ref. 9). These references should provide up-to- problem within their sphere of study and to solve this pro-
date guidance on curriculum development and extends to blem using the disciplines of the subject. The essence of this
detailed outlines for particular programs of study and activity is to demonstrate an ability to take ideas from several
classes within these programs. The intent is that these classes or modules and explore their integration by solving a
works will receive updates at regular intervals (e.g., per- major problem.
haps every five years) to provide the community with up-to- Finally, from the point of view of the accreditation
date information and advice on these matters. carried out by the British Computer Society (BCS), the
standards impose some additional requirements beyond
4 QUALITY IN COMPUTER SCIENCE AND COMPUTER ENGINEERING EDUCATION

those of the benchmarking standard to allow for some sions; After the visit, auditors would discuss their findings
specific interpretations. For instance, the major final amongst themselves. Although this process had value, most
year activity must be a practical problem-solving activity have deemed it to be less than satisfactory because it failed
that involves implementation. to drill down to departmental activity (see Ref. 12).
In December 1999, the Swedish government passed a
The Australian Approach bill that placed the student at the very heart of quality and
at the heart of developments in higher education. Since
The Australian Universities Quality Agency, AUQA for
2002, quality assessment activities would be conducted by
short, has a key overarching role in relation to the quality
the agency on a six-year cycle. The process would involve
in Australian Universities (and beyond). Its objectives that
self-assessment, visits from peer review teams, and the
relate primarily to course accreditation appear in Ref. 11.
publication of reports. Four main purposes in the new
The objectives specify two main points. First, the need to
system (see Ref. 12) are as follows:
arrange and to manage a system of periodic audits of the
quality assurance arrangements of the activities of Aus-  Ensure that students are offered equivalent education
tralian universities, other self-accrediting institutions, and
of good quality, regardless of their home institution
state and territory higher education accreditation bodies is
specified. In addition, the domument sitpulates that insti-
 Ensure that assessments place a premium on improve-
tutions must monitor, review, analyze, and provide public ment
reports on quality assurance arrangements in self-accred-  Provide both students and potential students with
iting institutions, on processes and procedures of state and information regarding the quality of degree programs
territory accreditation authorities, and on the impact of  Allow stakeholders to make comparisons on the aspect
these processes on the quality of programs. of provision, which should include international com-
The AUQA places a great emphasis on the self-review parisons
carried out by each institution. This self review will use a
set of internal quality processes, procedures, and practices The new activity has improved the level of education
that must be robust and effective, with an emphasis on greatly in Sweden.
improvement. These internal mechanisms should accom-
modate accreditation and other such activities carried out
by professional bodies and must imply peer judgement. ADDITIONAL OBSERVATIONS
The AUQA itself seeks to encourage improvement and
enhancement through the publication of good practice, as
well as providing advice, and where desirable, consultation. Blooms Taxonomy and Educational Objectives
The possibility of inter-institutional discussion also exists. The seminal work of Bloom et al. (13) has conditioned
heavily current thinking on educational objectives. Since
The Swedish System its publication in 1956, this area has attracted extensive
In 1995, the National Agency for Higher Education in interest. More recently, the preoccupation with standards
Sweden initiated a set of quality audits of institutions of of achievement and more general quality concerns have
higher education. In this audit, institutions were required resulted in attempts to clarify and to reformulate the
to produce a self-evaluation of their provision; to sustain a underlying principles. One such reference is Ref. 14, which
team visit of auditors; and to conduct meetings and discus- forms the basis of the discussion here, see Table 1.

Table 1. The cognitive process dimension (from Ref. 14 with permission)


Process Categories Definitions Illustrations of Cognitive Processes
1. Remember Retrieve knowledge from memory Recognize, recall, define, describe, repeat

2. Understand Construct meaning from Interpret, give examples, place in already defined categories,
summarize, infer, compare, explain, discuss, indicate, interpret,
extrapolate

3. Apply Perform a known procedure in a given Execute, implement, illustrate, solve, demonstrate, measure
situation

4. Analyze Break material into constituent parts and Discriminate, distinguish, organize, attribute, criticize,
determine the relationships between compare, contrast, examine, question, test
these parts and how they contribute
to the whole

5. Evaluate Make judgments based on criteria and on Check, compare and contrast, critique, defend, estimate, judge,
standards predict, select, assess, argue

6. Create Put elements together to form a coherent Design, compose, construct, produce, plan, generate, innovate;
and/or functional entity introduce new classifications; introduce new procedures
QUALITY IN COMPUTER SCIENCE AND COMPUTER ENGINEERING EDUCATION 5

The typical form of a learning objective is a verb (which It is now widely recognized in higher education circles
implies an activity that provides evidence of learning and that these levels from Blooms taxonomy are most effective
therefore enhanced behavior) applied to some area of when combined with levels of difficulty and the currency of
knowledge. Txpically, The verbs capture what students the knowledge within the discipline.
must be able to do. The objective must imply the acquisition
of cognitive skills such as the ability to carry out some Keeping Up-To-Date
activity, or the acquisition of some knowledge.
Especially for the computing profession, keeping up-to-
In its original formulation, Blooms taxonomy paid little
date is essentially an attitude of mind. It involves regular
attention to the underlying knowledge. Yet, we can identify
update of technical developments to ensure the mainte-
different types of knowledge. Within any discipline, of
nance of knowledge as well as skill levels at the forefront of
course, the community will classify knowledge as elemen-
developments. Doing this requires discipline and support.
tary and as advanced.
Where changes in attitude and/or changes of a fundamen-
tal kind are required, a period of intense study must take
The Knowledge Dimension. We now recognize that dif-
place.
ferent kinds of knowledge exist. In Ref. 14, four different
Technological change can herald opportunities for crea-
kinds of knowledge are identified, and these are captured
tivity and innovation. This change can lead to advances
within Table 1.
that result in improvements such as greater efficiency,
greater functionality, and greater reliability with enhanced
The Cognitive Dimension. We base this on a set of levels
products or even new products that emerge as a result.
that claim to identify key skills in an increasing order of
Novel devices and new ways of thinking are especially
difficulty. These skills have been refined over the years but
cherished.
again a recent version taken from Ref. 14 appears in Table 2.
Higher education must to prepare students for chal-
Of course, one can apply learning objectives at different
lenges and opportunities. We can achieve this through
levels. For example, learning objectives can exist at the
imaginative approaches to teaching as well as through
level of:
imaginative assignments and projects. Promoting innova-
tion and creativity is important in computing courses. The
 A program of studyhence, program objectives
concept of a final-year project in the united kingdom
 A module or a classhence, module or class objectives similar to a capstone project in U.S. parlanceis an impor-
 Some knowledge unithence, instructional objectives tant vehicle from this perspective. More generally, it pro-
vides the opportunity for students to demonstrate their
These objectives range from the general to the particu- ability to apply the disciplines and techniques of a program
lar. Their role and function are different at these levels. of study by solving a substantial problem. Such exercises
However, within a particular program of study, the attain- should open up opportunities for the demonstration of
ment of the lower-level objectives should be consistent with, novelty.
and indeed contribute to, the attainment of the higher-level We can identify a number of basic strategies to ensure a
objectives. A question is generated about consistency; that stimulating and an up-to-date provision. First, the curri-
is, to determine whether the attainment of the lower-level culum itself must be up-to-date, the equipment has to be up-
learning objectives implies attainment of the higher-level to-date, and faculty need to engage in relevant scholarship.
objectives. Teachers can highlight relevant references (textbooks, soft-
ware, websites, case studies, illustrations, etc.) with the by

Table 2. The knowledge dimension (taken from Ref. 14 with permission)


Knowledge Types Definitions Knowledge Subtypes
Factual knowledge Basic terminology and elements of the discipline a) Terminology
b) Specific details and elements

Conceptual knowledge Inter-relationships among different elements of a) Classifications and categories


the discipline, structures and classifications, b) Principles and generalizations
theories, and principles c) Theories, models, and structures

Procedural knowledge Algorithms, methods, methodologies,techniques, a) Subject-specific skills and algorithms


skills, as well as methods of enquiry and b) Techniques and methods
processes c) Criteria for selection of approach

Meta-cognitive knowledge Knowledge of cognition in general and self- a) Strategic knowledge


awareness in this regard b) Knowledge about cognitive tasks,
includinginfluences of context and
constraints
c) Self-knowledge
6 QUALITY IN COMPUTER SCIENCE AND COMPUTER ENGINEERING EDUCATION

Table 3. (See Ref. 15)


Stage Student Instructor Instructional Example
1 Dependent Authority/coach Lecturing, coaching
2 Interested Motivator/guide Inspirational lecture, discussion group
3 Involved Facilitator Discussion lead by instructor Who participates as equal
4 Self-directed Consultant Internships, dissertations, self-directed study group

identifying sources of up-to-date and interesting informa-  Encourage attention to interesting and stimulating
tion. However, more fundamental considerations must be applications
addressed.  Address international issues of interest and relevance
We already mentioned that keeping up-to-date is essen- to the students and their future careers
tially an attitude of mind. Institutions can foster this  Encourage excellence through appropriate assess-
attitude by implementing new approaches to teaching
ment guidance
and learning that continually question and challenge
and by highlighting opportunities for advances. Teachers
As part of the preparation for such activity, students
can challenge students by developing assessments and
should understand what teachers expect of them and how
exercises that seek to explore new avenues. It is also
they can achieve the higher, even the highest, grades.
essential to see learning as an aspect that merits attention
throughout the curriculum. For instance, four stages are
identified in Table 3 (15).
CONCLUDING REMARKS
Basic Requirements of Assessment and Confidence Building
Ultimately, it is very important not to lose sight of the very
Certain basic requirements of assessment exist. Assess- real benefits gained when the teaching staff interacts with
ment must be fair and reliable, of course, and it should students. Thus, quality is what happens between students
address the true learning objectives of the classes. In and the teachers of an institution. Often, aspects of bureau-
addition, however, appropriate assessment should be cracy can tend to mask this important observation, and
enjoyable and rewarding, but all too often institutions do metrics and heavy paperwork take over. Fundamentally,
not follow these geidelines. the quality of education is about:
Overall, numerous and different skills require assess-
ment such as transferable skills, technical skills, and cog-  Teachers who have an interest in students have an
nitive skills. An over-emphasis on assessment, however, interest in teaching well and in motivating their stu-
can create an avalanche of anxiety and the normal trade- dents so that they can be proud of their achievements,
offs that are often fun become sacrificed, which makes the and they have an interest in their subject and its
situation highly undesirable. Imaginative ways of asses- applications. This often means teachers will adapt to
sing are needed and should be the subject of continual particular audiences without compromising important
change and exploration whereby assessors can discover standards.
better and more enjoyable approaches.  Students who feel welcomed and integrated into the
Of course, self-assessment should be encouraged. This ways of their department, who enjoy learning, and
can take (at least) one of two forms, which depend on whose ability to learn is developing so that the process
whether the student supplies the questions. However, becomes ever more efficient and effective find their
where students formulate their own assessments, these studies stimulating and interesting, find the material
tend to be useful at one level, but they tend not to challenge of the program of study relevant and meeting their
usefully or extend the horizons of individuals. needs, and feel themselves developing and their con-
One of the important goals of higher education is to fidence increasing.
extend the horizons and the capabilities of students and  The provision of induction to give guidance on course
to build up their confidence. That confidence should to be options as well as guidance of what is expected in terms
well-founded and based on what students have managed to of achieving the highest standards in particular areas.
accomplish and to achieve throughout their study. Accord-
 An environment that is supportive with good levels of
ingly, finding imaginative ways of assessing is important.
up-to-date equipment and resources, with case stu-
Assessment should
dies, and lecture material all being readily available to
inform, stimulate, and motivate.
 Seek to address a range of issues in terms of skills
 Build on the work of the class in a reasonable and
meaningful manner
 Challenge students whose confidence is enhanced by REFERENCES
successful completion of the work
1. P. T. Knight, The Achilles Heel of Quality: the assessment of
 Extend the horizons of individuals student learning, Quality in Higher Educ., 8(1): 107115, 2002.
QUALITY IN COMPUTER SCIENCE AND COMPUTER ENGINEERING EDUCATION 7

2. Quality Assurance Agency for Higher Education. Handbook 13. B.S. Taxonomy of Educational Objectives: The Classification of
for Academic Review, Gloucester, England: Quality Assurance Educational goals, Bloom, Handbook 1: Cognitive Domain,
Agency for Higher Education. New York: Longmans, 1956.
3. Computing Accreditation Commission, Criteria for Accrediting 14. L. W. Anderson, D. R. Kraathwohl, P. W. Airasian, K. A.
Computing Programs, Baltimore, MD: ABET, 2007. Cruikshank, R. E. Mayeer, P. R. Pintrich, J. Raths, M. C.
4. Engineering Accreditation Commission, Criteria for Accred- Wittrock (eds.), A Taxonomy for Learning, Teaching, and
iting Computing Programs, Baltimore, MD: ABET, 2007. Assessing A Revision of Blooms Taxonomy of Educational
Objectives, Reading, MA: Addison Wesley Longman, Inc., 2001.
5. E. Roberts and G. Engel (eds.), Computing Curricula 2001:
Computer Science, Report of The ACM and IEEE-Computer 15. S. Fellows, R. Culver, P. Ruggieri, W. Benson, Instructional
Society Joint Task Force on Computing Curricula, Final Tools for Promoting Self-directed Skills in Freshmen, FIE
Report, 2001 2002, Boston, November, 2002.
6. J. T. Gorgone, G. B. Davis, J. S. Valacich, H. Topi, D. L.
Feinstein, and H. E. Longenecker Jr., IS 2002: Model Curri-
FURTHER READING
culum for Undergraduate Degree Programs in Information
Systems, New York: ACM, 2002.
D. R. Krathwohl, B. S: Bloom, and B. B. Masia, Taxonomy of
7. R. Le Blanc and A. Sobel et al., Software Engineering 2004:
Educational Objectives: the Classification of Educational Goals,
Curriculum Guidelines for Undergraduate Degree Programs in
London: Longmans Green and Co., 1956.
Computer Engineering, Piscataway, N.J, IEEE Computer
Society, 2006 [Denning, 2003] P. J. Denning, Great principles of computing,
Comm. ACM, 46(11): 1520, 2003.
8. D. Soldan, et al., Computer Engineering 2004: Curriculum
Guidelines for Undergraduate Degree Programs in Soft- K. McKeown, L. Clarke, and J. Stankovic, CRA Workshop on
ware Engineering, Piscataway, NJ: IEEE Computer Research Related to National Security: Report and Recommenda-
Society, 2006 tions, Computing Res. Review News, 15, 2003.
9. R. Shackelford, et al., Computing Curricula 2005: The Over- National Science Foundation Blue-Ribbon Advisory Panel, Revo-
view Report, New York: Association for Computing Machinery, lutionizing Science and Engineering Through Cyber-infrastruc-
2006. ture, Arlington, UA: National Science Foundation, 2003.
10. Quality Assurance Agency for Higher Education. Academic Quality Assurance Agency for Higher Education. National Qua-
Standards Computing, Gloucester, England: The Quality lification Frameworks, published by Gloucester, England: The
Assurance Agency for Higher Education, 2000. Quality Assurance Agency for Higher Education.
11. Australian universities Quality Agency, AUQA The Audit
Manual, Melbourne: Australian Universities Quality Agency,
ANDREW MCGETTRICK
version 1, May 2002.
Glasgow, Scotland
12. [Franke, 2002] S. Franke, From audit to Assessment: a
national perspective on an international issue, Quality in
Higher Educ., 8(1): 2328, 2002.
Data
A
ACTIVE DATABASE SYSTEMS adopted by the ADBS is the so-called event-condition-action
(ECA) (1,7) which describes the behavior of the form:
INTRODUCTION AND MOTIVATION ON Event Detection
IF Condition Holds
Traditionally, the database management system (DBMS) THEN Execute Action
has been viewed as a passive repository of large quantities
of data that are of interest for a particular application, The basic tools to specify this type of behavior in com-
which can be accessed/retrieved in an efficient manner. The mercially available DBMS are triggersstatements that
typical commands for insertion of data records, deletion of the database automatically executes upon certain modifi-
existing ones, and updating of the particular attribute cations. The event commonly specifies the occurrence of (an
values for a selected set of items are executed by the instance of) a phenomenon of interest. The condition, on the
DBMS upon the users request and are specified via a other hand, is a query posed to the database. Observe that
proper interface or by an application program. Basic units both the detection of the event and the evaluation of the
of changes in the DBMS are the transactions, which corre- condition may require access not only to the current
spond to executions of user programs/requests, and are instance of the database but also to its history. The action
perceived as a sequence of reads and/or writes to the part of the trigger specifies the activities that the DBMS
database objects, which either commit successfully in their needs to executeeither a (sequence of) SQL statement(s)
entirety or abort. One of the main benefits of the DBMS is or stored procedure calls. As a motivational example to
the ability to optimize the processing of various queries illustrate the ECA paradigm, consider a scenario in which a
while ensuring the consistency of the database and particular enterprise would like to enforce the constraint
enabling a concurrent processing of multiple users trans- that the average salary is maintained below 65K. The
actions. undesired modifications to the average salary value can
However, many applications that require management occur upon: (1) an insertion of a new employee with above-
of large data volumes also have some behavioral aspects as average salary, (2) an update that increases the salaries of a
part of their problem domain which, in turn, may require an set of employees, and (3) a deletion of employees with below-
ability to react to particular stimuli. Traditional exemplary average salary. Hence, one may set up triggers that will
settings, which were used as motivational scenarios for the react to these types of modifications (event) and, when
early research works on this type of behavior in the DBMS, necessary (condition satisfied), will perform corrective
were focusing on monitoring and enforcing the integrity actions. In particular, let us assume that we have a relation
constraints in databases (14). Subsequently, it was recog- whose schema is Employee(Name, ID, Department, Job-
nized that this functionality is useful for a wider range of Title, Salary) and that, if an insertion of a new employee
applications of DBMS. For example, a database that man- causes the average salary-cap to be exceeded, then the
ages business portfolios may need to react to updates from a corrective action is to decrease everyones salary by 5%.
particular stock market to purchase or sell particular The specification of the respective trigger1 in a typical
stocks (5), a database that stores users preferences/profiles
DBMS, using syntax similar to the one proposed by the
may need to react to a location-update detected by some
SQL-standard (11), would be:
type of a sensor to deliver the right information content to a
user that is in the proximity of a location of interest (e.g., CREATE TRIGGER New-Employee-Salary-Check
deliver e-coupons when within 1 mile from a particular ON INSERT TO Employee
store) (6). IF (SELECT AVG Employee.Salary) > 65,000
An active database system (ADBS) (1,7) extends the UPDATE Set Employee.
traditional database with the capability to react to various Salary = 0.95Employee.Salary
events, which can be either internalgenerated by the
DBMS (e.g., an insertion of a new tuple as part of a given This seemingly straightforward paradigm has gener-
transaction), or externalgenerated by an outside DBMS ated a large body of research, both academic and indus-
source (e.g., a RFID-like location sensor). Originally, the trial, which resulted in several prototype systems as well
research to develop the reactive capabilities of the active as its acceptance as a part of the SQL99 (11) standard that,
databases was motivated by problems related to the main- in turn, has made triggers part of the commercially avail-
tenance of various declarative constraints (views, integrity able DBMS. In the rest of this article, we will present some
constraints) (2,3). However, with the evolution of the of the important aspects of the management of reactive
DBMS technologies, novel application domains for data behavior in ADBS and will discuss their distinct features.
management, such as data streams (8), continuous queries In particular, in the section on formalizing and reasoning,
processing (9), sensor data management, location-based
services, and event notification systems (ENS) (10), and 1
emerged, in which the efficient management of the reactive Observe that to fully capture the behavior described in this
scenario, other triggers are neededones that would react to
behavior is a paramount. The typical executional paradigm
the UPDATE and DELETE of tuples in the Employee relation.
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 ACTIVE DATABASE SYSTEMS

we motivate the need to formalize the active database the prior detection of E1 is followed by a detection of E2 (in
behavior. In the section on semantic Dimensions, we dis- that order). Clearly, one also needs an underlying detection
cuss their various semantic dimensions that have been mechanism for the expressions, for example, Petri Nets (17)
identified in the literature. In the overview section we or tree-like structures (5). Philosophically, the reason to
present the main features of some prototype ADBS briefly, incorporate both E and C parts of the ECA rules in ADBS
along with the discussion of some commercially available is twofold: (1) It is intuitive to state that certain conditions
DBMS that provide the triggers capability. Finally, in the should not always be checked but only upon the detection of
last section, we outline some of the current research certain events and (2) it is more cost-effective in actual
trends related to the reactive behavior in novel application implementations, as opposed to constant cycling through
domains for data management, such as workflows (12), the set of rules.2 Incorporating both events and conditions in
data streams (8,9), moving objects databases (13,14), and the triggers has generated a plethora of different problems,
sensor networks (6). such as the management of database state(s) during the
execution of the triggers (18) and the binding of the detected
events with the state(s) of the ADBS for the purpose of
FORMALIZING AND REASONING ABOUT THE ACTIVE condition evaluation (19).
BEHAVIOR The need for formal characterization of the active rules
(triggers) was recognized by the research community in the
Historically, the reactive behavior expressed as a set of early 1990s. One motivation was caused by the observation
condition ! action rules (IF condition holds, THEN execute that in different prototype systems [e.g., Postgres (4) vs.
action) was introduced in the Expert Systems literature Starburst (2)], triggers with very similar syntactic struc-
[e.g., OPS5 (15)]. Basically, the inference engine of the ture would yield different executional behavior. Along with
system would cycle through the set of such rules and, this was the need to perform some type of reasoning about
whenever a left-hand side of a rule is encountered that the evolution of an active database system and to predict
matches the current status of the knowledge base (KB), the (certain aspects of) their behavior. As a simple example,
action of the right-hand side of that rule would be executed. given a set of triggers and a particular state of the DBMS, a
From the perspective of the ECA paradigm of ADBS, this database/application designer may wish to know whether
system can be viewed as one extreme point: CA rules, a certain fact will hold in the database after a sequence of
without an explicit event. Clearly, some kind of implicit modifications (e.g., insertions, deletions, updates) have
event, along with a corresponding formalism, is needed so been performed. In the context of our example, one may
that the C-part (condition) can reflect properly and moni- be interested in the query will the average salary of the
tor/evaluate the desired behavior along the evolution of the employees in the Shipping department exceed 55K in any
database. Observe that, in general, the very concept of an valid state which results via salary updates. A translation
evolution of the database must be defined clearly for exam- of the active database specification into a logic program was
ple, the state of the data in a given instance together with proposed as a foundation for this type of reasoning in
the activities log (e.g., an SQL query will not change the Ref. (20).
data; however, the administrator may need to know which Two global properties that have been identified as desir-
user queried which dataset). A particular approach to able for any application of an ADBS are the termination and
specify such conditions in database triggers, assuming the confluence of a given set of triggers (21,22). The termi-
that the clock-tick is the elementary implicit event, nation property ensures that for a given set of triggers in
was presented by Sistla and Wolfson (16) and is based on any initial state of the database and for any initial mod-
temporal logic as an underlying mechanism to evaluate and ification, the firing of the triggers cannot proceed indefi-
to detect the satisfiability of the condition. nitely. On the other hand, the confluence property ensures
As another extreme, one may consider the EA type of that for a given set of triggers, in any initial state of the
rules, with a missing condition part. In this case, the detec- database and for any initial modification, the final state of
tion of events must be empowered with the evaluation of a the database is the same, regardless of the order of execut-
particular set of facts in a given state of the database [i.e., the ing the (enabled) triggers. The main question is, given the
evaluation of the C-part must be embedded within the specifications of a set of triggers, can one statically, (i.e., by
detection of the events (5)]. A noteworthy observation is that applying some algorithmic techniques only to the triggers
even outside the context of the ADBS, the event manage- specification) determine whether the properties of termi-
ment has spurred a large amount of research. An example is nation and/or confluence hold? To give a simple motivation,
the field known as event notification systems in which in many systems, the number of cascaded/recursive invoca-
various users can, in a sense, subscribe for notifications tions of the triggers is bounded by a predefined constant to
that, in turn, are generated by entities that have a role of avoid infinite sequences of firing the triggers because of a
publishersall in distributed settings (10). Researchers particular event. Clearly, this behavior is undesirable, if
have proposed various algebras to specify a set of composite the termination could have been achieved in a few more
events, based on the operators that are applied to the basic/ recursive executions of the triggers. Although run-time
primitive events (5,17). For example, the expression E E1 termination analysis is a possible option, it is preferable
^ E2 specifies that an instance of the event E should be
detected in a state of the ADBS in which both E1 and E2 are 2
A noteworthy observation here is that the occurrence of a parti-
present. On the other hand, E E1;E2 specifies that an cular event is, strictly speaking, different from its detection, which
instance of the event E should be detected in a state in which is associated with a run-time processing cost.
ACTIVE DATABASE SYSTEMS 3

A Simple Analog System A Digital System


Speaker

Microphone

Analog Amplifier Speaker


Personal Digital Assistant and a Mobile Phone
Microphone

Figure 1. Triggering graphs for termination and confluence.

to have static tools. In the earlier draft of the SQL3 stan- syntax for the users to select a desired value. To better
dard, compile-time syntactic restrictions were placed on the understand this concept, recall again our average salary
triggers specifications to ensure termination/confluence. maintenance scenario from the introduction. One of the
However, it was observed that these specifications may possible sources that can cause the database to arrive at an
put excessive limitations on the expressive power on the undesired state is an update that increases the salary of a
triggers language, which is undesirable for many applica- set of employees. We already illustrated the case of an
tions, and they were removed from the subsequent SQL99 insertion, now assume that the trigger that would corre-
draft. spond to the second case is specified as follows:
For the most part, the techniques to analyze the termi-
CREATE TRIGGER Update-Salary-Check
nation and the confluence properties are based on labeled
ON UPDATE OF Employee.Salary
graph-based techniques, such as the triggering hyper
IF (SELECT AVG Employee.Salary) > 65,000
graphs (22). For a simplified example, Fig. 1a illustrates
UPDATE Employee
a triggering graph in which the nodes denote the particular
SET Employee.Salary 0.95Employee.Salary
triggers, and the edge between two nodes indicates that the
modifications generated by the action part of a given trigger Assume that it was decided to increase the salary of
node may generate the event that enables the trigger every employee in the Maintenance department by 10%,
represented by the other node. If the graph contains a cycle, which would correspond to the following SQL statement:
then it is possible for the set of triggers along that cycle to
UPDATE Employee
enable each other indefinitely through a cascaded sequence
SET Employee.Salary 1.10Employee.Salary
of invocations. In the example, the cycle is formed among
WHERE Employee.Department Maintenance
Trigger1, Trigger3, Trigger4, and Trigger5. Hence, should
Trigger1 ever become enabled because of the occurrence of For the sake of illustration, assume that three employ-
its event, these four triggers could loop perpetually in a ees are in the Maintenance department, Bob, Sam, and
sequence of cascading firings. On the other hand, figure 1b Tom, whose salaries need to be updated. Strictly speaking,
illustrates a simple example of a confluent behavior of a set an update is essentially a sequence of a deletion of an old
of triggers. When Trigger1 executes its action, both Trig- tuple followed by an insertion of that tuple with the updated
ger2 and Trigger3 are enabled. However, regardless of values for the respective attribute(s); however, for the
which one is selected for an execution, Trigger4 will be purpose of this illustration, we can assume that the updates
the next one that is enabled. Algorithms for static analysis execute automatically. Now, some obvious behavioral
of the ECA rules are presented in Ref. (21), which addresses options for this simple scenario are:
their application to the triggers that conform to the SQL99
standard.  An individual instance of the trigger Update-Salary-
Check may be fired immediately, for every single
update of a particular employee, as shown in Fig. 2a.
SEMANTIC DIMENSIONS OF ACTIVE DATABASES  The DBMS may wait until all the updates are com-
pleted, and then execute the Update-Salary-Check,
Many of the distinctions among the various systems stem as illustrated in Fig. 2b.
from the differences in the values chosen for a particular  The DBMS waits for the completion of all the updates
parameter (23). In some cases, the choice of that value is an and the evaluation of the condition. If satisfied, the
integral part of the implementation (hard wired), execution of the action for the instances of the
whereas in other cases the ADBS provide a declarative Update-Salary-Check trigger may be performed
4 ACTIVE DATABASE SYSTEMS

either within the same transaction as the UPDATE actions of the triggers may generate events that
Employee statement or in a different/subsequent enable some other triggers, which causes a cascaded
transaction. firing of triggers.

These issues illustrate some aspects that have moti- In the rest of this section, we present a detailed discus-
vated the researchers to identify various semantic dimen- sion of some of the semantic dimensions of the triggers.
sions, a term used to identify the various parameters
collectively whose values may influence the executional
Granularity of the Modifications
behavior of ADBS. Strictly speaking, the model of the
triggers processing is coupled closely with the properties In relational database systems, a particular modification
of the underlying DBMS, such as the data model, the (insertion, deletion, update) may be applied to a single tuple
transaction manager, and the query optimizer. However, or to a set of tuples. Similarly, in an object-oriented data-
some identifiable stages exist for every underlying DBMS: base system, the modifications may be applied to a single
object or to a collection of objectsinstances of a given class.
 Detection of events: Events can be either internal, Based on this distinction, the active rules can be made to
caused by a DBMS-invoked modification, transaction react in a tuple/instance manner or in a set-oriented man-
command, or, more generally, by any server-based ner. An important observation is that this type of granu-
action (e.g., clicking a mouse button on the display); larity is applicable in two different places in the active
or external, which report an occurrence of something rules: (1) the events to which a particular rule reacts (is
outside the DBMS server (e.g., a humidity reading of awoken by) and (2) the modifications executed by the
a particular sensor, a location of a particular user action part of the rules. Typically, in the DBMS that
detected by an RFID-based sensor, etc). Recall that complies with the SQL standard, this distinction is speci-
(c.f. formalizing and reasoning), the events can be fied by using FOR EACH ROW (tuple-oriented) or FOR
primitive or composite, defined in terms of the primi- EACH STATEMENT (set-oriented) specification in the
tive events. respective triggers. In our motivational scenario, if one
 Detection of affected triggers: This stage identifies the would like the trigger Update-Salary to react to the mod-
subset of the specified triggers, whose enabling ifications of the individual tuples, which correspond to the
events are among the detected events. Typically, behavior illustrated in Fig. 2a, its specification should be:
this stage is also called the instantiation of the trig-
CREATE TRIGGER Update-Salary-Check
gers.
ON UPDATE OF Employee.Salary
 Conditions evaluation: Given the set of instantiated FOR EACH ROW
triggers, the DBMS evaluates their respective condi- IF SELECT(...)
tions and decides which ones are eligible for execution. ...
Observe that the evaluation of the conditions may
sometimes require a comparison between the values
in the OLD (e.g., pretransaction state, or the state just Coupling Among Triggers Components
before the occurence of the instantiating event) with Because each trigger that conforms to the ECA paradigm
the NEW (or current) state of the database. has three distinct partsthe Event, Condition, and
 Scheduling and execution: Given the set of instan- Actionone of the important questions is how they are
tiated triggers, whose condition part is satisfied, this synchronized. This synchronization is often called the cou-
stage carries out their respective action-parts. In pling among the triggers components.
some systems [e.g., Starburst (2)] the users are
allowed to specify a priority-based ordering among  E-C coupling: This dimension describes the temporal
the triggers explicitly for this purpose. However, in relationship among the events that enable certain
the SQL standard (11), and in many commercially triggers and the time of evaluating their conditions
available DBMSs, the ordering is based on the time parts, with respect to the transaction in which the
stamp of the creation of the trigger, and even this may events were generated. With immediate coupling, the
not be enforced strictly at run-time. Recall (c.f. for- conditions are evaluated as soon as the basic mod-
malizing and reasoning) that the execution of the ification that produced the events is completed.
ACTIVE DATABASE SYSTEMS 5

Under the delayed coupling mode, the evaluation of such behavior is found in the production rule systems
the conditions is delayed until a specific point (e.g., a used in expert systems (15).
special event takes place such as an explicit rule-  Local consumption: once an instantiated trigger has
processing point in the transaction). Specifically, if proceeded with its condition part evaluation, that
this special event is the attempt to commit the trans- trigger can no longer be enabled by the same event.
action, then the coupling is also called deferred. However, that particular event remains eligible for
 C-A coupling: Similarly, for a particular trigger, a evaluation of the condition the other triggers that it
temporal relationship exists between the evaluation has enabled. This feature is the most common in the
of its condition and (if satisfied) the instant its action existing active database systems. In the setting of our
is executed. The options are the same as for the E-C motivational scenario, assume that we have another
coupling: immediate, in which case the action is trigger, for example, Maintain-Statistics, which also
executed as soon as the condition-evaluation is com- reacts to an insertion of new employees by increasing
pleted (in case it evaluates to true); delayed, which properly the total number of the hired employees in
executes the action at some special point/event; and the respective departmental relations. Upon inser-
deferred, which is the case when the actions are tion of a set of new employees, both New-Employee-
executed at the end (just before commit) of the trans- Salary-Check and Maintain-Statistics triggers will
action in which the condition is evaluated. be enabled. Under the local consumption mode, in
case the New-Employee-Salary-Check trigger exe-
A noteworthy observation at this point is that the cutes first, it is no longer enabled by the same inser-
semantic dimensions should not be understood as isolated tion. The Maintain-Statistics trigger, however, is left
completely from each other but, to the contrary, their enabled and will check its condition and/or execute its
values may be correlated. Among the other reasons, this action.
correlation exists because the triggers manager cannot be  Global consumption: Essentially, global consumption
implemented in isolation from the query optimizer and the means that once the first trigger has been selected for
transaction manager. In particular, the coupling modes its processing, a particular event can no longer be
discussed above are not independent from the transaction used to enable any other triggers. In the settings of
processing model and its relationship with the individual our motivational scenario, once the given trigger
parts of the triggers. As another semantic dimension in this New-Employee-Salary-Check has been selected for
context, one may consider whether the conditions evalua- evaluation of its condition, it would also disable the
tion and the actions executions should be executed in the Maintain-Statistics despite that it never had its con-
same transaction in which the triggering events have dition checked. In general, this type of consumption is
occurred (note that the particular transaction may be appropriate for the settings in which one can distin-
aborted because of the effects of the triggers processing). guish among regular rules and exception rules
In a typical DBMS setting, in which the ACID (atomicity, that are enabled by the same event. The exception
consistency, isolation, and durability) properties of the not only has a higher priority, but it also disables the
transactions must be ensured, one would like to maintain processing of the regular rule.
the conditions evaluations and actions executions within
the same transaction in which the triggering event origi- A particular kind of event composition, which is
nated. However, if a more sophisticated transaction man- encountered in practice, frequently is the event net effect.
agement is available [e.g., nested transactions (24)] they The basic distinction is whether the system should con-
may be processed in a separate subtransaction(s), in which sider the impact of the occurrence of a particular event,
the failure of a subtransaction may cause the failure of a regardless of what are the subsequent events in the
parent transaction in which the events originated, or in two transaction, or consider the possibility of invalidating
different transactions. This transaction is known com- some of the events that have occurred earlier. As a parti-
monly as a detached coupling mode. cular example, the following intuitive policy for computing
the net effects has been formalized and implemented in
Events Consumption and Composition the Starburst system (2):
These dimensions describe how a particular event is trea-
 If a particular tuple is created (and possibly updated)
ted when processing a particular trigger that is enabled due
in a transaction, and subsequently deleted within
to its occurrence, as well as how the impact of the net effect
that same transaction, the net effect is null.
of a set of events is considered.
One of the differences in the behavior of a particular  If a particular tuple is created (respectively, updated)
ADBS is caused by the selection of the scope(23) of the event in a transaction, and that tuple is updated subse-
consumptions: quently several times, the net effect is the creation of
the final version of that tuple (respectively, the single
 NO consumption: the evaluation and the execution of update equivalent to the final value).
the conditions part of the enabled/instantiated trig-  If a particular tuple is updated and deleted subse-
gers have no impact on the triggering event. In quently in a given transaction, then the net effect is
essence, this means that the same event can enable the deletion of the original tuple.
a particular trigger over and over again. Typically,
6 ACTIVE DATABASE SYSTEMS

Figure 3. Composite events and


consumption.

Combining the computation of the net effects in systems  Pre-event state: given a particular trigger, the state of
that allow specification of composite events via an event the database just before the occurrence of the event
algebra (5,17) is a very complex problem. The main reason that enabled that trigger.
is that in a given algebra, the detection of a particular
composite event may be in a state in which several different Typically, in the existing commercially available DBMS
instances of one of its constituent events have occurred. that offers active capabilities, the ability to query the past
Now, the question becomes what is the policy for consuming states refers to the pretransaction state. The users are
the primitive events upon a detection of a composite one. An given the keywords OLD and NEW to specify declaratively
illustrative example is provided in Fig. 3. Assume that the which part needs to be queried when specifying the condi-
elementary (primitive) events correspond to tickers from tion part of the triggers (11).
the stockmarket and the user is interested in the composite Another option for inspecting the history of the active
event: CE (two consecutive increases of the IBM stock) database system is to query explicitly the set of occurred
AND (two consecutive increases of the General Electric [GE] events. The main benefit of this option is the increased
stock). Given the timeline for the sequence of events illu- flexibility to specify the desired behavioral aspects of a
strated in Fig. 3, upon the second occurrence of the GE stock given application. For example, one may wish to query
increase (GE2), the desired composite event CE can be not all the items affected by a particular transaction, but
detected. However, now the question becomes which of the only the ones that participated in the generation of the
primitive events should be used for the detection of CE (6 given composite event that enabled a particular trigger (5).
ways exist to couple IBM-based events), and how should the Some prototype systems, [e.g., Chimera (25) offer this
rest of the events from the history be consumed for the extended functionality, however, the triggers in the
future (e.g., if GE2 is not consumed upon the detection of commercially available DBMS that conform to the SQL
CE, then when GE3 occurs, the system will be able to standard are restricted to querying the database states only
detect another instance of CE). Chakravarthy et al. (5) have (c.f., the OLD and NEW above).
identified four different contexts (recent, chronicle, contin- Recent works (26) have addressed the issues of extend-
uous, and cumulative) of consuming the earlier occurrences ing the capabilities of the commercially available ORDBMS
of the primitive constituent events which enabled the Oracle 10g (27) with features that add a flexibility for
detection of a given composite event. accessing various portions (states) of interest throughout
the evolution of the ADBS, which enable sophisticated
Data Evolution management of events for wide variety of application
domains.
In many ADBSs, it is important to query the history con-
cerning the execution of the transaction(s). For example, in
Effects Ordering
our motivational scenario, one may envision a modified
constraint that states that the average salary increase in We assumed that the execution of the action part of a
the enterprise should not exceed 5% from its previous value particular trigger occurs not only after the occurrence of
when new employees are and/or inserted when the salaries the event, but also after the effects of executing the mod-
of the existing employees are updated. Clearly, in such ifications that generated that event have been incorpo-
settings, the conditions part of the respective triggers rated. In other words, the effects of executing a
should compare the current state of the database with particular trigger were adding to the effects of the mod-
the older state. ifications that were performed by its enabling event.
When it comes to past database states, a special syntax is Although this seems to be the most intuitive approach,
required to specify properly the queries that will retrieve in some applications, such as alerting or security monitor-
the correct information that pertains to the prior database ing, it may be desirable to have the action part of the
states. It can be speculated that every single state that corresponding trigger execute before the modifications of
starts from the begin point of a particular transaction the events take place, or even instead of the modifications.
should be available for inspection; however, in practice, Typical example is a trigger that detects when an unauthor-
only a few such states are available (c.f. Ref. (23)): ized user has attempted to update the value of a particular
tuple in a given relation. Before executing the users
 Pretransaction state: the state of the database just request, the respective log-file needs to be updated prop-
before the execution of the transaction that generated erly. Subsequently, the user-initiated transaction must be
the enabling event. aborted; instead, an alert must be issued to the database
 Last consideration state: given a particular trigger, administrator. Commercially available DBMS offer the
the state of the database after the last time that flexibility of stating the BEFORE, AFTER, and INSTEAD
trigger has been considered (i.e., for its condition preferences in the specification of the triggers.
evaluation).
ACTIVE DATABASE SYSTEMS 7

Conflict Resolution and Atomicity of Actions the various ADBSs. For example, it can be demonstrated
that:
We already mentioned that if more than one trigger is
enabled by the occurrence of a particular event, some  The A-RDL system (30) under the immediate cou-
selection must be performed to evaluate the respective pling mode is equivalent to the Postgres system (4) on
conditions and/or execute the actions part. From the ordered databases.
most global perspective, one may distinguish between
 The Starburst system (2) is incomparable to the
the serial execution, which selects a single rule according
Postgres system (4).
to a predefined policy, and a parallel execution of all the
enabled triggers. The latter was envisioned in the HiPAC  The HiPAC system (28) subsumes strictly the Star-
active database systems (c.f. Ref. (28)) and requires sophis- burst (2) and the Postgres (4) systems.
ticated techniques for concurrency management. The
former one can vary from specifying the total priority Although this type of analysis is extremely theoretical in
ordering completely by the designer, as done in the Postgres nature, it is important because it provides some insights
system (4), to partial ordering, which specifies an incom- that may have an impact on the overall application design.
plete precedence relationship among the triggers, as is the Namely, when the requirements of a given application of
case in the Starburst system (20). Although the total order- interest are formalized, the knowledge of the expressive
ing among the triggers may enable a deterministic behavior power of the set of available systems may be a crucial factor
of the active database, it may be too demanding on the to decide which particular platform should be used in the
designer, who always is expected to know exactly the implementation of that particular application.
intended behavior of all the available rules (23). Commer-
cial systems that conform with the SQL99 standard do not OVERVIEW OF ACTIVE DATABASE SYSTEMS
offer the flexibility of specifying an ordering among the
triggers. Instead, the default ordering is by the timestamp In this section, we outline briefly some of the distinct
of their creation. features of the existing ADBSboth prototypes as well
When executing the action part of a given trigger, a as commercially available systems. A detailed discussion
particular modification may constitute an enabling event of the properties of some systems will also provide an
for some other trigger, or even for a new instance of the insight of the historic development of the research in the
same trigger whose actions execution generated that field of ADBS, can be found in Refs. (1) and (7).
event. One option is to interrupt the action of the currently
executing trigger and process the triggers that were awo- Relational Systems
ken by it, which could result in cascaded invocation where
the execution of the trigger that produced the event is A number of systems have been proposed to extend the
suspended temporarily. Another option is to ignore the functionality of relational DBMS with active rules. Typi-
occurrence of the generated event temporarily, until the cally, the events in such systems are mostly database
action part of the currently executing trigger is completed modifications (insert, delete, update) and the language to
(atomic execution). This action illustrates that the values in specify the triggers is based on the SQL.
different semantic dimensions are indeed correlated.
Namely, the choice of the atomicity of the execution will  Ariel (31): The Ariel system resembles closely the
impact the value of the E-C/C-A coupling modes: one cannot traditional Condition ! Action rules from expert
expect an immediate coupling if the execution of the actions systems literature (15), because the specification of
is to be atomic. the Event part is optional. Therefore, in general, NO
event consumption exists, and the coupling modes
are immediate.
Expressiveness Issues  Starburst (2): This system has been used extensively
for database-internal applications, such as integrity
As we illustrated, the choice of values for a particular constraints and views maintenance. Its most notable
semantic dimension, especially when it comes to the rela- features include the set-based execution model and
tionship with the transaction model, may yield different the introduction of the net effects when considering
outcomes of the execution of a particular transaction by the modifications that have led to the occurrence of a
the DBMS (e.g., deferred coupling will yield different particular event. Another particular feature intro-
behavior from the immediate coupling). However, another duced by the Starburst system is the concept of rule
subtle aspect of the active database systems is dependent processing points, which may be specified to occur
strongly on their chosen semantic dimensions the during the execution of a particular transaction or at
expressive power. Picouet and Vianu (29) introduced a its end. The execution of the action part is atomic.
broad model for active databases based on the unified
 Postgres (4): The key distinction of Postgres is that
framework of relational Turing machines. By restricting
the granularity of the modifications to which the
some of the values of the subset of the semantic dimen-
triggers react is tuple (row) oriented. The coupling
sions and thus capturing the interactions between the
modes between the E-C and the C-A parts of the
sequence of the modifications and the triggers, one can
triggers are immediate and the execution of
establish a yardstick to compare the expressive powers of
the actions part is interruptable, which means that
8 ACTIVE DATABASE SYSTEMS

the recursive enabling of the triggers is an option. detect the composite events was based on Colored
Another notable feature of the Postgres system is that Petri-Nets.
it allows for INSTEAD OF specification in its active  Chimera (25): The Chimera system was envisioned as
rules. a tool that would seamlessly integrate the aspects of
object orientation, deductive rules, and active rules
into a unified paradigm. Its model has strict under-
Object-Oriented Systems lying logical semantics (fixpoint based) and very
One of the distinct features of object-oriented DBMS intuitive syntax to specify the active rules. It is based
(OODBMS) is that it has methods that are coupled with on the EECA (Extended-ECA) paradigm, specified in
the definition of the classes that specify the structure of the Ref. (23), and it provides the flexibility to specify a
data objects stored in the database. This feature justifies wide spectrum of behavioral aspects (e.g., semantic
the preference for using OODBMS for advanced application dimensions). The language consists of two main com-
domains that include extended behavior management. ponents: (1) declarative, which is used to specify
Thus, the implementation of active behavior in these sys- queries, deductive rules, and conditions of the active
tems is coupled tightly with a richer source of events for the rules; and (2) procedural, which is used to specify the
triggers (e.g., the execution of any method). nonelementary operations to the database, as well as
the action parts of the triggers.
 ODE (32): The ODE system was envisioned as an
extension of the C++ language with database cap-
abilities. The active rules are of the C-A type and are Commercially Available Systems
divided into constraints and triggers for the efficiency
of the implementations. Constraints and triggers are One of the earliest commercially available active database
both defined at a class level and are considered a systems was DB2 (3), which integrated trigger processing
property of a given class. Consequently, they can be with the evaluation and maintenance of declarative con-
inherited. One restriction is that the updates of the straints in a manner fully compatible with the SQL92
individual objects, caused by private member func- standard. At the time it served as a foundation model for
tions, cannot be monitored by constraints and trig- the draft of the SQL3 standard. Subsequently, the standard
gers. The system allows for both immediate coupling has migrated to the SQL99 version (11), in which the
(called hard constraints) and deferred coupling specification of the triggers is as follows:
(called soft constraints), and the triggers can be <trigger definition> ::=
declared as executing once-only or perpetually (reac- CREATE TRIGGER <trigger name>
tivated). {BEFORE | AFTER }<trigger event> ON
 HiPAC (28): The HiPAC project has pioneered many <table name>
of the ideas that were used subsequently in various [REFERENCING <old or new values alias list>]
research results on active database systems. Some of [FOR EACH {ROW | STATEMENT}]
the most important contributions were the introduc- [<trigger condition>]
tion of the coupling modes and the concept of compo- <trigger action>
site events. Another important feature of the HiPAC <trigger event> ::= INSERT | DELETE | UPDATE
system was the extension that provided the so called [OF <column name list>]
delta-relation, which monitors the net effect of a set of <old or new values alias list> ::= {OLD | NEW}
modifications and made it available as a part of the [AS] <identifier> | {OLD_TABLE |
querying language. HiPAC also introduced the NEW_TABLE} [AS] <identifier>
visionary features of parallel execution of multiple
triggers as subtransactions of the original transac- The condition part in the SQL99 triggers is optional and,
tion that generated their enabling events. if omitted, it is considered to be true; otherwise, it can be
 Sentinel (5): The Sentinel project provided an active any arbitrarily complex SQL query. The action part, on the
extension of the OODBMS, which represented the other hand, is any sequence of SQL statements, which
active rules as database objects and focused on includes the invocation of stored procedures, embedded
the efficient integration of the rule processing mod- within a single BEGIN END block. The only statements
ule within the transaction manager. One of the main that are excluded from the available actions pertain to
novelties discovered this particular research project connections, sessions, and transactions processing. Com-
was the introduction of a rich mechanism for to mercially available DBMS, with minor variations, follow
specify and to detect composite events. the guidelines of the SQL99 standards.
 SAMOS (18): The SAMOS active database prototype In particular, the Oracle 10g (27), an object-relational
introduced the concept of an interval as part of the DBMS (ORDBMS), not only adheres to the syntax specifi-
functionality needed to manage composite events. A cations of the SQL standard for triggers (28), but also
particular novelty was the ability to include the provides some additions: The triggering event can be spe-
monitoring intervals of interest as part of the speci- cified as a logical disjunction (ON INSERT OR UPDATE)
fication of the triggers. The underlying mechanism to and the INSTEAD OF option is provided for the actions
execution. Also, some system events (startup/shutdown,
ACTIVE DATABASE SYSTEMS 9

server error messages), as well as user events (logon/logoff use of the tools and techniques available in the DBMS when
and DDL/DML commands), can be used as enabling events managing large volumes of data. In particular, Shankar et
in the triggers specification. Just like in the SQL standard, al. (12) have applied active rules to the WfMS settings,
if more than one trigger is enabled by the same event, the which demonstrates that data-intensive scientific work-
Oracle server will attempt to assign a priority for their flows can benefit from the concept of active tables associated
execution based on the timestamps of their creation. How- with the programs. One typical feature of workflows is that
ever, it is not guarantees that this case will actually occur at many of the activities may need to be executed by distrib-
run time. When it comes to dependency management, uted agents (actors of particular roles), which need to be
Oracle 10g server treats triggers in a similar manner to synchronized to optimize the concurrent execution. A par-
the stored procedures: they are inserted automatically into ticular challenge, from the perspective of triggers manage-
the data dictionary and linked with the referenced objects ment in such distributed settings, is to establish a common
(e.g., the ones which are referenced by the action part of the (e.g., transaction-like) context for their main components
trigger). In the presence of integrity constraints, the typical events, conditions, and actions. As a consequence, the
executional behavior of the Oracle 10g server is as follows: corresponding triggers must execute in a detached mode,
which poses problems related not only to the consistency,
1. Run all BEFORE statement triggers that apply to the but also to their efficient scheduling and execution (33).
statement. Unlike traditional database applications, many novel
2. Loop for each row affected by the SQL statement. domains that require the management of large quantities of
a. Run all BEFORE row triggers that apply to the information are characterized by the high volumes of data
statement. that arrive very fast in a stream-like fashion (8). One of the
main features of such systems is that the queries are no
b. Lock and change row, and perform integrity con-
longer instantaneous; they become continuous/persistent
straint checking. (The lock is not released until the
in the sense that users expect the answers to be updated
transaction is committed.)
properly to reflect the current state of the streamed-in
c. Run all AFTER row triggers that apply to the values. Clearly, one of the main aspects of the continuous
statement. queries (CQ) management systems is the ability to react
3. Complete deferred integrity constraint checking. quickly to the changes caused by the variation of the
4. Run all AFTER statement triggers that apply to the streams and process efficiently the modification of the
statement. answers. As such, the implementation of CQ systems
may benefit from the usage of the triggers as was demon-
The Microsoft Server MS-SQL also follows closely the strated in the Niagara project (9). One issue related to the
syntax prescribed by the SQL99 standard. However, it has scalability of the CQ systems is the very scalability of the
its own additions; for example, it provides the INSTEAD triggers management (i.e., many instances of various trig-
OF option for triggers execution, as well as a specification of gers may be enabled). Although it is arguable that the
a restricted form of composite events to enable the parti- problem of the scalable execution of a large number of
cular trigger. Typically, the statements execute in a tuple- triggers may be coupled closely with the nature of the
oriented manner for each row. A particular trigger is asso- particular application domain, it has been observed that
ciated with a single table and, upon its definition, the server some general aspects of the scalability are applicable uni-
generates a virtual table automatically for to access the old versally. Namely, one can identify similar predicates (e.g.,
data items. For example, if a particular trigger is supposed in the conditions) across many triggers and group them into
to react to INSERT on the table Employee, then upon equivalence classes that can be indexed on those predicates.
insertion to Employee, a virtual relation called Inserted This project may require a more involved system catalog
is maintained for that trigger. (34), but the payoff is a much more efficient execution of a
set of triggers. Recent research has also demonstrated that,
to capture the intended semantics of the application
NOVEL CHALLENGES FOR ACTIVE RULES
domain in dynamic environments, the events may have
to be assigned an interval-based semantics (i.e., duration
We conclude this article with a brief description of some
may need to be associated with their detection). In parti-
challenges for the ADBSs in novel application domains, and
cular, in Ref. (35), the authors have demonstrated that if
with a look at an extended paradigm for declaratively
the commonly accepted instantaneous semantics for events
specifying reactive behavior.
occurrence is used in traffic management settings, one may
obtain an unintended meaning for the composite events.
Application Domains
Moving objects databases (MODs) are concerned with
Workflow management systems (WfMS) provide tools to the management of large volumes of data that pertain to the
manage (modeling, executing, and monitoring) workflows, location-in-time information of the moving entities, as well
which are viewed commonly as processes that coordinate as efficient processing of the spatio-temporal queries that
various cooperative activities to achieve a desired goal. pertain to that information (13). By nature, MOD queries
Workflow systems often combine the data centric view of are continuous and the answers to the pending queries
the applications, which is typical for information systems, change because of the changes in the location of the mobile
with their process centric behavioral view. It has already objects, which is another natural setting for exploiting an
been indicated (12) that WfMS could benefit greatly by a full efficient form of a reactive behavior. In particular, Ref. (14)
10 ACTIVE DATABASE SYSTEMS

proposed a framework based on the existing triggers in they execute. Consider, for example, a scenario in which a
commercially available systems to maintain the correct- set of motion sensors deployed around a region of interest is
ness of the continuous queries for trajectories. The problem supposed to monitor whether an object is moving continu-
of the scalable execution of the triggers in these settings ously toward that region for a given time interval. Aside
occurs when a traffic abnormality in a geographically small from the issues of efficient detection of such an event, the
region may cause changes to the trajectories that pass application may require an alert to be issued when the
through that region and, in turn, invalidate the answers status of the closest air field is such that fewer than a
to spatio-temporal queries that pertain to a much larger certain number of fighter jets are available. In this setting,
geographic area. The nature of the continuous queries both the event detection and the condition evaluation are
maintenance is dependent largely on the model adopted done in distributed manner and are continuous in nature.
for the mobility representation, and the MOD-field is still Aside from the need of their efficient synchronization, the
very active in devising efficient approaches for the queries application demands that when a particular object ceases to
management which, in one way or another, do require some move continuously toward the region, the condition should
form of active rules management. not be monitored any further for that object. However, if the
Recently, the wireless sensor networks (WSNs) have object in question is closer than a certain distance (after
opened a wide range of possibilities for novel applications moving continuously toward the region of interest for a
domains in which the whole process of gathering and mana- given time), in turn, another trigger may be enabled, which
ging the information of interest requires new ways of per- will notify the infantry personnel. An approach for declara-
ceiving the data management problems (36). WSN consist of tive specification of triggers for such behavior was pre-
hundreds, possibly thousands, of low-cost devices (sensors) sented in Ref. (37) where the (ECA)2 paradigm (evolving
that are capable of measuring the values of a particular and context-aware event-condition-action) was introduced.
physical phenomenon (e.g., temperature, humidity) and of Under this paradigm, for a given trigger, the users can
performing some elementary calculations. In addition, the embed children triggers in the specifications, which will
WSNs are also capable of communicating and self-organiz- become enabled upon the occurrences of certain events in
ing into a network in which the information can be gathered, the environment, and only when their respective parent
processed, and disseminated to a desired location. As an triggers are no longer of interest. The children triggers may
illustrative example of the benefits of the ECA-like rules in consume their parents either completely, by eliminating
WSN settings, consider the following scenario (c.f. Ref. (6)): them from any consideration in the future or partially, by
whenever the sensors deployed in a given geographic area of eliminating only the particular instance from the future
interest have detected that the average level of carbon consideration, but allowing a creation of subsequent
monoxide in the air over any region larger than 1200 ft2 instances of the parent trigger. Obviously, in these
exceeds 22%, an alarm should be activated. Observe that settings, the coupling modes among the E-C and C-A com-
here the event corresponds to the updates of the (readings ponents of the triggers must to be detached, and for
of the) individual sensors; the condition is a continuous the purpose of their synchronization the concept of meta-
query evaluated over the entire geographic zone of interest, triggers was proposed in Ref. (37). The efficient processing
and with a nested sub-query of identifying the potentially- of such triggers is still an open challenge.
dangerous regions. At intuitive level, this seems like a
straightforward application of the ECA paradigm. Numer-
ous factors in sensor networks affect the efficient implemen- BIBLIOGRAPHY
tation of this type of behavior: the energy resource of the
individual nodes is very limited, the communication 1. J. Widom and S. Ceri, Active Database Systems: Triggers and
between nodes drains more current from the battery than Rules for Advanced Database Processing, San Francisco:
the sensing and local calculations, and unlike the traditional Morgan Kauffman, 1996.
systems where there are few vantage points to generate new 2. J. Widom, The Starburst Active Database Rule System, IEEE
events, in WSN settings, any sensor node can be an event- Trans. Knowl. Data Enginee., 8(4): 583595, 1996.
generator. The detection of composite events, as well as the 3. R. Cochrane, H. Pirahesh and N. M. Mattos, Integrating Trig-
evaluation of the conditions, must to be integrated in a fully gers and Declarative Constraints in SQL Database Systems,
distributed environment under severe constraints (e.g., International Conference on Very Large Databases, 1996.
energy-efficient routing is a paramount). Efficient imple- 4. M. Stonebraker, The integration of rule systems and database
mentation of the reactive behavior in a WSN-based systems, IEEE Trans. Knowl. Data Enginee., 4(5): 416432,
databases is an ongoing research effort. 1992.
5. S. Chakravarthy, V. Krishnaprasad, E. Answar, and S. K. Kim,
The (ECA)2 Paradigm Composite Events for Active Databases: Semantics, Contexts
and Detection, International Conference on Very Large Data-
Given the constantly evolving nature of the streaming or bases (VLDB), 1994.
moving objects data, along with the consideration that it 6. M. Zoumboulakis, G. Roussos, and A. Poulovassilis, Active
may be managed by distributed and heterogeneous sources, Rules for Wireless Networks of Sensors & Actuators, Interna-
it is important to offer a declarative tool in which the users tional Conference on Embedded Networked Sensor Systems,
can actually specify how the triggers themselves should 2003.
evolve. Users can adjust the events that they monitor, the 7. N. W. Paton, Active Rules in Database Systems, New York:
conditions that they need to evaluate, and the action that Springer Verlag, 1999.
ACTIVE DATABASE SYSTEMS 11

8. B. Babcock, S. Babu, M. Datar, R. Motwani, and J. Widom, 24. G. Weikum and G. Vossen, Transactional Information Sys-
Models and Issues in Data Stream Systems, International tems: Theory, Algorithms and the Practice of Concurrency
Conference on Principles of Database Systems, 2002. Control, San Francisco: Morgan Kauffman, 2001.
9. J. Chen, D.J. DeWitt, F. Tian, and Y. Wang, NiagaraCQ: A 25. P. Fraternali and S. Parabochi, Chimera: a language for
Scalable Continuous Query System for Internet Databases, designing rule applications, in: N. W. Paton (ed.), Active Rules
ACM SIGMOD International Conference on Management of in Database System, Berlin: Springer-Verlog, 1999.
Data, 2000. 26. M. Thome, D. Gawlick, and M. Pratt, Event Processing with an
10. A. Carzaniga, D. Rosenblum, and A. Wolf, Achieving Scalabil- Oracle Database, SIGMOD International Conference on Man-
ity and Expressiveness in an Internet-scale Event Notification agement of Data, 2005.
Service, ACM Symposium on Principles of Distributed Com- 27. K. Owens, Programming Oracle Triggers and Stored Proce-
puting, 2000. dures, (3rd ed.), OReily Publishers, 2003.
11. ANSI/ISO International Standard: Database Language SQL. 28. U. Dayal, A.P. Buchmann, and S. Chakravarthy, The HiPAC
Available: http://webstore.ansi.org. project, in J. Widom and S. Ceri, Active Database Systems.
12. S. Shankar, A. Kini, D. J. DeWitt, and J. F. Naughton, Inte- Triggers and Rules for Advanced Database Processing, San
grating databases and workflow systems, SIGMOD Record, Francisco: Morgan Kauffman, 1996.
34(3): 511, 2005. 29. P. Picouet and V. Vianu, Semantics and expressiveness issues
13. R.H. Guting and M. Schneider, Moving Objects Databases, San in active databases, J. Comp. Sys. Sci., 57(3): 327355, 1998.
Francisco: Morgan Kaufman, 2005. 30. E. Simon and J. Kiernan, The A-RDL system, in J. Widom and
14. G. Trajcevski and P. Scheuermann, Reactive maintenance of S. Ceri, Active Database Systems: Triggers and Rules for
continuous queries, Mobile Comput. Commun. Rev., 8(3): 2233, Advanced Database Processing, San Francisco: Morgan Kauff-
2004. man, 1996.
15. L. Brownston, K. Farrel, E. Kant, and N. Martin, Programming 31. E. N. Hanson, Rule Condition Testing and Action Execution in
Expert Systems in OPS5: An Introduction to Rule-Base Pro- Ariel, ACM SIGMOD International Conference on Manage-
gramming, Boston: Addison-Wesley, 2005. ment of Data, 1992.
16. A.P. Sistla and O. Wolfson, Temporal Conditions and Integrity 32. N. Gehani and H.V. Jagadish, ODE as an Active Database:
Constraints in Active Database Systems ACM SIGMOD, Inter- Constraints and Triggers, International Conference on Very
national Conference on Management of Data, 1995. Large Databases, 1992.
17. S. Gatziu and K. R. Ditrich, Events in an Active Object-Oriented 33. S. Ceri, C. Gennaro, X. Paraboschi, and G. Serazzi, Effective
Database System, International Workshop on Rules in Data- scheduling of detached rules in active databases, IEEE Trans.
base Systems, 1993. Knowl. Data Enginee., 16(1): 215, 2003.
18. K. Dittrich, H. Fritschi, S. Gatziu, A. Geppert, and A. Vaduva, 34. E.N. Hanson, S. Bodagala, and U. Chadaga, Trigger condition
SAMOS in hindsight: Experiences in building an active object- testing and view maintenance using optimized discrimination
oriented DBMS, Informat. Sys., 30(5): 369392, 2003. networks, IEEE Trans. Know. Data Enginee., 16(2): 281300,
19. S.D. Urban, T. Ben-Abdellatif, S. Dietrich, and A. Sundermier, 2002.
Delta abstractions: a technique for managing database states 35. R. Adaikkalvan and S. Chakravarthy, Formalization and
in runtime debugging of active database rules, IEEE-TKDE, Detection of Events Using Interval-Based Semantics, Interna-
15(3): 597612, 2003. tional Conference on Advances in Data Management, 2005.
20. C. Baral, J. Lobo, and G. Trajcevski, Formal Characterization 36. F. Zhao and L. Guibas, Wireless Sensor Networks: An Informa-
of Active Databases: Part II, International Conference on tion Processing Approach, San Francisco: Morgan Kaufmann,
Deductive and Object-Oriented Databases (DOOD), 1997. 2004.
21. E. Baralis and J. Widom, An algebraic approach to static 37. G. Trajcevski, P. Scheuermann, O. Ghica, A. Hinze, and A.
analysis of active database rules, ACM Trans. Database Voisard, Evolving Triggers for Dynamic Environments, Inter-
Sys., 27(3): 289332, 2000. national Conference on Extending the Database Technology,
22. S.D. Urban, M.K. Tschudi, S.W. Dietrich, and A.P. Karadimce, 2006.
Active rule termination analysis: an implementation and eva-
luation of the refined triggering graph method, J. Intell. Infor-
mat. Sys., 14(1): 2960, 1999. PETER SCHEUERMANN
23. P. Fraternali and L. Tanca, A structured approach for the GOCE TRAJCEVSKI
definition of the semantics of active databases, ACM Trans. Northwestern University
Database Sys., 22(4): 416471, 1995. Evanston, Illinois
A
ALGEBRAIC CODING THEORY algebraic structure and are therefore often easier to ana-
lyze and to decode in practical applications.
INTRODUCTION The simplest example of a linear code is the [n, n  1]
even-weight code (or parity-check code). The encoding con-
In computers and digital communication systems, informa- sists of appending a single parity bit to the n  1 informa-
tion almost always is represented in a binary form as a tion bits so that the codeword has an even number of ones.
sequence of bits each having the values 0 or 1. This Thus, the code consists of all 2n1 possible n-tuples of even
sequence of bits is transmitted over a channel from a sender weight, where the weight of a vector is the total number of
to a receiver. In some applications the channel is a storage ones in its components. This code can detect all errors in an
medium like a DVD, where the information is written to the odd number of positions, because if such an error occurs, the
medium at a certain time and retrieved at a later time. received vector also will have odd weight. The even-weight
Because of the physical limitations of the channel, some code, however, can only detect errors. For example, if
transmitted bits may be corrupted (the channel is noisy) (000. . .0) is sent and the first bit is corrupted, then
and thus make it difficult for the receiver to reconstruct the (100. . .0) is received. Also, if (110. . .0) was sent and the
information correctly. second bit was corrupted, then (100. . .0) is received. Hence,
In algebraic coding theory, we are concerned mainly the receiver cannot correct this single error or, in fact, any
with developing methods to detect and correct errors other error.
that typically occur during transmission of information An illustration of a code that can correct any single error
over a noisy channel. The basic technique to detect and is shown in Fig. 1. The three circles intersect and divide the
correct errors is by introducing redundancy in the data that plane into seven finite areas and one infinite area. Each
is to be transmitted. This technique is similar to commu- finite area contains a bit ci for i 0, 1,. . ., 6. Each of the 16
nicating in a natural language in daily life. One can under- possible messages, denoted by (c0, c1, c2, c3), is encoded into
stand the information while listening to a noisy radio or a codeword (c0, c1, c2, c3, c4, c5, c6), in such a way that the
talking on a bad telephone line, because of the redundancy sum of the bits in each circle has an even parity.
in the language. In Fig. 2, an example is shown of encoding the message
For example, suppose the sender wants to communicate (0011) into the codeword (0011110). Because the sum of two
one of 16 different messages to a receiver. Each message m codewords also obeys the parity-checks and thus is a code-
can then be represented as a binary quadruple (c0, c1, c2, c3). word, the code is a linear [7, 4] code.
If the message (0101) is transmitted and the first position is Suppose, for example, that the transmitted codeword is
corrupted such that (1101) is received, this leads to an corrupted in the bit c1 such that the received word is
uncorrectable error because this quadruple represents a (0111110). Then, calculating the parity of each of the three
different valid message than the message that was sent circles, we see that the parity fails for the upper circle as
across the channel. The receiver will have no way to detect well as for the leftmost circle, whereas the parity of the
and to correct a corrupted message in general, because any rightmost circle is correct. Hence, from the received vector,
quadruple represents a valid message. indeed we can conclude that bit c1 is in error and should be
Therefore, to combat errors the sender encodes the data corrected. In the same way, any single error can be cor-
by introducing redundancy into the transmitted informa- rected by this code.
tion. If M messages are to be transmitted, the sender selects
a subset of M binary n-tuples, where M < 2n. Each of the M
LINEAR CODES
messages is encoded into an n-tuple. The set consisting of
the M n-tuples obtained after encoding is called a binary (n,
An (n, M) code is simply a set of M vectors of length n with
M) code, and the elements are called codewords. The code-
components from a finite field F2 {0, 1}, where addition
words are sent over the channel.
and multiplication are done modulo 2. For practical appli-
It is customary for many applications to let M 2k, such
cations it is desirable to provide the code with more struc-
that each message can be represented uniquely by a k-tuple
ture. Therefore, linear codes often are preferred. A linear
of information bits. To encode each message the sender can
[n, k] code C is a k-dimensional subspace C of F2n , where F2n
append n  k parity bits depending on the message bits and
is the vector space of n-tuples with coefficients from the
use the resulting n bit codeword to represent the corre-
finite field F2.
sponding message.
A linear code C usually is described in terms of a gen-
A binary code C is called a linear code if the sum (modulo
erator matrix or a parity-check matrix. A generator matrix
2) of two codewords is again a codeword. This is always the
G of C is a k  n matrix whose row space is the code
case when the parity bits are linear combinations of the
C; i.e.,
information bits. In this case, the code C is a vector space of
dimension k over the binary field of two elements, contain-
ing M 2k codewords, and is called an [n, k] code. The main C fxGjx 2 F2k g
reason for using linear codes is that these codes have more

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 ALGEBRAIC CODING THEORY

The code C is therefore given by


c4 C fc c0 ; c1 ; . . . ; c6 jcHtr 0g

c1 c2 A generator matrix for the code in the previous example


c0
is given by
0 1
c5 c6 1 0 0 0 1 1 1
c3 B0 1 0 0 1 1 0C
GB
@0
C
0 1 0 1 0 1A
0 0 0 1 0 1 1
Figure 1. The message (c0, c1, c2, c3) is encoded into the codeword
(c0, c1, c2, c3, c4, c5, c6), where c4, c5, c6 are chosen such that there is
an even number of ones within each circle. Two codes are equivalent if the codewords in one of the
codes can be obtained by a fixed permutation of the posi-
tions in the codewords in the other code. If G (respectively,
H) is a generator (respectively, parity-check) matrix of a
code, then the matrices obtained by permuting the columns
of these matrices in the same way give the generator matrix
(respectively, parity-check) matrix of the permuted code.
1 The Hamming distance between x (x0, x1,. . ., xn1)
and y (y0, y1,. . ., yn1) in F2n is the number of positions
in which they differ. That is,
0 1
0 dx; y jfijxi 6 yi ; 0  i  n  1gj

1 1 0
The Hamming distance has the properties required to be
a metric:

Figure 2. Example of the encoding procedure given in Fig. 1. The 1. d(x, y)  0 for all x, y 2 F2n and equality holds if and
message (0011) is encoded into (0011110). Note that there is an only if x y.
even number of ones within each circle. 2. d(x, y) d(y, x) for all x, y 2 F2n .
3. d(x, z)  d(x, y) d(y, z) for all x, y, z 2 F2n .

For any code C, one of the most important parameters is


A parity-check matrix H is an (n  k)  n matrix such that its minimum distance, defined by

C fc 2 F2n jcHtr 0g d minfdx; yjx 6 y; x; y 2 Cg

where Htr denotes the transpose of H.


The Hamming weight of a vector x in F2n is the number of
Example. The codewords in the code in the previous nonzero components in x (x0, x1,. . ., xn1). That is,
section are the vectors (c0, c1, c2, c3, c4, c5, c6) that satisfy
the following system of parity-check equations: wx jfijxi 6 0; 0  i  n  1gj dx; 0

c0 c1 c2 c4 0
c0 c1 c3 c5 0 Note that because d(x, y) d(x  y, 0) w(x  y) for a
c0 c2 c3 c6 0 linear code C, it follows that

where all additions are modulo 2. Each of the three parity- d minfwzjz 2 C; z 6 0g
check equations corresponds to one of the three circles.
The coefficient matrix of the parity-check equations is Therefore, finding the minimum distance of a linear code is
the parity-check matrix equivalent to finding the minimum nonzero weight among
0 1 all codewords in the code.
1 1 1 0 1 0 0 If w(c) i, then cHtr is the sum of i columns of H. Hence,
H @1 1 0 1 0 1 0A 1 an alternative description of the minimum distance of a
1 0 1 1 0 0 1 linear code is as follows: the smallest d such that d linearly
ALGEBRAIC CODING THEORY 3

P
dependent columns exist in the parity-check matrix. In where x; c n1i0 xi ci . We say that x and c are orthogo-
particular, to obtain a binary linear code of minimum nal if (x, c) 0. Therefore C? consists of all n-tuples that
distance of at least three, it is sufficient to select the are orthogonal to all codewords in C and vice versa; that is,
columns of a parity-check matrix to be distinct and nonzero. (C?)? C. It follows that C? has dimension n  k because
Sometimes we include d in the notation and refer to an it consists of all vectors that are solutions of a system of
[n, k] code with minimum distance d as an [n, k, d] code. If t equations with coefficient matrix G of rank k. Hence, the
components are corrupted during transmission of a code- parity-check matrix of C? is a generator matrix of C, and
word, we say that t errors have occurred or that an error e of similarly the generator matrix of C? is a parity-check
weight t has occurred [where e (e0, e1,. . ., en1) 2 F2n , matrix of C. In particular, GHtr O [the k  (n  k)
where ei 1 if and only if the ith component was corrupted, matrix of all zeros].
that is, if c was sent, c + e was received].
The error-correcting capability of a code is defined as Example. Let C be the [n, n  1, 2] even-weight code
where
 
d1
t 0 1
2 1 0 ... 0 1
B0 1 ... 0 1C
GB
@ ... .. .. .. .. C
where bxc denotes the largest integer  x. . . . .A
A code with minimum distance d can correct all errors of 0 0 ... 1 1
weight t or less, because if a codeword c is transmitted and
an error e of weight e  t occurs, the received vector and
r c + e is closer in Hamming distance to the transmitted
codeword c than to any other codeword. Therefore, decod- H 1 1 ... 1 1
ing any received vector to the closest codeword corrects all
errors of weight  t.
The code can be used for error detection only. The code Then C? has H and G as its generator and parity-check
can detect all errors of weight < d because if a codeword is matrices, respectively. It follows that C? is the [n, 1, n]
transmitted and the error has weight < d, then the repetition code consisting of the two codewords (00    000)
received vector is not another codeword. and (11    111).
The code also can be used for a combination of error-
correction and error-detection. For a given e  t, the code
can correct all errors of weight  e and in addition can detect Example. Let C be the [2m  1, 2m  1  m, 3] code,
all errors of weight at most d  e  1. This is caused by the where H contains all nonzero m-tuples as its columns.
fact that no vector in F2n can be at distance  e from one This is known as the Hamming code. In the case when
codeword and at the same time at a distance  d  e  1 m 3, a parity-check matrix already is described in Equa-
from another codeword. Hence, the algorithm in this case is tion (1). Because all columns of the parity-check matrix are
to decode a received vector to a codeword at distance  e if distinct and nonzero, the code has minimum distance of at
such a codeword exists and otherwise detect an error. least 3. The minimum distance is indeed 3 because three
If C is an [n, k] code, the extended code Cext is the [n + 1, columns exist whose sum is zero; in fact, the sum of any two
k] code defined by columns of H equals another column in H for this particular
  code.
 The dual code C? is the [2m  1, m, 2m1] simplex code,
cext cext ; c0 ; c1 ; . . . cn1 c0 ; c1 ; . . . ; cn1 2 C;
all of whose nonzero codewords have weight 2m1. This
)
X
n1 follows because the generator matrix has all nonzero vec-
cext ci tors as its columns. In particular, taking any linear combi-
i0 nation of rows, the number of columns with odd parity in
the corresponding subset of rows equals 2m1 (and the
That is, each codeword in C is extended by one parity bit number with even parity is 2m1  1).
such that the Hamming weight of each codeword becomes The extended code of the Hamming code is a [2m,
even. In particular, if C has odd minimum distance d, then 2m  1  m, 4] code. Its dual code is a [2m, m + 1, 2m1]
the minimum distance of Cext is d + 1. If H is a parity-check code that is known as the first-order ReedMuller code.
matrix for C, then a parity check matrix for Cext is
 
1 1 SOME BOUNDS ON CODES
0tr H
The Hamming bound states that for any (n, M, d) code, we
where 1 (11. . .1). have
For any linear [n, k] code C, the dual code C? is the
[n, n  k] code defined by e  
X n
M  2n
i
C ? fx 2 F2n jx; c 0 for all c 2 Cg i0
4 ALGEBRAIC CODING THEORY

where e b(d  1)/2c. This follows from the fact that the M Example. The Galois field F24 can be constructed as
spheres follows. Let f(x) x4 + x + 1 that is an irreducible polyno-
mial over F2. Then a4 a + 1 and
Sc fxjdx; c  eg
F24 fa3 a3 a2 a2 a1 a a0 ja0 ; a1 ; a2 ; a3 2 F2 g
centered at the codewords c 2 C are disjoint and that each
sphere contains Computing the powers of a, we obtain
e  
X a5 a  a4 aa 1 a2 a
n
a6 a  a5 aa2 a a3 a2
i
i0 a7 a  a6 aa3 a2 a4 a3 a3 a 1

vectors. and, similarly, all higher powers of a can be expressed as a


If the spheres fill the whole space, that is, linear combination of a3, a2, a, and 1. In particular, a15 1.
[ We get the following table of the powers of a. In the table the
Sc F2n polynomial a3a3 + a2a2 + a1a + a0 is represented as
c2C a3a2a1a0.

then C is called perfect. The binary linear perfect codes are


as follows:
i ai i ai i ai
 the [n, 1, n] repetition codes for all odd n 0 0001 5 0110 10 0111
 the [2m  1, 2m  1  m, 3] Hamming codes Hm for all 1 0010 6 1100 11 1110
m2 2 0100 7 1011 12 1111
3 1000 8 0101 13 1101
 the [23, 12, 7] Golay code G23
4 0011 9 1010 14 1001

We will return to the Golay code later.

GALOIS FIELDS Hence, the elements 1, a, a2,. . ., a14 are all the nonzero
elements in F24 . Such an element a that generates the
Finite fields, also known as Galois fields, with pm elements nonzero elements of F2m is called a primitive element in
exist for any prime p and any positive integer m. A Galois F2m . An irreducible polynomial g(x) with a primitive ele-
field of a given order pm is unique (up to isomorphism) and is ment as a zero is called a primitive polynomial. Every finite
denoted by F pm . field has a primitive element, and therefore, the multi-
For a prime p, let Fp {0, 1,. . ., p  1} denote the plicative subgroup of a finite field is cyclic.
m
integers modulo p with the two operations addition and All elements in F2m are roots of the equation x2 x 0.
multiplication modulo p. Let b be an element in F2m . It is important to study the
To construct a Galois field with pm elements, select a polynomial m(x) of smallest degree with coefficients in F2,
polynomial f(x) with coefficients in Fp, which is irreducible which has b as a zero. This polynomial is called the minimal
over Fp; that is, f(x) cannot be written as a product of two polynomial of b over F2. P
polynomials with coefficients from Fp of degree  1 (irre- First, observe that if mx ki0 mi xi has coefficients
ducible polynomials of any degree m over Fp exist). in F2 and b as a zero, then
Let
!2
X
k X
k X
k

F pm fam1 xm1 am2 xm2 . . . a0 ja0 ; . . . ; am1 2 F p g mb mi b2i m2i b2i


2
mi b i mb2 0
i0 i0 i0

Then F pm is a finite field when addition and multiplica- Hence, m(x) has b; b2 ; . . . ; b2
k1
as zeros, where k is the
tion of the elements (polynomials) are done modulo f(x) k
smallest integer such that b2 b. Conversely, the poly-
and modulo p. To simplify the notations, let a denote a nomial with exactly these zeros can be shown to be a binary
zero of f(x), that is, f(a) 0. If such an a exists, formally it irreducible polynomial.
can be defined as the equivalence class of x modulo f(x).
For coding theory, p 2 is by far the most important
case, and we assume this from now on. Note that for any Example. We will find the minimal polynomial of all the
a, b 2 F2m , elements in F24 . Let a be a root of x4 + x + 1 0; that is,
a4 a + 1. The minimal polynomials over F2 of ai for 0  i
a b2 a2 b2  14 are denoted mi(x). Observe by the above argument that
m2i(x) mi(x), where the indices are taken modulo 15. It
ALGEBRAIC CODING THEORY 5

follows that of c is then represented by the polynomial

m0 x x a0 x 1 scx cn1 c0 x c1 x2    cn2 xn1


m1 x x ax a2 x a4 x a8 x4 x 1
xcn1 xn1 c0 c1 x    cn2 xn2
m3 x x a3 x a6 x a12 x a9
cn1 xn 1
x4 x3 x2 x 1
 xcx mod xn 1
m5 x x a5 x a10 x2 x 1
m7 x x a7 x a14 x a13 x a11 x4 x3 1 Example. Rearranging the columns in the parity-check
m9 x m3 x matrix of the [7, 4] Hamming code in Equation (1), an
m11 x m7 x equivalent code is obtained with parity-check matrix
m13 x m7 x 0 1
1 0 0 1 0 1 1
To verify this, one simply computes the coefficients and H @0 1 0 1 1 1 0A 2
uses the preceding table of F24 in the computations. For 0 0 1 0 1 1 1
example,

m5 x x a5 x a10 x2 a5 a10 x a5  a10 This code contains 16 codewords, which are represented
next in polynomial form:
x2 x 1
1000110 $ x5 x4 1 x2 x 1gx
This also leads to a factorization into irreducible polyno- 0100011 $ 6
x x x5
x3 x2 xgx
mials, 1010001 $ 6
x x 12
x3 x 1gx
4 Y14
1101000 $ x3 x 1 gx
x2 x x x a j
0110100 $ x4 x2 x xgx
j0
0011010 $ x5 x3 x2 x2 gx
xx 1x2 x 1x4 x 1 0001101 $ 6 4
x x x 3
x3 gx
x4 x3 x2 x 1x4 x3 1 0010111 $ x6 x5 x4 x2 x3 x2 gx
xm0 xm1 xm3 xm5 xm7 x 1001011 $ x6 x5 x3 1 x3 x2 x 1gx
1100101 $ x6 x4 x 1 x3 1gx
m
In fact, in general it holds that x2 + x is the product of all 5 2
1110010 $ x x x 1 x2 1gx
6 3 2
irreducible polynomials over F2 of degree that divides m. 0111001 $ x x x x x3 xgx
Let Ci fi 2 j mod nj j 0; 1; . . .g, which is called the 1011100 $ x4 x3 x2 1 x 1gx
cyclotomic coset of i (mod n). Then, the elements of the 0101110 $ x5 x4 x3 x x2 xgx
cyclotomic coset Ci mod 2m  1 correspond to the expo- 0000000 $ 0 0
nents of the zeros of mi(x). That is, 1111111 $ x6 x5 x4 x3 x2 x 1
mi x P x  a j x3 x2 1gx
j 2 Ci

The cyclotomic cosets (mod n) are important in the next By inspection it is easy to verify that any cyclic shift of a
section when cyclic codes of length n are discussed. codeword is again a codeword. Indeed, the 16 codewords in
the code are 0, 1 and all cyclic shifts of (1000110) and
(0010111). The unique nonzero polynomial in the code of
CYCLIC CODES lowest possible degree is g(x) x3 x 1, and g(x) is
called the generator polynomial of the cyclic code. The
Many good linear codes that have practical and efficient code consists of all polynomials c(x), which are multiples
decoding algorithms have the property that a cyclic shift of of g(x). Note that the degree of g(x) is n  k 3 and that g(x)
a codeword is again a codeword. Such codes are called cyclic divides x7 1 because
codes.
We can represent the set of n-tuples over F2n as poly- x7 1 (x 1)(x3 x 1)(x3 + x2 1).
nomials of degree < n in a natural way. The vector Therefore the code has a simple description in terms of
c (c0, c1,. . ., cn1) the set of code polynomials as

is represented as the polynomial C fcxjcx uxx3 x 1; degux < 4g

c(x) c0 + c1x + c2x2 +    + cn1xn1. This situation holds in general for any cyclic code.
For any cyclic [n, k] code C, we have
A cyclic shift
C fcxjcx uxgx; degux < kg
sc cn1 ; c0 ; c1 ; . . . ; cn2
for a polynomial g(x) of degree n  k that divides xn 1.
6 ALGEBRAIC CODING THEORY

We can show this as follows: Let g(x) be the generator The encoding for cyclic codes usually is done in one of two
polynomial of C, which is the nonzero polynomial of smal- ways. Let u(x) denote the information polynomial of
lest degree r in the code C. Then the cyclic shifts g(x), xg(x), degree < k. The two ways are as follows:
  , xnr1g(x) are codewords as well as any linear combina-
tion u(x)g(x), where deg(u(x)) < r. These are the only 2nr 1. Encode into u(x)g(x).
codewords in the code C, because if c(x) is a codeword, then 2. Encode into c(x) xnku(x) s(x), where s(x) is the
polynomial such that
nk
cx uxgx sx; where degsx < deggx  s(x)  x u(x) (mod g(x)) [thus g(x) divides c(x)],
 deg(s(x)) < deg(g(x)).
By linearity, s(x) is a codeword and therefore s(x) 0
because deg(s(x)) < deg(g(x)) and g(x) is the nonzero poly- The last of these two methods is systematic; that is, the last
nomial of smallest degree in the code. It follows that C is as k bits of the codeword are the information bits.
described previously. Since C has 2nr codewords, it follows
that n  r k; i.e., deg(g(x)) n  k.
Finally, we show that g(x) divides xn 1. Let c(x) c0 BCH CODES
c1x    cn1xn1 be a nonzero codeword shifted such
that cn1 1. Then the cyclic shift of c(x) given by An important task in coding theory is to design codes with a
s(c(x)) cn1 c0x c1x    cn2xn1 also is a guaranteed minimum distance d that correct all errors of
d1
codeword and Hamming weight b c . Such codes were designed
2
independently by Bose and Ray-Chaudhuri (1) and by
scx xcx xn 1 Hocquenghem (2) and are known as BCH codes. To con-
struct a BCH code of designed distance d, the generator
Because both codewords c(x) and s(c(x)) are divisible by polynomial is chosen to have d  1 consecutive powers of
g(x), it follows that g(x) divides xn 1. a as zeros
Because the generator polynomial of a cyclic code divides
xn 1, it is important to know how to factor xn 1 into ab ; ab1 ; . . . ; abd2
irreducible polynomials. Let n be odd. Then an integer m
exists such that 2m  1 (mod n) and an element a 2 F2m That is, the defining set I with respect to a contains a set of
exists of order n [if v is a primitive element of F2m , then a d  1 consecutive integers (mod n). The parity-check
m
can be taken to be a v2 1=n ]. matrix of the BCH code is
We have
0 1
n1 1 ab a2b ... an1b
n
x 1 P x a i B1 ab1 a2b1 ... an1b1 C
B C
i0 H B .. .. .. .. C
@. . . } . A
i 1 abd2 a2bd2 ... an1bd2
Let mi(x) denote the minimal polynomial of a ; that is,
the polynomial of smallest degree with coefficients in F2 and
having ai as a zero. The generator polynomial g(x) can be
written as To show that this code has a minimum distance of at
least d, it is sufficient to show that any d  1 columns are
linear independent. Suppose a linear dependency between
gx P x ai
i2I the d  1 columns corresponds to ai1 b ; ai2 b ; . . . ; aid1 b . In this
case the (d  1)  (d  1) submatrix obtained by retaining
where I is a subset of {0, 1,. . ., n  1}, called the defining set these columns in H has determinant
of C with respect toQa. Then mi(x) divides g(x) for all i 2 I.  
Furthermore, gx lj1 mi j x for some i1, i2,. . ., il.  ai1 b
 ai2 b ... aid1 b 

Therefore we can describe the cyclic code in alternative  ai1b1 ai2b1 ... aid1 b1 
 
equivalent ways as  .. .. .. 
. . } . 
 i bd2 
a 1 ai2 bd2 . . . aid1 bd2 
C fcxjmi xdivides cx; for all i 2 Ig  
1 1 ... 1 
C fcxjcai 0; for all i 2 Ig  i1 i2 
 a a . . . aid1 
abi1 i2 ...id2  .. .. .. .. 
C fc 2 Fqn jcH tr 0g . . 
. . 
 ad2i1 ad2i2
Y ... ad2id1 
where abi1 i2 ...id2 aik  air 6 0
0 1 k< r
1 ai1 a2i1 ... an1i1
B1 ai2 a2i2 ... an1i2 C because the elements ai1 , ai2 ,   , aid1 are distinct (the last
B C
H B .. .. .. .. C equality follows from the fact that the last determinant is a
@. . . } . A
1 ail a2il  an1il Vandermonde determinant). It follows that the BCH code
has a minimum Hamming distance of at least d.
ALGEBRAIC CODING THEORY 7

If b 1, which is often the case, the code is called a The actions of the six possible permutations on three
narrow-sense BCH code. If n 2m  1, the BCH code is elements are given in the following table. The permuta-
called a primitive BCH code. A binary single error-correct- tions, which are automorphisms, are marked by a star.
ing primitive BCH code is generated by g(x) m1(x). The
i
zeros of g(x) are a2 , i 0, 1,. . ., m  1. The parity-check p0 p1 p2 p101 p011
matrix is
m 0 1 2 101 011 $
H 1 a1 a2 . . . a2 2 0 2 1 110 011
1 0 2 011 101 $
This code is equivalent to the Hamming code because a is a 1 2 0 011 110
primitive element of F2m . 2 0 1 110 101
To construct a binary double-error-correcting primitive 2 1 0 101 110
BCH code, we let g(x) have a, a2, a3, a4 as zeros. Therefore,
g(x) m1(x)m3(x) is a generator polynomial of this code.
The parity-check matrix of a double-error-correcting BCH In general, the set of automorphisms of a code C is a
code is group, the Automorphism group Aut(C). We note that
 
1 a1 a2 ...
m
a2 2 X
n 1 X
n 1
H m xi yi xpi ypi
1 a3 a6 ... a32 2
i0 i0

In particular, a binary double-error correcting BCH code of and so (x, y) 0 if and only if (p(x), p(y)) 0. In parti-
length n 24  1 15, is obtained by selecting cular, this implies that

gx m1 xm3 x AutC AutC ?


4 4 3 2
x x 1x x x x 1
That is, C and C? have the same automorphism group.
x8 x7 x6 x4 1 For a cyclic code C of length n, we have by definition
s(c) 2 C for all c 2 C, where s(i)  i  1 (mod n). In parti-
cular, s 2 Aut(C). For n odd, the permutation d defined by
Similarly, a binary triple-error correcting BCH code of d( j) 2j (mod n) also is contained in the automorphism
the same length is obtained by choosing the generator group. To show this permutation, it is easier to show that
polynomial d1 2 Aut(C). We have

gx m1 xm3 xm5 x d1 2j j for j 0; 1; . . . ; n  1=2


4 4 3 2 2
x x 1x x x x 1x x 1 d 1
2j 1 n 1=2 j for j 0; 1; . . . ; n  1=2  1
x10 x8 x5 x4 x2 x 1
PLet g(x) be a generator polynomial for C, and let
The main interest in BCH codes is because they have a very n1 i n n
i0 ci x axgx. Because x  1 (mod x 1), we have
fast and efficient decoding algorithm. We will describe this
later. X
n 1 n1=2
X n1=2
X
cd1 i xi c j x2 j cn1=2 j x2 j1
i0 j0 j0
AUTOMORPHISMS
n1=2
X X
n1
c j x2 j c j x2 j
Let C be a binary code of length n. Consider a permutation p
j0 jn1=2
of the set {0, 1,. . ., n  1}; that is, p is a one-to-one function
of the set of coordinate positions onto itself. ax gx ax2 gxgx;
2 2
modxn 1
For a codeword c 2 C, let
and so d1(c) 2 C; that is, d1 2 Aut(C) and so d 2 Aut(C).
pc cp0 ; cp1 ; . . . ; cpn1 The automorphism group Aut(C) is transitive if for each
pair (i, j) a p 2 Aut(C) exists such that p(i) j. More
general, Aut(C) is t-fold transitive if, for distinct i1, i2,. . .,
That is, the coordinates are permuted by the permutation
it and distinct j1, j2,. . ., jt, a p 2 Aut(C) exists such that
p. If
p(i1) j1, p(i2) j2,. . ., p(it) jt.
fpcjc 2 Cg C
Example. Any cyclic [n, k] code has a transitive auto-
morphism group because s repeated s times, where
then p is called an automorphism of the code C.
s  i  j (mod n), maps i to j.
Example. Consider the following (nonlinear code):
Example. The (nonlinear) code C {101, 011} was con-
sidered previously. Its automorphism group is not transitive
C f101; 011g
because there is no automorphism p such that p(0) 2.
8 ALGEBRAIC CODING THEORY

Example. Let C be the [9, 3] code generated by the matrix weight i. The sequence
0 1
0 0 1 0 0 1 0 0 1 A0 ; A1 ; A2 ; . . . ; An
@0 1 0 0 1 0 0 1 0A
1 0 0 1 0 0 1 0 0 is called the weight distribution of the code C. The corre-
sponding polynomial
This is a cyclic code, and we will determine its automorph-
ism group. The all zero and the all one vectors in C are
transformed into themselves by any permutation. The AC z A0 A1 z A2 z2 An zn
vectors of weight 3 are the rows of the generator matrix,
and the vectors of weight 6 are the complements of these is known as the weight enumerator polynomial of C.
vectors. Hence, we see that p is an automorphism if and The polynomials AC(z) and AC ? z are related by the
only if it leaves the set of the three rows of the generator fundamental MacWilliams identity:
matrix invariant, that is, if and only if the following con-  
1z
ditions are satisfied: AC ? z 2k 1 zn AC
1z
p0  p3  p6 mod 3
p1  p4  p7 mod 3 Example. The [2m  1, m] simplex code has the weight
m1
p2  p5  p8 mod 3 distribution polynomial 1 2m  1z2 . The dual code is
the [2m  1, 2m  1  m] Hamming code with weight
Note that the two permutations s and d defined previously enumerator polynomial
satisfy these conditions, as they should. They are listed
explicitly in the following table:   m1 !
m 2m 1 1z 2
m
i 0 1 2 3 4 5 6 7 8 2 1 z 1 2  1
1z
si 8 0 1 2 3 4 5 6 7 m m1 m1
1 1
di 0 2 4 6 8 1 3 5 7 2m 1 z2 1  2m 1  z2 1 z2

For example, for m 4, we get the weight distribution of


The automorphism group is transitive because the code is
the [15, 11] Hamming code:
cyclic but not doubly transitive. For example, no auto-
morphism p exists such that p(0) 0 and p(3) 1 because
0 and 1 are not equivalent modulo 3. A simple counting 1 35z3 105z4 168z5 280z6 435z7 435z8 280z9
argument shows that Aut(C) has order 1296: First choose 168z10 105z11 35z12 z15
p(0); this can be done in nine ways. Then two ways exist to
choose p(3) and p(6). Next choose p(1); this can be done in
six ways. There are again two ways to choose p(4) and p(7). Consider a binary linear code C that is used purely for
Finally, there are 3  2 ways to choose p(2), p(5), p(8). error detection. Suppose a codeword c is transmitted over a
Hence, the order is 9  2  6  2  3  2 1296. binary symmetric channel with bit error probability p. The
ext
probability of receiving a vector r at distance i from c is
Example. Consider the extended Hamming code Hm . pi(1  p)ni, because i positions are changed (each with
The positions of the codewords correspond to the elements probability p) and n  i are unchanged (each with prob-
of F2m and are permuted by the affine group ability 1  p). If r is not a codeword, then this will be
discovered by the receiver. If r c, then no errors have
AG fpjpx ax b; a; b 2 F2m ; a 6 0g occurred. However, if r is another codeword, then an unde-
ext . It is double
tectable error has occurred. Hence, the probability of unde-
This is the automorphism group of Hm tected error is given by
transitive.
X
Pue C; p pdc0;c 1  pndc0;c
THE WEIGHT DISTRIBUTION OF A CODE c0 6 c
X 0 0
pwc 1  pnwc
Let C be a binary linear [n, k] code. As we noted, c0 6 0
X
n

dx; y dx  y; 0 wx  y Ai pi 1  pni
i1
p
If x, y 2 C, then x  y 2 C by the linearity of C. In 1  pn AC  1  pn
1 p
particular, this means that the set of distances from a fixed
codeword to all the other codewords is independent of which From the MacWilliams identity, we also get
codeword we fix; that is, the code looks the same from any
codeword. In particular, the set of distances from the code-
Pue C ? ; p 2k AC 1  2 p  1  pn
word 0 is the set of Hamming weights of the codewords. For
i 0, 1, . . ., n, let Ai denote the number of codewords of
ALGEBRAIC CODING THEORY 9

Example. For the [2m  1, 2m  1  m] Hamming code If H is a parity-check matrix for C, then cHtr 0 for all
Hm, we get codewords c. Hence,

rHtr c eH tr cH tr eH tr eH tr
m1 m1
Pue Hm ; p 2m 1 2m  11  2 p2  1  p2 3

More information on the use of codes for error detection can The vector
be found in the books by Klve and Korzhik (see Further s eH tr
Reading).
is known as the syndrome of the error e; Equation (3) shows
THE BINARY GOLAY CODE that s can be computed from r. We now have the following
outline of a decoding strategy:
The Golay code G23 has received much attention. It is
practically useful and has a several interesting properties. 1. Compute the syndrome s rHtr.
The code can be defined in various ways. One definition is 2. Estimate an error e of smallest weight corresponding
that G23 is the cyclic code generated by the irreducible to the syndrome s.
polynomial 3. Decode to c r e.

x11 x9 x7 x6 x5 x 1 The hard part is, of course, step 2.


For any vector x 2 F2n, the set {x c j c 2 C} is a coset of
which is a factor of x23 1 over F2. Another definition is the C. All the elements of the coset have the same syndrome,
following: Let H denote the [7, 4] Hamming code, and let H namely, xHtr. There are 2n  k cosets, one for each syndrome
be the code whose codewords are the reversed of the code- in F 2n  k, and the set of cosets is a partition of F2n. We can
words of H. Let rephrase step 2 as follows: Find a vector e of smallest weight
in the coset with syndrome s.
C fu x; v x; u v xju; v 2 H ext ; x 2 H ext g
Example. Let C be the [6, 3, 3] code with parity-check
where Hext is the [8, 4] extended Hamming code and (H)ext matrix
is the [8, 4] extended H. The code C is a [24, 12, 8] code. 0 1
Puncturing the last position, we get a [23, 12, 7] code that is 1 1 0 1 0 0
(equivalent to) the Golay code. H @1 0 1 0 1 0A
The weight distribution of G23 is given by the following 0 1 1 0 0 1
table:
A standard array for C is the following array (the eight
i Ai columns to the right):
0; 23 1
7; 16 253 000 000000 001011 010101 011110 100110 101101 110011 111000
110 100000 101011 110101 111110 000110 001101 010011 011000
8; 15 506 101 010000 011011 000101 001110 110110 111101 100011 101000
11; 12 1288 011 001000 000011 011101 010110 101110 100101 111011 110000
100 000100 001111 010001 011010 100010 101001 110111 111100
010 000010 001001 010111 011100 100100 101111 110001 111010
The automorphism group Aut(G23) of the Golay code is 001 000001 001010 010100 011111 100111 101100 110010 111001
the Mathieu group M23, a simple group of order 111 100001 101010 110100 111111 000111 001100 010010 011001
10200960 27  32  5  7  11  23, which is fourfold
transitive. Each row in the array is a listing of a coset of C; the first row
Much information about G23 can be found in the book by is a listing of the code itself. The vectors in the first column
MacWilliams and Sloane and in the Handbook of Coding have minimal weight in their cosets and are known as coset
Theory (see Further Reading). leaders. The choice of coset leader may not be unique. For
example, in the last coset there are three vectors of minimal
weight. Any entry in the array is the sum of the codeword at
DECODING the top of the column and the coset leader (at the left in the
row). Each vector of F 62 is listed exactly once in the array.
Suppose that a codeword c from the [n, k] code C was sent The standard array can be used to decode: Locate r in the
and that an error e occurred during the transmission over array and decode the codeword at the top of the correspond-
the noisy channel. Based on the received vector r c e, ing column (that is, the coset leader is assumed to be the
the receiver has to make an estimate of what was the error pattern). However, this method is not practical;
transmitted codeword. Because error patterns of lower except for small n, the standard array of 2n entries is too
weight are more probable than error patterns of higher large to store (also locating r may be a problem). A step to
weight, the problem is to estimate an error e such that the simplify the method is to store a table of coset leaders
weight of e is as small as possible. He will then decode the corresponding to the 2n  k syndromes. In the table above,
received vector r into c r e. this method is illustrated by listing the syndromes at the
10 ALGEBRAIC CODING THEORY

left. Again this alternative is possible only if n  k is small. t 3, t 4, etc., but they become increasingly compli-
For carefully designed codes, it is possible to compute e from cated. However, an efficient algorithm to determine the
the syndrome. The simplest case is single errors: If e is an equation exists, and we describe this is some detail next.
error pattern of weight 1, where the 1 is in the ith position, Let a be a primitive element in F2m . A parity-check
then the corresponding syndrome is in the ith column of H; matrix for the primitive t-error-correcting BCH code is
hence, from H and the syndrome, we can determine i.
0 1
1 a a2  an1
m
Example. Let H be the m  (2  1) parity-check B1 a3 a6  a3n1 C
B C
matrix where the ith column is the binary expansion of H B .. .. .. .. C
@. . . } . A
the integer i for i 1, 2,. . .,2m  1. The corresponding
1 a2t1 a22t1  a2t1n1
[2m  1, 2m  1  m, 3] Hamming code corrects all single
errors. Decoding is done as follows: Compute the syndrome
where n 2m  1. Suppose errors have occurred in posi-
s P(s0, s1,. . .,sm1). If s 6 0, then correct position
tions i1, i2,. . .,it, where t  t. Let X j ai j for j 1, 2,. . .,t.
i m1 j
j0 s j 2 .
The error locator polynomial L(x) is defined by
Example. Let
  Y
t X
t
1 a a2  an1 Lx 1 X j x ll xl
H
1 a3 a6  a3n1 j1 l0

where a 2 F2m and n 2m  1. This is the parity-check The roots of L(x) 0 are X1j. Therefore, if we can deter-
matrix for the double error-correcting BCH code. It is mine L(x), then we can determine the locations of the
convenient to have a similar representation of the syn- errors. Expanding the expression for L(x), we get
dromes: l0 1
l1 X1 X2    Xt
s S1 ; S3 where S1 ; S3 2 F2m l2 X1 X2 X1 X3 X2 X3    Xt1 Xt
l3 X1 X2 X3 X1 X2 X4 X2 X3 X4    Xt2 Xt1 Xt
Depending on the syndrome, there are several cases: ..
.
1. If no errors have occurred, then clearly S1 S3 0. lt X 1 X 2    Xt
ll 0 for l > t
2. If a single error has occurred in the ith position (that
is, the position corresponding to ai), then S1 ai and Hence ll is the lth elementary symmetric function of X1,
S3 a3i. In particular, S3 S31. X2,. . .,Xt.
3. If two errors have occurred in positions i and j, then From the syndrome, we get S1, S3,. . .,S2t1, where

S1 ai a j ; S3 a3i a3 j S1 X1 X2    Xt
S2 X12 X22    Xt2
This implies that S31 S3 aiajS1 6 S3. Further- S3 X13 X23    Xt3
more, x1 ai and x2 aj are roots of the equation ..
.
S2t X12t X22t Xt2t
S3 S3 2
1 S1 x 1 x 0: 4
S1 Furthermore,
This gives the following procedure to correct two errors:
S2r X12r X22r    Xr2r X1r X2r    Xrr 2 S2r
 Compute S1 and S3.
for all r. Hence, from the syndrome we can determine the
 If S1 S3 0, then assume that no errors have
polynomial
occurred.
 Else, if S3 S31 6 0, then one error has occurred in the
Sx 1 S1 x S2 x2    S2t x2t
ith position determined by S1 ai.
 Else (if S3 6 S31 ), consider the equation The Newton equations is a set of relations between the
1 S1 x S31 S3 =S1 x2 0 power sums Sr and the symmetric functions ll, namely
- If the equation has two roots ai and aj, then errors X
l1
have occurred in positions i and j. Sl j l j lll 0 for l  1
j0
Else (if the equation has no roots in F2m ), then more
than two errors have occurred. Let
X
Similar explicit expressions (in terms of the syndrome) Vx SxLx vl xl 5
for the coefficients of an equation with the error positions as l0
roots can be found for t error-correcting BCH codes when
ALGEBRAIC CODING THEORY 11

Pl1 r
Because vl j0 Sl j l j ll , the Newton equations mial [x2r2r1 or v2r1 1 x2r2r1 Lr x], which we denote
imply that by B(x).

vl 0 for all odd l; 1  l  2t  1 6 BerlekampMassey Algorithm in the Binary Case


Input: t and Sx.
Lx : 1; Bx : 1;
The BerlekampMassey algorithm is an algorithm that, for r : 1 to t do
given S(x), determines the polynomial L(x) of smallest begin
degree such that Equation (6) is satisfied, where the vl v : coefcient of x2r1 in SxLx;
are defined by Equation (5). The idea is, for r 0, 1,. . ., t, to if v 0 then Bx : x2 Bx
determine polynomials L(r) of lowest degree such that else
Lx; Bx : Lx vxBx; xLx=v :
r end;
vl 0 for all odd l; 1  l  2r  1
The assignment following the else is two assignments
where to be done in parallel; the new L(x) and B(x) are computed
X r
from the old ones.
vl xl SxLr x The BerlekampMassey algorithm determines the poly-
l0 nomial L(x). To find the roots of L(x) 0, we try all possible
For r 0, clearly we can let L(0)(x) 1. We proceed by elements of F2m . In practical applications, this can be
induction. Let 0  r < t, and suppose that polynomials efficiently implemented using shift registers (usually called
r
L(r)(x) have been constructed for 0  r  r. If v2r1 0, the Chien search).
then we can choose
Example. We consider the [15, 7, 5] double-error correct-
Lr1 x Lr x ing BCH code; that is, m 4 and t 2. As a primitive root,
we choose a such that a4 a 1. Suppose that we have
r
If, on the other hand, v2r1 6 0, then we modify L(r)(x) by received a vector with syndrome (S1, S3) (a4, a5). Since
adding another suitable polynomial. Two cases to consider S3 6 S31, at least two errors have occurred. Equation (4)
are as follows: First, if L(r)(x) 1 [in which case L(t)(x) 1 becomes
for 0  t  r], then
1 a4 x a10 x2 0
r1 r
L x 1 v2r1 x2r1
which has the zeros a3 and a7. We conclude that the
will have the required property. If L(r)(x) 6 1, then a max- received vector has two errors (namely, in positions 3 and
r
imal positive integer r < r such that v2r1 6 0 exists and 7).
(r)
we add a suitable multiple of L : Now consider the BerlekampMassey algorithm for the
same example. First we compute S2 S21 a8 and
r r S4 S22 a. Hence
Lr1 x Lr x v2r1 v2r1 1 x2r2r Lr x
Sx 1 a4 x a8 x2 a5 x3 ax4 :
We note that this implies that
X X The values of r, v, L(x), and B(x) after each iteration of the
r r r r
Lr1 xSx vl xl v2r1 v2r1 1 vl xl2r2r for-loop in the BerlekampMassey algorithm are shown in
l0 l0 the following table:

Hence for odd l we get r v L(x) B(x)


1 1
8 1 a4 1 a4x a11x
>
>
r
vl 0 for 1  l  2r  2r  1 2 a14 1 a4x a10x2 ax a5x2
>
>
>
>
>
> r r r r
>
>v v2r1 v2r1 1 vl2r2r
< l Hence, L(x) 1 a4x a10x2 (as before).
r1
vl 000 for 2r  2r 1  l  2r  1 Now consider the same code with syndrome of received
>
>
>
> vector (S1, S3) (a, a9). Because S3 6 S31 , at least two
> r
> r r r
>
>v2r1 v2r1 v2r1 1 v2r1 errors have occurred. We get
>
>
: r r
v2r1 v2r1 0 for l 2r 1
Lx 1 ax x2

We now formulate these ideas as an algorithm (in a However, the equation 1 ax x2 0 does not have any
Pascal-like syntax). In each step we keep the present L(x) roots in F24 . Hence, at least three errors have occurred, and
[the superscript (r) is dropped] and the modifying polyno- the code cannot correct them.
12 ALGEBRAIC CODING THEORY

REEDSOLOMON CODES the decoding of binary BCH codes with one added complica-
tion. Using a generalization of the BerlekampMassey
In the previous sections we have considered binary codes algorithm, we determine the polynomials L(x) and V(x).
where the components of the codewords belong to the finite From L(x) we can determine the locations of the errors. In
field F2 {0, 1}. In a similar way we can consider codes with addition, we must determine the value of the errors (in the
components from any finite field Fq. binary case, the values are always 1). The value of the error
The Singleton bound states that for any [n, k, d] code at location Xj easily can be determined using V(x) and L(x);
with components from Fq, we have we omit further details.
An alternative decoding algorithm can sometimes
dnk1 decode errors of weight more than half the minimum dis-
tance. We sketch this algorithm, first giving the simplest
A code for which d n  k 1 is called maximum dis- version, which works if the errors have weight less than
tance separable (MDS). The only binary MDS codes are the half the minimum distance; that is, we assume a codeword
trivial [n, 1, n] repetition codes and [n, n  1, 2] even- c f x1 ; f x2 ; . . . ; f xn was sent and r r1 ; r2 ; . . . ; rn
weight codes. However, important nonbinary MDS codes was received, and wr  c < n  k 1=2. It is easy to
exist (in particular, the ReedSolomon codes, which we now show that if Qx; y is a nonzero polynomial in two variables
will describe). of the form
ReedSolomon codes are t-error-correcting cyclic codes
with symbols from a finite field Fq, even though they can be Qx; y Q0 x Q1 xy
constructed in many different ways. They can be considered
as the simplest generalization of BCH codes. Because the where
most important case for applications is q 2m, we consider
this case here. Each symbol is an element in F2m and can be Qxi ; ri 0 for i 1; 2; . . . ; n
considered as an m-bit symbol. Q0 x has degree at most n  1  t
One construction of a cyclic ReedSolomon code is as Q1 x has degree at most n  k  t
follows: Let a be a primitive element of F2m , and let xi ai .
Because xi 2 F2m for all i, the minimal polynomial of ai over
then Q0 x Q1 x f x 0, and so Qx; y Q1 x
F2m is just x  xi. The generator polynomial of a (primitive)
y  f x. Moreover, such a polynomial Qx; y does exist.
t-error-correcting ReedSolomon code of length 2m  1 has
An algorithm to find Qx; y is as follows:
2t consequtive powers of a as zeros:
Input: r r1 ; r2 ; . . . rn .
a
2t1 P j Pnkt j
bi Solve the equations n1 j0 a j xi j0 b j ri xi 0,
gx x  a
where Pi 1; 2; . . . ; n, for the unknown a j and b j ;
i0
Q0 x : n1t
j0 a j x ;
j
g0 g1 x    g2t1 x2t1 x2t Pnkt ;
Q1 x : j0 b j x j
The code has the following parameters:

Block length: n 2m  1 We now recover f(x) from the relation


Number of parity-check symbols: n  k 2t Q0 x Q1 x f x 0.
Minimum distance: d 2t 1 To correct (some) errors of weight more than half the
minimum distance, the method above must be generalized.
Thus, the ReedSolomon codes satisfy the Singleton The idea is to find a nonzero polynomial Q(x, y) of the form
bound with equality n  k d 1. That is, they are
MDS codes. Qx; y Q0 x Q1 xy Q2 xy2    Ql xyl
An alternative description of the ReedSolomon code is
where now, for some integer t and s,
f f x1 ; f x2 ; . . . ; f xn j
xi ; ri for i 1; 2; . . . ; n; are zeros of Qx; y of multiplicity s
f polynomial of degree less than kg: Qm x has degree at most sn  t  1  mk  1
for m 0; 1; . . . ; l
The weight distribution of the ReedSolomon code is (for
For such a polynomial one can show that if the weight of the
i  d)
error is at most t, then y  f (x) divides Q(x,y). Therefore, we
 X
id    can find all codewords within distance t from r by finding all
n i factors of Q(x,y) of the form y  h(x), where h(x) is a
Ai 1 j 2mid j1  1
i j polynomial of degree less than k. In general, there may
j0
be more than one such polynomial h(x), of course, but in
some cases, it is unique even if t is larger than half
The encoding of ReedSolomon codes is similar to the the minimum distance. This idea is the basis for the
encoding of binary cyclic codes. One decoding is similar to GuruswamiSudan algorithm.
ALGEBRAIC CODING THEORY 13

GuruswamiSudan Algorithm. Let P1 x1 ; y1 ; P2 x2 ; y2 ; . . . ; Pn xn ; yn denote


all the points on the Hermitian curve. The Hermitian
Input: r r1 ; r2 ; . . . rn , t, s. code Cs is defined by
s1
Solve the n equations Cs f f P1 ; f P2 ; . . . ; f Pn jr f x; y  s
2
Pl Psnt1mk1 m j
mu jv am; j xmu
i rijv 0, and degx f x; y  qg
u v
where i 1; 2; . . . ; n, and 0  u v < s,
for the unknown am; j ; where degx f x; y is the maximum degree of x in f x; y.
for m:=0 to l do Using methods from algebraic geometry, one obtains the
Psnt1mk1 ; following parameters of the Hermitian codes. The length of
Qm x : j0 am; j x j
Pl ; the code is n q3 , and its dimension is
Qx; y : m0 Qm xym
for each polynomial h(x) of degree less than k do 
ms if 0  s  q2  q  2
if y  hx divides Qx; y, then output hx. k
s 1  q2  q=2 if q2  q  2 < s < n  q2 q
We remark that the last loop of the algorithm is for-
mulated in this simple form to explain the idea. In actual where ms is the number of monomials with
implementations, this part can be made more efficient. If rxi y j  s and i  q, and the minimum distance is
n2l  s 1 lk  1
t<  , then the polynomial f x of the d  n  s if q2  q  2 < s < n  q2 q
2l 1 2s
sent codeword is among the output. The Guruswami
Sudan algorithm is a recent invention. A textbook covering
it is the book by Justesen and Hholdt given in Further It is known that the class of algebraic geometry codes
Reading. contains some very good codes with efficient decoding
algorithms. It is possible to modify the GuruswamiSudan
algorithm to decode these codes.
ALGEBRAIC GEOMETRY CODES

Algebraic geometry codes can be considered as general- NONLINEAR CODES FROM CODES OVER Z4
izations of ReedSolomon codes, but they offer a wider
range of code parameters. The ReedSolomon codes over In the previous sections mainly we have considered binary
Fq have maximum length n q  1 whereas algebraic linear codes; that is, codes where the sum of two codewords
geometry codes can be longer. One common method to is again a codeword. The main reason has been that the
construct algebraic geometry codes is to select an algebraic linearity greatly simplified construction and decoding of
curve and a set of functions that are evaluated on the points the codes.
on the curve. In this way, by selecting different curves and A binary nonlinear n; M; d code C is simply a set of M
sets of functions, one obtains different algebraic geometry binary n-tuples with pairwise distance at least d, but with-
codes. To treat algebraic codes in full generality is outside out any further imposed structure. In general, to find the
the scope of this article. We only will give a small flavor of minimum distance of a nonlinear code, one must compute
the basic techniques involved by restricting ourselves to the distance between all pairs of codewords. This is, of
considering the class of Hermitian codes, which is the most course, more complicated than for linear codes, where it
studied class of algebraic geometry codes. This class of suffices to find the minimum weight among all the nonzero
codes can serve as a good illustration of the methods codewords. The lack of structure in a nonlinear code also
involved. makes it difficult to decode in an efficient manner.
The codewords in a Hermitian code have symbols from However, some advantages to nonlinear codes exist. For
an alphabet Fq2 . The Hermitian curve consists of all points given values of length n and minimum distance d, some-
x; y 2 Fq22 given by the following equation in two variables: times it is possible to construct nonlinear codes with more
codewords than is possible for linear codes. For example, for
n 16 and d 6, the best linear code has dimension k 7
xq1  yq  y 0
(i.e., it contains 128 codewords). The code of length 16
obtained by extending the double-error-correcting primi-
It is a straightforward argument to show that the number
tive BCH code has these parameters.
of different points on the curve is n q3 . To select the
In 1967, Nordstrom and Robinson (3) found a nonlinear
functions to evaluate over the points on the curve, one
code with parameters n 16 and d 6 containing M 256
needs to define an order function r. The function r is the
codewords, which has twice as many codewords as the best
mapping from the set of polynomials in two variable over
linear code for the same values of n and d.
Fq2 to the set of integers such that
In 1968, Preparata (4) generalized this construction to
an infinite family of codes having parameters
rxi y j iq jq 1
m1
2m2
2m1 ; 22 ; 6; m odd; m  3
and r f x; y is the maximum over all nonzero terms in
f x; y.
14 ALGEBRAIC CODING THEORY

A few years later, in 1972, Kerdock (5) gave another each component in a codeword in C by its image under the
generalization of the NordstromRobinson code and con- Gray map. This code usually is nonlinear.
structed another infinite class of codes with parameters The minimum Hamming distance of C equals the mini-
mum Lee distance of C and is equal to the minimum Lee
m1
2m1 ; 22m2 ; 2m  2 2 ; m odd; m  3 weight of C because C is linear over Z4 .

The Preparata code contains twice as many codewords Example. To obtain the NordstromRobinson code, we
as the extended double-error-correcting BCH code and is will construct a code over Z4 of length 8 and then apply the
optimal in the sense of having the largest possible size for Gray map. Let f(x) x3 2x2 x 3 2 Z4[x]. Let b be a
the given length and minimum distance. The Kerdock code zero of f(x); that is, b3 2b2 b 3 0. Then we can
has twice as many codewords as the best known linear code. express all powers of b in terms of 1, b, and b2, as follows:
In the case m 3, the Preparata code and the Kerdock
codes both coincide with the NordstromRobinson code. b3 2b2 3b 1
The Preparata and Kerdock codes are distance invar- b4 3b2 3b 2
iant, which means that the distance distribution from a b5 b2 3b 3
given codeword to all the other codewords is independent of b6 b2 2b 1
the given codeword. In particular, because they contain the b7 1
all-zero codeword, their weight distribution equals their
distance distribution. Consider the code C over Z4 with generator matrix given by
In general, no natural way to define the dual code of a

nonlinear code exists, and thus the MacWilliams identities 1 1 1 1 1 1 1 1


G
have no meaning for nonlinear codes. However, one can 0 1 b b2 b3 b4 b5 b6
define the weight enumerator polynomial Az of a non- 2 3
1 1 1 1 1 1 1 1
linear code in the same way as for linear codes and compute 60
6 1 0 0 1 2 3 177
its formal dual Bz from the MacWilliams identities: 40 0 1 0 3 3 3 25
  0 0 0 1 2 3 1 1
1 n 1z
Bz 1 z A
M 1z where the column corresponding to bi is replaced by the
coefficients in its expression in terms of 1, b, and b2. Then
The polynomial B(z) obtained in this way has no simple the NordstromRobinson code is the Gray map of C.
interpretation. In particular, it may have coefficients that The dual code C ? of a code C over Z4 is defined similarly
are nonintegers or even negative. For example, if as for binary linear codes, except that the inner product of
C f110; 101; 111g, then Az 2z2 z3 and the vectors x (x1, x2,. . .,xn) and y (y1, y2,. . .,yn) with
Bz 3  5z z2 z3 =3. components in Z4 is defined by
An observation that puzzled the coding theory commu-
nity for a long time was that the weight enumerator of the X
n
Preparata code Az and the weight enumerator of the x; y xi yi mod 4
Kerdock code Bz satisfied the MacWilliams identities, i1
and in this sense, these nonlinear codes behaved like
dual linear codes. The dual code C ? of C is then
Hammons et al. (6) gave a significantly simpler descrip-
tion of the family of Kerdock codes. They constructed a C ? fx 2 Zn4 jx; c 0 for all c 2 Zn4 g
linear code over Z4 f0; 1; 2; 3g, which is an analog of the
binary first-order ReedMuller code. This code is combined For a linear code C over Z4, a MacWilliams relation
with a mapping called the Gray map that maps the ele- determines the complete weight distribution of the dual
ments in Z4 into binary pairs. The Gray map f is defined by code C ? from the complete weight distribution of C. There-
fore, one can compute the relation between the Hamming
f0 00; f1 01; f2 11; f3 10 weight distributions of the nonlinear codes C fC and
C ? fC ? , and it turns out that the MacWilliams iden-
The Lee weight of an element in Z4 is defined by tities hold.
Hence, to find nonlinear binary codes related by the
wL 0 0; wL 1 1; wL 2 2; wL 3 1 MacWilliams identities, one can start with a pair of Z4-
linear dual codes and apply the Gray map. For any odd
Extending f in a natural way to a map f : Zn4 ! Z2n 2 one integer m  3, the Gray map of the code Km over Z4 with
observes that f is a distance preserving map from Zn4 (under generator matrix
the Lee metric) to Z2n2 (under the Hamming metric).
A linear code over Z4 is a subset of Zn4 such that any linear

1 1 1 1 ... 1
combination of two codewords is again a codeword. From a G m
0 1 b b2 ... b2 2
linear code C of length n over Z4 , one obtains usually a
binary nonlinear code C fC of length 2n by replacing
ALGEBRAIC CODING THEORY 15


is the binary, nonlinear 2m1 ; 22m2 ; 2m  2
m1
2 Kerdock and related codes, IEEE Trans. Inform. Theory, 40: 301319,
1994.
code. The Gray map of Km? has the same weight distribution 7. P. Delsarte and J. M. Goethals, Alternating bilinear forms over
m1
as the 2m1 ; 22 2m2 ; 6 Preparata code. It is not iden- GF(q), J. Combin. Theory, Series A, 19: 2650, 1975.
tical, however, to the Preparata code and is therefore 8. J. M. Goethals, Two dual families of nonlinear binary codes,
denoted the Preparata code. Hence the Kerdock code Electronic Letters, 10: 471472, 1974.
and the Preparata code are the Z4-analogy of the first- 9. J. M. Goethals, Nonlinear codes defined by quadratic forms
order ReedMuller code and the extended Hamming code, over GF(2), Inform. Contr., 31: 4374, 1976.
respectively.
Hammons et al. (6) also showed that the binary code
defined by C fC, where C is the quaternary code with FURTHER READING
parity-check matrix given by
R. Blahut, The Theory and Practice of Error Control Codes. Read-
2 3 ing, MA: Addison-Wesley, 1983.
1 1 1 1 ... 1
m
H 40 1 b b2 ... b2 2 5 R. Blahut, Algebraic Codes for Data Transmission. Cambridge,
m
0 2 2b3 2b6 ... 2b32 2 MA: Cambridge Univ. Press, 2003.
R. Hill, A First Course in Coding Theory. Oxford: Clarendon Press,
m1
is a binary nonlinear 2m1 ; 22 3m2 ; 8 code whenever 1986.
m  3 is odd. This code has the same weight distribution as J. Justesen and T. Hholdt, A Course in Error-Correcting Codes.
the Goethals code, which is a nonlinear code that has four European Mathematical Society Publ. House, 2004.
times as many codewords as the comparable linear T. Klve, Codes for Error Detection. Singapore: World Scientific,
extended triple-error-correcting primitive BCH code. The 2007.
code C ? fC ? is identical to a binary nonlinear code, T. Klve and V. I. Korzhik, Error-Detecting Codes. Boston, MA:
which was constructed in a much more complicated way by Kluwer Academic, 1995.
Delsarte and Goethals (79) more than 30 years ago. R. Lidl and H. Niederreiter, Finite Fields, vol. 20 of Encyclopedia of
To analyze codes obtained from codes over Z4 in this Mathematics and Its Applications. Reading, MA: Addison-Wesley,
1983.
manner, one is led to study Galois rings instead of Galois
fields. Similar to a Galois field, a Galois ring can be defined S. Lin and D. J. Costello, Jr., Error Control Coding. 2nd edition.
Englewood Cliffs, NJ: Prentice Hall, 2004.
as Z pe x = f x, where f(x) is a monic polynomial of degree
m that is irreducible modulo p. The richness in structure of J. H. vanLint, Introduction to Coding Theory. New York, NY:
Springer-Verlag, 1982.
the Galois rings led to several recently discovered good
nonlinear codes that have an efficient and fast decoding F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-
Correcting Codes. Amsterdam: North-Holland, 1977.
algorithm.
W. W. Peterson and E. J. Weldon, Jr., Error-Correcting Codes.
Cambridge, MA: The MIT Press, 1972.
BIBLIOGRAPHY V. S. Pless and W. C. Huffman (eds.), Handbook of Coding Theory,
Vol. I & II. Amsterdam: Elsevier, 1998.
1. R. C. Bose and D. K. Ray-Chaudhuri, On a class of M. Purser, Introduction to Error-Correcting Codes. Boston, MA:
error correcting binary group codes, Inform. Contr., 3: Artech House, 1995.
6879, 1960.
H. vanTilborg, Error-Correcting CodesA First Course. Lund:
2. A. Hocquenghem, Codes correcteur derreurs, Chiffres, 2: Studentlitteratur, 1993.
147156, 1959.
S. A. Vanstone and P. C. van Oorschot, An Introduction to Error-
3. A. W. Nordstrom and J. P. Robinson, An optimum nonlinear Correcting Codes with Applications. Boston, MA: Kluwer Aca-
code, Inform. Contr., 11: 613616, 1967. demic, 1989.
4. F. P. Preparata, A class of optimum nonlinear double-error
correcting codes, Inform. Contr., 13: 378400, 1968.
5. A. M. Kerdock, A class of low-rate nonlinear binary codes, TOR HELLESETH
Inform. Contr., 20: 182187, 1972. TORLEIV KLVE
6. A. R. Hammons, P. V. Kumar, A. R. Calderbank, N. J. A. Sloane, University of Bergen
and P. Sole, The Z4-linearity of Kerdock, Preparata, Goethals, Bergen, Norway
B
BIOINFORMATIC DATABASES sequence, phylogenetic, structure and pathway, and micro-
array databases. It highlights features of these databases,
At some time during the course of any bioinformatics pro- discussing their unique characteristics, and focusing on
ject, a researcher must go to a database that houses bio- types of data stored and query facilities available in the
logical data. Whether it is a local database that records databases. The article concludes by summarizing impor-
internal data from that laboratorys experiments or a tant research and development challenges for these data-
public database accessed through the Internet, such as bases, namely knowledge discovery, large-scale knowledge
NCBIs GenBank (1) or EBIs EMBL (2), researchers use integration, and data provenance problems. For further
biological databases for multiple reasons. information about these databases and access to all hyper-
One of the founding reasons for the fields of bioinfor- links presented in this article, please visit http://
matics and computational biology was the need for manage- www.csam.montclair.edu/~herbert/bioDatabases.html.
ment of biological data. In the past several decades,
biological disciplines, including molecular biology and bio-
SEQUENCE DATABASES
chemistry, have generated massive amounts of data that
are difficult to organize for efficient search, query, and
Genome and protein sequence databases represent the
analysis. If we trace the histories of both database devel-
most widely used and some of the best established biological
opment and the development of biochemical databases, we
databases. These databases serve as repositories for wet-
see that the biochemical community was quick to embrace
lab results and the primary source for experimental results.
databases. For example, E. F. Codds seminal paper, A
Table 1 summarizes these data repositories and gives their
Relational Model of Data for Large Shared Data Banks (3),
respective URLs.
published in 1970 is heralded as the beginning of the
relational database, whereas the first version of the Protein
GenBank, EMBL, and the DNA Databank of Japan
Data Bank (PDB) was established at Brookhaven National
Laboratories in 1972 (4). The most widely used biological data bank resource on the
Since then, especially after the launching of the human World Wide Web is the genomic information stored in
genome sequencing project in 1990, biological databases the U.S.s National Institutes of Healths GenBank, the
have proliferated, most embracing the World Wide Web European Bioinformatics Institutes EMBL, and Japans
technologies that became available in the 1990s. Now there National Institute of Genetics DNA Databank of Japan (1,
are hundreds of biological databases, with significant 2, 7). Each of these three databases was developed sepa-
research efforts in both the biological as well as the data- rately, with GenBank and EMBL launching in 1980 (4).
base communities for managing these data. There are Their collaboration started soon after their development,
conferences and publications solely dedicated to the topic. and DDBJ joined the collaboration shortly after its creation
For example, Oxford University Press dedicates the first in 1986. The three databases, under the direction of the
issue of its journal Nucleic Acids Research (which is freely International Nucleotide Sequence Database Collabora-
available) every year specifically to biological databases. tion (INSDC), gather, maintain, and share mainly nucleo-
The database issue is supplemented by an online collection tide data, each catering to the needs of the region in which it
of databases that listed 858 databases in 14 categories in is located (4).
2006 (5), including both new and updated ones.
Biological database research now encompasses many The Ensembl Genome Database
topics, such as biological data management, curation, qual-
The Ensembl database is a repository of stable, automati-
ity, integration, and mining (6). Biological databases can be
cally annotated human genome sequences. It is available
classified in many different ways, from the topic they cover,
either as an interactive website or downloadable as flat
to how heavily annotated they are or which annotation
files. Ensembl annotates and predicts new genes, with
method they employ, to how highly integrated the database
annotation from the InterPro (9) protein family databases
is with other databases. Popularly, the first two categories
and with additional annotations from databases of genetic
of classification are used most frequently. For example,
disease [OMIM (10)], expression [SAGE (11,12)] and gene
there are archival nucleic acid data repositories [GenBank,
family (13). As Ensembl endeavors to be both portable and
the EMBL Data Library, and the DNA Databank of Japan
freely available, software available at Ensembl is based on
(7)] as well as protein sequence motif/domain databases,
relational database models (14).
like PROSITE (8), that are derived from primary source
data.
GeneDB Database
Modern biological databases comprise not only data, but
also sophisticated query facilities and bioinformatic data GeneDB (15) is a genome database for prokaryotic and
analysis tools; hence, the term bioinformatic databases is eukaryotic organisms. It currently contains data for 37
often used. This article presents information on some pop- genomes generated from the Pathogen Sequencing Unit
ular bioinformatic databases available online, including (PSU) at the Welcome Trust Sanger Institute. The GeneDB

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 BIOINFORMATIC DATABASES

Table 1. Summary of Genome and Protein Sequence Databases


Database URL Feature
GenBank http://www.ncbi.nlm.nih.gov/ NIHs archival genetic sequence database
EMBL http://www.ebi.ac.uk/embl/ EBIs archival genetic sequence database
DDBJ http://www.ddbj.nig.ac.jp/ NIGs archival genetic sequence database
Ensembl http://www.ensembl.org/ Database that maintains automatic annotation
on selected eukaryotic genomes
GeneDB http://www.cebitec.uni-bielefeld.de/ Database that maintains genomic information
groups/brf/software/gendb_info/ about specific species related to pathogens
TAIR http://www.arabidopsis.org/ Database that maintains genomic information
about Arabidopsis thaliana
SGD http://www.yeastgenome.org/ A repository for bakers yeast genome and biological data
dbEST http://www.ncbi.nlm.nih.gov/dbEST/ Division of GenBank that contains expression tag
sequence data
Protein Information http://pir.georgetown.edu/ Repository for nonredundant protein sequences and
Resource (PIR) functional information
Swiss-Prot/TrEMBL http://www.expasy.org/sprot/ Repository for nonredundant protein sequences and
functional information
UniProt http://www.pir.uniprot.org/ Central repository for PIR, Swiss-Prot, and TrEMBL

database has four key functionalities. First, the database sequence repository (17), but a collection of DNA and
stores and frequently updates sequences and annotations. protein sequences from existing databases [GenBank (1),
Second, GeneDB provides a user interface, which can be EMBL (2), DDBJ (7), PIR (18), and Swiss-Prot (19)]. It
used for access, visualization, searching, and downloading organizes the sequences into datasets to make the data
of the data. Third, the database architecture allows inte- more useful and easily accessible.
gration of different biological datasets with the sequences.
Finally, GeneDB facilitates querying and comparisons dbEST Database
between species by using structured vocabularies (15).
dbEST (20) is a division of GenBank that contains sequence
data and other information on short, single-pass cDNA
The Arabidopsis Information Resource (TAIR)
sequences, or Expressed Sequence Tags (ESTs), generated
TAIR (16) is a comprehensive genome database that allows from randomly selected library clones (http://www.ncbi.
for information retrieval and data analysis pertaining to nlm.nih.gov/dbEST/). dbEST contains approximately
Arabidopsis thaliana (a small annual plant belonging to 36,843,572 entries from a broad spectrum of organisms.
the mustard family). Arabidopsis thaliana has been of Access to dbEST can be obtained through the Web, either
great interest to the biological community and is one of from NCBI by anonymous ftp or through Entrez (21). The
the few plants whose genome is completely sequenced (16). dbEST nucleotide sequences can be searched using the
Due to the complexity of many plant genomes, Arabidopsis BLAST sequence search program at the NCBI website.
thaliana serves as a model for plant genome investigations. In addition, TBLASTN, a program that takes a query amino
The database has been designed to be simple, portable, and acid sequence and compares it with six-frame translations
efficient. One innovate aspect of the TAIR website is of dbEST DNA sequences can also be useful for finding
MapViewer (http://www.arabidopsis.org/servlets/mapper). novel coding sequences. EST sequences are available in the
MapViewer is an integrated visualization tool for viewing FASTA format from the /repository/dbEST directory at
genetic, physical, and sequence maps for each Arabidopsis ftp.ncbi.nih.gov.
chromosome. Each component of the map contains a hyper-
link to an output page from the database that displays all The Protein Information Resource
the information related to this component (16).
The Protein Information Resource (PIR) is an integrated
public bioinformatics resource that supports genomic and
SGD: Saccharomyces Genome Database
proteomic research and scientific studies. PIR has provided
The Saccharomyces Genome Database (SGD) (17) provides many protein databases and analysis tools to the scientific
information for the complete Saccharomyces cerevisiae community, including the PIR-International Protein
(bakers and brewers yeast) genomic sequence, along Sequence Database (PSD) of functionally annotated pro-
with its genes, gene products, and related literature. The tein sequences. The PIR-PSD, originally created as the
database contains several types of data, including DNA Atlas of Protein Sequence and Structure edited by Mar-
sequence, gene-encoded proteins, and the structures and garet Dayhoff, contained protein sequences that were
biological functions of any known gene products. It also highly annotated with functional, structural, biblio-
allows full-text searches of articles concerning Saccharo- graphic, and sequence data (5,18). PIR-PSD is now merged
myces cerevisiae. The SGD database is not a primary with UniProt Consortium databases (22). PIR offers the
BIOINFORMATIC DATABASES 3

PIRSF protein classification system (23) that classifies users multiple tools, including searches against the indi-
proteins, based on full-length sequence similarities and vidual contributing databases, BLAST and multiple
their domain architectures, to reflect their evolutionary sequence alignment, proteomic tools, and bibliographic
relationships. PIR also provides the iProClass database searches (22).
that integrates over 90 databases to create value-added
views for protein data (24). In addition, PIR supports a
PHYLOGENETIC DATABASES
literature mining resource, iProLINK (25), which provides
multiple annotated literature datasets to facilitate text
With all of the knowledge accumulating in the genomic and
mining research in the areas of literature-based database
proteomic databases, there is a great need for understand-
curation, named entity recognition, and protein ontology
ing how all these types of data relate to each other. As all
development.
biological things have come about through the evolutionary
process, the patterns, functions, and processes that they
The Swiss-Prot Database
possess are best analyzed in terms of their phylogenetic
Swiss-Prot (19) is a protein sequence and knowledge data- histories. The same gene can evolve a different timing of its
base and serves as a hub for biomolecular information expression, a different tissue where it is expressed, or even
archived in 66 databases (2). It is well known for its minimal gain a whole new function along one phylogenetic branch as
redundancy, high quality of annotation, use of standar- compared with another. These changes along a branch
dized nomenclature, and links to specialized databases. Its affect the biology of all descendant species, thereby leaving
format is very similar to that of the EMBL Nucleotide phylogenetic patterns in everything we see. A detailed
Sequence Database (2). As Swiss-Prot is a protein sequence mapping between biological data and phylogenetic his-
database, its repository contains the amino acid sequence, tories must be accomplished so that the full potential of
the protein name and description, taxonomic data, and the data accumulation activities can be realized. Otherwise
citation information. If additional information is provided it will be impossible to understand why certain drugs work
with the data, such as protein structures, diseases asso- in some species but not others, or how we can design
ciated with the protein or splice isoforms, Swiss-Prot pro- therapies against evolving disease agents such as HIV
vides a table where these data can be stored. Swiss-Prot and influenza.
also combines all information retrieved from the publica- The need to query data using sets of evolutionary
tions reporting new sequence data, review articles, and related taxa, rather than on single species, has brought
comments from enlisted external experts. up the need to create databases that can serve as reposi-
tories of phylogenetic trees, generated by a variety of
TrEMBL: A Supplement to Swiss-Prot methods. Phylogeny and phylogenetic trees give a picture
of the evolutionary history among species, individuals, or
Due to the large number of sequences generated by differ-
genes. Therefore, there are at least two distinct goals of a
ent genome projects, the Swiss-Prot database faces several
phylogenetic database: archival storage and analysis (28).
challenges related to the processing time required for man-
Table 2 summarizes these repositories.
ual annotation. For this reason, the European Bioinfor-
Many of the aforementioned data repositories offer func-
matics Institute, collaborating with Swiss-Prot, introduced
tionalities for browsing phylogenetic and taxonomic infor-
another database, TrEMBL (translation of EMBL nucleo-
mation. NCBI offers users the Taxonomy Databases (1, 13),
tide sequence database). This database consists of compu-
which organize the data maintained in its repositories
ter-annotated entries derived from the translation of all
from the species perspective and allows the user to
coding sequences in the nucleotide databases. This data-
hierarchically browse data with respect to a Tree of Life
base is divided into two sections: SP-TrEMBL contains
organization. NEWT is a taxonomy database (http://
sequences that will eventually be transferred to Swiss-
www.ebi.ac.uk/newt/) that connects UniProtKB data to
Prot and REM-TrEMBL contains those that will not go
the NCBI taxonomy data. For every species, NEWT pro-
into Swiss-Prot, including patent application sequences,
vides information about the taxons scientific name, com-
fragments of less than eight amino acids, and sequences
mon name and synonym(s), lineage, number of UniProtKB
that have proven not to code for a real protein (19, 26, 27).
protein entries in the given taxon, and links to each entry.
UniProt
Tree of Life
With protein information spread over multiple data repo-
The Tree of Life (29) is a phylogenetic repository that aims
sitories, the efforts from PIR, SIBs Swiss-Prot and EBIs
to provide users with information from a whole-species
TrEMBL were combined to develop the UniProt Consor-
point of view. The Tree of Life allows users to search for
tium Database to centralize protein resources (22). UniProt
pages about specific species through conventional keyword
is organized into three layers. The UniProt Archive (Uni-
search mechanisms. Most interestingly, a user can also
Parc) stores the stable, nonredundant, corpus of publicly
navigate through the tree of life using hierarchical
available protein sequence data. The UniProt Knowledge-
browsing starting at the root organism, popularly referred
base (UniProtKB) consists of accurate protein sequences
to as Life, and traverse the tree until a species of interest
with functional annotation. Finally, the UniProt Reference
is reached. The species web page contains information
Cluster (UniRef) datasets provide nonredundant reference
gathered and edited by recognized experts about the species
clusters based primarily on UniProtKB. UniProt also offers
4 BIOINFORMATIC DATABASES

Table 2. Summary of Phylogenetic Data Repositories


Database URL Feature
NCBI Taxonomy http://www.ncbi.nlm.nih.gov/ Whole-species view of genomic and
Database entrez/query.fcgi?db=Taxonomy proteomic data stored in GenBank
Tree of Life http://tolweb.org/tree/ Species-centric hierarchical browsing database
modeling the evolutionary relationships
between species
TreeFam http://www.treefam.org/ Repository for phylogenetic trees based on animal genomes
TreeBASE http://www.treebase.org/treebase/ Archival peer-reviewed phylogenetic tree repository
SYSTERS http://systers.molgen.mpg.de/ Protein cluster repository with significant phylogenetic
functionalities
PANDIT http://www.ebi.ac.uk/goldman-srv/pandit/ Protein domains repository with inferred phylogenetic trees

as well as peer-reviewed resources accessible through information, taxonomic names, character states, algo-
hyperlinks (29). rithms used, and analyses performed. Phylogenetic trees
are submitted to TreeBASE by the authors of the papers
TreeFam that describe the trees. For data to be accepted by Tree-
BASE, the corresponding paper must pass the journals
TreeFam is a database of phylogenetic trees of animal gene
peer review process (39).
families. The goal of TreeFam is to develop a curated
database that provides accurate information about ortho-
SYSTERS Database
log and paralog assignments and evolutionary histories of
various gene families (30). To create and curate the trees SYSTERS is a protein clustering database based on
and families, TreeFam has gathered sequence data from sequence similarity (40). It can be accessed at http://SYS-
several protein repositories. It contains protein sequences TERS.molgen.mpg.de/. SYSTERS contains 185,000 dis-
for human (Homo sapiens), mouse (Mus musculus), rat joint protein families gathered from existing sequence
(Rattus norvegicus), chicken (Gallus gallus), pufferfish repositories: Swiss-Prot (19), TrEMBL (19) and complete
(Takifugu rubripes), zebrafish (Danio rerio), and fruitfly genomes: Ensembl (14), The Arabidopsis Information
(Drosophila melanogaster), which were retrieved from Resource (16), SGD (17), and GeneDB (15). Two innovative
Ensembl (14), WormBase (31), SGD (17), GeneDB (15), features of this repository are the SYSTERS Table and
and TIGR (32). The protein sequences in TreeFam are SYSTERS Tree. The SYSTERS Table for a family cluster
grouped into families of genes that descended from a single contains a variety of information, most notably accession
gene in the last common ancestor of all animals, or that first numbers as well as accession numbers for a variety of
appeared in animals. From the above sources, families and external databases [IMB (41), MSD (42), ENZYME (43),
trees are automatically generated and then manually INTERPRO (9), PROSITE (8), GO (44)]. There can be
curated based on expert review. To manage these data, several redundant entries in the table for one protein
TreeFam is divided into two parts. TreeFAM-B consists of sequence. As SYSTERS data rely on external protein data-
the automatically generated trees. It obtains clusters from bases, there is always an entry name (protein name) and an
the PhIGs (33) database and uses BLAST (34), MUSCLE accession number for each entry but there may not be a
(35), and HMMER (36) and neighbor-joining algorithms gene name. For each family cluster that consists of more
(37) to generate the trees. TreeFAM-A contains the manu- than two nonredundant entries, a phylogenetic tree is
ally curated trees, which exploit algorithms similar to the available. The phylogenetic trees are constructed using
DLI algorithm (DLI: H. Li, unpublished data) and the SDI the UPGMA (45) method. No more than 200 entries are
algorithm (38). TreeFAM contains 11,646 families includ- displayed in a tree; the selection process when a cluster
ing about 690 families that have curated phylogenetic contains more than 200 entries is not clear.
trees. Therefore, as more trees get curated, the Tree-
Fam-A database increases, whereas TreeFam-B decreases PANDIT (Protein and Associated Nucleotide
in size. Domains with Inferred Trees)
PANDIT is a nonredundant repository of multiple sequence
TreeBASE
alignments and phylogenetic trees. It is available at http://
TreeBASE (39) was developed to help harness the explo- www.ebi.ac.uk/goldman-srv/pandit. The database consists
sively high growth in the number of published phylogenetic of three portions: protein domain sequence alignments
trees. It is a relational database and contains phylogenetic from Pfam Database (46), alignments of nucleotide
trees and the data underlying those trees. TreeBASE is sequences derived from EMBL Nucleotide Sequence Data-
available at http://www.treebase.org and allows the user to base (2), and phylogenetic trees inferred from each align-
search the database according to different keywords and to ment. Currently PANDIT contains 7738 families of
see graphical representations of the trees. The user can also homologous protein sequences with corresponding DNA
access information such as data matrices, bibliographic sequences and phylogenetic trees. All alignments are based
BIOINFORMATIC DATABASES 5

on Pfam-A (47) seed alignments, which are manually The Protein Data Bank
curated and, therefore, make PANDIT data high quality
The Protein Data Bank (PDB) is an archive of structural
and comparable with alignments used to study evolution.
data of biological macromolecules. PDB is maintained by
Each family contains three alignments: PANDIT-aa con-
the Research Collaboratory for Structural Bioinformatics
tains the exact Pfam-A seed protein sequence alignment;
(RCSB). It allows the user to view data both in plain text
and PANDIT-dna contains the DNA sequences encoding
and through a molecular viewer using Jmol. A key goal of
the protein sequences in PANDIT-aa that could be recov-
the PDB is to make the data as uniform as possible while
ered; and PANDIT-aa-restricted contains only those pro-
improving data accessibility and providing advanced
tein sequences for which a DNA sequence has been
querying options (52, 53).
recovered. The DNA sequences have been retrieved using
To have complete information regarding the features of
cross-references to the EMBL Nucleotide Sequence Data-
macromolecular structures, PDB allows a wide spectrum of
base from the Swiss-Prot (19) and TrEMBL (19) databases.
queries through data integration. PDB collects and inte-
To ensure accuracy, PANDIT performs a translation of the
grates external data from scientists deposition, Gene
cross-referenced DNA sequences back to the corresponding
Ontology (GO) (54), Enzyme Commission (55), KEGG Path-
protein sequences.
ways (56), and NCBI resources (57). PDB realizes data
PANDIT database is intended for studying the molecu-
integration through data loaders written in Java, which
lar evolution of protein families. Therefore, phylogenetic
extract information from existing databases based on com-
trees have been constructed for families of more than two
mon identification numbers. PDB also allows data extrac-
sequences. For each family, five different methods for tree
tion at query run time, which means implemented Web
estimation have been used to produce candidate trees.
services extract information as the query is executing.
These methods include neighbor-joining (37), BioNJ (48),
Weighbor (49), FastME (50), and PHYML (51). Neighbor-
The Nucleic Acid Database
joining, BioNJ and Weighbor are methods used to produce
phylogenetic tree estimates from a pairwise distance Nucleic Acid Database, also curated by RCSB and similar
matrix. FastME uses a minimum evolution criterion with to the PDB and the Cambridge Structural Database (58), is
local tree-rearrangements to estimate a tree, and Phyml a repository for nucleic acid structures. It gives users access
uses maximum likelihood with local tree searching. At the to tools for extracting information from nucleic acid struc-
end, the likelihood of each tree from the candidate set is tures and distributes data and software. The data are
computed and the tree with the highest likelihood is added stored in a relational database that contains tables of
to the database. primary and derivative information. The primary informa-
tion includes atomic coordinates, bibliographic references,
crystal data, data collection, and other structural descrip-
STRUCTURE AND PATHWAY DATABASES
tions. The derivative information is calculated from the
primary information and includes chemical bond lengths,
Knowledge of protein structures and of molecular interac-
and angles, virtual bond lengths, and other measures
tions is key to understanding protein functions and com-
according to various algorithms (59, 60). The experimental
plex regulatory mechanisms underlying many biological
data in the NDB database have been collected from pub-
processes. However, computationally, these datasets are
lished literature, as well as from one of the standard
highly complex. The most popular ways to model these
crystallographic archive file types (60, 61) and other
datasets are through text, graphs, or images. Text data
sources. Primary information has been encoded in ASCII
tend not to have the descriptive power needed to fully model
format file (62). Several programs have been developed to
this type of data. Graphical and the image data require
convert between different file formats (60, 63, 64, 65).
complex algorithms that are computationally expensive
and not reliably accurate. Therefore, structural and path-
The Kyoto Encyclopedia of Genes and Genomes
way databases become an interesting niche from both the
biological and the computational perspectives. Table 3 The Kyoto Encyclopedia of Genes and Genomes (KEGG)
lists several prominent databases in this field. (56) is the primary resource for the Japanese GenomeNet
service that attempts to define the relationships between

Table 3. Summary of Structural and Pathway Databases


Database URL Feature
The Protein Data Bank (PDB) http://www.rcsb.org/pdb/ Protein structure repository that provides
tools for analyzing these structures
The Nucleic Acid Database (NDB) http://ndbserver.rutgers.edu/ Database housing nucleic acid structural information
The Kyoto Encyclopedia of Genes http://www.genome.jp/kegg/ Collection of databases integrating pathway,
and Genomes (KEGG) genomic, proteomic, and ligand data
The BioCyc Database Collection http://www.biocyc.org/ Collection of over 200 pathway and genomic databases
6 BIOINFORMATIC DATABASES

the functional meanings and utilities of the cell or the MICROARRAY AND BOUTIQUE BIOINFORMATIC
organism and its genome information. KEGG contains DATABASES
three databases: PATHWAY, GENES, and LIGAND. The
PATHWAY database stores computerized knowledge on Both microarray databases and boutique databases offer
molecular interaction networks. The GENES database interesting perspectives on biological data. The microarray
contains data concerning sequences of genes and proteins databases allow users to retrieve and interact with data
generated by the genome projects. The LIGAND database from microarray experiments. Boutique databases offer
holds information about the chemical compounds and che- users specialty services concerning a particular aspect of
mical reactions that are relevant to cellular processes. biological data. This section reviews such databases and
KEGG computerizes the data and knowledge as graph synopsizes these reviews in Table 4.
information. The KEGG/PATHWAY database contains
reference diagrams for molecular pathways and complexes The Stanford Microarray Database
involving various cellular processes, which can readily be
The Stanford Microarray Database (SMD) (72) allows
integrated with genomic information (66). It stores data
researchers to retrieve, analyze, and visualize gene expres-
objects called generalized protein interaction networks
sion data from microarray experiments. The repository also
(67, 68). The PATHWAY database is composed of four
contains literature data and integrates multiple related
levels that can be accessed through the Web browser.
resources, including SGD (17), YPD and WormPD (73),
The top two levels contain information about metabolism,
UniGene (74), dbEST (20), and Swiss-Prot (19).
genetic information processing, environmental informa-
Due to the large number of experiments and datasets,
tion processing, cellular processes, and human diseases.
SMD uses comprehensive interfaces allowing users to effi-
The others relate to the pathway diagram and the ortholog
ciently query the database. For each experiment, the data-
group table, which is a collection of genes and proteins.
base stores the name of the researcher, the source organism
of the microarray probe sequences, along with a category
The BioCyc Database Collection
and subcategory that describe the biological view of the
The BioCyc Database Collection (69) is a compilation of experiment. The user can create a query using any of these
pathway and genome information for different organisms. criteria to narrow down the number of experiments.
Based on the number of reviews and updates, BioCyc
databases are organized into several tiers. Tier 1 consists The Yale Microarray Database
of three databases, EcoCyc (70), which describes Escher-
The Yale Microarray Database (YMD) (75) is another repo-
ichia coli K-12; MetaCyc (71), which describes pathways for
sitory for gene expression data. It is Web-accessible and
more than 300 organisms; and the BioCyc Open Com-
enables users to perform several operations, e.g., tracking
pounds Database (69), which contains a collection of che-
DNA samples between source plates and arrays and finding
mical compound data from BioCyc databases. Tier 2
common genes/clones across different microarray plat-
contains 12 databases computationally generated by the
forms. Moreover, it allows the user to access the image
Pathologic program. These databases have been updated
file server, to enter data, and to get integrated data through
and manually curated to varying degrees. Tier 3 is com-
linkage of gene expression data to annotation databases for
posed of 191 databases computationally generated by the
functional analysis (75). YMD provides several means of
Pathologic program with no review and updating (69).
querying the database. The website contains a query cri-
The BioCyc website allows scientists to perform certain
teria interface (75), which allows the user to perform com-
operations, e.g., to visualize individual metabolic path-
mon queries. The interface also enables the user to choose
ways, to view the complete metabolic map of an organism,
the format of the output, e.g., which columns to be included
and to analyze, metabolomics data using the Omics Viewer.
and the type of output display (HTML, EXCEL, TEXT, or
The website also provides a spectrum of browsing capabil-
CLUSTER). Finally, the query output can also be dynami-
ities such as moving from a display of an enzyme to a display
cally linked to external annotation databases such as DRA-
of a reaction that the enzyme catalyzes or to the gene that
GON (76).
encodes the enzyme (69).

Table 4. Summary of Microarray and Boutique Databases


Database URL Feature
The Stanford Microarray http://genome-www5.stanford.edu/ Repository for raw and normalized
Database microarray data
The Yale Microarray http://www.med.yale.edu/microarray/ Repository for raw and normalized
Database microarray data
The Stem Cell Database http://stemcell.princeton.edu/ Database for human and mice stem cell data
The BrainML Data Server http://www.neurodatabase.org, Databases containing information necessary
for understanding brain processes
BIOINFORMATIC DATABASES 7

The Stem Cell Database Knowledge Discovery from Data (KDD)


The Stem Cell Database (SCDb) (77), supported by Prince- The KDD process, in its most fundamental form, is to
ton University and the University of Pennsylvania, is a extract interesting, nontrivial, implicit, previously
unique repository that contains information about hema- unknown, and potentially useful information from data.
topoietic stem cells from mice and humans. It is closely When applied to bioinformatic databases, KDD refers to
associated with the Stromal Cell Database (http://stromal- diverse activities, including bioinformatic data cleaning
cell.princeton.edu/), also supported by Princeton Univer- and preprocessing, pattern and motif discovery, classifica-
sity and the University of Pennsylvania. Data for this tion and clustering, biological network modeling, and bio-
repository are obtained from various peer-reviewed informatic data visualization, to name a few. An annual
sources, publications, and libraries. Users can query on KDD Cup is organized as the Data Mining and Knowledge
various aspects of the data, including gene name and other Discovery competition by the ACM Special Interest Group
annotations, as well as sequence data (77). (81, 82). Various KDD tools have been developed to analyze
DNA and protein sequences, whole genomes, phylogeny
The BrainML Data Server and evolutionary trees, macromolecule structures, and
biological pathways. However, many of these tools suffer
The BrainML Data Server is a repository containing data
from inefficiency, low accuracy, and unsatisfactory perfor-
that pertain to the understanding of neural coding, infor-
mance due to factors, including experimental noise,
mation transmission, and brain processes and provides a
unknown model complexity, visualization difficulties
venue for sharing neuro-physiological data. It acquires,
with very high-dimensional data, and the lack of sufficient
organizes, annotates, archives, delivers, and displays
samples for computational validation. Another problem is
single- and multi-unit neuronal data from mammalian
that some KDD tools are platform dependent and their
cerebral cortex (78). Users can obtain the actual datasets,
availability is limited.
provided by several laboratories, all in common format and
One emerging trend in KDD is to apply machine learn-
annotated compatibly. The Web interface provides a tool
ing, natural language processing, and statistical techni-
called QueryTool that allows the user to search by meta-
ques to text and biomedical literature mining. The goal is to
data terms submitted by the researchers. Another Tool,
establish associations between biological objects and pub-
Virtual Scilloscope Java Tool, displays time-series and
lications from literature databases such as MEDLINE, for
histogram datasets dynamically. The datasets can also
example, finding all related literature studying the same
be downloaded for analysis.
proteins from different aspects. It has been shown that
incorporating information obtained from biomedical litera-
RESEARCH CHALLENGES AND ISSUES ture mining into sequence alignment tools such as BLAST
can increase the accuracy of alignment results. This shows
Although extensive efforts have been made to catalog and an example of combining KDD methods with traditional
store biological and chemical data, there is still a great sequence analysis tools to improve their performance.
amount of work to be done. Scientists are figuratively However, these KDD methods are not yet fully reliable,
drowning in data. Therefore, there is a strong need for scalable, or user-friendly, and many of the methods still
computational tools that allow scientists to slice through need to be improved.
the mounds of data to pinpoint information needed for
experiments. Moreover, with research methodologies chan- Large-Scale Knowledge Integration (LKI)
ging from library-based to Web-based, new methods for
LKI of heterogeneous, distributed bioinformatic data is
maintaining the quality of the data are needed. Mainte-
supposed to offer users a seamless view of knowledge.
nance and updates on bioinformatic databases require not
However, with a few exceptions, many current bioinfor-
only automatic tools but in most cases also in the curation
matic systems use hyperlink navigation techniques to inte-
process. This process involves manual checks from biolo-
grate World Wide Web repositories. These techniques
gists to ensure that data are valid and accurate before
result in semantically meaningless integrations. Often,
integrating this data into the database. There are two
websites are not maintained, datasets are poorly curated,
major research challenges in the area of bioinformatic
or in some cases, the integration has been done improperly.
databases: (1) development of software tools that are reli-
With these concerns, efforts based on current biological
able, scalable, downloadable, platform-independent, user-
data integration that create advanced tools to help deliver
friendly, high performance, and open source for discover-
knowledge to the bioinformatics community fail or become
ing, extracting, and delivering knowledge from large
dataset dependent.
amounts of text and biomedical data; and (2) development
A major research challenge in bioinformatics is inte-
of large-scale ontology-assisted knowledge integration
grating and representing knowledge effectively. The infor-
systems. The two issues also give rise to others, such as
matics community has effectively integrated and visualized
how we can maintain the quality (79) and the proper
data. However, research must be taken to the next phase
provenance of biological data when it is heavily integrated.
where knowledge integration and knowledge management
Some work has been done toward the first issue, as dis-
becomes a key interest. The informatics community must
cussed in Ref. 80.
8 BIOINFORMATIC DATABASES

work with the biomedical community from the ground up. becomes a paramount concern (83). The field of data pro-
Effective, structured knowledge bases need to be created venance investigates how to maintain meta-data describ-
that are also relatively easy to use. The computer science ing the history of a data item within the database. With
community is starting to address this challenge with pro- databases cross-listing each others entries, and with data
jects in the areas of the Semantic Web and semantic inte- mining and knowledge discovery algorithms generating
gration. The bioinformatics community has started to new information based on data published in these data-
create such knowledge bases with projects like the Gene bases, the issue of data provenance becomes more and more
Ontology (GO) and Stanfords biomedical ontology (http:// significant.
bioontology.org/) (more are listed under the Open Biological
Ontology, http://obo.sourceforge.net/). Ontologies and
BIBLIOGRAPHY
meta-data are only the beginning. It is well known in the
computer science community that meta-data management
1. D. A. Benson, I. Karsch-Mizrachi, D. J. Lipman, J. Ostell, B. A.
can be a tricky, complicated process. Attempting this in the
Rapp, D. L. Wheeler, GenBank, Nuc. Acids Res., 28: 1518,
biomedical realm is downright difficult. Researchers cur- 2000.
rently must wield complicated ontologies to classify even
2. G. Cochrane, P. Aldebert, N. Althorpe, M. Andersson, W.
more complex data. Extensive research is needed into how Baker, A. Baldwin, et al., EMBL Nucleotide Sequence Data-
to develop better ontologies as well as to manipulate them base: developments in 2005, Nuc. Acids Res., 34(1): D10D15,
more effectively. 2006.
Ontology also assumes that there is a general consensus 3. E. F. Codd, A relational model of data for large shared data
within the bioinformatics field as to the format and struc- banks, CACM, 13(6): 377387, 1970.
ture of the data, with mechanisms for minimizing syno- 4. A. M. Lesk, Database Annotation in Molecular Biology. West
nyms and homonyms. This is not true for many types of Sussex, England: John Wiley & Sons, 2005.
data. For example, many plant species have binomial 5. M. Y. Galperin, The molecular biology database collection:
names identical to animal species. Many genes have 2006 update, Nuc. Acids Res., 34: D3D5, 2006.
been given different names when found in one species or 6. J. T. L. Wang, C. H. Wu, and P. P. Wang, Computational
one tissue as compared with another. In almost every area Biology and Genome Informatics, Singapore: World Scientific
of medicine as well as biology, researchers can identify Publishing, 2003.
contentious nomenclature issues. This standardized nam- 7. K. Okubo, H. Sugawara, T. Gojobori, and Y. Tateno, DDBJ in
ing problem has serious consequences. preparation for overview of research activities behind data
KDD and LKI are not separate; rather, they interact submissions Nuc. Acids Res., 34(1): D6D9, 2006.
with each other closely. For example, as mentioned, one 8. N. Hulo, A. Bairoch, V. Bulliard, L. Cerutti, E. DeCastro, P. S.
area of KDD is extracting knowledge from peer-reviewed Langendijk-Genevaux, M. Pagni, C. J. A. Sigrist. The PRO-
journal articles for clinical use. However, due to the variety SITE database. Nuc. Acids Res., 34(1): D227D230, 2006.
of ways to specify biological objects such as species, reg- 9. N. J. Mulder, R. Apweiler, T. K. Attwood, A. Bairoch, A. Bate-
ulatory pathways, and gene names, KDD tools have diffi- man, D. Binns, et al., InterPro, progress and status in 2005.
culty extracting knowledge from these articles. These Nuc. Acids Res., 33: D201205, 2006.
articles often represent a majority of data the scientific 10. S. E. Antonarakis and V. A. McKusick, OMIM passes the 1,000-
community have concerning the various biological objects. disease-gene mark, Nature Genet., 25: 11, 2000.
Due to the lack of standardized representations, one can 11. V. E. Velculescu, L. Zhang, B. Vogelstein, and K. W. Kinzler,
only employ information retrieval algorithms and give the Serial analysis of gene expression. Science, 270, 484487, 1995.
user a confidence level to the knowledge extracted. Great 12. D. L. Wheeler, D. M. Church, A. E. Lash, D. D. Leipe, T. L.
amounts of knowledge are lost because we cannot exploit a Madden, J. U. Pontius, G. D. Schuler, L. M. Schriml, T. A.
standardized knowledge base while examining peer- Tatusova, L. Wagner, and B. A. Rapp, Database resources of
the National Center for Biotechnology Information, Nuc. Acids
reviewed literature. As another example, the GO contains
Res., 29: 1116, 2001, Updated article: Nuc. Acids Res., 30:
a graph structure that illustrates the relationship among
1316, 2002.
molecular functions attributed to genes. If this structure
13. A. J. Enright, I. Iliopoulos, N. C. Kyrpides, and C. A. Ouzounis,
can be combined with KDD processes such as clustering
Protein interaction maps for complete genomes based on gene
and classification algorithms, one can produce more biolo- fusion events, Nature, 402, 8690, 1999.
gically meaningful clusters or classification outcomes.
14. T. Hubbard, D. Barker, E. Birney, G. Cameron, Y. Chen, L.
These examples illustrate the importance of combining Clark, et al., The Ensembl genome database project. Nuc. Acids
KDD and LKI, which is a challenging problem in the field. Res., 30, 3841, 2002.
15. C. Hertz-Fowler, C. S. Peacock, V. Wood, M. Aslett, A. Kerhor-
Data Provenance nou, P. Mooney, et al., GeneDB: A resource for prokaryotic and
As demonstrated by the above databases as well as the eukaryotic organisms, Nuc. Acids Res., 32: D339D343, 2004.
previous issues, there are large quantities of data inter- 16. D. W. Meinke, J. M. Cherry, C. Dean, S. D. Rounsley, and M.
changing between tens if not hundreds of databases reg- Koornneef, Arabidopsis thaliana: A model plant for genome
analysis, Science, 282: 679682, 1998.
ularly. Furthermore, scientists are revolutionizing how
research is done by relying more and more on the biological 17. J. M. Cherry, C. Adler, C. Ball, S. A. Chervitz, S. S. Dwight, E.
T. Hester, Y. Jia, G. Juvik, T. Roe, M. Schroeder, S. Weng, and
databases and less and less on original journal articles.
D. Botstein, SGD: Saccharomyces Genome Database, Nuc.
Thus, the issue of preserving how the data are obtained Acids Res., 26: 7379, 1998.
BIOINFORMATIC DATABASES 9

18. C. H. Wu, L. S. Yeh, H. Huang, L. Arminski, J. Castro-Alvear, 38. C. M. Zmasek and S. R. Eddy, A simple algorithm to infer gene
Y. Chen, Z. Z. Hu, R. S. Ledley, P. Kourtesis, B. E. Suzek, C. R. duplication and speciation events on a gene tree. Bioinfor-
Vinayaka, J. Zhang, W. C. Barker, The protein information matics, 17: 821828, 2001.
resource, Nuc. Acids Res., 31: 345347, 2003. 39. M. J. Sanderson, M. J. Donoghue, W. H. Piel, and T. Eriksson,
19. C. ODonovan, M. J. Martin, A. Gattiker, E. Gasteiger, A. TreeBASE: A prototype database of phylogenetic analyses and
Bairoch, and R. Apweiler, High-quality protein knowledge an interactive tool for browsing the phylogeny of life, Am. J.
resource: SWISSPROT and TrEMBL. Brief. Bioinform., 3: Bot., 81(6): 163 1994.
275284, 2002. 40. T. Meinel, A. Krause, H. Luz, M. Vingron, and E. Staub, The
20. M. S. Boguski, T. M. Lowe, and C. M. Tolstoshev, dbEST SYSTERS Protein Family Database in 2005. Nuc. Acids Res.,
database for expressed sequence tags, Nature Genet., 4: 332 33: D226D229, 2005.
333, 1993. 41. J. Reichert, J. Suhnel, The IMB jena image library of biological
21. G. D. Schuler, J. A. Epstein, H. Ohkawa, and J. A. Kans, macromolecules: 2002 update, Nuc. Acids Res., 30: 253254,
Entrez: Molecular biology database and retrieval system, 2002.
Methods Enzymol., 266: 141162, 1996. 42. H. Boutzelakis, D. Dimitropoulos, J. Fillon, A. Golovin,
22. C. H. Wu, R. Apweiler, A. Bairoch, D. A. Natale, W. C. Barker, K. Henrick, A. Hussain, et al., E-MSD: The Eurepoean Bioin-
B. Boeckmann, et al., The Universal Protein Resource (Uni- formatics Institute Macromolecular Structure Database. Nuc.
Prot): AN expanding universe of protein information. Nuc. Acids Res., 31: 458462, 2003.
Acids Res., 34(1): D187191, 2006. 43. A. Bairoch, The ENZYME database in 2000. Nuc. Acids Res.,
23. C. H. Wu, A. Nikolskaya, H. Huang, L. S. Yeh, D. A. Natale, C. 28: 304305, 2000.
R. Vinayaka, et al., PIRSF: Family classification system at the 44. M. Ashburner, C. A. Ball, J. A. Blake, D. Botstein, H. Butler,
Protein Information Resource. Nuc. Acids Res., 32: D112114, J. M. Cherry, et al., Gene ontology: Tool for the unification of
2004. biology, The Gene Ontology Consortium, Nature Genetics, 25:
24. C. H. Wu, H. Huang, A. Nikolskaya, Z. Z. Hu, and W. C. Barker, 2529, 2000.
The iProClass integrated database for protein functional ana- 45. R. C. Dubes and A. K. Jain. Algorithms for Clustering Data,
lysis. Comput Biol Chem., 28: 8796, 2004. Englewood Cliffs, NJ: Prentice Hall, 1988.
25. Z. Z. Hu, I. Mani, V. Hermoso, H. Liu, C. H. Wu, iProLINK: An 46. A. Bateman, E. Birney, L. Cerruti, R. Durbin, L. Etwiller, S. R.
integrated protein resource for literature mining. Comput Biol Eddy, S. Griffiths-Jones, K. L. Howe, M. Marshall, E. L. L.
Chem., 28: 409416, 2004. Sonnhammer, The Pfam protein families database, Nuc. Acids
26. E. Gasteiger, E. Jung, and A. Bairoch, SWISS-PROT: Connect- Res., 30: 276280, 2002.
ing biomolecular knowledge via a protein database, Curr. 47. E. L. L. Sonnhammer, S. R. Eddy, and R. Durbin, Pfam: A
Issues Mol. Biol., 3: 4755, 2001. comprehensive database of protein domain families based on
27. T. Etzold, and P. Argos, SRSan indexing and retrieval tool for seed alignments, Proteins: Struct. Funct. Gene., 28: 405420,
flat file data libraries. Comput. Appl. Biosci., 9: 4957, 2003. 1998.
28. J. T. L. Wang, M. J. Zaki, H. T. T. Toivonen, and D. Shasha 48. O. Gascuel, BIONJ: An improved version of the NJ algorithm
(eds), Data mining in Bioinformatics, London, UK: Springer, based on a simple model of sequence data, Mol. Biol. Evol., 14:
2005. 685695, 1997.
29. D. R. Maddison, and K.-S. Schulz (eds.). The Tree of Life Web 49. W. J. Bruno, N. D. Socci, and A. L. Halpern, Weighted neighbor
Project. Available: http://tolweb.org. Last accessed July 26, joining: A likelihood-based approach to distance-based phylo-
2006. geny reconstruction, Mol. Biol. Evol., 17: 189197, 2000.
30. W. M. Fitch, Distinguishing homologous from analogous pro- 50. R. Desper and O. Gascuel, Fast and accurate phylogeny recon-
teins, Syst. Zool., 19: 99113, 1970. struction algorithms based on the minimum-evolution princi-
31. N. Chen, T. W. Harris, I. Antoshechkin, C. Bastiani, T. Bieri, D. ple, J. Comput. Biol., 9: 687705, 2002.
Blasiar, et al., WormBase: A comprehensive data resource for 51. S. Guindon and O. Gascuel, A simple, fast and accurate method
Caenorhabditis biology and genomics, Nuc. Acids Res., 33: to estimate large phylogenies by maximum-likelihood, Syst.
D383D389, 2005. Biol., 52: 696704, 2003.
32. B. J. Haas, J. R. Wortaman, C. M. Ronning, L. I. Hannick, R. K. 52. T. N. Bhat, P. Bourne, Z. Feng, G. Gilliland, S. Jain, V.
Smith Jr., et al., Complete reannotation of the Arabidopsis Ravichandran, et al., The PDB data uniformity project. Nuc.
genome: Methods, tools, protocols and the final release. BMC Acids Res., 29, 214218, 2001.
Biol., 3:7, 2005. 53. N. Deshpande, K. J. Addess, W. F. Bluhm, J. C. Merino-Ott, W.
33. P. Dehal, and J. L. Boore, Two rounds of whole genome dupli- Townsend-Merino, Q. Zhang, et al., The RCSB Protein Data
cation in the ancestral vertebrate, PLoS Biol., 3: e314, 2005. Bank: A redesigned query system and relational database
34. S. F. Altschul, T. L. Madden, A. A. Schaffer, J. Zhang, Z. Zhang, based on the mmCIF schema, Nuc. Acids Res., 33: D233
W. Miller, and D. J. Lipman, Gapped BLAST and PSI-BLAST: D237, 2005.
A new generation of protein database search programs, Nuc. 54. The Gene Ontology Consortium, Gene Ontology: Tool for the
Acids Res., 25: 33893402, 1997. unification of biology, Nature Genetics, 25: 2529, 2000.
35. R. C. Edgar, MUSCLE: A multiple sequence alignment method 55. G. P. Moss (2006, March 16). Enzyme Nomenclature: Recom-
with reduced time and space complexity, BMC Bioinformatics, mendations of the Nomenclature Committee of the Interna-
5:113, 2004. tional Union of Biochemistry and Molecular Biology on the
36. S. R. Eddy, Profile hidden Markov models. Bioinformatics, 14: Nomenclature and Classification of Enzymes by the Reactions
755763, 1998. they Catalyse, Available: http://www.chem.qmul.ac.uk/iubmb/
37. N. Saitou and M. Nei, The neighbor-joining method: a new enzyme/. Accessed: July 27, 2006.
method for reconstructing phylogenetic trees, Mol. Biol. Evol., 56. M. Kanehisa and S. Goto, KEGG: Kyoto Encyclopedia of Genes
4: 406425, 1987. and Genomes, Nuc. Acids Res., 28: 2730, 2000.
10 BIOINFORMATIC DATABASES

57. D. L. Wheeler, D. M. Church, R. Edgar, S. Federhen, W. and comparison of model organism protein information. Nuc.
Helmberg, T. L. Madden, et al., Database resources of the Acids Res., 28: 7376, 2000.
National Center for Biotechnology Information: update, Nuc. 74. G. D. Schuler, Pieces of the puzzle: Expressed sequence tags and
Acids Res., 32: D35D40, 2004. the catalog of human genes, J. Mol. Med., 75: 694698, 1997.
58. F. H. Allen, S. Bellard, M. D. Brice, B. A. Cartwright, A. 75. K. H. Cheung, K. White, J. Hager, M. Gerstein, V. Reinke, K.
Doubleday, H. Higgs, et al., The Cambridge crystallographic Nelson, et al., YMD: A microarray database for large-scale gene
data centre: Computer-based search, retrieval, analysis and expression analysis. Proc. of the American Medical Informatics
display of information. Acta Cryst., 35: 23312339, 1979. Association 2002 Annual Symposium, San Antonio, Texas,
59. M. S. Babcock and W. K. Olson, A new program for the analysis November 911, 2002, pp. 140144.
of nucleic acid structure: implications for nucleic acid structure 76. C. M. Bouton and J. Pevsner, DRAGON: Database Referencing
interpretation, Computation of Biomolecular Structures: of Array Genes Online. Bioinformatics, 16(11): 10381039,
Achievements, Problems, and Perspectives, Heidelberg: 2000.
Springer-Verlag, 1992.
77. I. R. Lemischka, K. A. Moore, and C. Stoeckert. (2005) SCDb:
60. K. Grzeskowiak, K. Yanagi, G. G. Prive, and R. E. Dickerson, The Stem Cell Database, Available: http://stemcell.princeton.
The structure of B-helical C-G-A-T-C-G-A-T-C-G, and compar- edu/. Accessed: July 28, 2006.
ison with C-C-A-A-C-G-T-T-G-G: the effect ofbase pair rever-
78. D. Gardner, M. Abato, K. H. Knuth, R. DeBellis, and S. M Erde,
sal. J. Bio. Chem., 266: 88618883, 1991.
Philosophical Transactions of the Royal Society B: Biological
61. R. Lavery and H. Sklenar, The definition of generalized heli- Sciences. 356: 12291247, 2001.
coidal parameters and of axis curvature for irregular nucleic
79. K. G. Herbert, N. H. Gehani, W. H. Piel, J. T. L. Wang, and C. H.
acids, J. Biomol. Struct. Dynam.6: 6391, 655667, 1988.
Wu, BIO-AJAX: An Extensible Framework for Biological Data
62. H. M. Berman, A. Gelbin, J. Westbrook, and T. Demeny. The Cleaning, ACM SIGMOD Record, 33: 5157, 2004.
Nucleic Acid Database File Format. New Brunswick, NJ: Rut-
80. G. Chang, M. Haley, J. A. M. McHugh, J. T. L. Wang, Mining
gers University, 1991.
the World Wide Web, Norwell, MA: 2001.
63. S.-H Hsieh. Ndbfilter. A Suite of Translator Programs for
81. H. Shatkay, N. Chen, and D. Blostein, Integrating image data
Nucleic Acid Database Crystallographic Archive File Format.
into biomedical text categorization. Bioinformatics, 22(14):
New Brunswick, NJ: Rutgers University, 1992.
446453, 2006.
64. J. Westbrook, T. Demeny, and S.-H. Hsieh. Ndbquery. A Sim-
82. A. S. Yeh, L. Hirschman, and A. A. Morgan, Evaluation of text
plified User Interface to the Nucleic Acid Database. New Bruns-
data mining for database curation: lessons learned from the KDD
wick, NJ: Rutgers University, 1992.
Challenge Cup. Bioinformatics, 19 (Suppl 1): i331339, 2003.
65. A. R. Srinivasan and W. K. Olson, Yeast tRNAPhC conforma-
83. P. Buneman, A. Chapman, and J. Cheney, Provenance Man-
tion wheels: A novel probe of the monoclinic and orthorhombic
agement in Curated Databases, Proc. of ACM SIGMOD Inter-
models. Nuc. Acid Res., 8: 23072329, 1980.
national Conference on Management of Data, Chicago, Illinois
66. M. Kanehisa, S. Goto, S. Kawashima, and A. Nakaya, The June 2629, 2006.
KEGG databases at GenomeNet. Nuc. Acid Res., 30: 4246,
2002.
67. M. Kanehisa, Post-genome Informatics. Oxford, UK: Oxford KATHERINE G. HERBERT
University Press, 2000. Montclair State University
68. M. Kanehisa, Pathway databases and higher order function. Montclair, New Jersey
Adv. Protein Chem., 54: 381408, 2000.
JUNILDA SPIROLLARI
69. P. D. Karp, C. A. Ouzounis, C. Moore-Kochlacs, L. Goldovsky, P. JASON T. L. WANG
Kaipa, D. Ahren, S. Tsoka, N. Darzentas, V. Kunin, and N. New Jersey Institute of
Lopez-Bigas, Expansion of the BioCyc collection of pathway/ Technology
genome databases to 160 genomes, Nuc. Acids Res., 19: 6083 Newark, New Jersey
6089, 2005.
70. R. Caspi, H. Foerster, C. A. Fulcher, R. Hopkinson, J. Ingra- WILLIAM H. PIEL
ham, P. Kaipa, M. Krummenacker, S. Paley, J. Pick, S. Y. R., C. Peabody Museum of Natural
Tissier, P. Zhang and P. D. Karp, MetaCyc: A multiorganism History, Yale University
database of metabolic pathways and enzymes, Nuc. Acids Res., New Haven, Connecticut
34: D511D516, 2006.
JOHN WESTBROOK
71. P. Romero, J. Wagg, M. L. Green, D. Kaiser, M. Krumme- Protein Data Bank and Rutgers,
nacker, and P. D. Karp, Computational prediction of human The State University of New
metabolic pathways from the complete human genome, Gen- Jersey
ome Biology, 6: 117, 2004. Piscataway, New Jersey
72. C. A. Ball, I. A. Awad, J. Demeter, J. Gollub, J. M. Hebert, T.
Hernandez-Boussard, H. Jin, J. C. Matese, M. Nitzberg, F. WINONA C. BARKER
Wymore, Z. K. Zachariah, P. O. Brown, G. Sherlock, The ZHANG-ZHI HU
Stanford Microarray Database accommodates additional CATHY H. WU
microarray platforms and data formats, Nuc. Acids Res, 33: Protein Information Resource
D580582, 2005. and Georgetown University
73. M. C. Costanzo, J. D. Hogan, M. E. Cusick, B. P. Davis, A. M. Medical Center
Fancher, P. E. Hodges, et al., The Yeast Proteome Database Washington, D.C.
(YPD) and Caenorhabditis elegans Proteome Database
(WormPD): Comprehensive resources for the organization
C
COOPERATIVE DATABASE SYSTEMS the presupposition problem (2). False presuppositions
usually occur with respect to the databases state and
Consider posing a query to a human expert. If the posed schema. Presuppositions assume that the query has an
query has no answer or the complete data for an answer are answer. If any presuppositions are false, the query is non-
not available, one does not simply get a null response. The sensical. The following is a method to detect false presup-
human expert attempts to understand the gist of the query, positions. Let us represent a query as a graph consisting of
to suggest or answer related questions, to infer an answer arcs at the nodes and binary relations between the arcs. The
from data that are accessible, or to give an approximate graph is a semantic network, and the query is reexpressed
answer. The goal of cooperative database research is to in binary notation. The query answering system checks to
create information systems with these characteristics (1). see that each connected subgraph is nonempty. If any is
Thus, the system will provide answers that cooperate with empty, this indicates a failed presupposition. A prototype
the user. The key component in cooperative query answer- system called COOP (A Cooperative Query System) was
ing is the integration of a knowledge base (represents data constructed and operated with a CODASYL database to
semantics) with the database. Research in cooperative demonstrate such cooperative concepts (3).
answering stems from three areas: natural language inter-
face and dialogue systems, database systems, and logic Misconceptions
programming and deductive database systems. In this
A query may be free of any false presuppositions but can still
article, we shall place emphasis on cooperative databases.
cause misconceptions. False presuppositions concern the
We shall first provide an overview of cooperative data-
schema of the knowledge base. Misconceptions concern
base systems which covers such topics as presuppositions,
the scope of the domain of the knowledge base. Miscon-
misconceptions, intensional query answering, user model-
ceptions arise when the user has a false or unclear under-
ing, query relaxation, and associative query answering.
standing of what is necessarily true or false in the database.
Then, we present the concept of the Type Abstraction
For example, for the query, Which teachers take CS10?,
Hierarchy (TAH) which provides a structured approach
the corresponding answer will be None followed by the
for query relaxation. Methodologies for automatic TAH
explanation from the domain knowledge, Teachers teach
generation are discussed. Next, we present the cooperative
courses and Students take courses (4). Whenever the user
primitives for query relaxation and selected query exam-
poses a query that has no answer, the system infers the
ples for relational databases. Then, we present the relaxa-
probable mismatches between the users view of the world
tion controls for providing efficient query processing and
and the knowledge in the knowledge base. The system then
the filtering of unsuitable answers for the user. The case-
answers with a correction to rectify the mismatch (5).
based approach for providing relevant information to query
answers is then presented. The performance of a set of
Intensional Query Answering
sample queries generated from an operational cooperative
database system (CoBase) on top of a relational database is Intensional query answering provides additional informa-
reported. Finally, we discuss the technology transfer of tion about the extensional answer such as information
successful query relaxation to transportation, logistics about class hierarchies that define various data classes
planning applications, medical image databases, and elec- and relationships, integrity constraints to state the rela-
tronic warfare applications. tionships among data, and rules that define new classes
in terms of known classes. Intensional query answering
can also provide abstraction and summarization of the
OVERVIEW
extensional answer. As a result, the intensional answers
can often improve and compliment extensional answers.
Presuppositions
For example, consider the query Which cars are equipped
Usually when one asks a query, one not only presupposes with air bags? The extensional answer will provide a very
the existence of all the components of the query, but one also long list of registration numbers of all the cars that are
presupposes an answer to the query itself. For example, equipped with air bags. However, an intensional answer
suppose one asks Which employees own red cars? One will provide a summaried answer and state All cars
assumes there is an answer to the query. If the answer is built after 1995 are equipped with air bags. Note that
nobody owns a red car, the system should provide the user intensional answering gives more meaning to the answer
with further explanation (e.g., in the case where no than does the extensional answer. Furthermore, inten-
employee owns a red car because no employee owns a car sional answers take less time to compute than extensional
at all). To avoid misleading the user, the answer should be answers. There are different approaches to compute
There are no employees who own a red car because no intensional query answers which yield different quality
employee owns a car at all. Therefore in many queries, of answers (612). The effectiveness of the answer can be
No as an answer does not provide the user with sufficient measured by completeness, nonredundancy, optimality,
information. Further clarification is necessary to resolve relevance, and efficiency (13).

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 COOPERATIVE DATABASE SYSTEMS

User Models from data sources. There are numerical TAHs that gener-
ate by clustering attributes with numerical databases
Cooperative query answering depends on the user and
(27,28) and nonnumerical TAHs that generate by rule
context of the query. Thus, a user model will clearly aid
induction from nonnumerical data sources (29).
in providing more specific query answering and thus
Explicit relaxation operators such as approximate, near-
improve search efficiency.
to (distance range), and similar-to (based on the values of a
User models contain a representation of characteristic
set of attributes) can also be introduced in a query to relax
information about the user as well as a description of the
the query conditions. Relaxation can be controlled by users
users intentions and goals. These models help interpret the
with operators such as nonrelaxable, relaxation order,
content of a users query and effectively customize results
preference list, the number of answers, etc., which can
by guiding the query facility in deriving the answer.
be included in the query. A cooperative languge for rela-
Three types of knowledge about a user that are relevant
tional databases, CoSQL, was developed (30,31) and
to cooperative query answering are interests and prefer-
extended the Structured Query Language (SQL) with these
ences, needs, and goals and intentions. Interests and pre-
constructs. A cooperative database interface called CoBase
ferences direct the content and type of answers that should
was developed to automatically rewrite a CoSQL query
be provided. For example, (14) and (15) rewrite queries to
with relaxation and relaxation control into SQL state-
include relevant information that is of interest to the user.
ments. As a result, CoBase can run on top of conventional
User needs may vary from user to user. They can be
relational databases such as Oracle, Sybase, etc., to provide
represented by user constraints (16). The notion of user
query relaxation as well as conceptual query answering
constraints is analogous to the integrity constraints in
(answering to a query with conceptual terms) (27,31).
databases. Unlike integrity constraints, user constraints
Gaasterland, et al. (32) have used a similar type of
do not have to be logically consistent with the database.
abstraction knowledge representation for providing query
Goals and intentions do not vary from user to user. Rather,
relaxation in deductive databases by expanding the scope of
they vary from session to session and depend on the user
query constraints. They also used a meta-interpreter to
who is attempting to achieve the goal. Past dialogue, user
provide users with choices of relaxed queries.
models, and other factors can help a system to determine
the probable goals and intentions of the user (1720) and
Associative Query Answering
also clarify the users goals (21). The system can also
explain the brief of the system that conflicts with the users Associative Query Answering provides the user with addi-
belief to resolve the users misconceptions (22,23). Hemerly tional useful relevant information about a query even if the
et al. (24) use a predefined user model and maintain a log of user does not ask for or does not know how to ask for such
previous interactions to avoid misconstruction when pro- information. Such relevant information can often expedite
viding additional information. the query answering process or provide the user with
additional topics for dialogue to accomplish a query goal.
Query Relaxation It can also provide valuable past experiences that may be
helpful to the user in problem solving and decision making.
In conventional databases, if the required data is missing, if
For example, consider the query Find an airport that can
an exact answer is unavailable, or if a query is not well-
land a C5. In addition to the query answer regarding the
formed with respect to the schema, the database just
location of the airport, additional relevant information for a
returns a null answer or an error. An intelligent system
pilot may be the weather and runway conditions of the
would be much more resourceful and cooperative by relax-
airport. The additional relevant information for a trans-
ing the query conditions and providing an approximate
portation planner may be the existence of railway facilities
answer. Furthermore, if the user does not know the exact
and storage facilities nearby the airport. Thus associative
database schema, the user is permitted to pose queries
information is both user- and context-sensitive. Cuppens
containing concepts that may not be expressed in the
and Demolombe (14) use a rule-based approach to rewrite
database schema.
queries by adding additional attributes to the query vector
A user interface for relational databases has been pro-
to provide additional relevant information. They defined a
posed (25) that is tolerant of incorrect user input and allows
meta-level definition of a query, which specifies the query in
the user to select directions of relaxation. Chu, et al. (26)
three parts: entity, condition, and retrieved attributes.
proposed to generalize queries by relaxing the query con-
Answers to queries provide values to the variables desig-
ditions via a knowledge structure called Type Abstraction
nated by the retrieved attributes. They have defined meth-
Hierarchy (TAH). TAHs provide multilevel representation
ods to extend the retrieved attributes according to
of domain knowledge. Relaxation can be performed via
heuristics about topics of interest to the user.
generalization and specialization (traversing up and
CoBase uses a case-based reasoning approach to match
down the hierarchy). Query conditions are relaxed to their
past queries with the posed query (33). Query features
semantic neighbors in the TAHs until the relaxed query
consist of the query topic, the output attribute list, and
conditions can produce approximate answers. Conceptual
the query conditions (15). The similarity of the query
terms can be defined by labeling the nodes in a type
features can be evaluated from a user-specific semantic
abstraction hierarchy. To process a query with conceptual
model based on the database schema, user type, and con-
terms, the conceptual terms are translated into numeric
text. Cases with the same topic are searched first. If insuf-
value ranges or a set of nonnumeric information under that
ficient cases were found, then cases with related topics are
node. TAHs can then be generated by clustering algorithms
COOPERATIVE DATABASE SYSTEMS 3

searched. The attributes in the matched cases are then identifying their aggregation as a single (complex) object
extended to the original query. The extended query is then does not provide abstract instance representations for its
processed to derive additional relevant information for component objects. Therefore, an object-oriented database
the user. deals with information only at two general layers: the
metalayer and the instance layer. Because forming an
object-oriented type hierarchy does not introduce new
STRUCTURED APPROACH FOR QUERY RELAXATION
instance values, it is impossible to introduce an additional
instance layer. In the TAH, instances of a supertype and a
Query relaxation relaxes a query scope to enlarge the
subtype may have different representations and can be
search range or relaxes an answer scope to include addi-
viewed at different instance layers. Such multiple-layer
tional information. Enlarging and shrinking a query scope
knowledge representation is essential for cooperative query
can be accomplished by viewing the queried objects at
answering.
different conceptual levels because an object representa-
Knowledge for query relaxation can be expressed as a set
tion has wider coverage at a higher level and, inversely,
of logical rules, but such a rule-based approach (14) lacks a
more narrow coverage at a lower level. We propose the
systematic organization to guide the query transformation
notion of a type abstraction hierarchy (2729) for providing
process. TAHs provide a much simpler and more intuitive
an efficient and organized framework for cooperative query
representation for query relaxation and do not have the
processing. A TAH represents objects at different levels of
complexity of the inference that exists in the rule-based
abstraction. For example, in Fig. 1, the Medium-Range (i.e.,
system. As a result, the TAH structure can easily support
from 4000 to 8000 ft) in the TAH for runway length is a more
flexible relaxation control, which is important to improve
abstract representation than a specific runway length in
relaxation accuracy and efficiency. Furthermore, knowl-
the same TAH (e.g., 6000 ft). Likewise, SW Tunisia is a
edge represented in a TAH is customized; thus changes in
more abstract representation than individual airports (e.g.,
one TAH represent only a localized update and do not affect
Gafsa). A higher-level and more abstract object representa-
other TAHs, simplifying TAH maintenance (see subsection
tion corresponds to multiple lower levels and more specia-
entitled Maintenance of TAHs). We have developed tools
lized object representations. Querying an abstractly
to generate TAHs automatically from data sources (see the
represented object is equivalent to querying multiple spe-
next section), which enable our system to scale up and
cialized objects.
extend to large data sources.
A query can be modified by relaxing the query conditions
via such operations as generalization (moving up the TAH)
and specialization (moving down the TAH, moving, for exam- AUTOMATIC KNOWLEDGE ACQUISITION
ple, from 6000 ft to Medium-Range to (4000 ft, 8000 ft).
In addition, queries may have conceptual conditions such The automatic generation of a knowledge base (TAHs)
as runway-length Medium-Range. This condition can from databases is essential for CoBase to be scalable to
be transformed into specific query conditions by speciali- large systems. We have developed algorithms to generate
zation. Query modification may also be specified explicitly automatically TAHs based on database instances. A brief
by the user through a set of cooperative operators such as discussion about the algorithms and their complexity
similar-to, approximate, and near-to. follow.
The notion of multilevel object representation is not
captured by the conventional semantic network and Numerical TAHs
object-oriented database approaches for the following
COBWEB (34), a conceptual clustering system, uses cate-
reasons. Grouping objects into a class and grouping several
gory utility (35) as a quality measure to classify the objects
classes into a superclass provide only a common title (type)
described by a set of attributes into a classification tree.
for the involved objects without concern for the object
COBWEB deals only with categorical data. Thus, it cannot
instance values and without introducing abstract object
be used for abstracting numerical data. For providing
representations. Grouping several objects together and

Tunisia
Latitude [31.72, 37.28]
All Longitude [8.1, 11.4]

South Tunisia North Tunisia


Latitude [31.72, 34.72] Latitude [34.72, 37.28]
Longitude [8.1, 11.4] Longitude [8.1, 11.4]

Short Medium-range Long SW Tunisia SE Tunisia NW Tunisia NE Tunisia


Latitude [31.72, 34.72] Latitude [31 .72, 34.72] Latitude [34.72, 37.28] Latitude [34.72, 37.28]
Longitude [8.1, 9.27] Longitude [9.27, 11.4] Longitude [8.1, 10.23] Longitude [10.23, 11.4]

Gafsa Sfax, Gabes, Bizerte, Djedeida, Monastir


0 . . . 4k 4k 6k 8k 8k . . . 10k El_Borma Jerba Tunis, Saminjah

Figure 1. Type abstraction hierarchies: (a) runway length and (b) airport location in Tunisia.
4 COOPERATIVE DATABASE SYSTEMS

approximate answers, we want to build a classification tree algorithms for clustering numerical values. We shall pre-
that minimizes the difference between the desired answer sent the algorithm for a single attribute and then extend it
and the derived answer. Specifically, we use relaxation for multiple attributes.
error as a measure for clustering. The relaxation error
(RE) is defined as the average difference between the The Clustering Algorithm for a Single Attribute. Given a
requested values and the returned values. RE1(C) can cluster with n distinct values, the number of partitions is
also be interpreted from the standpoint of query relaxation. exponential with respect to n, so the best partition takes
Let us define the relaxation error of xi, RE1(xi), as the exponential time to find. To reduce computation complex-
average difference from xi to xj, j 1; . . . ; n. That is, ity, we shall consider only binary partitions. Later we shall
show that a simple hill-climbing strategy can be used for
X
n obtaining N-ary partitions from binary partitions.
RE1 xi Px j jxi  x j j 1 Our method is top down: we start from one cluster
j1
consisting of all the values of an attribute, and then we
find cuts to partition recursively the cluster into smaller
where P(xj) is the occurrence probability of xj in C. RE1(xi) clusters. (A cut c is a value that separates a cluster of
can be used to measure the quality of an approximate numbers fxja  x  bg into two subclusters fxja  x  cg
answer where xi in a query is relaxed to xj, j 1; . . . ; n. and fxjc < x  bg.) The partition result is a concept hier-
Summing RE1(xi) over all values xi in C, we have archy called type abstraction hierarchy. The clustering
algorithm is called the DISC method and is given in Table 1.
X
n
RE1 C Pxi RE1 xi 2 In Ref. 30, an implementation of the algorithm Binary-
i1 Cut is presented whose time complexity is O(n). Because
DISC needs to execute BinaryCut n  1 times at most to
Thus, RE1(C) is the expected error of relaxing any value generate a TAH, the worst case time complexity of DISC is
in C. O(n2). [The average case time complexity of DISC is O(n log
If RE1(C) is large, query relaxation based on C may n).]
produce very poor approximate answers. To overcome
this problem, we can partition C into subclusters to reduce N-ary Partitioning. N-ary partitions can be obtained
relaxation error. Given a partition P fC1 ; C2 ; . . . ; CN g of from binary partitions by a hill-climbing method. Starting
C, the relaxation error of the partition P is defined as from a binary partition, the subcluster with greater relaxa-
tion error is selected for further cutting. We shall use RE as
X
N a measure to determine if the newly formed partition is
RE1 P PCk RE1 Ck 3 better than the previous one. If the RE of the binary
k1 partition is less than that of the trinary partition, then
the trinary partition is dropped, and the cutting is termi-
where P(Ck) equals the number of tuples in Ck divided by nated. Otherwise, the trinary partition is selected, and the
the number of tuples in C. In general, RE1(P) < RE1(C). cutting process continues until it reaches the point where a
Relaxation error is the expected pairwise difference cut increases RE.
between values in a cluster. The notion of relaxation
error for multiple attributes can be extended from single The Clustering Algorithm for Multiple Attributes. Query
attributes. relaxation for multiple attributes using multiple single-
Distribution Sensitive Clustering (DISC) (27,28) parti- attribute TAHs relaxes each attribute independently dis-
tions sets of numerical values into clusters that minimize regarding the relationships that might exist among attri-
the relaxation error. We shall now present a class of DISC butes. This may not be adequate for the applications where

Table 1. The Algorithms DISC and BinaryCut


Algorithm DISC(C)
if the number of distinct values 2 C < T, return / T is a threshold /
let cut the best cut returned by BinaryCut(C)
partition values in C based on cut
let the resultant subclusters be C1 and C2
call DISC(C1) and DISC(C2)

Algorithm BinaryCut(C)
/ input cluster C fx1 ; . . . ; xn g /
for h 1 to n  1/ evaluate each cut/
Let P be the partition with clusters C1 fx1 ; . . . ; xh g and C2 fxh1 ; . . . ; xn g
compute RE1(P)
if RE1(P) < MinRE then
MinRE RE1 P, cut h= the best cut /
Return cut as the best cut
COOPERATIVE DATABASE SYSTEMS 5

attributes are dependent. (Dependency here means that all Cooperative query answering operates from the bottom
the attributes as a whole define a coherent concept. For of the hierarchy, so better clustering near the bottom is
example, the length and width of a rectangle are said to be desirable. To remedy these shortcomings, a bottom-up
semantically dependent. This kind of dependency should approach for constructing attribute abstraction hierarchies
be distinguished from the functional dependency in data- called Pattern-Based Knowledge Induction (PKI) was devel-
base theory.) In addition, using multiple single-attribute oped to include a nearness measure for the clusters (29).
TAHs is inefficient because it may need many iterations of PKI determines clusters by deriving rules from the
query modification and database access before approximate instance of the current database. The rules are not 100%
answers are found. Furthermore, relaxation control for certain; instead, they are rules-of-thumb about the data-
multiple TAHs is more complex because there is a large base, such as
number of possible orders for relaxing attributes. In gen-
eral, we can rely only on simple heuristics such as best first If the car is a sports car, then the color is red
or minimal coverage first to guide the relaxation (see sub-
section entitled Relaxation Control). These heuristics Each rule has a coverage that measures how often the
cannot guarantee best approximate answers because rule applies, and confidence measures the validity of the rule
they are rules of thumb and not necessarily accurate. in the database. In certain cases, combining simpler rules
Most of these difficulties can be overcome by using can derive a more sophisticated rule with high confidence.
Multiattribute TAH (MTAH) for the relaxation of multiple The PKI approach generates a set of useful rules that
attributes. Because MTAHs are generated from semanti- can then be used to construct the TAH by clustering the
cally dependent attributes, these attributes are relaxed premises of rules sharing a similar consequence. For exam-
together in a single relaxation step, thus greatly reducing ple, if the following two rules:
the number of query modifications and database accesses.
Approximate answers derived by using MTAH have better If the car is a sports car, then the color is red
quality than those derived by using multiple single-attri- If the car is a sports car, then the color is black
bute TAHs. MTAHs are context- and user-sensitive
because a user may generate several MTAHs with different have high confidence, then this indicates that for sports
attribute sets from a table. Should a user need to create an cars, the colors red and black should be clustered together.
MTAH containing semantically dependent attributes from Supporting and contradicting evidence from rules for other
different tables, these tables can be joined into a single view attributes is gathered and PKI builds an initial set of
for MTAH generation. clusters. Each invocation of the clustering algorithm
To cluster objects with multiple attributes, DISC can be adds a layer of abstraction to the hierarchy. Thus, attribute
extended to Multiple attributesDISC or M-DISC (28). values are clustered if they are used as the premise for rules
MTAHs are generated. The algorithm DISC is a special with the same consequence. By iteratively applying the
case of M-DISC, and TAH is a special case of MTAH. Let us algorithm, a hierarchy of clusters (TAH) can be found. PKI
now consider the time complexity of M-DISC. Let m be the can cluster attribute values with or without expert direc-
number of attributes and n be the number of distinct tion. The algorithm can be improved by allowing domain
attribute values. The computation of relaxation error for expert supervision during the clustering process. PKI also
a single attribute takes O(n log n) to complete (27). Because works well when there are NULL values in the data. Our
the computation of RE involves computation of relaxation experimental results confirm that the method is scalable to
error for m attributes, its complexity is O(mn log n). The large systems. For a more detailed discussion, see (29).
nested loop in M-DISC is executed mn times so that the time
complexity of M-DISC is O(m2n2 log n). To generate an Maintenance of TAHs
MTAH, it takes no more than n calls of M-DISC; therefore,
Because the quality of TAH affects the quality of derived
the worst case time complexity of generating an MTAH is
approximate answers, TAHs should be kept up to date. One
O(m2n3 log n). The average case time complexity is
simple way to maintain TAHs is to regenerate them when-
O[m2n2(log n)2] because M-DISC needs only to be called
ever an update occurs. This approach is not desirable
log n times on the average.
because it causes overhead for the database system.
Although each update changes the distribution of data
Nonnumerical TAHs
(thus changing the quality of the corresponding TAHs),
Previous knowledge discovery techniques are inadequate this may not be significant enough to warrant a TAH
for clustering nonnumerical attribute values for generating regeneration. TAH regeneration is necessary only when
TAHs for Cooperative Query Answering. For example, the cumulative effect of updates has greatly degraded the
Attribute Oriented Induction (36) provides summary infor- TAHs. The quality of a TAH can be monitored by comparing
mation and characterizes tuples in the database, but is the derived approximate answers to the expected relaxa-
inappropriate since attribute values are focused too closely tion error (e.g., see Fig. 7), which is computed at TAH
on a specific target. Conceptual Clustering (37,38) is a top- generation time and recorded at each node of the TAH.
down method to provide approximate query answers, itera- When the derived approximate answers significantly devi-
tively subdividing the tuple-space into smaller sets. The ate from the expected quality, then the quality of the TAH is
top-down approach does not yield clusters that provide deemed to be inadequate and a regeneration is necessary.
the best correlation near the bottom of the hierarchy. The following incremental TAH regeneration procedure
6 COOPERATIVE DATABASE SYSTEMS

can be used. First, identify the node within the TAH that Control Operators
has the worst query relaxations. Apply partial TAH regen-  Relaxation-order (a1, a2, . . ., an) specifies the order of
eration for all the database instances covered by the node.
the relaxation among the attributes (a1, a2, . . ., an) (i.e.,
After several such partial regenerations, we then initiate a
ai precedes ai+1). For example, relaxation-order
complete TAH regeneration.
(runway_length, runway_width) indicates that if
The generated TAHs are stored in UNIX files, and a TAH
no exact answer is found, then runway_length should
Manager (described in subsection entitled TAH Facility)
be relaxed first. If still no answer is found, then relax
is responsible to parse the files, create internal representa-
the runway_width. If no relaxation-order control is
tion of TAHs, and provide operations such as generalization
specified, the system relaxes according to its default
and specialization to traverse TAHs. The TAH Manager
relaxation strategy.
also provides a directory that describes the characteristics
of TAHs (e.g., attributes, names, user type, context, TAH
 Not-relaxable (a1, a2, . . ., an) specifies the attributes
size, location) for the users/systems to select the appropri- (a1, a2, . . ., an) that should not be relaxed. For example,
ate TAH to be used for relaxation. not-relaxable location_name indicates that the
Our experience in using DISC/M-DISC and PKI for condition clause containing location_name must not
ARPA Rome Labs Planning Initiative (ARPI) transportation be relaxed.
databases (94 relations, the biggest one of which has 12  Preference-list (v1, v2, . . ., vn) specifies the preferred
attributes and 195,598 tuples) shows that the clustering values (v1, v2, . . ., vn) of a given attribute, where vi is
techniques for both numerical and nonnumerical attributes preferred over vi+1. As a result, the given attribute is
can be generated from a few seconds to a few minutes relaxed according to the order of preference that the
depending on the table size on a SunSPARC 20 Workstation. user specifies in the preference list. Consider the attri-
bute food style; a user may prefer Italian food to
Mexican food. If there are no such restaurants within
COOPERATIVE OPERATIONS the specified area, the query can be relaxed to include
the foods similar to Italian food first and then similar to
The cooperative operations consist of the following Mexican food.
four types: context-free, context-sensitive, control, and
 Unacceptable-list (v1, v2, . . ., vn) allows users to inform
interactive.
the system not to provide certain answers. This control
can be accomplished by trimming parts of the TAH
Context-Free Operators
from searching. For example, avoid airlines X and
 Approximate operator ^v relaxes the specified value v Y tells the system that airlines X and Y should not be
within the approximate range predefined by the user. considered during relaxation. It not only provides
For example, ^9am transforms into the interval (8am, more satisfactory answers to users but also reduces
10am). search time.
 Between (v1, v2) specifies the interval for an attribute.  Alternative-TAH (TAH-name) allows users to use the
For example, time between (7am, ^9am) transforms TAHs of their choices. For example, a vacation traveler
into (7am, 10am). The transformed interval is prespe- may want to find an airline based on its fare, whereas a
cified by either the user or the system. business traveler is more concerned with his schedule.
To satisfy the different needs of the users, several
TAHs of airlines can be generated, emphasizing dif-
Context-Sensitive Operators ferent attributes (e.g., price and nonstop flight).
 Near-to X is used for specification of spatial nearness of  Relaxation-level (v) specifies the maximum allowable
object X. The near-to measure is context- and user- range of the relaxation on an attribute, i.e., [0, v].
sensitive. Nearness can be specified by the user. For  Answer-set (s) specifies the minimum number of
example, near-to BIZERTE requests the list of answers required by the user. CoBase relaxes query
cities located within a certain Euclidean distance conditions until enough number of approximate
(depending on the context) from the city Bizerte. answers (i.e.,  s) are obtained.
 Similar-to X based-on [(a1 w1)(a2 w2)    (an wn)] is  Rank-by ((a1, w1), (a2, w2), . . ., (an, wn)) METHOD
used to specify a set of objects semantically similar (method  name) specifies a method to rank the
to the target object X based on a set of attributes answers returned by CoBase.
(a1, a2, . . ., an) specified by the user. Weights (w1,
w2, . . ., wn) may be assigned to each of the attributes
User/System Interaction Operators
to reflect the relative importance in considering the
similarity measure. The set of similar objects can be  Nearer, Further provide users with the ability to con-
ranked by the similarity. The similarity measures that trol the near-to relaxation scope interactively. Nearer
computed from the nearness (e.g., weighted mean reduces the distance by a prespecified percentage,
square error) of the prespecified attributes to that of whereas further increases the distance by a prespeci-
the target object. The set size is bound by a prespecified fied percentage.
nearness threshold.
COOPERATIVE DATABASE SYSTEMS 7

Editing Relaxation Control Parameters Based on the TAH on runway length and the relaxation
order, the query is relaxed to
Users can browse and edit relaxation control parameters to
better suit their applications (see Fig. 2). The parameters SELECT aport_name, runway_length_ft,
include the relaxation range for the approximately-equal runway_width_ft
operator, the default distance for the near-to operator, and FROM aports
the number of returned tuples for the similar-to operator. WHERE runway_length_ft >= 7000 AND
runway_width_ft > 100
Cooperative SQL (CoSQL)
If this query yields no answer, then we proceed to relax
The cooperative operations can be extended to the rela- the range runway width.
tional database query language, SQL, as follows: The con-
text-free and context-sensitive cooperative operators can be Query 2. Find all the cities with their geographical
used in conjunction with attribute values specified in the coordinates near the city Bizerte in the country Tunisia.
WHERE clause. The relaxation control operators can be If there is no answer, the restriction on the country should
used only on attributes specified in the WHERE clause, and not be relaxed. The near-to range in this case is prespecified
the control operators must be specified in the WITH clause at 100 miles. The corresponding CoSQL query is as follows:
after the WHERE clause. The interactive operators can be
SELECT location_name, latitude, longitude
used alone as command inputs.
FROM GEOLOC
WHERE location_name NEAR-TO Bizerte
Examples. In this section, we present a few selected
AND country_state_name = Tunisia
examples that illustrate the capabilities of the cooperative
WITH NOT-RELAXABLE country_state_name
operators. The corresponding TAHs used for query mod-
ification are shown in Fig. 1, and the relaxable ranges are Based on the TAH on location Tunisia, the relaxed
shown in Fig. 2. version of the query is
SELECT location_name, latitude, longitude
Query 1. List all the airports with the runway length
FROM GEOLOC
greater than 7500 ft and runway width greater than 100 ft.
WHERE location_name IN {Bizerte, Djedeida,
If there is no answer, relax the runway length condition
Gafsa,
first. The following is the corresponding CoSQL query:
Gabes, Sfax, Sousse, Tabarqa,
SELECT aport_name, runway_length_ft, Tunis}
runway_width_ft AND country_state_name_= Tunisia
FROM aports
WHERE runway_length_ft > 7500 AND
Query 3. Find all airports in Tunisia similar to the
runway_width_ft > 100
Bizerte airport. Use the attributes runway_length_ft and
WITH RELAXATION-ORDER (runway_length_ft,
runway_width_ft as criteria for similarity. Place more
runway_width_ft)
similarity emphasis on runway length than runway width;
their corresponding weight assignments are 2 and 1,
respectively. The following is the CoSQL version of the
Approximate operator relaxation range
query:
Relation name Attribute name Range SELECT aport_name
FROM aports, GEOLOC
Aports Runway_length_ft 500 WHERE aport_name SIMILAR-TO Bizerte
BASED-ON ((runway_length_ft 2.0)
Aports Runway_width_ft 10
(runway_width_ft 1.0))
Aports Parking_sq_ft 100000
AND country_state_name = TUNISIA
AND GEOLOC.geo_code = aports.geo_code
GEOLOC Latitude 0.001
To select the set of the airport names that have the
GEOLOC Longitude 0.001
runway length and runway width similar to the ones for
the airport in Bizerte, we shall first find all the airports in
Tunisia and, therefore, transform the query to
Near-to operator relaxation range
SELECT aport_name
Relation name Attribute name Near-to range Nearer/further FROM aports, GEOLOC
WHERE country_state_name_ = TUNISIA
Aports Aport_name 100 miles 50%
AND GEOLOC.geo_code = aports.geo_code
GEOLOC Location_name 200 miles 50% After retrieving all the airports in Tunisia, based on the
runway length, runway width, and their corresponding
Figure 2. Relaxation range for the approximate and near-to weights, the similarity of these airports to Bizerte can be
operators. computed by the prespecified nearness formula (e.g.,
8 COOPERATIVE DATABASE SYSTEMS

Knowledge incremental growth with application. When the demand


GUI User
editor for certain modules increases, additional copies of the
modules can be added to reduce the loading; thus, the
system is scalable. For example, there are multiple copies
Relaxation
Geographical of relaxation agent and association agent in Fig. 4.
information
module system Furthermore, different types of agents can be intercon-
TAHs, nected and communicate with each other via a common
user profiles,
Database
query cases communication protocol [e.g., FIPA (http.//www.fipa.org),
Knowledge bases
Association or Knowledge Query Manipulation Language (KQML)
module Database
(39)] to perform a joint task. Thus, the architecture is
Data sources
extensible.
Figure 3. CoBase functional architecture.
Relaxation Module
Query relaxation is the process of understanding the
weighted mean square error). The order in the similarity
semantic context, intent of a user query and modifying
set is ranked according to the nearness measure, and the
the query constraints with the guidance of the customized
size of the similarity set is determined by the prespecified
knowledge structure (TAH) into near values that provide
nearness threshold.
best-fit answers. The flow of the relaxation process is
depicted in Fig. 5. When a CoSQL query is presented to
A SCALABLE AND EXTENSIBLE ARCHITECTURE the Relaxation Agent, the system first go through a pre-
processing phase. During the preprocessing, the system
Figure 3 shows an overview of the CoBase System. Type first relaxes any context-free and/or context-sensitive coop-
abstraction hierarchies and relaxation ranges for the expli- erative operators in the query. All relaxation control opera-
cit operators are stored in a knowledge base (KB). There is a tions specified in the query will be processed. The
TAH directory storing the characteristics of all the TAHs in information will be stored in the relaxation manager and
the system. When CoBase queries, it asks the underlying be ready to be used if the query requires relaxation. The
database systems (DBMS). When an approximate answer modified SQL query is then presented to the underlying
is returned, context-based semantic nearness will be pro- database system for execution. If no answers are returned,
vided to rank the approximate answers (in order of near- then the cooperative query system, under the direction of
ness) against the specified query. A graphical user interface the Relaxation Manager, relaxes the queries by query
(GUI) displays the query, results, TAHs, and relaxation modification. This is accomplished by traversing along
processes. Based on user type and query context, associa- the TAH node for performing generalization and speciali-
tive information is derived from past query cases. A user zation and rewriting the query to include a larger search
can construct TAHs from one or more attributes and modify scope. The relaxed query is then executed, and if there is no
the existing TAH in the KB. answer, we repeat the relaxation process until we obtain
Figure 4 displays the various cooperative modules: one or more approximate answers. If the system fails to
Relaxation, Association, and Directory. These agents produce an answer due to overtrimmed TAHs, the relaxa-
are connected selectively to meet applications needs. tion manager will deactivate certain relaxation rules to
An application that requires relaxation and association restore part of a trimmed TAH to broaden the search scope
capabilities, for example, will entail a linking of Relaxa- until answers are found. Finally, the answers are postpro-
tion and Association agents. Our architecture allows cessed (e.g., ranking and filtering).

Applications Users

Applications
.
.
.

.
.
.

R: Relaxation module
A: Association module
Mediator D: Directory module
R A R R
.
.
.

layer
Module capability

D
A R A A
.
.
.

Module requirement

Information
.
.
.

.
.
.

sources

Figure 4. A scalable and extensi- DB-1 DB-1 DB-1 DB-1 Dictionary/Directory


ble cooperative information system.
COOPERATIVE DATABASE SYSTEMS 9

Parsed query

Preprocess
Approximate
modules
answers

Query Query Present


relaxation processing answers

Select No Yes
Satisfactory Postprocess
Relaxation relaxation
answers modules
heuristic Figure 5. Flow chart for proces-
sing CoBase queries.

Relaxation Control. Relaxation without control may gen- length, the system can eliminate the search in East Tunisia
erate more approximations than the user can handle. The and also avoid airports with short and medium runways, as
policy for relaxation control depends on many factors, shown in Fig. 6. As a result, we can limit the query relaxa-
including user profile, query context, and relaxation control tion to a narrower scope by trimming the TAHs, thus
operators as defined previously. The Relaxation Manager improving both the system performance and the answer
combines those factors via certain policies (e.g., minimizing relevance.
search time or nearness) to restrict the search for approx-
imate answers. We allow the input query to be annotated Spatial Relaxation and Approximation. In geographical
with control operators to help guide the agent in query queries, spatial operators such as located, within, contain,
relaxation operations. intersect, union, and difference are used. When there are no
If control operators are used, the Relaxation Manager exact answers for a geographical query, both its spatial and
selects the condition to relax in accordance with the nonspatial conditions can be relaxed to obtain the approx-
requirements specified by the operators. For example, a imate answers. CoBase operators also can be used for
relaxation-order operator will dictate relax location first, describing approximate spatial relationships. For example,
then runway length. Without such user-specified require- an aircraft-carrier is near seaport Sfax. Approximate
ments, the Relaxation Manager uses a default relaxation spatial operators, such as near-to and between are devel-
strategy by selecting the relaxation order based on the oped for the approximate spatial relationships. Spatial
minimum coverage rule. Coverage is defined as the ratio approximation depends on contexts and domains (40,41).
of the cardinality of the set of instances covered by the For example, a hospital near to LAX is different from an
entire TAH. Thus, coverage of a TAH node is the percentage airport near to LAX. Likewise, the nearness of a hospital in
of all tuples in the TAH covered by the current TAH node. a metropolitan area is different from the one in a rural area.
The minimum coverage rule always relaxes the condition Thus, spatial conditions should be relaxed differently in
that causes the minimum increase in the scope of the query, different circumstances. A common approach to this pro-
which is measured by the coverage of its TAH node. This blem is the use of prespecified ranges. This approach
default relaxation strategy attempts to add the smallest requires experts to provide such information for all possible
number of tuples possible at each step, based on the ratio- situations, which is difficult to scale up to larger applica-
nale that the smallest increase in scope is likely to generate tions or to extend to different domains. Because TAHs are
the close approximate answers. The strategy for choosing user- and context-sensitive, they can be used to provide
which condition to be relaxed first is only one of many context-sensitive approximation. More specifically, we can
possible relaxation strategies; the Relaxation Manager generate TAHs based on multidimensional spatial attri-
can support other different relaxation strategies as well. butes (MTAHs).
Let us consider the following example of using control Furthermore, MTAH (based on latitude and longitude)
operators to improve the relaxation process. Suppose a pilot is generated based on the distribution of the object loca-
is searching for an airport with an 8000 ft runway in Bizerte tions. The distance between nearby objects is context-sen-
but there is no airport in Bizerte that meets the specifica- sitive: the denser the location distribution, the smaller the
tions. There are many ways to relax the query in terms of distance among the objects. In Fig. 7, for example, the
location and runway length. If the pilot specifies the relaxa- default neighborhood distance in Area 3 is smaller than
tion order to relax the location attribute first, then the the one in Area 1. Thus, when a set of airports is clustered
query modification generalizes the location Bizerte to based on the locations of the airports, the ones in the same
NW Tunisia (as shown in Fig. 1) and specifies the locations cluster of the MTAH are much closer to each other than to
Bizerte, Djedeida, Tunis, and Saminjah, thus broadening those outside the cluster. Thus, they can be considered
the search scope of the original query. If, in addition, we near-to each other. We can apply the same approach to
know that the user is interested only in the airports in West other approximate spatial operators, such as between (i.e.,
Tunisia and does not wish to shorten the required runway a cluster near-to the center of two objects). MTAHs also can
10 COOPERATIVE DATABASE SYSTEMS

Location Runway_length
Tunisia All

NE_Tun NW_Tun SE_Tun SW_Tun Short Medium Long

Monastir Bizerte Sfax Gafsa 0 4k 4k 8k 8k 10k


Djedeida Gabes El Borma
Tunis Jerba
Saminjah

Type abstraction hierarchies

Do not relax to short or medium runway Relaxation


Limit location to NW_Tun and SW_Tun manager

Constraints

Location Runway_length
Tunisia All

NW_Tun SW_Tun Long

Bizerte Gafsa 8k 10k


Djedeida El Borma
Tunis
Saminjah

Figure 6. TAH trimming based on Trimmed type abstraction hierarchies


relaxation control operators.

be used to provide context-sensitive query relaxation. For and Saminjah. Because only Djedeida and Saminjah are
example, consider the query: Find an airfield at the city airfields, these two will be returned as the approximate
Sousse. Because there is no airfield located exactly at answers.
Sousse, this query can be relaxed to obtain approximate MTAHs are automatically generated from databases by
answers. First, we locate the city Sousse with latitude 35.83 using our clustering method that minimizes relaxation
and longitude 10.63. Using the MTAH in Fig. 7, we find that error (27). They can be constructed for different contexts
Sousse is covered by Area 4. Thus, the airport Monastir is and user type. For example, it is critical to distinguish a
returned. Unfortunately, it is not an airfield. So the query friendly airport from an enemy airport. Using an MTAH for
is further relaxed to the neighboring clusterthe four friendly airports restricts the relaxation only within the set
airports in Area 3 are returned: Bizerte, Djedeida, Tunis, of friendly airports, even though some enemy airports are

37.28 10.23
Latitude

3 4 Sousse City Relaxation error: 0.677


Monastir Latitude [31.72, 37.28]
Longitude [8.1, 11.4]

RE: 0.625 Latitude RE: 0.282


(34.72)
34.72 Latitude [31.72, 34.72] Latitude [34.72, 37.28]
1 2
Longitude [8.1, 11.4] Longitude [8.1, 11.4]
Longitude, Longitude,
9.27 10.23
1 2 3 4
Gafsa Sfax Bizerte Monastir
31.72 El_Borma Gabes Djedeida
Jerba Tunis RE: 0
8.1 9.27 11.4
Saminjah
Figure 7. An MTAH for the airports Longitude RE: 0.359 RE: 0.222
in Tunisia and its corresponding two- RE: 0.145
dimensional space.
COOPERATIVE DATABASE SYSTEMS 11

Query &
answer User feedback
Capabilities:
- Adaptation of associative
Source attributes
mediator - Ranking of associative
Case matching, attributes
Query Extended - Generate associative
association,
extension query
TAH reasoning query
mediator
Learning
Requirements:
- Query conditions
- Query context
- User type
- Relevance feedback
Figure 8. Associative query an-
User profile Case base swering facility.

geographically nearby. This restriction significantly transportation planner may be information regarding rail-
improves the accuracy and flexibility of spatial query way facilities and storage facilities nearby the airport.
answering. The integration of spatial and cooperative Therefore, associative information is user- and context-
operators provides more expressiveness and context-sensi- sensitive.
tive answers. For example, the user is able to pose such Association in CoBase is executed as a multistep post-
queries as, find the airports similar-to LAX and near-to process. After the query is executed, the answer set is
City X. When no answers are available, both near-to and gathered with the query conditions, user profile, and appli-
similar-to can be relaxed based on the users preference cation constraints. This combined information is matched
(i.e., a set of attributes). To relax near-to, airports from against query cases from the case base to identify relevant
neighboring clusters in the MTAH are returned. To relax associative information (15,33). The query cases can take
similar-to, the multiple-attribute criteria are relaxed by the form of a CoBase query, which can include any CoBase
their respective TAHs. construct, such as conceptual conditions (e.g., runway_-
Cooperativeness in geographic databases was studied in length_ft short) or explicitly cooperative operations (city
Ref. 42. A rule-based approach is used in their system for near-to BIZERTE).
approximate spatial operators as well as query relaxation. For example, consider the query
For example, they define that P is near-to Q iff the distance
SELECT name, runway_length_ft
from P to Q is less than nlength_unit, where length_unit is
FROM airports
a context dependent scalar parameter, and n is a scalar
WHERE runway_length_ft > 6000
parameter that can be either unique for the application and
thus defined in domain model, or specific for each class of Based on the combined information, associative attri-
users and therefore defined in the user models. This butes such as runway conditions and weather are derived.
approach requires n and length_unit be set by domain The associated information for the corresponding airports
experts. Thus, it is difficult to scale up. Our system uses is retrieved from the database and then appended to the
MTAHs as a representation of the domain knowledge. The query answer, as shown in Fig. 9.
MTAHs can be generated automatically from databases Our current case base, consisting of about 1500 past
based on contexts and provide a structured and context- queries, serves as the knowledge server for the association
sensitive way to relax queries. As a result, it is scalable to module. The size of the case base is around 2 Mb. For
large applications. Further, the relaxation error at each association purposes, we use the 300-case set, which is
node is computed during the construction of TAHs and composed of past queries used in the transportation
MTAHs. It can be used to evaluate the quality of relaxations domain. For testing performance and scalability of the
and to rank the nearness of the approximate answers to the
exact answer.
Query answer Associative information
Associative Query Answering via Case-Based Reasoning
Name Runway_length Runway_condition Weather
Often it is desirable to provide additional information
relevant to, though not explicitly stated in, a users query. Jerba 9500 Damaged Sunny
For example, in finding the location of an airport satisfying
the runway length and width specifications, the association Monastir 6500 Good Foggy
module (Fig. 8) can provide additional information about
the runway quality and weather condition so that this Tunis 8500 Good Good
additional information may help the pilot select a suitable
airport to land his aircraft. On the other hand, the useful Figure 9. Query answer and associative information for the
relevant information for the same query if posed by a selected airports.
12 COOPERATIVE DATABASE SYSTEMS

system, we use a 1500-case set, which consists of randomly returned. Note that the TAH used for this query is a Run-
generated queries based on user profile and query template way-TAH based on runway length and runway width,
over the transportation domain. Users can also browse and which is different from the Location-TAH based on latitude
edit association control parameters such as the number of and longitude (shown in Fig. 7). The nearness measure is
association subjects, the associated links and weights of a calculated based on weighted mean square error. The
given case, and the threshold for association relevance. system computes similarity measure for each answer
obtained, ranks the list of answers, and presents it to the
user. The system obtains five answers after two relaxa-
PERFORMANCE EVALUATION
tions. The best three are selected and presented to the user.
Two tables are involved: table GEOLOC (50000 tuples) and
In this section, we present the CoBase performance based
table RUNWAYS (10 tuples).
on measuring the execution of a set of queries on the CoBase
testbed developed at UCLA for the ARPI transportation Elapsed time: 2 seconds processing time for
domain. The performance measure includes response time relaxation
for query relaxation, association, and the quality of 10 seconds database retrieval time
answers. The response time depends on the type of queries
(e.g., size of joins, number of joins) as well as the amount of
Query 6. Find seaports in Tunisia with a refrigerated
relaxation, and association, required to produce an answer.
storage capacity of over 50 tons.
The quality of the answer depends on the amount of relaxa-
The relaxation module executes the query. The query is
tion and association involved. The user is able to specify the
not relaxed, so one database retrieval is performed. Two
relaxation and association control to reduce the response
tables are used: table SEAPORTS (11 tuples) and table
time and also to specify the requirement of answer accu-
GEOLOC (about 50,000 tuples).
racy. In the following, we shall show four example queries
and their performances. The first query illustrates the Elapsed time: 2 seconds processing time for
relaxation cost. The second query shows the additional relaxation
translation cost for the similar-to cooperative operator, 5 seconds database retrieval time
whereas the third query shows the additional association
The association module returns relevant information
cost. The fourth query shows the processing cost for
about the seaports. It compares the user query to previous
returned query answers as well as the quality of answers
similar cases and selects a set of attributes relevant to the
by using TAH versus MTAH for a very large database table
query. Two top-associated attributes are selected and
(about 200,000 tuples).
appended to the query. CoBase executes the appended
query and returns the answers to the user, together with
Query 4. Find nearby airports can land C-5.
the additional information. The two additional attributes
Based on the airplane location, the relaxation module
associated are location name and availability of railroad
translates nearby to a prespecified or user-specified lati-
facility near the seaports.
tude and longitude range. Based on the domain knowledge
of C-5, the mediator also translates land into required Elapsed time: 10 seconds for association
runway length and width for landing the aircraft. The computation time
system executes the translated query. If no airport is found,
the system relaxes the distance (by a predefined amount)
Query 7. Find at least 100 cargos of code 3FKAK
until an answer is returned. In this query, an airport is
with the given volume (length, width, height), code is
found after one relaxation. Thus, two database retrievals
nonrelaxable.
(i.e., one for the original query and one for the relaxed
The relaxation module executes the query and relaxes
query) are performed. Three tables are involved: Table
the height, width, and length according to MTAH, until at
GEOLOC (50,000 tuples), table RUNWAYS (10 tuples),
least 100 answers are returned. The query is relaxed four
and table AIRCRAFT_AIRFIELD_CHARS (29 tuples).
times. Thus, five database retrievals are performed. Among
The query answers provide airport locations and their
the tables accessed is table CARGO_DETAILS (200,000
characteristics.
tuples), a very large table.
Elapsed time: 5 seconds processing time for
Elapsed time: 3 seconds processing time for
relaxation
relaxation using MTAH
40 seconds database retrieval time
2 minutes database retrieval time
for 5 retrievals
Query 5. Find at least three airports similar-to Bizerte
By using single TAHs (i.e., single TAHs for height,
based on runway length and runway width.
width, and length, respectively), the query is relaxed 12
The relaxation module retrieves runway characteristics
times. Thus, 13 database retrievals are performed.
of Bizerte airport and translates the similar-to condition
into the corresponding query conditions (runway length Elapsed time: 4 seconds for relaxation by
and runway width). The system executes the translated single TAHs
query and relaxes the runway length and runway width 5 minutes database retrieval time
according to the TAHs until at least three answers are for 13 retrievals
COOPERATIVE DATABASE SYSTEMS 13

For queries involving multiple attributes in the same database (some of the tables exceed one million rows).
relation, using an MTAH that covers multiple attributes CoBase has been successfully inserted into GLAD (called
would provide better relaxation control than using a com- CoGLAD), generating the TAHs from the databases, pro-
bination of single-attribute TAHs. The MTAH compares viding similarity search when exact match of the desired
favorably with multiple single-attribute TAHs in both assets are not available, and also locating the required
quality and efficiency. We have shown that an MTAH yields amount of these assets with spatial relaxation techniques.
a better relaxation strategy than multiple single-attribute The spatial relaxation avoids searching and filtering the
TAHs. The primary reason is that MTAHs capture attri- entire available assets, which greatly reduces the compu-
bute-dependent relationships that cannot be captured tation time.
when using multiple single-attribute TAHs. In addition, CoBase has also been successfully applied to
Using MTAHs to control relaxation is more efficient the following domains. In electronic warfare, one of the key
than using multiple single-attribute TAHs. For this exam- problems is to identify and locate the emitter for radiated
ple, relaxation using MTAHs require an average of 2.5 electromagnetic energy based on the operating parameters
relaxation steps, whereas single-attribute TAHs require of observed signals. The signal parameters are radio fre-
8.4 steps. Because a database query is posed after each quency, pulse repetition frequency, pulse duration, scan
relaxation step, using MTAHs saves around six database period, and the like. In a noisy environment, these para-
accesses on average. Depending on the size of tables and meters often cannot be matched exactly within the emitter
joins involved, each database access may take from 1 s to specifications. CoBase can be used to provide approximate
about 30 s. As a result, using MTAHs to control relaxation matching of these emitter signals. A knowledge base (TAH)
saves a significant amount of user time. can be constructed from the parameter values of previously
With the aid of domain experts, these queries can be identified signals and also from the peak (typical, unique)
answered by conventional databases. Such an approach parameter values. The TAH provides guidance on the
takes a few minutes to a few hours. However, without the parameter relaxation. The matched emitters from relaxa-
aid of the domain experts, it may take hours to days to tion can be ranked according to relaxation errors. Our
answer these queries. CoBase incorporates domain knowl- preliminary results have shown that CoBase can signifi-
edge as well as relaxation techniques to enlarge the search cantly improve emitter identification as compared to con-
scope to generate the query answers. Relaxation control ventional database techniques, particularly in a noisy
plays an important role in enabling the user to control the environment. From the line of bearing of the emitter signal,
relaxation process via relaxation control operators such as CoBase can locate the platform that generates the emitter
relaxation order, nonrelaxable attributes, preference list, signal by using the near-to relaxation operator.
etc., to restrict the search scope. As a result, CoBase is able In medical databases that store x rays and magnetic
to derive the desired answers for the user in significantly resonance images, the images are evolution and temporal-
less time. based. Furthermore, these images need to be retrieved by
object features or contents rather than patient identifica-
tion (46). The queries asked are often conceptual and not
TECHNOLOGY TRANSFER OF COBASE
precisely defined. We need to use knowledge about the
application (e.g., age class, ethnic class, disease class,
CoBase stemmed from the transportation planning appli-
bone age), user profile and query context to derive such
cation for relaxing query conditions. CoBase was linked
queries (47). Further, to match the feature exactly is very
with SIMS (43) and LIM (44) as a knowledge server for the
difficult if not impossible. For example, if the query Find
planning system. SIMS performs query optimizations for
the treatment methods used for tumors similar to Xi
distributed databases, and LIM provides high-level lan-
locationxi ; sizexi on 12-year-old Korean males cannot
guage query input to the database. A Technical Integration
be answered, then, based on the TAH shown in Fig. 10,
Experiment was performed to demonstrate the feasibility
we can relax tumor Xi to tumor Class X, and 12-year-old
of this integrated approach. CoBase technology was imple-
Korean male to pre-teen Asian, which results in the follow-
mented for the ARPI transportation application (45).
ing relaxed query: Find the treatment methods used for
Recently, CoBase has also been integrated into a logistical
tumor Class X on pre-teen Asians. Further, we can obtain
planning tool called Geographical Logistics Anchor Desk
such relevant information as the success rate, side effects,
(GLAD) developed by GTE/BBN. GLAD is used in locating
and cost of the treatment from the association operations.
desired assets for logistical planning which has a very large
As a result, query relaxation and modification are essential

Tumor classes
Age Ethnic group (location, size)

Class X [l1, ln] Class Y [l1, ln]


Preteens Teens Adult Asian African European
[s1, sn]
l: location
s: size F i g u r e 1 0 . T y p e a b st r a c t i o n
x1 x2 xn hierarchies for the medical query
..
.

Korean Chinese Japanese Filipino (I1, s1) (I2, s2) (In, sn) Y1 Y1 Y1
..
.

9 10 11 12 example.
14 COOPERATIVE DATABASE SYSTEMS

to process these queries. We have applied CoBase technol- ACKNOWLEDGMENTS


ogy to medical imaging databases (48). TAHs are generated
automatically based on context-specific (e.g., brain tumor) The research and development of CoBase has been a team
image features (e.g., location, size, shape). After the TAHs effort. I would like to acknowledge the past and present
for the medical image features have been constructed, CoBase membersHua Yang, Gladys Kong, X. Yang,
query relaxation and modification can be carried out on Frank Meng, Guogen Zhang, Wesley Chuang, Meng-feng
the medical features (49). Tsai, Henrick Yau, and Gilles Fouquesfor their contribu-
The use of CoSQL constructs such as similar-to, near-to, tions toward its design and implementation. The author
and within can be used in combination, thus greatly also wishes to thank the reviewers for their valuable
increasing the expressibility for relaxation. For example, comments.
we can express Find tumors similar-to the tumor x based-
on (shape, size, location) and near-to object O within a
specific range (e.g., angle of coverage). The relaxation BIBLIOGRAPHY
control operators, such as matching tumor features in
accordance to their importance, can be specified by the 1. T. Gaasterland, P. Godfrey, and J. Minker, An overview of
operator relaxation-order (location, size, shape), to improve cooperative answering, J. Intell. Inf. Sys., 1: 123157, 1992.
the relaxation quality. 2. A. Colmerauer and J. Pique, About natural logic, in H. Gallaire,
et al. (eds.), Proc. 5th ECAI, Orsay, France, 1982, pp. 343365.
3. S. J. Kaplan, Cooperative Responses from a portable natural
CONCLUSIONS language query system, Artificial Intelligence, 19(2): 165187,
1982.
After discussing an overview of cooperative database 4. E. Mays, Correcting misconceptions about database structure,
systems, which includes such topics as presuppositions, Proc. CSCSI 80, 1980.
misconceptions, intensional query answering, user mod- 5. K. McCoy, Correcting object-related misconceptions, Proc.
eling, query relaxation, and associative query answering, COLING10, Stanford, CA, 1984.
we presented a structured approach to query relaxation 6. L. Cholvy and R. Demolombe, Querying a rule base, Proc. 1st
via Type Abstraction Hierarchy (TAH) and a case-based Int. Conf. Expert Database Syst., 1986, pp. 365371.
reasoning approach to provide associative query answer- 7. T. Imielinski, Intelligent query answering in rule based sys-
ing. TAHs are user- and context-sensitive and can be tems, in J. Minker (ed.), Foundations of Deductive Databases
generated automatically from data sources for both and Logic Programming, Washington, DC: Morgan Kaufman,
numerical and nonnumerical attributes. Therefore, 1988.
such an approach for query relaxation can scale to large 8. A. Motro, Using integrity constraints to provide intensional
database systems. A set of cooperative operators for responses to relational queries, Proc. 15th Int. Conf. Very Large
relaxation and relaxation control was presented in which Data Bases, Los Altos, CA, 1989, pp. 237246.
these operators were extended to SQL to form a coopera- 9. A. Pirotte, D. Roelants, and E. Zimanyi, Controlled generation
tive SQL (CoSQL). A cooperative database (CoBase) has of intensional answers, IEEE Trans. Knowl. Data Eng., 3: 221
been developed to automatically translate CoSQL queries 236, 1991.
into SQL queries and can thus run on top of conventional 10. U. Chakravarthy, J. Grant, and J. Minker, Logic based
relational databases to provide query relaxation and approach to semantic query optimization, ACM Trans. Data-
relaxation control. base Syst., 15(2): 162207, 1990.
The performance measurements on sample queries 11. C. Shum and R. Muntz, Implicit representation for extensional
from CoBase reveal that the cost for relaxation and asso- answers, in L. Kershberg (ed.), Expert Database Systems,
Menlo Park, CA: Benjamin/Cummings, 1986, pp. 497
ciation is fairly small. The major cost is due to database
522.
retrieval which depends on the amount of relaxation
12. W. W. Chu, R. C. Lee, and Q. Chen, Using type inference and
required before obtaining a satisfactory answer. The
induced rules to provide intensional answers, Proc. IEEE
CoBase query relaxation technology has been successfully Comput. Soc. 7th Int. Conf. Data Eng., Washington, DC,
transferred to the logistics planning application to provide 1991, pp. 396403.
relaxation of asset characteristics as well as spatial 13. A. Motro, Intensional answers to database queries, IEEE
relaxation to locate the desired amount of assets. It has Trans. Knowl. Database Eng., 6(3): 1994, pp. 444454.
also been applied in a medical imaging database (x ray, 14. F. Cuppens and R. Demolombe, How to recognize interesting
MRI) for approximate matching of image features and topics to provide cooperative answering, Inf. Syst., 14(2): 163
contents, and in electronic warfare for approximate 173, 1989.
matching of emitter signals (based on a set of parameter 15. W. W. Chu and G. Zhang, Associative query answering via
values) and also for locating the platforms that generate query feature similarity, Int. Conf. Intell. Inf. Syst., pp. 405
the signals via spatial relaxation. 501, Grand Bahama Island, Bahamas, 1997.
With the recent advances in voice recognition systems, 16. T. Gaasterland, J. Minker, and A. Rajesekar, Deductive data-
more and more systems will be providing voice input fea- base systems and knowledge base systems, Proc. VIA 90,
tures. However, there are many ambiguities in the natural Barcelona, Spain, 1990.
language. Further research in cooperative query answer- 17. B. L. Webber and E. Mays, Varieties of user misconceptions:
ing techniques will be useful in assisting systems to under- Detection and correction, Proc. 8th Int. Conf. Artificial Intell.,
stand users dialogue with the system. Karlsruhe, Germany, 1983, pp. 650652.
COOPERATIVE DATABASE SYSTEMS 15

18. W. Wahlster et al., Over-answering yes-no questions: Extended 36. Y. Cai, N. Cercone, and J. Han, Attribute-oriented induction in
responses in a NL interface to a vision system, Proc. IJCAI relational databases, in G. Piatetsky-Shapiro and W. J. Fraw-
1983, Karlsruhe, West Germany, 1983. ley (eds.), Knowledge Discovery in Databases, Menlo Park, CA:
19. A. K. Joshi, B. L. Webber, and R. M. Weischedel, Living up to 1991.
expectations: Computing expert responses, Proc. Natl. Conf. 37. J. R. Quinlan, The effect of noise on concept learning, in R. S.
Artificial. Intell., Univ. Texas at Austin: The Amer. Assoc. Michalski, J. G. Carbonell, and T. M. Mitchell (eds.), Machine
Artif. Intell., 1984, pp. 169175. Learning, volume 2, 1986.
20. J. Allen, Natural Language Understanding, Menlo Park, CA: 38. R. E. Stepp III and R. S. Michalski, Conceptual clustering:
Benjamin/Cummings. Inventing goal-oriented classifications of structured objects, in
21. S. Carberry, Modeling the users plans and goals, Computa- R. S. Michalski, J. G. Carbonell, and T. M. Mitchell (eds.),
tional Linguistics, 14(3): 2337, 1988. Machine Learning, 1986.
22. K. F. McCoy, Reasoning on a highlighted user model to respond 39. T. Finin et al., KQML as an agent communication language,
to misconceptions, Computational Linguistics, 14(3): 5263, Proc. 3rd Int. Conf. Inf. Knowl. Manage., Gaithersburg, MD,
1988. 1994, pp. 456463.
23. A. Quilici, M. G. Dyer, and M. Flowers, Recognizing and 40. D. M. Mark and A. U. Frank, Concepts of space and spatial
responding to plan-oriented misconceptions, Computational language, Proc. 9th Int. Symp. Comput.-Assisted Cartography,
Linguistics, 14(3): 3851, 1988. Baltimore, MD, 1989, pp. 538556.
24. A. S. Hemerly, M. A. Casanova, and A. L. Furtado, Exploiting 41. R. Subramanian and N. R. Adam, Ill-defined spatial operators
user models to avoid misconstruals, in R. Demolombe and T. in geographic databases: Their nature and query processing
Imielinski (eds.), Nonstandard Queries and Nonstandard strategies, Proc. ACM Workshop Advances Geographical Inf.
Answers, Great Britain, Oxford Science, 1994, pp. 7398. Syst., Washington, DC, 1993, pp. 8893.
25. A. Motro, FLEX: A tolerant and cooperative user interface to 42. A. S. Hemerly, A. L. Furtado, and M. A. Casanova, Towards
database, IEEE Trans. Knowl. Data Eng., 4: 231246, 1990. cooperativeness in geographic databases, Proc. 4th Int. Conf.
26. W. W. Chu, Q. Chen, and R. C. Lee, Cooperative query answer- Database Expert Syst. Appl., Prague, Czech Republic, 1993.
ing via type abstraction hierarchy, in S. M. Deen (ed.), Coop- 43. Y. Arens and C. Knoblock, Planning and reformulating queries
erating Knowledge Based Systems, Berlin: Springer-Verlag, for semantically-modelled multidatabase systems, Proc. 1st
1991, pp. 271292. Int. Conf. Inf. Knowl. Manage. (CIKM), Baltimore, MD,
27. W. W. Chu and K. Chiang, Abstraction of high level concepts 1992, pp. 92101.
from numerical values in databases, Proc. AAAI Workshop 44. D. P. McKay, J. Pastor, and T. W. Finin, View-concepts: Knowl-
Knowl. Discovery Databases, 1994. edge-based access to databases, Proc. 1st Int. Conf. Inf. Knowl.
28. W. W. Chu et al., An error-based conceptual clustering method Manage. (CIKM), Baltimore, MD, 1992, pp. 8491.
for providing approximate query answers [online], Commun. 45. J. Stillman and P. Bonissone, Developing new technologies for
ACM, Virtual Extension Edition, 39(12): 216230, 1996. Avail- the ARPA-Rome Planning Initiative, IEEE Expert, 10(1): 10
able: http://www.acm.org/cacm/extension. 16, Feb. 1995.
29. M. Merzbacher and W. W. Chu, Pattern-based clustering for 46. W. W. Chu, I. T. Ieong, and R. K. Taira, A semantic modeling
database attribute values, Proc. AAAI Workshop on Knowl. approach for image retrieval by content, J. Very Large Data-
Discovery, Washington, DC, 1993. base Syst., 3: 445477, 1994.
30. W. W. Chu and Q. Chen, A structured approach for cooperative 47. W. W. Chu, A. F. Cardenas, and R. K. Taira, KMeD: A knowl-
query answering, IEEE Trans. Knowl. Data Eng., 6: 738749, edge-based multimedia medical distributed database system,
1994. Inf. Syst., 20(2): 7596, 1995.
31. W. Chu et al., A scalable and extensible cooperative informa- 48. H. K. Huang and R. K. Taira, Infrastructure design of a picture
tion system, J. Intell. Inf. Syst., pp. 223259, 1996. archiving and communication system, Amer. J. Roentgenol.,
32. T. Gaasterland, P. Godfrey, and J. Minker, Relaxation as a 158: 743749, 1992.
platform of cooperative answering, J. Intell. Inf. Syst., 1: 293 49. C. Hsu, W. W. Chu, and R. K. Taira, A knowledge-based
321, 1992. approach for retrieving images by content, IEEE Trans. Knowl.
33. G. Fouque, W. W. Chu, and H. Yau, A case-based reasoning Data Eng., 8: 522532, 1996.
approach for associative query answering, Proc. 8th Int. Symp.
Methodologies Intell. Syst., Charlotte, NC, 1994.
WESLEY W. CHU
34. D. H. Fisher, Knowledge acquisition via incremental concep- University of California
tual clustering, Machine Learning, 2(2): 139172, 1987. at Los Angeles
35. M. A. Gluck and J. E. Corter, Information, uncertainty, and the Los Angeles, California
unity of categories, Proc. 7th Annu. Conf. Cognitive Sci. Soc.,
Irvine, CA, 1985, pp. 283287.
C
CoXML: COOPERATIVE XML QUERY answers or insufficient results available, the query can
ANSWERING be relaxed to find a person with a salary range 45K
60K. In the XML model, in addition to the value relaxation,
INTRODUCTION a new type of relaxation called structure relaxation is
introduced, which relaxes the structure conditions in a
As the World Wide Web becomes a major means in dissemi- query. Structure relaxation introduces new challenges to
nating and sharing information, there has been an expo- the query relaxation in the XML model.
nential increase in the amount of data in web-compliant
format such as HyperText Markup Language (HTML) and
FOUNDATION OF XML RELAXATION
Extensible Markup Language (XML). XML is essentially a
textual representation of the hierarchical (tree-like) data
XML Data Model
where a meaningful piece of data is bounded by matching
starting and ending tags, such as <name> and </name>. We model an XML document as an ordered, labeled tree
As a result of the simplicity of XML as compared with in which each element is represented as a node and each
SGML and the expressiveness of XML as compared with element-to-subelement relationship is represented as
HTML, XML has become the most popular format for an edge between the corresponding nodes. We represent
information representation and data exchange. each data node u as a triple (id, label, <text>), where id
To cope with the tree-like structure in the XML model, uniquely identifies the node, label is the name of the
many XML-specific query languages have been proposed corresponding element or attribute, and text is the corre-
(e.g., XPath1 and XQuery (1)). All these query languages sponding elements text content or attributes value. Text is
aim at the exact matching of query conditions. Answers are optional because not every element has a text content.
found when those XML documents match the given query Figure 1 presents a sample XML data tree describing
condition exactly, which however, may not always be the an articles information. Each circle represents a node
case in the XML model. To remedy this condition, we with the node id inside the circle and label beside the
propose a cooperative query answering framework that circle. The text of each node is represented in italic at
derives approximate answers by relaxing query conditions the leaf level.
to less restricted forms. Query relaxation has been success- Due to the hierarchical nature of the XML data model,
fully used in relational databases (e.g., Refs. 26) and is we consider the text of a data node u as part of the text of
important for the XML model because: any of us ancestor nodes in the data tree. For example, in
the sample XML data tree (Fig. 1), the node 8 is an ancestor
1. Unlike the relational model where users are given a of the node 9. Thus, the text of the node 9 (i.e., Algorithms
relatively small-sized schema to ask queries, the for mining frequent itemsets. . .) is considered part of the
schema in the XML model is substantially bigger text of the node 8.
and more complex. As a result, it is unrealistic for
users to understand the full schema and to compose XML Query Model
complex queries. Thus, it is desirable to relax the
A fundamental construct in most existing XML query
users query when the original query yields null or not
languages is the tree-pattern query or twig, which selects
sufficient answers.
elements or attributes with a tree-like structure. In this
2. As the number of data sources available on the Web article, we use the twig as our basic query model. Similar
increases, it becomes more common to build systems to the tree representation of XML data, we model a query
where data are gathered from heterogeneous data twig as a rooted tree. More specifically, a query twig T is
sources. The structures of the participating data a tuple (root, V, E), where
source may be different even though they use the
same ontologies about the same contents. Therefore,  root is the root node of the twig;
the need to be able to query differently structured
 V is the set of nodes in the twig, where each node is a
data sources becomes more important (e.g., (7,8)).
tripe (id, label, <cont>), where id uniquely identifies
Query relaxation allows a query to be structurally
the node, label is the name of the corresponding ele-
relaxed and routed to diverse data sources with dif-
ment or attribute, and cont is the content condition
ferent structures.
on the corresponding node. cont is optional because
not every query node may have a content condition;
Query relaxation in the relational model focuses on
value aspects. For example, for a relational query find a  The content condition for a query node is either a
person with a salary range 50K55K, if there are no database-style value constraint (e.g., a Boolean con-
dition such as equality, inequality, or range con-
straint) or an IR-style keyword search. An IR-style
*
This work is supported by NSF Award ITR#: 0219442 content condition consists of a set of terms, where
1
See http://www.w3.org/TR/xpath/.
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 COXML: COOPERATIVE XML QUERY ANSWERING

1 article article $1

2 title 3 author 6 year 7 body


title $2 year $3 body $4
Advances in 8 section 10 section 12 section
4 name 5 title 2000
Data Mining
XYZ IEEE 9 title 11 paragraph 13 reference data 2000 section $5
Fellow
Algorithms for Existing tools for A Survey of mining
mining frequent mining frequent frequent itemsets
itemsets itemsets mining algorithms frequent itemset,
+algorithms
Figure 1. A sample XML data tree.
Figure 2. As sample XML twig.

each term is either a single word or a phrase. Each content condition, then the text of u.text should contain
term may be prefixed with modifiers such as or  all the terms that are prefixed with in $u:cont and
for specifying preferences or rejections over the term. must not contain any terms that are prefixed with 
An IR-style content condition is to be processed in a in $u:cont;
nonBoolean style; and  8 e$u;$v 2 T:E, let u and v be the data nodes in ATD that
 E is the set of edges in the twig. An edge from nodes $u2 correspond to the query node $u and $v, respectively,
to $v, denoted as e$u,$v, represents either a parent-to- then the structural relationship between u and v
child (i.e., /) or an ancestor-to-descendant (i.e., //) should satisfy the edge constraint e$u;$v .
relationship between the nodes $u and $v.
For example, given the twig in Fig. 2, the set of nodes
Given a twig T, we use T.root, T.V, and T.E to represent {1, 2, 6, 7, 8} in the sample XML data tree (Fig. 1) is an
its root, nodes, and edges, respectively. Given a node $v answer for the query, which matches the query nodes
in the twig T (i.e., v 2 T:V), we use $v.id, $v.label, and {$1, $2, $3, $4, $5}, respectively. Similarly, the set of nodes
$v.cont to denote the unique ID, the name, and the content {1, 2, 6, 7, 12} is also an answer to the sample query.
condition (if any) of the node respectively. The IDs of the Although the text of the data node 10 contain the phrase
nodes in a twig can be skipped when the labels of all the frequent itemset, it does not contain the term algo-
nodes are distinct. rithm, which is prefixed with . Thus, the set of data
For example, Fig. 2 illustrates a sample twig, which nodes {1, 2, 6, 7, 10} is not an answer for the twig.
searches for articles with a title on data mining, a year in
2000, and a body section about frequent itemset algo- XML Query Relaxation Types
rithms. In this query, the user has a preference over the
In the XML model, there are two types of query relaxations:
term algorithm. The twig consists of five nodes, where each
value relaxation and structure relaxation. A value relaxa-
node is associated with an unique id next to the node. The
tion expands a value scope to allow the matching of addi-
text under a twig node, shown in italic, is the content or
tional answers. A structure relaxation, on the other hand,
value condition on the node.
derives approximate answers by relaxing the constraint
The terms twig and query tree will be used inter-
on a node or an edge in a twig. Value relaxation is ortho-
changeably throughout this article.
gonal to structure relaxation. In this article, we focus on
structure relaxation.
XML Query Answer
Many structure relaxation types have been proposed
With the introduction of XML data and query models, we (810). We use the following three types, similar to the
shall now introduce the definition of an XML query answer. ones proposed in Ref. 10, which capture most of the relaxa-
An answer for a query twig is a set of data nodes that satisfy tion types used in previous work.
the structure and content conditions in the twig. We for-
mally define a query answer as follows:  Node Relabel. With this relaxation type, a node
can be relabeled to similar or equivalent labels accord-
Definition 1. Query Answer Given an XML data tree ing to domain knowledge. We use rel($u, l) to represent
D and a query twig T, an answer for the twig T, denoted a relaxation operation that renames a node $u to
asATD , is a set of nodes in the data D such that: label l. For example, the twig in Fig. 2 can be relaxed
to that in Fig. 3(a) by relabeling the node section to
 8 $u 2 T:V, there exists an unique data node u in paragraph.
ATD s:t $u:label u:label. Also, if $u:cont 6 null and  Edge Generalization. With an edge relaxation, a
$u:cont is a database-style value constraint, then the parent-to-child edge (/) in a twig can be generalized to
text of the data node u:text satisfies the value con- an ancestor-to-descendant edge (//). We use gen(e$u;$v )
straint. If $u:cont 6 null and $u.cont is an IR-style to represent a generalization of the edge between
nodes $u and $v. For example, the twig in Fig. 2 can
2
be relaxed to that in Fig. 3(b) by relaxing the edge
To distinguish a data node from a query node, we prefix the
between nodes body and section.
notation of a query node with a $.
COXML: COOPERATIVE XML QUERY ANSWERING 3

article article

title year body title year body article

title year section


data 2000 paragraph data 2000 section
mining mining
frequent frequent data 2000 frequent
itemset, itemset, mining itemset,
+algorithms +algorithms +algorithms Figure 3. Examples of structure relaxations for
(a) Node relabel (b) Edge generalization (c) Node delete Fig.2.

 Node Deletion. With this relaxation type, a node XML documents are mapped into relational formats so
may be deleted to derive approximate answers. We that queries can be processed and relaxed using existing
use del($v) to denote the deletion of a node $v. When relational technologies. Figure 4 illustrates the query
$v is a leaf node, it can simply be removed. When $v is relaxation flow via the schema conversion approach. This
an internal node, the children of node $v will be con- process first begins by extracting the schema inform-
nected to the parent of $v with ancestor-descendant ation, such as DTD, from XML documents via tools such
edges (//). For instance, the twig in Fig. 2 can be as XML Spy(see http://www.xmlspy.com.) Second, XML
relaxed to that in Fig. 3(c) by deleting the internal schema is transformed to relational schema via schema
node body. As the root node in a twig is a special node conversion ([e.g., XPRESS). Third, XML documents are
representing the search context, we assume that any parsed, mapped into tuples, and inserted into the relational
twig root cannot be deleted. databases. Then, relational query relaxation techniques
[e.g., CoBase (3,6)] can be used to relax query conditions.
Given a twig T, a relaxed twig can be generated by Further, semi-structured queries over XML documents
applying one or more relaxation operations to T. Let m are translated into SQL queries. These SQL queries are
processed and relaxed if there is no answer or there
be the number of relaxation  m  applicable to T,
 m  operations
then there are at most 1 . . . m 2m relaxation are insufficient answers available. Finally, results in
operation combinations. Thus, there are at most 2m the relational format are converted back into XML (e.g.,
relaxed twigs. the Nesting-based Translation Algorithm (NeT) and
Constraints-based Translation Algorithm (CoT) (11) in
XPRESS). The entire process can be done automatically
XML QUERY RELAXATION BASED ON SCHEMA and is transparent to users. In the following sections, we
CONVERSION shall briefly describe the mapping between XML and rela-
tional schema.
One approach to XML query relaxation is to convert XML
schema, transform XML documents into relational tables
with the converted schema, and then apply relational query Mapping XML Schema to Relational Schema
relaxation techniques. A schema conversion tool, called
Transforming a hierarchical XML model to a flat rela-
XPRESS (Xml Processing and Relaxation in rElational
tional model is a nontrivial task because of the following
Storage System) has been developed for these purposes:

extract DTD from XML


1 file
XML
XML Spy DTD
doc

XML
data map Relational schema map

3 2

XML Relational
Relational XML Relaxed
XML Relaxed Answers in
SQL
Queries RDB Answers XML formats
5 7

query processing
6 4 generate TAHs
query relaxation
TAH

Figure 4. The processing flow of XML query relaxation via schema conversion.
4 COXML: COOPERATIVE XML QUERY ANSWERING

inherent difficulties: the nontrivial 1-to-1 mapping, exis- redundancy and obtains a more intuitive schema by: (1)
tence of set values, complicated recursion, and/or frag- removing redundancies caused by multivalued dependen-
mentation issues. Several research works have been cies; and (2) performing grouping on attributes. The NeT
reported in these areas. Shanmugasundaram et al. (12) algorithm, however, considering tables one at a time,
mainly focuses on the issues of structural conversion. The cannot obtain an overall picture of the relational schema
Constraints Preserving Inline (CPI) algorithm (13) consi- where many tables are interconnected with each other
ders the semantics existing in the original XML schema through various other dependencies. The CoT algorithm
during the transformation. CPI inclines as many descen- (11) uses inclusion dependencies (INDs) of relational
dants of an element as possible into a single relation. It schema, such as foreign key constraints, to capture the
maps an XML element to a table when there is 1-to-f0; . . .g interconnections between relational tables and represent
or 1-to-f1; . . .g cardinality between its parent and itself. them via parent-to-child hierarchical relationships in the
The first cardinality has the semantics of any, denoted XML model.
by * in XML. The second means at least, denoted by . For Query relaxation via schema transformation (e.g.,
example, consider the following DTD fragment: XPRESS) has the advantage of leveraging on the well-
developed relational databases and relational query
<!ELEMENT author (name, address)> relaxation techniques. Information, however, may be lost
<!ELEMENT name (firstname?, lastname)> during the decomposition of hierarchical XML data into
flat relational tables. For example, by transforming the
A naive algorithm will map every element into a sepa- following XML schema into the relational schema author
rate table, leading to excessive fragmentation of the (firstname, lastname, address), we lose the hierarchical
document, as follows: relationship between element author and element name,
as well as the information that element firstname is
author (address, name_id) optional.
name (id, firstname, lastname)
<!ELEMENT author (name, address)>
The CPI algorithm converts the DTD fragment above <!ELEMENT name (firstname?,lastname)>
into a single relational table as author (firstname, last-
name, address). Further, this approach does not support structure
In addition, semantics such as #REQUIRED in XML relaxations in the XML data model. To remedy these short-
can be enforced in SQL with NOT NULL. Parent-to-child comings, we shall perform query relaxation on the XML
relationships are captured with KEYS in SQL to allow model directly, which will provide both value relaxation
join operations. Figure 5 overviews the CPI algorithm, and structure relaxation.
which uses a structure-based conversion algorithm (i.e.,
a hybrid algorithm) (13), as a basis and identifies various
A COOPERATIVE APPROACH FOR XML QUERY
semantic constraints in the XML model. The CPI algo-
RELAXATION
rithm has been implemented in XPRESS, which reduces
the number of tables generated while preserving most
Query relaxation is often user-specific. For a given query,
constraints.
different users may have different specifications about
which conditions to relax and how to relax them. Most
Mapping Relational Schema to XML Schema
existing approaches on XML query relaxation (e.g., (10))
After obtaining the results in the relational format, we do not provide control during relaxation, which may yield
may need to represent them in the XML format before undesired approximate answers. To provide user-specific
returning them back to users. XPRESS developed a Flat approximate query answering, it is essential for an XML
Translation (FT) algorithm (13), which translates system to have a relaxation language that allows users to
tables in a relational schema to elements in an XML specify their relaxation control requirements and to have
schema and columns in a relational schema to attributes the capability to control the query relaxation process.
in an XML schema. As FT translates the flat relational Furthermore, query relaxation usually returns a set of
model to a flat XML model in a one-to-one manner, it approximate answers. These answers should be ranked
does not use basic non-flat features provided by the based on their relevancy to both the structure and the
XML model such as representing subelements though content conditions of the posed query. Most existing rank-
regular expression operator (e.g., * and ). As a result, ing models (e.g., (14,15)) only measure the content simila-
the NeT algorithm (11) is proposed to decrease data rities between queries and answers, and thus are

CPI Relational Schema


1
hybrid() Relational Scheme
DTD 3
2 FindConstraints() Integrity Constraint

Figure 5. Overview of the CPI algorithm.


COXML: COOPERATIVE XML QUERY ANSWERING 5

inadequate for ranking approximate answers that use conditions and approximately satisfy the content con-
structure relaxations. Recently, in Ref. (16), the authors ditions in the query. If enough answers are found,
proposed a family of structure scoring functions based on the Ranking Module ranks the results based on their
the occurrence frequencies of query structures among data relevancy to the content conditions and returns the
without considering data semantics. Clearly, using the rich ranked results to the user. If there are no answers or
semantics provided in XML data in design scoring func- insufficient results, then the Relaxation Engine, based
tions can improve ranking accuracy. on the user-specified relaxation constructs and con-
To remedy these shortcomings, we propose a new para- trols, consults the relaxation indexes for the best
digm for XML approximate query answering that places relaxed query. The relaxed query is then resubmitted
users and their demands in the center of the design to the XML Database Engine to search for approxi-
approach. Based on this paradigm, we develop a coopera- mate answers. The Ranking Module ranks the
tive XML system that provides userspecific approximate returned approximate answers based on their rele-
query answering. More specifically, we first, develop a vancies to both structure and content conditions in the
relaxation language that allows users to specify approxi- query. This process will be repeated until either there
mate conditions and control requirements in queries (e.g., are enough approximate answers returned or
preferred or unacceptable relaxations, nonrelaxable condi- the query is no longer relaxable.
tions, and relaxation orders).
Second, we introduce a relaxation index structure that The CoXML system can run on top of any existing
clusters twigs into multilevel groups based on relaxation XML database engine (e.g., BerkeleyDB3, Tamino4,
types and their distances. Thus, it enables the system to DB2XML5) that retrieves exactly matched answers.
control the relaxation process based on users specifications
in queries.
XML QUERY RELAXATION LANGUAGE
Third, we propose a semantic-based tree editing dis-
tance to evaluate XML structure similarities, which is
A number of XML approximate search languages have
based on not only the number of operations but also
been proposed. Most extend standard query languages
the operation semantics. Furthermore, we combine struc-
with constructs for approximate text search (e.g., XIRQL
ture and content similarities in evaluating the overall
(15), TeXQuery (17), NEXI (18)). For example, TeXQuery
relevancy.
extends XQuery with a rich set of full-text search primi-
In Fig. 6, we present the architecture of our CoXML
tives, such as proximity distances, stemming, and thesauri.
query answering system. The system contains two major
NEXI introduces about functions for users to specify
parts: offline components for building relaxation indexes
approximate content conditions. XXL (19) is a flexible
and online components for processing and relaxing queries
XML search language with constructs for users to specify
and ranking results.
both approximate structure and content conditions. It,
 Building relaxation indexes. The Relaxation Index however, does not allow users to control the relaxation
process. Users may often want to specify their preferred
Builder constructs relaxation indexes, XML Type
or rejected relaxations, nonrelaxable query conditions, or
Abstraction Hierarchy (XTAH), for a set of document
to control the relaxation orders among multiple relaxable
collections.
conditions.
 Processing, relaxing queries, and ranking results.
To remedy these shortcomings, we propose an XML
When a user posts a query, the Relaxation Engine relaxation language that allows users both to specify
first sends the query to an XML Database Engine to approximate conditions and to control the relaxation pro-
search for answers that exactly match the structure cess. A relaxation-enabled query Q is a tuple (T , R, C, S),
where:

 T is a twig as described earlier;


 R is a set of relaxation constructs specifying which
relaxation-enabled
XML query conditions in T may be approximated when needed;
ranked  C is a boolean combination of relaxation control stating
results how the query shall be relaxed; and
Ranking Relaxation Relaxation  S is a stop condition indicating when to terminate the
Module Engine Indexes
relaxation process.

Relaxation The execution semantics for a relaxation-enabled query


Index Builder are as follows: We first search for answers that exactly
CoXML
match the query; we then test the stop condition to check
XML XML whether relaxation is needed. If not, we repeatedly relax
Database Engine Documents
3
See http://www.sleepycat.com/
4
Figure 6. The CoXML system architecture. See http://www.softwareag.com/tamino
5
See http://www.ibm.com/software/data/db2/
6 COXML: COOPERATIVE XML QUERY ANSWERING

<inex_topic topic_id="267" query_type="CAS" ct_no="113" >


<castitle>//article//fm//atl[about(., "digital libraries")]</castitle>
<description>Articles containing "digital libraries" in their title.</description>
<narrative>I'm interested in articles discussing Digital Libraries as their main subject.
Therefore I require that the title of any relevant article mentions "digital library" explicitly.
Documents that mention digital libraries only under the bibliography are not relevant, as well
as documents that do not have the phrase "digital library" in their title.</narrative>
</inex_topic>
Figure 8. Topic 267 in INEX 05.

the twig based on the relaxation constructs and control


until either the stop condition is met or the twig cannot be A stop condition S is either:
further relaxed.
Given a relaxation-enabled query Q, we use Q:T , Q:R,  AtLeast(n), where n is a positive integer, specifies the
Q:C, and Q:S to represent its twig, relaxation constructs, minimum number of answers to be returned; or
control, and stop condition, respectively. Note that a twig is  dQ:T :T0  t, where T0 stands for a relaxed twig and t
required to specify a query, whereas relaxation constructs, a distance threshold, specifies that the relaxation
control, and stop condition are optional. When only a twig is should be terminated when the distance between
present, we iteratively relax the query based on similarity the original twig and a relaxed twig exceeds the
metrics until the query cannot be further relaxed. threshold.
A relaxation construct for a query Q is either a specific
or a generic relaxation operation in any of the following Figure 7 presents a sample relaxation-enabled query.
forms: The minimum number of answers to be returned is 20.
When relaxation is needed, the edge between body and
 rel(u,), where u 2 Q:T :V, specifies that node u may
section may be generalized and node year may be deleted.
be relabeled when needed; The relaxation control specifies that node body cannot be
 del(u), where u 2 Q:T :V, specifies that node u may be deleted during relaxation. For instance, a section about
deleted if necessary; and frequent itemset in an articles appendix part is irrele-
 gen(eu,v), where eu;v 2 Q:T :E, specifies that edge eu,v vant. Also, the edge between nodes article and title and the
may be generalized when needed. edge between nodes article and body cannot be generalized.
For instance, an article with a reference to another article
The relaxation control for a query Q is a conjunction of that possesses a title on data mining is irrelevant.
any of the following forms: Finally, only edge generalization and node deletion can
be used.
 Nonrelaxable condition !r, where r 2 frelu; ; delu; We now present an example of using the relaxation
gen eu; v ju; v 2 Q:T :V; eu; v 2 Q; T :Eg, specifies that language to represent query topics in INEX 056. Figure 8
node u cannot be relabeled or deleted or edge eu,v presents Topic 267 with three parts: castitle (i.e., the query
cannot be generalized; formulated in an XPath-like syntax), description, and
 Pre feru; l1 ; . . . ; ln, where u 2 Q:T :V and li is a label narrative. The narrative part describes a users detailed in-
1  i  n, specifies that node u is preferred to be formation needs and is used for judging result relevancy.
relabeled to the labels in the order of l1 ; . . . ; ln ; The user considers an articles title (atl) non-relaxable
 and regards titles about digital libraries under the bib-
Reject(u; l1 ; . . . ; ln ), where u 2 Q:T :V, specifies a set
liography part (bb) irrelevant. Based on this narrative, we
of unacceptable labels for node u;
formulate this topic using the relaxation language as
 RelaxOrderr1 ; . . . ; rn , where ri 2 Q:R: 1  i  n, shown in Fig. 9. The query specifies that node atl cannot
specifies the relaxation orders for the constructs in be relaxed (either deleted or relabeled) and node fm cannot
R to be r1 ; . . . ; rn ; and be relabeled to bb.
 UseRTypert1 ; . . . ; rtk , where rti 2 fnode relabel; node
delete; edge generalizeg1  i  k  3, specifies the set
of relaxation types allowed to be used. By default, all article $1 C = !rel($3, -) !del($3) Reject($2, bb)
three relaxation types may be used.
fm $2
atl $3
article $1 R = {gen(e$4,$5), del($3)} digital libraries
title $2 year $3 body $4 C = !del($4) !gen(e$1,$2) !gen(e$1, $4)
UseRType(node_delete, edge_generalize) Figure 9. Relaxation specifications for Topic 267.
data 2000 section $5 S = AtLeast(20)
mining
frequent itemset,
+algorithms
6
Initiative for the evaluation of XML retrieval, See http://
Figure 7. A sample relaxation-enabled query. inex.is.informatik.uni-duisburg.de/
COXML: COOPERATIVE XML QUERY ANSWERING 7

XML RELAXATION INDEX (e.g., 10 mm). By such multilevel abstractions, a query can
be relaxed by modifying its conditions via generalization
Several approaches for relaxing XML or graph queries (moving up the TAH) and specialization (moving down the
have been proposed (8,10,16,20,21). Most focus on efficient TAH). In addition, relaxation can be easily controlled via
algorithms for deriving top-k approximate answers with- TAH. For example, REJECT of a relaxation can be imple-
out relaxation control. For example, Amer-yahia et al. (16) mented by pruning the corresponding node from a TAH.
proposed a DAG structure that organizes relaxed twigs To support query relaxation in the XML model, we
based on their consumption relationships. Each node in propose a relaxation index structure similar to TAH, called
a DAG represents a twig. There is an edge from twig TA XML Type Abstraction Hierarchy (XTAH). An XTAH for a
to twig TB if the answers for TB is a superset of those for twig structure T, denoted as XTT , is a hierarchical cluster
TA. Thus, the twig represented by an ancestor DAG node that represents relaxed twigs of T at different levels of
is always less relaxed and thus closer to the original twig relaxations based on the types of operations used by the
than the twig represented by a descendant node. There- twigs and the distances between them. More specifically, an
fore, the DAG structure enables efficient top-k searching XTAH is a multilevel labeled cluster with two types of
when there are no relaxation specifications. When there are nodes: internal and leaf nodes. A leaf node is a relaxed
relaxation specifications, the approach in Ref. 16 can also twig of T. An internal node represents a cluster of relaxed
be adapted to top-k searching by adding a postprocessing twigs that use similar operations and are closer to each
part that checks whether a relaxed query satisfies the other by distance. The label of an internal node is the
specifications. Such an approach, however, may not be common relaxation operations (or types) used by the twigs
efficient when relaxed queries do not satisfy the relaxation in the cluster. The higher level an internal node in the
specifications. XTAH, the more general the label of the node, the less
To remedy this condition, we propose an XML relaxa- relaxed the twigs in the internal node.
tion index structure, XTAH, that clusters relaxed twigs XTAH provides several significant advantages: (1) We
into multilevel groups based on relaxation types used by can efficiently relax a query based on relaxation cons-
the twigs and distances between them. Each group con- tructs by fetching relaxed twigs from internal nodes whose
sists of twigs using similar types of relaxations. Thus, labels satisfy the constructs; (2) we can relax a query at
XTAH enables a systematic relaxation control based on different granularities by traversing up and down an
users specifications in queries. For example, Reject can XTAH; and (3) we can control and schedule query relaxa-
be implemented by pruning groups of twigs using unac- tion based on users relaxation control requirements. For
ceptable relaxations. RelaxOrder can be implemented by example, relaxation control such as nonrelaxable condi-
scheduling relaxed twigs from groups based on the specified tions, Reject or UseRType, can be implemented by prun-
order. ing XTAH internal nodes corresponding to unacceptable
In the following, we first introduce XTAH and then operations or types.
present the algorithm for building an XTAH. Figure 11 shows an XTAH for the sample twig in
Fig. 3(a).7 For ease of reference, we associate each node
XML Type Abstraction HierarchyXTAH in the XTAH with a unique ID, where the IDs of internal
nodes are prefixed with I and the IDs of leaf nodes are
Query relaxation is a process that enlarges the search scope
prefixed with T.
for finding more answers. Enlarging a query scope can be
Given a relaxation operation r, let Ir be an internal
accomplished by viewing the queried object at different
node with a label frg. That is, Ir represents a cluster of
conceptual levels.
relaxed twigs whose common relaxation operation is r. As
In the relational database, a tree-like knowledge repre-
a result of the tree-like organization of clusters, each
sentation called Type Abstraction Hierarchy (TAH) (3) is
relaxed twig belongs to only one cluster, whereas the
introduced to provide systematic query relaxation gui-
twig may use multiple relaxation operations. Thus, it
dance. A TAH is a hierarchical cluster that represents
may be the case that not all the relaxed twigs that use
data objects at multiple levels of abstractions, where objects
the relaxation operation r are within the group Ir. For
at higher levels are more general than objects at lower
example, the relaxed twig T02 , which uses two operations
levels. For example, Fig. 10 presents a TAH for brain tumor
gene$1;$2 and gene$4;$5 , is not included in the internal
sizes, in which a medium tumor size (i.e., 310 mm) is a
node that represents fgene$4;$5 g, I7, because T02 may
more abstract representation than a specific tumor size
belong to either group I4 or group I7 but is closer to the
twigs in group I4.
all To support efficient searching or pruning of relaxed
twigs in an XTAH that uses an operation r, we add a virtual
link from internal node Ir to internal node Ik, where Ik is
small medium large not a descendant of Ir, but all the twigs within Ik use
operation r. By doing so, relaxed twigs that use operation
0 3mm 3mm 4mm 10mm 10mm 15mm r are either within group Ir or within the groups connected
to Ir by virtual links. For example, internal node I7 is
Figure 10. A TAH for brain tumor size. connected to internal nodes I16 and I35 via virtual links.

7
Due to space limitations, we only show part of the XTAH here.
8 COXML: COOPERATIVE XML QUERY ANSWERING

Twig T article $1 I0 relax

title $2 year $3 body $4


edge_generalization I1 I2 node_relabel I3 node_delete
section $5
...
I4 {gen(e$1,$2)} I7 {gen(e$4, $5 )} I10 {del($2)} I11 {del($3)} I15 {del($4)}

T1 article I16 {gen(e$1,$2),


gen(e$4,$5)} T10 article T15 article I35 {del($3),
T8 article T25 article ...
title year body gen(e$4, $5)}
year body title body
section title year body title year section
section section
section
T2 article
T16 article
title year body
title body
section Virtual links
section

Figure 11. An example of XML relaxation index structure for the twig T.

Thus, all the relaxed twigs using the operation gene$4;$5


are within the groups I7, I16, and I35. In this subsection, we assume that a distance function
is available that measures the structure similarity
Building an XTAH between twigs. Given any two twigs T1 and T2, we use
With the introduction of XTAH, we now present the algo- d(T1, T2) to represent the distance between the two twigs.
rithm for building the XTAH for a given twig T. Given a twig T and an XTAH internal node I, we measure
the distance between the twig and the internal node,
d(T, I), as the average distance between T and any twig
Algorithm 1 Building the XTAH for a given twig T T0 covered by I.
Algorithm 1 presents the procedure of building the
Input: T: a twig
XTAH for twig T in a top-down fashion. The algorithm first
K: domain knowledge about similar node labels
generates all possible relaxations applicable to T (Line 1).
Output: XTT : an XTAH for T
1: ROT GerRelaxOperations(T, K) {GerRelaxOperations Next, it initializes the XTAH with the top two level nodes
(T, K) returns a set of relaxation operations applicable to the (Line 2). In Lines 38, the algorithm generates relaxed
twig T based on the domain knowledge K} twigs using one relaxation operation and builds indexes
2: let XTT be a rooted tree with four nodes: a root node relax on these twigs based on the type of the relaxation used:
with three child nodes node_relabel, node_delete and For each relaxation operation r, it first adds a node to
edge_generalization represent r, then inserts the node into the XTAH based
3: for each relaxation operation r 2 ROT do on rs type, and places the relaxed twig using r under the
4: rtype the relaxation type of r node. In Lines 922, the algorithm generates relaxed twigs
5: InsertXTNode(/relax/rtype, {r}) {InsertXTNode(p, n)
using two or more relaxations and builds indexes on these
inserts node n into XTT under path p}
twigs. Let s be a set of k relaxation operations k  2; T0 a
6: T0 the relaxed twig using operation r
7: InsertXTNode =relax=rtype; =frg; T0 relaxed twig using the operations in s, and I an internal
8: end for node representing s. Adding node I into the XTAH is a
9: for k 2 tojROT j do three-step process: (1) it first determines Is parent in the
10: Sk all possible combinations of k relaxation operations XTAH (Line 16). In principle, any internal node that uses a
in ROT subset of the operations in s can be Is parent. The algorithm
11: for each combination s 2 Sk do selects an internal node Ij to be Is parent if the distance
12: let s fr1 ; . . . ; rk g between T0 and Ij is less than the distance between T0 and
13: if the set of operations in s is applicable to T then other parent node candidates; (2) It then connects node I to
14: T0 the relaxed twig using the operations in s
its parent Ij and adds a leaf node representing T0 to node I
15: Ii the node representing s  fri g1  i  k
(Lines 17 and 18). (3) Finally, it adds a virtual link from the
16: Ij the node s.t. 8 i; dT0 ; I j  dT0 ; Ii 1  i; j  k
17: InsertXTNode===Ij ; fr1 ; . . . ; rk g internal node representing the relaxation operation rj to
18: InsertXTNode==Ij =fr1 ; . . . ; rk g; T0 node I (Line 19), where rj is the operation that occurs in the
19: AddVLink==frj g; ==I j {AddV Link(p1,p2) adds a label of I but not in label of its parent node Ij .
virtual link from the node under path p1 to the node
under path p2}
20: end if
21: end for
22: end for
COXML: COOPERATIVE XML QUERY ANSWERING 9

QUERY RELAXATION PROCESS such as nonrelaxable twig nodes (or edges), unaccep-
table node relabels, and rejected relaxation types.
Query Relaxation Algorithm This step can be efficiently carried out by using
internal node labels and virtual links. For example,
Algorithm 2 Query Relaxation Process
the relaxation control in the sample query (Figure 7)
Input: XTT: an XTAH specifies that only node_delete and edge_generaliza-
Q fT ; R; C; Sg: a relaxation-enabled query tion may be used. Thus, any XTAH node that uses
Output: A: a list of answers for the query Q node_relabel, either within group I2 or connected to I2
1: A SearchAnswer(Q:T); {Searching for exactly matched by virtual links, is disqualified from searching. Simi-
answers for Q:T} larly, the internal nodes I15 and I4, representing the
2: if (the stop condition Q:S is met) then operations del($4) and gen(e$1, $2), respectively, are
3: return A
pruned from the XTAH by the Relaxation Control
4: end if
module.
5: if (the relaxation controls Q:C are non-empty) then
6: PruneXTAH(XTT, Q:C) {Pruning nodes in XTT that 3. After pruning disqualified internal groups, based on
contain relaxed twigs using unacceptable relaxation relaxation constructs and control, such as RelaxOr-
operations based on Q:C} der and Prefer, the Relaxation Control module sche-
7: end if dules and searches for the relaxed query that best
8: if the relaxation constructs Q:R are non-empty then satisfies users specifications from the XTAH. This
9: while (Q:S is not met)&&(not all the constructs in Q:R have step terminates when either the stop condition is met
been processed) do
or all the constructs have been processed. For exam-
10: T0 the relaxed twig from XTT that best satisfies the
ple, the sample query contains two relaxation con-
relaxation specifications Q:R & Q:C
11: Insert SearchAnswer(T0 ) into A structs: gen(e$4,$5) and del($3). Thus, this step selects
12: end while the best relaxed query from internal groups, I7 and
13: end if I11, representing the two constructs, respectively.
14: while (Q:T is relaxable)&&(Q:S is not met) do 4. If further relaxation is needed, the algorithm then
15: T0 the relaxed twig from XTT that is closest to Q:T based iteratively searches for the relaxed query that is
on distance closest to the original query by distance, which
16: Insert SearchAnswer(T0 ) into A
may use relaxation operations in addition to those
17: end while
specified in the query. This process terminates when
18: return A
either the stop condition holds or the query cannot be
further relaxed.
5. Finally, the algorithm outputs approximate answers.
Figure 12 presents the control flow of a relaxation pro-
cess based on XTAH and relaxation specifications in a
query. The Relaxation Control module prunes irrelevant
XTAH groups corresponding to unacceptable relaxation Searching for Relaxed Queries in an XTAH
operations or types and schedules relaxation operations We shall now discuss how to efficiently search for the
based on Prefer and RelaxOrder as specified in the query. best relaxed twig that has the least distance to the query
Algorithm 2 presents the detailed steps of the relaxation twig from its XTAH in Algorithm 2.
process: A brute-force approach is to select the best twig by
checking all the relaxed twigs at the leaf level. For a
1. Given a relaxation-enabled query Q fT ; R; C; Sg twig T with m relaxation operations, the number of relaxed
and an XTAH for Q:T , the algorithm first searches for twigs can be up to 2m. Thus, the worst case time complexity
exactly matched answers. If there are enough num- for this approach is O(2m), which is expensive.
ber of answers available, there is no need for relaxa- To remedy this condition, we propose to assign repre-
tion and the answers are returned (Lines 14). sentatives to internal nodes, where a representative sum-
2. If relaxation is needed, based on the relaxation control marizes the distance characteristics of all the relaxed twigs
Q:C (Lines 57), the algorithm prunes XTAH internal covered by a node. The representatives facilitate the
nodes that correspond to unacceptable operations searching for the best relaxed twig by traversing an

Relaxation- Ranked Answers


enabled Query

Relaxed Query
Queries Processing

Relaxation Control No Satisfactory Yes


Ranking
(Pruning & Scheduling) Answers?
XTAH Figure 12. Query relaxation control flow.
10 COXML: COOPERATIVE XML QUERY ANSWERING

XTAH in a top-down fashion, where the path is determined node and a query node. Therefore, we proposed an extended
by the distance properties of the representatives. By doing vector space model (14) for measuring XML content simi-
so, the worst case time complexity of finding the best larity, which is based on two concepts: weighted term
relaxed query is O(d * h), where d is the maximal degree frequency and inverse element frequency.
of an XTAH node and h is the height of the XTAH. Given an
XTAH for a twig T with m relaxation operations, the Weighted Term Frequency. Due to the hierarchical struc-
maximal degree of any XTAH node and the depth of the ture of the XML data model, the text of a node is also
XTAH are both O(m). Thus, the time complexity of the considered as a part of the ancestor nodes text, which
approach is O(m2), which is far more efficient than the introduces the challenge of how to calculate the content
brute-force approach (O(2m)). relevancy of an XML data node v to a query term t, where t
In this article, we use M-tree (22) for assigning repre- could occur in the text of any node nested within the node
sentatives to XTAH internal nodes. M-tree provides an v. For example, all three section nodes (i.e., nodes 8, 10, and
efficient access method for similarity search in the metric 12) in the XML data tree (Fig. 1) contain the phrase
space, where object similarities are defined by a distance frequent itemsets in their text parts. The phrase fre-
function. Given a tree organization of data objects where quent itemsets occurs at the title part of the node 8, the
all the data objects are at the leaf level, M-tree assigns a paragraph part in the node 10, and the reference part in
data object covered by an internal node I to be the repre- the node 12. The same term occurring at the different
sentative object of I. Each representative object stores text parts of a node may be of different weights. For
the covering radius of the internal node (i.e., the maximal example, a frequent itemset in the title part of a section
distance between the representative object and any data node has a higher weight than a frequent itemset in the
object covered by the internal node). These covering radii paragraph part of a section node, which, in turn, is more
are then used in determining the path to a data object at the important than a frequent itemset in the reference part
leaf level that is closest to a query object during similarity of a section node. As a result, it may be inaccurate to
searches. measure the weight of a term t in the text of a data node
v by simply counting the occurrence frequency of the
term t in the text of the node v without distinguishing
XML RANKING
the terms occurrence paths within the node v.
To remedy this condition, we introduce the concept of
Query relaxation usually generates a set of approximate
weighted term frequency, which assigns the weight of a
answers, which need to be ranked before being returned to
term t in a data node v based on the terms occurrence
users. A query contains both structure and content condi-
frequency and the weight of the occurrence path. Given
tions. Thus, we shall rank an approximate answer based on
a data node v and a term t, let p v1.v2. . .vk be an occur-
its relevancy to both the structure and content conditions
rence path for the term t in the node v, where vk is a
of the posed query. In this section, we first present how
descendant node of v, vk directly contains the term t, and
to compute XML content similarity, then describe how to
v ! v1 ! . . . ! vk represents the path from the node v to
measure XML structure relevancy, and finally discuss how
the node vk. Let w(p) and w(vi) denote the weight for the
to combine structure relevancy with content similarity to
path p and the node vi, respectively. Intuitively, the weight
produce the overall XML ranking.
of the path p v1.v2. . .vk is a function of the weights of
the nodes on the path (i.e., w(p) f(w(v1), . . . w(vk))), with
XML Content Similarity
the following two properties:
Given an answer A and a query Q, the content similarity
between the answer and the query, denoted as cont_sim(A 1. f(w(v1), w(v2), . . ., w(vk)) is a monotonically increas-
and Q), is the sum of the content similarities between the ing function with respect to w(vi) (1  i  k); and
data nodes and their corresponding matched query nodes. 2. f(w(v1), w(v2), . . ., w(vk))) 0 if any w(vi) 0 (1 
That is, i  k).
X
cont simA; Q cont simv; $u The first property states that the path weight function
v 2 A; $u 2 Q:T :n;u matches $u is a monotonically increasing function. That is, the weight
(1) of a path is increasing if the weight of any node on the
path is increasing. The second property states that if
For example, given the sample twig in Fig. 2, the set of the weight of any node on the path is zero, then the weight
nodes {1, 2, 6, 7, 8} in the sample data tree is an answer. of the path is zero. For any node vi (1  i  k) on the path p,
The content similarity between the answer and the twig if the weight of the node vi is zero, then it implies that
equals to cont_sim(2, $2) cont_sim(6, $3) cont_sim(8, $5). users are not interested in the terms occurring under
We now present how to evaluate the content similarity the node vi. Therefore, any term in the text of either the
between a data node and a query node. Ranking models in node vi or a descendant node of vi is irrelevant.
traditional IR evaluate the content similarity between a A simple implementation of the path weight func-
document to a query and thus need to be extended to tion f(w(v1), w(v2), . . ., w(vk)) that satisfies the properties
evaluating the content similarity between an XML data stated above is to let the weight of a path equal to the
COXML: COOPERATIVE XML QUERY ANSWERING 11

article 1 1

front_matter 2 1 body 4 2 back_matter 7 0

keyword 3 5 section 5 1 reference 8 1


i j
XML paragraph 6 1 XML
i: node id
XMLXML j: node weight Figure 13. An example of weighted term frequency.

product of the weights of all nodes on the path: where N1 denotes the number of nodes in the set DN and
N2 represents the number of the nodes in the set DN
Y
k
wp wvi (2) that contain the term t in their text parts.
i1 For example, given the sample XML data tree (Fig. 1)
and the query twig (Fig. 2), the inverse element fre-
With the introduction of the weight of a path, we shall quency for the term frequent itemset can be calculated
now define the weighted term frequency for a term t in a as follows: First, the content condition of the query node
data node v, denoted as t fw(v, t), as follows: $5 contains the term frequent itemset; second, there
are three data nodes (i.e., nodes 8, 10, and 12) that match
X
m the query node $5; and third, all the three nodes contain
t f w v; t wpj  tf v; pj ; t (3) the term in their text. Therefore, the inverse element
j1 frequency for the term frequent itemset is log(3/3 1)
log2. Similarly, as only two nodes (i.e., nodes 8 and 12)
where m is the number of paths in the data node v con- contain the term algorithms, the inverse element fre-
taining the term t and tf (v, pj, t) is the frequency of the quency for the term algorithms is log(3/2 1) log(5/2).
term t occurred in the node v via the path pj.
For example, Fig. 13 illustrates an example of an XML Extended Vector Space Model. With the introduction
data tree with the weight for each node shown in italic weighted term frequency and inverse element fre-
beside the node. The weight for the keyword node is 5 quency, we now first present how we compute the con-
(i.e., w(keyword) 5). From Equation (2), we have tent similarity between a data node and a query node and
w( front_matter.keyword) 5*1 5, w(body.section.para- then present how we calculate the content similarity
graph) 2*1*1 2, and w(back_matter.reference) 0*1 between an answer and a query.
0, respectively. The frequencies of the term XML in the Given a query node $u and a data node v, where the
paths front_matter.keyword, body.section.paragraph, and node v matches the structure condition related with the
back_ matter.reference are 1, 2, and 1, respectively. There- query node $u, the content similarity between the nodes v
fore, from Equation (3), the weighted term frequency for the and $u can be measured as follows:
term XML in the data node article is 5*1 2*2 0*1 9.
X
Inverse Element Frequency. Terms with different popu- cont simv;$u wmt t fw v; t ie f $u; t (5)
larity in XML data have different degrees of discrimi- t 2 $u:cont
native power. It is well known that a term frequency (tf)
needs to be adjusted by the inverse document frequency where t is a term in the content condition of the node $u,
(idf) (23). A very popular term (with a small idf) is less m(t) stands for the modifier prefixed with the term t (e.g.,
discriminative than a rare term (with a large idf). There- , , ), and w(m(t)) is the weight for the term modifier
fore, the second component in our content ranking model as specified by users.
is the concept of inverse element frequencys (ief), which
distinguishes terms with different discriminative powers For example, given the section node, $5, in the sample
in XML data. Given a query Q and a term t, let $u be the twig (Fig. 2), the data node 8 in Fig. 1 is a match for the
node in the twig Q:T whose content condition contains twig node $5. Suppose that the weight for a term
the term t (i.e., t 2 $u:cont). Let DN be the set of data nodes modifier is 2 and the weight for the title node is 5, respec-
such that each node in DN matches the structure condi- tively. The content similarity between the data node 8
tion related with the query node $u. Intuitively, the more and the twig node $5 equals to t fw(8, frequent itemset)
frequent the term t occurs in the text of the data nodes in ie f($5, frequent itemset) w()  t fw(8, algorithms) 
DN, the less discriminative power the term t has. Thus, ief($5, algorithms), which is 5  log2 2  5  log(5/2)
the inverse element frequency for the query term t can be 18.22. Similarly, the data node 2 is a match for the twig node
measured as follows: title (i.e., $2) and the content similarity between them is
t fw(2, data mining)  ie f($2, data mining) 1.
 
N1
ie f $u; t log 1 (4) Discussions. The extended vector space model has
N2
shown to be very effective in ranking content similarities
12 COXML: COOPERATIVE XML QUERY ANSWERING

of SCAS retrieval results8(14). SCAS retrieval results are operations. To remedy this condition, we propose a
usually of relatively similar sizes. For example, for the semantic-based relaxation operation cost model.
twig in Fig. 2, suppose that the node section is the target We shall first present how we model the semantics of
node (i.e., whose matches are to be returned as answers). XML nodes. Given an XML dataset D, we represent each
All the SCAS retrieval results for the twig will be sections data node vi as a vector {wi1, wi2, . . ., wiN}, where N is the
inside article bodies. Results that approximately match the total number of distinct terms in D and wij is the weight of
twig, however, could be nodes other than section nodes, the jth term in the text of vi. The weight of a term may be
such as paragraph, body, or article nodes, which are of computed using tf*idf (23) by considering each node as a
varying sizes. Thus, to apply the extended vector space document. With this representation, the similarity
model for evaluating content similarities of approximate between two nodes can be computed by the cosine of their
answers under this condition, we introduce the factor of corresponding vectors. The greater the cosine of the two
weighted sizes into the model for normalizing the biased vectors, the semantically closer the two nodes.
effects caused by the varying sizes in the approximate We now present how to model the cost of an operation
answers (24): based on the semantics of the nodes affected by the opera-
tion with regard to a twig T as follows:
X cont simv; $u
cont simA; Q  Node Relabel rel(u, l)
v 2 A; $u 2 Q:T :V; v matches $u
log2 wsizev
A node relabel operation, rel(u, l), changes the label of
(6) a node u from u.label to a new label l. The more
semantically similar the two labels are, the less the
where wsize(v) denotes the weighted size of a data node v. relabel operation will cost. The similarity between two
Given an XML data node v, wsize(v) is the sum of the labels, u.label and l, denoted as sim(u.label, l), can be
number of terms directly contained in node vs text, size- measured as the cosine of their corresponding vector
(v.text), and the weighted size of all its child nodes adjusted representations in XML data. Thus, the cost of a
by their corresponding weights, as shown in the following relabel operation is:
equation.
X costrelu; l 1  simu:lable; l (9)
wsizev sizev:text wsizevi  wvi (7)
vi s:t: vjvi For example, using the INEX 05 data, the cosine of
the vector representing section nodes and the vector
For example, the weighted size of the paragraph node representing paragraph nodes is 0.99, whereas the
equals the number of terms in its text part, because the cosine of the vector for section nodes and the vector
paragraph node does not have any child node. for figure nodes is 0.38. Thus, it is more expensive to
Our normalization approach is similar to the scoring relabel node section to paragraph than to figure.
formula proposed in Ref. 25, which uses the log of a docu-  Node Deletion del(u)
ment size to adjust the product of t f and idf. Deleting a node u from the twig approximates u to its
parent node in the twig, say v. The more semantically
Semantic-based Structure Distance similar node u is to its parent node v, the less the
The structure similarity between two twigs can be mea- deletion will cost. Let Vv=u and Vv be the two vectors
sured using tree editing distance (e.g., (26)), which is fre- representing the data nodes satisfying v/u and v,
quently used for evaluating tree-to-tree similarities. Thus, respectively. The similarity between v/u and v,
we measure the structure distance between an answer denoted as sim(v/u, v), can be measured as the cosine
A and a query Q, struct_dist(A, Q), as the editing distance of the two vectors Vv/u and Vv. Thus, a node deletion
between the twig Q T and the least relaxed twig T0 , cost is:
d(Q:T , T0 ), which is the total costs of operations that relax
Q:T to T0 : costdelu 1  simv=u; u (10)

X
k For example, using the INEX 05 data, the cosine of
struct distA; Q dQ:T ; T0 costri (8) the vector for section nodes inside body nodes and the
i1 vector for body nodes is 0.99, whereas the cosine of
the vector for keyword nodes inside article nodes
where {r1, . . ., rk} is the set of operations that relaxes Q:T and the vector for article nodes is 0.2714. Thus, delet-
to T0 and cost(ri) 0  costri  1 is equal to the cost of ing the keyword node in Fig. 3(a) costs more than
the relaxation operation ri1  i  k. deleting the section node.
Existing edit distance algorithms do not consider ope-  Edge Generalization gen(ev,u)
ration cost. Assigning equal cost to each operation is Generalizing the edge between nodes $v and $u
simple, but does not distinguish the semantics of different approximates a child node v/u to a descendant node
v//u. The closer v/u is to v//u in semantics, the less
8
In a SCAS retrieval task, structure conditions must be matched the edge generalization will cost. Let Vv/u and Vv//u
exactly whereas content conditions are to be approximately be two vectors representing the data nodes satisfying
matched.
COXML: COOPERATIVE XML QUERY ANSWERING 13

Application User
Application
... ...

Mediation
QPM QPM QPM QPM

RM ... RM RM ... RM DM
...

DSM DSM XTM XTM

Information
Wrapper Wrapper
Sources

... ... ...

Relational XML XML Unstructured KB1 KB Dictionary/


DB DB DB Data n
Directory

QPM: Query Parser Mediator Mediation Capability


DSM: Data Source Mediator
RM: Relaxation Mediator
XTM: XTAH Mediator Mediation Requirement Figure 14. A scalable and extensible
DM: Directory of Mediators cooperative XML query answering system.

v/u and v//u, respectively. The similarity between v/ the relevancy. When the structure distance is zero
u and v//u, denoted as sim(v/u, v//u), can be mea- (i.e., exact structure match), the relevancy of the answer
sured as the cosine of the two vectors Vv/u and Vv//u. to the query should be determined by their content
Thus, the cost for an edge generalization can be mea- similarity only. Thus, we combine the two factors in a
sured as: way similar to the one used in XRank (27) for combining
element rank with distance:
costgenev;u 1  simv=u; v==u (11)
simA; Q astruct distA;Q
 cost simA; Q (12)
For example, relaxing article/title in Fig. 3(a) to
article//title makes the title of an articles author where a is a constant between 0 and 1.
(i.e., /article/author/title) an approximate match.
As the similarity between an articles title and an
authors title is low, the cost of generalizing article/ A SCALABLE AND EXTENSIBLE ARCHITECTURE
title to article//title may be high.
Figure 14 illustrates a mediator architecture framework
Note that our cost model differs from Amer-Yahia et al. for a cooperative XML system. The architecture consists of
(16) in that Amer-Yahia et al. (16) applies idf to twig an application layer, a mediation layer, and an information
structures without considering node semantics, whereas source layer. The information source layer includes a set of
we applied tf*idf to nodes with regard to their correspond- heterogeneous data sources (e.g., relational databases,
ing data content. XML databases, and unstructured data), knowledge bases,
and knowledge base dictionaries or directories. The knowl-
The Overall Relevancy Ranking Model edge base dictionary (or directory) stores the characteris-
tics of all the knowledge bases, including XTAH and domain
We now discuss how to combine structure distance and knowledge in the system. Non-XML data can be converted
content similarity for evaluating the overall relevancy. into the XML format by wrappers. The mediation layer
Given a query Q, the relevancy of an answer A to the consists of data source mediators, query parser mediators,
query Q, denoted as sim(A, Q), is a function of two relaxation mediators, XTAH mediators, and directory med-
factors: the structure distance between A and Q (i.e., iators. These mediators are selectively interconnected to
struct_dist(A, Q)), and the content similarity between A meet the specific application requirements. When the
and Q, denoted as cont_sim(A, Q). We use our extended demand for certain mediators increases, additional copies
vector space model for measuring content similarity (14). of the mediators can be added to reduce the loading. The
Intuitively, the larger the structure distance, the less the mediator architecture allows incremental growth with
relevancy; the larger the content similarity, the greater application, and thus the system is scalable. Further,
14 COXML: COOPERATIVE XML QUERY ANSWERING

Relaxation Mediator

Parsed Query
Approximate
Answers
Preprocessor

Query Relaxation Query Processing Present Answers

Relaxation Satisfactory
Manager Postprocessor
XTAH Answers?
Figure 16. The flow chart of XML query relaxa-
tion processing.

different types of mediators can be interconnected and can relaxation-enabled query is presented to the relaxa-
communicate with each other via a common communica- tion mediator, the system first goes through a pre-
tion protocol (e.g., KQML (28), FIPA9) to perform a joint processing phase. During pre-processing, the system
task. Thus, the architecture is extensible. transforms the relaxation constructs into standard
For query relaxation, based on the set of frequently used XML query constructs. All relaxation control opera-
query tree structures, the XTAHs for each query tree tions specified in the query are processed and for-
structure can be generated accordingly. During the query warded to the relaxation manager and are ready for
relaxation process, the XTAH manager selects the appro- use if the query requires relaxation. The modified
priate XTAH for relaxation. If there is no XTAH available, query is then presented to the underlying databases
the system generates the corresponding XTAH on-the-fly. for execution. If no answers are returned, then the
We shall now describe the functionalities of various relaxation manager relaxes the query conditions
mediators as follows: guided by the relaxation index (XTAH). We repeat
the relaxation process until either the stop condition is
 Data Source Mediator (DSM) met or the query is no longer relaxable. Finally, the
The data source mediator provides a virtual database returned answers are forwarded to the post-proces-
interface to query different data sources that usually sing module for ranking.
have different schema. The data source mediator  XTAH Mediator (XTM)
maintains the characteristics of the underlying data The XTAH mediator provides three conceptually sepa-
sources and provides a unified description of these rate, yet interlinked functions to peer mediators:
data sources. As a result, XML data can be accessed XTAH Directory, the XTAH Management, and the
from data sources without knowing the differences of XTAH Editing facilities, as illustrated in Fig. 17.
the underlying data sources. Usually, a system contains a large number of
 Query Parser Mediator (PM) XTAHs. To allow other mediators to determine which
The query parser mediator parses the queries from the XTAHs exist within the system and their char-
application layer and transforms the queries into acteristics, the XTAH mediator contains a directory.
query representation objects. This directory is searchable by the XML query tree
 Relaxation Mediator (RM) structures.
Figure 15 illustrates the functional components of the The XTAH management facility provides client
relaxation mediator, which consists of a pre-processor, mediators with traversal functions and data extrac-
a relaxation manager, and a post-processor. The flow tion functions (for reading the information out of
of the relaxation process is depicted in Fig. 16. When a XTAH nodes). These capabilities present a common
interface so that peer mediators can traverse and
extract data from an XTAH. Further, the XTAH

Preprocessor

XTAH
Ranked Mediator Capability:
Answers Post- Relaxation
XTAH Directory Generate XTAH
processor Manager
Data Source Browse XTAH
Mediator Edit and reformat XTAH
XTAH Editor
Traverse XTAH nodes
Figure 15. The relaxation mediator.
XTAH Management Requirements:
Data sources

Figure 17. The XTAH mediator.


9
See http://www.fipa.org.
COXML: COOPERATIVE XML QUERY ANSWERING 15

mediator has an editor that allows users to edit XTAHs  Relaxation Manager. The relaxation manager per-
to suit their specific needs. The editor handles recal- forms the following services: (1) building a relaxation
culation of all information contained within XTAH structure based on the specified relaxation constructs
nodes during the editing process and supports expor- and controls; (2) obtaining the relaxed query condi-
tation and importation of entire XTAHs if a peer tions from the XTAH Manager; (3) modifying the
mediator wishes to modify it. query accordingly; and (4) retrieving the exactly
 Directory Mediator (DM) matched answers.
The directory mediator provides the locations, char-  Database Manager. The database manager interacts
acteristics, and functionalities of all the mediators in with an XML database engine and returns exactly
the system and is used by peer mediators for locating a matched answers for a standard XML query.
mediator to perform a specific function.  XTAH Manager. Based on the structure of the query
tree, the XTAH manager selects an appropriate XTAH
to guide the query relaxation process.
A COOPERATIVE XML (CoXML) QUERY ANSWERING  Post-processor. The post-processor takes unsorted
TESTBED answers as input, ranks them based on both structure
and content similarities, and outputs a ranked list of
A CoXML query answering testbed has been developed at results.
UCLA to evaluate the effectiveness of XML query relaxa-
tion through XTAH. Figure 18 illustrates the architecture
of CoXML testbed, which consists of a query parser, a
EVALUATION OF XML QUERY RELAXATION
preprocessor, a relaxation manager, a database manager,
an XTAH manager, an XTAH builder, and a post-processor.
INEX is a DELOS working group10 that aims to provide a
We describe the functionality provided by each module as
means for evaluating XML retrieval systems in the form of
follows:
a large heterogeneous XML test collection and appropriate
 XTAH Builder. Given a set of XML documents and the
scoring methods. The INEX test collection is a large set of
scientific articles, represented in XML format, from pub-
domain knowledge, the XTAH builder constructs a set
lications of the IEEE Computer Society covering a range of
of XTAHs that summarizes the structure character-
computer science topics. The collection, approximately 500
istics of the data.
megabytes, contains over 12,000 articles from 18 maga-
 Query Parser. The query parser checks the syntax of
zines/transactions from the period of 1995 to 2004, where
the query. If the syntax is correct, then it extracts an article (on average) consists of 1500 XML nodes. Differ-
information from the parsed query and creates a query ent magazines/transactions have different data organiza-
representation object. tions, although they use the same ontology for representing
 Preprocessor. The pre-processor transforms relaxa- similar content.
tion constructs (if any) in the query into the standard There are three types of queries in the INEX query sets:
XML query constructs. content-only (CO), strict content and structure (SCAS), and
vague content and structure (VCAS). CO queries are tradi-
tional information retrieval (IR) queries that are written in
e Relaxation- natural language and constrain the content of the desired
enabled query Query results. Content and structure queries not only restrict
Parser content of interest but also contain either explicit or impli-
cit references to the XML structure. The difference between
Ranked
Pre- a SCAS and a VCAS query is that the structure conditions
Approximate processor in a SCAS query must be interpreted exactly whereas the
Answers
structure conditions in a VCAS query may be interpreted
Post- Relaxation loosely.
Processor Manager To evaluate the relaxation quality of the CoXML system,
we perform the VCAS retrieval runs on the CoXML testbed
Database XTAH and compare the results against the INEXs relevance
Manager Manager assessments for the VCAS task, which can be viewed as
the gold standard. The evaluaion studies reveal the
XTAH expressiveness of the relaxation language and the effec-
Builder tiveness of using XTAH in providing user-desired relaxa-
XTAH tion control. The evaluation results demonstrate that our
content similarity model has significantly high precision at
XML DB11 .
XML DBnn
Domain low recall regions. The model achieves the highest average
Knowledge
precision as compared with all the 38 official submissions in

Figure 18. The architecture of the CoXML testbed.


10
See http://www.iei.pi.cnr.it/DELOS
16 COXML: COOPERATIVE XML QUERY ANSWERING

INEX 03 (14). Furthermore, the evaluation results also 4. S. Chaudhuri and L. Gravano, Evaluating Top-k Selection
demonstrate that using the semantic-based distance func- Queries. In Proceedings of 25th International Conference on
tion yields results with greater relevancy than using the Very Large Data Bases, September 710, 1999, Edinburgh,
Scotland, UK.
uniform-cost distance function. Comparing with other sys-
tems in INEX 05, our user-centeric relaxation approach 5. T. Gaasterland, Cooperative answering through controlled
retrieves approximate answers with greater relevancy (29). query relaxation, IEEE Expert, 12 (5): 4859, 1997.
6. W.W. Chu, Cooperative Information Systems, in B. Wah (ed.),
The Encyclopedia of Computer Science and Engineering,
SUMMARY New York: Wiley, 2007.
7. Y. Kanza, W. Nutt, and Y. Sagiv, Queries with Incomplete
Approximate matching of query conditions plays an impor- Answers Over Semistructured Data. In Proceedings of the
tant role in XML query answering. There are two Eighteenth ACM SIGACT-SIGMOD-SIGART Symposium on
approaches to XML query relaxation: either through Principles of Database Systems, May 31 June 2, 1999,
schema conversion or directly through the XML model. Philadelphia, Pennsylvania.
Converting the XML model to the relational model by 8. Y. Kanza and Y. Sagiv, In Proceedings of the Twentieth ACM
schema conversion can leverage on the mature relational SIGACT-SIGMOD-SIGART Symposium on Principles of
model techniques, but information may be lost during such Database Systems, May 2123, 2001, Santa Barbara,
California.
conversions. Furthermore, this approach does not support
XML structure relaxation. Relaxation via the XML model 9. T. Schlieder, In Proceedings of 10th International Conference
on Extending Database Technology, March 2631, 2006,
approach remedies these shortcomings. In this article, a
Munich, Germany.
new paradigm for XML approximate query answering is
10. S. Amer-Yahia, S. Cho, and D. Srivastava, XML Tree Pattern
proposed that places users and their demands at the center
Relaxation. In Proceedings of 10th International Conference on
of the design approach. Based on this paradigm, we develop
Extending Database Technology, March 2631, 2006, Munich,
an XML system that cooperates with users to provide user- Germany.
specific approximate query answering. More specifically, a
11. D. Lee, M. Mani, and W. W Chu, Schema Conversions
relaxation language is introduced that allows users to Methods between XML and Relational Models, Knowledge
specify approximate conditions and relaxation control Transformation for the Semantic Web. Frontiers in Artificial
requirements in a posed query. We also develop a relaxation Intelligence and Applications Vol. 95, IOS Press, 2003,
index structure, XTAH, that clusters relaxed twigs into pp. 117.
multilevel groups based on relaxation types and their 12. J. Shanmugasundaram, K. Tufte, G. He, C. Zhang, D. DeWitt
interdistances. XTAH enables the system to provide user- and J. Naughton. Relational Databases for Querying XML
desired relaxation control as specified in the query. Documents: Limitations and Opportunities. In Proceedings of
Furthermore, a ranking model is introduced that combines 25th International Conference on Very Large Data Bases,
both content and structure similarities in evaluating the September 710, 1999, Edinburgh, Scotland, UK.
overall relevancy of approximate answers returned from 13. D. Lee and W.W Chu, CPI: Constraints-preserving Inlining
query relaxation. Finally, a mediatorbased CoXML archi- algorithm for mapping XML DTD to relational schema, J. Data
tecture is presented. The evaluation results using the INEX and Knowledge Engineering, Special Issue on Conceptual
Modeling, 39 (1): 325, 2001.
test collection reveal the effectiveness of our proposed user-
centric XML relaxation methodology for providing user- 14. S. Liu, Q. Zou, and W. Chu, Configurable Indexing and Rank-
ing for XML Information Retrieval. In Proceedings of the 27th
specific relaxation.
Annual International ACM SIGIR Conference on Research and
Development in Information Retrieval, July 2529, 2004,
ACKNOWLEDGMENTS Sheffield, UK.
15. N. Fuhr and K. Grobjohann, XIRQL: A Query Language for
The research and development of CoXML has been a team Information Retrieval in XML Documents. In Proceedings of
effort. We would like to acknowledge our CoXML members, the 24th Annual International ACM SIGIR Conference on
Research and Development in Information Retrieval,
Tony Lee, Eric Sung, Anna Putnam, Christian Cardenas,
September 913, 2001, New Orleans Louisiana.
Joseph Chen, and Ruzan Shahinian, for their contributions
in implementation, testing, and performance evaluation. 16. S. Amer-Yahia, N. Koudas, A. Marian, D. Srivastava, and
D. Toman, Structure and Content Scoring for XML. In Proceed-
ings of the 31st International Conference on Very Large Data
BIBLIOGRAPHY Bases, August 30 September 2, 2005, Trondheim, Norway.
17. S. Amer-Yahia, C. Botev, and J. Shanmugasundaram, TeXQu-
1. S. Boag, D. Chamberlin, M. F Fernandez, D. Florescu, J. ery: A Full-Text Search Extension to XQuery. In Proceedings of
Robie, and J. S. (eds.), XQuery 1.0: An XML Query Language. 13th International World Wide Web Conference. May 1722,
Available http://www.w3.org/TR/xquery/. 2004, New York.
2. W. W Chu ,Q. Chen, and A. Huang, Query Answering via 18. A. Trotman and B. Sigurbjornsson, Narrowed Extended XPath
Cooperative Data Inference. J. Intelligent Information Sys- I NEXI. In Proceedings of the 3rd Initiative of the Evaluation of
tems (JIIS), 3 (1): 5787, 1994. XML Retrieval (INEX 2004) Workshop, December 68, 2004,
3. W. Chu, H. Yang, K. Chiang, M. Minock, G. Chow, and C. Schloss Dagstuhl, Germany,
Larson, CoBase: A scalable and extensible cooperative infor- 19. A. Theobald and G. Weikum, Adding Relevance to XML. In
mation system. J. Intell. Inform. Syst., 6 (11), 1996. Proceedings of the 3rd International Workshop on the Web and
COXML: COOPERATIVE XML QUERY ANSWERING 17

Databases, WebDB 2000, Adams, May 1819, 2000, Dallas, 27. L. Guo, F. Shao, C. Botev, and J. Shanmugasundaram,
Texas. XRANK: Ranked Keyword Search Over XML Document. In
20. A. Marian, S. Amer-Yahia, N. Koudas, and D. Srivastava, Proceedings of the 2003 ACM SIGMOD International Confer-
Adaptive Processing of Top-k Queries in XML. In Proceedings ence on Management of Data, June 912, 2003, San Diego,
of the 21st International Conference on Data Engineering, ICDE California.
2005, April 58, 2005, Tokyo, Japan. 28. T. Finin, D. McKay, R. Fritzson, and R. McEntire, KQML: An
21. I. Manolescu, D. Florescu, and D. Kossmann, Answering information and knowledge exchange protocol, in K. Fuchi and
XML Queries on Heterogeneous Data Sources. In Proceedings T. Yokoi, (eds), Knowledge Building and Knowledge Sharing,
of 27th International Conference on Very Large Data Bases, Ohmsha and IOS Press, 1994.
September 1114, 2001, Rome, Italy. 29. S. Liu and W. W Chu, CoXML: A Cooperative XML Query
22. P. Ciaccia, M. Patella, and P. Zezula, M-tree: An Efficient Answering System. Technical Report # 060014, Computer
Access Method for Similarity Search in Metric Spaces. In Science Department, UCLA, 2006.
Proceedings of 23rd International Conference on Very Large 30. T. Schlieder and H. Meuss, Querying and ranking XML
Data Bases, August 2529, 1997, Athens, Greece. documents, J. Amer. So. Inf. Sci. Technol., 53 (6):489.
23. G. Salton and M. J McGill, Introduction to Modern Information 31. J. Shanmugasundaram, K. Tufte, G. He, C. Zhang, D. DeWitt,
Retrieval, New York: McGraw-Hill, 1983. and J. Naughton, Relational Databases for Querying
24. S. Liu, W. Chu, and R. Shahinian, Vague Content and Struc- XML Documents: Limitations and Opportunities. In VLDB,
ture Retrieval(VCAS) for Document-Centric XML Retrieval. 1999.
Proceedings of the 8th International Workshop on the Web and
Databases (WebDB 2005), June 1617, 2005, Baltimore,
Maryland. WESLEY W. CHU
25. W. B Frakes and R. Baeza-Yates, Information Retreival: Data SHAORONG LIU
Structures and Algorithms, Englewood Cliffs, N.J.: Prentice University of California,
Hall, 1992. Los Angeles
Los Angeles, California
26. K. Zhang and D. Shasha, Simple fast algorithms for the editing
distance between trees and related problems, SIAM J. Com-
put., 18 (6):1245 1262, 1989.
D
DATA ANALYSIS Data analysis is generally performed in the following
stages:
What is data analysis? Nolan (1) gives a definition, which is
a way of making sense of the patterns that are in, or can be 1. Feature selection.
imposed on, sets of figures. In concrete terms, data analysis 2. Data classification or clustering.
consists of an observation and an investigation of the given 3. Conclusion evaluation.
data, and the derivation of characteristics from the data.
Such characteristics, or features as they are sometimes The first stage consists of the selection of the features in
called, contribute to the insight of the nature of data. the data according to some criteria. For instance, features
Mathematically, the features can be regarded as some of people may include their height, skin color, and finger-
variables, and the data are modeled as a realization of prints. Considering the effectiveness of human recognition,
these variables with some appropriate sets of values. In the fingerprint, which is the least ambiguous, may get the
traditional data analysis (2), the values of the variables are highest priority in the feature selection. In the second
usually numerical and may be transformed into symbolic stage, the data are classified according to the selected
representation. There are two general types of variables, features. If the data consist of at least two features, e.g.,
discrete and continuous. Discrete variables vary in units, the height and the weight of people, which can be plotted in
such as the number of words in a document or the popula- a suitable coordinate system, we can inspect so-called
tion in a region. In contrast, continuous variables can vary scatter plots and detect clusters or contours for data group-
in less than a unit to a certain degree. The stock price and ing. Furthermore, we can investigate ways to express data
the height of people are examples of this type. The suitable similarity. In the final stage, the conclusions drawn from
method for collecting values of discrete variables is count- the data would be compared with the actual demands. A set
ing, and for continuous ones, it is measurement. of mathematical models has been developed for this eva-
The task of data analysis is required among various luation. In the following, we first divide the methods of data
application fields, such as agriculture, biology, economics, analysis into two categories according to different initial
government, industry, medicine, military, psychology, and conditions and resultant uses. Then, we introduce two
science. The source data provided for different purposes famous models for data analysis. Each method will be
may be in various forms, such as text, image, or waveform. discussed first, followed by examples. Because the feature
There are several basic types of purposes for data analysis: selection depends on the actual representations of data, we
postpone the discussion about this stage until the next
1. Obtain the implicit structure of data. section. In this section, we focus on the classification/clus-
2. Derive the classification or clustering of data. tering procedure based on the given features.
3. Search particular objects in data.
A Categorization of Data Analysis Methods
For example, the stockbroker would like to get the future
There are a variety of ways to categorize the methods of
trend of the stock price, the biologist needs to divide the
data analysis. According to the initial conditions and the
animals into taxonomies, and the physician tries to find
resultant uses, there can be two categories, supervised
the related symptoms of a given disease. The techniques
data analysis and unsupervised data analysis. The term
to accomplish these purposes are generally drawn from
supervised means that the human knowledge has to be
statistics that provide well-defined mathematical models
provided for the process. In supervised data analysis, we
and probability laws. In addition, some theories, such as
specify a set of classes called a classification template and
fuzzy-set theory, are also useful for data analysis in parti-
select some samples from the data for each class. These
cular applications. This article is an attempt to give a brief
samples are then labeled by the names of the associated
introduction of these techniques and concepts of data ana-
classes. Based on this initial condition, we can automati-
lysis. In the following section, a variety of fundamental data
cally classify the other data termed as to-be-classified
analysis methods are introduced and illustrated by exam-
data. In unsupervised data analysis, there is no classifica-
ples. In the second section, the methods for data analysis on
tion template, and the resultant classes depend on
two types of Internet data are presented. Advanced meth-
the samples. The following are descriptions of supervised
ods for Internet data analysis are discussed in the third
and unsupervised data analysis with an emphasis on
section. At last, we give a summary of this article and
their differences.
highlight the research trends.
Supervised Data Analysis. The classification template
FUNDAMENTAL DATA ANALYSIS METHODS and the well-chosen samples are given as an initial state
and contribute to the high accuracy of data classification.
In data analysis, the goals are to find significant patterns in Consider the K nearest-neighbor (K NNs) classifier, which
the data and apply this knowledge to some applications. is a typical example of supervised data analysis. The input

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DATA ANALYSIS

to the classifier includes a set of labeled samples S, a each class:


constant value K, and a to-be-classified datum X.
The output after the classification is a label denoting a CRich fY1 ; Y4 ; Y8 g; CFair fY2; Y5 ; Y6 ; Y10 g;
class to which X belongs. The classification procedure is CPoor fY3 ; Y7 ; Y9 g
as follows:
If there is a to-be-classified datum X with age 26 and salary
1. Find the K NNs of X from S.
$35,000 (35k), we apply the classification procedure to
2. Choose the dominant classes by K NNs. classify it. Here we let the value of K be 4 and use the
3. If only one dominant class exists, label X by this Euclidean distance as the similarity measure:
class; otherwise, label X by any dominant class.
4. Add X to S and the process terminates. 1. The set of 4 NNs is fY4 ; Y5 ; Y6 ; Y9 g.
2. The dominant class is the class CFair because Y6,
The first step selects K samples from S such that the values Y5 2 CFair ; Y4 2 CRich ; and Y9 2 CPoor .
of the selected features (also called patterns) of these K 3. Label X by CFair.
samples are closest to those of X. Such a similarity may 4. New S contains an updated class CFair fY2 ; Y5 ; Y6 ;
be expressed in a variety of ways. The measurement of Y10 ; Xg.
distances among the patterns is one of the suitable instru-
ments, for example, the Euclidean distance as shown in We can also give an assumed rule to decide the corres-
Equation (1). Suppose the K samples belong to a set of ponding label for the age of X as shown in Table 1.
classes; the second step is to find the set of dominant classes Obviously, the conclusion drawn from the above classi-
C. A dominant class is a class that contains the majority of fication coincides with such an assumption from human
the K samples. If there is only one element in C, say class Ci, knowledge.
we assign X to Ci. On the other hand, if C contains more
than one element, X is assigned to an arbitrary class in C. Unsupervised Data Analysis. Under some circumstances,
After deciding the class of X, we label it and add it into the data analysis consists of a partition of the whole data set
set S. into many subsets. Moreover, the data within each subset
have to be similar to a high degree, whereas the data
v between different subsets have to be similar to a very
uX
um low degree. Such subsets are called clusters, and the way
dX; Y t Xk  Yk 2 1
k1
to find a good partition is sometimes also called cluster
analysis. A variety of methods have been developed to
handle this problem. A common characteristic among
where each datum is represented by m features. them is the iterative nature of the algorithms.
The c-mean clustering algorithm is representative in
Example. Suppose there is a dataset about the salaries this field. The input contains the sample set S and a given
and ages of people. Table 1 gives such a set of samples S and value c, which denotes the number of clusters in the final
the corresponding labels. There are three labels that denote partition. Notice that no labels are assigned to the samples
three classes: Rich, Fair, and Poor. These classes are in S in advance. Before clustering, we must give an initial
determined based on the assumption that the Richness partition W0 with c clusters. The algorithm terminates
depends on the values of the salary and age. In Table 1, when it converges to a stable situation in which the current
we also append the rules of assigning labels for each age partition remains the same as the previous one. Different
value. From the above, we can get the set membership of initial partitions can lead to different final results. One way
to get the best partition is to apply this algorithm with all
different W0s. To simplify the illustration, we only consider
a given W0 and a fixed c. The clustering procedure is as
follows.
Table 1. A Set of Samples with the Salary and Age Data
1. Let W be W0 on S.
Sample Age Salary Label Assumed Rules to Assign Labels
2. Compute the mean of each cluster in W.
Y1 20 25k Rich Rich, >20k; Poor, <10k
Y2 22 15k Fair Rich, >26k; Poor, <13k 3. Evaluate the nearest mean of each sample and move a
Y3 24 15k Poor Rich, >35k; Poor, <16k sample if its current cluster is not the one correspond-
Y4 24 40k Rich ing to its nearest mean.
Y5 28 25k Fair Rich, >44k; Poor, <22k 4. If any movement occurs, go to step 2; otherwise, the
Y6 30 40k Fair Rich, > 50k; Poor, <25k process terminates.
Y7 30 20k Poor
Y8 32 60k Rich Rich, >56k; Poor, <28k
The first step sets the current partition W to be W0. Then
Y9 36 30k Poor Rich, >68k; Poor, <34k
we compute a set of means M in W. In general, a mean is
Y10 40 70k Fair Rich, >80k; Poor, <40k a virtual sample representing the whole cluster. It is
X 26 35k Fair Rich, >38k; Poor, <19k straightforward to use averaging as the way to find M.
DATA ANALYSIS 3

Next, we measure the similarity between each sample in S b. There is no sample movement; the process termi-
and every mean in M. Suppose a sample Yj belongs to a nates.
cluster Ci in the previous partition W, whereas another
cluster Ck has a mean nearest to Yj. Then we move Yj from After three iterations, we have a stable partition and con-
Ci to Ck. Finally, if such a sample movement exists, the clude with a discriminant rule that all samples with sal-
partition W would become a new one and requires more aries lower than 30k belong to C1, the other samples with
iteration. On the other hand, if no such movement occurs salaries lower than 60k belong to C2 and the remainder
during iteration, the partition would become stable and the belongs to C3. The total number of iterations depends on
final clustering is produced. the initial partition, the number of clusters, the given
features, and the similarity measure.
Example. Consider the data in Table 1 again. Suppose
there is no label on each sample and only the salary and the Methods for Data Analysis
age data are used as the features for analysis. For clarity,
we use a pair of values on the two features to represent a In the following, we introduce two famous methods for
sample; for instance, the pair (20, 25k) refers to the sample data analysis. One is Bayesian data analysis based on
Y1. Suppose there is an initial partition containing two probability theory, and the other is fuzzy data analysis
based on fuzzy-set theory.
clusters C1 and C2. Let the means of these clusters be M1
and M2, respectively. The following shows the iterations for
the clustering: Bayesian Data Analysis. Bayesian inference, as defined
in Ref. 3, is the process of fitting a probability model to a set
1. For the initial partition W : C1 fY1 ; Y2 ; Y3 ; Y4 ; Y5 g; of samples, which results in a probability distribution to
C2 fY6 ; Y7 ; Y8 ; Y9 ; Y10 g. make predictions for to-be-classified data. In this environ-
ment, a set of samples is given in advance and labeled by
a. The first iteration: M1 23:6; 26k; M2 33:6;
their associated classes. Observing the patterns contained
44k.
in these samples, we can obtain not only the distributions
b. Move Y4 from C1 to C2, move Y7 and Y9 from C2 of samples for the classes but also the distributions of
to C1. samples for the patterns. Therefore, we can compute a
2. For the new partition W : C1 fY1 ; Y2 ; Y3 ; Y5 ; Y7 ; distribution of classes for these patterns and use this dis-
Y9 g; C2 fY4 ; Y6 ; Y8 ; Y10 g. tribution to predict the classes of the to-be-classified data
a. The second iteration: M1 26:6; 21:6k; M2 based on their patterns. A typical process of Bayesian data
31:5; 52:5k. analysis contains the following stages:
b. There is no sample movement; the process termi-
nates. 1. Compute the distributions from the set of labeled
samples.
We can easily find a simple discriminant rule behind this 2. Derive the distribution of classes for the patterns.
final partition. All the samples with salaries lower than 40k 3. Evaluate the effectiveness of these distributions.
belong to C1, and the others belong to C2. Hence we may
conclude with a discriminant rule that divides S into two Suppose a sample containing the pattern a on some fea-
clusters by checking the salary data. If we use another initial tures is labeled class Ci. First, we compute a set of prob-
partition, say W, where C1 is fY1 ; Y3 ; Y5 ; Y7 ; Y9 g and C2 is abilities P(Ci) that denotes a distribution of samples for
fY2 ; Y4 ; Y6 ; Y8 ; Y10 g, the conclusion is the same. The follow- different classes and let each PajCi denote the condi-
ing process yields another partition with three clusters. tional probability of a sample containing the pattern
a, given that the sample belongs to the class Ci. In the
1. For the initial partition W : C1 fY1 ; Y4 ; Y7 g; C2 second stage, the conditional probability of a sample
fY2 ; Y5 ; Y8 g; C3 fY3 ; Y6 ; Y9 ; Y10 g. belonging to the class Ci, given that the sample contains
a. The first iteration: M1 24:6; 28:3k; M2 the pattern a, can be formulated as follows:
27:3; 33:3k; M3 32:5; 38:7k.
b. Move Y4 from C1 to C2, move Y2 and Y5 from C2 to PajCi  PCi
PCi ja ; where
C1, move Y8 from C2 to C3, move Y3 from C3 to C1, Pa
X
move Y9 from C3 to C2. Pa PajC j  PC j 2
2. For the new partition W : C1 fY1 ; Y2 ; Y3 ; Y5 ; Y7 g; j
C2 fY4 ; Y9 g; C3 fY6 ; Y8 ; Y10 g.
From Equation (2), we can derive the probabilities of a
a. The second iteration: 2 M1 (24.8, 20k), M2 (30,
sample belonging to classes according to the patterns con-
35k), M3 (34, 56.6k).
tained in the sample. Finally, we can find a way to determine
b. Move Y6 from C3 to C2. the class by using these probabilities. The following is a
3. For the new partition W : C1 fY1 ; Y2 ; Y3 ; Y5 ; Y7 g; simple illustration of data analysis based on this technique.
C2 fY4 ; Y6 ; Y9 g; C3 fY8 ; Y10 g.
a. The third iteration: M1 24:8; 20k; M2 Example. Consider the data in Table 1. We first gather
30; 36:6k; M3 36; 65k. the statistics and transform the continuous values into
discrete ones as in Table 2. Here we have two discrete
4 DATA ANALYSIS

Table 2. A Summary of Probability Distribution for the common notion of set membership. Take cluster analysis
Data in Table 1 as an example. Each datum belongs to exactly one cluster
Expressions of New after the classification procedure. Often, however, the data
Sample Rich Fair Poor Condensed Features cannot be assigned exactly to one cluster in the real world,
such as the jobs of a busy person, the interests of a
Young 2 2 1 Age is lower than 30
researcher, or the conditions of the weather. In the following,
Old 1 2 2 The others we replace the previous example for supervised data ana-
Low 1 2 3 Salary is lower than 36k lysis with the fuzzy-set notion to show its characteristic.
Median 1 1 0 The others Consider a universe of data U and a subset A of U.
High 1 1 0 Salary is higher than 50k Set theory allows us to express the membership of A on
U by the characteristic function FA X : U ! f0; 1g.

1; X 2 A
levels, young and old, representing the age data, and three FA X 4
0; X 2
=A
levels, low, median, and high, referring to the salary data.
We collect all the probabilities and derive the ones for From the above, it can be clearly determined whether X is
prediction based on Equation (2): an element of A. However, many real-world phenomena
make such a unique decision impossible. In this case,
P(young, low|CRich) 1/3, P(young, low|CFair) 1/2, expressing in a degree of membership is more suitable. A
P(young, low|CPoor) 1/3, fuzzy set A on U can be represented by the set of pairs that
P(young, median|CRich) 1/3, P(young, median| describe the membership function MFA X : U ! 0; 1 as
CFair) 0, P(young, median|CPoor) 0, . . . defined in Ref. 5.
P(young, low) 4/10, P(young, median) 1/10,
P(young, high) 0, . . . A fX; MFA XjX 2 U; MFA X 2 0; 1g 5
P(CRich) 3/10, P(CFair) 2/5, P(CPoor) 3/10
P(CRich|young, low) 1/4, P(CFair|young, low) 1/2, Example. Table 3 contains a fuzzy-set representation of
P(CPoor|young, low) 1/4, the dataset in Table 1. The membership function of each
sample is expressed in a form of possibility that stands for
P(CRich|young, median) 1, P(CFair|young, median) 0, the degree of the acceptance that a sample belongs to a
P(CPoor|young, median) 0, . . . class. Under the case of supervised data analysis, the to-be-
classified datum X needs to be labeled using an appropriate
Because there are two features representing the data, we classification procedure. The distance between each sample
compute the joint probabilities instead of individual prob- and X is calculated using the two features and Euclidean
abilities. Here we assume that the two features have the distance:
same degree of significance. At this point, we have con-
structed a model to express the data with their two features. 1. Find the K NNs of X from S.
The derived probabilities can be regarded as a set of rules to
2. Compute the membership function of X for each class.
decide the classes of to-be-classified data.
If there is a to-be-classified datum X whose age is 26 and 3. Label X by the class with a maximal membership.
salary is 35k, we apply the derived rules to label X. We 4. Add X to S and stop the process.
transform the pattern of X to indicate that the age is young
and the salary is low. To find the suitable rules, we can The first stage in finding K samples with minimal dis-
define a penalty function lCi jC j , which denotes the tances is the same, so we have the same set of 4 NNs
payment when a datum belonging to Cj is classified into
Ci. Let the value of this function be 1 if Cj is not equal to
Table 3. Fuzzy-Set Membership Functions for the Data
Ci and 0 if two classes are the same. Furthermore, we can
in Table 1
define a distance measure iX; Ci as in Equation (3), which
represents the total amount of payments when we classify Estimated Distance
X into Ci. We conclude that the lower the value of i(X, Ci), Between Each
the higher the probability that X belongs to Ci. In this Sample Rich Fair Poor Sample and X
example, we label X by CFair because i(X, CFair) is the lowest. Y1 0.5 0.2 0.3 11.66
Y2 0.1 0.5 0.4 20.39
X
iX; Ci lCi jC j  PC j jX Y3 0 0.2 0.8 20.09
j Y4 0.6 0.3 0.1 5.38
; iX; CRich 3=4; iX; CFair 1=2; iX; CPoor 3=4 Y5 0.2 0.5 0.3 10.19
Y6 0.2 0.5 0.2 6.4
3 Y7 0 0 1 15.52
Y8 0.9 0.1 0 25.7
Fuzzy Data Analysis. Fuzzy-set theory, established by Y9 0 0.3 0.7 11.18
Zadeh (4) allows a gradual membership MFA(X) for any Y10 0.4 0.6 0 37.69
datum X on a specified set A. Such an approach more
X 0.2 0.42 0.38
adequately models the data uncertainty than using the
DATA ANALYSIS 5

fY4 ; Y5 ; Y6 ; Y9 g when the value of K 4. Let dX; Y j denote precise view of the data. Furthermore, the various forms of
the distance between X and the sample Yj. In the next expressing the same data also reveal the status of the
stage, we calculate the membership function MFCi X of X chaos on the WWW. As a whole, Internet data analysis
for each class Ci as follows: should be able to handle the large amount of data and to
X control the uncertainty factors in a practical way. In this
MFCi Y j  dX; Y j section, we first introduce the method for data analysis on
j web pages and then describe the method for data analysis
MFCi X X ; 8 Y j 2 K NNs of X 6
dX; Y j on web logs.
j
Web Page Analysis
MFCrich X
0:6  5:38 0:2  10:19 0:2  6:4 0  11:18 Many tools for Internet resource discovery (10) use the
 0:2 results of data analysis on the WWW to help users find
5:38 10:19 6:4 11:18
the correct positions of the desired resources. However,
MFCfair X
many of these tools essentially keep a keyword-based
0:3  5:38 0:5  10:19 0:6  6:4 0:3  11:18 index of the available web pages. Owing to the imprecise
 0:42
5:38 10:19 6:4 11:18 relationship between the semantics of keywords and
MFCpoor X the web pages (11), this approach clearly does not fit the
user requests well. From the experiments in Ref. 12, the
0:1  5:38 0:3  10:19 0:2  6:4 0:7  11:18
 0:38 text-based classifier that is 87% accurate for Reuters
5:38 10:19 6:4 11:18 (news documents) yields only 32% precision for Yahoo
(web pages). Therefore, a new method for data analysis
Because the membership of X for class CFair is higher
on web pages is required. Our approach is to use the
than all others, we label X by CFair. The resultant
anchor information in each web page, which contains
membership directly gives a confidence measure of this
much stronger semantics for connecting the user interests
classification.
and those truly relevant web pages.
A typical data analysis procedure consists of the
INTERNET DATA ANALYSIS METHODS following stages:

The dramatic growth of information systems over the past 1. Observe the data.
years has brought about the rapid accumulation of data 2. Collect the samples.
and an increasing need for information sharing. The 3. Select the features.
World Wide Web (WWW) combines the technologies of
4. Classify the data.
the uniform resource locator (URL) and hypertext to
organize the resources in the Internet into a distributed 5. Evaluate the results.
hypertext system (6). As more and more users and servers
register on the WWW, data analysis on its rich content is In the first stage, we observe the data and conclude with
expected to produce useful results for various applica- a set of features that may be effective for classifying
tions. Many research communities such as network man- the data. Next, we collect a set of samples based on a given
agement (7), information retrieval (8), and database scope. In the third stage, we estimate the fitness of each
management (9) have been working in this field. feature for the collected samples to determine a set of effec-
The goal of Internet data analysis is to derive a classi- tive features. Then, we classify the to-be-classified data
fication or clustering of Internet data, which can provide a according to the similarity measure on the selected
valuable guide for the WWW users. Here the Internet data features. At last, we evaluate the classified results and
can be two kinds of materials, web page and web log. Each find a way for the further improvement. In the following,
site within the WWW environment contains one or more we first give some results of the study on the nature of web
web pages. Under this environment, any WWW user can pages. Then we show the feature selection stage and a
make a request to any site for any web page in it, and the procedure to classify the web pages.
request is then recorded in its log. Moreover, the user can
also roam through different sites by means of the anchors Data Observation. In the following, we provide two
provided in each web page. Such an approach leads to the directions for observing the web pages.
essential difficulties for data analysis:
Semantic Analysis. We may consider the semantics of a
1. Huge amount of data. web page as potential features. Keywords contained in a
2. Frequent changes. web page can be analyzed to determine the semantics such
as which fields it belongs to or what concepts it provides.
3. Heterogeneous presentations.
There are many ongoing efforts on developing techniques to
derive the semantics of a web page. The research results of
Basically the Internet data originate from all over the
information retrieval (13,14) can also be applied for this
world; the amount of data is huge. As any WWW user
purpose.
can create, delete, and update the data, and change the
locations of the data at any time, it is difficult to get a
6 DATA ANALYSIS

Observing the data formats of web pages, we can find Supervised sampling means that the sampling process is
several parts expressing the semantics of the web pages to based on the human knowledge specifying the scope of the
some extent. For example, the title of a web page usually samples. In supervised data analysis, a classification tem-
refers to a general concept of the web page. An anchor, plate that consists of a set of classes exists. The sampling
which is constructed by the web page designer, provides a scope can be set based on the template. The sampling is
URL of another web page and makes a connection between more effective when all classes in the template contain at
the two web pages. As far as the web page designer is least one sample. On the other hand, we consider unsu-
concerned, the anchor texts must sufficiently express the pervised sampling if there is not enough knowledge about
semantics of the whole web page to which the anchor points. the scope, as in the case of unsupervised data analysis. The
As to the viewpoint of a WWW user, the motivation to follow most trivial way to get samples is to choose any subset of
an anchor is based on the fact that this anchor expresses web pages. However, this arbitrary sampling may not fit
desired semantics for the user. Therefore, we can make a the requirement of random sampling well. We recommend
proper connection between the users interests and those the use of search engines that provide different kinds of web
truly relevant web pages. We can group the anchor texts to pages in the form of a directory.
generate a corresponding classification of the web pages
pointed to by these anchor texts. Through this classifica- Feature Selection. In addition to collecting enough sam-
tion, we can relieve the WWW users of the difficulties on ples, we have to select suitable features for the subsequent
Internet resource discovery through a query facility. classification. No matter how good the classification scheme
is, the accuracy of the results would not be satisfactory
Syntactic Analysis. Because the data formats of web without effective features. A measure for the effectiveness
pages follow the standards provided on the WWW, for of a feature is to estimate the degree of class separability. A
example, hypertext markup language (HTML), we can better feature implies higher class separability. This mea-
find potential features among the web pages. Consider sure can be formulated as a criterion to select effective
the features shown in Table 4. The white pages, which features.
mean the web pages with a list of URLs, can be distin-
guished from the ordinary web pages by a large number of Example. Consider the samples shown in Table 5.
anchors and the short distances between two adjacent From Table 4, there are two potential features for white
anchors within a web page. Note that here the distance pages, the number of anchors (F0) and the average dis-
between two anchors means the number of characters tance between two adjacent anchors (F1). We assume that
between them. For the publication, the set of headings F0  30 and F1  3 when the sample is a white
has to contain some specified keywords, such page. However, a sample may actually belong to the class
as bibliography or reference. The average distance of white pages although it does not satisfy the assumed
between two adjacent anchors has to be lower than a given conditions. For example, Y6 is a white page although its F0
threshold, and the placement of anchors has to center to the < 30. Therefore, we need to find a way to select effective
bottom of the web page. features.
According to these features, some conclusions may From the labels, the set membership of the two classes is
be drawn in the form of classification rules. For instance, as follows, where the class C1 refers to the class of white
the web page is designed for publication if it satisfies the pages:
requirements of the corresponding features. Obviously, this
approach is effective only when the degree of support for C0 fY1 ; Y2 ; Y3 ; Y4 ; Y5 g; C1 fY6 ; Y7 ; Y8 ; Y9 ; Y10 g
such rules is high enough. Selection of effective features is a
way to improve the precision of syntactic analysis. We can begin to formulate the class separability. In
the following formula, we assume that the number of
Sample Collection. It is impossible to collect all web classes is c, the number of samples within class Cj is nj,
pages and thus, choosing a set of representative samples
becomes a very important task. On the Internet, we have
two approaches to gather these samples, as follows: Table 5. A Set of Samples with Two Features
Sample F0 F1 White Page
1. Supervised sampling.
2. Unsupervised sampling. Y1 8 5 No
Y2 15 3.5 No
Y3 25 2.5 No
Y4 35 4 No
Table 4. Potential Features for Some Kinds of Home Pages Y5 50 10 No
Type of Web Page Potential Feature Y6 20 2 Yes
Y7 25 1 Yes
White page Number of anchors, average distance Y8 40 2 Yes
between two adjacent anchors Y9 50 2 Yes
Publication Headings, average distance between two Y10 80 8 Yes
adjacent anchors, anchor position
Note: F0 denotes the number of anchors.
Person Title, URL directory
F1 denotes the average distance for two adjacent anchors.
Resource Title, URL filename The labels are determined by human knowledge.
DATA ANALYSIS 7

and Yki denotes the kth sample in the class Ci. First, we by the anchor implies the semantics of the web page to
define interclass separability Db, which represents the which the anchor points, and describes the desired web
ability of a feature to distinguish the data between two pages for the users. Therefore, grouping the semantics of
classes. Next, we define the intraclass separability Dw, the anchors is equivalent to classifying the web pages into
which expresses the power of a feature to separate the different classes. The classification procedure consists of
data within the same class. The two measures are for- the following stages:
mulated in Equations (7) and (8) based on the Euclidean
distance defined in Equation (1). As a feature with larger 1. Label all sample pages.
Db and smaller Dw can get a better class separability, we 2. For each labeled page, group the texts of the anchors
define a simple criterion function DFj [Equation (9)] as a pointing to it.
composition of Db and Dw to evaluate the effectiveness of a 3. Record the texts of the anchors pointing to the to-be-
feature Fj. Based on this criterion function, we get DF0 classified page.
1:98 and DF1 8:78. Therefore, F1 is more effective than
4. Classify the to-be-classified page based on the anchor
F0 because of its higher class separability.
information.
ni X n 5. Refine the classification process.
1X c X 1 X j

Db Pi Pj dYki ; Ymj ; where


2 i1 j 6 i ni  n j kl ml In the beginning, we label all samples and record all
n anchors pointing to them. Then we group together the
Pi c i 7 anchor texts contained in the anchors pointing to the
P
nj same page. In the third stage, we group the anchor texts
j1
contained in the anchors pointing to the to-be-classified
n
ni X page. After the grouping, we decide the class of the to-be-
1X c X 1 X j

Dw Pi Pj dYki ; Ym
i
; where classified page according to the corresponding anchor texts.
2 il ji
n i  n j kl ml At last, we can further improve the effectiveness of the
ni classification process. There are two important measures
Pi 8
P
c during the classification process. One is the similarity
nj
jl
measure of two data, and the other is the criterion for
relevance feedback.
DF j Db  Dw 9
Similarity Measure. After the grouping of samples, we
have to measure the degree of membership between the to-
We have several ways to choose the most effective set of be-classified page and each class. Considering the Eucli-
features, as follows: dean distance again, there are three kinds of approaches for
such measurement:
1. Ranking approach.
2. Top-down approach. 1. Nearest-neighbor approach.
3. Bottom-up approach. 2. Farthest-neighbor approach.
4. Mixture approach. 3. Mean approach.

The ranking approach selects the features one by one The first approach finds the sample in each class nearest to
according to the rank of their effectiveness. Each time we the to-be-classified page. Among these representative sam-
include a new feature from the rank, we compute the joint ples, we can choose the class containing the one with a
effectiveness of the features selected so far by Equations minimal distance and assign the page to it. On the other
(7)(9). When the effectiveness degenerates, the process hand, we can also find the farthest sample in each class
terminates. Using a top-down approach, we consider all from the page. Then we assign the page to the class that
features as the initial selection and drop the features one by contains the representative sample with a minimal dis-
one until the effectiveness degenerates. On the contrary, tance. The last approach is to take the mean of each class
the bottom-up approach adds a feature at each iteration. into consideration. As in the previous approaches, the mean
The worse case of the above two approaches occurs if we of each class represents a whole class, and the one with a
choose the bad features earlier in the bottom-up approach minimal distance from the page would be chosen. An exam-
or the good features earlier in the top-down approach. The ple follows by using the mean approach.
last approach allows us to add and drop the features at each
iteration by combining the above two approaches. After Example. Inspect the data shown in Table 6. There are
determining the set of effective features, we can start the several web pages and anchor texts contained in some
classification process. anchors pointing to the web pages. Here we consider six
types of anchor texts, T1, T2, . . ., and T6. The value of an
Data Classification. In the following, we only consider anchor text for a web page stands for the number of the
the anchor semantics as the feature, which is based on the anchors pointing to the web page, which contain the anchor
dependency between an anchor and the web page to which text. The labeling is the same as in the previous example.
the anchor points. As mentioned, the semantics expressed
8 DATA ANALYSIS

Table 6. A Set of Home Pages with Corresponding Anchor technique to aid users in roaming through the hypertext
Texts and Labels environment. They gather and analyze the browsing paths
Sample T1 T2 T3 T4 T5 T6 White Page of some users to generate a summary as a guide for other
users. Within the WWW environment, the browsing beha-
Y1 0 0 0 1 1 2 No vior can be found in three positions, the history log of the
Y2 0 1 2 0 0 2 No
browser, the access log of the proxy server, and the request
Y3 0 2 0 4 0 0 No
Y4 0 0 3 0 0 1 No log of the web server. Data analysis on the web logs at
Y5 2 2 0 0 0 0 No different positions will lead to different applications. Many
Y6 1 3 0 0 2 3 Yes efforts have been made to apply the results of web log
Y7 3 3 1 6 3 0 Yes analysis, for example, the discovery of marketing knowl-
Y8 4 2 5 0 1 0 Yes edge (16) the dynamic generation of anchors (17) and the
Y9 5 5 3 0 0 2 Yes quality evaluation of website design (18).
Y10 8 4 4 1 4 2 Yes For web log analysis, we can also follow the typical data
analysis procedure as described previously. Here we illus-
X 5 2 0 0 5 0 Yes
trate with an example of unsupervised data analysis. In
Note: T1 list, T2 directory, T3 classification, T4 bookmark, the first stage, we observe the content of the web log to
T5 hot, and T6 = resource.
The labels are determined by human knowledge.
identify a set of features that can represent the desired
user behavior. Next, we may collect a set of samples from
the entire log to reduce the processing cost. In the third
We calculate the means of the two classes as follows: stage, we choose a proper subset of feature values accord-
ing to some criteria such as arrival time and number of
M0 0:4; 1; 1; 1; 0:2; 1; M1 4:2; 3:4; 2:6; 1:4; 2; 1:4 occurrences. Then, we divide the users into clusters
according to the similarity measure on the features repre-
Suppose there is a web page X to be classified as shown in senting their behaviors. At last, we evaluate the clustered
Table 6. We can compute the distances between X and the results and find a way for further improvement. In the
two means. They are dX; M0 6:94 and dX; M1 4:72. following, we first introduce two kinds of representations
Thus, we assign X to class C1. of user behavior, or user profiles as they are sometimes
called (19). Then we show a procedure to derive user
Relevance Feedback. The set of samples may be enlarged clusters from the web log.
after a successful classification by including the classified
pages. However, the distance between a to-be-classified page Data Observation and Feature Selection. The web log
and the nearest mean may be very large, which means that usually keeps the details of each request. The following
the current classification process does not work well on this is an example record:
web page. In this case, we reject to classify such a web page
and wait until more anchor texts for this web page are 890984441.324 0 140.117.11.12 UDP_MISS/000 76 ICP_QU-
accumulated. This kind of rejection not only expresses the ERY http://www.yam.org.tw/b5/yam/. . .
extent of the current ability to classify web pages, but also it
promotes the precision of the classified results. Furthermore, According to application needs, only parts of the fields are
by the concept of class separability formulated in Equations retrieved, for instance, arrival time (890984441.324), IP
(7)(9), we can define a similar criterion function DS to address (140.117.11.12), and URL (http://www.yam.org.tw/
evaluate the performance of the current set of samples: b5/yam/). The records with the same IP address can be
concatenated as a long sequence by the order of their arrival
DS DF S 10 times. Such a long sequence often spans a long time and
implies the user behavior composed of more than one
where F is the set of all effective features and S is the current browses, where a browse means a series of navigations
set of samples. for a specific goal. We can examine the arrival times of every
two consecutive requests to cut the sequence into shorter
Example. Reconsider the data shown in Table 6. Before segments, which exactly correspond to the individual
we assign X to C1, the initial DS equals to 0.75. When C1 browses. In this way, a browse is represented as a sequence
contains X, DS [ fXg yields a smaller value 0.16. On the other of requests (URLs) within a time limit.
hand, DS [ fXg becomes 1.26 if we assign X to C0. Hence, We may also represent the browsing behavior without
although X is labeled by C1, it is not suitable to become a temporal information. For a sequence of URLs, we can
new sample for the subsequent classification. The set of count the number of occurrences for each URL in it and
samples can be enlarged only when such an addition of new represent this sequence as a vector. For example, we can
samples gains a larger DS value, which means the class represent a sequence <a; b; a; b; c; d; b; c> as a vector
separability is improved. [2 3 2 1], where each value stands for the number of
occurrences of a, b, c, and d, respectively. Compared with
Web Log Analysis the previous one, this representation emphasizes the fre-
quency of each URL instead of their order in a browse.
The browsing behavior of the WWW users is also interest-
ing to data analyzers. Johnson and Fotouhi (15) propose a
DATA ANALYSIS 9

User Clustering. In the following, we consider the vector For Y4 [4 2 5 0],


representation as the browsing behavior and assume that 1,2 Compute the distance between Y4 and M1: d1
similar vectors imply two browses with similar infor- 5.9; the distance between Y4 and M2: d2 7.3.
mation needs. Therefore, clustering the vectors is equi- 3 d1 < max ) assign Y4 to C1 fY2 ; Y4 g.
valent to clustering the users information needs. We use 4 Compute the new median M1 [2.5 2.5 2.5 0].
the leader algorithm (20) and Euclidean distance as
For Y5 [5 5 3 0],
defined in Equation (1) for clustering. The input is a set
1,2 Compute the distance between Y5 and M1: d1
of vectors S and the output is a set of clusters C. Two
3.6; the distance between Y5 and M2 : d2 6.9.
thresholds min and max are also given to limit, respec-
3 d1 < max ) assign Y5 to C1 fY2 ; Y4 ; Y5 g.
tively, the sum of values in a vector and the distance
4 Compute the new median M1 [3.3 3.3 2.7 0].
between two vectors in the same cluster. The algorithm
processes the vectors one by one and terminates after all of
them are processed. Different orderings of vectors can lead
to different final partitions. One way to get the best ADVANCED INTERNET DATA ANALYSIS METHODS
partition is to try this algorithm on all different orderings.
Without loss of generality, we consider that a fixed order- Although the previous procedures fit the goal of data
ing of vectors and the clustering procedure is as follows: analysis well, there are still problems, such as speed or
For each vector v in S, do the following steps: memory requirements and the complex nature of real-
world data. We have to use some advanced techniques
1. If the sum of values in v is smaller than min, to improve the performance. For example, the number of
discard v. clusters given in unsupervised data analysis has a sig-
2. Compute the distance between v and the mean of nificant impact on the time spent in each iteration and the
each cluster in C; let the cluster with the minimum quality of final partition. Notice that the initial partition
distance be c, and let d denote the minimum distance. may contribute to a specific sequence of adjustments and
3. If d is larger than max, create a new cluster {v} and then to a particular solution. Therefore, we have to find an
add it to C; otherwise, assign v to c. ideal number of clusters during the analysis according to
4. Compute the mean of each cluster in C. the given initial partition. The bottom-up approach with
decreasing the number of clusters in iterations is a way to
The first step filters out the vector with a small number of adjust the final partition. Given a threshold of similarity
among the clusters, we can merge two clusters that are
requests because it is not very useful in applications. Then
the distance between the vector v and the mean of each similar enough to become a new single cluster. The num-
cluster is computed. The cluster c with the minimum dis- ber of clusters is determined when there are no more
tance d is then identified. If d is large, we treat v as the mean similar clusters to be merged. In the following subsections,
of a new cluster; otherwise, v is assigned to c. we introduce two advanced techniques for Internet data
analysis.
Example. Consider the data in Table 7. There is a set of
vectors on four URLs. Let min and max be set to 2 and 6, Techniques for Web Page Analysis
respectively. The following shows the iterations for the The approach to classifying Web pages by anchor seman-
clustering: tics requires a large amount of anchor texts. These anchor
texts may be contained in the anchors pointing to the
For Y1 [0 0 0 1], Web pages in different classes. An anchor text is said to
1 The sum of value < min ) discard Y1 . be indiscernible when it cannot be used to distinguish the
For Y2 [1 3 0 0], Web pages in different classes. We use the rough-set
13 Create C1 fY2 g. theory (21, 22) to find the indiscernible anchor texts, which
4 Set the median M1 1 3 0 0. will then be removed. The remaining anchor texts will
contribute to a higher degree of accuracy for the subse-
For Y3 [3 3 1 6], quent classification. In addition, the cost of distance com-
1,2 Compute the distance between Y3 and M1: putation can also be reduced. In the following, we
d1 6.4. introduce the basic idea of the rough-set theory and an
3 d1 > max ) Create C2 fY3 g. example for the reduction of anchor texts (23).
4 Set the median M2 3 3 1 6.
Rough-Set Theory. By the rough-set theory, an informa-
tion system is modeled in the form of a 4-tuple (U, A, V, F),
Table 7. A Set of Vectors on Six URLs
where U represents a finite set of objects, A refers to a
Vector URL1 URL2 URL3 URL4 finite set of attributes, V is the union of all domains of the
Y1 0 0 0 1
attributes in A, and F is a binary function F : U  A ! V.
Y2 1 3 0 0 The attribute set A often consists of two subsets, one
Y3 3 3 1 6 refers to condition attribute C and the other stands for
Y4 4 2 5 0 decision attribute D. In the classification on web pages, U
Y5 5 5 3 0 stands for all web pages, A is the union of the anchor texts
10 DATA ANALYSIS

(C) and the class of web pages (D), V is the union of all the Table 8. A Set of Data in Symbolic Values Transformed
domains of the attributes in A, and F handles the mappings. from Table 6
Let B be a subset of A. A binary relation called the indis- Sample T1 T2 T3 T4 T5 T6 White Page
cernibility relation is defined as
Y1 L L L L L L No
Y2 L L L L L L No
INDB fXi ; X j 2 U  Uj 8 p 2 B; pXi pX j g 11 Y3 L L L M L L No
Y4 L L M L L L No
That is, Xi and Xj are indiscernible by the set of attributes B Y5 L L L L L L No
if p(Xi) is equal to p(Xj) for every attribute p in B. INDB is an Y6 L M L L L M Yes
equivalence relation that produces an equivalence class Y7 M M L H M L Yes
denoted as [Xi]B for each sample Xi. Two web pages Xi Y8 M L M L L L Yes
and Xj, which have the same statistics for each anchor Y9 M M M L L L Yes
text in C, belong to the same equivalence class [Xi]C (or Y10 H M M L M L Yes
[Xj]C). Let U be a subset of U. A lower approximation X M L L L M L Yes
LOWB,U, which contains all samples in each equivalence Note: L [0, 2], M [3, 5], H [6, 8].
class [Xi]B contained in U, is defined as

LOWB;U fXi 2 UjXi B  Ug 12


By Equation (14), we can compute CON p;gC;D for each anchor
Based on Equation (12), LOWC;Xi D contains the web text p and sort them in ascending order. In this case, all
pages in the equivalence classes produced by INDC, and CON p;gC;D are 0 except CONT1 ;gC;D . That is, only the anchor
these equivalence classes are contained in [Xi]D for a text T1 is indispensable, which becomes the unique core of
given Xi. A positive region POSC,D is defined as the union C. Next, we use a heuristic method to find a reduct of C
of LOWC;Xi D for each equivalence class produced by because such a task has been proved to be NP-complete in
INDDPOSC,D refers to the samples that belong to the Ref. 25. Based on an arbitrary ordering of the dispensable
same class when they have the same anchor texts. As anchor texts, we check the first anchor text to see whether it
defined in Ref. 24, C is independent on D if each subset is dispensable. If it is, then remove it and continue to check
Ci in C satisfies the criterion that POSC;D 6 POSCi ;D ; other- the second anchor text. This process continues until no
wise, C is said to be dependent on D. The degree of more anchor texts can be removed.
dependency gC,D is defined as
Example. Suppose we sort the dispensable anchor texts
cardPOSC;D as the sequence <T2, T3, T4, T5, T6>, we then check one at
gC;D 13
cardU a time to see whether it is dispensable. At last, we obtain
the reduct fT1 ; T6 g. During the classification process, we
where card denotes set cardinality. only consider these two anchor texts for a similarity
measure. Let the symbols used in each anchor text be
CON p;gC;D gC;D  gCf pg;D 14 transformed into three discrete values, 0, 1, and 2. The
means of the two classes are M0 (0, 0) and M1 (1, 0.8).
From these equations, we define the contribution Finally, we classify X into the class C1 due to its minimum
CON p;gC;D of an anchor text p in C to the degree of depen- distance. When we use the reduct fT1 ; T6 g to classify data,
dency gC,D by using Equation (14). According to Equation the class separability DfT1 ; T6 g is 0.22. Different reducts
(13), we say an anchor text p is dispensable if may result in different values of class separability. For
gCf pg;D gC;D . That is, the anchor text p makes no con- instance, the class separability becomes 0.27 if we choose
tribution to gC,D and the value of CON p;gC;D equals 0. The set the reduct fT1 ; T2 g.
of indispensable anchor texts is the core of the reduced set
of anchor texts. The remaining task is to find a minimal Techniques for Web Log Analysis
subset of C called a reduct of C, which satisfies Equation
The approach to clustering the user behaviors must adapt
(15) and the condition that the minimal subset is inde-
itself to the rich content, large amount, and dynamic nature
pendent on D.
of log data. As mentioned, the web log can provide a variety
of descriptions of a request. Consider the web log of an
POSC;D POSminimal subset of C;D 15
online bookstore. As the user browses an article in it, the
web log may record several fields about that article, such as
Reduction of Anchor Texts. To employ the concepts of
URL, title, authors, keywords, and categories. Notice that
the rough-set theory for the reduction of anchor texts, we
the last three fields represent a request as a set of items, and
transform the data shown in Table 6 into those in Table 8.
thus, a browse is represented as a sequence of itemsets. In
The numeric value of each anchor text is transformed into
addition, the dynamic nature of log data implies that the
a symbol according to the range in which the value falls.
users may change their interests or behaviors as time
For instance, a value in the range between 0 and 2 is
passes. Therefore, extracting the most significant informa-
transformed into the symbol L. This process is a general-
tion from a long history of user browsing is important. We
ization technique usually used for a large database.
DATA ANALYSIS 11

apply the association mining concepts (26) to extract the current transaction):
most representative information (use profile) from a
sequence of itemsets. In the following, we introduce the Supportc Countc=T  Firstc 1 16
basic concepts used in the data mining field and illustrate
by an example how to derive the user profile with data This formula indicates that only the transactions after the
mining techniques (27). first transaction of this category are considered in the
support measure. In other words, we ignore the effects
Association Mining Concepts. According to the definition of the transactions before the first transaction of this
in Ref. 26, a transaction has two fields, transaction-time category. Consider the scenario that a category first
and the items purchased. An itemset is a nonempty set appears in T91 and then continually shows up from T92
of items, and thus, each transaction is also an itemset. to T100. By the traditional method, its support is small
The length of an itemset is the total number of items in it. (10%). In contrast, our formula computes the support at
A k-itemset stands for an itemset with length k. Further- 100%, indicating that this category appears frequently in
more, if a transaction contains an itemset I, we call the recent transactions. Given a threshold a, the user
that the transaction supports I. The support of an profile is fcjSupportc  ag.
itemset is the percentage of transactions that support By Equation (16), when a category first appears, its
it in the entire database. If the support of an itemset is support will be always 100%, which is not reasonable.
larger than a minimum support threshold, we call it a Therefore, we define a threshold, called minimal count
frequent itemset. Given a transaction database, the goal of (denoted by b), to filter out the categories with very small
association mining is to efficiently find all the frequent counts. On the other hand, we observe that the support of a
itemsets. category can be very low if its first transaction is very far
Consider the web log analysis for an online bookstore. from the current transaction. Consider the scenario that a
We can regard a transaction as the set of categories (or category first appears in T1, disappears from T2 to T91, and
authors or keywords) logged during a time period that the continually shows up from T92 to T100. By Equation (16),
user enters the online bookstore. The categories in a trans- its support is just 10%. However, the fact that this category
action are equally treated. Thus, for each user, there will be appears frequently in the recent transactions implies that
a series of transactions recorded in the web log. Moreover, the user is getting interested in it recently. Therefore, we
we can identify a set of categories, for instance, {data define another threshold, called expired time (denoted by g),
mining, database, multimedia}, which has frequently to restrict the interval between the last and the current
appeared in these transactions, to represent the users transactions. When this interval exceeds g, both the First
interests. and the Last columns of the category are changed to the
current transaction.
Profile Derivation. We employ the association mining
concepts to derive the user profile from the transactions Example. Take the four transactions in Table 9 as an
in the web log. Due to the accumulation of transactions, example. As category c appears in T1, T2, and T4, its count
the profile derivation may incur high overheads if we has a value 3. Moreover, the first and the last transactions
use the traditional mining method (28). Therefore, we of category c are T1 and T4, respectively. The rightmost
adopt an incremental method to derive the user profile. column of Table 9 lists the support of each category. In this
The core of our method is the interest table, which is built example, the thresholds a, b, and g are set to 75%, 2, and 4,
for each user to keep the categories in the transactions. An respectively. We do not compute the support of category a
interest table consists of four columns, while each row of because its count is less than b. As a result, fc; d; eg is
the table refers to a category. An example with four derived as the user profile.
transactions is shown in Table 9. The Category column When a new transaction T5 arrives, we recalculate the
lists the categories that appear in the transactions. The supports of the categories that appear in T5 or the user
First and Last columns record the first and the last trans- profile to update the interest table. As Table 10 shows, the
actions in which each category appears, respectively. supports of all categories except a are recalculated. By a,
Finally, the Count column keeps the number of occur- we derive the new user profile fb; c; e; f g. Note that
rences for each category since its first transaction. From category d is removed from the user profile because its
the interest table, we can compute the support of each new support is lower than a.
category as follows (where c is a category and T is the

Table 10. The Interest Table After T5 Arrives


Table 9. Four Transactions and the Interest Table
Transactions Category First Last Count Support
Transactions Category First Last Count Support
T1 {a, c, e} a T1 T1 1 N/A
T1 {a, c, e} a T1 T1 1 N/A T2 {b, c, e, f} b T2 T5 3 75%
T2 {b, c, e, f} b T2 T4 2 67% T3 {d, e, f} c T1 T5 4 80%
T3 {d, e, f} c T1 T4 3 75% T4 {b, c, d} d T3 T4 2 67%
T4 {b, c, d} d T3 T4 2 100% T5 {b, c, e, f, g} e T1 T5 4 80%
e T1 T3 3 75% f T2 T5 3 75%
f T2 T3 2 67% g T5 T5 1 N/A
12 DATA ANALYSIS

SUMMARY 4. ComplexityA very efficient mechanism is required


to keep the complex structure of graph data.
In this article, we describe the techniques and concepts of
data analysis. A variety of data analysis methods are
introduced and illustrated by examples. Two categories,
BIBLIOGRAPHY
supervised data analysis and unsupervised data analysis,
are presented according to their different initial conditions
1. B. Nolan, Data Analysis: An Introduction, Cambridge, UK:
and resultant uses. Two methods for data analysis are also Polity Press, 1994.
described, which are based on probability theory and fuzzy-
2. J. W. Tukey, Exploratory Data Analysis, Reading, MA: Addi-
set theory, respectively. The methods for data analysis on son-Wesley, 1977.
two types of Internet data are presented. Advanced tech-
3. A. Gelman, J. B. Carlin, H. S. Stern, and D. B. Rubin, Bayesian
niques for Internet data analysis are also discussed.
Data Analysis, London: Chapman & Hall, 1995.
4. L. A. Zadeh, Fuzzy sets, Information Control, 8: 338353, 1965.
Research Trends
5. H. Bandemer and W. Nather, Fuzzy Data Analysis, Dordrecht:
The research trend of data analysis can be seen from two Kluwer, 1992.
viewpoints. From the viewpoint of data, new data types 6. T. Berners-Lee, R. Cailliau, A. Luotonen, H. F. Nielsen, and A.
such as transactions, sequences, trees, graphs, and rela- Secret, The world wide web, Communications of the ACM, 37
tional tables, bring new challenges to data analysis. From (8): 7682, 1994.
the viewpoint of knowledge, or the result of data analysis, 7. M. Baentsch, L. Baum, G. Molter, S. Rothkugel, and P. Sturm,
new interestingness measures of patterns, such as support, Enhancing the webs infrastructure: From caching to replica-
confidence, lift, chi-square value, and entropy gain, also tion, IEEE Internet Computing, 1(2): 1827, 1997.
bring new challenges to data analysis. It is not easy to come 8. V. N. Gudivada, V. V. Raghavan, W. I. Grosky, and R. Kasa-
up with a single method that can meet all combinations of nagottu, Information retrieval on the world wide web, IEEE
these challenges. Several ideas and solutions have been Internet Computing, 1 (5): 5868, September/October 1997.
proposed, but many challenges remain. In the following, we 9. D. Florescu, A. Levy, and A. Mendelzon, Database techniques
introduce two research directions that have recently for the world wide web: A survey, ACM SIGMOD Record, 27 (3):
attracted great attention from the data analyzers. 5974, September 1998.
In many of the new applications, several continuous 10. K. Obraczka, P. B. Danzig, and S. H. Li, Internet resource
data streams rapidly flow through computers to be either discovery services, IEEE Comp. Mag., 26 (9): 822, 1993.
read or discarded by people. Examples are the data flows 11. C. S. Chang and A. L. P. Chen, Supporting conceptual and
on computer, traffic, and telecommunication networks. neighborhood queries on www, IEEE Trans. on Systems, Man,
and Cybernetics, 28 (2): 300308, 1998.
Recently, data analysis on continuous data streams has
become widely recognized (29). Its applications include 12. S. Chakrabarti, B. Dom, and P. Indyk, Enhanced hypertext
categorization using hyperlinks, Proc. of ACM SIGMOD Con-
intrusion detection, trend analysis, and grid computing.
ference on Management of Data, Seattle, WA, 1998, pp. 307318.
The characteristics of data analysis on continuous data
13. G. Salton and M. J. McGill, Introduction to Modern Informa-
streams are as follows:
tion Retrieval, New York: McGraw-Hill, 1983.
1. ContinuityData are continuous and arrive at a 14. G. Salton, Automatic Text Processing, Reading, MA: Addison
Wesley, 1989.
variable rate.
15. A. Johnson and F. Fotouhi, Automatic touring in hypertext
2. InfinityThe total amount of data is unbounded. systems, Proc. of IEEE Phoenix Conference on Computers and
3. UncertaintyThe order of data cannot be predeter- Communications, Phoenix, AZ, 1993, pp. 524530.
mined. 16. A. Buchner and M. D. Mulvenna, Discovering internet market-
4. ExpirationData can be read only once. ing intelligence through online analytical web usage mining,
5. MultiplicityMore than one data stream may arrive ACM SIGMOD Record, 27 (4): 5461, 1998.
at a single site for data analysis. 17. T. W. Yan, M. Jacobsen, H. Garcia-Molina, and U. Dayal, From
user access patterns to dynamic hypertext linking, Computer
Networks and ISDN Systems, 28: 10071014, 1996.
Data analysis on graphs has become popular due to a
variety of new applications emerging in the fields like 18. M. Perkowitz and O. Etzioni, Adaptive web sites, Communica-
tions of the ACM, 43 (8): 152158, 2000.
biology, chemistry, and networking (30). The prevalent
use of HTML and XML formats also pushes the data 19. Y. H. Wu and A. L. P. Chen, Prediction of web page accesses by
proxy server log, World Wide Web: Internet and Web Informa-
analyzers toward this research direction. The characteris-
tion Systems, 5 (1): 6788, 2002.
tics of data analysis on graphs are as follows:
20. J. A. Hartigan, Clustering Algorithms, New York: Wiley, 1975.
1. VarietyGraph has various substructures such as a 21. Z. Pawlak, Rough sets, Communications of the ACM, 38 (11):
connected subgraph, an ordered tree, and a path. 8895, 1995.
22. Z. Pawlak, Rough Sets: Theoretical Aspects of Reasoning about
2. IsomorphismIt is NP-complete to decide whether
Knowledge, Norwell, MA: Kluwer, 1991.
one graph is a subgraph of another one.
23. A. L. P. Chen and Y. H. Wu, Data analysis, Wiley Encyclopedia
3. InterestingnessThe measure of pattern interest- of Electrical and Electronics Engineering, New York: Wiley,
ingness depends on application needs. 1999.
DATA ANALYSIS 13

24. X. Hu and N. Cercone, Mining knowledge rules from databases: 29. L. Golab and M. T. Ozsu, Issues in data stream management,
A rough-set approach, Proc. of IEEE Conference on Data Engi- ACM SIGMOD Record, 32 (2): 514, 2003.
neering, New Orleans, LA, 1996, pp. 96105. 30. T. Washio and H. Motoda, State of the art of graph-based data
25. R. Slowinski (ed.), Handbook of Applications and Advances mining, ACM SIGKDD Explorations, 5 (1): 2003.
of the Rough Sets Theory, Norwell MA: Kluwer Academic
Publishers, 1992.
26. J. Han and M. Kamber, Data Mining: Concepts and Techni- YI-HUNG WU
ques, New York: Morgan Kaufman Publishers, 2000. Chung Yuan Christian
University
27. Y. H. Wu, Y. C. Chen, and A. L. P. Chen, Enabling personalized
recommendation on the web based on user interests and beha- Chungli, Taiwan
viors, Proc. of IEEE Workshop on Research Issues in Data ARBEE L. P. CHEN
Engineering, Heidelberg, Germany, 2001, pp. 1724. National Chengchi University
Taipei, Taiwan
28. R. Agrawal and R. Srikant, Fast algorithms for mining associa-
tion rules, Proc. of Conference on Very Large Data Base, San-
tiago de Chile, Chile, 1994, pp. 487499.
D
DATABASE LANGUAGES used implementation data models: relational, network, and
hierarchical. They organize the data in record structures
BACKGROUND and hence are sometimes called record-based data models.
Many database systems in early days were built based on
The DBMS has a DDL complier that processes DDL state- either the network model or the hierarchical model. How-
ments to generate the schema descriptions and store them ever, because these two models only support low-level
into the DBMS catalog. The catalog contains metadata that queries and record-at-a-time retrievals, their importance
are consulted before the actual data are accessed. has decreased over the years. The relational model has
There are two types of DMLs: low-level or procedural been successfully used in most commercial database
DMLs and high-level or nonprocedural DMLs. A low-level management systems today. This is because the relational
DML requires the user to specify how the data are manipu- model and relational database languages provide high-
lated. This type of DML typically retrieves and processes level query specifications and set-at-a-time retrievals.
individual records from a database. Therefore, a low-level The object-relational data model is a hybrid of the
DML is also called a record-at-a-time DML. A high-level object-oriented and the relational models. It extends the
DML allows users to specify what the result is, leaving the relational data model by providing an extended type sys-
decision about how to get the result to the DBMS. There- tem and object-oriented concepts such as object identity,
fore, a high-level DML is also called a declarative DML. A inheritance, encapsulation, and complex objects.
high-level DML can specify and retrieve many records With the popularity of Extensible Markup Language
in a single statement and is hence called a set-at-a-time (XML), XML is becoming a standard tool for data repre-
or set-oriented DML. A declarative DML is usually easier to sentation and exchange between multiple applications and
learn and use than a procedural DML. In addition, a database systems. Later, we will discuss some advanced
declarative DML is sometimes faster in overall processing database languages developed based on temporal, spatial,
than its procedural counterpart by reducing the number of and active models.
communications between a client and a server. A low-level
DML may be embedded in a general-purpose programming
RELATIONAL DATA MODEL, RELATIONAL ALGEBRA,
language such as COBOL, C/C, or Java. A general-
RELATIONAL CALCULUS, AND RELATIONAL QUERY
purpose language in this case is called the host language,
LANGUAGES
and the DML is called the data sublanguage. On the other
hand, a high-level DML called a query language can be used
Relational Data Model
in a standard-alone and interactive manner.
The main criterion used to classify a database language The relational data model was introduced by Codd (3). It
is the data model based on which the language is defined. was developed based on the mathematical notion of a
The existing data models fall into three different groups: relation. Its root in mathematics allows it to provide the
high-level or conceptual data models, implementation data simplest and the most uniform and formal representation.
models, and physical data models (1). Conceptual models The relational data model represents the data in a data-
provide concepts that are close to the way users perceive base as a collection of relations. Using the terms of the
data, whereas physical data models provide concepts for ER model, both entity sets and relationship sets are rela-
describing the details about how data are stored. Imple- tions. A relation is viewed as a two-dimensional table in
mentation data models specify the overall logical struc- which the rows of the table correspond to a collection of
ture of a database and yet provide a high-level description of related data values and the values in a column all come
the implementation. from the same domain. In database terminology, a row is
High-level data models are sometimes called object- called a tuple and a column name is called an attribute.
based models because they mainly describe the objects A relation schema R, denoted by RA1 ; A2 ; . . . ; An , is a
involved and their relationships. The entity-relationship set of attributes R fA1 ; A2 ; . . . ; An g. Each attribute Ai
(ER) model and the object-oriented model are the most is a descriptive property in a domain D. The domain of Ai
popular high-level data models. The ER model (2) is is denoted by dom(Ai). A relation schema is used to des-
usually used as a high-level conceptual model that can cribe a relation, and R is called the name of the relation.
be mapped to the relational data model. The object-oriented The degree of a relation is the number of the attributes of
data model adapts the object-oriented paradigm for a data- its relation schema. A relation instance r of the relation
base by adding concepts in object-oriented programming schema RA1 ; A2 ; . . . ; An , also denoted by r(R), is a set of
such as persistence and collection. m-tuples r ft1 ; t2 ; . . . ; tm g. Each tuple t is an ordered
Implementation data models are used most fre- list of n values t < v1 ; v2 ; . . . ; vn > , where each value
quently in a commercial DBMS. There are three widely vi is an element of dom(Ai).

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DATABASE LANGUAGES

Relational Algebra In addition, we can combine a cascade of select operations


into a single select operation with logical AND connec-
A query language is a language in which users can request
tives; that is,
data from a database. Relational algebra is a procedural
language. The fundamental operations in the relational
algebra are usually divided into two groups. The first group scondition1 scondition2 . . . sconditionn R
includes select, project, and join operations that are devel- scondition1 AND scondition2 AND ... AND sconditionn R
oped specifically for relational databases. The second group
includes set operations from mathematical set theory such The Project Operation. The project operation produces a
as union, interaction, difference, and Cartesian product. vertical subset of the table by extracting the values from
These operations allow us to perform most data retrieval a set of specified columns, eliminating duplicates and pla-
operations. cing the values in a new table. The lowercase Greek letter
pi (p) is used to denote the project operation and followed
The Select Operation. The select operation selects a sub- by a list of attribute names that we wish to extract in the
set of the tuples from a relation. These tuples must satisfy result as a subscript to p. For example, the following
a given predicate. The lowercase Greek letter sigma (s) is operation produces the names and birthdates of all faculty
used to denote the select operation and followed by a members:
predicate as a subscript to s. The argument relation R
is given in the parentheses following s. Suppose we have pname; birthdate Faculty
a sample University database that consists of three rela-
tions: Faculty, Department, and Membership as shown in Relational Expressions. As each relational algebra ope-
Fig. 1. If we wish to find information of all faculty members ration produces a set, we can combine several relational
whose salary is greater than $50,000, we would write algebra operations into a relational expression. For
example, suppose that we want the names of all faculty
ssalary > 50000 Faculty members whose salary is greater than 50,000 (Fig. 1). We
can write a relational expression as follows:
In general, the select operation is denoted by
pname ssalary > 50000 Faculty
sSconditioni R
The Cartesian Product Operation. The Cartesian product
Note that the select operation is commutative; that is, operation, denoted by a cross (X), allows us to combine
tuples from two relations so that the result of R1A1 ;
scondition1 scondition2 R scondition2 scondition1 R A2 ; . . . ; An X R2B1 ; B2 ; . . . ; Bm is a relation Q with
n m attributes QA1 ; A2 ; . . . ; An ; B1 ; B2 ; . . . ; Bm in

Faculty
fid name birthdate salary (dollar) dcode
91239876 John Smith 01/09/67 40000 2
33489783 Perry Lee 12/08/55 68000 2
78738498 Tom Bush 06/20/41 79000 4
12323567 Jane Rivera 09/15/72 35000 3
87822384 Joyce Adams 11/10/59 54000 1
78898999 Frank Wong 07/31/79 30000 3
22322123 Alicia Johnson 08/18/80 28000 1

Department
dcode name
1 Chemical Engineering
2 Computer Science
3 Electrical Engineering
4 Mechanical Engineering

Membership
fid society
91239876 American Database Association
33489783 American Software Engineering Society
78738498 International Mechanical Engineering Association
12323567 International Electrical Engineering Association
87822384 International Chemical Engineering Association
78898999 International Electrical Engineering Association
22322123 Advocate for Women in Engineering
Figure 1. Instance of the University database.
DATABASE LANGUAGES 3

fid Faculty.name birthdate salary Faculty. Department. Department.name


(dollar) dcode dcode
91239876 John Smith 01/09/67 40000 2 2 Computer Science
33489783 Perry Lee 12/08/55 68000 2 2 Computer Science
78738498 Tom Bush 06/20/41 79000 4 4 Mechanical
Engineering
12323567 Jane Rivera 09/15/72 35000 3 3 Electrical Engineering
87822384 Joyce Adams 11/10/59 54000 1 1 Chemical Engineering
78898999 Frank Wong 07/31/79 30000 3 3 Electrical Engineering Figure 2. Result of an equijoin of
22322123 Alicia Johnson 08/18/80 28000 1 1 Chemical Engineering Faculty and Department.

that order. The tuples of the relation Q are all combinations retrieves the names of all faculty members of each depart-
of the rows from R1 and R2. Specifically, it combines ment in the University database:
the first row of R1 with the first row of R2, then with the
second row of R2, and so on, until all combinations of the pname Faculty Faculty:dcodeDepartment:dcode Department
first row of R1 with all the rows of R2 have been formed.
The procedure is repeated for the second row of R1, The result of the equijoin is shown in Fig. 2. You may notice
then the third row of R1, and so on. Assume that we that we always have at least two attributes that have
have p tuples in R1 and q tuples in R2. Then, there are identical values in every tuple as shown in Fig. 2. As it is
p  q tuples in Q. unnecessary to include repeated columns, we can define a
natural join by including an equality comparison between
The Join Operation. In fact, the Cartesian product is every pair of common attributes and eliminating the
rarely used by itself. We can define several useful operations repeated columns in the result of an equijoin. A natural
based on the Cartesian product operation. The join opera- join for the above example can be expressed as follows in
tion, denoted by , is used to combine related tuples from Fig. 3.
two relations. The general form of the join operation on two
relations R1A1 ; A2 ; . . . ; An and R2 B1 ; B2 ; . . . ; Bm is Relational Calculus
Relational calculus is a declarative query language in
R1 < join condition > R2
which users specify what data should be retrieved, but
not how to retrieve them. It is a formal language, based
The result of the join operation is a relation QA1 ;
on predicate calculus, a branch of mathematical logic.
A2 ; . . . ; An ; B1 ; B2 ; . . . ; Bm that satisfies the join condi-
There are two types of relational calculus: tuple-related
tion. The join condition is specified on the attributes of
calculus and domain-related calculus. Both are subsets of
R1 and R2 and is evaluated for each tuple from the Carte-
predicate calculus, which deals with quantified variables
sian product R1  R2. The join condition is of the form:
and values.
A query in the tuple-related calculus is expressed as
< condition > AND < condition > AND . . . AND < condition >
ftjPtg
where each condition is of the form Ai QB j , Ai is an attri-
bute of R1; Bj is an attribute of R2, both Ai and Bj belong which designates the set of all tuples t such that the
to the same domain, and Q is one of the following comparison predicate P(t) is true.
operators: ; ; < ; > ;  ; 6 . A join operation with such a We may connect a set of predicates by the logical connec-
general join condition is called a theta join. tives AND ( ^ ), OR ( _ ), and NOT (  ) to form compound
The most common join operation involves only equality predicates such as P(t) AND Q(t), P(t) OR NOT Q(t), and
comparisons. When a join only involves join conditions NOT P(t) OR Q(t), which can be written as Pt ^ Qt;
with equality operators, such a join is called an equijoin. Pt _  Qt, and  Pt _ Qt, respectively. A conjunction
As an illustration of an equijoin join, the following query consists of predicates connected by a set of logical ANDs,

fid Faculty.name birthdate salary (dollar) Faculty. Department.name


dcode
91239876 John Smith 01/09/67 40000 2 Computer Science
33489783 Perry Lee 12/08/55 68000 2 Computer Science
78738498 Tom Bush 06/20/41 79000 4 Mechanical Engineering
12323567 Jane Rivera 09/15/72 35000 3 Electrical Engineering
87822384 Joyce Adams 11/10/59 54000 1 Chemical Engineering
78898999 Frank Wong 07/31/79 30000 3 Electrical Engineering Figure 3. Result of the natural join of
22322123 Alicia Johnson 08/18/80 28000 1 Chemical Engineering Faculty and Department.
4 DATABASE LANGUAGES

a disjunction consists of predicates connected by a set of 1989, a revised standard known commonly as SQL89 was
logical ORs, and a negation is a predicate preceded by a published.
NOT. For example, to retrieve all faculty members whose The SQL92 was published to strength the standard in
salary is above $50,000, we can write the following tuple- 1992. This standard addressed several weaknesses in
related calculus expression: SQL89 as well as extended SQL with some additional
features. The main updated features include session
ftjFacultyt ^ t:Salary > 50000g management statements; connection management, includ-
ing CONNECT, SET CONNECTION, and DISCONNECT;
where the condition Faculty(t) specifies that the range of self-referencing DELETE, INSERT, and UPDATE state-
the tuple variable t is Faculty and each Faculty tuple t ments; subqueries in a CHECK constraint; and deferrable
satisfies the condition t:Salary > 50000. constraints.
There are two quantifiers, the existential quantifier ( 9 ) More recently, in 1999, the ANSI/ISO SQL99 standard
and the universal quantifier ( 8 ), used with predicates to was released. The SQL99 (4,5) is the newest SQL stan-
qualify tuple variables. An existential quantifier can be dard. It contains many additional features beyond SQL92.
applied to a variable of predicate to demand that the pre- This standard addresses some of the more advanced and
dicate must be true for at least one tuple of the variable. A previously nonaddressed areas of modern SQL systems,
universal quantifier can be applied to a variable of a pre- such as object-oriented, call-level interfaces, and integrity
dicate to demand that the predicate must be true for all management.
possible tuples that may instantiate the variable. Tuple
variables without any quantifiers applied are called free Data Definition. The basic commands in SQL for data
variables. A tuple variable that is quantified by a 9 or 8 is definition include CREATE, ALTER, and DROP. They are
called a bound variable. used to define the attributes of a table, to add an attribute
In domain-related calculus, we use variables that take to a table, and to delete a table, respectively. The basic
their values directly from individual domains to form a format of the CREATE command is
tuple variable. An expression in domain-related calculus is
of the form CREATE TABLE table-name < attribute-name >:
< attribute-type >: < constraints >
f < x1 ; x2 ; . . . ; xn > jPx1 ; x2 ; . . . ; xn g
where each attribute is given its name, a data type defines
where < x1 ; x2 ; . . . ; xn > represents domain variables and its domain, and possibly some constraints exist.
Px1 ; x2 ; . . . ; xn stands for a predicate with these vari- The data types available are basic types including
ables. For example, to retrieve the names of all faculty numeric values and strings. Numeric data types include
members whose salary is above $50,000, we can write the integer number, real number, and formatted number. A
following domain-related calculus expression: String data type may have a fixed length or a variable
length. There are also special data types, such as date and
f < n > j 9 nFaculty f ; n; b; s; d ^ s > 50000g currency.
As SQL allows NULL (which means unknown) to be
where f, n, b, s, and d are variables created from the an attribute value, a constraint NOT NULL may be speci-
domain of each attribute in the relation Faculty, i.e., fid, fied on an attribute if NULL is not permitted for that
name, birthdate, salary, and dcode, respectively. attribute. In general, the primary key attributes of a table
are restricted to be NOT NULL. The value of the primary
Structured Query Language (SQL) key can identify a tuple uniquely. The same constraint
A formal language such as relational algebra or relational can also be specified on any other attributes whose values
calculus provides a concise notation for representing are required to be NOT NULL. The check clause specifies a
queries. However, only a few commercial database lan- predicate P that must be satisfied by every tuple in the
guages have been proposed based directly on a formal table. The table defined by the CREATE TABLE state-
database language. A Structured Query Language (SQL) ment is called a base table, which is physically stored in
is a high-level relational database language developed the database. Base tables are different from virtual tables
based on a combination of the relational algebra and (views), which are not physically stored in the database.
relational calculus. SQL is a comprehensive database The following example shows how a Faculty table can be
language that includes features for data definition, data created using the above CREATE TABLE command:
manipulation, and view definition.
Originally, SQL was designed and implemented in a CREATE TABLE Faculty
relational DBMS called SYSTEM R developed by IBM. In (fid: char (10) NOT NULL,
1986, the America National Standards Institute (ANSI) name: char(20) NOT NULL,
published an SQL standard, called SQL86, and the Inter- birthdate: date,
national Standards Organization (ISO) adopted SQL86 in salary: integer,
1987. The U. S. Governments Federal Information Proces- dcode: integer
sing Standard (FIPS) adopted the ANSI/ISO standard. In PRIMARY KEY (fid),
CHECK (salary > 0))
DATABASE LANGUAGES 5

WHERE Faculty.fid Membership.fid AND


If we want to add an attribute to the table, we can use society IN (SELECT society
the ALTER command. In this case, the new attributes FROM Membership, Faculty
may have NULL as the value of the new attribute. For WHERE Faculty.fid Membership.fid AND
example, we can add an attribute SSN (Social Security Faculty.name Frank Wong)
Number) to the Faculty table with the following command:
Note that Query 3 is a nested query, where the inner
ALTER TABLE Faculty query returns a set of values, and it is used as an operand
ADD SSN char(9) in the outer query.
Aggregate functions are functions that take a set of
If the Faculty table is no longer needed, we can delete values as the input and return a single value. SQL offers
the table with the following command: five built-in aggregate functions: COUNT, SUM, AVG,
MAX, and MIN. The COUNT function returns the number
DROP TABLE Faculty of values in the input set. The functions SUM, AVG, MAX,
and MIN are applied to a set of numeric values and return
Data ManipulationQuerying. SQL has one basic state- the sum, average, maximum, and minimum, respectively.
ment for retrieving information from a database: the In many cases, we can apply the aggregate functions to
SELECT statement. The basic form of the SELECT state- subgroups of tuples based on some attribute values. SQL
ment consists of three clauses: SELECT, FROM, and has a GROUP BY clause for this purpose. Some example
WHERE and has the following form: queries are as follows:

SELECT <attribute list> Query 4. Find the average salary of all faculty members
FROM <table list> associated with the Computer Science department.
WHERE <condition>
SELECT AVG (salary)
where the SELECT clause specifies a set of attributes to FROM Faculty, Department
be retrieved by the query, the FROM clause specifies a WHERE Faculty.dcode Department.code AND
list of tables to be used in executing the query, and the Department.name Computer Science
WHERE clause consists of a set of predicates that qualifies
the tuples of the tables involved in forming the final result. Query 5. For each department, retrieve the department
The followings are three example queries, assuming name and the average salary.
that the tables Faculty, Department, and Membership
are defined as follows: SELECT Department.name, AVG(salary)
FROM Faculty, Department
Faculty (fid, name, birthdate, salary, dcode) WHERE Faculty.dcode Department.dcode
Department (dcode, name) GROUP BY Department.name
Membership (fid, society)
Sometimes it is useful to state a condition that applies
Query 1. Retrieve the faculty IDs and names of all faculty to groups rather than to tuples. For example, we might be
members who were born on August 18, 1980. interested in only those departments where the average
salary is more than $60,000, This condition does not apply
SELECT fid, name to a single tuple but applies to each group of tuples con-
FROM Faculty structed by the GROUP BY clause. To express such a query,
WHERE birthdate 08/18/80 the HAVING clause is provided, which is illustrated in
Query 6.
Query 2. Retrieve the names of all faculty members asso-
ciated with the Computer Science department. Query 6. Find the departments whose the average salary
is more than $60,000.
SELECT Faculty.name
FROM Faculty, Department SELECT Department.name, AVG(salary)
WHERE Department.name Computer Science AND FROM Faculty, Department
Faculty.dcode Department.dcode WHERE Faculty.dcode Department.dcode
GROUP BY Department.name
Query 3. Retrieve the faculty IDs and names of all faculty HAVING AVG(salary) > 60000
members who are members of any society of which Frank
Wong is a member. Data ManipulationUpdates. In SQL, there are three
commands to modify a database: INSERT, DELETE, and
UPDATE. The INSERT command is used to add one or
SELECT Faculty.fid, Faculty.name more tuples into a table. The values must be listed in the
FROM Faculty, Membership same order as the corresponding attributes are defined in
6 DATABASE LANGUAGES

the schema of the table if the insert column list is not Object-Oriented Database Model and Languages
specified explicitly. The following example shows a query
The object-oriented data model was developed based on the
to insert a new faculty member into the Faculty table:
fundamental object-oriented concepts from a database per-
spective. The basic concepts in the object-oriented model
INSERT Faculty
include encapsulation, object identity, inheritance, and
VALUES (78965456, Gloria Smith, 12/12/81,
complex objects.
25000, 1)
The object-oriented concepts had been first applied to
programming. The object-oriented approach to program-
The DELETE command removes tuples from a table. It ming was first introduced by the language, Simular67.
includes a WHERE clause to select the tuples to be deleted. More recently, C and Java have become the most widely
Depending on the number of tuples selected by the condi- known object-oriented programming languages. The
tion in the WHERE clause, the tuples can be deleted by a object-oriented database model extends the features of
single DELETE command. A missing WHERE clause indi- object-oriented programming languages. The extensions
cates that all tuples in the table are to be deleted. We must include object identity and pointer, persistence of data
use the DROP command to remove a table completely. The (which allows transient data to be distinguished from
following example shows a query to delete those faculty persistent data), and support for collections.
members with the highest salary: A main difference between a programming language
and a database programming language is that the latter
DELETE FROM Faculty directly accesses and manipulates a database (called per-
WHERE salary IN (SELECT MAX (salary) FROM Faculty) sistent data), whereas the objects in the former only last
during program execution. In the past, two major
Note that the subquery is evaluated only once before approaches have been taken to implement database pro-
executing the command. gramming languages. The first is to embed a database
The UPDATE command modifies certain attribute language such as SQL in conventional programming lan-
values of some selected tuples. As in the DETELTE com- guages; these languages are called embedded languages.
mand, a WHERE clause in the UPDATE command selects The other approach is to extend an existing programming
the tuples to be updated from a single table. A SET clause language to support persistent data and the functionality of
specifies the attributes to be modified and their new values. a database. These languages are called persistent program-
The following example shows a query to increase by 10% the ming languages.
salary of each faculty member in the Computer Science However, the use of embedded languages leads to a
department: major problem, namely impedance mismatch. In other
words, conventional languages and database languages
UPDATE Faculty differ in their ways of describing data structures. The
SET salary salary  1.1 data type systems in most programming languages do
WHERE dcode IN (SELECT code not support relations in a database directly, thus requiring
FROM Department complex mappings from the programmer. In addition,
WHERE name=Computer Science) because conventional programming languages do not
understand database structures, it is not possible to check
View Definition. A view in SQL is a table that is derived for type correctness.
from other tables. These other tables can be base tables or In a persistent programming language, the above mis-
previously defined views. A view does not exist in the match can be avoided. The query language is fully inte-
physical form, so it is considered a virtual table in contrast grated with the host language, and both share the same
to the base tables that physically exist in a database. A view type system. Objects can be created and stored in a data-
can be used as a table in any query as if it existed physically. base without any explicit type change. Also, the code for
The command to define a view is as follows: data manipulation does not depend on whether the data it
manipulated are short-lived or persistent. Despite these
CREATE VIEW <view name> advantages, however, persistent programming languages
AS <query statement> have some drawbacks. As a programming language
accesses a database directly, it is relatively easy to make
The following example shows the definition of a view programming errors that damage the database. The com-
called Young-Faculty-Members who were born after 01/01/ plexity of such languages also makes high-level optimiza-
1970: tion (e.g., disk I/O reduction) difficult. Finally, declarative
querying is, in general, not supported.
CREATE VIEW Young-Faculty-Members
AS SELECT name, birth-date Object Database Management Group (ODMG). The
FROM Faculty Object Database Management Group (ODMG), which is
WHERE birth-date > 01/01/1970 a consortium of object-oriented DBMS vendors, has been
working on standard language extensions including class
libraries to C and Smalltalk to support persistency. The
standard includes a common architecture and a definition
DATABASE LANGUAGES 7

for object-oriented DBMS, a common object model with an SELECT f.teachCourse.CID, f. teachCourse.title
object definition language, and an object query language FROM Faculties f
for C, Smalltalk, and Java. Since ODMG published WHERE f.name John Smith;
ODMG1.0 for their products in 1993, ODMG 2.0 and
ODMG 3.0 were released in 1997 and 2000, respectively (6). Note that the FROM clause f refers to the extent Facul-
The components of the ODMG specification include an ties, not the class Faculty. The variable f is used to range
Object Model, an Object Definition Language (ODL), an over the objects in Faculties. Path expressions using a dot (.)
Object Query Language (OQL), and language bindings to to separate attributes at different levels are used to access
Java, C, and Smalltalk: any property (either an attribute or a relationship) of an
ODMG Object Model is a superset of the Object Manage- object.
ment Group (OMG) Object Model that gives it database
capabilities, including relationships, extents, collection Object-Relational Database Model and Languages
classes, and concurrency control. It is the unifying concept
The object-relational data model extends the relational
for the ODMG standard and is completely language-
data model by providing extended data types and object-
independent.
oriented features such as inheritance and references to
Object Definition Language (ODL) is used to define a
objects. Extended data types include nested relations
database schema in terms of object types, attributes, rela-
that support nonatomic data types such as collection types
tionships, and operations. The resulting schema can be
and structured types. Inheritance provides reusability for
moved from one database to another and is programming
attributes and methods of exiting types. A reference is
language-independent. ODL is a superset of OMGs Inter-
conceptually a pointer to tuples of a table. An object-
face Definition Language (IDL).
relational database language extends a relational langu-
Object Query Language (OQL) is an ODMGs query
age such as SQL by adding object-oriented features. The
language. It closely resembles SQL99, and it includes sup-
following discussion is primarily based on the SQL99
port for object sets and structures. It also has object exten-
standard (4,5):
sions to support object identity, complex objects, path
expressions, operation invocation, and inheritance.
Object Type. Objects are typed in an object-relational
The language bindings to Java, C, and Smalltalk are
database. A value of an object type is an instance of that
extensions of their respective language standards to allow
type. An object instance is also called an object. An object
the storage of persistent objects. Each binding includes
type consists of two parts: attributes and methods. Attri-
support for OQL, navigation, and transactions. The advan-
butes are properties of an object and hold values at a given
tage of such an approach is that users can build an entire
moment. The values of attributes describe an objects state.
database application from within a single programming
An attribute may be an instance of a declared object type,
language environment.
which can, in turn, be of another object type. Methods are
The following example shows the schema of two object
invoked and executed in response to a message. An object
types, Faculty and Course, in ODMG ODL:
type may have any number of methods or no method at all.
For instance, we can define an object type Address as
interface Faculty (extent Faculties, key fid) {
follows:
attribute integer fid;
attribute string name;
CREATE TYPE Address AS
attribute birthdate date;
(street varchar(20),
attribute salary integer;
city varchar(20),
relationship Set<Course> teachCourses
state varchar(2))
inverse Course::faculties;
METHOD change-address()
};
interface Course (extent Courses, key CID) {
attribute string CID; In the above, the object type Address contains the attri-
attribute string title; butes street, city, and state, and a method change-address().
relationship Set<Faculty>Faculties
inverse Faculty::teachCourses; Collection Type. Collection types such as sets, arrays,
}; and multisets are used to permit mulivalued attributes.
Arrays are supported by SQL99. The following attribute
definition illustrates the declaration of a Course-array that
where interface names an ODL description, extent names
contains up to 10 course names taught by a faculty member:
the set of objects declared, key declares the key, attribute
declares an attribute, set declares a collection type, rela-
tionship declares a relationship, and inverse declares an Course-array varchar(20) ARRAY [10]
inverse relationship to specify a referential integrity con-
straint. Large Object Type. To deal with multimedia data types
The following example shows an example query in such as texts, audios, images, and video streams, SQL99
ODMG OQL to retrieve the course IDs and course titles supports large object types. Two types of large objects (LOBs)
of the courses instructed by John Smith: can be defined depending on their locations: internal LOB
8 DATABASE LANGUAGES

and external LOB. Internal LOBs are stored in the database type. Redefining an inherited method allows the subtype
space, whereas external LOBs, or BFILEs (Binary FILEs), to execute its own method. Executing its own method
are stored in the file system that is outside of the database results in overriding an inherited method. For example,
space. The following example shows the declaration of some the type Research-assistant has its own method compute-
LOB types: salary(), which overrides computer-salary() defined in
Graduate-student:
Course-review CLOB (10KB)
Course-images BLOB (10MB) CREATE TYPE Research-assistant
Course-video BLOB (2GB) UNDER University-staff, Graduate-student
METHOD compute-salary()
Structured Type. In the relational model, the value of
an attribute must be primitive as required by the first In the above example, the subtype Research-assistant
normal form. However, the object relational model extends inherits the attributes and methods defined in University-
the relational model so that the value of an attribute can staff and Graduate-student. This is called multiple
be an object or a set of objects. For example, we may define inheritance.
an object type Faculty as follows:
Reference Type. A reference can refer to any object
create type Address AS created from a specific object type. A reference enables
(street varchar(20), users to navigate between objects. The keyword REF is
city varchar(20), used to declare an attribute to be of the reference type. The
state varchar(2)) restriction that the scope of a reference is the objects in a
create type Name as table is mandatory in SQL99. For example, we can include a
(firstname varchar(20), reference to the Faculty object type in the Graduate-student
middlename varchar(20), object type as follows:
lastname varchar(20))
create type Faculty as CREATE TYPE Graduate-student
(fid integer, UNDER University-personnel
name Name, (student-id char(10),
address Address, department varchar(20)
Course-array varchar(20) array[10]) advisor REF(Faculty) scope Faculty)

Type Inheritance. Inheritance allows an existing types Here, the reference is restricted to the objects of the
attributes and methods to be reused. Thus, it enables users Faculty table.
to construct a type hierarchy to support specialization
and globalization. The original type that is used to derive Extensible Markup Language (XML)
a new one is called a supertype and the derived type is called
a subtype. For example, we can define two types Graduate- Extensible Markup Language, abbreviated XML, des-
student and University-staff as two subtypes of University- cribes a class of data objects called XML documents, which
personnel as follows: are well formed (7). XML is a subset of Standard
Generalized Markup Language (SGML) and was originally
CREATE TYPE University-personnel AS developed for document management in the World Wide
(name Name, Web (WWW) environment as was the Hyper-Text Markup
address Address) Language (HTML). However, unlike SGML and HTML,
XML is also playing an important role in representing and
exchanging data.
CREATE TYPE Graduate-student
XML can be used for data-centric documents as well
UNDER University-personnel
as document-centric documents. In general, document-
(student-id char(10),
centric documents are used by humans and characterized
department varchar(20))
by less regular structures and larger grained data. On the
other hand, data-centric document are designed to faci-
CREATE TYPE University-staff
litate the communication between applications. When
UNDER University-personnel
XML is used for data-centric documents, many database
(years-of-experience: integer
issues develop, including mapping from the logical model
salary: integer)
to the XML data model, organizing, manipulating, query-
METHOD compute-salary()
ing, and storing XML data.
As other markup languages, XML takes the form of tags
Both Graduate-student and University-staff types
enclosed in a pair of angle brackets. Tags are used in pairs
inherit the attributes from the type University-personnel
with <tag-name> and </tag-name> delimiting the begin-
(i.e., name and address). Methods of a supertype are inher-
ning and the end of the elements, which are the funda-
ited by its subtypes, just as attributes are. However, a
mental constructs in an XML document. An XML document
subtype can redefine the method it inherits from its super-
consists of a set of elements that can be nested and may
DATABASE LANGUAGES 9

have attributes to describe each element. The nested ele- <!ELEMENT dcode (#PCDATA)>
ments are called subelements. For example, we may have a ]>
nested XML representation of a university information
document as follows: where the keyword # PCDATA refers to text data and its
name was derived from parsed character data.
<university> XML Schema (8) offers facilities for describing the struc-
<faculty> tures and constraining the contents of XML documents by
<fid> 91239876 </fid> exploiting the XML namespace facility. The XML Schema,
<name> John Smith </name> which is itself represented in XML and employs name-
<birthdate> 01/09/67 </birthdate> spaces, substantially reconstructs and considerably
<salary> 40000 </salary> extends the capabilities supported by DTDs. XML Schema
<dcode> 2 </dcode> provides several benefits: It provides user-define types, it
</faculty> allows richer and more useful data types, it is written in
<faculty> the XML syntax, and it supports namespaces. The follow-
<fid> 33489783 </fid> ing shows an XML Schema for a university information
<name> Perry Lee </name> document:
<birthdate> 12/08/55 </birthdate>
<salary> 68000 </salary> <xsd:schema xmlns:xsd="http://www.w3.org/
<dcode> 2 </dcode> 2001/XMLschema.xsd">
</faculty> <xsd:element name="university" type=
</university> "UniveristyType">
<xsd:elemant name="faculty">
XML Data Modeling. The mapping from the entity- <xsd:complexType>
relationship model to the XML data model is fairly straight- <xsd:sequence>
forward. An entity becomes an element, and the attributes <xsd:element name="fid" type="xsd:string"/>
of an entity often become subelements. These subelements <xsd:element name="name" type="xsd:string"/>
are sometimes consolidated into a complex type. Moreover, <xsd:element name="birthdate" type="xsd:string"/>
XML supports the concepts of collections including one-to- <xsd:element name="salary" type="xsd:decimal"/>
many and many-to-many relationships and references. </xsd:sequence>
Like the mapping from the ER model to the XML data </xsd:complexType>
model, mapping an XML schema to a relational schema is </xsd:element>
straightforward. An XML element becomes a table and <xsd:complexType name="UniversityType">
its attributes become columns. However, for an XML ele- <xsd:sequence>
ment that contains complex elements, key attributes must <xsd:element ref="faculty" minOccurs="0"
be considered depending on whether the element repre- maxOccurs="unbounded"/>
sents a one-to-many or many-to-many relationship. </xsd:sequence>
</xsd:complexType>
XML Document Schema. The document type definition </xsd:schema>
(DTD) language allows users to define the structure of a
type of XML documents. A DTD specification defines a set of XML Query Language. The World Wide Web Consortium
tags, the order of tags, and the attributes associated with (W3C) has been developing XQuery (9), a query language of
each tag. A DTD is declared in the XML document using the XML. XQuery uses the structure of XML and expresses
!DOCTYPE tag. A DTD can be included within an XML queries across diverse data sources including structured
document, or it can be contained in a separate file. If a DTD and semi-structured documents, relational databases, and
is in a separate file, say document.dtd, the corresponding object repositories. XQuery is designed to be broadly appli-
XML document may reference it using: cable across many types of XML data sources.
XQuery provides a feature called a FLWOR expression
<!DOCTYPE Document SYSTEM "document.dtd"> that supports iteration and binding of variables to inter-
mediate results. This kind of expression is often useful for
The following shows a part of an example DTD for a computing joins between two or more documents and
university information document: for restructuring data. The name FLWOR, pronounced
flower, came from the keywords for, let, where, order
<!DOCTYPE university [ by, and return.
<!ELEMENT university (faculty)> The for clause in a FLWOR expression generates a
<!ELEMENT faculty (fid name birthdate sequence of variables. The let clause allows complicated
salary dcode)> expressions to be assigned to variable names for simplicity.
<!ELEMENT fid (#PCDATA)> The where clause serves to filter the variables, retaining
<!ELEMENT name (#PCDATA)> some result and discarding the others. The order by clause
<!ELEMENT birth-date (#PCDATA)> imposes an ordering on the result. The return clause con-
<!ELEMENT salary (#PCDATA)> structs the result of the FLWOR expression.
10 DATABASE LANGUAGES

A simple FLWOR expression that returns all faculty For example, suppose that the following table stores
members whose salary is over $50,000 by checking the Perry Lees salary history:
salaries based on an XML document is as follows:
fid name birth-date rank salary Ts Te
for $x in /university/faculty/name
33489783 Perry Lee 12/08/55 Assistant 40000 01/01/91 12/31/97
where $x/salary > 50000
33489783 Perry Lee 12/08/55 Associate 52000 01/01/98 12/31/02
return <fid>$x </fid> 33489783 Perry Lee 12/08/55 Full 68000 01/01/03 12/31/03

where /university/faculty is a path expression (10) that


shows a sequence of locations separated by /. The initial The following query retrieves Perry Lees history in
/ indicated the root of the document. The path expression / TSQL2;
university/faculty/name would return <name>John
Smith</name> <name>Perry Lee</name>. With a con- Query: Retrieve Perry Lees salary history.
dition, $x/salary > 50000, the tuple <name>Perry
Lee</name> is returned as the result for the above SELECT salary
XQuery. FROM Faculty
WHERE Name Perry Lee
ADVANCED DATABASE MODELS AND LANGUAGES
Spatial Data Models and Languages
Although relation, object-oriented, and object-relational Spatial databases deal with spatial objects. For modeling
databases have been used successfully in various areas, spatial objects, the fundamental abstractions are point,
specialized databases are required for many applications. line, and region. A point can be represented by a set of
For example, in order to deal with temporal data, spatial numbers. In a two-dimensional space, a point can be
data, and rules, we may need a temporal database, spatial modeled as (x, y). A line segment can be represented by
database, and active database, respectively. two endpoints. A polyline consists of a connected sequence
of line segments. An arbitrary curve can be modeled as a
Temporal Database Models and Languages set of polylines. We can represent a polygon by a set of
Time is an important aspect of real-world applications. vertices in order. An alternative representation of polygon
However, most nontemporal database models do not is to divide a polygon into a set of triangles. The process
capture the time-varying nature of the problems they of dividing a more complex polygon into simple triangles
model. Nontemporal databases represent the current is called triangulation. Geographic databases are a subset
state of a database and their languages provide inadequate of spatial databases created for geographic information
support for time-varying applications. management such as maps. In a geographic database, a
In general, a temporal database must support time city may be modeled as a point. Roads, rivers, and phone
points, time intervals, and relationships involving time cables can be modeled as polylines. A country, a lake, or a
such as before, after, and during. Temporal data models national park can be modeled as polygons.
also need to represent time-varying information and In nonspatial databases, the most common queries are
time-invariant information separately. The temporal rela- exact match queries, in which all values of attributes
tional model (11) extends the relational model based on the must match. In a spatial database, approximations such
above consideration. In this model, a database is classified as nearness queries and region queries are supported.
as two sets of relations Rs and Rt, where Rs is the set of Nearness queries search for objects that lie near a specified
time-invariant relations and Rt is the set of time-varying location. A query to find all gas stations that lie within a
relations. Every time-variant relation must have two time given distance of a car is an example of a nearness query.
stamps (stored as attributes): time start (Ts) and time A nearest-neighbor query searches for the objects that
end (Te). An attribute value is associated with Ts and are the nearest to a specified location. Region queries
Te if it is valid in [Ts, Te]. (range queries) search for objects that lie inside or partially
TSQL2 is an extension of SQL92 with temporal con- inside a specified region. For example, a query to locate
structs. TSQL2 allows both time-varying relations and all the restaurants in a given square-mile area is a region
time-invariant relations. Thus, SQL92 is directly applic- query. Queries may also request intersections and unions of
able to time-invariant relations. TSQL2 has been proposed regions. Extensions of SQL have been proposed to permit
to be included as a part of SQL99. TSQL2 has a number of relational databases to store and retrieve spatial informa-
major temporal constructs as illustrated by the following tion to support spatial queries as illustrated below (12):
example relation:
Query: Find all gas stations within 5 miles from the
current location of the car 1001
Faculty (fid, name, birthdate, rank, salary, Ts, Te)
SELECT g.name
where a tuple (f, n, b, r, s, Ts, Te) states the salary history of
FROM Gas AS g, Car AS c
a faculty member whose name is n and birth-date is b.
WHERE c.id 1001 and
distance (c.location , g.location) < 5
DATABASE LANGUAGES 11

Table 1. Comparison of database languages


Object- Object-
Relational Relational Oriented XML Temporal Spatial Active
Structure Flat table Nested table Class XML Table with time Table Table with
document trigger
Query type Declarative Declarative Procedural, Declarative Declarative Declarative Declarative
Declarative
Language SQL SQL99 Persistent C XQuery TSQL, SQL99 SQL99 SQL99
Optimization System System User System System System System

ACTIVE DATABASE MODELS AND LANGUAGES where <trigger-event> is a monitored database operation,
<condition> is an arbitrary SQL predicate, and <action>
Conventional database systems are passive. In other is a sequence of SQL procedural statements that are
words, data are created, retrieved, and deleted only in serially executed. A trigger may be executed BEFORE or
response to operations posed by the user or from application AFTER the associated event, where the unit of data that
programs. Sometimes, it is more convenient that a database can be processed by a trigger may be a tuple or a transac-
system itself performs certain operations automatically in tion. A trigger can execute FOR EACH ROW (i.e., each
response to certain events or conditions that must be modified tuple) or FOR EACH STATEMENT (i.e., an entire
satisfied. Such systems are called active. Typically, an SQL statement).
active database supports (1) specification and monitoring
of general integrity constraints, (2) flexible timing of con-
CONCLUSION
straint verification, and (3) automatic execution of actions.
A major construct in active database systems is the
We have considered several modern database languages
notion of event-condition-action (EAC) rules. An active
based on their underlying data models. The main criterion
database rule is triggered when its associated event occurs;
used to classify database languages is the data model on
in the meantime, the rules condition is checked and, if the
which they are defined. A comparison of the database
condition is true, its action is executed. Typical triggering
languages discussed in this article is summarized in
events include data modifications (i.e., insertion, deletion,
Table 1.
and update), data retrieval, and user-defined events. The
condition part of an ECA rule is a WHERE clause and an
action could be a data modification, data retrieval, or call to BIBLIOGRAPHY
a procedure in an application program. The following SQL-
like statement illustrates the use of an ECA rule: 1. A. Silberschatz, H. F. Korth, and S. Sudarshan, Data models,
ACM Comput. Surveys, 28 (1): 105108, 1996.
<EVENT>: UPDATE Faculty 2. P. P. Chen, The entity-relationship model: Toward a unified
Set salary salary  1.1 view of data, ACM Trans. Database Syst., 1 (1): 936, 1976.
<CONDITION>: salary > 100000 3. E. F. Codd, A relational model for large shared data banks,
<ACTION>: INSERT INTO High-paid-faculty-member Commun. ACM, 13 (6): 377387, 1970.
4. IBM DB2 Universal Database SQL Reference Volume 1 Version
Several commercial relational database systems sup- 8, 2002.
port some forms of active database rules, which are usually 5. Oracle 9i Application Developers Guide Object-Relational
referred to as triggers. In SQL99, each trigger reacts to a Features, Release 1 (9.0.1), June 2001, Part No. A88878-01.
specific data modification on a table. The general form of a 6. ODMG3.0. Available: http://www.service-architecture.com/
trigger definition is as follows (13): database/articles/odmg_3_0.html.
7. Extensible Markup Language (XML) 1.0. Available: http://
<SQL99 trigger>:: CREATE TRIGGER <trigger name> www.w3.org/TR/1998/REC-xml-19980210#dt-xml-doc.
{BEFORE|AFTER }<trigger event> 8. XML Schema Part 1: Structures. Available: http://
ON <table name> www.w3.org/TR/2001/REC-xmlschema-1-20010502/struc-
[FOR EACH {ROW|STATEMENT}] tures.xml.
WHEN <condition> 9. XQuery 1.0: An XML Query Language. Available: http://
<SQL procedure statements> www.w3.org/TR/xquery/.
<trigger-event>:: INSERT|DELETE|UPDATE 10. XML Path Language (XPath) Version 1.0. Available: http://
www.w3.org/TR/xpath.
12 DATABASE LANGUAGES

11. T. Theory, Database Modeling & Design. San Francisco, CA: C. Zaniolo, S. Ceri, C. Faloutsos, R. Snodgrass, V. Subrahmanian,
Morgan Kaufmann, 1999. and R. Zicari, Advanced Database Systems. San Francisco, CA:
12. M. Stonebaker and P. Brown, Object-Relational DBMSs Morgan Kaufmann, 1997.
Tracking the Next Great Wave. San Francisco, CA: Morgan
Kaufmann, 1999.
13. J. Widom and S. Ceri, Active Database Systems: Triggers and GEORGE (TAEHYUNG) WANG
Rules For Advanced Database Processing. San Mateo, CA: California State University,
Northridge
Morgan Kaufmann, 1996.
Northridge, California
PHILLIP C-Y SHEU
FURTHER READING University of California, Irvine
Irvine, California
R. Elmarsri and S. B. Navathe, Fundamentals of Database Sys- ATSUSHI KITAZAWA
tems. Menlo Park, CA: Benjamin/Cummings, 1994. HIROSHI YAMAGUCHI
NEC Soft, Ltd.
A. Silberschatz, H. F. Korth, and S. Sudarshan, Database System
Japan
Concepts. New York: McGraw-Hill, 2002.
M. Stonebraker and J. Hellerstein (eds.), Readings in Database
Systems, San Francisco, CA: Morgan Kaufmann, 1998.
D
DATA COMMUNICATION tude to a digital data, and delta modulation (DM) that maps
the change from the previous sampled value to a digital
INTRODUCTION data.
The source encoder employs data compression coding to
This chapter considers data communication as the data reduce data redundancy and communication capacity
exchange process between devices linked directly by a requirements for more efficient data transmission over
transmission medium with or without multiaccess, and the communication channel. Lossless compression algo-
without intermediate switching nodes. The scope of discus- rithms (e.g., Huffman) result in decompressed data that
sion is confined to the physical and data link layers in the is identical to the original data. Lossy compression algo-
Open Systems Interconnection (OSI) reference model. rithms (e.g., discrete cosine transform, wavelet compres-
The physical layer focuses on the exchange of an sion) result in decompressed data that is a qualified
unstructured data bit stream via modulated electromag- approximation to the original data. Information theory
netic signals (i.e., electrical and optical) transmission over a defines the compression ratio limit without data informa-
physical link channel. Modulation determines the spectral tion loss for a given data stream (1).
efficiency or the ratio of transmitted data bit rate to the The transmitter interface consists of the channel enco-
signal bandwidth. Data bits may be received in error when der and the signal waveform generator in the form of a
signal waveforms are impaired by channel noises. Long- digital modulator. The channel encoder employs error-
distance transmission involves signal propagation and detection or error-correction coding to introduce structured
regeneration by repeaters. Unlike analog transmission, redundancy in digital data to combat signal degradation
digital transmission must recover the binary data content (noise, interference, etc.) in channel. The digital modulator
first before regenerating the signals. The physical layer enables baseband or passband signaling for digital data.
specifies the mechanical and the electromagnetic charac- The digital baseband modulator maps the digital data
teristics of the transmission medium, and the access inter- stream to the modulated pulse train of discrete-level digital
face between the device and the transmission medium. signals. The digital passband modulator maps the digital
Transmission between two devices can be simplex (unidir- data stream to the modulated sinusoidal waveform of con-
ectional), full-duplex (simultaneous bidirectional), or half- tinuous-level analog signals.
duplex (bidirectional but one direction at a time). The transmitted digital or analog signals propagate
The data link layer is concerned with the exchange of through the physical medium (wire or wireless) of a com-
structured data bit stream via frames over a logical link munication channel. Signal transmission impairments can
channel with error recovery control to optimize link relia- be caused by the attenuation of signal energy along propa-
bility. Channel coding adds structured redundancy to the gation path, delay distortions because of the propagation
data bit stream to enable error detection or error correction. velocity variation with frequency, and noises because of the
Each frame consists of data payload and control overhead unwanted energy from sources other than transmitter.
bits, which convey control procedures between sending and Thermal noise is caused by the random motion of electrons.
receiving devices. Link control procedures include flow Cross talk noise is caused by the unwanted coupling
control, error recovery, and device addressing in multi- between signal paths. Impulse noise is a spike caused by
access medium. external electromagnetic disturbances such as lightning
and power line disturbances.
Elements of Data Communication System The receiver interface consists of the channel decoder
and the signal waveform detector or digital demodulator.
Figure 1 illustrates the elements of a data communication
The digital demodulator converts the incoming modulated
system. The elements include digital source, digital sink,
pulse train or sinusoidal waveform to a digital data stream
transmitter interface, receiver interface, and physical med-
with potential bit errors incurred by signal transmission
ium of a communication channel.
impairments. The channel decoder detects or corrects bit
The digital source consists of data source and source
errors in received data.
encoder. The data source generates either an analog signal
The digital sink consists of a source decoder and a data
(e.g., audio, video), or a digital data stream (sequence of
sink. The source decoder maps incoming compressed digital
discrete symbols or binary bits stored in computing mem-
data into original digital data transmitted by the data
ory) to the source encoder. The analog-to-digital converter
source. The digital-to-analog converter (DAC) converts a
(ADC) converts an analog signal to a digital data stream of
digital data stream to an analog signal. The data sink
bits through discrete sampling and quantization of the
receives either an analog signal or a digital data from
analog signal. Common ADC schemes include pulse code
the source decoder.
modulation (PCM) that maps each sampled signal-ampli-

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DATA COMMUNICATION

Digital Source Transmitter Interface

Data Source Signal


Source Waveform
Analog Signal ADC Encoder Channel
Encoder Generator
(Compressor) (Modulator)
Digital
DigitalData
Data

ADC: Analog to Digital Converter Communication


DAC: Digital to Analog Converter Channel

Digital Sink Receiver Interface


Data Sink
Source Signal
Analog Signal DAC Decoder Channel Waveform
(Decompressor) Decoder Detector
DigitalData
Digital Data (Demodulator)

Figure 1. Elements of data communication system.

PHYSICAL LAYER magnetic beam and the receiving antenna must be aligned
properly for signal reception. For omni-directional wireless
Communication Channel transmission, the transmitted signal spreads out in all
directions to enable reception by many antennas. Antenna
The physical medium of a communication channel is used to
size depends on the operating frequency of electromagnetic
transmit electromagnetic signals from the transmitter to
wave (2).
the receiver. The physical media can be either guided media
Wireless transmission in the air medium commonly is
for wired transmission, or unguided media for wireless
classified according to the operational frequency ranges or
transmission. A signal that propagates along a guided
bands of the electromagnetic signals. These signals include
medium is directed and is contained within a physical
radio waves that range from 3 KHz to 1 GHz, microwaves
conductor. An unguided medium transports signal without
that range from 1 GHz to 300 GHz, and infrared waves that
using a physical conductor.
range from 300 GHz to 400 THz. Radio waves mostly are
Guided media include twisted-pair cable, coaxial cable,
omni-directional; these waves are appropriate for multi-
and optical fiber. Figure 2 shows the electromagnetic spec-
casting or broadcasting communication. Their applications
trum used by wired transmission in these guided media.
include AM and FM radio, television, and cordless phones.
Consisting of two insulated copper conductors twisted
Microwaves are unidirectional and are appropriate for
together; twisted-pair cables commonly are used in sub-
unicast communication. Their applications include cellu-
scriber loops to telephone networks. Coaxial cable consists
lar, satellite, and wireless local area networks. Infrared
of an inner solid wire conductor surrounded by an outer
waves are unidirectional and cannot penetrate physical
conductor of metal braid, with an insulting ring between
barriers, thus they can be used for short-range unicast
the two conductors. Coaxial cables are used widely in cable
communication. Their applications include communica-
TV networks, local area networks, and long-distance tele-
tions between computers and peripheral devices such as
phone networks. Coaxial cable offers a larger bandwidth
keyboards, mice, and printers. Figure 2 shows the electro-
and less interference or crosstalk than that of twisted-pair
magnetic spectrum used by wireless transmission in the air
cable.
medium.
Consisting of a thin glass or plastics central core sur-
Channel capacity is the maximum rate at which data can
rounded by a cladding layer, optical fiber transports light
be transmitted over a medium, using whatever means, with
signal through the core by means of reflection. Optical fiber
negligible errors. For binary digital data, the transmission
offers a wider bandwidth, lower attenuation, and lighter
rate is measured in bits-per-seconds (bps). Channel
weight than that of coaxial or twisted-pair cables. The
capacity increases with transmission bandwidth (W in
wider bandwith is achieved at a relatively higher cost.
Hz) and increases with the ratio of received signal power
Optical fiber cables commonly are used in backbone net-
(S in Watts) to noise power (R in Watts); also it is limited
works and in long-haul undersea links because its wide
by the Shannon theorem: Channel Capacity Wlog2 (1
bandwidth is cost effective.
S/R).
Unguided media include the air atmosphere, outer
space, and water. Wireless transmission and the reception
Channel Transmission Impairments. Communication
of electromagnetic signals in unguided media are accom-
channels impair transmitted signals, and the exact form
plished through an antenna. For unidirectional wireless
of signal degradation depends primarily on the type of
transmission, the transmitted signal is a focused electro-
transmission medium. Affecting all channels, additive
DATA COMMUNICATION 3

Unguided Air Medium Frequency Band Guided Media receiver so as to minimize BER subject to given power
Wireless Transmission Wired Transmission
and bandwidth constraints; or to minimize power and/or
1015 Hz Visible Light Optical Fiber bandwidth subject to given BER objective.
1014 Hz
Communication Channel Models. The simplest and most
1013 Hz
Infrared
Infrared used model for both wireline and wireless communication
Waves 1012 Hz channels is the additive noise channel. The cumulative
noises are caused by thermal noise in the channel and
100 GHz Extremely High Frequency (EHF) electronic noise in devices. Under this model, the commu-
nication channel is assumed to add a random noise process
Microwaves 10 GHz Super High Frequency (SHF) on the transmitted signal. When the statistics of the noise
1 GHz
process is assumed to be uncorrelated (white) Gaussian, the
Ultra High Frequency (UHF)
model is known as additive white Gaussian noise (AWGN)
100 MHz Very High Frequency (VHF) channel. Channel attenuation can be incorporated into this
model by introducing a multiplicative term. The linear filter
Radio 10 MHz High Frequency (HF)
Waves channel model is similar to the additive noise channel,
Coaxial
1 MHz Medium Frequency (MF) Cable
which differs only in the linear filtering operation that
Twisted precedes noise addition. For wireline channels, the filtering
100 kHz Pair
Low Frequency (LF)
Cable effect usually is assumed to be time-invariant.
10 kHz Very Low Frequency (VLF)
Digital transmission over wireless mobile channels
must account for signal fading because of multipath pro-
1 kHz
Audio Band
pagation and Doppler shift. Multipath propagation occurs
when a direct line-of-sight (LOS) path and multiple indirect
paths exist between a transmitter and a receiver. Signal
Figure 2. Electromagnetic spectrum used for wired
components that arrive at a receiver with different delay
and wireless transmission. shifts and combine in a distorted version of the transmitted
signal. Frequency-selective fading occurs when the ampli-
tudes and the phases of the signals frequency components
are distorted or faded independently.
Doppler shift occurs when a transmitter and a receiver
noise is an unwanted electromagnetic signal that is super- are in a relative motion, which causes the multipath
imposed on the transmitted waveform. Noise is the single received signal components to undergo different frequency
most important factor that limits the performance of a shifts and to combine in a distorted version of the trans-
digital communication system. Other channel impairments mitted signal. Time-selective fading occurs when the sig-
include attenuation, dispersion, and fading. Attenuation is nals time components are faded independently.
the decrease of transmitted signal strength as observed A wireless mobile channel is modeled as a Rayleigh
over distance. Dispersion is caused by delay distortions. fading channel when a dominant path does not exist among
Dispersion in wireless medium is caused by multipath direct and indirect paths between the transmitter and the
propagation, which occurs when a transmitted signal is receiver. The rayleigh model can be applied in complex
received via multiple propagation paths of different delays. outdoor environments with several obstructions, such as
It leads to inter-symbol interference (ISI), or the smearing urban downtown. A wireless mobile channel is modeled as a
of transmission pulses that represent transmitted symbols Rican fading channel when a dominant direct or LOS path
causing mutual interference between adjacent symbols. exists. The rican model can be applied in an open-space,
Fading is another problem that is associated with multi- outdoor environment or an indoor environment.
path propagation over a wireless medium. It occurs when
signal components that arrive via different paths add Digital Modulation: Signal Waveform Generation
destructively at the receiver.
In wireline medium, the dispersion and the ISI is caused Digital modulation enables a digital data stream to encode
by amplitude and phase distortion properties of the parti- its information contents onto a pulse train signal via base-
cular medium. The ISI could be minimized by several band modulation, or onto a sinusoidal carrier signal via
techniques, including limiting data rate R to less than twice passband modulation. Each signal element of the resulting
the channel bandwidth W (i.e., R < 2W), pulse shaping waveform can carry one or more data elements or bits of the
(e.g., raised cosine spectrum), adaptive equalization, and data stream. The data rate and the signal rate measures
correlative coding. respectively the number of bits and signal elements trans-
The objective of the data communication system design mitted in one second. The signal rate is also referred as the
is to implement a system that minimizes channel impair- baud rate or modulation rate. The signal rate is propor-
ments. The performance of the digital channel is measured tional directly to the date rate, and proportional inversely
in terms of bit-error-probability or bit-error-rate (BER), to the number of data elements carried per signal element.
block-error probability, and error-free seconds. The com- Besides single-carrier modulation (baseband and pass-
munication problem can be stated as follows: given the band), this section will also present spreading code mod-
communication medium, data rate, design transmitter/ ulation (i.e., spread spectrum) that hides the signal behind
4 DATA COMMUNICATION

the noise to minimize signal jamming and interception. ing (ASK), phase shift keying (PSK), and frequency shift
Multicarrier modulation maximizes the spectral efficiency keying (FSK).
of a frequency-selective fading channel. In binary ASK, the binary data values are mapped to two
distinct amplitude variations; one of them is zero and the
Digital Baseband Modulation. Digital baseband modula- other one is specified by the presence of the carrier signal.
tion or line coding is the process of converting a digital data In binary FSK, the binary data values are mapped to two
stream to an amplitude modulated pulse train of discrete- distinct frequencies usually that are of equal but opposite
level for transmission in low-pass communication channel. offset from the carrier frequency. In binary PSK, the binary
The pulse amplitude modulation formats or line codes data values are mapped to two distinct phases of the carrier
include unipolar, polar, bipolar, and biphase. For unipolar signal; one of them with a phase of 0 degrees, and the other
codes, the signal has single polarity pulses, which results in one with a phase of 180 degrees.
a direct current (DC) component. Unipolar codes include In M-ary or multilevel ASK, FSK, and PSK modulation,
unipolar return-to-zero (RZ) that specifies on pulses for each signal element of M-levels carries log2M bits. Quad-
half bit duration followed by a return to the zero level; and rature amplitude modulation (QAM) combines ASK and
unipolar non-return-to-zero (NRZ) that specifies on PSK. In QAM, two carriers (one shifted by 90 degrees in
pulses for full bit duration. phase from the other) are used with each carrier that is ASK
For polar and bipolar codes, the signal has opposite modulated.
polarity pulses, which reduce the DC component. Polar
codes include polar NRZ with signal levels that include Spreading Code Modulation: Spread Spectrum. Spreading
positive and negative, and polar RZ with signal levels that spectrum (4) enables a narrow-band signal to spread across
include positive, negative, and zero. Bipolar codes specify a wider bandwidth of a wireless channel by imparting its
that data bits with one binary level are represented by zero, information contents onto a spreading code (generated by a
whereas successive data bits with the other binary level are pseudo-noise or pseudo-number generator), with the com-
represented by pulses with alternative polarity. Bipolar bined bit stream that attains the data rate of the original
codes include bipolar alternate mark inversion or pseudo- spreading code bit stream. Spread spectrum technique
ternary with signal levels that include positive, negative, hides the signal behind the noise to minimize signal jam-
and zero. ming and interception. Two common techniques to spread
For biphase codes, a transition at the middle of each data signal bandwidth are frequency hopping spreading
bit period always exists to provide clocking synchroniza- spectrum (FHSS) and direct sequence spread spectrum
tion. Biphase codes include Manchester that specifies low- (DSSS).
to-high and high-to-low transitions to represent 1 and 0 On the transmitter side, FHSS enables the original
bits, respectively, and differential Manchester that com- signal to modulate or to hop between a set of carrier
bines transitions at the beginning and the middle of data bit frequencies at fixed intervals. A pseudo-random number
periods. generator or pseudo-noise (PN) source generates a spread-
The selection of signaling type depends on design con- ing sequence of numbers, with each one serving as an index
siderations such as bandwidth, timing recovery, error into the set of carrier frequencies. The resulting bandwidth
detection, and implementation complexity. Bipolar and of the modulated carrier signal is significantly greater than
biphase signaling have no DC spectral component. Also, that of the original signal. On the receiver side, the same
the main lobe of biphase spectrum is twice as wide as NRZ spreading sequence is used to demodulate the spread spec-
and bipolar (tradeoff between synchronization or timing trum signal.
recovery and bandwidth). On the transmitter side, DSSS spreads the original
Signal waveform detection or demodulation recovers the signal by replacing each data bit with multiple bits or chips
original data sequence from the incoming signal at the using a spreading code. A PN source generates a pseudo-
receiver end. The original data sequence is subjected to random bit stream, which combines with the original signal
channel impairments. Consider the simplest case of NRZ through multiplication or an exclusive-OR operation to
signaling. The simplest detection is to sample the received produce the spread spectrum signal. On the receiver
pulses at the mid-points of bit periods. This detection side, the same spreading code is used to despread the
method suffers from the poor noise immunity. Optimum spread spectrum signal. Multiple DSSS signals can share
detection employs a correlator or a matched filter (integrate the same air link if appropriate spreading codes are used
and dump for NRZ). This achieves better noise immunity such that the spread signals are mutually orthogonal (zero
because the noise perturbation is averaged over bit period. cross-correlation), or they do not interfere with the dis-
preading operation of a particular signal.
Digital Passband Modulation. Digital passband modula-
tion is the process of converting a digital data stream to a Multi-carrier Modulation: Orthogonal Frequency Division
modulated sinusoidal waveform of continuous-level for Multiplexing (OFDM). OFDM coverts a data signal into
transmission in band-pass communication channel, which multiple parallel data signals, which modulate multiple
passes frequencies in some frequency bands (3). The con- closely spaced orthogonal subcarriers onto separate sub-
version process imbeds a digital data stream onto a sinu- channels. Each subcarrier modulation employs conven-
soidal carrier by changing (keying) one or more of its key tional single-carrier passband signaling scheme, such as
parameters such as amplitude, phase, or frequency. Digital quadrature phase shift keying (QPSK). When a rectan-
passband modulation schemes include amplitude shift key- gular subcarrier pulse is employed, OFDM modulation
DATA COMMUNICATION 5

can be performed by a simple inverse discrete fourier output line. Short-term demand exceeding link capacity
transform (IDFT) to minimize equipment complexity. is handled by buffering within the multiplexer.
OFDM increases the spectral efficiency (ratio of trans-
mitted data rate to signal bandwidth) of a transmission Code Division Multiplexing (CDM). CDM divides a wire-
channel by minimizing subcarrier frequency channel less channel into code channels assigned to different data
separation while maintaining orthogonality of their cor- signals, each of which modulates an associated unique
responding time domain waveforms; and by minimizing spreading code to span the whole spectrum of the wireless
intersymbol interference (e.g., in mulitpath fading chan- channel (see previous section on spread spectrum modula-
nel) with lower bit-rate subchannels. tion). A receiver retrieves the intended data signal by
demodulating the input with the associated spreading
Multiplexing code. CDM employs orthogonal spreading codes (e.g.,
Walsh codes) in which all pair-wise cross correlations are
Multiplexing is a methodology to divide the resource of a
zero.
link into accessible components, to enable multiple data
devices to share the capacity of the link simultaneously or
OFDM. OFDM divides a link into multiple frequency
sequentially. Data devices access a link synchronously
channels with orthogonal subcarriers. Unlike FDM, all of
through a single multiplexer. In a later section on general
the subchannels are assigned to a single data signal.
multiple access methodology, data devices can access a link
Furthermore, OFDM specifies the subcarriers to maintain
synchronously or asynchronously through distributed
orthogonality of their corresponding time domain wave-
access controllers.
forms. This technigue allows OFDM to minimize guard-
band overhead even though signal spectra that corresponds
Frequency Division Multiplexing (FDM). FDM divides a
to the subcarriers overlap in the frequency domain. OFDM
link into a number of frequency channels assigned to
can be used to convert a broadband and a wireless channel
different data sources; each has full-time access to a portion
with frequency-selective fading into multiple frequency-
of the link bandwidth via centralized access control. In
flat subcarrier channels (i.e., transmitted signals in sub-
FDM, signals are modulated onto different carrier frequen-
carrier channels experience narrowband fading). The
cies. Each modulated signal is allocated with a frequency
multi-carrier modulation aspect of OFDM has been dis-
channel of specified bandwidth range or a band centered on
cussed in a previous section.
its carrier frequency. Guard bands are allocated between
adjacent frequency channels to counteract inter-channel
Multiplexed Transmission Network: Synchronous Optical
interference. Guard bands reduce the overall capacity of a
Network (SONET). TDM-based transmission networks
link.
employ either back-to-back demultiplexermultiplexer
Wavelength division multiplexing is similar to FDM, but
pairs or add-drop multiplexers (ADMs) to add or to extract
it operates in the optical domain. It divides an optical link or
lower-rate signals (tributaries) to or from an existing high-
a fiber into multiple optical wavelength channels assigned
rate data stream. Former plesiochronous TDM-based
to different data signals, which modulate onto optical car-
transmission networks require demultiplexing of a whole
riers or light beams at different optical wavelengths. Opti-
multiplexed stream to access a single tributary, and then
cal multiplexers and demultiplexers can be realized via
remultiplexing of the reconstituted tributaries via back-to-
various mechanical devices such as prisms and diffraction
back demultiplexermultiplexer pairs. Current synchro-
gratings.
nous TDM-based transmission networks employ ADMs
that allow tributaries addition and extraction without
Time Division Multiplexing (TDM). TDM divides a link
interfering with other bypass tributaries.
into a number of time-slot channels assigned to different
The SONET employs electrical ADMs and converts the
signals; each accesses the full bandwidth of the channel
high-rate data streams into optical carrier signals via
alternately at different times via centralized transmission
electrical-optical converters for transmission over optical
access control. The time domain is organized into periodic
fibers. SONET ADMs can be arranged in linear and ring
TDM frames, with each frame containing a cycle of time
topologies to form a transmission network. SONET stan-
slots. Each signal is assigned with one or more time-slots in
dard specifies the base electrical signal or synchronous
each frame. Therefore, the time-slot channel is the
transport signal level-1 (STS-1) of 51.84 Mbps, and the
sequence of slots assigned from frame to frame. TDM
multiplexed higher-rate STS-n electrical signals with cor-
requires a guard-time for each time slot to counteract
responding optical carrier level-n (OC-n) signal. Repeating
inter-channel interference in the time domain.
8000 times per second, a SONETSTS-1 frame (9  90 byte-
Instead of preassigning time slots to different signals,
array) consists of transport overhead (9  3 byte-array) that
statistical time division multiplexing (asynchronous TDM
relates to the transmission section and line, and to the
with on-demand sharing of time slots) improves bandwidth
synchronous payload envelope (9  87 byte-array) includ-
efficiency by allocating time slots dynamically only when
ing user data and transmission path overhead. A pointer
data sources have data to transmit. In statistical TDM, the
structure in the transport overhead specifies the beginning
number of time slots in each frame is less than the number
of a tributary, and this structure enables the synchroniza-
of data sources or input lines to the multiplexer. Data from
tion of frames and tributaries even when their clock fre-
each source is accompanied by the line address such that
quencies differ slightly.
the demultiplexer can output the data to the intended
6 DATA COMMUNICATION

DATA LINK LAYER tion and the correction capability of a coding scheme.
Channel coding schemes include block coding and convolu-
The physical layer of data communications provides an tional coding schemes (5).
exchange of data bits in the form of a signal over a trans- In block coding, data bits are grouped into blocks or
mission link between two directly connected devices or datawords (each of k bits); and r redundant bits are added to
stations. The data link layer organizes the bit stream each block to form a codeword (each of n k + r bits). The
into blocks or frames with control information overhead, number of possible codewords is 2n and 2k of them are valid
and provides a reliable exchange of data frames (blocks of codewords, which encode the datawords.
bits) over a data communication link between transmitter The Hamming distance dH between two codewords is the
and receiver devices. Using a signal transmission service number of bit positions in which the corresponding bits
provided by the physical layer, the data link layer provides differ, e.g., dH (01011, 11110) 3. The minimum distance
a data communication service to the network layer. Main dmin of a block code (that consists of a set of valid codewords)
data link control functions include frame synchronization, is the minimum dH between any two different valid code-
flow control and error recovery (particularly important words in the set, e.g., dmin (00000, 01011, 10101, 11110) 3. A
when a transmission link is error prone), and medium block code with dmin can detect all combinations of (dmin1)
access control to coordinate multiple devices to share and errors. A block code with dmin can correct all combinations of
to access the medium of a transmission link. errors specified by the largest integer that is less than or
equal to (dmin1)/2.
Figure 3 illustrates the error detection operation based
FRAME SYNCHRONIZATION
on the parity check code. The channel encoder adds a parity
bit to the 7-bit dataword (1100100) to produce an even-
A data frame consists of a data payload field and control
parity 8-bit codeword (11001001). The signal waveform
information fields in the form of header, trailer, and flags.
generator maps the codeword into a NRZ-L baseband sig-
Headers may include start of frame delimiter, character or
nal. The received signal was corrupted by channel noise,
bit constant, control signaling, and sender and receiver
one of the 0 bits was received and it was detected as a 1 bit.
address. Trailes may include an error detection code and
The channel decoder concludes that the received odd-parity
an end of frame delimiter. The framing operation packages
codeword (11000001) is invalid.
a sending data message (e.g., network layer data packet)
Block codes that are deployed today are mostly linear,
into data frames for transmission over the data link. The
rather than nonlinear. For linear block codes, the modulo-2
frame design should enable a receiver to identify an indi-
addition of two valid codewords creates another valid code-
vidual frame after an incoming bit stream is organized into
word. Common linear block coding schemes include simple
a continuous sequence of frames.
parity check codes, hamming codes, and cyclic redundancy
The beginning and the ending of a data frame must be
check (CRC) codes. In a CRC code, the cyclic shifted version
identifiable uniquely. Frames can be of fixed or variable
of a codeword is also a codeword. This allows for simple
size. Fixed size frames can be delimited implicitly. Variable
implementation by using shift registers. BoseChaudhuri
size frames can be delimited explicitly through a size count
Hocqunghem (BCH) codes constitute a large class of power-
encoded in a header field. Transmission error could corrupt
ful cyclic block codes. ReedSolomon (RS) codes commonly
the count field, so usually the count field is complemented
are used in commercial applications, such as in digital
with starting/ending flags to delimit frames.
subscriber line for Internet access and in video broadcast-
In a character-oriented protocol, a data frame consists of
ing for digital video. For integers m and t, RS coding
a variable number of ASCII-coded characters. Special flag
operates in k symbols of data information (with m bit per
characters are used to delimit the beginning and the end of
symbol), n symbols (2m  1) of data block, and 2t symbols of
frames. When these special flag characters appear in the
redundancy with dmin 2t + 1.
data portion of the frame, character stuffing is used by the
If the data source and the sink transmit and receive in a
sender to insert an extra escape character (ESC) character
continuous stream, a block code would be less convenient
just before each flag character, followed by the receiver to
than a code that generates redundant bits continuously
remove the ESC character.
without bits blocking. In convolutional coding, the coding
In a bit-oriented protocol, a data frame consists of a
structure extends over the entire transmitted data stream
variable number of bits. Special 8-bit pattern flag 01111110
effectively, instead of being limited to data blocks or code-
is used to delimit the frame boundary. To preserve data
words as in block coding. Convolutional or trellis coding is
transparency through bit stuffing, the sender inserts an
applicable for communication systems configured with
extra 0 bit after sending five consecutive 1 bits, and the
simple encoders and sophisticated decoders; such as space
receiver discards the 0 bit that follows five consecutive 1
and satellite communication systems.
bits.
The channel coding selection for a channel should
account for the channel condition, including channel error
Channel Coding
characteristics. All block and convolutional codes can be
Channel encoding is the process of introducing structured used in AWGN channels that produce random errors.
redundancy in digital data to allow the receiver to detect or However, convolutional codes tend to be ineffective in fad-
to correct data errors caused by to transmission impair- ing channels that produce burst errors. On the other hand,
ments in the channel. The ratio of redundant bits to the RS block codes are much more capable of correcting burst
data bits and their relationship determines the error detec- errors. For block codes designed for correcting random
DATA COMMUNICATION 7

1 1 0 0 1 0 0 Digital Data ment and recovery control, the receiver employs error
detection via channel coding violation; and then requests
Channel for retransmission via automatic repeat request (ARQ)
Encoder
procedure. When the return channel is not available, the
1 1 0 0 1 0 0 1 Even Parity Check receiver employs forward error correction that detects an
error via channel coding violation; and then the receiver
Parity
Signal Bit corrects it by estimating the most likely data transmitted
Waveform
Generator Baseband Signal (NRZ-L) by sender.

ARQ Protocols
ARQ is a general error recovery approach that includes
retransmission procedures at the sender to recover from
Channel

Channel Noise data frames detected with error at receiver, or missing data
frames (i.e., very corrupted frames not recognized by recei-
ver). It also includes a procedure to recover from missing
Received Signal acknowledgment frames. With data frames that incorpo-
Signal rate error detection codes, the receiver discards data frames
Waveform
Detector with detected errors. The receiver sends an acknowledg-
ment (ACK) frame to indicate the successful reception of
1 1 0 0 0 0 0 1 Odd Parity Check one or more data frames. The receiver sends an negative
Channel Parity acknowledgment (NAK) frame to request retransmission of
Bit
Decoder one or more data frames in error. The sender sets a transmit
1 1 0 0 0 0 0 Parity Error Detected timer when a data frame is sent, and retransmits a frame
when the timer expires to account for a potentially missing
data frame.
Figure 3. Example of parity-based error detection.
Data frames and corresponding ACK/NAK frames are
identified by k-bit modulo-2 sequence numbers (Ns). The
sequence numbers enable the receiver to avoid receiving
errors, they can be combined with block interleaving to duplicate frames because of lost acknowledgments. Data
enhance the capability of burst error correction. In block frames could carry a piggyback acknowledgment for data
interleaving, L codewords of n-bit block to be transmitted frames transmitted in the opposite direction. Acknowledg-
are stored row-by-row in a rectangular L  n array buffer, ment sequence number (Nr) identifies the next data frame
and then data is transmitted over the channel column-by- expected by the receiver, and acknowledges all outstanding
column. The interleaving depth L determines the distribu- frames up to Nr  1. Outstanding data frames that have
tion of the errors of a burst over the codewords. Burst error been sent but not yet acknowledged would be buffered in
correction is effective if the resulting number of errors to be transmit buffers in case they need to be retransmitted
distributed in each codeword is within the block codes error because of a transmission error.
correction capability. ARQ protocols combine error recovery control with slid-
ing-window flow control. The sender can send multiple
Flow Control consecutive data frames without receiving acknowledg-
ment from the receiver. The sender and the receiver main-
Flow control enables the receiver to slow down the sender so tain flow control state information through sending and
that the data frames are not sent at a rate higher than the receiving windows.
receiver could handle. Otherwise, the receive buffers would The sending window contains sequence numbers of data
overflow, which results in data frame loss. The sender is frames that the sender is allowed to send, and it is parti-
allowed to send a maximum number of frames without tioned into two parts. From the trailing edge to the parti-
receiving acknowledgment from the receiver. Those frames tion, the first part consists of outstanding frames. From the
sent but not yet acknowledged (outstanding) would be partition to the leading edge, the second part consists of
buffered by the sender in case they need to be retransmitted frames yet to be sent. The sending window size (Ws) equals
because of transmission error. The receiver can flow control the maximum number of outstanding frames or the number
the sender by either passively withholding acknowledg- of transmit buffers. The sender stops accepting data frames
ment, or actively signaling the sender explicitly that it is for transmission because of flow control when the partition
not ready to receive. overlaps the leading edge, i.e., all frames in window are
outstanding. When an ACK is received with Nr, the window
Error Control slides forward so that the trailing edge is at Nr.
Transmission errors can result in either lost frames or The receiving window contains the sequence numbers of
damaged frames with corrupted bits because of noise and the data frames that the receiver is expecting to receive.
interference in the channel. Error recovery enables a reli- Receiving window size (Wr) is equal to the number of receive
able data transfer between the sender and the receiver. buffers. The receive data frames with sequence numbers
When a return channel is available for data acknowledg- outside receive window are discarded. The accepted data
8 DATA COMMUNICATION

frames are delivered to the upper layer (i.e., network layer) in the NAK, slides the window forward if necessary, and
if their sequence numbers follow immediately that of the sets the transmit timer.
last frame delivered; or else they are stored in receive
buffers. The acknowledgment procedures are as follows. Medium Access Control (MAC)
First, the receiver sets an acknowledgment timer when a
For the multiaccess or the shared-medium link as illu-
frame is delivered. If it is possible to piggyback an ACK, the
strated in Fig. 4, the OSI reference model divides the
receiver does so and resets the timer. Second, when an
data link layer into the upper logical link control (LLC)
acknowledgment timer expires, it will send a self-contained
sublayer and the lower medium access control (MAC) sub-
ACK frame. For both cases, the receiver sets Nr to be the
layer. Like the standard data link layer that provides
sequence number at the trailing edge of the window at the
services to the network layer, the LLC sublayer enables
time the ACK is sent.
transmission control between two directly connected data
Common ARQ protocols include the stop-and-wait ARQ,
devices. The MAC sublayer provides services to the LLC
and the sliding-window based go-back-n ARQ and selective-
sublayer, and enables distributed data devices to access a
repeat ARQ. The sending and receiving window sizes spe-
shared-medium. Although the MAC protocols are medium
cified for these protocols are summarized in Table 1.
specific, the LLC protocols are medium independent. The
MAC protocol can be classified based on its multiple access
Stop-and-Wait ARQ. The stop-and-wait ARQ specifies
and resource sharing methodologies.
that both the sending and the receiving window sizes are
limited to one. Single-bit modulo-2 sequence numbers are
Multiple Access Methodology. In multiplexing control,
used. The sender and receiver process one frame at a time.
data devices access a link synchronously through a single
This ARQ is particularly useful for the half-duplex data
multiplexer. In multiple access control, distributed data
link as the two sides never transmit simultaneously. After
devices access a link synchronously or asynchronously
sending one data frame, the sender sets the transmit timer
through distributed controllers. An example of synchro-
and waits for an ACK before sending the next data frame.
nous multiple access would be down-link transmissions
The sender retransmits the data frame if NAK is received or
from a cellular base station to wireless mobile devices.
if the transmit timer expires.
An example of asynchronous multiple access would be an
up-link transmission from a wireless mobile device to a
Go-Back-N ARQ. The go-back-n ARQ specifies that the
cellular base station. Like multiplexing, multiples access
sending window size can range from one to 2k  1; whereas
divides the resource of a transmission channel into acces-
the receiving window size is limited to one. If a data frame is
sible portions or subchannels identified by frequency sub-
received in error, all subsequent frames will not fall within
bands, time-slots, or spreading codes.
the receiving window and will be discarded. Consequently,
Frequency division multiple access (FDMA) schemes
retransmission of all these frames will be necessary. The
divide the frequency-domain resource of a link into portions
receiver may seek retransmission actively by sending an
of spectrum bands that are separated by guard-bands to
NAK with Nr being set to sequence number of the receive
reduce inter-channel interference. Data devices can trans-
window, and then resetting the running acknowledgment
mit simultaneously and continuously on assigned sub-
timer.
bands. For a wireless fading channel with mobile
The sender retransmission procedures are as follows.
devices, FDMA requires a larger guard-band between
First, the sender sets a transmit timer when a frame is
the adjacent frequency channels to counteract the Doppler
transmitted or retransmitted and resets the timer when
frequency spread caused by the data sources mobility.
frame is acknowledged. Second, when the transmit timer
Time division multiple access (TDMA) schemes divide
for the oldest outstanding frame expires, the sender
the time-domain resource of a link into time-slots, sepa-
retransmits all of the outstanding frames in the sending
rated by guard-times. Data devices take turn and transmit
window. Third, if NAK with Nr is received, the sender slides
in assigned time-slots, which makes use of the entire link
a sending window to Nr and retransmits all of the out-
bandwidth. For the wireless fading channel, TDMA
standing frames in the new window.
requires a larger guard-time for each time slot to counteract
the delay spread caused by the multi-path fading.
Selective-Repeat ARQ. The selective-repeat ARQ speci-
Code division multiple access (CDMA) schemes divide
fies that the sending window size can range from one to
the code-domain resource of a link into a collection of
2(k1); whereas the receiving window size is less than or
spreading codes. Data devices transmit their spread spec-
equal to the sending window size. Instead of retransmit-
trum signals via assigned codes. In synchronous CDMA,
ting every frame in pipeline when a frame is received in
orthogonal spreading codes are employed in which all pair-
error, only the frame in error is retransmitted. Received
wise cross-correlations are zero. In asynchronous CDMA,
frames with a sequence number inside receiving window
data devices access the code channels via distributed access
but out of order are stored in buffers. Then the receiver
controls without coordination, which prohibit the employ-
sends a NAK with Nr set to the trailing edge of the receive
ment of orthogonal spreading codes because of arbitrary
window, and resets the acknowledgment timer.
random transmission instants. Spreading pseudo-noise
The sender retransmission procedures are as follows:
sequences are employed instead, which are statistically
The sender retransmits each outstanding frame when the
uncorrelated. This causes multiple access interference
transmit timer for that frame times out. If NAK is received,
the sender retransmits the frame indicated by the Nr field
DATA COMMUNICATION 9

Table 1. Window Sizes for ARQ Protocols some random time. Delay may become unbounded under
Sending Receiving heavy traffic, and channel use is relatively poor compared
ARQ Window Window with other MAC protocols that avoid collision, resolve
Protocol Size (Ws) Size (Wr) collision, or limit contention. Common random access
MAC protocols include Pure ALOHA, Slotted ALOHA,
Stop-and-wait 1 1
Go-Back-N 1 < Ws < 2k  1 1
carrier sense multiple access (CSMA), and CSMA with
Selective Repeat 1 < Ws < 2(k1) 1 < Wr < Ws collision detection or with collision avoidance.
Pure ALOHA protocol allows the station to send data
Note: k = Number of bits available for frame sequence number.
frame whenever it is ready, with no regard for other sta-
tions (6). The station learns about the collision of its data
frame by monitoring its own transmission (distributed
control), or by a lack of acknowledgment from a control
(MAI), which is proportional directly to the number of entity within a time-out period (centralized control). The
spreading signals received at the same power level. station retransmits the collided data frame after a random
Orthogonal frequency division multiple access delay or a back-off time. Suppose a station transmits a
(OFDMA) schemes divide the frequency-domain resource frame at time to, and all data frames are of equal duration
into multiple frequency channels with orthogonal subcar- Tframe. Collision occurs if one of more stations transmit
riers. As discussed in a previous section, OFDM is consid- frames within the time interval (to  Tframe, to Tframe),
ered as a multi-carrier modulation technique, rather than a which is referred to as the vulnerable period of length
multiplexing technique, when all of the subchannels are 2Tframe.
assigned to a single user signal. In OFDMA, multiple Heavy traffic causes high collision probability, which
subsets of subchannels are assigned to different user sig- increases traffic because of retransmission. In turn, this
nals. traffic increases collision probability, and the vicious cycle
would cause system instability because of the loss of colli-
Resource Sharing Methodology. Resource sharing control sion recovery capability. Short term load fluctuations could
can occur either through a centralized resource scheduler knock the system into instability. Stabilizing strategies
with global resource availability information, or a distrib- include increasing the range of back-off with increasing
uted scheduler with local or isolated resource availability number of retransmissions (e.g., binary exponential back-
information. Resource sharing schemes include preassign- off), and limiting the maximum number of retransmissions.
ment, random access (contention), limited-contention, and Slotted ALOHA protocol is similar to that of pure
on-demand assignment. Preassignment allows devices with ALOHA, but stations are synchronized to time slots of
predetermined and fixed allocation of link resources regard- duration equal to the frame duration Tframe. Stations
less of their needs to transmit data. Random access allows may access the medium only at the start of each time
devices to contend for the link resources by transmitting slot. Thus, arrivals during each time slot are transmitted
data whenever available. On-demand assignment allows at the beginning of the next time slot. Collision recovery is
devices to reserve data for link resources based on their the same as pure ALOHA. Collisions are in the form of a
dynamic needs to transmit data. complete frame overlap, and the vulnerable period is of
length Tframe, which is half that of pure ALOHA. The
Preassignment MAC Protocols. These protocols employ maximum throughput achieved is twice that of pure
static channelization. Link capacity is preassigned or allo- ALOHA.
cated a priori to each station in the frequency domain via CSMA protocols reduce the collision probability by sen-
FDMA or in the time domain via TDMA. With FDMA-based sing the state of the medium before transmission. Each
protocols, disjointed frequency bands (separated by guard station proceeds to transmit the data frame if the medium is
bands) are assigned to the links that connect the stations. sensed to be idle. Each station defers the data frame
For a single channel per carrier assignment, each fre- transmission and repeats sensing if the medium is sensed
quency band carries only one channel of nonmultiplexed to be busy. Collision still could occur because the propaga-
traffic. With TDMA-based protocols, stations take turns to tion delay must be accounted for the first bit to reach every
transmit a burst of data over the same channel. Stations station and for every station to sense it. The vulnerable
must synchronize with the network timing and the TDMA period is the maximum propagation delay incurred for a
frame structure. These protocols achieve high efficiency if signal to propagate between any two stations. It can be
continuous streams of traffic are exchanged between sta- shown that CSMA protocols outperform ALOHA protocols
tions, but they incur poor efficiency under bursty traffic. if propagation delay is much smaller than the frame dura-
tion. Depending on how they react when the medium is
Random Access (Contention) MAC Protocols. With ran- sensed to be busy or idle, CSMA schemes are classified
dom access or contention MAC protocols, no scheduled additionally into nonpersistent CSMA, 1-persistent CSMA,
times exist for stations to transmit and all stations compete and p-persistent CSMA.
against each other to access to the full capacity of the data With nonpersistent CSMA (slotted or unslotted), a sta-
link. Thus, it is a distributed MAC protocol. Simultaneous tion waits for a random delay to sense again if the medium is
transmissions by two or more stations result in a collision busy; it transmits as soon as medium is idle. With 1-
that causes all data frames involved to be either destroyed persistent CSMA (slotted or unslotted), a station continues
or modified. Collision is recovered by retransmissions after to sense if the medium is busy; it transmits as soon as
10 DATA COMMUNICATION

OSI Layer

3 Network Network
Point-to-Point Logical Connection
2 Data Link Data Link

1 Physical Physical

Physical Link

OSI Layer

3 Network Network Network


Multilateral Multilateral
2b LLC Logical LLC Logical LLC
Connections Connections
2a MAC MAC MAC
1 Physical Physical Physical

Physical Link with Multi-access Medium


Figure 4. Data link layer.

the medium is idle. With p-persistent CSMA (slotted), a Limited-Contention MAC Protocols. These MAC proto-
station continues sensing if the medium is busy; it trans- cols limit the number of contending stations per slot to
mits in the next slot with probability p, and delay one slot maximize the probability of success. Different groups of
with probability (1-p) if the medium is idle. stations contend for repetitive series of different slots. The
The similarities and the differences between these large group size and the high repetition rate are assigned
CSMA schemes are summarized in Table 2. for light traffic, whereas a small group size and low repeti-
CSMA with Collision Detection (CSMA/CD) protocol tion rate are assigned for heavy traffic. These protocols
enhances the additionally CSMA operations by enabling combine the best properties of contention and contention-
the stations to continue sensing the channel and detecting free protocols. It achieves low access delay under light
collision while transmitting data frames (7). If a collision is traffic and high throughput under heavy traffic. It is applic-
detected (e.g., received signal energy is greater than that of able to slotted ALOHA and slotted CSMA.
sent signal, and encoding violation), the involved station The splitting algorithms (8) are employed commonly by
would abort frame transmission. After transmitting a brief limited-contention MAC protocols. These algorithms split
jamming signal to assure other stations would detect the the colliding stations into two groups or subsets; one subset
collision, the involved station would back off and repeat is allowed to transmit in the next slot. The splitting con-
the carrier sensing. Successful frame transmission is tinues until the collision is resolved. Each station can
assured if no collision is detected within round-trip propa- choose whether or not to transmit in the successive slots
gation delay (with regard to the furthest station) of frame (i.e., belong to the transmitting subset) according to the
transmission. random selection, the arrival time of its collided data, or the
CSMA with Collision Avoidance (CSMA/CA) protocol unique identifier of the station.
enables stations to avoid collisions in wireless networks,
where collision detection is not practical because the On-Demand Assignment MAC. These types of protocols
dynamic range of wireless signals is very large. If the set up an orderly access to the medium. These protocols
medium is sensed to be idle, a station continues to monitor require the stations to exchange status information of
the medium for a time interval known as the inter-frame readiness to transmit data frames, and a station can trans-
space (IFS). If the medium remains idle after IFS, the mit only when it has been authorized by other stations or a
station chooses the time after a binary exponential back centralized control entity. Common on-demand assign-
off to schedule its transmission, and then continues to ment MAC protocols include reservation-based protocols
monitor the medium. If the medium is sensed to be busy and token-passing protocols.
either during IFS or back off waiting, the station continues Reservation-based protocols require a station to reserve
to monitor the medium until the medium becomes idle. At link resources before transmitting data. The reservation
the scheduled time, the station transmits the data frame request could be signaled to other distributed stations or to
and waits for its positive acknowledgment. The station a centralized reservation control entity. For example, in
increases the back off if its transmission fails, and con- TDMA-based channelization, each TDMA frame could con-
tinues to monitor the medium until the medium becomes sist of data slots and reservation slots (usually smaller in
idle. size). Each station could signal a request in its own reser-
vation slot, and transmit data in the next TDMA frame.
DATA COMMUNICATION 11

Token-passing protocols require a special bit pattern SDM


(token) to be passed from station to station in a round robin
SDM is a two-dimensional multiplexing method to increase
fashion. The token can be passed via a point-to-point line
data throughput in a MIMO channel by enabling simulta-
that connects one station to the next (token ring), or via a
neous transmissions of different signals at the same carrier
broadcast bus that connects all stations (token bus). Only a
frequency through multiple transmit antennas. The mixed
station that posses a token is allowed to send data. A station
signals that arrived at the receiver can be demultiplexed by
passes the token to the next station after sending data, or if
employing spatial sampling via multiple receive antennas
it has no data to send. Each station is given the chance to
and corresponding signal processing algorithms.
send data in turns, and no contention occurs. The average
access delay is the summation of the time to pass token
Combined MIMOOFDM Transmission
through half the stations and the frame transmission time.
The average access delay could be fairly long, but it is As discussed in a previous section, OFDM can be used to
bounded even under heavy traffic. Token-passing protocols convert a broadband wireless channel with frequency-
rely on distributed control with no need for network syn- selective fading into a several frequency-flat, subcarrier
chronization. channels. A combined MIMOOFDM system performs
MIMO transmission per subcarrier channel with narrow-
band fading, thus enabling MIMO systems to operate with
MULTI-INPUT MULTI-OUTPUT (MIMO) TRANSMISSION
more optimality in broadband communications. Multiplex-
ing and coding in a MIMOOFDM system would operate
MIMO and MIMO-OFDM have emerged as the next gen-
over three dimensions (i.e., temporal, spatial, and sub-
eration wireless transmission technologies with antenna
carrier dimensions).
arrays for mobile broadband wireless communications. As
illustrated in Fig. 5, MIMO (9) is a multi-dimensional
wireless transmission system with a transmitter that CONCLUSION
has multiple waveform generators (i.e., transmit anten-
nas), and a receiver that has multiple waveform detectors The maximum error-free data rate or capacity of an AWGN
(i.e., receive antennas). Multiplexing and channel coding in channel with a given channel bandwidth is determined by
a MIMO channel would operate over the temporal dimen- the Shannon capacity. Continuous improvements have
sion and the spatial dimension of transmit antennas. been made to design modulation and coding schemes to
MIMO systems can be used either to achieve a diversity approach the theoretical error-free capacity limit under the
gain through space time coding (STC) to counteract multi- limitations of channel bandwidth and transmission power.
path fading, or to achieve a throughput capacity gain Design objectives have always been to increase the spectral
through space division multiplexing (SDM) to counteract efficiency and the link reliability. Modulation can be used to
the bandwidth limitation of a wireless channel. increase spectral efficiency by sacrificing link reliability
through modulation, whereas channel coding can be used to
STC increase link reliability by sacrificing spectral efficiency.
The performance of modulation and channel coding
STC is a two-dimensional channel coding method to max-
schemes depend on channel conditions. Existing AWGN-
imize spectral efficiency in a MIMO channel by coding over
based modulation and coding schemes do not perform
the temporal dimension and the spatial dimension of trans-
optimally in Rayleigh fading channels, whose error-free
mit antennas. STC schemes can be based on either space
capacity are considerably less than that of AWGN chan-
time block codes (STBCs) or by space time trellis codes
nels. As fading channels have been increasing used to
(STTCs). For a given number of transmit antennas (NTA),
deploy cellular and Wi-Fi access applications, increasingly
an STBC scheme maps a number of modulated symbols
needs exist to deploy the next-generation wireless mobile
(NMS) into a two-dimensional NTA  NMS codeword that
technologies that are best suited for fading channels under
spans in the temporal and the spatial dimensions. On the
all sorts of channel conditions (i.e., flat, frequency-selective,
other hand, the STTC scheme encodes a bit stream through
and time-selective fading). The emerging MIMO-OFDM
a convolutional code, and then maps the coded bit stream
technologies are promising. MIMO optimizes throughput
into the temporal and the spatial dimensions.

Table 2. CSMA Schemes Classification


CSMA Schemes

Medium Sensing Non-Persistent l-Persistent p-Persistent


Status (Slotted or Unslotted) (Slotted or Unslotted) (Slotted)
Idle Send with Probability 1 Send with Probability 1 Send with Probability p
Busy Wait random delay, then Continue sensing channel Continue sensing channel
sense channel until idle until idle
Collision Wait random delay, then start over carrier sensing
12 DATA COMMUNICATION

Transmitter Interface

Signal Waveform Generator


Space
Digital Time
Source Channel
Encoder
Signal Waveform Generator

Multipath Fading Channel

Receiver Interface

Signal Waveform Detector


Space
Digital Time
Sink Channel
Decoder
Signal Waveform Detector

Figure 5. MIMO transmission.

capacity and link reliability by using antenna arrays; 7. IEEE Standard 802.3, CSMA/CD Access Method
whereas OFDM optimizes spectral efficiency and link relia- 8. D. Bertsekas,R. Gallager,Data Networks,2nd ed.,Englewood
bility by converting a broadband frequency-selective fading Cliffs, NJ:Prentice Hall,1992.
channel into a set of frequency flat fading channels with less 9. G. L. Stuber,J. R. Barry,S. W. McLaughlin, andY. Li,Broad-
signal distortions. band MIMO-OFDM wireless communications,Proc. of the
IEEE,92(2):2004,271294.

BIBLIOGRAPHY

1. D. Hankerson, G. Harris, and P. Johnson, Introduction to FURTHER READING


Information Theory and Data Compression, Boca Raton, FL:
CRC Press, 1998. S. Haykin, Communication Systems, 4th ed., New York: John
2. W. Stallings, Wireless Communications and Networks, Wiley & Sons, Inc., 2001.
Englewood Cliffs, NJ: Prentice Hall, 2001. B. Sklar, Digital Communications: Fundamentals and Applica-
3. S. G. Wilson, Digital Modulation and Coding, Upper Saddle tions, 2nd ed., Upper Saddle River, NJ: Prentice Hall, 2001.
River, NJ: Prentice Hall, 1996, pp. 1286. B. P. Lathi, Modern Digital and Analog Communication Systems,
4. R. E. Ziemer, R. L. Peterson, and D. E. Borth, Introduction to 3rd ed., New York: Oxford, 1998.
Spread Spectrum Communications, Upper Saddle River, NJ:
Prentice Hall, 1995.
OLIVER YU
5. T. K. Moon, Error Correcting Coding: Mathematical Methods
University of Illinois at Chicago
and Algorithms, Hoboken, NJ: John Wiley & Sons Inc., 2005.
Chicago, Illinois
6. N. Abramson andF. Kuo,The ALOHA system in Computer
Communication Networks,Englewood Cliffs, NJ:Prentice-
Hall,1973, pp.501518.
D
DATA COMPRESSION CODES, LOSSY transformations is to create numerical representations
where many data values are close to zero and, hence,
INTRODUCTION will be quantized to zero. The quantized data sets have
highly uneven distributions, including many zeroes, and
In many data compression applications, one does not insist therefore they can be effectively compressed using
that the reconstructed data ( decoder output) is absolutely entropy coding methods such as Huffman or arithmetic
identical to the original source data ( encoder input). Such coding. Notice that quantization is the only operation that
applications typically involve image or audio compression destroys information in these algorithms. Otherwise they
or compression results of various empirical measurements. consist of lossless transformations and entropy coders.
Small reconstruction errors may be indistinguishable to a For example, the widely used lossy image compression
human observer, or small compression artifacts may be algorithm JPEG is based on DCT transformation of 8  8
tolerable to the application. For example, human eye and image blocks and scalar quantization of the transformed
ear are not equally sensitive to all frequencies, so informa- values. DCT transformation separates different frequen-
tion may be removed from less important frequencies with- cies so the transformed values are the frequency compo-
out visual or audible effect. nents of the image blocks. Taking advantage of the fact that
The advantage of lossy compression stems from the fact the human visual system is more sensitive to low than high
that allowing reconstruction errors typically results in frequencies, the high frequency components are quantized
much higher compression rates than is admitted by lossless more heavily than the low frequency ones. Combined with
methods. This higher compression rate is understandable the fact that typical images contain more low than high
because several similar inputs now are represented by the frequency information, the quantization results in very few
same compressed file; in other words, the encoding process non zero high-frequency components. The components are
is not one to one. Hence, fewer compressed files are avail- ordered according to the frequency and entropy coded using
able, which results in the reduction in the number of bits Huffman coding.
required to specify each file. The following sections discuss in more detail the basic
It also is natural that a tradeoff exists between the ideas of lossy information theory, rate-distortion theory,
amounts of reconstruction error and compression: Allowing scalar and vector quantization, prediction-based coding,
bigger error results in higher compression. This tradeoff is and transform coding. Image compression algorithm
studied by a subfield of information theory called the rate- JPEG is presented also.
distortion theory.
Information theory and rate-distortion theory can be
THEORY
applied to general types of input data. In the most impor-
tant lossy data compression applications, the input data
The Shannon information theory (1) allows one to ana-
consists of numerical values, for example, audio samples
lyze achievable rate-distortion performance for lossy
or pixel intensities in images. In these cases, a typical
compression. For simplicity, in the following illustration
lossy compression step is the quantization of numerical
of the key concepts we assume a finite, independent, and
values. Quantization refers to the process of rounding
identically distributed (or iid) source X. This means that
some numerical values into a smaller range of values.
the input data to be compressed consists of a sequence
Rounding an integer to the closest multiple of 10 is a
x1,x2,x3,. . . of symbols from a finite source alphabet X
typical example of quantization. Quantization can be
where each member xi 2 X of the sequence is produced
performed to each number separately (scalar quantiza-
with the same fixed probability distribution P on X,
tion), or several numbers can be quantized together (vec-
independent of other members of the sequence. The
tor quantization). Quantization is a lossy operation as
entropy of such a source is
several numbers are represented by the same value in
the reduced range. X
HX  Pxlog Px
In compression, quantization is not performed directly
x2X
on the original data values. Rather, the data values are
transformed first in such a way that quantization provides
maximal compression gain. Commonly used transforma- that is, the weighted average of the self-information
tions are orthogonal linear transformations (e.g., discrete Ix logPx of elements x 2 X. All logarithms are
cosine transform DCT). Also, prediction-based transfor- taken in base two, assuming that the compressed data
mations are common: Previous data values are used to is expressed in bits. The entropy measures the average
form a prediction for the next data value. The difference amount of uncertainty that we have about the output
between the actual data value and the predicted value is symbol emitted by the source. It turns out that the
the transformed number that is quantized and then entropy HX is the best expected bitrate per source
included in the compressed file. The purpose of these symbol that any lossless code for this source can

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DATA COMPRESSION CODES, LOSSY

achieve (1). See Ref. 2 or any other standard information measures the amount of uncertainty about the reconstruc-
theory text for more details. tion if the source symbol is known to be x. Their average,
weighted by the source probabilities Px, is the condi-
Lossy Information Theory tional entropy

Suppose then that we allow errors in the reconstruction. In X X X


the general set-up we can assume an arbitrary reconstruc- HYjX PxHYjx  Px; ylog Pyjx
x2X x2X y2Y
tion alphabet Y. Typically Y X, as it is natural to recon-
struct into the original symbol set, but this is not required.
Let us specify desired conditional reconstruction where Px; y PxPyjx is the joint probability of x 2 X
probabilities Pyjx for all x 2 X and y 2 Y, where for every and y 2 Y. Conditional entropy HYjX measures the
x 2 X we have expected amount of uncertainty about the reconstruction
X to an observer that knows the corresponding source
Pyjx 1 symbol.
y2Y The source probabilities Px and the conditional recon-
struction probabilities Pyjx also induce an overall prob-
ability distribution on the reconstruction alphabet Y, where
Value Pyjx is the probability that source symbol x will be for every y 2 Y
reconstructed as y. Our goal is to design a code that realizes
these conditional reconstruction probabilities and has as X
Py PxPyjx
low an expected bitrate as possible. Note that the code can
x2X
reconstruct source symbol x into various reconstruction
symbols y 2 Y, depending on the other elements of the input
sequence. This is due to the fact that we do not encode We additionally can calculate the conditional source prob-
individual symbols separately, but coding is done on longer abilities given the reconstruction symbol y 2 Y as
segments of source symbols. Conditional probabilities
Pyjx provide the desired reconstruction distribution. For- Px; y
mula for the best achievable bitrate, as provided by the Pxjy
Py
Shannon theory (1,3), is presented below. See also Refs. 2
and 4.
The reconstruction entropy HY and the conditional
source entropy HXjY in this direction are calculated as
Example 1. Consider a binary iid source X with source follows:
alphabet f0; 1g and source probabilities P0 P1 12.
We encode source sequences in segments of three bits by X
HY  Pylog Py
assigning code c0 to segments with more 0s than 1s and y2Y
code c1 to segments with more 1s than 0s. The entropy of X X
the code is 1 bit per code, or 13 bits per source symbol. Hence, HXjY  Px; ylog Pxjy
x2X y2Y
we obtain compression ratio 1:3.
Let us reconstruct code c0 as segment 000 and c1 as 111.
Then, source segments 000,001,010, and 100 get all recon- They key concept of average mutual information is defined
structed as 000, whereas segments 111,110,101, and 011 as the difference
get reconstructed as 111. The encoding/decodong process is
deterministic, but source symbols 0 get reconstructed as 1 IX; Y HX  HXjY
one quarter of the time (whenever they happen to be in the
same segment with two 1s). We say that the conditional
reconstruction probabilities are between the source entropy HX and the conditional source
entropy HXjY. It measures the expectation of how much
3
the uncertainty about the source symbol is reduced if the
P0j0 P1j1 4 corresponding reconstruction symbol is known. It can be
P1j0 P0j1 1
4 & proved easily that IX; Y  0 and that I X; Y IY; X
where we denote IY; X HY  H YjX (2). Hence, the
For every fixed x 2 X, the conditional reconstruction average mutual information also is the amount by which the
probabilities Pyjx are a probability distribution on Y, uncertainty about the reconstruction is reduced if the source
whose entropy symbol is known.
It turns out that IX; Y is the best bitrate that any code
X realizing the desired conditional reconstruction probabil-
HYjx  Pyjxlog Pyjx ities Pyjx can achieve. More precisely, this statement
y2Y contains two directions: the direct statement that states
that IX; Y is a bitrate that can be achieved, and the
converse statement that states that no code can have a
DATA COMPRESSION CODES, LOSSY 3

bitrate below IX; Y. More precisely, the direct lossy into the non-negative real numbers. The value dx; y
source coding theorem can be formulated as follows: For represents the amount of distortion caused when source
every positive number e > 0, no matter how small, a code symbol x gets reconstructed as y. Typically (but not neces-
exists such that sarily) X Y; dx; x 0 for all x 2 X, and dx; y > 0 when
x 6 y. Common distortion functions in the continuous
(i) For every x 2 X and y 2 Y the probability that x gets valued case X Y R are the squared error distortion
reconstructed as y is within e of the desired Pyjx,
and dx; y x  y2
(ii) Source sequences are compressed into at most
IX; Y e expected bits per source symbol. and the absolute error distortion

The converse of the lossy source coding theorem states that dx; y jx  yj
no code that realizes given reconstruction probabilities
Pyjx can have an expected bitrate below IX; Y. Hamming distortion refers to the function
The proof of the converse statement is easier. The direct

theorem is proved using the Shannon random coding tech- 0; if x y
dx; y
nique. This technique is an example of the probabilistic 1; if x 6 y
argument, successfully applied in many areas in combina-
torics and graph theory. The proof shows the existence of The distortion between two sequences of symbols is defined
good codes, but it does not provide practical means of as the average of the distortions between the corresponding
constructing such codes. Approaching the limit IX; Y elements. One talks about the mean squared error (MSE) or
requires that long segments of the input sequence are the mean absolute error (MAE) if the distortion function is
encoded together. the squared error or the absolute error distortion, respec-
tively. These measures are the most widely used error
Example 2. Let us return to the setup of Example 1, and measures in digital signal processing.
let us use the obtained conditional reconstruction probabil- Consider the setup of the previous section where source
ities symbols x are reconstructed as symbols y with probabilities
Pyjx. This setup imposes distortion d(x, y) with probability
P0j0 P1j1 34 Px; y PxPyjx, so the expected distortion is
P1j0 P0j1 14 X X
PxPyjxdx; y
x2X y2Y
as our target. The average mutual information is then
The goal is to find the highest achievable compression
3
IX; Y log2 3  1  0:1887 rate for a given target distortion D, which leads to the
4
problem of identifying conditional reconstruction prob-
This value is significantly lower than the rate 13 bits abilities Pyjx such that the expected distortion is at most
obtained by the code of Example1 . According to the Shan- D while IX; Y is as small as possible. Note how we no
non theory, by increasing the block length of the codes, one longer micromanage the reconstruction by preselecting
can approach rate IX; Y  0:1887 while keeping the con- the conditional probabilities. Instead, we only care about
ditional reconstruction probabilities arbitrarily close to the the overall reconstruction error induced by the probabil-
target values. & ities and look for the probabilities that give the lowest
bitrate IX; Y.
This process leads to the definition of the rate-distortion
This section only discussed the source coding of finite iid function R(D) of the source:
sources. The main theorem remains valid in more general
setups as well, in particular for continuous valued sources RD minfIX; YjPyjx such that
and ergodic, stationary Markov sources, that is, sources X X
with memory. PxPyjxdx; y  Dg
x2X y2Y

Rate-Distortion Theory The minimization is over all conditional probabilities Pyjx


In lossy compression, usually one does not want to specify that induce at most distortion D. According to the source
for each source symbol the whole conditional probability coding statement of the previous section, R(D) is the best
distribution of reconstruction symbols. Rather, one is con- achievable rate at distortion D.
cerned with the amount of distortion made in the recon-
struction. A distortion function on source alphabet X and Example 3. (2) Consider a binary source that emits
reconstruction alphabet Y is a mapping symbols 0 and 1 with probabilities p and 1 p, respectively,
and let us use the Hamming distortion function. By sym-
d : X  Y ! R metry we do not lose generality if we assume that
4 DATA COMPRESSION CODES, LOSSY

(a) (b)

Figure 1. The rate-distortion function of (a) binary source with p 0.5 and (b) Gaussian source with  1. Achievable rates reside above the
curve.

p  1  p. The rate-distortion function of this source is R(D) is not defined for D < Dmin, and it has value zero for
all D > Dmax. It can be proved that in the open interval
 Dmin < D < Dmax the rate-distortion function R(D) is
h p  hD; for 0  D  p strictly decreasing, continuously differentiable and con-
RD
0; for D > p vex downward. Its derivative approaches 1 when D
approaches Dmin(3,5,4).
where hr r logr  1  rlog1  r is the binary In Example 3 , we had analytic formulas for the rate-
entropy function. See Fig. 1(a) for a plot of function R(D). distortion functions. In many cases such formulas cannot
For a continuous valued example, consider a source that be found, and numerical calculations of rate-distortion
emits real numbers iid under the Gaussian probability functions become important. Finding R(D) for a given
distribution with variance 2, that is, the probability den- finite iid source is a convex optimization problem and
sity function of the source is can be solved effectively using, for example, the
ArimotoBlahut algorithm (6,7).
1 z2
px p e22
 2p QUANTIZATION

Consider the squared error distortion function. The corre- In the most important application areas of lossy compres-
sponding rate distortion function is sion, the source symbols are numerical values. They can be
color intensities of pixels in image compression or audio
 samples in audio compression. Quantization is the process
log  12 logD; for 0 < D  2 of representing approximations of numerical values using a
RD
0; for D > 2 small symbol set. In scalar quantization each number is
treated separately, whereas in vector quantization several
numbers are quantized together. Typically, some numer-
see Fig. 1(b). &
ical transformation first is applied to initialize the data into
a more suitable form before quantization. Quantization is
Denote by Dmin the smallest possible expected distor- the only lossy operation in use in many compression algo-
tion at any bitrate (i.e., the distortion when the bitrate is rithms. See Ref. 8 for more details on quantization.
high enough for lossless coding) and by Dmax the smallest
expected distortion corresponding to bitrate zero (i.e., the
Scalar Quantization
case where the reconstruction is done without receiving
any information from the source). In the Gaussian exam- A scalar quantizer is specified by a finite number of avail-
ple above, Dmin 0 and Dmax 2, and in the binary source able reconstruction values r1 ; . . . ; rn 2 R, ordered r1 < r2 <
example, Dmin 0 and Dmax p. Values of R(D) are . . . < rn , and the corresponding decision intervals. Decision
interesting only in the interval Dmin  D  Dmax. Function intervals are specified by their boundaries b1 ; b2 ; . . . ;
DATA COMPRESSION CODES, LOSSY 5

bn1 2 R, also ordered b1 < b2 < . . . < bn1 . For each i 1,. . ., Vector Quantization
n, all input numbers in the decision interval bi1 ; bi are
From information theory, it is known that optimal lossy
quantized into ri, where we use the convention that b0
coding of sequences of symbols requires that long blocks
1 and bn 1. Only index i needs to be encoded, and the
of symbols are encoded together, even if they are inde-
decoder knows to reconstruct it as value ri. Note that all
pendent statistically. This means that scalar quantiza-
numerical digital data have been quantized initially from
tion is suboptimal. In vector quantization, the input
continuous valued measurements into discrete values. In
sequence is divided into blocks of length k, and each
digital data compression, we consider, additional quantiza-
block is viewed as an element of Rk, the k-dimensional
tion of discrete data into a more coarse representation to
real vector space. An n-level vector quantizer is specified
improve compression.
by n reconstruction vectors ~ rn 2 Rk and the corre-
r1 ; . . . ;~
The simplest form of quantization is uniform quantiza-
sponding decision regions. Individual reconstruction vec-
tion. In this case, the quantization step sizes bi  bi1 are
tors are called code vectors, and their collection often is
constant. This process can be viewed as the process of
called a code book.
rounding each number x into the closest multiple of some
Decision regions form a partitioning of Rk into n parts,
positive constant b. Uniform quantizers are used widely
each part representing the input vectors that are quan-
because of their simplicity.
tized into the respective code vector. Decision regions do
The choice of the quantizer affects both the distortion
not need to be formed explicitly, rather, one uses the
and the bitrate of a compressor. Typically, quantization is
distortion function to determine for any given input
the only lossy step of a compressor, and quantization error
vector which of the n available code vectors ~ ri gives
becomes distortion in the reconstruction. For given distor-
optimal representation. The encoder determines for
tion function and probability distribution of the input
blocks of k consecutive input values the best code vector
values, one obtains the expected distortion. For the analysis
ri and communicates the index i to the decoder. The
~
of bitrate, observe that if the quantizer outputs are entropy
decoder reconstructs it as the code vector ~ ri . Typically,
coded and take advantage of their uneven probability dis-
each vector gets quantized to the closest code vector
tribution, then the entropy of the distribution provides the
available in the code book, but if entropy coding of the
achieved bitrate. The quantizer design problem then is the
code vectors is used, then the bitrate also may be incorpo-
problem of selecting the decision intervals and reconstruc-
rated in the decision.
tion values in a way that provides minimal entropy for
Theoretically, vector quantizers can encode sources as
given distortion.
close to the rate-distortion bound as desired. This encoding,
The classic LloydMax (9,10) algorithm ignores the
however, requires that the block length k is increased,
entropy and only minimizes the expected distortion of
which makes this fact have more theoretical than practical
the quantizer output for a fixed number n of reconstruction
significance.
values. The algorithm, hence, assumes that the quantizer
The LloydMax quantizer design algorithm easily
output is encoded using fixed length codewords that ignore
generalizes into dimension k. The generalized Lloyd
the distribution. The LloydMax algorithm iteratively
Max algorithm, also known as the LBG algorithm after
repeats the following two steps:
Linde, Buzo, and Gray (12), commonly is used with
training vectors ~ tm 2 Rk . These vectors are sample
t1 ; . . . ~
(i) Find reconstruction values ri that minimize the
expected distortion, while keeping the interval vectors from representative data to be compressed. The
boundaries bi fixed, and idea is that although the actual probability distribution
of vectors from the source may be difficult to find, obtain-
(ii) Find optimal boundaries bi, while keeping the ing large collections of training vectors is easy, and it
reconstruction values fixed. corresponds to taking random samples from the distribu-
tion.
If the squared error distortion is used, the best choice of ri in
The LBG algorithm iteratively repeats the following two
step (i) is the centroid (mean) of the distribution inside the steps. At all times the training vectors are assigned to
corresponding decision interval bi1 ; bi . If the error is decision regions.
measured in absolute error distortion, then the best choice
of ri is the median of the distribution in bi1 ; bi . In step (ii), (i) For each decision region i find the vector ~ ri that
the optimal decision interval boundaries bi in both distor- minimizes the sum of the distortions between ~ ri and
tions are the midpoints ri r2 i1 between consecutive recon- the training vectors previously assigned to region
struction values. number i.
Each iteration of (i) and (ii) lowers the expected distor- (ii) Change the assignment of training vectors: Go over
tion so the process converges toward a local minimum. A the training vectors one by one and find for each
LloydMax quantizer is any quantizer that is optimal in the training vector ~
t j the closest code vector~ ri under the
sense that (i) and (ii) do not change it. given distortion. Assign vector ~ t j in decision region
Modifications of the LloydMax algorithm exist that number i.
produce entropy-constrained quantizers (8). These quanti-
zers incorporate the bitrate in the iteration loop (i)(ii). ri is either the coordinate
In step (i), the optimal choice of ~
Also, a shortest path algorithm in directed acyclic graph wise mean or median of the training vectors in decision
can be used in optimal quantizer design (11).
6 DATA COMPRESSION CODES, LOSSY

region number i, depending on whether the squared error In prediction-based coding, one has strict control of the
or absolute error distortion is used. maximum allowed reconstruction error in individual
Additional details are needed to specify how to initialize source elements xi. As the reconstruction error is identical
the code book and what is done when a decision region to the quantization error, the step size of a uniform
becomes empty. One also can incorporate the bitrate in the quantizer provides an upper bound on the absolute recon-
iteration loop, which creates entropy-constrained vector struction error. Compression where a tight bound is
quantizers. For more details on vector quantization see, imposed on the reconstruction errors of individual num-
for example, Ref. 13. bers rather than an average calculated over the entire
input sequence is termed near-lossless compression.
DATA TRANSFORMATIONS
Linear Transformations
In data compression situations, it is rarely the case that the An alternative to prediction-based coding is to perform a
elements of source sequences are independent of each linear transformation on the input sequence to remove
other. For example, consecutive audio samples or neighbor- correlations. In particular, orthogonal transformations
ing pixel values in images are highly correlated. Any effec- are used because they keep mean squared distances invar-
tive compression system must take advantage of these iant. This method allows easy distortion control: The MSE
correlations to improve compressionthere is no sense quantization error on the transformed data is identical to
in encoding the values independently of each other as the MSE reconstruction error on the original data.
then their common information gets encoded more than Orthogonal linear transformation is given by an ortho-
once. Vector quantization is one way to exploit correlations. gonal square matrix, that is, an n  n matrix M whose rows
Scalar quantization, however, requires some additional (and consequently also columns) form an orthonormal
transformations to be performed on the data to remove basis of Rn . Its inverse matrix is the same as its transpose
correlation before quantization. MT. The rows of M are the basis vectors of the transforma-
tion.
Prediction-Based Transformations A data sequence of length n is viewed as an n-dimensional
One way to remove correlation is to use previously pro- column vector ~ x 2 Rn . This vector can be the entire input, or,
cessed data values to calculate a prediction x^i 2 R for the more likely, the input sequence is divided into blocks of
next data value xi 2 R. As the decoder calculates the same length n, and each block is transformed separately. The
prediction, it is enough to encode the prediction error transformed vector is M~ x, which is also a sequence of n real
numbers. Notice that the elements of the transformed vector
are the coefficients in the expression of ~ x as a linear combi-
ei xi  x^i
nation of the basis vectors.
The inverse transformation is given by matrix MT. In the
In lossy compression, the prediction error is scalar quan-
tized. Let ei denote ei quantized. Value ei is entropy coded following, we denote the ith coordinate of ~ x(i) for i 1,
x by ~
and included in the compressed file. The decoder obtains ei 2,. . ., n. If the transformed data is quantized into ~ y 2 Rn ,
T~
and calculates the reconstruction value then the reconstruction becomes M y. Orthogonality guar-
antees that the squared quantization error kM~ x~ yk2 is
identical to the squared reconstruction error k~ x  MT ~ yk2 .
xi ei x^i
Here, we use the notation
Note that the reconstruction error xi  xi is identical to the
X
n
quantization error ei  ei so the quantization directly con- rk2
k~ ri2
~
trols the distortion. i1
In order to allow the encoder and decoder to calculate an
identical prediction x^i , it is important that the predictions for the square norm in Rn .
are based on the previously reconstructed values x j , not the
original values x j ; j < i. In other words, KLT Transformation. The goal is to choose a transforma-
tion that maximally decorrelates the coordinates of the data
x^i f xi1 ; xi2 ; xi3 ; . . . vectors. At the same time, one hopes that as many coordi-
nates as possible become almost zero, which results in low
where f is the prediction function. In linear prediction, entropy in the distribution of quantized coordinate values.
function f is a linear function, that is, The second goal is called energy compaction.
Let us be more precise. Consider a probability distribu-
x^i a1 xi1 a2 xi2 . . . ak xik tion on the input data vectors with mean m ~ 2 Rn . The
variance in coordinate i is the expectation of ~ xi 
2
for some constants a1 ; a2 ; . . . ; ak 2 R. Here, k is the order of mi
~ when ~x 2 Rn is drawn from the distribution. The
the predictor. Optimal values of parameters a1 ; a2; . . . ; ak xi2 . The total
energy in coordinate i is the expectation of ~
that minimize the squared prediction error can be found by variance (energy) of the distribution is the sum of the n
solving a system of linear equations, provided autocorrela- coordinate-wise variances (energies). Orthogonal transfor-
tion values of the input sequences are known (14). mation keeps the total variance and energy unchanged, but
DATA COMPRESSION CODES, LOSSY 7

a shift of variances and energies between coordinates can Energy Variance


occur. Variance (energy) compaction means that as much
variance (energy) as possible gets shifted into as few coor- x 34426 5713
dinates as possible. y 79 79
The covariance in coordinates i and j is the expectation of total 34505 5792

~
xi  mi~
~ x j  m
~ j
Energy and variance has been packed in the first coordi-
Coordinates are called uncorrelated if the covariance nate, whereas the total energy and variance remained
is zero. Decorrrelation refers to the goal of making the invariant. The effect is that the second coordinates became
coordinates uncorrelated. Analogously, we can call the very small (and easy to compress), whereas the first coor-
expectation of ~xi~
x j the coenergy of the coordinates. dinates increased.
Notice that the variances and covariances of a distribution After the rotation, the covariance and the coenergy are -
are identical to the energies and coenergies of the trans- 29 and 11, respectively. The transformed coordinates are
lated distribution of Rn by the mean m. ~ uncorrelated almost, but not totally. &
The two goals of variance compaction and decorrelation
coincide. An orthogonal transformation called KLT (Kar-
Example 4. Let n 2, and let us build a distribution of
hunenLoeve transformation) makes all covariances
vectors by sampling blocks from a grayscale image. The
between different coordinates zero. It turns out that at
image is partitioned into blocks of 1  2 pixels, and each
the same time KLT packs variance in the following, optimal
such block provides a vector x; y 2 R2 where x and y are the
way: For every k  n the variance in coordinates 1,2,. . ., k
intensities of the two pixels. See Fig. 2 (a) for a plot of the
after KLT is as large as in any k coordinates after any
distribution. The two coordinates are highly correlated,
orthogonal transformation. In other words, no orthogonal
which is natural because neighboring pixels typically
transformation packs more variance in the first coordinate
have similar intensities. The variances and energies in
than KLT nor more variance in two coordinates than KLT,
the two coordinates are
and so forth. The rows of the KLT transformation matrix
are orthonormal eigenvectors of the covariance matrix, that
is, the matrix whose element i,j is the covariance in coor-
Energy Variance
dinates i and j for all 1  i; j  n. If energy compaction
x 17224 2907 rather than variance compaction is the goal, then one
y 17281 2885 should replace the covariance matrix by the analogous
coenergy matrix.
total 34505 5792

Example 5. In the case of Example 4 the covariance


The covariance and coenergy between the x and y coordi-
matrix is
nates are 17174 and 2817, respectively.
Let us perform the orthogonal transformation  
2907 2817
  2817 2885
1 1 1
p
2 1 1
The corresponding KLT matrix
that rotates the points 45 degrees clockwise, see Fig. 2 (b)  
0:708486 0:705725
for the transformed distribution. The coordinates after
0:705725 0:708486
the transformation have the following variances and
energies:
consists of the orthonormal eigenvectors. It is the clockwise
rotation of R2 by 44.88 degrees. &

Figure 2. The sample distribution (a) before and (b) after the orthogonal transformation.
8 DATA COMPRESSION CODES, LOSSY

2
1
0
10 0.5 1
0
1
10 0.5 1
0
1
10 0.5 1
0
1
10 0.5 1
0
1
10 0.5 1
0
1
10 0.5 1
0
1 Figure 4. Basis vectors of the 8  8 DCT.
10 0.5 1
0
the DC coefficient. The DC coefficient gives the average of
1
0 0.5 1 the input. Other transformed values are AC coefficients.
DCT has good energy compaction properties where typically
Figure 3. Size n 8 DCT basis vectors. most energy is packed into the low frequency coefficients.
There are fast DCT algorithms that perform the trans-
formation faster than the straightforward multiplication of
KLT transformation, although optimal, is not used the data by the transformation matrix. See Ref. 15 for these
widely in compression applications. No fast way exists and other details on DCT.
to take the transformation of given data vectorsone
has to multiply the data vector by the KLT matrix. Also, Linear Transformations in Image Compression. In image
the transformation is distribution dependent, so that the data, the pixels have a two-dimensional arrangement. Cor-
KLT transformation matrix or the covariance matrix has relations between pixels also are current in both horizontal
to be communicated to the decoder, which adds overhead and vertical directions. DCT, however, is natively suitable
to the bitrate. In addition, for real image data it turns out for one-dimensional signals because it separates frequen-
that the decorrelation performance of the widely used DCT cies in the direction of the signal. Also, other common
transformation is almost as good. KLT is, however, an transformations are designed for signals along a one-dimen-
important tool in data analysis where it is used to lower the sional line. To use them on images, the transformation is
dimension of the data set by removing the less significant done twice: first along horizontal lines of the image and then
dimensions. This method also is known as the principal again on vertical lines on the output of the first round. (The
component analysis. same result is obtained if the vertical transformation is
executed first, followed by the horizontal direction.) The
DCT Transformation. The discrete cosine transform combined effect again is an orthogonal transformation of the
(DCT) is an orthogonal linear transformation whose basis input image.
vectors are obtained by uniformly sampling the cosine For example, the basis vectors of DCT on 8  8 image data
function, see Fig. 3. More precisely, the element i, j of is shown in Fig. 4. The transformation decomposes an input
the n  n DCT matrix is image into a linear combination of the shown basis vectors.
Typically, high-frequency coefficients corresponding to
2j 1 basis vectors at the lower right corner are very small,
Ci cosip
2n whereas the low frequency basis vectors at the upper left
corner capture most of the image energy. This fact is
where i, j 0,1,. . ., n1 and Ci is the normalization factor exploited in the JPEG image compression algorithm dis-
 p cussed below.
p1=n
; if i 0
Ci
2=n; otherwise JPEG

This section outlines the JPEG (Joint Photographic


Different basis vectors of DCT capture different frequen- Experts Group) image compression standard as an illus-
cies present in the input. The first basis vector (i 0) is tration of the concepts discussed in previous sections. JPEG
constant, and the corresponding transformed value is called is based on the DCT transformation of 8  8 image blocks;
DATA COMPRESSION CODES, LOSSY 9

uniform scalar quantization of the transformed values, 3 2 12 4 4 12 2 9


where different step sizes can be used at different frequency
components; ordering of the quantized values from the low 2 0 1 6 1 5 19 3
frequency to the high frequency; and Huffman coding of the
0 0 11 2 3 2 11 11
ordered, quantized coefficients. The bitrate and the quality
are controlled through the selection of the quantizer step
sizes. For details of JPEG, see Ref. 16.
If the input image is a color image, it has three color Notice that the high frequency values at the lower right
components, each of which is compressed as a grayscale corner are relatively small. This phenomenon is common as
image. But the commonly used RGB (red, green, and blue) typical images contain more low than high frequencies. The
color representation first is converted into a luminance next step is the lossy step of scalar quantization. Different
chrominance representation where the luminance compo- frequencies may be quantized differently. Typically, the
nent is the intensity and two chrominance components give high-frequency values are quantized more coarsely than
the color. The chrominance components typically compress the low frequencies because the human visual system is less
much better than the luminance component that contains sensitive to high frequencies. The quantizer step sizes are
most of the image information. In addition, the human specified in an 8  8 array, called the quantization table. In
visual system is not as sensitive to the chrominance our example, let us use the following quantization table:
data, so the chrominance components often are subsampled
by removing half of the rows and/or columns. Also, the 16 11 10 16 24 40 51 61
chrominance components can be quantized more heavily.
12 12 14 19 26 58 60 55
Next, the image is partitioned into non overlapping 8  8
squares. As an example, take the image block 14 13 16 24 40 57 69 56

14 17 22 29 51 87 80 62

18 22 37 56 68 109 103 77

24 35 55 64 81 104 113 92

49 64 78 87 103 121 120 101

72 92 95 98 112 100 103 99


or
77 76 80 80 83 85 114 77
The transformed data values are divided by the correspond-
75 80 80 80 87 105 169 133 ing element of the quantization table and rounded to the
closest integer. The result is
81 77 80 86 116 167 171 180

67 79 86 135 170 169 169 161 2 14 5 0 1 0 0 0

80 87 119 168 176 165 159 161 18 5 4 2 0 0 0 0

83 122 166 175 177 163 166 155 2 8 3 0 1 0 0 0

117 168 172 179 165 162 162 159 2 2 2 1 0 0 0 0

168 174 180 169 172 162 155 160 1 1 1 0 0 0 0 0

0 0 0 0 0 0 0 0

extracted from a test picture. The intensity values are 0 0 0 0 0 0 0 0


integers in the interval 0. . .255. First, 128 is subtracted 0 0 0 0 0 0 0 0
from all intensities, and the result is transformed using the
8  8 DCT. The transformed values of the sample block
Notice the large number of zeroes in the high-frequency
rounded to the closest integerare
part of the table. This large number is because of two
factors: Higher frequencies were quantized more, and
28 158 47 5 14 8 17 5
the input contain less high frequency information (energy)
212 61 56 32 9 22 9 7 in the first place.
Next, the quantized values need to be entropy coded.
27 104 44 12 23 7 6 9
Huffman coding (or arithmetic coding) is used. The DC
30 29 50 25 1 11 10 5 coefficient (number 2 in our example) simply is subtracted
11 21 23 19 25 0 0 1 from the DC coefficient of the previous block, and the differ-
ence is entropy coded. The other 63 valuesthe AC coeffi-
10 DATA COMPRESSION CODES, LOSSY

cientsare lined up according to the following zigzag order:


The level of the compression artifacts is controlled by the
selection of the quantization table. Typical artifacts in
JPEG with coarse quantization are: blocking along the
boundaries of the 8  8 blocks, blending of colors
because of high quantization of chrominance components,
and ringing on edges because of the loss of high-frequency
information.

SUBBAND CODING AND WAVELETS

Typical image data contains localized high frequencies on


the boundaries of objects. Within an object, usually large
low frequency areas exist. Classical transformations into
the frequency domain, such as DCT, measure the total
amounts of various frequencies in the input. To localize
the effect of sharp edges, DCT commonly is applied on
The purpose is to have the large low-frequency values first, relatively small image blocks. In this way, image edges
and hopefully many zeroes at the end. In our example, this only affect the compression of the block that contains the
produces the sequence edge. This method, however, leads to blocking artifacts seen
in JPEG.
 14; 18; 2; 5; 5; 0; 4; 8; 2; 1; 2; 3; 2; 1; 0; 0; 0; Alternative linear, even orthogonal, transformations
 2; 1; 0; 0; 0; 1; 1; 1; 0; 0; . . . exist that measure frequencies locally. A simple example
is the Haar transformation. It is based an a multilevel
where the end of the sequence contains only zeroes. Huffman application of a 45 degree rotation of R2 , specified by the
coding is used where each Huffman code word represents a matrix
non zero value and the count of zeroes before it. In other  
words, Huffman code words are used for the non zero values 1 1 1
M p
only, although these code words also specify the positions of 2 1 1
zeroes. A specific code word also exists for the end of the block
that is inserted after the last non zero value. In this way, the On the first level, the input signal of length n is partitioned
long sequence of zeroes at the end can be skipped. into segments of two samples and each segment is trans-
From the compressed file, the decoder obtains the quan- formed using M. The result is shuffled by grouping
tized DCT output. Multiplying the values by the entries of together the first and the second coefficients from all
the quantization table and applying the inverse DCT segments, respectively. This shuffling provides two sig-
produces the reconstructed image block. In our example, nals of length n/2, where the first signal consists of moving
this block is averages and the second signal of moving differences of
the input. These two signals are called subbands, and they
70 87 86 71 77 100 100 78
also can be viewed as the result of filtering the input signal
84 82 72 69 93 130 145 138 by FIR filters whose coefficients are the rows of matrix M,
followed by subsampling where half of the output values
84 74 71 91 127 160 175 177 are deleted.
The high-frequency subband that contains the moving
68 72 97 135 163 169 166 166
differences typically has small energy because consecutive
66 90 133 171 180 165 154 154 input samples are similar. The low-frequency subband that
contains the moving averages, however, is a scaled version
94 125 161 178 174 164 161 163 of the original signal. The second level of the Haar trans-
formation repeats the process on this low-frequency sub-
132 160 178 172 164 168 168 161
band. This process again produces two subbands (signals of
154 180 188 169 162 172 165 144 length n/4 this time) that contain moving averages and
differences. The process is repeated on the low-frequency
output for as many levels as desired.
or The combined effect of all the levels is an orthogonal
transformation that splits the signal into a number of
subbands. Notice that a sharp transition in the input signal
now only affects a small number of values in each subband,
so the effect of sharp edges remains localized in a small
number of output values.
DATA COMPRESSION CODES, LOSSY 11

Haar transformation is the simplest subband transfor- especially in the presence of high motion. This difficulty is
mation. Other subband coders are based on the similar idea because the motion vectors of neighboring blocks can differ
of filtering the signal with two filtersone low-pass and one significantly, which results in visible block boundaries, and
high-pass filterfollowed by subsampling the outputs by a because at high-motion areas the motion compensation
factor of two. The process is repeated on the low-pass output leaves large differences to be encoded using DCT, which
and iterated in this fashion for as many levels as desired. can be done within available bit budget only by increasing
Different subband coders differ in the filters they use. Haar the level of quantization.
transformation uses very simple filters, but other filters See Refs. 2124 for more information on lossy compres-
with better energy compaction properties exist. See, for sion and for details of specific algorithms.
example, Ref. 17 for more details on wavelets and subband
coding.
When comparing KLT (and DCT) with subband trans- BIBLIOGRAPHY
formations on individual inputs, one notices that
although KLT packs energy optimally in fixed, predeter- 1. C. E. Shannon, A mathematical theory of communication, Bell
System Technical Journal, 27: 379423; 623656, 1948.
mined coefficients, subband transformations pack the
energy better in fewer coefficients, however, the positions 2. T. Cover and J. Thomas, Elements of Information Theory. New
York: Wiley & Sons, 1991.
of those coefficients depend on the input. In other words,
for good compression one cannot order the coefficients in a 3. C. E. Shannon, Coding theorems for a discrete source with a
fidelity criterion, IRE Nat. Conv. Rec., 7: 142163, 1959.
predetermined zigzag order as in JPEG, but one has to
specify also the position of each large value. 4. T. Berger and J. D. Gibson, Lossy source coding, IEEE Trans-
actions on Information Theory, 44(6), 26932723, 1998.
Among the earliest successful image compression algo-
rithms that use subband transformations are the 5. T. Berger, Rate Distortion Theory: A Mathematical Basis for
Data Compression, Englewood Cliffs, NJ: Prentice Hall,
embedded zerotree wavelet (EZW) algorithm by J. M.
1971.
Shapiro (18) and the set partitioning in hierarchical trees
6. S. Arimoto, An algorithm for computing the capacity of arbi-
(SPIHT) algorithm by A. Said and W. A. Pearlman (19).
trary discrete memoryless channels, IEEE Transactions on
The JPEG 2000 image compression standard is based on
Information Theory, 18(1): 1420, 1972.
subband coding as well (20).
7. R. E. Blahut, Computation of channel capacity and
rate- distortion function, IEEE Trans. Information Theory,
CONCLUSION 18(4): 460473, 1972.
8. R. M. Gray and D. L. Neuhoff, Quantization, IEEE Transac-
A wide variety of specific lossy compression algorithms tions on Information Theory, 44: 23252384, 1998.
based on the techniques presented here exist for audio, 9. S. P. Lloyd, Least squared quantization in PCM. Unpublished,
speech, image, and video data. In audio coding, linear Bell Lab. 1957. Reprinted in IEEE Trans. Information Theory,
prediction commonly is used. Also, subband coding and 28: 129137, 1982.
wavelets are well suited. If DCT type transformations 10. J. Max, Quantizing for minimum distortion, IEEE Trans.
are used, they are applied commonly on overlapping seg- Information Theory, 6(1), 712, 1960.
ments of the signal to avoid blocking artifacts. 11. D. Mureson and M. Effros, Quantization as histogram segmen-
In image compression, JPEG has been dominant. The tation: Globally optimal scalar quantizer design in network
wavelet approach has become more popular after the intro- systems, Proc. IEEE Data Compression Conference 2002, 2002,
pp. 302311.
duction of the wavelet-based JPEG 2000. At high quantiza-
tion levels, JPEG 2000 exhibits blurring and ringing on 12. Y. Linde, A. Buzo, and R. M. Gray, An algorithm for vector
quantizer design, IEEE Trans. Communications, 28: 8495,
edges, but it does not suffer from the blocking artifacts
1980.
typical to JPEG.
13. A. Gersho and R. M. Gray, Vector Quantization and Signal
Video is an image sequence, so it is not surprising that
Compression. New York: Kluwer Academic Press, 1991.
the same techniques that work in image compression also
14. J. D. Markel and A. H. Gray, Linear Prediction of Speech. New
work well with video data. The main difference is the
York: Springer Verlag, 1976.
additional temporal redundancy: Consecutive video frames
15. K. R. Rao and P. Yip, Discrete Cosine Transform: Algorithms,
are very similar, and this similarity can be used to get good
Advantages, Applications. New York: Academic Press, 1990.
compression. Commonly, achieving this good compression
16. W. B. Pennebaker and J. L. Mitchell, JPEG Still Image
is done through block-based motion compensation, where
Compression Standard. Amsterdam, the Netherlands: Van
the frame is partitioned into blocks (say of size 16  16) and Nostrand Reinhold, 1992.
for each block a motion vector that refers to a reconstructed
17. G. Strang and T. Nguyen, Wavelets and Filter Banks. Well-
block in a previously transmitted frame is given. The esley-Cambridge Press, 1996.
motion vector specifies the relative location of the most
18. J. M. Shapiro, Embedded Image Coding Using Zerotrees of
similar block in the previous frame. This reference block is Wavelet Coefficients. IEEE Trans. Signal Processing, 41(12),
used by the decoder as the first approximation. The differ- 34453462, 1993.
ence of the correct block and the approximation then is 19. A. Said and W. A. Pearlman, A new fast and efficient image
encoded as a still image using DCT. Common standards codec based on set partitioning in hierarchical trees, IEEE
such as MPEG-2 are based on this principle. At high Trans. Circuits and Systems for Video Technology, 6: 243250,
compression, the technique suffers from blocking artifacts, 1996.
12 DATA COMPRESSION CODES, LOSSY

20. D. S. Taubman and M. W. Marcellin, JPEG 2000: Image 24. M. Rabbani and P. W. Jones, Digital Image Compression
Compression, Fundamentals, Standards, and Practice. New Techniques. Society of Photo-Optical Instrumentation Engi-
York: Kluwer Academic Press, 2002. neers (SPIE) Tutorial Text, Vol. TT07, 1991.
21. K. Sayood, Introduction to Data Compression, 2nd ed. Morgan
Kaufmann, 2000.
22. D. Salomon, Data Compression: the Complete Reference, 3rd JARKKO KARI
ed. New York: Springer, 2004. University of Turku
Turku, Finland
23. M. Nelson and J. L. Gailly, The Data Compression Book, 2nd
ed. M & T Books, 1996.
D
DATA HANDLING IN INTELLIGENT Advanced Traffic Management Systems (ATMSs) employ
TRANSPORTATION SYSTEMS a variety of relatively inexpensive detectors, cameras, and
communication systems to monitor traffic, optimize signal
timings on major arterials, and control the flow of traffic.
INTRODUCTION Incident Management Systems, for their part, provide
traffic operators with the tools to allow a quick and efficient
Within the domain of computer science, data handling is response to accidents, hazardous spills, and other emer-
the coordinated movement of data within and between gencies. Redundant communications systems link data
computer systems. The format of the data may be changed collection points, transportation operations centers, and
during these movements, possibly losing information dur- travel information portals into an integrated network
ing conversions. The data may also be filtered for privacy, that can be operated efficiently and intelligently.
security, or efficiency reasons. For instance, some informa- Some example ITS applications include on-board naviga-
tion transmitted from an accident site may be filtered for tion systems, crash notification systems, electronic payment
privacy purposes before being presented to the general systems, roadbed sensors, traffic video/control technologies,
public (e.g., license numbers and names). The motivation weather information services, variable message signs, fleet
for this article is to be an updated reference of the various tracking, and weigh in-motion technologies.
mechanisms and best practices currently available for
handling intelligent transportation systems (ITSs) data.
In the sections that follow, data handling within ITS is MAJOR CHALLENGES
discussed in detail.
One major challenge in handling ITS data involves mana-
What are Intelligent Transportation Systems? ging the broad spectrum of requirements inherent in a
transportation system. ITS data must flow from and
Intelligent transportation systems apply computer, com- between a variety of locations and devices such as in-vehicle
munication, and sensor technologies in an effort to improve sensors, police dispatch centers, infrastructure sensors,
surface transportation. The application of these technolo- computers, and databases. Each of these options has dif-
gies within surface transportation typically has been lim- ferent bandwidth, formatting, and security requirements.
ited (e.g., car electronics and traffic signals). One goal of ITS A one-solution-fits-all approach is not appropriate in this
is to broaden the use of these technologies to integrate more type of environment. Fortunately, many standards can be
closely travelers, vehicles, and their surrounding infra- applied in concert with one another to cover all require-
structure. Used effectively, ITS helps monitor and manage ments. These standards and how they are used are dis-
traffic flow, reduce congestion, provide alternative routes to cussed in the sections that follow.
travelers, enhance productivity, respond to incidents, and
save lives, time, and money. Over the past ten years, the
public and private sectors have invested billions of dollars DATA HANDLING IN ITS
in ITS research and development and in initial deployment
of the resulting products and services. Data within an ITS originates at various sensors, such as in-
Given the potential benefits of ITS, the U.S. Congress pavement inductive loop detectors for measuring the pre-
specifically supported an ITS program in the Transportation sence of a vehicle, transponders for collecting toll fees, video
Equity Act for the 21st Century (TEA-21) in 1998. As defined cameras, and operator input. These data typically are col-
by TEA-21, the ITS program provides for the research, lected and aggregated by a transportation agency for use in
development, and operational testing of ITSs aimed at sol- managing traffic flow and in detecting and responding to
ving congestion and safety problems, improving operating accidents. These data are often archived, and later data-
efficiencies in transit and commercial vehicles, and reducing mining techniques are used to detect traffic trends. These
the environmental impact of growing travel demand. Tech- data also make their way to information providers for use in
nologies that were cost effective were deployed nationwide radio, television, and Web traffic reports.
within surface transportation systems as part of TEA-21. The different requirements for ITS data handling depend
Intelligent transportation systems can be broken down on the medium used. For instance, the requirements for
into three general categories: advanced traveler informa- data handling in communications stress the efficient use of
tion systems, advanced traffic management systems, and bandwidth and low latency, whereas data handling for data-
incident management systems. mining applications require fast lookup capabilities.
Advanced Traveler Information Systems (ATISs) deliver
data directly to travelers, empowering them to make better Data Types and Formats
choices about alternative routes or modes of transportation. Various types of data are stored and manipulated by an ITS.
When archived, this historical data provide transportation The types of data are discussed in the sections that follow.
planners with accurate travel pattern information, opti-
mizing the transportation planning process.

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
Traffic Statistics. Speed, travel time, volume, and occu- ior to manage and facilitate the National Spatial Data
pancy data or other numeric measurements are used to Infrastructure (NSDI) (1).
characterize the flow of vehicles at a specific point or over a
specific segment of roadway. These data can be generated Data Formats and Communication Protocols. Standards
from many types of detection systems, such as loop detec- are built off of one another. For instance, ITS standards
tors, microwaves, infrared or sonic detectors, video image make use of standards for data formatting and communica-
detection, automatic vehicle identification, license plate tions, such as Extensible Markup Language (XML), Com-
matching systems, and wireless phone probes. mon Object Request Broker Architecture (CORBA), or
Abstract Syntax Notation number One (ASN.1). To better
Weather/Environmental. Wind speed, wind direction, understand ITS standards, these underlying standards
temperature, humidity, visibility, and precipitation data will be discussed first.
are collected by weather stations. This information can be
used to determine whether road salt is needed because of Extensible Markup Language. XML is a standard of the
icing conditions or whether danger exists to large vehicles World Wide Web Consortium (W3C) (2). XML is a means of
because of high wind speeds. encoding data so that computers can send and receive
information. XML allows computers to understand the
Video/Images. Video cameras are mounted high to pro- information content of the data and act on that content
vide unobstructed views of traffic. Video data are in the (e.g., process the information, display the information to a
form of encoded data streams or still images. Video feeds human, store the information in a database, and issue a
are used to determine the cause and location of incidents command to a field device). Unlike most computer encoding
and to determine the overall level of service (congestion). standards (e.g., Basic Encoding Rules, Octet Encoding
Rules, Packed Encoding Ruled, Common Data Representa-
Incident/Event Reports. Incidents, construction/ mainte- tion, and Hypertext Markup Language), no single set of
nance, events, and road conditions are some types of data encoding rules exists for XML. Instead, XML encoding
collected. This information usually is entered manually rules are customized for different applications. Further-
into the system because an automated means of detecting more, XML encoding rules include a mechanism for iden-
an incident has yet to be developed. The reports provide tifying each element of an XML document or message. See
descriptive information on planned or unplanned occur- Ref. 3 for an overview of XML use in ITS applications.
rences that affect or may affect traffic flow. The advantages of using XML for ITS data handling are
for communications. It has pervasive support among soft-
Data Attributes. The following attributes are common ware companies, standards organizations, and government
within ITS data: AccuracyHow precise is the data? agencies. Also, XML formatted data are often bundled with
DetailIs the data a direct measurement or an esti- Web services over Hyper-Text Transmission Protocol
mated/indirect measurement? TimelinessHow fresh is (HTTP) via SOAP (4) or XML-RPC (5). This bundling allows
the data? Availability/ReliabilityHow dependable is the data and associated commands to traverse firewalls
the flow of data? DensityHow close together/far apart more easily. Some may see this process as a disadvantage,
are the data collection sources? AccessibilityHow easy is however, because it basically is hiding the services from
the data accessed by a data consumer? ConfidenceIs the network administrators and granting potentially unse-
data trustworthy? CoverageWhere is the data collected? cured access to important functions.
XML format is not well suited for data storage, how-
Standards for Data Handling ever, because its hierarchal data structure does not lend
itself to easy storage and retrieval from relational data-
Standards provide a mechanism to ensure compatibility
bases. However, XML databases, which natively can
among various disparate systems. These standards reduce
store, query, and retrieve XML-formatted documents,
costs because software and hardware can be developed to
are now available (6).
make use of a handful of standards rather than of hundreds
A disadvantage to XML-formatted data is that the tags
of proprietary protocols.
and the textual nature of the documents tend to make them
The following organizations are involved in the devel-
much more verbose. This verbosity, in turn, requires higher
opment of ITS standards: the American Association of State
bandwidth communication links and more data processing
Highway and Transportation Officials (AASHTO), Amer-
to encode and decode ITS data as compared with CORBA or
ican National Standards Institute (ANSI), American
ASN.1 (7,8).
Society for Testing & Materials (ASTM), Consumer Elec-
tronics Association (CEA), Institute of Electrical and Elec-
Common Object Request Broker Architecture. CORBA is
tronics Engineers (IEEE), Institute of Transportation
an Object Management Group (OMG) standard for com-
Engineers (ITE), Society of Automotive Engineers (SAE),
munications between computers (9). As part of CORBA, the
National Electrical Manufacturers Association (NEMA),
interface definition language (IDL) provides a platform and
and the National Transportation Communications for
computer language-independent specification of the data to
ITS Protocol (NTCIP). Note that NTCIP is a joint effort
be transmitted and the services that are available to a
among AASHTO, ITE, and NEMA.
CORBA application. The OMG requires CORBA implemen-
The Federal Geographic Steering Committee (FGSC)
tations to make use of the Internet Inter-ORB Protocol
provides staff to support the U.S. Department of the Inter-
(IIOP) for encoding messages over the Internet. This pro- SAE recommended practices and standards that define the
tocol ensures that CORBA implementations from different message formats, message header codes, node IDs, applica-
vendors running on different operating systems can inter- tion services and service codes, data definitions, diagnostic
act with one another. NTCIP has a CORBA-based standard connectors, diagnostic services and test mode codes, ITS
for communications between transportation centers, data busvehicle bus gateway services and service codes,
NTCIP 2305 (10). CORBA inherently is object oriented, network management services/functionality, and other
which allows for the definition of both data structures and areas as may be needed.
for commands in the form of interfaces.
One advantage to using CORBA are its relatively lower National ITS Architecture. The National ITS Architec-
bandwidth requirements as compared with XML-based com- ture provides a common framework for planning, defining,
munications. CORBA has wide industry support, and many and integrating intelligent transportation systems (16). It
open-source implementations are available (11,12). Because is a mature product that reflects the contributions of a
CORBA is based on the IIOP communications standard, the broad cross section of the ITS community: transportation
various commercial and open-source implementations can practitioners, systems engineers, system developers, tech-
interoperate with one another. CORBA has the advantage, nology specialists, and consultants. The architecture pro-
as compared with ASN.1 or XML, in that it describes both the vides high-level definitions of the functions, physical
structure of the data to be transmitted and what is to be done entities, and information flows that are required for ITS.
with the data. Finally, many counterpart extensions to The architecture is meant to be used as a planning tool for
CORBA handle such things as authentication. state and local governments.
The disadvantages to CORBA are that it requires spe-
cialized knowledge to integrate it into ITS data handling Traffic Management Data Dictionary. The Data Diction-
systems. Also, because CORBA does not make use of the ary for Advanced Traveler Information Systems, Society of
HTTP protocol, it does not traverse Web firewalls as easily Automotive Engineers (SAE) standard J2353, provides
as XML-RPC or SOAP. concise definitions for the data elements used in advanced
traveler information systems (ATIS) (17). These definitions
Abstract Syntax Notation. ASN.1 is a standard of the provide a bit-by-bit breakdown of each data element using
International Standards Organization (ISO) that defines ASN.1. The traffic management data dictionary is meant to
a formalism for the specification of abstract data types. be used in conjunction with at least two other standards,
ASN.1 is a formal notation used for describing data trans- one for defining the message sets (e.g., SAE J2354 and SAE
mission protocols, regardless of language implementation J2369) and the other for defining the communication pro-
and physical representation of these data, whatever the tocol to be used.
application, whether complex or very simple. ASN/DATEX
is a NTCIP standard (NTCIP 2304). ASN.1 is not a com- TransXML. XML Schemas for the exchanges of Trans-
munication or data storage mechanism, but it is a standard portation Data (TransXML) is a fledgling standard with the
for expressing the format of complex data structures in a goal to integrate various standards such as LandXML,
machine-independent manner. Many encoding rules can aecXML, ITS XML, and OpenGIS into a common frame-
encode and decode data via ASN.1 such as the basic encod- work. This project has not had any results yet; see Ref. 18
ing rules (BERs), canonical encoding rules (CERs), and for more information.
distinguished encoding rules (DERs) (13).
ASN.1 has the advantage that it unambiguously defines Geography Markup Language. Geography markup lan-
the structure for ITS data and the various encoding guage (GML) is an OpenGIS standard based on XML that is
schemes allow for efficient transmission of the data over used for encoding and storing geographic information,
even lower bandwidth communication systems. Many soft- including the geometry and properties of geographic fea-
ware libraries are also available that handle the encoding tures (19). GML was developed by an international, non-
and decoding of ASN.1 data structures (14). profit standards organization, the Open GIS Consortium,
Inc. GML describes geographic features using a variety of
ITS Data Bus. Chartered in late 1995, the Data Bus XML elements such as features, coordinate referencing
Committee is developing the concept of a dedicated ITS systems, geometry, topology, time, units of measure, and
data bus that may be installed on a vehicle to work in generalized values.
parallel with existing automotive electronics (15). When
complete, the data bus will facilitate the addition of ITS Spatial Data Transfer Standard. The Spatial Data Trans-
electronics devices to vehicles without endangering any of fer Standard (SDTS) is a National Institute of Standards
its existing systems. (NIST) standard for the exchange of digitized spatial data
The ITS data bus will provide an open architecture to between computer systems (20). SDTS uses ISO 8211 for its
permit interoperability that will allow manufacturers, physical file encoding and breaks the file down into mod-
dealers, and vehicle buyers to install a wide range of ules, each of which is composed of records, which in turn are
electronics equipment in vehicles at any time during the composed of fields. Thirty-four different types of modules
vehicles lifecycle, with little or no expert assistance currently are defined by the standard, some of which are
required. The goal of the Data Bus Committee is to develop specialized for a specific application.
LandXML. LandXML is an industry-developed stan- BIBLIOGRAPHY
dard schema for the exchange of data created during
land planning, surveying, and civil engineering design 1. National Spatial Data Infrastructure. Available: http://
processes by different applications software. LandXML www.geo-one-stop.gov/.
was developed by an industry consortium of land devel- 2. Extensible Markup Language (XML) 1.0 Specification. Avail-
opers, universities, and various government agencies. able: http://www.w3.org/TR/REC-xml/.
LandXML is used within GIS applications, survey field 3. XML in ITS Center-to-Center Communications. Available:
instruments, civil engineering desktop and computer http://www.ntcip.org/library/documents/pdf/
aided design (CAD)-based applications, instant three- 9010v0107_XML_in_C2C.pdf.
dimensional (3-D) viewers, and high-end 3D visualization 4. SOAP Specifications. Available: http://www.w3.org/TR/soap/.
rendering applications. LandXML has provisions for not 5. XML-RPC Home Page. Available: http://www.xmlrpc.com/.
only the storage of a features geometry, but also for its 6. XML:DB Initiative. Available: http://xmldb-org.sourcefor-
attributes, such as property owner and survey status. ge.net/.
LandXML can be converted readily to GML format. 7. James Kobielus, Taming the XML beast,. Available: http://
www.networkworld.com/columnists/2005/011005kobie-
Scalable Vector Graphics. Scalable vector graphics lus.html.
(SVG) is an XML-based standard for the storage and dis- 8. R. Elfwing, U. Paulsson, and L. Lundberg, Performance of
play of graphics using vector data and graphic primitives. It SOAP in web service environment compared to CORBA,
primarily is used in the design of websites, but also it has Proc. of the Ninth Asia-Pacific Software Engineering Confer-
application for the display and transfer of vector-based ence, 2002, pp. 84.
geographic data. It does not, however, have specific provi- 9. CORBA IIOP Specification. Available: http://www.omg.org/
sions for the attributes that are associated with geographic technology/documents/formal/corba_iiop.htm.
data such as road names and speed limits. 10. NTCIP 2305 - Application Profile for CORBA. Available: http://
www.ntcip.org/library/documents/pdf/2305v0111b.pdf.
Location Referencing Data Model. The location referen- 11. MICO CORBA. Available: http://www.mico.org/.
cing data model is a National Cooperative Highway 12. The Community OpenORB Project. Available: http://open-
Research Program (NCHRP) project that defines a location orb.sourceforge.net/.
referencing system. Within this system, a location can be 13. X.690 ASN.1 encoding rules: Specification of Basic Encoding
defined in various formats such as mile points or addresses. Rules, Canonical Encoding Rules and Distinguished Encoding
It also provides for the conversion of a location between the Rules. Available: http://www.itu.int/ITU-T/studygroups/
various formats and for the definition of a location in one, com17/languages/X.690-0207.pdf.
two, or more dimensions (21). 14. ASN.1 Tool Links. Available: http://asn1.elibel.tm.fr/links.
15. ITS Data Bus Committee. Available: http://www.sae.org/tech-
International Standards Organization Technical Commit- nicalcommittees/databus.htm.
tee 211. The International Standards Organization Tech- 16. National ITS Architecture. Available: http://itsarch.iteris.-
nical Committee 211 (ISO TC/211) has several geographic com/itsarch/.
standards that are of importance to intelligent transporta- 17. SAE J2353 Advanced Traveler Information Systems (ATIS)
tion systems: Geographic informationRules for Applica- DataDictionary. Available: http://www.standards.its.dot.gov/
tion Schema; ISO 19123, Geographic information Documents/J2353.pdf.
Schema for coverage geometry and functions; and ISO 18. XML Schemas for Exchange of Transportation Data
19115, Geographic informationMetadata. (TransXML). Available: http://www4.trb.org/trb/crp.nsf/0/
32a8d2b6bea6dc3885256d0b006589f9?OpenDocument.
Data Mining and Analysis 19. OpenGIS1 Geography Markup Language (GML) Implemen-
tationSpecification. Available: http://www.opengis.org/docs/
Data mining and analysis of transportation data are useful 02-023r4.pdf.
for transportation planning purposes (e.g., transit devel- 20. Spatial Data Transfer Standard (SDTS). Available: http://
opment, safety analysis, and road design). Data quality ssdoo.gsfc.nasa.gov/nost/formats/sdts.html.
especially is important because the sensors involved can 21. N. Koncz, and T. M. Adams, A data model for multi-dimen-
malfunction and feed erroneous data into the analysis sional transportation location referencing systems, Urban
process (22). For this reason, ITS data typically needs to Regional Informa. Syst. Assoc. J., 14(2), 2002. Available:
be filtered carefully to assure data quality. This filtering is http://www.urisa.org/Journal/protect/Vol14No2/Koncz.pdf.
accomplished by throwing out inconsistent data. For 22. M. Flinner, and H. Horsey, Traffic data edit procedures pooled
instance, a speed detector may be showing a constant fund study traffic data quality (TDQ), 2000, SPR-2 (182).
free flow speed while its upstream and downstream coun-
terparts show much slower speeds during peak usage
JOHN F. DILLENBURG
hours. In this case, the inconsistent detector data would
PETER C. NELSON
be thrown out and an average of the up and downstream
University of Illinois at Chicago
detectors would be used instead. Chicago, Illinois
D
DATA PRIVACY tracking legislation, monitoring competitors, training
employees, and if necessary, performing damage control
The definition of privacy varies greatly among societies, in the press.
across time, and even among individuals; with so much The European Union has a comprehensive framework to
variation and interpretation, providing a single concrete control the collection and distribution of personally identi-
definition is difficult. Several concepts that are related to fiable information by both state and private-sector institu-
privacy are as follows: tions. The 1998 EU Data Protection Directive is the latest
piece of European legislation that follows on from a series of
Solitude: The right of an individual to be undisturbed national laws initially developed in the 1970s and earlier
by, or invisible from, some or all other members of EU directives and OECD guidelines.
society, including protection of the home, work, or a The EU Directive requires that all personal data are as
public place from unwanted intrusion. follows:
Secrecy: The ability to keep personal information
secret from some or all others, including the right  Processed fairly and lawfully
to control the initial and onward distribution of per-  Collected for explicit purposes and not further pro-
sonal information and the ability to communicate cessed in any way incompatible with those purposes
with others in private.  Relevant and not excessive in relation to the collected
Anonymity: The right to anonymity by allowing an purposes
individual to remain nameless in social or commercial  Accurate and up to date
interaction.  Kept in a form that identifies an individual for no
longer than neccessary to meet the stated purpose
LEGAL BACKGROUND
Companies, governments, and in some cases individuals
In their influential article entitled The Right to Privacy who process personal information must register their
published in the Harvard Law Review in 1890, Samuel D. intent to do so with an independent supervisory authority
Warren and Louis D. Brandeis described how [i]nstanta- and outline the requirement for, and purpose of, data
neous photographs and newspaper enterprise have processing. The supervisory authority has the power to
invaded the sacred precincts of private and domestic life; investigate the processing of personal data and impose
and numerous mechanical devices threaten to make good sanctions on those who do not adhere to the Directive.
the prediction that what is whispered in the closet shall be Individuals are entitled to receive a copy of their personal
proclaimed from the house-tops. data held by a third-party at reasonable intervals and
Warren and Brandeis described how U.S. common law without excessive delay or expense.
could be used to protect an individuals right to privacy. The The European model has been widely copied elsewhere,
article has been very influential in the subsequent devel- in part because the Directive requires adequate levels of
opment of legal instruments to protect data privacy. In protection for the processing of personal data be available
1948, the General Assembly of the United Nations passed in all countries that receive personal data from within the
the Declaration of Human Rights, of which Article 12 EU. The provision of adequate protection is open to inter-
states, [n]o one shall be subjected to arbitrary interference pretation, and in some cases, it has been condemned for
with his privacy, family, home or correspondence, nor to being too low; for example, the 2004 agreement between the
attacks upon his honour and reputation. Everyone has the European Commission and the United States to share air-
right to the protection of the law against such interference line passenger screening data has been widely criticized.
or attacks. The majority of countries in the world now
consider privacy as a right and have enacted laws describ-
THE EFFECT OF TECHNOLOGY ON PRIVACY
ing how and when citizens can expect privacy.
The level of legal protection of privacy varies from one
Developments in science and technology continue to pro-
country to another. In the United States, there is no general
vide individuals, governments, and private industry with
privacy protection law to regulate private industry; instead
new ways to invade the privacy of others. In particular, the
specific federal legislation is introduced to deal with parti-
ability of computers to record, process, and communicate
cular instances of the collection and processing of personal
personal data has increased exponentially during the latter
information. In addition, some states have amended their
decades of the twentieth century. This increase in comput-
consititutions to include specific rights to privacy. In areas
ing power has been used by governments, companies, and
not covered by specific federal or state laws, companies are
individuals to process an increasing quantity of personally
left to self-regulate. The new executive post of Chief Privacy
identifiable data. Globalization has driven the desire to
Officer has been adopted by some companies, with respon-
distribute personal information to different parts of the
sibilities including the development of privacy policy,
world and has encouraged the development of standards

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DATA PRIVACY

such as the Internet Protocol suite and XML, enabling an In markets with large up-front costs and low produc-
efficient exchange of digital information on a global scale. tion costs, sellers can sacrifice the privacy of buyers to
The widespread use of the personal computer and the good effect, maximizing their profits without having to
Internet has provided a variety of both legitimate and unnecessarily inconvenience anyone. For example,
malicous reasons for individuals to process personal sellers no longer need to employ market segmentation
data. Social networking websites allow people to search to force poorer buyers to purchase third-class tickets;
for user profiles matching certain criteria. Similarly, query- instead everyone can get the same high-quality service
ing a Web search engine for an individuals name reveals a but for different prices: a potential social benefit. Societies
wealth of information about the person, including archived have yet to decide whether this represents a reasonable
posts on mailing lists and newsgroups, personal home invasion of privacy or something requiring government
pages, business web pages, and telephone numbers. Often regulation.
this information is intentionally published by, or on behalf Small and mobile computational devices are becoming
of, the individual, but this copious amount of information increasingly popular. The GSM Association estimated that
can be easily misused. More serious invasions of privacy are in early 2004, more than one billion peopleone sixth of the
possible when personal computers are connected to the worlds populationhad a GSM mobile phone. As devices
Internet and contain sensitive personal data, for example, like these continue to proliferate, the volume of personal
financial records and medical information. Many compu- information processed by computers will continue to
ters today are relatively insecure and are easy prey for increase, not just because there are more devices, but
malicious code in the form of viruses, trojans, and worms. because these devices increasingly need to collect more
Once compromised, a computer falls under the complete personal information to function effectively (see UBIQUITOUS
control of an attacker who may freely access any private COMPUTING). As a consequence, providing privacy in the
data stored there. twenty-first century will become increasingly difficult
The quantity and quality of personal information avail- and important.
able on the Internet can be sufficient for a malicious person
to perform identity theft, allowing them to impersonate a
USING TECHNOLOGY TO PROTECT PRIVACY
victim for illicit financial gain. Cyberstalkers use informa-
tion available online to harrass their victims, sometimes
Although computer-related technologies are increasing the
with violent consequences. Anti-abortion activists have
ability of individuals, companies, and governments to
created websites detailing the home addresses of abortion
invade personal privacy, technology can also be used to
doctors and photos of women who receive an abortion; these
increase the level of privacy available to individuals.
details have then been used by violent extremists, some-
Several solutions can be used depending on the level of
times resulting in murder.
trust placed in the recipients of private information.
Governments process personal data for a variety of
different purposes. Census data are collected from citizens
Secrecy
in many countries to enable strategic planning of state and
private sector services. Financial data such as bank account Developments in cryptography have enabled information
transactions are examined in the fight against organized and communications to be encrypted, maintaining their
crime, and biological data such as photographs, finger- secrecy in the presence of attacks by other individuals,
prints, iris scans, and DNA profiles can be collected for companies, and even governments. In the latter part of
both research and forensic analysis purposes. Tradition- the twentieth century, governments were reluctant to
ally, different government departments, like separate com- allow individuals access to strong encryption and therefore
panies, have kept separate databases, but in some cases, attempted to control the distribution of strong encryption
disparate systems are in the process of, or have already technology. The development of the personal computer
been merged, enabling far more in-depth citizen profiling. made governmental restriction on strong encryption ulti-
Companies compile personal information about custo- mately impossible, because individuals could purchase
mers to process orders, determine effective marketing computers powerful enough to perform both symmetric
strategies, and direct advertisements toward individuals and public key cryptography in software.
who are likely to be receptive to them. Targetted adver- Pretty Good Privacy (PGP) was one of the first programs
tisements are often used to increase consumer loyalty by developed to take advantage of the power of personal
providing discount points, tokens, or coupons on products of computers and offer individuals access to strong encryption
interest to a specific individual. schemes to keep documents secret from corporations and
In economics, the act of charging different prices to governments; it was so successful at this that its author,
different customers is known as price discrimination and Phil Zimmerman, was charged with (but later acquitted of)
is common practice in many markets worldwide. There are violating U.S. export laws. More recently, Transport Layer
several different mechanisms by which sellers can perform Security (TLS) has been developed for the World Wide Web
price discrimination, including individual bartering, to enable end-to-end privacy of communications between
schemes of quantity discounts, and market segmentation. two participants. As such, TLS has been a key enabling
Sellers who have collected detailed personal information on technology in the development of e-commerce over the
buyers can employ a fourth mechanism. They can compute Internet, enabling buyers and sellers to exchange credit
directly how much a user can pay for a product. card information in a secure way.
DATA PRIVACY 3

Access Control the central authority must be trusted by all parties who
use the system.
Cryptography is excellent at protecting privacy when the
data are controlled by its owner and it is shared with
Anonymity
relatively few other parties who trust each other to keep
the data secret. Sharing data with a larger set of parti- Sometimes there no trust relationship exists between
cipants increases the likelihood that trust is misplaced the owner of personal information and a third-party, and
in at least one party, thereby jeopardizing data secrecy. yet they still want to exchange information. For example,
The number of participants with access to private informa- individuals may not want to reveal the contents of
tion can often be reduced by implementing multilateral their medical records to drug companies; yet the develop-
security, where information is stored in compartments ment of pharmaceutical products clearly benefits from
accessable to only a few individuals, and the flow of infor- access to the information contained within such docu-
mation between compartments is restricted (see COMPUTER ments. It is often possible to provide access to a subset of
SECURITY). the data that satisfies the demands of the third party and
A recent example of using multilateral security to pro- simultaneously protects the privacy of an individual
tect privacy is the British Medical Association model for through anonymization.
controlling access to electronic patient records. In the Anonymization protects an individuals privacy by
model, patients do not have a single electronic record; removing all personally identifiable data before delivering
rather, they have a set of records (or compartments), it to an untrusted third party. Therefore, once data are
each of which has a separate list of health-care workers successfully anonymized an adversary cannot infer the
who have the permission to read or append information to real-world individual represented by the data set. Anon-
it. The flow of information between different records is ymization is not an easy process; it is not sufficient to simply
restricted to prevent particularly sensitive information remove explicit identifiers such as a name or telephone
detailed in one record, such as a positive HIV test, from number, because a combination of other attributes may
being introduced into other records. enable a malicious data recipient to infer the individual
represented by the data set. For example, in the set of
Reciprocity medical records for Cambridge, England, there may be
only one 42-year-old professor who has lost sight in one
Configuring fine-grained access control parameters can be
eye. If the data presented to the third party contains
time consuming and difficult to get right. An alternative
information concerning the individuals home city, profes-
solution is to use reciprocity, where two or more entities
sion, date of birth, and ophthalmology in sufficient detail,
agree to the mutual exchange of private data. The exchange
then it may be possible to associate this data with a real-
of information is symmetric if each party in the reciprocal
world entity and therefore associate any other data in this
transaction reveals the same piece of private data to all
record with a concrete identity. In this case, the privacy of
other parties; for example, three friends share their cur-
the professor is effectively lost and the contents of his
rent mobile phone location with each other through their
medical record, as presented to the third party, are
mobile phone operator. An exchange of data is asymmetric
revealed.
if information is provided in return for the knowledge of the
Successful anonymization may require the values in the
recepients identity. For example, in the United Kingdom,
released data set to be modified to prevent the third party
consumer credit ratings employ reciprocity: If a company
from inferring the real-world identity associated with a
queries a credit rating of an individual, that fact is recorded
record. For example, reducing the accuracy of the indivi-
in the database so that when an individual queries their
duals age from 42 to the range (4050) may prevent an
credit rating at a later date, they can see which companies
attacker associating an identity with the record. Whether
examined their record.
this reduction alone is sufficient depends on the data held in
Asymmetric reciprocity requires those requesting data
the other records (in the example above, it depends on the
to have a reputation worth protecting so that they obey
number of other professors between the ages of 40 and 50
acceptable social conventions when asking for informa-
with sight in only one eye). In general, anonymization of
tion. Therefore, an abusive information request should
data is achieved through a thorough statistical analysis of
reduce the attackers reputation so that a requester with
the data set that takes into account the amount of informa-
a poor reputation forfeits all future access. Symmetric
tion known by an attacker; such analysis is called Statis-
reciprocity requires that the information shared by each
tical Disclosure Control.
participant is of similar value and therefore constitutes a
fair exchange. This is not always true; for example, the
home phone number of a famous individual may be con- IS PRIVACY ALWAYS WORTH PROTECTING?
sidered more valuable than the phone number of an ordi-
nary citizen. The rigorous protection of privacy is not always of benefit to
A centralized authority is usually required to enforce the individual concerned or society at large. Professor Anita
reciprocity by authenticating both the identities of Allen observed that privacy in the home and workplace has
those who access private data and the actual content of been a problem for women where it led to imposed mod-
the mutually shared information. Authentication gua- esty, chastity, and domestic isolation. Such enforced soli-
rantees the identities of the parties, and the content of tude can prevent the exposure of criminal acts such as
the exchanged information cannot be forged; therefore, domestic abuse. Allowing government ministers and
4 DATA PRIVACY

departments privacy in their professional duties is at odds Electronic Privacy Information Center. Available: http://www.
with the principles of openness and accountability. Most epic.org.
people would agree on the need for secrecy and privacy in Privacy International, Privacy and Human Rights Survey.
the realm of international espionage but would hesitate in Available: http://www.privacyinternational.org/survey.
restricting the freedom of the press to uncover corruption
and financial irregularities.
Books
Similarly, company directors are ultimately accountable
to shareholders; however, the desire for openness with
R. Anderson, Security Engineering, New York: Wiley, 2001.
investors must be reconciled with the need to protect busi-
S. Garfinkel, Database Nation: The Death of Privacy in the 21st
ness secrets from competitors. Most countries use legal
Century, OReilly & Associates, 2001.
measures to force businesses to make certain information
L. Lessig, Code and Other Laws of Cyberspace, Basic Books, 2000.
publically available, for example, the filing of public
accounts; yet financial scandals are still not uncommon. J. Rosen, The Unwanted Gaze: The Distruction of Privacy in
America, Vintage Books, 2001.
In many instances, an individuals right to privacy must be
balanced with the need to protect themselves or others. L. Willenborg and T. de Waal, Elements of Statistical Disclosure
Control, Lecture Notes in Statistics, Vol. 155, New York: Springer,
2001.
FURTHER READING

Web Links ALASTAIR BERESFORD


DAVID SCOTT
University of Cambridge
Center for Democracy and Technology. Available: http://
www.cdt.org. Cambridge, United Kingdom
Electronic Frontier Foundation. Available: http://www.eff.org.
D
DATA SEARCH ENGINE sketch the idea of building a database search engine.
Finally, we introduce the key components of metasearch
INTRODUCTION engines, including both document metasearch engines
and database metasearch engines, and the techniques for
The World Wide Web was first developed by Tim Berners- building them.
Lee and his colleagues in 1990. In just over a decade, it has
become the largest information source in human history.
DOCUMENT SEARCH ENGINE
The total number of documents and database records that
are accessible via the Web is estimated to be in the hun-
Architecture
dreds of billions (1). By the end of 2005, there were already
over 1 billion Internet users worldwide. Finding informa- Although the architectures of different Web search engines
tion on the Web has become an important part of our daily may vary, a typical document search engine generally
lives. Indeed, searching is the second most popular activity consists of the following four main components as shown
on the Web, behind e-mail, and about 550 million Web in Fig. 1: Web crawler, Indexer, Index database, and Query
searches are performed every day. engine. A Web crawler, also known as a Web spider or a Web
The Web consists of the Surface Web and the Deep Web robot, traverses the Web to fetch Web pages by following the
(Hidden Web or Invisible Web). Each page in the Surface URLs of Web pages. The Indexer is responsible for parsing
Web has a logical address called Uniform Resource Locator the text of each Web page into word tokens and then
(URL). The URL of a page allows the page to be fetched creating the Index database using all the fetched Web
directly. In contrast, the Deep Web contains pages that pages. When a user query is received, the Query engine
cannot be directly fetched and database records stored in searches the Index database to find the matching Web
database systems. It is estimated that the size of the Deep pages for the query.
Web is over 100 times larger than that of the Surface Web
(1). Crawling the Web
The tools that we use to find information on the Web are
A Web crawler is a computer program that fetches Web
called search engines. Today, over 1 million search engines
pages from remote Web servers. The URL of each Web page
are believed to be operational on the Web (2). Search
identifies the location of the page on the Web. Given its
engines may be classified based on the type of data that
URL, a Web page can be downloaded from a Web server
are searched. Search engines that search text documents
using the HTTP (HyperText Transfer Protocol). Starting
are called document search engines, whereas those that
from some initial URLs, a Web crawler repeatedly fetches
search structured data stored in database systems are
Web pages based on their URLs and extracts new URLs
called database search engines. Many popular search
from the downloaded pages so that more pages can be
engines such as Google and Yahoo are document search
downloaded. This process ends when some termination
engines, whereas many e-commerce search engines such as
conditions are satisfied. Some possible termination condi-
Amazon.com are considered to be database search engines.
tions include (1) no new URL remains and (2) a preset
Document search engines usually have a simple interface
number of pages have been downloaded. As a Web crawler
with a textbox for users to enter a query, which typically
may interact with numerous autonomous Web servers, it is
contains some key words that reflect the users information
important to design scalable and efficient crawlers.
needs. Database search engines, on the other hand, usually
To crawl the Web quickly, multiple crawlers can be
have more complex interfaces to allow users to enter more
applied. These crawlers may operate in two different man-
specific and complex queries.
ners (i.e., centralized and distributed). Centralized craw-
Most search engines cover only a small portion of the
lers are located at the same location running on different
Web. To increase the coverage of the Web by a single search
machines in parallel. Distributed crawlers are distributed
system, multiple search engines can be combined. A search
at different locations of the Internet, and controlled by a
system that uses other search engines to perform the search
central coordinator; each crawler just crawls the Web sites
and combines their search results is called a metasearch
that are geographically close to the location of the crawler.
engine. Mamma.com and dogpile.com are metasearch
The most significant benefit of distributed crawlers is the
engines that combine multiple document search engines
reduction in communication cost incurred by crawling
whereas addall.com is a metasearch engine that combines
activity. Centralized crawlers, however, are easier to
multiple database search engines for books. From a users
implement and control than distributed crawlers.
perspective, there is little difference between using a search
As the Web grows and changes constantly, it is neces-
engine and using a metasearch engine.
sary to have the crawlers regularly re-crawl the Web and
This article provides an overview of some of the main
make the contents of the index database up to date. Fre-
methods that are used to create search engines and meta-
quent re-crawling of the Web will waste significant
search engines. In the next section, we describe the basic
resources and make the network and Web servers over-
techniques for creating a document search engine. Then we

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DATA SEARCH ENGINE

term should be a monotonically decreasing function of its


Web Crawler Web pages Indexer document frequency. Currently, most Web pages are for-
matted in HTML, which contains a set of tags such as title
and header. The tag information can be used to influence
the weights of the terms for representing Web pages. For
Query
Query engine Index example, terms in the title of a page or emphasized using
World Wide Web database bold and italic fonts are likely to be more important in
Query reponse
User Query
query resuts representing a page than terms in the main body of the page
with normal font.
To allow efficient search of Web pages for any given
User Interface
query, the representations of the fetched Web pages are
Figure 1. The general architecture of a document search engine. organized into an inverted file structure. For each term t, an
inverted list of the format [(p1, w1), . . ., (pk, wk)] is generated
and stored, where each pj is the identifier of a page contain-
loaded. Therefore, some incremental crawling strategies ing t and wj is the weight of t in pj, 1jk. Only entries with
should be employed. One strategy is to re-crawl just the positive weights are kept.
changed or newly added Web pages since the last crawling.
The other strategy is to employ topic-specific crawlers to Ranking Pages for User Queries
crawl the Web pages relevant to a pre-defined set of topics.
A typical query submitted to a document search engine
Topic-specific crawling can also be used to build specialized
consists of some keywords. Such a query can also be repre-
search engines that are only interested in Web pages in
sented as a set of terms with weights. The degree of match
some specific topics.
between a page and a query, often call the similarity, can be
Conventional Web crawlers are capable of crawling only
measured by the terms they share. A simple approach is to
Web pages in the Surface Web. Deep Web crawlers are
add up the products of the weights corresponding to the
designed to crawl information in the Deep Web (3). As
matching terms between the query and the page. This
information in the Deep Web is often hidden behind the
approach yields larger similarities for pages that share
search interfaces of Deep Web data sources, Deep Web
more important terms with a query. However, it tends to
crawlers usually gather data by submitting queries to these
favor longer pages over shorter ones. This problem is often
search interfaces and collecting the returned results.
addressed by dividing the above similarity by the product of
the lengths of the query and the page. The function that
Indexing Web Pages
computes such type of similarities is called the Cosine
After Web pages are gathered to the site of a search engine, function (4). The length of each page can be computed
they are pre-processed into a format that is suitable for beforehand and stored at the search engine site.
effective and efficient retrieval by search engines. The Many methods exist for ranking Web pages for user
contents of a page may be represented by the words it queries, and different search engines likely employ differ-
has. Non-content words such as the and is are usually ent ranking techniques. For example, some ranking meth-
not used for page representation. Often, words are con- ods also consider the proximity of the query terms within a
verted to their stems using a stemming program to facil- page. As another example, a search engine may keep track
itate the match of the different variations of the same word. of the number of times each page has been accessed by users
For example, comput is the common stem of compute and use such information to help rank pages. Google
and computing. After non-content word removal and (www.google.com) is one of the most popular search engines
stemming are performed on a page, the remaining words on the Web. A main reason why Google is successful is its
(called terms or index terms) are used to represent the page. powerful ranking method, which has the capability to
Phrases may also be recognized as special terms. Further- differentiate more important pages from less important
more, a weight is assigned to each term to reflect the ones even when they all contain the query terms the
importance of the term in representing the contents of same number of times. Google uses the linkage information
the page. among Web pages (i.e., how Web pages are linked) to derive
The weight of a term t in a page p within a given set P of the importance of each page. A link from page A to page B is
pages may be determined in a number of ways. If we treat placed by the author of page A. Intuitively, the existence of
each page as a plain text document, then the weight of t is such a link is an indication that the author of page A
usually computed based on two statistics. The first is its considers page B to be of some value. On the Web, a page
term frequency (tf) in p (i.e., the number of times t appears in may be linked from many other pages and these links can be
p), and the second is its document frequency (df) in P (i.e., aggregated in some way to reflect the overall importance of
the number of pages in P that contain t). Intuitively, the the page. For a given page, PageRank is a measure of the
more times a term appears in a page, the more important relative importance of the page on the Web, and this
the term is in representing the contents of the page. There- measure is computed based on the linkage information
fore, the weight of t in p should be a monotonically increas- (5). The following are the three main ideas behind the
ing function of its term frequency. On the other hand, the definition and computation of PageRank. (1) Pages that
more pages that have a term, the less useful the term is in are linked from more pages are likely to be more important.
differentiating different pages. As a result, the weight of a In other words, the importance of a page should be reflected
DATA SEARCH ENGINE 3

by the popularity of the page among the authors of all Web for some small integer k, say 20, or based on the average
pages. (2) Pages that are linked from more important pages position of the first relevant page among the returned
are likely to be more important themselves. (3) Pages that results for each test query (6).
have links to more pages have less influence over the A large search engine may index hundreds of millions or
importance of each of the linked pages. In other words, if even billions of pages, and process millions of queries on a
a page has more child pages, then it can only propagate a daily basis. For example, by the end of 2005, the Google
smaller fraction of its importance to each child page. Based search engine has indexed about 10 billion pages and
on the above insights, the founders of Google developed a processed over 200 million queries every day. To accom-
method to calculate the importance (PageRank) of each modate the high computation demand, a large search
page on the Web (5). The PageRanks of Web pages can be engine often employs a large number of computers and
combined with other, say content-based, measures to efficient query processing techniques. When a user query is
indicate the overall relevance of a page with respect to received by a search engine, the inverted file structure of
a given query. For example, for a given query, a page may the pre-processed pages, not the pages themselves, are used
be ranked based on a weighted sum of its similarity with to find matching pages. Computing the similarity between
the query and its PageRank. Among pages with similar a query and every page directly is very inefficient because
similarities, this method will rank those that have higher the vast majority of the pages likely do not share any term
PageRanks. with the query and computing the similarities of these
pages with the query is a waste of resources. To process
a query, a hash table is first used to locate the storage
Effective and Efficient Retrieval
location of the inverted file list of each query term. Based on
For a given query, a page is said to be relevant if the sender the inverted file lists of all the terms in the query, the
of the query finds the page useful. For a given query similarities of all the pages that contain at least one term in
submitted by a user against a fixed set of pages, the set common with the query can be computed efficiently.
of relevant pages is also fixed. A good retrieval system
should return a high percentage of relevant pages to the Result Organization
user and rank them high in the search result for each query.
Most search engines display search results in descending
Traditionally, the effectiveness of a text retrieval system is
order of their matching scores with respect to a given query.
measured using two quantities known as recall and preci-
Some search engines, such as the Vivisimo search engine
sion. For a given query and a set of documents, recall is the
(www.vivisimo.com), organize their results into groups
percentage of the relevant documents that are retrieved
such that pages that have certain common features are
and precision is the percentage of the retrieved documents
placed into the same group. Clustering/categorizing search
that are relevant. To evaluate the effectiveness of a text
results is known to be effective in helping users identify
retrieval system, a set of test queries is often used. For each
relevant results in two situations. One is when the number
query, the set of relevant documents is identified in
of results returned for a query is large, which is mostly true
advance. For each test query, a precision value at a differ-
for large search engines, and the other is when a query
ent recall point is obtained. When the precision values at
submitted by a user is short, which is also mostly true as the
different recall values are averaged over all test queries, an
average number of terms in a search engine query is
average recall-precision curve is obtained, which is used as
slightly over two. When the number of results is large,
the measure of the effectiveness of the system. A system is
clustering allows the searcher to focus the attention on a
considered to be more effective than another system if the
small number of promising groups. When a query is short,
recall-precision curve of the former is above that of the
the query may be interpreted in different ways, in this case,
latter. A perfect text retrieval system should have both
clustering can group results based on different interpreta-
recall and precision equal to 1 at the same time. In other
tions that allow the searcher to focus on the group with
words, such a system retrieves exactly the set of relevant
desired interpretation. For example, when query apple is
documents for each query. In practice, perfect performance
submitted to the Vivisimo search engine, results related to
is not achievable for many reasons, for example, a users
Apple computer (Macintosh) forms one group and results
information needs usually cannot be precisely specified by
related to fruit forms another group, which makes it easy
the used query and the contents of documents and queries
for a user to focus on the results he/she wants.
cannot be completely represented by weighted terms.
Using both recall and precision to measure the effec-
Challenges of Document Search Engines
tiveness of traditional text retrieval systems requires
knowing all the relevant documents for each test query Although Web search engines like Google, Yahoo, and MSN
in advance. This requirement, however, is not practical for are widely used by numerous users to find the desired
independently evaluating large search engines because it is information on the Web, there are still a number of chal-
impossible to know the number of relevant pages in a search lenges for enhancing their quality (7,8). In the following, we
engine for a query unless all the pages are retrieved and briefly introduce some of these challenges.
manually examined. Without knowing the number of rele-
vant pages for each test query, the recall measure cannot be Freshness. Currently, most search engines depend on
computed. As a result of this practical constraint, search Web crawlers to collect Web pages from numerous Web
engines are often evaluated using the average precision sites and build the index database based on the fetched Web
based on the top k retrieved pages for a set of test queries, pages. To refresh the index database so as to provide
4 DATA SEARCH ENGINE

up-to-date pages, they periodically (e.g., once every month) and retrieve such data is also an open research problem in
recollect Web pages from the Internet and rebuild the data search engines. Although some search engines such as
index database. As a result, pages that are added/ Google and Yahoo can search images, their technologies are
deleted/changed since the last crawling are not reflected still mostly keywords-match based.
in the current index database, which makes some pages not
accessible via the search engine, some retrieved pages not
DATABASE SEARCH ENGINE
available on the Web (i.e., deadlinks), and the ranking of
some pages based on obsolete contents. How to keep the
In comparison with document search engines, database
index database up-to-date for large search engines is a
search engines are much easier to build because they do
challenging issue.
not need crawlers to crawl the Web to build the index
database. Instead, traditional database systems such as
Coverage. It was estimated that no search engine
Oracle or SQL-server are usually used by database search
indexes more than one-third of the publicly indexable
engines to store and manage data. The stored data are often
Web (9). One important reason is that the Web crawlers
compiled and entered by human users. Unlike Web pages
can only crawl Web pages that are linked to the initial seed
that have little structure, the data in database search
URLs. The Bow Tie theory about the Web structure (10)
engines are generally well structured. For example, the
indicates that only 30% of the Web pages are strongly
database of an online Web bookstore contains various
connected. This theory further proves the limitation of
books, and every book has attributes such as title, author,
Web crawlers. How to fetch more Web pages, including
ISBN, publication date, and so on.
those in the Deep Web, is a problem that needs further
To make the data in a database search engine Web-
research.
accessible, an HTML form-based Web search interface like
Fig. 2 is created on top of the underlying database system.
Quality of Results. Quality of results refers to how well
The Web search interface often has multiple fields for users
the returned pages match the given keywords query. Given
to specify queries that are more complex than the keywords
a keywords query, a user wants the most relevant pages to
queries for document Web search engines. For example, the
be returned. Suppose a user submits apple as a query, a
search interface of bn.com (Fig. 2) contains fields like title,
typical search engine will return all pages containing the
author, price, format, and so on. A user query submitted
word apple no matter if it is related to an apple pie recipe
through the Web search interface of a database search
or Apple computer. Both the keywords-based similarity and
engine is usually converted to a database query (e.g.,
the lack of context compromise the quality of returned
SQL) that can be processed by the underlying database
pages. One promising technique for improving the quality
system; after the results that satisfy the query conditions
of results is to perform a personalized search, in which a
are returned by the database system, they are wrapped by
profile is maintained for each user that contains the users
appropriate HTML tags and presented to the user on the
personal information, such as specialty and interest, as well
dynamically generated Web page.
as some information obtained by tracking the users Web
Database search engines are often used by organizations
surfing behaviors, such as which pages the user has clicked
or companies that want to publish their compiled data on
and how long the user spent on reading them; a users query
the Web for information sharing or business benefits. For
can be expanded based on his/her profile, and the pages are
example, a real estate company may employ a database
retrieved and ranked based on how well they match the
search engine to post housing information, and an airline
expanded query.
may use a database search engine to allow travelers to
search and purchase airplane tickets.
Natural Language Query. Currently, most search
It should be noted that structured data that are stored in
engines accept only keywords queries. However, keywords
database systems and are accessible via database search
cannot precisely express users information needs. Natural
engines constitute a major portion of the Deep Web. A
language queries, such as Who is the president of the
United States? often require clear answers that cannot
be provided by most current search engines. Processing
natural language queries requires not only the understand-
ing of the semantics of a user query but also a different
parsing and indexing mechanism of Web pages. Search
engine ask.com can answer some simple natural language
queries such as Who is the president of the United States?
and Where is Chicago? using its Web Answer capability.
However, ask.com does not yet have the capability to answer
general natural language queries. There is still a long way to
go before general natural language queries can be precisely
answered.

Querying Non-Text Corpus. In addition to textual Web


pages, a large amount of image, video, and audio data also
exists on the Web. How to effectively and efficiently index Figure 2. The book search interface of bn.com.engine.
DATA SEARCH ENGINE 5

recent survey (2) estimated that, by April 2004, among the Search Engine Selection. When a metasearch engine
450,000 search engines for the Deep Web, 348,000 were receives a query from a user, the metasearch engine makes
database search engines. a determination on which search engines likely contain
useful pages to the query and therefore should be used to
process the query. Before search engine selection can be
METASEARCH ENGINE
performed, some information representing the contents of
the set of pages of each search engine is collected. The
A metasearch engine is a system that provides unified
information about the pages in a search engine is called
access to multiple existing search engines. When a meta-
the representative of the search engine (11). The represen-
search engine receives a query from a user, it sends the
tatives of all search engines used by the metasearch engine
query to multiple existing search engines, and it then
are collected in advance and are stored with the metasearch
combines the results returned by these search engines
engine. During search engine selection for a given query,
and displays the combined results to the user. A meta-
search engines are ranked based on how well their repre-
search engine makes it easy for a user to search multiple
sentatives match with the query.
search engines simultaneously while submitting just one
Different search engine selection techniques exist and
query. A big benefit of a metasearch engine is its ability to
they often employ different types of search engine repre-
combine the coverage of many search engines. As meta-
sentatives. A simple representative of a search engine may
search engines interact with the search interfaces of search
contain only a few selected key words or a short description.
engines, they can use Deep Web search engines just as
This type of representative is usually produced manually
easily as Surface Web search engines. Therefore, meta-
by someone who is familiar with the contents of the
search engine technology provides an effective mechanism
search engine. When a user query is received, the meta-
to reach a large portion of the Deep Web by connecting to
search engine can compute the similarities between the
many Deep Web search engines.
query and the representatives, and then select the search
engines with the highest similarities. Although this
Metasearch Engine Architecture
method is easy to implement, this type of representative
A simple metasearch engine consists of a user interface for provides only a general description about the contents of
users to submit queries, a search engine connection com- search engines. As a result, the accuracy of the selection
ponent for programmatically submitting queries to its may be low.
employed search engines and receiving result pages from More elaborate representatives collect detailed statisti-
them, a result extraction component for extracting the cal information about the pages in each search engine.
search result records from the returned result pages, and These representatives typically collect one or several pieces
a result merging component for combining the results (11). of statistical information for each term in each search
If a metasearch engine employs a large number of search engine. As it is impractical to find out all the terms that
engines, then a search engine selection component is appear in some pages in a search engine, an approximate
needed. This component determines which search engines vocabulary of terms for a search engine can be used. Such
are likely to contain good matching results for any given an approximate vocabulary can be obtained from pages
user query so that only these search engines are used for retrieved from the search engine using sample queries
this query. Search engine selection is necessary for effi- (12). Some of the statistics that have been used in proposed
ciency considerations. For example, suppose only the search engine selection techniques include, for each term,
20 best-matched results are needed for a query and there its document frequency, its average or maximum weight in
are 1000 search engines in a metasearch engine. It is clear all pages having the term, and the number of search
that the 20 best-matched results will come from at most engines that have the term. With the detailed statistics,
20 search engines, meaning that at least 980 search engines more accurate estimation of the usefulness of each search
are not useful for this query. Sending a query to useless engine with respect to any user query can be obtained. The
search engines will cause serious inefficiencies, such collected statistics may be used to compute the similarity
as heavy network traffic caused by transmitting unwanted between a query and each search engine, to estimate the
results and the waste of system resources for evaluating the number of pages in a search engine whose similarities with
query. the query are above a threshold value, and to estimate the
We may have metasearch engines for document search similarity of the most similar page in a search engine with
engines and metasearch engines for database search respect to a query (11). These quantities allow search
engines. These two types of metasearch engines, though engines to be ranked for any given query and the top-
conceptually similar, need different techniques to build. ranked search engines can then be selected to process
They will be discussed in the next two subsections. the query.
It is also possible to generate search engine representa-
Document Metasearch Engine tives by learning from the search results of past queries. In
this case, the representative of a search engine is simply the
A document metasearch engine employs document search
knowledge indicating its past performance with respect to
engines as its underlying search engines. In this subsec-
different queries. In the SavvySearch metasearch engine
tion, we discuss some aspects of building a document meta-
(13) (now www.search.com), the learning is carried out as
search engine, including search engine selection, search
follows. For a search engine, a weight is maintained for
engine connection, result extraction, and merging.
each term that has appeared in previous queries. The
6 DATA SEARCH ENGINE

weight of a term for a search engine is increased or (15). As a result, a wrapper is constructed to extract the
decreased depending on whether the search engine returns results of any query for the search engine. Extraction
useful results for a query containing the term. Over time, if wrappers can be manually, semi-automatically, or auto-
a search engine has a large positive (negative) weight for a matically constructed.
term, the search engine is considered to have responded
well (poorly) to the term in the past. When a new query is Result Merging. Result merging is the task of combining
received by the metasearch engine, the weights of the query the results returned from multiple search engines into a
terms in the representatives of different search engines are single ranked list. Ideally, pages in the merged result
aggregated to rank the search engines. The ProFusion should be ranked in descending order of the global match-
metasearch engine also employs a learning-based approach ing scores of the pages, which can be accomplished by
to construct the search engine representatives (14). fetching/downloading all returned pages from their local
ProFusion uses training queries to find out how well servers and computing their global matching scores in the
each search engine responds to queries in 13 different metasearch engine. For example, the Inquirus metasearch
subject categories. The knowledge learned about each engine employs such an approach (7). The main drawback
search engine4 from training queries is used to select of this approach is that the time it takes to fetch the pages
search engines to use for each user query and the knowl- might be long.
edge is continuously updated based on the users reaction to Most metasearch engines use the local ranks of the
the search result (i.e., whether a particular page is clicked returned pages and their snippets to perform result mer-
by the user). ging to avoid fetching the actual pages (16). When snippets
are used to perform the merging, a matching score of each
Search Engine Connection. Usually, the search interface snippet with the query can be computed based on several
of a search engine is implemented using an HTML form tag factors such as the number of unique query terms that
with a query textbox. The form tag contains all information appear in the snippet and the proximity of the query terms
needed to connect to the search engine via a program. Such in the snippet. Recall that when search engine selection is
information includes the name and the location of the performed for a given query, the usefulness of each search
program (i.e., the search engine server) that processes engine is estimated and is represented as a score. The
user queries as well as the network connection method search engine scores can be used to adjust the matching
(i.e., the HTTP request method, usually GET or POST). scores of retrieved search records, for example, by multi-
The query textbox has an associated name and is used to fill plying the matching score of each record by the score of the
out the query. The form tag of each search engine interface search engine that retrieved the record. Furthermore, if the
is pre-processed to extract the information needed for same result is retrieved by multiple search engines, the
program connection. After a query is received by the meta- multiplied scores of the result from these search engines
search engine and the decision is made to use a particular are aggregated, or added up, to produce the final score for
search engine, the query is assigned to the name of the the result. This type of aggregation gives preference to
query textbox of the search engine and sent to the server of those results that are retrieved by multiple search engines.
the search engine using the HTTP request method sup- The search results are then ranked in descending order of
ported by the search engine. After the query is processed by the final scores.
the search engine, a result page containing the search
results is returned to the metasearch engine.
Database Metasearch Engine
Search Result Extraction. A result page returned by a A database metasearch engine provides a unified access to
search engine is a dynamically generated HTML page. In multiple database search engines. Usually, multiple data-
addition to the search result records for a query, a result base search engines in the same application domain (e.g.,
page usually also contains some unwanted information/ auto, book, real estate, flight) are integrated to create a
links such as advertisements, search engine host infor- database metasearch engine. Such a metasearch engine
mation, or sponsored links. It is essential for the meta- over multiple e-commerce sites allows users to do compar-
search engine to correctly extract the search result ison-shopping across these sites. For example, a meta-
records on each result page. A typical search result record search engine on top of all book search engines allows
corresponds to a Web page found by the search engine and users to find desired books with the lowest price from all
it usually contains the URL and the title of the page as booksellers.
well as some additional information about the page A database metasearch engine is similar to a document
(usually the first few sentences of the page plus the metasearch engine in architecture. Components such as
date at which the page was created, etc.; it is often called search engine connection, result extraction, and result
the snippet of the page). merging are common in both types of metasearch engines,
As different search engines organize their result pages but the corresponding components for database meta-
differently, a separate result extraction program (also search engines need to deal with more structured data.
called extraction wrapper) needs to be generated for each For example, result extraction needs to extract not only the
search engine. To extract the search result records of a returned search records (say books) but also lower level
search engine, the structure/format of its result pages semantic data units within each record such as the titles
needs to be analyzed to identify the region(s) that contain and prices of books. One new component needed for a
the records and separators that separate different records database metasearch engine is the search interface inte-
DATA SEARCH ENGINE 7

gration component. This component integrates the search labels to facilitate further data manipulation such as
interfaces of multiple database search engines in the same result merging.
domain into a unified interface, which is then used by users Wrapper induction in (19) is a semi-automatic technique
to specify queries against the metasearch engine. This to extract the desired information from Web pages. It needs
component is not needed for document metasearch engines users to specify what information they want to extract, and
because document search engines usually have very simple then the wrapper induction system induces the rules to
search interfaces (just a textbox). In the following subsec- construct the wrapper for extracting the corresponding
tions, we present some details about the search interface data. Much human work is involved in such wrapper con-
integration component and the result extraction compo- struction. Recently, research efforts (20,21) have been put
nent. For the latter, we focus on extracting lower level on how to automatically construct wrapper to extract struc-
semantic data units within records. tured data. To automatically annotate the extracted data
instances, currently there are three basic approaches:
Search Interface Integration. To integrate the search ontology-based (22), search interface schema-based, and
interfaces of database search engines, the first step is to physical layout-based. In the ontology-based approach, a
extract the search fields on the search interfaces from the task-specific ontology (i.e., conceptual model instance) is
HTML Web pages of these interfaces. A typical search usually predefined, which describes the data of interest,
interface of a database search engine has multiple search including relationships, lexical appearance, and context
fields. An example of such an interface is shown in Fig. 2. keywords. A database schema and recognizers for con-
Each search field is implemented by text (i.e., field label) stants and keywords can be produced by parsing the ontol-
and one or more HTML form control elements such as ogy. Then the data units can be recognized and structured
textbox, selection list, radio button, and checkbox. The using the recognizers and the database schema. The search
text indicates the semantic meaning of its corresponding interface schema-based approach (23) is based on the obser-
search field. A search interface can be treated as a partial vation that the complex Web search interfaces of database
schema of the underlying database, and each search field search engines usually partially reflect the schema of the
can be considered as an attribute of the schema. Search data in the underlying databases. So the data units in the
interfaces can be manually extracted but recently there returned result record may be the values of a search field on
have been efforts to develop techniques to automate the search interfaces. The search field labels are thereby
extraction (17). The main challenge of automatic extraction assigned to corresponding data units as meaningful labels.
of search interfaces is to group form control elements and The physical layout-based approach assumes that data
field labels into logical attributes. units usually occur together with their class labels; thus
After all the search interfaces under consideration have it annotates the data units in such a way that the closest
been extracted, they are integrated into a unified search label to the data units is treated as the class label. The
interface to serve as the interface of the database meta- headers of a visual table layout are also another clue for
search engine. Search interface integration consists of annotating the corresponding column of data units. As none
primarily two steps. In the first step, attributes that of the three approaches is perfect, a combination of them
have similar semantics across different search interfaces will be a very promising approach to automatic annotation.
are identified. In the second step, attributes with similar
semantics are mapped to a single attribute on the unified Challenges of Metasearch Engines
interface. In general, it is not difficult for an experienced
human user to identify matching attributes across different Metasearch engine technology faces very different chal-
search interfaces when the number of search interfaces lenges compared with search engine technology, and some
under consideration is small. For applications that need to of these challenges are briefly described below.
integrate a large number of search interfaces or need to
perform the integration for many domains, automatic inte- Automatic Maintenance. Search engines used by meta-
gration tools are needed. WISE-Integrator (18) is a tool that search engines may change their connection parameters
is specifically designed to automate the integration of and result display format, and these changes can cause the
search interfaces. It can identify matching attributes search engines not usable from the metasearch engines
across different interfaces and produce a unified interface unless the corresponding connection programs and result
automatically. extraction wrappers are changed accordingly. It is very
expensive to manually monitor the changes of search
Result Extraction and Annotation. For a document search engines and make the corresponding changes in the meta-
engine, a search result record corresponds to a retrieved search engine. Techniques that can automatically detect
Web page. For a database search engine, however, a search engine changes and make the necessary adjust-
search result record corresponds to a structured entity ments in the corresponding metasearch engine components
in the database. The problem of extracting search result are needed.
records from the result pages of both types of search
engines is similar (see search result extraction section). Scalability. Most of todays metasearch engines are very
However, a search result record of a database entity is small in terms of the number of search engines used. A
more structured than that of a Web page, and it usually typical metasearch engine has only about a dozen search
consists of multiple lower level semantic data units that engines. The current largest metasearch engine AllInOne-
need to be extracted and annotated with appropriate News (www.allinonenews.com) connects to about 1500
8 DATA SEARCH ENGINE

news search engines. But it is still very far away from 9. S. Lawrence, and C. Lee Giles. Accessibility of information on
building a metasearch engine that uses all of the over the Web. Nature, 400: 1999.
half million document search engines currently on the 10. A. Broder, R. Kumar, F. Maghoul, P. Raghavan, S. Rajagopa-
Web. There are number of challenges in building very lan, R. Stata, A. Tomkins, and J. Wiener. Graph Structure in
large-scale metasearch engines, including automatic main- the Web. The 9th International World Wide Web Conference,
tenance described above, and automatic generation and Amsterdam, 2001.
maintenance of search engine representatives that are 11. W. Meng, C. Yu, and K. Liu. Building Efficient and Effective
needed to enable efficient and effective search engine selec- Metasearch Engines. ACM Comput. Surv., 34 (1), 4884, 2002.
tion. 12. J. Callan, M. Connell, and A. Du, Automatic Discovery of
Language Models for Text Databases. ACM SIGMOD Confer-
ence, Philadelphia, PA, 1999, pp. 479490.
Entity Identification. For database metasearch engines,
data records retrieved from different search engines 13. D. Dreilinger, and A. Howe. Experiences with selecting search
engines using metasearch. ACM Trans. Inf. Syst., 15 (3): 195
that correspond to the same real-world entities must be
222.
correctly identified before any meaningful result merging
14. Y. Fan, and S. Gauch. Adaptive Agents for Information Gath-
can be performed. Automatic entity identification across
ering from Multiple, Distributed Information Sources. AAAI
autonomous information sources has been a very challen- Symposium on Intelligent Agents in Cyberspace Stanford
ging issue for a long time. A related problem is the auto- University, 1999, pp. 4046.
matic and accurate data unit annotation problem as 15. H. Zhao, W. Meng, Z. Wu, V. Raghavan, and C. Yu. Fully
knowing the meanings of different data units in a record automatic wrapper generation for search engines. World Wide
can greatly help match the records. Although research on Web Conference, 2005.
both entity identification and data unit annotation is being 16. Y. Lu, W. Meng, L. Shu, C. Yu, and K. Liu. Evaluation of result
actively pursued, there is still long way to go to solve these merging strategies for metasearch engines. WISE Conference ,
problems satisfactorily. 2005.
17. Z. Zhang, B. He, and K. Chang. Understanding Web query
interfaces: best-effort parsing with hidden syntax. ACM SIG-
ACKNOWLEDGMENT
MOD Conference, 2004.
18. H. He, W. Meng, C. Yu, and Z. Wu. Automatic integration of
This work is supported in part by the following NSF grants:
web search interfaces with wise-integrator. VLDB J. 13 (3):
IIS-0414981, IIS-0414939, and CNS-0454298. We also
256273, 2004.
would like to thank the anonymous reviewers for valuable
19. C. Knoblock, K. Lerman, S. Minton, and I. Muslea. Accurately
suggestions to improve the manuscript.
and reliably extracting data from the Web: a machine learning
approach. IEEE Data Eng. Bull. 23 (4):2000.
20. A. Arasu, and H. Garcia-Molina. Extracting Structured Data
BIBLIOGRAPHY from Web pages. SIGMOD Conference, 2003.
21. V. Crescenzi, G. Mecca, and P. Merialdo. RoadRUNNER:
1. M. Bergman. The Deep Web: Surfacing the Hidden Value. Towards Automatic Data Extraction from Large Web Sites.
BrightPlanet White Paper. Available: http://www.brightpla- VLDB Conference, Italy, 2001.
net.com/images/stories/pdf/deepwebwhitepaper.pdf, October 22. D. W. Embley, D. M. Campbell, Y. S. Jiang, S. W. Liddle, D. W.
16, 2006. Lonsdale, Y. K. Ng, R. D. Smith, Conceptual-model-based data
2. K. Chang, B. He, C. Li, M. Patel, and Z. Zhang. Structured extraction from multiple-record Web pages. Data Knowledge
databases on the Web: observations and Implications. Eng., 31 (3): 227251, 1999.
SIGMOD Record, 33 (3): 6170, 2004. 23. J. Wang, and F. H. Lochovsky. Data Extraction and Label
3. S. Raghavan, and H. Garcia-Molina. Crawling the hidden Web. Assignment for Web Databases. WWW Conference, 2003.
VLDB Conference, 2001.
4. G. Salton, and M. McGill. Introduction to modern information
retrieval. New York: McCraw-Hill, 2001. FURTHER READING
5. L. Page, S. Brin, R. Motwani, and T. Winograd. The PageRank
Citation Ranking: Bring Order to the Web. Technical Report, S. Kirsch. The future of internet search: infoseeks experiences
Stanford University, 1998. searching the Internet. ACM SIGIR Forum , 32 (2): 37, 1998.
6. D. Hawking, N. Craswell, P. Bailey, and K. Griffiths. Measur-
ing search engine quality. J. Inf. Retriev., 4 (1): 3359, 2001.
7. S. Lawrence, and C. Lee Giles. Inquirus, the NECi Meta WEIYI MENG
Search Engine. Seventh International World Wide Web con- HAI HE
ference, Brisbane, Australia, 1998, pp. 95105. State University of New York
8. M. R. Henzinger, and R. Motwani, and C. Silverstein. Chal- Binghamton, New York
lenges in Web Search Engines. Available http://citeseer.ist.
psu.edu/henzinger02challenges.html, 2002.
D
DATA SECURITY 2. Access Control. It evaluates access requests to the
resources by the authenticated users, and based on
INTRODUCTION some access rules, it determines whether they must
be granted or denied.
The term data security refers to the protection of infor- 3. Audit. It provides a post facto evaluation of the requests
mation against possible violations that can compromise and the accesses occurred to determine whether viola-
its secrecy (or confidentiality), integrity, or availability. tions have occurred or have been attempted.
Secrecy is compromised if information is disclosed to users 4. Encryption. It ensures that any data stored in the
not authorized to access it. Integrity is compromised if system or is sent over the network can be deciphered
information is improperly modified, deleted, or tampered. only by the intended recipient. In network commu-
Availability is compromised if users are prevented from nication, it can also be used to ensure the authenticity
accessing data for which they have the necessary permis- of the information transmitted and of the parties
sions. This last problem is also known as denial-of-service. involved in the communication.
The problem of protecting information has existed since
information has been managed. However, as technology Figure 1 illustrates the position of these services within
advances and information management systems become the system working. Their treatment is the focus of this
more and more powerful, the problem of enforcing informa- article.
tion security also becomes more critical. The increasing
development of information technology in the past few
years, which has led to the widespread use of computer IDENTIFICATION AND AUTHENTICATION
systems to store and manipulate information and greatly
increased the availability and the processing and storage Authentication is the process of certifying the identity of a
power of information systems, has also posed new serious party to another. In the most basic form, authentication
security threats and increased the potential damage that certifies the identity of a human user to the computer
violations may cause. Organizations more than ever today system. Authentication is a prerequisite for a correct access
depend on the information they manage. A violation to the control, because the correctness of the access control relies
security of the information may jeopardize the whole sys- on the correctness of the identity of the subject requesting
tem working and cause serious damages. Hospitals, banks, access. Good authentication is also important for account-
public administrations, and private organizations, all of ability, whereby users can be retained accountable for the
them depend on the accuracy, availability, and confidenti- actions accomplished when connected to the system. In the
ality of the information they manage. Just imagine what authentication process, we can generally distinguish an
could happen, for instance, if a patients data were impro- identification phase, where users declare their identity to
perly modified, were not available to the doctors because of the computer and submit a proof for it; and an actual
a violation blocking access to the resources, or were dis- authentication phase, where the declared identity and
closed to the public domain. the submitted proof are evaluated. The most common
Many are the threats to security to which information ways to enforce user to computer authentication are based
is exposed. Threats can be nonfraudulent or fraudulent. on the use of:
The first category comprises all threats resulting in non-
intentional violations, such as natural disasters, errors or  Something the user knows, such as a password.
bugs in hardware or software, and human errors. The  Something the user possesses, such as a magnetic card.
second category comprises all threats causing intentional  Something the user is or does, such as her physical
violations. Such threats can be represented by authorized characteristics.
users (insiders), who can misuse their privileges and
authority, or external users (intruders), who can impro- These techniques can be used in alternative or in combina-
perly get access to the system and its resources. Ensuring tion, thus providing a stronger protection. For instance, a
protection against these threats requires the application smartcard may require that a password be entered to
of different protection measures. This article focuses, unlock it.
in particular, on the protection of information against
possible violations by users, insiders, or intruders. The Authentication Based on Knowledge
following services are crucial to the protection of data
within this context (1): The most common technique based on users knowledge
uses secret keywords, named passwords. A password,
1. Identification and Authentication. It provides the known only to the user and the system, proves the identity
system with the ability of identifying its users and of the user to the system. Users wishing to log into the
confirming their identity. computer enter their identity (login) and submit a secret
keyword (password) as proof of their identity. Passwords

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DATA SECURITY

TARGET SYSTEM
ADMINISTRATION
Access
rules

Security Administrator

AUTHENTICATION ACCESS CONTROL

Reference ENCRYPTION
Monitor

User

Data

LOGGING

AUDITING

Auditor

Figure 1. Authentication, access control,


audit, and encryption. Security violations

are the most commonly used authentication techniques for restrictions on the minimum number of digits a password
controlling access to computers. The wide use of this tech- must have, possibly requiring the use of both alphanumeric
nique is because it is very simple, cheap, and easily enforce- and non-alphanumeric characters. Also, often systems
able. As a drawback, however, this technique is vulnerable. check passwords against language dictionaries and reject
Passwords can often be easily guessed, snooped by people passwords corresponding to words of the language (which
observing the legitimate user keying it in, sniffed during would be easily retrieved by attackers enforcing dictionary
transmission, or spoofed by attackers impersonating login attacks). It is also possible to associate a maximum lifetime
interfaces. By getting a users password, an attacker can with passwords and require users to change their password
then impersonate this user and enter the system. An when it expires. Passwords that remain unchanged for a
important aspect necessary to limit the vulnerability of long time are more vulnerable, and, if guessed and never
passwords is a good password management. A good pass- changed, would allow attackers to freely access the system
word management requires users to change their password impersonating the legitimate users. A history log can also
regularly, choose passwords that are not easy to guess, and be kept to make sure users do not just pretend to change the
keep the password private. Unfortunately these practices password while reusing instead the same one. Sometimes a
are not always followed. Having to remember passwords minimum lifetime can also be associated with passwords.
can become a burden for a user, especially when multiple The reason is for users to avoid reusing the same password
passwords, necessary to access different accounts, need to over and over again despite the presence of lifetime and
be remembered. To avoid this problem, many systems history controls. Without a minimum lifetime, a user
enforce automatic controls regulating the specification required to change password but unwilling to do so could
and use of passwords. For instance, it is possible to enforce simply change it and then change it back right away to the
DATA SECURITY 3

old value. A minimum lifetime restriction would forbid Authentication Based on Personal Characteristics
this kind of operation.
Authentication techniques in this category establish the
identity of users on the basis of their biometric character-
Authentication Based on Possession
istics. Biometric techniques can use physical or behavioral
In this category, also called token-based, all techniques characteristics, or a combination of them. Physical char-
exist that require users to present a token as a proof of acteristics are, for example, the retina, the fingerprint,
their identity. A token is a credit-size card device storing and the palmprint. Behavioral characteristics include
some information establishing and proving the tokens handwriting, voiceprint, and keystroke dynamics (2). Bio-
identity. The simplest form of token is a memory card metric techniques require a first phase in which the char-
containing magnetically recorded information, which can acteristic is measured. This phase, also called enrollment,
be read by an appropriate card reader. Essentially, this generally comprises several measurements of the char-
technique authenticates the validity of the token, not of the acteristic. On the basis of the different measurements, a
user: Possession of the token establishes identity for the template is computed and stored at the authentication
user. The main weakness of such an approach is that tokens server. A Users identity is established by comparing their
can be forged, lost, or stolen. To limit the risk of security characteristics with the stored templates. It is important
breaches due to such occurrences, often memory cards are to note that, unlike passwords, biometric methods are not
used together with a personal identification number (PIN), exact. A password entered by a user either matches the one
generally composed of four numeric digits, that works like a stored at the authentication server or it does not. A bio-
password. To enter the system, a user needs both to present metric characteristic instead cannot be required to exactly
the token and to enter the PIN. Like passwords, PIN can be match the stored template. The authentication result is
guessed or spoofed, thus possibly compromising authenti- therefore based on how closely the characteristic matches
cation, because an attacker possessing the token and know- the stored template. The acceptable difference must be
ing the PIN will be able to impersonate the legitimate user determined in such a way that the method provides a high
and enter the system. To limit the vulnerability from rate of successes (i.e., it correctly authenticates legitimate
attackers possessing a token and trying to guess the corre- users and rejects attackers) and a low rate of unsuccesses.
sponding PIN to enter the system, often the authentication Unsuccesses can either deny access to legitimate users
server terminates the authentication process, and possibly or allow accesses that should be rejected. Biometric tech-
seizes the card, upon submission of few bad tries for a PIN. niques, being based on personal characteristics of the
Like passwords, tokens can be shared among users, thus users, do not suffer of the weaknesses discusses above
compromising accountability. Unlike with passwords, how- for password or token-based authentication. However,
ever, because possession of the token is necessary to enter they require high-level and expensive technology, and
the system, only one user at a time is able to enter the they may be less accurate. Moreover, techniques based
system. Memory cards are very simple and do not have any on physical characteristics are often not well accepted by
processing power. They cannot therefore perform any check users because of their intrusive nature. For instance,
on the PIN or encrypt it for transmission. This requires retinal scanners, which are one of the most accurate
sending the PIN to the authentication server in the clear, biometric methods of authentication, have raised concerns
exposing the PIN to sniffing attacks and requiring trust in about possible harms that the infrared beams sent to
the authentication server. The ATM (Automatic Teller the eye by the scanner can cause. Measurements of
Machine) cards are provided with processing power, which other characteristics, such as fingerprint or keystroke
allows the checking and encrypting of the PIN before its dynamics, have instead raised concerns about the privacy
transmission to the authentication server. of the users.
In token devices provided with processing capabilities,
authentication is generally based on a challenge-response
ACCESS CONTROL
handshake. The authentication server generates a chal-
lenge that is keyed into the token by the user. The token
Access control evaluates the requests to access resources
computes a response by applying a cryptographic algorithm
and services and determines whether to grant or deny
to the secret key, the PIN, and the challenge, and returns it
them. In discussing access control, it is generally useful
to the user, who enters this response into the workstation
to distinguish between policies and mechanisms. Policies
interfacing the authentication server. In some cases, the
are high-level guidelines that determine how accesses are
workstation can directly interface the token, thus eliminat-
controlled and access decisions are determined. Mechan-
ing the need for the user to type in the challenge and the
isms are low-level software and hardware functions imple-
response. Smartcards are sophisticated token devices
menting the policies. There are several advantages in
that have both processing power and direct connection to
abstracting policies from their implementation. First, it
the system. Each smartcard has a unique private key stored
is possible to compare different policies and evaluate their
within it. To authenticate the user to the system, the
properties without worrying about how they are actually
smartcard verifies the PIN. It then enciphers the users
implemented. Second, it is possible to devise mechanisms
identifier, the PIN, and additional information like
that enforce different policies so that a change of policy does
date and time, and it sends the resulting ciphertext to
not necessarily require changing the whole implementa-
the authentication server. Authentication succeeds if the
tion. Third, it is possible to devise mechanisms that can
authentication server can decipher the message properly.
enforce multiple policies at the same time, thus allowing
4 DATA SECURITY

users to choose the policy that best suits their needs when files, ascii); on data model concepts (e.g., in object-oriented
stating protection requirements on their data (36). The systems, a group can be defined corresponding to a class
definition and formalization of a set of policies specifying and grouping all its instances); or on other classifications
the working of the access control system, providing thus an defined by users. Groups of users generally reflect the
abstraction of the control mechanism, is called a model. structure of the organization. For instance, examples of
Access control policies can be divided into three major groups can be employee, staff, researchers, or con-
categories: discretionary access control (DAC), mandatory sultants. Most models considering user groups allow
access control (MAC), and the most recent role-based access groups to be nested and nondisjoint. This means that users
control (RBAC). can belong to different groups and groups themselves can
be members of other groups, provided that there are no
Discretionary Policies cycles in the membership relation (i.e., a group cannot be a
member of itself). Moreover, a basic group, called public,
Discretionary access control policies govern the access of
generally collects all users of the system.
users to the system on the basis of the users identity and of
The most recent authorization models supports group-
rules, called authorizations, that specify for each user (or
ing of users and objects, and both positive and negative
group of users) the types of accesses the user can/cannot
authorizations (4,6,8,1014). These features, toward the
exercise on each object. The objects to which access can be
development of mechanisms able to enforce different poli-
requested, and on which authorizations can be specified,
cies, allow the support of both the closed and the open policy
may depend on the specific data model considered and on
within the same system. Moreover, they represent a con-
the desired granularity of access control. For instance, in
venient means to support exceptions to authorizations. For
operating systems, objects can be files, directories, or pro-
instance, it is possible to specify that a group of users, with
grams. In relational databases, objects can be databases,
the exception of one of its members, can execute a particular
relations, views, and, possibly tuples or attributes within a
access by granting a positive authorization for the access to
relation. In object-oriented databases, objects include
the group and a negative authorization for the same access
classes, instances, and methods. Accesses executable on
to the user. As a drawback for this added expressiveness
the objects, or on which authorizations can be specified,
and flexibility, support of both positive and negative
may correspond to primitive operations like read, write,
authorizations complicates authorization management.
and execute, or to higher level operations or applications.
In particular, conflicts may arise. To illustrate, consider
For instance, in a bank organization, operations like, debit,
the case of a user belonging to two groups. One group has a
credit, inquiry, an extinguish can be defined on objects of
positive authorization for an access; the other has a nega-
type accounts.
tive authorization for the same access. Conflict control
Policies in this class are called discretionary because
policies should then be devised that determine whether
they allow users to specify authorizations. Hence, the
the access should in this case be allowed or denied. Differ-
accesses to be or not to be allowed are at the discretion of
ent solutions can be taken. For instance, deciding on the
the users. An authorization in its basic form is a triple
safest side, the negative authorizations can be considered to
huser, object, modei stating that the user can exercise
hold (denials take precedence). Alternatively, conflicts may
the access mode on the object. Authorizations of this form
be resolved on the basis of possible relationships between
represent permission of accesses. Each request is con-
the involved groups. For instance, if one of the groups is a
trolled against the authorizations and allowed only if a
member of the other one, then the authorization specified
triple authorizing it exists. This kind of policy is also called
for the first group may be considered to hold (most specific
closed policy, because only accesses for which an explicit
authorization takes precedence). Another possible solution
authorization is given are allowed, whereas the default
consists in assigning explicit priorities to authorizations; in
decision is to deny access. In an open policy, instead,
the case of conflicts, the authorization with greater priority
(negative) authorizations specify the accesses that should
is considered to hold.
not be allowed. All access requests for which no negative
authorizations are specified are allowed by default. Most
DAC Mechanisms. A common way to think of author-
systems support the closed policy. The open policy can be
izations at a conceptual level is by means of an access
applied in systems with limited protection requirements,
matrix. Each row corresponds to a user (or group), and
where most accesses are to be allowed and the specification
each column corresponds to an object. The entry crossing
of negative authorizations results is therefore more
a user with an object reports the access modes that the
convenient.
user can exercise on the object. Figure 2(a) reports an
Specification of authorizations for each single user, each
example of an access matrix. Although the matrix repre-
single access mode, and each single object can become an
sents a good conceptualization of authorizations, it is not
administrative burden. By grouping users, modes, and
appropriate for implementation. The access matrix may
objects, it is possible to specify authorizations holding for
be very large and sparse. Storing authorizations as an
a group of users, a collection of access modes, and/or a set of
access matrix may therefore prove inefficient. Three
objects (4,79). This grouping can be user defined or derived
possible approaches can be used to represent the matrix:
from the data definition or organization. For instance,
object grouping can be based on the type of objects (e.g.,  Access Control List (ACL). The matrix is stored by
files, directories, executable programs); on the application/
column. Each object is associated with a list, indicat-
activity in which they are used (e.g., ps-files, tex-files, dvi-
DATA SECURITY 5

ing, for each user, the access modes the user can the appropriate capabilities and present them to obtain
exercise on the object. accesses at the various servers of the system. Capabilities
 Capability. The matrix is stored by row. Each user has suffers, however, from a serious weakness. Unlike tickets,
associated a list, called a capability list, indicating for capabilities can be copied. This exposes capabilities to the
each object in the system the accesses the user is risk of forgery, whereby an attacker gains access to the
allowed to exercise on the object. system by copying capabilities. For these reasons, capabil-
 Authorization Table. Nonempty entries of the matrix ities are not generally used. Most commercial systems use
are reported in a three-column table whose columns are ACLs. The Linux file system uses a primitive form of
users, objects, and access modes, respectively. Each authorizations and ACLs. Each user in the system belongs
tuple in the table corresponds to an authorization. to exactly one group, and each file has an owner (generally
the user who created it). Authorizations for each file can be
Figure 2(b)(d) illustrates the ACLs, capabilities, and specified for either the owner, the group to which she
authorization table, respectively, corresponding to the belongs, or the rest of the world. Each file has associated
access matrix in Fig. 2(a). a list of nine privileges: read, write, and execute, each
Capabilities and ACLs present advantages and disad- defined three times, at the level of user, group, and other.
vantages with respect to authorization control and man- Each privilege is characterized by a single letter: r for
agement. In particular, with ACLs, it is immediate to check read;w for write;x for execute; the absence of the privilege
the authorizations holding on an object, whereas retrieving is represented by character -. The string presents first the
all authorizations of a user requires the examination of the user privileges, then group, and finally other. For instance,
ACLs for all objects. Analogously, with capabilities, it is the ACL rwxr-x--x associated with a file indicates that
immediate to determine the privileges of a user, whereas the file can be read, written, and executed by its owner; read
retrieving all accesses executable on an object requires the and executed by the group to which the owner belongs; and
examination of all different capabilities. These aspects executed by all other users.
affect the efficiency of authorization revocation upon dele-
tion of either users or objects. Weakness of Discretionary Policies: The Trojan Horse Pro-
In a system supporting capabilities, it is sufficient for a blem. In discussing discretionary policies, we have
user to present the appropriate capability to gain access to referred to users and to access requests on objects sub-
an object. This represents an advantage in distributed mitted by users. Although it is true that each request is
systems because it avoids multiple authentication of a originated because of some users actions, a more precise
subject. A user can be authenticated at a host, acquire examination of the access control problem shows the utility

File 1 File 2 File 3 Program 1


own read execute
Ann read write
write
Bob read read
write
Carl read execute
read
(a)

File 1 Ann Bob User Access mode Object


own
read read Ann own File 1
Ann File 1 File 2 Program 1
write Ann read File 1
own read
read execute Ann write File 1
write
File 2 Ann Carl write Ann read File 2
read Ann write File 2
write read
Bob File 1 File 3 Ann execute Program 1
read Bob read File 1
read write
File 3 Bob
Bob read File 2
Bob write File 2
read
write Carl File 2 Program 1
Carl read File 2
Carl execute Program 1
read execute
read Carl read Program 1
Program 1 Ann Carl

execute
execute read

(b) (c) (d)

Figure 2. (a) An example of access matrix, (b) corresponding ACL, (c) capabilities, and (d) and authorization table.
6 DATA SECURITY

Application
of separating users from subjects. Users are passive entities
for whom authorizations can be specified and who can
connect to the system. Once connected to the system, users
originate processes (subjects) that execute on their behalf
read Market
and, accordingly, submit requests to the system. Discre-
write Stolen
tionary policies ignore this distinction and evaluate all
requests submitted by a process running on behalf of
some user against the authorizations of the user. This Table Market Table Stolen
aspect makes discretionary policies vulnerable from pro- product release-date price prod date cost
cesses executing malicious programs exploiting the author- X Dec. 99 7,000
Y Jan. 99 3,500
izations of the user on behalf of whom they are executing. In Z March 99 1,200
particular, the access control system can be bypassed by
Trojan Horses embedded in programs. A Trojan Horse is a
computer program with an apparently or actually useful owner Vicky owner John
Vicky,write,Stolen
function, which contains additional hidden functions that
(a)
surreptitiously exploit the legitimate authorizations of the
invoking process. A Trojan Horse can improperly use any invokes
Vicky Application
authorization of the invoking user; for example, it could
even delete all files of the user (this destructive behavior is
not uncommon in the case of viruses). This vulnerability to
Trojan Horses, together with the fact discretionary policies
read Market
do not enforce any control on the flow of information once
write Stolen
this information is acquired by a process, makes it possible
for processes to leak information to users not allowed to
read it. This can happen without the cognizance of the data Table Market Table Stolen
administrator/owner, and despite the fact that each single product release-date price prod date cost
access request is controlled against the authorizations. To X Dec. 99 7,000 X Dec. 99 7,000
Y Jan. 99 3,500 Y Jan. 99 3,500
understand how a Trojan Horse can leak information to Z March 99 1,200 Z March 99 1,200
unauthorized users despite the discretionary access con-
trol, consider the following example. Assume that within an
organization, Vicky, a top-level manager, creates a file owner Vicky owner John
Vicky,write,Stolen
Market containing important information about releases
(b)
of new products. This information is very sensitive for the
organization and, according to the organizations policy, Figure 3. An example of a Trojan Horse.
should not be disclosed to anybody besides Vicky. Consider
now John, one of Vickys subordinates, who wants to
acquire this sensitive information to sell it to a competitor our example, Vicky is trusted not to release the sensitive
organization. To achieve this, John creates a file, lets call it information she knows to John, because, according to the
Stolen, and gives Vicky the authorization to write the file. authorizations, John cannot read it. However, the pro-
Note that Vicky may not even know about the existence of cesses operating on behalf of Vicky cannot be given the
Stolen or about the fact that she has the write authorization same trust. Processes run programs that, unless properly
on it. Moreover, John modifies an application generally certified, cannot be trusted for the operations they execute,
used by Vicky, to include two hidden operations, a read as illustrated by the example above. For this reason,
operation on file Market and a write operation on file Stolen restrictions should be enforced on the operations that
[Fig. 3(a)]. Then, he gives the new application to his man- processes themselves can execute. In particular, protection
ager. Suppose now that Vicky executes the application. As against Trojan Horses leaking information to unauthorized
the application executes on behalf of Vicky, every access is users requires controlling the flows of information within
checked against Vickys authorizations, and the read and process execution and possibly restricting them (1318).
write operations above will be allowed. As a result, during Mandatory policies provide a way to enforce information
execution, sensitive information in Market is transferred to flow control through the use of labels.
Stolen and thus made readable to the dishonest employee
John, who can then sell it to the competitor [Fig. 3(b)]. Mandatory Policies
The reader may object that there is little point in
defending against Trojan Horses leaking information Mandatory security policies enforce access control on the
flow: Such an information flow could have happened basis of classifications of subjects and objects in the system.
anyway, by having Vicky explicitly tell this information Objects are the passive entities storing information, such as
to John, possibly even off-line, without the use of the files, records, records fields, in operating systems; or data-
computer system. Here is where the distinction between bases, tables, attributes, and tuples in relational database
users and subjects operating on their behalf comes in. systems. Subjects are active entities that request access to
Although users are trusted to obey the access restrictions, the objects. An access class is defined as consisting of two
subjects operating on their behalf are not. With reference to components: a security level and a set of categories. The
DATA SECURITY 7

TS,{Army,Nuclear}
system at a given access class originates a subject at that
access class. For instance, a user cleared (Secret,) can
connect to the system as a (Secret,), (Confiden-
tial,), or (Unclassified,) subject. Requests by a
TS,{Army} S,{Army,Nuclear} TS,{Nuclear} subject to access an object are controlled with respect to
the access class of the subject and the object and granted
only if some relationship, depending on the requested
access, is satisfied. In particular, two principles, first for-
S,{Army} TS,{ } S,{Nuclear}
mulated by Bell and LaPadula (19), must be satisfied to
protect information confidentiality:

No Read Up. A subject is allowed a read access to an


object only if the access class of the subject dominates the
S,{ } access class of the object.
Figure 4. An example of a classification lattice.
No Write Down. A subject is allowed a write access to an
object only if the access class of the subject is dominated by
security level is an element of a hierarchically ordered set. the access of the object. (In most applications, subjects are
The levels generally considered are Top Secret (TS), Secret further restricted to write only at their own level, so that no
(S), Confidential (C), and Unclassified (U), where TS > S > overwriting of sensitive information by low subjects not
C > U. The set of categories is a subset of an unordered set, even allowed to see it can take place.)
whose elements reflect functional or competence areas
(e.g., NATO, Nuclear, Army for military systems; Finan- Satisfaction of these two principles prevents informa-
cial, Administration, Research, for commercial systems). tion to flow from high-level subjects/objects to subjects/
Access classes are partially ordered as follows: an access objects at lower levels, thereby ensuring the satisfaction
class c1 dominates () an access class c2 iff the security level of the protection requirements (i.e., no process will be able
of c1 is greater than or equal to that of c2 and the categories to make sensitive information available to users not cleared
of c1 include those of c2. Two classes c1 and c2 are said to be for it). This is illustrated in Fig. 5. Note the importance of
incomparable if neither c1  c2 nor c2  c1 holds. Access controlling both read and write operations, because both
classes together with the dominance relationship between can be improperly used to leak information. Consider the
them form a lattice. Figure 4 illustrates the security lattice example of the Trojan Horse in Fig. 3. Possible classifica-
for the security levels TS and S and the categories Nuclear tions reflecting the specified access restrictions could be
and Army. Each object and each user in the system is Secret for Vicky and Market, and Unclassified for John and
assigned an access class. The security level of the access Stolen. In the respect of the no-read-up and no-write-down
class associated with an object reflects the sensitivity of the principles, the Trojan Horse will never be able to complete
information contained in the object, that is, the potential successfully. If Vicky connects to the system as a Secret (or
damage that could result from the unauthorized disclosure Confidential) subject, and thus the application runs with a
of the information. The security level of the access class Secret (or Confidential) access class, the write operation
associated with a user, also called clearance, reflects the would be blocked. If Vicky invokes the application as an
users trustworthiness not to disclose sensitive information Unclassified subject, the read operation will be blocked
to users not cleared to see it. Categories are used to provide instead.
finer grained security classifications of subjects and objects Given the no-write-down principle, it is clear now why
than classifications provided by security levels alone, and users are allowed to connect to the system at different
they are the basis for enforcing need-to-know restrictions. access classes, so that they are able to access information
Users can connect to their system at any access class at different levels (provided that they are cleared for it). For
dominated by their clearance. A user connecting to the instance, Vicky has to connect to the system at a level below

SUBJECTS OBJECTS
writes

writes

....... TS
reads

TS
Information Flow

S
writes

.......
reads

S
writes

....... C
reads

C
reads

....... U
Figure 5. Controlling information flow for
U secrecy.
8 DATA SECURITY

her clearance if she wants to write some Unclassified may not always be feasible. Moreover, accesses to be
information, such as working instructions for John. Note allowed are determined only on the basis of the classifica-
also that a lower class does not mean less privileges in tions of subjects and objects in the system. No possibility is
absolute terms, but only less reading privileges, as it is clear given to the users for granting and revoking authorizations
from the example above. to other users. Some approaches have been proposed that
The mandatory policy that we have discussed above complement flow control with discretionary access control
protects the confidentiality of the information. An analo- (13,15,17).
gous policy can be applied for the protection of the integrity
of the information, to avoid untrusted subjects from mod- Role-based Policies
ifying information they cannot write and compromise its
A class of access control policies that has been receiving
integrity. With reference to our organization example, for
considerable attention recently is represented by role-
example, integrity could be compromised if the Trojan
based policies (2022). Role-based policies govern the
Horse implanted by John in the application would write
access of users to the information on the basis of their
data in the file Market. Access classes for integrity comprise
organizational role. A role can be defined as a set of actions
an integrity level and a set of categories. The set of cate-
and responsibilities associated with a particular working
gories is as seen for secrecy. The integrity level associated
activity. Intuitively, a role identifies a task, and corre-
with a user reflects the users trustworthiness for inserting,
sponding privileges, that users need to execute to perform
modifying, or deleting information. The integrity level
organizational activities. Example of roles can be secre-
associated with an object reflects both the degree of trust
tary, dept-chair, programmer, payroll-officer,
that can be placed on the information stored in the object
and so on. Authorizations to access objects are not specified
and the potential damage that could result from an
directly for users to access objects: Users are given author-
unauthorized modification of the information. An example
izations to activate roles, and roles are given authorizations
of integrity levels includes Crucial (C), Important (I), and
to access objects. By activating a given role (set of roles), a
Unknown (U). Access control is enforced according to the
user will be able to execute the accesses for which the role is
following two principles:
(set of roles are) authorized. Like groups, roles can also be
organized in a hierarchy, along which authorizations can be
No Read Down. A subject is allowed a read access to an
propagated.
object only if the access class of the subject is dominated by
Note the different semantics that groups, presented in
the access class of the object.
Section 3.1, and roles carry. Roles can be activated and
deactivated by users at their discretion, whereas group
No Write Up. A subject is allowed a write access to an
membership always applies; that is, users cannot enable
object only if the access class of the subject is dominates the
and disable group memberships (and corresponding
access class of the object.
authorizations) at their will. Note, however, that a same
concept can be seen both as a group and as a role. To
Satisfaction of these principles safeguards integrity by understand the difference between groups and roles, con-
preventing information stored in low objects (and therefore sider the following example. We could define a group, called
less reliable) to flow to high objects. This is illustrated Gprogrammer, consisting all users who are program-
in Fig. 6. mers. Any authorization specified for Gprogrammer is
As it is visible from Figs. 5 and 6, secrecy policies allow propagated to its members. Thus, if an authorization to
the flow of information only from lower to higher (security) read tech-reports is given to Gprogrammer, its mem-
levels, whereas integrity policies allow the flow of infor- bers can exercise this right. We could also define a role,
mation only from higher to lower security levels. If both called Rprogrammer, and associate with it those privi-
secrecy and integrity have to be controlled, objects and leges that are related to the programming activity and
subjects have to be assigned two access classes, one for
necessary for the programmers to perform their jobs
secrecy control and one for integrity control. (such as compiling, debugging, and writing reports). These
The main drawback of mandatory protection policies is privileges can be exercised by authorized users only when
the rigidity of the control. They require the definition and they choose to assume the role Rprogrammer. It is impor-
application of classifications to subjects and objects. This tant to note that roles and groups are two complementary
concepts; they are not mutually exclusive.
SUBJECTS OBJECTS The enforcement of role-based policies present several
advantages. Authorization management results are sim-
plified by the separation of the users identity from the
reads

authorizations they need to execute tasks. Several users


reads

....... C
Information Flow
writes

C can be given the same set of authorizations simply by


I assigning them the same role. Also, if a users responsibil-
writes

reads

.......
I
ities change (e.g., because of a promotion), it is sufficient
....... U to disable her for the previous roles and enable her for a
writes

U new set of roles, instead of deleting and inserting the


many access authorizations that this responsibility
change implies. A major advantage of role-based policies
Figure 6. Controlling information flow for integrity.
DATA SECURITY 9

is represented by the fact that authorizations of a role are  Individual Accountability An individuals actions are
enabled only when the role is active for a user. This allows tracked in an audit trail making users personally
the enforcement of the least privilege principle, whereby a accountable for their actions. Accountability may
process is given only the authorizations it needs to complete have a deterrent effect, as users are less likely to
successfully. This confinement of the process in a defined behave improperly if they know that their activities
workspace is an important defense against attacks aiming are being monitored.
at exploiting authorizations (as the Trojan Horse example  Reconstructing Events Audit trails can be used to
illustrated). Moreover, the definition of roles and related reconstruct events after a problem has occurred. The
authorizations fits with the information system organiza- amount of damage that occurred with an incident can
tion and allows us to support related constraints, such as, be assessed by reviewing audit trails of system activity
for example, separation of duties (2325). Separation of to pinpoint how, when, and why the incident occurred.
duties requires that no user should be given enough privi-  Monitoring Audit trails may also be used as on-line
leges to be able to misuse the system. For instance, the
tools to help monitoring problems as they occur. Such
person authorizing a paycheck should not be the same
real-time monitoring helps in detecting problems like
person who prepares it. Separation of duties can be
disk failures, over utilization of system resources, or
enforced statically, by controlling the specification of roles
network outages.
associated with each user and authorizations associated
with each role, or dynamically, by controlling the actions
 Intrusion Detection Audit trails can be used to identify
actually executed by users when playing particular roles attempts to penetrate a system and gain unauthorized
(4,24). access.

It is easy to see that auditing is not a simple task, also


AUDIT due to the huge amount of data to be examined and to the
fact that it is not always clear how violations are reflected in
Authentication and access control do not guarantee com- the users or systems behaviors. Recent research has
plete security. Indeed, unauthorized or improper uses of the focused on the development of automated tools to help audit
system can still occur. The reasons for this are various. controls. In particular, a class of automated tools is repre-
First, security mechanisms, like any other software or sented by the so-called intrusion detection systems, whose
hardware mechanism, can suffer from flaws that make purpose is to automate the data acquisition and their
them vulnerable to attacks. Second, security mechanisms analysis. The issues to be addressed in data acquisition
have a cost, both monetary and in loss of systems perfor- and analysis are as folows:
mances. The more protection to reduce accidental and
deliberate violations is implemented, the higher the cost  Audit data retention: If the audit control is based
of the system will be. For this reason, often organizations on history information, then audit records al ready
prefer to adopt less secure mechanisms, which have little examined must be maintained. However, to avoid the
impact on the systems performance, with respect to more history log to grow indefinitely, pruning operations
reliable mechanisms, that would introduce overhead pro- should be executed removing records that do not
cessing. Third, authorized users may misuse their privi- need to be considered further.
leges. This last aspect is definitely not the least, as misuse of  Audit level: Different approaches can be taken with
privileges by internal users is one major cause of security respect to the level of events to be recorded. For
violations. instance, events can be recorded at the command level,
This scenario raises the need for audit control. Audit at the level of each system call, at the application level,
provides a post facto evaluation of the requests and the and so on. Each approach has some advantages and
accesses occurred to determine whether violations have disadvantages, represented by the violations that can
occurred or have been attempted. To detect possible viola- be detected and by the complexity and volume of audit
tions, all user requests and activities are registered in an records that have to be stored, respectively.
audit trail (or log), for their later examination. An audit  Recording time: Different approaches can be taken
trail is a set of records of computer events, where a computer
with respect to the time at which the audit records
event is any action that happens on a computer system (e.g.,
are to be recorded. For instance, accesses can be
logging into a system, executing a program, and opening a
recorded at the time they are requested or at the
file). A computer system may have more than one audit
time they are completed. The first approach provides
trail, each devoted to a particular type of activity. The kind
a quick response to possible violations, and the second
and format of data stored in an audit trail may vary from
provides more complete information for analysis.
system to system; however, the information that should be
recorded for each event includes the subject making the
 Events monitored: Audit analysis can be performed on
request, the object to which access is requested, the opera- any event or on specific events such as the events
tion requested, the time and location at which the operation regarding a particular subject, object, operation, or
was requested, the response of the access control, and the occurring at a particular time or in a particular
amount of resources used. An audit trail is generated by an situation.
auditing system that monitors system activities. Audit
trails have many uses in computer security:
10 DATA SECURITY

 Audit control execution time: Different approaches can and time that would be necessary to a cryptanalyst to break
be taken with respect to the time at which the audit the system, using the best available techniques. With
control should be executed. respect to protecting the authenticity of the information,
 Audit control mechanism location: The intrusion there are two main classes of attacks: impersonation attack,
detection system and the monitored system may reside in which the cryptanalyst creates a fraudulent ciphertext
on the same machine or on different machines. Placing without knowledge of the authentic cipher-text; and sub-
the audit control mechanism on different machines has stitution attacks, in which the cryptanalyst intercepts the
advantages both in terms of performances (audit con- authentic ciphertext and improperly modifies it.
trol does not interfere with normal system operation) Encryption algorithms can be divided into two main
and security, as the audit mechanism will not be classes: symmetric, or secret key, and asymmetric, or public
affected by violations to the system under control. key. Symmetric algorithms encrypt and decrypt text by
using the same key. Public key algorithms use, instead,
two different keys. A public key is used to encrypt, and a
DATA ENCRYPTION private key, which cannot be guessed by knowing the public
key, is used to decrypt. This is illustrated in Fig. 7. Sym-
Another measure for protecting information is provided by metric algorithms rely on the secrecy of the key. Public key
cryptography. Cryptographic techniques allow users to algorithms rely on the secrecy of the private key.
store, or transmit, encoded information instead of the
actual data. An encryption process transforms the plaintext Symmetric Key Encryption
to be protected into an encoded ciphertext, which can then Most symmetric key encryption algorithms are block
be stored or transmitted. A decryption process allows us to ciphers; that is, they break up the plaintext into blocks of
retrieve the plaintext from the ciphertext. The encryption a fixed length and encrypt one block at a time. Two well-
and decryption functions take a key as a parameter. A user known classes of block ciphers are based on substitution
getting access to data, or sniffing them from the network, techniques and transposition techniques.
but lacking the appropriate decryption key, will not be able
to understand them. Also, tampering with data results is Substitution Algorithms. Substitution algorithms define
difficult without the appropriate encryption key. a mapping, based on the key, between characters in the
Cryptographic techniques must be proved resistant to plaintext and characters in the ciphertext. Some substitu-
attacks by cryptoanalysts trying to break the system to tion techniques are as follows.
recover the plaintext or the key, or to forge data (generally,
messages transmitted over the network). Cryptanalysis Simple Substitution. Simple substitution algorithms are
attacks can be classified according to how much informa- based on a one-to-one mapping between the plaintext
tion the cryptanalyst has available. In particular, with alphabet and the ciphertext alphabet. Each character in
respect to secrecy, attacks can be classified as ciphertext the plaintext alphabet is therefore replaced with a fixed
only, known-plaintext, and chosen-plaintext. In ciphertext- substitute in the ciphertext alphabet. An example of simple
only attacks, the cryptanalyst only knows the ciphertext, substitution is represented by the algorithms based on
although she may know the encryption algorithm, the shifted alphabets, in which each letter of the plaintext is
plaintext language, and possibly some words that are prob- mapped onto the letter at a given fixed distance from it in
ably used in the plaintext. In known-plaintext attacks, the the alphabet (wrapping the last letter with the first). An
cryptanalyst also knows some plaintext and corresponding example of such algorithms is the Caesar cipher in which
ciphertext. In chosen-plaintext attacks, the cryptanalyst each letter is mapped to the letter three positions after it in
can acquire the ciphertext corresponding to a selected the alphabet. Thus, A is mapped to D, B to E, and Z to C. For
plaintext. Most cryptographic techniques are designed to instance, thistext would be encrypted as wklvwhaw.
withstand chosen-plaintext attacks. The robustness of Simple substitution techniques can be broken by analyzing
cryptographic algorithms relies on the amount of work single-letter frequency distribution (26).

encrypt encrypt

public key
plaintext secret key ciphertext plaintext ciphertext

private key

decrypt decrypt

Figure 7. Secret key versus public key cryptography.


DATA SECURITY 11

Homophonic Substitution. Homophonic substitution Column Transposition. The plaintext is written in a


algorithms map each character of the plaintext alphabet matrix by rows and re-read by columns according to an
onto a set of characters, called its homophones, in the order specified by the key. Often the key is a word: The
ciphertext alphabet. There is therefore a one-to-many map- number of characters in the key determines the number of
ping between a plaintext character and the corresponding columns, and the position of the characters considered in
characters in the ciphertext. (Obviously, the vice versa is alphabetical order determines the order to be considered in
not true as decrypting cannot be ambiguous.) In this way, the reading process. For instance, key crypt would imply
different occurrences of the same character in the plaintext the use of a five-column matrix, where the order of the
may be mapped to different characters in the ciphertext. columns to be read is 14253 (the position in the key of the
This characteristic allows the flattening of the letter fre- key characters is considered in alphabetical order). Lets
quency distribution in the ciphertext and proves a defense say now that the plaintext to be encrypted is acme has
against attacks exploiting it. A simple example of homo- discovered a new fuel. The matrix will look like as
phonic substitution (although not used for ciphering) can be follows:
seen in the use of characters for phone numbers. Here, the
alphabet of the plaintext are numbers, the alphabet of the c r y p t
ciphertext are the letters of the alphabet, but Q and Z which 1 3 5 2 4
are not used, plus numbers 0 and 1 (which are not mapped a c m e h
to any letter). Number 2 maps to the first three letters of the a s d i s
alphabet, number 3 to the second three letters, and so on. c o v e r
For instance, number 6974663 can be enciphered as e d a n e
myphone, where the three occurrences of character 6 w f u e l
have been mapped to three different letters.
The corresponding ciphertext is aaceweienecsodfhs-
Polyalphabetic Substitution. Polyalphabetic substitution relmdvau.
algorithms overcome the weakness of simple substitution
through the use of multiple substitution algorithms. Most Periodic Transposition. It is a variation of the previous
polyalphabetic algorithms use periodic sequences of alpha- technique, where the text is also read by rows (instead of by
bets. For instance, the Vigenere cipher uses a word as a key. columns) according to a specified column order. More pre-
The position in the alphabet of the ith character of the key cisely, instead of indicating the columns to be read, the key
gives the number of right shifts to be enforced on each ith indicates the order in which the characters in each row
element (modulo the key length) of the plaintext. For must be read, and the matrix is read row by row. For
instance, if key crypt is used, then the first, sixth, instance, by using key crypt, the ciphertext is obtained
eleventh, . . . , character of the plaintext will be shifted by by reading the first, fourth, second, fifth, and third char-
3 (the position of c in the alphabet); the second, seventh, acter of the first row, then the second row is read in the
twelfth, . . . , character will be shifted by 17 (the position of r same order, the third row, and so on. This process is
in the alphabet); and so on. equivalent to breaking the text in blocks with the same
length as the key, and to permuting the characters in each
Polygram Substitution. Although the previous algo- block according to the order specified by the key. In this
rithms encrypt a letter at the time, polygram algorithms case, the ciphertext corresponding to the plaintext acme
encrypt blocks of letters. The plaintext is divided into blocks has discovered a new fuel is aechmaissdceorven-
of letters. The mapping of each character of a block depends deaweflu.
on the other characters appearing in the block. As an Pure transposition and substitution techniques prove
example, the Playfair cipher uses as key a 5  5 matrix, very vulnerable. For instance, transposition algorithms
where the 25 letters of the alphabet (J was not considered) can be broken through anagramming techniques, because
are inserted in some order. The plaintext is divided into the characters in the ciphered text correspond exactly to the
blocks of length two. Each pair of characters is mapped onto characters in the plaintext. Also, the fact that a transposi-
a pair of characters in the ciphertext, where the mapping tion method has been used to encrypt can be determined by
depends on the position of the two plaintext characters in the fact that the ciphertext respects the frequency letter
the matrix (e.g., whether they are in the same column and/ distribution of the considered alphabet. Simple substitu-
or row). Polygram substitution destroys single-letter fre- tion algorithms are vulnerable from attacks exploiting
quency distribution, thus making cryptanalysis harder. single-letter frequency distribution. Among them, shifted
alphabet ciphers are easier to break, given that the map-
Transposition Algorithms. Transposition algorithms ping function applies the same transformation to all char-
determine the ciphertext by permuting the plaintext char- acters. Stronger algorithms can be obtained by combining
acters according to some scheme. The ciphertext, therefore, the two techniques (27).
contains exactly the same characters as the plaintext but in
different order. Often, the permutation scheme is deter- Advanced Encryption Standard (AES). In November 2001,
mined by writing the plaintext in some geometric figure and the National Institute of Standards and Technology
then reading it by traversing the figure in a specified order. announced the approval of a new secret key cipher standard
Some transposition algorithms, based on the use of chosen among 15 candidates. This new standard algorithm
matrixes, are as follows. was meant to replace the old DES algorithm (28), whose key
12 DATA SECURITY

plaintext plaintext

Initial round InvFinal round


AddRoundKey
K AddRoundKey K InvShiftRows
InvSubBytes

Standard round InvStandard round


SubBytes
Nr1 AddRoundKey
Nr1
round round
ShiftRows InvMixColumns
MixColumns InvShiftRows
K K
AddRoundKey InvSubBytes

Final round InvInitial round


SubBytes
K ShiftRows K AddRoundKey
AddRoundKey

ciphertext ciphertext

Figure 8. Encryption and decryption


phases of the AES algorithm. Encryption Decryption

sizes were becoming too small. Rijndael, a compressed SubBytes. In the SubBytes operation, each byte in the
name taken from its inventors Rijmen and Daemen, was state is updated using an 8-bit S-box. This operation
chosen to become the future Advanced Encryption provides the nonlinearity in the cipher. The AES S-box is
Standard (AES) (29). AES is a block cipher that can process specified as a matrix M16  16. The first digit d1 of the
128-bit block units using cipher keys with lengths of 128, hexadecimal number corresponding to a state byte is
192, and 256 bits. Strictly speaking, AES is not precisely used as a row index and the second digit d2 as a column
Rijndael (although in practice they are used interchange- index. Hence, cell M[d1, d2] contains the new hexadecimal
ably) as Rijndael supports a larger range of block and key number.
sizes. Figure 8 illustrates the AES operational mode. It
starts with an initial round followed by a number of stan- Shift Rows. In the ShiftRows operation, the rows of state
dard rounds and ends with a final round. The number of are cyclically shifted with different offsets. The first row is
standard round is dependent on the key length as illu- shifted over 1 byte, the second row over 2 bytes, and the
strated in Table 1. AES operates on a 4  4 array of bytes third row over 3 bytes.
(the intermediate cipher result), called the state.
MixColumns. The MixColumns operation operates on
AddRoundKey. The AddRoundKey operation is a simple the columns of the state, combining the four bytes in
EXOR operation between the state and the roundkey. The each column using a linear transformation. Together
roundkey is derived from the secret key by means of a key with ShiftRows, MixColumns provides diffusion1 in the
schedule. The number of roundkey necessary to encrypt one cipher.
block of the plaintext depends on the key length as this Note that in the AES algorithm encipherment and deci-
determines the number of rounds. For instance, for a key pherment consists of different operations. Each operation
length of 128 bits, 11 roundkeys are needed. The keys are that is used for encryption must be inverted to make it
generated recursively. More precisely, key ki of the ith possible to decrypt a message (see Fig. 8).
round is obtained from the key expansion routine using
subkey ki1 of round i  1-th and the secret key. Asymmetric Key Encryption
Asymmetric key encryption algorithms use two different
keys for encryption and decryption. They are based on the
Table 1. Number of rounds application of one-way functions. A one-way function is a
Key length (words) Number of rounds (Nr)
AES-128 4 10 1
Diffusion refers to the property that redundancy in the statistics of
AES-192 6 12
the plaintext is dissipated in the statistics of the ciphertext (27).
AES-256 8 14
In a cipher with good diffusion, flipping an input bit should change
1
A word is 32 bits. each output bit with a probability of one half.
DATA SECURITY 13

function that satisfies the property that it is computation- the receiver means that the sender must be able to verify
ally infeasible to compute the input from the result. Asym- that the message is received by the recipient for which it
metric key encryption algorithms are therefore based on was intended. Authentication of the sender means that the
hard-to-solve mathematical problems, such as computing recipient of a message must be able to verify the identity of
logarithms, as in the proposals by Diffie and Hellman (30), the sender. Authentication of the message means that
(the proponents of public key cryptography) and by sender and recipient must be able to verify that the message
ElGamal (31), or factoring, as in the RSA algorithm illu- has not been improperly modified during transmission.
strated next. Both secret and public key techniques can be used to
provide protection against both passive and active attacks.
The RSA Algorithm. The most well-known public key The use of secret keys in the communication requires the
algorithm is the RSA algorithm, whose name is derived sender and the receiver to share the secret key. The sender
from the initials of its inventor (Rivest, Shamir, and encrypts the information to be transmitted by using the
Adleman) (32). It is based on the idea that it is easy to secret key and then sends it. Upon reception, the receiver
multiply two large prime numbers, but it is extremely decrypts the information with the same key and recovers
difficult to factor a large number. The establishment of the plaintext. Secret key techniques can be used if there is
the pair of keys works as follows. The user wishing to confidence in the fact that the key is only known by the
establish a pair of keys chooses two large primes p and q sender and recipient and no disputes can arise (e.g., a
(which are to remain secret) and computes n pq and dispute can arise if the sender of a message denies having
fn p  1q  1, where fn is the number of ele- ever sent it). Public keys, like secret keys, can provide
ments between 0 and n  1 that are relatively prime authenticity of the sender, the recipient, and the message
to n. Then, the user chooses an integer e between 1 and as follows. Each user establishes a pair of keys: The private
fn  1 that is relatively prime to fn, and computes its key is known only to her, and the public key can be known to
inverse d such that ed  1 mod fn. d can be easily com- everybody. A user wishing to send a message to another
puted by knowing fn. The encryption function E raises user encrypts the message by using the public key of the
the plaintext M to the power e, modulo n. The decryption receiver and then sends it. Upon reception, the receiver
function D raises the ciphertext C to the power d, modulo n. decrypts the message with his/her private key. Public keys
That is, EM Me mod n and DC Cd mod n. Here, the can also be used to provide nonrepudiation, meaning the
public key is represented by the pair (e, n) and the private sender of a message cannot deny having sent it. The use of
key by d. Because fn cannot be determined without public keys to provide nonrepudiation is based on the
knowing the prime factors p and q, it is possible to keep concept of digital signatures, which, like handwritten sig-
d secret even if e and n are made public. The security of the natures, provide a way for a sender to sign the information
algorithm depends therefore on the difficulty of factoring n being transmitted. Digital signatures are essentially
into p and q. Usually a key with n of 512 bits is used, whose encoded information, a function of the message and the
factorization would take a half-million MIPS-years with key, which are appended to a message. Digital signatures
the best techniques known today. The algorithm itself, can be enforced through public key technology by having
however, does not constraint the key length. The key length the sender of a message encrypting the message with her
is variable. A longer key provides more protection, whereas a private key before transmission. The recipient will retrieve
shorter key proves more efficient. The authors of the algo- the message by decrypting it with the public key of the
rithm suggested using a 100-digit number for p and q, which sender. Nonrepudiation is provided because only the sen-
would imply a 200-digit number for n. In this scenario, der knows her public key and therefore only the sender
factoring n would take several billion years. The block could have produced the message in question. In the appli-
size is also variable, but it must be smaller than the length cation of secret keys, instead, the sender can claim that the
of the key. The ciphertext block is the same length as the key. message was forged by the recipient herself, who also
knows the key. The two uses of public keys can be combined,
Application of Cryptography thus providing sender, message, and recipient authentica-
tion, together with nonrepudiation.
Cryptographic techniques can be used to protect the secrecy
Public key algorithms can do everything that secret key
of information stored in the system, so that it will not be
algorithms can do. However, all known public key algo-
understandable to possible intruders bypassing access con-
rithms are orders of magnitude slower than secret key
trols. For instance, password files are generally encrypted.
algorithms. For this reason, often public key techniques
Cryptography proves particularly useful in the protection
are used for things that secret key techniques cannot do. In
of information transmitted over a communication network
particular, they may be used at the beginning of a commu-
(33). Information transmitted over a network is vulnerable
nication for authentication and to establish a secret key
from passive attacks, in which intruders sniff the informa-
with which to encrypt information to be transmitted.
tion, thus compromising its secrecy, and from active
attacks, in which intruders improperly modify the informa-
tion, thus compromising its integrity. Protecting against AUTHENTICATION AND ACCESS CONTROL IN OPEN
passive attacks means safeguarding the confidentiality of SYSTEMS
the message being transmitted. Protecting against active
attacks requires us to be able to ensure the authenticity of Throughout this chapter, we illustrated the services crucial
the message, its sender, and its receiver. Authentication of to the protection of data. In this section, we present ongoing
14 DATA SECURITY

work addressing authentication and access control in emer- standardization efforts are aimed at exploiting such
ging applications and new scenarios. descriptions; for example, the Liberty Alliance (www.pro-
jectliberty.org) consortium is promoting a set of open stan-
Authentication in Open Environments dards for developing federated identity management
infrastructures. However, the most successful standard
Today, accessing information on the global Internet has
is SAML (36), an authentication protocol handling authen-
become an essential requirement of the modern economy.
tication information across transactions between parties.
Recently, the focus has shifted from access to traditional
Such an authentication information, which is wrapped into
information stored in WWW sites to access to large
a SAML document, is called an assertion and it belongs to
e-services (34). Global e-services are also coming of age,
an entity (i.e., a human person, a computer, or any other
designed as custom applications exploiting single
subject as well). According to the specifications, an asser-
e-services already available on the Internet and integra-
tion may carry information about:
ting the results. In such a context, users normally have to
sign-on to several distributed systems where e-services  Authentication acts performed by the subject.
were built up in a way that they act independently as
isolated security domains. Therefore, each user who wants
 Attributes of the subject.
to enter one of these domains has to authenticate herself  Authorization decisions relating to the subject.
at each of these security domains by the use of separate
credentials (see Fig. 9). However, to realize the cooperation SAML assertions are usually transferred from identity
of services located in different domains, there is a need to providers (i.e., authorities that provide the users identity
have some authentication mechanism that does not require to the affiliated services) to service providers (i.e., entities
the user to authenticate and enter her user credentials that simply offer services) and consist of one or more
several times. On corporate networks as well as on the statements. Three kinds of statements are allowed: authen-
global Net, access to services by single-sign-on authentica- tication statements, attribute statements, and authori-
tion is now becoming a widespread way to authenticate zation decision statements. Authentication statements
users. Single-sign-on authentication relying on digital assert to the service provider that the principal did indeed
certificates (35) is currently the most popular choice for authenticate with the identity provider at a particular time
e-business applications. The widespread adoption of using a particular method of authentication. Other infor-
advanced Public-Key Infrastructure (PKI) technology and mation about the principal may be disclosed in an auth-
PKI-based solutions has provided secure techniques for entication statement. For instance, in the authentication
outsourcing digital certificate management. Basically, statement in Fig. 10, the e-mail address of the principal is
any certificate-based authentication language needs a disclosed to the service provider. Note that the three state-
subject description, including a set of attributes. Several ment types are not mutually exclusive. For instance, both

Domain 1

1
ial
d ent
User cre

credential 3

credential 2

Figure 9. Multiple domains Domain 3


requiring multiple credentials. Domain 2
DATA SECURITY 15

Figure 10. An example of SAML authentication assertion.

authentication statements and attribute statements may (e.g., service locators). The eXtensible Access Control
be included in a single assertion. Beside the format of the Markup Language (XACML) (42) is the result of a recent
assertion, the SAML specifications include an XML-based OASIS standardization effort proposing an XML-based
request-response protocol for interchanging the assertions. language to express and interchange access control poli-
By the use of this protocol, an assertion consuming service cies. XACML is designed to express authorization policies
can request a specified assertion belonging to a given sub- in XML against objects that are themselves identified in
ject or entity. This protocol can be based on various existing XML. The language can represent the functionalities of
transport protocols such as HTTP or SOAP over HTTP. most policy representation mechanisms. The main concep-
tual difference between XACML and WS-Policy is that
Attribute-based Access Control although XACML is based on a model that provides a
formal representation of the access control security policy
As said, in open environments, resource/service requesters
and its workings, WS-Policy has been developed without
are not identified by unique names but depend on their
taking into consideration this modeling phase. The result is
attributes (usually substantiated by certificates) to gain
an ambiguous language that is subject to different inter-
accesses to resources. Basing authorization on attributes
pretations and uses. This means that given a set of policies
of the the resource/service requester provides flexibility
expressed by using the syntax and semantics of WS-Policy,
and scalability that is essential in the context of large
their evaluation may have a different result depending on
distributed open systems, where subjects are identified
how the ambiguities of the language have been resolved.
by using a certificate-based authentication language. Attri-
This is obviously a serious problem, especially in the access
bute-based access control differs from the traditional dis-
control area, where access decisions have to be determinis-
cretionary access control model by replacing both the
tic (47,48). In the remainder of this section, we focus on
subject by a set of attributes and the objects by descriptions
XACML.
in terms of available properties associated with them. The
meaning of a stated attribute may be a granted capability
XACML Policy Language Model. XACML describes both
for a service, an identity, or a nonidentifying characteristic
an access control policy language and a request/response
of a user (e.g., a skill). Here, the basic idea is that not all
language. The policy language is used to express access
access control decisions are identity based. For instance,
control policies (who can do what when). The request/
information about a users current role (e.g., physician) or a
response language expresses queries about whether a par-
clients ability to pay for a resource access may be more
ticular access (request) should be allowed and describes
important than the clients identity.
answers (responses) to those queries (see the next subsec-
Several proposals have been introduced for access con-
tion). Figure 11 formally illustrates the XACML policy
trol to distributed heterogeneous resources from multiple
language model, where the main concepts of interests
sources based on the use of attribute certificates (3740). In
are rule, policy, and policy set. An XACML policy has as
such a context, two relevant access control languages using
a root element, either a Policy or a PolicySet. A
XML are WS-Policy (41) and XACML (42). Based on the
PolicySet is a collection of Policy or PolicySet. An
WS-Security (43), WS-Policy provides a grammar for
XACML policy consists of a target, a set of rules, an optional
expressing Web service policies. The WS-Policy includes
set of obligations, and a rule combining algorithm.
a set of general messaging related assertions defined in
WS-Policy Assertions (44) and a set of security policy
Target. A Target basically consists of a simplified set of
assertions related to supporting the WS-Security specifica-
conditions for the subject, resource, and action that must be
tion defined in WS-SecurityPolicy (45). In addition to the
satisfied for a policy to be applicable to a given access
WS-Policy, WS-Policy Attachment (46) defines how to
request: If all conditions of a Target are satisfied, its
attach these policies to Web services or other subjects
16 DATA SECURITY

1 1
PolicySet

1 0..*

1 1
Policy
Combining
Algorithm

1 0..* 0..*
0..1
1 0..1
Target 0..1 Policy Obligations

1 1 1 1

1..* 1..* 1..* 1


Subject Resource Action Rule
Combining
Algorithm
1

0..*
1 1 1
Rule Effect

1
0..1
Condition
Figure 11. XACML policy language model 42.

associated Policy (or Policyset) applies to the request. SubjectAttributeDesignator, ResourceAttribu-


If a policy applies to all subjects, actions, or resources, an teDesignator, ActionAttributeDesignator, and
empty element, named AnySubject, AnyAction, and EnvironmentAttributeDesignator elements. These
AnyResource, respectively, is used. elements use the AttributeValue element to define
the value of a particular attribute. Alternatively, the
Rule. A Rule specifies a permission (permit) or a denial AttributeSelector element can be used to specify
(deny) for a subject to perform an action on an object. The where to retrieve a particular attribute. Note that both
components of a rule are a target, an effect, and a condition. the attribute designator and the attribute selector elements
The target defines the set of resources, subjects, and actions can return multiple values. For this reason, XACML pro-
to which the rule is intended to apply. The effect of the rule vides an attribute type called bag. A bag is an unordered
can be permit or deny. The condition represents a boolean collection and it can contain duplicates values for a parti-
expression that may further refine the applicability of the cular attribute. In addition, XACML defines other standard
rule. Note that the Target element is an optional element: value types such as string, boolean, integer, and time.
A rule with no target applies to all possible requests. An Together with these attribute types, XACML also defines
important feature of XACML is that a rule is based on the operations to be performed on the different types, such
definition of attributes corresponding to specific character- as equality operation, comparison operation, and string
istics of a subject, resource, action, or environment. For manipulation.
instance, a physician at a hospital may have the attribute of
being a researcher, a specialist in some field, or many other Obligation. An Obligation is an operation that has to
job roles. According to these attributes, that physician can be performed in conjunction with the enforcement of an
perform different functions within the hospital. As another authorization decision. For instance, an obligation can
example, a particular function may be dependent on the state that all accesses on medical data have to be logged.
time of the day (e.g., access to the patient records can Note that only policies that are evaluated and have
be limited to the working hours of 8:00 am to 6:00 pm). returned a response of permit or deny can return obliga-
An access request is mainly composed of attributes that tions. More precisely, an obligation is returned only if the
will be compared with attribute values in a policy to effect of the policy matches the value specified in the Full-
make an access decision. Attributes are identified by the fillOn attribute associated with the obligation. This means
DATA SECURITY 17

that if a policy evaluates to indeterminate or not result is deny. If all rules evaluate to permit, then
applicable, then the associated obligations are not the result is permit. If some rules evaluate to permit
returned. and some evaluate to not applicable, then the
result is permit.
Rule Combining Algorithm. Each Policy also defines a  Permit overrides. If a rule exists that evaluates to
rule combining algorithm used for reconciling the decisions permit, then the result is permit. If all rules evaluate
each rule makes. The final decision value, called the author- to not applicable, then the result is deny. If some
ization decision, inserted into the XACML context is the rules evaluate to deny and some evaluate to not
value of the policy as defined by the rule combining algo- applicable, then the result is deny.
rithm. XACML defines different combining algorithms.  First applicable. Each rule is evaluated in the order in
Examples of these are as follows: which it appears in the Policy. For each rule, if the
target matches and the conditions evaluate to true,
 Deny overrides. If a rule exists that evaluates to deny then the result is the effect (permit or deny) of such a
or, if all rules evaluate to not applicable, then the rule. Otherwise, the next rule is considered.

Figure 12. An example of


XACML policy.
18 DATA SECURITY

 Only-one-applicable. If more than one rule applies,


then the result is indeterminate. If no rule applies,
then the result is not applicable. If only one policy
applies, the result coincides with the result of eva-
luating that rule.

In summary, according to the selected combining algo-


rithm, the authorization decision can be permit, deny,
not applicable (when no applicable policies or rules
could be found), or indeterminate (when some errors
occurred during the access control process).
The PolicySet element consists of a set of policies, a
target, an optional set of obligations, and a policy combining
algorithm. The policy, target, and obligation components
are as described above. The policy combining algorithms
define how the results of evaluating the policies in the policy
set have to be combined when evaluating the policy set.
This value is then inserted in the XACML response context.
As an example of policy, suppose that there is a hospital
where a high-level policy states that: Figure 13. (a) XACML request schema and (b) response
Any member of the SeniorResearcher group can read schema.
the research report web page www.hospital.com/research
report/reports.html.
that the user is allowed to access the requested web page.
Figure 12 shows the XACML policy corresponding to this
The corresponding XACML response is illustrated in
high-level policy. The policy applies to requests on the web
Fig. 14(b).
page http://www.hospital.com/research report/reports.html.
It has one rule with a target that requires an action of read
and a condition that applies only if the subject is a member of CONCLUSIONS
the group SeniorResearcher.
Ensuring protection to information stored in a computer
XACML Request and Response system means safeguarding the information against pos-
sible violations to its secrecy, integrity, or availability. This
XACML defines a standard format for expressing requests
is a requirement that any information system must satisfy
and responses. More precisely, the original request is
and that requires the enforcement of different protection
translated, through the context handler, in a canonical
methods and related tools. Authentication, access control,
form and is then evaluated. Such a request contains attri-
auditing, and encryption are all necessary to this task. As it
butes for the subject, resource, action, and optionally, for
should be clear from this article, these different measures
the environment. Each request includes exactly one set
are not independent but strongly dependent on each other.
of attributes for the resource and action and at most one
Access control relies on good authentication, because
set of environment attributes. There may be multiple sets of
accesses allowed or denied depend on the identity of the
subject attributes, each of which is identified by a category
user requesting them. Strong authentication supports good
URI. Figure 13(a) illustrates the XSD Schema of the
auditing, because users can be held accountable for their
request. A response element contains one or more results,
actions. Cryptographic techniques are necessary to ensure
each of which correspond to the result of an evaluation.
strong authentication, for example, to securely store or
Each result contains three elements, namely Decision,
transmit passwords. A weakness in any of these measures
Status, and Obligations. The Decision element spe-
may compromise the security of the whole system (a chain is
cifies the authorization decision (i.e., permit, deny,
as strong as its weakness link). Their correct and coordi-
indeterminate, not applicable), the Status element
nated enforcement is therefore crucial to the protection of
indicates if some error occurred during the evaluation
the information.
process, and the optional Obligations element states
the obligations that must be fulfilled. Figure 13(b) illus-
trates the XSD Schema of the response. ACKNOWLEDGMENT
As an example of request and response, suppose now
that a user belonging to group SeniorResearcher and This work was supported in part by the European Union
with email user1@hospital.com wants to read the www.ex- within the PRIME Project in the FP6/IST Programme
ample.com/forum/private.html web page. The correspond- under contract IST-2002-507591 and by the Italian
ing XACML request is illustrated in Fig. 14(a). This request MIUR within the KIWI and MAPS projects.
is compared with the XACML policy in Fig. 12. The result is
DATA SECURITY 19

Figure 14. (a) An example of


XACML request and (b) response.

BIBLIOGRAPHY 10. E. Bertino, S. Jajodia, and P. Samarati, Supporting multiple


access control policies in database systems, Proc. IEEE
1. S. Castano, M.G. Fugini, G. Martella, and P. Samarati, Data- Symp. on Security and Privacy, Oakland, CA, 1996.
base Security, Reading, MA: Addison-Wesley, 1995. 11. E. Bertino, S. Jajodia, and P. Samarati, A flexible authorization
2. F. Monrose and A. Rubin, Authentication via keystroke mechanism for relational data management systems, ACM
dynamics, Proc. of the ACM Conference on Computer and Transactions on Information Systems, 17 (2): 101140, 1999.
Communications Security, Zurich, Switzerland, 1997. 12. F. Rabitti, E. Bertino, W. Kim, and D. Woelk, A model of
3. T. Fine and S. E. Minear, Assuring distributed trusted mach, authorization for next-generation database systems, ACM
Proc. IEEE Symp. on Security and Privacy, Oakland, CA, 1993, Transactions on Database Systems, 16 (1), 1991.
pp. 206218. 13. E. Bertino, S. De Capitani di Vimercati, E. Ferrari, and P.
4. S. Jajodia, P. Samarati, M.L. Sapino, and V.S. Subrahmanian, Samarati, Exception-based information flow control! in object-
Flexible support for multiple access control policies, ACM oriented systems, ACM Transactions on Information and Sys-
Transactions on Database Systems, 26 (2): 214260, 2001. tem Security,1 (1): 2665, 1998.
5. O.S. Saydjari, S.J. Turner, D.E. Peele, J.F. Farrell, P.A. 14. D.E. Denning, A lattice model of secure information flow,
Loscocco, W. Kutz, and G.L. Bock, Synergy: A distributed, Communications of the ACM, 19 (5): 236243, 1976.
microkernel-based security architecture, Technical report, 15. R. Graubart, On the need for a third form of access control,
National Security Agency, Ft. George G. Meade, MD, NIST-NCSC National Computer Security Conference, 1989,
November 1993. pp. 296303.
6. T.Y.C. Woo and S.S. Lam, Authorizations in distributed sys- 16. P.A. Karger, Limiting the damage potential of discretionary
tems: A new approach, Journal of Computer Security, 2 (2,3): trojan horses, Proc. IEEE Symposium on Security and Privacy,
107136, 1993. Oakland, CA, 1987.
7. R.W. Baldwin, Naming and grouping privileges to simplify 17. C.J. McCollum, J.R. Messing, and L. Notargiacomo, Beyond
security management in large databases, Proc. IEEE Sympo- the pale of mac and dac - defining new forms of access control,
sium on Security and Privacy, Oakland, CA, 1990, pp. 6170. Proc. IEEE Computer Society Symposium on Security and
8. T. Lunt, Access control policies: Some unanswered questions, Privacy, Oakland, CA, 1990, pp. 190200.
IEEE Computer Security Foundations Workshop II, Franconia, 18. J. McLean, Security models and information flow, Proc. IEEE
NH, June 1988, pp. 227245. Computer Society Symposium on Research in Security and
9. H. Shen and P. Dewan, Access control for collaborative envir- Privacy, Oakland, CA, 1990, pp. 180187.
onments, Proc. Int. Conf. on Computer Supported Cooperative
Work, November pp. 5158.
20 DATA SECURITY

19. D.E. Bell and L.J. LaPadula, Secure computer systems: Unified 37. P. Bonatti and P. Samarati, A unified framework for regulating
exposition and Multics interpretation, Technical report, The access and information release on the web, Journal of Com-
Mitre Corp., March 1976. puter Security, 10 (3): 241272, 2002.
20. D.F. Ferraiolo and R. Kuhn, Role-based access controls, Proc. 38. E. Damiani, S. De Capitani di Vimercati, S. Paraboschi, and P.
of the NIST-NCSC National Computer Security Conference, Samarati, Securing SOAP E-services, International Journal of
Baltimore, MD, 1993, pp. 554563. Information Security (IJIS), 1 (2): 100115, 2002.
21. R. Sandhu, E.J Coyne, H.L. Feinstein, and C.E. Youman, Role- 39. J.A. Hine, W. Yao, J. Bacon, and K. Moody, An architecture for
based access control models, IEEE Computer, 29 (2): 3847, distributed OASIS services, Proc. of the IFIP/ACM Interna-
1996. tional Conference on Distributed Systems Platforms nd Open
22. D.J. Thomsen, Role-based application design and enforcement, Distributed Processing, Hudson River Valley, New York, 2000.
in S. Jajodia and C.E. Landwehr, (eds.), Database Security IV: 40. H. Koshutanski and F. Massacci, An access control framework
Status and Prospects, North-Holland, 1991, pp. 151168. for business processes for web services, Proc. of the 2003 ACM
23. D.F.C Brewer and M.J. Nash, The chinese wall security policy, workshop on XML security, Fairfax, VA, 2003.
Proc. IEEE Computer Society Symposium on Security and 41. D. Box et al., Web Services Policy Framework (WS-Policy)
Privacy, Oakland, CA, 1989, pp. 215228. version 1.1. Available: http://msdn. microsoft.com/library/en-
24. M.N. Nash and K.R. Poland, Some conundrums concerning us/dnglobspec/html/ws-policy.asp, May 2003.
separation of duty, Proc. IEEE Computer Society Symposium 42. OASIS eXtensible Access Control Markup Language (XACML)
on Security and Privacy, Oakland, CA, 1982, pp. 201207. version 1.1. Available: http://www. oasis-open.org/committees/
25. R. Sandhu, Transaction control expressions for separation of xacml/repository/cs-xacml-specific%ation-1.1.pdf.
duties, Fourth Annual Computer Security Application Confer- 43. B. Atkinson and G. Della-Libera et al. Web services security
ence, Orlando, FL, 1988, pp. 282286. (WS-Security). http://msdn. microsoft.com/library/en-us/
26. D.E. Denning, Cryptography and Data Security. Reading, MA: dnglobspec/html/ws-security.asp%, April 2002.
Addison-Wesley, 1982. 44. D. Box et al., Web services policy assertions language (WS-
27. C.E. Shannon, Communication theory of secrecy systems, Bell PolicyAssertions) version 1.1. http://msdn.microsoft.com/
System Technical Journal, 28 (4): 656715, October 1949. library/en-us/dnglobspec/html/ws-policyassert%ions.asp,
28. National Bureau of Standard, Washington, D.C, Data Encryp- May 2003.
tion Standard, January 1977. FIPS PUB 46. 45. Web services security policy (WS-SecurityPolicy), Available:
29. National Institute of Standards and Technology (NIST), http://www-106.ibm.com/developerworks/library/ws-secpol/.
Washington, D.C, Advanced Encryption Standard (AES), December 2002.
November 2001. FIPS-197. 46. D. Boxet al. Web Services Policy Attachment (WS-PolicyAt-
30. W. Diffie and M. Hellman, New directions in cryptography, tachment) version 1.1. Available: http://msdn.microsoft.com/
IEEE Transaction on Information Theory, 22 (6): 644654, library/en-us/dnglobspec/html/ws-policyattach%ment.asp,
1976. May 2003.
31. T. ElGamal, A public key cryptosystem and a signature 47. R. Agrawal, J. Kiernan, R. Srikant, and Y. Xu, An XPath-based
scheme based on discrete logarithms, IEEE Transaction on preference language for P3P, Proc. of the World Wide Web
Information Theory, 31 (4): 469472, 1985. Conference, Budapest, Hungary, 2003.
32. R.L. Rivest, A. Shamir, and L. Adleman, A method for obtaining 48. C. Ardagna and S. De Capitani di Vimercati, A comparison of
digital signatures and public-key cryptosystems, Communica- modeling strategies in defining xml-based access control lan-
tions of the ACM, 21 (2): 120126, February 1978. guages, Computer Systems Science & Engineering Journal,19
(3), 2004.
33. C. Kaufman, R. Perlman, and M. Speciner, Network Security,
Englewood Cliffs, NJ: Prentice Hall, 1995.
34. S. Feldman, The Changing Face of E-Commerce, IEEE Inter- SABRINA DE CAPITANI DI
net Computing, 4 (3): 8284, 2000. VIMERCATI
35. P. Samarati and S. De Capitani di Vimercati, Access control: PIERANGELA SAMARATI
Policies, models, and mechanisms, in R. Focardi and R. Universita degli Studi di Milano
Gorrieri, (eds.), Foundations of Security Analysis and Design, Crema, Italy
LNCS 2171. Springer-Verlag, 2001. SUSHIL JAJODIA
36. OASIS, Security Assertion Markup Language (SAML) George Mason University
V1.1,2003. Available: http://www.oasis-open.org/committees/ Fairfax, Virginia
security/.
D
DATA STRUCTURES AND ALGORITHMS More formally, the time complexity of an algorithm is
usually defined as the total number of elementary opera-
INTRODUCTION tions (arithmetic operations, comparisons, branching
instructions, etc.) performed. The time complexity is gen-
An algorithm is a finite procedure, with a well-defined set erally quantified as a function of the input size. The input
of steps, aimed at solving a specific problem. Algorithms size of a problem is the total number of bits required to
are present in any problem-solving task involving the use represent all data necessary for solving the problem. For
of computers in numerical or nonnumerical applications. example, if an algorithm receives as input a vector with n
An algorithm is usually required to stop in a finite number integer values, each value represented in binary notation,
of steps, although some useful procedures are meant then the number of bits required to represent the input is
to be run continuously, such as operating systems and n[log K], where K is an upper bound on the maximum value
related system software. These procedures are sometimes stored on any position of the input vector (note that all
not regarded as algorithms, but simply as programs. In logarithms discussed in this article are taken with respect
general, a program is a set of machine-readable and to the base 2). It is common to assume that integer numbers
executable codes used to implement algorithms. used in an algorithm are all limited in size to a given upper
These definitions make clear the fact that an algorithm bound, unless it is an important parameter (for example, in
is a high-level description, which should be indepen- numerical algorithms such as factorization). Thus, it is
dent of the underlying machine that is used to implement usual to say that the input size for a vector of n integers
it. This requirement is important to simplify the task of is equal to n.
analysis of the properties of an algorithm: We do not When analyzing an algorithm, the main concern is in
need to consider all possible machine details necessary understanding its performance under different conditions.
to implement it, but only the properties common to all Most common conditions considered are the following:
such implementations.
Algorithms can be classified and studied according to  Worst case: By the worst case of an algorithm, we mean
their performance characteristics. Among all algorithms to the maximum time necessary to compute its result, for
solve a specific problem, we clearly want the ones that have some fixed input size. The worst case analysis is
better performance, according to established performance usually considered the best way of analyzing algo-
measurements for an application. Among the performance rithms, because it gives a time complexity bound
parameters used for classification purposes, the most that is independent of the input. It is also surprisingly
important are time and space. For a specified problem, easy to compute for most problems.
the time and space taken by the algorithm with best pos-  Average case: The average case analysis of an algo-
sible performance are called the time and space complexity rithm is concerned with the expected time necessary
measures for the problem. for the algorithm to run, for all data inputs with fixed
Space is a simpler measure to analyze, as it is clearly tied size. Average case analysis generally requires some
to time: An algorithm cannot use more than t units of space, assumptions about the probabilistic distribution of
where t is the total time spent by the algorithm. Usually, input data, and therefore the results are dependent
the space used by an algorithm is clearly identifiable from on such assumptions, which are not easy to guess in
the data structures used in its operation. For example, if an most cases. Moreover, the stochastic analysis of even
algorithm operates using only a vector that depends on the the simplest algorithms may become a daunting task.
size of the input, the space complexity of the algorithm can  Best case: It is the time complexity of an algorithm
be bounded by a function of the input size. under the best conditions for a specific input size.
On the other hand, time complexity is difficult to char- Although simple to compute in most cases, the best
acterize in general. In fact, the most fundamental question case analysis is not very useful to predict the actual
about an algorithm, whether it stops in finite time or not, is performance of an algorithm in real situations.
known to be undecidable (i.e., it cannot be answered in
general). Although this result is a very negative result, it is From the three types of analysis shown above, worst case
still possible to analyze the time complexity of several analysis is the most interesting from the theoretical as well
classes of practical algorithms, which is the main objective as practical point of view. As an example of the above
of the area of analysis of algorithms. This type of analysis is complexity cases, consider the classic problem of searching
important because time complexity is the main restriction a specific value x in a list of n elements. The simplest
on applying an algorithm in practice. Consider, for exam- algorithm consists of comparing x with each element in
ple, an algorithm that takes time exponential in the size of sequence, from positions 1 to n. The worst case of this
the input. Such an algorithm is not practical, unless the size algorithm occurs when the element searched is not present,
of the inputs for the considered problem is always very or when present in the last position. The best case occurs
small. For general inputs, such algorithm will easily sur- when the searched element is in position 1. The average
pass any reasonable time limit. case of the algorithm, however, depends on the distribution
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DATA STRUCTURES AND ALGORITHMS

of the input. If we assume that each value has the same time. A second implementation of queue uses doubly linked
probability to occur in each position and there are no lists. This implementation has similar time complexity,
repeated values, then, on average, n/2 comparisons are because it needs only to add or remove an element and
necessary to find the desired element. its corresponding links. However, it has the advantage that
To simplify the study of time and space requirements of it is not restricted to the size of a preallocated array.
algorithms, asymptotic notation is usually employed. This A second useful ADT is the stack. It has the same
notation allows one to ignore constant factors in the run- operations as a queue, but the semantic of the operations
ning time, making the analysis independent of different is different: ADD puts a new element on the top of a stack,
specific details developing from the algorithm implementa- and REMOVE takes the element that is at its top. Similarly to
tion. Given the integer functions f and g, we say that f n queues, implementations can be based on arrays or linked
Ogn (which is read as f(n) is of the order of g(n)) if there lists, operating in constant time.
are constants c > 0 and N > 0, such that f n  c  gn for Queues and stacks are examples of more general data
all n  N. Similarly, given the integer functions f and g, we structures that support a set of operations, in this case ADD
say that f n Vn if there are constants c > 0 and N > 0, and REMOVE. This class of data structures include all gen-
such that f n  c  gn for all n  N. The notations for O eral lists, where insertion and removal can occur in any
and V can be also combined by saying that f n Qn if position of the list.
and only if f n On and f n Vn. A well-known class of data structures is the dictionary,
with the operations INSERT, DELETE, and SEARCH. Still
another class is the priority queue, where the desired
DATA STRUCTURES
operations are FIND-MIN, DELETE-MIN, and INSERT.
Data structures are a fundamental aspect of algorithms,
because they describe how data will be manipulated in the Binary Trees
computers memory. The organization of data can make the
A binary tree is a recursive structure that can be either
difference between effcient and inefficient algorithms. Con-
empty or have a root node with two children, which are
sider, for example, the problem of inserting a number in the
themselves binary trees. Binary trees are important data
middle of an ordered list with n elements. This operation
structures used to implement abstract data types. An
can be done in constant (O1) time if the list is manipulated
example of abstract structure that can be implemented
as a set of linked elements. On the other hand, if it is
with binary trees are dictionaries.
represented as an array with fixed positions, it is necessary
A special node in the binary tree is the root node, which is
to create space in the array for the required position, which
the top level node. At the lower level of the tree are the
requires at least n/2 elements to be moved. Thus, the time
leaves, defined as subtrees with empty children. The level of
complexity in this case is On.
a node x is an indicator of distance from x to the root node.
Data structures can be studied from a high-level stand-
The level of the root is defined to be 1, and the level a child
point, where we consider only the operations performed on
node is defined as 1 plus the level of its parent node. The
data. Data structures described in this way are called
height of a tree is the maximum level of any of its nodes.
abstract data types (ADT). ADTs are important because
The main feature of binary trees is that they can be used
they allow an abstraction of the properties of a data struc-
to segment the domain of elements stored in their nodes
ture, which can have several implementations. Thus, a
into two subdomains at each node, which allows some
second way of looking at data structures is through the
algorithms running in binary trees to operate on time
analysis of the actual implementation of its ADT, as data is
Olog n. Consider a binary tree implementing a dictionary,
organized in the computers memory.
where the elements are integer numbers. We can store a
number x in the tree using the following strategy: Check
Queues and Stacks
initially the root node. If it is empty, store x in the root of the
As an example of ADT, considerthe conceptof queue. A queue subtree. Otherwise, let the value stored there be equal to r.
canreceivenewelementsatitsend.Elementscanberemoved If x < r, then check recursively the left child tree; if x > r,
only at the beginning of the queue. The concept leads to the then check recursively the left child tree. Searching the
formulation of the following natural operations: ADD(ELE- binary tree (instead of inserting a node) is similar, but we
MENT): adds ELEMENT to the end of the queue; REMOVE(ELE- just need to check if x r and return when this is true. Note
MENT): removes ELEMENT from the beginning of the queue. that we are partitioning the solution space into two subsets
The ADT queue can be implemented using several data at each step of the algorithm. The resulting data structure
structures. The simplest implementation uses an array a is called a binary search tree.
with n positions to hold the elements, considering that n is As an example of binary tree, consider Fig. 1. We assume
the maximum size of the queue. This implementation has that we want to insert the value 36 into the tree. The first
the following properties: The ADD operation can be per- comparison with the root node will determine that the
formed in constant time, as we need only to update the position of the value must be on the right subtree. The
location of the last element (in this implementation, the second comparison with 45 will then result in the selection
array is circular, for example, element a[1] comes right of the left subtree. Comparing with the value 38, we see that
after position a[n]). Similarly, the REMOVE operation can be the element must be on the left subtree. Finally, the com-
implemented just by decreasing the position of the front of parison with the empty subtree shows that it is the position
the queue, and therefore it can be performed in constant at which the node with value 36 should be inserted.
DATA STRUCTURES AND ALGORITHMS 3

38
not specified, and therefore {i, j} and {j, i} are notations for
the same edge.
A graph is an abstract data type with the following basic
operations: INSERTEDGE, REMOVEEDGE, FIND, ADJACENT, and
17 45
CONNECTED. Other operations are also interesting, but
they vary according to the application. Graphs can be
8 32 41 represented using different data structures. The simplest
representation is called the node incidence matrix repre-
Figure 1. An example of binary tree. sentation. In this case, the graph G V; E with n nodes is
represented by a n  n matrix A ai j , such that ai j 1 if
i; j 2 E and ai j 0 otherwise. A graph is called sparse
A closer examination of the tree in Fig. 1 reviews that when the number of edges is OjVj. The node incidence
a possible order for insertion of the values in the tree is matrix is a convenient representation, but it usually
38, 17, 45, 8, 32, and 41 when starting from an empty leads to suboptimal algorithm performance, especially
binary tree. Any other ordering of these numbers accord- when the graph is sparse, which happens, for example,
ing to nondecreasing levels in the final tree would pro- when the algorithm needs to find all edges in a graph, which
duce the same result. However, some orderings of these requires Qn2 in the matrix representation, as all pairs
values may produce trees with large height, which is not i; j 2 V  V need to be probed for adjacency.
desirable as we discuss below. For example, the ordering 8, A variation of the first representation for graphs is the
17, 32, 38, 41, and 45 will generate a tree that has only node-edge incidence matrix. This representation is more
one branch with height 6. useful for directed graphs, although it can also be used with
It is easy to check that operations in binary trees such as undirected graphs by simultaneously considering both the
FIND or INSERT have to perform at most h comparisons, edges (i, j) and (j, i). In the node-edge incidence matrix
where h is the height of the tree. It is also simple to show representation, a graph G V; E with n nodes and m
that the height of a binary tree satisfies h Vlog n. There- edges is represented by an n  m matrix A aie , where
fore, it is an important goal for any algorithm applied to aie 1 if e i; j 2 E, aie 1 if e j; i 2 E, and aie 0
binary trees to keep the height as close as possible to the otherwise.
lower bound of log n. If true, then the algorithms for binary A third representation for graphs, which is more useful
tree operations discussed above will also take time Qlog n. when the graph is sparse, is called the adjacency list
Several methods have been developed to guarantee that representation. In this representation, an array a with
binary trees produced by insertion and searching proce- n positions is used, where a[i] keeps a link to a list of nodes
dures have the height Olog n. These methods, which that are adjacent to node i. With this data representation,
include red-black trees, 2-3 trees, and AVL trees, provide it is possible to iterate over all edges of the graph by
elaborate techniques for rotating an existing configuration looking at each linked list, which takes time VjEj,
of nodes in the tree, such that the final binary tree is instead of VjVj2 as in the node incidence matrix repre-
balanced (i.e., it has height close to O(log n)). These ideas sentation, which means that all algorithms that need to
can be stated as in the following theorem: iterate over the edges of a graph will have improved
performance on sparse graphs, when compared with the
Theorem 1. A dictionary and a priority queue can be matrix representations.
implemented such that the Find and Insert operations take
time Qlog n.
ADVANCED DATA STRUCTURES
Graphs
Problems involving data manipulation can usually benefit
A graph is a data structure that represents a set of nodes from the use of more advanced data structures. Examples
(possibly with labels), together with relations between can be found in areas such as computational geometry,
pairs of nodes. Graphs are denoted as G V; E, where search and classification of Internet content, and fast
V is a nonempty set and E  V  V. They are a fundamental access to external memory. Although the complex techni-
data structure for processing discrete information, because ques employed in such applications cannot be fully
a large number of combinatorial problems can be expressed described here because of space constraints, we provide
using graphs. A well-known example is the traveling sales- references for some problems that employ advanced data
man problem. Consider a set of n cities, with a set of roads structures to be solved.
connecting pairs of cities. This system can be represented as External memory algorithms have application when-
a graph G V; E, where V is the set of cities and E is the ever there is a large amount of data that cannot fit in the
set of all pairs u; v 2 V  V such that there is a road computers main memory. Examples of such applications
between cities u and v with cost c(u, v). The problem include manipulation of scientific data, such as meteorolo-
requires finding a tour through all cities with minimum gic, astrophysical, geological, geographical, and medical
cost. databases. The general problem, however, is the same
Graphs are classified into directed and undirected encountered in any computer system with memory hier-
graphs. In a directed graph, the edge (i, j) has an associated archies levels, such as cache memory, main memory, and
direction. In an undirected graph, however, the direction is external disk storage.
4 DATA STRUCTURES AND ALGORITHMS

A data structure frequently used to access out-of- doing that (note also, that some problems may have not a
memory data is the B-tree. A B-tree is a type of balanced finite algorithm (6)). However, some general approaches
tree designed to perform optimally when large parts of the used for the construction of algorithms have demonstrated
stored data is out of the computers main memory. The their usefulness and applicability for solving different pro-
challenge in this kind of application is that accessing blems of varied natures and origins. Next, we briefly
secondary storage, such as a hard disk, is many orders of describe some of these techniques.
magnitude slower than accessing the main memory. Thus, Divide and conquer is a strategy for development
the number of accesses to secondary storage is the bottle- of algorithms in which the problem is divided into
neck that must be addressed. The basic design strategy of smaller parts that are then solved recursively (a recursive
B-trees is to reduce the amount of blocks of the hard disk algorithm is an algorithm that calls itself). This strategy
that must be read, in order to locate some specific informa- has been successful in several areas, such as sorting,
tion in the data structure. This strategy minimizes the time searching, and computational geometry algorithms. In
lost in accessing secondary storage. Several improvements the next section, we discuss examples of this approach.
to B-trees have been proposed in the last decades, with the The simplicity of this type of algorithm stems from its
objective of making this adequate for new applications. For recursive nature: We do not have to regard the solution of
example, cache-oblivious B-trees (1,2) are extensions of the large problems, because the recursion will break the input
B-tree model where the algorithm has no information about data into smaller pieces.
the sizes of the main memory cache or secondary storage Dynamic programming is a technique that also tries to
block. divide the problem into smaller pieces; however, it does it in
Another example of external memory data structure the way that solutions of smaller problems can be orderly
that tries to reduce the number of disk accesses is the buffer reused, and therefore they do not need to be computed more
tree (3). The basic idea of a buffer tree is that elements of the than once. An example of such an algorithm is the Floids
tree are considered to be blocks of the secondary storage method for finding all shortest paths in a graph. The
medium, so that access to these blocks is minimized. algorithm basically computes solutions where paths can
An example of application of external memory algo- pass only through some subset of nodes. Then, the final
rithms to geographical databases is the problem of proces- solution is built using this information.
sing line segments (4). In such databases, large amounts of Greedy methods have been frequently used for the con-
data must be processed, and questions must be answered struction of efficient algorithms. A greedy algorithm always
fast, with the minimum number of accesses to secondary makes decisions that will maximize a short-term goal, and
storage. The type of questions occurring here include how to employs the results to build a complete solution for the
find if two line segments stored in the database intersect, or problem. Using again the shortest path problem as an
how to optimally triangulate a specific area. example, the Dijkstras algorithm is a type of greedy
Data structures for external memory algorithms method. In this case, the function that is minimized at
also play an important role in the solution of some graph each step is the distance to the set of nodes previously
theory problems, occurring in applications such as telecom- considered by the algorithm.
munications, financial markets, medicine, and so on. An Finally, we can mention some other important algo-
example of large network database is provided by the so- rithm construction methods such as backtracking, enu-
called call graph, created from information about calls meration, and randomization. The use of such techniques
among users of AT&T (5). The call graph is defined as has allowed to develop many efficient algorithms, which
having nodes representing the users of the telephony sys- provides optimal or approximate solutions to a great variety
tem. Edges connect nodes whenever there is a call between of problems in numerous areas.
the corresponding users during some specified period of
time. The resulting database had several million nodes and Algorithms for Some Basic Problems
a similar number of edges. The whole amount of data had to
In this section, we discuss some basic algorithms for pro-
be held on special data structures for fast processing.
blems such as binary search, sorting, matrix multiplica-
Questions that are interesting in this kind of graph are,
tion, and minimum weight spanning tree.
for example, the number of connected components, the
average size of such connected components, and the max-
Sorting. Suppose we are given an array of numbers
imum size of cliques (groups of completely connected users)
a1 ; . . . ; an . Our task is to sort this array in nondecreasing
in the graph. In this application, special data structures
order such that a1  a2  . . .  an . Probably the most
had to be created to explore the sparsity of the graph and
obvious algorithm for this problem is the so-called selection
avoid the access to secondary storage, which resulted in an
sort. Its main idea is the following. First, we find the
algorithm with efficient performance that was able to find
smallest number of these n elements and interchange it
large sets of completely connected nodes in the call graph.
with a1. The number of comparisons we need is exactly
(n1). Next, we repeat this procedure with the array
ALGORITHMS a2 ; . . . ; an , then with the array a3 ; . . . ; an , and so on. The
total number of required comparisons is
General Techniques
The development of a new algorithm for a problem is always n  1 n  2 . . . 1 Qn2
a creative effort, because there is no easy, general way of
DATA STRUCTURES AND ALGORITHMS 5

A better algorithm called the merge sort can be devel- element cij of C can be calculated in Qn time. As there
oped using the divide and conquer strategy. Initially, we are n2 elements in the matrix C, the matrix C can be
divide the input vector into two parts, say from a1 to an=2 computed in Qn3 time.
and from an=21 to an. Then, we can call the sorting algo- Strassen developed an algorithm based on a divide-
rithm recursively for the smaller vectors a1 ; . . . ; an=2 and and-conquer strategy, which requires only Qnlog2 7 time.
an=21 ; . . . ; an (the recursion can be solved very easily when The main idea of the algorithm is based on the simple
the vectors to be sorted have size 1 or 2; therefore, the observation that two matrices of size 2  2 can be multi-
algorithm will always end with a correctly sorted vector). plied using only 7 multiplications (instead of 8) and 18
Finally, we need to merge these two sorted arrays into one additions (fortunately, the running time of the algorithm
sorted array. This procedure can be done in Qn time. If asymptotically is not sensible to increasing the number of
T(n) is the total number of comparisons made by an algo- additions). Let the matrices A and B in the problem be
rithm for the input array of size n, then for the described partitioned as follows:
algorithm T(n) satisfies Tn 2Tn=2 Qn, which
 
results in Tn Qn log n. A11 A12
A
Next, we show that merging two arrays respectively A21 A22
with l and m elements can be done in Ql m time. Let  
X x1 ; . . . ; xl and Y y1 ; . . . ; ym be our two input arrays B11 B12
B
sorted in nondecreasing order and Z be an auxiliary vector B21 B22
of length l + m. As X and Y are sorted, if we compare x1 and
y1, then the smallest of these two numbers is also the where the size of matrices Aij and Bij is n=2  n=2. Then
smallest number of X and Y combined. Suppose, for exam- calling the algorithm recursively and applying the
ple, x1  y1 . Let z1 x1 and remove x1 from X. Repeating Strassen formulas, we obtain the following formula for
the procedure described above with new X and Y, we obtain the running time T(n) of the algorithm:
z2. Proceed this way until one of the arrays becomes empty.
Finally, keeping the order, we can output all the elements of Tn 7Tn=2 Qn2
the remaining array to Z. Obviously, the obtained array Z
contains the needed result. It is also easy to observe that The solution of the recursive formula above is
every time we move an element to Z we remove one of the Tn Qnlog2 7 . A more detailed description of the algo-
elements of X or Y and make exactly one comparison. There- rithm can be found in textbooks on algorithms, which are
fore, the number of comparisons we perform is Ql m. listed in the last section of this article.

Proposition 1. We can sort an array with n elements in Minimum Weight Spanning Tree. A tree is a connected
Qn log n time. graph without cycles; that is, it contains a path between
It can also be shown that any sorting algorithm requires every pair of nodes, and this path is unique. Consider
at least Vn log n comparisons. Therefore, the merge sort is an undirected connected graph G V; E, where each
asymptotically optimal. edge (i, j) has a weight wij. A spanning tree TG of the graph
G is a subgraph of G that is a tree and spans (i.e., contains)
Binary Search. In the binary search problem, for an all nodes in V. The minimum spanning tree (MST) problem
array a1 ; . . . ; an sorted in nondecreasing order, we need is to find a spanning tree with minimum total sum of its
to check if a given element x is present in this array. A edge weights.
divide-and-conquer strategy can be used to design a simple The following algorithm for solving this problem is
and effective algorithm for solving this problem. designed using the greedy approach. Initially, we sort all
As the first step of the algorithm, we check whether the edges of the given graph G in nondecreasing order and
x an=2 . If it is true, then the problem is solved. Otherwise, create a list of edges L. Let T be an empty subgraph of G.
because the array is sorted in nondecreasing order, if Pick an element of L with minimum weight (say e), add e to T,
x > an=2 , then we conclude that x cannot be in the first and remove it from L. Proceed with this procedure checking
part of the array, for example, x cannot be present in at every step that adding the new edge does not create a cycle
a1 ; . . . ; an=2 . Applying the same argument, if x < an=2 , in T (if this happens, then we do not add the corresponding
then the second part of the array, which is an=2 ; . . . ; an , edge to T). After n  1 edges are added to T, where n is the
can be excluded from our consideration. Next, we repeat the number of nodes in G, stop. Denote the obtained subgraph by
procedure described above with the remaining half of the TG. The following proposition can be proved:
initial array. At every step, the size of the array reduces by a
factor of 2. Therefore, denoting by T(n) the number of Proposition 2. The greedy algorithm described above
comparisons, we obtain that Tn 2Tn=2 1. Solving returns a minimum weight spanning tree TG.
the recurrence equation, we have Tn Qlog n.
Analysis of Algorithms and Complexity Issues
Matrix Multiplication. Suppose that, given two n  n
As mentioned above, worst case analysis is probably
matrices A and B, we need to calculate their product
the most widely used criteria for evaluating algorithms.
C AB. Let ai j , bi j , and ci j be the elements of matrices
The basic algorithms discussed (binary search, sorting,
A, B, and C, respectively.
P Then, by definition, for all i and j,
selection, matrix multiplication) require only a polynomial
we have ci j nk1 aik bk j . Using this formula, every
6 DATA STRUCTURES AND ALGORITHMS

number of elementary operations in the size of the input intractable. A possible technique in this case is to solve
data. In the area of analysis of algorithms and complexity the problem in an approximate way by not requiring an
theory, the set of all problems that can be solved in poly- exact solution, but a solution with an approximation
nomial time (i.e., by a polynomialtime algorithm) is usually guarantee.
denoted by P. Another important class of problems is NP, An approximation algorithm is defined as follows. Let II
defined as the collection of all problems for which the cor- be a minimization problem, f be the objective function that
rectness of a solution, described using a polynomial-sized is minimized by II, and OPT(x) be the optimum solution
encoding, can be verified in polynomial time. Obviously, P is a cost for instance x of II (i.e., OPT(x) is the minimum value
subset of NP (i.e., P  NP). On the other hand, deciding (over all feasible solutions s of II) of f(s)). Given a mini-
whether P 6 NP is probably the most famous open problem mization problem II and an algorithm A for II, we say that
in theoretical computer science. A is an approximation algorithm with approximation
We say that problem II is polynomial-time reducible to guarantee (or performance guarantee, or performance
problem II1 if given an instance I(II) of problem II, we can, ratio) d > 1 if, for every instance x of II, the resulting
in polynomial time, obtain an instance I(II1) of problem II1 solution s returned by A on instance x has value
such that by solving I(II1) one can compute in polynomial f s  dOPTx. A similar definition applies when II is a
time an optimal solution to I(II). In other words, under this maximization problem, but in this case 0 < d < 1 and we
type of reduction, the existence of a polynomial algorithm want f s  dOPTx.
for solving II1 will imply the existence of a polynomial Approximation algorithms have been studied since the
algorithm for II. A problem II is called NP-complete if II 1970s (9,10). In the last few years, however, the area has
2 NP, and any problem in NP can be reduced in polynomial received more attention due to great advances in the under-
time to II, therefore, the class of NP-complete problems standing of approximation complexity. Other recent
consists of the hardest problems in NP. Notice that if any advances include the use of mathematical programming
NP-complete problem can be solved in polynomial time, techniques (linear programming, semidefinite program-
then all problems in NP can be solved in polynomial time ming) to study the quality of relaxations for some problems
(i.e., P NP). and determining approximation guarantees.
In 1971, Steve Cook provided the foundation of A simple example of approximation algorithm was pro-
NP-completeness theory, proving that the SATISFIABILITY posed by Christofides (10) for the traveling salesman pro-
problem is NP-complete (7) (a formal definition of this blem (see Graphs section). The TSP is known to be strongly
problem is omitted here). Since that time, the number of NP-hard, and therefore no polynomial time exact algorithm
NP-complete problems has been significantly increased. is known for solving it. It is also known that the problem
Another classic NP-complete problem is the so-called cannot be approximated in general. However, if the dis-
SUBSET SUM problem: Given a set of positive integers S tances considered are Euclidean, therefore obeying the
fs1 ; s2 ; . . . ; sn g and a positive
Pinteger K, does there exist a triangular inequality, we can use Christofides algorithm to
vector x 2 f0; 1gn , such that ni1 si xi K? Other examples find an approximate solution in the following way:
of NP-complete problems include the TSP (see section
Graphs), SET COVER, VERTEX COVER, PARTITION, and so on. 1. Algorithm Christofides
Although it is not known whether P 6 NP, it is generally 2. Input: Graph G V; E
assumed that all NP-complete problems are hard to solve. 3. Find a minimum spanning tree T connecting V(G)
In other words, proving that some problem belongs to the
4. Double each edge in T, resulting in T0
class of NP-complete problems implies that it cannot be
solved in polynomial time. The standard procedure of prov- 5. Find a circuit C in T0 starting from any node
ing that a problem II1 is NP-complete consists of two steps: 6. Shortcut C whenever a node is repeated (i.e., sub-
(1) proving that II1 2 NP and (2) reducing in polynomial time stitute (a, b, c)  C for (a, c), whenever b was visited
some known NP-complete problem II to the problem II1. previously)
Finally, let us also consider the definition of NP- 7. return C
hardness. We say that a problem II belongs to the class
of NP-hard problems if there exists an NP-complete pro- Theorem 2. Christofides algorithm has an approxima-
blem that can be reduced in polynomial time to II. There- tion guarantee of 2.
fore, the problem II is at least as hard to solve as any other Proof. Just notice that the cost of a minimum spanning
NP-complete problem, but it is not known whether this tree is a lower bound of the cost of the optimum solution,
problem belongs to NP. because, given a solution to TSP, we can find a minimum
For more detailed information on the theory of NP- spanning tree by removing one of its edges. Thus, doubling
completeness and rigorous definitions (including the for- the edges of T will only multiply the bound by two. Then,
mal Turing machine model), we refer to the famous book by the shortcuting operation in line 6 is guaranteed not to
Garey and Johnson (8) or to the more recent book by increase the cost of the solution, because of the triangular
Papadimitriou (6). inequality satisfied by G. &
The algorithm above shows that simple strategies
may lead to good guarantees of approximation. However,
Approximation Algorithms
it is known that many problems have no constant app-
The notion of NP-hardness (8) leads researchers to con- roximation guarantee, such as the SET COVER problem,
sider alternative strategies to solve problems that are unless P NP (a large list of impossibility results for
DATA STRUCTURES AND ALGORITHMS 7

approximation is given in Ref. (11)). More elaborate algo- been explored in multiple ways. Theoretical models for
rithms are based on linear programming (LP) duality and parallel algorithms have been developed, including the
semidefinite programming. These two mathematical pro- shared memory and message passing (MP) parallel systems.
gramming techniques are frequently useful to provide The PRAM (Parallel Random Access Machine) is a sim-
lower bounds for the solutions obtained by combinatorial ple model in which multiple processors access a shared
algorithms. memory pool. Each read or write operation is executed
asynchronously by the processors. Different processors
Randomized Algorithms collaborate to solve a problem by writing information
that will be subsequently read by others. The PRAM is a
Randomized algorithms correspond to a different way of
popular model that captures the basic features of parallel
looking at the task of solving a problem using computers.
systems, and there is a large number of algorithms devel-
The usual way of thinking about algorithms is to design a
oped for this theoretical model. However, the PRAM is not
set of steps that will correctly solve the problem whenever
a realistic model: Real systems have difficulty in guaran-
the input is given correctly, within a pre-established time,
teeing concurrent access to memory shared by several
which, however, may not be the simplest or even the more
processors.
effective way of solving a problem. We might consider
Variations of the main model have been proposed to
algorithms that give the right solution for the problem
overcome the limitations of PRAM. Such models have
with some known probability. We can also consider algo-
additional features, including different memory access
rithms that always provide the right solution, but with a
policies. For example, the EREW (exclusive read, exclusive
running time that as known just through its probabilistic
write) allows only one processor to access the memory for
distribution. Such algorithms are called randomized
read and write operations. The CREW model (concurrent
algorithms.
read, exclusive write) allows that multiple processors read
Randomized algorithms are usually described as
the memory simultaneously, whereas only one processor
algorithms that use coin tossing (i.e., a randomizer) or
can write to memory at each time.
a random number generator. There are two major types of
MP is another basic model that is extensively used in
randomized algorithms: Las Vegas and Monte Carlo.
parallel algorithms. In MP, all information shared by pro-
A Las Vegas algorithm is defined as a randomized
cessors is sent via messages; memory is local and accessed
algorithm, which always provides the correct answer but
by a single processor. Thus, messages are the only mechan-
whose running time is a random variable. A Monte Carlo
ism of cooperation in MP. A major result in parallel pro-
algorithm is a randomized algorithm that always has a
gramming is that the two mechanisms discussed (shared
predetermined running time (which, of course, may depend
memory and MP) are equivalent in computational power.
on the input size) but whose output is correct with high
The success of a parallel algorithm is measured by the
probability. If n is the input size of the algorithm, then by
amount of work that it can evenly share among processors.
the high probability we imply a probability, which is equal
Therefore, we need to quantify the speedup of a parallel
to or greater than 1  na for some fixed a  1.
algorithm, given the size of the problem, the time TS(n)
Next we describe a simple example of a Monte-Carlo
necessary to solve the problem in a sequential computer,
algorithm. Suppose we are given an array A a1 ; . . . ; an of
and the time TP(n, p) needed by the parallel algorithm with
n numbers, where all elements are distinct and n is even.
p processors. The speedup fn; p can be computed as
The task is to find an element of A greater than the median
fn; p TS n=TP n; p, and the asymptotic speedup
M of the given array.
f1 p is the value of fn; p when n approaches infinity
In the first step of the algorithm, we randomly choose
(i.e., f1 p limn ! 1 fn; p). The desired situation is
a log n elements of the input array A. Let us denote this
that all processors can contribute to evenly reduce the
subset by A . Thus, jAj a log n and A  A. Then, we find
computational time. In this case, fn; p O p, and we
the largest number from the selected subset. Obviously, we
say that the algorithm has linear speedup.
can do it in Qlog n time. We argue that this element is the
We show a simple example of parallel algorithm. In
correct answer with high probability. The algorithm fails if
the prefix computation problem, a list L fl1 ; . . . ; ln g of
all elements of the randomly selected subset are less than
numbers is given, P and the objective is to compute the
or equal to the median M. As elements of A are randomly j
sequence of values i1 li for j 2 f1; . . . ; ng. The following
selected, it is easy to observe that any element of A is less
algorithm uses n processors to compute the parallel prefix
than or equal to the median M with probability 1/2. There-
of n numbers in Olog n time.
fore, the probability of failure is P f 1=2a log n na . In
summary, we can conclude that if the size of the subset A 1. Algorithm Parallel-prefix
satisfies jAj  a log n, then the largest element of A is a
correct result with probability at least 1  na . Applying 2. Input: L fl1 ; . . . ; ln g
the randomized algorithm, we solve the problem in Qlog n 3. for k 0 to b log n c  1 do
time with high probability. 4. Execute the following instructions in parallel:
5. for j 2k 1 to n do
Parallel Algorithms 6. l j l j2k l j
Parallel algorithms provide methods to harness the power 7. end
of multiple processors working together to solve a problem. 8. end
The idea of using parallel computing is natural and has
8 DATA STRUCTURES AND ALGORITHMS

As a sequential algorithm for this problem has complex- relinking, reactive search, ant colony optimization, and
ity Qn, the speedup of using the parallel algorithm is variable neighborhood search.
fn; n Qn=log n.
BIBLIOGRAPHIC NOTES
Heuristics and Metaheuristics
One of the most popular techniques for solving computa- Algorithms and data structures have a vast literature, and
tionally hard problems is to apply the so-called heuristic we provide only some of the most important references.
approaches. A heuristic is an ad hoc algorithm that applies Popular books in algorithms and data structures include the
a set of rules to create or improve solutions to an NP-hard ones by Cormen et al. (12), Horowitz et al. (13), Sedgewick
problem. Heuristics give a practical way of finding solutions (14), and Knuth (15). Networks and graph algorithms are
that can be satisfactory for most purposes. The main dis- covered in depth in Ahuja et al. (16). Books on data struc-
tinctive features of these type of algorithms are fast exe- tures include the classics by Aho et al. (17) and Tarjan (18).
cution time and the goal of finding good-quality solutions NP-hard problems have been discussed in several books,
without necessarily providing any guarantee of quality. but the best-known reference is the compendium by Garey
Heuristics are particularly useful for solving in practice and Johnson (8). A standard reference on randomized
hard large-scale problems for which more exact solution algorithms is Ref. (19). For more information on parallel
methods are not available. algorithms, and especially PRAM algorithms, see the book
As an example of a simple heuristic, we can consider a by Jaja (20). Good reviews of approximation algorithms are
local search algorithm. Suppose we need to solve a combi- presented in the book edited by Hochbaum (21), and by
natorial optimization problem, where we minimize an Vazirani (22). For a more detailed discussion of different
objective function f(x), and the decision variable x is a vector metaheuristics and related topics, the reader is referred to
of n binary variables (i.e., xi 2 f0; 1g for i 2 f1; . . . ; ng). For Ref. (23).
each problem, we define a neighborhood N(x) of a feasible Information about the complexity of numerical optimi-
solution x as the set of feasible solutions x0 that can be zation problems is available in the paper by Pardalos and
created by a well-defined modification of x. For example, Vavasis (24) and the books listed in Refs. (25) and (26).
let x 2 f0; 1gn be a feasible solution, then N(x) can be defined
as the set of solutions xk such that
BIBLIOGRAPHY

1  xi if i k
xki 1. E. D. Demaine, Cache-oblivious algorithms and data struc-
xi otherwise tures, in Lecture Notes from the EEF Summer School on
Massive Data Sets, Lecture Notes in Computer Science.
for k 2 f1; . . . ; ng. A point x 2 f0; 1gn is called a local opti- New York: Springer-Verlag, 2002.
mum if it does not have a neighbor whose objective value is 2. M. Frigo, C. E. Leiserson, H. Prokop, and S. Ramachandran,
strictly better than f(x). In our example, which we suppose Cache-oblivious algorithms, in Proc. of 40th Annual Sympo-
is a minimization problem, it means that if x is a local sium on Foundations of Computer Science, New York, 1999.
optimum, then f x  f xk for all k 2 f1; . . . ; ng. In this 3. L. Arge, The buffer tree: A new technique for optimal I/O
case, if we can generate a feasible solution x, then we can algorithms, in Proceedings of Fourth Workshop on Algorithms
check if x is locally optimal in time On (notice that other and Data Structures (WADS), volume 955 of Lecture Notes in
neighborhoods may lead to different search times). Let Computer Science. New York: Springer-Verlag, 1995, pp. 334
x 2 Nx, with f x < f x. Assigning x x, we can repeat 345.
the afore-mentioned procedure that searches for a locally 4. L. Arge, D. Vengroff, and J. Vitter, External-memory algo-
optimal solution while the optimality criterion is reached. rithms for processing line segments in geographic information
For many problems, local search-based approaches similar systems, in Proceedings of the Third European Symposium on
Algorithms, volume 979 of Lecture Notes in Computer Science.
to the one described above proved to be very successful.
New York: Springer-Verlag, 1995, pp. 295310.
A metaheuristic is a family of heuristics that can be
5. J. Abello, P. Pardalos, and M. Resende (eds.), Handbook of
applied to find good solutions for difficult problems. The
Massive Data Sets. Dordrecht, the Netherlands: Kluwer Aca-
main difference between metaheuristics and heuristics is demic Publishers, 2002.
that, while a heuristic is an ad hoc procedure, a metaheur-
6. C. H. Papadimitriou, Computational Complexity. Reading,
istic must follow a well-defined sequence of steps and use MA: Addison-Wesley, 1994.
some specified data structures. However, the exact imple-
7. S. Cook, The complexity of theorem-proving procedures,
mentation of some of the steps in a metaheuristic may be in Proc. 3rd Ann. ACM Symp. on Theory of Computing.
customized, according to the target problem. Therefore, a New York: Association for Computing Machinery, 1971, pp.
concrete implementation of a metaheuristic provides a 151158.
heuristic for a specific problem (hence, the use of the prefix 8. M. R. Garey and D. S. Johnson, Computers and Intractability -
meta). Elements of heuristics such as local search or A Guide to the Theory of NP-Completeness. New York: W. H.
greedy methods are usually combined in metaheuristics Freeman and Company, 1979.
in order to find solutions of better quality. 9. D. Johnson, Approximation algorithms for combinatorial pro-
Examples of metaheuristic methods include simulated blems, J. Comp. Sys. Sci., 9(3): 256278, 1974.
annealing, genetic algorithms, tabu search, GRASP, path 10. N. Christofides, Worst-case analysis of a new heuristic for the
travelling salesman problem, in J. F. Traub (ed.), Symposium
DATA STRUCTURES AND ALGORITHMS 9

on New Directions and Recent Results in Algorithms and 21. D. Hochbaum (ed.), Approximation Algorithms for NP-hard
Complexity. New York: Academic Press, 1976, p. 441. Problems. Boston, MA: PWS Publishing, 1996.
11. S. Arora and C. Lund, Hardness of approximations, in D. 22. V. Vazirani, Approximation Algorithms. New York: Springer-
Hochbaum (ed.), Approximation Algorithms for NP-hard Pro- Verlag, 2001.
blems. Boston, MA: PWS Publishing, 1996. 23. M. Resende and J. de Sousa (eds.), Metaheuristics: Computer
12. T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Decision-Making. Dordrecht, the Netherlands: Kluwer Aca-
Introduction to Algorithms, 2nd ed., Cambridge, MA: MIT demic Publishers, 2004.
Press, 2001. 24. P. M. Pardalos and S. Vavasis, Complexity issues in numerical
13. E. Horowitz, S. Sahni, and S. Rajasekaran, Computer Algo- optimization, Math. Program. B, 57(2): 1992.
rithms. New York: Computer Science Press, 1998. 25. P. Pardalos (ed.), Complexity in Numerical Optimization.
14. R. Sedgewick, Algorithms. Reading, MA: Addison-Wesley, Singapore: World Scientific, 1993.
1983. 26. P. Pardalos (ed.), Approximation and Complexity in Numerical
15. D. Knuth, The Art of Computer Programming Fundamental Optimization: Continuous and Discrete Problems. Dordrecht,
Algorithms. Reading, MA: Addison-Wesley, 1997. the Netherlands: Kluwer Academic Publishers, 2000.
16. R. Ahuja, T. Magnanti, and J. Orlin, Network Flows. Engle-
wood Cliffs, NJ: Prentice-Hall, 1993.
17. A. V. Aho, J. E. Hopcroft, and J. D. Ullman, Data Structures
CARLOS A.S. OLIVEIRA
Oklahoma State University
and Algorithms. Computer Science and Information Proces-
Stillwater, Oklahoma
sing. Reading, MA: Addison-Wesley, 1982.
18. R. E. Tarjan, Data Structures and Network Algorithms. Regio- PANOS M. PARDALOS
nal Conference Series in Applied Mathematics. Philadelphia, OLEG A. PROKOPYEV
PA: Society for Industrial and Applied Mathematics, 1983. University of Florida
19. R. Motwani and P. Raghavan, Randomized Algorithms. Gainesville, Florida
Cambridge: Cambridge University Press, 1995.
20. J. JaJa, An Introduction to Parallel Algorithms. Reading, MA:
Addison-Wesley, 1992.
D
DATA WAREHOUSE Among the areas where data warehousing technologies
are employed successfully, we mention but a few: trade,
INTRODUCTION manufacturing, financial services, telecommunications,
and health care. On the other hand, the applications of
For a few decades, the role played by database technology in data warehousing are not restricted to enterprises: They
companies and enterprises has only been that of storing also range from epidemiology to demography, from natural
operational data, that is data generated by daily, routine sciences to didactics. The common trait for all these fields is
operations carried out within business processes (such as the need for tools that enable the user to obtain summary
selling, purchasing, and billing). On the other hand, information easily and quickly out of a vast amount of data,
managers need to access quickly and reliably the strategic to use it for studying a phenomenon and discovering sig-
information that supports decision making. Such informa- nificant trends and correlationsin short, for acquiring
tion is extracted mainly from the vast amount of operational useful knowledge for decision support.
data stored in corporate databases, through a complex
selection and summarization process.
Very quickly, the exponential growth in data volumes BASIC DEFINITIONS
made computers the only suitable support for the decisional
process run by managers. Thus, starting from the late A data warehousing system can be defined as a collection of
1980s, the role of databases began to change, which led methods, techniques, and tools that support the so-called
to the rise of decision support systems that were meant as knowledge worker (one who works primarily with informa-
the suite of tools and techniques capable of extracting tion or develops and uses knowledge in the workplace: for
relevant information from a set of electronically recorded instance, a corporate manager or a data analyst) in decision
data. Among decision support systems, data warehousing making by transforming data into information. The main
systems are probably those that captured the most features of data warehousing can be summarized as fol-
attention from both the industrial and the academic world. lows:
A typical decision-making scenario is that of a large
enterprise, with several branches, whose managers wish
 Easy access to nonskilled computer users.
to quantify and evaluate the contribution given from each of  Data integration based on a model of the enterprise.
them to the global commercial return of the enterprise.  Flexible querying capabilities to take advantage of the
Because elemental commercial data are stored in the enter- information assets.
prise database, the traditional approach taken by the  Synthesis, to enable targeted and effective analysis.
manager consists in asking the database administrators  Multidimensional representation to give the user an
to write an ad hoc query that can aggregate properly the
intuitive and handy view of information.
available data to produce the result. Unfortunately, writing
such a query is commonly very difficult, because different,
 Correctness, completeness, and freshness of informa-
heterogeneous data sources will be involved. In addition, tion.
the query will probably take a very long time to be executed,
because it will involve a huge volume of data, and it will run At the core of this process, the data warehouse is a
together with the application queries that are part of the repository that responds to the above requirements.
operational workload of the enterprise. Eventually, the According to the classic definition by Bill Inmon (see
manager will get on his desk a report in the form of a either Further Reading), a data warehouse is a collection of
summary table, a diagram, or a spreadsheet, on which he data that exhibits the following characteristics:
will base his decision.
This approach leads to a useless waste of time and 1. Subject-oriented, which means that all the data items
resources, and often it produces poor results. By the way, related to the same business object are connected.
mixing these ad hoc, analytical queries with the operational 2. Time-variant, which means that the history of busi-
ones required by the daily routine causes the system to slow ness is tracked and recorded to enable temporal
down, which makes all users unhappy. Thus, the core idea reports.
of data warehousing is to separate analytical queries, 3. Nonvolatile, which means that data are read-only
which are commonly called OLAP (On-Line Analytical and never updated or deleted.
Processing) queries, from the operational ones, called 4. Integrated, which means that data from different
OLTP (On-Line Transactional Processing) queries, by enterprise applications are collected and made con-
building a new information repository that integrates the sistent.
elemental data coming from different sources, organizes
them into an appropriate structure, and makes them avail-
Although operational data commonly span a limited
able for analyses and evaluations aimed at planning and
time interval, because most business transactions only
decision making.
involve recent data, the data warehouse must support
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DATA WAREHOUSE

analyses that cover some years. Thus, the data warehouse reporting tools, OLAP tools, data-mining tools, and what-
is refreshed periodically starting from operational data. if analysis tools.
According to a common metaphor, we can imagine that Some architectures include an additional level called the
photographs of operational data are periodically taken; the reconciled level or operational data-store. It materializes
sequence of photos is then stored in the data warehouse, the operational data obtained by extracting and cleaning
where a sort of movie is generated that depicts the history of source data: Thus, it contains integrated, consistent, cor-
business up to the current time. rect, detailed, and current data. These reconciled data are
Because in principle data are never deleted, and then used to feed the data warehouse directly. Although the
refreshes are made when the system is offline, a data reconciled level introduces a significant redundancy, it also
warehouse can be considered basically as a read-only data- bears some notable benefits. In fact, it defines a reference
base. This feature, together with the importance given to data model for the whole company, and at the same time, it
achieving good querying performances, has two main con- introduces a clear separation between the issues related to
sequences. First, the database management systems data extraction, cleaning and integration and those related
(DBMSs) used to manage the data warehouse do not to data warehouse loading. Remarkably, in some cases, the
need sophisticated techniques for supporting transactions. reconciled level is also used to better accomplish some
Second, the design techniques used for data warehouses are operational tasks (such as producing daily reports that
completely different from those adopted for operational cannot be prepared satisfactorily using the corporate appli-
databases. cations).
As mentioned, another relevant difference between In the practice, these ingredients are blended differently
operational databases and data warehouses is related to to give origin to the five basic architectures commonly
the types of queries supported. OLTP queries on opera- recognized in the literature:
tional databases typically read and write a relatively small
number of records from some tables related by simple  Independent data marts architecture
relationships (e.g., search for customers data to insert  Bus architecture
new orders). Conversely, OLAP queries on data ware-  Hub-and-spoke architecture
houses commonly read a huge number of records to com-
 Centralized data warehouse architecture
pute a few pices of summary information. Most
importantly, although the OLTP workload is frozen  Federated architecture
within applications and only occasionally ad hoc queries
are formulated, the OLAP workload is intrinsically inter- In the independent data mart architecture, different
active and dynamic. data marts are designed separately and built in a noninte-
grated fashion (Fig. 1). This architecture, although some-
times initially adopted in the absence of a strong
ARCHITECTURES sponsorship toward an enterprise-wide warehousing
project or when the organizational divisions that make
To preserve the separation between transactional and up the company are coupled loosely, tends to be soon
analytical processing, most data warehousing architec- replaced by other architectures that better achieve data
tures are based on at least two data levels: the data sources integration and cross-reporting.
and the data warehouse. The bus architecture is apparently similar to the previous
Data sources are heterogeneous; they may be part of one, with one important difference: A basic set of conformed
the corporate information system (operational databases, dimension and facts, derived by a careful analysis of the
legacy systems, spreadsheets, flat files, etc.). or even main enterprise processes, is adopted and shared as a
reside outside the company (Web databases, streams, common design guideline to ensure logical integration of
etc.). These data are extracted, cleaned, completed, vali- data marts and an enterprise-wide view of information.
dated, integrated into a single schema, and loaded into the In the hub-and-spoke architecture, much attention is
data warehouse by the so-called ETL (Extraction, Trans- given to scalability and extensibility and to achieving an
formation, and Loading) tools. enterprise-wide view of information. Atomic, normalized
The data warehouse is the centralized repository for the data are stored in a reconciled level that feeds a set of data
integrated information. Here, different from the sources, marts containing summarized data in multidimensional
data are stored in multidimensional form, and their struc- form (Fig. 2). Users mainly access the data marts, but they
ture is optimized to guarantee good performance for OLAP occasionally may query the reconciled level.
queries. In practice, most often, the data warehouse is The centralized architecture can be viewed as a particular
replaced physically by a set of data marts that include implementation of the hub-and-spoke architecture where
the portion of information that is relevant to a specific the reconciled level and the data marts are collapsed into a
area of business, division of the enterprise, and category single physical repository.
of users. Note the presence of a metadata repository that Finally, the federated architecture is sometimes adopted
contains the data about data, for example, a description of in contexts where preexisting data warehouses/data marts
the logical organization of data within the sources, the data are to be integrated noninvasively to provide a single, cross-
warehouse, and the data marts. organization decision support environment (e.g., in the case
Finally, the information in the data warehouse is of mergers and acquisitions). Each data warehouse/data
accessed by users by means of different types of tools: mart is either virtually or physically integrated with the
DATA WAREHOUSE 3

Figure 1. Independent data marts and bus


architectures (without and with conformed
dimensions and facts).

others by leaning on a variety of advanced techniques such arranging them within an n-dimensional space whose axes,
as distributed querying, ontologies, and metadata inter- called dimensions of analysis, define different perspectives
operability. for their identification. Dimensions commonly are discrete,
alphanumeric attributes that determine the minimum
granularity for analyzing facts. For instance, the sales in
ACCESSING THE DATA WAREHOUSE
a chain of stores can be represented within a three-dimen-
sional space whose dimensions are the products, the stores,
This section discusses how users can exploit information
and the dates.
stored in the data warehouse for decision making. In the
The concepts of dimension gave birth to the well-known
following subsection, after introducing the particular
cube metaphor for representing multidimensional data.
features of the multidimensional model, we will survey
According to this metaphor, events correspond to cells of
the two main approaches for analyzing information:
a cube whose edges represents the dimensions of analysis.
reporting and OLAP.
A cell of the cube is determined uniquely by assigning a
value to every dimension, and it contains a value for each
The Multidimensional Model
measure. Figure 3 shows an intuitive graphical represen-
The reasons why the multidimensional model is adopted tation of a cube centered on the sale fact. The dimensions
universally as the paradigm for representing data in data are product, store, and date. An event corresponds to the
warehouses are its simplicity, its suitability for business selling of a given product in a given store on a given day, and
analyses, and its intuitiveness for nonskilled computer it is described by two measures: the quantity sold and the
users, which are also caused by the widespread use of revenue. The figure emphasizes that the cube is sparse, i.e.,
spreadsheets as tools for individual productivity. Unfortu- that several events did not happen at all: Obviously, not all
nately, although some attempts have been made in the products are sold every day in every store.
literature to formalize the multidimensional model (e.g., Normally, each dimension is structured into a hierarchy
Ref. 1), none of them has emerged as a standard so far. of dimension levels (sometimes called roll-up hierarchy)
The multidimensional model originates from the obser- that group its values in different ways. For instance, pro-
vation that the decisional process is ruled by the facts of the ducts may be grouped according to their type and their
business world, such as sales, shipments, bank transac- brand, and types may be grouped additionally into cate-
tions, and purchases. The occurrences of a fact correspond gories. Stores are grouped into cities, which in turn are
to events that occur dynamically: For example, every sale or grouped into regions and nations. Dates are grouped into
shipment made is an event. For each fact, it is important to months and years. On top of each hierarchy, a final level
know the values of a set of measures that quantitatively exists that groups together all possible values of a hierarchy
describe the events: the revenue of a sale, the quantity (all products, all stores, and all dates). Each dimension level
shipped, the amount of a bank transaction, and the dis- may be described even more by one or more descriptive
count on a purchase. attributes (e.g., a product may be described by its name, its
The events that happen in the enterprise world are color, and its weight).
obviously too many to be analyzed one by one. Thus, to A brief mention to some alternative terminology used
make them easily selectable and groupable, we imagine either in the literature or in the commercial tools is useful.
4 DATA WAREHOUSE

by month. In the cube metaphor, this process means group-


ing, for each product and each store, all cells corresponding
to the days of the same month into one macro-cell. In the
aggregated cube obtained, each macro-cell represents a
synthesis of the data stored in the cells it aggregates: in
our example, the total number of items sold in each month
and the total monthly revenue, which are calculated by
summing the values of Quantity and Revenue through the
corresponding cells. Eventually, by aggregating along the
time hierarchy, an aggregated cube is obtained in which
each macro-cell represents the total sales over the whole
time period for each product and store. Aggregation can
also be operated along two or more hierarchies. For
instance, as shown in Fig. 5, sales can be aggregated by
month, product type, and city.
Noticeably, not every measure can be aggregated con-
sistently along all dimensions using the sum operator. In
some cases, other operators (such as average or minimum)
can be used instead, whereas in other cases, aggregation is
not possible at all. For details on the two related problems of
additivity and summarizability, the reader is referred to
Ref. 2.

Reporting
Reporting is oriented to users who need to access periodi-
Figure 2. Hub-and-spoke architecture; ODS stands for opera- cally information structured in a fixed way. For instance, a
tional data store. hospital must send monthly reports of the costs of patient
stays to a regional office. These reports always have the
same form, so the designer can write the query that gen-
Although with the term dimension we refer to the attribute
erates the report and freeze it within an application so
that determines the minimum fact granularity, sometimes
that it can be executed at the users needs.
the whole hierarchies are named as dimensions. Measures
A report is associated with a query and a presentation.
are sometimes called variables, metrics, categories, proper-
The query typically entails selecting and aggregating
ties, or indicators. Finally, dimension levels are sometimes
multidimensional data stored in one or more facts. The
called parameters or attributes.
presentation can be in tabular or graphical form (a dia-
We now observe that the cube cells and the data they
gram, a histogram, a cake, etc.). Most reporting tools also
contain, although summarizing the elemental data stored
allow for automatically distributing periodic reports to
within operational sources, are still very difficult to analyze
interested users by e-mail on a subscription basis or for
because of their huge number: Two basic techniques are
posting reports in the corporate intranet server for down-
used, possibly together, to reduce the quantity of data and
loading.
thus obtain useful information: restriction and aggrega-
tion. For both, hierarchies play a fundamental role because
OLAP
they determine how events may be aggregated and
selected. OLAP, which is probably the best known technique for
Restricting data means cutting out a portion of the cube querying data warehouses, enables users to explore inter-
to limit the scope of analysis. The simplest form of restric- actively and analyze information based on the multidimen-
tion is slicing, where the cube dimensionality is reduced by sional model. Although the users of reporting tools
focusing on one single value for one or more dimensions. For essentially play a passive role, OLAP users can define
instance, as depicted in Fig. 4, by deciding that only sales of actively a complex analysis session where each step taken
store S-Mart are of interest, the decision maker actually follows from the results obtained at previous steps. The
cuts a slice of the cube obtaining a two-dimensional sub- impromptu character of OLAP sessions, the deep knowl-
cube. Dicing is a generalization of slicing in which a sub- edge of data required, the complexity of the possible
cube is determined by posing Boolean conditions on queries, and the orientation toward users not skilled in
hierarchy levels. For instance, the user may be interested computer science maximize the importance of the employed
in sales of products of type Hi-Fi for the stores in Rome tool, whose interface necessarily has to exhibit excellent
during the days of January 2007 (see Fig. 4). features of flexibility and friendliness.
Although restriction is used widely, aggregation plays An OLAP session consists in a navigation path that
the most relevant role in analyzing multidimensional data. reflects the course of analysis of one or more facts from
In fact, most often users are not interested in analyzing different points of view and at different detail levels. Such a
events at the maximum level of detail. For instance, it may path is realized into a sequence of queries, with each
be interesting to analyze sale events not on a daily basis but differentially expressed with reference to the previous
DATA WAREHOUSE 5

reduced set of OLAP navigation paths are enabled to avoid


obtaining inconsistent or wrong results by incorrectly using
aggregation, while allowing for some flexibility in manip-
ulating data.

IMPLEMENTATIONS OF THE MULTIDIMENSIONAL MODEL

Two main approaches exist for implementing a data ware-


house: ROLAP, which stands for relational OLAP, and
MOLAP, which stands for multidimensional OLAP.
Recently a third, intermediate approach has been adopted
in some commercial tools: HOLAP, that is, hybrid OLAP.

Figure 3. The three-dimensional cube that models the sales in Relational OLAP
a chain of shops. In the S-Mart store, on 5/1/2007, three LE32M On a ROLAP platform, the relational technology is
TVs were sold, for a total revenue of $2500.
employed to store data in multidimensional form. This
approach is motivated by the huge research work made
query. Query results are multidimensional; like for
on the relational model, by the widespread knowledge of
reporting, OLAP tools typically represent data in either
relational databases and their administration, and by the
tabular or graphical form.
excellent level of performance and flexibility achieved by
Each step in the analysis session is marked by the
relational DBMSs. Of course, because the expressiveness of
application of an OLAP operator that transforms the pre-
the relational model does not include the basic concepts of
vious query into a new one. The most common OLAP
the multidimensional model, it is necessary to adopt spe-
operators are as follows:
cific schema structures that allow the multidimensional
model to be mapped onto the relational model. Two main
 Roll-up, which aggregates data even more (e.g., from
such structures are commonly adopted: the star schema
sales by product, nation, and month to sales by cate-
and the snowflake schema.
gory, nation, and year).
The star schema is a relational schema composed of a set of
 Drill-down, which adds detail to data (e.g., from sales
relations called dimension tables and one relation called a
by category, nation, and year to sales by category, city,
fact table. Each dimension table models a hierarchy; it
and year).
includes a surrogate key (i.e., a unique progressive number
 Slice-and-dice, which selects data by fixing values or generated by the DBMS) and one column for each level and
intervals for one or more dimensions (e.g., sales of descriptive attribute of the hierarchy. The fact table includes
products of type Hi-Fi for stores in Italy). a set of foreign keys, one that references each dimension
 Pivoting, which changes the way of visualizing the table, which together define the primary key, plus one col-
results by rotating the cube (e.g., swaps rows with umn for each measure. Figure 6 shows a star schema for the
columns). sales example. Noticeably, dimension tables are denorma-
 Drill-across, which joins two or more correlated cubes lized (they are not in the third normal form); this is aimed at
to compare their data (e.g., join the sales and the reducing the number of relational joins to be computed when
promotions cubes to compare revenues with dis- executing OLAP queries, so as to improve performance.
counts). A snowflake schema is a star schema in which one or
more dimension tables have been partially or totally nor-
We close this section by observing that, in several appli- malized to reduce redundancy. Thus, a dimension table can
cations, much use is made of an intermediate approach be split into one primary dimension table (whose surrogate
commonly called semistatic reporting, in which only a key is references by the fact table) and one or more

Figure 4. Slicing (left) and dicing (right) on the sales cube.


6 DATA WAREHOUSE

Hybrid OLAP
HOLAP can be viewed as an intermediate approach
between ROLAP and MOLAP, because it tries to put
together their advantages into a single platform. Two basic
strategies are pursued in commercial tools to achieve this
goal. In the first strategy, detailed data are stored in a
relational database, where as a set of useful preaggregates
are stored on proprietary multidimensional structures. In
the second strategy, cubes are partitioned into dense and
sparse subcubes, with the former being stored in multi-
dimensional form, and the latter in relational form.

DESIGN TECHNIQUES

Despite the basic role played by a well-structured metho-


dological framework in ensuring that the data warehouse
Figure 5. Aggregation on the sales cube. designed fully meets the user expectations, a very few
comprehensive design methods have been devised so far
(e.g., Refs. 3 and 4). None of them has emerged as a standard,
but all agree on one point: A bottom-up approach is prefer-
secondary dimension tables (each including a surrogate key able to a top-down approach, because it significantly reduces
and referencing the key of another dimension table). Figure the risk of project failure. Although in a top-down approach
7 shows an example for the sale schema, in which the the data warehouse is planned and designed initially in its
product dimension has been normalized partially. entirety, in a bottom-up approach, it is built incrementally
by designing and prototyping one data mart at a time,
Multidimensional OLAP starting from the one that plays the most strategic business
role. In general terms, the macro-phases for designing a
Differently from ROLAP, a MOLAP system is based on a
data warehouse can be stated as follows:
native logical model that directly supports multidimen-
sional data and operations. Data are stored physically  Planning, based on a feasibility study that assesses the
into multidimensional arrays, and positional techniques
project goals, estimates the system borders and size,
are used to access them.
evaluates costs and benefits, and analyzes risks and
The great advantage of MOLAP platforms is that OLAP
users expectations.
queries can be executed with optimal performances, with-
out resorting to complex and costly join operations. On the
 Infrastructure design, aimed at comparing the differ-
other hand, they fall short when dealing with large volumes ent architectural solutions, at surveying the available
of data, mainly because of the problem of sparseness: In technologies and tools, and at preparing a draft design
fact, when a large percentage of the cube cells are empty, a of the whole system.
lot of memory space is wasted uselessly unless ad hoc  Data mart development, which iteratively designs,
compression techniques are adopted. develops, tests and deploys each data mart and the
related applications.

As concerns the design of each data mart, the methodol-


ogy proposed in Ref. 3 encompasses eight closely related,
but not necessarily strictly sequential, phases:

1. Data source analysis. The source schemata are


analyzed and integrated to produce a reconciled
schema describing the available operational data.
2. Requirement analysis. Business users are inter-
viewed to understand and collect their goals and
needs, so as to generate requirement glossaries and
a preliminary specification of the core workload.
3. Conceptual design. Starting from the user require-
ments and from the reconciled schema, a conceptual
schema that describes the data mart in an implemen-
tation-independent manner is derived.
4. Schema validation. The preliminary workload is bet-
Figure 6. Star schema for the sales example (primary keys are ter specified and tested against the conceptual
underlined). schema to validate it.
DATA WAREHOUSE 7

 Supply-driven (or data-driven) approaches design the


data warehouse starting from a detailed analysis of the
data sources (e.g., Ref. 10). User requirements impact
design by allowing the designer to select which chunks
of data are relevant for the decision-making process
and by determining their structuring according to the
multidimensional model.
 Demand-driven (or requirement-driven) approaches
start from determining the information requirements
of business users (like in Ref. 11). The problem of
mapping these requirements onto the available data
sources is faced only a posteriori, by designing proper
ETL routines, and possibly by accommodating data
sources to accomplish the information needs.

Figure 7. Snowflake schema for the sales example.


A few mixed approaches were also devised (12,13), where
requirement analysis and source inspection are carried out
in parallel, and user requirements are exploited to reduce
the complexity of conceptual design.

5. Logical design. The conceptual schema is translated


Conceptual Design
into a logical schema according to the target logical
model (relational or multidimensional), considering Although no agreement exists on a standard conceptual
the expected workload and possible additional model for data warehouses, most authors agree on the
constraints related to space occupation and querying importance of a conceptual design phase providing a
performances. high level of abstraction in describing the multidimen-
6. ETL design. The ETL procedures used to feed the sional schema of the data warehouse aimed at achieving
data mart starting from the data sources via the independence of implementation issues. To this end, con-
reconciled level are designed. ceptual models typically rely on a graphical notation that
facilitates writing, understanding, and managing concep-
7. Physical design. Physical optimization of the logical
tual schemata by designers and users.
schema is done, depending on the specific character-
The existing approaches may be framed into three cate-
istic of the platform chosen for implementing the data
gories: extensions to the entity-relationship model (e.g, Ref.
mart.
14), extensions to UML (e.g., Ref. 15), and ad hoc models
8. Implementation. The physical schema of the data (e.g., Ref. 16). Although all models have the same core
mart is deployed, ETL procedures are implemented, expressivity, in that they all allow the basic concepts of
and the applications for data analysis are built and the multidimensional model to be represented graphically,
tested. they significantly differ as to the possibility of representing
more advanced concepts such as irregular hierarchies,
Several techniques for supporting single phases of many-to-many associations, and additivity.
design have been proposed in the literature; a brief survey
of the most relevant approaches is reported in the following
subsections. Logical design
The goal of logical design is to translate a conceptual
Data Source Analysis schema into a logical schema for the data mart. Although
on MOLAP platforms this task is relatively simple, because
A huge literature about schema integration has been
the target logical model is multidimensional like the source
accumulating over the last two decades. Integration
conceptual one, on ROLAP platforms, two different models
methodologies have been proposed (e.g., Ref. 5), together
(multidimensional and relational) have to be matched. This
with formalisms to code the relevant information (e.g.,
is probably the area of data warehousing where research
Ref. 6). However, the integration tools developed so far
has focused the most during the last decade (see, for
[such as TSIMMIS (7) and MOMIS (8)] should still be
instance, Ref. 17); in particular, a lot has been written
considered research prototypes rather than industrial
about the so-called view materialization problem.
tools, with the notable exception of Clio (9), which is sup-
View materialization is a well-known technique for
ported by IBM.
optimizing the querying performance of data warehouses
by physically materializing a set of (redundant) tables,
Requirement Analysis
called views, that store data at different aggregation
A careful requirement analysis is one of the keys to reduce levels. In the presence of materialized views, an ad hoc
dramatically the risk of failure for warehousing projects. component of the underlying DBMS (often called aggre-
From this point of view, the approaches to data warehouse gate navigator) is entrusted with the task of choosing, for
design usually are classified in two categories: each query formulated by the user, the view(s) on which
8 DATA WAREHOUSE

the query can be answered most cheaply. Because the port different types of specialized indexes besides B-
number of potential views is exponential in the number trees. Finally, differently from the OLTP workload, the
of hierarchy levels, materializing all views would be pro- OLAP workload is very dynamical and subject to
hibitive. Thus, research has focused mainly on effective change, and very fast response times are needed.
techniques for determining the optimal subset of views to For all these reasons, the query processing techniques
be materialized under different kinds of constraints (e.g., required by data warehousing systems are signifi-
Ref. 18). cantly different from those traditionally implemented
Another optimization technique that is sometimes in relational DBMSs.
adopted to improve the querying performance is fragmen-  Security. Among the different aspects of security, con-
tation (also called partitioning or striping). In particular, in fidentiality (i.e., ensuring that users can only access
vertical fragmentation, the fact tables are partitioned into the information they have privileges for) is particu-
smaller tables that contain the key and a subset of mea- larly relevant in data warehousing, because business
sures that are often accessed together by the workload information is very sensitive. Although the classic
queries (19). security models developed for operational databases
are used widely by data warehousing tools, the parti-
ETL Design cularities of OLAP applications ask for more specific
models centered on the main concepts of multidimen-
This topic has earned some research interest only in the last
sional modelingfacts, dimensions, and measures.
few years. The focus here is to model the ETL process either
from the functional, the dynamic, or the static point of view.
 Evolution. The continuous evolution of the application
In particular, besides techniques for conceptual design of domains is bringing to the forefront the dynamic
ETL (20), some approaches are aimed at automating (21) aspects related to describing how the information
and optimizing (22) the logical design of ETL. Although the stored in the data warehouse changes over time.
research on ETL modeling is probably less mature than As concerns changes in values of hierarchy data
that on multidimensional modeling, it will probably have a (the so-called slowly changing dimensions), several
very relevant impact on improving the overall reliability of approaches have been devised, and some commercial
the design process and on reducing its duration. systems allow us to track changes and to query cubes
effectively based on different temporal scenarios. Con-
versely, the problem of managing changes on the
Physical Design
schema level has only been explored partially, and
Physical design is aimed at filling the gap between the no dedicated commercial tools or restructuring meth-
logical schema and its implementation on the specific ods are available to the designer yet.
target platform. As such, it is concerned mainly with  Quality. Because of the strategic importance of data
the problem of choosing which types of indexes should warehouses, it is absolutely crucial to guarantee their
be created on which columns of which tables. Like the quality (in terms of data, design, technology, business,
problem of view selection, this problem has exponential etc.) from the early stages of a project. Although some
complexity. A few papers on the topic can be found in the relevant work on the quality of data has been carried
literature: For instance, Ref. 23 proposes a technique that out, no agreement still exists on the quality of the
jointly optimizes view and index selection, where as Ref. design process and its impact on decision making.
24 selects the optimal set of indexes for a given set of views  Interoperability. The wide variety of tools and software
in the presence of space constraints. The problem is made products available on the market has lead to a broad
even more complex by the fact that ROLAP platforms diversity in metadata modeling for data warehouses.
typically offer, besides classic B-trees, other types of In practice, tools with dissimilar metadata are inte-
indexes, such as star indexes, projection indexes, and grated by building complex metadata bridges, but
bitmap indexes (25). some information is lost when translating from one
Note that, although some authors consider both view form of metadata to another. Thus, a need exists for a
selection and fragmentation as part of physical design, we standard definition of metadata in order to better
prefer to include them into logical design for similarity with support data warehouse interoperability and integra-
the design of operational databases (26). tion, which is particularly relevant in the recurrent
case of mergers and acquisitions. Two industry stan-
ADVANCED TOPICS dards developed by multivendor organizations have
originated in this context: the Open Information Model
Several other topics besides those discussed so far have (OIM) by the Meta Data Coalition (MDC) and the
been addressed by the data warehouse literature. Among Common Warehouse Metamodel (CWM) by the OMG.
them we mention:  New architectures and applications. Advanced archi-
tectures for business intelligence are emerging to sup-
 Query processing. OLAP queries are intrinsically dif- port new kinds of applications, possibly involving new
ferent from OLTP queries: They are read-only queries and more complex data types. Here we cite spatial data
requiring a very large amount of data, taken from a few warehousing, web warehousing, real-time data ware-
tables, to be accessed and aggregated. In addition, housing, distributed data warehousing, and scientific
DBMSs oriented to data warehousing commonly sup- data warehousing. Thus, it becomes necessary to adapt
DATA WAREHOUSE 9

and specialize the existing design and optimization 15. S. Lujan-Mora, J. Trujillo, and I. Song, A UML profile for
techniques to cope with these new applications. multidimensional modeling in data warehouses, Data Know.
Engineer., 59(3): 725769, 2006.
See Ref. 26 for an up-to-date survey of open research 16. S. Rizzi, Conceptual modeling solutions for the data ware-
themes. house, in R. Wrembel and C. Koncilia (eds.), Data Warehouses
and OLAP: Concepts, Architectures and Solutions, IRM Press:
2006, pp. 126.
BIBLIOGRAPHY 17. J. Lechtenborger and G. Vossen, Multidimensional normal
forms for data warehouse design, Informat. Sys., 28(5):
1. H. Lenz and A. Shoshani, Summarizability in OLAP and 415434, 2003.
statistical data bases, Proc. Int. Conf. on Scientific and Statis- 18. D. Theodoratos and M. Bouzeghoub, A general framework for
tical Database Management, Olympia, WA, 1997, pp. 132143. the view selection problem for data warehouse design and
2. R. Agrawal, A. Gupta, and S. Sarawagi, Modeling multidimen- evolution, Proc. Int. Workshop on Data Warehousing and
sional databases, IBM Research Report, IBM Almaden OLAP, Washington DC, 2000, pp. 18.
Research Center, 1995. 19. M. Golfarelli, V. Maniezzo, and S. Rizzi, Materialization of
3. M. Golfarelli and S. Rizzi, A methodological framework for data fragmented views in multidimensional databases, Data Knowl.
warehouse design, Proc. Int. Workshop on Data Warehousing Engineer., 49(3): 325351, 2004.
and OLAP, Washington DC; 1998; pp. 39. 20. P. Vassiliadis, A. Simitsis, and S. Skiadopoulos, Conceptual
4. S. Lujan-Mora and J. Trujillo, A comprehensive method for modeling for ETL processes, Proc. Int. Workshop on Data
data warehouse design, Proc. Int. Workshop on Design and Warehousing and OLAP, McLean, 2002, pp. 1421.
Management of Data Warehouses, Berlin; Germany; 2003; 21. A. Simitsis, Mapping conceptual to logical models for ETL
pp. 1.11.14. processes, Proc. Int. Workshop on Data Warehousing and
5. D. Calvanese, G. De Giacomo, M. Lenzerini, D. Nardi, and R. OLAP, Bremen, Germany, 2005, pp. 6776.
Rosati, A principled approach to data integration and reconci- 22. A. Simitsis, P. Vassiliadis, and T. K. Sellis, Optimizing ETL
liation in data warehousing, Proc. Int. Workshop on Design and processes in data warehouses, Proc. Int. Conf. on Data Engi-
Management of Data Warehouses, Heidelberg; Germany; 1999; neering, Tokyo, Japan, 2005, pp. 564575.
pp. 16.116.11. 23. H. Gupta, V. Harinarayan, A. Rajaraman, and J. Ullman,
6. D. Calvanese, G. De Giacomo, M. Lenzerini, D. Nardi, and R. Index selection for OLAP, Proc. Int. Conf. on Data Engineering,
Rosati, Description logic framework for information integra- Birmingham, UK, 1997, pp. 208219.
tion, Proc. Int. Conf. on Principles of Knowledge Representation 24. M. Golfarelli, S. Rizzi, and E. Saltarelli, Index selection for data
and Reasoning, Trento; Italy; 1998; pp. 213. warehousing, Proc. Int. Workshop on Design and Management
7. S. Chawathe, H. Garcia-Molina, J. Hammer, K. Ireland, Y. of Data Warehouses, Toronto, Canada, 2002, pp. 3342.
Papakonstantinou, J. Ullman, and J. Widom, The TSIMMIS 25. P. ONeil and D. Quass, Improved query performance with
project: integration of heterogeneous information sources, variant indexes, Proc. SIGMOD Conf., Tucson, AZ, 1997,
Proc. Meeting of the Inf. Processing Soc. of Japan,Tokyo, Japan, pp. 3849.
1994, pp. 718.
26. S. Rizzi, A. Abell, J. Lechtenborger, and J. Trujillo, Research in
8. D. Beneventano, S. Bergamaschi, S. Castano, A. Corni, R. data warehouse modeling and design: Dead or alive? Proc. Int.
Guidetti, G. Malvezzi, M. Melchiori, and M. Vincini, Informa- Workshop on Data Warehousing and OLAP, Arlington, VA,
tion integration: the MOMIS project demonstration, Proc. Int. 2006, pp. 310.
Conf. on Very Large Data Bases, Cairo; Egypt; 2000; pp. 611614.
9. L. M. Haas, M. A. Hernandez, H. Ho, L. Popa, and M. Roth, Clio
grows up: from research prototype to industrial tool, Proc. FURTHER READING
SIGMOD Conf., Baltimore; MD; 2005; pp. 805810.
10. M. Golfarelli, D. Maio, and S. Rizzi, The dimensional fact B. Devlin, Data Warehouse: From Architecture to Implementation,
model: a conceptual model for data warehouses, Int. J. Coope. Reading, MA: Addison-Wesley Longman, 1997.
Informat. Sys., 7(2-3): 215247, 1998. W. H. Inmon, Building the Data Warehouse, 4th ed. New York:
11. N. Prakash and A. Gosain, Requirements driven data ware- John Wiley & Sons, 2005.
house development, CAiSE Short Paper Proc., Klagenfurt/ M. Jarke, M. Lenzerini, Y. Vassiliou, and P. Vassiliadis, Funda-
Velden, Austria, 2003, pp. 1316. mentals of Data Warehouse, New York: Springer, 2000.
12. A. Bonifati, F. Cattaneo, S. Ceri, A. Fuggetta, and S. Para- R. Kimball, L. Reeves, M. Ross, and W. Thornthwaite, The Data
boschi, Designing data marts for data warehouses, Warehouse Lifecycle Toolkit, New York: John Wiley & Sons, 1998.
ACM Trans: Softw: Engineer. Methodol., 10(4): 452483, 2001. R. Mattison, Data Warehousing, New York: McGraw-Hill, 1996.
13. P. Giorgini, S. Rizzi, and M. Garzetti, Goal-oriented require-
ment analysis for data warehouse design, Proc. Int. Workshop
on Data Warehousing and OLAP, Bremen, Germany, 2005, STEFANO RIZZI
pp. 4756. University of Bologna
14. C. Sapia, M. Blaschka, G. Hofling, and B. Dinter, Extending the Bologna, Italy
E/R model for the multidimensional paradigm, Proc. Int. Work-
shop on Design and Management of Data Warehouses, Singa-
pore, 1998, pp. 105116.
D
DECISION SUPPORT SYSTEMS: FOUNDATIONS can think of decision making as an activity culminating in
AND VARIATIONS the selection of one from among multiple alternative
courses of action.
INTRODUCTION In general, the number of alternatives identified and
considered in decision making could be very large. The
Over the past quarter century, economic and technological work involved in becoming aware of alternatives often
forces have produced radical redefinitions of work, the makes up a major share of a decision-making episode. It
workplace, and the marketplace. They have ushered in is concerned with such questions as Where do alternatives
the era of knowledge workers, knowledge-based organiza- come from? How many alternatives are enough? How
tions, and the knowledge economy. People have always can large numbers of alternatives be managed so none is
used the knowledge available to them to make decisions forgotten or garbled? A computer-based system (i.e, a DSS)
that shape the world in which they live. Decisions of work- can help a decision maker cope with such issues.
ers, consumers, and organizations range from those affect- Ultimately, one alternative is selected. But, which one?
ing the world in some small or fleeting way to those of global This choice depends on a study of the alternatives to under-
and lasting proportions. In recent times, the number of stand their various implications as well as on a clear
decisions being made per time period and the complexity of appreciation of what is important to the decision maker.
factors involved in decision activities have grown drama- The work involved in selecting one alternative often makes
tically. As the worlds supply of knowledge continues to up a major share of a decision-making episode. It is con-
accelerate, the amount of knowledge used in making deci- cerned with such questions as: To what extent should each
sions has exploded. Computer-based systems that help alternative be studied? How reliable is our expectation
decision makers deal with both the knowledge explosion about an alternatives impacts? Are an alternatives
and the incessant demands for decisions in a fast-paced, expected impacts compatible with the decision makers
complicated world are called decision support systems purposes? What basis should be used to compare alter-
(DSSs). Such systems have become practically indispensa- natives with each other? What strategy will be followed in
ble for high performance, competitiveness, and even orga- arriving at a choice? Computer-based systems (i.e., DSSs)
nizational survival. can be very beneficial in supporting the study of alterna-
Imagine an organization in which managers and other tives. Some systems even recommend the selection of a
workers cannot use computers to aid any of their decisional particular alternative and explain the rationale underlying
activities. Contrast this fantasy with the vision of an orga- that advice.
nization whose managers and other knowledge workers Complementing the classic view of decisions and deci-
routinely employ computers to get at and process knowl- sion making, there is the knowledge-based view that holds
edge that has a bearing on decisions being made. These that a decision is knowledge that indicates the nature of an
DSSs store and process certain kinds of knowledge in much action commitment (5). When we regard a decision as a
higher volumes and at much higher speeds than the human piece of knowledge, making a decision means we are mak-
mind. In addition to such efficiency advantages, they can ing a new piece of knowledge that did not exist before,
also be more effective for certain kinds of knowledge hand- manufacturing new knowledge by transforming or assem-
ling because they are not subject to such common human bling existing pieces of knowledge. The manufacturing
conditions as oversight, forgetfulness, miscalculation, bias, process may yield additional new knowledge as byproducts
and stress. Failure to appreciate or exploit such decision (e.g., knowledge derived as evidence to justify the decision,
support capabilities puts individuals and organizations at a knowledge about alternatives that were not chosen, knowl-
major disadvantage edge about improving the decision manufacturing process
As a prelude to considering the characteristics of DSSs, itself). Such byproducts can be useful later in making other
we need to examine a couple of preliminaries: decision decisions. A DSS is a computer-based system that aids the
making and knowledge. Understanding what it means to manufacturing process, just as machines aid in the man-
make a decision provides a useful basis for exploring deci- ufacturing of material goods.
sion support possibilities. Understanding salient aspects of According to Mintzberg (6), there are four decisional
knowledge gives a starting point for appreciating ways in roles: entrepreneur, disturbance handler, resource alloca-
which computers can support the use of knowledge during tor, and negotiator. When playing the entrepreneur role, a
decision making. decision maker searches for opportunities to advance in
new directions aligned with his/her/its purpose. If such an
opportunity is discovered, the decision maker initiates and
DECISION MAKING
devises controlled changes in an effort to seize the oppor-
tunity. As a disturbance handler, a decision maker initiates
General agreement in the management literature exists
and devises corrective actions when facing an unexpected
that a decision is a choice. It may be a choice about a course
disturbance. As a resource allocator, a decision maker
of action (1,2), choice of a strategy for action (3), or a
determines where efforts will be expended and how assets
choice leading to a certain desired objective(4). Thus, we
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS

will be deployed. This decision can be thought of as deter- creative capabilities. For structured decisions, DSSs auto-
mining a strategy for structuring available resources. matically carry out some portion of the process used to
When playing the negotiator role, a decision maker bar- produce a decision.
gains with others to try to reach a joint decision. Decision Because decisions are not manufactured in a vacuum, an
support systems are capable of supporting these four roles, appreciation of decision contexts and types can help us
although a particular DSS can be oriented more toward one understand what features would be useful to have in a
role than the others. DSS. The same can be said for an appreciation of decision
A DSS can also vary to suit other particularities of makers and decision processes, which we now consider in
contexts in which it is to be used. For instance, the context turn.
could be strategic decision making (concerned with decid- Decision making can involve an individual participant
ing on purposes to fulfill, objectives to meet, changes in or multiple participants. In the multiparticipant case, the
objectives, policies to adopt) decision making to ensure power to decide may be vested in a single participant, with
objectives are met and policies are observed, or operational other participants having varying degrees of influence over
decision making about performing specific tasks. These what the decision will be and how efficiently it will be
contexts vary along such dimensions as time horizons for produced. They do so by specializing in assorted knowledge
deciding, extent of precision and detailed knowledge processing tasks assigned to them during the making of the
needed, narrow to wide-ranging knowledge, rhythm to decision. These supporting participants function as exten-
decision-making activities, and degree of creativity or qua- sions to the deciding participants own knowledge proces-
litative judgment required. sing capabilities. At the other extreme of multiparticipant
As another example of decision context, consider the decision making, participants share equal authority over
maturity of the situation in which a decision is being made. the decision being made, with little formal specialization in
Some decisions are made in established situations, whereas knowledge processing tasks. This is referred to as a group
others are made in emergent situations. Well-established decision maker, whereas the other extreme is called an
situations imply considerable experience in previously hav- organization decision maker. There are many variations
ing made similar kinds of decisions, with a relatively high between these extremes. Correspondingly, DSSs for these
level of knowledge existing about the current state of affairs different kinds of multiparticipant decision makers can be
and the history of previous decisions of a similar nature. In expected to exhibit some different kinds of features. More-
contrast, emergent situations are characterized not only by over, a particular DSS may assist a specific participant,
some surprising new knowledge, but also often by a scarcity some subset of participants, or all participants involved in a
of relevant knowledge as well, often with intense effort multiparticipant decision.
required to acquire needed knowledge. The type of support Now, as for the process of decision making, Simon (2)
likely to be most useful for established contexts could be says there are three important phases, which he calls
quite different than what is valuable in the case of emergent intelligence, design, and choice. Moreover, running
settings. through the phases in any decision-making process, a
Simon (2,7) says that decisions comprise a continuum decision maker is concerned with recognizing and solving
ranging from structured to unstructured. The structured- some problems in some sequence (10). A decision-making
ness of a decision is concerned with how routine and process is governed by the decision makers strategy for
repetitive is the process that produced it. A highly struc- reaching a choice (11).
tured decision is one that has been manufactured in an The intelligence phase is a period when the decision
established context. Alternatives from which the choice is maker is alert for occasions to make decisions, preoccupied
made are clear-cut, and each can be readily evaluated in with collecting knowledge, and concerned with evaluating it
light of purposes and goals. All knowledge required to make in light of a guiding purpose. The design phase is a period
the decision is available in a form that makes it straightfor- wherein the decision maker formulates alternative courses
ward to use. Unstructured decisions tend to be produced of action, analyzes those alternatives to arrive at expecta-
in emergent contexts. Issues pertinent to producing a tions about the likely outcomes of choosing each, and eval-
decision are not well understood. Some issues may be uates those expectations with respect to a purpose or
entirely unknown to the decision maker; alternatives objective. During the design phase, the decision maker
from which a choice will be made are vague or unknown, may find that additional knowledge is needed, triggering
are difficult to compare and contrast, or cannot be easily a return to the intelligence phase to satisfy that need before
evaluated. In other words, the knowledge required to pro- continuing with the design activity. Evaluations of the
duce a decision is unavailable, difficult to acquire, incom- alternatives are carried forward into the choice phase of
plete, suspect, or in a form that cannot be readily used by the decision process, where they are compared and one is
the decision maker. Semistructured decisions lie between chosen. This choice is made in the face of internal and
the two extremes. external pressures related to the nature of the decision
DSSs of varying kinds can be valuable aids in the maker and the decision context. It may happen that none
manufacture of semistructured and unstructured decisions of the alternatives are palatable, that several competing
(8), as well as structured decisions (9). For the former, DSSs alternatives yield very positive evaluations, or that the state
can be designed to facilitate the exploration of knowledge, of the world has changed significantly since the alternatives
help synthesize methods for reaching decisions, catalog and were formulated and analyzed. So, the decision maker may
examine the results of brainstorming, provide multiple return to one of the two earlier phases to collect more up-
perspectives on issues, or stimulate a decision makers to-date knowledge, formulate new alternatives, reanalyze
DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS 3

alternatives, reevaluate them, and so forth. Any phase is To relax cognitive limits as much as possible, we could
susceptible to computer-based support. consider forming a very large team of participants. But this
Recognizing and solving problems is the essence of can be expensive not only in terms of paying and equipping
activity within intelligence, design, and choice phases. more people, but also with respect to increased commu-
For structured decisions, the path toward the objective of nication and coordination costs. At some point, the benefits
producing a decision is well charted. Problems to be sur- of increased cognitive abilities are outweighed by the costs
mounted are recognized easily, and the means for solving of more people. Decision support systems can soften the
them are readily available. Unstructured decisions take us effects of economic limits when they are admitted as deci-
into uncharted territory. Problems that will be encountered sion-making participants. If properly conceived and used,
along the way are not known in advance. Even when added DSSs increase the productivity of human partici-
stumbled upon, they may be difficult to recognize and pants and allow the organization decision maker to solve
subsequently solve. Ingenuity and an exploratory attitude problems more efficiently and effectively.
are vital for coping with these types of decisions. A decision maker may be blessed with extraordinary
Thus, a decision-making process can be thought of as a cognitive abilities and vast economic resources but very
flow of problem-recognition and problem-solving exercises. little time. Time limits can put severe pressure on the
In the case of a multiparticipant decision maker, this flow decision maker, increasing the likelihood of errors and
has many tributaries, made up of different participants poor-quality decisions. There may not be sufficient time
working on various problems simultaneously, in parallel, to consider relevant knowledge, to solve relevant problems,
or in some necessary sequence. Only if we solve its sub- or to employ a desirable decision-making strategy. Because
problems can we solve an overall decision problem. DSSs computers can process some kinds of knowledge much
can help decision makers in recognizing and/or solving faster than humans, are not error-prone, work tirelessly,
problems. and are immune to stresses from looming deadlines, DSSs
A decision-making process, and associated knowledge can help lessen the impacts of time limits.
processing, are strongly colored by the strategy being used To summarize, the support that a DSS offers normally
to choose an alternative. Well-known decision-making stra- includes at least one of the following:
tegies include optimizing, satisficing, elimination-by-
aspects, incrementalism, mixed scanning, and the analytic  Alerts user to a decision-making opportunity or chal-
hierarchy process. As a practical matter, each strategy has lenge
certain strengths and limitations (9). A DSS designed to  Recognizes problems that need to be solved as part of
support an optimizing strategy may be of little help when a the decision-making process
satisficing strategy is being adopted and vice versa.  Solves problems recognized by itself or by the user
We close this brief overview of decision making by con-
 Facilitates or extends the users ability to process (e.g.,
sidering two key questions about decision support: Why
acquire, transform, and explore) knowledge
does a decision maker need support? What is the nature of
the needed support? Computer systems to support decision  Offers advice, expectations, evaluations, facts, ana-
makers are not free. Not only is there the cost of purchasing lyses, and designs to users
or developing a DSS, costs are also associated with learning  Stimulates the users perception, imagination, or crea-
about, using, and maintaining a DSS. It is only reasonable tive insight
that the benefits of a DSS should be required to outweigh its  Coordinates/facilitates interactions within multipar-
costs. Although some DSS benefits can be difficult to mea- ticipant decision makers
sure in precise quantitative terms, all benefits are the
result of a decision makers need for support in overcoming Because knowledge forms the fabric of decision making, all
cognitive, economic, or time limits (9). the various kinds of support that a DSS can provide are
Cognitive limits refer to limits in the human minds essentially exercises in knowledge management. Thus, we
ability to store and process knowledge. A person does not now take a closer look at the matter of knowledge.
know everything all the time, and what is known cannot
always be recalled in an instantaneous, error-free fashion.
Because decision making is a knowledge-intensive activity, KNOWLEDGE MATTERS
cognitive limits substantially restrict an individuals pro-
blem-solving efficiency and effectiveness. They may even Now, consider the notion of knowledge in more detail. A
make it impossible for the individual to reach some deci- decision maker possesses a storehouse of knowledge, plus
sions. If these limits are relaxed, decision-maker produc- abilities to both alter and draw on the contents of that
tivity should improve. The main reason multiparticipant inventory (12). This characterization holds for all types of
decision makers exist is because of this situation. Rather decision makersindividuals, groups, and organizations.
than having an individual find and solve all problems In the multiparticipant cases, both knowledge and proces-
sing abilities are distributed among participants. Knowl-
leading to a decision, additional participants serve as
extensions to the deciding participants own knowledge- edge is extracted on an as-needed basis from the inventory
handling skills, allowing problems to be solved more reli- and manipulated to produce solutions for the flow of pro-
ably or rapidly. A DSS can function as a supporting parti- blems that constitutes a decision manufacturing process.
cipant in decision making, essentially extending a persons When the inventory is inadequate for solving some pro-
cognitive capabilities. blem, outgoing messages are used in an effort to acquire the
4 DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS

additional knowledge. The solution to each problem arising interacts, and/or itself. A DSS can thus possess domain
during the manufacturing process is itself a piece of knowl- knowledge, which is descriptive, procedural, and/or reason-
edge. In turn, it may be used to find or solve other problems, ing (DPR) knowledge that allows the DSS to find or solve
whose solutions are knowledge allowing still other pro- problems about a domain of interest (e.g., finance). It can
blems to be solved, and so forth, until the overall problem possess relational knowledge, which is DPR knowledge
of producing a decision is solved (10). Thus, knowledge is that is the basis of a DSSs ability to effectively relate
the raw material, work-in-process, byproduct, and finished to (e.g., interact with) its user and other processors in
good of decision making. the course of decision making. A DSS may also have self-
If a system has and can use a representation of some- knowledge, which is DPR knowledge about what it knows
thing (an object, a procedure, . . . whatever), then the system and what it can do. An adaptive DSS is one for which DPR
itself can also be said to have knowledge, namely, the knowledge for any of these three orientations can change by
knowledge embodied in that representation about that virtue of the DSSs experiences.
thing (13). Knowledge is embodied in usable representa-
tions, where a representation is a pattern of some kind:
symbolic, digital, mental, behavioral, audio, visual, etc. To DECISION SUPPORT SYSTEM ROOTS, CHARACTERISTICS,
the extent that we can make use of that representation, it AND BENEFITS
embodies knowledge. Of particular interest for DSSs are
the representations that a computer can use and the knowl- Rooted in an understanding of decision making, appreciat-
edge processing ability corresponding to each knowledge ing the purposes of DSSs serves as a starting point for
representation approaches permitted in its portion of the identifying possible characteristics and benefits that we
knowledge storehouse. A DSS cannot process knowledge might expect a DSS to exhibit. These purposes include:
that it cannot represent. Conversely, a DSS cannot know
what is represented by some pattern that it cannot process.  Increase a decision makers efficiency and/or effective-
When designing or encountering a particular DSS, we ness
should examine it in terms of the possibilities it presents for  Help a decision maker successfully deal with the deci-
representing and processing knowledgethat is, the sional context
knowledge-management abilities it has to supplement  Aid one or more of the three decision-making phases
human cognitive abilities. Over the years, several compu-
 Help the flow of problem-solving episodes proceed
ter-based techniques for managing knowledge have been
more smoothly or rapidly
successfully applied to support decision makers, including
text/hypertext/document management, database manage-  Relax cognitive, economic, and/or temporal con-
ment, data warehousing, solver management spreadsheet straints on a decision maker
analysis, rule management, message management, process  Help manage DPR knowledge that is important for
management, and so forth (5). Each of these techniques can reaching decisions
represent and process one or more of the three basic types of
knowledge important for study of DSSs: descriptive, pro- Decision support systems are deeply rooted in the evolu-
cedural, and reasoning knowledge (12,14). tion of business computing systems (aka information sys-
Knowledge about the state of some world is called tems). Another way to appreciate characteristics and
descriptive knowledge. It includes descriptions of past, benefits of DSSs is to compare/contrast them with traits
present, future, and hypothetical situations. This know- of their two predecessors in this evolution: data processing
ledge includes data and information. In contrast, procedural systems (DPS) and management information systems
knowledge is concerned with step-by-step procedures for (MIS). All three share the traits of being concerned with
accomplishing some task. Reasoning knowledge specifies record keeping; however, they differ in various ways,
conclusions that can be drawn when a specified situation because each serves a different purpose in managing
exists. Descriptive, procedural, and reasoning knowledge knowledge resources.
can be used together within a single DSS to support decision The main purpose of DPS was and is to automate the
making (10). For example, a DSS may derive (e.g., from past handling of large numbers of transactions. For example, a
data) descriptive knowledge (e.g., a forecast) as the solution bank must deal with large volumes of deposit and with-
to a problem by using procedural knowledge indicating how drawal transactions every day, properly track each trans-
to derive the new knowledge (e.g., how to calculate a forecast actions effect on one or more accounts, and maintain a
from historical observations). Using reasoning knowledge history of all transactions to give a basis for auditing its
(e.g., rules) about what procedures are valid under different operations. At the heart of a DPS lies a body of descriptive
circumstances, the DSS infers which procedure is appro- knowledgecomputerized records of what is known as a
priate for solving the specific forecasting problem or to infer result of transactions having happened. A data processing
a valid sequence of existing procedures that, when carried system has two major abilities related to the stored data:
out, would yield a solution. record keeping and transaction generation. The former
Aside from knowledge type, knowledge has other attri- keeps the records up-to-date in light of incoming transac-
bute dimensions relevant to DSSs (15,16). One of these tions and can cause creation of new records, modification of
dimensions is knowledge orientation, which holds that a existing records, deletion of obsolete records, or alteration
processors knowledge can be oriented in the direction of the of relationships among records. The second DPS ability
decision domain, of other related processors with which it is production of outgoing transactions based on stored
DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS 5

descriptive knowledge, and transmitted to such targets as knowledge from multiple sources (e.g., external feeds and
customers, suppliers, employees, or governmental departmental DPSs and MISs) and can present various
regulators. measures of key performance indicators (e.g., sales figures,
Unlike DPS, the central purpose of MIS was and is to operations status, balanced scorecards, and competitor
provide periodic reports that recap certain predetermined actions) as an aid to executives in identifying and formulat-
aspects of past operations. They give regular snapshots of ing problems in the course of decision making. Executives
what has been happening. For instance, MIS might provide can face decisions, particularly more strategic decisions,
manufacturing managers with daily reports on parts usage that involve multiple inter-related issues involving mar-
and inventory levels, weekly reports on shipments received keting, strategy, competition, cash flow, financing, outsour-
and parts ordered, a monthly report of production expen- cing, human resources, and so forth. In such circumstances,
ditures, and an annual report on individual workers levels it is important for the knowledge system contents to be
of productivity. Whereas DPS concern is with transforming sufficiently wide ranging to help address cross-functional
transactions into records and generating transactions from decisions.
records, MIS concern with record keeping focuses on using
this stored descriptive knowledge as a base for generating
DSS Characteristics
recurring standard reports. Of course, an MIS also has
facilities for creating and updating the collection of records Ideally, a decision maker should have immediate, focused,
that it keeps. Thus, an MIS can be regarded as extending clear access to whatever knowledge is needed on the spur-
the DPS idea to emphasize production of standard reports of-the-moment. Pursuit of this ideal separates decision
rather than producing voluminous transactions for custo- support systems from their DPS and MIS ancestors. It
mers, suppliers, employees, or regulators. also suggests characteristics we might expect to observe
Information contained in standard MIS reports cer- in a DSS:
tainly can be factored into their users decision-making
activities. When this is the case, MIS can be fairly regarded  A DSS includes a body of knowledge that describes
as a kind of DSS. However, the nature of such support is some aspects of the decision domain, that specifies how
very limited in light of our understanding of decision mak- to accomplish various tasks, and/or that indicates what
ing. Reports generated by MIS are defined before the conclusions are valid in various circumstances.
system is created. However, the situation surrounding a  A DSS may also possess DPR knowledge of other
decision maker can be very dynamic. Except for the most decision-making participants and itself as well.
structured kinds of decisions, information needs can arise  A DSS has an ability to acquire, assimilate, and alter
unexpectedly and change more rapidly than MIS can be its descriptive, procedural, and/or reasoning knowl-
built or revised. Even when some needed information exists edge.
in a stack of reports accumulated from MIS, it may be
 A DSS has an ability to present knowledge on an ad hoc
buried within other information held by a report, scattered
basis in various customized ways as well as in standard
across several reports, and presented in a fashion not
reports.
suitable for a user. Moreover, relevant information existing
in MIS reports may not only be incomplete, difficult to dig  A DSS has an ability to select any desired subset of
out, unfocused, or difficult to grasp, it may also be in need of stored knowledge for either presentation or deriving
additional processing. For instance, a series of sales reports new knowledge in the course of problem recognition
may list daily sales levels for various products, when a user and/or problem solving.
actually needs projections of future sales based on data in  DSS can interact directly with a participant in a deci-
these reports. Decision making proceeds more efficiently sion maker in such a way that there is flexibility in
and effectively when a user can easily get complete, choosing and sequencing knowledge manipulation
fully processed, focused descriptive knowledge (or even activities.
procedural and reasoning knowledge) presented in the
desired way. There are, of course, variations among DSSs with respect to
Standard reports generated by MIS are typically issued each of these characteristics. For instance, one DSS may
at set time intervals. But decisions that are not fully possess descriptive and procedural knowledge, another
structured tend to be required at irregular, unanticipated holds only descriptive and reasoning knowledge, and
times. The knowledge needed for manufacturing decisions another DSS may store only descriptive knowledge. As
must be available on an ad hoc, spur-of-the-moment, as- another example, there can be wide variations in the nature
needed basis. Another limit on MIS ability to support of users interactions with DSSs (push versus pull interac-
decisions stems from their exclusive focus on managing tions). Regardless of such variations, these characteristics
descriptive knowledge. Decision makers frequently need combine to amplify a decision makers knowledge manage-
procedural and/or reasoning knowledge as well. While an ment capabilities.
MIS deals with domain knowledge, decision making can The notion of DSSs arose in the early 1970s (17,18).
often benefit from relational and self-knowledge possessed Within a decade, each of the characteristics cited had been
by its participants. identified as an important DSS trait (8,1921). In that
Decision support capabilities can be built on top of DPS period, various DSSs were proposed or implemented for
and MIS functions. For instance, so-called digital dash- specific decision-making applications such as those for
boards are a good example. A digital dashboard integrates corporate planning (22), water-quality planning (23),
6 DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS

banking (24), and so forth (19). By the late 1970s, new  A DSS may provide additional compelling evidence to
technological developments were emerging that would justify a users position, helping secure agreement or
prove to give tremendous impetus to the DSS field. These cooperation of others. Similarly, a DSS may be used by
developments included the microcomputer, electronic the decision maker to check on or confirm the results of
spreadsheets, management science packages, and ad problems solved independently of the DSS.
hoc query interfaces (9). Technological advances impact-  Because of the enhanced productivity and/or agility a
ing the DSS field have continued, including progress in DSS fosters, it may give users or their organizations
artificial intelligence, collaborative technologies, and the competitive advantages or allow them to stay compe-
Internet. titive.
It is also notable that DSS characteristics are increas-
ingly appearing in software systems not traditionally Empirical evidence supporting the actual existence of these
thought of as providing decision support, such as enterprise benefits is examined in Ref. 28. Because no one DSS pro-
systems (25). They also commonly appear in websites, vides all these benefits to all decision makers in all decision
supporting decisions of both users and providers of those situations, frequently many DSSs within an organization
sites (26). help to manage its knowledge resources. A particular deci-
sion maker may also make use of several DSSs within a
DSS Benefits single decision-making episode or across different decision-
Benefits of a particular DSS depend not only on its precise making situations.
characteristics, but also on the nature of the user and on the
decision context. A good fit among these three factors must DECISION SUPPORT SYSTEM ARCHITECTURE
exist if potential benefits of the DSS are to become practical
realities. A DSS that one user finds very beneficial may be of We are now in a good position to examine the architecture of
little value to another user, even though both are facing DSSs, which identifies four essential elements of a DSS and
similar decisions. Or, a DSS that is beneficial to a user in explains their interrelationships. A DSS has a language
one decision context may not be so valuable to that user in system, presentation system, knowledge system, and pro-
another context. blem-processing system (9,10,29). By varying the makeup
Nevertheless, we can identify potential DSS benefits of these four elements, different DSSs are produced. Special
(9,27), one or more of which is exhibited by any specific DSS: cases of the generic DSS architecture vary in terms of the
knowledge representation and processing approaches they
 In a most fundamental sense, a DSS augments a users employ giving DSS categories such as text-oriented DSSs,
own innate knowledge and knowledge manipulation database-oriented DSSs, spreadsheet-oriented DSSs, sol-
skills by extending the users capacity for representing ver-oriented DSSs, rule-oriented DSSs, compound DSSs,
and processing knowledge in the course of decision and collaborative DSSs (9).
making.
 A DSS may be alert for events that lead to problem The Generic Architecture
recognition, that demand decisions, or that present
A decision support system can be defined in terms of three
decisional opportunities and notify users.
systems of representation:
 A user can have the DSS solve problems that the user
alone would not even attempt or that would consume a  A language system (LS) consists of all messages the
great deal of time because of their complexity and DSS can accept.
magnitude.
 A presentation system (PS) consists of all messages the
 Even for relatively simple problems encountered in DSS can emit.
decision making, a DSS may be able to reach solutions
faster and/or more reliably than the user.
 A knowledge system (KS) consists of all knowledge the
DSS has assimilated and stored.
 Even though a DSS may be unable to find or solve a
problem facing a user, it may be used to guide the user By themselves, these three kinds of systems can do
into a rational view of the problem or otherwise sti- nothing. They simply represent knowledge, either in the
mulate the users thoughts about the problem. For sense of messages that can be passed or representations that
instance, the DSS may be used in an exploratory have been accumulated for possible processing. Yet they are
way to browse selectively through stored data or to essential elements of a DSS. Each is used by the fourth
analyze selectively the implications of ideas related to element: the problem-processing system (PPS). This system
the problem. The user may ask the DSS for advice is the active part of a DSS, its software engine. As its name
about dealing with the problem. Perhaps the user can suggests, a PPS is what tries to recognize and solve problems
have the DSS solve a similar problem to trigger (i.e., process problems) during the making of a decision.
insights about the problem actually being faced. Figure 1 illustrates how the four subsystems are related
 The very activity of constructing a DSS may reveal new to each other and to a DSS user. The user is typically a
ways of thinking about the decision domain, relational human participant in the decision making but could also be
issues among participants, or even partially formalize the DSS developer, administrator, knowledge-entry person/
various aspects of decision making. device, or even another DSS. In any case, a user makes a
DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS 7

Language
System Knowledge
Problem
System
Recall/Derive Knowledge Processing
Clarify/Help System
Accept Knowledge
Govern Higher Order
Processes Acquisition
Requests
Selection Descriptive
Knowledge
Assimilation
Users Procedural
Generation Knowledge

Private
Emission Reasoning Knowledge
Presentation Knowledge
Responses
System Coordination Public
Knowledge
Provide Domain
Control Knowledge
Knowledge/Clarification
Seek Self
Knowledge/Clarification Measurement Knowledge
Relational
Knowledge

Figure 1. Decision support system architecture.

request by selecting an element of the LS. It could be a


request to accept/provide knowledge, clarify previous These LS and PS categorizations are based on message
requests/responses, and find/solve a problem. Once the semantics. Yet another way of categorizing LS requests and
PPS has been requested to process a particular LS element, PS responses could be based on distinctions in the styles of
it does so. This processing may very well require the PPS to messages (e.g., menu, command, text, form, graphic, audio,
draw on KS contents in order to interpret the request and direct manipulation, video, and animation).
develop a response to it. The processing may also change the A KS can include DPR knowledge for any of the orien-
knowledge held in the KS. In either event, the PPS may tations (domain, relational, and/or self), although the
issue a response to the user. It does so by choosing to present emphasis is commonly on domain-oriented knowledge.
one PS element to the user. The presentation choice is Many options are available to DSS developers for repre-
determined by the processing carried out with KS contents sentations to employ in a KS, including text, hypertext,
in response to the users request. In some cases, PPS activity forms, datasets, database, spreadsheet, solvers, pro-
is triggered by an event rather than by a users request, with grams, rules, case bases, grammars, dictionaries, seman-
the processing result being pushed to the user. tic nets, frames, documents, and video/audio records. The
This simple architecture captures crucial and funda- key point is that, for any of these representations to
mental aspects common to all DSSs. To more fully appreci- convey knowledge, it must be a representation that is
ate the nature of a specific DSS, we must know about the usable by the DSSs problem processing system. That
requests that make up its LS, the responses that make up is, a PPS must have processing capabilities that corre-
its PS, the knowledge representations allowed and existing spond the each knowledge representation technique
in its KS, and the knowledge-processing capabilities of its employed in its KS.
PPS. Developers of DSSs must pay careful attention to all Regardless of the particular knowledge processing tech-
these elements when they design and build DSSs. nique(s) it uses, a PPS tends to have the following knowl-
Requests that comprise a LS include those seeking: edge manipulation abilities (9,10,16):

 Recall or derivation of knowledge (i.e., solving a pro-  Acquire knowledge from outside itself (interpreting it
blem) along the way)
 Clarification of prior responses or help in making  Select knowledge from its KS (e.g., for use in acquiring,
subsequent responses assimilating, generating, and emitting knowledge)
 Acceptance of knowledge from the user or other exter-  Assimilate knowledge into its KS (e.g., incorporate
nal sources acquired or generated knowledge subject to mainte-
 To govern a higher order process (e.g., launch a work- nance of KS quality)
flow)  Generate knowledge (e.g., derive or discover new
knowledge)
Similarly, PS subsets include those that:  Emit knowledge to the outside (packaging it into sui-
table presentations along the way)
 Provide knowledge or clarification
 Seek knowledge or clarification from the user or other Some PPSs do not have all five abilities (e.g., can select
external sources knowledge, but not generate it). In addition, a PPS may
8 DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS

have some higher order abilities that guide/govern the instructions they contain. This capability gives DSS users
patterns of acquisition, selection, generation, assimilation, much more power in handling procedural knowledge than
and emission activities that occur during a decisional epi- is typical with either text management or database man-
sode (9,16): agement. However, it is not nearly as convenient as data-
base management in handling large volumes of descriptive
 Measurement of knowledge and processing (allowing knowledge, or text management in representing and pro-
subsequent evaluation and learning) cessing unstructured textual passages.
 Control of knowledge and processing (ensuring integ- Another class of DSSs is based on the notion of a solver
rity, quality, security, and privacy) an executable algorithm that solves any member of a
 Coordination of knowledge and processing (e.g., rout- particular class of problems. Solver management is con-
ing communications among participants, guiding cerned with storage and use of a collection of solvers. Two
workflows, promoting incentives to participants, inter- approaches to solver-oriented DSS are fixed and flexible. In
vening in negotiations, and enforcing processing prio- the fixed approach, solvers are part of the PPS, which
rities across concurrent decisional episodes) means that a solver cannot be easily added to, or deleted
from, the DSS nor readily modified. With the flexible
The generic DSS architecture gives us a common base approach, the PPS is designed to manipulate (e.g., create,
and fundamental terms for discussing, comparing, and delete, update, combine, and coordinate) solver modules
contrasting specific DSSs and classes of DSSs. held in the KS according to user requests.
The KS for a fixed solver-oriented DSS is typically able to
DSS Classes hold datasets (groupings of numbers organized according to
conventions required by the solvers). Many solvers can use
A useful way to look at KS contents and PPS abilities is in a dataset, and a given solver can feed on multiple datasets.
terms of the knowledge management techniques employed It is not uncommon for the KS to also hold editable problem
by a DSS (5,9). This gives rise to many special cases of the statements and report format descriptions. In addition to
generic DSS architecture, several classes of these being solver modules, the KS flexible approach also accommo-
considered here. dates datasets and perhaps problem statements or report
A text-oriented DSS supports decision makers by keep- formats. Each module requires certain data to be available
ing track of textually represented DPR knowledge that for its use before its instructions can be carried out. Some of
could have a bearing on decisions (30,31). It allows docu- that data may already exist in KS datasets. The remaining
ments to be created, revised, and reviewed by decision data must either be furnished by the user (i.e., in the
makers on an as-needed basis. The viewing can be explora- problem statement) or produced by executing other mod-
tory browsing in search of stimulation or a focused search ules. In other words, a single module may not be able to
for some particular piece of knowledge needed in the man- solve some problems. Yet they can be solved by executing a
ufacture of a decision. In either event, there is a problem certain sequence of modules. The results of carrying out
with traditional text management: It is not convenient to instructions in the first module are used as data inputs in
trace a flow of ideas through separate pieces of text in the executing the second module, whose results become data
KS, as there are no explicit relationships among them. for the third or subsequent module executions, and so forth,
This limitation is remedied in a hypertext-oriented DSS, until a solution is achieved. Thus, the PPS coordinates the
whose KS is comprised of pieces of text explicitly linked to executions of modules that combine to make up the solver
other pieces of text that are conceptually related to it. The for a users problem statement.
PPS capabilities include creation, deletion, and traversal of Another special case of the generic DSS architecture
nodes and links. The hypertext-oriented DSS supplements involves representing and processing rules (i.e., reasoning
a decision makers own associative capabilities by accu- knowledge), (21,39). The KS of a rule-oriented DSS holds
rately storing and recalling large volumes of concepts and one or more rule sets, each pertaining to reasoning about
connections (32,33). what recommendation to give a user seeking advice on some
Another special case of the DSS architecture uses the subject. In addition to rule sets, it is common for the KS to
database technique of knowledge management, especially contain descriptions of the current state. A user can request
relational and multidimensional approaches. Database- advice and explanation of the rationale for that advice. The
oriented DSSs have been used since the early years of PPS can do logical inference (i.e., to reason) with a set of
the DSS field (3436), tending to handle rigidly structured, rules to produce advice sought by a user. The problem
often extremely voluminous, descriptive knowledge. The processor examines pertinent rules in a rule set, looking
PPS is a database control system, plus an interactive query for those whose premises are true for the current situation.
processing system and/or various custom-built processing This situation is defined by current state descriptions and
systems, to satisfy user requests. Data warehouses (37) and the users request for advice. When the PPS finds a true
data marts belong to this DSS class. premise, it takes the actions specified in that rules conclu-
Well known for solving what-if problems, spreadsheet- sion. This action sheds additional light on the situation,
oriented DSSs are in widespread use (38). The KS holds which allows premises of still other rules to be established
descriptive and procedural knowledge in spreadsheets. as true, which causes actions in their conclusions to be
Using the spreadsheet technique, a DSS user not only taken. Reasoning continues in this way until some action is
can create, view, and modify procedural knowledge held taken that yields the request advice or the PPS gives up
in the KS but also can tell the PPS to carry out the because of insufficient knowledge in its KS. The PPS also
DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS 9

has the ability to explain its behavior both during and after participants (9). It is possible that an MDSS supports
conducting the inference. negotiations among participants to resolve points of con-
Rule-based inference is an artificial intelligence techni- tention. If so, it is a negotiation support system (NSS) as
que. A rule-oriented DSS is an example of what is called an well as being a GDSS or ODSS.
intelligent DSS (21,39). Generally, any of the DSS cate- The KS and/or PPS of an MDSS can be distributed across
gories can include systems that incorporate artificial intel- multiple computers, which may be in close physical proxi-
ligence mechanisms to enhance their problem processing mity (e.g., an electronic meeting room) or dispersed world-
capabilities. These mechanisms include natural language wide (e.g., as Internet nodes). Participants in the decision
processing (for understanding and interpreting natural may interact at the same time or asynchronously. Although
language), intelligent tutoring features (for offering help MDSSs can take on any of the characteristics and employ
to users), machine learning approaches such as genetic any of the knowledge management techniques discussed
algorithms or neural networks (for giving a DSS the ability above, their hallmark is a focus on strong PPS coordination
to adapt its behavior based on its experiences), knowledge ability, perhaps with some control and measurement abil-
representation approaches such as semantic networks ities as well. Examples of such ability includes (41-43):
(for KS enrichment), search strategies (for knowledge selec-
tion and acquisition), and intelligent agent architectures  PPS controls what communication channels are open
(for event monitoring, collaborative processing, etc). for use at any given time.
Each foregoing DSS class emphasizes a single knowl-  PPS guides deliberations in such ways as monitoring
edge management technique, supporting users in ways and adjusting for the current state of participants
that cannot be easily replicated by DSSs based on different work, requiring input from all participants, permitting
techniques. If a user needs the kinds of support offered by input to be anonymous, enforcing a particular coordi-
multiple knowledge management techniques, there are two nation method (e.g., nominal group technique), and
basic options: handling/tabulating participant voting.
 PPS continually gathers, organizes, filters, and for-
 Use multiple DSSs, each oriented toward a particular mats public materials generated by participants dur-
technique. ing the decision-making process, electronically
 Use a single DSS that encompasses multiple techni- distributing them to participants periodically or on
ques. demand; it permits users to transfer knowledge readily
from private to public portions of the KS (and vice
The latter is a compound DSS, having a PPS equipped versa) and perhaps even from one private store to
with the knowledge manipulation abilities of two or more another.
techniques. The KS holds knowledge representations asso-  PPS continually tracks the status of deliberations as a
ciated with all of these techniques. A good example of a basis for giving cues to participants (e.g., who has
compound DSS is evident in the architecture introduced by viewed or considered what, where are the greatest
Sprague and Carlson (40), which combines database man- disagreements, where is other clarification or analysis
agement and solver management into a single system, so needed, when is there a new alternative to be consid-
that solvers (aka models) can operate against full-scale ered, and who has or has not voted).
databases instead of datasets. Online analytic processing
 PPS regulates the assignment of participants to roles
systems when operating against data warehouses belong to
(e.g., furnishing an electronic market in which they bid
this class of compound DSSs. Software tools such as Knowl-
for the opportunity to fill roles).
edgeMan (aka the Knowledge Manager) and Guru have
been used as prefabricated PPSs for building compound  PPS implements an incentive scheme designed to
DSSs, synthesizing many knowledge management techni- motivate and properly reward participants for their
ques in a single system (5,35,39). Such prefabricated PPSs contributions to decisions.
are a realization of the concept of a generalized problem  By tracking what occurred in prior decision-making
processing system (9,10). sessions, along with recording feedback on the results
Another important class, multiparticipant decision for those sessions (e.g., decision quality, process inno-
support systems (MDSSs), involves DSSs specifically vation), a PPS enables the MDSS to learn how to
designed to support decision-making efforts of a decision coordinate better or to avoid coordination pitfalls in
maker comprised of multiple participants. An MDSS that the future.
supports a group decision maker is called a group decision
support system (GDSS). An MDSS that supports other For each of these abilities, a PPS may range from offer-
kinds of multiparticipant decision makers, such as hier- ing relatively primitive to relatively sophisticated features.
archic teams, project teams, firms, agencies, or markets, is Thus, the KS of an MDSS typically includes a group/
called an organizational decision support system (ODSS). organization memory of what has occurred in decisional
Compared with a group, an organization has greater episodes. In addition to public knowledge that can be
differentiation/specialization of participant roles in the selected by any/all participants, the KS may also accom-
decision making, greater coordination among these roles, modate private knowledge spaces for each participant.
greater differentiation in participants authority over the Similarly, the LS (and PS) may include both a public
decision, and more structured message flows among language (and presentations) comprising messages suited
10 DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS

to all participants and private languages (and presenta-  Accommodates users who perform different organiza-
tions) available to specific participants. In addition to the tional functions and who occupy different positions in
kinds of users noted in Fig. 1, an MDSS may also interact the organizations hierarchical levels
with a facilitator(s), who helps the participants (individu-  Is primarily concerned with decisions that cut across
ally and collectively) make effective use of the MDSS. organizational units or impact corporate issues
A GDSS seeks to reduce losses that can result from
working as a group, while keeping (or enhancing) the and organizes candidate technologies for ODSS develop-
gains that group work can yield (44). DeSanctis and Gallupe ment into several categories:
(45) identify three levels of GDSSs, differing in terms of
features they offer for supporting a group decision maker. A  Technologies to facilitate communication within the
Level-1 GDSS reduces communication barriers that would organization and across the organizations boundaries
otherwise occur among participants, stimulating and has-  Technologies to coordinate use of resources involved in
tening messages exchanges. A Level-2 GDSS reduces uncer-
decision making
tainty and noise that can occur in a groups decision
process via various systematic knowledge manipulation
 Technologies to filter and summarize knowledge (e.g.,
techniques like those encountered in the DSS classes pre- intelligent agents)
viously described. A Level-3 GDSS governs timing, content,  Technologies to track the status of the organization
or patterns of messages exchanged by participants, actively and its environment
driving or regulating a groups decision process.  Technologies to represent and process diverse kinds of
Nunamaker et al. (44) draw the following conclusions knowledge needed in decision making
from their observations of GDSSs in the laboratory and the  Technologies to help the organization and its partici-
field: pants reach decisions

 Parallel communication encourages greater participa- Computer systems designed for specific business pro-
tion and reduces the likelihood of a few participants cesses, such as customer relationship management,
dominating the proceedings. product lifecycle management, and supply chain manage-
 Anonymity reduces apprehensions about participating ment are evolving from an initial emphasis on transaction
and lessens the pressure to conform, allowing for more handling and reporting, to increasingly offer decision
candid interactions. support characteristics. As such, they can be considered
 Existence of a group memory makes it easier for par- to be ODSSs. The most extensive of these systems are
ticipants to pause and ponder the contributions of enterprise resource planning systems, which seek to inte-
others during the session, as well as preserving a grate traditionally distinct business applications into a
permanent record of what has occurred. single system with a common knowledge store. Although
 Process structuring helps keep the participants these systems often regarded from the perspectives of data
focused on making the decision, reducing tendencies processing and management information systems,
toward digression and unproductive behaviors. research indicates that enterprise systems do have some
ODSS features and do provide decision support benefits to
 Task support and structuring give participants the
organizations (25,28). Their potential as decision support
ability to select and derive needed knowledge.
platforms is increasingly reflected in new product offerings
of software vendors.
The notion of an ODSS has long been recognized, with an
Although some GDSSs and ODSSs have features that
early conception viewing an organizational decision maker
can benefit negotiators, these features have not been the
as a knowledge processor having multiple human and multi-
central motive or interest of such systems. DSSs designed
ple computer components, organized according to roles and
specifically for supporting negotiation activities are called
relationships that divide their individual labors in alterna-
negotiationsupport systems. Pioneering tools for NSS
tive ways in the interest of solving a decision problem facing
development include NEGO, a PPS designed to help nego-
the organization (46). Each component (human or machine)
tiators change their strategies, form coalitions, and evalu-
is an intelligent processor capable of solving some class of
ate compromises (48), and NEGOPLAN, an expert system
problems either on its own or by coordinating the efforts of
shell that represents negotiation issues and decomposes
other componentspassing messages to them and receiving
negotiation goals to help examine consequences of different
messages from them. The key ideas in this early framework
negotiation scenarios (49). See Refs. 50 and 51 for surveys of
for ODSS are the notions of distributed problem solving by
NSS software and Ref. 52 for a formal theoretical founda-
human and machine knowledge processors, communication
tion of NSSs.
among these problem solvers, and coordination of interre-
lated problem-solving efforts in the interest of solving an
overall decision problem. To date, organizational DSSs have CONCLUSION
not received nearly as much attention as group DSSs.
George (47) identifies three main ODSS themes: Decision support systems have major socioeconomic
impacts and are so pervasive as to be practically invisible.
 Involves computer-based technologies and may The study and application of DSSs comprises a major
involve communication technology subject area within the information systems discipline.
DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS 11

This extensive area, has unifying principles rooted in 16. C. W. Holsapple and K. D. Joshi, A formal knowledge manage-
knowledge management and the generic architecture ment ontology: conduct, activities, resources, and influences,
shown in Fig. 1; it is also an area rich in diversity, nuances, J. Amer. Soc. Infor. Sci. Technol., 55(7): 2004.
and potential for additional advances. For a thorough, 17. T. P. Gerrity, Design of man-machine decision systems: an
in-depth appreciation of the DSS area, consult the two- application to portfolio management, Sloan Management
volume Handbook on Decision Support Systems(53), the Review, Winter, 1971.
flagship journal Decision Support Systems, the DSS appli- 18. M. S. Scott Morton, Management Decision Systems: Computer-
cations-intensive Interfaces, the Journal of Decision Sys- Based Support for Decision Making, Cambridge, MA: Division
of Research, Harvard University, 1971.
tems, Journal of Data Warehousing, and Business
Intelligence Journal. 19. S. L. Alter, Decision Support Systems: Current Practice and
Continuing Challenges, Reading, MA: Addison-Wesley, 1980.
For all their value, we must keep in mind the fact that
DSSs have limitations. They cannot make up for a faulty 20. R. H. Bonczek, C. W. Holsapple and A. B. Whinston, The
evolving roles of models within decision support systems,
(e.g., irrational) decision maker, and the efficacy of the
Decision Sciences, April, 1980.
support they provide is constrained by the extent and
21. R. H. Bonczek, C. W. Holsapple, and A. B. Whinston, Future
quality of their knowledge systems relative to the decision
directions for developing decision support systems, Decision
situation being faced (9). Their effectiveness is influenced Sciences, October, 1980.
by such factors as adequacy of a users problem formula-
22. R. A. Seaberg and C. Seaberg, Computer-based decision sys-
tions, capture of relevant variables, and timely and accu- tems in Xerox corporate planning, Management Science, 20(4):
rate knowledge about the status of these decision 1973.
parameters. Ultimately, the value of a DSS does not derive 23. C. W. Holsapple and A. B. Whinston, A decision support system
simply from its existence, but it depends very much on how for area-wide water quality planning, Socio-Economic Plan-
it is designed, used, maintained, and evaluated, plus the ning Sciences, 10(6): 1976.
decision makers assumptions about the DSS. 24. R. H. Sprague, Jr., and H. J. Watson, A decision support system
for banks, Omega, 4(6): 1976.
BIBLIOGRAPHY 25. C. W. Holsapple and M. Sena, Decision support characteristics
of ERP systems, Internat. J. Human-Computer Interaction,
16(1): 2003.
1. T. W. Costello and S. S. Zalkind, Psychology in Administration:
A Research Orientation, Englewood Cliffs, NJ: Prentice Hall, 26. C. W. Holsapple, K. D. Joshi, and M. Singh, in M. Shaw (ed.),
1963. Decision support applications in electronic commerce, Hand-
book on Electronic Commerce, Berlin: Springer, 2000.
2. H. A. Simon, The New Science of Management Decision, New
York: Harper & Row, 1960. 27. C. W. Holsapple, Adapting demons to knowledge management
environments, Decision Support Systems, 3(4): 1987.
3. P. C. Fishburn, Decision and Value Theory, New York: John
Wiley, 1964. 28. C. W. Holsapple and M. Sena, ERP plans and decision support
benefits, Decision Support Systems, 38(4): 2005.
4. C. W. Churchman, Challenge to Reason, New York: McGraw-
Hill, 1968. 29. B. Dos Santos and C. W. Holsapple, A framework for design-
ing adaptive DSS interfaces, Decision Support Systems, 5(1):
5. C. W. Holsapple and A. B. Whinston, The Information Jungle,
1989.
Homewood, IL: Dow Jones-Irwin, 1988.
30. J. Fedorowicz, Evolving technology for document-based DSS,
6. H. Mintzberg, The Nature of Managerial Work, Englewood
in R. Sprague, Jr. and H. Watson (eds.), Decision Support
Cliffs, NJ: Prentice Hall, (first published in 1973), 1980.
Systems: Putting Theory into Practice, 2nd ed., Englewood
7. H. A. Simon, Models of Man, New York: John Wiley, 1957. Cliffs, NJ: Prentice-Hall, 1989.
8. P. G. W. Keen and M. S. ScottMorton, Decision Support 31. P. G. W. Keen, Decision support systems: The next decade,
Systems: An Organizational Perspective, Reading, MA: Addi- Decision Support Systems, 3(3): 1987.
son-Wesley, 1978.
32. M. Bieber, Automating hypermedia for decision support,
9. C. W. Holsapple and A. B. Whinston, Decision Support Sys- Hypermedia, 4(2): 1992.
tems: A Knowledge-Based Approach, St. Paul, MN: West, 1996.
33. R. P. Minch, Application research areas for hypertext in deci-
10. R. H. Bonczek, C. W. Holsapple, and A. B. Whinston, Founda- sion support systems, J. Managem. Informat. Syst., 6(2): 1989.
tions of Decision Support Systems, New York: Academic Press,
34. R. C. Bonczek, C. W. Holsapple, and A. B. Whinston, A decision
1981.
support system for area-wide water quality planning, Socio-
11. I. L. Janis and I. Mann, Decision Making: A Psychological Economic Planning Sciences, 10(6): 1976.
Analysis of Conflict, Choice, and Commitment, New York:
35. J. D. Joyce and N. N. Oliver, Impacts of a relational information
The Free Press, 1977.
system in industrial decisions, Database, 8(3): 1977.
12. C. W. Holsapple, Knowledge management in decision making
36. R. L. Klaas, A DSS for airline management, Database, 8(3):
and decision support, Knowledge and Policy: The Internat.
1977.
J. Knowledge Trans. Utilization, 8(1): 1995.
37. P. Gray and H. J. Watson, Decision Support in the Data Ware-
13. A. Newell, The knowledge level, Artificial Intelli., 18(1): 1982.
house, Upper Saddle River, NJ: Prentice-Hall, 1998.
14. C. W. Holsapple, The inseparability of modern knowledge
38. P. B. Cragg and M. King, A review and research agenda for
management and computer-based technology, J. Knowledge
spreadsheet based DSS, International Society for Decision
Management, 9(1): 2005.
Support Systems Conference, Ulm, Germany, 1992.
15. C. W. Holsapple, Knowledge and its attributes, in C. W.
39. C. W. Holsapple and A. B. Whinston, Managers Guide to
Holsapple (ed.), Handbook on Knowledge Management, Vol.
Expert Systems, Homewood, IL: Dow Jones-Irwin, 1986.
1, Berlin: Springer, 2003.
12 DECISION SUPPORT SYSTEMS: FOUNDATIONS AND VARIATIONS

40. R. H. Sprague, Jr. and E. D. Carlson, Building Effective 49. S. Matwin, S. Szpakowicz, E. Koperczak, G. Kersten, and W.
Decision Support Systems, Englewood Cliffs, NJ: Prentice Michalowski, Negoplan: An expert system shell for negotiation
Hall, 1982. support, IEEE Expert, 4(1): 1989.
41. C. Ching, C. W. Holsapple, and A. B. Whinston, Reputation, 50. R. C. Anson and M. T. Jelassi, A developmental framework for
learning, and organizational coordination, Organization computer-supported conflict resolution, European J. Opera-
Science, 3(2): 1992. tional Res., 46: 1990.
42. J. A. Hoffer and J. S. Valacich, Group memory in group support 51. M. Jelassi and A. Foroughi, Negotiation support systems: An
systems: A foundation for design, in L. Jessup and J. Valacich overview of design issues and existing software, Decision Sup-
(eds.), Group Support Systems: New Perspectives, New York: port Systems, 5(2): 1989.
Macmillan, 1993. 52. C. W. Holsapple, H. Lai, and A. B. Whinston, A formal basis for
43. M. Turoff, M. S. R. Hiltz, A. N. F. Bahgat, and A. R. Rana, negotiation support system research, Group Decision and
Distributed group support systems, MIS Quarterly, 17(4): Negotiation, 7(3): 1995.
1993. 53. F. Burstein and C. W. Holsapple, Handbook on Decision Sup-
44. J. F. Nunamaker, Jr.A. R. Dennis, J. S. Valacich, D. R. Vogel, port Systems, Berlin: Springer, 2008.
and J. F. George, Group support systems research: Experience
from the lab and field, in L. Jessup and J. Valacich (eds.), Group
Support Systems: New Perspectives, New York: Macmillan, FURTHER READING
1993.
45. G. DeSanctis and R. B. Gallupe, A foundation for study of group R. H. Bonczek, C. W. Holsapple, and A. B. Whinston, Aiding
decision support systems, Management Science, 33(5): 1987. decision makers with a generalized database management system,
46. R. H. Bonczek, C. W. Holsapple, and A. B. Whinston, Computer Decision Sciences, April, 1978.
based support of organizational decision making, Decision P. B. Osborn and W. H. Zickefoose, Building expert systems from
Sciences, April, 1979. the ground up, AI Expert, 5(5): 1990.
47. J. F. George, The conceptualization and development of orga-
nizational decision support systems, J. Management Inform.
Sys., 8(3): 1991. CLYDE W. HOLSAPPLE
University of Kentucky
48. G. Kersten, NEGOgroup decision support system, Inform.
Lexington, Kentucky
and Management, 8: 1985.
D
DEDUCTIVE DATABASES An atomic formula is ground if it consists of a predicate
with k arguments, where the arguments are constants.
INTRODUCTION Examples of ground atomic formulas are supplies(acme,
shovels), and supplies (acme, screws), whose intended
The field of deductive databases is based on logic. The meaning is: The Acme Corporation supplies shovels
objective is to derive new data from facts in the database and screws. An example of a disjunction is: supplierlo-
and rules that are provided with the database. In the c(acme, boston) _ supplierloc(acme, washington), whose
Background section, a description is provided of a deduc- intended meaning is: The Acme Corporation is located
tive database, of a query and of an answer to a query in a either in Boston or in Washington, or in both locations.
deductive database. Also discussed is how deductive Corresponding to an atomic formula, there is a relation
databases extend relational databases (see RELATIONAL that consists of all tuples whose arguments are in an
DATABASES) and form a subset of logic programming atomic formula with the same name. For the supplies
(see AI LANGUAGES AND PROCESSING). In the Historical predicate, there is a relation, the SUPPLIES relation,
Background of Deductive Databases section, we discuss that consists of a set of tuples (e.g., {< acme, shovels >, <
the pre-history, the start of the field, and the major acme, screws >}) when the SUPPLIES relation consists of
historical developments including the formative years the above two facts. In a relational database, the EDB
and initial prototype systems. Then we first present consists only of atoms. Throughout the article, predicate
Datalog databases with recursion but without negation letters are written in lower case and arguments of pre-
and also explain semantic query optimization (SQO) and dicates that are constants are also written in lower case,
cooperative answering; then we introduce default nega- whereas upper-case letters denote variables.
tion for stratified databases; discuss current stratified The intensional database consists of a set of rules of the
prototype systems; the introduction of deductive database form:
concepts into the relational database language SQL:99;
why the deductive database technology has not led to L1 ; . . . ; Ln M1 ; . . . ; Mm ; not Mm1 ; . . . ; not Mml 1
commercial systems; and introduce the concept of nonstra-
tified deductive databases. The Disjunctive Deduc- where the Li and the Mj are atomic formulas and not
tive Databases section describes incomplete databases, is default negation (discussed below). Intensional rules
:
denoted Datalogdisj , that permit more expressive knowl- are universally quantified and are an abbreviation of the
edge base systems. We discuss the need for disjunction in formula:
knowledge base systems; disjunctive deductive databases
that do not contain default negation; the extension of dis- 8 X1 . . . ; Xk L1 _ . . . _ Ln M1 ^ . . . ^ Mm ^ not Mm1
junctive systems to include default and logical negation; the ^ . . . ^ not Mml
extension of the answer set semantics to incorporate
default negation; and methods to select an appropriate where the X1, . . . , Xk lists all free variables.
semantics. In the next section, implementations of A rule with n 0 is either a query or an integrity
nonstratified deductive and disjunctive databases are constraint. When n > 0, the rule is either an IDB rule
presented and we define a knowledge base system in terms used to derive data or it may be an integrity constraint
of the extensions to relational databases described in this that restricts what tuples may be in the database. Rules for
article. The Applications section has brief descriptions of which n  1 and l 0 are called Horn rules.
some of the applications of deductive databases: data inte- DDBs restrict arguments of atomic formulas to con-
gration, handling preferences, updates, AI planning, and stants and variables, whereas in first-order logic atomic
handling inconsistencies. The Final section summarizes formulas may also contain function symbols as argu-
the work. ments, which assures that answers to queries in DDBs
are finite1. Rules may be read either declaratively or
BACKGROUND procedurally. A declarative reading of Formula (1) is:

A deductive database is an extension of a relational L1 or L2 or . . . or Ln is true if M1 and M2 and . . . and Mm


database. Formally, a deductive database, (DDB) is a and not Mm1 and . . . and not Mml are all true.
triple, < EDB, IDB, IC >, where EDB is a set of facts,
called the extensional database, IDB is a set of rules, A procedural reading of Formula (1) is:
called the intensional database, and IC is a set of inte-
grity constraints. A DDB is based on first-order logic. An
atomic formula is a k-place predicate letter whose argu-
ments are constants or variables. Atomic formulas eval- 1
When there are function symbols, an infinite number of terms may
uate to true or false. The EDB consists of ground atomic be generated from the finite number of constants and the function
formulas or disjunctions of ground atomic formulas. symbols; hence, the answer to a query may be infinite.
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 DEDUCTIVE DATABASES

L1 or L2 or . . . or Ln are solved if M1 and M2 and . . . and Example 1 (Ancestor). Consider the following database
Mm and not Mm1 and . . . and not Mml are solved. that consists of parents and ancestors. The database con-
sists of two predicates, whose schema are p(X, Y), intended
The left-hand side of the implication, L1 or . . . or Ln, is called to mean that Y is a parent of X, and a(X, Y), intended to
the head of the rule, whereas the right-hand side, mean that Y is an ancestor of X. The database consists of
five EDB statements and two IDB rules:
M1 and M2 and . . . and Mm and not Mm1 and . . . and not
Mml is called the body of the rule. r1. p(mike, jack)
r2. p(sally, jack)
Queries to a database, QX1 ; . . . ; Xr ; are of the form r3. p(katie, mike)
9 X1 . . . 9 Xr L1 ^ L2 . . . ^ Ls , written as L1 ; L2 ; . . . ;Ls ,
r4. p(beverly, mike)
where s  1, the Li are literals and the Xi ; 1  i  r; are
the free variables in Q. An answer to a query has the form r5. p(roger, sally)
< a11 ; . . . ; a1r > < a21 ; . . . ; a2r > . . . < ak1 ; . . . ; akr > r6. a(X, Y) p(X, Y)
such that Qa11 ; . . . ; a1r _ Qa21 ; . . . ; a2r _ . . . _ Qak1 ; . . . ; r7. a(X, Y) p(X, Z), a(Z, Y)
akr is provable from the database, which means that an
inference system is used to find answers to queries. The answer to the question p(mike, X) is jack. The answer
DDBs are closely related to logic programs when the to the question a(mike, X) is jack using rule r6. An answer to
facts are restricted to atomic formulas and the rules have the query a(roger, X) is sally using rule r6. Another answer
only one atom in the left-hand side of a rule. The main to the query a(roger, X), jack, is found by using rule r7.
difference is that a logic program query search is for a single For the query p(katie, jack), the answer by the CWA is
answer, proceeding top-down from the query to an answer. no; jack is not a parent of katie. The reason is that there
In DDBs, searches are bottom-up, starting from the facts, are only five facts, none of which specify p(katie, jack), and
to find all answers. A logic program query might ask for there are no rules that can be used to find additional
an item supplied by a supplier, whereas in a deductive parents.
database, a query asks for all items supplied by a supplier.
DDBs restricted to atoms as facts, and rules that consist of More expressive power may be obtained in a DDB by
single atoms on the left-hand side of a rule and atoms on the allowing negated atoms on the right-hand side of a rule. The
right-hand side of a rule that do not contain the default rule semantics associated with such databases depends on how
for negation, not, are called Datalog databases, (i.e., rules in the rule of negation is interpreted, as discussed in the
Formula(1), where n 1; m  0, and l 0). Rules in Data- Datalog and Extended Deductive Databases section and
log databases may be recursive. A traditional relational the Disjunctive Deductive Databases section.
database is a DDB where the EDB consists of atoms and
IDB rules are not recursive. HISTORICAL BACKGROUND OF DEDUCTIVE DATABASES
There are several different concepts of the relationship
of integrity constraints to the union of the EDB and the The prehistory of DDBs is considered to be from 1957 to
IDB in the DDB. Two such concepts are consistency and 1970. The efforts in this period used primarily ad hoc or
simple approaches to perform deduction. The period 1970 to
theoremhood. In the consistency approach (proposed by
Kowalski), the IC must be consistent with ED B [ I DB. 1978 were the formative years, which preceded the start of
In the theoremhood approach (proposed by Reiter and by the field. The period 1979 to 2003 saw the development of a
Lloyd and Topor), each integrity constraint must be a theoretical framework and prototype systems.
theorem of EDB [ IDB.
Prehistory of Deductive Databases
To answer queries that consist of conjunctions of posi-
tive and default negated atoms in Datalog requires that In 1957, a system called ACSI-MATIC was under develop-
semantics be associated with negation because only posi- ment to automate work in Army intelligence. An objective
tive atoms can be derived from Datalog DDBs. How one was to derive new data based on given information and
interprets the semantics of default negation can lead to general rules. Chains of related data were sought and the
different answers. Two important semantics for handling data contained reliability estimates. A prototype system
default negation are termed the closed-world assumption was implemented to derive new data whose reliability
(CWA), due to Reiter, and negation-as-finite-failure (NFF), values depended on the reliability of the original data.
due to Clark. In the CW A, failure to prove the positive The deduction used was modus ponens (i.e., from p and
atom implies that the negated atom is true. In the NFF, p ! q, one concludes q, where p and q are propositions).
predicates in the EDB and the IDB are considered the Several DDBs were developed in the 1960s. Although
if portion of the database and are closed by effectively in 1970 Codd founded the field of Relational Databases,
reversing the implication to achieve the only if part of relational systems were in use before then. In 1963, using
the database. The two approaches lead to slightly different a relational approach, Levien and Maron developed a sys-
results. Negation, as applied to disjunctive theories, is tem, Relational Data File (RDF), that had an inferential
discussed later. capability, implemented through a language termed
INFEREX. An INFEREX program could be stored in the
system (such as in current systems that store views) and
re-executed, if necessary. A programmer specified reason-
DEDUCTIVE DATABASES 3

ing rules via an INFEREX program. The system handled a query, and how one deals with negation. Clark pre-
credibility ratings of sentences in forming deductions. sented an alternative theory of negation. He introduced
Theoretical work by Kuhns on the RDF project recognized the concept of if-and-only-if conditions that underly the
that there were classes of questions that were, in a sense, meaning of negation, called negation-as-finite-failure.
not reasonable. For example, let the database consist of The Reiter and Clark papers are the first to formally
the statement, Reichenbach wrote Elements of Symbolic define default negation in logic programs and deductive
Logic. Whereas the question, What books has Reichen- databases. Several implementations of deductive data-
bach written?, is reasonable, the questions, What books bases were reported. Chang developed a system called
has Reichenbach not written?, or, Who did not write DEDUCE; Kellogg, Klahr, and Travis developed a system
Elements of Symbolic Logic?, are not reasonable. It is called Deductively Augmented Data Management System
one of the first times that the issue of negation in queries (DADM); and Minker described a system called Maryland
was explored. Refutation Proof Procedure 3.0 (MRPPS 3.0). Kowalski
In 1964, Raphael, for his Ph.D. thesis at M.I.T., devel- discussed the use of logic for data description. Darvas,
oped a system called Semantic Information Retrieval (SIR), Futo, and Szeredi presented applications of Prolog to drug
which had a limited capability with respect to deduction, data and drug interactions. Nicolas and Yazdanian described
using special rules. Green and Raphael subsequently desi- the importance of integrity constraints in deductive data-
gned and implemented several successors to SIR: QA  1, a bases. The book provided, for the first time, a comprehensive
re-implementation of SIR; QA  2, the first system to description of the interaction between logic and databases.
incorporate the Robinson Resolution Principle developed References to work on the history of the development of
for automated theorem proving; QA  3 that incorporated the field of deductive databases may be found in Refs. 1 and
added heuristics; and QA  3.5, which permitted alter- 2. A brief description of the early systems is contained in
native design strategies to be tested within the context Ref. 1.
of the resolution theorem prover. Green and Raphael were
the first to recognize the importance and applicability Deductive Databases: Prototypes, 19792004
of the work performed by Robinson in automated theorem
During the period 1979 through today, a number of proto-
proving. They developed the first DDB using formal tech-
type systems were developed based on the Robinson Reso-
niques based on the Resolution Principle, which is a gen-
lution Principle and bottom-up techniques. Most of the
eralization of modus ponens to first-order predicate logic.
prototypes that were developed during this period either
The Robinson Resolution Principle is the standard method
no longer exist or are not supported. In this section, we
used to deduce new data in DDBs.
describe several efforts because these systems contributed
to developments that were subsequently incorporated into
Deductive Databases: The Formative Years 19691978
SQL as described in the SQL: 1999 section.
The start of deductive databases is considered to be These systems include Validity developed by Nicolas and
November 1977, when a workshop, Logic and Data Bases, Vieille; Coral, developed by Ramakrishnan at the University
was organized in Toulouse, France. The workshop included of Wisconsin; and NAIL!, developed by Ullman and his group
researchers who had performed work in deduction from at Stanford University. All of these prototypes introduced
1969 to 1977 and used the Robinson Resolution Principle to new techniques for handling deductive databases.
perform deduction. The Workshop, organized by Gallaire The Validity systems predecessor was developed at the
and Nicolas, in collaboration with Minker, led to the pub- European Computer Research Consortium, was directed
lication of papers from the workshop in the book, Logic and by Nicolas, and started in 1984. It led to the study of
Data Bases, edited by Gallaire and Minker. algorithms and prototypes: deductive query evaluation
Many significant contributions were described in the methods (QSQ/SLD and others); integrity checking
book. Nicolas and Gallaire discussed the difference between (Soundcheck); hypothetical reasoning and IC checking;
model theory and proof theory. They demonstrated that the and aggregation through recursion.
approach taken by the database community was model Implementation at Stanford University, directed by
theoretic (i.e., the database represents the truths of the Ullman, started in 1985 on NAIL! (Not Another Implemen-
theory and queries are answered by a bottom-up search). tation of Logic!). The effort led to the first paper on recur-
However, in logic programming, answers to a query used sion using the magic sets method. See the Datalog
a proof theoretic approach, starting from the query, in a Databases section for a discussion of magic sets. Other
top-down search. Reiter contributed two papers. One contributions were aggregation in logical rules and
dealt with compiling axioms. He noted that if the IDB theoretical contributions to negation: stratified negation
contained no recursive axioms, then a theorem prover by Van Gelder, well-founded negation by Van Gelder,
could be used to generate a new set of axioms where the Ross and Schlipf, (see the Nonstratified Deductive Data-
head of each axiom was defined in terms of relations in a bases section for a discussion of stratification and well-
database. Hence, a theorem prover was no longer needed foundedness) and modularly stratified negation (3).
during query operations. His second paper discussed the Implementation efforts at the University of Wisconsin,
CWA, whereby in a theory, if one cannot prove that an directed by Ramakrishnan, on the Coral DDBs started in
atomic formula is true, then the negation of the atomic the 1980s. Bottom-up and magic set methods were imple-
formula is assumed to be true. Reiters paper elucidated mented. The declarative query language supports general
three major issues: the definition of a query, an answer to Horn clauses augmented with complex terms, set-grouping,
4 DEDUCTIVE DATABASES

aggregation, negation, and relations with tuples that con- To find if the negation of a ground atom is true, one can
tain universally quantified variables. subtract from the Herbrand base the minimal Herbrand
model. If the atom is contained in this set, then it is assumed
false. Alternatively, answering queries that consist of
DATALOG AND EXTENDED DEDUCTIVE DATABASES
negated atoms that are ground may be achieved using
negation-as-finite failure as described by Clark.
The first generalization of relational databases was to
Initial approaches to answering queries in DDBs did not
permit function-free recursive Horn rules in a database
handle recursion and were primarily top-down (or back-
(i.e., rules in which the head of a rule is an atom and the
ward reasoning). However, answering queries in relational
body of a rule is a conjunction of atoms). So, in Formula (1),
database systems was bottom-up (or forward reasoning) to
n 1, m  1 and l 0. These databases are called DDBs, or
find all answers. Several approaches were developed to
Datalog databases.
handle recursion, two of which are called the Alexander
and magic set methods, which make use of constants that
Datalog Databases
appear in a query and perform search by bottom-up reason-
In 1976, van Emden and Kowalski formalized the seman- ing. Rohmer, Lescoeur, and Kerisit introduced the Alex-
tics of logic programs that consist of Horn rules, where the ander method. Bancilhon, Maier, Sagiv, and Ullman
rules are not necessarily function-free. They recognized developed the concept of magic sets. These methods take
that the semantics of Horn theories can be characterized advantage of constants in the query and effectively com-
in three distinct ways: by model, fixpoint, or proof theory. pute answers using a combined top-down and bottom-up
These three characterizations lead to the same semantics. approach. Bry reconciled the bottom-up and top-down
When the logic program is function-free, their work pro- methods to compute recursive queries. He showed that
vides the semantics for Datalog databases. the Alexander and magic set methods based on rewriting
To better understand model theory we need to introduce and methods based on resolution implement the same top-
the concept of Herbrand universe, which is the set of con- down evaluation of the original database rules by means of
stants of the database. The Herbrand base is the set of all auxiliary rules processed bottom-up. In principle, handling
atoms that can be constructed from the predicates using recursion poses no additional problems. One can iterate
only elements from the Herbrand universe for the argu- search (referred to as the naive method) until a fixpoint is
ments. A set of atoms from the Herbrand base that satisfies reached, which can be achieved in a finite set of steps
all the rules is called a Herbrand model. because the database has a finite set of constants and is
Model theory deals with the collection of models that function-free. However, it is unknown how many steps will
captures the intended meaning of the database. Fixpoint be required to obtain the fixpoint. The Alexander and magic
theory deals with a fixpoint operator that constructs the set methods improve search time when recursion exists,
collection of all atoms that can be inferred to be true from such as for transitive closure rules.
the database. Proof theory provides a procedure that
finds answers to queries with respect to the database. Example 3 (Fixpoint). The fixpoint of a database is the
van Emden and Kowalski showed that the intersection set of all atoms that satisfy the EDB and the IDB. The
of all Herbrand models of a Horn DDB is the unique fixpoint may be found in a naive manner by iterating until
minimal model, which is the same as all of the atoms in no more atoms can be found. Consider Example 1 again.
the fixpoint and are exactly the atoms provable from the
theory. Step0 f. That is, nothing is in the fixpoint.
Step1 { p(mike, jack), p(sally, jack), p(katie, mike),
Example 2 (Example of Semantics). Consider Example 1. p(beverly, mike), p(roger, sally)}.
The unique minimal Herbrand model of the database is: These are all facts, and satisfy r1, r2, r3, r4, and r5. The
atoms in Step0 [ Step1 now constitutes a partial
M { p(mike, jack), p(sally, jack), p(katie, mike), p(bev- fixpoint.
erly, mike), p(roger, sally), a(mike, jack), a(sally,
Step2 {a(mike, jack), a(sally, jack), a(katie, mike),
jack), a(katie, mike), a(beverly, mike), a(roger, sally),
a(beverly, mike), a(roger, sally)}
a(katie, jack), a(beverly, jack), a(roger, jack)}.
are found by using the results of Step0 [ Step1 on
rules r6 and r7. Only rule r6 provides additional
These atoms are all true, and when substituted into the
atoms when applied. Step0 [ Step1 [ Step2
rules in Example 1, they make all of the rules true. Hence,
becomes the revised partial fixpoint.
they form a model. If we were to add another fact to the
model M, say, p(jack, sally), it would not contradict any of Step3 {a(katie, jack), a(beverly, jack), a(roger, jack)},
the rules, and it would also be a model. However, this fact which results from the previous partial fixpoint. These
can be eliminated because the original set was a model and were obtained from rule r7, which was the only rule
is contained in the expanded model. That is, minimal that provided new atoms at this step. The new partial
Herbrand models are preferred. It is also easy to see that fixpoint is Step0 [ Step1 [ Step2 [ Step3.
the atoms in M are the only atoms that can be derived from Step4 f. No additional atoms can be found that
the rules and the data. In Example 3, below, we show that satisfy the EDB [ IDB. Hence, the fixpoint iteration
these atoms are in the fixpoint of the database. may be terminated, and the fixpoint is Step0 [
Step1 [ Step2 [ Step3.
DEDUCTIVE DATABASES 5

Notice that this result is the same as the minimal only one answer is to be found and the search is terminated.
model M in Example 2. In other systems, equalities and other arithmetic con-
straints are being added to optimize search. One can envi-
Classes of recursive rules exist where it is known how sion the use of join elimination in SQO to be introduced to
many iterations will be required. These rules lead to what relational technology. One can now estimate when it will be
has been called bounded recursion, noted first by Minker useful to eliminate a join. The tools and techniques already
and Nicolas and extended by Naughton and Sagiv. Example exist and it is merely a matter of time before users and
4 illustrates bounded recursion. system implementers have them as part of their database
systems.
Example 4 (Bounded Recursion). If a rule is singular, then A topic related to SQO is that of cooperative answering
it is bound to terminate in a finite number of steps inde- systems. The objective is to give a user the reason why a
pendent of the state of the database. A recursive rule is particular query succeeded or failed. When a query fails,
singular if it is of the form one generally cannot tell why failure occurred. There may
be several reasons: The database currently does not contain
R F ^ R 1 ^ . . . ^ Rn information to respond to the user or there will never be an
answer to the query. The distinction may be useful. User
where F is a conjunction of possibly empty base relations constraints (UCs) are related to ICs. A user constraint is a
(i.e., empty EDB) and R, R1, R2, . . ., Rn are atoms that have formula that models a users preferences. It may omit
the same relation name if: answers to queries in which the user has no interest
(e.g., stating that, in developing a route of travel, the
1. each variable that occurs in an atom Ri and does user does not want to pass through a particular city) or
not occur in R only occurs in Ri; provide other constraints to restrict search. When UCs are
2. each variable in R occurs in the same argument identical in form to ICs, they can be used for this purpose.
position in any atom Ri where it appears, except Although ICs provide the semantics of the entire database,
perhaps in at most one atom R1 that contains all of UCs provide the semantics of the user. UCs may be incon-
the variables of R. sistent with a database. Thus, a separation of these two
semantics is essential. To maintain the consistency of the
Thus, the rule database, only ICs are relevant. A query may then be
thought of as the conjunction of the original query and
RX; Y; Z RX; Y 0 ; Z; RX; Y; Z0 the UCs. Hence, a query can be semantically optimized
based both on ICs and UCs.
is singular because (a) Y0 and Z0 appear, respectively, in the Other features may be built into a system, such as the
first and second atoms in the head of the rule (condition 1), ability to relax a query that fails, so that an answer to a
and (b) the variables X, Y, Z always appear in the same related query may be found. This feature has been termed
argument position (condition 2). query relaxation.
The major use of ICs has been to assure that a database The first article on magic sets may be found in Ref. 4. A
update is consistent. Nicolas showed how to improve the description of the magic set method to handle recursion in
speed of update, using techniques from DDBs. Reiter DDBs may be found in Refs. 5 and 6. References to work in
showed that Datalog databases can be queried with or bounded recursion may be found in Ref. 2. For work on
without ICs and the answer to the query is identical, which, fixpoint theory of Datalog, and the work of van Emden and
however, does not preclude the use of ICs in the query Kowalski, see the book by Lloyd,(7). A comprehensive
process. Although ICs do not affect the result of a query, survey and references to work in cooperative answering
they may affect the efficiency to compute an answer. ICs systems is in Ref. 8. References to alternative definitions of
provide semantic information about the data in the data- ICs, semantic query optimization, and the method of partial
base. If a query requests a join (see RELATIONAL DATABASES) for subsumption may be found in Ref. 2.
which there will never be an answer because of the con-
straints, this can be used to omit trying to answer the Stratified Deductive Databases
query and return the empty answer set and avoids unne- Logic programs that use default negation in the body of a
cessary joins on potentially large relational databases, or clause were first used in 1986. Apt, Blair, and Walker, and
performing a long deduction in a DDB. The use of ICs to Van Gelder introduced the concept of stratification to logic
constrain search is called semantic query optimization programs in which L1 and the Mj, 1  j  m l, in Formula
(SQO). McSkimin and Minker were the first to use ICs (1) are atomic formulas and there is no recursion through
for SQO in DDBs. Hammer and Zdonik as well as King first negation. They show that there is a unique preferred
applied SQO to relational databases. Chakravarthy, Grant, minimal model, computed from strata to strata. Przymu-
and Minker formalized SQO and developed the partial sub- sinski termed this minimal model the perfect model. When
sumption algorithm and method of residues, which provide a theory is stratified, rules can be placed in different strata,
a general technique applicable to any relational or DDB. where the definition of a predicate in the head of a rule is in
Godfrey, Gryz, and Minker applied the technique bottom- a higher stratum than the definitions of predicates negated
up. Semantic query optimization is being incorporated into in the body of the rule. The definition of a predicate is the
relational databases. In DB2, cases are recognized when collection of rules containing the predicate in their head.
6 DEDUCTIVE DATABASES

Thus, one can compute positive predicates in a lower stra- LDL. Implementation efforts at MCC, directed by
tum and a negated predicates complement is true in the Tsur and Zaniolo, started in 1984 and emphasized bot-
body of the clause if the positive atom has not been com- tom-up evaluation methods and query evaluation using
puted in the lower stratum. The same semantics is obtained such methods as seminaive evaluation, magic sets and
regardless of how the database is stratified. When the counting, semantics for stratified negation and set-group-
theory contains no function symbols, the DDB is termed ing, investigation of safety, the finiteness of answer sets,
Datalog : . If a database can be stratified, then there is no and join order optimization. The LDL system was imple-
recursion through negation, and the database is called mented in 1988 and released in the period 1989 to 1991. It
:
Datalogstrat . was among the first widely available DDBs and was dis-
tributed to universities and shareholder companies of
Example 5 (Stratified Program). The rules, MCC. This system evolved into LDL. No commercial
development is currently planned for the system.
r1 : p q; not r To remedy some of the difficulties discovered in applica-
r2 : q p tions of LDL, the system called LDL was designed in
r3 : q s the early 1990s. This system was finally completed as a
research prototype in 2000 at UCLA. LDL has many
r4 : s
innovative features particularly involving its language
constructs for allowing negation and aggregates in recur-
r5 : r t sion; its execution model is designed to support data inten-
sive applications, and its application testbed can be used to
comprise a stratified theory in which there are two strata. evaluate deductive database technology on domains such
The rule r5 is in the lowest stratum, whereas the other rules as middleware and data mining. In this summary, we
are in a higher stratum. The predicate p is in a higher concentrate on two language features. A thorough overview
stratum than the stratum for r because it depends negatively of the system is given in Ref. 9.
on r. q is in the same stratum as p because it depends on p. A special construct choice is used to enforce a functional
s is also in the same stratum as q. The meaning of the dependency integrity constraint. Consider the case with
stratified program is that {s, q, p} are true, whereas {t, r} student and professor data in which each student has one
are false. t is false because there is no defining rule for t. advisor who must be in the same department as the stu-
As t is false, and there is only one rule for r, r is false. s is dent. Suppose we have the following facts:
given as true, and hence, q is true. As q is true and r is
false, from rule r1, p is true. student( jeff, cs)
professor ( grant, cs)
Current Prototypes professor(minker, cs)
In this section, we discuss two systems that are currently The rule for eligible advisor is
active: Aditi and LDL. In addition, relational databases elig  advS; P studentS; Major;
such as Oracle and IBM DB2 have incorporated deductive professorP; Major
features from the language SQL, discussed in the next Thus, we deduce elig  adv(jeff, grant) and elig 
subsection. adv( jeff, minker). However, a student can have
only one advisor. The rule for advisor is
Aditi. The Aditi system has been under development
at the University of Melbourne under the direction of advisor(S, P) student(S, Major), professor(P, Major),
Dr. Ramamohanarao. A beta release of the system took choice((S), (P)).
place approximately in December 1997. Aditi handles Thus, choice enforces the functional dependency
stratified databases and recursion and aggregation in advisor : S ! P
stratified databases. It optimizes recursion with magic
sets and semi-naive evaluation. The system interfaces but the result is nondeterministic. It turns out that the use
with Prolog. Aditi continues to be developed. Its program- of choice in deductive databases has a well-behaved seman-
ming language is Mercury, which contains Datalog as a tics, works well computationally even in the case of stra-
subset. Aditi can handle transactions and has traditional tified negation, and leads to a simple definition of
recovery procedures as normally found in commercial data- aggregates, including user-defined aggregates.
bases. There is currently no security-related implementa- In the Stratified Deductive Databases section we dis-
tions in the system, but several hooks are available in the cussed stratification. LDL introduced the notion of an
system to add these features, which are contemplated for XY-stratified program. In the Background section we gave
future releases. However, parallel relational operations an example of the computation of ancestor. Here we show
have not been implemented. It is unclear if Aditi will be how to compute ancestors as well as how to count up the
developed for commercial use. number of generations that separate them from the person,
mike, in this case.
DEDUCTIVE DATABASES 7

delta  anc0; mike currently a part of the client server of IBMs DB2 system.
delta  ancJ 1; Y delta  ancJ; X; They are using the magic sets method to perform linear
parentY; X; not all  ancJ; Y recursion. Indications are that the ORACLE database sys-
all  ancJ 1; X all  ancJ; X tem will support some form of recursion.
all  ancJ; X delta  ancJ; X
Summary of Stratified Deductive Database Implementations

Assuming additional facts about parents, the query all As discussed, the modern era of deductive databases
anc(3, X) will give all great-grandparents (third- started in 1977 with the workshop Logic and Data Bases
generation ancestors) of Mike. This program is not strati- organized in Toulouse, France, that led to the publication of
fied, but it is XY-stratified, has a unique stable model the book Logic and Data Bases edited by Gallaire and
(see the Nonstratified Deductive Databases section), and Minker (11). As of the writing of this article, no commercial
allows for efficient computation. deductive databases are available. Among the prototype
systems developed, the only ones remaining are Aditi and
SQL:1999 LDL. There are no current plans to make LDL
commercially available. Aditi may, in the future, be
Many techniques introduced within DDBs are finding their
made commercially available, but it is not yet a commercial
way into relational technology. The new SQL standards for
product.
relational databases are beginning to adopt many of the
Deductive databases have had an influence in commer-
powerful features of DDBs. The SQL:1999 standard
cial relational systems. SQL:1999 adopted an approach to
includes queries involving recursion and hence recursive
SQL recursion that makes use of stratified negation. Thus,
views (10). The recursion must be linear with at most one
the use of recursive rules and stratified deductive data-
invocation of the same recursive item. Negation is stratified
bases can be handled to some extent in relational database
by allowing it to be applied only to predicates defined
systems that follow these rules.
without recursion. The naive algorithm must have a unique
There are two possible reasons why deductive databases
fixpoint, and it provides the semantics of the recursion;
have not been made commercially available. The first rea-
however, an implementation need not use the naive algo-
son is the prohibitive expense to develop such systems.
rithm.
They are more expensive to implement than were relational
To illustrate the syntax, we show an example of a
databases. The second reason is that relational database
recursive query. We assume a relation called family with
systems now incorporate deductive database technology, as
attributes child and parent. The query asks for all the
discussed above.
ancestors of John. We write this query in a way that is
As more sophisticated applications are developed that
more complicated than needed, just for illustration, by
are required for knowledge base systems (see section on
creating the relation ancestor recursively and then using
DDB, DDDB, and EDDB Implementations for Knowledge
it to find Johns ancestors.
Base Systems), additional tools will be required to handle
them. Some tools required for applications may be able to be
With Recursive Ancestor(child,anc) as added to SQL so that they may be incorporated into exten-
(Select child, parent sions of relational database technology. For example, add-
From Family ing a capability to provide cooperative answering may be
Union All one such tool (see Datalog Databases section). However,
Select Family.child, Ancestor.anc other tools needed will be difficult to incorporate into rela-
From Family, Ancestor tional technology. For example, handling inconsistent,
Where Family.parent Ancestor.child) incomplete, or disjunctive databases are examples of
Select anc such tools (see DDB, DDDB, and EDDB Implementations
From Ancestor for Knowledge Base Systems section). In the remainder of
Where child John; this article, we discuss developments in extending deduc-
tive database technology to be able to handle complicated
The language also allows for the specification of depth- databases, and we also discuss current prototype systems.
first or breadth-first traversal. Breadth-first traversal
would ensure that all parents are followed by all grand- Nonstratified Deductive Databases
parents, and so on.
Also in SQL:1999, a carryover from SQL-92, is a general The theory of stratified databases was followed by permit-
class of integrity constraints called Asserts, which allow for ting recursion through negation in Formula (1) where the
arbitrary relationships between tables and views to be L1 and Mj are atomic formulas, n 1; m  0; l  0. In the
declared. These constraints exist as separate statements context of DDBs, they are called normal deductive data-
in the database and are not attached to a particular table or bases. Many semantics have been developed for these
view. This extension is powerful enough to express the databases. The most prominent are the well-founded
types of integrity constraints generally associated with semantics of Van Gelder, Ross, and Schlipf and the stable
DDBs. semantics of Gelfond and Lifschitz. When the well-founded
:
Linear recursion, in which there is at most one subgoal of semantics is used, the database is called Datalognorm; wfs ;
any rule that is mutually recursive with the head, is and when the stable semantics is used, the database is
:
called Datalognorm; stable . The well-founded semantics leads
8 DEDUCTIVE DATABASES

to a unique three-valued model, whereas the stable seman- 1. if all the literals in the body of a rule of P are in S,
tics leads to a (possibly empty) collection of models. then L1 2 S; and
2. if S contains a pair of complementary literals, then
Example 6 [Non-Stratified Database]. Consider the data- S Lit. (That is, the extended deductive database is
base given by: inconsistent.)

r1 : pX not qX Every deductive database that does not contain default


r2 : qX not pX negation has a unique answer set, denoted by bP. The
r3 : ra pa answer set bP of an extended deductive database P that
r4 : ra qa contains default negation without variables, and hence is
said to be ground, is obtained as follows. Let S be a candi-
Notice that r1 and r2 are recursive through negation. Hence, date answer set and let PS be the program obtained from P
the database is not stratified. According to the well-founded by deleting
semantics, { p(a), q(a), r(a)} are assigned unknown. How-
1. each rule that has a default negation not L in its body
ever, for the stable model semantics, there are two minimal
with L 2 S, and
stable models: {{p(a), r(a)}, {q(a), r(a)}}. Hence, one can
conclude that r(a) is true and the disjunct, p(a) _ q(a), is 2. all default negations not L in the bodies of the remain-
also true in the stable model semantics. The stable model ing rules.
semantics has been renamed the answer set semantics and
throughout the remainder of this article, we will use that It is clear that PS does not contain not, so that bPS is
term. Because of the importance of this semantics, we dis- already defined. If this answer set coincides with S, then
cuss it in some detail below in a more expressive context. we say that S is an answer set of P. That is, the answer
sets of P are characterized by the equation S bPS .
Extended Deductive Databases As an example, consider the extended deductive data-
base P1 that consists of one rule:
The ability to develop a semantics for databases in which
rules have a literal (i.e., an atomic formula or the negation : q not p:
of an atomic formula) in the head and literals with possibly The rule intuitively states: q is false if there is no
negated-by-default literals in the body of a rule, has sig- evidence that p is true. The only answer set of this
nificantly expanded the ability to write and understand the program is : q. Indeed, here S f: qg, and
semantics of complex applications. Such rules, called
extended clauses, contain rules in Formula (1) where PS f: q g. Thus, answers to the queries p and q
n 1; m  0; l  0, and the Ls and Ms are literals. Such are unknown and false, respectively.
databases combine classical negation (represented by : )
and default negation (represented by not immediately pre- There have been several implementations that incor-
ceding a literal), and are called extended deductive data- porate the well-founded and the answer set semantics.
These systems can handle large knowledge bases that
bases. Combining classical and default negation provides
users greater expressive power. consist of data facts and rules. In addition, in the following
The material on answer set semantics is drawn from Ref. section, we discuss the extension of deductive systems to
12. For a comprehensive discussion of ANS semantics, see handle incomplete information and disjunctive informa-
tion. There have been implementations of such systems.
Ref. 13. The ANS semantics is important for Knowledge
In the DDB, DDDB, and EDDB Implementations for
Base Systems (KBS) semantics.
Knowledge Base Systems section, we describe the most
By an extended deductive database, P, is meant a collec-
important systems that contain the well-founded seman-
tion of rules of the form (1) where n 1 and the Mi, 1 
tics, the answer set semantics, or the disjunctive semantics.
i  m l , are literals.
The set of all literals in the language of P is denoted by
Lit. The collection of all ground literals formed by the DISJUNCTIVE DEDUCTIVE DATABASES
predicate p is denoted by Lit(p). The semantics of an
extended deductive database assigns to it a collection of The Need for Disjunction
its answer setssets of literals that correspond to beliefs
that can be built by a rational reasoner on the basis of P. In the databases considered so far, information is definite.
A literal : p is true in an answer set S if : p 2 S. We However, many applications exist where knowledge of the
say that not p is true in S if p 2= S. We say that Ps answer world is incomplete. For example, when a null value
set to a literal query q is yes if q is true in all answer sets appears as an argument of an attribute of a relation, the
of P, no if : q is true in all answer sets of P, and unknown value of the attribute is unknown. Also, uncertainty in
otherwise. databases may be represented by probabilistic information.
The answer set of P not containing default negation not Another area of incompleteness occurs when it is unknown
is the smallest (in the sense of set-theoretic inclusion) which among several facts are true, but it is known that one
subset S of Lit such that or more are true. It is, therefore, necessary to be able to
represent and understand the semantics of theories that
include incomplete data. The case in which there is dis-
DEDUCTIVE DATABASES 9

junctive information is discussed below. A natural exten- To answer positive queries over DDDBs, it is sufficient to
sion is to permit disjunctions in the EDB and disjunctions in show that the query is satisfied in every minimal model of
the heads of IDB rules. These rules are represented in the database. Thus, for the DDDB,fa _ bg, there are two
Formula(1), where n  1; m  0, and l  0, and are called minimal models, {{a}, {b}}. The query a is not satisfied in the
extended disjunctive rules. Such databases are called model {b}, and hence, it cannot be concluded that a is true.
extended disjunctive deductive databases (EDDDBs), or However, the query fa _ bg is satisfied in both minimal
:
Datalogdisj; ext . Below, we illustrate a knowledge base sys- models and hence the answer to the query fa _ bg is yes. To
tem that contains disjunctive information, logical negation answer negated queries, it is not sufficient to use Reiters
( : ), and default negation (not). CWA because, as he noted, from DB fa _ bg, it is not
possible to prove a, and it is not possible to prove b. Hence,
Example 7 (Knowledge Base (13)). Consider the database, by the CWA, not a and not b follow. But, {a _ b, not a, not b}
where p(X,Y) denotes X is a professor in department Y, is not consistent. The Generalized Closed World Assump-
a(X, Y) denotes individual X has an account on machine Y, tion (GCWA), developed by Minker, resolves this problem
ab(W, Z) denotes it is abnormal in rule W to be individual Z. by specifying that a negated atom is true if the atom does
We wish to represent the following information where not appear in any minimal model of the database, which
mike and john are professors in the computer science provides a model theoretic definition of negation. An
department: equivalent proof theoretic definition, also by Minker, is
that an atom a is considered false if whenever a _ C is
1. As a rule, professors in the computer science depart- proved true, then C can be proven true, where C is an
ment have m1 accounts. This rule is not applicable to arbitrary positive clause.
Mike, represented by ab(r4,mike) (that is, that it is Answering queries in DDDBs has been studied by sev-
abnormal that in rule r4 we have mike). He may or eral individuals. Fernandez and Minker developed the
may not have an account on that machine. concept of a model tree, a tree whose nodes consist of atoms.
2. Every computer science professor has either an m1 or Every branch of the model tree is a model of the database.
an m2 account, but not both. They show how one can incrementally compute sound and
complete answers to queries in hierarchical DDDBs, where
These rules are reflected in the following extended the database has no recursion. However, one can develop a
disjunctive database. fixpoint operator over trees to capture the meaning of a
DDDB that includes recursion. Fernandez and Minker
r1 pmike; cs compute the model tree of the extensional DDDB once.
r2 p john; cs To answer queries, intensional database rules may be
r3 : pX; Y not pX; Y invoked. However, the models of the extensional disjunc-
tive part of the database do not have to be generated for
r4 aX; m1 pX; cs; not abr4; X; not : aX; m1
each query. Their approach to compute answers gener-
r5 abr4; mike alizes to stratified and normal DDDBs.
r6 aX; m1 _ aX; m2 pX; cs; abr4; X Fernandez and Minker also developed a fixpoint char-
r7 : aX; m2 pX; cs; aX; m1 acterization of the minimal models of disjunctive and stra-
r8 : aX; m1 pX; cs; aX; m2 tified disjunctive deductive databases. They proved that
the operator iteratively constructs the perfect models
r9 aX; m2 : aX; m1; aX; cs
semantics (Przymusinski) of stratified DDBs. Given the
equivalence between the perfect model semantics of strati-
Rule r3 states that if by default negation p(X, Y) fails,
fied programs and prioritized circumscription as shown by
then p(X, Y) is logically false. The other rules encode the
Przymusinski, their characterization captures the mean-
statements listed above. From this formalization, one can
ing of the corresponding circumscribed theory. They pre-
deduce that john has an m1 account, whereas mike has
sent a bottom-up evaluation algorithm for stratified
either an m1 or an m2 account, but not both.
DDDBs. This algorithm uses the model-tree data structure
The semantics of DDDBs is discussed first, where to compute answers to queries.
clauses are given by Formula (1), literals are restricted Loveland and his students have developed a top-down
to atoms, and there is no default negation in the body of a approach when the database is near Horn, that is, there are
clause. Then the semantics of EDDDBs, where there are no few disjunctive statements. They developed a case-based
restrictions on clauses in Formula (1), is discussed. reasoner that uses Prolog to perform the reasoning and
introduced a relevancy detection algorithm to be used with
Disjunctive Deductive Databases (DDDBs) SATCHMO, developed by Manthey and Bry, for automated
theorem proving. Their system, termed SATCHMORE
The field of disjunctive deductive databases (DDDBs),
: (SATCHMO with RElevancy), improves on SATCHMO
referred to as Datalogdisj , started in 1982 by Minker who
by limiting uncontrolled use of forward chaining. There
described how to answer both positive and negated queries
are currently several efforts devoted to implementing dis-
in such databases. A major difference between the seman-
junctive deductive databases from a bottom-up approach,
tics of DDBs and DDDBs is that DDBs usually have a
prominent among these is the system DLV discussed in
unique minimal model, whereas DDDBs generally have
the next section.
multiple minimal models.
10 DEDUCTIVE DATABASES

Alternative semantics were developed for nonstratifi- oped. However, one way to assess the semantics desired is
able normal DDDBs by: Ross (the strong well-founded to consider the complexity of the semantics. Results have
semantics); Baral, Lobo, and Minker (Generalized Disjunc- been obtained for these semantics by Schlipf and by Eiter
tive Well-Founded Semantics (GDWFS)); Przymusinski and Gottlob.
(disjunctive answer set semantics); Przymusinski (station- Ben-Eliahu and Dechter showed that there is an inter-
ary semantics); and Brass and Dix (D-WFS semantics). esting class of disjunctive databases that are tractable. In
Przymusinski described a semantic framework for disjunc- addition to work on tractable databases, consideration has
tive logic programs and introduced the static expansions been given to approximate reasoning where one may give
of disjunctive programs. The class of static expansions up soundness or completeness of answers. Selman and
extends both the classes of answer sets, well-founded and Kautz developed lower and upper bounds for Horn (Data-
stationary models of normal programs, and the class of log) databases, and Cadoli and del Val developed techni-
minimal models of disjunctive programs. Any static expan- ques for approximating and compiling databases.
sion of a program P provides the corresponding semantics A second way to determine the semantics to be used is
for P consisting of the set of all sentences logically implied through their properties. Dix proposed criteria that are
by the expansion. The D-WFS semantics permits a general useful to consider in determining the appropriate seman-
approach to bottom-up computation in disjunctive pro- tics to be used. Properties deemed to be useful are: elimina-
grams. The Answer set semantics has been modified to tion of tautologies, where one wants the semantics to
apply to disjunctive as well as extended DDBs. Answer remain the same if a tautology is eliminated; generalized
set semantics has become the most used semantics for these principle of partial evaluation, where if a rule is replaced by
types of databases. The semantics encompasses the answer a one-step deduction, the semantics is unchanged; positive/
set semantics, and hence the Smodels semantics. We dis- negative reduction; elimination of nonminimal rules, where
cuss this semantics in the following subsection. if a subsumed rule is eliminated, the semantics remains
the same; consistency, where the semantics is not empty
Answer Set Semantics for EDDDBs for all disjunctive databases; and independence, where if a
literal l is true in a program P and P0 is a program whose
A disjunctive deductive database is a collection of rules
language is independent of the language of P, then l
of the form (1) where the Ls and Ms are literals. When the
remains true in the program consisting of the union of
Ls and Ms are atoms, the program is called a normal
the two languages.
disjunctive program. When l 0 and the Ls and Ms are
A semantics may have all the properties that one may
atoms, the program is called a positive disjunctive deduc-
desire, and be computationally tractable and yet not pro-
tive database.
vide answers that a user expected. If, for example, the user
An answer set of a disjunctive deductive database P not
expected an answer r(a) in response to a query r(X), and the
containing not is a smallest (in a sense of set-theoretic
semantics were, for Example 6, the well-founded seman-
inclusion) subset S of Lit such that
tics, the user would receive the answer, r(a) is unknown.
1. for any rule of the form (1), if M1 ; . . . ; Mm 2 S, then for However, if the answer set semantics had been used, the
answer returned would be r(a). Perhaps the best that can be
some i; 0  i  n; Li 2 S; and
expected is to provide users with complexity results and
2. If S contains a pair of complementary literals, then criteria by which they may decide which semantics meets
S Lit (and hence is inconsistent). the needs of their problems. However, to date, the most
important semantics have been the answer set semantics
The answer sets of a disjunctive deductive database that and the well-founded semantics, discussed earlier.
does not contain not is denoted as aS. A disjunctive Understanding the semantics of disjunctive theories is
deductive database without not may have more than one related to nonmonotonic reasoning. The field of nonmono-
answer set. tonic reasoning has resulted in several alternative
A set of literals S is said to be an answer set of a approaches to perform default reasoning. Hence, DDDBs
disjunctive deductive database P if S 2 aPS , where PS
may be used to compute answers to queries in such theories.
is defined in the Extended Deductive Databases section. Cadoli and Lenzerini developed complexity results con-
Consider the disjunctive deductive database, cerning circumscription and closed world reasoning. Przy-
P0 pa _ pb : musinski and Yuan and You describe relationships
This deductive database has two answer sets: { p(a)} between autoepistemic circumscription and logic program-
and { p(b)}. ming. Yuan and You use two different belief constraints to
The disjunctive deductive database, define two semantics the stable circumscriptive semantics,
P1 P0 [ frX not pXg; and the well-founded circumscriptive semantics for auto-
has two answer sets: {p(a), r(b)} and {p(b), r(a)}. epistemic theories.
References to work by Fernandez and Minker and by
Selecting Semantics for EDDBs and EDDDBS Minker and Ruiz may be found in Ref. 2. Work on com-
plexity results appears in Schlipf (15) and in Eiter and
There are a large number of different semantics, in addition Gottlob Refs. (16,17). Relationships between Datalogext :
to those listed here. A user who wishes to use such a system and nonmonotonic theories may be found in Ref. 2. Proto-
is faced with the problem of selecting the appropriate type implementations of extended deductive and extended
semantics for his needs. No guidelines have been devel-
DEDUCTIVE DATABASES 11

disjunctive deductive databases are given in the following important systems are the well-founded semantics (WFS)
section. and the answer set semantics (ANS). See Ref. 2 for a
discussion of the alternate proposals. There is one major
system developed and in use for the WFS, and there are
DDB, DDDB, AND EDDB IMPLEMENTATIONS
several implementations for the ANS.
FOR KNOWLEDGE BASE SYSTEMS
Implementation of the Well-Founded Semantics
General Considerations
Warren, Swift, and their associates (23) developed an effi-
Chen and Warren implemented a top-down approach to
cient deductive logic programming system, XSB, that com-
answer queries in the well-founded semantics, whereas
putes the well-founded semantics. XSB is supported to the
Leone and Rullo developed a bottom-up method for
: extent of answering questions and fixing bugs within the
Datalognorm;wfs databases. Several methods have been
time schedule of the developers. The system extends the full
developed for computing answers to queries in answer
functionality of Prolog to the WFS. XSB forms the core
set semantics. Fernandez, Lobo, Minker, and Subrahma-
technology of a start-up company, XSB, Inc., whose current
nian developed a bottom-up approach to compute answers
focus is application work in data cleaning and mining. In
to queries in answer set semantics based on the concept of
Ref. 24, it is shown how nonmonotonic reasoning may be
model trees. Bell, Nerode, Ng, and Subrahmanian devel-
done within XSB and describes mature applications in
oped a method based on linear programming.
medical diagnosis, model checking, and parsing. XSB
These notions of default negation have been used as
also permits the user to employ Smodels, discussed below.
separate ways to interpret and to deduce default informa-
XSB is available on the Internet and is available as open-
tion. That is, each application chose one notion of negation
source. There is no intent by XSB, Inc. to market the
and applied it to every piece of data in the domain of the
program.
application. Minker and Ruiz defined a more expressive
DDB that allows several forms of default negation in the
Implementation of Answer Set Semantics
same database. Hence, different information in the domain
may be treated appropriately. They introduced a new Three important implementations of answer set semantics
semantics called the well-founded stable semantics that are by Marek and Truszczynski (25), by Niemela and
characterizes the meaning of DDBs that combine well- Simons (2628), and by Eiter and Leone (29,30). Marek
founded and stable semantics. and Truszczynski developed a program, Default Reasoning
Knowledge bases are important for artificial intelligence System (DeReS), that implements Reiters default logic. It
and expert system developments. A general way to repre- computes extensions of default theories. As logic program-
sent knowledge bases is through logic. Work developed for ming with answer set semantics is a special case of Reiters
extended DDBs concerning semantics and complexity apply default logic, DeReS also computes the answer sets of logic
directly to knowledge bases. For an example of a knowledge programs. To test DeReS, a system, called TheoryBase, was
base, see Example 7. Extended DDBs permit a wide range of built to generate families of large default theories and logic
knowledge bases (KBs) to be implemented. programs that describe graph problems such as existence of
Since alternative extended DDBs have been implemen- colorings, kernels, and Hamiltonian cycles. No further
ted, the KB expert can focus on writing rules and integrity work is anticipated on the system.
constraints that characterize the problem, selecting the Niemela and Simons developed a system, Smodels, to
semantics that meets the needs of the problem, and employ- compute the answer sets of programs in Datalog with
ing a DDB system that uses the required semantics. negation. At present, Smodels is considered the most effi-
Articles on stratified databases by Apt, Blair, and cient implementation of answer set semantics computa-
Walker, by Van Gelder, and by Przymusinski may be tion. Smodels is based on two important ideas: intelligent
found in Ref. 18. See Refs. 5 and 6 for a description of grounding of the program, limiting the size of the ground-
computing answers to queries in stratified databases. ing, and use of the WFS computation as a pruning techni-
:
For an article on the semantics of Datalogwfs ; see Ref. 19 que. The system is used at many sites throughout the world.
see Ref. 20 for the answer set semantics; see Ref. 2 New features are continually being added. The system is
for references to work on other semantics for normal available for academic use. It is possible to license the
extended deductive databases and Schlipf (21) for a com- system from a company in Finland called Neotide.
prehensive survey article on complexity results for deduc-
tive databases. For results on negation in deductive Implementation of Disjunctive Deductive Databases
databases, see the survey article by Shepherdson (22).
Eiter and Leone developed a system, DLV (DataLog with
The development of the semantics and complexity results
Or), that computes answer sets (in the sense of Gelfond and
of extended DDBs that permit a combination of classical
Lifschitz) for disjunctive deductive databases in the syntax
negation and multiple default negations in the same DDB
generalizing Datalog with negation. As Smodels, DLV also
are important contributions to database theory. They per-
uses a very powerful grounding engine and some variants of
mit wider classes of applications to be developed.
WFS computation as a pruning mechanism. The method
There have been several implementations of systems for
used to compute disjunctive answer sets is described in
handling extended databases and extended disjunctive
Ref. 31. The work is the joint effort between Tech U, Austria
databases. There have also been many semantics proposed
and U Calabria, Italy. Many optimization techniques have
for these systems. However, of these systems, the most
12 DEDUCTIVE DATABASES

been added to the system (e.g., magic sets and new heur- and handling databases that may be inconsistent. The
istics), the system language has been enhanced (e.g., aggre- applications described can be incorporated or implemented
gate functions), and new front ends were developed for on the deductive databases discussed in the previous sec-
special applications such as planning. tion. These applications form a representative sample of
capabilities that can be implemented with extended deduc-
Definition of a Knowledge Base System tive database capabilities.
Two specific examples of deductive database applica-
Knowledge bases are important for artificial intelligence
tions are briefly discussed here. Abduction is a method of
and expert system developments. A general way to repre-
reasoning, which, given a knowledge base and one or more
sent knowledge bases is through logic. All work developed
observations, finds possible explanations of the observa-
for extended DDBs concerning semantics and complexity
tions in terms of predicates called abducible predicates. The
apply directly to knowledge bases. Baral and Gelfond (14)
concept of abduction has been used in such applications as
describe how extended DDBs may be used to represent
law, medicine, diagnosis, and other areas; Refs. 14 and 33.
knowledge bases. Many papers devoted to knowledge bases
With the vast number of heterogeneous information
consider them to consist of facts and rules, which is cer-
sources now available, particularly on the world wide
tainly one aspect of a knowledge base, as is the ability to
web, multiagent systems of information agents have
extract proofs. However, integrity constraints supply
been proposed for solving information retrieval problems,
another aspect of knowledge and differentiate knowledge
which requires advanced capabilities to address complex
bases that may have the same rules but different integrity
tasks, query planning, information merging, and handling
constraints. Since alternative extended deductive data-
incomplete and inconsistent information. For a survey of
bases have been implemented, knowledge base experts
applications to intelligent information agents see Ref. 34.
can focus on the specification of the rules and integrity
constraints and employ the extended deductive databases
Data Integration
that have been implemented.
Work on the implementation of semantics related to Data integration deals with the integration of data from
extended disjunctive deductive databases has been very different databases and is a relevant issue when many
impressive. These systems can be used for nonmonotonic overlapping databases are in existence. In some cases,
reasoning. Brewka and Niemela (32) state as follows: various resources exist that are more efficient to access
than the actual relations or, in fact, the relations may even
At the plenary panel session2, the following major trends be virtual so that all data must be accessed through
were identified in the field: First, serious systems for nonmo- resources. We review here the approach given in Ref. 35.
notonic reasoning are now available (XSB, SMODELS, DLV). The basis of this approach is the assumption that the
Second, people outside the community are starting to use these resources are defined by formulas of deductive databases
systems with encouraging success (for example, in planning). and that integrity constraints can be used, as in SQO, to
Third, nonmonotonic techniques for reasoning about action
transform a query from the extensional and intensional
are used in highly ambitious long-term projects (for example,
the WITAS Project, www.ida.liu.se/ext/witas/eng.html). Fourth,
predicates to the resources. Grant and Minker show how to
causality is still an important issue; some formal models of handle arbitrary constraints, including the major types of
causality have surprisingly close connections to standard integrity constraints, such as functional and inclusion
nonmonotonic techniques. Fifth, the nonmonotonic logics dependencies. Negation and recursion are also discussed
being used most widely are the classical ones: default logic, in this framework. We use a simple example to illustrate
circumscription, and autoepistemic logic. the basic idea.
Assume that there are three predicates:
APPLICATIONS
p1(X, Y, Z), p2(X, U), and p3(X, Y),
There are many applications that cannot be handled and an integrity constraint:
by relational database technolgy, but are necessary for p3 X; Y p1 X; Y; Z; Z > 0:
advanced knowledge base and artificial intelligence appli- The resource predicate is defined by the formula
cations (AI). One cannot handle disjunctive information, rX; Y; Z p1 X; Y; Z; p2 X; U:
databases that have default negation that are not stratified,
Let the query be:
incomplete information, planning for robotics, handling
databases with preferences, and other topics. However, p1(X, Y, Z), p2(X, U), p3(X, Y), Z > 1.
all of the above topics can be handled by extensions to
databases as described in the previous sections. In this Intuitively one can see from the integrity constraint that
section, we discuss how the following topics can be handled p3 is superfluous in the query, hence is not needed, and
by deductive databases: data integration in which one can therefore the resource predicate can be used to answer the
combine databases; handling preferences in databases; query. Formally, the first step involves reversing the
updating deductive databases; AI planning problems; resource rules to define the base predicates, p1 and p2 in
this case, in terms of the resource predicates. This step is
justified by the fact that the resource predicate definition
2
really represents an if-and-only-if definition and is the
The plenary panel session was held at the Seventh International
Clark completion, as mentioned in the Deductive Data-
Workshop on Nonmonotonic Reasoning as reported in (32).
DEDUCTIVE DATABASES 13

bases: The Formative Years 19691978 section. In this (resp. b) in two steps. The last two rules show when a rule is
case, the rules are: blocked. There is one answer set in this case:

p1 X; Y; Z rX; Y; Z {ok(r1), ap(r1), a, bl(r2), ok(r2)}


p2 X; f X; Y; Z rX; Y; Z. whose set of original atoms is {a}.

It is possible then to use resolution theorem proving, start- This article handles both static rules and dynamic rules,
ing with the query, the integrity constraint, and these new that is, rules that are themselves considered as atoms in
rules, to obtain a query in terms of r, namely rules. The implementation is straightforward and the
complexity is not higher than for the original deductive
rX; Y; Z; Z > 1: database.

That is, to answer the original query, a conjunction of three Updates


predicates and a select condition, one need only perform a
Although the study of deductive databases started in 1977,
select on the resource predicate.
as discussed in the Deductive Databases section, for many
years it dealt with static databases only. More recently,
Handling Preferences
researchers have tried to incorporate update constructs
In a standard deductive database, all the clauses are con- into deductive databases. We briefly consider here an
sidered to have equal status. But, as was shown, there may extension of Datalog, called DatalogU (37). This extension
be several answer sets for a deductive database. In some has the capability to apply concurrent, disjunctive, and
cases, one answer set may be preferred over another sequential update operations in a direct manner and it
because there may be preferences among the clauses. Con- has a clear semantics.
sider the following simple propositional example with two We illustrate DatalogU by giving a couple of simple
clauses. examples. Consider a predicate employee with three argu-
ments: name, department, and salary.
r1 : a not b
r2 : b not a To insert a new employee, joe into department 5 with
salary 45000, we write insertemployee(joe, 5,45000)
There are two answer sets: {a} and {b}. If r1 is preferred over To delete all employees from department 7, write
r2, then the preferred answer set is {a}. deleteemployee(N, 7, S)
The general approach to handling preferences has been Consider now the update that gives every employee in
to use a meta-formalism to obtain preferred answer sets. department 3 a 5% raise deleteemployee(N, 3, S),
One way is to generate all answer sets and then select the S0 S  1:05, insertemployee(N, 3, S0 )
ones that are preferred. A somewhat different approach is DatalogU allows writing more general rules, such as
taken in Ref. 36 and is briefly reviewed here.
raiseSalaryN; D; P deleteemployeeN; D; S; S0
They start with the original deductive database and
S  1 P; insertemployeeN; D; S0
using the preferences between clauses transform (compile)
them to another deductive database such that the answer that can be used, such as
sets of the new (tagged) deductive database are exactly the raiseSalary(N, D, 0.1)
preferred answer sets of the original deductive database. to give everyone a 10% raise.
For the simple propositional example with two clauses
given above, the new deductive database (actually a sim- Another example is the rule for transferring money from
plified version) would be: one bank account to another. We can use the following
rules:
ok(r1)
transferB A1; B A2; Amt withdrawB A1; Amt;
ok(r2) ap(r1)
depositB A2; Amt; B A1 6 B A2
ok(r2) bl(r1) withdrawBA; Amt deleteaccountBA; Bal;
ap(r1) ok(r1), not b
insertaccountBA; Bal0 ; Bal  Amt; Bal0 Bal  Amt
ap(r2) ok(r2), not a depositBA; Amt deleteaccountBA; Bal;
a ap(r1) insertaccountBA; Bal0 ; Bal0 Bal Amt
b ap(r2)
bl(r1) b So now, to transfer $200 from account A0001 to A0002, we
write transfer (A0001, A0002, 200).
bl(r2) a

There are three new predicates: ok, ap (for applicable), and AI Planning
bl (for blocked). The first three rules reflect the preference of Planning in AI can be formalized using deductive data-
r1 over r2. The next four rules are obtained from r1 and r2 bases, as shown in Ref. 38. A planning problem can be
by adding the ok of the appropriate rules and deducing a described in terms of an initial state, a goal state, and a set
14 DEDUCTIVE DATABASES

of possible actions. A successful plan is a sequence of Handling Inconsistencies


actions that, starting with the initial state and applying
As explained in The Background section, a database must
the actions in the given sequence, leads to the goal. Each
satisfy its integrity constraints. However, there may be
action consists of preconditions before the action can take
cases where a database becomes inconsistent. For example,
place as well as the addition and deletion of atoms leading
a database obtained by integrating existing databases (see
to postconditions that hold after the action has taken
Data Integration section) may be inconsistent even though
place. The following simple example for illustration
each individual database is consistent. Reference 41 pre-
involves a world of named blocks stacked in columns on
sents a comprehensive approach to dealing with inconsis-
a table. Consider the action pickup (X) meaning that the
tent databases through giving consistent answers and
robot picks up X. In this case,
computing repairs, which is accomplished by transforming
the database into extended disjunctive database rules; the
Pre fonTableX; clearX; handEmptyg
answer sets of this database are exactly the repairs of the
Post f : onTableX; : handEmpty; holdingXg inconsistent database. We note that the basic definitions for
querying and repairing inconsistent databases were intro-
So before the robot can pick up a block, the robots hand duced in Ref. 47.
must be empty and the block must be on the table with no We illustrate the technique on a simple example. Let
block above it. After the robot picks up the block, it is
holding it, its hand is not empty, and the block is not on EDB f pa; pb; qa; qcg and IC fqx pxg.
the table.
The idea of the formalization is to write clauses repre- This database is inconsistent because it contains p(b) but
senting postconditions, such as not q(b). There are two simple ways of repairing the data-
base: (1) delete p(b), (2) insert q(b). However, even though
postcond pickupX; onTableX; neg the database is inconsistent, certain queries have the same
answers in both repairs. For example, qx; not pX has
and use superscripts to indicate the step number in the c as its only answer. In this example, the transformation
action, such as in modifies the IC to the rule

addJ Cond firedJ a; postconda; Cond; pos : pu X _ qu X pX; not qX

to indicate, for instance, that if an action a is fired at step J, where pu and qu are new update predicates. The
then a particular postcondition is added. A tricky issue is meaning of this rule is that in case p(X) holds and q(X)
that at each step only one action can be selected among all does not hold, either delete p(X) or insert q(X). The answer
the firable actions. A nondeterministic choice operator (see sets of the transformed database are
also Current Prototype section on LDL) is used to
express this concept: M1 f pa; pb; qa; qc; : pu pg and M2 f pa;
pb; qa; qc; qu bg leading to the two repairs men-
firedJ a firableJ a; : firableJ end; choiceJ a tioned above.

We have left out many details, but the important issue is


SUMMARY AND REFERENCES
that the existence of a solution for a planning problem is
equivalent to the existence of a model in the answer set
The article describes how the rule of inference, based upon
semantics for the planning deductive database and the
the Robinson Resolution Principle (developed by J.A.
conversion of the problem to the deductive database can
Robinson (42)), started in 1968 with the work of Green
be done in linear time. In fact, each answer set represents a
and Raphael (43,44), led to a number of systems and
successful plan. These results are also generalized in var-
culminated in the start of the field of deductive databases
ious ways, including to parallel plans.
in November 1977, with a workshop held in Toulouse,
The oldest problem in AI planning, the ability of an agent
France that resulted in the appearance of a book edited
to achieve a specified goal, was defined by McCarthy (39).
by Gallaire and Minker (11).
He devised a logic-based approach to the problem based on
The field has progressed rapidly and has led to an
the situation calculus that was not entirely satisfactory.
understanding of negation, has provided a theoretical fra-
One of the problems with the approach was how to handle
mework so that it is well understood what is meant by a
the frame problem, the seeming need for frame axioms, to
query, and an answer to a query. The field of relational
represent changes in the situation calculus. Lifschitz
databases is encompassed by the work in DDBs. As dis-
et al. (40) have shown how to solve this problem. They
cussed, some concepts introduced in deductive databases
state, The discovery of the frame problem and the inven-
have been incorporated into relational technology. As
tion of the nonmonotonic formalisms that are capable of
noted, complex knowledge based systems can be imple-
solving it may have been the most significant events so far
mented using advanced deductive database concepts not
in the history of reasoning about actions. See the paper by
contained in relational technology. There are, however,
Litschitz et al. for their elegant solution to the McCarthy AI
many different kinds of DDBs as described in this article.
planning problem.
Theoretical results concerning fixpoint theory for DDBs
DEDUCTIVE DATABASES 15

may be found in Lloyd (7), while fixpoint theory and the- 15. J.S. Schlipf, A survey of complexity and undecidability results
ories of negation for disjunctive deductive databases may be in logic programming, in H. Blair, V.W. Marek, A. Nerode, and
found in Lobo, Minker, and Rajasekar (45). Complexity J. Remmel, (eds.), Informal Proc. of the Workshop on Structural
results have not been summarized in this article. The Complexity and Recursion-theoretic Methods in Logic Pro-
: gramming., Washington, D.C.1992, pp. 143164.
least complex DDBs are, in order, Datalog, Datalogstr ,
: :
Datalogwfs ; and Datalogstab . The first three databases result 16. T. Eiter and G. Gottlob, Complexity aspects of various seman-
tics for disjunctive databases, Proc. of the Twelfth ACM
in unique minimal models. Other databases are more com-
SIGARTSIGMODSIGART Symposium on Principles of
plex and, in addition, there is no current semantics that is Database Systems (PODS-93), May 1993, pp. 158167.
uniformly agreed on for Datalogdisj. However, the answer
17. T. Eiter and G. Gottlob, Complexity results for disjunctive
set semantics discussed in the Extended Deductive Data- logic programming and application to nonmonotonic logics,
bases section for deductive databases and in the Answer Set D. Miller, (ed.), Proc. of the International Logic Programming
Semantics for EDDDBs section for disjunctive deductive Symposium ILPS93, Vancouver, Canada, 1993, pp. 266278.
databases appears to be the semantics generally favored. 18. J. Minker, (ed.), Foundations of Deductive Databases and Logic
As noted in the Selecting Semantics for EDDBs and Programming, New York: Morgan Kaufmann, 1988.
EDDDBs section, a combination of properties of DDBs, 19. A. VanGelder, K. Ross, and J.S. Schlipf, Unfounded Sets and
developed by Dix and discussed in Ref. 46, (and the com- Well-founded Semantics for General Logic Programs, Proc. 7th
plexity of these systems as described in Ref. 1517), could Symposium on Principles of Database Systems, 1988, pp. 221
be used once such systems are developed. 230 .
20. M. Gelfond and V. Lifschitz, The Stable Model Semantics for
Logic Programming, R.A. Kowalski and K.A. Bowen, (eds.),
BIBLIOGRAPHY
Proc. 5th International Conference and Symposium on Logic
Programming, Seattle, WA, 1988, pp. 10701080.
1. J. Minker, Perspectives in deductive databases, Journal of
21. J.S. Schlipf, Complexity and undecidability results for logic
Logic Programming, 5: 3360, 1988.
programming, Annals of Mathematics and Artificial Intelli-
2. J. Minker, Logic and databases: a 20 year retrospective, in D. gence, 15 (34): 257288, 1995.
Pedreschi and C. Zaniolo (eds.), Logic in Databases, Proc. Int.
22. J.C. Shepherdson, Negation in Logic Programming, in
Workshop LID96, San Miniato, Italy, 1996, pp. 357.
J. Minker, (ed.), Foundations of Deductive Databases and
3. K.A. Ross, Modular stratification and magic sets for datalog Logic Programming, New York: Morgan Kaufman, 1988, pp.
programs with negation, Proc. ACM Symp. on Principles of 1988.
Database Systems, 1990.
23. P. Rao, K. Sagonas, T. Swift, D.S. Warren, and J. Friere, XSB: A
4. F. Bancilhon, D. Maier, Y. Sagiv, and J. Ullman, Magic sets and system for efficiently computing well-founded semantics, in
other strange ways to implement logic programs, Proc. ACM J. Dix, U. Ferbach, and A. Nerode, (eds.), Logic and Non-
Symp. on Principles of Database Systems, 1986. monotonic Reasoning - 4th International Conference, LPNMR
5. J.D. Ullman, Principles of Database and Knowledge-Base 97, Dagstuhl Castle, Germany, 1997, pp. 430440.
Systems I. Principles of Computer Science Series, Rockville, 24. T. Swift, Tabling for non-monotonic programming, technical
MD: Computer Science Press, 1988. report, SUNY Stony Brook, Stony Brook, NY: 1999.
6. J.D. Ullman, Principles of Database and Knowledge-Base 25. P. Cholewinski, W. Marek, A. Mikitiuk, and M. Truszczynski,
Systems II, Principles of Computer Science Series, Rockville, Computing with default logic, Artificial Intelligence, 112: 105
MD: Computer Science Press, 1988. 146, 1999.
7. J.W. Lloyd, Foundations of Logic Programming. New York: 26. I. Niemela and P. Simons, Efficient implementation of the well-
2nd ed. Springer-Verlag, 1987. founded and stable model semantics, in I. Niemela and T.
8. T. Gaasterland, P. Godfrey, and J. Minker, An overview of Schaub, (eds.), Proc. of JICSLP-96, Cambridge, 1996.
cooperative answering, Journal of Intelligent Information 27. I. Niemela, Logic programs with stable model semantics as a
Systems, 1 (2): 123157, 1992. constraint programming paradigm, in I. Niemela and T.
9. F. Arni, K. Ong, S. Tsur, H. Wang, and C. Zaniolo, The Schaub, (eds.), Proc. of the Workshop on Computational Aspects
deductive database system ldl, Theory and Practice of of Nonmonotonic Reasoning, 1998, pp. 7279.
Logic Programming, 3: 6194, January 2003. 28. I. Niemela and P. Simons, Smodels - an implementation of the
10. J. Melton and A. R. Simon, SQL:1999 Understanding stable model and well-founded semantics for normal logic
Relational Language Components, San Francisco: Morgan programs, in J. Dix, U. Furbach, and A. Nerode, (eds.), Logic
Kaufmann, 2002. Programming and Nonmonotonic Reasoning - 4th Interna-
11. H. Gallaire and J. Minker, (eds.), Logic and Data Bases, tional Conference, LPNMR 97, Dagstuhl Castle, Germany,
Plenum Press, New York: 1978. 1997, pp. 420429.
12. T. Gaasterland and J. Lobo, Qualified answers that reflect user 29. T. Eiter, N. Leone, C. Mateis, G. Pfeifer, and F. Scarcello, A
needs and preferences, International Conference on Very Large deductive system for non-monotonic reasoning, Jurgen Dix,
Databases, 1994. Ulrich Furbach, and Anil Nerode, (eds.), Proc. of the 4th Inter-
13. C. Baral, Knowledge representation, reasoning and declarative national Conference on Logic Programming and Nonmono-
problem solving, Cambridge, MA: Cambridge University tonic Reasoning (LPNMR97), number 1265 in LNCS, San
Press, 2003. Francisco, CA, 1997, pp. 364375.
14. C. Baral, and M. Gelfond, Logic programming and knowledge 30. T. Eiter, N. Leone, C. Mateis, G. Pfeifer, and F. Scarcello, The
representation, Journal of Logic Programming, 19/20: 73148, kr system dlv: Progress report, comparisons, and benchmarks,
1994. A.G. Cohn, L. Schubert, and S.C. Shapiro, (eds.), Proc.
Sixth International Conference on Principles of Knowledge
16 DEDUCTIVE DATABASES

Representation and Reasoning (KR-98), San Francisco, CA, Minker, (ed.), Logic-Based Artificial Intelligence, Dordrecht:
1998, pp. 406417. Kluwer Academic Publishers, 2000, pp. 147165.
31. N. Leone, P. Rullo, and F. Scarcello, Disjunctive stable models: 41. G. Greco, S. Greco, and E. Zumpano, A logical framework for
Unfounded sets, fixpoint semantics and computation, Informa- querying and repairing inconsistent databases, IEEE Trans-
tion and Computation, 135: 69112, 1997. actions on Knowledge and Data Engineering, 15: 13891408,
32. G. Brewka and I. Niemela, Report on the Seventh International Nov/Dec 2003.
Workshop on Nonmonotonic Reasoning, AI Magazine, 19 (4): 42. J.A. Robinson, A Machine-Oriented Logic Based on the Resolu-
139139, 1998. tion Principle, J.ACM, 12 (1), January, 1965.
33. A.C. Kakas, A.R. Kowalski, and F. Toni, The role of abduction 43. C.C. Green and B. Raphael, Research in intelligent question
in logic programming, in D.M. Gabbay, C.J. Hogger, and J.A. answering systems, Proc. ACM 23rd National Conference,
Robinson, (eds.), Handbook of Logic in Artificial Intelligence 1968, pp. 169181.
and Logic Programming Volume 5, Oxford: Oxford University 44. C.C. Green and B. Raphael, The use of theorem-proving tech-
Press, 1998, pp. 235324. niques in question-answering systems, Proc. 23rd National
34. T. Eiter, M. Fink, G. Sabbatini, and H. Tompits, Using methods Conference ACM, 1968.
of declarative logic programming for intelligent information 45. J. Lobo, J. Minker, and A. Rajasekar, Foundations of Disjunc-
agents, Theory and Practice of Logic Programming, 2: 645709, tive Logic Programming, Cambridge MA: The MIT Press, 1992.
November 2002.
46. G. Brewka, J. Dix, and K. Konolige, Nonmonotonic Reasoning:
35. J. Grant and J. Minker, A logic-based approach to data inte- An Overview, Center for the Study of Language and Informa-
gration, Theory and Practice of Logic Programming, 2: 323 tion, Stanford, CA, 1997.
368, 2002. 47. M. Arenas, L. Bertossi, and J. Chomicki, Consistent query
36. J. P. Delgrande, T. Schaub, and H. Tompits, A framework for answers in inconsistent databases, PODS 1999, New York:
compiling preferences in logic programs, Theory and Practice of ACM Press, 1999, pp. 6879.
Logic Programming, 3: 129187, March 2003.
37. M. Liu, Extending datalog with declarative updates, Journal of
Intelligent Information Systems, 20: 107129, March 2003. JOHN GRANT
38. A. Brogi, V. S. Subrahmanian, and C. Zaniolo, A deductive Towson University
database approach to ai planning, Journal of Intelligent Infor- Towson, Maryland
mation Systems, 20: 215253, May 2003. JACK MINKER
39. J. McCarthy, Programs with common sense, Proc. Teddington University of Maryland at
Conf. on the Mechanisation of Thought Processes, London, College Park
1959, pp. 7591. College Park, Maryland
40. V. Lifschitz, N. McCain, E. Remolina, and A. Tacchella, Getting
to the airport: The oldest planning problem in AI, in Jack
M
MULTIAGENT SYSTEMS A shared ontology provides the common vocabulary for a
group of agents to communicate directly. Without a shared
INTRODUCTION ontology, agents can communicate only through a broker
who provides translations between different ontologies.
A multiagent system (MAS) is a system composed of several Because of its importance, ontology is covered in KQML
computing entities called agents. Being a sub-discipline (Knowledge Query and Manipulation Language), and
of distributed artificial intelligence (DAI), multiagent sys- many efforts such as DARPA Agent Markup Language
tems research represents a new paradigm for conceptualiz- (DAML) have been aimed to facilitate sharing ontology
ing, designing, and implementing large-scale and complex on the semantic web (11).
systems that require spatially, functionally, or temporally Agents in a MAS typically have a collection of overlapped
distributed processing (13). knowledge/beliefs that serve as a common basis for the
Agents in a MAS typically have distributed resource, agents to understand and respond to each others beha-
expertise, intelligence, and processing capabilities, and viors. Such common knowledge/beliefs may be the descrip-
they need to work collaboratively to solve complex problems tion of domain tasks (up to certain levels of detail), the
that are beyond the capabilities of any individuals. MAS communication protocols to be used, the social laws or social
research covers a very broad areas, including multiagent normatives to follow, and so on.
learning, distributed resource planning, coordination, and Some MASs also allow individual agents to have a
interagent communications, to mention only a few (1,4,5), partial picture of the organizational structure (5), which
and many studies have insights drawn from other disci- may include information regarding membership of a group,
plines, such as game theories, communications research, sub-group relations, predetermined group leader, roles
and statistical approaches. In addition to the wide applica- each member can play, capability requirements on each
tions in industries (e.g., Network-Centric Warfare, air- role, and so forth. Having a well-defined structure does not
traffic control, and trading agents), multiagent systems imply that the structure is static. A system can still have
have also been used in simulating, training, and supporting flexibility in changing its structure through dynamically
collaborative activities in human teams. assigning responsibility to the agents in the system. Having
Different perspectives exist on multiagent systems a shared team structure enables an agent to develop a
research. From the AI perspective, people may focus on higher level abstraction about the capabilities, expertise,
fundamental issues such as coordination algorithms, agent and responsibilities of other agents. It is important for an
architectures, and reasoning engines. From the engineer- agent to initiate helping behaviors proactively.
ing perspective, people may concern system building meth- Having a shared objective (goal) is a key characteristic of
odologies, property verifications, and agent-oriented agent teams (13,1618), a kind of tightly coupled MASs. A
programming. Detailed reviews of MAS from several dis- common goal can serve as a cohesive force that binds team
tinct perspectives have been provided in Sycara (3), Stone members together (16). To distinguish team behavior from
and Veloso (4), Bond and Gasser (6), OHare and Jennings coordinated individual behavior (individuals goal happen
(7), and Huhns and Singh (8). The objective of this article is to be the same), a notion of joint mental attitude (i.e., joint
to briefly present a view of MAS from the perspective of intention) is introduced based on the concept of joint per-
multiagent teamwork. The remainder is organized as fol- sistent goal (13). A joint intention can be viewed as a joint
lows. The next section introduces the concept of shared commitment to perform a collective action to achieve a joint
mental models that underpin team-based agent systems. goal. The joint intentions theory requires a team of agents
Then some generic multiagent architectures in the litera- with a joint intention to not only each try to do its part in
ture are described, and the issue of interagent coordination achieving the shared goal but also commit to informing
is discussed. Communication and helping behaviors are others when an individual agent detects that the goal has
reviewed, and a summary is given in the last section. been accomplished, becomes impossible to achieve, or
becomes irrelevant. Thus, having a joint intention not
SHARED MENTAL MODELS only means all the team members have established the
same goal, but also it means that they have committed to
The notion of shared mental models (SMMs) is a hypothe- maintaining the consistency about the dynamic status of
tical construct that has been put forward to explain certain the shared goal. The joint intentions theory is important
coordinated behaviors of human teams (6,9). An SMM because it not only offers a framework for studying numer-
produces a mutual situation awareness, which is the key ous teamwork issues, but also it provides a foundation for
for supporting many interactions within a team that lead to implementing multiagent systems (4).
its effectiveness and efficiency (10). The scope of shared Joint intentions prescribe how agents should behave
mental models is very broad, which may involve shared when certain things go wrong; it thus indicates that robust
ontology (11), common knowledge and/or beliefs (12), joint multiagent systems can be implemented to work in
goals/intentions (13), shared team structures (5), common a dynamic environment if agents can monitor joint inten-
recipes (14), shared plans (15), and so on. tions and rationally react to changes in the environment.

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 MULTIAGENT SYSTEMS

Jennings pointed out that this is desirable but not sufficient


(14). He proposed the joint responsibility model with the Facilitator
explicit representation of cooperation using common
recipes. A common recipe provides a context for the per-
formance of actions in much the same way as the joint
goal guides the objectives of the individuals (14). Mainly Facilitator Facilitator Agent Agent
focusing on handling unexpected failures, the joint respon-
sibility model refines Cohen and Levesques work (16,19) on
joint intentions and explicitly captures different causes of
recipe failures. In particular, it clearly specifies the condi-
Facilitator Facilitator Agent Agent
tions under which an agent involved in a team activity
should reconsider its commitments (three related to joint
goal commitment: goal has been attained, goal will never be Figure 1. Facilitator-based architecture.
attained, or goal motivation no longer present; four related
to common recipe commitment: desired outcome is avail- based on the current situation. Each team member needs to
able, or recipe becomes invalid, untenable, or violated). The track the teams choices at these points because they may
model furthermore describes how the agent should behave affect significantly their information-needs in the future.
both locally and with respect to its fellow team members if The CAST (5) system implements a richer notion of shared
any such situations develop. It should drop the commit- mental models that covers the dynamic status of team
ment and must endeavor to inform all other team members processes. Each member of a CAST agent team can monitor
so that futile activities can be stopped at the earliest dynamically the progress of team activities that are repre-
possible opportunity. sented internally as Petri nets.
Although Jennings gave a simple distributed planning
protocol for forming teams and for achieving agreement on
MULTIAGENT ARCHITECTURES
the details (i.e., timing constraints, and actual performers)
of common recipe (14), Grosz and Kraus prescribed a more
We here focus on multiagent architectures only. Individual
general process for collaboratively evolving partial shared
agent architectures such as reactive architectures and
plans into complete shared plans (15,20). A shared plan is
BDI-style architectures (21), are beyond the scope.
characterized in a mental-state view as a particular collec-
Multiagent architectures can be classified into two
tion of beliefs and intentions. An agent is said to have a
categories: facilitator-based architectures and layered
shared plan with others if and only if the agent works
architectures. Figures 1 and 2 illustrate a generic facil-
toward establishing and maintaining those required men-
itator-based architecture and a generic layered architec-
tal attitudes, and it believes that the other agents do so
ture, respectively.
likewise. The common recipes in the SharedPlan theory
In a facilitator-based architecture, facilitator agents
and in the joint responsibility model have different mean-
play an important role in linking individual agents. Typi-
ings. In the joint responsibility model, each team member
cally, a facilitator maintains knowledge that records the
will have the same picture of the common recipe being
capabilities of a collection of agents or subfacilitators and
adopted. Whereas in the SharedPlan theory, even though
uses that knowledge to establish connections between
the common recipe is complete from the external, different
service requesters and providers. As well as providing a
team members may have different partial views of the
general notion of transparent delegation, facilitators also
common recipe being considered. In pursuing their com-
offer a mechanism for organizing an agent society in a
mon goals, it is the shared plans that ensure team members
hierarchical way. OAA (Open Agent Architecture) (22) is
cooperate smoothly rather than prohibit each others beha-
a representative of facilitator-based architectures. OAA
vior, which may occur otherwise because of the partial
adopts a blackboard-based framework that allows indivi-
views of common recipes.
dual agents to communicate by means of goals posted on
Jennings admitted that an agent must track the ongoing
blackboard controlled by facilitator agents. Basically, when
cooperative activity to fulfill its social roles (14). However, it
is insufficient to allow agents to monitor simply the viability
of their commitment through continuously monitoring the logical
connection
relevant events that may occur within the system, as is
implemented in GRATE*. The monitoring of teamwork social level social level social level
progress is also important for agents to gain awareness
of the current context so that they can (1) better anticipate
knowledge level knowledge level knowledge level
others needs (e.g., relevant information needs) and avoid
performing irrelevant actions (e.g., communicating irrele-
vant information), and (2) dynamically adapt the team reactive level reactive level reactive level
process to external changes. For example, the already physical
executed part of a team process may never be re-invoked connection
again; thus, the associated information-needs become no Environment
longer active. A team process may include decision points,
each of which can specify several potential ways to proceed Figure 2. Layered architecture.
MULTIAGENT SYSTEMS 3

a local facilitator agent determines that none of its and Execution Monitor. RETSINA-MAS agents interact
subordinate agents can achieve the goal posted on its with have other via capability-based and team-oriented
blackboard, it propagates the goal to a higher level black- coordination as follows. Initially all agents have a commonly
board controlled by a higher level facilitator, who in turn agreed to partial plan for fulfilling a team task (goal). Each
can propagate the goal to its superior facilitator if none of its agent then matches his/her capabilities to the requirements
subsidiary blackboards can handle the goal. of the overall team goal within the constraints of his/her
Most existing multiagent systems have a layered archi- authority and other social parameters. This process will
tecture that can be divided into three levels (see Fig. 2): produce a set of candidate roles for the agent, who can select
reactive level, knowledge level, and social level (3). Agent some and communicate to teammates as proposals for his/
behavior at the reactive level responds to external changes her role in the team plan. Once the team members have
perceived directly from the environment. Deliberative (or reached a consensus that all plan requirements are covered
reflective) behaviors are often covered at the knowledge by the role proposals without any conflicts, they can commit
level, where an agent achieves situation awareness by to executing the team plan. The team-oriented coordination
translating the external input into internal representa- implemented in RETSINA-MAS lies at the social level,
tions and may project into the future (refer to the Endsleys whereas the RETSINA architecture covers reactive and
PCP model of situation awareness in Ref. 23. Social or deliberative behaviors.
collaborative behaviors are reflected at the social level, JACK Teams (26) is an extension to JACK Intelligent
where an agent identifies collaboration needs, adjusts Agents that provides a team-oriented modeling framework.
self behavior, and exchanges information to coordinate JACK agents are BDI-style agents each with beliefs,
joint behaviors. desires, and intentions. A JACK team is an individual
The representatives with such an architecture include reasoning entity that is characterized by the roles it per-
TEAMCORE (24), RETSINA (25), JACK (26), and CAST (56). forms and the roles it requires others to perform. To form a
TEAMCORE is an extension of STEAM (a Shell for team is to set up the declared role obligation structure by
TEAMwork) (4), which takes the perspective of team- identifying particular subteams capable of performing the
oriented programming. STEAM is a hybrid teamwork roles to be filled. JACK Teams has constructs particularly
model built on top of the SOAR architecture (27). STEAM for specifying team-oriented behaviors. For instance,
borrows insights from both the joint intentions theory and Teamdata is a concept that allows propagation of beliefs
the SharedPlans formalism. It uses joint intentions as a from teams to subteams and vice versa. Statements
building block to hierarchically build up the mental atti- @team_achieve and @parallel are used in JACK for hand-
tude of individual team members and to ensure that ling team goals. An @parallel allows several branches of
team members pursue a common solution path. STEAM activity in a team plan to progress in parallel. An @parallel
exhibits two valuable features: selective communication statement can specify success condition, termination con-
and a way of dealing with teamwork failures. In STEAM, dition, how termination is notified, and whether to monitor
communication is driven by commitments embodied in the and control the parallel execution. JACK Teams can also be
joint intentions theory as well as by explicit declaration of viewed as a team wrapper that provides programmable
information-dependency relationships among actions. To team-level intelligence.
make a decision on communication, STEAM agents take CAST (Collaborative Agents for Simulating Teamwork)
into consideration the communication costs, benefits, and (5) is a team-oriented agent architecture that supports
the likelihood that some relevant information may be teamwork using a shared mental model among teammates.
mutually believed already. To handle failures, STEAM The structure of the team (roles, agents, subteams, etc.) as
uses role-monitoring constraints (AND, OR, dependency) well as team processes (plans to achieve various team tasks)
to specify the relationship of a team operator and an are described explicitly in a declarative language called
individuals or subteams contributions to it. When an agent MALLET (29). Statements in MALLET are translated
is unable to complete actions in its role and the embedding into PrT nets (specialized Petri-Nets), which use predicate
team operator is still achievable, the remaining agents will evaluation at decision points. CAST supports predicate
invoke a repair plan accordingly. evaluation using a knowledge base with a Java-based back-
TEAMCORE realized a wrapper agent by combining the ward-chaining reasoning engine called JARE. The main
domain-independent team expertise initially encoded in distinguishing feature of CAST is proactive team behavior
STEAM and the domain-specific knowledge at the team enabled by the fact that agents within a CAST architecture
level. Hence, a TEAMCORE wrapper agent is a purely share the same declarative specification of team structure
social agent that only has core teamwork capabilities. and team process. Therefore, every agent can reason about
This team-readiness layer hides the details of the coordina- what other teammates are working on, what the precondi-
tion behavior, low-level tasking, and replanning (24). To tions of the teammates actions are, whether the teammate
map TEAMCORE to Fig. 2, the TEAMCORE wrapper can observe the information required to evaluate a pre-
agent lies at the social level, whereas domain agents imple- condition, and hence what information might be potentially
mented using SOAR encompass functionalities required by useful to the teammate. As such, agents can figure out what
the knowledge and reactive levels. information to deliver proactively to teammates and can
RETSINA multiagent infrastructure (25) (RETSINA- use a decision-theoretic cost/benefit analysis of the proac-
MAS) is extended from the RETSINA individual agent tive information delivery before actually communicating.
architecture (28). A RETSINA agent has four components: Compared with the architectures mentioned above, the
Communicator, HTN Planner, Enabled Action Scheduler, layered behavior in CAST is flexible: It depends more on
4 MULTIAGENT SYSTEMS

the input language than on the architecture. Both indivi- with the specified share type. A share type is either
dual reactive behaviors and planned team activities can be AND, OR, or XOR. For an AND share type, all specified
encoded in MALLET, whereas the CAST kernel dynami- subprocesses must be executed. For an XOR, exactly one
cally determines the appropriate actions based on the subprocess must be executed, and for an OR, one or more
current situation awareness and on the anticipation of subprocesses must be executed. A Joint-Do statement is
teammates collaboration needs. not executed until all involved team members have
reached this point in their plans. Furthermore, the state-
COORDINATION ment after a Joint-Do statement in the team process does
not begin until all involved team members have completed
Agents in MAS possess different expertise and capabilities. their part of the Joint-Do.
A key issue to a multiagent system is how it can maintain Planned team activities refer to common recipes that
global coherence among distributed agents without explicit govern the collaboration behaviors of teammates in solving
global control (13). This process requires agent coordina- complex problems. A planned team activity is a long-term
tion. process that often involves team formation, points of syn-
Distributed agents need to coordinate with one another chronization, task allocation, execution constraints, and
when they pursue a joint goal, but the achievement of the temporal ordering of embedded subactivities. GRATE (14)
goal is beyond the capability, knowledge, or capacity of any has a recipe language, where trigger conditions and struc-
individuals. Team tasks in multiagent systems can be ture of suboperations can be specified for a recipe. STEAM
classified into three categories: atomic team actions, coor- (4) uses the notion of team operator to prescribe the decom-
dinated tasks, and planned team activities. position of task structures. RETSINA-MAS (25) also uses
Atomic team actions refer to those atomic actions that the concept of shared plans to coordinate individual beha-
cannot be done by a single agent and must involve at least viors, but it lacks an explicit team plan encoding language.
two agents to do it. For instance, lifting a heavy object is a Instead of providing a higher level planning encoding
team operator. Before doing a team operator, the asso- language, JACK Teams (26) tried to extend a traditional
ciated preconditions should be satisfied by all agents programming language (i.e., Java) with special statements
involved, and the agents should synchronize when per- for programming team activities. In JACK, team-oriented
forming the action. The team-oriented programming behaviors are specified in terms of roles using a construct
paradigm (hereafter TOP) (30) and CAST support atomic called teamplan. TOP (30) uses social structures to govern
team operators. In CAST, the number of agents required team formation, and it is assumed that each agent parti-
by a team operator can be specified as constraints using cipating in the execution of a joint plan knows the details of
the keyword num. For example, the following MALLET the whole plan.
code specifies a team operator called co_fire that requires In MALLET, plans are decomposable higher level
at least three agents firing at (5) a given coordinate actions, which are built on lower level actions or atomic
simultaneously: operators hierarchically. A plan specifies which agents
(variables), under what preconditions, can achieve which
(toper co_fire (?x ?y) (num ge 3). . .), effects by following which processes, and optionally under
which conditions the execution of the plan can be termi-
By coordinated tasks, we refer to those short-term (com- nated. The process component of a plan plays an essential
pared with long-term) activities involving multiple agents. role in supporting coordination among team members. A
Executing a coordinated task often requires the involved process can be specified using constructs such as sequential
agents to establish joint and individual commitments to the (SEQ), parallel (PAR), iterative (WHILE, FOREACH,
task or subtasks, to monitor the execution of the task, to FORALL), conditional (IF), and choice (CHOICE).
broadcast task failures or task irrelevance whenever they MALLET has a powerful mechanism for dynamically
occur, and to replan doing the task if necessary. A coordi- binding agents with tasks. The AgentBind construct intro-
nated task is composed typically of a collection of tempo- duces flexibility to a teamwork process in the sense that
rally or functionally related subtasks, the assigned doers of agent selection can be performed dynamically based on the
which have to synchronize their activities at the right time evaluation of certain teamwork constraints (e.g., finding an
and be ready to backup others proactively. STEAM (4) uses agent with specific capabilities). For example,
role-constraints (a role is an abstract specification of a set of
activities in service of a teams overall activity) to specify (AgentBind (?f)
the relationship between subtasks of a coordinated task. (constraints (playsRole ?f fighter)
An AND-combination is used when the success of the (closestToFire ?f ?fireid)))
task as a whole depends on the success of all subtasks;
An OR-combination is used when any one subtask can bring states that the agent variable ?f needs to be instantiated
success to the whole task; and role-dependency can be used with an agent who can play the role of fighter and is the
when the execution of one subtask depends on another. closest to the fire ?fireid (?fireid already has a value from
Complex joint team activities can be specified by using the preceding context). The selected agent is then respon-
these role-constraints combinatively and hierarchically. sible for performing later steps (operators, subplans, or
Similarly, in CAST (5), the Joint-Do construct provides a processes) associated with ?f. An agent-bind statement
means for describing multiple synchronous processes to be becomes eligible for execution at the point when progress
performed by the identified agents or teams in accordance of the embedding plan has reached it, as opposed to being
MULTIAGENT SYSTEMS 5

executed when the plan is entered. The scope for the ask/reply approach is useful and necessary in many cases, it
binding to an agent variable extends to either the end of exposes several limitations. First, an information consu-
the plan in which the variable appears or the beginning mer may not realize certain information it has is already
of the next agent-bind statement that binds the same out of date. If this agent needs to verify the validity of every
variable, whichever comes first. AgentBind statements piece of information before they are used (e.g., for decision-
can be anywhere in a plan as long as agent variables are making), the team can be overwhelmed easily by the
instantiated before they are used. External semantics amount of communications entailed by these verification
can be associated with the constraints described in an messages. Second, an agent may not realize it needs certain
AgentBind statement. For instance, a collection of con- information because of its limited knowledge (e.g., distrib-
straints can be ordered increasingly in terms of their uted expertise). For instance, a piece of information may be
priorities. The priority of a constraint represents its obtained only through a chain of inferences (e.g., being
degree of importance compared with others. In case fused according to certain domain-related rules). If the
not all constraints can be satisfied, the constraints agent does not have all the knowledge needed to make
with the least priority will be relaxed first. such a chain of inferences, it will not be able to know it
Agents also need to coordinate when to make choices on needs the information, not to mention request for it.
the next course of actions. The Choice construct in MAL- Proactive information delivery means providing rele-
LET can be used to specify explicit choice points in a vant information without being asked. As far as the
complex team process. For example, suppose a fire-fighting above-mentioned issues are concerned, proactive infor-
team is assigned to extinguish a fire caused by an explosion mation delivery by the information source agents offers
at a chemical plant. After collecting enough information an alternative, and it shifts the burden of updating
(e.g., nearby chemicals or dangerous facilities), the team information from the information consumer to the infor-
needs to decide how to put out the fire. They have to select a mation provider, who has direct knowledge about the
suitable plan among several options. The Choice construct changes of information. Proactive information delivery
is composed of a list of branches, each of which invokes a also allows teammates to assist the agent who cannot
plan (a course of actions) and is associated with preference realize it needs certain information because of its limited
conditions and priority information. The preference condi- knowledge.
tions of a branch describe the situation in which the branch In fact, to overcome the above-mentioned limitations of
is preferred to others. If the preference conditions of more ask, many human teams incorporate proactive informa-
than one branch are satisfied, the one with the highest tion delivery in their planning. In particular, psychological
priority is chosen. In implementation (31), some specific studies about human teamwork have shown that members
agents can be designated as decision makers at the team of an effective team can often anticipate the needs of other
level to simplify the coordination process. For instance, at a teammates and choose to assist them proactively based on a
choice point, each agent can check whether it is the desig- shared mental model (32).
nated decision maker. If it is, the agent evaluates the Interagent communication has been studied extensively
preference conditions of the potential alternatives based (38). For instance, many researchers have been studying
on the information available currently. If no branch exists agent communication languages (ACLs), by which agents
whose preference condition can be satisfied, the agent in distributed computing environments can share informa-
simply waits and reevaluates when more information tion. KQML (34) and FIPAs ACL (35) are two attempts
becomes available. If more than one selectable branch toward a standardized ACL. A complete ACL often covers
exists, the agent can choose one randomly from those various categories of communicative acts, such as asser-
branches with the highest priority. The agent then informs tives, directives, commissives, permissives, prohibitives,
others of the chosen branch before performing it. For those declaratives, and expressives. Some reseachers even
agents who are not the designated decision maker, they argued for the inclusion of proactives (i.e., proactive per-
have to wait until they are informed of the choice from the formatives) (36).
decision maker. However, while waiting, they still could The mental-state semantics of ACL is one of the most
help in delivering information proactively to the decision developed areas in agent communication, where most
maker to make better decisions. efforts are based on Cohen and Levesques work (19). For
instance, the semantics of FIPAs performatives are given
in terms of Attempt, which is defined within Cohen and
COMMUNICATION Levesques framework (35). The semantics of proactive
performatives are also treated as attempts but within an
Communication is essential to an effective functional team. extended SharedPlans framework (36).
For instance, communication plays an important role in To understand fully the ties between the semantics of
dynamic team formation, in implementing team-oriented communicative acts and the patterns of these acts, con-
agent architectures, and more theoretically, in the forming, versation policies or protocols have been studied heavily in
evolving, and terminating of both joint intentions (16) and the ACL field (33). More recently, social agency is empha-
SharedPlans (15). Interagent communications can be clas- sized as a complement to mental agency because commu-
sified into two categories: reactive communications and nication is inherently public (37), which requires the
proactive communications. social construction of communication to be treated as a
Reactive communications (i.e., ask/reply) are used first-class notion rather than as a derivative of the men-
prevalently in existing distributed systems. Although the talist concepts. For instance, in Ref. 37, speech acts are
6 MULTIAGENT SYSTEMS

defined as social commitments, which are obligations HELPING BEHAVIORS


relativized to both the beneficiary agent and the whole
team as the social context. Pearce and Amato (39) have developed an empirically-
Implemented systems often apply the joint intentions derived taxonomy of helping behaviors. The model has a
theory (13) in deriving interagent communications. The threefold structure of helping: (1) doing what one can
joint intentions theory requires that all agents involved in (direct help) versus giving what one has (indirect help),
a joint persistent goal (JPG) take it as an obligation to (2) spontaneous help (informal) versus planned help (for-
inform other agents regarding the achievement or impos- mal), and (3) serious versus nonserious help. These three
sibility of the goal. Communication in STEAM (4) is driven dimensions correspond to the type of help offered, the social
by commitments embodied in the joint intentions theory. setting where help is offered, and the degree of need of the
STEAM also integrated decision-theoretic communica- recipient.
tion selectivity: Agents deliberate on communication Helping behavior in MASs can be defined as helping
necessities vis-a-vis incoherency, considering communi- other team members perform their roles under conditions of
cation costs and benefits as well as the likelihood that poor workload distributions or asymmetric resource alloca-
some relevant information may be mutually believed tions or as helping team members when they encounter
already. unexpected obstacles. As indicated by the above taxonomy,
GRATE*(14), which was built on top of the joint respon- helping behaviors can come in many different forms, such
sibility model, relies even more on communications. As we as emergency aids and philanthropic acts. However,
mentioned, the joint responsibility model clearly specifies planned direct help and spontaneous indirect help are
the conditions under which an agent involved in a team the two predominant forms of helping behaviors in
activity should reconsider its commitments. For instance, MASs. For example, agents for an operational cell in simu-
as well as communications for dropping a joint intention, an lated battlefields often have contingency plans in respond-
agent should also endeavor to inform all other team mem- ing to environmental uncertainties. Collaborative agents
bers whenever it detects that either one of the following also tend to deliver relevant information only to informa-
happens to the common recipe on which the group are tion consumers by first filtering irrelevant information
working: The desired outcome is available already, the away.
recipe becomes invalid, the recipe becomes untenable, or Helping behaviors can also be classified as reactive help-
the recipe is violated. ing and proactive helping. Much helping that occurs in
The strong requirement on communication among MASs is reactive: in response to specific requests for
teammates by the joint intentions theory is necessary to help. For instance, in the RoboRescue domain, fire fighters
model coherent teamwork, but in a real case, it is too ask police agents to clear a blocked area when detecting
strong to achieve effective teamwork; enforced commu- such a place. A fire-fighting team asks another one for help
nication is not necessary and even impossible in time- when the fire is getting out-of-control.
stress domains. Rather than forcing agents to communi- Proactive helping refers to the helping that is not
cate, CAST (5) allows agents to anticipate others informa- initiated by requests from recipients but by the anticipation
tion needs, which depending on the actual situations, may of others needs from shared mental modelseven if those
or may not result in communicative actions. The proactive needs are not expressed directly (40). Proactive helping
information delivery behavior is realized in the DIARG often occurs in highly effective human teams. For instance,
(Dynamic Inter-Agent Rule Generator) algorithm. Com- providing assistance to others who need it has been identi-
munication needs are inferred dynamically through rea- fied as a key characteristic of human teamwork (41).
soning about the current progress of the shared team The joint intentions theory and the SharedPlans theory
process. The following criteria are adopted in Ref. 38. are two widely accepted formalisms for modeling team-
First, a team process may include choice (decision) points, work; each has been applied successfully in guiding the
each of which can specify several branches (potential design and the implementation of multiagent systems, such
ways) to achieving the goal associated with the choice as GRATE*(10), STEAM (4), and CAST (5). Both theories
point. Intuitively, those information needs that emerge allow agents to derive helping behaviors. In particular, the
from the branches should not be activated until a specific joint intentions theory implies that an agent will intend to
branch is selected. Second, a team or an agent may dyna- help if it is mutually known that one team member requires
mically select goals to pursue. The information needed to the assistance of the agent (13).
pursue one goal may be very different from those needed in Grosz and Kraus even proposed axioms for deriving
another. Third, the already executed part of a team pro- helpful behaviors (15,20). For instance, axiom A5 and A6
cess may never be reinvoked again; thus, the associated in (15) state that an agent will form a potential intention
information needs become no longer active. DIARG is to do ALL the actions it thinks might be helpful. whereas
designed to generate interagent communication based on Axiom 2 in Ref. 20 states that if an agent intends that a
the identified information needs and on the speakers property p hold and some alternative actions exist the
model of others mental models. For instance, an agent agent can take that would lead to p holding, then
will not send a piece of information if the possibility of the the agent must be in one of three potential states: (1)
information being observed by the potential receiver is The agent holds a potential intention to do some of these
high enough. A decision-theoretic approach is also actions, (2) the agent holds an intention to do some of
employed in CAST to evaluate the benefits and cost of these actions; or (3) the agent has reconciled all possible
communications. actions it could take and has determined they each
MULTIAGENT SYSTEMS 7

conflict in some way with other intentions. These two BIBLIOGRAPHY


treatments are actually consistent; they characterize
intending-that from two perspectives. The former 1. V. R. Lesser, Multiagent systems: an emerging subdiscipline of
shows how potential intentions are triggered from inten- AI source, ACM Comp. Surv., 27(3): 340342, 1995.
tions. The latter reflects the process of means-ends rea- 2. P. Stone and M. Veloso, Multiagent systems: a survey from a
soning: An agent first adopts a potential intention, then machine learning perspective, Autonomous Robots, 8(3): 345
reconciles the potential intention with existing inten- 383, 2000.
tionseither adopts it as an actual intention or drops 3. K. Sycara, Multi agent systems, AI Magazine19(2): 1998.
it and considers other options, and then it abandonsif 4. M. Tambe, Towards flexible teamwork, J. Artificial Intell. Res.,
all potential intentions serving the same ends have been 7: 83124, 1997.
tried but none can be reconciled into actual intentions. 5. J. Yen, J. Yin, T. Ioerger, M. Miller, D. Xu and R. Volz, CAST:
For instance, suppose an agent A has an intention to collaborative agents for simulating teamwork, In Proceedings
make the property p true. A will adopt a potential inten- of the 7th International Joint Conference on Artificial Intelli-
tion to do action ( if the performance of ( will enable gence (IJCAI-01), 2001, pp. 11351142.
another agent B to perform some action (, which would 6. A. H. Bond and L. Gasser, Readings in Distributed Artificial
directly make p true. Ask/reply is an instance of using Intelligence. San Francisco, CA: Morgan Kaufmann, 1988.
this axiom. Enabling others physical actions also falls 7. G. OHare and N. Jennings, Foundations of Distributed Arti-
into this category. For example, a logistics person sup- ficial Intelligence. New York: Wiley, 1996.
plies ammunition to a fighter in a joint mission. 8. M. Huhns and M. Singh, Readings in Agents, San Francisco,
However, the axioms in the SharedPlans theory are CA: Morgan Kaufmann, 1997.
still not rich enough to cover helping behaviors involving 9. K. Sycara and C. M. Lewis, Forming shared mental models,
three or more parties. Such behaviors occur predomi- Proceedings of the Thirteenth Annual Meeting of the Cognitive
nantly in large hierarchical teams with subteams. For Science Society, Chicago, IL: 1991, pp. 400405.
instance, as a team scales up in size, the team is often 10. J. Orasanu, Shared mental models and crew performance,
organized into subteams, each of which may be divided Proceedings of the 34 Annual Meeting of the Human Factors
Society, Orlando, FL, 1990.
even more into smaller subteams, and so on. In such
cases, team knowledge might be distributed among sev- 11. D. Fensel, I. Horrocks, F. V. Harmelen, D. L. McGuinness
and Peter F. Patel-Schneider, oil: an ontology infras-
eral subteams. Hence, agents in one subteam might not
tructure for the semantic web, IEEE Intell. Sys., 16(2):
be able to anticipate the information needs of agents in 3845, 2001.
other subteams because they may not share the
12. R. Fagin, J. Y. Halpern, Y. Moses and M. Y. Vardi, Reasoning
resources for doing so, such as the subteam process, About Knowledge, Cambridge, MA: MIT Press, 1995.
the plans, and the task assignments. To enable informa-
13. P. R. Cohen and H. J. Levesque, Teamwork, Nous, 25(4): 487
tion sharing among subteams, some agents in a subteam 512, 1991.
are often designated as the point of contacts with other
14. N. R. Jennings, Controlling cooperative problem solving in
subteams. For example, an agent who simultaneously industrial multi-agent systems using joint intentions, Artifi-
participates in the activities of two subteams can be cial Intelligence, 75(2): 195240, 1995.
designated as the broker agent of the two subteams. 15. B. Grosz and S. Kraus, Collaborative plans for complex group
These broker agents play a key role in informing agents actions, Artificial Intelligence, 269358, 1996.
outside the subteam about the information needs of 16. P. R. Cohen and H. J. Levesque, On team formation, in J.
agents in the subteam. Such helping behaviors involving Hintikka and R. Tuomela (eds.), Contemporary Action Theory,
more than two parties can be accounted for by the axiom 1997.
given in Ref. 42, which establishes a basis for third-party 17. J. Searle, Collective intentions and actions, in P. R. Cohen, J.
communicative acts. Morgan and M. E. Pollack, eds., Intentions in Communication.
Cambridge, MA: MIT Press, 1990, pp. 401416.
18. R. Tuomela and K. Miller, We-intentions. Philos. Stud. 53:
SUMMARY
367389, 1988.
19. P. R. Cohen and H. J. Levesque, Rational interaction as a basis
Multiagent systems offer a new way of analyzing, design-
for communication, in Intentions in Communication, MIT
ing, and implementing large-scale, complex systems, and Press, 1990, pp. 221225.
they have been applied in an increasing range of software
20. B. Grosz and S. Kraus, The evolution of sharedplans, in A. Rao
applications. Here, we discussed the concept of shared and M. Wooldridge (eds.), Foundations and Theories of
mental models, multiagent architectures, coordination, Rational Agencies, 1998, pp. 227262.
communications, and helping behaviors, which are critical 21. A. S. Rao and M. P. Georef, BDI-agents: from theory to practice,
in developing team-based multiagent systems. This article Proceedings of the First Intl. Conference on Multiagent Sys-
certainly is not an exhaustive summary of MAS research; it tems, San Francisco, CA, 1995.
simply covers a limited view of the MAS research from 22. D. Martin, A. Cheyer and D. Moran, The Open agent
teamwork perspective. Readers are encouraged to refer to architecture: a framework for building distributed software
the key conferences in MAS area (such as AAMAS, KIMAS, systems. Applied Artificial Intelligence, 13(1-2): 91128,
IAT), which have been attracting a growing number of 1999.
researchers to present, demonstrate, and share their sys- 23. M. R. Endsley, Towards a theory of situation awareness in
tems and ideas. dynamic systems, Human Factors, 37: 3264, 1995.
8 MULTIAGENT SYSTEMS

24. D. V. Pynadath, M. Tambe, N. Chauvat and L. Cavedon, 38. X. Fan, J. Yen, R. Wang, S. Sun and R. A. Volz, Context-centric
Toward team-oriented programming, in Agent Theories, Archi- proactive information delivery, Proceedings of the 2004 IEEE/
tectures, and Languages, 1999, pp. 233247. WIC Intelligent Agent Technology Conference, 2004.
25. J. A. Giampapa and K. Sycara, Team-Oriented Agent Coordi- 39. P. L. Pearce and P. R. Amato, A taxonomy of helping: a multi-
nation in the RETSINA Multi-Agent System, tech. report dimensional scaling analysis, Social Psychology Quart, 43(4):
CMU-RI-TR-02-34, Robotics Institute, Carnegie Mellon Uni- 363371, 1980.
versity, 2002. 40. M. A. Marks, S. J. Zaccaro and J. E. Mathieu, Performance
26. JACK Teams manual. Available: http://www.agentsoftware.com/ implications of leader briefings and team interaction training
shared/ demosNdocs/JACK-Teams-Manual.pdf, 2003. for team adaptation to novel environments, J. Applied Psy-
27. J. Laird, A. Newell and P. Rosenbloom, SOAR: an architecture chol., 85: 971986, 2000.
for general intelligence, Artificial Intelligence, 33(1): 164, 41. T. L. Dickinson and R. M. McIntyre, A conceptual framework
1987. for teamwork measurement, in M. T. Brannick, E. Salas, and C.
28. K. Sycara, K. Decker, A. Pannu, M. Williamson and D. Zeng, Prince (Eds), Team Performance Assessment and Measure-
Distributed intelligent agents, IEEE Expert, Intelli. Syst. ment: Theory, Methods and Applications, 1997, pp. 1944.
Applicat. 11(6): 3645, 1996. 42. X. Fan, J. Yen and R. A. Volz, A theoretical framework on
29. X. Fan, J. Yen, M. Miller and R. Volz, The Semantics of proactive information exchange in agent teamwork, Artificial
MALLETan agent teamwork encoding language, 2004 Intell., 169: 2397, 2005.
AAMAS Workshop on Declarative Agent Languages and Tech-
nologies, 2004.
FURTHER READING
30. G. Tidhar, Team oriented programming: preliminary report.
Technical Report 41, AAII, Australia, 1993.
B. Grosz and C. Sidner, Plans for discourse, in P. Cohen, J. Morgan
31. J. Yen, X. Fan, S. Sun, T. Hanratty and J. Dumer, Agents with
and M. Pollack (eds.), Intentions in Communication, Cambridge,
shared mental models for enhancing team decision-makings,
MA: MIT Press, 1990, pp. 417444.
Decision Support Sys., Special issue on Intelligence and Secur-
M. N. Huhns, L. M. Stephens, Multiagent systems and societies of
ity Informatics, 2004.
agents, G. Weiss (ed.), In Multiagent Systems: A Modern Approach
32. J. A. Cannon-Bowers, E. Salas and S. A. Converse, Cognitive to Distributed Artificial Intelligence, Cambridge, MA: MIT Press,
psychology and team training: training shared mental models 1999, pp. 79120.
and complex systems, Human Factors Soc. Bull., 33: 14, 1990.
M. Wooldridge, An Introduction to MultiAgent Systems, New York:
33. F. Dignum and M. Greaves, Issues in agent communication, John Wiley & Sons, 2002.
LNAI 1916, Springer-Verlag, Berlin, 2000.
M. Wooldridge and N. Jennings, Intelligent agents: theory and
34. Y. Labrou and T. Finin, Semantics for an agent communication practice. Knowledge Engine. Rev., 10(2): 115152, 1995.
language, in M. Wooldridge, M. Singh, and A. Rao (eds),
M. J. Wooldridge and N. R. Jennings, Pitfalls of Agent-Oriented
Intelligent Agents IV: Agent Theories, Architectures and Lan-
Development, Proc. of the 2nd Int. Conf. on Autonomous Agents,
guages (LNCS 1365), 1998.
Minneapolis MN, 1998, pp. 385391.
35. FIPA: Agent Communication Language Specification. Avail-
able: http://www.fipa.org/, 2002.
36. J. Yen, X. Fan and R. A. Volz, Proactive communications in
agent teamwork, (F. in Dignum, ed., Advances in Agent Com- XIAOCONG FAN
munication LNAI-2922), Springer, 2004, pp. 271290. The Pennsylvania State University
37. M. P. Singh, Agent communication languages: Rethinking the Erie, Pennsylvania
principles, IEEE Computer, 31(12): 4047, 1998.
O
OBJECT-ORIENTED DATABASES ulate these structures. The basic principle of the object-
oriented approach in programming is indeed to consider the
Traditional database management systems (DBMSs), program consisting of independent objects, grouped in
which are based on the relational data model, are ade- classes, communicating among each other through mes-
quate for business and administrative applications and sages. Classes have an interface, which specifies the opera-
are characterized by data with a very simple structure and tions that can be invoked on objects belonging to the class,
by the concurrent execution of several not-so-complex and an implementation, which specifies the code imple-
queries and transactions. The rapid technologic evolution menting the operations in the class interface. The encap-
raised, since the early 1980s, new application require- sulation of class implementation allows for hiding data
ments for which the relational model demonstrated as representation and operation implementation. Inheritance
inadequate. The relational model, indeed, is not suitable allows a class to be defined starting from the definitions of
to handle data typical of complex applications, such as existing classes, called superclasses. An object can use
design and manufacturing systems, scientific and medical operations defined in its base class as well as in its super-
databases, geographical information systems, and multi- classes. Inheritance is thus a powerful mechanism for code
media databases. Those applications have requirements reuse. Polymorphism (overloading) allows for defining
and characteristics different from those typical of tradi- operations with the same name for different object types;
tional database applications for business and administra- together with overriding and late binding, this function-
tion. They are characterized by highly structured data, ality allows an operation to behave differently on objects of
long transactions, data types for storing images and texts, different classes. The great popularity of the object-
and nonstandard, application specific operations. To meet oriented approach in software development is mainly
the requirements imposed by those applications, new data caused by the increased productivity: The development
models and DBMSs have been investigated, which allow time is reduced because of specification and implementa-
the representation of complex data and the integrated tion reuse; the maintenance cost is reduced as well because
specification of domain-specific operations. of the locality of modifications. Another advantage of object
Getting a closer look at the large variety of applications orientation is represented by the uniqueness of the para-
DBMSs are mainly used by, we can distinguish different digm: All phases of the software lifecycle (analysis, design,
types of applications, with each characterized by different programming, etc.) rely on the same model, and thus, the
requirements toward data handling. The most relevant transition from one phase to another is smooth and natural.
application types include business applications, which are Moreover, the object-oriented paradigm represents a fun-
characterized by large amounts of data, with a simple damental shift with respect to how the software is pro-
structure, on which more or less complex queries and duced: The software is no longer organized according to the
updates are executed, which must be accessed concur- computer execution model (in a procedural way); rather, it
rently by several applications and require functionalities is organized according to the human way of thinking.
for data management, like access control; complex navi- Objects encapsulate operations together with the data
gational applications, such as CAD and telecommunica- these operations modify, which thus provides a data-
tions, that need to manipulate data whose structures and oriented approach to program development. Finally, the
relationships are complex and to efficiently traverse such object-oriented paradigm, because of encapsulation, is well
relationships; multimedia applications, requiring storage suited for heterogeneous system integration, which is
and retrieval of images, texts and spatial data, in addition required in many applications.
to data representable in tables, that require the definition In an object-oriented programming language, objects
of application-specific operations, and the integration of exist only during program execution. In a database, by
data and operations from different domains. Relational contrast, objects can be created that persist and can
DBMSs handle and manipulate simple data; they support be shared by several programs. Thus, object databases
a query language (SQL) well suited to model most business must store persistent objects in secondary memory and
applications, and they offer good performance, multiuser must support object sharing among different applica-
support, access control, and reliability. They have demon- tions. This process requires the integration of the
strated extremely successfully for the first kind of appli- object-oriented paradigm with typical DBMS mechan-
cations, but they have strong limitations with respect to isms, such as indexing mechanisms, concurrency control,
the others. and transaction management mechanisms. The efforts
The object-oriented approach, which was becoming toward this integration led to the definition and devel-
powerful in the programming language and software engi- opment of object-oriented database management sys-
neering areas in the early years, seemed a natural candi- tems (OODBMSs) (14) and, later on, of object
date, because it provides the required flexibility not being relational database management systems (57).
constrained by the data types and query languages avail- Object-oriented databases are based on an object data
able in traditional database systems and specifies both the model, which is completely different from the traditional
structures of complex objects and the operations to manip- relational model of data, whereas object relational data-

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 OBJECT-ORIENTED DATABASES

bases rely on extensions of the relational data model with OBJECT-ORIENTED DATA MODELS
the most distinguishing features of the object paradigm.
Thanks to their evolutive nature with respect to rela- In this section, we introduce the main concepts of object-
tional DBMSs, object relational systems are succeeding oriented data models, namely, objects, classes, and inheri-
in the marketplace and the data model of the SQL stan- tance. In the next section, we will present the data model of
dard has been an object relational data model since SQL: the ODMG standard.
1999 (7).
OODBMSs have been proposed as an alternative tech- Objects
nology to relational DBMSs. They mainly result from the
An object-oriented database is a collection of objects. In
introduction of typical DBMS functionality in an object-
object-oriented systems, each real-world entity is repre-
oriented programming environment (8). OODBMSs allow
sented by an object. Each object has an identity, a state, and
for directly representing complex objects and efficiently
a behavior. The identity is different from the identity of any
supporting navigational applications. Because the under-
other object and is immutable during the object lifetime; the
lying data model is an object model, they allow you to
state consists of the values of the object attributes; the
store your data in the same format you want to use your
behavior is specified by the methods that act on the object
data (9), and thus, they overcome the impedance mis-
state, which is invoked by the corresponding operations.
match between the programming language and the DBMS
Many OODBMS actually do not require each entity to be
(10). Research in the area of object-oriented databases has
represented as an object; rather, they distinguish between
been characterized by a strong experimental work and the
objects and values. The differences between values and
development of several prototype systems, whereas only
objects are as follows (11)
later theoretical foundations have been investigated and
standards have been developed. The ODMG (Object Data  Values are universally known abstractions, and they
Management Group) standard for OODBMSs was indeed
have the same meaning for each user; objects, by
first proposed in 1993, and several years later, the first
contrast, correspond to abstractions whose meaning
OODBMSs were on the market. Moreover, because
is specified in the context of the application.
OODBMSs mainly originated from object-oriented pro-
gramming languages, systems originating from different
 Values are built-in in the system and do not need to be
languages rely on different data models. Even nowadays, defined; objects, by contrast, must be introduced in the
despite the advent of Java, that de facto standardized the system through a definition.
object model in programming, sensible differences persit  The information represented by a value is the value
among different systems, even those participating in the itself, whereas the meaningful information repre-
ODMG consortium. This lack of an initial common refer- sented by an object is given by the relationships it
ence model and the low degree of standardization, has with other objects and values; values are therefore
together with the limited support for powerful declara- used to describe other entities, whereas objects are the
tive, high-level query languages, and functionalities not entities being described.
comparable with those of relational DBMSs for what
concerned data security, concurrency control, and recov- Thus, values are elements of built-in domains, whereas
ery, are among the main reasons because OODBMSs could objects are elements of uninterpreted domains. Typical
not impose themselves in the marketplace. examples of values are integers, reals, and strings. Each
Object relational DBMSs, by contrast, which were born object is assigned an immutable identifier, whereas a value
as an extension of the relational technology with the char- has no identifier; rather it is identified by itself.
acteristics of the object model, needed to support a wider
range of applications. They are motivated by the need to Object Identity. Each object is identified uniquely by an
provide relational DBMS functionalities in traditional object identifier (OID), which provides it with an identity
data handling while extending the data model so that independent from its value. The OID is unique within the
complex data can be handled. The choice is to introduce system, and it is immutable; that is, it does not depend on
the distinguishing features of the object paradigm in the the state of the object. Object identifiers are usually not
relational model without changing the reference model. visible and accessible directly by the database users; rather
As relational DBMSs, indeed, object relational DBMSs they are used internally by the system to identify objects
handle rows of tables, provide a declarative query language and to support object references through object attribute
(SQL), and inherit the strength of relational systems in values. Objects can thus be interconnected and can share
terms of efficiency and reliability in data management. components. The semantics of object sharing is illustrated
In this article, we discuss the application of the object- in Fig. 1. The figure shows two objects that, in case (b), share
oriented paradigm to the database context, with a focus on a component, whereas in case (a), they do not share any
data model and query language aspects. We first introduce object and simply have the same value for the attribute
the main notions of object-oriented data models and query date. Although in case (a) a change in the publication date
languages, and then present the ODMG standard. Existing of Article [i] from March 1997 to April 1997 does not affect
OODBMSs are then surveyed briefly, and object-relational the publication date of Article [j], in case (b), the change
databases are introduced. We conclude by mentioning some is also reflected on Article[j].
issues in object databases that are not dealt with in the The notion of object identifier is different from the notion
article. of key used in the relational model to identify uniquely each
OBJECT-ORIENTED DATABASES 3

(a)  Equality by identity: Two objects are identical if


1. Article[i] Article[j] they are the same object, that is, if they have the same
identifier.
title: CAD Databases - Models title: CAD Databases - Tools
authors: {Author[i], Author[k]} authors: {Author[i], Author[k]}  Equality by value: Two objects are equal if the values
journal: CAD Journal journal: CAD Journal for their attributes are equal recursively.
date: March 1997 date: March 1997

Obviously, two identical objects are also equal, whereas


2. Article[i] Article[j] the converse does not hold. Some object-oriented data
models also provide a third kind of equality, which is known
title: CAD Databases - Models title: CAD Databases - Tools
authors: {Author[i], Author[k]} authors: {Author[i], Author[k]}
as shallow value equality by which two objects are equal,
journal: CAD Journal journal: CAD Journal although not being identical, if they share all attributes.
date: April 1997 date: March 1997
Object State. In an object-oriented database, the value
associated with an object (that is, its state) is a complex
value that can be built starting from other objects and
(b)
values, using some type constructors. Complex (or struc-
1. Article[i] Article[j]
tured) values are obtained by applying those constructors
title: CAD Databases - Models title: CAD Databases - Tools to simpler objects and values. Examples of primitive values
authors: {Author[i], Author[k]} authors: {Author[i], Author[k]} are integers, characters, strings, booleans, and reals. The
journal: CAD Journal journal: CAD Journal
date: date: minimal set of constructors that a system should provide
include sets, lists, and tuples. In particular, sets are crucial
because they are a natural way to represent real-world
Date[i] collections and and multivalued attributes; the tuple con-
structor is important because it provides a natural way to
month: March
year: 1997 represent the properties of an entity; lists and arrays are
similar to sets, but they impose an order on the elements of
the collection and are needed in many scientific applica-
2. Article[i] Article[j] tions. Those constructors can be nested arbitrarily. A com-
title: CAD Databases - Models title: CAD Databases - Tools plex value can contain as components (references to)
authors: {Author[i], Author[k]} authors: {Author[i], Author[k]} objects.
journal: CAD Journal journal: CAD Journal
date: date: Many OODBMSs, moreover, support storage and retrie-
val of nonstructured values of large size, such as character
strings or bit strings. Those values are passed as they are,
Date[i] that is, without being interpreted, to the application pro-
gram for the interpretation. Those values, which are known
month: April as BLOBs (binary large objects), are big-sized values like
year: 1997
image bitmaps or long text strings. Those values are not
Figure 1. Object-sharing semantics. structured in that the DBMS does not know their structure;
rather the application using them knows how to interpret
them. For example, the application may contain some
functions to display an image or to search for some key-
tuple in a relation. A key is defined as the value of one or words in a text.
more attributes, and it can be modified, whereas an OID is
independent from the value of an object state. Specifically, Object Behavior. Objects in an object-oriented database
two different objects have different OIDs even when all are manipulated through methods. A method definition
their attributes have the same values. Moreover, a key is consists of two components: a signature and an implemen-
unique with respect to a relation, whereas an OID is unique tation. The signature specifies the method name, the names
within the entire database. The use of OIDs, as an identi- and types of method arguments, and the type of result, for
fication mechanism, has several advantages with respect methods returning a result value. Thus, the signature is a
to the use of keys. First, because OIDs are implemented by specification of the operation implemented by the method.
the system, the application programmer does not have to Some OODBMSs do not require the specification of argu-
select the appropriate keys for the various sets of objects. ment types; however, this specification is required in sys-
Moreover, because OIDs are implemented at a low level by tems performing static-type checking. The method
the system, better performance is achieved. A disadvantage implementation consists of a set of instructions expressed
in the use of OIDs with respect to keys could be the fact that in a programming language. Various OODBMSs exploit
no semantic meaning is associated with them. Note, how- different languages. For instance, ORION exploits Lisp;
ever, that very often in relational systems, for efficiency GemStone a Smalltalk extension, namely OPAL; and O2 a C
reasons, users adopt semantically meaningless codes as extension, namely CO2; other systems, among which are
keys, especially when foreign keys need to be used. ObjectStore, POET, and Ode, exploit C or Java.
The notion of object identity introduces at least two The use of a general-purpose, computationally complete
different notions of object equality: programming language to code methods allows the whole
4 OBJECT-ORIENTED DATABASES

application to be expressed in terms of objects. Thus no need ates objects answering to all messages defined for the class.
exists, which is typical of relational DBMSs, to embed the Obviously, the attribute values must be stored separately
query language (e.g., SQL) in a programming language. for each object; however, no need exists to replicate method
definitions, which are associated with the class.
Encapsulation. In a relational DBMS, queries and appli- However, some class features cannot be observed as
cation programs that act on relations are expressed in an attributes of its instances, such as the number of class
imperative language incorporating statements of the data instances present in each moment in the database or the
manipulation language (DML), and they are stored in a average value of an attribute. An example of an operation
traditional file system rather than in the database. In such that is invoked on classes rather than on objects is the new
an approach, therefore, a sharp distinction is made between operation for creating new instances. Some object-oriented
programs and data and between query language and pro- data models, like those of GemStone and ORION, allow the
gramming language. In an object-oriented database, data definition of attributes and methods that characteriz the
and operations manipulating them are encapsulated in a class as an object, which are, thus, not inherited by the class
single structure: the object. Data and operations are thus instances.
designed together, and they are both stored in the same
system. Aggregation Hierarchy and Relationships. In almost all
.The notion of encapsulation in programming languages object-oriented data models, each attribute has a domain,
derives from the concept of abstract data type. In this view, that specifies the class of possible objects that can be
an object consists of an interface and an implementation. assigned as values to the attribute. If an attribute of a class
The interface is the specification of the operations that can C has a class C0 as domain, each C instance takes as value
be executed on the object, and it is the only part of the object for the attribute an instance of C0 or of a subclass of its.
that can be observed from outside. Implementation, by Moreover, an aggregation relationship is established
contrast, contains data, that is, the representation or state between the two classes. An aggregation relationship
of the object, and methods specifying the implementation of between the class C and the class C0 specifies that C is
each operation. This principle, in the database context, is defined in terms of C0 . Because C0 can be in turn defined in
reflected in that an object contains both programs and data, terms of other classes, the set of classes in the schema is
with a variation: In the database context, it is not clear organized into an aggregation hierarchy. Actually, it is not
whether the structure that defines the type of object is part a hierarchy in a strict sense, because class definitions can be
of the interface. In the programming language context, the recursive.
data structure is part of the implementation and, thus, not An important concept that exists in many semantic
visible. For example, in a programming language, the data models and in models for the conceptual design of data-
type list should be independent from the fact that lists are bases (12) is the relationship. A relationship is a link
implemented as arrays or as dynamic structures; thus, this between entities in applications. A relationship between
information is hidden correctly. By contrast, in the database a person and his employer () is one example; another
context, the knowledge of an object attributes, and refer- (classic) example is the relationship among a product, a
ences made through them to other objects, is often useful. customer, and a supplier (), which indicates that a given
Some OODBMSs, like ORION, allow us to read and product is supplied to a given customer by a given sup-
write the object attribute values, which thus violates encap- plier. Associations are characterized by a degree, which
sulation. The reason is to simplify the development of indicates the number of entities that participate in the
applications that simply access and modify object attri- relationship, and by some cardinality constraints, which
butes. Obviously, those applications are very common in indicate the minimum and maximum number of relation-
the database context. Strict encapsulation would require ships in which an entity can participate. For example,
writing many trivial methods. Other systems, like O2, allow relationship () has degree 2; that is, it is binary, and its
for specifying which methods and attributes are visible in cardinality constraints are (0,1) for person and (1,n) for
the object interface and thus can be invoked from outside employer. This example reflects the fact that a person can
the object. Those attributes and methods are called public, have at most one employer, whereas an employer can have
whereas those that cannot be observed from outside the more than one employee. Referring to a maximum cardin-
object are called private. Finally, some other systems, ality constraint, relationships are partitioned in one-to-
including GemStone, force strict encapsulation. one, one-to-many, and many-to-many relationships.
Finally, relationships can have their own attributes; for
Classes example, relationship () can have attributes quantity
and unit price, which indicates, respectively, the quan-
Instantiation is the mechanism that offers the possibility of tity of the product supplied and the unit price quoted. In
exploiting the same definition to generate objects with the most object-oriented data models, relationships are repre-
same structure and behavior. Object-oriented languages sented through object references. This approach, how-
provide the notion of class as a basis for instantiation. In ever, imposes a directionality on the relationship. Some
this respect, a class acts as a template, by specifying a models, by contrast, allow the specification of binary
structure, that is, the set of instance attributes, which is relationships, without, however, proper attributes.
a set of methods that define the instance interface (method
signatures) and implement the instance behavior (method Extent and Persistence Mechanisms. Besides being a tem-
implementations). Given a class, the new operation gener- plate for defining objects, in some systems, the class also
OBJECT-ORIENTED DATABASES 5

denotes the collection of its instances; that is, the class has to it have been removed (a periodic garbage collection
also the notion of extent. The extent of a class is the is performed). This approach, which was adopted
collection of all instancesgenerated from this class. This by the GemStone and O2 systems, ensures referential
aspect is important because the class is the basis on which integrity.
queries are formulated: Queries are meaningful only when
they are applied to object collections. In systems in which Migration. Because objects represent real-world enti-
classes do not have the extensional function, the extent of ties, they must be able to reflect the evolution in time of
each class must be maintained by the applications through those entities. A typical example is that of a person who is
the use of constructors such as the set constructor. Differ- first of all a student, then an employee, and then a retired
ent sets can contain instances of the same class. Queries are employee. This situation can be modeled only if an object
thus formulated against such sets and not against classes. can become an instance of a class different from the one
The automatic association of an extent with each class (like from which it has been created. This evolution, known as
in the ORION system) has the advantage of simplifying the object migration, allows an object to modify its features,
management of classes and their instances. By contrast, that is, attributes and operations, by retaining its identity.
systems (like O2 and GemStone) in which classes define Object migration among classes introduces, however,
only specification and implementation of objects and semantic integrity problems. If the value for an attribute
queries are issued against collections managed by the A of an object O is another object O0 , an instance of the class
applications, which provide a greater flexibility at the price domain of A, and O0 changes class, if the new class of O0 is no
of an increased complexity in managing class extents. more compatible with the class domain of A, the migration
An important issue concerns the persistence of class of O0 will result in O containing an illegal value for A. For
instances, that is, have modalities objects are made persis- this reason, migration currently is not supported in most
tent (that is, inserted in the database) and are deleted existing systems.
eventually (that is, removed from the database). In rela-
tional databases, explicit statements (like INSERT and Inheritance
DELETE in SQL) are provided to insert and delete data
from the database. In object-oriented databases, two dif- Inheritance allows a class, called a subclass, to be defined
ferent approaches can be adopted with respect to object starting from the definition of another class, called a super-
persistence: class. The subclass inherits attributes and methods of its
superclass; a subclass may in addition have some specific,
 Persistence is an implicit property of all class noninherited features. Inheritance is a powerful reuse
instances; the creation (through the new operation) mechanism. By using such a mechanism, when defining
of an instance also has the effect of inserting the two classes their common properties, if any, can be identi-
instance in the database; thus, the creation of an fied and factorized in a common superclass. The definitions
instance automatically implies its persistence. This of the two classes will, by contrast, specify only the distin-
approach usually is adopted in systems in which guishing specific properties of these classes. This approach
classes also have an extensional function. Some sys- not only reduces the amount of code to be written, but it also
tems provide two different new operations: one for has the advantage of giving a more precise, concise, and rich
creating persistent objects of a class and the other description of the world being represented.
one for creating temporary objects of that class. Some systems allow a class to have several direct super-
classes; in this case, we talk of multiple inheritance. Other
 Persistence is an orthogonal properties of objects; the systems impose the restriction to a single superclass; in this
creation of an instance does not have the effect of case, we talk of single inheritance. The possibility of defining
inserting the instance in the database. Rather, if an a class starting from several superclasses simplifies the
instance has to survive the program that created it, it task of the class definition. However, conflicts may develop.
must be made persistent, for example, by assigning it a Such conflicts may be solved by imposing an ordering
name or by inserting it into a persistent collection of on superclasses or through an explicit qualification mechan-
objects. This approach usually is adopted in systems in ism.
which classes do not have the extensional function. In different computer science areas and in various
object-oriented languages, different inheritance notions
With respect to object deletion, two different approaches exist. In the knowledge representation context, for
are possible: instance, inheritance has a different meaning from the
one it has in object-oriented programming languages. In
 The system provides an explicit delete operation. The the former context, a subclass defines a specialization with
possibility of explicitly deleting objects poses the pro- respect to features and behaviors of the superclass,
blem of referential integrity; if an object is deleted and whereas in the latter, the emphasis is on attribute and
other objects refer to it, references are not any longer method reuse. Different inheritance hierarchies can then
valid (such references are called as dangling refer- be distinguished: subtype hierarchy, which focuses on con-
ences). The explicit deletion approach is adopted by sistency among type specifications; classification hierar-
the ORION and Iris systems. chy, which expresses inclusion relationships among object
 The system does not provide an explicit delete opera- collections; and implementation hierarchy, which allows
tion. A persistent object is deleted only if all references code sharing among classes. Each hierarchy refers to dif-
6 OBJECT-ORIENTED DATABASES

ferent properties of the type/class system; those hierar- kinds of arcs. The node representing a class C can be linked
chies, however, generally are merged into a single inheri- to the node representing class C0 through:
tance mechanism.
1. A thin arc, which denotes that C0 is the domain of an
attribute A of C (aggregation hierarchy).
Overriding, Overloading, and Late Binding. The notion of
overloading is related to the notion of inheritance. In many 2. A bold arc, which denotes that C0 is superclass of C
cases, it is very useful to adopt the same name for different (inheritance hierarchy).
operations, and this possibility is extremely useful in the
object-oriented context. Consider as an example (9) a QUERY LANGUAGES
display operation receiving as input an object and display-
ing it. Depending on the object type, different display Query languages are an important functionality of any
mechanisms are exploited: If the object is a figure, it should DBMS. A query language allows users to retrieve data by
appear on the screen; if the object is a person, its data simply specifying some conditions on the content of those
should be printed in some way; if the object is a graph, a data. In relational DBMSs, query languages are the only
graphical representation of it should be produced. In an way to access data, whereas OODBMSs usually provide two
application developed in a conventional system, three dif- different modalities to access data. The first one is called
ferent operations display_graph, display_person, navigational and is based on object identifiers and on the
and display_figure would be defined. This process aggregation hierarchies into which objects are organized.
requires the programmer to be aware of all possible object Given a certain OID, the system can access directly and
types and all associated display operations and to use them efficiently the object referred by it and can navigate through
properly. objects referred by the components of this object. The second
In an object-oriented system, by contrast, the display access modality is called associative, and it is based on SQL-
operation can be defined in a more general class in the class like query languages. These two different access modalities
hierarchy. Thus, the operation has a single name and can be are used in a complementary way: A query is evaluated to
used indifferently on various objects. The operation imple- select a set of objects that are then accessed and manipu-
mentation is redefined for each class; this redefinition is lated by applications through the navigational mechanism.
known as overriding. As a result, a single name denotes Navigational access is crucial in many applications, such as
different programs, and the system takes care of selecting graph traversal. Such type of access is inefficient in rela-
the appropriate one at each time during execution. The tional systems because it requires the execution of a large
resulting code is simpler and easier to maintain, because number of join operations. Associative access, by contrast,
the introduction of a new class does not require modifica- has the advantage of supporting the expression of declara-
tion of the applications. At any moment, objects of other tive queries, which reduces thus application development
classes, for example, information on some products, can be time. Relational DBMSs are successful mostly because
added to the application and can be displayed by simply of their declarative query languages.
defining a class, for example, product, to provide a proper A first feature of object-oriented query languages is the
(re)definition of the display operation. The application possibility they offer of imposing conditions on nested
code would not require any modification. attributes of an object aggregation hierarchy, through
To support this functionality, however, the system can path expressions, which allows for expressing joins to
no longer bind operation names to corresponding code at retrieve the values of the attributes of an object compo-
compile time; rather, it must perform such binding at run nents. In object-oriented query languages, therefore, two
time: This late translation is known as late binding. Thus, different kinds of join can be distinguished: implicit join,
the notion of overriding refers to the possibility for a class of which derives from the hierarchical structure of objects,
redefining attributes and methods it inherits from its and explicit join, that, as in relational query languages,
superclasses; thus, the inheritance mechanism allows for which explicitly compares two objects. Other important
specializing a class through additions and substitutions. aspects are related to inheritance hierarchies and methods.
Overriding implies overloading, because an operation First, a query can be issued against a class or against a class
shared along an inheritance hierarchy can have different and all its subclasses. Most existing languages support both
implementations in the classes belonging to this hierarchy; of these possibilities. Methods can be used as derived
therefore, the same operation name denotes different attributes or as predicate methods. A method used as a
implementations. derived attribute is similar to an attribute; however,
whereas the attribute stores a value, the method computes
An Example a value starting from data values stored in the database. A
predicate method is similar, but it returns the Boolean
Figure 2 illustrates an example of object-oriented database constants true or false. A predicate method evaluates
schema. In the figure, each node represents a class. Each some conditions on objects and can thus be part of the
node contains names and domains of the attributes of the Boolean expressions that determine which objects satisfy
class it represents. For the sake of simplicity, we have not the query.
included in the figure neither operations nor class features. Moreover, object-oriented query languages often pro-
Moreover, only attributes and no relationships have been vides constructs for expressing recursive queries, although
included in classes. Nodes are connected by two different recursion is not a peculiar feature of the object-oriented
OBJECT-ORIENTED DATABASES 7

paradigm and it has been proposed already for the rela- tivity, O2 Technology, and Versant Technology and as
tional data model. It is, however, important that some kind nonvoting members HP, Servio Logics, Itasca, and Texas
of recursion can be expressed, because objects relevant for Instruments. The ODMG standard consists of the following
many applications are modeled naturally through recur- components:
sion. The equality notion also influences query semantics.
The adopted equality notion determines the semantics and  A data model (ODMG Object Model)
the execution strategy of operations like union, difference,  A data definition language (ODL)
intersection, and duplicate elimination. Finally, note that  A query language (OQL)
external names that some object-oriented data models allow
 Interfaces for the object-oriented programming lan-
for associating with objects provides some semantically
guages C Java, and Smalltalk and data manipula-
meaningful handlers that can be used in queries.
tion languages for those languages
A relevant issue for object-oriented query languages is
related to the language closure. One of the most remarkable
The ODMG Java binding is the basis on which the Java
characteristics of relational query languages is that the
Data Objects specification (13) has been developed, which
results of a query are in turn relations. Queries can then
provides the reference data model for persistent Java
be composed; that is, the result of a query can be used as an
applications. In this section, we briefly introduce the
operand in another query. Ensuring the closure property in
main features of the ODMG 3.0 standard data model and
object-oriented query language is by contrast more difficult:
of its query language OQL (14).
The result of a query often is a set of objects, whose class does
not exist in the database schema and that is defined by the
Data Definition in ODMG
query. The definition of a new class on-the-fly as a result of
a query poses many difficulties, including where to position ODMG supports both the notion of object and the notion of
the new class in the inheritance hierarchy and which meth- value (literal in the ODMG terminology). Literals can
ods should be defined for such class. Moreover, the issue of belong to atomic types like long, short, float, double, Boo-
generating OIDs for the new objects, which are the results of lean, char, and string; to types obtained through the set,
the query and instances of the new class, must be addressed. bag, list, and array constructors; to enumeration types
To ensure the closure property, an approach is to impose (enum); and to the structured types date, interval, time,
restrictions on the projections that can be executed on and timestamp.
classes. A common restriction is that either all the object A schema in the ODMG data model consists of a set of
attributes are returned by the query or only a single attri- object types related by inheritance relationships. The model
bute is returned. Moreover, no explicit joins are allowed. In provides two different constructs to define the external
this way the result of a query is always a set of already specification of an object type. An interface definition only
existing objects, which are instances of an already existing defines the abstract behavior of an object type, whereas a
class; the class can be a primitive class (such as the class of class definition defines the abstract state and behavior of an
integers, string, and so forth) or a user-defined class. If one object type. The main difference between class and interface
wants to support more general queries with arbitrary pro- types is that classes are types that are instantiable directly,
jections and explicit joins, a first approach to ensure closure whereas interfaces are types that cannot be instantiated
is to consider the results of a query as instances of a general directly. Moreover, an extent and one or more keys can be
class, accepting all objects and whose methods only allow for associated optionally with a class declaration. The extent of
printing or displaying objects. This solution, however, does a type is the set of all instances of the class.
not allow objects to be reused for other manipulations and, Objects have a state and a behavior. The object state
therefore, limits the nesting of queries, which is the main consists of a certain number of properties, which can be
motivation for ensuring the closure property. Another pos- either attributes or relationships. An attribute is related to a
sible approach is to consider the result of a query as a class, whereas a relationship is defined between two classes.
collection of objects, instances of a new class, which is The ODMG model only supports binary relationships, that
generated by the execution of the query. The class implicitly is, relationships between two classes; one-to-one, one-to-
defined by the query has no methods; however, methods for many, and many-to-many relationships are supported. A
reading and writing attributes are supposed to be available, relationship is defined implicitly through the specification of
as system methods. The result of a query is thus similar to a a pair of traversal paths, which enable applications to use
set of tuples. An alternative solution (11) is, finally, that of the logical connection between objects participating in the
including relations in the data model and of defining the relationship. Traversal paths are declared in pairs, one for
result of a query as a relation. each traversal direction of the binary relationship. The
inverse clause of the traversal path definition specifies
that two traversal paths refer to the same relationship.
THE ODMG STANDARD The DBMS is responsible for ensuring value consistency
and referential integrity for relationships, which means
ODMG is an OODBMS standard, which consists of a data that, for example, if an object participating in a relationship
model and a language, whose first version was proposed in is deleted, any traversal path leading to it is also deleted.
1993 by a consortium of major companies producing Like several object models, the ODMG object model
OODBMSs (covering about 90% of the market). This con- includes inheritance-based typesubtype relationships.
sortium included as voting members Object Design, Objec- More precisely, ODMG supports two inheritance rela-
8 OBJECT-ORIENTED DATABASES

tionships: the ISA relationship and the EXTENDS rela- relationship Domain Name
tionships. Subtyping through the ISA relationship per- inverse Class Inverse Name
tains to the inheritance of behavior only; thus, interfaces where Domain can be either Class, in the case of unary
may inherit from other interfaces and classes may also relationships, or a collection of Class elements, and Inverse
inherit from interfaces. Subtyping through the Name is the name of the inverse traversal path.
EXTENDS relationship pertains to the inheritance of  Each method in the list is specified as
both state and behavior; thus, this relationship relates
only to classes. Multiple inheritance is allowed for the Type Name(Parameter List) [raises Exception
ISA, whereas it is not allowed for the EXTENDS relation- List]
ship.
The ODMG class definition statement has the following where Parameter List is a list of parameters specified as
format: in | out | inout Parameter Name
class ClassName [:SuperInterface List ]
[EXTENDS SuperClass ] and the raises clause allows for specifying the excep-
[
(extent Extent Name [key [s]Attribute List ]] tions that the method execution can introduce.
{Attribute List
Relationship List The following ODL definition defines the following
Method List } classes: Employee, Document, Article, Project,
and Task of the database schema of Fig. 2, in which
In the above statement: some relationships between projects and employees (rather
than the leader attribute of class Project), and between
 The : clause specifies the interfaces by which the class employees and tasks (rather than the tasks attribute of
inherits through ISA. class Employee), have been introduced. The main differ-
ence in representing a link between objects as a relation-
 The EXTENDS clause specifies the superclass by which
ship rather than as a reference (that is, attribute value) is in
the class inherits through EXTENDS.
the nondirectionality of the relationship. If, however, only
 The extent clause specifies that the extent of the class one direction of the link is interesting, the link can be
must be handled by the OODBMS. represented as an attribute.
 The key [s] clause, which can appear only if the
extent clause is present, specifies a list of attributes class Employee (extent Employees key name)
for which two different objects belonging to the extent { attribute string name;
cannot have the same values. attribute unsigned short salary;
attribute unsigned short phone_nbr[4];
 Each attribute in the list is specified as
attribute Employee manager;
attribute Domain Name; attribute Project project;
relationship Project leads
 Each relationship in the list is specified as inverse Project::leader;

Technical
Report
institution : String
number: Number
date : Date

Project Set Document Article


name : String title : String journal : String
documents : authors : publ_date : Date
leader: state : String
tasks : content : ......
List
Set
Employee
Task name : String
man_month : Number salary : Number
start_date : Date phone_nbr : Number
end_date : Date project :
coordinator : tasks :
manager : Set

Figure 2. An example of object-oriented


database schema.
OBJECT-ORIENTED DATABASES 9

relationship Set<Task> tasks collection, structure, literal). The query result is an object
inverse Task:participants; whose type is inferred from the operators in the query
} expression. The result of the query retrieve the starting
date of tasks with a man power greater than 20 months,
class Document (extent Documents key title) which is expressed in OQL as
{ attribute string title;
attribute List<Employee> authors; select distinct t.start_date
attribute string state; from Tasks t
attribute string content; where t.man_month > 20
}
is a literal of type Set < date >.
class Article EXTENDS Document (extent Articles) The result of the query retrieve the starting and ending
{ attribute string journal; dates of tasks with a man power greater than 20 months,
attribute date publ_date; which is expressed in OQL as
}
select distinct struct(sd: t.start_date,
class Project (extent Projects key name) ed: t.end_date)
{ attribute string name; from Tasks t
attribute Set<Document> documents; where t.man_month > 20
attribute Set<Task> tasks;
relationship Employee leader is a literal of type Set < struct(sd : date, ed :
inverse Employee::leads; date) >.
} A query can return structured objects having objects as
components, as it can combine attributes of different
class Task (extent Tasks) objects. Consider as an example the following queries.
{ attribute unsigned short man_month; The query retrieve the starting date and the coordinator
attribute date start_date; of tasks with a man power greater than 20 months, which
attribute date end_date; is expressed in OQL as
attribute Employee coordinator;
relationship Set<Employee> participants select distinct struct(st: t.start_date,
inverse Employee::tasks; c: coordinator)
} from Tasks t
where t.man_month > 20
Data Manipulation in ODMG
ODMG does not support a single DML; rather, three produces as a result a literal with type Set <
different DMLs are provided, which are related to C, struct(st : date, c : Employee) >. The query retrieve
Java, and Smalltalk, respectively. These OMLs are based the starting date, the names of the coordinator and of
on different persistence policies, which correspond to participants of tasks with a man power greater than 20
different object-handling approaches in the languages. months, which is expressed in OQL as
For example, C OML supports an explicit delete opera-
tion (delete_object), whereas Java and Smalltalk select distinct struct(sd: t.start_date,
OMLs do not support explicit delete operations; rather, cn: coordinator.name,
they are based on a garbage collection mechanism. pn: (select p.name
ODMG, by contrast, supports an SQL-like query lan- from t.participants p))
guage (OQL), which is based on queries of the select from from Tasks t
where form that has been influenced strongly by the O2 where t.man_month > 20
query language (15). The query returning all tasks with a
manpower greater than 20 months, whose coordinator produces as a result a literal with type Set <
earns more than $20,000, is expressed in OQL as follows: struct(st : date, cn : string, pn : bag < string
>) >.
select t OQL is a very rich query language. In particular it
from Tasks t allows for expressing, in addition to path expressions
where t.man_month > 20 and and projections on arbitrary sets of attributes, which are
t.coordinator.salary > 20000 illustrated by the above examples, explicit joins and queries
containing method invocations. The query retrieve the
OQL is a functional language in which operators can be technical reports having the same title of an article, is
composed freely as a consequence of the fact that query expressed in OQL as
results have a type that belongs to the ODMG type system.
Thus, queries can be nested. As a stand-alone language, select tr
OQL allows for querying an object denotable through their from Technical_Reports tr, Articles a
names. A name can denote an object of any type (atomic, where tr.title = a title
10 OBJECT-ORIENTED DATABASES

(24), and nowadays object relational systems include,


The query retrieve the name and the bonus of employ- among others, DB2 (25,26), Oracle (27), Microsoft SQL
ees having a salary greater than 20000 and a bonus greater Server (28), Illustra/Informix (29), and Sybase (30). All of
than 5000 is expressed in OQL as these systems extend a relational DBMS with object-
oriented modeling features. In all those DBMSs, the type
select distinct struct(n: e.name, b: e.bonus)
of system has been extended in some way and the possibility
from Employees e
has been introduced of defining methods to model user-
where e.salary > 20000 and e.bonus > 5000
defined operations on types. The SQL standard, since its
SQL:1999 version (7), has been based on an object-relational
OQL finally supports the aggregate functions min,
data model. In what follows, we discuss briefly the most
max, count, sum, and avg. As an example, the query
relevant type of system extensions according to the most
retrieve the maximum salary of coordinators of tasks of
recent version of the SQL standard, namely, SQL:2003 (31).
the CAD project can be expressed in OQL as
select max(select t.coordinator.salary Primitive Type Extensions
from p.tasks t)
Most DBMSs support predefined types like integers, float-
from Projects p
ing points, strings, and dates. Object relational DBMSs
where p.name = CAD
support the definition of new primitive types starting
from predefined primitive types and the definition of
user-defined operations for these new primitive types.
OBJECT-ORIENTED DBMSs Operations on predefined types are inherited by the user-
defined type, unless they are redefined explicitly. Consider
As we have discussed, the area of object-oriented databases as an example a yen type, which corresponds to the Japa-
has been characterized by the development of several sys- nese currency. In a relational DBMS, this type is repre-
tems in the early stages, followed only later by the devel- sented as a numeric type with a certain scale and precision,
opment of a standard. Table 1 compares some of the most for example DECIMAL(8,2). The predefined operations of
influential systems along several of dimensions. In the the DECIMAL type can be used on values of this type, but no
comparison, we distinguish systems in which classes have other operations are available. Thus, any additional seman-
an extensional function, that is, in which with a class the set tics, for instance, as to convert yens to dollars, must be
of its instances is associated automatically, from those in handled by the application, as the display in an appropriate
which object collections are defined and handled by the format of values of that type. In an object relational DBMS,
application. We point out, moreover, the adopted persis- by contrast, a type yen can be defined as follows:
tence mechanism, which distinguishes among systems in
which all objects are created automatically as persistent, CREATE TYPE yen AS Decimal(8,2);
systems in which persistence is ensured by linking an object and the proper functions can be associated with it.
to a persistence root (usually an external name), and sys-
tems supporting two different creation operations, one for Complex Types
creating temporary objects and the other one for creating
A complex, or structured, type includes one or more attri-
persistent objects. The different policies with respect to
butes. This notion corresponds to the notion of struct of the
encapsulation are also shown, which distinguishes among
C language or to the notion of record of the Pascal language.
systems forcing strict encapsulation, systems supporting
Complex types are called structured types in SQL:2003 [31].
direct accesses to attribute values, and systems distinguish-
As an example, consider the type t_Address, defined as
ing between private and public features. Finally, the O2
follows:
system allows the specification of exceptional instances,
that is, of objects that can have additional features and/or CREATE TYPE t_Address AS (stree VARCHAR(50),
redefine (under certain compatibility restrictions) features number INTEGER,
of the class of which they are instances. city CHAR(20),
Most OODBMSs in Table 1, although they deeply influ- country CHAR(2),
enced the existing OODBMSs and the ODMG standard, are zip INTEGER),
no more available in the marketplace. Table 2 lists most Relations can contain attributes whose type is a complex type,
popular commercial and open-source OODBMSs available as shown by the following example:
in 2007 (www.odbms.org). Although most of their produ-
cers are ODMG memebers, the system still exhibits differ- CREATE TABLE Employees(name CHAR(20),
ent levels of ODMG compliance. emp# INTEGER,
curriculum CLOB,
salary INTEGER,
OBJECT RELATIONAL DATABASES address t_Address);
This relation can be defined as equivalently :
As discussed at the beginning of this article, object relational
databases rely on extensions of the relational data model CREATE TYPE t_Employee AS (name CHAR(20),
with the most distinguishing features of the object para-
digm. One of the first object relational DBMS is UniSQL emp# INTEGER,
OBJECT-ORIENTED DATABASES 11

Table 1. Comparison among data models of most influential OODBMSs


Gem-Stone Iris O2 Orion Object-Store Ode ODMG
Reference (16) (17) (18), (19) (20), (21) (22) (23) (14)
Class extent NO YES NO YES NO YES YESa
Persistence R A R A R 2op Ab
Explicit deletion NO YES NO YES YES YES YESb
Direct access to attributes NO YES P YES P P YES
Domain specification for attributes O M M M M M M
Class attributes and methods YES NO NO YES NO NO NO
Relationships NO YES NO NO YES NO YES
Composite objects NO NO NO YES NO NO NO
Referential integrity YES NO YES NO YESc NO YESc
Multiple inheritance NO YES YES YES YES YES YES
Migration L YES NO NO NO NO NO
Exceptional instances NO NO YES NO NO NO NO
R root persistence, A automatic, 2op two different new operations.
P only for public attributes.
O optional, M mandatory.
L in limited form.
a
For those classes in which definition of an extent clause is specified.
b
In C OML, created objects are automatically persistent and explicit deletion is supported; in Smalltalk OML, persistence is by root and no explicit delete
operation exists.
c
Referential integrity is ensured for relationships but not for attributes.

curriculum CLOB, address ROW (street VARCHAR(50),


salary INTEGER, number INTEGER,
address t_Address); city CHAR(20),
CREATE TABLE Employees OF t_Employee; country CHAR(2),
zip INTEGER));
Note that for what concerns the structure of the tuples in
the relation, the above declarations are equivalent to the Components of attributes, whose domain is a complex
following one, which makes use of an anonymous row type type, are accessed by means of the nested dot notation. For
for specifying the structure of addresses: example, the zipcode of the address of an employee is
accessed as Employees.address.zip.
CREATE TABLE Employees (name CHAR(20),
emp# INTEGER,
curriculum CLOB, Methods. Methods can be defined on simple and complex
salary INTEGER, types, as part of the type definition. Each method has a
signature and an implementation that can be specified in

Table 2. OODBMS scenario in 2007 www.odbms.org


Commercial systems

Company System(s) Web reference


db4objects db4o www.db4o.com
Objectivity Objectivity/DB www.objectivity.com
Progress ObjectStore, PSE Pro www.progress.com
Versant Versant Object Database, www.versant.com
FastObjects
InterSystems Cache www.intersystems.com
GemStone GemStone/S, Facets www.facetsodb.com
Matisse Matisse www.matisse.com
ObjectDB ObjectDB www.objectdb.com
W3apps Jeevan www.w3apps.com

Open source systems

System Web reference


db4o www.db4o.com
EyeDB www.eyedb.com
Ozone www.ozone-db.com
Perst www.mcobject.com/perst/
Zope (ZODB) www.zope.org
12 OBJECT-ORIENTED DATABASES

SQL/PSM [31] or in different programming languages. The then they can be iterated over through an SQL query as any
method body can refer to the instance on which the method other relation. The following SQL statement:
is invoked through the SELF keyword.
SELECT e.name, T.N
The definition of the type t_Employee can, for exam-
FROM Employees e, UNNEST(e.tel_nbrs) T(N)
ple, be extended with the definition of some methods as
WHERE e.emp# = 777;
follows:
returns the employee name and the set of its telephone
numbers. In the previous statement, T is the name of a virtual
CREATE TYPE t_Employee (...)
table and N is the name of its single column.
INSTANCE METHOD double_salary() RETURNS BOO
LEAN; INSTANCE METHOD yearly_salary() RETURNS
Reference Types
INTEGER; INSTANCE METHOD add_telephone
(n CHAR(15)) RETURNS BOOLEAN; As we have seen, a structured type can be used in the
definition of types and tables. Its instances are complex
With each complex type, a constructor method, which is values. Structured types can be used as well for defining
denoted by NEW and the name of the type, is associated. This objects, as tuples with an associated identifier. These tuples
method creates an instance of the type, given its attribute are contained in typed tables, which are characterized by an
values. As an example, the invocation additional identifier field, which is specified as REF IS. Note
that the uniqueness of identifiers is not ensured across
NEW t_address(via pisa, 36, genova,
relations. The Employees relation above can be specified
italy, 16146)
as a typed table as follows (provided the definition of type
returns a new instance of the t_address type.
t_Employee:
For each attribute A in a complex type, an accessor
method A, returning the attribute value, and a mutator CREATE TABLE Employees OF t_Employee
method A, taking as input a value v and setting the attri- (REF IS idE);
bute value to v, are associated implicitly with the type. The values for the idE additional eld are system-generated.
Referring to type t_Employee and to relation Employ- Reference types allow a column to refer a tuple contained
ees above, the statement: in a typed table through its identifier. Thus, those types
allow a tuple in a relation to refer to a tuple in another
SELECT address.city()
relation. The reference type for a type T is the type of the
FROM Employees;
identifier of instances of T and is denoted by REF(T). Given
contains an invocation of the accessor method for attribute
the following declaration and the above declarations of the
city. Because the method has no parameters, the brackets can
Employees relation:
be omitted (i.e., address.city). By contrast, the statement:
CREATE TYPE t_Department (name CHAR(10),
UPDATE Employees
dept# INTEGER,
SET address = address.city(genova)
chair REF(t_Employee),
WHERE empl# = 777;
dependents REF(t_Employee)
contains an invocation of the mutator method for attribute
MULTISET);
city.
CREATE TABLE Departments
OF t_Department
Collection Types (REF IS idD);
Object relational DBMSs support constructors for grouping the values of the chair and dependents attributes are
several instances of a given type, which thus models collec- identiers of instances of type t_Employee. This denition,
tions of type instances. Specifically, SQL:2003 supports however, does not provide information about the relation con-
ARRAY and MULTISET collections. Referring to the taining the instances of the type (SQL:2003 calls these uncon-
Employees relation above, suppose we want to add a strained references). To ensure referential integrity, a SCOPE
tel_nbrs attribute as a collection of telephone numbers clause, which requires the reference to belong to the extent
(strings). An attribute declared as associated with a typed table, can be used. With the following
declaration of the Departments relation:
tel_nbrs CHAR(15) ARRAY [3]
allows for representing a maximum of three telephone CREATE TABLE Departments OF t_Department
numbers, ordered by importance. By contrast, an attribute (REF IS idD,
declared as chair WITH OPTIONS SCOPE Employees,
dependents WITH OPTIONS SCOPE Employees);
tel_nbrs CHAR(15) MULTISET for each tuple in the Departments relation, the chair
allows for representing an unlimited number of telephone column is guaranteed to refer to a tuple of the Employees
numbers, without specifying an order among them. Note that relation (corresponding to the department chair) and the values
duplicates are allowed because the collection is a multiset. in the multiset in the dependent column are guaranteed to
Elements of the collections are denoted by indexes in refer to tuples of the Employees relation.
case of arrays (for example, tel_nbrs [2] accesses the To manipulate reference-type instances, SQL provides
second number in the array), whereas multisets can be the dereferencing function DEREF, returning the tuple
converted to relations through the UNNEST function and referenced by a reference, and the reference function ->,
OBJECT-ORIENTED DATABASES 13

returning the value of a specific attribute of the tuple indexing mechanisms are exploited to handle LOBs effi-
referenced by a reference. The attributes of a referred ciently.
instance can be accessed by means of the dot notation.
For example, referring to the example above, the name of CONCLUDING REMARKS
a department chair can be denoted as Departments.-
chair->name or Departments.DEREF(chair).name. In this article, we have focused on the modeling aspects and
query and data manipulation languages of OODBMs and
Inheritance object relational DBMSs. The effective support of object-
oriented data models and languages requires revisiting and
nheritance specifies subtype/supertype relationships
possibly extending techniques and data structures used in
among types. Subtypes inherit attributes and methods of
DBMS architectures. In this section, we briefly discuss
their supertypes. Object relational DBMSs allow for speci-
some of those architectural issues and point out relevant
fying inheritance links both among types and among rela-
references. We mention moreover some relevant issues in
tions. The following declarations specify types t_ Student
OODBMSs not dealt with in the article.
and t_Teacher as subtypes of the t_Person type:
An important aspect is related to the indexing techni-
CREATE TYPE t_Person AS (name CHAR(20), ques used to speed up query executions. Three object-
ssn INTEGER, oriented concepts have an impact on the evaluation of
b_date DATE, object-oriented queries as well as on the indexing support
address t_Address); required: the inheritance hierarchy, the aggregation hier-
CREATE TYPE t_Teacher UNDER t_Person AS archy, and the methods. For what concerns inheritance, a
(salary DECIMAL(8,2), query on a class C has two possible interpretations. In a
dept REF t_Department, single-class query, objects are retrieved from only the quer-
teaches TABLE OF REF t_Course); ied class C itself, whereas in a class-hierarchy query, objects
CREATE TYPE t_Student UNDER t_Person AS are retrieved from all the classes in the inheritance hier-
(avg_grade FLOAT, archy rooted at C. To facilitate the evaluation of such types
attends TABLE OF REF t_Course); of queries, a class-hierarchy index needs to support efficient
The following declarations, by contrast, specify inheritance retrieval of objects from a single class as well as from all the
relationships among relations: classes in the class hierarchy. A class-hierarchy index is
characterized by two parameters: the hierarchy of classes
CREATE TABLE Persons OF t_Person; to be indexed and the index attribute of the indexed hier-
CREATE TABLE Teachers OF t_Teacher archy.
UNDER Persons; Two approaches to class-hierarchy indexing exist: The
CREATE TABLE Students OF t_Student class-dimension-based approach(32,33) partitions the data
UNDER Persons; space primarily on the class of an object, and the attribute-
dimension-based approach(32) partitions the data space
At the data level, those two declarations imply that primarily on the indexed attribute of an object. Although
instances of Teachers and Students relations are also the class-dimension-based approach supports single-class
instances of the Persons relation (inheritance among rela- queries efficiently, it is not effective for class-hierarchy
tions) and that instances of those relations have name, ssn, queries because of the need to traverse multiple single-
b_date, and address as attributes (inheritance among class indexes. On the other hand, the attribute-dimension-
types). The following query: based approach generally provides efficient support for
SELECT name, address class-hierarchy queries on the root class (i.e., retrieving
FROM Teachers objects of all indexed classes), but it is inefficient for single-
WHERE salary > 2000 class queries or class-hierarchy queries on a subhierarchy
of the indexed class hierarchy, as it may need to access
can thus be expressed. many irrelevant leaf nodes of the single index structure. To
Inheritance among types also implies method inheri- support both types of queries efficiently, the index must
tance and method overloading. Overriding and late binding support both ways of data partitioning (34). However, this
are supported. is not a simple or direct application of multi-dimensional
indexes, because totally ordering of classes is not possible
LOBs and, hence, partitioning along the class dimension is pro-
blematic.
Object relational DBMSs, finally, provide LOB types to
A second important issue in indexing techniques is
support the storage of multimedia objects, such as docu-
related to aggregation hierarchies and to navigational
ments, images, and audio messages. LOBs are stored
accesses along these hierarchies. Navigational access is
semantically as a column of the relation. Physically,
based on traversing object references; a typical example is
however, they are stored outside the relations, typically
represented by graph traversal. Navigations from one
in an external file. Usually, for efficiency reasons, those
object in a class to objects in other classes in a class
external files are not manipulated under transactional
aggregation hierarchy are essentially expensive poin-
control (or, at least, logging is disabled). LOBs can be
ter-chasing operations. To support navigations efficiently,
either CLOBs (characters) or BLOBs (binaries). Ad hoc
14 OBJECT-ORIENTED DATABASES

indexing structures that enable fast path instantiation geographic object is a spatial attribute value, whose data
have been developed, including the the multi-index tech- type can be, for instance, a polygon or a point. Moreover,
nique, the nested index, the path index, and the join attribute values of geographic objects may be space depen-
hierarchy index. In practice, many of these structures dent, which is different from spatial attribute values. For
are based on precomputing traversals along aggregation instance, the soil type of a land parcel applies to the entire
hierarchies. The major problem of many of such indexing spatial extent (i.e., the location of the land parcel) and it is
techniques is related to update operations that may not a normal attribute of a land parcel, but it is inherited
require access to several objects to determine the index from the underlying geographical space via the object loca-
entries that need updating. To reduce update overhead tion. This means that the attribute can be modeled as a
and yet maintain the efficiency of path indexing struc- function from the spatial domain. For what concerns the
tures, paths can be broken into subpaths that are then temporal characteristics of objects, both the time when some
indexed separately (35,36). The proper splitting and property holds (valid time) and the time when something is
allocation is highly dependent on the query and update believed in/recorded as current in the database (transaction
patterns and frequencies. Therefore, adequate index time) can be of interest. Several kinds of applications can be
allocation tools should be developed to support the optimal devised in which both spatial and temporal aspects of objects
index allocation. are important, among which at least three different types
Finally, a last issue to discuss is related to the use of can be distinguished: cadastral applications, in which the
user-defined methods into queries. The execution of a query spatial aspects are modeled primarily as regions and points
involving such a method may require the execution of such and changes occur discretely across time; transportation
method for a large number of instances. Because a method applications, in which the spatial aspects are modeled pri-
can be a general program, the query execution costs may marily as linear features, graphs, and polylines and changes
become prohibitive. Possible solutions, not yet fully inves- occur discretely across time; and environmental applica-
tigated, are based on method precomputation; such tions, or location-based services, characterized by continu-
approaches, however, make object updates rather expen- ously changing spatial aspects. Several proposals that
sive. We refer the reader to Ref. 37, for an extensive dis- provide an integrated approach for the management of
cussion on indexing techniques for OODBMSs. spatial and temporal information have been presented in
Another important issue, which is related to perfor- the recent past (39,40). A growing interest has been devised
mance, is query optimization. Because most object-oriented also in the area of moving and geometric objects, mainly
queries only require implicit joins through aggregation involving abstract modeling. Recently, spatiotemporal
hierarchies, the efficient support of such a join is important. extensions of SQL:1999 and the ODMG model also have
Therefore, proposed query execution strategies have been proposed (4143).
focused on efficient traversal of aggregation hierarchies.
Because aggregation hierarchies can be represented as
graphs, and a query can be observed as a visit of a portion
of such a graph, traversal strategies can be formalized as BIBLIOGRAPHY
strategies for visiting nodes in a graph. The main methods
proposed for such visits include forward traversal, reverse 1. E. Bertino and L. D. Martino, Object-Oriented Database Sys-
tems - Concepts and Architecture, Reading, MA: Addison-Wes-
traversal, and midex traversal. They differ with respect to
ley, 1993.
the order according to which the nodes involved in a given
2. R. Cattel, Object Data Management - Object-Oriented and
query are visited. A second dimension in query processing
Extended Relational Database Systems, Reading, MA: Addi-
strategies concerns how instances from the visited class are
son-Wesley, 1991.
retrieved. The two main strategies are the nested-loop and
3. A. Kemper and G. Moerkotte, Object-Oriented Database Man-
the sort-domain. Each of those strategies can be combined
agement: Applications in Engineering and Computer Science,
with each node traversal strategy, which results in a wide Englewood Coiffs, NJ: Prentice-Hall, 1994.
spectrum of strategies. We refer the reader to Ref. 1 for an
4. W. Kim and F. H. Lochovsky, Object-Oriented Concepts,
extensive discussion on query execution strategies and Databases, and Applications, Reading, MA: Addison-Wesley,
related cost models. 1989.
Other relevant issues that we do not discuss here, but 5. M. Stonebraker and D. Moore, Object-Relational DBMSs: The
are dealt with in Ref. 1, include access control mechanisms, Next Great Wave, San Francisco, CA: Morgan Kaufmann, 1996.
versioning models, schema evolutions, benchmarks, con- 6. M. Carey, D. Chamberlin, S. Narayanan, B. Vance, D. Doole, S.
currency control, and transaction management mechan- Rielau, R. Swagerman, and N. Mattos, O-O, Whats happening
isms. Another aspect concerns integrity constraint and to DB2? Proc. of the ACM SIGMOD Intl Conf. on Management
trigger support (38). of Data, 1999, pp. 511512.
A final topic we would like to mention is related to the 7. J. Melton and A.R. Simon, SQL:1999 - Understanding Rela-
modeling and the management of spatiotemporal and mov- tional Language Components, San Francisco, CA: Morgan-
ing objects. A large percentage of data managed in a variety Kaufmann, 2001.
of different application domains has spatiotemporal char- 8. A.B. Chaudhri and R. Zicari, Succeeding with Object Data-
acteristics. For what concerns the spatial characteristics of bases, New York: John Wiley & Sons, 2001.
data, for instance, an object may have a geographical loca- 9. W. Cook, et al., Objects and Databases: State of the Union in
tion. Specifically, geographic objects, such as a land parcel, a 2006. Panel at OOPSLA 2006, New York: ACM Press, 2006.
car, and a person, do have a location. The location of a
OBJECT-ORIENTED DATABASES 15

10. M. Atkinson, F. Bancilhon, D. DeWitt, K. Dittrich, D. Maier, 30. SYBASE Inc., Berkley, California. Transact-SQL Users Guide
and S. Zdonik, The object-oriented database system manifesto. for Sybase. Release 10.0.
in W. Kim, et al., (eds.), Proc. First Intl Conf. on Deductive and 31. A. Eisenberg, J. Melton, K. Kulkharni, J.E. Michels, and F.
Object-Oriented Databases, 1989, pp. 4057. Zemke, SQL:2003 has been published. SIGMOD Record, 33(1):
11. C. Beeri, Formal models for object-oriented databases, in W. 119126, 2004.
Kim, et al., (eds.), Proc. First Intl Conf. on Deductive and 32. W. Kim, K.C. Kim, and A. Dale, Indexing techniques for object-
pp. Object-Oriented Databases, 1989, pp. 370395. oriented databases, In [Ref. 4], pages. 371-394.
12. P. Chen, The entity-relationship model - towards a unified view 33. C. C. Low, B. C. Ooi, and H. Lu, H-trees: a dynamic associa-
of data, ACM Trans. Database Sys., 1(1): 936, 1976. tive search index for OODB. Proc. 1992 ACM SIGMOD
13. Sun Microsystems, Java Data Objects Version 1.0.1. 2003. International Conference on Management of Data, 1992,
Available: http://java.sun.com/products/jdo. pp. 134143.
14. R. Cattel, D. Barry, M. Berler, J. Eastman, D. Jordan, C. 34. C.Y. Chan, C.H. Goh and B. C. Ooi, Indexing OODB instances
Russel, O. Schadow, T. Stanienda, and F. Velez, The Object based on access proximity, Proc. 13th International Conference
Database Standard: ODMG 3.0, San Francisco, CA: Morgan- on Data Engineering, 1997, pp. 1421.
Kaufmann, 1999. 35. E. Bertino, On indexing configuration in object-oriented data-
15. S. Cluet, Designing OQL: allowing objects to be queried, Infor- bases, VLDB J., 3(3): 355399, 1994.
mat. Sys., 23(5): 279305, 1998. 36. Z. Xie and J. Han, Join index hierarchy for supporting effi-
16. R. Breitl, D. Maier, A. Otis, J. Penney, B. Schuchardt, J. Stein, cient navigation in object-oriented databases, Proc. 20th
E. H. Williams, and M. Williams, The GemStone data manage- International Conference on Very Large Data Bases, 1994,
ment system, in W.F. Kim and F.H. Lochovsky (eds.), Ref. 4. pp. pp. 522533.
283308. 37. E. Bertino, R. Sacks-Davis, B. C. Ooi, K. L. Tan, J. Zobel, B.
17. D. H. Fishman et al. Overview of the Iris DBMS. In Ref. 4, pp. Shidlovsky, and B. Catania, Indexing Techniques for Advanced
219-250. Database Systems, Dordrecht: Kluwer, 1997.
18. F. Bancilhon, C. Delobel, and P. Kanellakis, Building an 38. E. Bertino, G. Guerrini, I. Merlo, Extending the ODMG object
Object-Oriented Database System: The Story of O2, San Fran- model with triggers, IEEE Trans. Know. Data Engin., 16(2):
cisco, CA: Morgan-Kaufmann, 1992. 170188, 2004.
19. O. Deux, The Story of O2, IEEE Trans. Knowl, Data Engineer., 39. G. Langran, Time in Geographic Information Systems, Oxford:
2(1): 91108, 1990. Taylor & Francis, 1992.
20. W. Kim, et al., Features of the ORION object-oriented database 40. M. Worboys, A unified model for spatial and temporal informa-
system. In Ref. 4, pages. 251-282. tion, Computer J., 37(1): 2634, 1994.
21. W. Kim, Introduction to Object-Oriented Databases, Cam- 41. C. Chen and C. Zaniolo, SQLST: a spatio-temporal data model
bridge, MA: The MIT Press, 1990. and query language, Proc. of Intl Conference on Conceptual
22. Object Design. ObjectStore Java API User Guide (ObjectStore Modeling/the Entity Relational Approach, 2000.
6.0). 1998. Available at http://www.odi.com. 42. T. Griffiths, A. Fernandes, N. Paton, K. Mason, B. Huang, M.
23. R. Agrawal and N. Gehani, ODE (Object Database and Envir- Worboys, C. Johnsonon, and J.G. Stell, Tripod: a comprehen-
onment): the language and the data model, in Proc. of the sive system for the management of spatial and aspatial histor-
ACM SIGMOD Intl Conf. on Management of Data, 1989, pp. ical objects, Proc. of 9th ACM Symposium on Advances in
3645. Geographic Information Systems, 2001.
24. W. Kim, UniSQL/X unified relational and object-oriented data- 43. B. Huang and C. Claramunt, STOQL: an ODMG-based spatio-
base system, Proc. of the ACM SIGMOD Intl Conf. on Manage- temporal object model and query language, Proc. of 10th Intl
ment of Data, 1994, p. 481. Symposium on Spatial Data Handling, 2002.
25. D. Chamberlin, Using the New DB2 - IBMs Object-Relational
Database System, San Franciso, CA: Morgan-Kaufmann, 1996.
ELISA BERTINO
26. IBM DB2 Universal Database SQL Reference, Volume 1. IBM Purdue University
Corp., 2004. West Lafayelte, Indiana
27. Oracle Database. Application Developers Guide - Object-Rela- GIOVANNA GUERRINI
tional Features. Oracle Corp., 2005. Universita degli Studi di Genova
28. Microsoft Corporation. Microsoft SQL Server, Version 7.0, 1999. Genova, Italy
29. Illustra Information Technologies, Oakland, California. Illus-
tra Users Guide. Release 2.1.
R
RELATIONAL DATABASES have large capabilities of optimization. This point is of
particular importance, because it guarantees that
data are efficiently retrieved, independently of the
way the query is issued by the user.
To manage a large amount of persistent data with compu- 2. Integrity constraints, whose role is to account for
ters requires storing and retrieving these data in files. properties of data, are considered within the model.
However, it was found in the early 1960s that files are The most important and familiar are the functional
not sufficient for the design and use of more and more dependencies. Research on this topic led to theoreti-
sophisticated applications. As a consequence, database sys- cal criteria for what is meant by a good conceptual
tems have become a very important tool for many applica- data organization for a given application.
tions over the past 30 years. Database management systems 3. A theory of concurrency control and transaction man-
(DBMSs) aim to provide users with an efficient tool for good agement has been proposed to account for the dynamic
modeling and for easy and efficient manipulation of data. It aspects of data manipulation with integrity con-
is important to note that concurrency control, data confi- straints. Research in this area led to actual methods
dentiality, and recovery from failure also are important and algorithms that guarantee that, in the presence of
services that a DBMS should offer. The very first DBMSs, multiple updates in a multiuser environment, the
known as hierarchical and then as network systems, were modified database still satisfies the integrity con-
based on a hierarchical and then network-like conceptual straints imposed on it.
data organization, which actually reflects the physical orga-
nization of the underlying files. Thus, these systems do not These fundamental aspects led to actual relational sys-
distinguish clearly between the physical and the conceptual tems that rapidly acquired their position in the software
levels of data organization. Therefore, these systems, market and still continue to do so today. Relational DBMSs
although efficient, have some important drawbacks, among are currently the key piece of software in most business
which we mention data redundancies (which should be applications running on various types of computers, ran-
avoided) and a procedural way of data manipulation, which ging from mainframe systems to personal computers (PCs).
is considered not easy enough to use. Among the relational systems available on the market-
The relational model, proposed by Codd in 1970 (1), place, we mention DB2 (IBM), INGRES (developed at the
avoids the drawbacks mentioned above by distinguishing University of California, Berkeley), ORACLE (Oracle
explicitly between the physical and the conceptual levels of Corp.), and SQLServer (Microsoft Corp.), all of which
data organization. This basic property of the relational implement the relational model of databases together
model is a consequence of the fact that, in this model, users with tools for developing applications.
see the data as tables and do not have to be aware of how In the remainder of this article, we focus on the theory of
these tables are stored physically. The tables of a relational the relational model and on basic aspects of dependency
database are accessed and manipulated as a whole, con- theory. Then, we deal with problems related to updates and
trary to languages based on hierarchical or network transaction management, and we briefly describe the struc-
models, according to which data are manipulated on a ture of relational systems and the associated reference
record-by-record basis. As a consequence, data manipula- language called SQL. We conclude with a brief discussion
tion languages for relational databases are set-oriented, on several extensions of the relational model.
and so, they fall into the category of declarative languages,
in which there is no need of control structures, such as
conditional or iterative statements. On the other hand, THEORETICAL BACKGROUND OF RELATIONAL
because relations are a well-known mathematical concept, DATABASES
the relational model stimulated a lot of theoretical
research, which led to successful implementations. As an The theory of the relational model of databases is based on
example of a relational database, Fig. 1 shows the two relations. Although relations are well known in mathe-
tables, called EMP and DEPT, of a sample database for a matics, their use in the field of databases requires defini-
business application. tions that slightly differ from those used in mathematics.
The main results obtained so far are summarized as Based on these definitions, basic operations on relations
follows: constitute the relational algebra, which is related closely to
first-order logic. Indeed, relational algebra has the same
1. The expressional power of relational data manipula- expressional power as a first-order logic language, called
tion languages is almost that of first-order logic with- relational calculus, and this relationship constitutes the
out function symbols. Moreover, relational languages basis of the definition of actual data manipulation

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 RELATIONAL DATABASES

EMP empno ename sal deptno calculus is the declarative counterpart of relational alge-
bra, which is observed as a procedural language.
123 john 23,000 1
The six fundamental operations of the relational algebra
234 julia 50,000 1
are union, difference, projection, selection, join, and renam-
345 peter 7,500 2
ing (note that replacing the join operation by the Cartesian
456 laura 12,000 2
product is another popular choice discussed in Refs. (2) and
567 paul 8,000 1 (3)). The formal definitions of these operations are as
follows: Let r and s be two relations over relation schemes
DEPT deptno dname mgr
R and S, respectively. Then
1 sales 234
2 staff 345 1. Union. If R = S, then r [ s is a relation defined over R,
such that r [ s ftjt 2 r or t 2 sg. Otherwise r [ s is
Figure 1. A sample relational database D.
undefined.
2. Difference. If R = S, then r  s is a relation defined
over R, such that r  s ftjt 2 r and t 2 = sg. Otherwise
r  s is undefined.
languages, among which the language called SQL is now 3. Projection. Let Y be a relation scheme. If Y  R, then
the reference. pY r is a relation defined over Y, such that
pY r ftj 9 u 2 r such that u:Y tg. Otherwise pY r
Basic Definitions and Notations is undefined.
4. Selection of r with respect to a condition C: sc r is a
The formal definition of relational databases starts with a relation defined over R, such that
finite set, called the universe, whose elements are called sc r ftjt 2 r and t satisfies Cg. Selection conditions
attributes. If U denotes a universe, each attribute A of U is are either atomic conditions or conditions obtained
associated with a nonempty and possibly infinite set of by combination of atomic conditions, using the logical
values (or constants), called the domain of A and denoted connectives _ (or), ^ (and), or : (not). An atomic
by dom(A). Every nonempty subset of U is called a relation condition is an expression of the form AQA0 or AQa
scheme and is denoted by the juxtaposition of its elements. where A and A0 are attributes in R whose domains are
For example, in the database of Fig. 1, the universe U compatible [i.e., it makes sense to compare a value
contains the attributes empno, ename, sal, deptno, dname, in dom(A) with a value in dom(A0 )], a is a constant in
and mgr standing, respectively, for numbers of employees, dom(A), and Qis an operator of comparison, such as <,
names of employees, salaries of employees, numbers of >, , , or .
departments, names of departments and numbers of man-
5. Join. r s is a relation defined over R [ S, such that
agers. Moreover, we consider here that empno, deptno, and
r s ftjt:R 2 r and t:S 2 sg.
mgr have the same domain, namely the set of all positive
integers, whereas the domain of the attributes ename and 6. Renaming. If A is an attribute in R and B is an
dname is the set of strings of alphabetic characters of length attribute not in R, such that dom(A) = dom(B),
at most 10. then rB A r is a relation defined over R 
Given a relation scheme R0 , a tuple t over R is a mapping fAg [ fBg whose tuples are the same as those in r.
from R to the union of the domains of the attributes in R, so For example, in the database of Fig. 1, the following
that, for every attribute A in R, t(A) is an element of dom(A). expression computes the numbers and names of all depart-
Moreover, if R0 is a nonempty subset of R the restriction of t ments having an employee whose salary is less than
to R, being the restriction of a mapping, is also a tuple, $10,000:
denoted by t.R0 . As a notational convenience, tuples are
denoted by the juxtaposition of their values, assuming that E : pdeptno dname ssal < 10;000 EMP DEPT
the order in which values are written corresponds to the
order in which attributes in R are considered. Figure 2 shows the steps for evaluating this expression
Given a universe U and a relation scheme R, a relation against the database of Fig. 1. As an example of using
over R is a finite set of tuples over R, and a database over renaming, the following expression computes the numbers
U is a set of relations over relations schemes obtained of employees working in at least two different departments:
from U.
E1 : pempno sdeptno 6 dnumber EMP rdnumber deptno
Relational Algebra
pdeptno empno EMP
From a theoretical point of view, querying a database
consists of computing a relation (which in practice is dis- The operations introduced previously enjoy properties,
played as the answer to the query) based on the relations in such as commutativity, associativity, and distributivity
the database. The relation to be computed can be expressed (see Ref. (3) for full details). The properties of the relational
in two different languages: relational algebra, which expli- operators allow for syntactic transformations according to
citly manipulates relations, and relational calculus, which which the same result is obtained, but through a more
is based on first-order logic. Roughly speaking, relational efficient computation. For instance, instead of evaluating
RELATIONAL DATABASES 3

(a) EMP DEPT empno ename sal deptno dname mgr


123 john 23,000 1 sales 234
234 julia 50,000 1 sales 234
345 peter 7,500 2 staff 345
456 laura 12,000 2 staff 345
578 paul 8,000 1 sales 234

(b) (EMP DEPT) empno ename sal deptno dname mgr


sal<10,000

345 peter 7,500 2 staff 345


578 paul 8,000 1 sales 234

(c) deptno dname [ sal<10,000(EMP DEPT)] deptno dname

2 staff
1 sales
Figure 2. The intermediate relations in the computation of expression E applied to the database D of Fig. 1. (a) The computation of the join,
(b) the computation of the selection, and (c) the computation of the projection.

the previous expression E, it is more efficient to consider the algebra and calculus is as follows: Given a database D
following expression: fr1 ; r2 ; . . . ; rn g over a universe U and with schema
fR1 ; R2 ; . . . ; Rn g, we consider a first-order alphabet with
E0 : pdeptno dname ssal < 10;000 EMP pdeptno dname DEPT the usual connectives ^ ; _ ; : and quantifiers 9 ; 8
where
Indeed, the intermediate relations computed for this
expression are smaller than those of Fig. 2 in the number 1. the set of constant symbols is the union of all domains
of rows and the number of columns. of the attributes in U;
Such a transformation is known as query optimization. 2. the set of predicate symbols is fr1 ; r2 ; . . . ; rn g, where
To optimize an expression of the relational algebra, the each ri is a predicate symbol whose arity is the car-
expression is represented as a tree in which the internal dinality of Ri; and
nodes are labeled by operators and the leaves are labeled by 3. the variable symbols may range over tuples, in which
the names of the relations of the database. Optimizing an case, the language is called tuple calculus, or over
expression consists of applying properties of relational domain elements, in which case, the language is
operators to transform the associated tree into another called domain calculus.
tree for which the evaluation is more efficient. For instance,
one of the most frequent transformations consists of push- One should notice that no function symbols are consid-
ing down selections in the tree to reduce the number of rows ered in relational calculus. Based on such an alphabet,
of intermediate relations. We refer to Ref. (2) for a complete formulas of interest are built up as usual in logic, but
discussion of query optimization techniques. Although effi- with some syntactic restrictions explained later. Now we
cient in practice, query optimization techniques are not recall that without loss of generality, a well-formed formula
optimal, because, as Kanellakis notices in Ref. (4), the has the form c(Q1)(Q2). . .(Qk)[w(x1, x2, . . ., xk, y1, y2, . . .,
problem of deciding whether two expressions of the rela- y1)], where x1, x2, . . ., xk, y1, y2, . . ., y1 are the only variable
tional algebra always yield the same result is impossible to symbols occurring in w, where (Qi) stands for (9xi) or (8xi),
solve. and where w is a quantifier-free formula built up from
connectives and atomic formulas (atomic formulas have
Relational Calculus the form r(t1, t2, . . ., tn), where r is an n-ary predicate symbol
The existence of different ways to express a given query in and tj is either a variable or a constant symbol). Moreover,
the relational algebra stresses the fact that it can be seen as in the formula c, the variables xi are bound (or quantified)
a procedural language. Fortunately, relational algebra has and the variables yj are free (or not quantified). See Ref. (5)
a declarative counterpart, namely the relational calculus. for full details on this topic.
This result comes from the observation that, if r is a relation In the formalism of tuple calculus, the relational expres-
defined over a relation scheme R containing n distinct sion E is written as
attributes, then membership of a given tuple t in r is
equivalently expressed by first-order formalism if we fzj 9 x 9 yEMPx ^ DEPTy ^ y:de ptno z:deptno
regard r as an n-ary predicate, and t as an n-ary vector ^ y:dname z:dname
of constants, and if we state that the atomic formula r(t) is ^ x:de ptno y:deptno ^ x:sal
true. More formally, the correspondence between relational < 10; 000g
4 RELATIONAL DATABASES

One should note that, in this formula, variables stand for arises in the context of our example is the following:
tuples, whose components are denoted as restrictions in the Assuming that a database D satisfies the constraints (1)
relational algebra. Considering domain calculus, the pre- and (2), does D satisfy other constraints? Clearly, this
vious formula is written as follows: problem, called the implication problem, has to be solved
to make sure that all constraints are considered at the
fz1 ; z2 j 9 x1 9 x2 9 x3 9 x4 9 y1 9 y2 9 y3 design phase just mentioned. Again, the implication
EMPx1 ; x2 ; x3 ; x4 ^ DEPTy1 ; y2 ; y3 ^ z1 problem has been solved in the context of functional depen-
dencies. In what follows, we focus on functional dependen-
y1 ^ z2 y2 ^ x4 y1 ^ x1 < 10; 000g
cies, and then, we outline other kinds of dependencies that
have also been the subject of research.
The satisfaction of a formula c in a database D is defined in
a standard way, as in first-order logic. In the context of
databases, however, some well-formed formulas must be The Theory of Functional Dependencies
discarded because relations are assumed to be finite and,
Let r be a relation over a relation scheme R, and let X and Y
thus, so must be the set of tuples satisfying a given formula
be two subschemes of R. The functional dependency from X
in a database. For instance, the domain calculus formula
to Y, denoted by X ! Y, is satisfied by r if, for all tuples t and
9 x : rx; y must be discarded, because in any database,
t0 in r, the following holds: t:X t0 :X ) t:Y t0 :Y. Then,
the set of constants a satisfying the formula : rr0 ; a for
given a set F of functional dependencies and a dependency
some appropriate x0 may be infinite (remember that
X ! Y, F implies X ! Y if every relation satisfying the
domains may be infinite). The notion of safeness is based
dependencies in F also satisfies the dependency X ! Y. For
on what is called the domain of a formula c, denoted by
instance, for R = ABC and F = {A ! B, AB ! C}, F implies
DOM(c). DOM(c) is defined as the set of all constant
A ! C. However, this definition of the implication of func-
symbols occurring in c, together with all constant symbols
tional dependencies is not effective from a computational
of tuples in relations occurring in c as predicate symbols.
point of view. An axiomatization of this problem, proposed
Hence, DOM(c) is a finite set of constants and c is called
in Ref. (7), consists of the following rules, where X, Y, and Z
safe if all tuples satisfying it in D contain only constants of
are relation schemes:
DOM(c). To illustrate the notion of safeness, again consider
the formula c 9 x : rx; y. Here DOM(c) = {aja occurs 1. Y  X ) X ! Y
in a tuple of r}, and so, c may be satisfied in D by values b not
2. X ! Y ) XZ ! YZ
in DOM(c). Therefore, c is a nonsafe formula. On the other
hand, the formula c0 9 x : rx; y ^ sx; y is safe, 3. X ! Y; Y ! Z ) X ! Z
because every b satisfying c0 in D occurs in DOMc0 .
A derivation using these axioms is defined as follows: F
It is important to note that tuple and domain calculus
derives X ! Y if either X ! Y is in F or X ! Y can be
are equivalent languages that have resulted in the emer-
generated from F using repeatedly the axioms above. Then,
gence of actual languages for relational systems. A formal
the soundness and completeness of these axioms is
proof of the equivalence between relational calculus and
expressed as follows: F implies X ! Y if and only if F
relational algebra was given by Codd in Ref. (6).
derives X ! Y, thus providing an effective way for solving
the implication problem in this case.
DATA DEPENDENCIES An important aspect of functional dependencies is that
they allow for the definition of normal forms that charac-
The theory of data dependencies has been motivated by terize suitable database schemas. Normal forms are based
problems of particular practical importance, because in all on the notion of key defined as follows: If R is a relation
applications, data stored in a database must be restricted so scheme with functional dependencies F, then K is a key of
as to satisfy some required properties or constraints. For (R, F) if K is a minimal relation scheme with respect to set
instance, in the database of Fig. 1, two such properties could inclusion such that F implies (or derives) K ! R. Four
be (1) two departments with distinct names cannot have the normal forms can be defined, among which we mention
same number and (2) a department has only one manager, here only three of them:
so that the relation DEPT cannot contain two distinct
tuples with the same deptno value. Investigations on con- 1. The first normal form (1NF) stipulates that attributes
straints in databases have been carried out in the context of are atomic in the relational model, which is implicit in
the relational model to provide sound methods for the the definitions of relational databases but restricts
design of database schemas. The impact of constraints on the range of applications that can be taken easily into
schema design is exemplified through properties (1) and (2). account. It explains, in particular, the emergence of
Indeed, assume that the database consists of only one object-oriented models of databases.
relation defined over the full universe. Then clearly, infor- 2. The third normal form (3NF) stipulates that attributes
mation about a given department is stored as many times as participating in no keys depend fully and exclusively
the number of its employees, which is redundant. This on keys. The formal definition is as follows: (R, F) is in
problem has been solved by the introducing normal forms 3NF if, for every derived dependency X ! A from F,
in the case of particular dependencies called functional such that A is an attribute not in X and appearing in no
dependencies. On the other hand, another problem that keys of (R, F), X contains a key of (R, F).
RELATIONAL DATABASES 5

3. The BoyceCodd normal form (BCNF) is defined as R, a value over X is associated with a set of values over Y,
the previous form, except that the attribute A may and is independent of the values over R  XY. An example
now appear in a key of (R, F). Thus, the formal of multivalued dependencies is the following: assume that
definition is the following: (R, F) is in BCNF if, for we have R = {empno, childname, car}, to store the names of
every derived dependency X ! A from F, such that A the children and the cars of employees. Clearly, every
is an attribute not in X, X contains a key of (R, F). empno value is associated with a fixed set of names (of
It turns out that every scheme (R, F) in BCNF is in 3NF, children), independent of the associated car values. Multi-
whereas the contrary is false in general. Moreover, 3NF valued dependencies and functional dependencies have
and BCNF characterize those schemes recognized as sui- been axiomatized soundly and completely, which has led
table in practice. If a scheme (R, F) is neither 3NF nor to an additional normal form, called the fourth normal
BCNF, then it is always possible to decompose (R, F) into form, and defined similarly to BCNF.
subschemes that are at least 3NF. More precisely, by Other dependencies of practical interest which have
schema decomposition, we mean the replacement of (R, been studied are inclusion dependencies. For example, in
F) by schemes (R1, F1), (R2, F2), . . ., (Rk, Fk), where the database of Fig. 1, stating that every manager must be
an employee is expressed by the following inclusion depen-
1. each Ri is a subset of R and R in the union of the Ris; dency: pmgr DEPT  pempo EMP. In general, an inclusion
2. each Fi is the set of all dependencies X ! Y derivable dependency is an expression of the form pX r  pY s
from F, such that XY  Ri ; and where r and s are relations of the database and where X
3. each (Ri, Fi) is in 3NF or in BCNF. and Y are relation schemes, such that the projections and
the inclusion are defined. Although it has been shown that
Furthermore, this replacement must ensure that data
the implication problem for inclusion dependencies in the
and dependencies are preserved in the following sense:
presence of functional dependencies is not decidable (see
1. Data preservation: starting with a relation r that Ref. (2)), a restricted case of practical significance is decid-
satisfies F, the relations ri are the projections of r able in polynomial time: The restriction is roughly that the
over Ri, and their join must be equal to r. relations in inclusion dependencies are all unary.
2. Dependency preservation: the set F and the union of
the sets Fi must derive exactly the same functional DATABASE UPDATES
dependencies.
In the context of functional dependencies, data preser- Although updates are an important issue in databases, this
vation is characterized as follows, in the case where k = 2: area has received less attention from the research community
The decomposition of (R, F) into (R1, F1), (R2, F2) preserves than the topics just addressed. Roughly speaking, updates
the data if F derives at least one of the two functional are basic insert, delete, or modify operations defined on
dependencies R1 \ R2 ! R1 or R1 \ R2 ! R2 . If k is greater relations seen as physical structures, and no theoretical
than 2, then the previous result can be generalized using background similar to that discussed for queries is available
properties of the join operator. Unfortunately, no such easy- for updates. As a consequence, no declarative way of con-
to-check property is known for dependency preservation. sidering updates has been proposed so far, although there is
What has to be done in practice is to make sure that every much effort in this direction. Actually, current relational
dependency of F can be derived from the union of the Fis. systems handle sophisticated updates procedurally, based
It has been shown that it is always possible to decompose on the notion of transactions, which are programs containing
a scheme (U, F) so that data and dependencies are pre- update statements. An important point is that, to maintain
served and the schemes (Ri, Fi) are all at least in 3NF. But it data consistency, these programs must be considered as
should be noticed that BCNF is not guaranteed when units, in the sense that either all or none of their statements
decomposing a relation scheme. Two kinds of algorithms are executed. For instance, if a failure occurs during the
have been implemented for schema decomposition: the execution of a transaction, all updates performed before
synthesis algorithms (which generate the schemes based the failure must be undone before rerunning the whole
on a canonical form of the dependencies of F) and the program. In what follows, we first discuss the relation
decomposition algorithms (which repeatedly split the uni- between updates and data dependencies, and then, we give
verse U into two subschemes). Synthesis algorithms ensure a short introduction to transaction execution.
data and dependency preservation together with schemes
in 3NF (at least), whereas decomposition algorithms ensure Updates and Data Dependencies
data preservation together with schemes in BCNF, but at There are two main ways to maintain the database consis-
the cost of a possible loss of dependencies. tent with respect to constraints in the presence of updates:
(1) reject all updates contradicting a constraint and (2) take
More on Data Dependencies appropriate actions to restore consistency with respect to
Dependencies other than functional dependencies have constraints. To illustrate these two ways of treating updates,
been widely studied in the past. In particular, multivalued let us consider again the database of Fig. 1 and let us assume
dependencies and their interaction with functional depen- that the relation DEPT must satisfy the functional depen-
dencies have motivated much research. The intuitive idea dency deptno ! dname mgr. According to (1) previous, the
behind multivalued dependencies is that, in a relation over insertion in DEPT of the tuple 1 toy 456 is rejected, whereas
it is accepted according to (2) previous, if, in addition, the
6 RELATIONAL DATABASES

tuple 1 sales 234 is removed from DEPT. Actually, it turns ally gives different results and the choice of one mode over
out that (1) gives priority to old knowledge over new the others depends heavily on the application.
knowledge, whereas (2) does the opposite. Clearly, updating
a database according to (1) or (2) depends on the application. Transaction Management
In practice, policy (1) is implemented as such for keys and
Contrary to what has been discussed before, the problem of
policy (2) is specified by transactions.
transaction management concerns the physical level of
Before we come to problems related to transaction execu-
DBMSs and not the conceptual level. Although transaction
tion, we would like to mention that an important issue
execution is independent of the conceptual model of data-
related to policy (2) is that of active rules. This concept is
bases being used (relational or not), this research area has
considered the declarative counterpart of transactions, and
been investigated in the context of relational databases. The
thus, is meant as an efficient tool to specify how the data-
problem is that, in a multiuser environment, several trans-
base should react to updates, or, more generally, to events.
actions may have to access the same data simultaneously,
Active rules are rules of the form: on heventi if
and then, in this case the execution of these transactions
hconditioni then hactioni, and provide a declarative form-
may leave the database inconsistent, whereas each transac-
alism for ensuring that data dependencies remain satisfied
tion executed alone leaves the database in a consistent state
in the presence of updates. For example, if we consider the
(an example of such a situation will be given shortly).
database of Fig. 1 and the inclusion dependency
Additionally, modifications of data performed by transac-
pmgr DEPT  pempno EMP, the insertion of a new depart-
tions must survive possible hardware or software failures.
ment respects this constraint if we consider the following
To cope with these difficulties, the following two pro-
active rule:
blems have to be considered: (1) the concurrency control
problem (that is, how to provide synchronization mechan-
on insertn; d; m into DEPT
isms which allow for efficient and correct access of multiple
if m 2
= pempno EMP
transactions in a shared database) and (2) the recovery
then call insert EMPm; d
problem (that is, how to provide mechanisms that react to
failures in an automated way). To achieve these goals, the
where insert_EMP is an interactive program asking for a
most prominent computational model for transactions is
name and a salary for the new manager, so that the
known as the read-write model, which considers transac-
corresponding tuple can be inserted in the relation EMP.
tions as sequences of read and write operations operating
Another important feature of active rules is their ability
on the tuples of the database. The operation read(t) indi-
to express dynamic dependencies. The particularity of
cates that t is retrieved from the secondary memory and
dynamic dependencies is that they refer to more than
entered in the main memory, whereas the operation wri-
one database state (as opposed to static dependencies
te(t) does the opposite: The current value of t in the main
that refer to only one database state). A typical dynamic
memory is saved in the secondary memory, and thus sur-
dependency, in the context of the database of Fig. 1, is to
vives execution of the transaction. Moreover, two addi-
state that salaries must never decrease, which corresponds
tional operations are considered, modeling, respectively,
to the following active rule:
successful or failed executions: the commit operation
(which indicates that changes in data must be preserved),
on update salne; new-salin EMP
and the abort operation (which indicates that changes in
i f new-sal > psal sempnone EMP
data performed by the transaction must be undone, so that
then set sal new-sal where empno ne
the aborted transaction is simply ignored). For example,
call t the first tuple of the relation EMP of Fig. 1, and
where update_sal is the update meant to assign the salary
assume that two transactions T1 and T2 increase Johns
of the employee number ne to the value new-sal and where
salary of 500 and 1,000, respectively. In the read-write
the set instruction actually performs the modification.
model, both T1 and T2 have the form: read(t); write(t0 );
Although active rules are an elegant and powerful way
commit, where t0 .sal = t.sal + 500 for T1 and where
to specify various dynamic aspects of databases, they raise
t0 .sal = t.sal + 1,000 for T2.
important questions concerning their execution. Indeed, as
Based on these operations, the criterion for correctness
the execution of an active rule fires other active rules in its
of transaction execution is known as serializability of sche-
action, the main problem is to decide how these rules are
dules. A schedule is a sequence of interleaved operations
fired. Three main execution modes have been proposed so
originating from various transactions, and a schedule built
far in the literature: the immediate mode, the deferred
up from transactions T1, T2, . . ., Tk is said to be serializable
mode, and the concurrent mode. According to the immedi-
if its execution leaves the database in the same state as the
ate mode, the rule is fired as soon as its event occurs while
sequential execution of transactions Tis, in some order
the condition is true. According to the deferred mode, the
would do. In the previous example, let us consider the
actions are executed only after the last event occurs and the
following schedule:
last condition is evaluated. In the concurrent mode, no
policy of action execution is considered, but a separate
read1 t; read2 t; write1 t1 ; commit1 ; write2 t2 ; commit2
process is spawned for each action and is executed concur-
rently with other processes. It turns out that executing the
where the subscripts correspond to the transaction where
same active rules according to each of these modes gener-
the instructions occur. This schedule is not serializable,
RELATIONAL DATABASES 7

because its execution corresponds neither to T1 followed by the use of SQL statements in programs written in proce-
T2 nor to T2 followed by T1. Indeed, transactions T1 and T2 dural languages such as COBOL, C, PASCAL, or JAVA, (2)
both read the initial value of t and the effects of T1 on tuple t an interactive interface for a real-time use of databases, (3)
are lost, as T2 commits its changes after T1. an analyzer which is in charge of the treatment of SQL
To characterize serializable schedules, one can design statements issued either from a users program or directly
execution protocols. Here again many techniques have by a user via the interactive interface, (4) an optimizer
been introduced, and we focus on the most frequent of based on the techniques discussed previously, and (5) a
them in actual systems, known as the two-phase locking catalog, where information about users and about all data-
protocol. The system associates every read or write opera- bases that can be used, is stored. It is important to note that
tion on the same object to a lock, respectively, a read-lock or this catalog, which is a basic component for the manage-
a write-lock, and once a lock is granted for a transaction, ment of databases, is itself organized as a relational data-
other transactions cannot access the corresponding object. base, usually called the metadatabase, or data dictionary.
Additionally, no lock can be granted to a transaction that The storage interface, which is in charge of the commu-
has already released a lock. It is easy to see that, in the nications between database and the file management sys-
previous example, such a protocol prevents the execution of tem, also contains five main modules: (1) a journal, where all
the schedule we considered, because T2 cannot read t unless transactions on the database are stored so that the system
T1 has released its write-lock. restarts safely in case of failures, (2) the transaction manager
Although efficient and easy to implement, this protocol which generally works under the two-phase locking protocol
has its shortcomings. For example, it is not free of dead- discussed previously, (3) the index manager (indexes are
locks, that is, the execution may never terminate because created to speed up the access to data), (4) the space disk
two transactions are waiting for the same locks at the same manager which is charge of defining the actual location of
time. For instance, transaction T1 may ask for a lock on data on disks, and (5) the buffer manager which is in charge
object o1, currently owned by transaction T2 which in turn of transferring data between the main memory and the disk.
asks for a lock on object o2, currently owned by transaction The efficiency of this last module is crucial in practice
T1. In such a situation, the only way to restart execution is because accesses on disks are very long operations that
to abort one of the two transactions. Detecting deadlocks is must be optimized. It is important to note that this general
performed by the detection of cycles in a graph whose nodes architecture is the basis for organizing relational system
are the transactions in the schedule and in which an edge that also integrate network and distributed aspects in a
from transaction T to transaction T0 means that T is waiting client-server configuration or distributed database systems.
for a lock owned by T0 .
An Overview of SQL
RELATIONAL DATABASE SYSTEMS AND SQL Many languages have been proposed to implement rela-
tional calculus. For instance, the language QBE (Query By
In this section, we describe the general architecture of Example) is based on domain calculus, whereas the lan-
relational DBMSs, and we give an overview of the language guage QUEL (implemented in the system INGRES) is
SQL which has become a reference for relational systems. based on tuple calculus. These languages are described
in Ref. (2). We focus here on language SQL which is now
The Architecture of Relational Systems implemented in all relational systems.
SQL is based on domain calculus but also refers to the
According to a proposal by the ANSI/SPARC normalization
tuple calculus in some of its aspects. The basic structure of
group in 1975, every database system is structured in three
an SQL query expression is the following:
main levels:
SELECT hlist of attributesi
1. the internal (or physical) level which is concerned
with the actual storage of data and by the manage- FROM hlist of relationsi
ment of transactions; WHERE hconditioni
2. the conceptual level which allows describing a given
application in terms of the DBMSs used, that is, in which roughly corresponds to a relational expression con-
terms of relations in the case of a relational DBMSs; taining projections, selections, and joins. For example, in
and the database of Fig. 1, the query E is expressed in SQL as
3. the external level which is in charge of taking users follows:
requirements into account.
SELECT EMP.deptno, dname
Based on this three-level general architecture, all rela- FROM EMP, DEPT
tional DBMSs are structured according to the same general WHERE sal < 10,000 AND EMP.deptno
schema that is seen as two interfaces, the external interface DEPT.deptno
and the storage interface.
The external interface, which is in charge of the com- We draw attention to the fact that the condition part
munication between users programs and the database, reflects not only the selection condition from E, but also
contains five main modules: (1) precompilers allowing for that, to join tuples from the relations EMP and DEPT, their
8 RELATIONAL DATABASES

deptno values must be equal. This last equality must be ments are incorporated to specify which tuples are affected
explicit in SQL, whereas, in the relational algebra, it is a by the update. For example, in the database of Fig. 1,
consequence of the definition of the join operator. We also increasing the salaries of 10% of all employees working
note that terms such as EMP.deptno or DEPT.deptno can in department number 1 is achieved as follows:
be seen as terms from tuple calculus, whereas terms such as
deptno or dname, refer to domain calculus. In general, UPDATE EMP
prefixing an attribute name by the corresponding relation SET sal sal  1.1
name is required if this attribute occurs in more than one WHERE deptno 1
relation in the FROM part of the query.
The algebraic renaming operator is implemented in Transactions are managed in SQL by the two-phase
SQL, but concerns relations, rather than attributes as in locking protocol, using different kinds of locks, allowing
relational algebra. For example, the algebraic expression only read data or allowing read and write data. Moreover,
E1 (which computes the number of employees working in at activeness in databases is taken into account in SQL
least two distinct departments) is written in SQL as follows: through the notion of triggers, which are executed accord-
ing to the immediate mode.
SELECT EMP.empno Data confidentiality is another very important issue,
FROM EMP,EMP EMPLOYEES closely related to data security, but has received very little
WHERE EMP.deptno != EMPLOYEES.deptno AND attention at the theoretical level. Nevertheless, this pro-
blem is addressed in SQL in two different ways: (1) by
EMP.empno = EMPLOYEES.empno
restricting the access to data to specified users and (2) by
Set theoretic operators union, intersection, and differ- allowing users to query only the part of the database they
ence are expressed as such in SQL, by the keywords have permission to query. Restricting access to data by
UNION, INTERSECT, and MINUS (or EXCEPT), respec- other users is achieved through the GRANT instruction,
tively. Thus, every expression of relational algebra can be that is specified by the owner either on a relation or on
written as a SQL statement, and this basic result is known attributes of a relation. A GRANT instruction may concern
as the completeness of the language SQL. An important queries and/or updates, so that, for example, a user is
point in this respect is that SQL expresses more queries allowed to query for salaries of employees, while forbidding
than relational algebra as a consequence of introducing the user to modify them. On the other hand, a different way
functions (whereas function symbols are not considered in to ensure data confidentiality consists in defining derived
relational calculus) and grouping instructions in SQL. relations called views. For instance, to prevent users from
First, because relations are restricted to the first normal seeing the salaries of employees, one can define a view from
form, it is impossible to consider structured attributes, such the relation EMP of Fig. 1 defined as the projection of this
as dates or strings. SQL overcomes this problem by provid- relation over attributes empno, ename, and deptno. A view
ing usual functions for manipulating dates or strings, and is a query, whose SQL code is stored in the metadatabase,
additionally, arithmetic functions for counting or for com- but whose result is not stored in the database. The concept
puting minimum, maximum, average, and sum are avail- of views is a very efficient tool for data confidentiality,
able in SQL. Moreover, SQL offers the possibility of thanks to the high expressional power of queries in SQL.
grouping tuples of relations, through the GROUP BY However, the difficulty with views is that they are not
instruction. As an example of these features, the numbers updatable, except in very restricted cases. Indeed, because
of departments together with the associated numbers of views are derived relations, updates on views must be
employees are obtained in the database of Fig. 1 with the translated into updates on the relations of the database,
following SQL query (in which no WHERE statement and this translation, when it exists, is generally not unique.
occurs, because no selection has to be performed): This problem, known as the nondeterminism of view updat-
ing, is the subject of many research efforts, but has not yet
SELECT deptno, COUNT(empno) been satisfactorily solved.
FROM EMP
GROUP BY deptno We conclude by mentioning that relational systems are
successful in providing powerful database systems for
On the other hand, a database system must incorporate many applications, essentially for business applications.
many other basic features concerning the physical storage However, these systems are not adapted to many new
of tuples, constraints, updates, transactions, and confiden- applications, such as geographical information systems
tiality. In SQL, relations are created with the CREATE or knowledge-based management because of two kinds of
TABLE instruction, where the name of the relation limitations on the relational model:
together with the names and types of the attributes are
specified. It is important to note that this instruction allows 1. Relations are flat structures which prevent easily
specifying constraints and information about the physical managing data requiring sophisticated structures.
storage of the tuples. Moreover, other physical aspects are This remark led to the emergence of object-oriented
taken into account in SQL by creating indexes or clusters to database systems that are currently the subject of
speed up data retrieval. important research efforts, most of them originating
Update instructions in SQL are either insertion, dele- from concepts of object-oriented languages, and
tion, or modification instructions in which WHERE state- also from concepts of relational databases. As
RELATIONAL DATABASES 9

another research direction in this area, we mention 4. P. C. Kanellakis,Elements of relational database theory, in J.
the emergence of object-relational data models that VanLeuwen (ed.), Handbook of Theoretical Computer Science,
extend the relational model by providing a richer type Vol. B: Formal and Semantics. Amsterdam: North Holland,
1990, pp. 10731156.
system including object orientation, and that add
constructs to relational languages (such as SQL) to 5. J. W. Lloyd, Foundations of Logic Programming, 2nd ed.,
deal with the added data types. An introductory Berlin: Springer-Verlag, 1987.
discussion on object-oriented databases and object- 6. E. F. Codd, Relational completeness of data base sublanguages,
relational data models is given in Ref. (8), whereas a in R. Rustin (ed.), Data Base Systems, Englewood Cliffs, NJ:
Prentice-Hall, 1972, pp. 6598.
complete and formal description of these models can
7. W. W. Armstrong, Dependency structures of database rela-
be found in Refs. (2) and (9).
tions. Proc. IFIP Congress, Amsterdam: North Holland, 1974,
2. Relational algebra does not allow for recursivity (see pp. 580583.
Ref. (3)), and thus, queries, such as the computation of 8. A. Silberschatz, H. F. Korth, and S. Sudarshan, Database
the transitive closure of a graph cannot be expressed. System Concepts, 3rd ed., New York: McGraw-Hill series in
This remark has stimulated research in the field of Computer Science, 1996.
deductive databases, a topic closely related to logic 9. S. Abiteboul, R. Hull, and V. Vianu, Foundations of Databases,
programming but which also integrates techniques Reading, MA: Addison-Wesley, 1995.
and concepts from relational databases. The basic 10. S. Ceri, G. Gottlob, and L. Tanca, Logic Programming and
concepts of deductive databases and their connec- Databases, Berlin: Springer-Verlag, 1990.
tions with relational databases are presented in 11. J. Han and M. Kamber, Data Mining: Concepts and Techni-
Refs. (2) and (9) and studied in full detail in Ref. (10). ques, San Francisco, CA: Morgan Kaufman, 2006.
12. S. Abiteboul, P. Buneman, and D. Suciu, Data on the Web: From
We finally mention several new and important fields of relations to Semistructured Data and Xml, San Francisco, CA:
investigation that have emerged during the last decade. Morgan Kaufman, 1999.
These fields are data mining, data warehousing, and semi-
structured data. Indeed, extracting abstracted information
from many huge and heterogeneous databases is now a
crucial issue in practice. As a consequence, many research FURTHER READING
efforts are still currently devoted to the study of efficient
tools for knowledge discovery in databases (KDD or data P. A. Bernstein, V. Hadzilacos, and N. Goodman, Concurrency
mining), as well as for data integration in a data warehouse. Control and Recovery in Database Systems, Reading, MA: Addi-
It is important to note that these new fields rely heavily on son-Wesley, 1987. A good introduction and a fine reference source
the concept of relational databases, because the relational for the topic of transaction management.
model is the basic database model under consideration. C. J. Date, Introduction to Database Systems, 8th ed., Reading, MA:
Data mining and data warehousing are briefly discussed Addison-Wesley, 2003. One of the reference textbooks on relational
in Ref. (8) and are introduced in more details in Refs. (2) and databases.
(11). On the other hand, the Web is causing a revolution in R. Elmasri and S. B. Navathe, Fundamentals of Database Systems,
how we represent, retrieve, and process information. In this 2nd ed., Redwood City, CA: Benjamin Cummings, 1994. One of the
most widely used database textbooks.
respect, the language XML is recognized as the reference
for data exchange on the Web, and the field of semistruc- M. Levene and G. Loizou, A Guided Tour of Relational Databases
and Beyond, Berlin: Springer-Verlag, 1999. A complete textbook
tured data aims to study how XML documents can be
that addresses theoretical and practical aspects of relational data-
managed. Here again, relational database theory is the
bases.
basic reference for the storage and the manipulation of
C. H. Papadimitriou, The Theory of Database Concurrency Control,
XML documents. An in-depth and up-to-date look at this
Rockville, MD: Computer Science Press, 1986. A reference source
new topic can be found in Ref. (12). for the theoretical foundations of concurrency control.
J. D. Ullman, Principles of Database and Knowledge Base Systems,
We note that the latest versions of DBMSs now available Vol. I, II, Rockville MD: Computer Science Press, 1988. One of the
on the marketplace propose valuable and efficient tools for first complete and reference textbooks on databases.
dealing with data mining, data warehousing, and semi- M. Y. Vardi, Fundamentals of dependency theory, in E. Borger
structured data. (ed.), Trends in Theoretical Computer Science, Rockville, MD:
Computer Science Press, 1987, pp. 171224. A complete introduc-
tion to theoretical aspects of dependency theory.
G. Vossen, Data Models, Database Languages, and Database
BIBLIOGRAPHY Management Systems, Workingham, UK: Addison-Wesley, 1991.
This book is a fine introduction to the theory of databases.
1. E. F. Codd, A relational model of data for large shared data
banks, Commun. ACM, 13: 377387, 1970.
2. H. Garcia-Molina, J. D. Ullman, and J. D. Widom, Database DOMINIQUE LAURENT
Systems: The Complete Book, Englewood Cliffs, NJ: Prentice- University of Cergy-Pontoise
Hall, 2001. Cergy-Pontoise, France
3. D. Maier, The Theory of Relational Databases, Rockville, MD:
Computer Science Press, 1983.
S
SPATIAL DATABASES (14), IBMs DB2 Spatial Extender and Spatial Datablade,
and future systems such as Microsofts SQL Server 2008
INTRODUCTION (code-named Katmai) (15). Spatial databases have played a
major role in the commercial industry such as Google Earth
Spatial database management systems (16) aim at the (16) and Microsofts Virtual Earth (17). Research prototype
effective and efficient management of data related to examples of spatial database management systems include
spatial datablades with PostGIS (18), MySQLs Spatial
 space in the physical world (geography, urban plan- Extensions (19), Sky Server (20), and spatial extensions.
ning, astronomy, human anatomy, fluid flow, or an The functionalities provided by these systems include a set
electromagnetic field), of spatial data types such as a points, line segments and
 biometrics (fingerprints, palm measurements, and polygons, and a set of spatial operations such as inside,
facial patterns), intersection, and distance. The spatial types and operations
may be made a part of a query language such as SQL, which
 engineering design (very large-scale integrated cir-
allows spatial querying when combined with an object-
cuits, layout of a building, or the molecular structure
relational database management system (21,22). The per-
of a pharmaceutical drug), and
formance enhancement provided by these systems includes
 conceptual information space (virtual reality environ- a multidimensional spatial index and algorithms for spatial
ments and multidimensional decision-support sys- database modeling such as OGC (23) and 3-D topological
tems). modeling; spatial query processing including point, regio-
nal, range, and nearest-neighbor queries; and spatial data
A spatial database management system (SDBMS) can be methods that use a variety of indexes such as quad trees
characterized as follows: and grid cells.
 A SDBMS is a software module that can work with Related Work and Our Contributions
an underlying database management system, for
example, an object-relational database management Published work related to spatial databases can be classi-
system or object-oriented database management fied broadly as follows:
system.
 Textbooks (3,4,6,24), which explain in detail various
 SDBMSs support multiple spatial data models,
commensurate spatial abstract data types (ADTs), topics in spatial databases such as logical data models
and a query language from which these ADTs are for spatial data, algorithms for spatial operations, and
callable. spatial data access methods. Recent textbooks (6,25)
deal with research trends in spatial databases such as
 SDBMSs support spatial indexing, efficient algorithms spatiotemporal databases and moving objects data-
for spatial operations, and domain-specific rules for bases.
query optimization.
 Reference books (26,27), which are useful for studying
areas related to spatial databases, for example, multi-
Spatial database research has been an active area for
dimensional data structures and geographic informa-
several decades. The results of this research are being used
tion systems (GIS).
several areas. To cite a few examples, the filter-and-refine
technique used in spatial query processing has been applied  Journals and conference proceedings (2837), which
to subsequence mining; multidimensional-index structures are a source of in-depth technical knowledge of specific
such as R-tree and Quad-tree used in accessing spatial data problem areas in spatial databases.
are applied in the field of computer graphics and image  Research surveys (1,38,39), which summarize key
processing; and space-filling curves used in spatial query accomplishments and identify research needs in var-
processing and data storage are applied in dimension-reduc- ious areas of spatial databases at that time.
tion problems. The field of spatial databases can be defined by
its accomplishments; current research is aimed at improving Spatial database research has continued to advance
its functionality, extensibility, and performance. The greatly since the last survey papers in this area were
impetus for improving functionality comes from the needs published (1,38,39). Our contribution in this chapter is to
of existing applications such as geographic information summarize the most recent accomplishments in spatial
systems (GIS), location-based services (LBS) (7), sensor net- database research, a number of which were identified as
works (8), ecology and environmental management (9), research needs in earlier surveys. For instance, bulk load-
public safety, transportation (10), earth science, epidemiol- ing techniques and spatial join strategies are rereferenced
ogy (11), crime analysis (12), and climatology. here as well as other advances in spatial data mining and
Commercial examples of spatial database management conceptual modeling of spatial data. In addition, this chap-
include ESRIs ArcGIS Geodatabase (13), Oracle Spatial ter provides an extensive updated list of research needs in

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 SPATIAL DATABASES

such areas as management of 3-D spatial data, visibility (41). The spatial attributes of a spatial object most often
queries, and many others. The bibliography section at the include information related to spatial locations, for exam-
end of this chapter contains a list of over 100 references, ple, longitude, latitude, elevation, and shape. Relation-
updated with the latest achievements in spatial databases. ships among nonspatial objects are explicit in data inputs,
e.g., arithmetic relation, ordering, instance of, subclass of,
Scope and Outline and membership of. In contrast, relationships among
spatial objects are often implicit, such as overlap, inter-
The goal of this chapter is to provide the reader with a broad
sect, and behind.
introduction to spatial database systems. Spatial databases
Space is a framework to formalize specific relationships
are discussed in the context of object-relational databases
among a set of objects. Depending on the relationships of
(21,22,40), which provide extensibility to many components
interest, different models of space such as set-based space,
of traditional databases to support the spatial domain.
topological space, Euclidean space, metric space, and net-
Three major areas that receive attention in the database
work space can be used (6). Set-based space uses the basic
contextconceptual, logical, and physical data models
notion of elements, element-equality, sets, and member-
are discussed (see Table 1). In addition, applications of
ship to formalize the set relationships such as set-equality,
spatial data for spatial data mining are also explored.
subset, union, cardinality, relation, function, and convex-
Emerging needs for spatial database systems include
ity. Relational and object-relational databases use this
the handling of 3-D spatial data, spatial data with temporal
model of space.
dimension, and effective visualization of spatial data. The
Topological space uses the basic notion of a neighborhood
emergence of hardware technology such as storage area
and points to formalize the extended object relations such as
networks and the availability of multicore processors are
boundary, interior, open, closed, within, connected, and
two additional fields likely to have an impact on spatial
overlaps, which are invariant under elastic deformation.
databases. Such topics of research interest are introduced
Combinatorial topological space formalizes relationships
at the end of each section. References are provided for more
such as Eulers formula (number of faces number of
exploration. Because of the size constraints of this chapter,
vertices  number of edges 2 for planar configuration).
several other overlapping research needs such as spatio
Network space is a form of topological space in which the
temporal databases and uncertainty are not included in
connectivity property among nodes formalizes graph prop-
this chapter.
erties such as connectivity, isomorphism, shortest-path, and
The rest of this chapter is organized as follows:
planarity.
Fundamental concepts helpful to understand spatial
Euclidean coordinatized space uses the notion of a
databases are presented. Spatial database modeling is
coordinate system to transform spatial properties and
described at the conceptual and logical levels; techniques
relationships to properties of tuples of real numbers.
for spatial query processing are discussed; file organiza-
Metric spaces formalize the distance relationships using
tions and index data structures are presented; and spa-
positive symmetric functions that obey the triangle
tial data mining patterns and techniques are explored.
inequality. Many multidimensional applications use
Euclidean coordinatized space with metrics such as dis-
MATHEMATICAL FRAMEWORK tance.

Accomplishments Research Needs


Spatial data are relatively more complex compared with Many spatial applications manipulate continuous spaces of
traditional business data. Specific features of spatial data different scales and with different levels of discretization. A
include: (1) rich data types (e.g., extended spatial objects), sequence of operations on discretized data can lead to
(2) implicit spatial relationships among the variables, (3) growing errors similar to the ones introduced by finite-
observations that are not independent, and (4) spatial precision arithmetic on numbers. Preliminary results (1)
autocorrelation among the features. are available on the use of discrete basis and bounding
Spatial data can be considered to have two types of errors with peg-board semantics. Another related problem
attributes: nonspatial attributes and spatial attributes. concerns interpolation to estimate the continuous field
nonspatial attributes are used to characterize nonspatial from a discretization. Negative spatial autocorrelation
features of objects, such as name, population, and unem- makes interpolation error-prone. More work is needed on
ployment rate for a city. Spatial attributes are used to a framework to formalize the discretization process and its
define the spatial location and extent of spatial objects associated errors, and on interpolation.

Table 1. Spatial database topics


Mathematical Framework
Conceptual Data Model
Logical Data Model Trends: Spatial Data Mining
Query Languages
Query Processing
File Organizations and Indices
SPATIAL DATABASES 3

<Multi-Shape> <Basic Shape> <Cardinality>


<Pictogram> <Shape> (E)

* <Cardinality> 0, 1
1
!
1, n
<Relationship> 0,n
(A) (F) n

<Shape> <Basic Shape> <Derived Shape> <Basic Shape>


<Multi-Shape> (G)
<Derived Shape> <Alternate Shape> <Basic Shape> <Derived Shape>

(B) <Alternate Shape> <Basic Shape> <Basic Shape>


(H)

<Relationship> part_of (highrarchical) <Raster Partition> Raster

(C) part_of (partition) Thiessen


TIN
<BasicShape> (I)

Grammar for: (A) Pictogram, (B) Shape, (C) Relationship


(D) Basic Shape, (E) Multi-Shape,
(F) Cardinality, (G) Derived Shape,
(D) (H) Alternate Shape, (I) Raster Partition

Figure 1. Pictograms.

SPATIAL-DATABASE CONCEPTUAL MODELING user may want to represent a facility as a point (0-D),
a river or road network as lines (1-D), and forest areas
Accomplishments as polygons (2-D) [Fig. 1(d)].
Multishape: To deal with objects that cannot be repre-
Entity relationship (ER) diagrams are commonly used in
sented by the basic shapes, we can use a set of
designing the conceptual model of a database. Many exten-
aggregate shapes. Cardinality is used to quantify
sions (42) have been proposed to extend ER to make the
multishapes. For example, a river network that is
conceptual modeling of spatial applications easier and more
represented as a line pictogram scale will have car-
intuitive. One such extension is the use of pictograms (43).
dinality 0 [Fig. 1(b) and (e)].
A pictogram is a graphical icon that can represent a spatial
entity or a spatial relationship between spatial entities. Derived shape: If the shape of an object is derived from
The idea is to provide constructs to capture the semantics of the shapes of other objects, its pictogram is italicized.
spatial applications and at the same time to keep the For example, we can derive a forest boundary (poly-
graphical representation simple. Figure 2 provides differ- gon) from its forest-type boundaries (polygon), or a
ent types of pictograms for spatial entities and relation- country boundary from the constituent-state bound-
ships. In the following text we define pictograms to aries [Fig. 1(c) and (g)].
represent spatial entities and relationships and their gram- Alternate shape: Alternate shapes can be used for the
mar in graphical form. same object depending on certain conditions; for
example, objects of size less than x units are repre-
sented as points, whereas those greater than x units
Pictogram: A pictogram is a representation of the object are represented as polygons. Alternate shapes are
inserted inside of a box. These iconic representations represented as a concatenation of possible picto-
are used to extend ER diagrams and are inserted at grams. Similarly, multiple shapes are needed to
appropriate places inside the entity boxes. An entity represent objects at different scales; for example, at
pictogram can be of a basic shape or a user-defined higher scales lakes may be represented as points and
shape. at lower scales as polygons [Fig. 1(d) and (h)].
Shape: Shape is the basic graphical element of a picto- Any possible shape: A combination of shapes is repre-
gram that represents the geometric types in the sented by a wild card  symbol inside a box, which
spatial data model. It can be a basic shape, a multi- implies that any geometry is possible (Fig. 1(e)).
shape, a derived shape, or an alternate shape. Most User-defined shape: Apart from the basic shapes of point,
objects have simple (basic) shapes [Fig. 1 (b)]. line, and polygon, user-defined shapes are possible.
Basic Shape: In a vector model, the basic elements are User-defined shapes are represented by an exclama-
point, line, and polygon. In a forestry example, the tion symbol (!) inside a box [Fig. 1(a)].
4 SPATIAL DATABASES

Relationship pictograms: Relationship pictograms are - Private: Only the class that owns the attribute is
used to model the relationship between entities. For allowed to access the attribute. # Protected: Other
example, part_of is used to model the relationship than the class that owns the attribute, classes derived
between a route and a network, or it can be used to from the class that owns can access the attibute.
model the partition of a forest into forest stands [Fig. Methods: Methods are functions and a part of class
1(c)]. definition. They are responsible for modifying the
behavior or state of the class. The state of the class
The popularity of object-oriented languages such as is embodied in the current values of the attributes. In
C and Java has encouraged the growth of object- object-oriented design, attributes should only be
oriented database systems (OODBMS). The motivation accessed through methods.
behind this growth in OODBMS is that the direct mapping Relationships: Relationships relate one class to another
of the conceptual database schema into an object-oriented or to itself. This concept is similar to the concept of
language leads to a reduction of impedance mismatch relationship in the ER model. Three important cate-
encountered when a model on one level is converted into gories of relationships are as follows:
a model on another level.
UML is one of the standards for conceptual-level model-  Aggregation: This category is a specific construct to
ing for object-oriented software design. It may also be capture the partwhole relationship. For instance,
applied to an OODBMS to capture the design of the system a group of foreststand classes may be aggregated
conceptually. A UML design consists of the following build- into a forest class.
ing blocks:  Generalization: This category describes a relation-
ship in which a child class can be generalized to a
Class: A class is the encapsulation of all objects that parent class. For example, classes such as point,
share common properties in the context of the appli- line, and polygon can be generalized to a geometry
cation. It is the equivalent of the entity in the ER class.
model. The class diagrams in a UML design can be  Association: This category shows how objects of
further extended by adding pictograms. In a forestry different classes are related. An association is bin-
example, classes can be forest, facility, forest stand, ary if it connects two classes or ternary if it con-
and so forth. nects three classes. An example of a binary
Attributes: Attributes characterize the objects of the association is supplieswater to between the classes
class. The difference between an attribute ER and river and facility.
a UML model design is that no notion of a key
attribute exists in UML, in an object-oriented system, Figures 2 and 3 provide an example for modeling a State-
each object has an implicit system-generated unique Park using ER and UML with pictograms, respectively.
identification. In UML, attributes also have a scope
Research Needs
that restricts the attributes access by other classes.
Three levels of scope exist, and each has a special Conceptual modeling for spatiotemporal and moving-
symbol: Public: This symbol allows the attribute object data needs to be researched. Pictograms as intro-
to be accessed and manipulated from any class. duced in this section may be extended to handle such data.

Length

Volume Name NumofLanes


Name

supplies_water_to N RIVER ROAD

Elevation
M
Accesses
Name

1 1 1 M
belongs_to
FACILITY FOREST part_of FOREST-STAND

1
1
M monitors Specie
Name manages

1 Stand-id

Name FIRE-STATION MANAGER

Gender
Name
Age

Figure 2. Example ER diagram with pictograms.


SPATIAL DATABASES 5

RIVER ROAD
SUPPLIES-WATER-TO # Name # Name
# Volume * # Length # NumofLanes
supplies-water-to + GetName() + GetName()
+ GetLength() + GetNumofLanes()

FACILITY * FOREST
# Name # Name
+ GetName() # Elevation *
1 .. * belongs_to 1
+ GetName() accesses
1
1 + GetElevation():
Point
manages
1..*
monitor 1..*
1 LEGEND
FOREST-STAND
FIRE-STATION MANAGER
# SpecieName Strong
# Name
1 .. * # Name Aggregation
+ GetName() # Age
+ GetSpecieName() # Gender
Weak
+ GetName() Aggregation
+ GetAge()
* .. * Cardinality
+ GetGender()

Figure 3. Example UML class diagram with pictograms.

Models used in the spatial representation of data can be spatial ontology that is required in a geo-spatial semantic
extended to conside the time dimension. For instance, the web is challenging because the defining properties of geo-
nine-intersection matrix used to represent topology can be graphic entities are very closely related to space (i.e., multi-
differentiated to consider the change in topology over a dimensional space). In addition, each entity may have
period of time. Similarly, other spatial properties such as several subentities resulting in a complex object (48).
position, orientation, and shape can be differentiated to One popular data model used in representing semantic
consider effects over time such as motion, rotation, and web is the resource description framework (RDF) (49).
deformation of a spatial object. Similarly, series of points RDF is being extended (GeoRDF) (50) to include spatial
can be accumulated to represent time-varying spatial data dimensions and hence to provide the necessary support for
and properties. geographica data on the web.
Another area of research is the use of ontology for
knowledge management. An ontology defines a common
SPATIAL DATA MODELS AND QUERY LANGUAGES
vocabulary that allows knowledge to be shared and reused
across different applications. Ontologies provide a shared
Accomplishments
and common understanding of some domain that can be
communicated across people and computers. Data Models. A spatial data model provides the data
Geospatial ontology (44) is specific to the geospatial abstraction necessary to hide the details of data storage.
domain. Research in geospatial ontology is needed to pro- The two commonly used models are the field-based model
vide interoperability between geospatial data and software. and the object-based model. Whereas the field-based model
Developing geospatial ontologies is one of the long-term adopts a functional viewpoint, the object-based model
research challenges for the University Consortium for treats the information space as a collection of discrete,
Geographic Information Systems (UCGIS) (37). Research identifiable, spatially referenced entities. Based on the
in this area is also being carried out by companies such as type of data model used, the spatial operations may change.
CYC for geospatial ontology. Table 2 lists the operations specific to the field-based and
Geospatial ontology can be extended to include the object-based models. In the context of object-relational
temporal dimension. The ontology of time has been databases, a spatial data model is implemented using a
researched in the domain of artificial intelligence as situa- set of spatial data types and operations. Over the last two
tion calculus. OWL-Time (45) is an ontology developed to decades, an enormous amount of work has been done in the
represent time. design and development of spatial abstract data types and
Semantic web (46) is widely known as an efficient way to their embedding in a query language. Serious efforts are
represent data on the Web. The wealth of geographic being made to arrive at a consensus on standards through
information currently available on the Web has prompted the OGC (51).
research in the area of GeoSpatial Semantic Web (47,48). In OGC proposed the general feature model (51) where
this context, it becomes necessary to create representations features are considered to occur at two levels, namely,
of the geographic information resources. This necessity feature instances and feature types. A geographic feature
must lead to a framework for information retrieval based is represented as a discrete phenomenon characterized by
on the semantics of spatial ontologies. Developing the geo- its geographic and temporal coordinates at the instance
6 SPATIAL DATABASES

Table 2. Data model and operations


Data Model Operator Group Operation
Vector Object Set-Oriented equals, is a member of, is empty, is a subset of, is disjoint
from, intersection, union, difference, cardinality
Topological boundary, interior, closure, meets, overlaps, is inside, covers,
connected, components, extremes, is within
metric distance, bearing/angle, length, area, perimeter
Direction east, north, left, above, between
Network successors, ancestors, connected, shortest-path
Dynamic translate, rotate, scale, shear, split, merge
Raster Field Local point-wise sums, differences, maximumms, means, etc.
Focal slop, aspect, weighted average of neighborhood
Zonal sum or mean or maximum of field values in each zone

level, and the instances with common characteristics are provides the means for the quantitative description of the
grouped into classes called feature types. Direction is spatial characteristics including dimension, position, size,
another important feature used in spatial applications. A shape, and orientation. Topology deals with the character-
direction feature can be modeled as a spatial object (52). istics of geometric figures that remain invariant if the space
Research has also been done to efficiently compute the is deformed elastically and continuously. Figure 5 shows
cardinal direction relations between regions that are com- the hierarchy of geometry data types. Objects under pri-
posed of sets of spatial objects (53). mitive (e.g., points and curves) will be open (i.e., they will
not contain their boundary points), and the objects under
Query Languages. When it comes to database sytems, complex (e.g., disjoint objects) will be closed.
spatial database researchers prefer object-based models In addition to defining the spatial data types, OGC also
because the data types provided by object-based database defines spatial operations. Table 3 lists basic operations
systems can be extended to spatial data types by creating operative on all spatial data types. The topological opera-
abstract data types (ADT). OGC provides a framework for tions are based on the ubiquitous nine-intersection model.
object-based models. Figure 4 shows the OpenGIS Using the OGC specification, common spatial queries can
approach to modeling geographic features. This framework be posed intuitively in SQL. For example, the query Find all
provides conceptual schemas to define abstract feature lakes which have an area greater than 20 sq. km. and are
types and provides facilities to develop application schemas within 50 km. from the campgrounds can be posed as shown
that can capture data about feature instances. Geographic in Table 4 and Fig. 6. Other GIS and LBS example queries
phenomena fall into two broad categories, discrete and are provided in Table 5. The OGC specification is confined to
continuous. Discrete phenomena are objects that have topological and metric operations on vector data types.
well-defined boundaries or spatial extent, for example, Also, several spatiotemporal query languages have been
buildings and streams. Continuous phenomena vary over studied that are trigger-based for relational-oriented mod-
space and have no specific extent (e.g., temperature and els (54), moving objects (55), future temporal languages
elevation). A continuous phenomenon is described in terms (56), and constraint-based query languages (57).
of its value at a specific position in space (and possibly time). For spatial networks, commonly used spatial data types
OGC represents discrete phenomena (also called vector include objects such as node, edge, and graph. They may be
data) by a set of one or more geometric primitives (points, constructed as an ADT in a database system. Query lan-
curves, surfaces, or solids). A continuous phenomenon is guages based on relational algebra are unable to express
represented through a set of values, each associated with certain important graph queries without making certain
one of the elements in an array of points. OGC uses the term assumptions about the graphs. For example, the transitive
coverage to refer to any data representation that assigns closure of a graph may not be determined using relational
values directly to spatial position. A coverage is a function algebra. In the SQL3, a recursion operation RECURSIVE
from a spatiotemporal domain to an attribute domain. has been proposed to handle the transitive closure
OGC provides standardized representations for spatial operation.
characteristics through geometry and topology. Geometry
Research Needs
Map Algebra. Map Algebra (58) is a framework for raster
analysis that has now evolved to become a preeminent
language for dealing with field-based models. Multiple
operations can be performed that take multiple data layers
that are overlayed upon each other to create a new layer.
Some common groups of operations include local, focal, and
zonal. However, research is needed to account for the
generalization of temporal or higher dimensional data
Figure 4. Modeling geographic information [source: (51)]. sets (e.g., 3-D data).
SPATIAL DATABASES 7

Geometry SpatialReferenceSystem

Point Curve Surface Geometry Collection

1..* 2 ..*

LineString Polygon MultiSurface MultiCurve MultiPoint


1..*
2 .. *

Line LinearRing 1 ..* MultiPolygon MultiLineString

Figure 5. Hierarchy of data types.

Modeling 3-D Data. The representation of volumetric ture Radar), and EM collect data volumetrically. Because
data is another field to be researched. Geographic attri- volumetric data is huge, current convention is to translate
butes such as clouds, emissions, vegetation, and so forth. the data into lower-dimensional representations such as
are best described as point fields on volumetric bounds. B-reps, Point clouds, NURBS, and so on. This action results
Sensor data from sensor technologies such as LADAR in loss of intrinsic 3-D information. Efforts (59) have been
(Laser Detection and Ranging), 3-D SAR (Synthtic Arper- made to develop 3-D data models that emphasize the

Table 3. A sample of operations listed in the OGC standard for SQL


Basic Functions
SpatialReference() Returns the underlying coordinate system of the geometry
Envelope() Returns the minimum orthogonal bounding rectangle of the geometry
Export () Returns the geometry in a different representation
IsEmpty() Returns true if the geometry is an empty set.
IsSimple() Returns true if the geometry is simple (no self-intersection)
Boundary () Returns the boundary of the geometry
Topological/ Set Operators
Equal Returns true if the interior and boundary of the two
geometries are spatially equal
Disjoint Returns true if the boundaries and interior do not intersect.
Intersect Returns true if the interiors of the geometries intersect
Touch Returns true if the boundaries intersect but the interiors do not.
Cross Returns true if the interior of the geometries intersect but the
boundaries do not
Within Returns true if the interior of the given geometry
does not intersect with the exterior of another geometry.
Contains Tests if the given geometry contains another given geometry
Overlap Returns true if the interiors of two geometries
have non-empty intersection
Spatial Analysis
Distance Returns the shortest distance between two geometries
Buffer Returns a geometry that consists of all points
whose distance from the given geometry is less than or equal to the
specified distance
ConvexHull Returns the smallest convex set enclosing the geometry
Intersection Returns the geometric intersection of two geometries
Union Returns the geometric union of two geometries
Difference Returns the portion of a geometry which does not intersect
with another given geometry
SymmDiff Returns the portions of two geometries which do
not intersect with each other
8 SPATIAL DATABASES

Table 4. SQL query with spatial operators


SELECT L.name

L.name
FROM Lake L, Facilities Fa
WHERE Area(L.Geometry) > 20 AND
Fa.name campground AND
Distance(Fa.Geometry, L.Geometry) < 50 Area(L.Geometry) > 20

significance of the volumetric shapes of physical world


objects. This topological 3-D data model relies on Poincare
algebra. The internal structure is based on a network of
simplexes, and the internal data structure used is a tetra- Fa.name = campground
hedronized irregular network (TIN) (59,60), which is the
three-dimensional variant of the well-known triangulated
irregular network (TIN). Distance(Fa.Geometry, L.Geometry) < 50

Modeling Spatial Temporal Networks. Graphs have been


used extensively to represent spatial networks. Consider-
ing the time-dependence of the network parameters and Lake L Facilities Fa
their topology, it has become critically important to incor- (a)
porate the temporal nature of these networks into their
models to make them more accurate and effective. For Figure 6. SQL query tree.
example, in a transportation network, the travel times
on road segments are often dependent on the time of the Modeling Moving Objects. A moving object database is
day, and there can be intervals when certain road segments considered to be a spatiotemporal database in which the
are not available for service. In such, time-dependent net- spatial objects may change their position and extent over a
works modeling the time variance becomes very important. period of time. To cite a few examples, the movement of taxi
Time-expanded graphs (61) and time-aggregated graphs cabs, the path of a hurricane over a period of time, and the
(62) have been used to model time-varying spatial net- geographic profiling of serial criminals are a few examples
works. In the time-expanded representation, a copy of in which a moving-objects database may be considered.
the entire network is maintained for every time instant, Referances 25 and 63 have provided a data model to support
whereas the time-aggregated graphs maintain a time ser- the design of such databases.
ies of attributes, associated to every node and edge.
Network modeling can be extended to consider 3-D Markup Languages. The goals of markup languages, such
spatial data. Standard road network features do not repre- as geography markup language (GML) (64), are to provide a
sent 3-D structure and material properties. For instance, standard for modeling language and data exchange formats
while modeling a road tunnel, we might want to represent for geographic data. GML is an XML-based markup lan-
its overpass clearance as a spatial property. Such proper- guage to represent geographic entities and the relation-
ties will help take spatial constraints into account while ships between them. Entities associated with geospatial
selecting routes. data such as geometry, coordinate systems, attributes, and

Table 5. Typical spatial queries from GIS and LBS


GIS Queries
Grouping Recode all land with silty soil to silt-loadm soil
Isolate Select all land owned by Steve Steiner
Classify If the population density is less than 100 people / sq. mi., land is acceptable
Scale Change all measurements to the metric system
Rank If the road is an Interstate, assign it code 1; if the road
is a state or US highway, assign it code 2; otherwise assign it code 3
Evaluate If the road code is 1, then assign it Interstate; if the road code is 2,
then assign it Main Artery; if the road code is 3, assign it Local Road
Rescale Apply a function to the population density
Attribute Join Join the Forest layer with the layer containing forest-cover codes
Zonal Produce a new map showing state populations given county population
Registration Align two layers to a common grid reference
Spatial Join Overlay the land-use and vegetation layers to produce a new layer
LBS Queries

Nearest Neighbor List the nearest gas stations


Directions Display directions from a source to a destation
(e.g. Google Maps, Map Quest)
Local Search Search for restaurants in the neighborhood
(e.g. Microsoft Live Local, Google Local)
SPATIAL DATABASES 9

so forth, can be represented in a standard way using GML. and cannot be naturally sorted in a one-dimensional
Several computational challenges exist with GML, such as array.
spatial query processing and indexing (65). CityGML (66) is  Computationally expensive algorithms are required to
a subclass of GML useful for representing 3-D urban test for spatial predicates, and the assumption that I/O
objects, such as buildings, bridges, tunnels, and so on. costs dominate processing costs in the CPU is no longer
CityGML allows modeling of spatial data at different levels valid.
of detail regarding both geometry and thematic differentia-
tion. It can be used to model 2.5-D data (e.g., digital terrain In this section, we describe the processing techniques for
model), and 3-D data (walkable architecture model). Key- evaluating queries on spatial databases and discuss open
hole markup language (KML) (67) is another XML-based problems in spatial query processing and query optimiza-
markup language popular with commercial spatial soft- tion.
ware from Google. Based on a structure similar to GML,
KML allows representation of points, polygons, 3-D objects, Spatial Query Operations. Spatial query operations can
attributes, and so forth. be classified into four groups (68).

 Update Operations: These include standard data-


SPATIAL QUERY PROCESSING
base operations such as modify, create, and delete.
Accomplishments
 Spatial Selection: These can be of two types:

The efficient processing of spatial queries requires both Point Query: Given a query point, find all spatial
efficient representation and efficient algorithms. Common objects that contain it. An example is the following
representations of spatial data in an object model include query, Find all river flood-plains which contain
spaghetti, the node-arc-node (NAA) model, the doubly con- the SHRINE.
nected-edge-list (DCEL), and boundary representation, Regional Query: Given a query polygon, find all
some of which are shown in Fig. 7 using entity-relationship spatial objects that intersect the query polygon.
diagrams. The NAA model differentiates between the topo- When the query polygon is a rectangle, this query
logical concepts (node, arc, and areas) and the embedding is called a window query. These queries are some-
space (points, lines, and areas). The spaghetti-ring and times also referred to as range queries. An example
DCEL focus on the topological concepts. The representation query could be Identify the names of all forest
of the field data model includes a regular tessellation stands that intersect a given window.
(triangular, square, and hexagonal grid) and triangular Spatial Join: Like the join operator in relational
irregular networks (TIN). databases, the spatial join is one of the more impor-
Query processing in spatial databases differs from that tant operators. When two tables are joined on a
of relational databases because of the following three major spatial attribute, the join is called a spatial join. A
issues: variant of the spatial join and an important operator
in GIS is the map overlay. This operation combines
 Unlike relational databases, spatial databases have no two sets of spatial objects to form new ones. The
fixed set of operators that serve as building blocks for boundaries of a set of these new objects are deter-
query evaluation. mined by the nonspatial attributes assigned by the
 Spatial databases deal with extremely large volumes of overlay operation. For example, if the operation
complex objects. These objects have spatial extensions assigns the same value of the nonspatial attribute

Is Is
Previous Next

Left Directed
Sequence No. Bounded Arc Begins

Area Sequence Points Area Node


Right
Spaghelti Data Model Bounded
Ends

DoubleConnectedEdge List Model.


Sequence No. Sequence No.

Polygon Sequence Polyline Sequence Point

Embeds Embeds
Embeds

Left Directed
Area Bounded Arc Begins Node

Right
Bounded Ends

NodeArcArea Model

Figure 7. Entity relationship diagrams for common representations of spatial data.


10 SPATIAL DATABASES

filter step refinement step


Query

load object geometry

spatial index test on exact


geometry

candidate set false hits hits

Query result

Figure 8. Two-step processing.

to two neighboring objects, then the objects are Visual Queryings. Many spatial applications present
merged. Some examples of spatial join predicates results visually, in the form of maps that consist of graphic
are intersect, contains, is_enclosed_by, distance, images, 3-D displays, and animations. These applications
northwest, adjacent, meets, and overlap. A query allow users to query the visual representation by pointing to
example of a spatial join is Find all forest-stands the visual representation using pointing devices such as a
and river flood-plains which overlap. mouse orapen.Suchgraphicalinterfacesare neededtoquery
Spatial Aggregate: An example of a spatial spatial data without the need by users to write any SQL
aggregate is Find the river closest to a camp- statements. In recent years, map services, such as Google
ground. Spatial aggregates are usually variants Earth and Microsoft Earth, have become very popular. more
of the Nearest Neighbor (6971) search problem: work is needed to explore the impact of querying by pointing
Given a query object, find the object having mini- and visual presentation of results on database performance.
mum distance from the query object. A Reverse
Nearest Neighbor (RNN) (7276) query is another Two-Step Query Processing of Spatial Operations.
example of a spatial aggregate. Given a query Because spatial query processing involves complex data
object, a RNN query finds objects for which the types, a lake boundary might need a thousand vertices for
query object is the nearest neighbor. Applications exact representation. Spatial operations typically follow a
of RNN include army strategic planning where a two-step algorithm (filter and refinement) as shown in Fig. 8
medical unit, A, in the battlefield is always in to process complex spatial objects efficiently (77). Approx-
search of a wounded soldier for whom A is the imate geometry, such as the minimal orthogonal bounding
nearest medical unit. rectangle of an extended spatial object, is first used to filter
out many irrelevant objects quickly. Exact geometry then is
used for the remaining spatial objects to complete the
Visibility Queries. Visibility has been widely studied in processing.
computer graphics. Visibility may be defined as the parts of
objects and the environment that are visible from a point in  Filter step: In this step, the spatial objects are repre-
space. A visibility query can be thought of as a query that sented by simpler approximations like the minimum
returns the objects and part of the environment visible at bounding rectangle (MBR). For example, consider the
the querying point. For example, within a city, if the cover- following point query, Find all rivers whose flood-
age area of a wireless antenna is considered to be the visible plains overlap the SHRINE. In SQL this query will be:
area, then the union of coverage areas of all the antennas in SELECT river. name
the city will provide an idea about the area that is not FROM river
covered. Such information may be used to place a new WHERE overlap (river. flood-plain, :
antenna strategically at an optimal location. In a visibility SHRINE)
query, if the point in space moves, then the area of visibility
If we approximate the flood-plains of all rivers with
changes. Such a query may be called a continuous visibility
MBRs, then it is less expensive to determine whether
query. For example, security for the presidents motorcade
the point is in a MBR than to check whether a point is in
involves cordoning off the buildings that have route visi-
an irregular polygon, that is, in the exact shape of the
bility. In such a case, the visibility query may be thought of
flood-plain. The answer from this approximate test is a
as a query that returns the buildings visible at different
superset of the real answer set. This superset is some-
points on the route.
timescalled thecandidate set.Even thespatialpredicate
SPATIAL DATABASES 11

may be replaced by an approximation to simplify a Aggregate Operation: Nearest Neighbor, Reverse Nearest
query optimizer. For example, touch (river.flood-plain, Neighbor. Nearest Neighbor queries are common in many
:SHRINE) may be replaced by overlap(MBR(river.flood- applications. For example, a person driving on the road may
plain, :SHRINE), and MBR(:SHRINE)) in the filter want to find the nearest gas station from his current loca-
step. Many spatial operators, for example, inside, tion. Various algorithms exist for nearest neighbor queries
north-of, and buffer, can be approximated using the (6971,83,84). Techniques based on Voronoi diagrams,
overlap relationship among corresponding MBRs. Quad-tree indexing, and Kd-trees have been discussed in
Such a transformation guarantees that no tuple from Ref. 27.
the final answer using exact geometry is eliminated in Reverse Nearest Neighbor queries were introduced in
the filter step. Ref. 72 in the context of decision support systems. For
 Refinement step: Here, the exact geometry of each example, a RNN query can be used to find a set of customers
element from the candidate set and the exact spatial who can be influenced by the opening of a new store-outlet
predicate is examined. This examination usually location.
requires the use of a CPU-intensive algorithm. This
step may sometimes be processed outside the spatial Bulk Loading. Bulk operations affect potentially a large
database in an application program such as GIS, using set of tuples, unlike other database operations, such as
the candidate set produced by the spatial database in insert into a relation, which affects possibly one tuple at a
the filter step. time. Bulk loading refers to the creation of an index from
scratch on a potentially large set of data. Bulk loading has
Techniques for Spatial Operations. This section presents its advantages because the properties of the data set may be
several common operations between spatial objects: selec- known in advance. These properties may be used to design
tion, spatial join, aggregates, and bulk loading. efficiently the space-partitioning index structures com-
monly used for spatial data. An evaluation of generic
Selection Operation. Similar to traditional database sys- bulk loading techniques is provided in Ref. 85.
tems, the selection operation can be performed on indexed
or non indexed spatial data. The difference is in the tech- Parallel GIS. A high-performance geographic informa-
nique used to evaluate the predicate and the type of index. tion system (HPGIS) is a central component of many inter-
As discussed in the previous section, a two-step approach, active applications like real-time terrain visualization,
where the geometry of a spatial object is approximated by a situation assessment, and spatial decision-making. The
rectangle, is commonly used to evaluate a predicate. Pop- geographic information system (GIS) often contains large
ular indexing techniques for spatial data are R-tree, and amounts of geometric and feature data (e.g., location, ele-
space-filling curves. An R-tree is a height-balanced tree vation, and soil type) represented as large sets of points,
that is a natural extension of a B-tree for k-dimensions. It chains of line segments, and polygons. This data is often
allows a point search to be processed in O(log n) time. Hash accessed via range queries. The existing sequential meth-
filling curves provide one-to-one continuous mappings that ods for supporting GIS operations do not meet the real-time
map points of multidimensional space into one-dimensional requirements imposed by many interactive applications.
space. This mapping allows the user to impose order on Hence, parallelization of GIS is essential for meeting
higher-dimensional spaces. Common examples of space- the high performance requirements of several realtime
filling curves are row-order Peano, Z-order, and Hilbert applications. A GIS operation can be parallelized either
curves. Once the data has been ordered by a space-filling by function partitioning (8688) or by data partitioning
curve, a B-tree index can be imposed on the ordered entries (8997). Function-partitioning uses specialized data
to enhance the search. Point search operations can be structures (e.g., distributed data structures) and algo-
performed in O(log n) time. rithms that may be different from their sequential coun-
terparts. Data partitioning techniques divide the data
Spatial Join Operation. Conceptually, a join is defined as among different processors and independently execute
a cross product followed by a selection condition. In prac- the sequential algorithm on each processor. Data parti-
tice, this viewpoint can be very expensive because it tioning in turn is achieved by declustering (98,99) the
involves materializing the cross product before applying spatial data. If the static declustering methods fail to
the selection criterion. This finding is especially true for distribute the load equally among different processors,
spatial databases. Many ingenious algorithms have been the load balance may be improved by redistributing
proposed to preempt the need to perform the cross product. parts of the data to idle processors using dynamic load-
The two-step query-processing technique described in the balancing (DLB) techniques.
previous section is the most commonly used. With such
methods, the spatial join operation can be reduced to a Research Needs
rectanglerectangle intersection, the cost of which is rela- This section presents the research needs for spatial query
tively modest compared with the I/O cost of retrieving pages processing and query optimization.
from secondary memory for processing.
A number of strategies have been proposed for proces- Query Processing. Many open research areas exist at the
sing spatial joins. Interested readers are encouraged to logical level of query processing, including query-cost mod-
refer to Refs. 78 through 82. eling and queries related to fields and networks. Cost
12 SPATIAL DATABASES

Table 6. Difficult spatial queries from GIS

Voronoize Classify households as to which supermarket they are closest to


Network Find the shortest path from the warehouse to all delivery stops
Timedependentnetwork Find the shortest path where the road network is dynamic
Allocation Where is the best place to build a new restaurant
Transformation Triangulate a layer based on elevation
BulkLoad Load a spatial data file into the database
Raster $ Vector Convert between raster and vector representations
Visibility Find all points of objects and environment visible from a point
EvacuationRoute Find evacuation routes based on capacity and availability constraints
PredictLocation Predict the location of a mobile person based on personal route patterns

models are used to rank and select the promising processing declarative statement must be scanned through a parser.
strategies, given a spatial query and a spatial data set. The parser checks the syntax and transforms the statement
However, traditional cost models may not be accurate in into a query tree. In traditional databases, the data types
estimating the cost of strategies for spatial operations, and functions are fixed and the parser is relatively simple.
because of the distance metric and the semantic gap Spatial databases are examples of an extensible database
between relational operators and spatial operation. Com- system and have provisions for user-defined types and
parison of the execution costs of such strategies required methods. Therefore, compared with traditional databases,
that new cost models be developed to estimate the selectiv- the parser for spatial databases has to be considerably more
ity of spatial search and join operations. Preliminary work sophisticated to identify and manage user-defined data
in the context of the R-tree, tree-matching join, and fractal- types and map them into syntactically correct query trees.
model is promising (100,101), but more work is needed. In the query tree, the leaf nodes correspond to the relations
Many processing strategies using the overlap predicate involved and the internal nodes correspond to the basic
have been developed for range queries and spatial join operations that constitute the query. Query processing
queries. However, a need exists to develop and evaluate starts at the leaf nodes and proceeds up the tree until
strategies for many other frequent queries such as those the operation at the root node has been performed.
listed in Table 6. These include queries on objects using Consider the query, Find all lakes which have an area
predicates other than overlap, queries on fields such as greater than 20 sq. km. and are within 50 km. from the
slope analysis, and queries on networks such as the short- campground. Let us assume that the Area() function is not
est path to a set of destinations. precomputed and that its value is computed afresh every
Depending on the type of spatial data and the nature of time it is invoked. A query tree generated for the query is
the query, other research areas also need to be investi- shown in Fig. 9(a). In the classic situation, the rule select
gated. A moving objects query involves spatial objects that before join would dictate that the Area function be
are mobile. Examples of such queries include Which is the computed before the join predicate function, Distance()
nearest taxi cab to the customer?, Where is the hurri- [Fig. 9(b)], the underlying assumption being that the com-
cane expected to hit next?, and What is a possible loca- putational cost of executing the select and join predicate is
tion of a serial criminal? With the increasing equivalent and negligible compared with the I/O cost of the
availability of streaming data from GPS devices, contin- operations. In the spatial situation, the relative cost per
uous queries has become an active area of research. Sev- tuple of Area() and Distance() is an important factor in
eral techniques (25,102,103) have been proposed to deciding the order of the operations (105). Depending the
execute such queries. implementation of these two functions, the optimal strat-
A skyline query (104) is a query to retrieve a set of egy may be to process the join before the select operation
interesting points (records) from a potentially huge collec- [Fig. 9(c)]. This approach thus violates the main heuristic
tion of points (records) based on certain attributes. For rule for relational databases, which states Apply select
example, considering a set of hotels to be points, the skyline and project before the join and binary operations are no
query may return a set of interesting hotels based on a longer unconditional. A cost-based optimization technique
users preferences. The set of hotels returned for a user who exists to determine the optimal execution strategy from a
prefers a cheap hotel may be different from the set of hotels set of execution plans. A quantitative analysis of spatial
returned for a user who prefers hotels that are closer to the index structures is used to calculate the expected number of
coast. Research needed for skyline query operation includes disk accesses that are required to perform a spatial query
computation of algorithms and processing for higher (106). Nevertheless, in spite of these advances, query opti-
dimensions (attributes). Other query processing techni- mization techniques for spatial data need more study.
ques in which research is required are querying on 3-D
spatial data and spatio-temporal data.
SPATIAL FILE ORGANIZATION AND INDICES
Query Optimization. The query optimizer, a module in
Accomplishments
database software, generates different evaluation plans
and determines the appropriate execution strategy. Before Space-Filling Curves. The physical design of a spatial
the query optimizer can operate on the query, the high-level database optimizes the instructions to storage devices for
SPATIAL DATABASES 13

L.name L.name

Area(L.Geometry) > 20 Area(L.Geometry) > 20


L.name

Distance(Fa.Geometry, L.Geometry) < 50 Distance(Fa.Geometry, L.Geometry) < 50


Fa.name = campground

Distance(Fa.Geometry, L.Geometry) < 50 Lake L Fa.name = campground Fa.name = campground


Area(L.Geometry) > 20

Lake L Facilities Fa Facilities Fa Lake L Facilities Fa

(a) (b) (c)

Figure 9. (a) Query tree, (b) pushing down: select operation, and (c) pushing down may not help.

performing common operations on spatial data files. File (109), Point-Quad-Trees, and Kd-trees. Representative
designs for secondary storage include clustering methods indices for extended objects include the R-tree family,
and spatial hashing methods. Spatial clustering techniques the Field-tree, Cell-tree, BSP-tree, and Balanced and
are more difficult to design than traditional clustering Nested grid files.
techniques because no natural order exista in multidimen-
sional space where spatial data resides. This situation is Grid Files. Grid files were introduced by Nievergelt
only complicated by the fact that the storage disk is a logical (110). A grid file divides the space into n-dimensional spaces
one-dimensional device. Thus, what is needed is a mapping that can fit into equal-size buckets. The structures are not
from a higher-dimensional space to a one-dimensional hierarchical and can be used to index static uniformly
space that is distance-preserving: This mapping ensures distributed data. However, because of its structure, the
that elements that are close in space are mapped onto directory of a grid file can be so sparse and large that a large
nearby points on the line and that no two points in the main memory is required. Several variations of grid files,
space are mapped onto the same point on the line (107). exists to index data efficiently and to overcome these
Several mappings, none of them ideal, have been proposed limitations (111,112). An overview of grid files is given in
to accomplish this feat. The most prominent ones include Ref. 27.
row-order, Z-order, and the Hilbert-curve (Fig. 10).
Metric clustering techniques use the notion of distance Tree indexes. R-tree aims to index objects in a hierarch-
to group nearest neighbors together in a metric space. ical index structure (113). The R-tree is a height-balanced
Topological clustering methods like connectivity-clustered tree that is the natural extension of the B-tree for k-dimen-
access methods (108) use the min-cut partitioning of a sions. Spatial objects are represented in the R-tree by their
graph representation to support graph traversal operations minimum bounding rectangle (MBR). Figure 11 illustrates
efficiently. The physical organization of files can be supple- spatial objects organized as an R-tree index. R-trees can be
mented with indices, which are data structures to improve used to process both point and range queries.
the performance of search operations. Several variants of R-trees exist for better performance
Classical one-dimensional indices such as the B-tree of queries and storage use. The R+-tree (114) is used to store
can be used for spatial data by linearizing a multidimen- objects by avoiding overlaps among the MBRs, which

sional space using a space-filling curve such as the Z-order. increases the performance of the searching. R -trees
Many spatial indices (27) have been explored for multi- (115) rely on the combined optimization of the area, margin,
dimensional Euclidean space. Representative indices for and overlap of each MBR in the intermediate nodes of the
point objects include grid files, multidimensional grid files tree, which results in better storage use.

Row Peano Hilbert Morton / Zorder

Figure 10. Space-filling curves to linearize a multidimensional space.


14 SPATIAL DATABASES

A
A B C
e
d
C

B i d e f g h i j

g
f

Figure 11. Spatial objects (d, e, f, g, h, and i) arranged in an R-tree hierarchy.

Many R-tree-based index structures (116119,120,121) TRENDS: SPATIAL DATA MINING


have been proposed to index spatiotemporal objects. A
survey of spatiotemporal access methods has been pro- Accomplishments
vided in Ref. 122.
The explosive growth of spatial data and widespread use of
Quad tree(123) is a space-partitioning index structure in
spatial databases emphasize the need for the automated
which the space is divided recursively into quads. This
discovery of spatial knowledge. Spatial data mining is the
recursive process is implemented until each quad is homo-
process of discovering interesting and previously unknown,
geneous. Several variations of quad trees are available to
but potentially useful, patterns from spatial databases.
store point data, raster data, and object data. Also, other
Some applications are location-based services, studying
quad tree structures exist to index spatiotemporal data
the effects of climate, land-use classification, predicting
sets, such as overlapping linear quad trees (24) and multi-
the spread of disease, creating high-resolution three-
ple overlapping features (MOF) trees (125).
dimensional maps from satellite imagery, finding crime
The Generalized Search Tree (GiST) (126) provides a
hot spots, and detecting local instability in traffic. A
framework to build almost any kind of tree index on any
detailed review of spatial data mining can be found in
kind of data. Tree index structures, such as B-tree and
Ref. 130.
R-tree, can be built using GiST. A spatial-partitioning
The requirements of mining spatial databases are dif-
generalized search tree (SP-GiST) (127) is an extensible
ferent from those of mining classic relational databases.
index structure for space-partitioning trees. Index trees
The difference between classic and spatial data mining
such as quad tree and kd-tree can be built using SP-GiST.
parallels the difference between classic and spatial statis-
tics. One fundamental assumption that guides statistical
Graph Indexes. Most spatial access methods provide
analysis is that the data samples are generated indepen-
methods and operators for point and range queries over
dently, as with successive tosses of a coin or the rolling of a
collections of spatial points, line segments, and polygons.
die. When it comes to the analysis of spatial data, the
However, it is not clear if spatial access methods can
assumption about the independence of samples is generally
efficiently support network computations that traverse
false. In fact, spatial data tends to be highly self-correlated.
line segments in a spatial network based on connectivity
For example, changes in natural resources, wildlife, and
rather than geographic proximity. A connectivity-clustered
temperature vary gradually over space. The notion of spa-
access method for spatial network (CCAM ) is proposed to
tial autocorrelation, the idea that similar objects tend to
index spatial networks based on graph partitioning (108) by
cluster in geographic space, is unique to spatial data
supporting network operations. An auxiliary secondary
mining.
index, such as B-tree, R-tree, and Grid File, is used to
For detailed discussion of spatial analysis, readers are
support network operations such as Find(), get-a-Succes-
encouraged to refer to Refs. 131 and 132.
sor(), and get-Successors().
Spatial Patterns. This section presents several spatial
Research Needs
patterns, specifically those related to location prediction,
Concurrency Control. The R-link tree (128) is among the Markhov random fields, spatial clustering, spatial outliers,
few approaches available for concurrency control on the and spatial colocation.
R-tree. New approaches for concurrency-control techni-
ques are needed for other spatial indices. Concurrency is Location Prediction. Location prediction is concerned
provided during operations such as search, insert, and with the discovery of a model to infer locations of a spatial
delete. The R-link tree is also recoverable in a write-ahead phenomenon from the maps of other spatial features. For
logging environment. Reference 129 provides general algo- example, ecologists build models to predict habitats for
rithms for concurrency control for GiST that can also be endangered species using maps of vegetation, water bodies,
applied to tree-based indexes. Research is required for climate, and other related species. Figure 12 shows the
concurrency control on other useful spatial data structures. learning data set used in building a location-prediction
SPATIAL DATABASES 15

Figure 12. (a) Learning data set: The geometry of the Darr wetland and the locations of the nests, (b) the spatial distribution of vegetation
durability over the marshland, (c) the spatial distribution of water depth, and (d) the spatial distribution of distance to open water.

model for red-winged blackbirds in the Darr and Stubble collapses to the linear regression model. If the spatial
wetlands on the shores of Lake Erie in Ohio. The data set autocorrelation coefficient is statistically significant, then
consists of nest location, vegetation durability, distance to SAR will quantify the presence of spatial autocorrelation.
open water, and water depth maps. Spatial data mining In such a case, the spatial autocorrelation coefficient will
techniques that capture the spatial autocorrelation indicate the extent to which variations in the dependent
(133,134) of nest location such as the spatial autoregression variable (y) are explained by the average of neighboring
model (SAR) and markov random fields (MRF) are used for observation values.
location-prediction modeling.
Markov Random Field. Markov random field-based (139)
Spatial Autoregression Model. Linear regression models Bayesian classifiers estimate the classification model, f^c,
are used to estimate the conditional expected value of a using MRF and Bayes rule. A set of random variables
dependent variable y given the values of other variables X. whose interdependency relationship is represented by an
Such a model assumes that the variables are independent. undirected graph (i.e., a symmetric neighborhood matrix) is
The spatial autoregression model (131,135137) is an called a Markov random field. The Markov property spe-
extension of the linear regression model that takes spatial cifies that a variable depends only on its neighbors and is
autocorrelation into consideration. If the dependent values independent of all other variables. The location prediction
y and X are related to each other, then the regression problem can be modeled in this framework by assuming
equation (138) can be modified as that the class label, li fC(si), of different locations, si,
constitutes an MRF. In other words, random variable li is
independent of li if W(si,sj) 0.
y rWy Xb e 1 The Bayesian rule can be used to predict li from feature
value vector X and neighborhood class label vector Li as
Here, W is the neighborhood relationship contiguity follows:
matrix, and ? is a parameter that reflects the strength of
the spatial dependencies between the elements of the PrXjli ; Li Prli jLi
dependent variable. Notice that when r 0, this equation Prli jX; Li 2
PrX
16 SPATIAL DATABASES

The solution procedure can estimate Pr(li|Li) from the


training data, where Li denotes a set of labels in the
neighborhood of si excluding the label at si. It makes this
estimate by examining the ratios of the frequencies of class
labels to the total number of locations in the spatial frame-
work. Pr(X|li, Li) can be estimated using kernel functions
from the observed values in the training data set.
A more detailed theoretical and experimental compar-
ison of these methods can be found in Ref. 140. Although
MRF and SAR classification have different formulations,
they share a common goal of estimating the posterior
probability distribution. However, the posterior probability
for the two models is computed differently with different
assumptions. For MRF, the posterior is computed using
Bayes rule, whereas in SAR, the posterior distribution is
fitted directly to the data. Figure 13. Spatial outlier (station ID 9) in traffic volume data.

Spatial Clustering. Spatial clustering is a process of graphical tests and quantitative tests. Graphical tests,
grouping a set of spatial objects into clusters so that objects which are based on the visualization of spatial data, high-
within a cluster have high similarity in comparison with light spatial outliers, for example, variogram clouds (141)
one another but are dissimilar to objects in other clusters. and Moran scatterplots (144). Quantitative methods pro-
For example, clustering is used to determine the hot vide a precise test to distinguish spatial outliers from the
spots in crime analysis and disease tracking. Many crim- remainder of data. A unified approach to detect spatial
inal justice agencies are exploring the benefits provided by outliers efficiently is discussed in Ref. 145., Referance
computer technologies to identify crime hot spots to take 146 provides algorithms for multiple spatial-outlier detec-
preventive strategies such as deploying saturation patrols tion.
in hot-spot areas. Spatial Colocation The colocation pattern discovery
Spatial clustering can be applied to group similar spatial process finds frequently colocated subsets of spatial event
objects together; the implicit assumption is that patterns in types given a map of their locations. For example, the
space tend to be grouped rather than randomly located. analysis of the habitats of animals and plants may identify
However, the statistical significance of spatial clusters the colocations of predatorprey species, symbiotic species,
should be measured by testing the assumption in the or fire events with fuel, ignition sources and so forth. Figure
data. One method to compute this measure is based on 14 gives an example of the colocation between roads and
quadrats (i.e., well-defined areas, often rectangular in rivers in a geographic region.
shape). Usually quadrats of random location and orienta- Approaches to discovering colocation rules can be cate-
tions in the quadrats are counted, and statistics derived gorized into two classes, namely spatial statistics and data-
from the counters are computed. Another type of statistics mining approaches. Spatial statistics-based approaches
is based on distances between patterns; one such type is use measures of spatial correlation to characterize the
Ripleys K-function (141). After the verification of the sta- relationship between different types of spatial features.
tistical significance of the spatial clustering, classic clus- Measures of spatial correlation include the cross K-function
tering algorithms (142) can be used to discover interesting with Monte Carlo simulation, mean nearest-neighbor dis-
clusters. tance, and spatial regression models.
Data-mining approaches can be further divided into
Spatial Outliers. A spatial outlier (143) is a spatially transaction-based approaches and distance-based approa-
referenced object whose nonspatial attribute values differ ches. Transaction-based approaches focus on defining
significantly from those of other spatially referenced objects transactions over space so that an a priori-like algorithm
in its spatial neighborhood. Figure 13 gives an example of can be used. Transactions over space can be defined by a
detecting spatial outliers in traffic measurements for sen- reference-feature centric model. Under this model, trans-
sors on highway I-35W (North bound) for a 24-hour time actions are created around instances of one user-specified
period. Station 9 seems to be a spatial outlier as it exhibits spatial feature. The association rules are derived using the
inconsistent traffic flow as compared with its neighboring a priori (147) algorithm. The rules formed are related to the
stations. The reason could be that the sensor at station 9 is reference feature. However, it is nontrivial to generalize
malfunctioning. Detecting spatial outliers is useful in many the paradigm of forming rules related to a reference feature
applications of geographic information systems and spatial to the case in which no reference feature is specified. Also,
databases, including transportation, ecology, public safety, defining transactions around locations of instances of all
public health, climatology, and location-based services. features may yield duplicate counts for many candidate
Spatial attributes are used to characterize location, associations.
neighborhood, and distance. Nonspatial attribute dimen- In a distance-based approach (148150), instances of
sions are used to compare a spatially referenced object objects are grouped together based on their Euclidean
with its neighbors. Spatial statistics literature provides distance from each other. This approach can be considered
two kinds of bipartite multidimensional tests, namely to be an event-centric model that finds subsets of spatial
SPATIAL DATABASES 17

as transportation, oil/gas-pipelines, and utilities (e.g.,


water, electricity, and telephone). Thus, activity reports,
for example, crime/insurgency reports, may often use
network-based location references, for exmple, street
address such as 200 Quiet Street, Scaryville, RQ
91101. In addition, spatial interaction among activities
at nearby locations may be constrained by network con-
nectivity and network distances (e.g., shortest path along
roads or train networks) rather than geometric distances
(e.g., Euclidean or Manhattan distances) used in tradi-
tional spatial analysis. Crime prevention may focus on
identifying subsets of ST networks with high activity
levels, understanding underlying causes in terms of ST-
network properties, and designing ST-network-control
policies.
Existing spatial analysis methods face several chal-
lenges (e.g., see Ref. 158). First, these methods do not model
Figure 14. Colocation between roads and rivers in a hilly terrain the effect of explanatory variables to determine the loca-
(Courtesy: Architecture Technology Corporation). tions of network hot spots. Second, existing methods for
network pattern analysis are computationally expensive.
Third, these methods do not consider the temporal aspects
of the activity in the discovery of network patterns. For
features likely to occur in a neighborhood around instances example, the routes used by criminals during the day and
of given subsets of event types. night may differ. The periodicity of bus/train schedules can
have an impact on the routes traveled. Incorporating the
Research Needs time-dependency of transportation networks can improve
This section presents several research needs in the area of the accuracy of the patterns.
spatiotemporal data mining and spatialtemporal net-
work mining. SUMMARY

SpatioTemporal Data Mining. Spatiotemporal (ST) In this chapter we presented the major research accom-
data mining aims to develop models and objective functions plishments and techniques that have emerged from the
and to discover patterns that are more suited to Spatio area of spatial databases in the past decade. These accom-
temporal databases and their unique properties (15). An plishments and techniques include spatial database mod-
extensive survey of Spatiotemporal databases, models, eling, spatial query processing, and spatial access methods.
languages, and access methods can be found in Ref. 152. We have also identified areas in which more research is
A bibliography of Spatiotemporal data mining can be needed, such as spatiotemporal databases, spatial data
found in Ref. 153. mining, and spatial networks.
Spatiotemporal pattern mining focuses on discovering Figure 15 provides a summary of topics that continue to
knowledge that frequently is located together in space and drive the research needs of spatial database systems.
time. Referances 154, 155, and 156 defined the problems of Increasingly available spatial data in the form of digitized
discovering mixed-drove and sustained emerging Spatio maps, remotely sensed images, Spatiotemporal data (for
temporal co-occurrence patterns and proposed interest example, from videos), and streaming data from sensors
measures and algorithms to mine such patterns. Other have to be managed and processed efficiently. New ways of
research needs include conflation, in which a single feature querying techniques to visualize spatial data in more than
is obtained from several sources or representations. The one dimension are needed. Several advances have been
goal is to determine the optimal or best representation made in computer hardware over the last few years, but
based on a set of rules. Problems tend to occur during many have yet to be fully exploited, including increases in
maintenance operations and cases of vertical obstruction. main memory, more effective storage using storage area
In several application domains, such as sensor net- networks, greater availability of multicore processors, and
works, mobile networks, moving object analysis, and image powerful graphic processors. A huge impetus for these
analysis, the need for spatiotemporal data mining is advances has been spatial data applications such as land
increasing drastically. It is vital to develop new models navigation systems and location-based services. To mea-
and techniques, to define new spatiotemporal patterns, sure the quality of spatial database systems, new bench-
and to formulize monotonic interest measures to mine these marks have to be established. Some benchmarks (159,160)
patterns (157). established earlier have become dated. Newer benchmarks
are needed to characterize the spatial data management
SpatioTemporal Network Mining. In the post-9/11 world needs of other systems and applications such as Spatio
of asymmetric warfare in urban area, many human activ- temporal databases, moving-objects databases, and loca-
ities are centered about ST infrastructure networks, such tion-based services.
18 SPATIAL DATABASES

9. R. Scally, GIS for Environmental Management. ESRI Press,


Applications
2006.
GIS
Location Based Services 10. L. Lang, Transportation GIS, ESRI Press, 1999.
Navigation
Cartography
11. P. Elliott, J. C. Wakefield, N. G. Best, and D. J. Briggs, Spatial
Spatial Analysis Epidemiology: Methods and Applications. Oxford University
Press, 2000.
12. M. R. Leipnik and D. P. Albert, GIS in Law Enforcement:
Implementation Issues and Case Studies, CRC, 2002.
Data In Data Out 13. D. K. Arctur and M. Zeiler, Designing Geodatabases, ESRI
Digitized maps Spatial 2D Maps
Press, 2004.
Sensors Database 3D Visualization 14. E. Beinat, A. Godfrind, and R. V. Kothuri, Pro Oracle Spatial,
Digital photos System Animation
Videos Apress, 2004.
Remotely sensed
imagery 15. SQL Server 2008 (Code-name Katmai). Available: http://
www.microsoft.com/sql/prodinfo/futureversion/
default.mspx, 2007.
16. Google Earth. Available: http://earth.google.com, 2006.
Platform
17. Microsoft Virtual Earth. Available: http://www.microsoft.
Internet
Dual Core Processors com/virtualearth, 2006.
Storage Area Networks
XML Database 18. PostGIS. Available: http://postgis.refractions.net/, 2007.
Stream Database
19. MySQL Spatial Extensions. Available: http://dev.mysql.com/
doc/refman/5.0/en/spatial-extensions.html, 2007.
20. Sky Server, 2007. Available: http://skyserver.sdss.org/.
21. D. Chamberlin, Using the New DB2: IBMs Object Relational
Figure 15. Topics driving future research needs in spatial data- System, Morgan Kaufmann, 1997.
base systems.
22. M. Stonebraker and D. Moore, Object Relational DBMSs: The
Next Great Wave. Morgan Kaufmann, 1997.
23. OGC. Available: http://www.opengeospatial.org/standards,
ACKNOWLEDGMENTS 2007.
24. P. Rigaux, M. Scholl, and A. Voisard, Spatial Databases: With
We thank the professional organizations that have funded Application to GIS, Morgan Kaufmann Series in Data Man-
the research on spatial databases, in particular, the agement Systems, 2000.
National Science Foundation, Army Research Laboratory, 25. R. H. Guting and M. Schneider, Moving Objects Databases
Topographic Engineering Center, Oak Ridge National (The Morgan Kaufmann Series in Data Management Sys-
Laboratory, Minnesota Department of Transportation, tems). San Francisco, CA: Morgan Kaufmann Publishers Inc.,
and Microsoft Corporation. We thank members of the 2005.
spatial database and spatial data mining research group 26. S. Shekhar and H. Xiong, Encyclopedia of GIS, Springer,
at the University of Minnesota for refining the content of 2008, forthcoming.
this chapter. We also thank Kim Koffolt for improving the 27. H. Samet, Foundations of Multidimensional and Metric Data
readability of this chapter. Structures, Morgan Kaufmann Publishers, 2006.
28. ACM Geographical Information Science Conference. Avail-
able: http://www.acm.org.
BIBLIOGRAPHY 29. ACM Special Interest Group on Management Of Data.
Available: http://www.sigmod.org/.
1. R. H. Guting, An introduction to spatial database systems, 30. Geographic Information Science Center Summer and Winter
VLDB Journal, Special Issue on Spatial Database Systems, Assembly. Available: http://www.gisc.berkeley.edu/.
3(4): 357399, 1994.
31. Geoinformatica. Available: http://www.springerlink.com/
2. W. Kim, J. Garza, and A. Kesin, Spatial data management in content/100268/.
database systems, in Advances in Spatial Databases, 3rd
32. IEEE International Conference on Data Engineering. Avail-
International Symposium, SSD93, Vol. 652. Springer, 1993.
able: http://www.icde2007.org/icde/.
3. Y. Manolopoulos, A. N. Papadopoulos, and M. G. Vassilako-
33. IEEE Transactions on Knowledge and Data Engineering
poulos, Spatial Databases: Technologies, Techniques and
(TKDE). Available: http://www.computer.org/tkde/.
Trends. Idea Group Publishing, 2004.
34. International Journal of Geographical Information Science.
4. S. Shekhar and S. Chawla, Spatial Databases: A Tour. Pre-
Available: http://www.tandf.co.uk/journals/tf/13658816.html.
ntice Hall, 2002.
35. International Symposium on Spatial and Temporal Data-
5. Wikipedia. Available: http://en.wikipedia.org/wiki/Spatial_
bases. Available: http://www.cs.ust.hk/ sstd07/.
Database, 2007.
36. Very Large Data Bases Conference. Available: http://
6. M. Worboys and M. Duckham, GIS: A Computing Perspective,
www.vldb2007.org/.
2nd ed. CRC, 2004.
37. UCGIS, 1998.
7. J. Schiller, Location-Based Services. Morgan Kaufmann,
2004. 38. S. Shekhar, R. R. Vatsavai, S. Chawla, and T. E. Burke,
Spatial Pictogram Enhanced Conceptual Data Models
8. A. Stefanidis and S. Nittel, GeoSensor Networks. CRC, 2004.
and Their Translations to Logical Data Models, Integrated
SPATIAL DATABASES 19

Spatial Databases: Digital Images and GIS, Lecture Notes in 60. C. Arens, J. Stoter, and P. Oosterom, Modeling 3D Spatial
Computer Science, 1737: 77104, 1999. Objects in a Geo-DBMS Using a 3D Primitive, Computers and
39. N. R. Adam and A. Gangopadhyay, Database Issues in Geo- Geosciences, 31(2): 165177, act 2005.
graphic Information Systems, Norwell, MA: Kluwer Aca- 61. E. Kohler, K. Langkau, and M. Skutella, Time-expanded
demic Publishers, 1997. graphs for flow-dependent transit times, in ESA 02: Proceed-
40. M. Stonebraker and G. Kemnitz, The Postgres Next Genera- ings of the 10th Annual European Symposium on Algorithms.
tion Database Management System, Commun. ACM, 34(10): London, UK: Springer-Verlag, 2002, pp. 599611.
7892, 1991. 62. B. George and S. Shekhar, Time-aggregated graphs for mod-
41. P. Bolstad, GIS Fundamentals: A First Text on Geographic eling spatiotemporal networks, in ER (Workshops), 2006,
Information Systems, 2nd ed. Eider Press, 2005. pp. 8599.,
42. T. Hadzilacos and N. Tryfona, An Extended Entity-Relation- 63. K. Eickhorst, P. Agouris, and A. Stefanidis, Modeling and
ship Model for Geographic Applications, ACM SIGMOD Comparing Spatiotemporal Events, in Proc. 2004 annual
Record, 26(3): 2429, 1997. national conference on Digital government research. Digital
43. S. Shekhar, R. R. Vatsavai, S. Chawla, and T. E. Burk, Spatial Government Research Center, 2004, pp. 110.
pictogram enhanced conceptual data models and their trans- 64. Geographic Markup Language. Available: http://www.open-
lation to logical data models, Lecture Notes in Computer gis.net/gml/, 2007.
Science, 1737: 77104, 2000. 65. S. Shekhar, R. R. Vatsavai, N. Sahay, T. E. Burk, and S. Lime,
44. F. T. Fonseca and M. J. Egenhofer, Ontology-driven geo- WMS and GML based Interoperable Web Mapping System, in
graphic information systems, in Claudia Bauzer Medeiros 9th ACM International Symposium on Advances in Geo-
(ed.), ACM-GIS 99, Proc. of the 7th International Symposium graphic Information Systems, ACMGIS01. ACM, November
on Advances in Geographic Information Systems, Kansas 2001.
City, US 1999, pp. 1419. ACM, 1999. 66. CityGML, 2007. Available: http://www.citygml.org/.
45. Time ontology in owl, Electronic, September 2005. 67. Keyhole Markup Language. Available: http://code.google.-
46. H. J. Berners-Lee, T. Lassila, and O. Lassila, The semantic com/apis/kml/documentation/, 2007.
web, The Scientific American, 2001, pp. 3443. 68. V. Gaede and O. Gunther, Multidimensional access methods,
47. M. J. Egenhofer, Toward the semantic geospatial web, Proc. ACM Computing Surveys, 30, 1998.
Tenth ACM International Symposium on Advances in Geo- 69. G. R. Hjaltason and H. Samet, Ranking in spatial data
graphic Information Systems, 2002. bases, in Symposium on Large Spatial Databases, 1995,
48. F. Fonseca and M. A. Rodriguez, From geo-pragmatics to pp. 8395.
derivation ontologies: New directions for the geospatial 70. N. Roussopoulos, S. Kelley, and F. Vincent, Nearest neighbor
semantic web, Transactions in GIS, 11(3), 2007. queries, in SIGMOD 95: Proc. 1995 ACM SIGMOD interna-
49. W3C. Resource Description Framework. Available: http:// tional conference on Management of data, New York: ACM
www.w3.org/RDF/,2004. Press, 1995, pp. 7179.
50. G. Subbiah, A. Alam, L. Khan, B. Thuraisingham, An inte- 71. D. Papadias, Y. Tao, K. Mouratidis, and C. K. Hui, Aggregate
grated platform for secure geospatial information exchange nearest neighbor queries in spatial databases, ACM Trans.
through the semantic web, Proc. ACM Workshop on Secure Database Systems, 30(2): 529576, 2005.
Web Services (SWS), 2006. 72. F. Korn and S. Muthukrishnan, Influence Sets Based on
51. Open Geospatial Consortium Inc. OpenGIS Reference Model. Reverse Nearest Neighbor Queries, in Proc. ACM Interna-
Available: http://orm.opengeospatial.org/, 2006. tional Conference on Management of Data, SIGMOD, 2000,
pp. 201212.
52. S. Shekhar and X. Liu, Direction as a Spatial Object: A
Summary of Results, in R. Laurini, K. Makki, and N. Pissi- 73. J. M. Kang, M. Mokbel, S. Shekhar, T. Xia, and D. Zhang,
nou, (eds.), ACM-GIS 98, Proc. 6th international symposium Continuous evaluation of monochromatic and bichromatic
on Advances in Geographic Information Systems. ACM, 1998, reverse nearest neighbors, in Proc. IEEE 23rd International
pp. 6975. Conference on Data Engineering (ICDE), 2007.
53. S. Skiadopoulos, C. Giannoukos, N. Sarkas, P. Vassiliadis, 74. I. Stanoi, D. Agrawal, and A. ElAbbadi, Reverse Nearest
T. Sellis, and M. Koubarakis, Computing and managing Neighbor Queries for Dynamic Databases, in ACM SIGMOD
cardinal direction relations, IEEE Trans. Knowledge and Workshop on Research Issues in Data Mining and Knowledge
Data Engineering, 17(12): 16101623, 2005. Discovery, 2000, pp. 4453.
54. A Spatiotemporal Model and Language for Moving Objects on 75. A. Nanopoulos, Y. Theodoridis, and Y. Manolopoulos, C2P:
Road Networks, 2001. Clustering based on Closest Pairs, in Proc. International
55. Modeling and querying moving objects in networks, volume Conference on Very Large Data Bases, VLDB, 2001, pp.
15, 2006. 331340.
56. Modeling and Querying Moving Objects, 1997. 76. T. Xia and D. Zhang, Continuous Reverse Nearest Neighbor
Monitoring, in Proc. International Conference on Data Engi-
57. On Moving Object Queries, 2002.
neering, ICDE, 2006.
58. K. K. L. Chan and C. D. Tomlin, Map Algebra as a Spatial
77. T. Brinkoff, H.-P. Kriegel, R. Schneider, and B. Seeger, Multi-
Language, in D. M. Mark and A. U. Frank, (eds.), Cognitive
step processing of spatial joins, In Proc. ACM International
and Linguistic Aspects of Geographic Space. Dordrecht, Conference on Management of Data, SIGMOD, 1994, pp. 197
Netherlands: Kluwer Academic Publishers, 1991, pp. 351 208.
360.
78. L. Arge, O. Procopiuc, S. Ramaswamy, T. Suel, and J.S.
59. W. Kainz, A. Riedl, and G. Elmes, eds, A Tetrahedronized
Vitter, Scalable sweeping-based spatial join, in Proc. Very
Irregular Network Based DBMS Approach for 3D Topo- Large Data Bases (VLDB), 1998, pp. 570581.
graphic Data, Springer Berlin Heidelberg, September 2006.
20 SPATIAL DATABASES

79. N. Mamoulis and D. Papadias, Slot index spatial join, IEEE 98. M. T. Fang, R. C. T. Lee, and C. C. Chang, The idea of
Trans. Knowledge and Data Engineering, 15(1): 211231, de-clustering and its applications, Proc. of the International
2003. Conference on Very Large Data Bases, 1986, pp. 181188.
80. M.-J. Lee, K.-Y. Whang, W.-S. Han, and I.-Y. Song, Trans- 99. D. R. Liu and S. Shekhar, A similarity graph-based approach
form-space view: Performing spatial join in the transform to declustering problem and its applications, Proc. of the
space using original-space indexes, IEEE Trans. Knowledge Eleventh International Conference on Data Engineering,
and Data Engineering, 18(2): 245260, 2006. IEEE, 1995.
81. S. Shekhar, C.-T. Lu, S. Chawla, and S. Ravada, Efficient join- 100. A. Belussi and C. Faloutsos. Estimating the selectivity of
index-based spatial-join processing: A clustering approach, in spatial queries using the correlation fractal dimension, in
IEEE Trans. Knowledge and Data Engineering, 14(6): 1400 Proc. 21st International Conference on Very Large Data
1421, 2002. Bases, VLDB, 1995, pp. 299310.
82. M. Zhu, D. Papadias, J. Zhang, and D. L. Lee, Top-k spatial 101. Y. Theodoridis, E. Stefanakis, and T. Sellis, Cost models for
joins, IEEE Trans. Knowledge and Data Engineering, 17(4): join queries in spatial databases, in Proceedings of the IEEE
567579, 2005. 14th International Conference on Data Engineering, 1998, pp.
83. H. Hu and D. L. Lee, Range nearest-neighbor query, IEEE 476483.
Trans. Knowledge and Data Engineering, 18(1): 7891, 2006. 102. M. Erwig, R. Hartmut Guting, M. Schneider, and M. Vazir-
84. M. L. Yiu, N. Mamoulis, and D. Papadias, Aggregate nearest giannis, Spatiotemporal data types: An approach to modeling
neighbor queries in road networks, IEEE Trans. Knowledge and querying moving objects in databases, GeoInformatica,
and Data Engineering, 17(6): 820833, 2005. 3(3): 269296, 1999.
85. J. van den Bercken and B. Seeger, An evaluation of generic 103. R. H. Girting, M. H. Bohlen, M. Erwig, C. S. Jensen, N. A.
bulk loading techniques, in VLDB 01: Proc. 27th Interna- Lorentzos, M. Schneider, and M. Vazirgiannis, A foundation
tional Conference on Very Large Data Bases. San Francisco, for representing and querying moving objects, ACM Transac-
CA: Morgan Kaufmann Publishers Inc., 2001, pp. 461470. tions on Database Systems, 25(1): 142, 2000.
86. A. Aggarwal, B. Chazelle, L. Guibas, C. ODunlaing, and C. 104. S. Borzsonyi, D. Kossmann, and K. Stocker, The skyline
Yap, Parallel computational geometry. Proc. 25th IEEE Sym- operator, In Proc. the International Conference on Data Engi-
posium on Foundations of Computer Science, 1985, pp. 468 neering, Heidelberg, Germany, 2001, pp. 421430.
477. 105. J. M. Hellerstein and M. Stonebraker, Predicate migration:
87. S. G. Akl and K. A. Lyons, Parallel Computational Geometry, Optimizing queries with expensive predicates, In Proc. ACM-
Englewood Cliffs, NJ: Prentice Hall, 1993. SIGMOD International Conference on Management of Data,
1993, pp. 267276.
88. R. Sridhar, S. S. Iyengar, and S. Rajanarayanan, Range
search in parallel using distributed data structures, Interna- 106. Y. Theodoridis and T. Sellis, A model for the prediction of
tional Conference on Databases, Parallel Architectures, and r-tree performance, in Proceedings of the 15th ACM Sympo-
Their Applications, 1990, pp. 1419. sium on Principles of Database Systems PODS Symposium,
ACM, 1996, pp. 161171.
89. M. P. Armstrong, C. E. Pavlik, and R. Marciano, Experiments
in the measurement of spatial association using a parallel 107. T. Asano, D. Ranjan, T. Roos, E. Wiezl, and P. Widmayer,
supercomputer, Geographical Systems, 1: 267288, 1994. Space-filling curves and their use in the design of geometric
90. G. Brunetti, A. Clematis, B. Falcidieno, A. Sanguineti, and M. data structures, Theoretical Computer Science, 181(1): 315,
Spagnuolo, Parallel processing of spatial data for terrain July 1997.
characterization, Proc. ACM Geographic Information Sys- 108. S. Shekhar and D.R. Liu, A connectivity-clustered access
tems, 1994. method for networks and network computation, IEEE Trans.
91. W. R. Franklin, C. Narayanaswami, M. Kankanahalli, D. Knowledge and Data Engineering, 9(1): 102119, 1997.
Sun, M. Zhou, and P. Y. F. Wu, Uniform grids: A technique 109. J. Lee, Y. Lee, K. Whang, and I. Song, A physical database
for intersection detection on serial and parallel machines, design method for multidimensional file organization, Infor-
Proc. 9th Automated Cartography, 1989, pp. 100109. mation Sciences, 120(1): 3165(35), November 1997.
92. E. G. Hoel and H. Samet, Data Parallel RTree Algorithms, 110. J. Nievergelt, H. Hinterberger, and K. C. Sevcik, The grid file:
Proc. International Conference on Parallel Processing, 1993. An adaptable, symmetric multikey file structure, ACM
93. E. G. Hoel and H. Samet, Performance of dataparallel spatial Trancsactions on Database Systems, 9(1): 3871, 1984.
operations, Proc. of the 20th International Conference on Very 111. M. Ouksel, The interpolation-based grid file, Proc. of Fourth
Large Data Bases, 1994, pp. 156167. ACM SIGACT-SIGMOD Symposium on Principles of Data-
94. V. Kumar, A. Grama, and V. N. Rao, Scalable load balancing base Systems, 1985, pp. 2027.
techniques for parallel computers, J. Parallel and Distributed 112. K. Y. Whang and R. Krishnamurthy, Multilevel grid files,
Computing, 22(1): 6069, July 1994. IBM Research Laboratory Yorktown, Heights, NY, 1985.
95. F. Wang, A parallel intersection algorithm for vector polygon 113. A. Guttman, R-trees: A Dynamic Index Structure for Spatial
overlay, IEEE Computer Graphics and Applications, 13(2): Searching, Proc. of SIGMOD International Conference on
7481, 1993. Management of Data, 1984, pp. 4757.
96. Y. Zhou, S. Shekhar, and M. Coyle, Disk allocation methods 114. T. Sellis, N. Roussopoulos, and C. Faloutsos, The R+-tree: A
for parallelizing grid files, Proc. of the Tenth International dynamic index for multidimensional objects, Proc. 13th Inter-
Conference on Data Engineering, IEEE, 1994, pp. 243 national Conference on Very Large Data Bases, September
252. 1987, pp. 507518.
97. S. Shekhar, S. Ravada, V. Kumar, D. Chubband, and G. 115. N. Beckmann, H.-P. Kriegel, R. Schneider, and B. Seeger, The
Turner, Declustering and load-balancing methods for paral- R-tree: An Efficient and Robust Access Method for Points and
lelizing spatial databases, IEEE Trans. Knowledge and Data Rectangles, Proc. ACM SIGMOD International Conference on
Engineering, 10(4): 632655, 1998. Management of Data, 1990, pp. 322331.
SPATIAL DATABASES 21

116. Y. Theodoridis, M. Vazirgiannis, and T. Sellis, Spatiotem- 135. D.A. Griffith, Advanced Spatial Statistics. Kluwer Academic
poral indexing for large multimedia applications, Interna- Publishers, 1998.
tional Conference on Multimedia Computing and Systems, 136. J. LeSage, Spatial Econometrics. Available: http://www.spa-
1996, pp. 441448. tial-econometrics.com/, 1998.
117. S. Saltenis and C.S. Jensen, R-tree based indexing of general 137. S. Shekhar, P. Schrater, R. Raju, and W. Wu, Spatial con-
Spatiotemporal data, Technical Report TR-45 and Choro- textual classification and prediction models for mining geos-
chronos CH-99-18, TimeCenter, 1999. patial data, IEEE Trans. Multimedia, 4(2): 174188, 2002.
118. M. Vazirgiannis, Y. Theodoridis, and T. Sellis, Spatiotem- 138. L. Anselin, Spatial Econometrics: methods and models, Dor-
poral composition and indexing large multimedia applica- drecht, Netherlands: Kluwer, 1988.
tions, Multimedia Systems, 6(4): 284298, 1998.
139. S.Z. Li, A Markov Random Field Modeling, Computer Vision.
119. M. Nascimiento, R. Jefferson, J. Silva, and Y. Theodoridis, Springer Verlag, 1995.
Evaluation of access structures for discretely moving points, 140. S. Shekhar et al. Spatial Contextual Classification and Pre-
Proc. International Workshop on Spatiotemporal Database
diction Models for Mining Geospatial Data, IEEE Transac-
Management, 1999, pp. 171188. tion on Multimedia, 4(2), 2002.
120. S. Saltenis, C. S. Jensen, S. T. Leutenegger, and M. A. Lopez, 141. N. A. Cressie, Statistics for Spatial Data (revised edition).
Indexing the positions of continuously moving objects, in New York: Wiley, 1993.
SIGMOD Conference, 2000, pp. 331342.
142. J. Han, M. Kamber, and A. Tung, Spatial Clustering Methods
121. Y. Tao, D. Papadias, and J. Sun, The TPR-Tree: An Opti-
in Data Mining: A Survey, Geographic Data Mining and
mized Spatiotemporal Access Method for Predictive Knowledge Discovery. Taylor and Francis, 2001.
Queries, in VLDB, 2003, pp. 790801.
143. V. Barnett and T. Lewis, Outliers in Statistical Data, 3rd ed.
122. M. F. Mokbel, T. M. Ghanem, and W. G. Aref, Spatio-temporal New York: John Wiley, 1994.
access methods, IEEE Data Engineering Bulletin, 26(2): 40
49, 2003. 144. A. Luc, Local Indicators of Spatial Association: LISA, Geo-
graphical Analysis, 27(2): 93115, 1995.
123. R. A. Finkel and J. L. Bentley, Quad trees: A data structure for
145. S. Shekhar, C.-T. Lu, and P. Zhang, A unified approach to
retrieval on composite keys, Acta Informatica, 4:19, 1974.
detecting spatial outliers, GeoInformatica, 7(2), 2003.
124. T. Tzouramanis, M. Vassilakopoulos, and Y. Manolopoulos,
Overlapping linear quadtrees: A Spatiotemporal access 146. C.-T. Lu, D. Chen, and Y. Kou, Algorithms for Spatial Outlier
method, ACM-Geographic Information Systems, 1998, pp. Detection, IEEE International Conference on Data Mining,
17. 2003.
147. R. Agrawal and R. Srikant, Fast algorithms for mining asso-
125. Y. Manolopoulos, E. Nardelli, A. Papadopoulos, and G.
Proietti, MOF-Tree: A Spatial Access Method to Manipulate ciation rules, in J. B. Bocca, M. Jarke, and C. Zaniolo (eds.),
Multiple Overlapping Features, Information Systems, 22(9): Proc. 20th Int. Conf. Very Large Data Bases, VLDB, Morgan
465481, 1997. Kaufmann, 1994, pp. 487499.
148. Y. Morimoto, Mining Frequent Neighboring Class Sets in
126. J. M. Hellerstein, J. F. Naughton, and A. Pfeffer, Generalized
Spatial Databases, in Proc. ACM SIGKDD International
Search Trees for Database System, Proc. 21th International
Conference on Very Large Database Systems, September 11 Conference on Knowledge Discovery and Data Mining, 2001.
15 1995. 149. S. Shekhar and Y. Huang, Co-location Rules Mining: A Sum-
127. W. G. Aref and I. F. Ilyas. SP-GiST: An Extensible Database mary of Results, Proc. Symposium on Spatial and Spatio
temporal Databases, 2001.
Index for Supporting Space Partitioning Trees, J. Intell. Inf.
Sys., 17(23): 215240, 2001. 150. Y. Huang, S. Shekhar, and H. Xiong, Discovering Co-location
128. M. Kornacker and D. Banks, High-Concurrency Locking in Patterns from Spatial Datasets: A General Approach, IEEE
R-Trees, 1995. Trans. Knowledge and Data Engineering, 16(12): 14721485,
December 2005.
129. M. Kornacker, C. Mohan, and Joseph M. Hellerstein, Con-
151. J. F. Roddick and B. G. Lees, Paradigms for spatial and
currency and recovery in generalized search trees, in SIG-
MOD 97: Proc. 1997 ACM SIGMOD international Spatiotemporal data mining. Taylor and Frances, 2001.
conference on Management of data. New York, ACM Press, 152. M. Koubarakis, T. K. Sellis, A. U. Frank, S. Grumbach,
1997, pp. 6272. R. Hartmut Guting, C. S. Jensen, N. A. Lorentzos, Y. Man-
olopoulos, E. Nardelli, B. Pernici, H.-J. Schek, M. Scholl, B.
130. S. Shekhar, P. Zhang, Y. Huang, and R. R. Vatsavai, Spatial
data mining, in Hillol Kargupta and A. Joshi, (eds.), Book Theodoulidis, and N. Tryfona, eds, Spatiotemporal Data-
Chapter in Data Mining: Next Generation Challenges and bases: The CHOROCHRONOS Approach, Vol. 2520 of Lec-
ture Notes in Computer Science. Springer, 2003.
Future Directions.
153. J. F. Roddick, K. Hornsby, and M. Spiliopoulou, An updated
131. N. A. C. Cressie, Statistics for Spatial Data. New York: Wiley-
Interscience, 1993. bibliography of temporal, spatial, and Spatiotemporal data
mining research, Proc. First International Workshop on Tem-
132. R. Haining, Spatial Data Analysis : Theory and Practice,
poral, Spatial and Spatiotemporal Data Mining, 2001, pp.
Cambridge University Press, 2003. 147164.
133. Y. Jhung and P. H. Swain, Bayesian Contextual Classifica- 154. M. Celik, S. Shekhar, J. P. Rogers, and J. A. Shine, Sustained
tion Based on Modified M-Estimates and Markov Random emerging Spatiotemporal co-occurrence pattern mining: A
Fields, IEEE Trans. Pattern Analysis and Machine Intelli-
summary of results, 18th IEEE International Conference on
gence, 34(1): 6775, 1996. Tools with Artificial Intelligence, 2006, pp. 106115.
134. A. H. Solberg, T. Taxt, and A. K. Jain, A Markov Random Field 155. M. Celik, S. Shekhar, J. P. Rogers, J. A. Shine, and J. S. Yoo,
Model for Classification of Multisource Satellite Imagery, Mixed-drove Spatiotemporal co-occurrence pattern mining:
IEEE Trans. Geoscience and Remote Sensing, 34(1): 100
A summary of results, Sixth International Conference on Data
113, 1996. Mining, IEEE, 2006, pp. 119128.
22 SPATIAL DATABASES

156. M. Celik, S. Shekhar, J. P. Rogers, J. A. Shine, and J. M. Kang, Jajodia (eds.), Proc. 1993 ACM SIGMOD International Con-
Mining at most top-k mixed-drove Spatiotemporal co-occur- ference on Management of Data. ACM Press, 1993. pp. 211.
rence patterns: A summary of results, in Proc. of the Workshop 160. J. M. Patel, J.-B. Yu, N. Kabra, K. Tufte, B. Nag, J. Burger, N.
on Spatiotemporal Data Mining (In conjunction with ICDE E. Hall, K. Ramasamy, R. Lueder, C. Ellmann, J. Kupsch, S.
2007), 2008, forthcoming. Guo, D. J. DeWitt, and J. F. Naughton, Building a scaleable
157. J. F. Roddick, E. Hoel, M. J. Egenhofer, D. Papadias, and B. geo-spatial dbms: Technology, implementation, and evalua-
Salzberg, Spatial, temporal and Spatiotemporal databases - tion, in ACM SIGMOD Conference, 1997, pp. 336347.
hot issues and directions for phd research, SIGMOD record,
33(2), 2004.
158. O. Schabenberger and C. A. Gotway, Statistical Methods for VIJAY GANDHI
Spatial Data Analysis. Chapman & Hall/CRC, 2004. JAMES M. KANG
159. M. Stonebraker, J. Frew, K. Gardels, and J. Meredith, The SHASHI SHEKHAR
Sequoia 2000 Benchmark, in Peter Buneman and Sushil University of Minnesota
Minneapolis, Minnesota
S
STATISTICAL DATABASES 1990s, renewed interest accussed in the statistical
community and the discipline was developed even more
INTRODUCTION under the names of statistical disclosure control in Europe
and statistical disclosure limitation in America. Subse-
Statistical databases are databases that contain statistical quent evolution has resulted in at least three clearly differ-
information. Such databases normally are released by entiated subdisciplines:
national statistical institutes, but on occasion they can
also be released by health-care authorities (epidemiology)  Tabular data protection. The goal here is to publish
or by private organizations (e.g., consumer surveys). Sta- static aggregate information, i.e., tables, in such a way
tistical databases typically come in three formats: that no confidential information on specific individuals
among those to which the table refers can be inferred.
 Tabular data, that is, tables with counts or magni- See Ref. 6 for a conceptual survey.
tudes, which are the classic output of official statistics.  Queryable databases. The aggregate information
 Queryable databases, that is, online databases to obtained by a user as a result of successive queries
which the user can submit statistical queries (sums, should not allow him to infer information on specific
averages, etc.). individuals. Since the late 1970s, this has been
 Microdata, that is, files in which each record contains known to be a difficult problem, which is subject
information on an individual (a citizen or a company). to the tracker attack (4,7). SDC strategies here
include perturbation, query restriction, and camou-
The peculiarity of statistical databases is that they flage (providing interval answers rather than exact
should provide useful statistical information, but they answers).
should not reveal private information on the individuals  Microdata protection. It is only recently that data
to whom they refer (respondents). Indeed, supplying data to collectors (statistical agencies and the like) have
national statistical institutes is compulsory in most coun- been persuaded to publish microdata. Therefore, micro-
tries, but in return those institutes commit to preserving data protection is the youngest subdiscipline, and it has
the privacy of respondents. Inference control in statistical experienced continuous evolution in the last few years.
databases, also known as statistical disclosure control Its purpose is to mask the original microdata so that the
(SDC), is a discipline that seeks to protect data in statistical masked microdata still are useful analytically but can-
databases so that they can be published without revealing not be linked to the original respondents.
confidential information that can be linked to specific indi-
viduals among those to when the data correspond. SDC is
applied to protect respondent privacy in areas such as Several areas of application of SDC techniques exist,
official statistics, health statistics, and e-commerce (shar- which include but are not limited to the following:
ing of consumer data). Because data protection ultimately
means data modification, the challenge for SDC is to
 Official statistics. Most countries have legislation that
achieve protection with minimum loss of accuracy sought compels national statistical agencies to guarantee
by database users. statistical confidentiality when they release data col-
In Ref. 1, a distinction is made between SDC and other lected from citizens or companies. It justifies the
technologies for database privacy, like privacy-preserving research on SDC undertaken by several countries,
data mining (PPDM) or private information retrieval among them the European Union (e.g., the CASC
(PIR): What makes the difference between those technol- project) and the United States.
ogies is whose privacy they seek. Although SDC is aimed  Health information. This area is one of the most sen-
at respondent privacy, the primary goal of PPDM is to sitive regarding privacy. For example, in the United
protect owner privacy when several database owners wish States, the Privacy Rule of the Health Insurance
to cooperate in joint analyses across their databases with- Portability and Accountability Act (HIPAA) requires
out giving away their original data to each other. On its the strict regulation of protected health information
side, the primary goal of PIR is user privacy, that is, to for use in medical research. In most Western countries,
allow the user of a database to retrieve some information the situation is similar.
item without the database exactly knowing which item  E-commerce. Electronic commerce results in the
was recovered. automated collection of large amounts of consumer
The literature on SDC started in the 1970s, with the data. This wealth of information is very useful to
seminal contribution by Dalenius (2) in the statistical companies, which are often interested in sharing
community and the works by Schlorer (3) and Denning it with their subsidiaries or partners. Such consumer
et al. (4) in the database community. The 1980s saw information transfer should not result in public
moderate activity in this field. An excellent survey of the profiling of individuals and is subject to strict
state of the art at the end of the 1980s is in Ref. 5. In the regulation.
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 STATISTICAL DATABASES

THEORY Methods for Tabular Data


Despite tables that display aggregate information, a risk of
Formal Definition of Data Formats
disclosure exists in tabular data release. Several attacks
A microdata file X with s respondents and t attributes is an are conceivable:
s  t matrix, where Xij is the value of attribute j for respon-
dent i. Attributes can be numerical (e.g., age or salary) or  External attack. For example, let a frequency table
categorical (e.g., gender or job). Job  Town be released where a single respondent
The attributes in a microdata set can be classified in four exists for job Ji and town Tj. Then if a magnitude table
categories that are not necessarily disjoint: is released with the average salary for each job type
and each town, the exact salary of the only respondent
 Identifiers. These attributes unambiguously identify with job Ji working in town Tj is disclosed publicly.
the respondent. Examples are the passport number,  Internal attack. Even if two respondents for job Ji and
social security number, and name-surname. town Tj exist, the salary of each of them is disclosed to
 Quasi-identifiers or key attributes. These attributes each other.
identify the respondent with some degree of ambigu-  Dominance attack. If one (or a few) respondents dom-
ity. (Nonetheless, a combination of key attributes may inate in the contribution to a cell of a magnitude table,
provide unambiguous identification.) Examples are the dominant respondent(s) can upper-bound the con-
address, gender, age, and telephone number. tributions of the rest (e.g., if the table displays the total
 Confidential outcome attributes. These attributes con- salary for each job type and town and one individual
tain sensitive information on the respondent. Exam- contributes 90% of that salary, he knows that his
ples are salary, religion, political affiliation, and health colleagues in the town are not doing very well).
condition.
 Nonconfidential outcome attributes. Other attributes SDC methods for tables fall into two classes: nonpertur-
contain nonsensitive information on the respondent. bative and perturbative. Nonperturbative methods do not
modify the values in the tables; the best known method in
From microdata, tabular data can be generated by cross- this class is cell suppression (CS). Perturbative methods
ing one or more categorical attributes. Formally, a table is a output a table with some modified values; well-known
function methods in this class include controlled rounding (CR)
and the recent controlled tabular adjustment (CTA).
The idea of CS is to suppress those cells that are identified
T : DXi1  DXi2  :::  DXil ! R or N as sensitive, i.e., from which the above attacks can extract
sensitive information, by the so-called sensitivity rules (e.g.,
the dominance rule, which identifies a cell as sensitive if it is
where l  t is the number of crossed categorical attributes vulnerable to a dominance attack). Sensitive cells are the
and D(Xij) is the domain where attribute Xij takes its primary suppressions. Then additional suppressions (sec-
values. ondary suppressions) are performed to prevent primary
Two kinds of tables exist: frequency tables that display suppressions from being computed or even inferred within
the count of respondents at the crossing of the categorical a prescribed protection interval using the row and column
attributes (in N) and magnitude tables that display infor- constraints (marginal row and column totals). Usually, one
mation on a numeric attribute at the crossing of the attempts to minimize either the number of secondary sup-
categorical attributes (in R). For example, given some pressions or their pooled magnitude, which results in com-
census microdata containing attributes Job and plex optimization problems. Most optimization methods
Town, one can generate a frequency table that displays used are heuristic, based on mixed integer linear program-
the count of respondents doing each job type in each town. ming or network flows (8), and most of them are implemen-
If the census microdata also contain the Salary attri- ted in the t-Argus free software package (9). CR rounds
bute, one can generate a magnitude table that displays the values in the table to multiples of a rounding base, which
average salary for each job type in each town. The number may entail rounding the marginal totals as well. On its side,
n of cells in a table is normally much less than the number CTA modifies the values in the table to prevent the inference
s of respondent records in a microdata file. However, of values of sensitive cells within a prescribed protection
tables must satisfy several linear constraints: marginal interval. The idea of CTA is to find the closest table to the
row and column totals. Additionally, a set of tables is original one that ensures such a protection for all sensitive
called linked if they share some of the crossed categorical cells. It requires optimization methods, which are typically
attributes: For example, Job  Town is linked to based on mixed linear integer programming. Usually CTA
Job  Gender. entails less information loss than does CS.

Overview of Methods Methods for Queryable Databases


Statistical disclosure control will be first reviewed for tab- In SDC of queryable databases, three main approaches
ular data, then for queryable databases, and finally for exist to protect a confidential vector of numeric data
microdata. from disclosure through answers to user queries:
STATISTICAL DATABASES 3

 Data perturbation. Perturbing the data is a simple  Nonperturbative. Nonperturbative methods do not
and effective approach whenever the users do not alter data; rather, they produce partial suppressions
require deterministically correct answers to queries or reductions of detail in the original dataset. Sam-
that are functions of the confidential vector. Pertur- pling, global recoding, top and bottom coding, and local
bation can be applied to the records on which queries suppression are examples of nonperturbative masking
are computed (input perturbation) or to the query methods.
result after computing it on the original data (output
perturbation). Perturbation methods can be found in Although a reasonable overview of the methods for
Refs. 1012. protecting tables or queryable databases has been given
 Query restriction. This approach is right if the user above, microdata protection methods are more diverse, so
does require deterministically correct answers and that a description of some of them is needed.
these answers have to be exact (i.e., a number).
Because exact answers to queries provide the user Some Microdata Protection Methods
with very powerful information, it may become neces-
sary to refuse to answer certain queries at some stage Additive Noise. Additive noise is a family of perturbative
to avoid disclosure of a confidential datum. several masking methods. The noise additions algorithms in the
criteria decide whether a query can be answered; literature are as follows:
one of them is query set size control, that is, to refuse
answers to queries that affect a set of records that is too  Masking by uncorrelated noise addition. The vector of
small. An example of the query restriction approach observations xj for the jth attribute of the original
can be found in Ref. 13. dataset Xj is replaced by a vector
 Camouflage. If deterministically correct, nonexact
zj xj ej
answers (i.e., small-interval answers) suffice, confi-
dentiality via camouflage [CVC, (14)] is a good option.
With this approach, unlimited answers to any con- where ej is a vector of normally distributed errors drawn
ceivable query types are allowed. The idea of CVC is to from a random variable e j  N0; s2e j , such that
camouflage the confidential vector a by making it Covet ; el 0 for all t 6 l. This algorithm neither pre-
part of the relative interior of a compact set P of serve variances nor correlations.
vectors. Then each query q f(a) is answered with  Masking by correlated noise addition. Correlated noise
an inverval [q, q] that contains [f , f ], where f  addition also preserves means and additionally allows
and f are, respectively, the minimum and the max- preservation of correlation coefficients. The difference
imum of f over P. with the previous method is that the covariance matrix
of the errors is now proportional to the covariance
matrix of the original data, i.e., e  N0; Se , where
Methods for Microdata Se aS, with S being the covariance matrix of the
original data.
Microdata protection methods can generate the protected
microdata set X0
 Masking by noise addition and linear transformation.
In Ref. 15, a method is proposed that ensures by
 Either by masking original data, i.e., generating X0 a additional transformations that the sample covar-
modified version of the original microdata set X. iance matrix of the masked attributes is an unbiased
estimator for the covariance matrix of the original
 Or by generating synthetic data X0 that preserve some
attributes.
statistical properties of the original data X.
 Masking by noise addition and nonlinear transforma-
Masking methods can in turn be divided in two cate- tion. Combining simple additive noise and nonlinear
gories depending on their effect on the original data (6): transformation has also been proposed in such a way
that application to discrete attributes is possible and
 Perturbative. The microdata set is distorted before univariate distributions are preserved. Unfortunately,
publication. In this way, unique combinations of the application of this method is very time-consuming
scores in the original dataset may disappear, and and requires expert knowledge on the dataset and the
new, unique combinations may appear in the per- algorithm. See Ref. 8 for more details.
turbed dataset; such confusion is beneficial for pre-
serving statistical confidentiality. The perturbation In practice, only simple noise addition (two first var-
method used should be such that statistics computed iants) or noise addition with linear transformation are
on the perturbed dataset do not differ significantly used. When using linear transformations, a decision has
from the statistics that would be obtained on the to be made whether to reveal them to the data user to allow
original dataset. Noise addition, microaggregation, for bias adjustment in the case of subpopulations.
data/rank swapping, microdata rounding, resam- In general, additive noise is not suitable to protect
pling, and PRAM are examples of perturbative mask- categorical data. On the other hand, it is well suited for
ing methods (see Ref. 8 for details). continuous data for the following reasons:
4 STATISTICAL DATABASES

 It makes no assumptions on the range of possible 3. Form two groups around xr and xs, respectively. One
values for Xi (which may be infinite). group contains xr and the k  1 records closest to xr.
 The noise being added typically is continuous and with The other group contains xs and the k  1 records
mean zero, which suits well continuous original data. closest to xs.
4. If at least 3k records do not belong to any of the two
Microaggregation. Microaggregation is a family of SDC groups formed in Step 3, go to Step 1, taking as a new
techniques for continous microdata. The rationale behind dataset the previous dataset minus the groups
microaggregation is that confidentiality rules in use allow formed in the last instance of Step 3.
publication of microdata sets if records correspond to 5. If between 3k  1 and 2k records do not belong to any
groups of k or more individuals, where no individual dom- of the two groups formed in Step 3: a) compute the
inates (i.e., contributes too much to) the group and k is a average record x of the remaining records, b) find the
threshold value. Strict application of such confidentiality most distant record xr from x, c) form a group contain-
rules leads to replacing individual values with values com- ing xr and the k  1 records closest to xr, and d) form
puted on small aggregates (microaggregates) before pub- another group containing the rest of records. Exit the
lication. It is the basic principle of microaggregation. Algorithm.
To obtain microaggregates in a microdata set with n 6. If less than 2k records do not belong to the groups
records, these are combined to form g groups of size at least formed in Step 3, form a new group with those records
k. For each attribute, the average value over each group is and exit the Algorithm.
computed and is used to replace each of the original aver-
aged values. Groups are formed using a criterion of max- The above algorithm can be applied independently to
imal similarity. Once the procedure has been completed, each group of attributes that results from partitioning
the resulting (modified) records can be published. the set of attributes in the dataset.
The optimal k-partition (from the information loss point
of view) is defined to be the one that maximizes within- Data Swapping and Rank Swapping. Data swapping ori-
group homogeneity; the higher the within-group homoge- ginally was presented as a perturbative SDC method for
neity, the lower the information loss, because microaggre- databases that contain only categorical attributes. The
gation replaces values in a group by the group centroid. The basic idea behind the method is to transform a database
sum of squares criterion is common to measure homogene- by exchanging values of confidential attributes among
ity in clustering. The within-groups sum of squares SSE is individual records. Records are exchanged in such a way
defined as that low-order frequency counts or marginals are main-
tained.
g X
X ni Even though the original procedure was not used often
SSE xi j xi 0 xi j xi in practice, its basic idea had a clear influence in subse-
i1 j1 quent methods. A variant of data swapping for microdata is
rank swapping, which will be described next in some detail.
The lower the SSE, the higher the within-group homo- Although originally described only for ordinal attributes
geneity. Thus, in terms of sums of squares, the optimal k- (25), rank swapping can also be used for any numeric
partition is the one that minimizes SSE. attribute. First, values of an attribute Xi are ranked in
Given a microdata set that consists of p attributes, these ascending order; then each ranked value of Xi is swapped
can be microaggregated together or partitioned into several with another ranked value randomly chosen within a
groups of attributes. Also, the way to form groups may vary. restricted range (e.g., the rank of two swapped values
Several taxonomies are possible to classify the microaggre- cannot differ by more than p% of the total number of
gation algorithms in the literature: (1) fixed group size records, where p is an input parameter). This algorithm
(1618) versus variable group size (1921), (2) exact opti- independently is used on each original attribute in the
mal [only for the univariate case, (22)] versus heuristic original dataset.
microaggregation (the rest of the microaggregation litera- It is reasonable to expect that multivariate statistics
ture), and (3) categorical (18,23) versus continuous (the rest computed from data swapped with this algorithm will be
of references cited in this paragraph). less distorted than those computed after an unconstrained
To illustrate, we next give a heuristic algorithm called swap.
the MDAV [maximum distance to average vector, (18,24)]
for multivariate fixed-group-size microaggregation on Pram. The post-randomization method [PRAM, (26)] is
unprojected continuous data. We designed and implemen- a probabilistic, perturbative method for disclosure protec-
ted MDAV for the m-Argus package (17). tion of categorical attributes in microdata files. In the
masked file, the scores on some categorical attributes
1. Compute the average record x of all records in the for certain records in the original file are changed to a
dataset. Consider the most distant record xr to the different score according to a prescribed probability
average record x (using the squared Euclidean dis- mechanism, namely a Markov matrix called the PRAM
tance). matrix. The Markov approach makes PRAM very general
2. Find the most distant record xs from the record xr because it encompasses noise addition, data suppression,
considered in the previous step. and data recoding.
STATISTICAL DATABASES 5

Because the PRAM matrix must contain a row for each Local Suppression. This approach is a nonperturbative
possible value of each attribute to be protected, PRAM masking method in which certain values of individual
cannot be used for continuous data. attributes are suppressed with the aim of increasing the
set of records agreeing on a combination of key values. Ways
Sampling. This approach is a nonperturbative masking to combine local suppression and global recoding are imple-
method. Instead of publishing the original microdata mented in the m-Argus SDC package (17).
file, what is published is a sample S of the original set of If a continuous attribute Xi is part of a set of key
records (6). attributes, then each combination of key values probably
Sampling methods are suitable for categorical micro- is unique. Because it does not make sense to suppress
data, but for continuous microdata they probably should be systematically the values of Xi, we conclude that local
combined with other masking methods. The reason is that suppression is oriented to categorical attributes.
sampling alone leaves a continuous attribute Xi unper-
turbed for all records in S. Thus, if attribute Xi is present Synthetic Microdata Generation. Publication of
in an external administrative public file, unique matches synthetic i.e.,simulated data was proposed long ago
with the published sample are very likely: Indeed, given as a way to guard against statistical disclosure. The idea is
a continuous attribute Xi and two respondents o1 and o2, to generate data randomly with the constraint that certain
it is highly unlikely that Xi will take the same value for both statistics or internal relationships of the original dataset
o1 and o2 unless o1 o2 (this is true even if Xi has been should be preserved.
truncated to represent it digitally). More than ten years ago, Rubin suggested in Ref. 27 to
If, for a continuous identifying attribute, the score of a create an entirely synthetic dataset based on the original
respondent is only approximately known by an attacker, it survey data and multiple imputation. A simulation study of
might still make sense to use sampling methods to protect this approach was given in Ref. 28.
that attribute. However, assumptions on restricted We next sketch the operation of the original proposal by
attacker resources are perilous and may prove definitely Rubin. Consider an original microdata set X of size n
too optimistic if good-quality external administrative files records drawn from a much larger population of N indivi-
are at hand. duals, where are background attributes A, nonconfidential
attributes B, and confidential attributes C exist. Back-
ground attributes are observed and available for all N
Global Recoding. This approach is a nonperturbative
individuals in the population, whereas B and C are only
masking method, also known sometimes as generalization.
available for the n records in the sample X. The first step is
For a categorical attribute Xi, several categories are com-
to construct from X a multiply-imputed population of N
bined to form new (less specific) categories, which thus
individuals. This population consists of the n records in X
result in a new Xi0 with jDXi0 j < jDXi j, where j  j is the
and M (the number of multiple imputations, typically
cardinality operator. For a continuous attribute, global
between 3 and 10) matrices of (B, C) data for the N  n
recoding means replacing Xi by another attribute Xi0 ; which
nonsampled individuals. The variability in the imputed
is a discretized version of Xi. In other words, a potentially
values ensures, theoretically, that valid inferences can
infinite range D(Xi) is mapped onto a finite range DXi0 .
be obtained on the multiplyimputed population. A model
This technique is used in the m-Argus SDC package (17).
for predicting (B, C) from A is used to multiply-impute (B, C)
This technique is more appropriate for categorical
in the population. The choice of the model is a nontrivial
microdata, where it helps disguise records with strange
matter. Once the multiply-imputed population is available,
combinations of categorical attributes. Global recoding is
a sample Z of n0 records can be drawn from it whose
used heavily by statistical offices.
structure looks like the one a sample of n0 records drawn
from the original population. This process can be done M
Example. If a record exist with Marital status times to create M replicates of (B, C) values. The result are
Widow/er and Age 17, global recoding could be applied M multiply-imputed synthetic datasets. To make sure no
to Marital status to create a broader category Widow/er or original data are in the synthetic datasets, it is wise to draw
divorced so that the probability of the above record being the samples from the multiply-imputed population exclud-
unique would diminish. & ing the n original records from it.
Global recoding can also be used on a continuous attri- Synthetic data are appealing in that, at a first glance,
bute, but the inherent discretization leads very often to an they seem to circumvent the reidentification problem:
unaffordable loss of information. Also, arithmetical opera- Because published records are invented and do not derive
tions that were straightforward on the original Xi are no from any original record, it might be concluded that no
longer easy or intuitive on the discretized Xi0 . individual can complain from having been reidentified. At
a closer look this advantage is less clear. If, by chance, a
Top and Bottom Coding. Top and bottom coding are published synthetic record matches a particular citizens
special cases of global recoding that can be used on attri- nonconfidential attributes (age, marital status, place of
butes that can be ranked, that is, continuous or categorical residence, etc.) and confidential attributes (salary, mort-
ordinal. The idea is that top values (those above a certain gage, etc.), reidentification using the nonconfidential
threshold) are lumped together to form a new category. The attributes is easy and that citizen may feel that his con-
same is done for bottom values (those below a certain fidential attributes have been unduly revealed. In that
threshold). See Ref. 17. case, the citizen is unlikely to be happy with or even
6 STATISTICAL DATABASES

understand the explanation that the record was generated data uses into account. As imprecise as they may be, the
synthetically. above definitions suggest some possible measures:
On the other hand, limited data utility is another pro-
blem of synthetic data. Only the statistical properties  Compare raw records in the original and the protected
explicitly captured by the model used by the data protector dataset. The more similar the SDC method to the
are preserved. A logical question at this point is why not identity function, the less the impact (but the higher
directly publish the statistics one wants to preserve rather the disclosure risk!). This process requires pairing
than release a synthetic microdata set. records in the original dataset and records in the
One possible justification for synthetic microdata would protected dataset. For masking methods, each record
be whether valid analyses could be obtained on several in the protected dataset is paired naturally to the record
subdomains; i.e., similar results were obtained in several in the original dataset from which it originates. For
subsets of the original dataset and the corresponding sub- synthetic protected datasets, pairing is less obvious.
sets of the synthetic dataset. Partially synthetic or hybrid  Compare some statistics computed on the original and
microdata are more likely to succeed in staying useful for the protected datasets. The above definitions list some
subdomain analysis. However, when using partially syn- statistics that should be preserved as much as possible
thetic or hybrid microdata, we lose the attractive feature of by an SDC method.
purely synthetic data that the number of records in the
protected (synthetic) dataset is independent from the num- A strict evaluation of information loss must be based on
ber of records in the original dataset. the data uses to be supported by the protected data. The
greater the differences between the results obtained on
EVALUATION original and protected data for those uses, the higher the
loss of information. However, very often microdata protec-
Evaluation of SDC methods must be carried out in terms of tion cannot be performed in a data use-specific manner, for
data utility and disclosure risk. the following reasons:

Measuring Data Utility  Potential data uses are very diverse, and it may be
even hard to identify them all at the moment of data
Defining what a generic utility loss measure is can be a release by the data protector.
tricky issue. Roughly speaking, such a definition should  Even if all data uses could be identified, releasing
capture the amount of information loss for a reasonable
several versions of the same original dataset so that
range of data uses.
the ith version has an information loss optimized for
We will attempt a definition on the data with maximum
the ith data use may result in unexpected disclosure.
granularity, that is, microdata. Similar definitions apply to
rounded tabular data; for tables with cell suppressions,
Because that data often must be protected with no
utility normally is measured as the reciprocal of the num-
specific data use in mind, generic information loss measures
ber of suppressed cells or their pooled magnitude. As to
are desirable to guide the data protector in assessing how
queryable databases, they can be viewed logically as tables
much harm is being inflicted to the data by a particular SDC
as far as data utility is concerned: A denied query answer is
technique.
equivalent to a cell suppression, and a perturbed answer is
Information loss measures for numeric data. Assume a
equivalent to a perturbed cell.
microdata set with n individuals (records) I1, I2, . . ., In and p
We will say little information loss occurs if the protected
continuous attributes Z1, Z2, . . ., Zp. Let X be the matrix that
dataset is analytically valid and interesting according to
represents the original microdata set (rows are records and
the following definitions by Winkler (29):
columns are attributes). Let X0 be the matrix that represents
the protected microdata set. The following tools are useful to
 A protected microdata set is analytically valid if it
characterize the information contained in the dataset:
approximately preserves the following with respect
to the original data (some conditions apply only to  Covariance matrices V (on X) and V0 (on X0 ).
continuous attributes):
 Correlation matrices R and R0 .
 Correlation matrices RF and RF0 between the p attri-
1. Means and covariances on a small set of subdomains
butes and the p factors PC1, . . ., PCp obtained through
(subsets of records and/or attributes)
principal components analysis.
2. Marginal values for a few tabulations of the data  Communality between each p attribute and the first
3. At least one distributional characteristic principal component PC1 (or other principal compo-
nents PCis). Communality is the percent of each
attribute that is explained by PC1 (or PCi). Let C be
A microdata set is interesting analytically if six
the vector of communalities for X and C0 be the
attributes on important subdomains are provided
corresponding vector for X0 .
that can be validly analyzed.
More precise conditions of analytical validity and ana-  Factor score coefficient matrices F and F0 . Matrix F
lytical interest cannot be stated without taking specific contains the factors that should multiply each attri-
STATISTICAL DATABASES 7

Mean square error Mean absolute error Mean variation


P p Pn 0 2
P p Pn
j1 i1 xi j xi j j1 i1 jxi j  x0i j j P p Pn jxi j  x0i j j
X  X0 j1 i1
np np jxi j j
np
Pp P jvi j  v0i j j
Pp P 0 2
Pp P
j1 1i j vi j vi j j1 jvi j  v0i j j
1i j
j1 1i j
jvi j j
V  V0
p p 1 p p 1 p p 1
2 2 2
Pp P jri j  r0i j j
Pp P 0 2
Pp P 0 1i < j
1i < j ri j  ri j 1i < j jri j  ri j j
j1
j1 j1 jri j j
R  R0
p p  1 p p  1 p p  1
2 2 2
Pp P p jr fi j  r fi0j j
Pp Pp Pp Pp wj
j1 wj i1 r fi j r fi0j 2 j1 wj i1 jr fi j r fi0j j j1 i1
jr fi j j
RF  RF0
p2 p2 p2
P p jci c0i j
Pp Pp
i1 ci  c0i 2 i1 jci  c0i j i1
jci j
C  C0
p p p
Pp P p j fi j  fi0j j
Pp Pp Pp Pp
 fi0j 2 j fi j  fi0j j j1 w j
wj i1 fi j wj i1
j1 j1 i1 j fi j j
F  F0
p2 p2 p2

bute in X to obtain its projection on each principal also be sensible to use them to compare only the variances
component. F0 is the corresponding matrix for X0 . of the attributes, i.e., to compare the diagonals of the
covariance matrices rather than the whole matrices
A single quantitative measure does not seen to reflect (call this variant S  S0 ).
completely those structural differences. Therefore, we
proposed in Refs. 30 and 31 to measure information loss Information loss measures for categorical data. These
through the discrepancies between matrices X, V, R, RF, C, measures can be based on a direct comparison of categorical
and F obtained on the original data and the corresponding values and a comparison of contingency tables on Shannons
X0 , V0 , R0 , RF0 , C0 , and F0 obtained on the protected dataset. entropy. See Ref. 30 for more details.
In particular, discrepancy between correlations is related Bounded information loss measures. The information
to the information loss for data uses such as regressions and loss measures discussed above are unbounded, (i.e., they
cross tabulations. do not take values in a predefined interval) On the other
Matrix discrepancy can be measured in at least three hand, as discussed below, disclosure risk measures are
ways: bounded naturally (the risk of disclosure is bounded natu-
rally between 0 and 1). Defining bounded information loss
Mean square error. Sum of squared component-wise measures may be convenient to enable the data protector to
differences between pairs of matrices, divided by the trade off information loss against disclosure risk. In Ref. 32,
number of cells in either matrix. probabilistic information loss measures bounded between 0
Mean absolute error. Sum of absolute component- and 1 are proposed for continuous data.
wise differences between pairs of matrices, divided
by the number of cells in either matrix. Measuring Disclosure Risk
Mean variation. Sum of absolute percent variation of In the context of statistical disclosure control, disclosure
components in the matrix computed on protected risk can be defined as the risk that a user or an intruder
data with respect to components in the matrix com- can use the protected dataset X0 to derive confidential
puted on original data, divided by the number of cells information on an individual among those in the original
in either matrix. This approach has the advantage of dataset X.
not being affected by scale changes of attributes. Disclosure risk can be regarded from two different
perspectives:
The following table summarizes the measures proposed
in the above references. In this table, p is the number of 1. Attribute disclosure. This approach to disclosure is
attributes, n is the number of records, and the components defined as follows. Disclosure takes place when an
of matrices are represented by the corresponding lower- attribute of an individual can be determined more
case letters (e.g., xij is a component of matrix X). Regarding accurately with access to the released statistic than it
X  X0 measures, it also makes sense to compute those on is possible without access to that statistic.
the averages of attributes rather than on all data (call this 2. Identity disclosure. Attribute disclosure does not
0
variant X  X ). Similarly, for V  V0 measures, it would imply a disclosure of the identity of any individual.
8 STATISTICAL DATABASES

Identity disclosure takes place when a record in the illustrate how a score can be constructed, we next describe
protected dataset can be linked with a respondents the particular score used in Ref. 30.
identity. Two main approaches usually are employed
for measuring identity disclosure risk: uniqueness Example. Let X and X0 be matrices that represent origi-
and reidentification. nal and protected datasets, respectively, where all attri-
butes are numeric. Let V and R be the covariance matrix
2.1 Uniqueness. Roughly speaking, the risk of and the correlation matrix of X, respectively; let X be the
identity disclosure is measured as the probabil- vector of attribute averages
0 for X, and let S be the diagonal
ity that rare combinations of attribute values in of V. Define V0 , R0 , X , and S0 analogously from X0 . The
the released protected data are indeed rare in Information Loss (IL) is computed
0 by averaging the mean
the original population from which the data variations of X  X0 , X  X , V  V0 , S  S0 , and the mean
come. This approach is used typically with non- absolute error of R  R0 and by multiplying the resulting
perturbative statistical disclosure control meth- average by 100. Thus, we obtain the following expression
ods and, more specifically, with sampling. The for information loss:
reason that uniqueness is not used with pertur- 0 1 0
P p Pn jxi j  x0i j j P p jn j  x j j
bative methods is that when protected attribute B j1 i1 j1
values are perturbed versions of original attri- 100B jxi j j jn 1 j j
IL B
B
5 @ np p
bute values, it does not make sense to investi-
gate the probability that a rare combination of
protected values is rare in the original dataset, Pp P jvi j  v0i j j Pp jv j j  v0j j j
because that combination is most probably not j1 1i j j1
jvi j j jv j j j
found in the original dataset.
p p 1 p
2.2 Reidentification. This empirical approach
2 1
evaluates the risk of disclosure. In this case,
record linkage software is constructed to esti- Pp P C
j1  r0i j jC
1i j jri j
mate the number of reidentifications that might C
p p  1 C
be obtained by a specialized intruder. Reidenti- A
fication through record linkage provides a more 2
unified approach than do uniqueness methods
because the former can be applied to any kind of The expression of the overall score is obtained by com-
masking and not just to nonperturbative mask- bining information loss and information risk as follows:
ing. Moreover, reidentification can also be
applied to synthetic data.
IL 0:5DLD0:5PLDID
2
Score
Trading off Information Loss and Disclosure Risk 2

The mission of SDC to modify data in such a way that Here, DLD (distance linkage disclosure risk) is the percen-
sufficient protection is provided at minimum information tage of correctly linked records using distance-based record
loss suggests that a good SDC method is one achieving a linkage (30), PLD (probabilistic linkage record disclosure
good tradeoff between disclosure risk and information risk) is the percentage of correctly linked records using
loss. Several approaches have been proposed to handle probabilistic linkage (33), ID (interval disclosure) is the
this tradeoff. We discuss SDC scores, R-U maps, and k- percentage of original records falling in the intervals
anonymity. around their corresponding masked values, and IL is the
information loss measure defined above.
Score Construction. Following this idea, Domingo-
Ferrer and Torra (30) proposed a score for method perfor- Based on the above score, Domingo-Ferrer and Torra
mance rating based on the average of information loss and (30) found that, for the benchmark datasets and the intru-
disclosure risk measures. For each method M and para- ders external information they used, two good performers
meterization P, the following score is computed: among the set of methods and parameterizations they tried
were as follows: (1) rankswapping with parameter p around
ILX; X0 DR0 X; X0 15 (see the description above) and (2) multivariate micro-
ScoreX; X0
2 aggregation on unprojected data taking groups of three
attributes at a time (Algorithm MDAV above with parti-
where IL is an information loss measure, DR is a disclosure tioning of the set of attributes). &
risk measure, and X0 is the protected dataset obtained after Using a score permits regarding the selection of a mask-
applying method M with parameterization P to an original ing method and its parameters as an optimization problem.
dataset X. A masking method can be applied to the original data file,
In Ref. 30, IL and DR were computed using a weighted and then a postmasking optimization procedure can be
combination of several information loss and disclosure risk applied to decrease the score obtained.
measures. With the resulting score, a ranking of masking On the negative side, no specific score weighting can do
methods (and their parameterizations) was obtained. To justice to all methods. Thus, when ranking methods, the
STATISTICAL DATABASES 9

values of all measures of information loss and disclosure was started in Europe in 2006 under the CENEX SDC
risk should be supplied along with the overall score. project sponsored by Eurostat.
 Devising disclosure risk assessment procedures that
R-U maps. A tool that may be enlightening when trying are as universally applicable as record linkage while
to construct a score or, to more generally, to optimize the being less greedy in computational terms.
tradeoff between information loss and disclosure risk is a  Identifying, for each domain of application, which are
graphical representation of pairs of measures (disclosure the external data sources that intruders typically can
risk, information loss) or their equivalents (disclosure risk, access to attempt reidentification. This capability
data utility). Such maps are called R-U confidentiality would help data protectors to figure out in more rea-
maps (34). Here, R stands for disclosure risk and U stands listic terms which are the disclosure scenarios they
for data utility. In its most basic form, an R-U confidenti- should protect data against.
ality map is the set of paired values (R,U), of disclosure risk  Creating one or several benchmarks to assess the
and data utility that correspond to various strategies for
performance of SDC methods. Benchmark creation
data release (e.g., variations on a parameter). Such (R,U)
currently is hampered by the confidentiality of the
pairs typically are plotted in a two-dimensional graph, so
original datasets to be protected. Data protectors
that the user can grasp easily the influence of a particular
should agree on a collection of nonconfidential, origi-
method and/or parameter choice.
nal-looking datasets (financial datasets, population
datasets, etc.), which can be used by anybody to com-
k-Anonymity. A different approach to facing the conflict pare the performance of SDC methods. The benchmark
between information loss and disclosure risk is suggested should also incorporate state-of-the-art disclosure risk
by Samarati and Sweeney (35). A protected dataset is said assessment methods, which requires continuous
to satisfy k-anonymity for k > 1 if, for each combination of update and maintenance.
key attribute values (e.g., address, age, and gender), at
least k records exist in the dataset sharing that combina- Other issues exist whose solution seems less likely in the
tion. Now if, for a given k, k-anonymity is assumed to be near future, because of the very nature of SDC methods. If
enough protection, one can concentrate on minimizing an intruder knows the SDC algorithm used to create a
information loss with the only constraint that k-anonymity protected data set, he can mount algorithm-specific reiden-
should be satisfied. This method is a clean way of solving the tification attacks that can disclose more confidential infor-
tension between data protection and data utility. Because mation than conventional data mining attacks. Keeping
k-anonymity usually is achieved via generalization secret the SDC algorithm used would seem a solution, but
(equivalent to global recoding, as said above) and local in many cases, the protected dataset gives some clues on the
suppression, minimizing information loss usually trans- SDC algorithm used to produce it. Such is the case for a
lates to reducing the number and/or the magnitude of rounded, microaggregated, or partially suppressed micro-
suppressions. data set. Thus, it is unclear to what extent the SDC algo-
k-Anonymity bears some resemblance to the underlying rithm used can be kept secret.
principle of multivariate microaggregation and is a useful
concept because key attributes usually are categorical or
can be categorized, [i.e., they take values in a finite (and CROSS-REFERENCES
ideally reduced) range] However, reidentification is not
based on necessarily categorical key attributes: Sometimes, statistical disclosure control. See Statistical Databases.
numeric outcome attributes, which are continuous and statistical disclosure limitation. See Statistical Data-
often cannot be categorized, give enough clues for reiden- bases.
tification. Microaggregation was suggested in Ref. 18 as a inference control. See Statistical Databases.
possible way to achieve k-anonymity for numeric, ordinal,
privacy in statistical databases. See Statistical Data-
and nominal attributes: The idea is to use multivariate
bases.
microaggregation on the key attributes of the dataset.

Future BIBLIOGRAPHY
Many open issues in SDC exist, some of which hopefully can
be solved with additional research and some of which are 1. J. Domingo-Ferrer, A three-dimensional conceptual frame-
work for database privacy, in Secure Data Management-4th
likely to stay open because of the inherent nature of SDC.
VLDB Workshop SDM2007, Lecture Notes in Computer
We first list some of the issues that probably could and
Science, vol. 4721. Berlin: Springer-Verlag, 2007, pp. 193202.
should be settled in the near future:
2. T. Dalenius, The invasion of privacy problem and statistics
production. An overview, Statistik Tidskrift, 12: 213225, 1974.
 Identifying a comprehensive listing of data uses (e.g.,
3. J. Schlorer, Identification and retrieval of personal records
regression models, and association rules) that would
from a statistical data bank. Methods Inform. Med., 14 (1):
allow the definition of data use-specific information 713, 1975.
loss measures broadly accepted by the community;
4. D. E. Denning, P. J. Denning, and M. D. Schwartz, The
those new measures could complement and/or replace tracker: a threat to statistical database security, ACM Trans.
the generic measures currently used. Work in this line Database Syst., 4 (1): 7696, 1979.
10 STATISTICAL DATABASES

5. N. R. Adam and J. C. Wortmann, Security-control for statistical 23. V. Torra, Microaggregation for categorical variables: a median
databases: a comparative study, ACM Comput. Surv., 21 (4): based approach, in Privacy in Statistical Databases-PSD 2004,
515556, 1989. Lecture Notes in Computer Science, vol. 3050. Berlin: Springer-
6. L. Willenborg and T. DeWaal, Elements of Statistical Disclo- Verlag, 2004, pp. 162174.
sure Control, New York: Springer-Verlag, 2001. 24. J. Domingo-Ferrer, A. Martnez-Balleste, J. M. Mateo-Sanz,
7. J. Schlorer, Disclosure from statistical databases: quantitative and F. Sebe, Efficient multivariate data-oriented microaggre-
aspects of trackers, ACM Trans. Database Syst., 5: 467492, gation, VLDB Journal, 15: 355369, 2006.
1980. 25. B. Greenberg, Rank swapping for ordinal data, 1987, Washing-
8. A. Hundepool, J. Domingo-Ferrer, L. Franconi, S. Giessing, ton, DC: U. S. Bureau of the Census (unpublished manuscript).
R. Lenz, J. Longhurst, E. Schulte-Nordholt, G. Seri, and P.-P. 26. J. M. Gouweleeuw, P. Kooiman, L. C. R. J. Willenborg, and P.-
DeWolf, Handbook on Statistical Disclosure Control (version P. DeWolf, Post randomisation for statistical disclosure con-
1.0). Eurostat (CENEX SDC Project Deliverable), 2006. trol: theory and implementation, 1997. Research Paper no.
Available: http://neon.vb.cbs.nl/CENEX/. 9731. Voorburg: Statistics Netherlands.
9. A. Hundepool, A. van deWetering, R. Ramaswamy, P.-P. 27. D. B. Rubin, Discussion of statistical disclosure limitation, J.
deWolf, S. Giessing, M. Fischetti, J.-J. Salazar, J. Castro, Official Stat., 9 (2): 461468, 1993.
and P. Lowthian, t-ARGUS v. 3.2 Software and Users Manual, 28. J. P. Reiter, Satisfying disclosure restrictions with synthetic
CENEX SDC Project Deliverable, 2007. Available: http:// data sets, J. Official Stat., 18 (4): 531544, 2002.
neon.vb.cbs.nl/casc/TAU.html.
29. W. E. Winkler, Re-identification methods for evaluating the
10. G. T. Duncan and S. Mukherjee, Optimal disclosure limitation confidentiality of analytically valid microdata, Rese. in Offi-
strategy in statistical databases: deterring tracker attacks cial Stat., 1 (2): 5069, 1998.
through additive noise, J. Am. Statist. Assoc., 45: 720729, 30. J. Domingo-Ferrer and V. Torra, A quantitative comparison of
2000.
disclosure control methods for microdata, in P. Doyle, J. I.
11. K. Muralidhar, D. Batra, and P. J. Kirs, Accessibility, security Lane, J. J. M. Theeuwes, and L. Zayatz (eds.), Confidentiality,
and accuracy in statistical databases: the case for the multi- Disclosure and Data Access: Theory and Practical Applications
plicative fixed data perturbation approach, Management Sci., for Statistical Agencies, Amsterdam: North-Holland, 2001, pp.
41: 15491564, 1995. 111134.
12. J. F. Traub, Y. Yemini, and H. Wozniakowski, The statistical 31. F. Sebe, J. Domingo-Ferrer, J. M. Mateo-Sanz, and V. Torra,
security of a statistical database, ACM Trans. Database Syst., Post-masking optimization of the tradeoff between information
9: 672679, 1984. loss and disclosure risk in masked microdata sets, in Inference
13. F. Y. Chin and G. Ozsoyoglu, Auditing and inference control in Control in Statistical Databases, Lecture Notes in Computer
statistical databases, IEEE Trans. Software Engin., SE-8: Science, vol. 2316. Springer-Verlag, 2002, pp. 163171.
574582, 1982. 32. J. M. Mateo-Sanz, J. Domingo-Ferrer, and F. Sebe, Probabil-
14. R. Gopal, R. Garfinkel, and P. Goes, Confidentiality via camou- istic information loss measures in confidentiality protection
flage: The CVC approach to disclosure limitation when answer- of continuous microdata.
ing queries to databases, Operations Res., 50: 501516, 2002. 33. I. P. Fellegi and A. B. Sunter, A theory for record linkage,
15. J. J. Kim, A method for limiting disclosure in microdata based on J. Am. Stat. Associat., 64 (328): 11831210, 1969.
random noise and transformation, Proceedings of the Section on 34. G. T. Duncan, S. E. Fienberg, R. Krishnan, R. Padman, and S.
Survey Research Methods, Alexandria, VA, 1986, pp. 303308. F. Roehrig, Disclosure limitation methods and information loss
16. D. Defays and P. Nanopoulos, Panels of enterprises and for tabular data, in P. Doyle, J. I. Lane, J. J. Theeuwes, and L.
confidentiality: the small aggregates method, Proc. of 92 Sym- V. Zayatz (eds.), Confidentiality, Disclosure and Data Access:
posium on Design and Analysis of Longitudinal Surveys, Theory and Practical Applications for Statistical Agencies,
Ottawa: 1993, pp. 195204. Statistics Canada, Amsterdam: North-Holland, 2001, pp. 135166.
17. A. Hundepool, A. Van deWetering, R. Ramaswamy, L. Fran- 35. P. Samarati and L. Sweeney, Protecting privacy when disclos-
coni, A. Capobianchi, P.-P. DeWolf, J. Domingo-Ferrer, V. ing information: k-anonymity and its enforcement through
Torra, R. Brand, and S. Giessing, m-ARGUS version 4.0 Soft- generalization and suppression, Technical Report, SRI Inter-
ware and Users Manual, Statistics Netherlands, Voorburg NL, national, 1998.
2005. Available: http://neon.vb.cbs.nl/casc.
18. J. Domingo-Ferrer and V. Torra, Ordinal, continuous and
heterogenerous k-anonymity through microaggregation, FURTHER READING
Data Mining Knowl. Discov., 11 (2): 195212, 2005.
19. J. Domingo-Ferrer and J. M. Mateo-Sanz, Practical data- A. Hundepool, J. Domingo-Ferrer, L. Franconi, S. Giessing, R.
oriented microaggregation for statistical disclosure control, Lenz, J. Longhurst, E. Schulte-Nordholt, G. Seri, and P.-P. DeWolf,
IEEE Trans. Knowledge Data Engin., 14 (1): 189201, 2002. Handbook on Statistical Disclosure Control (version 1.0), Eurostat
(CENEX SDC Project Deliverable), 2006. Available: http://
20. M. Laszlo and S. Mukherjee, Minimum spanning tree parti-
neon.vb.cbs.nl/CENEX/.
tioning algorithm for microaggregation, IEEE Trans. Knowl-
edge Data Engineer., 17 (7): 902911, 2005. L. Willenborg and T. DeWaal, Elements of Statistical Disclosure
Control, New York: Springer-Verlag, 2001.
21. J. Domingo-Ferrer, F. Sebe, and A. Solanas, A polynomial-time
approximation to optimal multivariate microaggregation,
Computers Mathemat. Applicat., In press.
JOSEP DOMINGO-FERRER
22. S. L. Hansen and S. Mukherjee, A polynomial algorithm for Rovira i Virgili University
optimal univariate microaggregation, IEEE Trans. Knowl. Tarragona, Catalonia, Spain
Data Engineer., 15 (4): 10431044, 2003.
S
SYSTEM MONITORING occurs, or how long an I/O operation takes. For hardware
circuits, one may need to know how often a cache element is
The term system refers to a computer system that is com- replaced, or whether a network wire is busy.
posed of hardware and software for data processing. System Monitoring can use either event-driven or sampling
monitoring collects information about the behavior of a techniques (3). Event-driven monitoring is based on obser-
computer system while the system is running. What is of ving changes of system state, either in software programs
interest here is run-time information that cannot be or hardware circuits, that are caused by events of interest,
obtained by static analysis of programs. All collected infor- such as the transition of the CPU from busy to idle. It is
mation is essentially about system correctness or perfor- often implemented as special instructions for interrupt
mance. Such information is vital for understanding how a intercept that are inserted into the system to be monitored.
system works. It can be used for dynamic safety checking Sampling monitoring is based on probing at selected time
and failure detection, program testing and debugging, intervals, into either software programs or hardware cir-
dynamic task scheduling and resource allocation, per- cuits, to obtain data of interest, such as what kinds of
formance evaluation and tuning, system selection and processes occupy the CPU. It is often implemented as timer
design, and so on. interrupts during which the state is recorded. Note that the
behavior of the system under a given workload can be
simulated by a simulation tool. Thus monitoring that
COMPONENTS AND TECHNIQUES FOR SYSTEM
should be performed on the real system may be carried
MONITORING
out on the simulation tool. Monitoring simulation tools is
useful, or necessary, for understanding the behavior of
System monitoring has three components. First, the jobs to
models of systems still under design.
be run and the items to be measured are determined. Then,
Monitoring can be implemented using software, hard-
the system to be monitored is modified to run the jobs and
ware, or both (1,35). Software monitors are programs that
take the measurements. This is the major component.
are inserted into the system to be monitored. They are
Monitoring is accomplished in two operations: triggering
triggered upon appropriate interrupts or by executing
and recording (1). Triggering, also called activation, is the
the inserted code. Data are recorded in buffers in the
observation and detection of specified events during system
working memory of the monitored system and, when neces-
execution. Recording is the collection and storage of data
sary, written to secondary storage. Hardware monitors are
pertinent to those events. Finally, the recorded data are
electronic devices that are connected to specific system
analyzed and displayed.
points. They are triggered upon detecting signals of inter-
The selection and characterization of the jobs to be run
est. Data are recorded in separate memory independent of
for monitoring is important, because it is the basis for
the monitored system. Hybrid monitors combine techni-
interpreting the monitoring results and guaranteeing
ques from software and hardware. Often, the triggering is
that the experiments are repeatable. A collection of jobs
carried out using software, and the data recording is carried
to be run is called a test workload (24); for performance
out using hardware.
monitoring, this refers mainly to the load rather than the
The data collected by a monitor must be analyzed and
work, or job. A workload can be real or synthetic. A real
workload consists of jobs that are actually performed by the displayed. Based on the way in which results are analyzed
users of the system to be monitored. A synthetic workload, and displayed, a monitor is classified as an on-line monitor
usually called a benchmark, consists of batch programs or or a batch monitor. On-line monitors analyze and display
the collected data in real-time, either continuously or at
interactive scripts that are designed to represent the actual
jobs of interest. Whether a workload is real or synthetic frequent intervals, while the system is still being moni-
does not affect the monitoring techniques. tored. This is also called continuous monitoring (6). Batch
Items to be measured are determined by the applica- monitors collect data first and analyze and display them
tions. They can be about the entire system or about differ- later using a batch program. In either case, the analyzed
ent levels of the system, from user-level application data can be presented using many kinds of graphic charts,
programs to operating systems to low-level hardware cir- as well as text and tables.
cuits. For the entire system, one may need to know whether
jobs are completed normally and performance indices such ISSUES IN SYSTEM MONITORING
as job completion time, called turnaround time in batch
systems and response time in interactive systems, or the Major issues of concern in monitoring are at what levels we
number of jobs completed per unit of time, called through- can obtain information of interest, what modifications to
put (3). For application programs, one may be interested in the system are needed to perform the monitoring, the
how often a piece of code is executed, whether a variable is disturbance of such modifications to the system behavior,
read between two updates, or how many messages are sent and the cost of implementing such modifications. There are
by a process. For operating systems, one may need to know also special concerns for monitoring real-time systems,
whether the CPU is busy at certain times, how often paging parallel architectures, and distributed systems.
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 SYSTEM MONITORING

Activities and data structures visible to the user process scheduling, cache behavior, and shared memory behavior.
can be monitored at the application-program level. These For distributed systems, monitoring must take into account
include function and procedure calls and returns, assign- ordering of distributed events, message passing, synchro-
ments to variables, loopings and branchings, inputs and nization, as well as various kinds of failures.
outputs, as well as synchronizations. Activities and data
structures visible to the kernel can be monitored at the
MONITORING PRINCIPLES
operating-system level; these include system state transi-
tions, external interrupts, system calls, as well as data
A set of principles is necessary to address all the issues
structures such as process control blocks. At the hardware
involved in monitoring. The major task is to determine the
level, various patterns of signals on the buses can be
monitoring techniques needed based on the applications
monitored. Obviously, certain high-level information can-
and the trade-offs. Methods and tools that facilitate mon-
not be obtained by monitoring at a lower level, and vice
itoring are also needed.
versa. It is worth noting that more often high-level infor-
Consider the major task. Given the desired information,
mation can be used to infer low-level information if one
one first needs to determine all levels that can be monitored
knows enough about all the involved components, such as
to obtain the information. For each possibility, one deter-
the compilers, but the converse is not true, simply because
mines all modifications of the system that are needed to
more often multiple high-level activities are mapped to the
perform the monitoring. Then one needs to assess the
same low-level activity.
perturbation that the monitoring could cause. Finally,
In general, the software and hardware of a system are
one must estimate the cost of the implementations. Clearly,
not purposely designed to be monitored. This often restricts
unacceptable perturbation or cost helps reduce the possi-
what can be monitored in a system. To overcome these
bilities. Then, one needs to evaluate all possibilities based
restrictions, modifications to the system, called instrumen-
on the following trade-offs.
tation, are often required, for example, inserting interrupt
First, monitoring at a higher level generally requires
instructions or attaching hardware devices. The informa-
less modification to the system and has smaller implemen-
tion obtainable with a monitor and the cost of measure-
tation cost, but it may have larger interference with the
ments determine the measurability of a computer system
system behavior. Thus one principle is to monitor at the
(3,7). At one extreme, every system component can be
highest level whose interference is acceptable. This implies
monitored at the desired level of detail, while at the other
that, if a software monitor has acceptable interference, one
extreme, only the external behavior of the system as a
should avoid using a hardware monitor. Furthermore, to
whole can be monitored. When a low degree of detail is
reduce implementation cost, for a system being designed or
required, a macroscopic analysis, which requires measure-
that is difficult to measure, one can use simulation tools
ment of global indices such as turnaround time and
instead of the real system if credibility can be established.
response time, is sufficient. When a high degree of detail
Second, macroscopic analysis generally causes less per-
is needed, a microscopic analysis, which requires, say, the
turbation to the system behavior than microscopic analysis,
time of executing each instruction or loading each indivi-
and it often requires less modification to the system and has
dual page, must be performed.
smaller cost. Therefore, a second principle is to use macro-
Monitoring often interferes with the system behavior,
scopic analysis instead of microscopic analysis if possible.
since it may consume system resources, due to the time of
While sampling is a statistical technique that records data
performing monitoring activities and the space of storing
only at sampled times, event detection is usually used to
collected data, which are collectively called the overhead of
record all potentially interesting events and construct the
monitoring. A major issue in monitoring is to reduce the
execution trace. Thus one should avoid using tracing if the
perturbation. It is easy to see that a macroscopic analysis
desired information can be obtained by sampling.
incurs less interference than a microscopic analysis.
Additionally, one should consider workload selection
Usually, sampling monitoring causes less interference
and data analysis. Using benchmarks instead of real work-
than event-driven monitoring. In terms of implementation,
load makes the experiments repeatable and facilitates
software monitors always interfere and sometimes inter-
comparison of monitoring results. It can also reduce the
fere greatly with the system to be monitored, but hardware
cost, since running real jobs could be expensive or impos-
monitors cause little or no interference.
sible. Thus using benchmarks is preferred, but a number of
Implementing monitoring usually has a cost, since it
common mistakes need to be carefully avoided (4). Data
requires modification to the system to be monitored. There-
analysis involves a separate trade-off: the on-line method
fore, an important concern is to reduce the cost. Software
adds time overhead but can reduce the space overhead.
monitors are simply programs, so they are usually less
Thus even when monitoring results do not need to be
costly to develop and easier to change. In contrast, hard-
presented in an on-line fashion, on-line analysis can be
ware monitors require separate hardware devices and thus
used to reduce the space overhead and, when needed,
are usually more difficult to build and modify.
separate processors can be used to reduce also the time
Finally, special methods and techniques are necessary
overhead.
for monitoring real-time systems, parallel architectures,
Finally, special applications determine special monitor-
and distributed systems. Real-time systems have real-time
ing principles. For example, for monitoring real-time sys-
constraints, so interference becomes much more critical.
tems, perturbation is usually not tolerable, but a full trace
For parallel architectures, monitoring needs to handle
is often needed to understand system behavior. To address
issues arising from interprocessor communication and
SYSTEM MONITORING 3

this problem, one may perform microscopic monitoring Instruction mixes, each specifying various instructions
based on event detection and implement monitoring in together with their usage frequencies, were used when
hardware so as to sense signals on buses at high speed the varieties of instructions grew. Then, when pipelining,
and with low overhead. If monitoring results are needed in instruction caching, and address translation mechanisms
an on-line fashion, separate resources for data analysis made computer instruction times highly variable, kernels,
must be used. Of course, all these come at a cost. which are higher-level functions, such as matrix inver-
To facilitate monitoring, one needs methods and tools for sion and Ackermanns function, which represent services
instrumenting the system, efficient data structures and provided by the processor, came into use. Later on, as input
algorithms for storing and manipulating data, and tech- and output became an important part of real workload,
niques for relating monitoring results to the source synthetic programs, which are composed of exerciser
program to identify problematic code sections. Instrumen- loops that make a specified number of service calls or I/O
tation of programs can be done via program transformation, requests, came into use. For domain-specific kinds of
by augmenting the source code, the target code, the run- applications, such as banking or airline reservation, appli-
time environment, the operating system, or the hardware. cation benchmarks, representative subsets of the functions
Often, combinations of these techniques are used. Efficient in the application that make use of all resources in the
data structures and algorithms are needed to handle system, are used. Kernels, synthetic programs, and appli-
records of various execution information, by organizing cation benchmarks are all called benchmarks. Popular
them in certain forms of tables and linked structures. benchmarks include the sieve kernel, the LINPACK
They are critical for reducing monitoring overhead. Addi- benchmarks, the debitcredit benchmark, and the SPEC
tional information from the compiler and other involved benchmark suite (4).
components can be used to relate monitoring results with Consider monitoring the functional behavior of a sys-
points in source programs. Monitoring results can also help tem. For general testing, the test suite should have com-
select candidate jobs for further monitoring. plete coverage, that is, all components of the system should
In summary, a number of trade-offs are involved in be exercised. For debugging, one needs to select jobs that
determining the monitoring techniques adopted for a par- isolate the problematic parts. This normally involves
ticular application. Tools should be developed and used to repeatedly selecting more specialized jobs and more focused
help instrument the system, reduce the overhead, and monitoring points based on monitoring results. For correct-
interpret the monitoring results. ness checking at given points, one needs to select jobs that
lead to different possible results at those points and monitor
at those points. Special methods are used for special classes
WORKLOAD SELECTION
of applications; for example, for testing fault-tolerance in
distributed systems, message losses or process failures can
To understand how a complex system works, one first needs
be included in the test suite.
to determine what to observe. Thus before determining how
For system performance monitoring, selection should
to monitor a system, one must determine what to monitor
consider the services exercised as well as the level of detail
and why it is important to monitor them. This enables one
and representativeness (4). The starting point is to consider
to determine the feasibility of the monitoring, based on the
the system as a service provider and select the workload
perturbation and the cost, and then allows repeating and
and metrics that reflect the performance of services pro-
justifying the experiments.
vided at the system level and not at the component level.
Selecting candidate jobs to be run and measurements to
The amount of detail in recording user requests should be
be taken depends on the objectives of monitoring. For
determined. Possible choices include the most frequent
monitoring that is aimed at performance behavior, such
request, the frequency of request types, the sequence of
as system tuning or task scheduling, one needs to select the
requests with time stamps, and the average resource
representative load of work. For monitoring that is aimed at
demand. The test workload should also be representative
functional correctness, such as for debugging and fault-
of the real application. Representativeness is reflected at
tolerance analysis, one needs to isolate the buggy or
different levels (3) at the physical level, the consumptions
faulty parts.
of hardware and software resources should be representa-
A real workload best reflects system behavior under
tive; at the virtual level, the logical resources that are closer
actual usage, but it is usually unnecessarily expensive,
to the users point of view, such as virtual memory space,
complicated, or even impossible to use as a test workload.
should be representative; at the functional level, the test
Furthermore, the test results are not easily repeated and
workload should include the applications that perform the
are not good for comparison. Therefore, a synthetic work-
same functions as the real workload.
load is normally used. For monitoring the functional cor-
Workload characterization is the quantitative descrip-
rectness of a system, a test suite normally consists of data
tion of a workload (3,4). It is usually done in terms of
that exercise various parts of the system, and monitoring at
workload parameters that can affect system behavior.
those parts is set up accordingly. For performance monitor-
These parameters are about service requests, such as
ing, the load of work, rather than the actual jobs, is the
arrival rate and duration of request, or about measured
major concern, and the approaches below have been used
quantities, such as CPU time, memory space, amount of
for obtaining test workloads (3,4,8).
read and write, or amount of communication, for which
Addition instruction was used to measure early com-
system independent parameters are preferred. In addition,
puters, which had mainly a few kinds of instructions.
various techniques have been used to obtain statistical
4 SYSTEM MONITORING

quantities, such as frequencies of instruction types, mean Event-driven monitoring in hardware uses the same
time for executing certain I/O operations, and probabilities techniques as in software, conceptually and in practice,
of accessing certain devices. These techniques include for handling events. However, since hardware uses sepa-
averaging, histograms, Markov models, and clustering. rate devices for trigger and recording, the monitoring over-
Markov models specify the dependency among requests head is small or zero. Some systems are even equipped with
using a transition diagram. Clustering groups similar com- hardware that makes event tracing easier. Such hardware
ponents in a workload in order to reduce the large number can help evaluate the performance of a system as well as
of parameters for these components. test and debug the hardware or software. Many hardware
events can also be detected via software.
TRIGGERING MECHANISM
Sampling Monitoring
Monitoring can use either event-driven or sampling tech- Sampling is a statistical technique that can be used when
niques for triggering and data recording (3). Event-driven monitoring all the data about a set of events is unnecessary,
techniques can lead to more detailed and accurate informa- impossible, or too expensive. Instead of monitoring the
tion, while sampling techniques are easier to implement entire set, one can monitor a part of it, called a sample.
and have smaller overhead. These two techniques are not From this sample, it is then possible to estimate, often with
mutually exclusive; they can coexist in a single tool. a high degree of accuracy, some parameters that charac-
terize the entire set. For example, one can estimate the
Event-Driven Monitoring proportion of time spent in different code segments by
sampling program counters instead of recording the event
An event in a computer system is any change of the systems
sequence and the exact event count; samples can also be
state, such as the transition of a CPU from busy to idle, the
taken to estimate how much time different kinds of pro-
change of content in a memory location, or the occurrence of
cesses occupy CPU, how much memory is used, or how often
a pattern of signals on the memory bus. Therefore, a way of
a printer is busy during certain runs.
collecting data about system activities is to capture all
In general, sampling monitoring can be used for mea-
associated events and record them in the order they occur.
suring the fractions of a given time interval each system
A software event is an event associated with a programs
component spends in its various states. It is easy to imple-
function, such as the change of content in a memory location
ment using periodic interrupts generated by a timer. Dur-
or the start of an I/O operation. A hardware event is a
ing an interrupt, control is transferred to a data-collection
combination of signals in the circuit of a system, such as
routine, where relevant data in the state are recorded. The
a pattern of signals on the memory bus or signals sent to the
data collected during the monitored interval are later
disk drive.
analyzed to determine what happened during the interval,
Event-driven monitoring using software is done by
in what ratios the various events occurred, and how differ-
inserting a special trap code or hook in specific places of
ent types of activities were related to each other. Besides
the application program or the operating system. When an
timer interrupts, most modern architectures also include
event to be captured occurs, the inserted code causes con-
hardware performance counters, which can be used for
trol to be transferred to an appropriate routine. The routine
generating periodic interrupts (9). This helps reduce the
records the occurrence of the event and stores relevant data
need for additional hardware monitoring.
in a buffer area, which is to be written to secondary storage
The accuracy of the results is determined by how repre-
and/or analyzed, possibly at a later time. Then the control is
sentative a sample is. When one has no knowledge of
transferred back. The recorded events and data form an
the monitored system, random sampling can ensure repre-
event trace. It can provide more information than any other
sentativeness if the sample is sufficiently large. It should
method on certain aspects of a systems behavior.
be noted that, since the sampled quantities are functions
Producing full event traces using software has high
of time, the workload must be stationary to guarantee
overhead, since it can consume a great deal of CPU time
validity of the results. In practice, operating-system
by collecting and analyzing a large amount of data. There-
workload is rarely stationary during long periods of time,
fore, event tracing in software should be selective, since
but relatively stationary situations can usually be obtained
intercepting too many events may slow down the normal
by dividing the monitoring interval into short periods of,
execution of the system to an unacceptable degree. Also, to
say, a minute and grouping homogeneous blocks of data
keep buffer space limited, buffer content must be written to
together.
secondary storage with some frequency, which also con-
Sampling monitoring has two major advantages. First,
sumes time; the system may decide to either wait for the
the monitored program need not be modified. Therefore,
completion of the buffer transfer or continue normally with
knowledge of the structure and function of the monitored
some data loss.
program, and often the source code, is not needed for
In most cases, event-driven monitoring using software is
sampling monitoring. Second, sampling allows the system
difficult to implement, since it requires that the application
to spend much less time in collecting and analyzing a much
program or the operating system be modified. It may also
smaller amount of data, and the overhead can be kept less
introduce errors. To modify the system, one must under-
than 5% (3,9,10). Furthermore, the frequency of the inter-
stand its structure and function and identify safe places for
rupts can easily be adjusted to obtain appropriate sample
the modifications. In some cases, instrumentation is not
size and appropriate overhead. In particular, the overhead
possible when the source code of the system is not available.
SYSTEM MONITORING 5

can also be estimated easily. All these make sampling use of software probes, which are groups of instructions
monitoring particularly good for performance monitoring inserted at critical points in the program to be monitored.
and dynamic system resource allocation. Each probe detects the arrival of the flow of control at the
point it is placed, allowing the execution path and the
number of times these paths are executed to be known.
IMPLEMENTATION
Also, relevant data in registers and in memory may be
examined when these paths are executed. It is possible to
System monitoring can be implemented using software
perform sampling monitoring by using the kernel interrupt
or hardware. Software monitors are easier to build and
service from within an application program, but it can be
modify and are capable of capturing high-level events and
performed more efficiently by modifying the kernel.
relating them to the source code, while hardware monitors
Modifying the kernel is usually used for monitoring the
can capture rapid events at circuit level and have lower
system as a service provider. For example, instructions can
overhead.
be inserted to read the system clock before and after a
service is provided in order to calculate the turnaround
Software Monitoring
time or response time; this interval cannot be obtained from
Software monitors are used to monitor application pro- within the application program. Sampling monitoring can
grams and operating systems. They consist solely of instru- be performed efficiently by letting an interrupt handler
mentation code inserted into the system to be monitored. directly record relevant data. The recorded data can be
Therefore, they are easier to build and modify. At each analyzed to obtain information about the kernel as well as
activation, the inserted code is executed and relevant data the application programs.
are recorded, using the CPU and memory of the monitored Software monitoring, especially event-driven monitor-
system. Thus software monitors affect the performance and ing in the application programs, makes it easy to obtain
possibly the correctness of the monitored system and are descriptive data, such as the name of the procedure that is
not appropriate for monitoring rapid events. For example, if called last in the application program or the name of the file
the monitor executes 100 instructions at each activation, that is accessed most frequently. This makes it easy to
and each instruction takes 1 ms, then each activation takes correlate the monitoring results with the source program,
0.1 ms; to limit the time overhead to 1%, the monitor must to interpret them, and to use them.
be activated at intervals of 10 ms or more, that is, less than There are two special software monitors. One keeps
100 monitored events should occur per second. system accounting logs (4,6) and is usually built into the
Software monitors can use both event-driven and sam- operating system to keep track of resource usage; thus
pling techniques. Obviously, a major issue is how to reduce additional monitoring might not be needed. The other
the monitoring overhead while obtaining sufficient infor- one is program execution monitor (4,11), used often for
mation. When designing monitors, there may first be a finding the performance bottlenecks of application pro-
tendency to collect as much data as possible by tracing or grams. It typically produces an execution profile, based
sampling many activities. It may even be necessary to add a on event detection or statistical sampling. For event-driven
considerable amount of load to the system or to slow down precise profiling, efficient algorithms have been developed
the program execution. After analyzing the initial results, to keep the overhead to a minimum (12). For sampling
it will be possible to focus the experiments on specific profiling, optimizations have been implemented to yield an
activities in more detail. In this way, the overhead can overhead of 1% to 3%, so the profiling can be employed
usually be kept within reasonable limits. Additionally, continuously (9).
the amount of the data collected may be kept to a minimum
by using efficient data structures and algorithms for sto- Hardware Monitoring
rage and analysis. For example, instead of recording the
With hardware monitoring, the monitor uses hardware to
state at each activation, one may only need to maintain a
interface to the system to be monitored (5,1316). The
counter for the number of times each particular state has
hardware passively detects events of interest by snooping
occurred, and these counters may be maintained in a hash
on electric signals in the monitored system. The monitored
table (9).
system is not instrumented, and the monitor does not share
Inserting code into the monitored system can be done in
any of the resources of the monitored system. The main
three ways: (1) adding a program, (2) modifying the appli-
advantage of hardware monitoring is that the monitor does
cation program, or (3) modifying the operating system
not interfere with the normal functioning of the monitored
(3). Adding a program is simplest and is generally pre-
system and rapid events can be captured. The disadvantage
ferred to the other two, since the added program can easily
of hardware monitoring is its cost and that it is usually
be removed or added again. Also, it maintains the inte-
machine dependent or at least processor dependent. The
grity of the monitored program and the operating system.
snooping device and the signal interpretation are bus and
It is adequate for detecting the activity of a system or a
processor dependent.
program as a whole. For example, adding a program that
In general, hardware monitoring is used to monitor the
reads the system clock before and after execution of a
run-time behavior of either hardware devices or software
program can be used to measure the execution time.
modules. Hardware devices are generally monitored to
Modifying the application program is usually used for
examine issues such as cache accesses, cache misses, mem-
event-driven monitoring, which can produce an execution
ory access times, total CPU times, total execution times, I/O
trace or an exact profile for the application. It is based on the
6 SYSTEM MONITORING

requests, I/O grants, and I/O busy times. Software modules not be sufficient to determine the behavior inside the
are generally monitored to debug the modules or to examine chip. For example, with increasingly sophisticated caching
issues such as the bottlenecks of a program, the deadlocks, algorithms implemented for on-chip caches, the informa-
or the degree of parallelism. tion collected from external buses may be insufficient to
A hardware monitor generally consists of a probe, an determine what data need to be stored. Prefetched instruc-
event filter, a recorder, and a real-time clock. The probe is tions and data might not be used by the processor, and some
high-impedance detectors that interface with the buses of events can only be identified by a sequence of signal pat-
the system to be monitored to latch the signals on the buses. terns rather than by a single address or instruction. There-
The signals collected by the probe are manipulated by the fore passively snooping on the bus might not be effective.
event filter to detect events of interest. The data relevant to Hybrid monitoring is an attractive compromise between
the detected event along with the value of the real-time intrusive software monitoring and expensive nonintrusive
clock are saved by the recorder. Based on the implementa- hardware monitoring.
tion of the event filter, hardware tools can be classified as Hybrid monitoring uses both software and hardware to
fixed hardware tools, wired program hardware tools, and perform monitoring activities (5,1618). In hybrid moni-
stored program hardware tools (5,13). toring, triggering is accomplished by instrumented soft-
With fixed hardware tools, the event filtering mechan- ware and recording is performed by hardware. The
ism is completely hard-wired. The user can select neither instrumented program writes the selected data to a hard-
the events to be detected nor the actions to be performed ware interface. The hardware device records the data at
upon detection of an event. Such tools are generally the hardware interface along with other data such as the
designed to measure specific parameters and are often current time. Perturbation to the monitored system is
incorporated into a system at design time. Examples of reduced by using hardware to store the collected data
fixed hardware tools are timing meters and counting into a separate storage device.
meters. Timing meters or timers measure the duration of Current hybrid monitoring techniques use two different
an activity or execution time, and counting meters or coun- triggering approaches. One has a set of selected memory
ters count occurrences of events, for example, references to addresses to trigger data recording. When a selected
a memory location. When a certain value is reached in a address is detected on the system address bus, the moni-
timer (or a counter), an electronic pulse is generated as an toring device records the address and the data on the
output of the timer (or the counter), which may be used to system data bus. This approach is called memory-mapped
activate certain operations, for instance, to generate an monitoring. The other approach uses the coprocessor
interrupt to the monitored system. instructions to trigger event recording. The recording
Wired-program hardware tools allow the user to detect unit acts as a coprocessor that executes the coprocessor
different events by setting the event filtering logic. The instructions. This is called coprocessor monitoring.
event filter of a wired-program hardware tool consists of a With memory-mapped monitoring, the recording part of
set of logic elements of combinational and sequential cir- the monitor acts like a memory-mapped output device with
cuits. The interconnection between these elements can be a range of the computers address space allocated to it
selected and manually manipulated by the user so as to (5,16,17). The processor can write to the locations in that
match different signal patterns and sequences for different range in the same way as to the rest of the memory. The
events. Thus wired-program tools are more flexible than system or program to be monitored is instrumented to
fixed hardware tools. write to the memory locations representing different
With stored-program hardware tools, filtering func- events. The recording section of the monitor generally
tions can be configured and set up by software. Generally, contains a comparator, a clock and timer, an overflow con-
a stored-program hardware tool has its own processor, trol, and an event buffer. The clock and timer provide the
that is, its own computer. The computer executes pro- time reference for events. The resolution of the clock
grams to set up filtering functions, to define actions in guarantees that no two successive events have the same
response to detected events, and to process and display time stamp. The comparator is responsible for checking the
collected data. Their ability to control filtering makes monitored systems address bus for designated events.
stored-program tools more flexible and easier to use. Once such an address is detected, the matched address,
Logical state analyzers are typical examples of stored- the time, and the data on the monitored systems data bus
program hardware tools. With a logical state analyzer, are stored in the event buffer. The overflow control is used
one can specify states to be traced, define triggering to detect events lost due to buffer overflow.
sequences, and specify actions to be taken when certain With coprocessor monitoring, the recording part is
events are detected. In newer logical state analyzers, all attached to the monitored processor through a coprocessor
of this can be accomplished through a graphical user interface, like a floating-point coprocessor (18). The recor-
interface, making them very user-friendly. der contains a set of data registers, which can be accessed
directly by the monitored processor through coprocessor
Hybrid Monitoring instructions. The system to be monitored is instrumented
using two types of coprocessor instructions: data instruc-
One of the drawbacks of the hardware monitoring approach
tions and event instructions. Data instructions are used
is that as integrated circuit techniques advance, more
to send event-related information to the data registers
functions are built on-chip. Thus desired signals might
of the recorder. Event instructions are used to inform the
not be accessible, and the accessible information might
recorder of the occurrence of an event. When an event
SYSTEM MONITORING 7

instruction is received by the recorder, the recorder saves


its data registers, the event type, and a time stamp. 60
CPU
30 20
I/O
DATA ANALYSIS AND PRESENTATION
20 20 10 15
Network
The collected data are voluminous and are usually not in a
form readable or directly usable, especially low-level data
0% 20% 40% 60% 80% 100%
collected in hardware. Presenting these data requires auto-
mated analyses, which may be simple or complicated, Figure 1. A sample Gantt chart for utilization profile.
depending on the applications. When monitoring results
are not needed in an on-line fashion, one can store all
collected data, at the expense of the storage space, and
analyze them off-line; this reduces the time overhead of during which the condition associated with the axis is true.
monitoring caused by the analysis. For monitoring that The points corresponding to the values on the axis can be
requires on-line data analysis, efficient on-line algorithms connected by straight-line segments, thereby defining a
are needed to incrementally process the collected data, but polygon. Figure 2 is a sample Kiviat graph. It shows the
such algorithms are sometimes difficult to design. utilization of CPU and I/O channel. For example, the CPU
The collected data can be of various forms (4). First, unitization is 60%, I/O 50%, and overlap 30%. Various
they can be either qualitative or quantitative. Qualitative typical shapes of Kiviat graphs indicate how loaded and
data form a finite category, classification, or set, such as balanced a system is. Most often, an even number of metrics
the set {busy, idle} or the set of weekdays. The elements are used, and metrics for which high is good and for which
can be ordered or unordered. Quantitative data are low is good alternate in the graph.
expressed numerically, for example, using integers or float-
ing-point numbers. They can be discrete or continuous. It is
easy to see that each kind of data can be represented in a APPLICATIONS
high-level programming language and can be directly dis-
played as text or numbers. From the perspective of application versus system, mon-
These data can be organized into various data struc- itoring can be classified into two categories: that required
tures during data analysis, as well as during data col- by the user of a system and that required by the system
lection, and presented as tables or diagrams. Tables and itself. For example, for performance monitoring, the former
diagrams such as line charts, bar charts, pie charts, concerns the utilization of resources, including evaluating
and histograms are commonly used for all kinds of data performance, controlling usage, and planning additional
presentation, not just for monitoring. The goal is to make resources, and the latter concerns the management of the
the most important information the most obvious, and system itself, so as to allow the system to adapt itself
concentrate on one theme in each table or graph; for dynamically to various factors (3).
example, concentrate on CPU utilization over time, or From a user point of view, applications of monitoring can
on the proportion of time various resources are used. be divided into two classes: (1) testing and debugging, and
With the advancement of multimedia technology, moni- (2) performance analysis and tuning. Dynamic system
tored data are now frequently animated. Visualization management is an additional class that can use techniques
helps greatly in interpreting the measured data. Moni- from both classes.
tored data may also be presented using hypertext or
hypermedia, allowing details of the data to be revealed Testing and Debugging
in a step-by-step fashion. Testing and debugging are aimed primarily at system cor-
A number of graphic charts have been developed spe- rectness. Testing checks whether a system conforms to its
cially for computer system performance analysis. These requirements, while debugging looks for sources of bugs.
include Gantt charts and Kiviat graphs (4). They are two major activities of all software development.
Gantt charts are used for showing system resource
utilization, in particular, the relative duration of a number
of Boolean conditions, each denoting whether a resource is CPU busy
busy or idle. Figure 1 is a sample Gantt chart. It shows the 60%
utilization of three resources: CPU, I/O channel, and net-
work. The relative sizes and positions of the segments are
arranged to show the relative overlap. For example, the
CPU utilization is 60%, I/O 50%, and network 65%. The
overlap between CPU and I/O is 30%, all three are used
during 20% of the time, and the network is used alone 15% CPU and I/O busy
of the time. I/O busy 50%
A Kiviat graph is a circle with unit radius and in which 30%
different radial axes represent different performance
metrics. Each axis represents a fraction of the total time Figure 2. A sample Kiviat graph for utilization profile.
8 SYSTEM MONITORING

Systems are becoming increasingly complex, and static Dynamic System Management
methods, such as program verification, have not caught
For a system to manage itself dynamically, typically mon-
up. As a result, it is essential to look for potential problems
itoring is performed continuously, and data are analyzed in
by monitoring dynamic executions.
an on-line fashion to provide dynamic feedback. Such feed-
Testing involves monitoring system behavior closely
back can be used for managing both the correctness and the
while it runs a test suite and comparing the monitoring
performance of the system.
results with the expected results. The most general strat-
An important class of applications is dynamic safety
egy for testing is bottom-up: unit test, integration test, and
checking and failure detection. It is becoming increasingly
system test. Starting by running and monitoring the func-
important as computers take over more complicated
tionality of each component separately helps reduce the
and safety-critical tasks, and it has wide applications in
total amount of monitoring needed. If any difference
distributed systems, in particular. Monitoring system
between the monitoring results and the expected results
state, checking whether it is in an acceptable range, and
is found, then debugging is needed.
notifying appropriate agents of any anomalies are essen-
Debugging is the process of locating, analyzing,
tial for the correctness of the system. Techniques for
and correcting suspected errors. Two main monitoring
testing and debugging can be used for such monitoring
techniques are used: single stepping and tracing. In
and checking.
single-step mode, an interrupt is generated after each
Another important class of applications is dynamic
instruction is executed, and any data in the state can be
task scheduling and resource allocation. It is particularly
selected and displayed. The user then issues a command to
important for real-time systems and service providers,
let the system take another step. In trace mode, the user
both of which are becoming increasingly widely used. For
selects the data to be displayed after each instruction is
example, monitoring enables periodic review of program
executed and starts the execution at a specified location.
priorities on the basis of their CPU utilization and analysis
Execution continues until a specified condition on the data
of page usage so that more frequently used pages can
holds. Tracing slows down the execution of the program, so
replace less frequently used pages. Methods and tech-
special hardware devices are needed to monitor real-time
niques for performance monitoring and tuning can be
operations.
used for these purposes. They have low overhead and
therefore allow the system to maintain a satisfactory level
Performance Evaluation and Tuning
of performance.
A most important application of monitoring is performance
evaluation and tuning (3,4,8,13). All engineered systems
MONITORING REAL-TIME, PARALLEL,
are subject to performance evaluation. Monitoring is the
AND DISTRIBUTED SYSTEMS
first and key step in this process. It is used to measure
performance indices, such as turnaround time, response
In a sequential system, the execution of a process is deter-
time, throughput, and so forth.
ministic, that is, the process generates the same output in
Monitoring results can be used for performance evalua-
every execution in which the process is given the same
tion and tuning in as least the following six ways (4,6).
input. This is not true in parallel systems. In a parallel
First, monitoring results help identify heavily used seg-
system, the execution behavior of a parallel program in
ments of code and optimize their performance. They can
response to a fixed input is indeterminate, that is, the
also lead to the discovery of inefficient data structures that
results may be different in different executions, depending
cause excessive amount of memory access. Second, mon-
on the race conditions present among processes and syn-
itoring can be used to measure system resource utilization
chronization sequences exercised by processes (1). Moni-
and find performance bottleneck. This is the most popular
toring interference may cause the program to face different
use of computer system monitoring (6). Third, monitoring
sets of race conditions and exercise different synchroniza-
results can be used to tune system performance by balan-
tion sequences. Thus instrumentation may change the
cing resource utilization and favoring interactive jobs. One
behavior of the system. The converse is also true: removing
can repeatedly adjust system parameters and measure the
instrumentation code from a monitored system may cause
results. Fourth, monitoring results can be used for work-
the system to behave differently.
load characterization and capacity planning; the latter
Testing and debugging parallel programs are very diffi-
requires ensuring that sufficient computer resources will
cult because an execution of a parallel program cannot
be available to run future workloads with satisfactory
easily be repeated, unlike sequential programs. One chal-
performance. Fifth, monitoring can be used to compare
lenge in monitoring parallel programs for testing and
machine performance for selection evaluation. Monitoring
debugging is to collect enough information with minimum
on simulation tools can also be used in evaluating the
interference so the execution of the program can be
design of a new system. Finally, monitoring results can
repeated or replayed. The execution behavior of a parallel
be used to obtain parameters of models of systems and to
program is bound by the input, the race conditions, and
validate models. They can also be used to validate models,
synchronization sequences exercised in that execution.
that is, to verify the representativeness of a model. This is
Thus data related to the input, race conditions, and syn-
done by comparing measurements taken on the real system
chronization sequences need to be collected. Those events
and on the model.
are identified as process-level events (1). To eliminate the
behavior change caused by removing instrumentation code,
SYSTEM MONITORING 9

instrumentation code for process-level events may be kept constraints, the data should be transferred immediately.
in the monitored system permanently. The performance This may require a high-speed network to reduce the
penalty can be compensated for by using faster hardware. latency between the system state and the display of that
To monitor a parallel or distributed system, all the three state. If the data are transferred immediately with a high-
approachessoftware, hardware, and hybridmay be speed network, little local storage is needed. If the data are
employed. All the techniques described above are applic- used in an off-line fashion, they can be transferred at any
able. However, there are some issues special to parallel, time. The data can be transferred after the monitoring is
distributed, and real-time systems. These are discussed done. In this case, each node should have mass storage to
below. store its local data. There is a disadvantage with this
To monitor single-processor systems, only one event- approach. If the amount of recorded data on nodes is not
detection mechanism is needed because only one event of evenly distributed, too much data could be stored at one
interest may occur at a time. In a multiprocessor system, node. Building a sufficiently large data storage for every
several events may occur at the same time. With hardware node can be very expensive.
and hybrid monitoring, detection devices may be used for In monitoring real-time systems, a major challenge is
each local memory bus and the bus for the shared memory how to reduce the interference caused by the monitoring.
and I/O. The data collected can be stored in a common Real-time systems are those whose correctness depends not
storage device. To monitor distributed systems, each only on the logical computation but also on the times at
node of the system needs to be monitored. Such a node is which the results are generated. Real-time systems must
a single processor or multiprocessor computer in its own meet their timing constraints to avoid disastrous conse-
right. Thus each node should be monitored accordingly as if quences. Monitoring interference is unacceptable in most
it were an independent computer. real-time systems (1,14), since it may change not only the
Events generally need to be recorded with the times at logical behavior but also the timing behavior of the mon-
which they occurred, so that the order of events can be itored system. Software monitoring generally is unaccep-
determined and the elapsed time between events can be table for real-time monitoring unless monitoring is
measured. The time can be obtained from the system being designed as part of the system (19). Hardware monitoring
monitored. In single-processor or tightly coupled multi- has minimal interference to the monitored system, so it is
processor systems, there is only one system clock, so it is the best approach for monitoring real-time systems. How-
guaranteed that an event with an earlier time stamp ever, it is very expensive to build, and sometimes it might
occurred before an event with a later time stamp. In other not provide the needed information. Thus hybrid monitor-
words, events are totally ordered by their time stamps. ing may be employed as a compromise.
However, in distributed systems, each node has its own
clock, which may have a different reading from the clocks
CONCLUSION
on other nodes. There is no guarantee that an event with an
earlier time stamp occurred before an event with a later
Monitoring is an important technique for studying the
time stamp in distributed systems (1).
dynamic behavior of computer systems. Using collected
In distributed systems, monitoring is distributed to each
run-time information, users or engineers can analyze,
node of the monitored system by attaching a monitor to each
understand, and improve the reliability and performance
node. The monitor detects events and records the data on
of complex systems. This article discussed basic concepts
that node. In order to understand the behavior of the
and major issues in monitoring, techniques for event-
system as a whole, the global state of the monitored system
driven monitoring and sampling monitoring, and their
at certain times needs to be constructed. To do this, the data
implementation in software monitors, hardware monitors,
collected at each individual node must be transferred to a
and hybrid monitors. With the rapid growth of computing
central location where the global state can be built. Also,
power, the use of larger and more complex computer sys-
the recorded times for the events on different nodes must
tems has increased dramatically, which poses larger chal-
have a common reference to order them. There are two
lenges to system monitoring (2022). Possible topics for
options for transferring data to the central location. One
future study include:
option is to let the monitor use the network of the monitored
system. This approach can cause interference to the com-  New hardware and software architectures are being
munication of the monitored system. To avoid such inter-
developed for emerging applications. New techniques
ference, an independent network for the monitor can be
for both hardware and software systems are needed to
used, allowing it to have a different topology and different
monitor the emerging applications.
transmission speed than the network of the monitored
system. For the common time reference, each node has a
 The amount of data collected during monitoring will be
local clock and a synchronizer. The clock is synchronized enormous. It is important to determine an appropriate
with the clocks on other nodes by the synchronizer. level for monitoring and to represent this information
The recorded event data on each node can be transmitted with abstractions and hierarchical structures.
immediately to a central collector or temporarily stored  Important applications of monitoring include using
locally and transferred later to the central location. Which monitoring techniques and results to improve the
method is appropriate depends on how the collected adaptability and reliability of complex software sys-
data will be used. If the data are used in an on-line fashion tems and using them to support the evolution of these
for dynamic display or for monitoring system safety systems.
10 SYSTEM MONITORING

 Advanced languages and tools for providing more user- 12. T. Ball and J. R. Larus, Optimally profiling and tracing
friendly interfaces for system monitoring need to be programs, ACM Trans. Program. Lang. Syst., 16: 1319
studied and developed. 1360, 1994.
13. D. Ferrari, Computer Systems Performance Evaluation,
Englewood Cliffs, NJ: Prentice-Hall, 1978.
14. B. Plattner, Real-time execution monitoring, IEEE Trans.
BIBLIOGRAPHY Softw. Eng., SE-10: 756764, 1984.
15. B. Lazzerini, C. A. Prete, and L. Lopriore, A programmable
1. J. J. P. Tsai et al. Distributed Real-Time Systems: Monitoring, debugging aid for real-time software development, IEEE
Visualization, Debugging and Analysis, New York: Wiley, Micro, 6(3): 3442, 1986.
1996. 16. K. Kant and M. Srinivasan, Introduction to Computer System
2. D. Ferrari, Workload characterization and selection in compu- Performance Evaluation, New York: McGraw-Hill, 1992.
ter performance measurement, IEEE Comput., 5(7): 1824, 17. D. Haban and D. Wybranietz, Real-time execution monitoring,
1972. IEEE Trans. Softw. Eng., SE-16: 197211, 1990.
3. D. Ferrari, G. Serazzi, and A. Zeigner, Measurement and 18. M. M. Gorlick, The flight recorder: An architectural aid for
Tuning of Computer Systems, Englewood Cliffs, NJ: Pre- system monitoring, Proc. ACM/ONR Workshop Parallel Dis-
ntice-Hall, 1983. tributed Debugging, New York: ACM, May 1991, pp. 175183.
4. R. Jain, The Art of Computer Systems Performance Analysis, 19. S. E. Chodrow, F. Jahanian, and M. Donner, Run-time
New York: Wiley, 1991. monitoring of real-time systems, in R. Werner (ed.), Proc.
5. P. McKerrow, Performance Measurement of Computer Sys- 12th IEEE Real-Time Syst. Symp., Los Alamitos, CA: IEEE
tems, Reading, MA: Addison-Wesley, 1987. Computer Society Press, 1991, pp. 7483.
6. G. J. Nutt, Tutorial: Computer system monitors, IEEE Com- 20. R. A. Uhlig and T. N. MudgeTrace-driven memory simulation:
put., 8(11): 5161, 1975. A survey, ACM Comput. Surg., 29(2): 128170, 1997.
7. L. Svobodova, Computer Performance Measurement and 21. M. Rosenblum et al., Using the SimOS machine simulator to
Evaluation Methods: Analysis and Applications, New York: study complex computer systems, ACM Trans. Modeling Com-
Elsevier, 1976. put. Simulation, 7: 78103, 1997.
8. H. C. Lucas, Performance evaluation and monitoring, ACM 22. D. R. Kaeli et al., Performance analysis on a CC-PUMA
Comput. Surv., 3(3): 7991, 1971. prototype, IBM J. Res. Develop., 41: 205214, 1997.
9. J. M. Anderson et al., Continuous profiling: Where have all the
cycles gone, Proc. 16th ACM Symp. Operating Syst. Principles,
New York: ACM, 1997. YANHONG A. LIU
10. C. H. Sauer and K. M. Chandy, Computer Systems Per- Indiana University
formance Modelling, Englewood Cliffs, NJ: Prentice-Hall, Bloomington, Indiana
1981.
JEFFREY J. P. TSAI
11. B. Plattner and J. Nievergelt, Monitoring program execution:
University of Illinois
A survey, IEEE Comput., 14(11): 7693, 1981.
Chicago, Illinois
T
TRANSACTION PROCESSING IN MOBILE, On-Demand-Based Services
HETEROGENEOUS DATABASE SYSTEMS Private data (personal schedules, phone numbers, etc.) and
shared data (i.e., a group data, replicated, data or fragmen-
INTRODUCTION
ted data of a database) are the subject of these services in
which users obtain answers to requests through a two-way
The proliferation of mobile devices has brought about the
communication with the database server; the user request
realization of ubiquitous access to information through
is pushed to the system, data sources are accessed, query
the wide breadth of devices with different memory, storage,
operations are performed, partial results are collected and
network, power, and display capabilities. Additionally,
integrated, and generated information is communicated
with the explosion of data available via the Internet and
back to the user. This requires a suitable solution that
in private networks, the diversity of information that is
addresses issues such as security and access control, iso-
accessible to a user at any given time is expanding rapidly.
lation, semantic heterogeneity, autonomy, query proces-
Current multi-database systems (MDBS) are designed
sing and query optimization, transaction processing and
to allow timely and reliable access to large amounts of
concurrency control, data integration, browsing, distribu-
heterogeneous data from different data sources. Within
tion and location transparency, and limited resources (3).
the scope of these systems, multi-database researchers
Among these issues, this article concentrates on trans-
have addressed issues such as autonomy, heterogeneity,
action processing and concurrency control. Traditionally,
transaction management, concurrency control, transpar-
in a distributed environment, to achieve high performance
ency, and query resolution (1). These solutions were based
and throughput, transactions are interleaved and executed
on fixed clients and servers connected over a reliable net-
concurrently. Concurrent execution of transactions should
work infrastructure. However, the concept of mobility,
be coordinated such that there is no interference among
where a user accesses data through a remote connection
them. In an MDAS environment, the concurrent execution
with a portable device, has introduced additional complex-
of transactions is a more difficult task to control than in
ities and restrictions (2). These include (1) limited network
distributed database systems, due to the conflicts among
connections, (2) processing and resource constraints, and
global transactions, conflicts among global and local trans-
(3) the problem of effectively locating and accessing infor-
actions, local autonomy of each site, and frequent network
mation from a multitude of sources. An MDBS with such
disconnections. Furthermore, some form of data replication
additional restrictions is called a mobile data access
should be used at the mobile unit to provide additional
system (MDAS). Within the scope of this infrastructure,
availability in case of a weak connection or disconnection.
two types of services are available to the user: on demand-
Researchers have extensively studied caching and
based services and broadcast-based services (3).
replication schemes that may be used to address the con-
straints of a wireless link. Current distributed database
Broadcast-Based Services
replication and caching schemes are not suitable for an
Many applications are directed toward public information MDAS environment because consistency cannot be effec-
(i.e., news, weather information, traffic information, and tively maintained due to local autonomy requirements and
flight information) that are characterized by (1) the mas- communication constraints. In addition, because of the
sive number of users, (2) the similarity and simplicity in the autonomy requirements of the local DBMS, the local infor-
requests solicited by the users, and (3) the fact that data are mation about the validity of a page or file is not available
modified by a few. The reduced bandwidth attributed to the globally. Accordingly, any type of invalidation, polling, or
wireless environment places limitations on the rate and timestamp-based method would be too impractical and
amount of communication. Broadcasting is a potential inefficient to use and, in many cases, impossible.
solution to this limitation. In broadcasting, information The use of a hierarchical concurrency control algorithm
is generated and broadcast to all users on the air channels. reduces the required communication overhead in an MDAS
Mobile users are capable of searching the air channels and and offers higher overall throughput and faster response
pulling the information they want. The main advantage of times. The concurrency control for global transactions is
broadcasting is that it scales up as the number of users performed at the global level in a hierarchical, distributed
increases. In addition, the broadcast channel can be con- manner. The application of the hierarchical structure to
sidered as an additional storage available over the air for enforce concurrency control offers higher performance and
the mobile clients. Finally, it is shown that pulling infor- reliability.
mation from the air channel consumes less power than The limited bandwidth and local autonomy restrictions
pushing information to the air channel. Broadcasting is of an MDAS can be addressed by using an automated
an attractive solution, because of the limited storage, pro- queued queriys (AQ2) and caching of data in the form of a
cessing capability, and power sources of the mobile unit. bundled query (BUNQ). An AQ2 is a form of prefetching
Further discussion about the broadcasting is beyond the that preloads data onto the mobile unit. A bundled query is
scope of this article, and the interested reader is referred to an object that consists of a query and its associated data.
ref. (3). Read-only queries are cached as a bundled query and are
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 TRANSACTION PROCESSING IN MOBILE, HETEROGENEOUS DATABASE SYSTEMS

validated using a simple parity-checking scheme. Guaran- terms could map into a common hypernym. This reduces
teeing write consistency while disconnected is extremely the overall memory requirements of the SSM meta-data as
difficult or impossible due to local autonomy requirements compared with the global schema approach. The semantic
in an MDAS. Consequently, any transactions containing distance metric between the hypernym and their respective
write operations are directly submitted to the MDAS sys- hyponyms are relatively small; hence, even though each
tem or are queued during disconnection and submitted summary schema does not contain exact information of
during reconnection. The caching and prefetching policies its children but only an abstracted version, it preserves
reduce the access latency and provide timely access to data, the semantic contents of its children. The ability to browse/
notwithstanding the limited bandwidth restrictions view the global data and to perform an imprecise query, and
imposed by an MDAS environment. the small size of the meta-data of the SSM provide several
benefits to the traditional multi-database systems that can
be directly applied to an MDAS.
BACKGROUND
SSM can also play an interesting role in the arena of
the semantic web. As Tim Berners-Lee pointed out in his
Accessing a large amount of data over a limited capability
1998 draft Semantic Web Roadmap (5), the rationale
network connection involves two general aspects: the
behind the semantic web is to express information in a
mobile networking environment and mobility issues. The
machine-understandable form. To this end, a set of stan-
mobile environment includes the physical network archi-
dards and tools of the eXtensible Markup Language
tecture and access devices. Mobility issues include
(XML) (6) is used to create structured web pages: the
adaptability to a mobile environment, autonomy, and het-
XML Schema (6), the Resource Description Framework
erogeneity. A mobile application must be able to adapt to
(RDF) (7), the RDF Schema (7), and the Web Ontology
changing conditions including the network environment
Language (OWL) (8). SSM provides a semi-automated
and resources available to the application. A resource-
solution for millions of existing web pages, which are only
scarce mobile system is better served by relying on a server.
human-understandable, to enter the semantic web world.
However, frequent network disconnections, limited net-
In this application, existing web pages act as local data-
work bandwidth, and power restrictions argue for some
bases and SSM as the portal for information exchange
degree of autonomy.
between traditional web pages and the semantic web space.
Multi-databases
The MDAS Environment. Overall, the main differentiat-
An (MDBS) provides a logical integrated view and method ing feature between an MDAS and an MDBS is the con-
to access multiple preexisting local database systems, pro- nection of servers and/or clients through a wireless
viding the hardware and software transparencies and environment and the devices used to access the data.
maintaining the local autonomy. In addition to autonomy, However, both environments are intended to provide
heterogeneity is also an important aspect of a multi-data- timely and reliable access to the globally shared data.
base system. Support for heterogeneity is a tradeoff Due to the similarities in the objectives of effectively acces-
between developing and making changes in both hardware sing data in a multi-database and a wireless-mobile
and software and limiting participation (1). Consequently, computing environment, a wireless-mobile computing
as the number of systems and the degree of heterogeneity environment can be easily superimposed on an MDBS.
among these systems increases, the cost of integration into The resulting system is called an MDAS. By superimposing
the global MDBS increases. Access to the local DBMS an MDBS onto a mobile computing environment, solutions
through a much more diverse and restrictive communica- from one environment are easily mapped to another.
tion and access device is the natural extension to a tradi-
tional MDBS environment, i.e., an MDAS environment (5). Transaction Management and Concurrency Control
Data access in an MDBS is accomplished through trans-
The Summary Schemas Model for Multidatabase Systems.
actions. Concurrency control involves coordinating the
The summary schemas model (SSM) has been proposed
operations of multiple transactions that operate in parallel
as an efficient means to access data in a heterogeneous
and access shared data. By interleaving the operations
multi-database environment (4). The identification of the
in such a manner, the potential of interference between
terms that are semantically similar is one key concept in
transactions arises. The concurrent execution of trans-
SSM. SSM uses the taxonomy of the English language that
actions is considered correct when the ACID properties
contains at least hypernym/hyponym and synonym links
(atomicity, consistency, isolation, and durability) hold for
among terms to build a hierarchical meta-data. This hier-
each transaction (9). The autonomy requirement of local
archical meta-structure provides an incrementally concise
databases in an MDAS introduces additional complexities
view of the data in the form of summary schemas. The SSM
in maintaining serializable histories because the local
hierarchy consists of leaf-node schemas and summary
transactions are not visible at the global level. Conse-
schemas. A leaf-node schema represents an actual data-
quently, the operations in a transaction can be subjected
base, whereas a summary schema gives an abstract view of
to large delays, frequent or unnecessary aborts, incon-
the information available at the schemas of its children.
sistency, and deadlock. Two types of conflicts may arise
The hypernyms of terms in the children of a particular SSM
due to the concurrent execution of transactionsdirect and
node form the summary schema of that node. As hypernyms
indirect conflicts (10).
are more general or abstract than their hyponyms, many
TRANSACTION PROCESSING IN MOBILE, HETEROGENEOUS DATABASE SYSTEMS 3

Definition 1. A direct conflict between two transactions mechanisms, i.e., time-to-live (TTL) and client polling (13).
Ta and Tb exists if and only if an operation of Ta on data The disconnected operation of a mobile system and the local
item x [(denoted o(Ta(x)))] is followed by o(Tb(x)), where Ta autonomy requirements of the local systems make the
does not commit or abort before o(Tb(x)), and either o(Ta(x)) application of these schemes impractical in an MDAS
or o(Tb(x)) is a write operation. environment. Some schemes try to use the concept of
compensating transactions (or operations) to keep repli-
Definition 2. An indirect conflict between two trans- cated data consistent. However, compensating transac-
actions Ta and Tb exists if, and only if, a sequence of tions are difficult to implement, and in some cases, a
transactions T1, T2, . . . Tn exists such that Ta is in direct compensating transaction cannot semantically undo the
conflict with T1, T1 is in direct conflict with T2, . . ., and Tn is transaction (or operation) (10).
in direct with Tb.
An MDAS should maintain a globally serializable his-
CONCURRENCY CONTROL AND DATA REPLICATION
tory for correct execution of concurrent transactions, which
FOR MDAS
means that the global history should be conflict free while
preserving as much local autonomy as possible. Although
The proposed concurrency control algorithm is defined
the MDBS is responsible for producing a globally serial-
in an environment where information sources are station-
izable history, it is assumed that the local concurrency
ary and user requests are aimed at shared data sources.
control system will produce a locally serializable history
Under these conditions, the v-locking algorithm is intended
as well. It is important to note that the MDBS needs to
to reduce the amount of communication and hence to
address both direct and indirect conflicts between global
reduce the effect of frequent disconnections in wireless
transactions. For more information about the concurrency
environment.
control algorithms that have been advanced in the litera-
ture, the reader is referred to ref. 11.
The V-Locking Concurrency Control Scheme
Data Replication for Weak Connections and Disconnection. The proposed v-locking algorithm uses a global locking
The communication limitations of an MDAS environment scheme (GLS) to serialize conflicting operations of global
may require that a portion of the data in some form be made transactions. Global locking tables are used to lock data
readily available to the mobile unit. A large amount of items involved in a global transaction in accordance to the
related work has been reported in the area of distributed two-phase locking (2PL) rules. In typical multi-database
file systems, distributed replication, and distributed/web systems, maintaining a global locking table would require
caches. The local autonomy requirement of an MDAS communication of information from the local site to the
environment does not lend itself to the direct application global transaction manager (GTM). In an MDAS environ-
of these works. Data consistency and access time are two ment, this is impractical due to the delay, amount of
main objectives in maintaining replicated data in a mobile communication overhead, and frequent disconnections
or distributed environment. involved. In our underlying infrastructure, software is
Replication schemes differ slightly from caching distributed in a hierarchical structure similar to the hier-
schemes in that the replicated data are accessible by other archical structure of the SSM. Subsequently, transaction
systems outside of the system on which the data resides. management is performed at the global level in a hierarch-
Two types of general replication schemes exist: primary/ ical, distributed manner. A global transaction is submitted
secondary copy (PSC) replication and voting-based replica- at any node in the hierarchyeither at a local node or at a
tion schemes. PSC replication does not work in an MDAS summary schema node. The transaction is resolved and
environment because write operations to replicated data mapped into subtransactions, and its global transaction
do not reach the primary copy when disconnected. There- coordinator is determined by the SSM structure (4).
fore, write consistency is not guaranteed. In a distributed The v-locking algorithm is based on the following
system, data consistency is guaranteed with voting-based assumptions:
replications; however, they tend to be more expensive
and require much more communication. In an MDAS 1. There is no distinction between local and global
environment, the local replica, while disconnected, cannot transactions at the local level.
participate in the decision/voting process, and any changes 2. A local site is completely isolated from other local
to the local data may result in an inconsistency. sites.
Caching is an effective means of data duplication that 3. Each local system ensures local serializability and
is used to reduce the latency of read and write operations freedom from local deadlocks.
on data. Early research on the disconnected operation was
4. A local database may abort any transaction at any
done with file system-based projects. When a disconnection
time within the constraints of a distributed atomic
occurs, a cache manager services all file system requests
commit protocol.
from the cache contents. As with replication, the invalida-
tion of data is not possible when disconnected, and thus, 5. Information pertaining to the type of concurrency
consistency cannot be guaranteed. Web-based caching (12) control used at the local site will be available. For
offers the two most common forms of cache consistency systems to provide robust concurrency and consis-
tency, in most systems, a strict history is produced
4 TRANSACTION PROCESSING IN MOBILE, HETEROGENEOUS DATABASE SYSTEMS

through the use of a strict 2PL scheme. Therefore, be selected and adjusted dynamically to prevent as many
most local sites will use a strict 2PL scheme for local false deadlocks as possible.
concurrency control.
Handling Unknown Local Data Sources
Consequently, the MDAS coordinates the execution of
The v-locking algorithm has been extended to handle the
global transactions without the knowledge of any control
local black box site in which the global level knows
information from local DBMS. The only information (loss
nothing about the local concurrency control. As nearly
of local autonomy) required by the algorithm is the type of
every commercial database system uses some form of
concurrency control protocol performed at the local sites.
2PL, this case will only comprise a small percentage of
The semantic information contained in the summary sche-
local systems. The algorithm merely executes global trans-
mas is used to maintain global locking tables. As a result,
actions at such a site in a serial order. This is done by
the data item being locked is reflected either exactly or as
requiring any transaction involving the black-box to
a hypernym term in the summary schema of the trans-
obtain a site lock before executing any operations in the
actions GTM. The locking tables can be used in an aggres-
transaction. These types of locks will be managed by esca-
sive manner where the information is used only to detect
lating any lock request to these sites to the highest level
potential global deadlocks. A more conservative approach
(site lock).
can be used where the operations in a transaction are
actually delayed at the GTM until a global lock request
Data Replication Protocol
is granted. Higher throughput at the expense of lower
reliability is the direct consequence of the application of Communication Protocol. Maintaining the ACID pro-
semantic contents rather than exact contents for an aggres- perties of a transaction with replicated data in an MDAS
sive approach. In either case, the global locking table is environment is very difficult. The proposed scheme con-
used to create a global wait-for-graph, which is subse- siders three levels of connectivity in which a mobile unit
quently used to detect and resolve potential global dead- operates. During a strong connection, the mobile unit
locks. In the proposed v-locking algorithm, due to the sends/receives all transactions and returns data directly
hierarchical nature of the summary schemas model, the to/from land-based, fixed sites for processing. When the
global wait-for-graphs are maintained in hierarchical communication link degrades to a weak connection, trans-
fashion within the summary schemas nodes. In addition, actions are queued at the mobile unit and passed through
edges in the wait-for-graphs as discussed later are labeled the system according to the availability of bandwidth.
as exact or imprecise. Returned data are also queued at the fixed site. The queu-
During the course of operations, the wait-for-graph is ing of operations during a weak connection allows a mobile
constructed based on the available communication. Three unit to continue processing at the expense of increased
cases are considered: (1) Each operation in the transaction latency.
is individually acknowledged; (2) write operations are only In the disconnected state, a user may perform read-only
acknowledged; and (3) only the commit or abort of the queries on any cached data. For this case, the consistency of
transaction is acknowledged. For the first case, based on the data is not guaranteed, i.e., the user may receive stale
the semantic contents of the summary schema node, an data. Any transaction that contains a write operation is
edge inserted into the wait-for-graph is marked as being an queued and submitted to the system when the connection is
exact or imprecise data item. For each acknowledgment reestablished. Naturally, if a read-only access does not find
signal received, the corresponding edge in the graph is the data locally, the query is queued and submitted later
marked as exact. In the second case, where each write when the connection is established.
operation generates an acknowledgment signal, for each
signal only the edges preceding the last known acknowl- Cached DataBundled Queries (BUNQ). Data that are
edgment are marked as being exact. Other edges that have cached on the mobile unit consist of a query and its asso-
been submitted but that have not been acknowledged are ciated data. Several reasons exist for using a BUNQ instead
marked as pending. As in the previous two cases, in the of page-based or file-based data. In a tightly coupled dis-
third case, the edges are marked as representing exact or tributed system, it is possible to cache data at the local unit.
imprecise data. However, all edges are marked as pending However, in a multi-database system, the structure of the
until the commit or abort signal is received. Keeping the data at the local databases will vary (structural differ-
information about the data and status of the acknowledg- encesthe information may be stored as structured data,
ment signals enables one to detect cycles in the wait-for- unstructured data, web pages, files, objects, etc.). This
graph. The wait-for-graph is checked for cycles after a time variation of data at each local site makes it difficult to cache
threshold for each transaction. For all transactions the data in a uniform manner. In addition, the autonomy
involved in a cycle, if the exact data items are known requirement of the local database imposes further restric-
and all acknowledgments have been received, then a dead- tions for caching data. It may not be possible to determine
lock is precisely detected and broken. When imprecise data the underlying structure of the data at the local site without
items are present within a cycle, the algorithm will consider violating local autonomy requirements. Consequently,
the cycle a deadlock only after a longer time threshold has instead of caching individual data items from each local
passed. Similarly, a pending acknowledgment of a transac- source, the data set associated with a particular trans-
tion is only used to break a deadlock in a cycle after an even action is cacheda bundled query. By caching a BUNQ,
longer time threshold has passed. The time thresholds can the resolution of the structural differences is done at the
TRANSACTION PROCESSING IN MOBILE, HETEROGENEOUS DATABASE SYSTEMS 5

MDAS level, while maintaining the local autonomy simulator was extended to compare and contrast the beha-
requirements. The primary advantage is the ease and vior of the v-lock algorithm against the site-graph, potential
simplicity of implementation, which comes at the expense conflict graph, and the forced conflict algorithms. This
of retaining data in the cache at a very coarse-grained level. includes an evaluation with and without the cache. It
should be noted that the simulator is designed to be versa-
Prefetching and Replacement/Invalidation Policy tile to evaluate the v-locking algorithm based on various
Prefetching. The prefetching algorithms can be devel- system configurations. At each moment in time, a fixed
oped based on user profiles and usage histories. The limited number of active global and local transactions is present in
power, storage, processing capability, and bandwidth of a the system. Each operation of the transaction is scheduled
mobile unit make the incorrect prefetch of data extremely and is communicated to the local system based on the
expensive. The idea is to prefetch enough data such that available bandwidth. The global scheduler acquires the
the user can still operate during a disconnection (albeit necessary global virtual locks and processes the operation.
with relaxed consistency requirements) while minimizing The operation(s) then uses the CPU and I/O resources and
the use of additional energy and bandwidth. is communicated to the local system based on the available
Allowing the user to specify a particular read-only trans- bandwidth. When acknowledgments or commit/abort sig-
action as an automated queued query prefetches the data. nals are received from the local site, the algorithm deter-
An AQ2 has a relaxed requirement for consistency, which is mines whether the transaction should proceed, commit, or
defined by the user. The user sets a valid time threshold for abort. For read-only transactions after a global commit, a
each AQ2 when defining such a transaction. The mobile unit parity code is generated for the resultant data and com-
automatically submits the transaction to the MDAS when pared with the parity code of the BUNQ. For a matching
the threshold has expired, i.e., prefetches the data. The code, only an acknowldgment signal is sent back to the
results are stored as a BUNQ. If the user requests the data mobile unit. Otherwise, the data and the new parity code
in the AQ2 before the BUNQ is invalidated, the query is are sent back to the mobile unit. Transactions containing a
serviced from the local cache. write operation are placed directly in the ready queue. If
a deadlock is detected, or an abort message is received from
Replacement. The data in the cache consists of both a local site, the transaction is aborted at all sites and the
automated queued queries and other user-submitted global transaction is placed in the restart queue. After a
read-only queries. The data in the cache are replaced based specified time elapses, the transaction is again placed on
on the least recently used (LRU) policy. The LRU policy has the active queue.
its advantages in that it is well understood and easy to
implement. Moreover, other than some web-based caching System Parameters
algorithms, the LRU policy is the most widely used replace-
The underlying global information-sharing process is com-
ment policy in DBMS caches (13).
posed of 10 local sites. The size of the local databases at each
site can be varied and has a direct effect on the overall
Invalidation. To maintain consistency between the
performance of the system. The simulation is run for 5000
copies of data residing on the fixed and mobile units, the
time units. The global workload consists of randomly gen-
data in the cache must be correctly invalidated when
erated global queries, spanning over a random number of
the main copy changes. A parity-based signature could
sites. Each operation of a subtransaction (read, write,
be used to accomplish this task for each BUNQ in the
commit, or abort) may require data and/or acknowledg-
cache (p-caching). When the user submits a transaction,
ments to be sent from the local DBMS. The frequency of
if a corresponding BUNQ is present in the cache, the
messages depends on the quality of the network link. To
transaction (along with the parity code) is sent to the fixed
determine the effectiveness of the proposed algorithm,
node. The fixed node then performs the query and delays
several parameters are varied for different simulation
the transmission of the information back to the mobile unit
runs.
until it generates and compares the two parity codes. If
A collection of mobile units submits global queries
they are identical, only an acknowledgment is sent back
(selected from a pool of 500 queries) to the MDAS. The
to the mobile unit and the data are read locally from the
connection between the mobile unit and the MDAS has a
cache. Otherwise, the resultant data, along with its new
50% probability of having a strong connection and a 30%
parity sequence, is returned and replaced in the cache. The
probability of having a weak connection. There is a 20%
old copy of the BUNQ is invalidated according to the LRU
probability of being disconnected. A strong connection
rules.
has a communication service time of 0.1 to 0.3 seconds,
whereas a weak connection has a service time range of
PERFORMANCE EVALUATION 0.3 to 3 seconds. When a disconnection occurs, the mobile
unit is disconnected for 30 to 120 seconds. Initially, one
Simulator Design third of the pool consists of read-only queries, which
The performance of the proposed v-locking and p-caching are locally cached as a BUNQ. Additionally, 10% of the
algorithms was evaluated through a simulator written in read-only queries are designated as an AQ2. For read-only
C using CSIM. The simulator measures performance queries, the local cache is first checked for an existing
in terms of global transaction throughput, response time, BUNQ. If present, the query is submitted along with the
and CPU, disk I/O, and network utilization. In addition, the associated parity sequence. The MDAS returns either the
6 TRANSACTION PROCESSING IN MOBILE, HETEROGENEOUS DATABASE SYSTEMS

Table 1. Simulation Parameters


Parameters Default Value
Global System Parameters
The number of local sites in the system. 10
The number of data items per local site. 100
The maximum number of global transactions in the system. This number 10
represents the global multi-programming level.
The maximum number of operations that a global transaction contains. 8
The minimum number of operations that a global transaction contains. 1
The service time for the CPU queue. 0.005 s
The service time for the IO queue. 0.010 s
The service time for each communicated message to the local site. 0.100 s
The number of messages per operation (read/write). 2
Mobile Unit Parameters
The maximum number of mobile units in the system. This number represents 10
the global multi-programming level.
The maximum number of operations that a global transaction contains. 8
The minimum number of operations that a global transaction contains. 1
The service time for the CPU queue. 0.005 s
The service time for the IO queue. 0.010 s
The service time for each communicated message to the global system for a 0.1000.300 s
strong connection, randomly selected.
The service time for each communicated message to the global system for 0.3003 s
a weak connection, randomly selected.
The service time for a disconnection, randomly selected 30120 s
The probability of a strong connection. 0.50
The probability of a weak connection. 0.30
The probability of a disconnection. 0.20
The number of messages per operation (read/write). 2
The average size of each message. 1,024 bytes
The size of the mobile unit cache. 1 Megabyte
The probability that a query is read-only. 1/3
The probability that a read-only query is submitted as an AQ2. 0.1
Local System Parameters
The maximum number of local transactions per site. This number represents 10
the local multi-programming level.
The maximum number of write operations per transaction. 8
The maximum number of read operations per transaction. 8
The minimum number of write operations per transaction. 1
The minimum number of read operations per transaction. 1
The service time for the local CPU queue. 0.005
The service time for the local IO queue. 0.010
The service time for each communicated message to the MDAS. 0.100
The number of messages per operation (read/write). 2

data or an acknowledgment signal for a matching BUNQ. tion is aborted at all sites. Table 1 summarizes all para-
Subsequently, if signatures do not match, the mobile unit meters used in the simulation. It should be noted that
updates the cache with the new data according to the LRU Table 1 shows the default values; however, the simulator
scheme. Upon termination of a transaction, a new query is is flexible enough to simulate the behavior of the v-locking
selected and submitted to the MDAS. algorithm for various system parameters.
The local systems perform two types of transactions
local and global. Global subtransactions are submitted to Simulation Results and Analysis
the local DBMS and appear as local transactions. Local
The v-locking algorithm has been simulated and compared
transactions generated at the local sites consist of a random
against some other concurrency control algorithms, i.e.,
number of read/write operations. The only difference
potential conflict graph (PCG), forced-conflict, and site-
between the two transactions is that a global subtransac-
graph algorithms with and without the proposed p-caching
tion will communicate with the global system, whereas the
scheme. Figures 1 and 2 show the results. As expected, the
local transaction terminates upon a commit or abort. The
v-locking algorithm offers the highest throughput. This
local system may abort a transaction, global or local, at any
result is consistent with the fact that the v-locking algo-
time. If a global subtransaction is aborted locally, it is
rithm is better able to detect global conflicts and thus
communicated to the global system and the global transac-
TRANSACTION PROCESSING IN MOBILE, HETEROGENEOUS DATABASE SYSTEMS 7

Global Throughput with Cache Gain in Throughput between Cache and Non-Cache

2.00 0.70
Throughput (T/sec)

Throughput Gain
0.60
1.50 V-Lock 0.50
V-Lock
PCG 0.40
1.00 PCG
Forced Conflicts 0.30
Forced Conflicts
0.50 0.20
Site-Graph Site-Graph
0.10
0.00 0.00
5 10 15 20 30 40 50 75 100 0.10
5 10 15 20 30 40 50 75 100
Number of Active Global Transactions
Number of Active Global Transactions
Figure 1. Global throughput with P-Caching.
Figure 3. Comparison of the sensitivity of the P-Caching algorithm.

achieves higher concurrency than the other algorithms. As schemes when the number of active global transactions is
can be abserved, the maximum throughput occurs at a greater than 75.
multi-programming level approximately equal to 40. As The simulator also measured the percentage of com-
the number of concurrent global transactions increases, pleted transactions for the various concurrency control
the number of completed global transactions decreases due algorithms. In general, for all schemes, the number of
to the increase in the number of conflicts. The peak completed transactions decreased as the number of con-
throughput for each concurrency control scheme is slightly current transactions increased, due to more conflicts
higher with the use of caching. Furthermore, for all simu- among the transactions. However, the performance of
lated algorithms, the caching scheme allows a higher num- both the forced conflict and the site-graph algorithms
ber of active global transactions and, hence, higher decreased at a faster rate, which is due to the increase in
throughput. This characteristic is attributed to the cache the number of false aborts detected by these algorithms.
hits on the read-only data. For the non-cache case, the The v-locking algorithm more accurately detects deadlocks
throughput is low until the active number of global trans- by differentiating between global and indirect conflicts and,
actions reaches about 30, with a rapid increase of the therefore, performs better than the PCG algorithm.
throughput from 30 to 40 active transactions. This occurs The simulator also measured the communication utili-
because of the weak connections and disconnections. With zation. It was found that the communication utilization
the p-caching algorithm, the rate of the increase in through- decreases with the use of the cache. At 20 active global
put is more gradual because the local cache can service the transactions, the v-locking algorithm uses 40% of the
read-only queries under weak connectivity or disconnec- communication bandwidth versus 69% utilization without
tion. the cache. Similarly, with 30 active global transactions,
The gain in the throughput, sensitivity, of the p-caching there is a 75% versus 91% communication utilization with
algorithm for different concurrency control schemes, is and without the cache, respectively. This result is attri-
shown in Fig. 3. The v-locking scheme shows the greatest buted to the reduction in transferred data from parity
sensitivity to the caching algorithm. At 20 active global acknowledgments and local accesses to the cache. At
transactions, there is an improvement in the throughput of peak throughput, both locking algorithms (v-locking and
approximately 0.6 when using a cache. At the peak PCG) were using nearly 100% of the communication chan-
throughput of 40 simultaneous transactions, the through- nel. The communication utilization was about 100% at peak
put is increased by 0.2. The PCG, site-graph, and forced throughput and decreased slightly as the number of
conflict algorithms show similar characteristics to the concurrent transactions increased. It is easy to determine
v-locking algorithm; however, the sensitivity of these algo- from this result that the communication requirements for
rithms is less. The caching becomes ineffective for all the v-locking algorithm represent the bottleneck of the
system for both the caching and the non-caching case.
Global Throughput without Cache
FUTURE RESEARCH DIRECTIONS
1.5
Throughput (T/sec)

V-Lock The requirements of an anytime, anywhere computing


1 environment motivate new concepts that effectively allow a
PCG
Forced Conflicts
user to access information in a timely and reliable manner.
0.5 In such an environment, a potentially large number of
Site-Graph
users may simultaneously access a rapidly increasing
0 amount of aggregate, distributed data. This usage moti-
5 15 30 50 100
vates the need for a proper concurrency control algorithm
Number of Active Global Transactions that offers higher throughput in the face of the limitations
imposed by technology. A distributed, hierarchically orga-
Figure 2. Global throughput without P-Caching.
nized concurrency control algorithm was presented and
8 TRANSACTION PROCESSING IN MOBILE, HETEROGENEOUS DATABASE SYSTEMS

evaluated that satisfies these limitations. The semantic performance of the read-only query and hence overall
information contained within the SSM was used to main- systems throughput. The effect of the cache on the
tain the global locking tables to serialize conflicting opera- MDAS environment should be studied. This could be
tions of global transactions and to detect and break done by changing the cache-hit ratio to a raw prob-
deadlocked transactions. Data duplication in the form of ability that a read-only query is valid or invalid. A
replication and caches was also used to lessen the effects of quality-of-service QOS approach is ideally suited for
weak communications or disconnection. The duplicated such a general-purpose cache coherence protocol, pro-
data at the mobile node allow the user to continue to viding strong consistency for those data items that
work in case of a weak connection or disconnection. Auto- require it while permitting weaker consistency for
mated queued queries and bundled queries could be used to less critical data (12). Therefore, it would be interest-
address the limited bandwidth and local autonomy restric- ing to investigate the effectiveness of such a QOS
tions in an MDAS environment. approach on the performance metrics that determine
The work presented in this article can be extended in the effectiveness of the concurrency control policies.
several directions:

 Application of mobile agents: Recently the literature BIBLIOGRAPHY


has shows a growing interest in the application and
incorporation of mobile agent paradigm in an informa- 1. A. R. Hurson and M. W. Bright, Multidatabase systems: An
tion retrieval system (14). When mobile agents are advanced concept in handling distributed data, Adv. Comput.,
introduced into the system, mobile agents can roam 32: 149200, 1991.
the network and fulfill their tasks without the owners 2. J. B. Lim and A. R. Hurson, Heterogeneous data access in a
intervention; consequently, mobile users only need to mobile environmentissues and solutions, Adv. Comput., 48:
maintain the communication connection during the 119178, 1999.
agent submission and retraction. In addition, by 3. A. R. Hurson and Y. Jiao, Data broadcasting in a mobile
migrating from the mobile device to the core network, environment, in D. Katsaros et al. (eds.), Wireless Information
the agents can take full advantage of the high band- Highway., Hershey, PA: IRM Press, 2004, pp. 96154.
width of the wired portion of the network and the high 4. M. W. Bright, A. R. Hurson, and S. H. Pakzad, Automated
computation capability of servers/workstations. More- resolution of semantic heterogeneity in multidatabases,
over, mobile agents migration capability allows them ACM Trans. Database Syst., 19(2): 212253, 1994.
to handle tasks locally instead of passing messages 5. T. Berners-Lee, Semantic Web Roadmap. Available: http://
between the involved data sources and, hence, reduce www.w3.org/DesignIssues/Semantic.html.
the number of messages that are needed in accomplish- 6. W3C(a), Extensible Markup Language. Available: http://
ing a task. To summarize, the use of mobile agents www.w3.org/XML/.
relaxes requirements on mobile users critical resour- 7. W3C(b), Resource Description Framework. Available: http://
ces such as connectivity, bandwidth, and energy. www.w3.org/RDF/.
Therefore, within the scope of the MDAS, it would 8. W3C(c), OWL Web Ontology Language Overview. Available:
be of interest to investigate concurrency control algo- http://www.w3.org/TR/owl-features/.
rithms at the presence of the mobile agents in the 9. J. Lim and A. R. Hurson, Transaction processing in mobile,
system. heterogeneous database systems, IEEE Trans. Knowledge
 Multimedia databases: The demand of image data Data Eng., 14(6): 13301346, 2002.
management has raised the research on content-based 10. Y. Breitbart, H. GarciaMolina, and A. Silberschatz, Overview
retrieval models (15, 16). In contrast to the traditional of multidatabase transaction management, VLDB J., 1(2):
181239, 1992.
text-based systems, these applications usually consist
of a large volume of image data whose semantic con- 11. K. Segun, A. R. Hurson, V. Desai, A. Spink, and L. L. Miller,
Transaction management in a mobile data access system, Ann.
tents cannot be represented efficiently using the tradi-
Rev. Scalable Comput., 3: 85147, 2001.
tional database models. Most of the present content-
12. J. Sustersic and A. R. Hurson, Coherence protocols for bus-
based image retrieval approaches employ the feature
based and scalable multiprocessors, Internet, and wireless
vectors to facilitate content-based query processing
distributed computing environment: A survey, Adv. Comput.,
the features are extracted from image pixels, heuris- 59: 211278, 2003.
tically or empirically, and combined into vectors
13. P. Cao and C. Liu, Maintaining strong cache consistency in the
according to the application criterion. However, these World Wide Web, IEEE Trans. Comput., 47(4): 445457, 1998.
low-level features cannot represent the semantic con-
14. Y. Jiao and A. R. Hurson, Application of mobile agents in mobile
tents and therefore do not provide an ideal basis for data access systemsa prototype, J. Database Manage., 15(4):
semantic-based image retrieval. To introduce novel 124, 2004.
schemes to facilitate semantic-based image content 15. B. Yang and A. R. Hurson, An extendible semantic-based
query/transaction management in a distributed het- content representation method for distributed image databases,
erogeneous database environment, i.e., MDAS, will be Proc. International Symposium on Multimedia Software
of great interest to both academia and industry. Engineering, 2004, pp. 222226.
 Quality-of-Service Cache Coherence: The p-caching 16. B. Yang, A. R. Hurson, and Y. Jiao, On the Content Predict-
strategy showed promising results in improving the ability of Cooperative Image Caching in Ad Hoc Networks,
TRANSACTION PROCESSING IN MOBILE, HETEROGENEOUS DATABASE SYSTEMS 9

Proc. International Conference on Mobile Data Management, A. Brayner and F. S. Alencar, A semantic-serializability based
2006. fully-distributed concurrency control mechanism for mobile multi-
database systems, proc. International Workshop on Database and
Expert Systems Applications, 2005.
FURTHER READING R. A. Dirckze and L. Gruenwald, A pre-serialization transaction
management technique for mobile multi-databases, Mobile
A. Elmagarmid, J. Jing, and T. Furukawa, Wireless client/server Networks Appl., 5: 311321, 2000.
computing for personal information services and applications,
ACM Sigmod Record, 24(4): 1621, 1995.
M. Franklin, M. Carey, and M. Livny, Transactional client-server J. B. LIM
cache consistency: Alternatives and performance, ACM Trans. MJL Technology
Database Syst., 22(3): 315363, 1995. Seoul, South Korea
S. Mehrotra, H. Korth, and A. Silberschatz, Concurrency control in A. R. HURSON
hierarchical multi-database systems, VLDB J., 6: 152172, 1997. Y. JIAO
E. Pitoura and B. Bhargava, A framework for providing consistent The Pennsylvania State
and recoverable agent-based access to heterogeneous mobile data- University
bases, ACM Sigmod Record, 24(3): 4449, 1995. State College, Pennsylvania
V
VERY LARGE DATABASES attribute Xj . Without loss of generality, we assume that
each dimension Dj is indexed by the set of integers
A growing number of database applications require online, f0; 1; . . . ; jD j j  1g, where jD j j denotes the size of dimen-
interactive access to very large volumes of data to perform a sion Dj. We assume that the attributes {X1,. . .,Xd} are
variety of data analysis tasks. As an example, large tele- ordinal in nature, that is, their domains are naturally
communication and Internet service providers typically col- ordered, which captures all numeric attributes (e.g., age,
lect and store Gigabytes or Terabytes of detailed usage income) and some categorical attributes (e.g., education).
information (Call Detail Records, SNMP/RMON packet Such domains can always be mapped to the set of integers
flow data, etc.) from the underlying network to satisfy the mentioned above while preserving the natural domain
requirements of various network management tasks, includ- order and, hence, the locality of the distribution. It is
ing billing, fraud/anomaly detection, and strategic planning. also possible to map unordered domains to integer values;
Such large datasets are typically represented either as mas- however, such mappings do not always preserve locality.
sive alphanumeric data tables (in the relational data model) For example, mapping countries to integers using alpha-
or as massive labeled data graphs (in richer, semistructured betic ordering can destroy data locality. There may be
data models, such as extensible markup language (XML)). In alternate mappings that are more locality preserving,
order to deal with the huge data volumes, high query com- (e.g., assigning neighboring integers to neighboring coun-
plexities, and interactive response time requirements char- tries). (Effective mapping techniques for unordered attri-
acterizing these modern data analysis applications, the idea butes are an open research issue that lies beyond the scope
of effective, easy-to-compute approximations over precom- of this article.) The d-dimensional joint-frequency array AR
puted, compact data synopses has recently emerged as a comprises N Pdi1 jDi j cells with cell AR [i1, i2,. . ., id]
viable solution. Due to the exploratory nature of most target containing the count of tuples in R having X j i j for
applications, there are a number of scenarios in which a each attribute 1  j  d.
(reasonably accurate) fast approximate answer over a small- The common goal of all relational data reduction tech-
footprint summary of the database is actually preferable over niques is to produce compact synopsis data structures
an exact answer that takes hours or days to compute. For that can effectively approximate the d-dimensional joint-
example, during a drill-down query sequence in ad hoc data frequency distribution AR. In what follows, we give an
mining, initial queries in the sequence frequently have the overview of a few key techniques for relational data reduc-
sole purpose of determining the truly interesting queries and tion, and discuss some of their main strengths and weak-
regions of the database. Providing fast approximate answers nesses as well as recent developments in this area of
to these initial queries gives users the ability to focus their database research. More exhaustive and detailed surveys
explorations quickly and effectively, without consuming inor- can be found elsewhere; see, for example, Refs. 1 and 2.
dinate amounts of valuable system resources. The key, of
course, behind such approximate techniques for dealing with Sampling-Based Techniques
massive datasets lies in the use of appropriate data reduction
techniques for constructing compact data synopses that can Sampling methods are based on the notion that a large
accurately approximate the important features of the under- dataset can be represented by a small uniform random
lying data distribution. In this article, we provide an over- sample of data elements, an idea that dates back to the end
view of date reduction and approximation methods for of the nineteenth century. In recent years, there has been
massive databases and discuss some of the issues that increasing interest in the application of sampling ideas as
develop from different types of data, large data volumes, a tool for data reduction and approximation in relational
and applications-specific requirements. database management systems (38). Sample synopses
can be either precomputed and incrementally maintained
(e.g., Refs. 4 and 9) or they can be obtained progressively
APPROXIMATION TECHNIQUES FOR MASSIVE at run-time by accessing the base data using specialized
RELATIONAL DATABASES data access methods (e.g., Refs. 10 and 11). Appropriate
estimator functions can be applied over a random sample
Consider a relational table R with d data attributes X1, of a data collection to provide approximate estimates for
X2, . . . Xd. We can represent the information in R as a quantitative characteristics of the entire collection (12).
d-dimensional array AR , whose jth dimension is indexed The adequacy of sampling as a data-reduction mechanism
by the values of attribute Xj and whose cells contain the depends crucially on how the sample is to be used. Random
count of tuples in R having the corresponding combination samples can typically provide accurate estimates for
of attribute values. AR is essentially the joint frequency aggregate quantities (e.g., COUNTs or AVERAGEs) of a
distribution of all the data attributes of R. More formally, (sub)population (perhaps determined by some selection
let D fD1 ; D2 ; . . . ; Dd g denote the set of dimensions of predicate), as witnessed by the long history of successful
AR, where dimension Dj corresponds to the value domain of applications of random sampling in population surveys

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 VERY LARGE DATABASES

(12,13). An additional benefit of random samples is that frequencies and values. Similar to the one-dimensional
they can provide probabilistic guarantees (i.e., confidence case, uniformity assumptions are made to approximate
intervals) on the quality of the approximation (7,11). On the distribution of frequencies and values within each
the other hand, as a query approximation tool, random bucket (21). Finding optimal histogram bucketizations is
sampling is limited in its query processing scope, espe- a hard optimization problem that is typically NP-complete
cially when it comes to the workhorse operator for even for two dimensions (23). Various greedy heuristics for
correlating data collections in relational database sys- multidimensional histogram construction have been pro-
tems, the relational join. The key problem here is that a posed (21,22,24) and shown to perform reasonably well for
join operator applied on two uniform random samples low to medium data dimensionalities (e.g., d 25).
results in a nonuniform sample of the join result that Recent work has demonstrated the benefits of histogram
typically contains very few tuples, even when the join synopses (compared with random samples) as a tool for
selectivity is fairly high (9). Furthermore, for nonaggre- providing fast, approximate answers to both aggregate and
gate queries, execution over random samples of the data is nonaggregate (i.e., set-valued) user queries over low-
guaranteed to always produce a small subset of the exact dimensional data (14). Other studies have also considered
answer, which is often empty when joins are involved the problem of incrementally maintaining a histogram
(9,14). The recently proposed join synopses method (9) synopsis over updates (25,26) or using query feedback
provides a (limited) sampling-based solution for handling (27,28), and the effectiveness of random sampling for
foreign-key joins that are known beforehand (based on an approximate histogram construction (29). Unfortunately,
underlying star or snowflake database schema). Tech- like most techniques that rely on space partitioning (includ-
niques for appropriately biasing the base-relation sam- ing the wavelet-based techniques of the next section),
ples for effective approximate join processing have also multidimensional histograms also fall victim to the curse
been studied recently (3). of dimensionality, which renders them ineffective above
56 dimensions (24).
Histogram-Based Techniques
Wavelet-Based Techniques
Histogram synopses or approximating one-dimensional data
distributions have been extensively studied in the research Wavelets are a mathematical tool for the hierarchical
literature (1519), and have been adopted by several com- decomposition of functions with several successful appli-
mercial database systems. Briefly, a histogram on an attri- cations in signal and image processing (30,31). Broadly
bute X is constructed by employing a partitioning rule to speaking, the wavelet decomposition of a function consists
partition the data distribution of X into a number of mutually of a coarse overall approximation along with detail coeffi-
disjoint subsets (called buckets), and approximating the cients that influence the function at various scales (31). A
frequencies and values in each bucket in some common number of recent studies have also demonstrated the
fashion. Several partitioning rules have been proposed for effectiveness of the wavelet decomposition (and Haar
the bucketization of data distribution pointssome of the wavelets, in particular) as a data reduction tool for data-
most effective rules seem to be ones that explicitly try to base problems, including selectivity estimation (32) and
minimize the overall variance of the approximation in the approximate query processing over massive relational
histogram buckets (1719). The summary information tables (3335).
stored in each bucket typically comprises (1) the number Suppose we are given the one-dimensional data fre-
of distinct data values in the bucket, and (2) the average quency vector A containing the N 8 values A 2; 2; 0;
frequency of values in the bucket, which are used to 2; 3; 5; 4; 4. The Haar wavelet decomposition of A can be
approximate the actual bucket contents based on appropri- computed as follows. We first average the values together
ate uniformity assumptions about the spread of different pairwise to get a new lower-resolution representation of
values in the bucket and their corresponding frequencies the data with the following average values [2,1,4,4]. In
(19). other words, the average of the first two values (that is, 2
One-dimensional histograms can also be used to approx- and 2) is 2, that of the next two values (that is, 0 and 2) is 1,
imate a (multidimensional) joint-frequency distribution and so on. Obviously, some information has been lost in
AR through a mutual-independence assumption for the this averaging process. To be able to restore the original
data attributes {X1, . . ., Xd}. Mutual independence essen- values of the frequency array, we need to store some detail
tially implies that the joint-frequency distribution can be coefficients that capture the missing information. In Haar
obtained as a product of the one-dimensional marginal wavelets, these detail coefficients are simply the differ-
distributions of the individual attributes Xi. Unfortunately, ences of the (second of the) averaged values from the
experience with real-life datasets offers overwhelming evi- computed pairwise average. Thus, in our simple example,
dence that this independence assumption is almost always for the first pair of averaged values, the detail coefficient is
invalid and can lead to gross approximation errors in 0 because 2  2 0; for the second sample, we again need
practice (20,21). Rather than relying on heuristic indepen- to store 1 because 1  2 1. Note that no information
dence assumptions, multidimensional histograms [origin- has been lost in this processit is fairly simple to recon-
ally introduced by Muralikrishna and DeWitt (22)] try to struct the eight values of the original data frequency array
directly approximate the joint distribution of {X1,. . ., Xd} from the lower-resolution array containing the four
by strategically partitioning the data space into d-dimen- averages and the four detail coefficients. Recursively
sional buckets in a way that captures the variation in data applying the above pairwise averaging and differencing
VERY LARGE DATABASES 3

process on the lower-resolution array containing the optimal and approximate thresholding algorithms are
averages, we get the following full decomposition: based on novel Dynamic-Programming (DP) techniques
that take advantage of the coefficient-tree structure of the
Haar decomposition. This turns out to be a fairly powerful
Resolution Averages Detail Coefficients
idea for wavelet synopsis construction that can handle a
3 [2, 2, 0, 2, 3, 5, 4, 4] broad, natural class of distributive error metrics (which
2 [2, 1, 4, 4] [0, 1, 1, 0] includes several useful error measures for approximate
1 [3/2, 4] [1/2, 0] query answers, such as maximum or mean weighted rela-
0 [11/4] [5/4]
tive error and weighted L p -norm error) (40). The above
wavelet thresholding algorithms for non-SSE error metrics
The Haar wavelet decomposition of A is the single consider only the restricted version of the problem, where
coefficient representing the overall average of the fre- the algorithm is forced to select values for the synopsis from
quency values followed by the detail coefficients in the the standard Haar coefficient values. As observed by Guha
order of increasing resolution. Thus, the one-dimensional and Harb (41), such a restriction makes little sense when
Haar wavelet transform of A is given by WA 11=4; 5=4; optimizing for non-SSE error, and can, in fact, lead to sub-
1=2; 0; 0; 1; 1; 0. Each entry in WA is called a wavelet optimal synopses. Their work considers unrestricted Haar
coefficient. The main advantage of using WA instead of the wavelets, where the values retained in the synopsis are
original frequency vector A is that for vectors containing specifically chosen to optimize a general (weighted) L p -
similar values most of the detail coefficients tend to have norm error metric. Their proposed thresholding schemes
very small values. Thus, eliminating such small coefficients rely on a DP over the coefficient tree (similar to that in (40)
from the wavelet transform (i.e., treating them as zeros) that also iterates over the range of possible values for each
introduces only small errors when reconstructing the ori- coefficient. To keep time and space complexities manage-
ginal data, resulting in a very effective form of lossy data able, techniques for bounding these coefficient-value
compression (31). Furthermore, the Haar wavelet decom- ranges are also discussed (41).
position can also be extended to multidimensional joint-
frequency distribution arrays through natural generaliza- Advanced Techniques
tions of the one-dimensional decomposition process
described above (33,35). Thus, the key idea is to apply Recent research has proposed several sophisticated
the decomposition process over an input dataset along methods for effective data summarization in relational
with a thresholding procedure in order to obtain a compact database systems. Getoor et al. (42) discuss the applica-
data synopsis comprising of a selected small set of Haar tion of Probabilistic Relational Models (PRMs) (an exten-
wavelet coefficients. The results of several research studies sion of Bayesian Networks to the relational domain) in
(3237) have demonstrated that fast and accurate approx- computing accurate selectivity estimates for a broad class
imate query processing engines (for both aggregate and of relational queries. Deshpande et al. (43) pro-posed
nonaggregate queries) can be designed to operate solely dependency-based histograms, a novel class of histogram-
over such compact wavelet synopses. based synopses that employs the solid foundation of
Other recent work has proposed probabilistic counting statistical interaction models to explicitly identify and
techniques for the efficient online maintenance of wavelet exploit the statistical characteristics of the data and, at
synopses in the presence of updates (38), as well as time- the same time, address the dimensionality limitations of
and space-efficient techniques for constructing wavelet multidimensional histogram approximations. Spiegel
synopses for datasets with multiple measures (such as and Polyzotis (44) propose the Tuple-Graph synopses
those typically found in OLAP applications) (39). All the that view the relational database as a semi-structured
above-mentioned studies rely on conventional schemes data graph and employ summarization models inspired
for eliminating small wavelet coefficients in an effort to by XML techniques in order to approximate the joint
minimize the overall sum-squared error (SSE). Garofalakis distribution of join relationships and values. Finally,
and Gibbons (34,36) have shown that such conventional Jagadish et al. (45) and Babu et al. (46) develop semantic
wavelet synopses can suffer from several important pro- compression techniques for massive relational tables
blems, including the introduction of severe bias in the data based on the idea of extracting data mining models
reconstruction and wide variance in the quality of the data from an underlying data table, and using these models
approximation, as well as the lack of nontrivial guarantees to effectively compress the table to within user-specified,
for individual approximate answers. In contrast, their per-attribute error bounds.
proposed probabilistic wavelet synopses rely on a probabil- Traditional database systems and approximation tech-
istic thresholding process based on randomized rounding niques are typically based on the ability to make multiple
that tries to probabilistically control the maximum relative passes over persistent datasets that are stored reliably in
error in the synopsis by minimizing appropriate probabil- stable storage. For several emerging application domains,
istic metrics. however, data arrives at high rates and needs to be pro-
In more recent work, Garofalakis and Kumar (40) show cessed on a continuous 24  7 basis, without the benefit of
that the pitfalls of randomization can be avoided by intro- several passes over a static, persistent data image. Such
ducing efficient schemes for deterministic wavelet thresh- continuous data streams occur naturally, for example, in
olding with the objective of optimizing a general class of the network installations of large telecom and Internet
error metrics (e.g., maximum or mean relative error). Their service providers where detailed usage information (call
4 VERY LARGE DATABASES

detail records (CDRs), SNMP/RMON packet-flow data, nested paths. Thus, the first expression retrieves all
etc.) from different parts of the underlying network needs authors, and, for each one, the nested paths retrieve the
to be continuously collected and analyzed for interesting titles of their papers and books. The final result contains all
trends. As a result, we are witnessing a recent surge of possible combinations of an author node, with a paper title
interest in data stream computation, which has led to node and a book title node that it reaches. Twig queries
several (theoretical and practical) studies proposing novel represent the equivalent of the SQL FROM clause in the
one-pass algorithms for effectively summarizing massive XML world, as they model the generation of element tuples,
relational data streams in a limited amount of memory which will eventually be processed to compute the final
(4655). result of the XML query.
The goal of existing XML data reduction techniques is
APPROXIMATION TECHNIQUES FOR MASSIVE XML to summarize, in limited space, the key statistical pro-
DATABASES perties of an XML database in order to provide selectivity
estimates for the result size of path expressions or twig
XML (56) has rapidly evolved from a markup language for queries. Selectivity estimation is a key step in the opti-
web documents to an emerging standard for data exchange mization of declarative queries over XML repositories and
andintegrationovertheInternet.Thesimple,self-describing is thus key for the effective implementation of high-level
nature of the XML standard promises to enable a broad suite query languages (6466). Given the form of path expres-
of next-generation Internet applications, ranging from intel- sions and twig queries, an effective XML summary needs
ligent web searchingand queryingtoelectronic commerce.In to capture accurately both the path structure of the data
many respects, XML represents an instance of semistruc- graph and the value distributions that are embedded
tured data (57): The underlying data model comprises a therein. In that respect, summarizing XML data is a
labeled graph of element nodes, where each element can be more complex problem than relational summarization,
either an atomic data item (i.e., raw character data) or a which focuses mainly on value distributions. As with any
composite data collection consisting of references (repre- approximation method, the proposed XML techniques
sented as graph edges) to other elements in the graph. store compressed distribution information on specific
Moreformally,anXMLdatabasecanbemodeledasadirected characteristics of the data, and use statistical assumptions
graph G(VG, EG), where each node u 2 VG corresponds to a in order to compensate for the loss of detail due to compres-
document element, or an element attribute, with label sion. Depending on the specifics of the summarization
label(u). If u is a leaf node, then it can be associated model, the proposed techniques can be broadly classified
with a value value(u). An edge (u, v) denotes either the in three categories: (1) techniques that use a graph
nesting of v under u in the XML document, or a reference synopsis, (2) techniques that use a relational summariza-
from u to v, through ID/IDREF attributes or XLink con- tion method, such as histograms or sampling, and (3)
structs (5860). techniques that use a Markovian model of path distribu-
XML query languages use two basic mechanisms for tion. It should be noted that, conceptually, the proposed
navigating the XML data graph and retrieving qualifying summarization techniques can also be used to provide
nodes, namely, path expressions and twig queries. A path approximate answers for XML queries; this direction, how-
expression specifies a sequence of navigation steps, where ever, has not been explored yet in the current literature
each step can be predicated on the existence of sibling paths and it is likely to become an active area of research in the
or on the value content of elements, and the elements near future.
at each step can be linked through different structural
relationships (e.g., parent-child, ancestor-child, or Graph-Synopsis-Based Techniques
relationships that involve the order of elements in
the document). As an example, the path expression At an abstract level, a graph synopsis summarizes the basic
==author =book==year 2003 ==paper will select all path structure of the document graph. More formally, given
paper elements with an author ancestor, which is the root of a data graph G VG ; EG , a graph synopsis SG
at least one path that starts with book and ends in year, and VS ; ES is a directed node-labeled graph, where (1) each
the value of the ending element is 2003. The example node v 2 VS corresponds to a subset of element (or attri-
expression is written in the XPath (61) language, which bute) nodes in VG (termed the extent of) that have the same
lies at the core of XQuery (62) and XSLT (63), the dominant label, and (2) an edge in (u, v) 2 EG is represented in ES as
proposals from W3C for querying and transforming XML an edge between the nodes whose extents contain the two
data. endpoints u and v. For each node u, the graph synopsis
A twig query uses multiple path expressions in order to records the common tag of its elements and a count field for
express a complex navigation of the document graph and the size of its extent.
retrieve combinations of elements that are linked through In order to capture different properties of the underlying
specific structural relationships. As an example, consider path structure and value content, a graph synopsis is
the following twig query, which is expressed in the XQuery augmented with appropriate, localized distribution infor-
(62) language: for $a in //author, $p in $a//paper/ mation. As an example, the structural XSKETCH-summary
title, $b in $a//book/title. The evaluation of the mechanism (67), which can estimate the selectivity of
path expressions proceeds in a nested-loops fashion, by simple path expressions with branching predicates, aug-
using the results of parent paths in order to evaluate ments the general graph-synopsis model with localized
VERY LARGE DATABASES 5

per-edge stability information, indicating whether the in ui and the centroid, provides a measure of the error of
synopsis edge is backward-stable or forward-stable. In approximation. The TREESKETCH study has shown that a
short, an edge (u, v) in the synopsis is said to be forward- partitioning of elements with low clustering error provides
stable if all the elements of u have at least one child in v; an accurate approximation of the path distribution, and
similarly, (u, v) is backward-stable if all the elements in v essentially enables low-error selectivity estimates for struc-
have at least one parent in u [note that backward/forward tural twig queries. A follow-up study has introduced the
(B/F) stability is essentially a localized form of graph bisi- XCLUSTERs (73) model that extends the basic TREESKETCH
milarity (68)]. Overall, edge stabilities capture key proper- synopses with information on element content. The main
ties of the connectivity between different synopsis nodes idea is to augment the centroid of each cluster with a value-
and can summarize the underlying path structure of the summary that approximates the distribution of values in
input XML data. the enclosed elements. The study considers three types of
In a follow-up study (69), the structural XSketch model content: numerical values queried with range predicates,
is augmented with localized per-node value distribution string values queried with substring predicates, and text
summaries. More specifically, for each node u that repre- values queried with term-containment predicates. Thus, the
sents elements with values, the synopsis records a sum- key novelty of XCLUSTERs is that they provide a unified
mary H(u), which captures the corresponding value platform for summarizing the structural and heterogeneous
distribution and thus enables selectivity estimates for value content of an XML data set. Finally, Zhang et al. have
value-based predicates. Correlations among different value proposed the XSeed (74) framework for summarizing the
distributions can be captured by a multidimensional sum- recursive structure of an XML data set. An XSeed summary
mary H(u), which approximates the joint distribution of resembles a TREESKETCH synopsis where all elements of the
values under u and under different parts of the document. same tag are mapped to a single cluster. The difference is
It should be noted that, for the single-dimensional case, that each synopsis edge may be annotated with multiple
H(u) can be implemented with any relational summariza- counts, one per recursive level in the underlying data. To
tion technique; the multidimensional case, however, illustrate this, consider an element path =e1 =e01 =e2 =e02 where
imposes certain restrictions due to the semantics of path e1 and e2 correspond to cluster u and e01 and e02 to cluster u0 .
expressions, and thus needs specialized techniques that The sub-path e1 =e01 will map to an edge between u and u0 and
can estimate the number of distinct values in a distribution will contribute to the first-level child count. The sub-path
[examples of such techniques are range-histograms (69), e2 =e02 will map to the same edge, but will contribute to the
and distinct sampling (70)]. second-level child count from u to u0 . Hence, XSeed stores
The TWIGXSKETCH (71) model is a generalization more fine-grained information compared to a TREESKETCH
of the XSKETCH synopses that deals with selectivity synopsis that uses a single count for all possible levels. This
estimation for twig queries. Briefly, the key idea in level-based information is used by the estimation algorithm
TWIGXSKETCHes is to capture, in addition to localized in order to approximate more accurately the selectivity of
stability information, the distribution of document edges recursive queries (i.e., with the // axis) on recursive data.
for the elements in each nodes extent. In particular, each
synopsis node records an edge histogram, which sum- Histogram- and Sampling-Based Techniques
marizes the distribution of child counts across different
Several XML-related studies attempt to leverage the avail-
stable ancestor or descendant edges. As a simple example,
able relational summarization techniques by casting the
consider a synopsis node u and two emanating synopsis
XML summarization problem into a relational context.
edges (u, v) and (u, w); a two-dimensional edge histogram
More specifically, the proposed techniques represent the
Hu(c1, c2) would capture the fraction of data elements in
path structure and value content of the XML data in terms
extent(u) that have exactly c1 children in extent(v) and
of flat value distributions, which are then summarized
c2 children in extent(w). Overall, TWIGXSKETCHes store
using an appropriate relational technique.
more fine-grained information on the path structure of
The StatiX (75) framework uses histogram-based tech-
the data, and can thus capture, in more detail, the joint
niques and targets selectivity estimation for twig queries
distribution of path counts between the elements of the
over tree-structured data (note, however, that StatiX needs
XML dataset.
the schema of the XML data in order to determine the set of
Recent studies (7375) have proposed a variant of
histograms, which makes the technique nonapplicable to
graph-synopses that employ a clustering-based model in
the general case of schema-less documents). StatiX parti-
order to capture the path and value distribution of the
tions document elements according to their schema type
underlying XML data. Under this model, each synopsis
and represents each group as a set of (pid, count) pairs,
node is viewed as a cluster and the enclosed elements
where pid is the id of some element p and count is the
are assumed to be represented by a corresponding cen-
number of elements in the specific partition that have p as
troid, which is derived in turn by the aggregate character-
parent. Obviously, this scheme encodes the joint distribu-
istics of the enclosed XML elements. The TREESKETCH (72)
tion of children counts for the elements of each partition.
model, for instance, defines the centroid of a node ui as a
This information is then compressed using standard rela-
vector of average child counts c1 ; c2 ;    ; cn , where c j is the
tional histograms, by treating pid as the value and count as
average child count from elements in Ai to every other node
the frequency information.
u j . Thus, the assumption is that each element in ui has
A similar approach is followed in position histograms
exactly c j children to node u j . Furthermore, the clustering
(76), which target selectivity estimation for two-step path
error, that is, the difference between the actual child counts
6 VERY LARGE DATABASES

expressions of the form A//B. In this technique, each ele- combines the recorded probabilities using the Markovian
ment is represented as a point (s, e) in 2-dimensional space, independence assumption.
where s and e are the start and end values of the element in Correlated Suffix Trees (CSTs) (80) employ a similar
the depth-first traversal of the document tree; thus, (sa, ea ) Markovian assumption in order to estimate the selectivity
is an ancestor of (sb, eb ), if sa < sb < eb < ea . The proposed of twig queries. The path distribution of the document is
summarization model contains, for each tag in the docu- stored in a tree structure, which records the most fre-
ment, one spatial histogram that summarizes the distribu- quently occurring suffixes of root-to-leaf paths; thus, the
tion of the corresponding element points. A spatial join tree encodes frequent paths of variable lengths, instead of
between histograms is then sufficient to approximate using a predefined fixed length as the Markov Histogram
the ancestor-descendant relationship between elements approach. In addition to frequent path suffixes, the sum-
of different tags. mary records a hash signature for each outgoing path of a
A recent study (77) has introduced two summarization tree node, which encodes the set of elements in the nodes
models, namely the Position Model and the Interval extent that have at least one matching outgoing document
Model, which are conceptually similar to position histo- path. Intuitively, an intersection of hash signatures,
grams but use a different encoding of structural relation- where each signature corresponds to a different label
ships. Again, the focus is on selectivity estimation for two- path, approximates the number of elements that have
step paths of the form A//B. The Position Model encodes descendants along all represented paths. Combined with
each element in A as a point (sa, ea), and each element in B path frequency information, this information yields an
as a point sb; the selectivity is then computed as the approximation of the joint path-count distribution for
number of sb points contained under an (sa, ea ) interval. different subsets of document elements.
In the Interval Model, a covering matrix C records the
number of points in A whose interval includes a specific
BIBLIOGRAPHY
start position, whereas a position matrix P includes the
start positions of elements in B; the estimate is then
1. D. Barbara, W. DuMouchel, C. Faloutsos, P. J. Haas, J. M.
computed by joining the two tables and summing up the
Hellerstein, Y. Ioannidis, H. V. Jagadish, T. Johnson, R. Ng, V.
number of matched intervals. Clearly, both models reduce Poosala, K. A. Ross, and K. C. Sevcik, The New Jersey data
the XML estimation problem to operations on flat value reduction report, IEEE Data Eng. Bull., 20(4): 345, 1997,
distributions, which can be approximated using relational (Special Issue on Data Reduction Techniques).
summarization techniques. 2. M. Garofalakis and P. B. Gibbons, Approximate query proces-
sing: Taming the Terabytes, Tutorial in 27th Intl. Conf. on Very
Markov-Model-Based Techniques Large Data Bases, Roma, Italy, September 2001.
At an abstract level, the path distribution of an XML 3. S. Chaudhuri, R. Motwani, and V. Narasayya, On random
sampling over joins, in Proceedings of the 1999 ACM SIGMOD
dataset can be modeled with the probability of observing
International Conference on Management of Data, Philadel-
a specific tag as the next step of an existing path. Recent phia, PA, May 1999, pp. 263274.
studies have investigated data reduction techniques that
4. P. B. Gibbons and Y. Matias, New sampling-based summary
summarize the path structure by approximating, in limited statistics for improving approximate query answers, in Pro-
space, the resulting path probability distribution. The ceedings of the 1998 ACM SIGMOD International Conference
principal idea of the proposed techniques is to compress on Management of Data, Seattle, WA, June 1998, pp. 331342.
the probability distribution through a Markovian assump- 5. P. J. Haas and A. N. Swami, Sequential sampling procedures
tion: If p is a path that appears in the document and l is a for query size estimation, in Proceedings of the 1992 ACM
tag, then the probability that p/l is also a path depends only SIGMOD International Conference on Management of Data,
on a suffix p of p (i.e., the next step is not affected by distant San Diego, CA, June 1992, pp. 341350.
ancestor tags). Formally, this assumption can be expressed 6. R. J. Lipton, J. F. Naughton, and D. A. Schneider, Practical
as P p=l P p  Plj p, where Pq is the probability of selectivity estimation through adaptive sampling, in Proceed-
observing path q in the data. Of course, the validity of ings of the 1990 ACM SIGMOD International Conference on
this independence assumption affects heavily the accuracy Management of Data, Atlantic City, NJ, May 1990, pp. 112.
of the summarization methods. 7. R. J. Lipton, J. F. Naughton, D. A. Schneider, and S. Seshadri,
Recent studies (78,79) have investigated the applica- Efficient sampling strategies for relational database opera-
tion of a k-order Markovian assumption, which limits the tions, Theoret. Comp. Sci., 116: 195226, 1993.
statistically correlated suffix of p to a maximum prede- 8. F. Olken and D. Rotem, Simple random sampling from rela-
fined length of k. Thus, only paths of length up to k need to tional databases, in Proceedings of the Twelfth International
be stored in order to perform selectivity estimation. The Conference on Very Large Data Bases, Kyoto, Japan, August
1986, pp. 160169.
proposed techniques further compress this information
with a Markov histogram, which records the most fre- 9. S. Acharya, P. B. Gibbons, V. Poosala, and S. Ramaswamy, Join
synopses for approximate query answering, in Proceedings of
quently occurring such paths. Less frequent paths are
the 1999 ACM SIGMOD International Conference on Manage-
grouped together, either according to their prefix (if the ment of Data, Philadelphia, PA, May 1999, pp. 275286.
aggregate frequency is high enough), or in a generic 
10. P. J. Haas and J. M. Hellerstein, Ripple joins for online aggre-
bucket. In order to estimate the occurrence probability of a gation, in Proceedings of the 1999 ACM SIGMOD International
longer path, the estimation framework identifies sub- Conference on Management of Data, Philadelphia, PA, May
paths that are present in the Markov histogram and 1999, pp. 287298.
VERY LARGE DATABASES 7

11. J. M. Hellerstein, P. J. Haas, and H. J. Wang, Online aggrega- 27. A. Aboulnaga and S. Chaudhuri, Self-tuning histograms:
tion, in Proceedings of the 1997 ACM SIGMOD International Building histograms without looking at data, in Proceedings
Conference on Management of Data, Tucson, AZ, May 1997. of the 1999 ACM SIGMOD International Conference on
12. W. G. Cochran, Sampling Techniques, 3rd ed. New York: John Management of Data, Philadelphia, PA, May 1999, pp. 181
Wiley & Sons, 1977. 192.
13. C.-E. Sarndal, B. Swensson, and J. Wretman, Model Assisted 28. N. Bruno, S. Chaudhuri, and L. Gravano, STHoles: A Multi-
Survey Sampling, New York: Springer-Verlag (Springer Series dimensional workload-aware histogram, in Proceedings of the
in Statistics), 1992. 2001 ACM SIGMOD International Conference on Management
of Data, Santa Barbara, CA, May 2001.
14. Y. E. Ioannidis and V. Poosala, Histogram-based approxima-
tion of set-valued query answers, in Proceedings of the 25th 29. S. Chaudhuri, R. Motwani, and V. Narasayya, Random sam-
International Conference on Very Large Data Bases, Edin- pling for histogram construction: How much is enough?, in
burgh, Scotland, September 1999. Proceedings of the 1998 ACM SIGMOD International Confer-
ence on Management of Data, Seattle, WA, June 1998.
15. Y. E. Ioannidis, Universality of serial histograms, in Proceed-
ings of the Nineteenth International Conference on Very Large 30. B. Jawerth and W. Sweldens, An overview of wavelet based
Data Bases, Dublin, Ireland, August 1993, pp. 256267. multiresolution analyses, SIAM Rev., 36(3): 377412, 1994.
16. Y. E. Ioannidis and S. Christodoulakis, Optimal histograms for 31. E. J. Stollnitz, T. D. DeRose, and D. H. Salesin, Wavelets for
limiting worst-case error propagation in the size of join results, Computer GraphicsTheory and Applications, San Francisco,
ACM Trans. Database Sys., 18(4): 709748, 1993. CA: Morgan Kaufmann Publishers, 1996.
17. Y. E. Ioannidis and V. Poosala, Balancing histogram optimality 32. Y. Matias, J. S. Vitter, and M. Wang, Wavelet-based histo-
and practicality for query result size estimation, in Proceedings grams for selectivity estimation, in Proceedings of the 1998
of the 1995 ACM SIGMOD International Conference on Man- ACM SIGMOD International Conference on Management of
agement of Data, May 1995, pp. 233244. Data, Seattle, WA, June 1998, pp. 448459.
18. H. V. Jagadish, N. Koudas, S. Muthukrishnan, V. Poosala, K. 33. K. Chakrabarti, M. Garofalakis, R. Rastogi, and K. Shim.,
Sevcik, and T. Suel, Optimal histograms with quality guaran- Approximate query processing using wavelets, in Proceedings
tees, in Proceedings of the 24th International Conference on of the 26th International Conference on Very Large Data Bases,
Very Large Data Bases, New York City, NY, August 1998. Cairo, Egypt, September 2000, pp. 111122.
19. V. Poosala, Y. E. Ioannidis, P. J. Haas, and E. J. Shekita, 34. M. Garofalakis and P. B. Gibbons, Wavelet synopses with error
Improved histograms for selectivity estimation of range pre- guarantees, in Proceedings of the 2002 ACM SIGMOD Inter-
dicates, in Proceedings of the 1996 ACM SIGMOD Interna- national Conference on Management of Data, Madison, WI,
tional Conference on Management of Data, Montreal, Quebec, June 2002, pp. 476487.
June 1996, pp. 294305. 35. J. S. Vitter and M. Wang, Approximate computation of multi-
20. C. Faloutsos and I. Kamel, Beyond uniformity and indepen- dimensional aggregates of sparse data using wavelets, in Pro-
dence: Analysis of R-trees using the concept of fractal dimen- ceedings of the 1999 ACM SIGMOD International Conference
sion, in Proceedings of the Thirteenth ACM SIGACT-SIGMOD- on Management of Data, Philadelphia, PA, May 1999.
SIGART Symposium on Principles of Database Systems, Min- 36. M. Garofalakis and P. B. Gibbons, Probabilistic wavelet
neapolis, MN, May 1994, pp. 413. synopses, ACM Trans. Database Syst., 29 (1): 2004. (SIG-
21. V. Poosala and Y. E. Ioannidis, Selectivity estimation without MOD/PODS Special Issue).
the attribute value independence assumption, in Proceedings 37. R. R. Schmidt and C. Shahabi, ProPolyne: A fast wavelet-based
of the 23rd International Conference on Very Large Data Bases, algorithm for progressive evaluation of polynomial range-sum
Athens, Greece, August 1997, pp. 486495. queries, in Proceedings of the 8th International Conference on
22. M. Muralikrishna and D. J. DeWitt, Equi-depth histograms for Extending Database Technology (EDBT2002), Prague, Czech
estimating selectivity factors for multi-dimensional queries, in Republic, March 2002.
Proceedings of the 1988 ACM SIGMOD International Confer- 38. Y. Matias, J. S. Vitter, and M. Wang, Dynamic maintenance of
ence on Management of Data, Chicago, IL, June 1988, pp. 28 wavelet-based histograms, in Proceedings of the 26th Interna-
36. tional Conference on Very Large Data Bases, Cairo, Egypt,
23. S. Muthukrishnan, V. Poosala, and T. Suel, On rectangular September 2000.
partitionings in two dimensions: Algorithms, complexity, and 39. A. Deligiannakis and N. Roussopoulos, Extended wavelets for
applications, in Proceedings of the Seventh International Con- multiple measures, in Proceedings of the 2003 ACM SIGMOD
ference on Database Theory (ICDT99), Jerusalem, Israel, Jan- International Conference on Management of Data, San Diego,
uary 1999. CA, June 2003.
24. D. Gunopulos, G. Kollios, V. J. Tsotras, and C. Domeniconi, 40. M. Garofalakis and A. Kumar, Wavelet synopses for general
Approximating multi-dimensional aggregate range queries error metrics, ACM Trans. Database Syst., 30(4), 2005.
over real attributes, in Proceedings of the 2000 ACM SIGMOD 41. S. Guha and B. Harb, Wavelet synopsis for data streams:
International Conference on Management of Data, Dallas, TX, Minimizing non-euclidean error, in Proceedings of the 11th
May 2000. ACM SIGKDD International Conference on Knowledge Dis-
25. D. Donjerkovic, Y. Ioannidis, and R. Ramakrishnan, Dynamic covery and Data Mining, Chicago, IL, August 2005.
histograms: Capturing evolving data sets, in Proceedings of the 42. L. Getoor, B. Taskar, and D. Koller, Selectivity estimation
Sixteenth International Conference on Data Engineering, San using probabilistic models, in Proceedings of the 2001 ACM
Diego, CA, March 2000. SIGMOD International Conference on Management of Data,
26. P. B. Gibbons, Y. Matias, and V. Poosala, Fast incremental Santa Barbara, CA, May 2001.
maintenance of approximate histograms, in Proceedings of the 43. A. Deshpande, M. Garofalakis, and R. Rastogi, Independence
23rd International Conference on Very Large Data Bases, is good: Dependency-based histogram synopses for high-
Athens, Greece, August 1997, pp. 466475. dimensional data, in Proceedings of the 2001 ACM SIGMOD
8 VERY LARGE DATABASES

International Conference on Management of Data, Santa Bar- 59. R. Goldman and J. Widom, DataGuides: Enabling query for-
bara, CA, May 2001. mulation and optimization in semistructured databases, in
44. J. Spiegel and N. Polyzotis, Graph-based synopses for rela- Proceedings of the 23rd International Conference on Very Large
tional selectivity estimation, in Proceedings of the 2006 ACM Data Bases, Athens, Greece, August 1997, pp. 436445.
SIGMOD International Conference on Management of Data, 60. R. Kaushik, P. Shenoy, P. Bohannon, and E. Gudes, Exploit-
Chicago, IL, 2006, pp. 205216. ing local similarity for efficient indexing of paths in graph
45. H. V. Jagadish, J. Madar, and R. Ng, Semantic compression structured data, in Proceedings of the Eighteenth Interna-
and pattern extraction with fascicles, in Proceedings of the 25th tional Conference on Data Engineering, San Jose, CA,
International Conference on Very Large Data Bases, Edin- February 2002.
burgh, Scotland, September 1999, pp. 186197. 61. T. Milo and D. Suciu, Index structures for path expressions, in
46. S. Babu, M. Garofalakis, and R. Rastogi, SPARTAN: A model- Proceedings of the Seventh International Conference on Data-
based semantic compression system for massive data tables, in base Theory (ICDT99), Jerusalem, Israel, January 1999.
Proceedings of the 2001 ACM SIGMOD International Confer- 62. J. Clark, and S. DeRose, XML Path Language (XPath), Version
ence on Management of Data, Santa Barbara, CA, May 2001. 1.0, W3C Recommendation. Available: http://www.w3.org/TR/
47. N. Alon, P. B. Gibbons, Y. Matias, and M. Szegedy, tracking join xpath/.
and self-join sizes in limited storage, in Proceedings of the 63. D. Chamberlin, J. Clark, D. Florescu, J. Robie, J. Simeon, and
Eighteenth ACM SIGACT-SIGMOD-SIGART Symposium on M. Stefanescu, XQuery 1.0: An XML query language, W3C
Principles of Database Systems, Philadeplphia, PA, May 1999. Working Draft 07. Available. http://www.w3.org/TR/xquery/).
48. N. Alon, Y. Matias, and M. Szegedy, The space complexity of 64. J. Clark, XSL Transformations (XSLT), Version 1.0, W3C
approximating the frequency moments, in Proceedings of the Recommendation. Available: http://www.w3.org/TR/xslt/).
28th Annual ACM Symposium on the Theory of Computing, 65. Z. Chen, H. V. Jagadish, L. V. S. Lakshmanan, and S. Papar-
Philadelphia, PA, May 1996, pp. 2029. izos, From tree patterns to generalized tree patterns: On
49. A. Dobra, M. Garofalakis, J. Gehrke, and R. Rastogi, Proces- efficient evaluation of XQuery, in Proceedings of the 29th
sing complex aggregate queries over data streams, in Proceed- International Conference on Very Large Data Bases, Berlin,
ings of the 2002 ACM SIGMOD International Conference on Germany, September 2003.
Management of Data, Madison, WI, June 2002, pp. 6172. 66. A. Halverson, J. Burger, L. Galanis, A. Kini, R. Krishna-
50. J. Feigenbaum, S. Kannan, M. Strauss, and M. Viswanathan, murthy, A. N. Rao, F. Tian, S. Viglas, Y. Wang, J. F. Naughton,
An approximate L1-difference algorithm for massive data and D. J. DeWitt, Mixed mode XML query processing, in
streams, in Proceedings of the 40th Annual IEEE Symposium Proceedings of the 29th International Conference on Very Large
on Foundations of Computer Science, New York, NY, October Data Bases, Berlin, Germany, September 2003.
1999. 67. J. McHugh and J. Widom, Query optimization for XML, in
51. S. Ganguly, M. Garofalakis, and R. Rastogi, Processing set Proceedings of the 25th International Conference on Very Large
expressions over continuous update streams, in Proceedings of Data Bases, Edinburgh, Scotland, September 1999.
the 2003 ACM SIGMOD International Conference on Manage- 68. N. Polyzotis and M. Garofalakis, Statistical synopses for graph-
ment of Data, San Diego, CA, June 2003. structured XML databases, in Proceedings of the 2002 ACM
52. M. Greenwald and S. Khanna, Space-efficient online computa- SIGMOD International Conference on Management of Data,
tion of quantile summaries, in Proceedings of the 2001 ACM Madison, WI, June 2002.
SIGMOD International Conference on Management of Data, 69. R. Milner, Communication and Concurrency, Englewood
Santa Barbara, CA, May 2001. Cliffs, NJ: Prentice Hall (Intl. Series in Computer Science),
53. A. C. Gilbert, Y. Kotidis, S. Muthukrishnan, and M. J. Strauss, 1989.
Surfing wavelets on streams: One-pass summaries for approx- 70. N. Polyzotis and M. Garofalakis, Structure and value synopses
imate aggregate queries, in Proceedings of the 27th Interna- for XML data graphs, in Proceedings of the 28th International
tional Conference on Very Large Data Bases, Roma, Italy, Conference on Very Large Data Bases, Hong Kong, China,
September 2001. August 2002.
54. A. C. Gilbert, Y. Kotidis, S. Muthukrishnan, and M. J. Strauss, 71. P. B. Gibbons, Distinct sampling for highly-accurate answers
How to summarize the universe: Dynamic maintenance of to distinct values queries and event reports, in Proceedings of
quantiles, in Proceedings of the 28th International Conference the 27th International Conference on Very Large Data Bases,
on Very Large Data Bases, Hong Kong, China, August 2002, pp. Roma, Italy, September 2001.
454465. 72. N. Polyzotis, M. Garofalakis, and Y. Ioannidis, Selectivity
55. P. Indyk, Stable distributions, pseudorandom generators, estimation for XML twigs, in Proceedings of the Twentieth
embeddings and data stream computation, in Proceedings of International Conference on Data Engineering, Boston, MA,
the 41st Annual IEEE Symposium on Foundations of Computer March 2004.
Science, Redondo Beach, CA, November 2000, pp. 189197. 73. N. Polyzotis, M. Garofalakis, and Y. Ioannidis, Approximate
56. N. Thaper, S. Guha, P. Indyk, and N. Koudas, Dynamic multi- XML query answers, in Proceedings of the 2004 ACM SIGMOD
dimensional histograms, in Proceedings of the 2002 ACM SIG- International Conference on Management of Data, 2004, pp.
MOD International Conference on Management of Data, 263274.
Madison, WI, June 2002, pp. 428439. 74. N. Polyzotis and M. Garofalakis, XCluster synopses for struc-
57. T. Bray, J. Paoli, C. M. Sperberg-McQueen, and E. Maler, tured XML content, in Proceedings of the 22nd International
Extensible Markup Language (XML) 1.0, 2nd ed. W3C Recom- Conference on Data Engineering, 2006.
mendation. Available: http://www.w3.org/TR/REC-xml/).
75. N. Zhang, M.T. Ozsu, A. Aboulnaga, and I.F. Ilyas, XSEED:
58. S. Abiteboul, Querying semi-structured data, in Proceedings of Accurate and fast cardinality estimation for XPath queries, in
the Sixth International Conference on Database Theory Proceedings of the 22nd International Conference on Data
(ICDT97), Delphi, Greece, January 1997. Engineering, 2006.
VERY LARGE DATABASES 9

76. J. Freire, J. R. Haritsa, M. Ramanath, P. Roy, and J. Simeon, International Conference on Very Large Data Bases, Hong
StatiX: Making XML count, in Proceedings of the 2002 ACM Kong, China, August 2002.
SIGMOD International Conference on Management of Data, 81. Z. Chen, H. V. Jagadish, F. Korn, N. Koudas, S. Muthukrish-
Madison, WI, June 2002. nan, R. Ng, and D. Srivastava, Counting twig matches in a tree,
77. Y. Wu, J. M. Patel, and H. V. Jagadish, Estimating answer sizes in Proceedings of the Seventeenth International Conference on
for XML queries, in Proceedings of the 8th International Con- Data Engineering, Heidelberg, Germany, April 2001.
ference on Extending Database Technology (EDBT2002), Pra-
gue, Czech Republic, March 2002.
78. W. Wang, H. Jiang, H. Lu, and J. X. Yu, Containment join size MINOS GAROFALAKIS
estimation: Models and methods, in Proceedings of the 2003 Yahoo! Research
ACM SIGMOD International Conference on Management of Berkeley, California, and
Data, San Diego, CA, June 2003. University of California, Berkeley
79. A. Aboulnaga, A. R. Alameldeen, and J. F. Naughton, Estimat- Santa Clara, California
ing the selectivity of XML path expressions for internet NEOKLIS POLYZOTIS
scale applications, in Proceedings of the 27th International University of California,
Conference on Very Large Data Bases, Roma, Italy, September Santa Cruz
2001. Santa Cruz, California
80. L. Lim, M. Wang, S. Padamanabhan, J. S. Vitter, and R. Parr,
XPath-Learner: An on-line self-tuning Markov histogram for
XML path selectivity estimation, in Proceedings of the 28th
V
VISUAL DATABASE  Content-based retrievalhow are images searched
effectively and efficiently based on image contents?
INTRODUCTION  Storage and indexingwhat are the proper storage
techniques for large amounts of image data, and what
We humans are most adept and comfortable with visual are the proper indexing techniques to support content-
information, using our vision for routine activities as well as based retrieval of image data?
for sophisticated reasoning and planning. The increased use  User interfacehow should the user browse and
of images, video, and graphics in computing environments search for images? What is a suitable user interface?
has catalyzed the development of data management tools How is an image database made accessible through the
for accessing, retrieving, and presenting visual information World Wide Web?
or alphanumeric information in visual ways. Some of
these tools are developed to create, store, and retrieve visual Other issues include those unique to visual databases
data in the form of images or video to realize advanced in query processing, transaction management, and data-
multimedia applications. Other tools use extensively visual base recovery. In recent years, researchers have paid
representation in user interfaces and provide essential attention to bridging the semantic gap between low-level
visual mechanisms to access alphanumeric or visual data image features and high-level semantic concepts. This
in databases. The development of these tools involves article gives an overview of principles and techniques on
concepts, algorithms, and techniques from diversified these topics. Given the broad and fast-expanding nature of
fields such as database management systems, image this field, we are bound to have omitted significant contents
processing, information retrieval, and data visualization. and references. In addition, we devote a disproportionate
Consequently, the field of visual database represents amount of attention to some issues at the expense of others.
several diversified areas. These areas include at least the It is better to introduce basic concepts and techniques well
following: rather than to give a quick run-through of broad topics. To
give real-world examples, nevertheless, this article pre-
1. Database systems to manage visual information in sents an overview of three visual database systems. For
the form of images, video, or geometric entities; that more comprehensive coverage and technical details, inter-
is, the data subject is visual. ested readers are invited to consult the survey papers listed
2. Visual interfaces to query databases; that is, the in the last section.
query interface is visual.
3. Visual interfaces to interpret information retrieved
HISTORY AND THE STATE OF THE ART
from databases; that is, the data presentation is
visual.
Database management systems, especially relational data-
base management systems, have been extensively studied
The first area is related closely to the study of image and
in the past 40 years. Rigorous theory has been discovered,
multimedia databases. The second area has an impact
and efficient techniques have been developed for the man-
beyond databases and has been studied in programming
agement of alphanumeric data. When new types of data
languages and programming environments. The third area
such as images and video were first brought into a database
is the focus of data visualization study. These areas are
environment, it was natural that the data needed to be
related closely with each other: The management of visual
transformed so that they could be represented in existing
data needs visual queries and visual presentation of query
database management systems. In a relational database,
results; on the other hand, the last two areas are applicable
therefore, visual data are usually represented by their
not only to databases managing visual data but also to
alphanumeric attributes, which are stored as tuples over
alphanumeric databases. This article focuses on the first
relations. Kunii et al. (1) first attempted extending a rela-
area and the visual query interfaces of databases in the first
tional database scheme to accommodate visual information
area. In other words, this article introduces principles and
by describing the color and textural properties of images.
techniques developed for the management of visual data
Physical visual data were stored in a separate storage and
and techniques on visual interfaces to formulate queries
were linked through references to their tuples in the rela-
against databases that manage the visual data.
tional database. The alphanumeric attributes of a visual
In a database system that manages visual data, many
object are called features of the object. The features, which
issues exist to consider beyond those in alphanumeric
act together as a proxy of the object, are used in answering a
databases. Using image database as an example, these
users queries. In the 1970s and the early 1980s, several
issues typically include:
image database systems (25) were developed to manage
images and graphics using relational databases. Research-
 Image featureswhat image features are most useful
ers believed initially that this setting is all what they would
in each particular application?
need for the management of visual data. They also believed

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 VISUAL DATABASE

that most relational database techniques, including index- After the development of object-oriented databases and
ing, query optimization, concurrency control, and recovery, logical databases, attempts were made to deal with seman-
would also work in parallel in the intended environments of tic modeling of images with complex structures (11) and
visual data management. logic for visual databases (12). PROBE (13) is a spatial
It was only after some experience working with visual object-oriented database system whose data model sup-
data that researchers realized the mismatch between the ports two basic types of data, objects and functions, where
nature of visual data and the way both the user and the functions uniformly represent properties, relationships,
system were forced to query and operate on them. One and operations associated with objects. Chang et al.(14)
major technical challenge to visual database management presented an image database system based on spatial
is data retrieval. The creation of mere visual data reposi- reasoning by two-dimensional (2-D) strings and image
tories is of little value unless methods are available for database operations. Brink et al. (15) developed a multi-
flexible retrieval of visual data based on their contents. media system that provides a shell/compiler to build meta-
Content-based retrieval means that the search will analyze data atop the physical medium for most media data. With
the actual contents of the image. The term content in this this kind of independence, visual database systems can be
context might refer to image features, such as colors, built for a variety of applications.
shapes, textures, or any other information that can be Once image features were extracted, the question
derived from the image itself. Without the ability to exam- remained as to how they could be matched against each
ine image content, searches must rely on textual informa- other for retrieval. The success of content-based image
tion, such as captions or keywords, which in many retrieval depends on the definition of similarity measures
applications have to be entered manually for every image to measure quantitatively the similarities between images.
in the database. A summary of similarity measures was given in Ref. (16),
The way people access visual information is fundamen- where similarity measures were grouped as feature-based
tally different to the way they access alphanumeric infor- matching, object silhouette-based matching, structural fea-
mation. Relational queries and operations are not enough ture matching, salient feature matching, matching at the
for querying visual data, for which browsing, descriptive semantic level, and learning-based approaches for similar-
query, and query by examples are important query para- ity matching.
digms. Therefore, unique issues in visual database query In addition to designing powerful low-level feature
include how to support the content-based retrieval, how to extraction algorithms, researchers have also focused on
support image manipulations such as browsing and zoom- reducing the semantic gap (16,17) between the image fea-
ing, and how to support image processing operations for tures and the richness of human semantics. One common
feature extraction. Visual database systems differentiate approach is to use object ontology, which is a simple voca-
from each other in their ways to work around these issues. bulary providing qualitative definitions of high-level con-
As an example, the QBIC (6) system has a visual user cepts. Images are classified into different categories by
interface in which queries are posed by drawing, selec- mapping descriptions of image features to semantic key-
tion, and other graphical means. It supports image words. Such an association of low-level features with
queries using image features such as color, texture, high-level semantic concepts can take advantages of
shape, and motion of images and video. Researchers classification and clustering algorithms developed in
also attempted to manage geometric and spatial data in machine learning and data mining. In addition to object
relational databases. For example, PSQL (7) extends the ontology, query results can be refined by learning the users
relational model in a disciplined way over three spatial intention using relevance feedback, which is an interactive
data types: points, line segments, and regions. Geometric process of automatically adjusting the execution of a query
and spatial data pose unique problems to visual data using information fed back from the user about the rele-
management. These problems include storage and index- vance of the results of the query.
ing of spatial data and database query supported by In recent years, image retrieval on the World Wide Web
spatial operations. has become an active area of research. Systems like Web-
For relational databases, a classic example of a visual seer (18) and WebSEEK (19) can locate images on the Web
query interface is QBE (8). It is a very user-friendly tabular using image contents in addition to texts. MetaSEEK (20)
query language based on domain relational calculus. To can distribute a user query to several independent image
formulate a query, a user enters example elements and fills search engines on the Web and then combine the results
out tables supplied by the system. QBE has influenced the to give the benefits of all of them. An image search on the
graphical query facilities in modern database products, Web has enormous commercial potential. Many popular
particularly personal database software. As an extension commercial search engines have image and video search
of QBE to the image database, QPE (9) introduced built-in functionalities. These search engines include Google Image
support of image operations. PICQUERY (10) proposed Search (http://images.google.com), Lycos Search (http://
a comprehensive list of image operations that should be search.lycos.com), AltaVista Image Search (http://www.
supported by an image database system and classified altavista.com/image), MSN Search (http://www.msn.com),
these operations into image manipulation operations, pat- and Yahoo! Image Search (http://images.search.yahoo.
tern recognition operations, spatial operations, function com). These search engines use text to search for images
operations, user-defined operations, and input/output or video, with little or no consideration of image contents.
operations. Recently, Web-based communities become popular where
developers and end users use the Web as a platform for
VISUAL DATABASE 3

collaboration and resource sharing. Popular examples  Global features, which include average values, stan-
include Flickr (http://www.flickr.com), which is a photo- dard derivations, and histograms of measurements
sharing website, and YouTube (http://www.youtube.com), calculated for the entire image.
which is a video-sharing website. Both websites support  Regional features, which are measured on fixed
image or video search as part of the services they offer. regions or regions having homogeneous properties.
Given distinct methods and solutions to a problem as  Object features, which are calculated for each object in
open-ended as visual data retrieval, a natural question
the image. Objects can be segmented either manually,
that develops is how to make a fair comparison among
semiautomatically or automatically. Segmentation
them. Evaluation of visual data retrieval has been an
techniques include thresholding, flood-fill using seed
ongoing challenging problem. Perhaps the most complete
points, and manual segmentation using shape models.
video evaluation project has been the TRECVID evalua-
tion (21) (http://www-nlpir.nist.gov/projects/trecvid). The
Image features are calculated typically off-line, and
project keeps close connections between private industry
thus, efficient computation is not a critical criterion as
and academic research where a realistic task-specific test
opposed to efficient feature matching in answering user
set is gathered, discussed, and agreed to. Several research
queries. Commonly used primitive features include color
teams then attempt to provide the best video retrieval
histogram, texture, shape, and contour measures. These
system for the test set. TRECVID participants meet reg-
image features are well explained in image processing
ularly for continual evolution toward improving the test
textbooks such as Refs. (22 and 23).
sets.
A histogram of a grayscale image is a plot of the number
of pixels for each particular intensity value in the image. A
IMAGE FEATURES color image can be characterized by three histograms, one
for each of the three color components, in terms of either
Features of an image are a set of terms or measurements RGB (red, green, and blue) or HSV (hue, saturation, and
that can be used to represent the image. An image can be value). Location information is lost totally in a histogram. A
assigned features either manually or automatically. histogram of an given image can be compared with the
A simple and reliable way to catch the content of an stored set of histograms in the database to find an image
image is to annotate manually the image with keywords. In that is similar in color distribution to the given image.
fact, it may be the only way to describe images in many Texture measures include almost all local features such
applications. A good example is the San Francisco de Young as energy, entropy, contrast, coarseness, correlation, ani-
Museum (http://www.thinker.org), which uses manual sotropy, directionality, stripes, and granularity. Texture
annotation to identify images. Each image in the museums measures have been used to browse large-scale aerial
extensive collection has a description, and some descrip- photographs (24), where each photograph is segmented
tions are remarkably detailed. Free text retrieval techni- to obtain a texture image thesaurus. The texture image
ques are used to search for images based on the text thesaurus is clustered. The user can indicate a small region
descriptions. of interest on a photograph, and the system will retrieve
Many kinds of images cannot be annotated manually. A photographs that have similar textured regions.
typical example is a database of human facial images where Edges and their directions in images are also valuable
it is sometimes impossible to assign a unique keyword to features. Edge information can be extracted in several
each facial image. Manual annotation is impractical for ways, for example, by using Gabor filters, Sobel operators,
very large databases or for images that are generated or various edge detectors.
automatically or streamed, for example, from surveillance An effective method for representing an image is image
cameras. In such applications, it is attractive to extract transformation, for example, wavelet transformation. The
automatically features of visual data for content-based low-frequency coefficients of the transform of an image
retrieval. However, automatic extraction of image contents often represent objects in the image and can be used as
is difficult. Except for a few special applications, such as features of the image.
optical character recognition, the current state of the art in The above primitive features can be used to derive new
image understanding cannot label an image with descrip- features, for example, curvatures, shapes of regions or
tive terms that convincingly characterize the content of the objects, locations, and spatial relations. In fact, these
image. Furthermore, objects in an image can be occluded by intermediate features are primitive building blocks of
other objects or by shadows, be articulated, or have a shape object ontology, which provides qualitative descriptions
that is difficult to describe. The fundamental problem is of image contents and associates images with semantic
that so far it is not clear how human beings recognize concepts. The user can continue to mark interesting areas,
images and what features are used by human beings to not necessarily objects, from which features are calculated.
distinguish one image from another. It is not yet possible for An example is a physician marking interesting areas in the
cognitive science to provide practical hints to computer positions of lung in chest x-ray images and calculating
recognition of images. texture features only from the marked areas.
An image in a database is represented typically by In addition to the above features that are extracted
multiple measures. According to the scope on the image from individual images, features can also be extracted
these measures are collected, image features can be classi- from a set of images by analysis of correlations among the
fied as follows: images. Statistical and machine learning techniques are
4 VISUAL DATABASE

often applied to a set of images to find uncorrelated Matching long complex feature vectors is often expen-
components that best describe the set of images. For sive computationally. Because some features are usually
example, the eigenface technique (25) applies principal more useful than the others, a subset of the most useful
component analysis for image feature extraction. Given a feature measures can often be selected manually in practice
set of images and by arranging pixel values of each image to accelerate the matching process. Techniques such as
into a vector, one can form a covariance matrix of the set of principal component analysis and vector quantization
images. Eigenvectors that correspond to the largest eigen- can be applied to a set of image feature vectors. Principal
values of the covariance matrix contain the principal component analysis is applied to find a subset of significant
components of the set of images. Each image is then feature measures. Vector quantization is used to quantize
approximated with a linear combination of these eigen- the feature space. For instance, a set of images can
vectors and can be represented by the weights of these be clustered, and each cluster is represented by a prototype
eigenvectors in the combination. Recently, researchers vector. The search starts by comparing the query feature
have developed nonlinear methods (2628) in manifold vector with the prototype vectors to find the closest cluster
learning for feature extraction and dimensionality reduc- and then to find the closest feature vectors within that
tion. By assuming images as points distributed on a mani- cluster. In this way, a visual data search can be directed in a
fold in high-dimensional space, these methods can often hierarchical manner.
unfold the manifold to a very low-dimensional space and
use the coordinates in the low-dimensional space as image
features. VISUAL DATA RETRIEVAL
Techniques have also been proposed for feature extrac-
tion and matching of three-dimensional (3-D) shapes (29). A One of the biggest challenges for a visual database comes
histogram can be used as a feature for 3-D shapes in the from the user requirement for visual retrieval and techni-
same way as it is used for 2-D images. Curvature and ques to support visual retrieval. Visual retrieval has to
curvature histogram have also been used as features of support more retrieval methods in addition to those con-
3-D shapes. Another promising way to represent 3-D ventional retrieval methods in alphanumeric databases.
shapes is to use skeletal structures. One widely used ske- Correspondingly, these extra retrieval methods call for new
letal structure is the medial axis model (30). Recently, an data indexing mechanisms. Figure 1 summarizes typical
interesting approach called topological matching (31) has retrieval methods for image databases and their relation-
been proposed to represent 3-D shapes using multiresolu- ships with different kinds of data indexes. Retrieval by
tion Reeb graphs. The graphs represent skeletal and topo- attributes is a conventional data access method. The user
logical structures of 3-D shapes, are invariant to selects features that might characterize the type of
geometrical transformations, and are particularly useful expected images; for example, use color and texture mea-
for interactive search of 3-D objects. sures to find dresses or wallpapers. The user can also select
A video is often characterized by selecting key frames the weight of each feature for feature matching. Image
that form a story board of the video (32). Once key frames retrieval can then be made by the comparison of weighted
are obtained, one can use image retrieval techniques to differences of the features of the query image against the
search a video database for frames that match a key frame. features of the images in the database.
The story-board frames can be obtained by carrying out a Other retrieval methods, namely, free text retrieval,
frame-to-frame analysis that looks for significant changes fuzzy retrieval, visual browsing, and similarity retrieval,
and by taking advantage of domain knowledge of how a are content-based retrieval and are special to visual data-
video is constructed. bases. Free text retrieval and fuzzy retrieval are descrip-
Using an improper set of features may get irrelevant tive. Visual browsing and similarity retrieval are visual
query results. For example, an image histogram loses and require visual interfaces. Unlike query processing
location information of image pixels. If the query image with well-defined formalities in alphanumeric databases,
contains a small region of particular importance, the region similarity retrieval intends to combine image features and
will get lost in an overall histogram. A solution to the texts to retrieve images similar to an example image. A
problem is to partition the image and to calculate the user can specify the example image in several ways.
features for each partition of the image. The user can Usually, the user shows a real image and tells the system
indicate a region of interest in the query image, and only what is important in the image by selecting features of or
features of that portion will be used in the similarity regions/objects in the image (the regions/objects can either
measure. be automatically or manually segmented). Alternatively,
Different image features are often used together for the user can sketch an example image. The sketch can be a
image retrieval. In a human facial image retrieval system contour sketch showing the shapes of the objects to
(33), for example, a human facial image is characterized by retrieve or in the form of colored boxes indicating colors,
six facial aspects: chin, hair, eyes, eyebrows, nose, and sizes, and positions of the objects to retrieve. Using a well-
mouth. Each facial aspect contains numerical attributes defined set of features and a good similarity measure, the
as well as possibly descriptive values (such as large and system retrieves images similar to the one supplied by the
small) for each attribute. In practice, these feature measures user.
are often used together with other statistical measures, such One problem in content-based retrieval is how to define
as textures or principal components of colors. the similarity measure. In general, we cannot expect to find
a generic similarity measure that suites all user needs.
VISUAL DATABASE 5

Visual Query

sample data
input composition
Descriptive Query

retrieval similarity visual fuzzy free text


by attributes retrieval browsing retrieval retrieval

feedback

attribute iconic fuzzy free text


index index index index

Conventional
Retrieval Content-Based Retrieval
Database

Figure 1. Visual retrieval methods.

Manually selecting relevant features and weights in a keywords and/or phrases. After initial search, records that
similarity measure can be difficult, especially when the are among the best matches are presented to the user in an
features are complicated. A user should therefore be given a sorted order according to their relevances to the search
chance to interact with the system and to have the simi- words.
larity learned by the system. This interaction can be more Human descriptions of image contents are neither
or less natural for the user. Relevance feedback(34) is a exact nor objective. Image retrieval based on fuzzy queries
technique that removes the burden of specifying manually (36) is a natural way to get information in many applica-
the weights of features. It allows the user to grade the tions. An image is represented by a set of segmented
retrieved images by their relevance, for example, highly regions, each of which is characterized by a fuzzy feature
relevant, relevant, nonrelevant, or highly nonrelevant. The (fuzzy set) reflecting color, texture, and shape properties.
system then uses the grades to learn relevant features and As a result, an image is associated with a family of fuzzy
similarity metrics. The grading can be made after each sets corresponding to regions. The fuzzy sets together
retrieval, thereby progressively improving the quality of define a fuzzy space. When a fuzzy query is defined incom-
the retrieved results. pletely, it represents a hypercube in the fuzzy space. To
Other problems in content-based retrieval include how evaluate a fuzzy query is to map image feature measures
to organize and index the extracted features, how to incor- from the feature space to the fuzzy space. After mapping,
porate these features and indexes into existing databases, images in the database are represented as points in the
and how to formulate visual queries through user interfaces. fuzzy space. The similarity between a fuzzy query and an
image can then be computed as the distance between the
point that represents the image and the hypercube that
Descriptive Retrieval
represents the fuzzy query. Images that are close to the
Free text retrieval uses text descriptions of visual data to query definition are retrieved. The fuzzy query processing
retrieve the visual data. Many techniques, typically those produces an ordered set of images that best fit a query.
(35) developed for and used in Web search engines, can Fuzzy space is not Cartesian; ordinary correlation and
be used for free text retrieval of visual data. Many of these Euclidean distance measurements may not be used as
approaches work in similar ways. First, every word in similarity measures.
the text description is checked against a list of stop words.
The list consists of the commonly used words, such as Visual Retrieval
the, and a, which bear little semantic significance
Two types of visual retrievals exist: similarity retrieval and
within the context. Words in the stop word list are ignored.
visual browsing. Similarity retrieval allows users to search
Words such as on, in, and near are essential to
for images most similar to a given sample image. Visual
represent the location of special features, and therefore,
browsing allows users to browse through the entire collec-
they cannot be included in the stop word list. The remain-
tion of images in several different ways based on simila-
ing words are then stemmed to remove the word variants.
rities between images.
Stemmed words are indexed using conventional database
Similarity retrieval uses similarity measures to search
indexing techniques. In free text retrieval, users are asked
for similar images. To accelerate the search process, simi-
to submit a query in free text format, which means that the
larity retrieval is often implemented by traversing a
query can be a sentence, a short paragraph, or a list of
6 VISUAL DATABASE

multidimensional tree index. It behaves in a similar way as An image indexing mechanism should support both a
pattern classification via a decision tree. At each level of the feature-based similarity search and visual browsing. As an
tree, a decision is made by using a similarity measure. At example, feature-based iconic indexing (33) is an indexing
the leaf node level, all leaf nodes similar to the sample mechanism that is specialized for visual retrieval. In alpha-
image will be selected. By modifying weights of different numeric databases, tree indexes are organized such that
features, one gets different similarity measures and, con- (1) a tree is built on a set of key attributes; (2) key attributes
sequently, different query results. are of primitive data types, such as string, integer, or real;
Visual browsing allows a user to thumb through images, and (3) the grouping criterion usually specifies a range of
which again can be achieved via a traversal of the index values on a particular attribute. To make index trees
tree, where each internal node piggybacks an iconic image applicable to visual features, feature-based iconic indexing
representing the node. The system presents the user with makes the following generalizations:
the root of the index tree by displaying the icons of its
descendants. At each node of the tree, the user chooses 1. The first generalization is to allow attributes to be
browsing directions: up, down, left, and right. Going up is structured data. For example, an attribute can be a
implemented via a pointer to its parent node, whereas feature vector that is a multidimensional array.
moving down is accomplished by selecting the icon repre- 2. As a result of the first generalization, the grouping
senting a specific descendant node. The selected descen- criteria are defined on similarity measures. The most
dant node is then considered as the current node, and the commonly used similarity measure is distance in the
icons of its children are displayed. This process is vertical feature space.
browsing. By selecting icons of sibling nodes, a user can 3. The third generalization is that different levels of the
perform horizontal browsing in a similar way. index tree may have different key attributes. This
A graphic user interface is required to retrieve images or generalization facilitates visual browsing and navi-
video in an interactive thumb through mode. The system gation.
displays to the user retrieved icons of images that are
relevant to the query image, and the user can iterate by The iconic index tree can be built either top-down or
clicking an image that best satisfies the query. Such an bottom-up. A top-down algorithm typically consists of two
intuitive user interface combines browsing, search, navi- steps. The first step selects a feature aspect and clusters
gation, and relevance feedback. It may address demands the images into m classes. Many approaches are available
from a wide variety of users, including nontechnical users. to do this step, for example, the k-means clustering algo-
rithm (38) or the self-organization neural network (39).
VISUAL DATA INDEXING The second step repeats the first step until each node has
at most m descendants. Each node of the index tree has the
Indexing is a process of associating a key with correspond- following fields: (1) node type: root, internal, or leaf node;
ing data records. In addition to traditional tree-based and (2) feature vector; (3) iconic image; (4) pointer to its parent
hash-based indexing techniques used in alphanumeric node; (5) number of children and pointers to its children;
databases, visual databases need special indexing techni- and (6) number of sibling nodes and pointers to the sibling
ques to manage, present, and access visual data. Over the nodes. The pointers to sibling nodes are referred to as
years, many indexing techniques have been proposed for horizontal links and provide a means for horizontal brows-
various types of applications. Using image database as an ing. An example node structure of a feature-based iconic
example, we can classify these indexing techniques into two index tree is shown in Fig. 2. Horizontal links are created
categories: interimage indexing and intraimage indexing. only for the feature aspects that have already been used as
Interimage indexing assumes each image as an element the key feature aspect at levels above the current level. For
and indexes a set of such images by using their features. A example, if F3 is the key feature aspect at the current
representative interimage indexing technique is feature- level, F1 and F2 are key feature aspects at above levels;
based iconic indexing (33). It indexes a set of visual data to then the nodes under the same parent node at this level
support both feature-based similarity query and visual represent images having similar F1, similar F2, and dif-
browsing in addition to exact-match query and range query ferent F3s. For horizontal browsing of images of similar
on the set of data. On the other hand, intraimage indexing F1, similar F2, and different F3s, a horizontal link is
indexes elements (regions, points, and lines) within an created to link these nodes at this level. Other horizontal
image. Representative techniques are quadtree and related links such as a link for similar F1, similar F3, and different
hierarchical data structures. F2 can be created as well.

Feature-Based Iconic Indexing Quadtree and Other Hierarchical Data Structures


Because features can be assumed as vectors in high- Quadtree and related hierarchical data structures provide
dimensional space, any multidimensional indexing mechanisms for intraimage indexing. As an example of the
mechanisms (37) that support a nearest-neighbor search type of problems to which these data structures are applic-
can be used to index visual data. Although this generic able, consider a geographical information system that
mechanism is universal, various specialized, more effi- consists of several of maps, each of which contains images,
cient indexing methodologies may develop for particular regions, line segments, and points. A typical query is to
types of visual database applications.
VISUAL DATABASE 7

Feature F1
vertical
browsing

horizontal browsing
Feature F2
point to similar F2 different F1

Feature F3

point to similar F3 different F2

Figure 2. Feature-based iconic index tree facilitates similarity search and visual browsing. Reprinted with permission from Ref. 33.

determine all hotels within 20 miles from the users OTHER DATABASE ISSUES
current location. Another typical query is to determine
the regions that are within 1000 feet above sea level in a A typical database management system consists of modules
geographic area. Such analyses could be costly, depending for query processing, transaction management, crash
on the way the data are represented. Hierarchical data recovery, and buffer management. For a complete discus-
structures are based on the principle of recursive decom- sion of technical details, readers may refer to a database
position of space. They are useful because of their ability to textbook such as Ref. (40). These modules in a visual
organize recursively subparts of an image in a hierarch- database management system are different from the cor-
ical way. responding ones in traditional alphanumeric databases.
Quadtree has been studied extensively to represent
regional data. It is based on successive subdivision of a Query Processing
binary image into four equal-sized quadrants. If the binary
As we have introduced, query processing in visual data-
image does not consist entirely of 1s or 0s, it is then divided
bases must support a similarity match in addition to an
into quadrants, subquadrants, and so on, until blocks
exact match. Similarity measures between visual objects
(single pixels in extreme cases) that consist entirely of 1s
are usually real valued, say, ranging from 0 (completely
or 0s are obtained. Each nonleaf node of a quadtree has four
different) to 1 (exactly the same). Strictly speaking, the
children. The root node corresponds to the entire image.
result of a visual query can be all images in the entire
Each child of a node represents a quadrant of the region
database, each ranked from 0 to 1 based on its similarity to
represented by the node. Leaf nodes of the tree correspond
the query image. The user will specify a threshold so that an
to those blocks for which no additional subdivision is
image is not retrieved if its rank is below the threshold
necessary.
value. Images with ranks above the threshold value are
Hierarchical data structures have been studied exten-
then ordered according to their ranks. A similarity search is
sively, and many variants have been proposed (37). They
often computing intensive. For query optimization, there-
are differentiated mainly on the following aspects: (1) the
fore, visual database systems supporting a similarity
type of data (points, line segments, or regions) that they
search and user-defined access methods need to know
are used to represent, (2) the principle guiding the
the costs associated with these methods. The costs of
decomposition process, and (3) tree balance (fixed or
user-defined functions in terms of low-level access methods,
variable depth). Hierarchical data structures have
such as those related to similarity search, must also be
been used to represent point data, regions, curves, sur-
made known to the database system (41).
faces, and volumes. It is worthwhile to mention that,
instead of equal subdivision in quadtrees, the decompo-
Transaction Management
sition process may divide a binary image according to the
distribution of elements in the image. Furthermore, the In visual databases, traditional lock-based and timestamp-
idea of decomposition is not restricted to 2-D images and based concurrency control techniques can be used; the
can be extended to data distributions in high-dimen- results would still be correct. However, the concurrency
sional space. For example, kd-tree and its derivatives of the overall system would suffer because transactions in
are studied extensively to index point data in high- visual databases tend to be long, computing-intensive,
dimensional space. These techniques have other applica- interactive, cooperative, and to refer to many other data-
tions beyond visual databases. These applications base objects. Suppose an updating transaction inserts
include alphanumeric databases, data warehousing, interactively subtitles to a video, for example; traditional
and data visualization. lock-based concurrency control locks the entire video,
8 VISUAL DATABASE

which decreases the throughput of other transactions refer- EXAMPLE VISUAL DATABASE SYSTEMS
ring to other frames in the same video. Visual data are large
in size, making it impractical to create multiple copies of the Because of space limitations, this section introduces three
data, as is necessary in the multiversion approach to con- example visual database systems: QBIC (6) by IBM;
currency control. Optimistic methods for concurrency con- MARS (34) developed at the University of Illinois at
trol are not suitable either, as frequent abortion and restart Urbana-Champaign; and VisualSEEK (19,42) developed
of a visual presentation would be unacceptable to the at Columbia University. The last section gives references
viewer. to other visual database systems
To increase system concurrency in such an environment,
transaction models defined for object-oriented environ- QBIC
ments, long cooperative activities, real-time database
applications, and workflow management are usually con- QBIC was probably the first commercial content-based
sidered. Techniques developed for nested transactions are image retrieval system. It is available either in stand-alone
particularly useful, in which a transaction consists of sub- form or as part of other IBM DB2 database products. The
transactions, each of which can commit or abort indepen- features it uses include color, texture, shape, and keywords.
dently. Another observation is that even though a QBIC quantizes each color in the RGB color space into k
nonserializable schedule may leave the database in an predefined levels, giving the color space a total of k3 cells.
inconsistent state, the inconsistent state may not be fatal. Color cells are aggregated into super cells using a clustering
If a few contiguous frames of a video presentation have been algorithm. The color histogram of an image represents the
changed by another transaction, then, such subtle changes normalized count of pixels falling into each super cell. To
usually would not cause any problem to the viewers. answer a similarity query, the histogram of the query
image is matched with the histograms of images in the
database. The difference zi is computedP for each color super
Storage Management
cell.The similarity measure is given as i; j ai j zi z j , where aij
One challenge of storage management of visual data is to measures the similarity of the ith and the jth colors.
serve multiple requests for multiple data to guarantee Texture measures used by QBIC include coarseness,
that these requests do not starve while minimizing the contrast, and directionality. Coarseness measures texture
delay and the buffer space used. Techniques such as data scale (average size of regions that have the same intensity).
striping, data compression, and storage hierarchies have Contrast measures vividness of the texture (depending on
been employed to reduce this bottleneck. Data striping, the variance of the gray-level histogram). Directionality
as is used in redundant array of inexpensive disks gives the main direction of the image texture (depending on
(RAIDs), allocates space for a visual object across several the number and shape of peaks of the distribution of
parallel devices to maximize data throughput. Also stu- gradient directions).
died are storage hierarchies in which tertiary storage can QBIC also uses shape information, such as area, major
be used for less frequently used or high-resolution visual axis orientation (eigenvector of the principal component),
objects and faster devices for more frequently used or low- and eccentricity (ratio of the largest eigenvalue against the
resolution visual objects. As hard disks become larger smallest eigenvalue); various invariants; and tangent
and cheaper, however, tertiary storage is less necessary angles as image features. It also supports search of video
than it was before. data by using motion and shot detection.
QBIC supports queries based on example images, user-
Recovery constructed sketches and drawings, and color and texture
patterns. The user can select colors and color distributions,
Many advanced transaction models have generalized select textures, and adjust relative weights among the
recovery methods. In a long cooperative design environ- features. Segmentation into objects can be done either fully
ment, undoing complete transactions is wasteful. A poten- automatically (for a restricted class of images) or semiau-
tially large amount of work, some of it correct, might not tomatically. In the semiautomatic approach, segmentation
have to be undone. It makes more sense to remove the is made in a flood-fill manner where the user starts by
effects of individual operations rather than undo a whole marking a pixel inside an object and the system grows the
transaction. To do so, however, the log must contain not area to include adjacent pixels with sufficiently similar
only the history of a transaction but also the dependencies colors. Segmentation can also be made by snakes (active
among individual operations. contours) where the user draws an approximate contour of
Advanced transaction models for long-running activities the object that is aligned automatically with nearby image
include compensating transactions and contingency trans- edges.
actions. A compensating transaction undoes the effect of an
already committed transaction. In video delivery, for exam-
MARS
ple, a unique concern is how to compensate a transaction
with acceptable quality of service. Unlike compensating MARS uses relevance feedback to learn similarity mea-
transaction, a contingency transaction provides alternative sures. The system has access to a variety of features and
routes to a transaction that could not be committed. For similarity measures and learns the best ones for a parti-
example, a contingency transaction for showing an image cular query by letting the user grade retrieved images as
in GIF format might show the image in JPEG format. highly relevant, relevant, no-opinion, nonrelevant, or
VISUAL DATABASE 9

highly nonrelevant. MARS uses image features such as keywords to find the most frequent ones, which are put
color, texture, shape and wavelet coefficients. MARS into classes and subclasses. An image can be put into more
calculates color histogram and color moments represented than one classes. An image taxonomy is constructed in a
in the HSV color space. It uses co-occurrence matrices semiautomatic way using text features (such as associated
in different directions to extract textures such as coarse- html tags, captions, and articles) and visual features (such
ness, contrast, directionality, and inverse difference as color, texture, and spatial layout) in the same way as
moments. It also uses Fourier transform and wavelet coef- they are used in VisualSEEK. The user can search for
ficients to characterize images. The information in each images by walking through the taxonomy. The system
type of features (e.g., color) is represented by a set of displays a selection of images, which the user can search
subfeatures (e.g., color histogram or color moments). The by using similarity of color histograms. The histogram can
subfeatures and similarity measures are normalized. be modified either manually or through relevance feed-
Users from various disciplines have been invited to com- back.
pare the performance between the relevance feedback
approach in MARS and the computer centric approach
where the user specifies the relative feature weights. BIBLIOGRAPHIC NOTES
Almost all users have rated the relevance feedback
approach much higher than the computer-centric approach Comprehensive surveys exist on the topics of content-based
in terms of capturing their perception subjectivity and image retrieval, which include surveys by Aigrain et al.
information needed. (43), Rui et al. (44), Yoshitaka and Ichikawa (45),
Smeulders et al. (16), and recently, Datta et al. (46,47).
Multimedia information retrieval as a broader research
VisualSEEK/WebSEEK
area covering video, audio, image, and text analysis has
VisualSEEK is an image database system that integrates been surveyed extensively by Sebe et al. (48), Snoek and
feature-based image indexing with spatial query methods. Worring (32), and Lew et al. (49). Surveys also exist on
Because global features such as color histograms lack closely related topics such as indexing methods for visual
spatial information, VisualSEEK uses salient image data by Marsicoi et al. (50), face recognition by Zhao et al.
regions and their colors, sizes, spatial locations, and rela- (51), applications of content-based retrieval to medicine by
tionships, to describe images. The integration of global Muller et al. (52), and applications to cultural and historical
features and spatial locations relies on the representation imaging by Chen et al. (53).
of color regions by color sets. Because color sets can be Image feature extraction is of ultimate importance to
indexed for retrieval of similar color sets, unconstrained content-based retrieval. Comparisons of different image
images are decomposed into nearly symbolic images that measures for content-based image retrieval are given in
lend to efficient spatial query. Refs. (16,17 and 54).
VisualSEEK quantizes the HSV color space into 166 Example visual database systems that support content-
regions. Quantized images are then filtered morphologi- based retrieval include IBM QBIC (6), Virage (55), and
cally and analyzed to reveal spatially localized color NEC AMORE (56) in the commercial domain and MIT
regions. A region is represented by the dominant colors Photobook (57), UIUC MARS (34,58), Columbia Visual-
in the region. The color distribution in a region is repre- SEEK (42), and UCSB NeTra (59) in the academic
sented by a color set, which is a 166-dimensional binary domain. Practical issues such as system implementation
vector approximating the color histogram of the region. The and architecture, their limitations and how to overcome
similarity between two color sets, c1 and c2, is given by them, intuitive result visualization, and system evaluation
c1  c2 T Ac1  c2 , where elements of the matrix A denote were discussed by Smeulders et al. in Ref. (16). Many of
the similarity between colors. In addition, VisualSEEK these systems such as AMORE or their extensions such as
uses features such as centroid and minimum bounding UIUC WebMARS (60) and Columbia WebSEEK (19) sup-
box of each region. Measurements such as distances port image search on the World Wide Web. Webseer (18)
between regions and relative spatial locations are also and ImageScape (61) are systems designed for Web-based
used in the query. image retrieval. Kherfi et al. (62) provides a survey of these
VisualSEEK allows the user to sketch spatial arrange- Web-based image retrieval systems.
ments of color regions, position them on the query grid, and Interested readers may refer to Refs. (16,17, 49 and 63)
assign them properties of color, size, and absolute location. for surveys and technical details of bridging the semantic
The system then finds the images that contain the most gap. Important early work that introduced relevance
similar arrangements of regions. The system automatically feedback into image retrieval included Ref. (34), which
extracts and indexes salient color regions from the images. was implemented in the MARS system (58). A review of
By using efficient indexing techniques on color, region techniques for relevance feedback is given by Zhou and
sizes, and both absolute and relative spatial locations, a Huang (64).
wide variety of color/spatial visual queries can be com- Readers who are interested in the quadtree and related
puted. hierarchical data structures may consult the survey (65) by
WebSEEK searches the World Wide Web for images Samet. An encyclopedic description of high-dimensional
and video by looking for file extensions such as .jpg, .mov, metric data structures was published recently as a book
.gif, and .mpeg. The system extracts keywords from (37). Bohm et al. (66) give a review of high-dimensional
the URL and hyperlinks. It creates a histogram on the indexing techniques of multimedia data.
10 VISUAL DATABASE

Relational database management systems have been 17. Y. Liu, D. Zhang, G. Lu, and W.-Y. Ma, A survey of content-
studied extensively for decades and have resulted in based image retrieval with high-level semantics, Pattern
numerous efficient optimization and implementation Recognition, 40 (1): 262282, 2007.
techniques. For concepts and techniques in relational 18. C. Frankel, M. J. Swain, and V. Athitsos, Webseer: an image
database management, readers may consult popular data- search engine for the world wide web, Technical Report TR-96-
base textbooks, such as Ref. (40). Common machine learn- 14, Chicago, Ill.: University of Chicago, 1996.
ing and data mining algorithms for data clustering and 19. J. R. Smith and S.-F. Chang, Visually searching the web for
classification can be found in data mining textbooks, such content, IEEE Multimedia, 4 (3): 1220, 1997.
as Ref. (61). Image feature extraction depends on image 20. A. B. Benitez, M. Beigi, and S.-F. Chang, Using relevance
processing algorithms and techniques, which are feedback in content-based image metasearch, IEEE Internet
Computing, 2 (4): 5969, 1998.
well explained in image processing textbooks, such as
Refs. (22 and 23). 21. A. F. Smeaton, P. Over, and W. Kraaij, Evaluation campaigns
and TRECVid, MIR06: Proc. 8th ACM Internat. Workshop on
Multimedia Information Retrieval, Santa Barbara, California,
BIBLIOGRAPHY 2006, pp. 321330.
22. J. C. Russ, The Image Processing Handbook, 5th Ed. Boca
1. T. Kunii, S. Weyl, and J. M. Tenenbaum, A relational data- Raton, FL: CRC Press, 2006.
base scheme for describing complex picture with color 23. R. C. Gonzalez and R. E. Woods, Digital Image Processing, 3rd
and texture, Proc. 2nd Internat. Joint Conf. Pattern Recogni- Ed. Englewood Cliffs, NJ: Prentice Hall, 2007.
tion, Lyngby-Coperhagen, Denmark, 1974, pp. 7389. 24. W.-Y Ma and B. S. Manjunath, A texture thesaurus for brows-
2. S. K. Chang and K. S. Fu, (eds.), Pictorial Information Systems, ing large aerial photographs, J. Am. Soc. Informa. Sci. 49 (7):
Lecture Notes in Computer Science 80, Berlin: Springer-Verlag, 633648, 1998.
1980. 25. M. Turk and A. Pentland, Eigen faces for recognition, J.
3. S. K. Chang and T. L. Kunii, Pictorial database systems, IEEE Cognitive Neuro-science, 3 (1): 7186, 1991.
Computer, 14 (11): 1321, 1981. 26. J. B. Tenenbaum, V. deSilva, and J. C. Langford, A global
4. S. K. Chang, (ed.), Special issue on pictorial database systems, geometric framework for nonlinear dimensionality reduction,
IEEE Computer, 14 (11): 1981. Science, 290: 23192323, 2000.
5. H. Tamura and N. Yokoya, Image database systems: a survey, 27. S. T. Roweis and L. K. Saul, Nonlinear dimensionality reduc-
Pattern Recognition, 17 (1): 2943, 1984. tion by locally linear embedding, Science, 290: 23232326,
6. M. Flickner, H. Sawhney, W. Niblack, J. Ashley, Q. Huang, 2000.
B. Dom, M. Gorkani, J. Hafner, D. Lee, D. Petkovic, D. Steele, 28. L. Yang, Alignment of overlapping locally scaled patches for
and P. Yanker, Query by image and video content: the QBIC multidimensional scaling and dimensionality reduction, IEEE
system, IEEE Computer, 28 (9): 2332, 1995. Trans. Pattern Analysis Machine Intell., In press.
7. N. Roussopoulos, C. Faloutsos, and T. Sellis, An efficient 29. A. D. Bimbo and P. Pala, Content-based retrieval of 3D models,
pictorial database system for PSQL, IEEE Trans. Softw. ACM Trans. Multimedia Computing, Communicat. Applicat.,
Eng., 14 (5): 639650, 1988. 2 (1): 2043, 2006.
8. M. M. Zloof, Query-by-example: a database language, IBM 30. H. Du and H. Qin, Medial axis extraction and shape manipula-
Syst. J., 16 (4): 324343, 1977. tion of solid objects using parabolic PDEs, Proc. 9th ACM Symp.
9. N. S. Chang and K. S. Fu, Query-by-pictorial example, IEEE Solid Modeling and Applicat., Genoa, Italy, 2004, pp. 2535.
Trans. Softw. Eng., 6 (6): 519524, 1980. 31. M. Hilaga, Y. Shinagawa, T. Kohmura, and T. L. Kunii, Topol-
10. T. Joseph and A. F. Cardenas, PICQUERY: a high level query ogy matching for fully automatic similarity estimation of 3D
language for pictorial database management, IEEE Trans. shapes, Proc. ACM SIGGRAPH 2001, Los Angeles, CA, 2001,
Softw. Eng., 14 (5): 630638, 1988. pp. 203212.
11. L. Yang and J. K. Wu, Towards a semantic image database 32. C. G. Snoek and M. Worring, Multimodal video indexing: a
system, Data and Knowledge Enginee, 22 (2): 207227, 1997. review of the state-of-the-art, Multimedia Tools and Applicat.,
25 (1): 535, 2005.
12. K. Yamaguchi and T. L. Kunii, PICCOLO logic for a picture
database computer and its implementation, IEEE Trans. Com- 33. J.-K. Wu, Content-based indexing of multimedia databases,
put., C-31 (10): 983996, 1982. IEEE Trans. Knowledge Data Engineering, 9 (6): 978989,
1997.
13. J. A. Orenstein and F. A. Manola, PROBE spatial data model-
ing and query processing in an image database application, 34. Y. Rui, T. S. Huang, M. Ortega, and S. Mehrotra, Relevance
IEEE Trans. Softw. Eng., 14 (5): 611629, 1988. feedback: A power tool in interactive content-based image
retrieval, IEEE Trans. Circuits Systems Video Technol., 8
14. S. K. Chang, C. W. Yan, D. C. Dimitroff, and T. Arndt, An
(5): 644655, 1998.
intelligent image database system, IEEE Trans. Softw. Eng.,
14 (5): 681688, 1988. 35. M. Kobayashi and K. Takeda, Information retrieval on the web,
ACM Comput. Surv., 32 (2): 144173, 2000.
15. A. Brink, S. Marcus, and V. Subrahmanian, Heterogeneous
multimedia reasoning, IEEE Computer, 28 (9): 3339, 1995. 36. Y. Chen and J. Z. Wang, A region-based fuzzy feature matching
approach to content-based image retrieval, IEEE Trans. Pat-
16. A. W. M. Smeulders, M. Worring, S. Santini, A. Gupta, and R.
tern Analysis and Machine Intelligence, 24 (9): 12521267,
Jain, Content-based image retrieval at the end of the early
2002.
years, IEEE Trans. Patt. Anal. Machine Intell., 22 (12): 1349
1380, 2000. 37. H. Samet, Foundations of Multidimensional and Metric Data
Structures, San Francisco, CA: Morgan Kaufmann, 2006.
VISUAL DATABASE 11

38. J. B. MacQueen, Some methods for classification and analysis 54. B. M. Mehtre, M. S. Kankanhalli, and W. F. Lee, Shape
of multivariate observations, Proc. 5th Berkeley Symp. measures for content based image retrieval: a comparison,
Mathematical Statistics and Probability, Berkeley, CA, Information Processing and Management, 33 (3): 319337,
1967, pp. 281297. 1997.
39. T. Kohonen, Self-Organizating Maps, 3rd Ed. Berlin: Springer, 55. A. Gupta and R. Jain, Visual information retrieval, Commun.
2000. ACM, 40 (5): 7079, 1997.
40. R. Ramakrishnan and J. Gehrke, Database Management Sys- 56. S. Mukherjea, K. Hirata, and Y. Hara, Amore: a world wide web
tems, 3rd Ed. New York: McGraw-Hill, 2002. image retrieval engine, World Wide Web, 2 (3): 115132,
41. S. Chaudhuri and L. Gravano, Optimizing queries over multi- 1999.
media repositories, Proc. 1996 ACM SIGMOD Internat. Conf. 57. A. Pentland, R. W. Picard, and S. Sclaroff, Photobook: Tools for
Management of Data (SIGMOD96), Montreal, Quebec, content-based manipulation of image databases. Technical
Canada, 1996, pp. 91102. Report TR-255, MIT Media Lab, 1996.
42. J. R. Smith and S.-F. Chang, VisualSEEk: A fully automated 58. M. Ortega, Y. Rui, K. Chakrabarti, K. Porkaew, S. Mehrotra,
content-based image query system, Proc. 4th ACM and T. S. Huang, Supporting ranked boolean similarity queries
Internat. Conf. Multimedia, Boston, MA, 1996, pp. 8798. in MARS, IEEE Trans. Knowledge Data Engineering, 10 (6):
43. P. Aigrain, H. Zhang, and D. Petkovic, Content-based repre- 905925, 1998.
sentation and retrieval of visual media: A state-of-the-art 59. W.-Y. Ma and B. S. Manjunath, Netra: a toolbox for navigating
review, Multimedia Tools and Applicat., 3 (3): 179202, 1996. large image databases, Multimedia Systems, 7 (3): 184198,
44. Y. Rui, T. S. Huang, and S.-F. Chang, Image retrieval: current 1999.
techniques, promising directions and open issues, J. Visual 60. M. Ortega-Binderberger, S. Mehrotra, K. Chakrabarti, and K.
Communicat. Image Represent., 10 (1): 3962, 1999. Porkaew, WebMARS: a multimedia search engine. Technical
45. A. Yoshitaka and T. Ichikawa, A survey on content-based Report TR-DB-00-01, Information and Computer Science, Uni-
retrieval for multimedia databases, IEEE Trans. Knowledge versity of California at Irvine, 2000.
and Data Engineering, 11 (1): 8193, 1999. 61. M. S. Lew, Next-generation web searches for visual content,
46. R. Datta, D. Joshi, J. Li, and J. Z. Wang, Image retrieval: Ideas, IEEE Computer, 33 (11): 4653, 2000.
influences, and trends of the new age, ACM Comput. Surv. 62. M. L. Kherfi, D. Ziou, and A. Bernardi, Image retrieval from the
In press. world wide web: Issues, techniques, and systems, ACM Com-
47. R. Datta, J. Li, and J. Z. Wang, Content-based image retrieval: put. Surv., 36 (1): 3567, 2004.
approaches and trends of the new age, Proc. 7th ACM SIGMM 63. N. Vasconcelos, From pixels to semantic spaces: advances in
Internat. Workshop on Multimedia Information Retrieval (MIR content-based image retrieval, IEEE Computer, 40 (7): 2026,
2005), 2005, pp. 253262. 2007.
48. N. Sebe, M. S. Lew, X. S. Zhou, T. S. Huang, and E. M. Bakker, 64. X. S. Zhou and T. S. Huang, Relevance feedback in image
The state of the art in image and video retrieval, Proc. 2nd retrieval: a comprehensive review, Multimedia Systems, 8
Internat. Conf. Image and Video Retrieval, Lecture Notes in (6): 536544, 2003.
Computer Science 2728, Urbana-Champaign, IL, 2003. pp. 18. 65. H. Samet, The quadtree and related hierarchical data struc-
49. M. S. Lew, N. Sebe, C. Djeraba, and R. Jain, Content-based tures, ACM Comput. Surv., 16 (2): 187260, 1984.
multimedia information retrieval: State of the art and chal- 66. C. Bhm, S. Berchtold, and D. A. Keim, Searching in high-
lenges, ACM Trans. Multimedia Computing, Communicat. dimensional spaces: Index structures for improving the per-
Applicat., 2 (1): 119, 2006. formance of multimedia databases, ACM Comput. Surv., 33 (3):
50. M. D. Marsicoi, L. Cinque, and S. Levialdi, Indexing pictorial 322373, 2001.
documents by their content: A survey of current techniques, 67. J. Han and M. Kamber, Data Mining: Concepts and Techni-
Image and Vision Computing, 15 (2): 119141, 1997. ques, 2nd Ed. San Francisco, CA: Morgan Kaufmann,
51. W. Zhao, R. Chellappa, P. J. Phillips, and A. Rosenfeld, Face 2005.
recognition: a literature survey, ACM Comput. Surv., 35 (4):
399458, 2003.
52. H. Muller, N. Michoux, D. Bandon, and A. Geissbuhler, A LI YANG
review of content-based image retrieval systems in medical Western Michigan University
applications - clinical benefits and future directions, Internat. Kalamazoo, Michigan
J. Medical Informatics, 73 (1): 123, 2004. TOSIYASU L. KUNII
53. C.-C. Chen, H. D. Wactlar, J. Z. Wang, and K. Kiernan, Digital Kanazawa Institute of
imagery for significant cultural and historical materials - an Technology
emerging research field bridging people, culture, and technol- Tokyo, Japan
ogies, Internat. J. Digital Libraries, 5 (4): 275286, 2005.
Foundation and
Theory
A
ALGEBRAIC GEOMETRY In what follows, k will denote a field, which for concrete-
ness can be taken to be one of the above. We now explore
INTRODUCTION the two main flavors of algebraic geometry: affine and
projective.
Algebraic geometry is the mathematical study of geometric
objects by means of algebra. Its origins go back to the
AFFINE ALGEBRAIC GEOMETRY
coordinate geometry introduced by Descartes. A classic
example is the circle of radius 1 in the plane, which is
Given a field k, we have n-dimensional affine space kn,
the geometric object defined by the algebraic equation
which consists of all n-tuples of elements of k. In some
x2 y2 1. This generalizes to the idea of a systems of
books, kn is denoted An(k). The corresponding algebraic
polynomial equations in many variables. The solution sets
object is the polynomial ring k[x1, . . . , xn] consisting of all
of systems of equations are called varieties and are the
polynomials in variables x1, . . . , xn with coefficients in k.
geometric objects to be studied, whereas the equations and
By polynomial, we mean a finite sum of terms, each of which
their consequences are the algebraic objects of interest.
is an element of k multiplied by a monomial
In the twentieth century, algebraic geometry became
much more abstract, with the emergence of commutative
xa11 xa22    xann
algebra (rings, ideals, and modules) and homological
algebra (functors, sheaves, and cohomology) as the founda-
tional language of the subject. This abstract trend culmi- where a1, . . . , an are non-negative integers. Polynomials
nated in Grothendiecks scheme theory, which includes not can be added and multiplied, and these operations are
only varieties but also large parts of algebraic number commutative, associative, and distibutive. This is why
theory. The result is a subject of great power and scope k[x1, . . . , xn] is called a commutative ring.
Wiles proof of Fermats Last Theorem makes essential Given polynomials f1,. . ., fs in k[x1, . . . , xn ], the affine
use of schemes and their properties. At the same time, variety V(f1, . . . , fs) consists of all points (u1, . . . , un) in kn
this abstraction made it difficult for beginners to learn that satisfy the system of equations
algebraic geometry. Classic introductions include Refs. 1
and 2, both of which require a considerable mathematical f1 u1 ; . . . ; un    fs u1 ; . . . ; un 0:
background.
As the abstract theory of algebraic geometry was being Some books (such as Ref. 1) call V(f1, . . . , fs) an affine
developed in the middle of the twentieth century, a parallel algebraic set.
development was taking place concerning the algorithmic The algebraic object corresponding to an affine variety is
aspects of the subject. Buchbergers theory of Grobner bases called an ideal. These arise naturally from a system of
showed how to manipulate systems of equations system- equations f1    fs 0 as follows. Multiply the first
atically, so (for example) one can determine algorithmically equation by a polynomial h1, the second by h2, and so on.
whether two systems of equations have the same solutions This gives the equation
over the complex numbers. Applications of Grobner bases
are described in Buchbergers classic paper [3] and now h h1 f1    hs fs 0;
include areas such as computer graphics, computer vision,
geometric modeling, geometric theorem proving, optimiza- which is called a polynomial consequence of the original
tion, control theory, communications, statistics, biology, system. Note that hu1 ; . . . ; un 0 for every (u1, . . . , un)
robotics, coding theory, and cryptography. in V(f1, . . . , fs). The ideal hf1, . . . , fsi consists of all poly-
Grobner basis algorithms, combined with the emer- nomial consequences of the system f1    fs 0.
gence of powerful computers and the development of com- Thus, elements of hf1, . . . , fsi are linear combinations of
puter algebra (see SYMBOLIC COMPUTATION), have led to f1, . . . , fs, where the coefficients are allowed to be arbitrary
different approaches to algebraic geometry. There are polynomials.
now several accessible introductions to the subject, includ- A general definition of ideal applies to any commutative
ing Refs. 46. ring. The Hilbert Basis Theorem states that all ideals in a
In practice, most algebraic geometry is done over a field, polynomial ring are of the form hf1, . . . , fsi. We say that
and the most commonly used fields are as follows: f1, . . . , fs is a basis of hf1, . . . , fsi and that hf1, . . . , fsi is gen-
erated by f1, . . . , fs. This notion of basis differs from how
 The rational numbers Q used in symbolic computation. the term is used in linear algebra because linear indepen-
dence fails. For example, x, y is a basis of the ideal hx, yi in
 The real numbers R used in geometric applications.
k[x, y], even though y  x x  y 0.
 The complex numbers C used in many theoretical A key result is that if V(f1, . . . , fs) V{g1, . . . , gt) when-
situations. ever hf1, . . . , fsi hg1, . . . , gti. This is useful in practice
 The finite field Fq with q pm elements (p prime) used because switching to a different basis may make it easier
in cryptography and coding theory. to understand the solutions of the equations. From the
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 ALGEBRAIC GEOMETRY

theoretical point of view, this shows that an affine variety In general, an affine variety is irreducible if it has no
depends on the ideal I generated by the defining equations, such decomposition. In books such as Ref. 1, varieties are
so that the affine variety can be denoted V(I). Thus, every always assumed to be irreducible.
ideal gives an affine variety. One can show that every affine variety V can be written
We can also reverse this process. Given an affine variety as
V, let I(V) consist of all polynomials that vanish on all points
of V. This satisfies the abstract definition of ideal. Thus, V V1 [    [ Vm
every affine variety gives an ideal, and one can show that we
always have where each Vi is irreducible and no Vi is contained in Vj
for j 6 i. We say that the Vi are the irreducible components
V VIV: of V. Thus, irreducible varieties are the building blocks
out of which all varieties are built. Algebraically, the above
However, the reverse equality may fail. In other words, decomposition means that the ideal of V can be written as
there are ideals I such that
IV P1 \    \ Pm
I 6 IVI:
where each Pi is prime (meaning that if a product ab lies in
An easy example is provided by I hx2 i in k|x|, because Pi, then so does a or b) and no Pi contains Pj for j 6 i. This
IVI hxi 6 I. Hence, the correspondence between again illustrates the close connection between the algebra
ideals and affine varieties is not a perfect match. Over and geometry. (For arbitrary ideals, things are a bit more
the complex numbers, we will see below that there is complicated: The above intersection of prime ideals has to
nevertheless a nice relation between I and I(V(I)). be replaced with what is called a primary decomposition
One can prove that the union and intersection of affine see Chapter 4 of Ref. 4).
varieties are again affine varieties. In fact, given ideals Every variety has a dimension. Over the real numbers
I and J, one has R, this corresponds to our geometric intuition. But over the
complex numbers C, one needs to be careful. The affine
VI [ VJ VI \ J space C2 has dimension 2, even though it looks four-
VI \ VJ VI J; dimensional from the real point of view. The dimension
of a variety is the maximum of the dimensions of its
where irreducible components, and irreducible affine varieties
of dimensions 1, 2, and 3 are called curves, surfaces, and
I\J fg j g is in both I and Jg 3-folds, respectively. An affine variety in kn is called a
IJ fg h j g is in I and h is in Jg hypersurface if every irreducible component has dimension
n  1.
are the intersection and sum of I and J (note that I \ J
and I J are analgous to the intersection and sum of
PROJECTIVE ALGEBRAIC GEOMETRY
subspaces of a vector space). In this way, algebraic opera-
tions on ideals correspond to geometric operations on vari-
One problem with affine varieties is that intersections
eties. This is part of the ideal-variety correspondence
sometimes occur at infinity. An example is given by the
explained in Chapter 4 of Ref. 4.
intersection of a hyperbola with one of its asymptotes in
Sometimes an affine variety can be written as a union of
Fig. 2. (Note that a line has a single point at infinity.)
strictly smaller affine varieties. For example,
Points at infinity occur naturally in computer graphics,
where the horizon in a perspective drawing is the line at
Vx  yx2 y2  1 Vx  y [ Vx2 y2  1 infinity where parallel lines meet. Adding points at infi-
nity to affine space leads to the concept of projective space.
expresses the affine variety Vx  yx2 y2  1 as the
union of the line y x and the unit circle (Fig. 1).

y meet at
y infinity
1

x x
1

meet at the same


point at infinity

Figure 1. Union of a line and a circle. Figure 2. A hyperbola and one of its asymptotes.
ALGEBRAIC GEOMETRY 3

The most common way to define n-dimensional projective projective variety is irreducible and what is its dimension.
space Pn(k) is via homogeneous coordinates. Every point in We also have a projective version of the ideal-variety cor-
Pn(k) has homogeneous coordinates [u0, . . . , un], where respondence, where homogeneous ideals correspond to
(u0, . . . , un) is an element of kn+l different from the zero projective varieties. This is a bit more sophisticated than
element (0, . . . , 0). The square brackets in [u0, . . . , un] indi- the affine case, in part because the ideal hx0, . . . , xni defines
cate that homogeneous coordinates are not unique; rather, the empty variety because homogeneous coordinates are
not allowed to all be zero.
u0 ; . . . ; un  v0 ; . . . ; vn  Given a projective variety V in Pn(k), we get a homo-
geneous ideal I IV in k[x0, . . . , xn]. Let Id consist of all
if and only if there is a nonzero l in k such that lui vi homogeneous polynomials of degree d that lie in I. Then Id is
for i 0; . . . ; n, i.e., lu0 ; . . . ; un v0 ; . . . ; vn . This means a finite-dimensional vector space over k, and by a theorem
that two nonzero points in kn+1 give the same point in Pn(k) of Hilbert, there is a polynomial P(x), called the Hilbert
if and only if they lie on the same line through the origin. polynomial, such that for all sufficiently large integers d
Consider those points in Pn(k) where u0 6 0. As (1=u0) sufficiently large, we have
(u0, u1, . . . , un) (l, u1=u0, . . . , un=un), one sees easily that
 
nd
 dimk Id Pd;
Pn k kn [ Pn1 k: n

We call Pn1 (k) the hyperplane at infinity in this situation. where the binomial coefficient nd is the dimension of the
n
One virtue of homogeneous coordinates is that they have a space of all homogeneous polynomials of degree n. Then one
rich supply of coordinate changes. For example, an inver- can prove that the dimension m of V equals the degree of
tible 4  4 matrix with real entries gives an invertible P(x). Furthermore, if we write the Hilbert polynomial P(x)
transformation from P3(R) to itself. The reason you see in the form
4  4 matrices in computer graphics is that you are really
working in three-dimensional projective space P3(R), D m
Px x terms of lower degree;
although this is rarely mentioned explicitly. See THREE- m!
DIMENSIONAL GRAPHICS.
Now that we have Pn(k), we can define projective vari- then D is a positive integer called the degree of V. For
eties as follows. A polynomial F in k[x0, . . . , xn] is homo- example, when V is defined by F 0 over the complex
geneous of degree d if every monomial xa00 . . . xann appearing numbers, where F is irreducible and homogeneous of
in F has degree d, i.e., a0    an d. Such a polynomial degree d, then V has degree d according to the above
has the property that definition. This shows just how much information is packed
into the ideal I. Later we will discuss the algorithmic
Flx0 ; . . . ; lxn ld Fx0 ; . . . ; xn : methods for computing Hilbert polynomials.

For a point [u0, . . . , un] of Pn(k), the quantity F(u0, . . . , un)


is not well defined because of the ambiguity of homo- THE COMPLEX NUMBERS
geneous coordinates. But when F is homogeneous, the
equation Fu0 ; . . . ; un 0 is well defined. Then, given Although many applications of algebraic geometry work
homogeneous polynomials F1, . . . , Fs, the projective variety over the real numbers R, the theory works best over the
V(F1, . . . , Fs) consists of all points [u0, . . . , un] in Pn(k) complex numbers C. For instance, suppose that V
that satisfy the system of equations V f1 ; . . . ; fs is a variety in Rn of dimension d. Then we
expect V to be defined by at least n  d equations because
F1 u1 ; . . . ; un    Fs u1 ; . . . ; un 0: (roughly speaking) each equation should lower the dimen-
sion by one. But if we set f f12    fs2 , then f 0
Some books (such as Ref. 1) call V(F1, . . . , Fs) a projective is equivalent to f1    fs 0 because we are working
algebraic set. over R. Thus, V V f1 ; . . . ; fs can be defined by one
The algebraic object corresponding to Pn(k) is the polyno- equation, namely f 0. In general, the relation between
mial ring k[x0, . . . , xn], which we now regard as a graded ring. ideals and varieties is complicated when working over R.
This means that by grouping together terms of the same de- As an example of why things are nicer over C, consider
gree, every polynomial f of degree d can be uniquely written as an ideal I in C[x1, . . . , xn] and let V VI be the corres-
ponding affine variety in Cn. The polynomials in I clearly
f f0 f1    fd ; vanish on V, but there may be others. For example,
suppose that f is not in I but some power of f, say f , is
where fi is homogeneous of degree i (note that fi may in I. Then f and hence f vanish on V. The Hilbert Null-
be zero). We call the fi the homogeneous components of f. stellensatz states that these are the only polynomials that
An ideal I is homogeneous if it is generated by homogeneous vanish on V, i.e.,
polynomials. If I is homogeneous, then a polynomial lies
in I if and only if its homogeneous components lie in I. IV IVI
Most concepts introduced in the affine context carry over
to the projective setting. Thus, we can ask whether a f f in Cx1 ; . . . ; xn j f is in I for some integer  0g:
4 ALGEBRAIC GEOMETRY

y FUNCTIONS ON AFFINE AND PROJECTIVE VARIETIES

In mathematics, one often studies objects by considering


the functions defined on them. For an affine variety V in kn,
we let k[V] denote the set of functions from V to k given
x by polynomials in k[x1, . . . , xn]. One sees easily that k[V]
is a ring, called the coordinate ring of V.
An important observation is that two distinct poly-
nomials f and g in k[x1, . . . , xn] can give the same function
on V. This happens precisely when f  g vanishes on V,
i.e., when f  g is in the ideal I(V). We express this by
Figure 3. A circle and an ellipse. writing

f  g mod IV;
The ideal on the right is called the radical of I and is denoted
rad(I). Thus, the Nullstellensatz asserts that over C, we similar to the congruence notation introduced by Gauss.
have IVI radI. It is easy to find examples where this It follows that computations in k[x1, . . . , xn] modulo I(V)
fails over R. are equivalent to computations in k[V]. In the lang-
Another example of why C is nice comes from Bezouts uage of abstract algebra, this is expressed by the ring
Theorem in Fig. 3. In its simplest form, this asserts that isomorphism
distinct irreducible plane curves of degrees m and n inter-
sect in mn points, counted with multiplicity. For example, kx1 ; . . . ; xn =IV kV;
consider the intersection of a circle and an ellipse. These are
curves of degree 2, so we should have four points of inter-
section. But if the ellipse is really small, it can fit entirely where k[x1, . . . , xn]/I(V) is the set of equivalence classes of
inside the circle, which makes it seem that there are no the equivalence relation f  g mod I(V). More generally,
points of intersection, as in Fig. 3. This is because we are given any ideal I in k[x1, . . . , xn], one gets the quotient ring
working over R; over C, there really are four points of k[x1, . . . , xn]/I coming from the equivalence relation f  g
intersection. mod I. We will see later that Grobner bases enable us to
Bezouts Theorem also illustrates the necessity of work- compute effectively in quotient rings.
ing over the projective plane. Consider, for example, the We can use quotients to construct finite fields as
intersection of a hyperbola and one of its asymptotes in follows. For a prime p, we get Fp by considering the inte-
Fig. 4. These are curves of degree 2 and 1, respectively, so gers modulo p. To get F pm when m > 1, take an irreducible
there should be 2 points of intersection. Yet there are none polynomial f in Fp[x] of degree m. Then the quotient
in R2 or C2. But once we go to P2(R) or P2(C), we get one ring Fp[x]/hfi is a model of F pm . Thus, for example, compu-
point of intersection at infinity, which has multiplicity 2 tations in F2[x] modulo x2 x 1 represent the finite
because the asymptote and the hyperbola are tangent at field F4. See ALGEBRAIC CODING THEORY for more on finite
infinity. We will say more about multiplicity later in the fields.
article. The coordinate ring C[V] of an affine variety V in Cn has
In both the Nullstellensatz and Bezouts theorem, we an especially strong connection to V. Given a point
can replace C with any algebraically closed field, meaning (u1, . . . , un) of V, the functions in C[V] vanishing at
a field where every nonconstant polynomial has a root. A (u1, . . . , un) generate a maximal ideal, meaning an ideal
large part of algebraic geometry involves the study of of C[V] not equal to the whole ring but otherwise as
irreducible projective varieties over algebraically closed big as possible with respect to inclusion. Using the
fields. Nullstellensatz, one can show that all maximal ideals of
C[V] arise this way. In other words, there is a one-to-one
correspondence

meet at points of V ! maximal ideals of CV:


y
infinity
Later we will use this correspondence to motivate the
definition of affine scheme.
Functions on projective varieties have a different flavor,
since a polynomial function defined everywhere on a con-
x nected projective variety must be constant. Instead, two
approaches are used, which we will illustrate in the case
meet at the same of Pn(k). In the first approach, one considers rational
point at infinity functions, which are quotients

Fx0 ; . . . ; xn
Figure 4. A hyperbola and one of its asymptotes. Gx0 ; . . . ; xn
ALGEBRAIC GEOMETRY 5

of homogeneous polynomials of the same degree, say d. This 2. If U > V, then UW > VW for all monomials W.
function is well defined despite the ambiguity of homoge- 3. If U 6 1, then U > 1; i.e., 1 is the least monomial with
neous coordinates, because respect to >.

Flx0 ; . . . ; lxn ld Fx0 ; . . . ; xn Fx0 ; . . . ; xn These properties imply that > is a well ordering, mean-
:
Glx0 ; . . . ; lxn ld Gx0 ; . . . ; xn Gx0 ; . . . ; xn ing that any strictly decreasing sequence with respect to
> is finite. This is used to prove termination of various
However, this function is not defined when the deno- algorithms. An example of a monomial order is lexico-
minator vanishes. In other words, the above quotient is graphic order, where
only defined where G 6 0. The set of all rational func-
tions on Pn(k) forms a field called the field of rational xa11 xa22 . . . xann > xb11 xb22 . . . xbnn
functions on Pn(k). More generally, any irreducible
projective variety V has a field of rational functions, provided
denoted k(V).
The second approach to studying functions on Pn(k) a1 > b1 ; or a1 b1 and a2 > b2 ; or a1 b1 ;
is to consider the polynomial functions defined on a2 b2 and a3 > b3 ; etc:
certain large subsets of Pn(k). Given projective variety
V in Pn(k), its complement U consists of all points of Pn(k)
Other important monomial orders are graded lexico-
not in V. We call U a Zariski open subset of Pn(k). Then let
graphic order and graded reverse lexicographic order.
GU be the ring of all rational functions on Pn(k) defined at
These are described in Chapter 2 of Ref. 4.
all points of U. For example, the complement U0 of V(x0)
Now fix a monomial order >. Given a nonzero poly-
consists of points where x0 6 0, which is a copy of kn. So
nomial f, we let lt(f ) denote the leading term of f, namely
here GU0 is the polynomial ring k[x1=x0, . . . , xn=x0]. When
the nonzero term of f whose monomial is maximal with
we consider the rings GU for all Zariki open subsets U,
respect to > (in the literature, lt(f) is sometimes called
we get a mathematical object called the structure sheaf
the initial term of f, denoted in(f)). Given f1, . . . , fs, the
of Pn(k). More generally, any projective variety V has
division algorithm produces polynomials q1, . . . , qs and
a structure sheaf, denoted OV. We will see below that
r such that
sheaves play an important role in abstract algebraic
geometry.
f q1 f1    qs fs r

GROBNER BASES where every nonzero term of r is divisible by none of


lt(f1), . . . , lt(fs). The remainder r is sometimes called the
Buchberger introduced Grobner bases in 1965 in order to normal form of f with respect to f1, . . . , fs. When s 1 and f
do algorithmic computations on ideals in polynomial and f1 are univariate, this reduces to the high-school
rings. For example, suppose we are given polynomials f, division algorithm mentioned earlier.
f1 ; . . . ; fs 2 kx1 ; . . . ; xn , where k is a field whose elements In general, multivariate division behaves poorly. To
can be represented exactly on a computer (e.g., k is a finite correct this, Buchberger introduced a special kind of
field or the field of rational numbers). From the point of basis of an ideal. Given an ideal I and a monomial order,
view of pure mathematics, either f lies in the ideal its ideal of leading terms lt(I) (or initial ideal in(I)is the
hf1, . . . , fsi or it does not. But from a practical point of ideal generated by lt(f) for all f in I. Then elements
view, one wants an algorithm for deciding which of g1, . . . , gt of I form a Grobner basis of I provided that
these two possibilities actually occurs. This is the ideal lt(g1), . . . , lt(gt) form a basis of lt(I). Buchberger showed
membership question. that a Grobner basis is in fact a basis of I and that, given
In the special case of two univariate polynomials f, g generators f1, . . . , fs of I, there is an algorithm (the
in k[x], f lies in hgi if and only if f is a multiple of g, which Buchberger algorithm) for producing the corresponding
we can decide by the division algorithm from high-school Grobner basis. A description of this algorithm can be found
algebra. Namely, dividing g into f gives f qg r, where in Chapter 2 of Ref. 4.
the remainder r has degree strictly smaller than the degree The complexity of the Bucherger algorithm has been
of g. Then f is a multiple of g if and only if the remainder studied extensively. Examples are known where the input
is zero. This solves the ideal membership question in our polynomials have degree  d, yet the corresponding
d
special case. Grobner basis contains polynomials of degree 22 . Theo-
To adapt this strategy to k[x1, . . . , xn], we first need to retical results show that this doubly exponential behavior
order the monomials. In k[x], this is obvious: The mono- is the worst that can occur (for precise references, see
mials are 1, x, x2, etc. But there are many ways to do this Chapter 2 of Ref. 4). However, there are many geometric
when there are two or more variables. A monomial order > situations where the complexity is less. For example, if the
is an order relation on monomials U, V, W,. . . in k[x1, . . . , xn] equations have only finitely many solutions over C, then
with the following properties: the complexity drops to a single exponential. Further-
more, obtaining geometric information about an ideal,
1. Given monomials U and V, exactly one of U > V, such as the dimension of its associated variety, often
U V, or U < V is true. has single exponential complexity. When using graded
6 ALGEBRAIC GEOMETRY

reverse lexicographic order, complexity is related to the geometry, such as Hilbert polynomials, free resolutions (see
regularity of the ideal. This is discussed in Ref. 7. Below we below), and sheaf cohomology (also discussed below), can
will say more about the practical aspects of Grobner basis also be computed by these methods. As more and more of
computations. these theoretical objects are finding applications, the abil-
Using the properties of Grobner bases, one gets the ity to compute them is becoming increasingly important.
following ideal membership algorithm: Given f, f1, . . . , fs, Grobner basis algorithms have been implemented in
use the Buchberger algorithm to compute a Grobner basis computer algebra systems such as Maple (10) and Mathe-
g1, . . . , gt of h f1, . . . , fsi and use the division algorithm matica (11). For example, the solve command in Maple and
to compute the remainder of f on division by g1, . . . , gt. Solve command in Mathematica make use of Grobner basis
Then f is in the ideal h f1, . . . , fsi if and only if the remainder computations. We should also mention CoCoA (12), Macau-
is zero. lay 2 (13), and Singular (14), which are freely available on
Another important use of Grobner bases occurs in elimi- the Internet. These powerful programs are used by
nation theory. For example, in geometric modeling, one researchers in algebraic geometry and commutative alge-
encounters surfaces in R3 parametrized by polynomials, say bra for a wide variety of experimental and theoretical
computations. With the help of books such as Ref. 5 for
x f s; t; y gs; t; z hs; t: Macaulay 2, Ref. 15 for CoCoA, and Ref. 16 for Singular,
these programs can be used by beginners. The program
Magma (17) is not free but has a powerful implementation
To obtain the equation of the surface, we need to elim- of the Buchberger algorithm.
inate s, t from the above equations. We do this by consider-
ing the ideal
MODULES
hx  f s; t; y  gs; t; z  hs; ti
Besides rings, ideals, and quotient rings, another impor-
in the polynomial ring R[s, t, x, y, z] and computing a tant algebraic structure to consider is the concept of module
Grobner basis for this ideal using lexicographic order, over a ring. Let R denote the polynomial ring k[x0, . . . , xn].
where the variables to be eliminated are listed first. The Then saying that M is an R-module means that M has
Elimination Theorem (see Chapter 3 of Ref. 4) implies that addition and scalar multiplication with the usual proper-
the equation of the surface is the only polynomial in the ties, except that the scalars are now elements of R. For
Grobner basis not involving s, t. In practice, elimination is example, the free R-module Rm consists of m-tuples of
often done by other methods (such as resultants) because of elements of R. We can clearly add two such m-tuples and
complexity issues. See also the entry on SURFACE MODELING. multiply an m-tuple by an element of R.
Our final application concerns a system of equations A more interesting example of an R-module is given by
f1    fs 0 in n variables over C. Let I h f1 ; . . . ; fs i, an ideal I h f1 ; . . . ; fs i in R. If we choose the generating set
and compute a Grobner basis of I with respect to any f1, . . . , fs to be as small as possible, we get a minimal basis of
monomial order. The Finiteness Theorem asserts that the I. But when s  2, f1, . . . , fs cannot be linearly independent
following are equivalent: over R, because f j  f i  fi  f j 0 when i 6 j. To see
how badly the fi fail to be independent, consider
1. The equations have finitely many solutions in Cn.
2. The Grobner basis contains elements whose leading Rs ! I ! 0;
terms are pure powers of the variables (i.e., x1 to a
power, x2 to a power, etc.) up to constants. where the first arrow is defined using dot product with
3. The quotient ring C[x1, . . . , xn]=I is a finite-dimensional (f1, . . . , fs) and the second arrow is a standard way of
vector space over C. saying the first arrow is onto, which is true because
I h f1 ; . . . ; fs i. The kernel or nullspace of the first arrow
The equivalence of the first two items gives an algorithm measures the failure of the fi to be independent. This kernel
for determining whether there are finitely many solutions is an R-module and is called the syzygy module of f1, . . . , fs,
over C. From here, one can find the solutions by several denoted Syz( f1, . . . , fs).
methods, including eigenvalue methods and homotopy con- The Hilbert Basis Theorem applies here so that there
tinuation. These and other methods are discussed in Ref. 8. are finitely many syzygies h1, . . . , h in Syz (f1, . . . , fs) such
The software PHCpack (9) is a freely available implemen- that every syzygy is a linear combination, with coefficients
tation of homotopy continuation. Using homotopy techni- in R, of h1, . . . , h. Each hi is a vector of polynomials; if we
ques, systems with 105 solutions have been solved. Without assemble these into a matrix, then matrix multiplication
homotopy methods but using a robust implementation of gives a map
the Buchberger algorithm, systems with 1000 solutions
have been solved, and in the context of computational R ! R s
biology, some highly structured systems with over 1000
equations have been solved. whose image is Syz(f1, . . . , fs). This looks like linear algebra,
However, although solving systems is an important except that we are working over a ring instead of a field. If
practical application of Grobner basis methods, we want we think of the variables in R kx1 ; . . . ; xn  as parameters,
to emphasize that many theoretical objects in algebraic then we are doing linear algebra with parameters.
ALGEBRAIC GEOMETRY 7

The generating syzgyies hi may fail to be independent, and the precise version of Bezouts Theorem states that
so that the above map may have a nonzero kernel. Hence X
we can iterate this process, although the Hilbert Syzygy mn multp:
Theorem implies that kernel is eventually zero. The result f pgp0
is a collection of maps
A related notion of multiplicity is the HilbertSamuel
t s
0 ! R !    ! R ! R ! I ! 0; multiplicity of an ideal in Op, which arises in geometric
modeling when considering the influence of a basepoint
on the degree of the defining equation of a parametrized
where at each stage, the image of one map equals the kernel surface.
of the next. We say that this is a free resolution of I. By
adapting Grobner basis methods to modules, one obtains
algorithms for computing free resolutions. SMOOTH AND SINGULAR POINTS
Furthermore, when I is a homogeneous ideal, the whole
resolution inherits a graded structure that makes it In multivariable calculus, the gradient r f @@xf i @@yf j
straightforward to compute the Hilbert polynomial of I. is perpendicular to the level curve defined by f x; y 0.
Given what we know about Hilbert polynomials, this gives When one analzyes this carefully, one is led to the following
an algorithm for determining the dimension and degree concepts for a point on the level curve:
of a projective variety. A discussion of modules and free
resolutions can be found in Ref. 18.  A smooth point, where r f is nonzero and can be used
Although syzygies may seem abstract, there are situa- to define the tangent line to the level curve.
tions in geometric modeling where syzygies arise naturally  A singular point, where r f is zero and the level curve
as moving curves and moving surfaces (see Ref. 19). This
has no tangent line at the point.
and other applications show that algebra needs to be added
to the list of topics that fall under the rubric of applied
mathematics. These concepts generalize to arbitrary varieties. For any
variety, most points are smooth, whereas othersthose
in the singular locusare singular. Singularities can be
important. For example, when one uses a variety to des-
LOCAL PROPERTIES
cribe the possible states of a robot arm, the singularities of
the variety often correspond to positions where the motion
In projective space Pn(k), let Ui denote the Zariski
of the arm is less predictable (see Chapter 6 of Ref. 4 and
open subset where xi 6 0. Earlier we noted that U0 looks
the entry on ROBOTICS).
the affine space kn; the same is true for the other Ui.
A variety is smooth or nonsingular when every point
This means that Pn(k) locally looks like affine space.
is smooth. When a variety has singular points, one can
Furthermore, if V is a projective variety in Pn(k), then
use blowing up to obtain a new variety that is less
one can show that Vi V \ Ui is a affine variety for all i.
singular. When working over an algebraically closed field
Thus, every projective variety locally looks like an affine
of characteristic 0 (meaning fields that contain a copy of
variety.
Q), Hironaka proved in 1964 that one can always find a
In algebraic geometry, one can get even more local.
sequence of blowing up that results in a smooth variety.
For example, let p u0 ; . . . ; un  be a point of Pn(k). Then
This is called resolution of singularities. Resolution of
let Op consist of all rational functions on Pn(k) defined at p.
singularities over a field of characteristic p (fields that
Then Op is clearly a ring, and the subset consisting of
contain a copy of Fp) is still an open question. Reference 20
those functions that vanish at p is a maximal ideal. More
gives a nice introduction to resolution of singularities.
surprising is the fact that this is the unique maximal ideal
More recently, various groups of people have figured out
of Op. We call Op the local ring of Pn(k) at p, and in general, a
how to do this algorithmically, and work has been done
commutative ring with a unique maximal ideal is called a
on implementing these algorithms, for example, the soft-
local ring. In a similar way, a point p of an affine or
ware desing described in Ref. 21. We also note that singu-
projective variety V has a local ring OV,p.
larities can be detected numerically using condition
Many important properties of a variety at a point are
numbers (see Ref. 22).
reflected in its local ring. As an example, we give the
definition of multiplicity that occurs in Bezouts Theorem.
Recall the statement: Distinct irreducible curves in P2(C)
of degrees m and n intersect at mn points, counted SHEAVES AND COHOMOLOGY
with multiplicity. By picking suitable coordinates, we
can assume that the points of intersection lie in C2 and For an affine variety, modules over its coordinate ring play
that the curves are defined by equations f 0 and g 0 of an important role. For a projective variety V, the corre-
degrees m and n, respectively. If p is a point of intersection, sponding objects are sheaves of OV-modules, where OV is
then its multiplicity is given by the structure sheaf of V. Locally, V looks like an affine
variety, and with a suitable hypothesis called quasi-
coherence, a sheaf of OV-modules locally looks like a module
multp dimC Op =h f ; gi; Op local ring of P2 C at p; over the coordinate ring of an affine piece of V.
8 ALGEBRAIC GEOMETRY

From sheaves, one is led to the idea of sheaf cohomology, in Ref. 24. Higher dimensional analogs of elliptic
which (roughly speaking) measures how the local pieces of curves are called abelian varieties.
the sheaf fit together. Given a sheaf F on V, the sheaf 2. Grassmannians and Schubert Varieties. In Pn(k), we
cohomology groups are denoted H i(V,F). We will see below use homogeneous coordinates [u0, . . . , un], where
that the sheaf cohomology groups are used in the classifica- u0 ; . . . ; un  v0 ; . . . ; vn  if both lie on the same line
tion of projective varieties. For another application of sheaf through the origin in kn+1. Hence points of Pn(k)
cohomology, consider a finite collection V of points in Pn(k). correspond to one-dimensional subspaces of kn+1.
From the sheaf point of view, V is defined by an ideal sheaf More generally, the Grassmannian G(N, m)(k) con-
IV. In interpolation theory, one wants to model arbitrary sists of all m-dimensional subspaces of kn. Thus,
functions on V using polynomials of a fixed degree, say m. If Gn 1; 1k Pn k.
m is too small, this may not be possible, but we always Points of G(N, m)(k) have natural coordi-
succeed if m is large enough. A precise description of which nates, which we describe for m 2. Given a two-
degrees m work is given by sheaf cohomology. The ideal dimensional sub-space W of kN, consider a 2  N
sheaf IV has a twist denoted IV (m). Then all functions on V matrix
come from polynomials of degree m if and only if
H1 Pn k; IV m f0g. We also note that vanishing theo-  
u1 u2 ... uN
rems for sheaf cohomology have been used in geometric
v1 v2 ... vN
modeling (see Ref. 23).
References 1, 2, and 24 discuss sheaves and sheaf
whose rows give a basis of W. Let pi j ; i < j, be the
cohomology. Sheaf cohomology is part of homological alge-
determinant of the 2  2 matrix
  formed by the ith
bra. An introduction to homological algebra, including
and jth columns. The M N 2 numbers pij are the
sheaves and cohomology, is given in Ref. 5.
Plucker coordinates of W. These give a point in
P M1(k) that depends only on W and not on the
SPECIAL VARIETIES chosen basis. Furthermore, the subspace W can be
reconstructed from its Plucker coordinates. The
We next discuss some special types of varieties that have Plucker coordinates satisfy the Plucker relations
been studied extensively.
pi j pkl  pik p jl pil p jk 0;
1. Elliptic Curves and Abelian Varieties. Beginning
with the middle of the eighteenth century, elliptic and any set of numbers satisfying these relations
integrals have attracted a lot of attention. The study comes from a subspace W. It follows that the Plucker
of these integrals led to both elliptic functions and relations define G(N, 2)(k) as a projective variety in
elliptic curves. The latter are often described by an PM1(k). In general, G(N, m)(k) is a smooth projec-
equation of the form tive variety of dimension m(N  m).
The Grassmannian G(N, m)(k) contains interest-
y2 ax3 bx2 cx d; ing varieties called Schubert varieties. The Schuberi
calculus describes how these varieties intersect.
where ax3 bx2 cx d is a cubic polynomial with Using the Schubert calculus, one can answer ques-
distinct roots. However, to get the best properties, tions such as how many lines in P3(k) intersect four
one needs to work in the projective plane, where the lines in general position? (The answer is two.) An
above equation is replaced with the homogeneous introduction to Grassmannians and Schubert var-
equation eties can be found in Ref. 26.
The question about lines in P3(k) is part of enum-
y2 z ax3 bx2 z cxz2 dz3 : erative algebraic geometry, which counts the num-
ber of geometrically interesting objects of various
The resulting projective curve E has an extra struc- types. Bezouts Theorem is another result of enu-
ture: Given two points on E, the line connecting them merative algebraic geometry. Another famous enu-
intersects E at a third point by Bezouts Theorem. merative result states that a smooth cubic surface in
This leads to a group structure on E where the point at P3(C) contains exactly 27 lines.
infinity is the identity element. 3. Rational and Unirational Varieties. An irreducible
Over the field of rational numbers Q, elliptic curves variety V of dimension n over C is rational if there is a
have a remarkably rich theory. The group structure is one-to-one rational parametrization U ! V, where U
related to the BirchSwinnerton-Dyer Conjecture, and is a Zariski open subset of Cn. The simplest example of
Wiless proof of Fermats Last Theorem was a corollary a rational variety is Pn(C). Many curves and surfaces
of his solution of a large part of the Taniyama that occur in geometric modeling are rational.
Shimura Conjecture for elliptic curves over Q. On More generally, an irreducible variety of dimen-
the other hand, elliptic curves over finite fields are sion n is unirational if there is a rational parametri-
used in cryptography (see Ref. 25). The relation zation U ! V whose image fills up most of V, where U
between elliptic integrals and elliptic curves has is a Zariski open subset of Cm, m  n. For varieties of
been generalized to Hodge theory, which is described dimension 1 and 2, unirational and rational coincide,
ALGEBRAIC GEOMETRY 9

but in dimensions 3 and greater, they differ. For change, the affine equation can be written as
example, a smooth cubic hypersurface in P4(C) is
unirational but not rational. y2 x3 ax b; 4a3 27b2 6 0:
A special type of rational variety is a toric variety.
In algebraic geometry, a torus is (C )n, which is the The j-invariant j(E) is defined to be
Zariski open subset of Cn where all coordinates are
nonzero. A toric variety V is an n-dimensional irre- 28 33 a3
ducible variety that contains a copy of (C )n as a jE
4a3 27b2
Zariski open subset in a suitably nice manner.
Both Cn and Pn(C) are toric varieties. There are and two elliptic curves over C are isomorphic as
strong relations between toric varieties and poly- varieties if and only if they have the same j-invariant.
topes, and toric varieties also have interesting It follows that isomorphism classes of elliptic curves
applications in geometric modeling (see Ref. 27), correspond to complex numbers; one says that C is the
algebraic statistics, and computational biology (see moduli space for elliptic curves. Topologically, all
Ref. 28). The latter includes significant applications elliptic curves look like a torus (the surface of a
of Grobner bases. donut), but algebraically, they are the same if and
4. Varieties over Finite Fields. A set of equations defin- only if they have the same j-invariant.
ing a projective variety V over Fp also defines V as a Now consider curves of genus g  2 over C. Topo-
projective variety over F pm for every m  1. As Pn F pm logically, these look like a surface with g holes, but
is finite, we let Nm denote the number of points of V algebraically, there is a moduli space of dimension
when regarded as lying in Pn F pm . To study the 3g  3 that records the algebraic structure. These
asymptotic behavior of Nm as m gets large, it is moduli spaces and their compactifications have
convenient to assemble the Nm into the zeta function been studied extensively. Curves of genus g  2
! also have strong connections with non-Euclidean
X
1 geometry.
m
ZV; t exp Nm t =m :
2. Surfaces. Smooth projective surfaces over C have a
m1
richer structrure and hence a more complicated clas-
The behavior of Z(V, t) is the subject of some deep sification. Such a surface S has its canonical
theorems in algebraic geometry, including the bundle vS , which is a sheaf of OS-modules that
Riemann hypothesis for smooth projective varieties (roughly speaking) locally looks like multiples of
over finite fields, proved by Deligne in 1974. dxdy for local coordinates x, y. Then we get the
Suppose for example that V is a smooth curve. associated bundle vm S , which locally looks like multi-
The genus g of V is defined to be the dimension of ples of (dxdy) m. The dimension of the sheaf cohomol-
the sheaf cohomology group H1(V, OV). Then the ogy group H0(S, vm S ) grows like a polynomial in m, and
Riemann hypothesis implies that the degree of this polynomial is the Kodaira
dimensionk of S, where the zero polynomial has
degree 1. Using the Kodaira dimension, we get
jNm  pm  1j  2 g pm=2 :
the following Enriques-Kodaira classification:
Zeta functions, the Riemann hypothesis, and other k 1: Rational surfaces and ruled surfaces over
tools of algebraic geometry such as the Riemann curves of genus > 0.
Roch Theorem have interesting applications in
k 0: K3 surfaces, abelian surfaces, and Enriques
algebraic coding theory. See Ref. 29 and the entry
surfaces.
on ALGEBRAIC CODING THEORY. References 18 and 30
discuss aspects of coding theory that involve Grobner k 1: Surfaces mapping to a curve of genus  2 whose
bases. generic fiber is an elliptic curve.
k 2: Surfaces of general type.

One can also define the Kodaira dimension for curves,


CLASSIFICATION QUESTIONS where the possible values k 1, 0, 1 correspond to the
classication by genus g 0, 1 or  2. One difference in the
One of the enduring questions in algebraic geometry surface case is that blowing up causes problems. One needs
concerns the classification of geometric objects of various to define the minimal model of a surface, which exists in
types. Here is a brief list of some classification questions most cases, and then the minimal model gets classified by
that have been studied. describing its moduli space. These moduli spaces are well
understood except for surfaces of general type, where many
1. Curves. For simplicity, we work over C. The main unsolved problems remain.
invariant of smooth projective curve is its genus g, To say more about how this classification works, we
defined above as the dimension of H1(V, OV). When need some terminology. Two irreducible varieties are
the genus is 0, the curve is P1(C), and when the genus birational if they have Zariski open subsets that are iso-
is 1, the curve is an elliptic curve E. After a coordinate morphic. Thus, a variety over C is rational if and only if it
10 ALGEBRAIC GEOMETRY

is birational to Pn(C), and two smooth projective surfaces This involves the concepts of stable and semistable
are birational if and only if they have the same minimal bundles. Vector bundles also have interesting con-
model. As for moduli, consider the equation nections with mathematical physics (see Ref. 33).
  4. Algebraic Cycles. Given an irreducible variety V of
a x40 x41 x42 x43 x0 x1 x2 x3 0: dimension n, a variety W contained in V is called a
subvariety. Divisors on V are integer combinations of
irreducible subvarieties of dimension n  1. More
This defines a K3 surface in P3(C) provided a 6 0. As we
generally, an m-cycle on V is an integer combination
vary a, we get different K3 surfaces that can be deformed
of irreducible subvarieties of dimension m. Cycles are
into each other. This (very roughly) is what happens in a
studied using various equivalence relations, includ-
moduli space, although a lot of careful work is needed to
ing rational equivalence, algebraic equivalence,
make this idea precise.
numerical equivalence, and homological equivalence.
The EnriquesKodaira classification is described in
The Hodge Conjecture concerns the behavior of cycles
detail in Ref. 31. This book also discuss the closely related
under homological equivalence, whereas the Chow
classication of smooth complex surfaces, not necessarily
groups are constructed using rational equivalence.
algebraic.
Algebraic cycles are linked to other topics in
algebraic geometry, including motives, intersection
1. Higher Dimensions. Recall that a three-fold is a vari- theory, and variations of Hodge structure. An intro-
ety of dimension 3. As in the surface case, one uses the duction to some of these ideas can be found in Ref. 34.
Kodaira dimension to break up all three-folds into
classes, this time according to k 1, 0, 1, 2, 3. One
new feature for three-folds is that although minimal
models exist, they may have certain mild singulari- REAL ALGEBRAIC GEOMETRY
ties. Hence, the whole theory is more sophisticated
than the surface case. The general strategy of the In algebraic geometry, the theory usually works best over C
minimal model program is explained in Ref. 32. or other algebraically closed fields. Yet many applications
of algebraic geometry deal with real solutions of polynomial
2. Hilbert Schemes. Another kind of classification ques-
equations. We will explore several aspects of this question.
tion concerns varieties that live in a fixed ambient
When dealing with equations with finitely many solu-
space. For example, what sorts of surfaces of small
tions, there are powerful methods for estimating the num-
degree exist in P4(C)? There is also the Hartshorne
ber of solutions, including a multivariable version of
conjecture, which asserts that a smooth variety V of
Bezouts Theorem and the more general BKK bound,
dimension n in PN(C), where N < 32 n, is a complete
both of which deal with complex solutions. But these
intersection, meaning that V is defined by a system of
bounds can differ greatly from the number of real solutions.
exactly N  n equations.
An example from Ref. 35 is the system
In general, one can classify all varieties in Pn(C) of
given degree and dimension. One gets a better clas-
sification by looking at all varieties with given Hilbert axyzm bx cy d 0
polynomial. This leads to the concept of a Hilbert a0 xyzm b0 x c0 y d0 0
a00 xyzm b00 x c00 y d00 0
scheme. There are many unanswered questions about
Hilbert schemes.
where m is a positive integer and a, b, . . . , c00 ,d00 are random
3. Vector Bundles. A vector bundle of rank r on a variety real coefficients. The BKK bound tells us that there are
V is a sheaf that locally looks like a free module of rank m complex solutions, and yet there are at most two real
r. For example, the tangent planes to a smooth sur- solutions.
face form its tangent bundle, which is a vector bundle Questions about the number of real solutions go back to
of rank 2. Descartes Rule of Signs for the maximum number of posi-
Vector bundles of rank 1 are called line bundles or tive and negative roots of a real univariate polynomial.
invertible sheaves. When V is smooth, line bundles There is also Sturms Theorem, which gives the number of
can be described in terms of divisors, which are formal real roots in an interval. These results now have multi-
sums a1 D1    am Dm , where ai is an integer and variable generalizations. Precise statements can be found
Di is an irreducible hypersurface. Furthermore, line in Refs. 18 and 30.
bundles are isomorphic if and only if their correspond- Real solutions also play an important role in enumera-
ing divisors are rationally equivalent. The set of iso- tive algebraic geometry. For example, a smooth cubic
morphism classes of line bundles on V forms the surface S defined over R has 27 lines when we regard
Picard group Pic(V). S as lying in P3(C). But how many of these lines are
There has also been a lot of work classifying vector real? In other words, how many lines lie on S when it is
bundles on Pn(C). For n 1, a complete answer is regarded as lying in P3(R)? (The answer is 27, 15, 7, or 3,
known. For n > 2, one classifies vector bundles E depending on the equation of the surface.) This and other
according to their rank r and their Chern classes examples from real enumerative geometry are discussed
ci(E). One important problem is understanding how in Ref. 35.
to compactify the corresponding moduli spaces.
ALGEBRAIC GEOMETRY 11

Over the real numbers, one can define geometric 3. B. Buchberger, Grobner bases: An algorithmic method in poly-
objects using inequalities as well as equalities. For exam- nomial ideal theory, in N. K. Bose (ed.), Recent Trends in
ple, a solid sphere of radius 1 is defined by x2 y2 z2  1. Multidimensional Systems Theory, Dordrecht: D. Reidel, 1985.
In general, a finite collection of polynomial equations and 4. D. Cox, J. Little, and D. OShea, Ideals, Varieties and
inequalities define what is known as a semialgebraic Algorithms, 3rd ed., New York: Springer, 2007.
variety. Inequalities arise naturally when one does quan- 5. H. Schenck, Computational Algebraic Geometry, Cambridge:
tifier elimination. For example, given real numbers a Cambridge University Press, 2003.
and b, the question 6. K. Smith, L. Kahanpaa, P. Kekalainen, and W. Traves, An
Invitation to Algebraic Geometry, New York: Springer, 2000.
Does there exist x in R with x2 bx c 0? 7. D. Bayer and D. Mumford, What can be computed in algebraic
geometry? in D. Eisenbud and L. Robbiano (eds.), Computa-
tional Algebraic Geometry and Commutative Algebra,
is equivalent to the inequality Cambridge: Cambridge University Press, 1993.
8. A. Dickenstein and I. Emiris, Solving Polynomial Systems,
b2  4c  0 New York: Springer, 2005.
9. PHCpack, a general purpose solver for polynomial systems by
by the quadratic formula. The theory of real quantifier homotopy continuation. Available: http://www.math.uic.edu/
elimination is due to Tarksi, although the first practical
jan/PHCpack/phcpack.html.
algorithmic version is Collins cylindrical algebraic 10. Maple. Available: http://www.maplesoft.com.
decomposition. A brief discussion of these issues appears 11. Mathematica. Available: http://www.wolfram.com.
in Ref. 30. Semialgebraic varieties arise naturally in
12. CoCoA, Computational Commutative Algebra. Available:
robotics and motion planning, because obstructions like http://www.dima.unige.it.
floors and walls are defined by inequalities (see ROBOTICS).
13. Macaulay 2, a software for system for research in algebraic
geometry. Available: http://www.math.uiuc.edu/Macaulay2.
SCHEMES 14. Singular, a computer algebra system for polynomial computa-
tions. Available: http://www.singular.uni-kl.de.
An affine variety V is the geometric object corresponding to 15. M. Kreuzer and L. Robbiano, Computational Commutative
the algebraic object given by its coordinate ring k[V]. More Algebra 1, New York: Springer, 2000.
generally, given any commutative ring R, Grothendieck 16. G.-M. Greuel and G. Pfister, A Singular Introduction of Com-
defined the affine scheme Spec (R) to be the geometric object mutative Algebra, New York: Springer, 2002.
corresponding to R. The points of Spec(R) correspond to 17. Magma, The Magma Computational Algebra System. Avail-
prime ideals of R, and Spec(R) also has a structure sheaf able: http://magma.maths.usyd.edu.au/magma/.
OSpec(R) that generalizes the sheaves OV mentioned earlier. 18. D. Cox, J. Little, and D. OShea, Using Algebraic Geometry,
As an example, consider the coordinate ring C[V] of an 2nd ed., New York: Springer, 2005.
affine variety V in Cn. We saw earlier that the points of V 19. T. W. Sederberg and F. Chen, Implicitization using moving
correspond to maximal ideals of C[V]. As maximal ideals curves and surfaces, in S. G. Mair and R. Cook (eds.), Proceed-
are prime, it follows that Spec(C[V]) contains a copy of V. ings of the 22nd Annual Conference on Computer graphics and
The remaining points of Spec(C[V]) correspond to the other interactive techniques (SIGGRAPH1995), New York: ACM
Press, 1995, pp. 301308.
irreducible varieties lying in V. In fact, knowing Spec(C[V])
is equivalent to knowing V in a sense that can be made 20. H. Hauser, The Hironaka theorem on resolution of singula-
rities (or: a proof we always wanted to understand), Bull. Amer.
precise.
Math. Soc., 40: 323403, 2003.
Affine schemes have good properties with regard to
21. G. Bodnar and J. Schicho, Automated resolution of singula-
maps between rings, and they can be patched together to
rities for hypersurfaces, J. Symbolic Computation., 30: 401
get more general objects called schemes. For example, every 429, 2000. Available: http://www.rise.uni-linz.ac.at/projects/
projective variety has a natural scheme structure. One way basic/adjoints/blowup.
to see the power of schemes is to consider the intersection of 22. H. Stetter, Numerical Polynomial Algebra, Philadelphia:
the curves in C2 defined by f 0 and g 0, as in our SIAM, 2004.
discussion of Bezouts Theorem. As varieties, this intersec- 23. D. Cox, R. Goldman, and M. Zhang, On the validity of impli-
tion consists of just points, but if we consider the intersec- citization by moving quadrics for rational surfaces with no base
tion as a scheme, then it has the additional structure points, J. Symbolic Comput., 29: 419440, 2000.
consisting of the ring Op/hf, gi at every intersection point 24. P. Griffiths and J. Harris, Principles of Algebraic Geometry,
p. So the schemetheoretic intersection knows the multi- New York: Wiley, 1978.
plicities. See Ref. 36 for an introduction to schemes. Scheme 25. N. Koblitz, A Course in Number Theory and Cryptography,
theory is also discussed in Refs. 1 and 2. 2nd ed., New York: Springer, 1994.
26. S. L. Kleiman and D. Laksov, Schubert calculus, Amer. Math.
BIBLIOGRAPHY Monthly, 79: 10611082, 1972.
27. R. Goldman and R. Krasauskas (eds.), Topics in Algebraic
1. R. Hartshorne, Algebraic Geometry, New York: Springer, 1977. Geometry and Geometric Modeling, Providence, RI: AMS, 2003.
2. I. R. Shafarevich, Basic Algebraic Geometry, New York: 28. L. Pachter and B. Sturmfels (eds.), Algebraic Statistics for
Springer, 1974. Computational Biology, Cambridge: Cambridge University
Press, 2005.
12 ALGEBRAIC GEOMETRY

29. C. Moreno, Algebraic Curves over Finite Fields, Cambridge: 34. W. Fulton, Introduction to Intersection Theory in Algebraic
Cambridge University Press, 1991. Geometry, Providence, RI: AMS, 1984.
30. A. M. Cohen, H. Cuypers, and H. Sterk (eds.), Some Tapas of 35. F. Sottile, Enumerative real algebraic geometry, in S. Basu and
Computer Algebra, New York: Springer, 1999. L. Gonzalez-Vega (eds.), Algorithmic and quantitative real
31. W. P. Barth, C. A. Peters, and A. A. van de Ven, Compact algebraic geometry (Piscataway, NJ, 2001), Providence, RI:
Complex Surfaces, New York: Springer, 1984. AMS, 2003, pp. 139179.
32. C. Cadman, I. Coskun, K. Jarbusch, M. Joyce, S. Kovacs, 36. D. Eisenbud and J. Harris, The Geometry of Schemes,
M. Lieblich, F. Sato, M. Szczesny, and J. Zhang, A first New York: Springer, 2000.
glimpse at the minimal model program, in R. Vakil (ed.),
Snowbird Lectures in Algebraic Geometry, Providence, RI:
AMS, 2005. DAVID A. COX
33. V. S. Vardarajan, Vector bundles and connections in physics Amherst College
Amherst, Massachusetts
and mathematics: Some historical remarks, in V. Lakshmibai,
V. Balaji, V. B. Mehta, K. R. Nagarajan, K. Paranjape,
P. Sankaran, and R. Sridharan (eds), A Tribute to C. S. Sesha-
dri, Basel: Birkhauser-Verlag, 2003, pp. 502541.
C
COMPUTATIONAL COMPLEXITY THEORY (deterministic or probabilistic) circuits that compute the
factors of 1000-bit numbers must be huge, it is known that
Complexity theory is the part of theoretical computer small quantum circuits can compute factors (2). It remains
science that attempts to prove that certain transformations unknown whether it will ever be possible to build quantum
from input to output are impossible to compute using a circuits, or to simulate the computation of such circuits
reasonable amount of resources. Theorem 1 below illus- efficiently. Thus, complexity theory based on classical
trates the type of impossibility proof that can sometimes computational models continues to be relevant.
be obtained (1); it talks about the problem of determining The three most widely studied general-purpose realis-
whether a logic formula in a certain formalism (abbreviated tic models of computation today are deterministic, prob-
WS1S) is true. abilistic, and quantum computers. There is also interest in
restricted models of computing, such as algebraic circuits or
Theorem 1. Any circuit of AND, OR, and NOT gates comparison-based algorithms. Comparison-based models
that takes as input a WS1S formula of 610 symbols and arise in the study of sorting algorithms. A comparison-
outputs a bit that says whether the formula is true must based sorting algorithm is one that sorts n items and is
have at least 10125gates. not allowed to manipulate the representations of those
items, other than being able to test whether one is greater
This is a very compelling argument that no such circuit
than another. Comparison-based sorting algorithms
will ever be built; if the gates were each as small as a proton,
require time V(n log n), whereas faster algorithms are
such a circuit would fill a sphere having a diameter of 40
sometimes possible if they are allowed to access the bits
billion light years! Many people conjecture that somewhat
of the individual items. Algebraic circuits operate under
similar intractability statements hold for the problem of
similar restrictions; they cannot access the individual bits
factoring 1000-bit integers; many public-key cryptosys-
of the representations of the numbers that are provided
tems are based on just such assumptions.
as input, but instead they can only operate on those num-
It is important to point out that Theorem 1 is specific
bers via operations such as , , and . Interestingly, there
to a particular circuit technology; to prove that there is
is also a great deal of interest in unrealistic models of
no efficient way to compute a function, it is necessary to
computation, such as nondeterministic machines. Before
be specific about what is performing the computation.
we explain why unrealistic models of computation are of
Theorem 1 is a compelling proof of intractability precisely
interest, let us see the general structure of an intract-
because every deterministic computer that can be pur-
ability proof.
chased today can be simulated efficiently by a circuit con-
structed with AND, OR, and NOT gates. The inclusion of the
word deterministic in the preceding paragraph is signifi- DIAGONALIZATION AND REDUCIBILITY
cant; some computers are constructed with access to
devices that are presumed to provide a source of random Any intractability proof has to confront a basic question:
bits. Probabilistic circuits (which are allowed to have some How can one prove that there is not a clever algorithm for
small chance of producing an incorrect output) might be a a certain problem? Here is the basic strategy that is used to
more powerful model of computing. Indeed, the intract- prove theorems 1 and 2. There are three steps.
ability result for this class of circuits (1) is slightly weaker: Step 1 involves showing that there is program A that
uses roughly 2n bits of memory on inputs of size n such that,
Theorem 2. Any probabilistic circuit of AND, OR, and for every input length n, the function that A computes on
NOT gates that takes as input a WS1S formula of 614 inputs of length n requires circuits as large as are required
symbols and outputs a bit that says whether the formula by any function on n bits. The algorithm A is presented by
is true (with error probability at most 1/3) must have at a diagonalization argument (so-called because of simi-
least 10125gates. larity to Cantors diagonal argument from set theory).
The same argument carries through essentially unchanged
The underlying question of the appropriate model of for probabilistic and quantum circuits. The problem com-
computation to use is central to the question of how relevant puted by A is hard to compute, but this by itself is not very
the theorems of computational complexity theory are. Both interesting, because it is probably not a problem that any-
deterministic and probabilistic circuits are examples of
one would ever want to compute.
classical models of computing. In recent years, a more Step 2 involves showing that there is an efficiently
powerful model of computing that exploits certain aspects computable function f that transforms any input instance
of the theory of quantum mechanics has captured the x for A into a WS1S formula fi:e:; f x f with the pro-
attention of the research communities in computer science perty that A outputs 1 on input x if and only if the
and physics. It seems likely that some modification of formula f is true. If there were a small circuit deciding
theorems 1 and 2 holds even for quantum circuits. For whether a formula is true, then there would be a small
the factorization problem, however, the situation is circuit for the problem computed by A. As, by step 1, there is
different. Although many people conjecture that classical

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 COMPUTATIONAL COMPLEXITY THEORY

no such small circuit for A, it follows that there is no small language in which the program is written. Traditionally,
circuit deciding whether a formula is true. this is made precise by saying that f is computed by a Turing
Step 3 involves a detailed analysis of the first two steps, machine in the given time bound, but exactly the same
in order to obtain the concrete numbers that appear in class of polynomial-time reductions results, if we use any
Theorem 1. other reasonable programming language, with the usual
Let us focus on step 2. The function f is called a reduction. notion of running time. This is a side-benefit of our overly
Any function g such that x is in B if and only if g(x) is in C is generous definition of what it means to be easy to
said to reduce B to C. (This sort of reduction makes sense compute.
when the computational problems B and C are problems If f is a polynomial-time reduction of A to B, we denote
that require a yes or no answer; thus, they can be viewed this A mp B. Note that this suggests an ordering, where B is
as sets, where x is in B if B outputs yes on input x. Any larger (i.e., harder to compute) than A. Any efficient
computational problem can be viewed as a set this way. For algorithm for B yields an efficient algorithm for A; if A
example, computing a function h can be viewed as the set is hard to compute, then B must also be hard to compute.
{(x, i) : the ith bit of f(x) is 1}.) If A mp B and B m p p
A, this is denoted A  m B.
Efficient reducibility provides a remarkably effective One thing that makes complexity theory useful is that
tool for classifying the computational complexity of a great naturally-arising computational problems tend to clump
many problems of practical importance. The amazing thing together into a shockingly small number of equivalence
p
about the proof of step 2 (and this is typical of many classes of the  m relation. Many thousands of problems
theorems in complexity theory) is that it makes no use at have been analyzed, and most of these fall into about a
all of the algorithm A, other than the fact that A uses at dozen equivalence classes, with perhaps another dozen
most 2n memory locations. Every problem that uses at most classes picking up some other notably interesting groups
this amount of memory is efficiently reducible to the pro- of problems.
blem of deciding whether a formula is true. This provides Many of these equivalence classes correspond to inter-
motivation for a closer look at the notion of efficient redu- esting time and space bounds. To explain this connection,
cibility. first we need to talk about complexity classes.

EFFICIENT COMPUTATION, POLYNOMIAL TIME COMPLEXITY CLASSES AND COMPLETE SETS

Many notions of efficient reducibility are studied in com- A complexity class is a set of problems that can be computed
putational complexity theory, but without question the within certain resource bounds on some model of computa-
most important one is polynomial-time reducibility. The tion. For instance, P is the class of problems computable by
following considerations explain why this notion of redu- programs that run in time at most nk k for some constant
cibility arises. k; P stands for polynomial time. Another important
Let us consider the informal notion of easy functions complexity class is EXP: the set of problems computed by
k
(functions that are easy to compute). Here are some con- programs that run for time at most 2n k on inputs of length
ditions that one might want to satisfy, if one were trying to n. P and EXP are both defined in terms of time complexity.
make this notion precise: It is also interesting to bound the amount of memory used
by programs; the classes PSPACE and EXPSPACE consist
 If f and g are easy, then the composition f o g is also of the problems computed by programs whose space
easy. requirements are polynomial and exponential in the input
 If f is computable in time n2 on inputs of length n, then size, respectively.
f is easy. An important relationship exists between EXP and the
game of checkers; this example is suitable to introduce the
These conditions might seem harmless, but taken concepts of hardness and completeness.
together, they imply that some easy functions take Checkers is played on an 8-by-8 grid. When the rules are
time n100 to compute. (This is because there is an easy adapted for play on a 10-by-10 grid, the game is known as
function f that takes input of length n and produces output draughts (which can also be played on boards of other
of length n2. Composing this function with itself takes time sizes). Starting from any game position, there is an optimal
n4, etc.) At one level, it is clearly absurd to call a function strategy. The task of finding an optimal strategy is a natural
easy if it requires time n100 to compute. However, this is computational problem. N  N-Checkers is the function
precisely what we do in complexity theory! When our goal is that takes as input a description of a N  N draughts board
to show that certain problems require superpolynomial with locations of the pieces, and returns as output the move
running times, it is safe to consider a preprocessing step that a given player should make, using the optimal strat-
requiring time n100 as a negligible factor. egy. It is known that there is a program computing the
A polynomial-time reduction f is simply a function that optimal strategy for N  N-Checkers that runs in time
is computed by some program that runs in time bounded exponential in N2; thus, N  N-Checkers 2 EXP.
by p(n) on inputs of length n, for some polynomial p. (That More interestingly, it is known that for every problem
p p
is, for some constant k, the running time of the program A 2 EXP; A m N  N-Checkers. We say that A m N
computing f is at most nk k on inputs of length n.) Note N-Checkers is hard for EXP (3).
that we have not been specific about the programming
COMPUTATIONAL COMPLEXITY THEORY 3

More generally, if C is any class of problems, and B is a independent coin tosses, then the machine rejects its input
p
problem such that A m B for every B 2 C, then we say that if and only if the probability of outputting one is zero;
B is hard for C. If B is hard for C and B 2 C, then we say that otherwise it accepts. If a nondeterministic machine runs
B is complete for C. Thus, in particular, N  N-Checkers for t steps, the machine can flip t coins, and thus, a non-
is complete for EXP. This means that the complexity of N  deterministic machine can do the computational equivalent
N-Checkers is well understood, in the sense that the fastest of finding a needle in a haystack: If there is even one
program for this problem cannot be too much faster than sequence r of length t (out of 2t possibilities) such that
the currently known program. Here is why: We know (via a sequence r leads the machine to output one on input
diagonalization argument) that there is some problem A in x, then the nondeterministic machine will accept x, and
EXP that cannot be computed by any program that runs in it does it in time t, rather than being charged time 2t for
time asymptotically less than 2n. As N  N-Checkers is looking at all possibilities.
complete for EXP, we know there is a reduction from A A classic example that illustrates the power of nonde-
to N  N-Checkers computable in time nk for some k, and terministic machines is the Travelling Salesman Problem.
thus N  N-Checkers requires running time that is asymp- The input consists of a labeled graph, with nodes (cities)
1=k
totically at least 2n . and edges (listing the distances between each pair of cities),
It is significant to note that this yields only an asymptotic along with a bound B. The question to be solved is as follows:
lower bound on the time complexity of N  N-Checkers. Does there exist a cycle visiting all of the cities, having
That is, it says that the running time of any program for this length at most B? A nondeterministic machine can solve
problem must be very slow on large enough inputs, but (in this quickly, by using several calls to the guess subroutine
contrast to Theorem 1) it says nothing about whether this to obtain a sequence of bits r that can be interpreted as a list
problem is difficult for a given fixed input size. For instance, of cities, and then outputting one if r visits all of the cities,
it is still unknown whether there could be a handheld device and the edges used sum up to at most B.
that computes optimal strategies for 100  100-Checkers Nondeterministic machines can also be used to factor
(although this seems very unlikely). To mimic the proof of numbers; given an n-bit number x, along with two other
Theorem 1, it would be necessary to show that there is a numbers a and b with a < b, a nondeterministic machine
problem in EXP that requires large circuits. Such problems can accept whether there is a factor of x that lies between a
are known to exist in EXPSPACE; whether such problems and b.
exist in EXP is one of the major open questions in computa- Of course, this nondeterministic program is of no use at
tional complexity theory. all in trying to factor numbers or to solve the Traveling
The complete sets for EXP (such as N  N-Checkers) Salesman Problem on realistic computers. In fact, it is hard
constitute one of the important  mp -equivalence classes; to imagine that there will ever be an efficient way to
many other problems are complete for PSPACE and EXP- simulate a nondeterministic machine on computers that
SPACE (and of course every nontrivial problem that can be one could actually build. This is precisely why this model is
solved in polynomial time is complete for P under mp so useful in complexity theory; the following paragraph
reductions). However, this accounts for only a few of the explains why.
p
several  m -equivalence classes that arise when consider- The class NP is the class of problems that can be solved
ing important computational problems. To understand by nondeterministic machines running in time at most
these other computational problems, it turns out to be nk k on inputs of size n, for some constant k; NP stands
useful to consider unrealistic models of computation. for Nondeterministic Polynomial time. The Traveling
Salesman Problem is one of many hundreds of very impor-
tant computational problems (arising in many seemingly
UNREALISTIC MODELS: NONDETERMINISTIC MACHINES
unrelated fields) that are complete for NP. Although it is
AND THE CLASS NP
more than a quarter-century old, the volume by Garey and
Johnson (4) remains a useful catalog of NP-complete pro-
Nondeterministic machines appear to be a completely
blems. The NP-complete problems constitute the most
unrealistic model of computation; if one could prove this
important  mp -equivalence class whose complexity is unre-
to be the case, one would have solved one of the most
solved. If any one of the NP-complete problems lies in P,
important open questions in theoretical computer science
then P NP. As explained above, it seems much more likely
(and even in all of mathematics).
that P is not equal to NP, which implies that any program
A nondeterministic Turing machine can be viewed as a
solving any NP-complete problem has a worst-case running
program with a special guess subroutine; each time this
time greater than n100,000 on all large inputs of length n.
subroutine is called, it returns a random bit, zero or one.
Of course, even if P is not equal to NP, we would still have
Thus far, it sounds like an ordinary program with a random
the same situation that we face with N  N-Checkers, in
bit generator, which does not sound so unrealistic. The
that we would not be able to conclude that instances of
unrealistic aspect comes with the way that we define
some fixed size (say n 1,000) are hard to compute. For
how the machine produces its output. We say that a non-
that, we would seem to need the stronger assumption that
deterministic machine accepts its input (i.e., it outputs one)
there are problems in NP that require very large circuits; in
if there is some sequence of bits that the guess routine
fact, this is widely conjectured to be true.
could return that causes the machine to output one; other-
wise it is said to reject its input. If we view the guess bits as
4 COMPUTATIONAL COMPLEXITY THEORY

Although it is conjectured that deterministic machines correspond to natural or unnatural models of computation
require exponential time to simulate nondeterministic gives us an intuitively appealing explanation for why these
machines, it is worth noting that the situation is very classes appear to be distinct. That is, complexity theory
different when memory bounds are considered instead. A gives us a vocabulary and a set of plausible conjectures that
classic theorem of complexity theory states that a nonde- helps explain our observations about the differing compu-
terministic machine using space s(n) can be simulated by a tational difficulty of various problems.
deterministic machine in space s(n)2. Thus, if we define
NPSPACE and NEXPSPACE by analogy to PSPACE and
NP AND PROVABILITY
EXPSPACE using nondeterministic machines, we obtain
the equalities PSPACE NPSPACE and EXPSPACE
There are important connections between NP and mathe-
NEXPSPACE.
matical logic. One equivalent way of defining NP is to say
We thus have the following six complexity classes:
that a set A is in NP if and only if there are short proofs of
membership in A. For example, consider the Traveling
P  NP  PSPACE  EXP  NEXP  EXPSPACE
Salesman Problem. If there is a short cycle that visits all
cities, then there is a short proof of this fact: Simply present
Diagonalization arguments tell us that P 6 EXP; NP 6
the cycle and compute its length. Contrast this with the
NEXP; and PSPACE 6 EXPSPACE. All other relationships
task of trying to prove that there is not a short cycle that
are unknown. For instance, it is unknown whether P
visits all cities. For certain graphs this is possible, but
PSPACE, and it is also unknown whether PSPACE
nobody has found a general approach that is significantly
NEXP (although at most one of these two equalities can
better than simply listing all (exponentially many) possible
hold). Many in the community conjecture that all of these
cycles, and showing that all of them are too long. That is, for
classes are distinct, and that no significant improvement
NP-complete problems A, it seems to be the case that the
on any of these inclusions can be proved. (That is, many
complement of A (denoted co-A) is not in NP.
people conjecture that there are problems in NP that
The complexity class coNP is defined to be the set of all
require exponential time on deterministic machines, that
complements of problems in NP; coNP fco  A : A 2 NPg.
there are problems in PSPACE that require exponential
This highlights what appears to be a fundamental dif-
time on nondeterministic machines, that there are pro-
ference between deterministic and nondeterministic
blems in EXP that require exponential space, etc.) These
computation. On a deterministic machine, a set and its
conjectures have remained unproven since they were first
complement always have similar complexity. On nondeter-
posed in the 1970s.
ministic machines, this does not appear to be true (although
if one could prove this, one would have a proof that P is
A THEORY TO EXPLAIN OBSERVED DIFFERENCES IN different from NP).
COMPLEXITY To discuss the connections among NP, coNP, and logic
in more detail, we need to give some definitions related to
It is traditional to draw a distinction between mathematics propositional logic. A propositional logic formula consists
and empirical sciences such as physics. In mathematics, of variables (which can take on the values TRUE and FALSE),
one starts with a set of assumptions and derives (with along with the connectives AND, OR, and NOT. A formula is
certainty) the consequences of the assumptions. In con- said to be satisfiable if there is some assignment of truth
trast, in a discipline such as physics one starts with exter- values to the variables that causes it to evaluate to TRUE; it
nal reality and formulates theories to try to explain (and is said to be a tautology if every assignment of truth values
make predictions about) that reality. to the variables causes it to evaluate to TRUE. SAT is the set
For some decades now, the field of computational com- of all satisfiable formulas; TAUT is the set of all tautologies.
plexity theory has dwelt in the uncomfortable region Note that the formula f is in SAT if and only if NOTf is not
between mathematics and the empirical sciences. Com- in TAUT.
plexity theory is a mathematical discipline; progress is SAT is complete for NP; TAUT is complete for coNP.
measured by the strength of the theorems that are proved. [This famous theorem is sometimes known as Cooks
However, despite rapid and exciting progress on many Theorem (5) or the Cook-Levin Theorem (6).]
fronts, the fundamental question of whether P is equal to Logicians are interested in the question of how to prove
NP remains unsolved. that a formula is a tautology. Many proof systems have
Until that milestone is reached, complexity theory can been developed; they are known by such names as resolu-
still offer to the rest of the computing community some of tion, Frege systems, and Gentzen calculus. For some of these
the benefits of an empirical science, in the following sense. systems, such as resolution, it is known that certain tautol-
All of our observations thus far indicate that certain pro- ogies of n symbols require proofs of length nearly 2n(7). For
blems (such as the Traveling Salesman Problem) are intrac- Frege systems and proofs in the Gentzen calculus, it is
tible. Furthermore, we can observe that with surprisingly widely suspected that similar bounds hold, although this
few exceptions, natural and interesting computational pro- remains unknown. Most logicians suspect that for any
blems can usually be shown to be complete for one of a reasonable proof system, some short tautologies will
handful of well-studied complexity classes. Even though we require very long proofs. This is equivalent to the conjecture
cannot currently prove that some of these complexity that NP and coNP are different classes; if every tautology
classes are distinct, the fact that these complexity classes had a short proof, then a nondeterministic machine could
COMPUTATIONAL COMPLEXITY THEORY 5

guess the proof and accept if the proof is correct. As TAUT class of functions f for which there is an NP machine M with
is complete for coNP, this would imply that NP coNP. the property that, for each string x, f(x) is the number of
The P versus NP question also has a natural inter- guess sequences r that cause M to accept input x. #P is a
pretation in terms of logic. Two tasks that occupy mathe- class of functions, instead of being a class of sets like all
maticians are as follows: other complexity classes that we have discussed. #P is
equivalent in complexity to the class PP (probabilistic
1. Finding proofs of theorems. polynomial time) defined as follows. A set A is in PP if there
2. Reading proofs that other people have found. is an NP machine M such that, for each string x, x is in A if
and only if more than half of the guess sequences cause M to
Most mathematicians find the second task to be con- accept x. If we view the guess sequences as flips of a fair coin,
siderably simpler than the first one. This can be posed as a this means that x is in A if and only the probability that M
computational problem. Let us say that a mathematician accepts x is greater than one half. It is not hard to see that
wants to prove a theorem f and wants the proof to be at both NP and coNP are subsets of PP; thus this is not a very
most 40 pages long. A nondeterministic machine can take practical notion of probabilistic computation.
as input f followed by 40 blank pages, and guess a proof, In practice, when people use probabilistic algorithms,
accepting if it finds a legal proof. If P NP, the mathema- they want to receive the correct answer with high prob-
tician can thus determine fairly quickly whether there is a ability. The complexity class that captures this notion is
short proof. A slight modification of this idea allows the called BPP (bounded-error probabilistic polynomial time).
mathematician to efficiently construct the proof (again, Some problems in BPP are not known to lie in P; a good
assuming that P NP). That is, the conjecture that P is example of such a problem takes two algebraic circuits as
different than NP is consistent with our intuition that input and determines whether they compute the same
finding proofs is more difficult than verifying that a given function.
proof is correct. Early in this article, we mentioned quantum computa-
In the 1990s researchers in complexity theory discov- tion. The class of problems that can be solved in polynomial
ered a very surprising (and counterintuitive) fact about time with low error probability using quantum machines is
logical proofs. Any proof of a logic statement can be encoded called BQP (bounded-error quantum polynomial time).
in such a way that it can be verified by picking a few bits at FACTOR (the problem of finding the prime factorization
random and checking that these bits are sufficiently con- of a number) lies in BQP (2). The following inclusions are
sistent. More precisely, let us say that you want to be 99.9% known:
sure that the proof is correct. Then there is some constant k
and a procedure such that, no matter how long the proof is, P  BPP  BQP  PP  PSPACE
the procedure flips O(log n) coins and picks k bits of the P  NP  PP
encoding of the proof, and then does some computation,
with the property that, if the proof is correct, the procedure No relationship is known between NP and BQP or between
accepts with probability one, and if the proof is incorrect, NP and BPP. Many people conjecture that neither NP nor
then the procedure detects that there is a flaw with prob- BQP is contained in the other.
ability at least 0.999. This process is known as a probabi- In contrast, many people now conjecture that BPP P,
listically checkable proof. Probabilistically checkable proofs because it has been proved that if there is any problem
have been very useful in proving that, for many optimiza- computable in time 2n that requires circuits of nearly
tion algorithms, it is NP-complete not only to find an exponential size, then there is an efficient deterministic
optimal solution, but even to get a very rough approxima- simulation of any BPP algorithm, which implies that P
tion to the optimal solution. BPP (9). This theorem is one of the most important in a
Some problems in NP are widely believed to be intract- field that has come to be known as derandomization,
able to compute, but are not believed to be NP-complete. which studies how to simulate probabilistic algorithms
Factoring provides a good example. The problem of comput- deterministically.
ing the prime factorization of a number can be formulated
in several ways; perhaps the most natural way is as the set INSIDE P
FACTOR {(x, i, b): the ith bit of the encoding of the prime
factorization of x is b}. By making use of the fact that Polynomial-time reducibility is a very useful tool for clar-
primality testing lies in P (8), set FACTOR is easily seen ifying the complexity of seemingly intractible problems, but
to lie in NP \ coNP. Thus, FACTOR cannot be NP-complete it is of no use at all in trying to draw distinctions among
unless NP coNP. problems in P. It turns out that some very useful distinc-
tions can be made; to investigate them, we need more
OTHER COMPLEXITY CLASSES: COUNTING, refined tools.
PROBABILISTIC, AND QUANTUM COMPUTATION Logspace reducibility is one of the most widely used
notions of reducibility for investigating the structure of
Several other computational problems appear to be inter- P; a logspace reduction f is a polynomial-time reduction
mediate in complexity between NP and PSPACE that are with the additional property that there is a Turing
related to the problem of counting how many accepting machine computing f that has (1) a read-only input tape,
paths a nondeterministic machine has. The class #P is the (2) a write-only output tape, and (3) the only other data
6 COMPUTATIONAL COMPLEXITY THEORY

structure it can use is a read/write worktape, where it separations are known. In particular, it remains unknown
uses only O(log n) locations on this tape on inputs of length whether the large complexity class PP actually coincides
n. If A is logspace-reducible to B, then we denote this by with the small class L.
A log
m B. Imposing this very stringent memory restriction
seems to place severe limitations on polynomial-time com-
TIME-SPACE TRADEOFFS
putation; many people conjecture that many functions
computable in polynomial time are not logspace-computa-
Logspace reducibility (and in general the notion of Turing
ble. However, it is also true that the full power of polynomial
machines that have very limited memory resources) allows
time is not exploited in most proofs of NP-completeness. For
the investigation of another aspect of complexity: the
essentially all natural problems that have been shown to be
tradeoff between time and space. Take, for example, the
complete for the classes NP, PP, PSPACE, EXP, and so on
problem of determining whether an undirected graph is
using polynomial-time reducibility, it is known that
connected. This problem can be solved using logarithmic
they are also complete under logspace reducibility. That
space (10), but currently all space-efficient algorithms
is, for large classes, logspace reducibility is essentially as
that are known for this problem are so slow that they will
useful as polynomial-time reducibility, but logspace reduci-
never be used in practice, particularly because this problem
bility offers the advantage that it can be used to find
can be solved in linear time (using linear space) using a
distinctions among problems in P.
standard depth-first-search algorithm. However, there is
Logspace-bounded Turing machines give rise to some
no strong reason to believe that no fast small-space algo-
natural complexity classes inside P: If the characteristic
rithm for graph connectivity exists (although there have
function of a set A is a logspace reduction as defined in the
been some investigations of this problem, using restricted
preceding paragraph, then A lies in the complexity class L.
models of computation, of the type that were discussed at
The analogous class, defined in terms of nondeterministic
the start of this article).
machines, is known as NL. The class #P also has a logspace
Some interesting time-space tradeoffs have been proved
analog, known as #L. These classes are of interest primarily
for the NP-complete problem SAT. Recall that it is still
because of their complete sets. Some important complete
unknown whether SAT lies in the complexity class L. Also,
problems for L are the problem of determining whether two
although it is conjectured that SAT is not solvable in time nk
trees are isomorphic, testing whether a graph can be
for any k, it remains unknown whether SAT is solvable in
embedded in the plane, and the problem of determining
time O(n). However, it is known that if SAT is solvable in
whether an undirected graph is connected (10). Determin-
linear time, then any such algorithm must use much more
ing whether a directed graph is connected is a standard
than logarithmic space. In fact, any algorithm that solves
complete problem for NL, as is the problem of computing
SAT in time n1.7 must use memory n1/k for some k(13,14).
the length of the shortest path between two vertices in a
graph. The complexity class #L characterizes the complex-
ity of computing the determinant of an integer matrix as CONCLUSION
well as several other problems in linear algebra.
There are also many important complete problems for P Computational complexity theory has been very successful
under logspace reducibility, such as the problem of evalu- in providing a framework that allows us to understand why
ating a Boolean circuit, linear programming, and certain several computational problems have resisted all efforts to
network flow computations. In fact, there is a catalog of P- find efficient algorithms. In some instances, it has been
complete problems (11) that is nearly as impressive as the possible to prove very strong intractibility theorems, and in
list of NP-complete problems (4). Although many P-com- many other cases, a widely believed set of conjectures
plete problems have very efficient algorithms in terms of explains why certain problems appear to be hard to com-
time complexity, there is a sense in which they seem to be pute. The field is evolving rapidly; several developments
resistent to extremely fast parallel algorithms. This is discussed here are only a few years old. Yet the central
easiest to explain in terms of circuit complexity. The size questions (such as the infamous P vs. NP question) remain
of a Boolean circuit can be measured in terms of either the out of reach today.
number of gates or the number of wires that connect the By necessity, a brief article such as this can touch on
gates. Another important measure is the depth of the only a small segment of a large field such as computational
circuit: the length of the longest path from an input gate complexity theory. The reader is urged to consult the texts
to the output gate. The problems in L, NL, and #L all have listed below, for a more comprehensive treatment of the
circuits of polynomial size and very small depth (O(log2n)). area.
In contrast, all polynomial-size circuits for P-complete
problems seem to require a depth of at least n1=k .
FURTHER READING
Even a very small complexity class such as L has an
interesting structure inside it that can be investigated
D.-Z. Du and K.-I. Ko, Theory of Computational Complexity. New
using a more restricted notion of reducibility than log m York: Wiley, 2000.
that is defined in terms of very restricted circuits. Further
L. A. Hemaspaandra and M. Ogihara, The Complexity Theory
information about these small complexity classes can be
Companion. London: Springer-Verlag, 2002.
found in the textbook by Vollmer (12).
D. S. Johnson, A catalog of complexity classes, in J. van Leeuwen,
We have the inclusions L  NL  P  NP  PP  PSPACE.
(ed.), Handbook of Theoretical Computer Science, Vol. A:
Diagonalization shows that NL 6 PSPACE, but no other
COMPUTATIONAL COMPLEXITY THEORY 7

Algorithms and Complexity. Cambridge, MA: MIT Press, 1990, pp. 7. A. Haken, The intractability of resolution, Theor. Comput. Sci.,
69161. 39: 297308, 1985.
D. Kozen, Theory of Computation. London: Springer-Verlag, 2006. 8. M. Agrawal, N. Kayal, and N. Saxena, PRIMES is in P, Ann.
C. Papadimitriou, Computational Complexity. Reading, MA: Math., 160: 781793, 2004.
Addison-Wesley, 1994. 9. R. Impagliazzo and A. Wigderson, PBPP unless E has sub-
I. Wegener, Complexity Theory: Exploring the Limits of Efficient exponential circuits, Proc. 29th ACM Symposium on Theory of
Algorithms. Berlin: Springer-Verlag, 2005. Computing (STOC), 1997, pp. 220229.
10. O. Reingold, Undirected ST-connectivity in log-space, Proc.
37th Annual ACM Symposium on Theory of Computing
BIBLIOGRAPHY (STOC), 2005, pp. 376385.
11. R. Greenlaw, H. J. Hoover, and W. L. Ruzzo, Limits to Parallel
1. L. Stockmeyer and A. R. Meyer, Cosmological lower bound Computation: P-Completeness Theory. New York: Oxford Uni-
on the circuit complexity of a small problem in logic, J. ACM, versity Press, 1995.
49: 753784, 2002. 12. H. Vollmer, Introduction to Circuit Complexity. Berlin:
2. P. Shor, Polynomial-time algorithms for prime factorization Springer-Verlag, 1999.
and discrete logarithms on a quantum computer, SIAM J. 13. L. Fortnow, R. Lipton, D. van Melkebeek, and A. Viglas, Time-
Comput. 26: 14841509, 1997. space lower bounds for satisfiability, J. ACM, 52: 835865,
3. J. M. Robson, N by N Checkers is EXPTIME complete, SIAM J. 2005.
Comput.13: 252267, 1984. 14. R. Williams, Better time-space lower bounds for SAT and
4. M. R. Garey and D. S. Johnson, Computers and Intractability: related problems, Proc. 20th Annual IEEE Conference on
A Guide to the Theory of NP-Completeness. San Francisco, CA: Computational Complexity (CCC), 2005, pp. 4049.
Freeman, 1979.
5. S. Cook, The complexity of theorem proving procedures, Proc.
3rd Annual ACM Symposium on Theory of Computing (STOC), ERIC ALLENDER
1971, pp. 151158. Rutgers University
6. L. Levin, Universal search problems, Problemy Peredachi Infor- Piscataway, New Jersey
matsii, 9: 265266, 1973 (in Russian). English translation: B. A.
Trakhtenbrot, A survey of Russian approaches to perebor
(brute-force search) algorithms, Ann. History Comput., 6:
384400, 1984.
C
COMPUTATIONAL NUMBER THEORY despite his brilliance, could have understood the true com-
plexity of his Last Theorem. (Lest the reader leave for
In the contemporary study of mathematics, number theory want of the answer, what Wiles proved is that there are no
stands out as a peculiar branch, for many reasons. Most possible nonzero x, y, z, and n > 2 that satisfy the equation.)
development of mathematical thought is concerned with Other questions that arise immediately in number the-
the identification of certain structures and relations in ory are even more problematic than Fermats Last Theo-
these structures. For example, the study of algebra is rem. For example, a major concern in number theory is the
concerned with different types of operators on objects, study of prime numbersthose natural numbers that are
such as the addition and multiplication of numbers, the evenly divisible only by themselves and 1. For example, 2, 3,
permutation of objects, or the transformation of geometric 5, 7, 11, and 13 are prime numbers, whereas 9, 15, and any
objectsand the study of algebra is concerned with the even number except 2 are not (1, by convention, is not
classification of the many such types of operators. considered a prime).
Similarly, the study of analysis is concerned with the One can easily observe that small even numbers can be
properties of operators that satisfy conditions of continuity. described as the sum of two primes: 2 2 4, 3 3 6,
Number theory, however, is the study of the properties of 3 5 8, 3 7 5 5 10, 5 7 12; 7 7 14,
those few systems that arise naturally, beginning with the and so on. One could ask, can all even numbers be expressed
natural numbers (which we shall usually denote N), pro- as the sum of two primes? Unfortunately, no one knows the
gressing to the integers (Z), the rationals (Q), the reals (R), answer to this question. It is known as the Goldbach
and the complex numbers (C). Rather than identifying very Conjecture, and fame and fortune (well, fame, anyway)
general principles, number theory is concerned with very await the person who successfully answers the question (2).
specific questions about these few systems. In this article, we will attempt to describe some principal
For that reason, for many centuries, mathematicians areas of interest in number theory and then to indicate
thought of number theory as the purest form of inquiry. what current research has shown to be an extraordinary
After all, it was not inspired by physics or astronomy or application of this purest form of mathematics to several
chemistry or other applied aspects of the physical uni- very current and very important applications.
verse. Consequently, mathematicians could indulge in Although this will in no way encompass all of the areas of
number theoretic pursuits while being concerned only development in number theory, we will introduce:
with the mathematics itself. Divisibility: At the heart of number theory is the study of
But number theory is a field with great paradoxes. This the multiplicative structure of the integers under multi-
purest of mathematical disciplines, as we will see below, plication. What numbers divide (i.e., are factors of ) other
has served as the source for arguably the most important numbers? What are all the factors of a given number?
set of applications of mathematics in many years! Which numbers are prime?
Another curious aspect of number theory is that it is Multiplicative functions: In analyzing the structure of
possible for a very beginning student of the subject to pose numbers and their factors, one is led to the consideration of
questions that can baffle the greatest minds. One example is functions that are multiplicative: In other words, a function
the following: It is an interesting observation that there are is multiplicative if f a  b f a  f b for all a and b.
many triples of natural numbers (in fact, an infinite num- Congruence: Two integers a and b are said to be con-
ber) that satisfy the equation x2 y2 z2. For example, gruent modulo n (where n is also an integer), and written
32 42 52, 52 122 132, 72 242 252, and so on. a  b mod n, if their difference is a multiple of n; alterna-
However, one might easily be led to the question, can we tively, that a and b yield the same remainder when divided
find (nonzero) natural numbers x, y, and z such that (integer division) by n. The study of the integers under
x3 y3 z3? Or, indeed, such that xn+ yn zn, for any congruence yields many interesting properties and is fun-
natural number n > 2 and nonzero integers x, y and z? damental to number theory. The modular systems so devel-
The answer to this simple question was announced by oped are called modulo n arithmetic and are denoted either
the famous mathematician, Pierre Auguste de Fermat, in Z=nZorZn .
his last written work in 1637. Unfortunately, Fermat did Residues: In Zn systems, solutions of equations (techni-
not provide a proof but only wrote the announcement in the cally, congruences) of the form x2  amod n are often stu-
margins of his writing. Subsequently, this simply stated died. In this instance, if there is a solution for x, a is called a
problem became known as Fermats Last Theorem, and quadratic residue of n. Otherwise, it is called a quadratic
the answer eluded the mathematics community for 356 nonresidue of n.
years, until 1993, when it was finally solved by Andrew Prime numbers: The prime numbers, with their special
Wiles (1). property that they have no positive divisors other than
The full proof runs to over 1000 pages of text (no, it will themselves and 1, have been of continuing interest to
not be reproduced here) and involves mathematical techni- number theorists. In this section, we will see, among other
ques drawn from a wide variety of disciplines within mathe- things, an estimate of how many prime numbers there are
matics. It is thought to be highly unlikely that Fermat, less than some fixed number n.
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 COMPUTATIONAL NUMBER THEORY

Diophantine equations: The term Diophantine equation Proof. Let r 6 0. It is not possible that GCD(m,n) | r
is used to apply to a family of algebraic equations in a because GCD(m,n) | m and GCD(m,n) | n; thus, GCD(m,n)
number system such as Z or Q. A good deal of research in | (am bn) r. By Theorem 1, this means that there exist
this subject has been directed at polynomial equations with a0 , b0 such that a0 m b0 n GCD(m,n).
integer or rational coefficients, the most famous of which Thus, a00 ra0 /GCD(m,n), b00 rb0 /GCD(m,n) represent
being the class of equations xn yn zn, the subject of an integer solution to a00 m b00 n r.
Fermats Last Theorem. A related concept to the GCD is the least common multi-
Elliptic curves: A final area of discussion in number ple (LCM). It can be defined as the smallest positive integer
theory will be the theory of elliptic curves. Although gen- that a and b both divide. It is also worth noting that
erally beyond the scope of this article, this theory has been GCD(m,n)  LCM(m,n) m  n.
so important in contemporary number theory that some
discussion of the topic is in order. An elliptic curve repre- Primes
sents the set of points in some appropriate number system A positive integer p > 1 is called prime if it is divisible only
that are the solutions to an equation of the form by itself and 1. An integer greater than 1 and not prime is
y2 Ax3 Bx2 Cx D when A, B, C, D 2 Z. called composite. Two numbers m and n with the property
Applications: The final section of this article will address that GCD(m,n) 1 are said to be relatively prime (or
several important applications in business, economics, sometimes coprime).
engineering, and computing of number theory. It is remark- Here are two subtle results.
able that this, the purest form of mathematics, has found
such important applications, often of theory that is hun- Theorem 3. Every integer greater than 1 is a prime or a
dreds of years old, to very current problems in the afore- product of primes.
mentioned fields!
It should perhaps be noted here that many of the results
Proof. Suppose otherwise. Let n be the least integer that
indicated below are given without proof. Indeed, because
is neither; thus, n is composite. Thus n ab and a,b < n.
of space limitations, proofs will only be given when
Thus, a and b are either primes or products of primes, and
they are especially instructive. Several references will
thus so is their product, n.
be given later in which proofs of all of the results cited
can be found.
Theorem 4. There are infinitely many primes.

DIVISIBILITY Proof (Euclid). If not, let p1, . . ., pn be a list of all the


primes, ordered from smallest to largest. Then consider
Many questions arising in number theory have as q (p1p2. . . pn) 1. By the previous statement,
their basis the study of the divisibility of the integers.
An integer n is divisible by k if another integer m exists q p01 p02 . . . p0k (1)
such that k  m n. We sometimes indicate divisibility
of n by k by writing kjn or kjn if n is not divisible by k. p01 must be one of the p1, . . ., pn, say pj (as these were all
A fundamental result is the division algorithm. Given m, the primes), but pj|q, because it has a remainder of 1. This
n 2 Z, with n > 0, unique integers c and d exist such that contradiction proves the theorem.
m c  n d and 0  d < n.
Equally as fundamental is the Euclidean algorithm. Theorem 5 (Unique Factorization). Every positive integer
has a unique factorization into a product of primes.
Theorem 1. Let m, n 2 Z, both m, n 6 0. A unique integer
c exists satisfying c > 0; cjm; cjn; and if djm and djn; Proof. Let
then djc.
a pa11 . . . pakk P

Proof. Consider fdjd am bn; 8 a; b 2 Zg. Let c be b b
q11 . . . qmm Q 2
the smallest natural number in this set. Then c satisfies
the given conditions. b
For each pi, pi | Q ) pi | qs s for some s, 1  s  m.
Clearly c > 0: c ja, because by the division algorithm,
Since pi and qs are both primes, pi qs. Thus, k m and
s and t there exist such that a cs t with 0  t < u. b b
Q p11 . . . pkk . We only need to show that the ai and bi are
Thus, a cs t ams bns t; thus, a(1ms)
equal. Divide both decompositions P and Q by pai i . If ai 6 bi,
b(ns) t. As t < c, this implies that t 0, and thus
on the one hand, one decomposition a= pai i will contain pi,
a cs or c | a. Similarly c | b. c is unique because, if
and the other will not. This contradiction proves the
c also meets the conditions, then c | c and c | c, so c c.
theorem.
The greatest common divisor of two integers m and n is
What has occupied many number theorists was a quest
the largest positive integer [denoted GCD(m,n)] such that
for a formula that would generate all of the infinitely many
GCD(m,n) | m and GCD (m,n) | n.
prime numbers.
For example, Marin Mersenne (1644) examined num-
Theorem 2 (Greatest Common Divisor). The equation
bers of the form Mp 2p  1, where p is a prime (3). He
am bn r has integer solutions a; b , GCDm; njr.
COMPUTATIONAL NUMBER THEORY 3

discovered that some of these numbers were, in fact, MULTIPLICATIVE FUNCTIONS


primes. Generally, the numbes he studied are known as
Mersenne numbers, and those that are prime are called Functions that preserve the multiplicative structure of the
Mersenne primes. For example, M2 22  1 3 is prime; number systems studied in number theory are of particular
as are M3 23  1 7; M5 25  1 31; M7 27 interest, not only intrinsically, but also for their use in
1 127. Alas, M11 211  1 2047 23  89 is not. determining other relationships among numbers.
Any natural number 2 ending in an even digit 0, 2, 4, A function f defined on the integers that takes values in a
6, 8 is divisible by 2. Any number 5 ending in 5 is divisible set closed under multiplication is called a number theoretic
by 5. There are also convenient tests for divisibility by 3 and function. If the function preserves multiplication for num-
9if the sum of the digits of a number is divisible by 3 or 9, bers that are relatively prime (f(m)  f(n) f(m  n)), it is
then so is the number; and by 11if the sum of the digits in called a multiplicative function; it is called completely multi-
the even decimal places of a number, minus the sum of the plicative if the restriction GCD(m, n) 1 can be lifted.
digits in the odd decimal places, is divisible by 11, then so is Consider any number theoretic function f, and define a
the number. new function F by the sum of the values of f taken over the
Several other Mersenne numbers have also been deter- divisors of n
mined to be prime. At the current writing, the list includes X X
42 numbers: Fn f d f n=d; the latter being
Mn, where n 2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, djn djn (5)
521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, the former sum in reverse order
11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049,
216091, 756839, 859433, 1257787, 1398269, 2976221,
3021377, 6972593, 13466917, 20996011, 24036583, Theorem 7. If f is a multiplicative function, then so is F.
25964951.
With current technology, particularly mathematical Proof. Let GCD(m, n) 1; then d | mn can be uniquely
software packages such as Mathematica or Maple, many expressed as gh, where g|m,h|n, with GCD(g,h) 1.
of these computations can be done rather easily. For exam- X XX XX
ple, a one-line program in Mathematica, executing for 6.27 Fmn f d f gh f g f h
hours on a Pentium PC, was capable of verifying the djmn gjm hjn gjm hjn
primality of all Mn up to M1000, and thus determining X X
f g f h1 . . . f g f hk
the first 14 Mersenne primes (up to M607). It is not known gjm gjm
(6)
whether an infinite number of the Mersenne numbers are X 
prime. Fm f h FmFn
It is known that mc  1 is composite if m > 2 or if c is hjn
composite; for if c de, we have:
Two multiplicative functions of note are the divisor function
mc  1 me  1med1 med1 . . . med1 1 t(n) defined as the number of positive divisors of n and the
function s(n), defined as the sum of the positive divisors
(3)
of n.
We can also show that mc 1 is composite if m is odd or if c
has an odd factor. Certainly if m is odd, mc is odd, and Theorem 8. t and s are multiplicative.
mc 1 is even and thus composite. If c d(2k 1), then
Proof. Both t and s are the uppercase functions for the
obviously multiplicative functions 1(n) 1 for all n, and
mc 1 md 1m2de  md2e1 md2e2  . . . 1
i(n) n for all n. In other words,
(4)
X X
d tn 1d and sn id (7)
and m 1 > 1. djn djn
Another set of numbers with interesting primality prop-
n
erties are the Fermat numbers, Fn 22 1. Fermats In order to compute t and s for a prime p, note that
conjecture was that they were primes. He was able
to verify this for F1 5, F2 17, F3 257, and
t pn 1 nbecause the
F4 216 1 65537. But then, Euler showed that
divisors of pn are 1; p; p2 ; . . . ; pn 8
Theorem 6. 641|F5.
s pn 1 p p2 . . . pn pn1  1= p  1 (9)
Proof. 641 24 54 5  27 1; thus 24 641  54.
Thus, for any n p1 an1 p2 an2 . . . pk ank ,
Since 232 24  228 641  228  (5  27)4 641  228 
(641  1)4 641k  1. Y
k Y
k
tn 1 ni and sn pni i 1  1= pi  1
To this date, no other Fermat numbers Fn with n > 4
i1 i1
have been shown to be prime. It has been determined that
(10)
the other Fermat numbers through F20 are composite.
4 COMPUTATIONAL NUMBER THEORY

In very ancient times, numbers were sometimes considered Consider integers a, b, n with n > 0. Note that a and b
to have mystical properties. Indeed, the Greeks identified could be positive or negative. We will say that a is congruent
numbers that they called perfect: numbers that were to b, modulo n [written a  b (mod n)] , nja  b. Alter-
exactly the sums of all their proper divisors, in other words, natively, a and b yield the same remainder when divided by
that s(n) n. A few examples are 6 1 2 3, n. In such a congruence, n is called the modulus and b is
28 1 2 4 7 14, and 496 1 2 4 8 called a residue of a.
16 31 62 124 248. It is not known whether there An algebraic system can be defined by considering
are any odd perfect numbers, or if an infinite number of classes of all numbers satisfying a congruence with fixed
perfect numbers exists. modulus. It is observed that congruence is an equivalence
relation and that the definition of addition and multiplica-
Theorem 9. n is even and perfect , n 2 p1 2 p  1 tion of integers can be extended to the equivalence classes.
where both p and 2p  1 are primes. Thus, for example, in the system with modulus 5 (also
In other words, there is one perfect number for each called mod 5 arithmetic), the equivalence classes are {. . .,
Mersenne prime. 5,0,5,. . .}, {. . .,4,1,6,. . .}, {. . .,3,2,7,. . .}, {. . .,2,3,8,. . .},
Another multiplicative function of considerable impor- and {. . .,1,4,9,. . .}. It is customary to denote the class by
tance is the Mobius function m. the (unique) representative of the class between 0 and n 1.
m1 1; mn 0 if n has a square factor; m(p1, p2 . . . Thus the five classes in mod 5 arithmetic are denoted 0, 1, 2,
pk) (1)k if p1, . . ., pk are distinct primes. 3, 4. Formally, the mod n system can be defined as the
algebraic quotient of the integers Z and the subring defined
Theorem 10. m is multiplicative, and the uppercase by the multiples of n (nZ). Thus, the mod n system is
function is 0 unless n 1, when it takes the value 1. often written Z/nZ. An alternative, and more compact
notation, is Zn.
Theorem 11. (Mobius Inversion
PFormula). If f is a number Addition and multiplication are defined naturally in
theoretic function and Fn djn f d, then Zn. Under addition, every Zn forms an Abelian group [that
X X is, the addition operation is closed, associative, and com-
f n Fdmn=d Fn=dmn (11) mutative; 0 is an identity; and each element has an
d=n d=n additive inversefor any a, b na always yields
a b  0 (mod n)].
Proof. In the multiplicative structure, however, only the clo-
sure, associativity, commutativity, and identity (1) are
X
mdFn=d assured. It is not necessarily the case that each element
d=n will have an inverse. In other words, the congruence ax  1
X (mod n) will not always have a solution.
md1 Fn=d2 taking pairs d1 d2 n 12 Technically, an algebraic system with the properties
d1 d2 n described above is called a commutative ring with
X X identity. If it is also known that, if each (nonzero) ele-
md1 f d definition of F 13
ment of Zn has an inverse, the system would be called a
d1 d2 n djd2
X field.
md1 f d multiplying the terms in brackets 14
dr djn Theorem 14. Let a, b, n be integers with n > 0. Then ax 
X X 1 (mod n) has a solution , GCDa; n 1. If x0 is a solution,
f d md1 collecting multiples of f d 15 then there are exactly GCD(a,n) solutions given by {x0,
djn d1 jn=d x0 n/GCD(a,n), x0 2n/GCD(a,n), . . ., x0 (GCD(a,n)
1)n/GCD(a,n)}.
f n
Proof. This theorem is a restatement of Theorem 2.
Theorem 12. If F is a multiplicative function, then so is f. For an element a in Zn to have an inverse, alternatively
A final multiplicative function of note is the Euler func- to be a unit, by the above theorem, it is necessary and
tion f(n). It is defined for n to be the number of numbers less sufficient for a and n to be relatively prime; i.e.,
than n and relatively prime to n. For primes p, f(p) p1. GCD(a,n) 1. Thus, by the earlier definition of the Euler
function, the number of units in Zn is f(n).
Theorem 13. f is multiplicative. The set of units in Zn is denoted (Zn), and it is easily
verified that this set forms an Abelian group under multi-
plication. As an example, consider Z12 or Z/12Z. Note that
CONGRUENCE (Z12) {1,5,7,11}, and that each element is its own
inverse: 1  1  5  5  7  7  11  11  1 (mod 12).
The study of congruence leads to the definition of new Further more, closure is observed because 5 7  11, 5  11
algebraic systems derived from the integers. These  7, and 7  11  5 (mod 12).
systems, called residue systems, are interesting in and of
themselves, but they also have properties that allow for Theorem 15. If p is a prime number, then Zp is a field
important applications. with p elements. If n is composite, Zn is not a field.
COMPUTATIONAL NUMBER THEORY 5

Proof. If p is a prime number, every element a 2 (Zp) is an inverse ai1. Now consider the product b a1a2. . .af(n).
relatively prime to p; that is, GCD(a,p) 1. Thus ax  1 It also has an inverse, in particular b1 a1 1 1
1 a2    afn .
(mod p) always has a solution. As every element in (Zp) has Choose any of the units; suppose it is a. Now consider the set
an inverse, (Zp) is a field. If n is composite, there are A0 faa1 ; aa2 ; aafn g. We need to show that as a set, A0 A.
integers 1 < k, l < n such that kl n. Thus, kl  0 (mod It is sufficient to show that the aai are all distinct. As there
n), and so it is impossible that k could have an inverse. are f(n) of them, and they are all units, they represent all of
Otherwise, l  (k1k)  l  k1 (k  l)  k1  0  0 (mod n), the elements of A.
which contradicts the assumption that l < n. Suppose that aai  aaj for some i 6 j. Then, as a is a unit,
One of the most important results of elementary number we can multiply by a1, yielding (a1a)ai  (a1a)aj or ai  aj
theory is the so-called Chinese Remainder Theorem(4). It is (mod n), which is a contradiction. Thus, the aai are all
given this name because a version was originally derived by distinct and A A.
the Chinese mathematician Sun Tse almost 2000 years ago. Now compute
The Chinese Remainder Theorem establishes a method of
solving simultaneously a system of linear congruences in fn
Y
several modular systems. aai  bmod n because A A0
i1
(17)
Theorem 16 (Chinese Remainder). Given a system x  ai
(mod ni), i 1,2,. . .m. Suppose that, for all i j, afn b  bmod n
GCD(ni,nj) 1. Then there is a unique common solution
modulo n n1n2. . .nm. afn bb1  bb1 mod n multiplying by b1
(18)
afn  1mod n
Proof (By construction). Let ni0 n/ni, i 1,. . .,m. Note
that GCD(ni,ni0 ) 1. Thus, an integer exists ni00 such that Although the Chinese Remainder Theorem gives a solution
ni0 ni00  1(mod ni). Then for linear congruences, one would also like to consider non-
x  a1 n1 0 n1 00 a2 n2 0 n2 00    am nm 0 nm 00 mod n (16) linear or higher degree polynomial congruences. In the case
of polynomials in one variable, in the most general case,
is the solution. As ni|nj if i 6 j, x  ainini  ai (mod ni). The
solution is also unique. If both x and y are common f x  0mod n (19)
solutions, then xy  0 (mod n).
An interesting consequence of this theorem is that there If n p1a1    pkak is the factorization of n, then the Chinese
is a 1  1 correspondence, preserved by addition and multi- Remainder Theorem assures solutions of (19) , each of
plication, of integers modulo n, and m-tuples of integers
modulo ni(5). Consider {n1,n2,n3,n4} {7,11,13,17}, and f x  0mod pai i i 1; 2; . . . ; k (20)
n 17017. Then
has a solution.
95 ! a1 ; a2 ; a3 ; a4 95 mod 7; 95 mod 11; 95 mod 13; 95
As f p p  1 for p a prime, Fermats Theorem is a
mod 17 4; 7; 4; 10 also 162 ! 1; 8; 6; 9
direct consequence of Eulers Theorem.
Other important results in the theory of polynomial
Performing addition and multiplication tuple-wise: congruences are as follows:

4; 7; 4; 10 1; 8; 6; 9 5 mod 7; 15 mod 11; 10 mod 13; Theorem 19 (Lagrange). If f(x) is a nonzero polynomial of
19 mod 17 5; 4; 10; 2; 4; 7; 4; 10  1; 8; 6; 9 4 mod degree n, whose coefficients are elements of Zp for a prime p,
7; 56 mod 11; 24 mod 13; 90 mod 17 4; 1; 11; 5 then f(x) cannot have more than n roots.
Now verify that 95 162 257 and 95  162 15,390 are Theorem 20 (Chevalley). If f(x1,. . .,xn) is a polynomial
represented by (5,4,10,2) and (4,1,11,5) by reducing each with degree less than n, and if the congruence
number mod n1, . . ., n4.
Another series of important results involving the pro- f x1 ; x2 ; . . . ; xn  0mod p
ducts of elements in modular systems are the theorems of
Euler, Fermat, and Wilson. Fermats Theorem, although has either zero or at least two solutions.
extremely important, is very easily proved; thus, it is some- The Lagrange Theorem can be used to demonstrate the
times called the Little Fermat Theorem in contrast to the result of Wilson noted above.
famous Fermats Last Theorem described earlier.
Theorem 21 (Wilson). If p is a prime, then (p 1)!  1
Theorem 17 (Euler). GCD If(a,n) 1, then afn  (mod p).
1 mod n.
Proof. If p 2, the result is obvious. For p an odd prime,
Theorem 18 (Fermat). If p is prime, then a p  a mod p. let
Proof (of Eulers Theorem). Suppose A {a1, . . .,af(n)} is a
f x xb1  x  1x  2 . . . x  p 1  1:
list of the set of units in Zn. By definition, each of the ai has
6 COMPUTATIONAL NUMBER THEORY

a
Consider any number 1  k  p 1. Substituting k for x (a / p) or ) is
p
causes the term (x 1)(x 2). . .(x p 1) to vanish; also, by
 
Fermats theorem, k p1  1mod p. Thus, f k  0mod p. a

|{z}
1 if a is a quadratic residue mod p
But k has degree less than p  1; and so by Lagranges p
theorem, f(x) must be identically zero, which means all 0 if pja
of the coefficients must be divisible by p. The constant 1 if a is a quadratic nonresidue mod p
coefficient is
One method of evaluating the Legendre symbol uses
1  p  1!mod p Eulers criterion. If p is an odd prime and GCD(a,p) 1,
then
and thus  
a
1 , a p1=2  1mod p
p
p  1!   1mod p
a
Equivalently,  a p1=2 mod p.
p
QUADRATIC RESIDUES Here are some other characteristics of the Legendre

Having considered general polynomial congruences, symbol:


now we restrict consideration to quadratics. The study ab a b
of quadratic residues leads to some useful techniques Theorem 23. (i) ; (ii) if a  b (mod p),
p p p
as well as having important and perhaps surprising a b a2 1 1
results. then ; (iii) 1; 1; (iv) 1= p
p p p p p
The most general quadratic congruence (in one vari-
able) is of the form ax2 bx c  0 (mod m). Such a 1 p1=2 .
congruence can always be reduced to a simpler form. For
example, as indicated in the previous section, by the Suppose we want to solve x2  518 (mod 17). Then,
Chinese remainder theorem, we can assume the modulus 518 8 2 2
compute . But 1 since 62
is a prime power. As in the case p 2 we can easily 17 17 17 17
enumerate the solutions, we will henceforth consider 36  2mod 17. Thus, x2  518 (mod 17) is soluble.
only odd primes. Finally, we can use the technique of Computation of the Legendre symbol is aided by the
completing the square from elementary algebra to following results. First, define an absolute least residue
transform the general quadratic into one of the form x2 modulo p as the representation of the equivalence class of a
 a (mod p). mod p, which has the smallest absolute value.
If p a, then if x2  a (mod p) is soluble, a is called a
quadratic residue mod p; if not, a is called a quadratic Theorem 24 (Gauss Lemma). Let GCD(a,p) 1. If d is
nonresidue mod p. the number of elements of {a,2a,. . .,(p 1)a} whose absolute
least residues modulo p are negative, then
Theorem 22. Exactly one half of the integers a, 1  a  p  
1, are quadratic residues mod p. a
1d
p
Proof. Consider the set of mod p values QR {12,
Theorem 25. 2 is a quadratic residue (respectively, quad-
2 ,. . ., ((p 1)/2)2}. Each of these values is a quadratic
2
ratic nonresidue) of primes of the form 8k 1 (respectively,
residue. If the values in QR are all distinct, there are at
8k 3). That is,
least (p 1)/2 quadratic residues. Suppose two of these
values, say t and u, were to have t2  u2 (mod p). Then  
since t2 u2  0 (mod p) ) t u  0 (mod p) or t u  0 2 2
1 p 1=8
(mod p). Since t and u are distinct, the second case is not p
possible; and since t and u must be both < (p 1)/2, so t u Theorem 26. (i) If k > 1, p 4k 3, and p is prime, then
< p and neither is the first case. Thus there are at least 2p 1 is also prime , 2p  1 (mod 2p 1).
(p  1)/2 quadratic residues.
(ii) If 2p 1 is prime, then 2p 1 | Mp, the pth Mers-
If x0 solves x2  a (mod p), then so does p x0, since
enne number, and Mp is composite.
p  2 px0 x20  x20  amod p, and p  x0Tx0 (mod p).
2

Thus we have found (p 1)/2 additional elements of Zp,


A concluding result for the computation of the Legendre
which square to elements of QR and therefore p  1
symbol is one that, by itself, is one of the most famousand
elements overall. Thus there can be no more quadratic
surprisingresults in all of mathematics. It is called
residues outside of QR, so the result is proved.
Gauss Law of Quadratic Reciprocity. What makes it so
An important number theoretic function to evaluate
astounding is that it manages to relate prime numbers and
quadratic residues is the Legendre symbol. For p an
their residues that seemingly bear no relationship to one
odd prime, the Legendre symbol for a (written alternatively
another (6).
COMPUTATIONAL NUMBER THEORY 7

Suppose that we have two odd primes, p and q. Then, the integers such that GCD(a,b) 1. Then there are an infinite
Law of Quadratic Reciprocity relates the computation of number of primes in the sequence {a bn | n 1, 2,. . . }.
their Legendre symbols; that is, it determines the quadratic Finally, we have the best known approximation to the
residue status of each prime with respect to the other. number of primes (8).
The proof, although derived from elementary principles,
is long and would not be possible to reproduce here. Several Theorem 34 (Prime Number Theorem). p(n)
n/log n. The
sources for the proof are listed below. conjectures involving prime numbers are legion, and even
some of the simplest ones have proven elusive for mathe-
Theorem 27 (Gauss Law of Quadratic Reciprocity). maticians. A few examples are the Goldbach conjecture, the
p q twin primes conjecture, the interval problem, the Dirichlet
1 p1q1=4 .
q p series problem, and the Riemann hypothesis.
A consequence of the Law of Quadratic Reciprocity is as
follows. Twin Primes. Two primes p and q are called twins if
q p 2. Examples are (p,q) (5,7); (11,13); (17,19);
Theorem 28. Let p and q be distinct odd primes, and a  (521,523). If p2(n) counts the number of twin primes less
a a than n, the twin prime conjecture is that p2 n ! 1 as
1. If p  q (mod 4a), then .
p q n ! 1. It is known, however, that there are infinitely many
An extension of the Legendre symbol is the Jacobi pairs of numbers (p,q), where p is prime, q p 2, and q
symbol. The Legendre symbol is defined only for primes has at most two factors.
p. By a natural extension, the Jacobi symbol, also denoted
(an), is defined for any n > 0, assuming that the prime Goldbach Conjecture. As stated, this conjecture is that
factorization of n is p1. . .pk, by every even number >2, is the sum of two primes. What is
known is that every large even number can be expressed as
a a a a
jacobi symbol  Legendre symbols p q,wherepisprimeandqhasatmosttwofactors.Also,itis
n p1 p2 pk
known that everylarge odd integer isthe sum of three primes.

PRIME NUMBERS Interval Problems. It was demonstrated earlier that


there is always a prime number between n and 2n. It is
The primes themselves have been a subject of much inquiry not known, however, whether the same is true for other
in number theory. We have observed earlier that there are intervals, for example, such as n2 and (n 1)2.
an infinite number of primes, and that they are most useful
in finite fields and modular arithmetic systems. Dirichlet Series. In Theorem 33, a series containing an
One subject of interest has been the development of a infinite number of primes was demonstrated. It was not
function to approximate the frequency of occurrence of known whether there are other series that have a greater
primes. This function is usually called p(n)it denotes frequency of prime occurrences, at least until recent
the number of primes less than or equal to n. research by Friedlander and Iwaniec (9), who showed
In addition to establishing various estimates for p(n), that series of the form {a2 b4} not only have an infinite
concluding with the so-called Prime Number Theorem, we number of primes, but also that they occur more rapidly
will also state a number of famous unproven conjectures than in the Dirichlet series.
involving prime numbers.
An early estimate for p(n), by Chebyshev, follows: Riemann Hypothesis. Although the connection to
prime numbers is not immediately apparent, the
Theorem 29 (Chebyshev). If n > 1, then n/(8 log n) < p(n) Riemann hypothesis has been an extremely important
< 6n/log n. pillar in the theory of primes. It states that, for the complex
The Chebyshev result tells us that, up to a constant function
factor, the number of primes is of the order of n/log n. In
addition to the frequency of occurrence of primes, the great- X
1

est gap between successive primes is also of interest (7). zs ns s s it 2 C


n1

Theorem 30 (Bertrands Partition). If n  2, there is a


there are zeros at s 2, 4, 6,. . ., and no more zeros
prime p between n and 2n.
outside of the critical strip 0  s  1. The Riemann
Two other estimates for series of primes are as follows.
hypothesis states that all zeros of z in the critical strip
X lie on the line s it.
Theorem 31. log p= p log n O1.
Examples of important number theoretic problems
pn
X whose answer depends on the Riemann hypothesis are
Theorem 32. 1= p log log x a O1=log x (1) the existence of an algorithm to find a nonresidue
pn
mod p in polynomial time and (2) if n is composite, there
r
Another very remarkable result involving the genera- is at least one b for which neither bt  1mod n nor b2 t 
tion of primes is from Dirichlet. 1 mod n. This latter example is important in algorithms
needed to find large primes (10).
Theorem 33 (Dirichlet). Let a and b be fixed positive
8 COMPUTATIONAL NUMBER THEORY

DIOPHANTINE EQUATIONS A major result in this theory is the theorem of Mordell


and Weil. If K is any algebraic field, and C(K) the points
The term Diophantine equation is used to apply to a family with rational coordinates on an elliptic curve, then this
of algebraic equations in a number system such as Z or Q. object C(K) forms a finitely generated Abelian group.
To date, we have certainly observed many examples of
Diophantine equations. A good deal of research in this
APPLICATIONS
subject has been directed at polynomial equations with
integer or rational coefficients, the most famous of which
In the modern history of cryptology, including the related
being the class of equations xn yn zn, the subject of
area of authentication or digital signatures, dating roughly
Fermats Last Theorem.
from the beginning of the computer era, there have been
One result in this study, from Legendre, is as follows.
several approaches that have had enormous importance for
business, government, engineering, and computing. In
Theorem 35. Let a; b; c; 2 Z such that (i) a > 0, b,
order of their creation, they are (1) the Data Encryption
c < 0; (ii) a, b, and c are square-free; and (iii)
Standard or DES (1976); (2) the RivestShamirAdelman
GCD(a,b) GCD(b,c) GCD(a,c) 1. Then
Public Key Cryptosystem, or RSA (1978); (3) the Elliptic
Curve Public Key Cryptosystem or ECC (1993); and (4)
ax2 by2 cz2 0 Rijndael or the Advanced Encryption Standard, or AES
(2001). RSA, DSS (defined below), and ECC rely heavily on
has a nontrivial integer solution ,  ab 2 QRc; bc 2 techniques described in this article.
QRa and  ca 2 QRb.
Data Encryption Standard (DES)
Example. Consider the equation 3x2  5y2  7z2 0.
With a 3, b 5, and c 7, apply Theorem 35. Note DES was developed and published as a U.S. national stan-
that ab  1 (mod 7), ac  1 (mod 5), and bc  1 (mod 3). dard for encryption in 1976 (12). It was designed to trans-
Thus, all three products are quadratic residues, and the form 64-bit messages to 64-bit ciphers using 56-bit keys. Its
equation has an integer solution. Indeed, the reader may structure is important to understand as the model for many
verify that x 3, y 2, and z 1 is one such solution. other systems such as AES. In particular, the essence of
Another result, which consequently proves Fermats DES is a family of nonlinear transformations known as the
Last Theorem in the case n 4, follows. (Incidentally, it S-boxes. The S-box transformation design criteria were
has also been long known that Fermats Last Theorem never published, however, and so there was often reluctance
holds for n 3.) in the acceptance of the DES. By the mid-1990s, however,
effective techniques to cryptanalyze the DES had been
Theorem 36. x4 y4 z2 has no nontrivial solutions in developed, and so research began to find better approaches.
the integers. Historically, cryptology required that both the sending
A final class of Diophantine equations is known gener- and the receiving parties possessed exactly the same infor-
ically as Mordells equation: y2 x3 k. In general, solu- mation about the cryptosystem. Consequently, that infor-
tions to Mordells equation in the integers are not known. mation that they both must possess must be communicated
Two particular solutions are as follows. in some way. Encryption methods with this requirement,
such as DES and AES, are also referred to as private key
Theorem 37. y2 x3 m2 jn2 has no solution in the or symmetric key cryptosystems.
integers if
The Key Management Problem
(i) j 4, m  3 (mod 4) and pT 3 (mod 4) when p | n.
Envision the development of a computer network consist-
(ii) j 1, m  2 (mod 4), n is odd, and pT 3 (mod 4) when ing of 1000 subscribers where each pair of users requires a
p | n. separate key for private communication. (It might be
instructive to think of the complete graph on n vertices,
Theorem 38. y2 x3 2a3 3b2 has no solution in the
representing the users; with the n(n 1)/2 edges
integers if ab 6 0, aT 1 (mod 3), 3 | b, a is odd if b is even, and
corresponding to the need for key exchanges. Thus, in
p t2 27u2 is soluble in integers t and u if p | a and p  1
the 1000-user network, approximately 500,000 keys must
(mod 3).
be exchanged in some way, other than by the network!)
In considering this problem, Diffie and Hellman asked
ELLIPTIC CURVES the following question: Is it possible to consider that a key
might be broken into two parts, k (kp, ks), such that only
Many recent developments in number theory have come as kp is necessary for encryption, while the entire key k (kp,
the byproduct of the extensive research performed in a ks) would be necessary for decryption (13)?
branch of mathematics known as elliptic curve theory (11). If it were possible to devise such a cryptosystem, then the
An elliptic curve represents the set of points in some following benefits would accrue. First of all, as the informa-
appropriate number system that are the solutions to an tion necessary for encryption does not, a priori, provide an
equation of the form y2 Ax3 Bx2 Cx D when A, B, attacker with enough information to decrypt, then there is no
C, D 2 Z. longer any reason to keep it secret. Consequently kp can be
COMPUTATIONAL NUMBER THEORY 9

made public to all users of the network. A cryptosystem Although the proof of the correctness and the security
devised in this way is called a public key cryptosystem (PKC). of RSA are established, there are several questions about
Furthermore, the key distribution problem becomes the computational efficiency of RSA that should be raised.
much more manageable. Consider the hypothetical net-
work of 1000 users, as before. The public keys can be listed Is it Possible to Find Prime Numbers of 200 Decimal Digits
in a centralized directory available to everyone, because the in a Reasonable Period of Time? The Prime Number Theo-
rest of the key is not used for encryption; the secret key does rem 34 assures us that, after a few hundred random selec-
not have to be distributed but remains with the creator of tions, we will probably find a prime of 200 digits.
the key; and finally, both parts, public and secret, must be We can never actually be certain that we have a prime
used for decryption. without knowing the answer to the Riemann hypothesis;
Therefore, if we could devise a PKC, it would certainly instead we create a test (the SolovayStrassen test), which
have most desirable features. if the prime candidate passes, we assume the probability
In 1978, Rivest, Shamir, and Adelman described a pub- that p is not a prime is very low (16). We choose a number
lic-key cryptosystem based on principles of number theory, (say 100) numbers ai at random, which must be relatively
with the security being dependent on the inherent difficulty prime to p. For each ai, if the Legendre symbol
a p1=2
of factoring large integers. ai mod p, then the chance that p is not a prime
p
and passes the test is 1/2 in each case; if p passes all tests,
Factoring the chances are 1/2100 that it is not prime.
Factoring large integers is in general a very difficult problem
Is it Possible to Find an e Which is Relatively Prime to
(14). The best-known asymptotic running-time solution today
1=3 2=3 f(n)? Computing the GCD(e,f(n)) is relatively fast, as is
is Oe64n=9 log n for an n-bit number. More concretely,
computing the inverse of e mod n. Here is an example of a (3 
in early 2005, a certain 200-digit number was factored into
2) array computation that determines both GCD and inverse
two 100-digit primes using the equivalent of 75 years of
[in the example, GCD(1024,243) and 2431 (mod 1024)].
computing time on a 2.2-GHz AMD Opteron processor.
First, create a (3  2) array where the first row are the given
numbers; the second and third rows are the (2  2) identity
RivestShamirAdelman Public Key Cryptosystem (RSA)
matrix. In each successive column, subtract the largest
The basic idea of Rivest, Shamir, and Adelman was to take multiple m of column k less than the first row entry of column
two large prime numbers, p and q (for example, p and q each (k  1) to form the new column (for example, 1024 4 
being
10200, and to multiply them together to obtain n pq. 243 52). When 0 is reached in the row A[1,], say A[1,n],
n is published. Furthermore, two other numbers, d and e, are both the inverse (if it exists) and the GCD are found. The GCD
generated, where d is chosen randomly, but relatively prime is the element A[1,n 1]m and if this value is 1, the inverse
to the Euler function f(n) in the interval [max(p,q) 1, exists and it is the value A[3,n 1] [243  59  1 (mod 1024)].
n 1]. As we have observed, f(n) (p 1) (q 1) (15).
Column 1 2 3 4 5 6 7
Key Generation
m 4 4 1 2 17
1. Choose two 200-digit prime numbers randomly from A[1,] 1024 243 52 35 17 1 0
A[2,] 1 0 1 4 5 14
the set of all 200-digit prime numbers. Call these p
A[3,] 0 1 4 17 21 59
and q.
2. Compute the product n pq. n will have approxi-
mately 400 digits. Is it Possible to Perform the Computation e  d Where e
3. Choose d randomly in the interval [max(p,q) 1, n and d are Themselves 200-digit Numbers? Computing me
1], such that GCD(d, f(n)) 1. (mod n) consists of repeated multiplications and integer
4. Compute e  d1 (modulo f(n)). divisions. In a software package such as Mathematica, such
5. Publish n and e. Keep p, q, and d secret. a computation with 200-digit integers can be performed in
0.031 seconds of time on a Pentium machine.
Encryption One shortcut in computing a large exponent is to make use
of the fast exponentiation algorithm: Express the exponent
as a binary, e bnbn1. . .b0. Then compute me as follows:
1. Divide the message into blocks such that the bit-
string of the message can be viewed as a 400-digit
ans m
number. Call each block, m.
for i n  1 to 0 do
2. Compute and send c  me (modulo n). ans ans  ans
Decryption if bi 1 then ans ans  x
end;
1. Compute cd  me d  med  mkfn1  mkfn  m  m
modulo n The result is ans. Note that the total number of multi-
Note that the result mkfn  1 used in the preceding line plications is proportional to the log of e.
is the Little Fermat Theorem. Example: Compute x123.
10 COMPUTATIONAL NUMBER THEORY

123 (1111011)binary. So n 6. Each arrow below and that we can be assured of the originators identity. The
represents one step in the loop. All but the fourth pass DSS creates for each user a public and a private key. The
through the loop require squaring and multiplying by x, private key is used to generate signatures, and the public
since the bits processed are 111011. key is used in verifying signatures.
The DSS has two parts. The first part begins with a
ans x ! x2  x x3 ! x6  x x7 ! x14  x mechanism for hashing or collapsing any message down to
one of a fixed length, say 160 bits. This hashing process is
x15 ! x30 ! x60  x x61 ! x122  x x123
determined by a secure hash algorithm (SHA), which is
In a practical version of the RSA algorithm, it is recom- very similar to a (repeated) DES encryption. The hashed
mended by Rivest, Shamir, and Adelman that the primes p message is combined with public and private keys derived
and q be chosen to be approximately of the same size, and from two public prime numbers. A computation is made by
each containing about 100 digits. the signatory using both public and private keys, and the
The other calculations necessary in the development of result of this computation, also 160 bits, is appended to the
an RSA cryptosystem have been shown to be relatively original message. The receiver of the message also performs
rapid. Except for finding the primes, the key generation a separate computation using only the public key knowl-
consists of two multiplications, two additions, one selection edge, and if the receivers computation correctly computes
of a random number, and the computation of one inverse the appended signature, the message is accepted. Again, as
modulo another number. with the RSA, the critical number theoretic result for the
The encryption and decryption each require at most 2 correctness of the method is the Little Fermat Theorem.
log2n multiplications (in other words, one application of the
Fast Exponentiation algorithm) for each message block. Elliptic Curve Public Key Cryptosystem (ECC)
One form of the general equation of an elliptic curve, the
DIGITAL SIGNATURES family of equations y2 x3 ax b (a, b 2 Z) has proven to
be of considerable interest in their application to cryptology
It seems likely that, in the future, an application similar to (20). Given two solutions p (x1, y1) and Q (x2, y2), a
public key cryptology will be even more widely used. With third point R in the Euclidean plane can be found by the
vastly expanded electronic communications, the require- following construction: Find a third point of intersection
ments for providing a secure way of authenticating an between the line PQ and the elliptic curve defined by all
electronic messagea digital signaturewill be required solutions to y2 x3 ax b; then the point R is the reflec-
far more often than the requirement for transmitting tion of this point of intersection in the x-axis. This point R
information in a secure fashion. may also be called P Q, because the points so found follow
As with public key cryptology, the principles of number the rules for an Abelian group by the Theorem of Mordell
theory have been essential in establishing methods of and Weil, with the identity 0 = P + (P) being the point at
authentication. infinity.
The authentication problem is the following: Given a As an analogy to RSA, a problem comparable with the
message m, is it possible for a user u to create a signature, difficulty of factoring is the difficulty of finding k when
su; dependent on some information possessed only by u, so kP P P . . . P (k times) is given. Specifically, for a
that the recipient of the message (m,su) could use some cryptographic elliptic curve application, one selects an ellip-
public information for u (a public key), to be able to deter- tic curve over a Galois field GF(p) or GF(2m), rather than the
mine whether the message was authentic. integers. Then, as a public key, one chooses a secret k and a
Rivest, Shamir, and Adelman showed that their public public p and computes kP Q, with Q also becoming public.
key encryption method could also be used for authentication. One application, for example, is a variation of the widely
For example, for A to send a message to B that B can used DiffieHellman secret sharing scheme (13). This
authenticate, assume an RSA public key cryptosystem has scheme enables two users to agree on a common key without
been established with encryption and decryption keys eA, revealing any information about the key. If the two parties
dA, eB, dB, and a message m to authenticate. A computes are A and B, each chooses at random a secret integer xA and
and sends c  meB dA mod n. B both decrypts and authenti- xB. Then, A computes yA xAP in a public elliptic curve with
cates by computing ceA dB  meB dA eAdB  meB dA eA dB 
meB dB  mmod n.
y
However, several other authors, particularly El Gamal y2= x 2 4x
(17) and Ong et al. (18), developed more efficient solutions
to the signature problem. More recently, in 1994, the
National Institute of Standards and Technology, an agency Q
of the United States government, established such a P
method as a national standard, now called the DSS or x
Digital Signature Standard (19). R=P+Q=(2.16,1.19 )
P = (2,0)
The DSS specifies an algorithm to be used in cases where
a digital authentication of information is required. Q =(1/4,(15)/4)
We assume that a message m is received by a user. The
objective is to verify that the message has not been altered,
Figure 1. An example of addition of points on the elliptic curve
y2 = x3 4x.
COMPUTATIONAL NUMBER THEORY 11

base point P. Similarly, B computes yB xBP. A sends yA to 10. S. Smale, Mathematical problems for the next century. Math.
B and vice versa. Then, A computes xAyBP, and the resulting Intelligencer 20(2): 715, 1998.
point Q (xAyB)P (xByA)P is the shared secret. 11. J. H. Silverman, The Arithmetic of Elliptic Curves, New York:
For computational reasons, it is advised to choose elliptic Springer, 1994.
curves over specific fields. For example, a standard called 12. National Bureau of Standards, Data Encryption Standard,
P192 uses GF(p), where p 2192 264 1 for efficient Federal Information Processing Standards Publication 46,
computation. Thus, xA, xB, yA, yB must all be less than p. January 1977.
13. W. Diffie and M. E. Hellman, New Directions in Cryptography,
Advanced Encryption Standard or Rijndael (AES) IEEE Trans. on Information Theory, IT-22, 1976, pp. 644654.
14. C. Pomerance, Analysis and comparison of some integer factor-
After it was generally accepted that a new U.S. standard ing algorithms, in H. W. Lenstra, Jr., and R. Tijdeman, (eds.),
was needed for symmetric key encryption, an international Computational Number Theory: Part 1, Math. Centre,
solicitation was made, with an extensive review process, for Tract 154, Math. Centre, The Netherlands: Amsterdam,
a new national standard. In late 2001, a system known as 1982, pp. 89139.
Rijndael, created by Vincent Rijmen and Joan Daemen, was 15. R. L. Rivest, A. Shamir, and L. Adelman, A Method for Obtain-
selected as the U.S. Advanced Encryption Standard, or ing Digital Signatures and Public-Key Cryptosystems, Comm.
AES (21). of the ACM, 1978, pp. 120126.
Although this method has some similarities to the DES, 16. R. Solovay and V. Strassen, A fast monte-carlo tests for prim-
it has been widely accepted, particularly since the ality, SIAM Journal on Computing, 6: 8485, 1977.
nonlinear S-boxes have, in contrast to the DES, a very 17. T. El Gamal, A public key cryptosystem and a signature scheme
understandable, although complex structure. The S-box based on discrete logarithms, Proc. of Crypto 84, New York:
in AES is a transformation derived from an operator in Springer, 1985, pp. 1018.
one of the so-called Galois fields GF(28). It is a well-known 18. H. Ong, C. P. Schnorr, and A. Shamir, An efficient signature
result of algebra that all finite fields have several elements scheme based on polynomial equations, Proc. of Crypto 84,
that is a prime power, that all finite fields with the same New York: Springer, 1985, pp. 3746.
number of elements are isomorphic, and that a finite field 19. National Institute of Standards and Technology, Digital Sig-
with pn elements can be represented as the quotient field of nature Standard, Federal Information Processing Standards
Publication 186, May 1994.
the ring of polynomials whose coefficients are mod p num-
bers, modulo an irreducible polynomial whose highest 20. N. Koblitz, Elliptic curve cryptosystems, Mathematics of Com-
putation 48: 203209, 1987.
power is n.
21. J. Daemen and V. Rijmen, The Design of Rijndael: AESThe
Advanced Encryption Standard, Berun, Germany: Springer-
BIBLIOGRAPHY Verlag, 2002.

1. A. Wiles, Modular elliptic-curves and Fermats Last Theorem.


Ann. Math.141, 443551, 1995. FURTHER READING
2. Y. Wang. (ed.), Goldbach conjecture, Series in Pure
Mathematics volume 4, Singapore: World Scientific, 1984, D. M. Burton, Elementary Number Theory, Boston: Allyn and
pp. xi 311. Bacon, 1980.
3. H. de Coste, La vie du R P Marin Mersenne, theologien, H. Cohen, A Second Course in Number Theory, New York: Wiley,
philosophe et mathematicien, de lOrdre der Peres Minim 1962.
(Paris, 1649). L. E. Dickson, A History of the Theory of Numbers, 3 vols., Washing-
4. O. Ore, Number Theory and Its History, New York: Dover ton, D.C.: Carnegie Institution, 191923.
Publications, 1976. G. H. Hardy and E. M. Wright, An Introduction to the Theory of
5. M. Abdelguerfi, A. Dunham, W. Patterson, MRA: A Computa- Numbers, 3rd ed., Oxford: Clarendon Press, 1954.
tional Technique for Security in High-Performance Systems, K. Ireland and M. Rosen, A Classical Introduction to Modern
Proc. of IFIP/Sec 93, International Federation of Information Number Theory, 2nd ed., New York: Springer-Verlag, 1990.
Processing Societies, World Symposium on Computer Security,
I. Niven and H. S. Zuckerman, An Introduction to the Theory of
Toronto, Canada, 1993, pp. 381397.
Numbers, 4th ed., New York: Wiley, 1980.
6. E. W. Weisstein. Quadratic Reciprocity Theorem. From Math-
W. Patterson, Mathematical Cryptology, Totowa, NJ: Rowman and
WorldA Wolfram Web Resource. http://mathworld.wolfram.-
Littlefield, 1987.
com/QuadraticReciprocityTheorem.html.
H. E. Rose, A Course in Number Theory, Oxford: Oxford University
7. Wikipedia, Proof of Bertrands postulate, http://www.
Press, 1988.
absoluteastronomy.com/encyclopedia/p/pr/proof_of_bertrands_
postulate.htm. H. N. Shapiro, Introduction to the Theory of Numbers, New York:
Wiley-Interscience, 1983.
8. A. Selberg An elementary proof of the prime number
theorem, Ann. Math., 50: 305313, 1949. MR 10,595b H. Stark, An Introduction to Number Theory, Chicago, IL:
[[HW79, sections 22.1516] gives a slightly simpler, but less Markham, 1970.
elementary version of Selbergs proof.]
9. J. Friedlander and H. Iwaniec, Using a parity-sensitive sieve to
WAYNE PATTERSON
count prime values of a polynomial, Proc. Nat. Acad. Sci., 94:
Howard University
10541058, 1997.
Washington, D.C.
C
CONVEX OPTIMIZATION in the computational complexity using approximate solu-
tions and rank-one updates were shown in the work of
MOTIVATION AND A BRIEF HISTORY Vaidya (7). The work of Ye (8) used a potential function
to obtain the same complexity as Renegars work without
An optimization problem can be stated in the so-called following the central path too closely.
standard form as follows:
DEFINITIONS OF CONVEXITY
minimize f x : Rn ! R
(1)
subject to gx  0; g : Rm ! Rn
Convex Sets
representing the minimization of a function f of n variables Definition. A set C 2 Rn is said to be a convex set if, for
under constraints specified by inequalities determined by every x1 , x2 2 C and every real number a; 0  a  1, the
functions g g1 ; g2 ; . . . ; gm T . The functions f and gi are, in point a x1 1  ax2 2 C.
general, nonlinear functions. Note that  inequalities can This definition can be interpreted geometrically as stat-
be handled under this paradigm by multiplying each side by ing that a set is convex if, given two points in the set, every
1 and equalities by representing them as a pair of inequal- point on the line segment joining the two points is also a
ities. The maximization of an objective function function f(x) member of the set. Examples of convex and nonconvex sets
can be achieved by minimizing f(x). The set F are shown in Fig. 1.
fxjgx  0g that satisfies the constraints on the nonlinear
optimization problem is known as the feasible set or the Elementary Convex Sets
feasible region. If F covers all of (a part of) Rn, then the Ellipsoids. An ellipsoid Ex; B; r 2 Rn centered at point
optimization is said to be unconstrained (constrained). x 2 Rn is given by the equation
The above standard form may not directly be applicable to
design problems where multiple conflicting objectives must fyjy  xT By  x  r2 g
be optimized. In such a case, multicriterion optimization
techniques and Pareto optimality can be used to identify non- If B is a scalar multiple of the unit matrix, then the
inferior solutions (1). In practice, however, techniques to ellipsoid is called a hypersphere. The axes of the ellipsoid
map the problem to the form in Equation (1) are often used. are given by the eigenvectors, and their lengths are related
When the objective function is a convex function and the to the corresponding eigenvalues of B.
constraint set is a convex set (both terms will be formally
defined later), the optimization problem is known as a Hyperplanes. A hyperplane in n dimensions is given by
convex programming problem. This problem has the the region
remarkable property of unimodality; i.e., any local mini-
mum of the problem is also a global minimum. Therefore, it cT x b; c 2 Rn ; b 2 R:
does not require special methods to extract the solution out
of local minima in a quest to find the global minimum. Half-Spaces. A half-space in n dimensions is defined by
Although the convex programming problem and its unim- the region that satisfies the inequality
odality property have been known for a long time, it is only
recently that efficient algorithms for solving of these pro- cT x  b; c 2 Rn ; b 2 R:
blems have been proposed. The genesis of these algorithms
can be traced back to the work of Karmarkar (2) that Polyhedra. A (convex) polyhedron is defined as an inter-
proposed a polynomial-time interior-point technique for section of half-spaces and is given by the equation
linear programming, a special case of convex programming.
Unlike the simplex method for linear programming, this P fxjAx  bg; A 2 Rmn ; b 2 Rm ;
technique was found to be naturally extensible from the
problem of linear programming to general convex program- corresponding to a set of m inequalities aTi x  bi ; ai 2 Rn . If
ming formulations. It was shown that this method belongs the polyhedron has a finite volume, it is referred to as a
to the class of interior penalty methods proposed by Fiacco polytope. An example of a polytope is shown in Fig. 2.
and McCormick (3) using barrier functions. The work of
Renegar (4) showed that a special version of the method of Some Elementary Properties of Convex Sets
centers for linear programming is polynomial. Gonzaga (5) Property. The intersection of convex sets is a convex set.
showed similar results with the barrier function associated The union of convex sets is not necessarily a convex set.
with a linear programming problem, with a proof of
polynomial-time complexity. Nesterov and Nemirovsky Property. (Separating hyperplane theorem) Given two
(6) introduced the concept of self-concordance, studying nonintersecting convex sets A and B, a separating hyper-
barrier methods in their context. Further improvements plane cT x b exists such that A lies entirely within the

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 CONVEX OPTIMIZATION

X1

X2

X1 A
X2
B
Convex set Nonconvex set

Figure 1. Convex and nonconvex sets.

Figure 3. A separating hyperplane (line) in two dimensions


half-space cT x  b and B lies entirely within the half-space between convex sets A and B.
cT x  b. This is pictorially illustrated in Fig. 3.
f is said to be strictly convex if the above inequality is
Property. (Supporting hyperplane theorem) Given a strict for 0 < a < 1.
convex set C and any point x on its boundary, a supporting Geometrically, a function is convex if the line joining two
hyerplane cT x b exists such that the convex set C lies points on its graph is always above the graph. Examples of
entirely within the half-space cT x  b. This is illustrated in convex and nonconvex functions on Rn are shown in Fig. 6.
Fig. 4.
Some Elementary Properties of Convex Functions
Definition. The convex hull of m points, x1 ; x2 . . . ; Property. A function f(x) is convex over the set S if and
xm 2 Rn , denoted co(x1 , x2 , . . ., xm ), is defined as the set of only if
points y 2 Rn such that
X X f x  f x0 r f x0 T x  x0 8 x; x0 2 S;
y ai xi ai  0 8 i ai 1:
i1 to m i1 to m where r f corresponds to the gradient of f with respect to
the vector x. Strict convexity corresponds to the case in
The convex hull is thus the smallest convex set that con- which the inequality is strict.
tains the m points. An example of the convex hull of five
points in the plane is shown by the shaded region in Fig. 5. Property. A function f(x) is convex over the convex set S if
If the set of points xi is of finite cardinality (i.e., m is finite), and only if
then the convex hull is a polytope. Hence, a polytope is also
often described as the convex hull of its vertices. r2 f x0  0 8 x0 2 S

Convex Functions i.e., its Hessian matrix is positive semidefinite over S. For
Definition. A function f defined on a convex set V is said strict convexity, r2 f x0 must be positive definite.
to be a convex function if, for every x1 , x2 2 V, and every
a; 0  a  1, Property. If f(x) and g(x) are two convex functions on
the convex set S, then the functions f g and max(f, g) are
fa x1 1  ax2  a fx1 1  a fx2 convex over S.

Definition. The level set of a function f(x) is the set


defined by f x  c where c is a constant.
y An example of the level sets of f x; y x2 y2 is shown
in Fig. 7. Observe that the level set for f x; y  c1 is
contained in the level set of f x; y  c2 for c1 < c2 .

Figure 2. An example convex polytope in two dimensions as an Figure 4. A supporting hyperplane (line) in two dimensions at
intersection of five half-spaces. the bounary point of a convex set S.
CONVEX OPTIMIZATION 3

x1 x3 y

x2

c=1 c=2 c=3


x
x4 x5

Figure 5. An example showing the convex hull of five points.

Property. If f is a convex function in the space S, then


the level set of f is a convex set in S. This is a very useful
property, and many convex optimization algorithms
depend on the fact that the constraints are defined by an
intersection of level sets of convex functions. Figure 7. Level sets of f x; y x2 y2 .

Definition. A function g defined on a convex set V is said


to be a concave function if the function f g is convex. Equation (2) may equivalently be written as fmin t :
The function g is strictly concave if g is strictly convex. f x  t; gx  0g.
For a fuller treatment on convexity properties, the Linear programming is a special case of nonlinear opti-
reader is referred to Ref. (9). mization and, more specifically, a special type of convex
programming problem where the objective and constraints
CONVEX OPTIMIZATION are all linear functions. The problem is stated as

Convex Programming mnimize cT x


subject to A x  b; x  0 (3)
Definition. A convex programming problem is an where A 2 Rmn ; b 2 Rm ; c 2 Rn ; x 2 Rn :
optimization problem that can be stated as follows:
The feasible region for a linear program corresponds to a
minimize f x polyhedron in Rn. It can be shown that an optimal solution
(2)
such that x 2 s to a linear program must necessarily occur at one of the
vertices of the constraining polyhedron. The most com-
where f is a convex function and S is a convex set. This monly used technique for solution of linear programs,
problem has the property that any local minimum of f over S the simplex method (11), is based on this principle and
is a global minimum. operates by a systematic search of the vertices of the poly-
hedron. The computational complexity of this method can
Comment. The problem of maximizing a convex function show an exponential behavior for pathological cases, but for
over a convex set does not have the above property. How- most practical problems, it has been observed to grow
ever, it can be shown (10) that the maximum value for such linearly with the number of variables and sublinearly
a problem lies on the boundary of the convex set. with the number of constraints. Algorithms with polyno-
For a convex programming problem of the type in mial time worst-case complexity do exist; these include
Equation (2), we may state without loss of generality that Karmarkars method (2), and the ShorKhachiyan ellipsoi-
the objective function is linear. To see this, note that dal method (12). The computational times of the latter,
however, are often seen to be impractical from a practical
standpoint.
f(x) g(x)
In the remainder of this section, we will describe various
methods used for convex programming and for mapping
problems to convex programs.

Path-Following Methods
This class of methods proceeds iteratively by solving a
sequence of unconstrained problems that lead to the solu-
x
x1 x2 x1 x2 tion of the original problem. In each iteration, a technique
Convex function Nonconvex function based on barrier methods is used to find the optimal solu-
tion. If we denote the optimal solution in the kth iteration as
Figure 6. Convex and nonconvex functions. xk , then the path x1 , x2 , . . . in Rn leads to the optimal
4 CONVEX OPTIMIZATION

solution, and hence, this class of techniques are known as from a point x to each hyperplane,Qas shown in Fig. 8(a). The
path-following methods. value of Fx is minimized when i1 to n bi  aT i x is max-
imized. Coarsely speaking, this occurs when the distance to
Barrier Methods. The barrier technique of Fiacco and each constraint hyperplane is sufficiently large.
McCormick (3) is a general technique to solve any con- As a cautionary note, we add that although the analytic
strained nonlinear optimization problem by solving a center is a good estimate of the center in the case where all
sequence of unconstrained nonlinear optimization pro- constraints present an equal contribution to the boundary,
blems. This method may be used for the specific case of the presence of redundant constraints can shift the analytic
minimizing a convex function over a convex set S described center. The effect on the analytic center of repeating the
by an intersection of convex inequalities constraint p five times is shown in Fig. 8(b).
We will now consider the convex programming problem
S fxjgi x  0; i 1; 2; . . . ; mg specified as

where each gi(x) is a convex function. The computation minimize fx


required of the method is dependent on the choice of the such that gi x  0; i 1; 2; . . . ; m
barrier function. In this connection, the logarithmic bar-
rier function (abbreviated as the log barrier function) for where each gi(x) is a convex function. The traditional
this set of inequalities is defined as barrier method (3) used to solve this problem would
formulate the corresponding unconstrained optimization
8 X n
< problem
 loggi x for x 2 S
Fx
: i1 minimize Ba a fx Fx
0 otherwise

Intuitively, the idea of the barrier is that any iterative and solve this problem for a sequence of increasing (con-
gradient-based method that tries to minimize the barrier stant) values of the parameter a. When a is zero, the
function will be forced to remain in the feasible region, due problem reduces to finding the center of the convex set
to the singularity at the boundary of the feasible region. It constraining the problem. As a increases, the twin objec-
can be shown that Fx is a convex function over S and its tives of minimizing f(x) and remaining in the interior of
value approaches 1. as x approaches the boundary of S. the convex set are balanced. As a approaches 1, the
Intuitively, it can be seen that Fx becomes smallest when problem amounts to the minimization of the original objec-
x is, in some sense, farthest away from all boundaries of S. tive function, f.
The value of x at which the function Fx is minimized is In solving this sequence of problems, the outer iteration
called the analytic center of S. consists of increasing the values of the parameter a. The
inner iteration is used to minimize the value of B(a) at that
Example. For a linear programming problem of the type value of a, using the result of the previous outer iteration as
described in Equation (3), with constraint inequalities an initial guess. The inner iteration can be solved using
described by aTi x  bi , the barrier function in the feasible Newtons method (10). For positive values of a, it is easy to
region is given by see that B(a) is a convex function. The notion of a central
path for a linearly constrained optimization problem is
X shown in Fig. 9.
Fx  logbi  aT
i x
i1 to n
Method of Centers. Given a scalar value t > f(x*), the
The value of (bi  aT represents the slack in the ith method of centers finds the analytic center of the set
i x)
inequality, i.e., the distance between the point x and the of inequalities f x  t and gi x  0 by minimizing the
corresponding constraint hyperplane. The log barrier func-
tion, therefore, is a measure of the product of the distances

Analytic center Analytic center


Figure 8. (a) Physical meaning of
the barrier function for the feasible p p
region of a linear program. (b) The
effect of redundant constraints on the
analytic center. (a) (b)
CONVEX OPTIMIZATION 5

optimum number of outer and inner (Newton) iterations is presented


in Refs. (6) and (13).

=10 Other Interior Point Methods


Affine Scaling Methods. For a linear programming pro-
blem, the nonnegativity constraints x  0 are replaced by
constraints of the type kX 1 x  xc k < b  1, representing
an ellipsoid centered at xc. The linear program is then
=0 relaxed to the following form whose feasible region is con-
(analytic center) tained in that of the original linear program:
=100
minfcT x : Ax b; kX 1 x  xc k < b  1g

Note that the linear inequalities in Equation (3) have been


converted to equalities by the addition of slack variables.
This form has the following closed-form solution:
Figure 9. Central path for a linearly constrained convex
optimization problem. XPAX Xc
xb x  b
kPAX Xck

function where PAX 1  XAT AX 2 AT 1 AX. The updated value


of x is used in the next iteration, and so on. The search
logt  f x Fx direction XPAXXc is called the primal affine scaling direc-
tion and corresponds to the scaled projected gradient with
where Fx is the log barrier function defined earlier. The respect to the objective function, with scaling matrix X.
optimal value x* associated with solving the optimization Depending on the value of b, the method may be a short-
problem associated with finding the analytic center for step or a long-step (with b > 1) method, and convergence
this barrier function is found and the value of t is updated proofs under various conditions are derived. For details of
to be a convex combination of t and f(x*) as the references, the reader is referred to Ref. (13).
For a general convex programming problem of the type
t ut 1  u f x*; u > 0 (note that the linear objective function form is used here),

fmin f y bT y : gi y  0g
The Self-Concordance Property and Step Length. The
value of u above is an adjustable parameter that would
The constraint set here is similarly replaced by the ellip-
affect the number of Newton iterations required to find the
soidal constraint (y  yc T Hy  yc  b2 , where yc is the
optimum value of the analytic center. Depending on the
center of the current ellipsoid, y is the variable over which
value of u chosen, the technique is classified as a short-step,
the minimization is being performed,
P and H is the Hessian
medium-step, or long-step (possibly with even u > 1)
of the log-barrier function  i1 to n loggi y. The pro-
method. For a short-step method, one Newton iteration
blem now reduces to
is enough, whereas for longer steps, further Newton itera-
tions may be necessary.
Nesterov and Nemirovsky (17) introduced the idea of the fmin bT y : y  yc T Hy  yc  b2 g
self-concordance condition, defined as follows.
which has a closed-form solution of the form
Definition. A convex function w : S ! R is self-
concordant with parameter a  0 (a-selfconcordant) on H 1 b
yb y  b p
S; if w is three times continuously differentiable on S and bT H 1 b
for all x 2 S and h 2 Rm , the following inequality holds:
This is used as the center of the ellipsoid in the next
3
jD wxh; h; hj  2 a 1=2 2
D wxh; h 3=2 iteration. The procedure continues iteratively until conver-
gence.
where Dk wxh1 ; h2 ; . . . hk  denotes the value of the kth
differential of w taken at x along the collection of directions Potential-Based Methods. These methods formulate a
h1 ; h2 ; . . . hk . potential function that provides a coarse estimate of how
By formulating logarithmic barrier functions that are far the solution at the current iterate is from the optimal
self-concordant, proofs of the polynomial-time complexity value. At each step of a potential reduction method, a
of various interior point methods have been shown. An direction and step size are prescribed; however, the poten-
analysis of the computational complexity in terms of the tial may be minimized further by the use of a line search
(large steps). This is in contrast with a path-following
6 CONVEX OPTIMIZATION

method that must maintain proximity to a prescribed constraint. If the point xc lies within the feasible region,
central path. An example of a potential-based technique then a hyperplane cT x  b exists that divides the polytope
is one that uses a weighted sum of the gap between the into two parts such that xopt is contained in one of them,
value of the primal optimization problem and its dual, and with c r f xT being the negative of the gradient of
of the log-barrier function value as the potential. For a more the objective function and b being defined as b cT xc once
detailed description of this and other potential-based meth- again. This hyperplane is the supporting hyperplane for the
ods, the reader is referred to Refs. (6) and (13). set f x  f xc and thus eliminates from the polytope a set
of points whose value is larger than the value at the current
Localization Approaches center. In either case, a new constraint cT x  b is added to
the current polytope to give a new polytope that has roughly
Polytope Reduction. This method begins with a polytope
half the original volume.
P 2 Rn that contains the optimal solution xopt. The polytope
P may, for example, be initially selected to be an n-dimen-
Step 3. Go to Step 1 and repeat the process until the
sional box described by the set
polytope is sufficiently small.
Note that the center in Step 1 is ideally the center of
fxjXmin  xi  Xmax g;
gravity of the current polytope because a hyperplane pas-
sing through the center of gravity is guaranteed to reduce
where xmin and xmax are the minimum and maximum
the volume of the polytope by a factor of (1  1=e) in each
values of each variable, respectively. In each iteration,
iteration. However, because finding the center of gravity is
the volume of the polytope is shrunk while keeping xopt
prohibitively expensive in terms of computation, the ana-
within the polytope, until the polytope becomes sufficiently
lytic center is an acceptable approximation.
small. The algorithm proceeds iteratively as follows.
Example. The algorithm is illustrated by using it to solve
Step 1. A center xc deep in the interior of the polytope P
the following problem in two dimensions:
is found.
minimize f x1 ; x2
Step 2. The feasibility of the center xc is determined by
such thatx1 ; x2 2 S
verifying whether all of the constraints of the optimization
problem are satisfied at xc. If the point xc is infeasible, it is
where S is a convex set and f is a convex function. The
possible to find a separating hyperplane passing through xc
shaded region in Fig. 10(a) is the set S, and the dotted lines
that divides P into two parts, such that the feasible region
show the level curves of f. The point xopt is the solution to
lies entirely in the part satisfying the constraint
this problem. The expected solution region is first bounded
by a rectangle with center xc, as shown in Fig. 10(a). The
cT x  b feasibility of xc is then determined; in this case, it can be
seen that xc is infeasible. Hence, the gradient of the con-
where c rg p xT is the negative of the gradient of a straint function is used to construct a hyperplane through
violated constraint, gp, and b cT xc . The separating hyper- xc such that the polytope is divided into two parts of roughly
plane above corresponds to the tangent plane to the violated equal volume, one of which contains the solution xc. This is

f decreasing

xc

xc
xopt xopt

(a) (b)

xc xc

xopt xopt

(d) (c)

Figure 10. Cutting plane approach.


CONVEX OPTIMIZATION 7

k Step 3. Repeat the iterations in Steps 1 and 2 until the


ellipsoid is sufficiently small.
f(xk)
RELATED TECHNIQUES

Quasiconvex Optimization
xk
Definition. A function f : S ! R, where S is a convex set,
is quasiconvex if every level set La fxj f x  ag is a
k+1 convex set. A function g is quasiconcave if g is quasi-
convex over S. A function is quasilinear if it is both
quasiconvex and quasiconcave.
Figure 11. The ellipsoidal method.
Examples. Clearly, any convex (concave) function is also
quasiconvex (quasiconcave).
illustrated in Fig. 10(b), where the region enclosed in Any monotone function f : R ! R is quasilinear.
darkened lines corresponds to the updated polytope. The The linear fractional function f x aT x b=
process is repeated on the new smaller polytope. Its center cT x d, where a; c; x 2 Rn , is quasilinear over the half-
lies inside the feasible region, and hence, the gradient of the space fxjcT x d > 0g.
objective function is used to generate a hyperplane that
further shrinks the size of the polytope, as shown in Fig. Other Characterizations of Quasiconvexity. A function f
10(c). The result of another iteration is illustrated in Fig. defined on a convex set V is quasiconvex if, for every x1,
10(d). The process continues until the polytope has been x2 2 V,
shrunk sufficiently.
1. For every a; 0  a  1; f a x1 1  ax2  max
Ellipsoidal Method. The ellipsoidal method begins with f x1 ; f x2 .
a sufficiently large ellipsoid that contains the solution to 2. If f is differentiable, f x1  f x2 ) x2  x1 T
the convex optimization problem. In each iteration, the size r f x1  0.
of the ellipsoid is shrunk, while maintaining the invariant
that the solution lies within the ellipsoid, until the ellipsoid Property. If f, g are quasiconvex over V, then the
becomes sufficiently small. The process is illustrated in functions af for a > 0, and max(f,g) are also quasiconvex
Fig. 11. over V. The composed function g(f(x)) is quasiconvex pro-
The kth iteration consists of the following steps, starting vided g is monotone increasing. In general, the function
from the fact that the center xk of the ellipsoid Ek is known. f g is not quasiconvex over V.
As in the case of convex optimization, the gradient of a
Step 1. In case the center is not in the feasible region, the quasiconvex objective can be used to eliminate a half-space
gradient of the violated constraint is evaluated; if it is from consideration. The work in Ref. (14) presents an
feasible, the gradient of the objective function is found. adaptation of the ellipsoidal method to solve quasiconvex
In either case, we will refer to the computed gradient as optimization problems.
rhxk .
Semidefinite Programming
Step 2. A new ellipsoid containing the half-ellipsoid
The problem of semidefinite programming (15) is stated as
given by
follows:

Ek \ fxjrhxk T x  rhxk T xk g
minimize cT x
subject to Fx  0 (4)
is computed. This new ellipsoid Ek1 and its center xk1 where Fx 2 Rmm ; c; x 2 Rn
are given by the following relations:
Here, Fx F0 F1 x1 . . . Fn Xn is an affine matrix
1
Xk1 Xk  A ~g function of x and the constraint Fx  0 represents the fact
n1 k k that this matrix function must be positive semidefinite, i.e.,
n2 2
Ak1 2 A  A ~g ~g T Ak zT Fxz  0 for all z 2 Rn . The constraint is referred to as a
n 1 k n1 k k k linear matrix inequality. The objective function is linear,
and hence convex, and the feasible region is convex because
where
if Fx  0 and Fy  0, then for all 0  l  1, it can be
readily seen that l Fx 1  lFy  0.
rhxk
~gk q
A linear program is a simple case of a semidefinite
rhxk T Ak rhxk program. To see this, we can rewrite the constraint set;
A x  b (note that the  here is a component-wise
inequality and is not related to positive semidefiniteness),
8 CONVEX OPTIMIZATION

as Fx diagA x  b; i.e., F0 diagb; Fj diag forms are useful because in the case of an optimization
aj ; j 1; . . . ; n, where A a1 a2 . . . an  2 Rmn . problem where the objective function and the constraints
Semidefinite programs may also be used to represent are posynomial, the problem can easily be mapped onto a
nonlinear optimization problems. As an example, consider convex programming problem.
the problem For some geometric programming problems, simple
techniques based on the use of the arithmetic-geometric
cT x2 inequality may be used to obtain simple closed-form solu-
minimize tions to the optimization problems (17). The arithmetic
dT x
subject to Ax b  0 geometric inequality states that if u1, u2 ; . . . ; un > 0, then
the arithmetic mean is no smaller than the geometric
where we assume that dT x > 0 in the feasible region. Note mean; i.e.,
that the constraints here represent, as in the case of a linear
program, component-wise inequalities. The problem is first u1 u2 . . . un =n  u1 u2 . . . un 1=n ;
rewritten as minimizing an auxiliary variable t subject to
the original set of constraints and a new constraint with equality occurring if and only if u1 u2 . . . un .
A simple illustration of this technique is in minimizing
cT x2 the outer surface area of an open box of fixed volume (say,
t four units) and sides of length x1, x2, x3. The problem can be
dT x
stated as
The problem may be cast in the form of a semidefinite
program as minimize x1 x2 2 x1 x3 2 x1 x3
subject to x1 x2 x3 4
minimize t
2 3 By setting u1 x1 ; x2 ; u2 2 x1 x3 ; u3 2 x1 x3 ; and applying
diagAx b 0 0
subject to4 0 t c x 50
T the condition listed above, the minimum value of the objec-
0 cT x dT x tive function is 3u1 u2 u3 1=3 34 x21 x22 x23 12. It is
easily verified that this corresponds to the values
The first constraint row appears in a manner similar to the x1 2; x2 2, and x3 1. We add a cautionary note that
linear programming case. The second and third rows use some, but not all, posynomial programming problems may
Schur complements to represent the nonlinear convex be solved using this simple solution technique. For further
constraint above as the 2  2 matrix inequality details, the reader is referred to Ref. (17).
An extension of posynomials is the idea of generalized
  posynomials (18), which are defined recursively as follows:
t cT x
0 A generalized posynomial of order 0, G0(x), is simply a
cT x dT x
posynomial, defined earlier; i.e.,
The two tricks shown here, namely, the reformulation of X Y ai; j
linear inequations and the use of Schur complements, are G0 x gj xi
often used to formulate optimization problems as semide- j i1 to n

finite programs.
A generalized posynomial of order k > 1 is defined as
Geometric Programming X Y
Gk x lj Gk1;i xai; j
Definition. A posynomial is a function h of a positive
j i1 to n
variable x 2 Rm that has the form
X Y where Gk1;i x is a generalized posynomial of order less
ai; j
hx gj xi than or equal to k  1, each exponent ai; j 2 R, and the
j i1 to n coefficients g j > 0; g j 2 R.
Like posynomials, generalized posynomials can be
where the exponents ai; j 2 R and the coefficients transformed to convex functions under the transform
g j > 0; g j 2 R. xi ezi , but with the additional restriction that
For example, p the pfunction
f x; y; z 7:4 x ai; j  0 for each i, j. For a generalized posynomial of
2:6 y3:18 z4:2 3 y2 y1:4 z 5 is a posynomial in the vari- order 1, observe that the term in the innermost bracket,
ables x, y, and z. Roughly speaking, a posynomial is a G0,i(x), represents a posynomial function. Therefore, a
function that is similar to a polynomial, except that the generalized posynomial of order 1 is similar to a posyno-
coefficients g j must be positive, and an exponent ai; j mial, except that the place of the x(i) variables is taken by
could be any real number and not necessarily a positive posynomial. In general, a generalized posynomial of order
integer, unlike a polynomial. k is similar to a posynomial, but x(i) in the posynomial
A posynomial has the useful property that it can be equation is replaced by a generalized posynomial of a lower
mapped onto a convex function through an elementary order.
variable transformation, xi ezi (16). Such functional
CONVEX OPTIMIZATION 9

Optimization Involving Logarithmic Concave Functions cx; xc : Rn ! 0; 1, with a mean corresponding to the
nominal value of the design parameters. The yield of the
A function f is a logarithmic concave (log-concave) function
manufacturing process Y as a function of the mean xc is
if log(f) is a concave function. Logconvex functions are
given by
similarly defined. The maximization of a log-concave func-
tion over a convex set is therefore a unimodal problem; i.e., Z
any local minimum is a global minimum. Log-concave Yxc cx; xc dx
functional forms are seen among some common probability F

distributions on Rn, for example:


where F corresponds to the feasible region where all design
(a) The Gaussian or normal distribution constraints are satisfied.
A common assumption made by geometrical design
1 T 1 centering algorithms for integrated circuit applications is
e0:5xxc S xxc
f x p that F is a convex bounded body. Techniques for approx-
2pn detS
imating this body by a polytope P have been presented in
Ref. (20). When the probability density functions that
where S  0.
represent variations in the design parameters are Gaus-
(b) The exponential distribution sian in nature, the design centering problem can be posed
! as a convex programming problem. The design centering
Y problem is formulated as (21)
f x li el1x1l2x2...lnxn
i1 to n Z
maximize Yxc cx; xc dx
P
The following properties are true of log-concave func-
tions: where P is the polytope approximation to the feasible region
R . As the integral of a logconcave function over a convex
1. If f and g are log-concave, then their product f.g is log- region is also a log-concave function (22), the yield function
concave. Y(x) is log-concave, and the above problem reduces to a
R problem of maximizing a log-concave function over a convex
2. If f(x) is log-concave, then the integral S f xdx is log-
set. Hence, this can be transformed into a convex program-
concave provided S is a convex set.
ming problem.
R f(x) and g(x) are log-concave, then the convolution
3. If
S f x  ygydy is log-concave if S is a convex set VLSI Transistor and Wire Sizing
(this follows from Steps 1 amd 2).
Convex Optimization Formulation. Circuit delays in inte-
grated circuits often have to be reduced to obtain faster
Convex Optimization Problems in Computer Science and response times. Given the circuit topology, the delay of a
Engineering combinational circuit can be controlled by varying the sizes
of transistors, giving rise to an optimization problem of
There has been an enormous amount of recent interest in finding the appropriate area-delay tradeoff. The formal
applying convex optimization to engineering problems, statement of the problem is as follows:
particularly as the optimizers have grown more efficient.
The reader is referred to Boyd and Vandenberghes lecture minimize Area
notes (19) for a treatment of this subject. In this section, we (5)
subject to Delay  Tspec
present a sampling of computer science and computer
engineering problems that can be posed as convex pro-
The circuit area is estimated as the sum of transistor sizes;
grams to illustrate the power of the technique in practice.
i.e.,
Design Centering X
Area xi
While manufacturing any system, it is inevitable that i1 to n
process variations will cause design parameters, such as
component values, to waver from their nominal values. As a where xi is the size of the ith transistor and n is the number
result, after manufacture, the system may no longer meet of transistors in the circuit. This is easily seen to be a
some behavioral specifications, such as requirements on posynomial function of the xis. The circuit delay is esti-
the delay, gain, and bandwidth, which it has been designed mated using the Elmore delay estimate (23), which calcu-
to satisfy. The procedure of design centering attempts to lates the delay as maximum of path delays. Each path delay
select the nominal values of design parameters to ensure is a sum of resistance-capacitance products. Each resis-
that the behavior of the system remains within specifica- tance term is of the form a/xi, and each capacitance term is
tions, with the greatest probability and thus maximize the of the type Sbi xi , with the constants a and bi being positive.
manufacturing yield. As a result, the delays are posynomial functions of the xis,
The random variations in the values of the design para- and the feasible region for the optimization problem is an
meters are modeled by a probability density function,
10 CONVEX OPTIMIZATION

intersection of constraints of the form This is a convex optimization problem (6) in the variables B
and d, with a total dimension of nn 1=2 variables cor-
posynomial function in xi s  tspec responding to the entries in B and n variables correspond-
ing to those in d.
As the objective and constraints are both posynomial
functions in the xis, the problem is equivalent to a convex
CONCLUSION
programming problem. Various solutions to the problem
have been proposed, for instance, in Refs. (24) and (25).
This overview has presented an outline of convex program-
Alternative techniques that use curve-fitted delay models
ming. The use of specialized techniques that exploit the
have been used to set up a generalized posynomial formu-
convexity properties of the problem have led to rapid recent
lation for the problem in Ref. (21).
advances in efficient solution techniques for convex pro-
grams, which have been outlined here. The applications of
Semidefinite Programming Formulation. In Equation (5),
convex optimization to real problems to engineering design
the circuit delay may alternatively be determined from the
have been illustrated.
dominant eigenvalue of a matrix G1 C, where G and C are,
respectively, matrices representing the conductances (cor-
responding to the resistances) and the capacitances BIBLIOGRAPHY
referred to above. The entries in both G and C are affine
functions of the xis. The dominant time constant can be 1. W. Stadler, Multicriteria Optimization in Engineering and in
calculated as the negative inverse of the largest zero of the the Sciences, New York: Plenum Press, 1988.
polynomial dets C G. It is also possible to calculate it 2. N. Karmarkar, A new polynomial-time algorithm for linear
using the following linear matrix inequality: programming, Combinatorica, 4: 373395, 1984.
3. A. V. Fiacco and G. P. McCormick, Nonlinear Programming,
Tdom minfTjTG  C  0g New York: Wiley, 1968.
4. J. Renegar, A Polynomial Time Algorithm, based on Newtons
Note that the  0 here refers to the fact that the matrix method, for linear programming, Math. Programming, 40:
5993, 1988.
must be positive definite. To ensure that Tdom  Tmax for a
specified value of Tmax, the linear matrix inequality Tmax 5. C. C. Gonzaga, An algorithm for solving linear programming
problems in O(nL) operations, in N. Meggido, (ed.), Progress in
Gx  Cx  0 must be satisfied. This sets up the problem
Mathematical Programming: Interior Point and Related Meth-
in the form of a semidefinite program as follows (26):
ods,, New York: Springer-Verlag, 1988, PP. 128,.
6. Y. Nesterov and A. Nemirovskii, Interior-Point Polynomial
X
n
minimize li xi Algorithms in Convex Programming, SIAM Studies in Applied
i1 Mathematics series, Philadelphia, PA: Society for Industrial
subject to Tmax Gx  Cx  0 and Applied Mathematics, 1994.
xmin  x  xmax 7. P. M. Vaidya, An algorithm for linear programming which
requires Om nn2 m n1:5 nL arithmetic operations,
Math. Programming, 47: 175201, 1990.
Largest Inscribed Ellipsoid in a Polytope 8. Y. Ye, An O(n3L) potential reduction algorithm for linear
programming, Math. Programming, 50: 239258, 1991.
Consider a polytope in Rn given by P fxjaTi x  bi ; i
9. R. T. Rockafellar, Convex Analysis, Princeton, NJ:Princeton
1; 2; . . . ; Lg into which the largest ellipsoid E, described University Press, 1970.
as follows, is to be inscribed:
10. D. G. Luenberger, Linear and Nonlinear Programming, Read-
ing, MA: Addison-Wesley, 1984.
E fB y djkyk  1g; B BT > 0 11. P. E. Gill, W. Murray and M. H. Wright, Numerical Linear
Algebra and Optimization, Reading, MA: Addison-Wesley,
The center of this ellipsoid is d, and its volume is propor- 1991.
tional to det(B). The objective here is to find the entries in 12. A. J. Schrijver, Theory of Linear and Integer Programming,
the matrix B and the vector d. To ensure that the ellipsoid is New York: Wiley, 1986.
contained within the polytope, it must be ensured that for 13. D. den Hertog, Interior Point Approach to Linear, Quadratic
all y such that kyk  1, and Convex Programming, Boston, MA: Kluwer Academic
Publishers, 1994.
aT
i By d  bi
14. J. A. dos Santos Gromicho, Quasiconvex Optimization and
Location Theory, Amsterdam, The Netherlands:Thesis Pub-
Therefore, it must be true that supkyk1 aT T lishers, 1995.
i B y ai d  bi ,
T
or in other words, kB ai k  bi  ai d. The optimization pro- 15. L. Vandenberghe and S. Boyd, Semidefinite programming,
blem may now be set up as SIAM Rev., 38 (1): 4995, 1996.
16. J. G. Ecker, Geometric programming: methods, computations
maximize log det B and applications, SIAM Rev., 22 (3): 338362, 1980.
subject to B BT > 0 17. R. J. Duffin and E. L. Peterson, Geometric Programming:
kB ai k  bi  ai d; i 1; 2; . . . ; L Theory and Application, New York: Wiley, 1967.
CONVEX OPTIMIZATION 11

18. K. Kasamsetty, M. Ketkar, and S. S. Sapatnekar, A new class of 23. S. S. Sapatnekar and S. M. Kang, Design Automation for
convex functions for delay modeling and their application to the Timing-driven Layout Synthesis, Boston, MA:Kluwer Aca-
transistor sizing problem, IEEE Trans. on Comput.-Aided demic Publishers, 1993.
Design, 19 (7): 779778, 2000. 24. J. Fishburn and A. E. Dunlop, TILOS: a posynomial program-
19. S. Boyd and L. Vandenberghe, Introduction to Convex Optimi- ming approach to transistor sizing, Proc. IEEE Int. Conf.
zation with Engineering Applications, Lecture notes, Electrical Comput.-Aided Des., 1985, PP. 326328.
Engineering Department, Stanford University, CA, 1995. 25. S. S. Sapatnekar, V. B. Rao, P. M. Vaidya and S. M. Kang, An
Available http://www-isl.stanford.edu/~boyd. exact solution to the transistor sizing problem using convex
20. S. W. Director and G. D. Hachtel, The simplicial approxima- optimization, IEEE Trans. Comput.-Aided Des. Integr. Cir-
tion approach to design centering, IEEE Trans. Circuits Syst., cuits Syst., 12 (11): 16211632, 1993.
CAS-24 (7): 363372, 1977. 26. L. Vandenberghe, S. Boyd and A. El Gamal, Optimal wire and
21. S. S. Sapatnekar, P. M. Vaidya and S. M. Kang, Convexity- transistor sizing for circuits with non-tree topology, Proc. IEEE
based algorithms for design centering, IEEE Trans. Comput.- Int. Conf. Comput.-Aided Des., 1997, PP. 252259.
Aided Des. Integr. Circuits Syst., 13 (12): 15361549, 1994.
22. A. Prekopa, Logarithmic concave measures and other topics,
in M. Dempster, (ed.), Stochastic Programming, London, SACHIN S. SAPATNEKAR
England: Academic Press, 1980, PP. 6382. University of Minnesota
Minneapolis, Minnesota
F
FRACTALS in what happens when we iterate this polynomial starting
at x 0. It turns out that one of two things happens,
Even though no consensus exists on a mathematical defini- depending on c. Either Qnc 0 ! 1 or it stays bounded for
tion of what constitutes a fractal, it is usually clear what all time. That is, either the iterates get larger and larger,
one means by a fractal. A fractal object has strong sca- eventually approaching infinitely large, or they stay
ling behavior. That is, some relation exists between the bounded and never get larger than a certain number.
behavior at one scale and at (some) finer scales. The Mandelbrot Set is defined as
Benoit Mandelbrot suggested defining a fractal as an
object that has a fractional dimension (see the section on M fc : Qnc 0 1g
Fractal Dimension). This definition captures the idea that a
fractal has complex behavior at all size scales. that is, it is those c in the complex plane for which the
Figure 1 illustrates some geometric fractals (that is, the iteration does not tend to infinity. Most images of the
behavior is geometrical). The first two images are exactly Mandelbrot Set are brilliantly colored. This coloration is
self-similar fractals. Both of them consist of unions of really just an artifact, but it indicates how fast those points
shrunken copies of themselves. In the first fractal (the that are not in the Mandelbrot Set tend to infinity. The
one that looks like a complicated plus sign), five copies of Mandelbrot Set itself is usually colored black. In our gray-
the large figure combine together, and in the second fractal level images of the Mandelbrot Set (Fig. 2), the Mandelbrot
(the twindragon tile), it only requires two copies. The third Set is in black.
fractal in the figure is not exactly self-similar. It is made up
of two distorted copies of the whole. The fourth fractal is an
FRACTAL DIMENSION
image of a Romanesco Broccoli, which is an amazingly
beautiful vegetable! The fractal structure of this plant is
Several parameters can be associated with a fractal object.
evident, but it is clearly not an exact fractal.
Of these parameters, fractal dimension (of which there are
In Fig. 2, the well-known Mandelbrot Set is explored by
several variants) is one of the most widely used. Roughly
successively magnifying a small portion from one frame
speaking, this dimension measures the scaling behavior
into the next frame. The first three images in the series
of the object by comparing it to a power law.
indicate the region that has been magnified for the next
An example will make it more clear. Clearly the line
image. These images illustrate the fact that the Mandelbrot
segment L [0,1] has dimension equal to one. One way to
Set has infinitely fine details that look similar (but not
think about this is that, if we scale L by a factor of s, the
exactly the same) at all scales.
size of L changes by a factor of s1. That is, if we reduce it by
One amazing feature of many fractal objects is that the
a factor of 1/2, the new copy of L has 1/2 the length of the
process by which they are defined is not overly complicated.
original L.
The fact that these seemingly complex systems can arise
Similarly the square S [0,1]  [0,1] has dimension
from simple rules is one reason that fractal and chaotic
equal to two because, if we scale it by a factor of s, the size
models have been used in many areas of science. These
(in this case area) scales by a factor of s2. How do we know
models provide the possibility to describe complex interac-
that the size scales by a factor of s2? If s 1/3, say, then we
tions among many simple agents. Fractal models cannot
see that we can tile S by exactly 9 32 reduced copies of S,
efficiently describe all complex systems, but they are
which means that each copy has size (1/3)2 times the size
incredibly useful in describing some of these systems.
of the original.
For a fractal example, we first discuss a simple method
THE MANDELBROT SET for constructing geometric fractals using an initiator and
a generator. The idea is that we start with the initiator
The Mandelbrot Set (illustrated in the first frame of Fig. 2), and replace each part of it with the generator at each
named after Benoit Mandelbrot (who coined the term frac- iteration. We see this in Figs. 3 and 4. Figure 3 illustrates
tal and introduced fractals as a subject), is one of the most the initiator and generator for the von Koch curve, and Fig.
famous of all fractal objects. The Mandelbrot Set is defi- 4 illustrates the iterative stages in the construction, where
nitely not an exactly self-similar fractal. Zooming in on the at each stage we replace each line segment with the gen-
set continues to reveal details at every scale, but this detail erator. The limiting object is called the von Koch curve.
is never exactly the same as at previous scales. It is con- In this case, the von Koch curve K is covered by four
formally distorted, so it has many features that are the smaller copies of itself, each copy having been reduced in
same, but not exactly the same. size by a factor of three. Thus, for s 1/3, we need four
Although the definition of the Mandelbrot Set might reduced copies to tile K. This gives
seem complicated, it is (in some sense) much less compli-
cated than the Mandelbrot Set itself. Consider the size of original copy 4  size of smaller copy
polynomial with complex coefficients Qc(x) x2 c, where
c a bi is some (fixed) complex number. We are interested 4  1=3D size of orginal copy

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 FRACTALS

Figure 4. Construction of the von Koch curve.

limited aggregation (DLA) fractal shown later in Fig. 16


is a fractal, but it is not strictly self-similar.
One very common way to estimate the dimension of such
an object is the box counting method. To do this, cover the
Figure 1. Some fractal shapes. image with a square grid (of side length e) and count how
many of these boxes are occupied by a point in the image.
Let N(e) be this number. Now repeat this for a sequence of
finer and finer grids (letting e tend to 0). We want to fit the
relation N(e) aeD, so we take logarithms of both sides to get
log(N) log(a) D log(e). To estimate D, we plot log(N(e))
versus log(e) and find the slope of the least-squares
line.
For the object in Fig. 16, we have the data in Table 1,
which gives a fractal dimension of 1.60.

Table 1.
e N(e)
1/2 4
1/4 16
Figure 2. Zooming into the Mandelbrot Set. 1/8 52
24 174
25 580
so 4(1/3)D 1 or D log(3)/log(2). That is, for the von Koch 26 1893
curve, if we shrink it by a factor of 1/3, then the size gets 27 6037
reduced by a factor of 1=3log4=log3 1=4. In this sense, 28 17556
29 44399
the von Koch curve has dimension log4=log3  1:2619, so
210 95432
it has a dimension that is fractional and is a fractal.
This way of computing a fractal dimension is very intui-
tive, but it only works for sets that are exactly self-similar
It is interesting to apply this method to exactly self-
(and thus is called the similarity dimension). We need a
similar objects, such as the von Koch curve. For this curve,
different method/definition for the fractal dimension of
it is convenient to use boxes of size e 3n and to align them
objects that are not exactly self-similar. The diffusion-
so that they form a nice covering of the von Koch curve (that
is, we do not necessarily have to have the boxes form a grid).
Assume that the initial lengths of the line segments in the
generator for the von Koch curve are all equal to 1/3. In this
case, it is easy to see that we require 4n boxes of side length
1/3n to cover the curve, so we solve

4n a1=3n D ) a 1; D log4=log3

Figure 3. The initiator and generator for the von Koch curve.
as before.
FRACTALS 3

IFS FRACTALS

The Iterated Function Systems (IFS, for short) are a math-


ematical way of formalizing the notion of self-similarity. An
IFS is simply a collection of functions from some space to
itself, wi: X ! X. Usually it is required that these functions
are contractive, in that the distance between the images of
any two points is strictly less than the distance between the
original points. Mathematically, w is a contraction if there is
some number s with 0  s < 1 and dwx; wy  sdx; y
for any x and y, where dx; y somehow measures the
distance between the points x and y. In this case, it is
well known (by the Banach Contraction Theorem) that there
is a unique fixed point x with wx x.
Given an IFS fwi g, the attractor of the IFS is the unique Figure 6. The Sierpinski Gasket.
set A (A should be nonempty and compact, to be technically
precise), which satisfies the self-tiling (or fixed point) We think of these maps as acting on the unit square, that
condition is, all points (x, y) with 0  x  1 and 0  y  1. In this case,
the action of each map is rather simple and is illustrated in
A w1 A [ w2 A [    [ wn A Fig. 5. For instance, map w2 takes whatever is in the square,
shrinks it by a factor of two in each direction, and then places
so that A is made up of smaller copies of itself (smaller by it in the lower right-hand corner of the square.
the individual wi, that is). Under some general conditions The attractor of this 3-map IFS is the Sierpinski Gasket,
this attractor always exists and is uniquely specified by the which is illustrated in Fig. 6. The self-tiling property is
functions wi in the IFS. Furthermore, one can recover the clear, because the Sierpinski Gasket is made up of three
attractor A by starting with any set B and iterating the IFS. smaller copies of itself. That is, S w1 S [ w2 S [ w3 S.
The iteration proceeds by first generating the n distorted Now, one amazing thing about IFS is that iterating the
and smaller copies of B (distorted and shrunk by the IFS on any initial set will yield the same attractor in the
individual wis) and combining them to get a new set B1 limit. We illustrate this in Fig. 7 with two different starting
images. The attractor of the IFS is completely encoded by the
B1 w1 B [ w2 B [    [ wn B IFS maps themselves; no additional information is required.

Repeating this, we get a sequence of sets B2 ; B3 ; . . . ; Bn ; . . . ;


which will converge to the attractor A.
To illustrate, take the three contractions w1, w2, w3
given by

w1 x; y x=2; y=2; w2 x; y x=2 1=2; y=2;


w3 x; y x=2; y=2 1=2

Each of these three maps shrinks all distances by a factor of


two (because we are reducing in both the horizontal and the
vertical direction by a factor of 2). These maps are examples
of similarities, because they preserve all angles and lines
but only reduce lengths; geometric relationships within an
object are (mostly) preserved.

w3

w1 w2

Figure 5. Action of the three maps. Figure 7. Two different deterministic iterations.
4 FRACTALS

Fractal Functions
Geometric fractals are interesting and useful in many
applications as models of physical objects, but many times
one needs a functional model. It is easy to extend the IFS
framework to construct fractal functions.
There are several different IFS frameworks for con-
structing fractal functions, but all of them have a common
core, so we concentrate on this core. We illustrate the ideas
by constructing fractal functions on the unit interval; that
is, we construct functions f : 0; 1 ! R. Take the three
mappings w1 x x/4, w2 x x/2 1/4; and w3 x x/4
Figure 8. Collage for maple leaf and attractor of the IFS.
3/4 and notice that 0; 1 w1 0; 1 [ w2 0; 1 [ w3 0; 1, so
that the images of [0, 1] under the wis tile [0, 1].
Choose three numbers a1, a2 a3 and three other numbers
b1, b2, b3 and define the operator T by
The Collage Theorem
Given an IFS it is easy to compute the attractor of the IFS by T f x ai f w1
i x bi if x 2 wi 0; 1
iteration. The inverse problem is more interesting, how-
ever. Given a geometric object, how does one come up with where f : 0; 1 ! R is a function. Then clearly Tf :
an IFS whose attractor is close to the given object? 0; 1 ! R is also a function, so T takes functions to functions.
The Collage Theorem provides one answer to this ques- There are various conditions under which T is a con-
tion. This theorem is a simple inequality but has strong traction. For instance, if jai j < 1 for each i, then T is
practical applications. contractive in the supremum norm given by

Collage Theorem. Suppose that T is a contraction with k f ksup sup j f xj


contraction factor s < 1 and A is the attractor of T (so that x0; 1
T(A) A). Then for any B we have
so Tn f converges uniformly to a unique fixed point f for
dTB; B any starting function f.
dA; B 
1s Figure 10 illustrates the limiting fractal functions in the
case where a1 a2 a3 0:3 and b1 b2 b3 1.
What does this mean? In practical terms, it says that, if we
It is also possible to formulate contractivity conditions in
want to find an IFS whose attractor is close to a given set B,
other norms, such as the Lp norms. These tend to have
then what we do is look for an IFS that does not move the
weaker conditions, so apply in more situations. However,
set B very much. Consider the maple leaf in Fig. 8. We see
the type of convergence is clearly different (the functions
that we can collage the leaf with four transformed copies
need not converge pointwise anywhere, for instance, and
of itself. Thus, the IFS that is represented by these four
may be unbounded).
transformations should have an attractor that is close to
The same type of construction can be applied for func-
the maple leaf. The second image in Fig. 8 is the attractor
tions of two variables. In this case, we can think of such
of the given IFS, and it is clearly very similar to a maple
functions as grayscale images on a screen. For example,
leaf.
As another example, it is easy to find the collage to
generate the attractor in Fig. 9. It requires 11 maps in
the IFS.
However, the real power of the Collage Theorem comes
in when one wants to find an IFS for more complicated self-
affine fractals or for fractal objects that are not self-similar.
One such application comes when using IFS for image
representation (see the section on Fractals and Image
Compression).

Figure 9. An easy collage to find. Figure 10. The attractor of an IFS on functions.
FRACTALS 5

Figure 12. The fern leaf.

Figure 11. The attractor of an IFS on functions f : R2 ! R.

Of course, this fern leaf is an exact fractal and most


using the four geometric mappings images are not. The idea is to try to find approximate self-
  similarities, because it is unlikely there will be many exact
x y x1 y self-similarities in a generic image. Furthermore, it is also
w1 x; y ; ; w2 x; y ; ;
2 2 2 2 highly unlikely that there will be small parts of the image
    that look like reduced copies of the entire image. Thus, the
x y1 x1 y1
w3 x; y ; ; w4 x; y ; idea is to look for small parts of the image that are similar
2 2 2 2
to large parts of the same image. There are many different
and the a and b values given by ways to do this, so we describe the most basic here.
Given an image, we form two partitions of the image.
First, we partition the image into large blocks, we will call
a 0.5 0.5 0.4 0.5
these the parent blocks. Then we partition the image into
b 80 40 132 0
small blocks; here we take them to be one half the size of
the large blocks. Call these blocks child blocks. Figure 13
we get the attractor function in Fig. 11. The value 255 illustrates this situation. The blocks in this figure are made
represents white and 0 represents black. large enough to be clearly observed and are much too large
to be useful in an actual fractal compression algorithm.
Given these two block partitions of the image, the fractal
FRACTALS AND IMAGE COMPRESSION block encoding algorithm works by scanning through all
the small blocks and, for each such small block, searching
The idea of using IFS for compressing images occurred to among the large blocks for the best match. The likelihood of
Barnsley and his co-workers at the Georgia Institute of finding a good match for all of the small blocks is not very
Technology in the mid-1980s. It seems that the idea arose high. To compensate, we are allowed to modify the large
from the amazing ability of IFS to encode rather compli- block. Inspired by the idea of an IFS on functions, the
cated images with just a few parameters. As an example, algorithm is:
the fern leaf in Fig. 12 is defined by four affine maps, so it is
encoded by 24 parameters. 1. for SB in small blocks do
2. for LB in large blocks do

Figure 13. The basic block decomposition.


6 FRACTALS

Figure 14. Reconstruction: 1, 2, 3, 4, and 10


iterations and the original image.

3. Downsample LB to the same size as SB (so the steps from one scale to the next are random) or it
4. Use leastsquares to find the best parameters a and b exhibits similar statistics from one scale to another. In fact,
for this combination of LB and SB. That is, to make most naturally occurring fractals are of this statistical type.
SB  aLB b. The object in Fig. 15 is an example of this type of fractal.
5. Compute error for these parameters. If error is smal- It was created by taking random steps from one scale to the
ler than for any other LB, remember this pair along next. In this case, it is a subset of an exactly self-similar
with the a and b. fractal.
These types of fractals are well modeled by random IFS
6. end for
models, where there is some randomness in the choice of the
7. end for maps at each stage.

At the end of this procedure, for each small block, we


have found an optimally matching large block along with MORE GENERAL TYPES OF FRACTALS
the a and b parameters for the match. This list of triples
(large block, a, b) forms the encoding of the image. It is IFS-type models are useful as approximations for self-
remarkable that this simple algorithm works! Figure 14 similar or almost self-similar objects. However, often
illustrates the first, second, third, fourth, and tenth itera- these models are too hard to fit to a given situation. For
tions of the reconstruction. One can see that the first stage these cases we have a choicewe can either build some
of the reconstruction is basically a downsampling of the other type of model governing the growth of the object OR
original image to the small block partition. The scheme we can give up on finding a model of the interscale behavior
essentially uses the b parameters to store this coarse ver- and just measure aspects of this behavior.
sion of the image and then uses the a parameters along with An example of the first instance is a simple model for
the choice of which parent block matched a given child block DLA, which is illustrated in Fig. 16. In this growth model,
to extrapolate the fine detail in the image from this coarse we start with a seed and successively allow particles to drift
version.

STATISTICALLY SELF-SIMILAR FRACTALS

Many times a fractal object is not self-similar in the IFS


sense, but it is self-similar in a statistical sense. That is,
either it is created by some random self-scaling process

Figure 15. A statistically self-similar fractal. Figure 16. A DLA fractal.


FRACTALS 7

process, which causes many problems with traditional


methods of signal synthesis, signal estimation, and para-
meter estimation. However, wavelet-based methods work
rather well, as the scaling and finite time behavior of
wavelets matches the scaling and nonstationarity of the
fBm. With an appropriately chosen (i.e., sufficiently smooth)
wavelet, the wavelet coefficients of an fBm become a sta-
tionary sequence without the long range dependence prop-
erties. This aids in the estimation of the Hurst parameter H.
Several generalizations of fBm have been defined,
including a multifractal Brownian motion (mBm). This
particular generalization allows the Hurst parameter to
be a changing function of time H(t) in a continuous way.
Since the sample paths of fBm have Holder continuity H
(almost surely), this is particularly interesting for modeling
Figure 17. The Lorentz attractor. situations where one expects the smoothness of the sample
paths to vary over time.
around until they stick to the developing object. Clearly
the resulting figure is fractal, but our model has no explicit
FRACTALS AND WAVELETS
interscale dependence. However, these models allow one to
do simulation experiments to fit data observed in the
We briefly mention the connection between fractals and
laboratory. They also allow one to measure more global
wavelets. Wavelet analysis has become a very useful part of
aspects of the model (like the fractal dimension).
any data analysts toolkit. In many ways, wavelet analysis
Fractal objects also frequently arise as so-called strange
is a supplement (and, sometimes, replacement) for Fourier
attractors in chaotic dynamical systems. One particularly
analysis; the wavelet functions replace the usual sine and
famous example is the butterfly shaped attractor in the
cosine basis functions.
Lorentz system of differential equations, seen in Fig. 17.
The connection between wavelets and fractals comes
These differential equations are a toy model of a weather
because wavelet functions are nearly self-similar functions.
system that exhibits chaotic behavior. The attractor of
The so-called scaling function is a fractal function, and
this system is an incredibly intricate filigree structure of
the mother wavelet is simply a linear combination of
curves. The fractal nature of this attractor is evident by the
copies of this scaling function. This scaling behavior of
fact that, as you zoom in on the attractor, more and more
wavelets makes it particularly nice for examining fractal
detail appears in an approximately self-similar fashion.
data, especially if the scaling in the data matches the
scaling in the wavelet functions. The coefficients that
FRACTAL RANDOM PROCESSES come from a wavelet analysis are naturally organized in
a hierarchy of information from different scales, and hence,
Since the introduction of fractional Brownian motion (fBm) doing a wavelet analysis can help one to find scaling rela-
in 1968 by Benoit Mandelbrot and John van Ness, self- tions in data, if such relations exist.
similar stochastic processes have been used to model a Of course, wavelet analysis is much more than just an
variety of physical phenomena (including computer net- analysis to find scaling relations. There are many different
work traffic and turbulence). These processes have power wavelet bases. This freedom in choice of basis gives greater
spectral densities that decay like 1/fa. flexibility than Fourier analysis.
A fBm is a Gaussian process x(t) with zero mean and
covariance
FURTHER READING
Extxs s2 =2 jtj2H jsj2H  jt  sj2H 
M. G. Barnsley, Fractals Everywhere, New York: Academic Press,
and is completely characterized by the Hurst exponent H and 1988.
the variance Ex12  s2 . fBm is statistically sell-similar in M. G. Barnsley and L. Hurd, Fractal Image Compression,
the sense that, for any scaling a > 0, we have Wellesley, Mass: A.K. Peters, 1993.
M. Dekking, J. Levy Vehel, E. Lutton, and C. Tricot (eds). Fractals:
xat aH xt Theory and Applications in Engineering, London: Springer,
1999.
where by equality we mean equality in distribution. (As an K. J. Falconer, The Geometry of Fractal Sets, Cambridge, UK:
aside and an indication of one meaning of H, the sample Cambridge University Press, 1986.
paths ol fBm with parameter H are almost surely Holder K. J. Falconer, The Fractal Geometry: Mathematical Foundations
continuous with parameter H, so the larger the value of H, and Applications, Toronto, Canada: Wiley, 1990.
the smoother the sample paths of the fBm). Because of this J. Feder, Fractals, New York: Plenum Press, 1988.
scaling behavior, fBm exhibits very strong long-time depen- Y. Fisher, Fractal Image Compression, Theory and Applications,
dence. It is also clearly not a stationary (time-invariant) New York: Springer, 1995.
8 FRACTALS

J. E. Hutchinson, Fractals and self-similarity, Indiana Univ. Math. H. Peitgen and D. Saupe (eds). The Science of Fractal Images,
J. 30: 713747. New York: Springer, 1998.
J. Levy Vehel, E. Lutton, and C. Tricot (eds). Fractals in Enginee- H. Peitgen, H. Jurgens, and D. Saupe, Chaos and Fractals: New
ring, London: Springer, 1997. Frontiers, of Science, New York: Springer, 2004.
J. Levy Vehel and E. Lutton (eds). Fractals in Engineering: New D. Ruelle, Chaotic Evolution and Strange Attractors: The Statis-
Trends in Theory and Applications, London: Springer, 2005. tical Analysis of Time Series for Deterministic Nonlinear Systems,
S. Mallat, A Wavelet Tour of Signal Processing, San Diego, CA: Cambridge, UK: Cambridge University Press, 1988.
Academic Press, 1999.
B. Mandelbrot, The Fractal Geometry of Nature, San Francisco,
CA: W. H. Freeman, 1983. F. MENDIVIL
Acadia University
B. Mandelbrot and J. van Ness, Fractional Brownian motions,
Wolfville, Nova Scotia, Canada
fractional noises and applications, SIAM Review 10: 422437,
1968.
G
GRAPH THEORY AND ALGORITHMS operation that must be executed by an appropriate
resource, and a directed edge from u to v corresponds to
GRAPH THEORY FUNDAMENTALS a constraint and indicates that task u must be executed
before task v. Automated data path synthesis is a schedul-
A graph GV; E consists of a set V of nodes (or vertices) ing problem where each task must be executed for some
anda set E of pairs of nodes from V, referred to as edges. An time at an appropriate resource. The goal is to minimize the
edge may have associated with it a direction, in which total time to execute all tasks in the graph subject to the
case, the graph is called directed (as opposed to undir- edge constraints. In computer and communications net-
ected), or a weight, in which case, the graph is called works, a graph can be used to represent any given inter-
weighted. Given an undirected graph GV; E, two nodes connection, with nodes representing host computers or
u; v 2 V for which an edge e u; v exists in E are said to routers and edges representing communication links.
be adjacent and edge e is said to be incident on them. The In CAD for VLSI, a graph can be used to represent a
degree of a node is the number of edges adjacent to it. A digital circuit at any abstract level of representation. CAD
(simple) path is a sequence of distinct nodes a0 ; a1 ; . . . ; ak for VLSI consists of logic synthesis and optimization, ver-
of V such that every two nodes in the sequence are adja- ification, analysis and simulation, automated layout, and
cent. A (simple) cycle is a sequence of nodes (a0, a1, . . ., ak, testing of the manufactured circuits (12). Graphs are used
a0) such that a0 ; a1 ; . . . ; ak is a path and ak ; a0 are in multilevel logic synthesis and optimization for combina-
adjacent. A graph is connected if there is a path between tional circuits, and each node represents a function that is
every pair of nodes. A graph G0 V 0 ; E0 is a subgraph of used for the implementation of more than one output (9).
graph G(V, E) if V 0  V and E0  E. A spanning tree of a They model synchronous systems by means of finite state
connected graph G(V, E) is a subgraph of G that comprises machines and are used extensively in sequential logic
all nodes of G and has no cycles. A graph G0 (V0 , E0 ) is a optimization (9). Binary decision diagrams are graphical
subgraph of graph G(V, E) if V 0  V and E0  E. An inde- representations of Boolean functions and are used exten-
pendent set of a graph G(V, E) is a subset V 0  V of nodes sively in verification. Algorithms for simulation and timing
such that no two nodes in V0 are adjacent in G. A clique of a analysis consider graphs where the nodes typically corre-
graph G(V, E) is a subset V 0  V of nodes such that any two spond to gates or flip-flops. Test pattern generation and
nodes in V0 are adjacent in G. Given a subset V 0  V, the fault grading algorithms also consider graphs where faults
induced subgraph of G(V, E) by V0 is a subgraph G0 (V0 , E0 ), may exist on either the nodes or the edges. In the automated
where E0 comprises all edges (u, v) in E with u, v 2 V 0 . layout process (10), the nodes of a graph may represent
In a directed graph, each edge (sometimes referred to modules of logic (partitioning and floor-planning stages),
as arc) is an ordered pair of nodes and the graph is denoted gates or transistors (technology mapping, placement, and
by G(V, A). For an edge (u, v) 2 A,v is called the head and u compaction stages), or simply pins (routing, pin assign-
the tail of the edge. The number of edges for which u is a tail ment, and via minimization stages).
is called the out-degree of u and the number of edges for There are many special cases of graphs. Some of the most
which u is a head is called the in-degree of u. A (simple) common ones are listed below. A tree is a connected graph
directed path is a sequence of distinct nodes (a0, a1, . . ., ak) that contains no cycles. A rooted tree is a tree with a
of V such that (ai, ai1), 8 i; 0  i  k  1, is an edge of the distinguished node called a root. All nodes of a tree that
graph. A (simple) directed cycle is a sequence of nodes (a0, are distinguished from the root and are adjacent to only one
a1, . . ., ak, a0) such that (a0, a1, . . ., ak) is a directed path and node are called leaves. Trees are used extensively in the
(ak, a0) 2 A. A directed graph is strongly connected if automated layout process of intergated circuits. The clock
there is a directed path between every pair of nodes. A distribution network is a rooted tree whose root corre-
directed graph is weakly connected if there is an undirec- sponds to the clock generator circuit and whose leaves
ted path between every pair of nodes. are the flip-flops. The power and ground supply networks
Graphs (15) are a very important modeling tool that are rooted trees whose root is either the power or the ground
can be used to model a great variety of problems in areas supply mechanism and whose leaves are the transistors in
such as operations research (68), architectural level syn- the layout. Many problem formulations in operations
thesis (9), computer-aided Design (CAD) for very large- research, architectural level synthesis, CAD for VLSI,
scale integration (VLSI) (9,10) and computer and commu- and networking allow for fast solutions when restricted
nications networks (11). to trees. For example, the simplified version of the data path
In operations research, a graph can be used to model the scheduling problem where all the tasks are executed on the
assignment of workers to tasks, the distribution of goods same type of resource is solvable in polynomial time if the
from warehouses to customers, etc. In architectural level task graph is a rooted tree. This restricted scheduling
synthesis, graphs are used for the design of the data path problem is also common in multiprocessor designs (9).
and the control unit. The architecture is specified by a A bipartite graph is a graph with the property that its
graph, a set of resources (such as adders and multipliers), node set V can be partitioned into two disjoint subsets V1
and a set of constraints. Each node corresponds to an and V2, V1 [ V2 v, such that every edge in E comprises

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 GRAPH THEORY AND ALGORITHMS

one node from V1 and one node from V2. Bipartite graphs links fail probabilistically). Or we may want to determine
appear often in operations research (68) and in VLSI CAD whether there is a threshold on some parameter (such as
applications (9,10). the average node degree) of the random graph after which
A directed acyclic graph is a directed graph that contains the probability of some attribute (such as connectivity,
no directed cycles. Directed acyclic graphs can be used to colorability, etc) changes significantly.
represent combinational circuits in VLSI CAD. Timing
analysis algorithms in CAD for VLSI or software timing
ALGORITHMS AND TIME COMPLEXITY
analysis algorithms of synthesizable hardware description
language code operate on directed acyclic graphs.
An algorithm is an unambiguous description of a finite set
A transitive graph is a directed graph with the property
of operations for solving a computational problem in a finite
that for any nodes u; v; w 2 V for which there exist edges
amount of time. The set of allowable operations corresponds
u; v; v; w 2 A, edge (u, w) also belongs to A. Transitive
to the operations supported by a specific computing
graphs find applications in resource binding of tasks in
machine (computer) or a model of that machine.
architectural level synthesis (9) and in fault collapsing for
A computational problem comprises a set of parameters
digital systems testing (12).
that have to satisfy a set of well-defined mathematical
A planar graph is a graph with the property that its
constraints. A specific assignment of values to these para-
edges can be drawn on the plane so as not to cross each
meters constitutes an instance of the problem. For some
other. Many problems in the automated layout for VLSI are
computational problems, there is no algorithm as defined
modeled using planar graphs. Many over-the-cell routing
above to find a solution. For example, the problem of
algorithms require the identification of circuit lines to be
determining whether an arbitrary computer program ter-
routed on a single layer. Single-layer routing is also desir-
minates in a finite amount of time given a set of input data
able for detailed routing of the interconnects within each
cannot be solved (it is undecidable) (13). For the computa-
routing layer (10).
tional problems for which there does exist an algorithm, the
A cycle graph is a graph that is obtained by a cycle with
point of concern is how efficient is that algorithm. The
chords as follows: For every chord (a,b) of the cycle, there is
efficiency of an algorithm is primarily defined in terms of
a node va;b in the cycle graph. There is an edge va;b ; vc;d
how much time the algorithm takes to terminate. (Some-
in the cycle graph if and only if the respective chords (a, b)
times, other considerations such as the space requirement
and (c, d) intersect. Cycle graphs find application in VLSI
in terms of the physical information storage capacity of the
CAD, as a channel with two terminal nets, or a switchbox
computing machine are also taken into account, but in this
with two terminal nets can be represented as a cycle graph.
exposition we concentrate exclusively on time.)
Then the problem of finding the maximum number of nets
To formally define the efficiency of an algorithm, the
in the channel (or switchbox) that can be routed on the
following notions are introduced.
plane amounts to finding a maximum independent set in
The size of an instance of a problem is defined as the total
the respective cycle graph (10).
number of symbols for the complete specification of the
A permutation graph is a special case of a cycle graph. It
instance under a finite set of symbols and a succinct
is based on the notion of a permutation diagram. A permu-
encoding scheme. A succinct encoding scheme is consid-
tation diagram is simply a sequence of N integers in the
ered to be a logarithmic encoding scheme, in contrast to a
range from 1 to N (but not necessarily ordered). Given an
unary encoding scheme. The time requirement (time com-
ordering, there is a node for every integer in the diagram
plexity) of an algorithm is expressed then as a function f(n)
and there is an edge (u,v) if and only if the integers u,v are
of the size n of an instance of the problem and gives the total
not in the correct order in the permutation diagram. A
number of basic steps that the algorithm needs to go
permutation diagram can be used to represent a special
through to solve that instance. Most of the time, the number
case of a permutable channel in a VLSI layout, where all
of steps is taken with regard to the worst case, although
nets have two terminals that belong to opposite channel
alternative measures like the average number of steps can
sides. The problem of finding the maximum number of nets
also be considered. What constitutes a basic step is pur-
in the permutable channel that can be routed on the plane
posely left unspecified, provided that the time the basic step
amounts to finding a maximum independent set in the
takes to be completed is bounded from above by a constant,
respective permutation graph. This, in turn, amounts to
that is, a value not dependent on the instance. This hides
finding the maximum increasing (or decreasing) subse-
implementation details and machine-dependent timings
quence of integers in the permutation diagram (10).
and provides the required degree of general applicability.
Graphs have also been linked with random processes,
An algorithm with time complexity f(n) is said to be of the
yielding what is known as random graphs. Random graphs
order of g(n) [denoted as O(g(n))], where g(n) is another
consist of a given set of nodes while their edges are added
function, if there is a constant c such that f n  c  gn, for
according to some random process. For example, G(n,p)
all n  0. For example, an algorithm for finding the mini-
denotes a random graph with n nodes but whose edges are
mum element of a list of size n takes time O(n), an algorithm
chosen independently with probability p. Typical questions
for finding a given element in a sorted list takes time O(log
that arise in the study of random graphs concern their
n), and algorithms for sorting a list of elements can take
probabilistic behavior. For example, given n and p we may
time O(n2), O(n log n), or O(n) (the latter when additional
want to find the probability that G(n,p) is connected (which
information about the range of the elements is known). If
has direct application to the reliability of a network whose
GRAPH THEORY AND ALGORITHMS 3

moreover, there are constants cL and cH such that (or maximizing) the objective function Q() in the optimiza-
cL  gn  f n  cH  gn, for all n  0, then f(n) is said tion problem corresponds to the question of whether a
to be Q(g(n)). solution exists with Q()  k (or Q()  k) in the decision
The smaller the order-of function, the more efficient problem, where k is now an additional input parameter to
an algorithm is generally taken to be, but in the analysis of the decision problem. For example, the decision version of
algorithms, the term efficient is applied liberally to any the Traveling Salesman problem is, given a graph and an
algorithm whose order-of function is a polynomial p(n). integer K, to find a simple cycle that passes through every
Theplatter
includes time complexities like O(n log n) or node and whose sum of edge weights is no more than K.
On n, which are clearly bounded by a polynomial. All decision problems that can be solved in polynomial
Any algorithm with a nonpolynomial time complexity is time comprise the so-called class P (for Polynomial).
not considered to be efficient. All nonpolynomial-time Another established class of decision problems is the NP
algorithms are referred to as exponential and include class, which consists of all decision problems for which a
algorithms with such time complexities as O(2n), O(n!), polynomial-time algorithm can verify if a candidate solu-
O(nn), O(nlog n) (the latter is sometimes referred to as tion (which has polynomial size with respect to the original
subexponential). Of course, in practice, for an algorithm instance) yields a yes or no answer. The initials NP
of polynomial-time complexity O(p(n)) to be actually effi- stand for Non-deterministic Polynomial in that if a yes-
cient, the degree of polynomial p(n) as well as the constant answer exists for an instance of an NP problem, that answer
of proportionality in the expression O(p(n)) should be small. can be obtained nondeterministically (in effect, guessed)
In addition, because of the worst-case nature of the O() and then verified in polynomial time. Every problem in
formulation, an exponential algorithm might exhibit class P belongs clearly to NP, but the question of whether
exponential behavior in practice only in rare cases (the class NP strictly contains P is a famous unresolved pro-
latter seems to be the case with the simplex method for blem. It is conjectured that NP 6 P, but there has been no
linear programming). However, the fact on the one hand actual proof until now. Notice that to simulate the non-
that most polynomial-time algorithms for the problems deterministic guess in the statement above, an obvious
that occur in practice tend indeed to have small polynomial deterministic algorithm would have to enumerate all pos-
degrees and small constants of proportionality, and on the sible cases, which is an exponential-time task. It is in fact
other that most nonpolynomial algorithms for the problems the question of whether such an obvious algorithm is
that occur in practice eventually resort to the trivial actually the best one can do that has not been resolved.
approach of exhaustively searching (enumerating) all can- Showing that an NP decision problem actually belongs
didate solutions, justifies the use of the term efficient for to P is equivalent to establishing a polynomial-time algo-
only the polynomial-time algorithms. rithm to solve that problem. In the investigation of the
Given a new computational problem to be solved, it relations between problems in P and in NP, the notion of
is of course desirable to find a polynomial-time algorithm polynomial reducibility plays a fundamental role. A pro-
to solve it. The determination of whether such a blem R is said to be polynomially reducible to another
polynomial-time algorithm actually exists for that problem problem S if the existence of a polynomial-time algorithm
is a subject of primary importance. To this end, a whole for S implies the existence of a polynomial-time algorithm
discipline dealing with the classification of the com- for R. That is, in more practical terms, if the assumed
putational problems and their interrelations has been polynomial-time algorithm for problem S is viewed as a
developed. subroutine, then an algorithm that solves R by making a
polynomially bounded number of calls to that subroutine
P, NP, and NP-Complete Problems and taking a polynomial amount of time for some extra
work would constitute a polynomial-time algorithm for R.
The classification starts technically with a special class of
There is a special class of NP problems with the pro-
computational problems known as decision problems. A
perty that if and only if any one of those problems could be
computational problem is a decision problem if its solution
solved polynomially, then so would all NP problems (i.e.,
can actually take the form of a yes or no answer. For
NP would be equal to P). These NP problems are known as
example, the problem of determining whether a given
NP-complete. An NP-complete problem is an NP problem to
graph contains a simple cycle that passes through every
which every other NP problem reduces polynomially. The
node is a decision problem (known as the Hamiltonian cycle
first problem to be shown NP-complete was the Satisfia-
problem). In contrast, if the graph has weights on the edges
bility problem (13). This problem concerns the existence of
and the goal is to find a simple cycle that passes through
a truth assignment to a given set of Boolean variables so
every node and has a minimum sum of edge weights is not a
that the conjunction of a given set of disjunctive clauses
decision problem but an optimization problem (the corre-
formed from these variables and their complements
sponding problem in the example above is known as the
becomes true. The proof (given by Stephen Cook in 1971)
Traveling Salesman problem). An optimization problem
was done by showing that every NP problem reduces poly-
(sometimes also referred to as a combinatorial optimization
nomially to the Satisfiability problem. After the establi-
problem) seeks to find the best solution, in terms of a well-
shment of the first NP-complete case, an extensive and
defined objective function Q(), over a set of feasible solu-
ongoing list of NP-complete problems has been established
tions. Interestingly, every optimization problem has a
(13).
decision version in which the goal of minimizing
4 GRAPH THEORY AND ALGORITHMS

Some representative NP-complete problems on graphs one-to-one function f : VG ! VH0 such that u; v 2 EG
that occur in various areas in digital design automation, if and only if f u; f v 2 EH0 )?
computer networks, and other areas in electrical and com-
puter engineering are listed as follows: The interest in showing that a particular problem R is
NP-complete lies exactly in the fact that if it finally turns
 Longest path: Given a graph G(V, E) and an integer out that NP strictly contains P, then R cannot be solved
K  jVj, is there a simple path in G with at least K polynomially (or, from another point of view, if a
edges? polynomial-time algorithm happens to be discovered for
 Vertex cover: Given a graph G(V, E) and an integer R, then NP P). The process of showing that a decision
K  jVj, is there a subset V 0  V such that jV 0 j  K and problem is NP-complete involves showing that the problem
for each edge u; v 2 E, at least one of u, v belongs to V0 ? belongs to NP and that some known NP-complete problem
 Clique: Given a graph G(V, E) and an integer K  jVj, reduces polynomially to it. The difficulty of this task lies in
is there a clique C among the nodes in V such that the choice of an appropriate NP-complete problem to reduce
jCj  K? from as well as in the mechanics of the polynomial reduc-
tion. An example of an NP-complete proof is given below.
 Independent set: Given a graph G(V, E) and an integer
K  jVj, is there a subset V 0  V such that jV 0 j  K and
Theorem 1. The Clique problem is NP-complete
no two nodes in V0 are joined by an edge in E?
Proof. The problem belongs clearly to NP, because once
 Feedback node set: Given a directed graph G(V, A) and a clique C of size jCj  K has been guessed, the verification
an integer K  jVj, is there a subset V 0  V such that can be done in polynomial (actually OjCj2 ) time. The
jV 0 j  K and every directed cycle in G has at least one reduction is made from a known NP-complete problem,
node in V0 ? the 3-Satisfiability problem, or 3SAT (13). The latter pro-
 Hamiltonian cycle: Given a graph G(V, E), does G blem is a special case of the Satisfiability problem in that
contain a simple cycle that includes all nodes of G? each disjunctive clause comprises exactly three literals.
 Traveling Salesman: Given a weighted graph G(V, E) Let j be a 3SAT instance with n variables x1,. . ., xn and
and a bound K, is there a path that visits each node m clauses C1,. . ., Cm. For each clause Cj, 1  j  m seven
exactly once and has a total sum of weights no more new nodes are considered, each node corresponding to
than K? one of the seven minterms that make Cj true. The total
 Graph colorability: Given a graph G(V, E) and an size of the set V of nodes thus introduced is 7m. For every
integer K  jVj, is there a coloring function f : pair of nodes u, v in V, an edge is introduced if and only if
V ! 1; 2; . . . ; K such that for every edge u; v 2 E; u and v correspond to different clauses and the minterms
f u 6 f v? corresponding to u and v are compatible (i.e., there is no
variable in the intersection of u and v that appears as both
 Graph bandwidth: Given a graph G(V,E) and an inte-
a negated and an unnegated literal in u and v).
ger K  jVj, is there a one-to-one function f :
The graph G(V, E) thus constructed has O(m) nodes
V ! 1; 2; . . . ; jVj such that for every edge u; v 2 E;
and O(m2) edges. Let the lower bound K in the Clique
j f u  f vj  K?
problem be K m. Suppose first that j is satisfiable; that
 Induced bipartite subgraph: Given a graph G(V, E) is, there is a truefalse assignment to the variables x1,. . .,
and an integer K  jVj, is there a subset V 0  V xn that make each clause true. This characteristic means
such that jV 0 j  K and the subgraph induced by V0 is that, in each clause Cj, exactly one minterm is true and all
bipartite? such minterms are compatible. The set of the nodes corre-
 Planar subgraph: Given a graph G(V, E) and an integer sponding to these minterms has size m and constitutes a
K  jEj, is there a subset E0  E such that jE0 j  K and clique, because all compatible nodes have edges among
the subgraph G0 (V,E0 ) is planar? themselves.
 Steiner tree: Given a weighted graph G(V, E), a subset Conversely, suppose that there is a clique C in G(V, E) of
V 0  V, and a positive integer bound B, is there a size jCj  m. As there are no edges among any of the seven
subgraph of G that is a tree, comprises at least all nodes corresponding to clause Cj, 1  j  m, the size of
nodes in V0 , and has a total sum of weights no more the clique must be exactly jCj m; that is, the clique con-
than B? tains exactly one node from each clause. Moreover, these
 Graph partitioning: Given a graph G(V, E) and two nodes are compatible as indicated by the edges among
positive integers K and J, is there a partition of V them. Therefore, the union of the minterms corresponding
into disjoint subsets V1, V2,. . .,Vm such that each sub- to these nodes yields a satisfying assignment for the 3SAT
set contains no more than K nodes and the total instance.&
number of edges that are incident on nodes in two It is interesting to note that seemingly related prob-
different subsets is no more than J? lems and/or special cases of many NP-complete problems
 Subgraph isomorphism: Given two graphs G(VG, EG) exhibit different behavior. For example, the Shortest
and H(VH, EH), is there a subgraph H0 (VH0 , EH0 ) of Path problem, related to the Longest Path problem, is
H such that G and H0 are isomorphic (i.e., there is a polynomially solvable. The Longest Path problem
GRAPH THEORY AND ALGORITHMS 5

restricted to directed acyclic graphs is polynomially solva- (2) For optimization problems, try to obtain a polynomial-
ble. The Graph Colorability problem for planar graphs and time algorithm that finds a solution that is prov-
for K 4 is also polynomially solvable. ably close to the optimal. Such an algorithm is
On the other hand, the Graph Isomorphism problem, known as an approximation algorithm and is gene-
related to the Subgraph Isomorphism but now asking if rally the next best thing one can hope for to solve
the two given graphs G and H are isomorphic, is thought the problem.
to be neither an NP-complete problem nor a polynomially (3) For problems that involve numerical bounds, try to
solvable problem, although this has not been proved. There obtain an algorithm that is polynomial in terms of
is a complexity class called Isomorphic-complete, which is the instance size and the size of the maximum
thought to be entirely disjoint from both NP-complete and number occurring in the encoding of the instance.
P. However, polynomial-time algorithms exist for Graph Such an algorithm is known as pseudopolynomial-
Isomorphism when restricted to graphs with node degree time algorithm and becomes practical if the numbers
bounded by a constant (14). In practice, Graph Isomorph- involved in a particular instance are not too large. An
ism is easy except for pathologically difficult graphs. NP-complete problem for which a pseudopolyno-
mial-time algorithm exists is referred to as weakly
NP-Hard Problems NP-complete (as opposed to strongly NP-complete).
A generalization of the NP-complete class is the NP-hard (4) Use a polynomial-time algorithm to find a good
class. The NP-hard class is extended to comprise opti- solution based on rules of thumb and insight. Such
mization problems and decision problems that do not an algorithm is known as a heuristic. No proof is
seem to belong to NP. All that is required for a problem provided about how good the solution is, but
to be NP-hard is that some NP-complete problems reduce well-justified arguments and empirical studies jus-
polynomially to it. For example, the optimization version of tify the use of these algorithms in practice.
the Traveling Salesman problem is an NP-hard problem,
because if it were polynomially solvable, the decision In some cases, before any of these approaches is exam-
version of the problem (which is NP-complete) would be ined, one should check whether the problem of concern is
trivially solved in polynomial time. actually a polynomially or pseudopolynomially solvable
If the decision version of an optimization problem is special case of the general NP-complete or NP-hard pro-
NP-complete, then the optimization problem is NP-hard, blem. Examples include polynomial algorithms for finding
because the yes or no answer sought in the decision a longest path in a directed acyclic graph, and finding a
version can readily be given in polynomial time once the maximum independent set in a transitive graph. Also, some
optimum solution in the optimization version has been graph problems that are parameterized with an integer k
obtained. But it is also the case that for most NP-hard exhibit the fixed-parameter tractability property; that is,
optimization problems, a reverse relation holds; that is, for each fixed value of k, they are solvable in time bounded
these NP-hard optimization problems can reduce polyno- by a polynomial whose degree is independent of k. For
mially to their NP-complete decision versions. The strategy example, the problem of whether a graph G has a cycle
is to use a binary search procedure that establishes the of length at least k, although NP-complete in general, is
optimal value after a logarithmically bounded number of solvable in time O(n) for fixed k, where n is the number of
calls to the decision version subroutine. Such NP-hard nodes in G. [For other parameterized problems, however,
problems are sometimes referred to as NP-equivalent. such as the Dominating Set, where the question is whether
The latter fact is another motivation for the study of a graph G has a subset of k nodes such that every node not
NP-complete problems: A polynomial-time algorithm for in the subset has a neighbor in the subset, the only solu-
any NP-complete (decision) problem would actually provide tion known has time complexity Onk1 .]
a polynomial-time algorithm for all such NP-equivalent In the next section, we give some more information about
optimization problems. approximation and pseudopolynomial-time algorithms.

Algorithms for NP-Hard Problems POLYNOMIAL-TIME ALGORITHMS


Once a new problem for which an algorithm is sought is
proven to be NP-complete or NP-hard, the search for a Graph Representations and Traversals
polynomial-time algorithm is abandoned (unless one seeks There are two basic schemes for representing graphs in
to prove that NP P), and the following basic four a computer program. Without loss of generality, we assume
approaches remain to be followed: that the graph is directed [represented by G(V,A)].
Undirected graphs can always be considered as bidirected.
(1) Try to improve as much as possible over the straight-
In the first scheme, known as the Adjacency Matrix repre-
forward exhaustive (exponential) search by using
sentation, a jVj  jVj matrix M is used, where every row
techniques like branch-and-bound, dynamic pro-
and column of the matrix corresponds to a node of the
gramming, cutting plane methods, and Lagrangian
graph, and entry M(a, b) is 1 if and only if a; b 2 A. This
techniques.
simple representation requires OjVj2 time and space.
6 GRAPH THEORY AND ALGORITHMS

In the second scheme, known as the Adjacency List The final graph traversal method is the topological
representation, an array L1::jVj of linked lists is used. search, which applies only to directed acyclic graphs. In
The linked list starting at entry L[i] contains the set of all directed acyclic graphs, nodes have no incoming edges and
nodes that are the heads of all edges with tail node i. The nodes have no outgoing edges. Topological search visits a
time and space complexity of this scheme is jVj jEj. node only if it has no incoming edges or all its incoming
Both schemes are widely used as part of polynomial-time edges have been explored. The approach can be also be
algorithms for working with graphs (15). The Adjacency implemented to run in OjEj time.
List representation is more economical to construct, but
locating an edge using the Adjacency Matrix representa- Design Techniques for Polynomial-Time Algorithms
tion is very fast [takes O(1) time compared with the OjVj
We describe below three main frameworks that can be used
time required using the Adjacency List representation].
to obtain polynomial-time algorithms for combinatorial
The choice between the two depends on the way the algo-
optimization (or decision) problems: (1) greedy algorithms;
rithm needs to access the information on the graph.
(2) divide-and-conquer algorithms; and (3) dynamic pro-
A basic operation on graphs is the graph traversal,
gramming algorithms. Additional frameworks such as
where the goal is to systematically visit all nodes of the
linear programming are available, but these are discussed
graph. There are three popular graph traversal methods:
in other parts of this book.
Depth-first search (DFS), breadth-first search (BFS), and
topological search. The last applies only to directed acyclic
Greedy Algorithms. These algorithms use a greedy
graphs. Assume that all nodes are marked initially as
(straightforward) approach. As an example of a greedy
unvisited, and that the graph is represented using an
algorithm, we consider the problem of finding the chro-
adjacency list L.
matic number (minimum number of independent sets) in
Depth-first search traverses a graph following the dee-
an interval graph. An interval is a line aligned to the y-axis,
pest (forward) direction possible. The algorithm starts by
and each interval i is represented by its left and right
selecting the lowest numbered node v and marking it as
endpoints, denoted by li and ri, respectively. This repre-
visited. DFS selects an edge (v, u), where u is still unvisited,
sentation of the intervals is also referred to as the inter-
marks u as visited, and starts a new search from node u.
val diagram.
After completing the search along all paths starting at u,
In an interval graph, each node corresponds to an inter-
DFS returns to v. The process is continued until all nodes
val and two nodes are connected by an edge if the two
reachable from v have been marked as visited. If there are
intervals overlap. This problem finds immediate appli-
still unvisited nodes, the next unvisited node w is selected
cation in VLSI routing (10). The minimum chromatic
and the same process is repeated until all nodes of the graph
number corresponds to the minimum number of tracks
are visited.
so that all intervals allocated to a track do not overlap
The following is a recursive implementation of sub-
with each other.
routine of DFS(v) that determines all nodes reachable
The greedy algorithm is better described on the interval
from a selected node v. L[v] represents the list of all nodes
diagram instead of the interval graph; i.e., it operates on
that are the heads of edges with tail v, and array M[u]
the intervals rather than or the respective nodes on the
contains the visited or unvisited status of every node u.
interval graph. It is also known as the left-edge algorithm
because it first sorts the intervals according to their left-
Procedure DFSv
edge values li and then allocates them to tracks in ascend-
Mv : visited; ing order of li values.
FOR each node u 2 LvDO To allocate a track to the currently examined interval i,
IF Mu unvisited THEN Call DFSu; the algorithm serially examines whether any of the existing
tracks can accommodate it. (The existing tracks have been
END DFS
generated to accommodate all intervals j such that l j  li .)
Net i is greedily assigned to the first existing track that can
The time complexity of DFS(v) is OjVv j jEv j, where
accommodate it. A new track is generated, and interval i is
jVv j; jEv j are the numbers of nodes and edges that have been
assigned to that track only if i has a conflict with each
visited by DFS(v). The total time for traversing the graph
existing track.
using DFS is OjEj jVj OjEj.
It can be shown that the algorithm results to minimum
Breadth-first search visits all nodes at distance k from
number of tracks; i.e., it achieves the chromatic number of
the lowest numbered node v before visiting any nodes at
the interval graph. This happens because if more than one
distance k1. Breadth-first search constructs a breadth-
track can accommodate interval i, then any assignment
first search tree, initially containing only the lowest num-
will lead to an optimal solution because all nets k with
bered node. Whenever an unvisited node w is visited in the
lk  li can be assigned to the unselected tracks.
course of scanning the adjacency list of an already visited
node u, node w and edge (u, w) are added to the tree. The
Divide-and-Conquer. This methodology is based on a
traversal terminates when all nodes have been visited.
systematic partition of the input instance in a topdown
The approach can be implemented using queues so that
manner into smaller instances, until small enough
it terminates in OjEj time.
instances are obtained for which the solution of the problem
GRAPH THEORY AND ALGORITHMS 7

degenerates to trivial computations. The overall optimal Mi; j Mi; j  1 because graph Gi, j is identical to
solution, i.e., the optimal solution on the original input graph Gi,j1. Otherwise we consider two cases: (1) If
instance, is then calculated by appropriately working on vk j 2 Mi; j, then M(i, j) does not have any node vab, where
the already calculated results on the subinstances. The a 2 i; k  1 and b 2 k 1; j. In this case, Mi; j Mi; k 
recursive nature of the methodology necessitates the solu- 1 [ MK 1; j  1 [ vk j . (2) If vk j 2 = Mi; j, then
tion of one or more recurrence relations to determine the Mi; j Mi; j  1. Either of these two cases may apply,
execution time. but the largest of the two maximum independent sets will
As an example, consider how divide-and-conquer can be allocated to M(i, j). The flowchart of the algorithm is
be applied to transform a weighted binary tree into a heap. given as follows:
A weighted binary tree is a rooted directed tree in which
Procedure MIS(V)
every nonleaf node has out-degree 2, and there is a value
FOR j 0 TO 2n  1 DO
(weight) associated with each node. (Each nonleaf node is
Let (j, k) be the chord whose one endpoint is j;
also referred to as parent, and the two nodes it points to
FOR i 0 TO j  1 DO
are referred to as its children.) A heap is a weighted binary
IF i  k  j1 AND |M(i,k1)| 1 |M(k 1, j1)| >
tree in which the weight of every node is no smaller than the
|M(i, j1)| THEN M(i, j) M(i, k  1) [ vkj [ M(k
weight of either of its children.
1, j1);
The idea is to recursively separate the binary tree into
ELSE M(i, j) M(i, j1);
subtrees starting from the root and considering the sub-
END MIS
trees rooted at its children, until the leaf nodes are encoun-
tered. The leaf nodes constitute trivially a heap. Then,
Basic Graph Problems
inductively, given two subtrees of the original tree that
are rooted at the children of the same parent and have been In this section, we discuss more analytically four problems
made to have the heap property, the subtree rooted at the that are widely used in VLSI CAD, computer networking,
parent can be made to have the heap property too by simply and other areas, in the sense that many problems are
finding which child has the largest weight and exchanging reduced to solving these basic graph problems. They are
that weight with the weight of the parent in case the latter the shortest path problem, the flow problem, the graph
is smaller than the former. coloring problem, and the graph matching problem.

Dynamic Programming. In dynamic programming, the Shortest Paths. The instance consists of a graph G(V, E)
optimal solution is calculated by starting from the simplest with lengths l(u, v) on its edges (u, v), a given source s 2 V,
subinstances and combining the solutions of the smaller and a target t 2 V. We assume without loss of generality
subinstances to solve larger subinstances, in a bottom-up that the graph is directed. The goal is to find a shortest
manner. To guarantee a polynomial-time algorithm, the length path from s to t. The weights can be positive or
total number of subinstances that have to be solved must be negative numbers, but there is no cycle for which the sum of
polynomially bounded. Once a subinstance has been solved, the weights on its edges is negative. (If negative length
any larger subinstance that needs that subinstances solu- cycles are allowed, the problem is NP-hard.) Variations of
tion, does not recompute it, but looks it up in table where it the problem include the all-pair of nodes shortest paths and
has been stored. Dynamic programming is applicable only the m shortest path calculation in a graph.
to problems that obey the principle of optimality. This We present here a dynamic programming algorithm
principle holds whenever in an optimal sequence of choices, for the shortest path problem that is known as the
each subsequence is also optimal. The difficulty in this BellmanFord algorithm. The algorithm has O(n3) time
approach is to come up with a decomposition of the problem complexity, but faster algorithms exist when all the weights
into a sequence of subproblems for which the principle of are positive [e.g., the Dijkstra algorithm with complexity
optimality holds and can be applied in polynomial time. On  minflogjEj; jVjg] or when the graph is acyclic (based
We illustrate the approach by finding the maximum on topological search and with linear time complexity). All
independent set in a cycle graph in O(n2) time, where n existing algorithms for the shortest path problem are based
is the number of chordal endpoints in the cycle (10). Note on dynamic programming. The BellmanFord algorithm
that the maximum independent set is NP-hard on general works as follows.
graphs. Let l(i, k) be the length of edge (i, j) if directed edge (i, j)
Let G(V, E) be a cycle graph, and vab 2 V correspond to exists and 1 otherwise. Let s( j) denote the length of the
a chord in the cycle. We assume that no two chords share an shortest path from the source s to node j. Assume that
endpoint, and that the endpoints are labeled from 0 to the source has label 1 and that the target has label n jVj.
2n  1, where n is the number of chords, clockwise around We have that s1 0. We also know that in a shortest path
the cycle. Let Gij be the subgraph induced by the set of nodes to any node j there must exist a node k, k 6 j, such that
vab 2 V such that i  a; b  j. s j sk lk; j. Therefore,
Let M(i, j) denote a maximum independent set of Gi, j.
M(i, j) is computed for every pair of chords, but M(i, a) must s j min fsk lk; jg; j  2
k 6 j
be computed before M(i, b) if a < b. Observe that, if i  j,
Mi; j 0 because Gi, j has no chords. In general, to com-
pute M(i, j), the endpoint k of the chord with endpoint BellmanFords algorithm, which eventually computes
j must be found. If k is not in the range [i, j  1], then all s( j), 1  j  n, calculates optimally the quantity
8 GRAPH THEORY AND ALGORITHMS

s jm1 defined as the length of the shortest path to node path calculations. We describe below for illustration
j subject to the condition that the path does not contain purposes an OjVj3 algorithm for the maximum flow pro-
more than m 1 edges, 0  m  jVj  2. To be able to blem. However, faster algorithms exist in the literature. We
calculate quantity s jm1 for some value m 1, the first give some definitions and theorems.
s( j)m values for all nodes j have to be calculated. Let P be an undirected path from s to t; i.e., the direction
Given the initialization s11 0; s j1 l1; j, j 6 1, of the edges is ignored. An edge i; j 2 P is said to be a
the computation of s jm1 for any values of j and m can forward edge if it is directed from s to t and backward
be recursively computed using the formula otherwise. P is said to be an augmenting path with respect
to a given flow F if f i; j < ci; j for each forward edge and
s jm1 minfs jm ; minfskm lk; jg f i; j > 0 for each backward edge in P.
Observe that if the flow in each forward edge of the
The computation terminates when m jVj  1, because augmenting path is increased by one unit and the flow in
no shortest path has more than jVj  1 edges. each backward edge is decreased by one unit, the flow
is feasible and its value has been increased by one unit.
Flows. All flow problem formulations consider a directed We will show that a flow has maximum value if and only if
or undirected graph G V; E, a designated source s, a there is no augmenting path in the graph. Then the max-
designated target t, and a nonnegative integer capacity imum flow algorithm is simply a series of calls to a sub-
c(i, j) on every edge (i, j). Such a graph is sometimes routine that finds an augmenting path and increments the
referred to as a network. We assume that the graph is value of the flow as described earlier.
directed. A flow from s to t is an assignment F of num- Let S V be a subset of the nodes. The pair (S, T) is
bers f(i, j) on the edges, called the amount of flow through called a cutset if T V  S. If s 2 S and t 2 T, the (S, T)
edge (i, j), subject to the following conditions: is called an (s, t) cutset.
P The P capacity of the cutset (S, T) is
defined as cS; T i 2 S j 2 T ci; j, i.e., the sum of the
0  f i; j  ci; j (1) capacities of all edges from S to T. We note that many
problems in networking, operations research, scheduling,
Every node i, except s and t, must satisfy the conservation and VLSI CAD (physical design, synthesis, and testing)
of flow. That is, are formulated as minimum capacity (s, t) cutset problems.
We show below that the minimum capacity (s, t) problem
X X
f j; i  f i; j 0 (2) can be solved with a maximum flow algorithm.
j j
Lemma 1. The value of any (s, t) flow cannot exceed the
Nodes s and t satisfy, respectively, capacity of any (s, t) cutset.

X X Proof. Let F be an (s, t) flow with value v. Let (S, T) be


f j; i  f i; j v; if i s;
an (s, t) cutset.
P From P Equation P 3 the value P of P the flow v is
j j
X X also v i; 
f j; i  f i; j v; if i t 3 P i 2PS j f j j f j; iP i 2P j 2 S f i; j
S
f j; i i 2 S j 2 P T f i;Pj  f j; i i 2 S j 2 T f i; j
j j
f j; i, because i2S j 2 S f i; j  f j; i Pis 0.PBut
P P f i; j  ci; j and f j; i  0. Therefore, v  i 2 S j 2 S
where v j f s; j j f j; t is called the value of the ci; j cS; T.&
flow.
A flow F that satisfies Equations (13) is called feasible. Theorem 2. A flow F has maximum value v if and only if
In the Max Flow problem, the goal is to find a feasible flow F there is no augmenting path from s to t.
for which v is maximized. Such a flow is called a maximum
flow. There is a problem variation, called the Minimum Proof. If there is an augmenting path, then we can
Flow problem, where Equation (1) is substituted by modify the flow to get a larger value flow. This contradicts
f i; j  ci; j and the goal is to find a flow F for which v the assumption that the original flow has a maximum
is minimized. The minimum flow problem can be solved value.
by modifying algorithms that compute the maximum flow Suppose on the other hand that F is a flow such that
in a graph. there is no augmenting path from s to t. We want to show
Finally, another flow problem formulation is the Mini- that F has the maximum flow value. Let S be the set of all
mum Cost Flow problem. Here each edge has, in addition nodes j (including s) for which there is an augmenting path
to its capacity c(i, j), a cost p(i, j). If f(i, j) is the flow through from s to j. By the assumption that there is an augmenting
the edge, then the cost of the flow through the edge is path from s to t, we must have that t 2 = S. Let T V  S
P f(i, j) and the overall cost C for a flow F of a value
p(i, j) (recall that t 2 T). From the definition of S and T, it follows
v is i; j pi; j  f i; j. The problem is to find a minimum that f i; j ci;
cost flow F for a given value v. P j and P f j; i 0, P 8 i 2 S; j 2 T. P P
Now v P i 2 S Pj f i; j  j f j; i P i 2 SP j 2 S
Many problems in VLSI CAD, computer networking, f i; jf j; i iP 2S j 2 T f i; j f j; i
P i2S j2T
scheduling, and so on can be modeled or reduced to one of f i; j  f j; i i 2 S j 2 S ci; j, because ci; j
these three flow problem variations. All three problems can f i; j and f j; i 0, 8 i; j. By Lemma 1, the flow has
be solved in polynomial time using as subroutines shortest the maximum value.&
GRAPH THEORY AND ALGORITHMS 9

Next, we state two theorems whose proof is straightfor- Finding such a coloring can be done in O(n2) time. Notice
ward. that the edge-chromatic number of a graph with maximum
node degree d is at least d. It is NP-complete to determine
Theorem 3. If all capacities are integers, then a max- whether the edge-chromatic number is d, but given Vizings
imum flow F exists, where all f(i, j) are integers. algorithm, the problem is considered in practice solved.

Theorem 4. The maximum value of an (s, t) flow is equal Graph Matching. A matching in a graph is a set M E
to the minimum capacity of an (s, t) cutset. such that no two edges in M are incident to the same node.
The Maximum Cardinality Matching problem is the
Finding an augmenting path in a graph can be done by a most common version of the matching problem. Here the
systematic graph traversal in linear time. Thus, a straight- goal is to obtain a matching so that the size (cardinality) of
forward implementation of the maximum flow algorithm M is maximized.
repeatedly finds an augmenting path and increments the In the Maximum Weighted Matching version, each edge
amount of the (s, t) flow. This is a pseudopolynomial-time i; j 2 V has a nonnegative integer
P weight, and the goal is
algorithm (see the next section), whose worst-case time to find a matching M so that e 2 M we is maximized.
complexity is Ov  jEj. In many cases, such an algorithm In the Min-Max Matching problem, the goal is to find a
may turn out to be very efficient. For example, when all maximum cardinality matching M where the minimum
capacities are uniform, then the overall complexity weight on an edge in M is maximized. The Max-Min Match-
becomes OjEj2 . ing problem is defined in an analogous manner.
In general, the approach needs to be modified using the All above matching variations are solvable in poly-
EdmondsKarp modification (6), so that each flow aug- nomial time and find important applications. For example,
mentation is made along an augmenting path with a mini- a variation of the min-cut graph partitioning problem,
mum number of edges. With this modification, it has which is central in physical design automation for VLSI,
been proven that a maximum flow is obtained after no asks for partitioning the nodes of a graph into sets of size
more than jEj  jVj=2 augmentations, and the approach at most two so that the sum of the weights on all edges
becomes fully polynomial. Faster algorithms for maximum with endpoints in different sets is minimized. It is easy to
flow computation rely on capacity scaling techniques and see that this partitioning problem reduces to the maximum
are described in Refs. 8 and 15, among others. weighted matching problem.
Matching problems often occur on bipartite GV1 [
Graph Coloring. Given a graph G(V, E), a proper k- V2 ; E graphs. The maximum cardinality matching pro-
coloring of G is a function f from V to a set of integers blem amounts to the maximum assignment of elements
from 1 to k (referred to as colors) such that f u 6 f v, if in V1 (workers) on to the elements of V2 (tasks) so that no
u; v 2 E. The minimum k for which a proper k-coloring worker in V1 is assigned more than one task. This finds
exists for graph G is known as the chromatic number of G. various applications in operations research.
Finding the chromatic number of a general graph and The maximum cardinality matching problem on a
producing the corresponding coloring is an NP-hard pro- bipartite graph GV1 [ V2 ; E can be solved by a maximum
blem. The decision problem of graph k-colorability is NP- flow formulation. Simply, each node v 2 V1 is connected to
complete in the general case for fixed k  3. For k 2, it is a new node s by an edge (s, v) and each node u 2 V2 to a new
polynomially solvable (bipartite matching). For planar node t by an edge (u, t). In the resulting graph, every edge
graphs and for k 4, it is also polynomially solvable. is assigned unit capacity. The maximum flow value v
The graph coloring problem finds numerous applica- corresponds to the cardinality of the maximum matching
tions in computer networks and communications, architec- in the original bipartite graph G.
tural level synthesis, and other areas. As an example, the Although the matching problem variations on bipar-
Federal Communications Commission (FCC) monitors tite graphs are amenable to easily described polynomial-
radio stations (modeled as nodes of a graph) to make time algorithms, such as the one given above, the existing
sure that their signals do not interfere with each other. polynomial-time algorithms for matchings on general
They prevent interference by assigning appropriate fre- graphs are more complex (6).
quencies (each frequency is a color) to each station. It is
desirable to use the smallest possible number of frequen- Approximation and Pseudopolynomial Algorithms
cies. As another example, several resource binding algo-
Approximation and pseudopolynomial-time algorithms
rithms for data path synthesis at the architectural level are
concern mainly the solution of problems that are proven
based on graph coloring formulations (9).
to be NP-hard, although they can sometimes be used on
There is also the version of edge coloring: A proper
problems that are solvable in polynomial time, but for
k-edge-coloring of G is a function f from E to a set of integers
which the corresponding polynomial-time algorithm
from 1 to k such that f e1 6 f e2 , if edges e1 and e2 share a
involves large constants.
node. In this case, each color class corresponds to a match-
An a-approximation algorithm A for an optimization
ing in G, that is, a set of pairwise disjoint edges of G. The
problem R is a polynomial-time algorithm such that, for
minimum k for which a proper k-edge-coloring exists for
graph G is known as the edge-chromatic number of G. It any instance I of R, jSA IS OPT Ij
SOPT I  a c, where SOPT(I) is the
is known (Vizings theorem) that for any graph with max- cost of the optimal solution for instance I, SA(I) is the cost
imum node degree d, there is a (d 1)-edge coloring. of the solution found by algorithm A, and c is a constant.
10 GRAPH THEORY AND ALGORITHMS

As an example, consider a special but practical version of the running time to compute the correct answer is small for
the Traveling Salesman problem that obeys the triangular the large majority of input instances (Las Vegas type).
inequality for all city distances. Given a weighted graph That is, algorithms of the Monte Carlo type always run fast,
G(V, E) of the cities, the algorithm first finds a minimum but the answer they compute has a small probability of
spanning tree T of G (that is, a spanning tree that has being erroneous, whereas algorithms of the Las Vegas
minimum sum of edge weights). Then it finds a minimum type always compute the correct answer but they occasion-
weight matching M among all nodes that have odd degree in ally may take a long time to terminate. If there is an
T. Lastly, it forms the subgraph G0 (V, E0 ), where E0 is the set imposed time limit, Las Vegas-type algorithms can alter-
of all edges in T and M and finds a path that starts from and natively be viewed as always producing either a correct
terminates to the same node and passes through every edge answer or no answer at all within that time limit.
exactly once (such a path is known as Eulerian tour). An example of a probabilistic algorithm on graphs is
Every step in this algorithm takes polynomial time. It the computation of a minimum spanning in a weighted
has been shown that jSA IS OPT Ij
SOPT I  12. undirected graph by the algorithm of (17). This algorithm
Unfortunately, obtaining a polynomial-time approxi- computes a minimum spanning tree in O(m) time, where m
mation algorithm for an NP-hard optimization problem is the number of edges, with probability 1  eVm .
can be very difficult. In fact, it has been shown that this Randomization is also very useful in the design of heur-
may be impossible for some cases. For example, it has been istic algorithms. A typical example of a randomized heur-
shown that unless NP P, there is no a-approximation istic algorithm is the simulated annealing method, which is
algorithm for the general Traveling Salesman problem for very effective for many graph theoretic formulations in
any a > 0. VLSI design automation (10). In the following we outline
A pseudopolynomial-time algorithm for a problem R the use of simulated annealing in the graph balanced
is an algorithm with time complexity O(p(n, m)), where bipartitioning problem, where the goal is to partition the
p() is a polynomial of two variables, n is the size of the nodes of a graph in two equal-size sets so that the number of
instance, and m is the magnitude of the largest number edges that connect nodes in two different sets is minimized.
occuring in the instance. Only problems involving numbers This problem formulation is central in the process of
that are not bounded by a polynomial on the size of the obtaining a compact layout for the integrated circuit whose
instance are applicable for solution by a pseudopolynomial- components (gates or modules) are represented by the
time algorithm. In principle, a pseudopolynomial-time graph nodes and its interconnects by the edges.
algorithm is exponential given that the magnitude of a The optimization in balanced bipartitioning with a very
number is exponential to the size of its logarithmic encod- large number of nodes is analogous to the physical process
ing in the problem instance, but in practice, such an algo- of annealing where a material is melted and subsequently
rithm may be useful in cases where the numbers involved cooled down, under a specific schedule, so that it will
are not large. crystallize. The cooling must be slow so that thermal equi-
NP-complete problems for which a pseudopolynomial- librium is reached at each temperature so that the atoms
time algorithm exists are referred to as weakly NP- are aranged in a pattern that resembles the global energy
complete, whereas NP-complete problems for which no minimum of the perfect crystal.
pseudopolynomial-time algorithm exists (unless NP P) While simulating the process, the energy within the
are referred to as strongly NP-complete. As an example, the material corresponds to a partitioning score. The process
Network Inhibition problem, where the goal is to find starts with a random initial partitioning. An alternative
the most cost-effective way to reduce the ability of a net- partitioning is obtained by exchanging nodes that are in
work to transport a commodity, has been shown to be opposite sets. If the change in the score d is negative,
strongly NP-complete for general graphs and weakly NP- then the exchange is accepted because this represents
complete for series-parallel graphs (16). reduction in the energy. Otherwise, the exchange is
accepted with probability ed=t ; i.e., the probability of accep-
Probabilistic and Randomized Algorithms tance decreases with the increase in temperature t. This
method allows the simulated annealing algorithm to climb
Probabilistic algorithms are a class of algorithms that do out of local optimums in the search for a global optimum.
not depend exclusively on their input to carry out the The quality of the solution depends on the initial value of
computation. Instead, at one or more points in the course the temperature value and the cooling schedule. Such
of the algorithm where a choice has to be made, they use a parameters are determined experimentally. The quality
pseudorandom number generator to select randomly one of the obtained solutions is very good, altough the method
out of a finite set of alternatives for arriving at a solution. (being a heuristic) cannot guarantee optimality or even a
Probabilistic algorithms are fully programmable (i.e., they provably good solution.
are not nondeterministic), but in contrast with the deter-
ministic algorithms, they may give different results for the
same input instance if the initial state of the pseudorandom FURTHER READING
number generator differs each time.
Probabilistic algorithms try to reduce the computation E. Horowitz and S. Sahni, Fundamentals of Computer Algorithms.
time by allowing a small probability of error in the com- New York: Computer Science Press, 1984.
puted answer (Monte Carlo type) or by making sure that
GRAPH THEORY AND ALGORITHMS 11

BIBLIOGRAPHY 12. M. Abramovici, M. A. Breuer, and A. D. Friedman, Digital


Systems Testing and Testable Design. New York: Computer
1. B. Bollobas, Modern Graph Theory. New York: Springer Science Press, 1990.
Verlag, 1988. 13. M. R. Garey and D. S. Johnson, Computers and Intractability
2. S. Even, Graph Algorithms. New York: Computer Science A Guide to the Theory of NP-Completeness. New York: W. H.
Press, 1979. Freeman, 1979.
3. J. L. Gross and J. Yellen, Graph Theory and its Applications. 14. S. Skiena, Graph isomorphism, in Implementing Discrete
CRC Press, 1998. Mathematics: Combinatorics and Graph Theory with Mathe-
matica. Reading, MA: Addison-Wesley, 1990, pp. 181187.
4. R. Sedgewick, Algorithms in Java: Graph Algorithms.
Reading, MA: Addison-Wesley, 2003. 15. T. H. Cormen, C. E. Leiserson, and R. L. Rivest, Introduction to
Algorithms. Cambridge, MA: MIT Press, 1990.
5. K. Thulasiraman and M. N. S. Swamy, Graphs: Theory and
Algorithms. New York: Wiley, 1992. 16. C. A. Phillips, The network inhibition problem, Proc. 25th
Annual ACM Symposium on the Theory of Computing, 1993,
6. E. L. Lawler, Combinatorial OptimizationNetworks and
pp. 776785.
Matroids. New York: Holt, Rinehart and Winston, 1976.
17. D. R. Karger, P. N. Klein, and R. E. Tarjan, A randomized linear
7. C. H. Papadimitriou and K. Steiglitz, Combinatorial Optimi-
time algorithm to find minimum spanning trees, J. ACM, 42(2):
zation: Algorithms and Complexity. Englewood Cliffs, NJ:
321328, 1995.
Prentice Hall, 1982.
8. R. K. Ahuja, T. L. Magnanti, and J. B. Orlin, Network Flows.
Englewood Cliffs, NJ: Prentice Hall, 1993. DIMITRI KAGARIS
9. G. De Micheli, Synthesis and Optimization of Digital Circuits. SPYROS TRAGOUDAS
New York: McGraw-Hill, 1994. Southern Illinois University
10. N. A. Sherwani, Algorithms for VLSI Physical Design Auto- Carbondale, Illinois
mation. New York: Kluwer Academic, 1993.
11. D. Bertsekas and R. Gallagher, Data Networks. Upper Saddle
River, NJ: Prentice Hall, 1992.
L
LINEAR AND NONLINEAR PROGRAMMING
Note that the feasible region in Fig. 1(a) has a finite
INTRODUCTION number of extreme points (the black dots), which are fea-
sible points where at least n of the constraints hold with
An optimization problem is a mathematical problem in equality. Based on this observation, in 1951, George
which data are used to find the values of n variables so Dantzig (2) developed the simplex algorithm (SA) that, in
as to minimize or maximize an overall objective while a finite number of arithmetic operations, will determine the
satisfying a finite number of imposed restrictions on the status of any LP and, if optimal, will produce an optimal
values of those variables. For example: solution. The SA is the most commonly used method for
solving an LP and works geometrically as follows:
Linear Program (LP1) Nonlinear Program (NLP1)
Step 0 (Initialization). Find an initial extreme point,
maximize x1 x2 minimize 3x1  2x2 say a vector x x1 ; . . . xn , or determine none exists;
subject to x 3x  6 a subject to x21 in which case, stop, the LP is infeasible.
1 2 x22  9 a
2x1 x2  4 b x21  6x1 x22  6 b Step 1 (Test for Optimality). Perform a relatively
x1  0 c x1 unrestricted
simple computation to determine whether x is an
optimal solution and, if so, stop.
x2  0 d x2  0 c
Step 2 (Move to a Better Point). If x is not optimal,
use that fact to
The expression being maximized or minimized is called the (a) (Direction of Movement). Find a direction in
objective function, whereas the remaining restrictions the form of a vector d d1 ; . . . dn that points
that the variables must satisfy are called the constraints. from x along an edge of the feasible region so
The problem on the left is a linear program (LP) because the that the objective function value improves as
objective function and all constraints are linear and all you move in this direction.
variables are continuous; that is, the variables can assume (b) (Amount of Movement). Determine a real num-
any values, including fractions, within a given (possibly ber t that represents the maximum amount you
infinite) interval. In contrast, the problem on the right is a can move from x in the direction d and stay
nonlinear program (NLP) because the variables are contin- feasible. If t 1, stop, the LP is unbounded.
uous but the objective function or at least one constraint is not
(c) (Move). Move from x to the new extreme point
linear. Applications of such problems in computer science,
x td, and return to Step 1.
mathematics, business, economics, statistics, engineering,
operations research, and the sciences can be found in Ref. 1.
The translation of these steps to algebra constitutes
the SA. Because the SA works with algebra, all inequality
LINEAR PROGRAMMING constraints are first converted to equality constraints. To
do so, a nonnegative slack variable is added to (subtracted
The geometry of LP1 is illustrated in Fig. 1(a). A feasible from) each  (  ) constraint. For given feasible values of
solution consists of values for the variables that simulta- the original variables, the value of the slack variables
neously satisfy all constraints, and the feasible region is represents the difference between the left and the right
the set of all feasible solutions. The status of every LP is sides of the inequality constraint. For example, the cons-
always one of the following three types: traint x1 3x2  6 in LP1 is converted to x1 3x2 s1 6,
and if x1 2 and x2 0, then the value of the slack variable
 Infeasible, which means that the feasible region is is s1 4, which is the difference between the left side of
empty; that is, there are no values for the variables x1 3x2 and the right side of 6 in the original constraint.
that simultaneously satisfy all of the constraints. The algebraic analog of an extreme point is called a basic
 Optimal, which means that there is an optimal feasible solution.
solution; that is, there is a feasible solution that Step 0 of the SA is referred to as phase 1, whereas Steps 1
also provides the best possible value of the objective and 2 are called phase 2. Phase 2 is finite because there
function among all feasible solutions. (The optimal are a finite number of extreme points and no such point
solution for LP1 shown in Fig. 1(a) is x1 1:2 and visited by the SA is repeated because the objective function
x2 1:6.) strictly improves at each iteration, provided that t > 0 in
 Unbounded, which means that there are feasible Step 2(b) (even in the degenerate case when t 0, the
solutions that can make the objective function as large algorithm can be made finite). Also, a finite procedure for
(if maximizing) or as small (if minimizing) as desired. phase 1 is to use the SA to solve a special phase 1 LP that
involves only phase 2. In summary, the SA is finite.

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 LINEAR AND NONLINEAR PROGRAMMING

x2 x2
and dual at x and u are equal, then x and u are
optimal solutions for their respective problems.)
Optimal Solution
(Extreme Point) 2. To determine the status of an LP without having to
(a) 3 use a computer. (For example, if the primal LP is
2 Optimal
(c) Solution feasible and the dual LP is infeasible, then the primal
2
Feasible (b) Extreme LP is unbounded.)
1 Feasible
Region Points 1 3. To provide economic information about the primal
Region LP. (For example, the optimal value of a dual vari-
x1 x1 able, also called the shadow price of the associated
(d)
1 2 1 2 3 primal constraint, represents the change in the opti-
mal objective function value of the primal LP per unit
(a) The Geometry of LP1 (b) The Geometry of NLP1
of increase in the right-hand side of that constraint
Figure 1. The geometry of LP1 and NLP1. within a certain range of values around that right-
hand sideif all other data remain unchanged.)
4. To develop finite algorithms for solving the dual LP
See Ref. 3 for improvements in the computational effi- and, in so doing, provide a solution to the primal LP,
ciency and numerical accuracy of the SA. Many commercial assuming that both problems have optimal solutions.
software packages use the SA, from Solver, an add-in to a
Microsoft (Redmond, WA) Excel spreadsheet, to CPLEX Although efficient for solving most real-world problems,
(ILOG, Mountain View, CA) and LINDO (LINDO Systems, many versions of the SA can, in the worst case, visit an
Inc., Chicago, IL), stand-alone professional codes for sol- exponential (in terms of n) number of extreme points (see
ving large real-world problems with many thousands of Ref. 4 for the first such example). It is an open question
variables and constraints. These packages provide the as to whether there is a version of the SA that, in the worst
optimal solution and other economic information used in case, is polynomial (in the size of the data) although
postoptimality and sensitivity analysis to answer questions Borgwardt (5) proved that a version of the SA is polynomial
of the form, What happens to the optimal solution and on average. In 1979, Khachian (6) proposed the first poly-
objective function value if some of the data change? Such nomial algorithm for solving every LP. Karmarkar (7)
questions are asked because the data are often estimated subsequently developed the first polynomial algorithm
rather than known precisely. Although you can always that was also efficient in practice. These interior point
change data and resolve the problem, you can sometimes methods (IPM) go through the inside of the feasible region
answer these questions without having to use a computer [see Fig. 1(a)] rather than along the edges like the SA
when only one objective function coefficient or one value on does. Computational experience with current versions of
the right-hand side (rhs) of a constraint is changed. these IPMs indicate that they can be more efficient than
Much postoptimality analysis is based on duality theory, the SA for solving specially-structured large LPs but
which derives from the fact that associated with every generally are not more efficient than the SA for other
original primal LP having n variables and m constraints LPs. See Refs. 8 and 9 for a discussion of IPMs and
is another dual LP that has m variables and n constraints. Ref. 10 for linear programming and the SA.
Where the primal problem is to be maximized (minimized),
the dual problem is to be minimized (maximized), for NONLINEAR PROGRAMMING
example:
An NLP differs from an LP in both the problem structure
and the ability to obtain solutions. Although an LP always
Primal LP Dual LP has constraints (otherwise, the LP is unbounded), an NLP
can be unconstrainedthat is, have no constraintsor
min c1 x1    cn xn max b1 u1    bm um
constrained, for example, find x x1 ; . . . ; xn to:
s:t: a11 x1    a1n xn  b1 s:t: a11 u1    am1 um  c1
.. .. .. .. .. .. .. ..
. . . . . . . .
am1 x1    amn xn  bm a1n u1    amn um  cn Unconstrained Problem (NLP2) Constrained Problem (NLP3)
x1 ;  ; xn  0 u1 ;    ; un  0 minimize f x minimize f x
subject to g1 x  0
.. .. ..
. . .
gm x  0
Duality theory is used in the following ways:

1. As a test for optimality in Step 1 of the SA. (If x is Other differences between an LP and an NLP arise due
feasible for the primal LP and u is feasible for the dual to nonlinearities in the objective function and cons-
LP, and the objective function values of the primal traints of an NLP. Where an LP must be either infeasible,
LINEAR AND NONLINEAR PROGRAMMING 3

optimal, or unbounded, with a nonlinear objective function, practice, these algorithms are made to stop after a finite
an NLP can additionally approach, but never attain, its number of iterations with an approximation to x .
smallest possible objective function value. For example, In the following discussion, details pertaining to
when minimizing f x ex , the value of f approaches 0 developing such algorithms are presented for the uncon-
as x approaches 1 but never attains the value 0. strained NLP2 and the constrained NLP3, respectively.
The linear objective function and constraints in an From here on, it is assumed that the objective function f
LP allow for a computationally efficient test for opti- and all constraint functions g1 ; . . . ; gm are differentiable.
mality to determine whether a given feasible solution See Refs. 11 and 12 for a discussion of nondifferentiable
x x1 ; . . . ; xn is optimal. In contrast, given a feasible point optimization, also called nonsmooth optimization.
x for an NLP with general nonlinear functions, there is no
known efficient test to determine whether x is a global Unconstrained Nonlinear Programs
minimum of an NLP, that is, a point such that for every
The unconstrained problem NLP2 differs from an LP
feasible point y y1 ; . . . ; yn , f x  f y. There is also no
in that (1) the objective function of NLP2 is not linear
known efficient test to determine whether x is a local
and (2) every point is feasible for NLP2. These differences
minimum, that is, a feasible point such that there is a
lead to the following algorithm for attempting to solve
real number d > 0 for which every feasible point y with
NLP2 by modifying the simplex algorithm described
kx
Pn yk < d 2satisfies f x  f y [where kx  yk
previously:
i1 xi  yi ].
In the absence of an efficient test for optimality, many Step 0 (Initialization). Start with any values, say
NLP algorithms instead use a stopping rule to determine x x1 ; . . . ; xn , for NLP2 because NLP2 has no con-
whether the algorithm should terminate at the current straints that must be satisfied.
feasible point x. As described in the next two sections, these
Step 1 (Stopping Rule). Stop if the current point x
stopping rules are typically necessary conditions for x
to be a local minimum and usually have the following x1 ; . . . ; xn for NLP2 satisfies the following stopping
desirable properties: rule, which uses the partial derivatives of f and is a
necessary condition for x to be a local minimum:
 It is computationally practical to determine whether  
the current feasible solution x satisfies the stopping @f @f
r f x x; . . . ; x 0; . . . ; 0:
rule. @x1 @xn
 If x does not satisfy the stopping rule, then it is
computationally practical to find a direction in which Note that finding a point x where r f x 0; . . . ; 0 is
to move from x, stay feasible at least for a small amount a problem of solving a system of n nonlinear equations
of movement in that direction, and simultaneously in the n unknowns x1 ; . . . ; xn , which can possibly be
improve the objective function value. done with Newtons method or some other algorithm
for solving a system of nonlinear equations.
Be aware that if x is a feasible point for an NLP that Step 2 (Move to a Better Point). If r f x 6 0; . . . ; 0,
satisfies the stopping rule, this does not mean that x is a use that fact to
global minimum (or even a local minimum) of the NLP. (a) (Direction of Movement). Find a direction of
Additional conditions on the nonlinear functionssuch as descent d so that all small amounts of movement
convexityare required to ensure that x is a global mini- from x in the direction d result in points that have
mum. Indeed, it is often the case that nonconvex functions smaller objective function values than f(x). (One
make it challenging to solve an NLP because there can be such direction is d r f x, but other directions
many local minima. In such cases, depending on the initial that are usually computationally more efficient
values chosen for the variables, algorithms often terminate exist.)
at a local minimum that is not a global minimum. In (b) (Amount of Movement). Perform a possibly
contrast, due to the (convex) linear functions in an LP, infinite algorithm, called a line search, that
the simplex algorithm always terminates at an optimal may or may not be successful, to find a value of
solution if one exists, regardless of the initial starting a real number t > 0 that provides the smallest
feasible solution. value of f x td. If t 1, stop without finding
A final difficulty caused by nonlinear functions is that an optimal solution to NLP2.
algorithms for attempting to solve such problems are
(c) (Move). Move from x to the new point x td, and
usually not finite (unlike the simplex algorithm for LP).
return to Step 1.
That is, NLP algorithms usually generate an infinite
sequence of feasible values for the variables, say
The foregoing algorithm may run forever, generating a
X x0 ; x1 ; x2 ; . . .. Under fortunate circumstances, these
sequence of values for the variables, say X x0 ; x1 ; x2 ; . . ..
points will converge, that is, get closer to specific values for
Under fortunate circumstances, these points will con-
the variables, say x , where x is a local or global minimum
verge to specific values for the variables, say x , where x
for the NLP, or at least satisfies the stopping rule. In
4 LINEAR AND NONLINEAR PROGRAMMING

is a local or global minimum for NLP2 or at least satisfies t 1, stop without finding an optimal solution
r f x 0; . . . ; 0. to NLP3.
(c) (Move). Move from x to the new feasible point
Constrained Nonlinear Programs x td, and return to Step 1.
Turning now to constrained NLPs, as seen by comparing
Fig. 1(a) and (b), the feasible region of a constrained NLP The foregoing algorithm may run forever, generating a
can be different from that of an LP and the optimal solution sequence of values for the variables, say X x0 ; x1 ; x2 ; . . ..
need not be one of a finite number of extreme points. These Under fortunate circumstances, these points will converge
differences lead to the following algorithm for attempting to to specific values for the variables, say x , where x is a local
solve NLP3 by modifying the simplex algorithm described or global minimum for NLP3 or a KKT point.
previously: In addition to the foregoing methods of feasible direc-
tions, many other approaches have been developed for
Step 0 (Initialization). There is no known finite pro- attempting to solve NLP2 and NLP3, including conjugate
cedure that will find an initial feasible solution for gradient methods, penalty and barrier methods, sequen-
NLP3 or determine that NLP3 is infeasible. Thus, a tial quadratic approximation algorithms, and fixed-point
possibly infinite algorithm is needed for this step and, algorithms (see Ref. 13 for details). A discussion of interior
under favorable circumstances, produces a feasible point methods for solving NLPs can be found in Ref. 14.
solution. Commercial software packages from Solver in Excel and
Step 1 (Stopping Rule). Stop if the current feasible GRG exist for attempting to solve such problems and can
solution x x1 ; . . . ; xn for NLP3 satisfies the follow- currently handle up to about 100 variables and 100 con-
ing stopping rule: Real numbers u1 ; . . . ; um exist such straints. However, if an NLP has special structure, it may
that the following KarushKuhnTucker (KKT) be possible to develop an efficient algorithm that can solve
conditions hold at the point x (additional conditions substantially larger problems.
on f and gi , such as convexity, are required to ensure Topics related to LP and NLP include integer program-
that x is a global minimum): ming (in which the value of one or more variable must be
integer), network programming, combinatorial optimiza-
(a) (feasibility) For each i 1; . . . ; m; gi x  0 and tion, large-scale optimization, fixed-point computation, and
ui  0. solving systems of linear and nonlinear equations.
(b) (complementarity) For each i 1; . . . ; m;
ui gi x  0. BIBLIOGRAPHY
P
(c) (gradient condition) r f x m i1 ui rgi x
0; . . . ; 0. 1. H. P. Williams, Model Building in Mathematical Program-
ming, 4th ed., New York: Wiley, 1999.
Note that when there are no constraints, the KKT 2. G. B. Dantzig, Maximization of a linear function of variables
conditions reduce to r f x 0; . . . ; 0. Also, when f subject to linear inequalities, in T. C. Koopmans (ed.), Activity
and gi are linear, and hence NLP3 is an LP, the values Analysis of Production and Allocation. New York: Wiley, 1951.
u ui ; . . . ; um ) that satisfy the KKT conditions are 3. R. E. Bixby, Solving real-world linear programs: A decade and
optimal for the dual LP. That is, conditions (a) and (c) more of progress, Oper. Res., 50(1): 315, 2002.
of the KKT conditions ensure that x is feasible for the 4. V. Klee and G. J. Minty, How good is the simplex algorithm?
primal LP and u is feasible for the dual LP, whereas O. Shisha (ed.), Inequalities III, New York: Academic Press,
conditions (b) and (c) ensure that the objective func- 1972.
tion value of the primal LP at x is equal to that of the 5. K. H. Borgwardt, Some distribution independent results about
dual LP at u. Hence, as stated in the first use of the assymptotic order of the average number of pivot steps in
duality theory in the Linear Programming section, the simplex algorithm, Math. Oper. Res., 7: 441462, 1982.
x is optimal for the primal LP and u is optimal for the 6. L. G. Khachian, Polynomial algorithms in linear programming
dual LP. (in Russian), Doklady Akademiia Nauk SSSR, 244: 1093
1096, 1979; English translation: Soviet Mathematics Doklady,
Step 2 (Move to a Better Point). If x is not a KKT 20: 191194.
point, use that fact to 7. N. Karmarkar, A new polynomial-time algorithm for linear
(a) (Direction of Movement). Find a feasible direc- programming, Combinatorica, 4: 373395, 1984.
tion of improvementd so that all small amounts of 8. C. Roos, T. Terlaky, and J. P. Vial, Theory and Algorithms for
movement from x in the direction d result in Linear Optimization: An Interior Point Approach, New York:
feasible solutions that have smaller objective Wiley, 1997.
function values than f(x). 9. Stephen J. Wright, Primal-dual Interior-Point Methods,
(b) (Amount of Movement). Determine the max- Society for Industrial and Applied Mathematics, Philadelphia,
imum amount t you can move from x in the 1997.
direction d, and stay feasible. Then perform a 10. C. M. S. Bazaraa, J. J. Jarvis, and H. Sherali, Linear Pro-
possibly infinite algorithm, called a constrained gramming and Network Flows, 3rd ed., New York: Wiley, 2004.
line search, in an attempt to find a value of t that 11. G. Giorgi, A. Guerraggio, and J. Thierfelder, Mathematics
minimizes f x td over the interval 0; t . If of Optimization: Smooth and Nonsmooth Case, 1st ed.,
Amsterdam: Elsevier, 2004.
LINEAR AND NONLINEAR PROGRAMMING 5

12. D. Klatte and B. Kummer, Nonsmooth Equations in Optimiza- DANIEL SOLOW


tionRegularity, Calculus, Methods and Applications, Dor- Case Western Reserve
drecht: Kluwer Academic, 2002. University
13. C. M. S. Bazaraa, H. Sherali, and C. M. Shetty, Nonlinear Cleveland, Ohio
Programming: Theory and Algorithms, 2nd ed., New York:
Wiley, 1993.
14. T. Terlaky (ed.), Interior Point Methods of Mathematical Pro-
gramming, Dordrecht, The Netherlands: Kluwer Academic,
1996.
M
MARKOV CHAIN MONTE CARLO If the function vX has a very large range of variations
SIMULATIONS with one or several sharp peaks, the sum in Equation 2 is
dominated by a few rare configurations, and the Monte
Markov Chain Monte Carlo (MCMC) simulations are Carlo method does not work (most samples are drawn in
widely used in many branches of science. They are nearly vain). This is the case of the problem considered in Ref. 1,
as old as computers themselves, since they started in earn- where vX is a Boltzmann weight, the exponential of N
est with a 1953 paper by Nicholas Metropolis, Arianna times a function of order one, with N the number of mole-
Rosenbluth, Marshall Rosenbluth, Augusta Teller, and cules in a box, which is a notoriously large number.
Edward Teller (1) at the Los Alamos National Laboratory, The Markov chain Monte Carlo method allows overcom-
New Mexico.These authors invented what is nowadays ing this problem by generating a set of random X 2 V,
called the Metropolis algorithm. Various applications distributed according to the full measure dmX, using
and the history of the basic ideas are reviewed in an auxiliary Markov chain. Note that often, in particular
the proceedings (2) of the 2003 Los Alamos conference, in the physics literature, Monte Carlo is used as a short
which celebrated the fiftieth anniversary of the Metropolis name for Markov chain Monte Carlo (MCMC). MCMC is
algorithm. sometimes called dynamic Monte Carlo, in order to distin-
guish it from the usual, static, Monte Carlo. Many prob-
ability distributions, which cannot be sampled directly,
OVERVIEW allow for MCMC sampling. From now on we write a formula
for a discrete space V with Kst states, although the results
The Monte Carlo method to Rcompute integrals (3) amounts
can be generalized. A Markov chain (47) is a sequence of
to approximate an integral V dmXOX, inside a volume
random variables X1 ; X2 ; X3 ; . . ., that can be viewed as
R where dmX is some integration measure and
V, the successive states of a system as a function of a discrete
V dmX < 1, by sampling.
R Without loss of generality, time t, with a transition probability PXt1 rjXt s
one can assume that V dmX 1, and consider accord- Wr;s that is a function of r and s only. The next future state
ingly dmX as a probability measure. Drawing indepen- Xt1 is a function of the current state Xt alone. Andrey
dently Nsample values of X 2 V according to this probability Markov (8) was the first to analyze these processes. In order
measure, one has
to analyze Markov chains, one introduces an ensemble of
chains with an initial probability distribution PX0 s. By
Z NX
samples
1 multiplying this vector by the transition matrix repeatedly,
dmXOX  OXs (1)
V Nsamples one obtains PX1 s, and then PX2 s; . . . ; successively.
s1
The natural question is whether this sequence converges.
where Xs is the sth random variable drawn. The right hand One says that a probability distribution w fws gs 2 V is an
side of Equation 1 is an unbiased estimator of the integral, equilibrium distribution of a Markov chain if it is let
namely it is exact in average, for any Nsample. It converges invariant by the chain, namely if
toward the correct value when Nsamples ! 1, with a
p Kst
X
1= Nsamples leading correction. This method is of practical
Wr;s vs vr (3)
use if one can easily draw, in a computer program, random
s1
values Xs 2 V according to the measure dmX. This is the
case in particular if one integrates inside an N- dimensional
Q This condition is called balance in the physics literature.
hypercube with the flat measure dmflat X / N k
k1 dX , A Markov chain is said to be ergodic (irreducible and
k
where the X s are the Cartesian components of X, or aperiodic in the mathematical literature) if for all states
when the integral reduces to a finite sum. This is not the r; s 2 V there is a Nr;s such that for all t > Nr;s the probability
case in the situation where this simple measure is multi- W t s;r to go from r to s in t steps is nonzero. If an equilibrium
plied by a nontrivial function vX of the components X k . distribution exists and if the chain is irreducible and aper-
If vX is a smooth function in V with a limited range of iodic, one can show (47) that, starting from any distribu-
variations, one can still draw values of X according to the tion PX0 s, the distribution after t steps PXt s
simple measureRdmflat and write (assuming
R without loss of converges when t ! 1 toward the equilibrium configura-
generality that V dmX 1 and V dmflat X 1) tion vs .
Z Z The Metropolis algorithm (see the next section) offers a
dmXOX dmflat XvXOX practical way to generate a Markov chain with a desired
V V equilibrium distribution, on a computer using a pseudor-
NX
sample andom numbers generator. Starting from an initial config-
1
 vXs OXs 2 uration X0 , successive configurations are generated. In
Nsamples s1 most cases, the convergence of PXt s toward vs is expo-
nential in t and one can safely assume that, after some
number of steps teq , equilibrium is reached and that the
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 MARKOV CHAIN MONTE CARLO SIMULATIONS

configurations Xteq 1 ; Xteq 2 ; . . . are distributed according to MCMC AND STATISTICAL PHYSICS
vX.
Whereas the random samples used in a conventional As mentioned, the MCMC algorithm was invented to inves-
Monte Carlo (MC) integration are obviously statistically tigate problems in statistical physics. The aim of statistical
independent, those used in MCMC are correlated. The physics is to predict the average macroscopic properties of
effective number of independent events generated by an systems made of many constituents, which can be, for
equilibrated Markov chain is given by the number of example, molecules in a box (as in the original article of
steps done divided by a quantity called integrated auto- Metropolis et al.), magnetic moments (called spins) at fixed
correlation time tint . In most cases, tint does not depend on locations in a piece of material, or polymer chains, in a
the quantity O measured, but there are exceptions like, for solvent. If one considers the so-called canonical ensemble,
example the vicinity of a second-order (continuous) phase where the system has a fixed temperature T, one knows that
transition. The algorithm will fail if tint is too big. In the probability to observe a given microscopic configuration
practice it can be quite difficult to estimate tint reliably (or micro state) s (defined in the three examples given above
and there can also be a residual effect of the starting by the positions and velocities of all molecules; the orienta-
position. More sophisticated MCMC-based algorithms tions of all the spins; and the exact configuration of all the
such as coupling from the past (9,10) produce indepen- polymer chains, respectively) is proportional to the Boltz-
dent samples rigorously but at the cost of additional mann weight expEs =kB T expbEs , where Es is the
computation and an unbounded (although finite on aver- energy of the configuration s, kB is the Boltzmann constant,
age) running time. and T is the temperature. (In the following discussion, we
The method was originally developed to investigate a will use a unit of temperature such that kB 1). Let Os be
statistical physics problem. Suitable applications arise as the value of O computed in configuration s. The mean value
well in computational biology, chemistry, physics, econom- of any macroscopic observable O (e.g. the energy) is given by
ics, and other sciences. MCMC calculations have also revo- the average of Os over all possible configurations s, weighted
lutionized the field of Bayesian statistics. by the Boltzmann weight of the configuration. This sum
Most concepts of modern MCMC simulation were ori- (or integral if one has continuous variables) is to be normal-
ginally developed by physicists and chemists, who still ized by the sum over all configurations of the Boltzmann
seem to be at the cutting edge of new innovative develop- weight [the so-called partition function ZT], namely
ments into which mathematician, computer scientists, and
statisticians have joined. Their interest developed mainly Kst
X
after a paper by Hastings (11), who generalized the accept/ ^ OT
O ^ hOi Z1 T Os eEs =T (4)
reject step of the Metropolis method. Unfortunately a lan- s1
guage barrier developed that inhibits cross-fertilization. XKst
For instance the heat bath algorithm, which may be where ZT expEs =T. The index s 1; . . . ; Kst
s1
applied when the conditional distributions can be sampled labels the configuration (states) of the system.
exactly, was introduced by physicist Refs. (12) and (13). A particularly simple system is the Ising model for which
Then it was rediscovered in the context of Bayesian restora- the energy is given by
tion of images under the name Gibbs sampler (14).
Another example is the umbrella sampling algorithm X
E si s j (5)
(15) that was invented in chemical physics and later redis- <ij>
covered and improved by physicists. This is just two of
many examples of how different names for the same Here the sum is over the nearest-neighbor sites of a hyper-
method emerged. The reader should be aware that this cubic D-dimensional lattice and the Ising spins take
article was written by physicists, so that their notations Q the
values si 1, i 1; . . . ; N for a system of N D i1 Li
and views are dominant in this article. The book by Liu (16) spins. Periodic boundary conditions are used in most simu-
tries to some extent to bridge the language barrier. Other lations. The energy per spin is e E=N. The model
textbooks include those by Robert and Casella (17) for the describes a ferromagnet for which the magnetic moments
more mathematically minded reader, Landau and Binder are simplified to 1 spins at the sites of the lattice. In the
(18) for statistical physicists, Berg (19) from a physicist N ! 1 limit (and for D > 1), this model has two phases
point of view, but also covering statistics and providing separated by a phase transition (a singularity) at the
extensive computer code (in Fortran). Kendall, et al. (20) critical temperature T Tc . This is a second-order phase
edited a book that combines expositions from physicists, transition, which is continuous in the energy, but not in
statisticians, and computer scientists. specific heat. This model can be solved analytically when
In the following discussion, we will first explain the basic D 2. (This means that one can obtain exact analytical
method and illustrate it for a simple statistical physics expressions for the thermodynamic quantities, e.g., the
system, the Ising ferromagnet in two dimensions, followed energy per spin, as a function of temperature, in the
by a few remarks on autocorrelations and cluster algo- N ! 1 limit.) This makes the two-dimensional (2-D) Ising
rithms. An overview of the MCMC updating scheme is model an ideal testbed for MCMC algorithms.
subsequently given. The final section of this article focuses
on so-called generalized ensemble algorithms.
MARKOV CHAIN MONTE CARLO SIMULATIONS 3

The number of configurations of the Ising model is (see the last section of this article). Given a configuration s,
Kst 2N , because each spin can occur in two states (up the algorithm proposes a new configuration r with a priori
or down). Already for a moderately sized lattice, say linear probabilities f r; s. This new configuration r is accepted
dimension L1 L2 100 in D 2, Kst is a tremendously with probability
large number. With the exception of very small systems, it
  
is therefore impossible to do the sums in Equation 4 expli- PB;r 1 for Er < Es
ar;s min 1; (9)
citly. Instead, the large value of Kst suggests a statistical PB;s ebEr Es for Er > Es
evaluation.
If the new configuration is rejected, the old configuration is
IMPORTANCE SAMPLING THROUGH MCMC kept and counted again. For such decisions one uses nor-
mally a pseudorandom number generator, which delivers
As explained in the previous section, one needs a procedure uniformly distributed pseudorandom numbers in the range
that generates configurations s with the Boltzmann prob- 0; 1; see Refs. (18) and (19) for examples, and Ref. (21) for
ability the mathematics involved. The Metropolis algorithm gives
then rise to the transition probabilities
PB;s cB wB;s cB ebEs (6)
Wr;s f r; sar;s r 6 s (10)
where the constant cB is determined by the condition
X and
P 1. The vector PB : fPB;s g is called the Boltz-
s B;s
mann state. When configurations are generated with the X
probability PB;s , the expectation values [Equation (4)] are Ws;s f s; s f r; s1  ar;s (11)
r 6 s
estimated by the arithmetic averages:

NX
samples
Therefore, the ratio Wr;s =Ws;r satisfies the detailed balance
1 condition [Equation (8)] if
hOi lim Os (7)
Nsamples ! 1 Nsamples s1
f r; s f s; r (12)
With the MCMC algorithm, this is obtained from a Markov
chain with the following properties: holds. This condition can be generalized when also the
acceptance probability is changed (11). In particular such
1. Irreducibility and aperiodicity (ergodicity in the phy- biased Metropolis algorithms allow for approaching the
sics literature): For any two configurations r and s, an heat-bath updating scheme (22).
integer Nr;s exists such that for all n > Nr;s , the prob- For the Ising model, the new putative configuration
ability W n r;s is nonzero. differs from the old one by the flip of a single spin. Such a
X
2. Normalization: Wr;s 1. single spin update requires a number of operations of order
r one and leads to a ratio PB;r =PB;s in Equation (9). This is
3. Stationarity of the Boltzmann distribution (balance fundamental in order to have an efficient MCMC algorithm.
in the physics literature): The Boltzmann state [Equa- The spin itself may be chosen at random, although some
tion (6)] is an equilibrium distribution, namely a right sequential procedure is normally more efficient (19). The
eigenvector
X of the matrix W with eigenvalue one, i.e., latter procedure violates the detailed balance condition but
bEs
s
Wr;s e ebEr holds. fulfills the balance condition, and thus, it does lead to the
probability of states approaching the Boltzmann distribu-
There are many ways to construct a Markov process tion [Equation (6)]. The unit of Monte Carlo time is usually
satisfying 1, 2, and 3. In practice, MCMC algorithms are defined by N single spin updates, aka a lattice sweep or an
often based on a stronger condition than 3, namely, update per spin. Many ways to generate initial configura-
tions exist. Two easy to implement choices are as follows:
3. Detailed balance:
1. Use random sampling to generate a configuration of
Wr;s ebEs Ws;r ebEr 8 r; s: (8) 1 spins.
2. Generate a completely ordered configuration, either
all spin 1 or 1.
METROPOLIS ALGORITHM AND ILLUSTRATION FOR THE
ISING MODEL
Figure 1 shows two Metropolis energy time series (the
successive values of the energy as a function of the discrete
Detailed balance obviously does not uniquely fix the transi-
Monte Carlo time) of 6000 updates per spin for a 2D Ising
tion probabilities Wr;s . The original Metropolis algorithm
model on a 100  100 lattice at b 0:44, which is close to
(1) has remained a popular choice because of its generality
the (infinite volume)
pphase transition temperature of this
(it can be applied straightforwardly to any statistical phy-
model (bc ln1 2=2 0:44068 . . .). One can compare
sics model) and its computational simplicity. The original
with the exact value for e (23) on this system size, which is
formulation generates configurations with the Boltzmann
indicated by the straight line in Fig. 1. The time series
weights. It generalizes immediately to arbitrary weights
4 MARKOV CHAIN MONTE CARLO SIMULATIONS

can be approximated by tabulating MetropolisHast-


ings probabilities (22).
3. For simulations at (very) low temperatures, event-
driven simulations (26,27), also known as the N-fold
way, are most efficient. They are based on Metropolis
or heat-bath schemes.
4. As mentioned before, for a number of models with
second order phase transitions the MCMC efficiency
is greatly improved by using nonlocal cluster updat-
ing (24).
5. Molecular dynamics (MD) moves can be used as
proposals in MCMC updating (28,29), a scheme called
hybrid MC, see Ref. (30) for a review of MD simula-
tions.
Figure 1. Two-dimensional Ising model: Two initial Metropolis
More examples can be found in the W. Krauth contribu-
time series for the energy per spin e.
tion in Ref. (31) and A. D. Sokal in Ref. (32).

corresponding to the ordered start begins at e 2 and


GENERALIZED ENSEMBLES FOR MCMC SIMULATIONS
approaches the exact value from below, whereas the other
time series begins (up to statistical fluctuation) at e 0 and
The MCMC method, which we discussed for the Ising
approaches the exact value from above. It takes a rather
model, generates configurations distributed according to
long MCMC time of about 3000 to 4000 updates per spin
the BoltzmannGibbs canonical ensemble, with weights
until the two time series start to mix. For estimating
PB;s . Mean values of physical observables at the tempera-
equilibrium expectation values, measurements should
only be counted from there on. A serious error analysis ture chosen are obtained as arithmetic averages of the
for the subsequent equilibrium simulation finds an inte- measurements made [Equation 7]. There are, however,
grated autocorrelation time of tint  1700 updates per spin. in statistical physics, circumstances where another ensem-
This long autocorrelation time is related to the proximity of ble (other weights PNB;s ) can be more convenient. One case
is the computation of the partition function ZT as a
the phase transition (this is the so-called critical slowing
down of the dynamics). One can show that, at the transition function of temperature. Another is the investigation of
point, tint diverges like a power of N. configurations of physical interest that are rare in the
For this model and a number of other systems with canonical ensemble. Finally the efficiency of the Markov
second-order phase transitions, cluster algorithms process, i.e., the computer time needed to obtain a desired
(24,25) are known, which have much shorter autocorrela- accuracy, can depend greatly on the ensemble in which the
tion times, in simulations close to the phase transition simulations are performed. This is the case, for example
point. For the simulation of Fig. 1, tint  5 updates per when taking into account the Boltzmann weights, the
phase space separates, loosely speaking, into several popu-
spin instead of 1700. Furthermore, for cluster algorithms,
lated regions separated by mostly vacant regions, creating
tint grows much slower with the system size N than for the
so-called free energy barriers for the Markov chain.
Metropolis algorithm. This happens because these algo-
A first attempt to calculate the partition function by
rithms allow for the instantaneous flip of large clusters of
MCMC simulations dates back to a 1959 paper by Salsburg
spins (still with order one acceptance probability) in con-
et al. Ref. (33). As noticed by the authors, their method is
trast to the local updates of single spins done in the Metro-
restricted to very small lattices. The reason is that their
polis and heat-bath-type algorithms. Unfortunately such
approach relies on what is called in the modern language
nonlocal updating algorithms have remained confined to
reweighting. It evaluates results at a given temperature
special situations. The interested reader can reproduce
from data taken at another temperature. The reweighting
these Ising model simulations discussed here using the
method has a long history. McDonald and Singer (34) were
code that comes with Ref. 19.
the first to use it to evaluate physical quantities over a
range of temperatures from a simulation done at a single
UPDATING SCHEMES temperature. Thereafter dormant, the method was redis-
covered in an article (35) focused on calculating complex
We give an overview of MCMC updating schemes that is, zeros of the partition function. It remained to Ferrenberg
because of space limitations, not complete at all. and Swendsen (36), to formulate a crystal clear picture for
what the method is particularly good, and for what it is not:
1. We have already discussed the Metropolis scheme (1) The reweighting method allows for focusing on maxima of
and its generalization by Hastings (7). Variables of appropriate observables, but it does not allow for covering a
the system are locally updated. finite temperature range in the infinite volume limit.
2. Within such local schemes, the heat-bath method To estimate the partition function over a finite energy
(12-14) is usually the most efficient. In practice it density range De, i.e., DE  N, one can patch the histograms
MARKOV CHAIN MONTE CARLO SIMULATIONS 5

from simulations at several temperatures. Such multi-his- on well-defined weight functions and offers a variety of
togram methods also have a long tradition. In 1972 Valleau methods to find a working approximation. Here a working
and Card (37) proposed the use of overlapping bridging approximation is defined as being accurate enough, so that
distributions and called their method multistage the desired energy range will indeed be covered after the
sampling. Free energy and entropy calculations become weight factors are fixed. A similar approach can also be
possible when one can link the temperature region of constructed for cluster algorithms (42). A typical simula-
interest with a range for which exact values of these tion consists then of three parts:
quantities are known. Modern work (38,39) developed effi-
cient techniques to combine the overlapping distributions 1. Construct a working approximation of the weight
into one function Pmuca . The WangLandau recursion (43) is
R estimate of the spectral density rE [with
ZT dErEexpbE] and to control the statistical an efficient approach. See Ref. (44) for a comparison
errors of the estimate. However, the patching of histograms with other methods.
from canonical simulations faces several limitations: 2. Perform a conventional MCMC simulation with these
weight factors.
1. The number
p of canonical simulations needed diverges 3. Reweight the data to the desired ensemble: hOi
like N when one wants to cover a finite, noncritical NX
samples
range of the energy density. 1
lim Os PB;s =Pmuca;s Details can be
Nsamples ! 1Nsamples
2. At a first-order phase transition point, the canonical s1
probability of configurations with an interface found in Ref. 19.
decreases exponentially with N.
Another class of algorithms appeared in a couple of years
One can cope with the difficulties of multi-histogram around 1991 in several papers (4550), which all aimed at
methods by allowing arbitrary sampling distributions improving MCMC calculations by extending the confines of
instead of just the BoltzmannGibbs ensemble. This was the canonical ensemble. Practically most important has
first recognized by Torrie and Valleau (15) when they been the replica exchange method, which is also known
introduced umbrella sampling. However, for the next 13 under the names parallel tempering and multiple Markov
years, the potentially very broad range of applications of chains. In the context of spin glass simulations, an
the basic idea remained unrecognized. A major barrier, exchange of partial lattice configurations at different tem-
which prevented researchers from trying such extensions, peratures was proposed by Swendsen and Wang (45). But it
was certainly the apparent lack of direct and straightfor- was only recognized later (46,50) that the special case for
ward ways of determining suitable weighting functions which entire configurations are exchanged is of utmost
PNB;s for problems at hand. In the words of Li and Scheraga importance, see Ref. 19 for more details. Closely related
(40): The difficulty of finding such weighting factors has is the Jump Walker (J-Walker) approach (51), which feeds
prevented wide applications of the umbrella sampling replica from a higher temperature into a simulation at a
method to many physical systems. lower temperature instead of exchanging them. But in
This changed with the introduction of the multicanoni- contrast to the replica exchange method this procedure
cal ensemble multicanonical ensemble (41), which focuses disturbs equilibrium to some extent. Finally, and perhaps
most importantly, from about 1992 on, applications of
generalized ensemble methods diversified tremendously
as documented in a number of reviews (5254).

Figure 2. Multicanonical Pmuca E together with canonical PE


energy distribution as obtained in Ref. 41 for the 2d 10-state Potts
model on a 70  70 lattice. In the multicanonical ensemble, the gap Figure 3. Canonical energy distributions PE from a parallel
between the two peaks present in PE is filled up, accelerating tempering simulation with eight processes for the 2d 10-state Potts
considerably the dynamics of the Markov Chain. model on 20  20 lattices (Fig. 6.2 in Ref. 19).
6 MARKOV CHAIN MONTE CARLO SIMULATIONS

The basic mechanisms for overcoming energy barriers 14. S. Geman and D. Geman, Stochastic relaxation, Gibbs distri-
with the multicanonical algorithm are best illustrated for butions, and the Bayesian restoration of images. IEEE Trans.
first-order phase transitions (namely a transition with a Pattern Anal. Machine Intelli. 6: 721741, 1984.
nonzero latent heat, like the icewater transition), where 15. G. M. Torrie and J. P. Valleau, Nonphysical sampling distribu-
one deals with a single barrier. For a finite system the tions in Monte Carlo free energy estimation: Umbrella sam-
temperature can be fine-tuned to a pseudocritical value, pling. J. Comp. Phys., 23: 187199, 1977.
which is defined so that the energy density exhibits two 16. J. S. Liu, Monte Carlo strategies in scientific computing.
peaks of equal heights. To give an example, Fig. 2 shows for New York: Springer, 2001.
the 2d 10-state Potts (55) the canonical energy histogram at 17. C. P. Robert and G. Casella, Monte Carlo statistical methods
a pseudocritical temperature versus the energy histogram (2nd ed.), New York: Springer, 2005.
of a multicanonical simulation (41). The same barrier can 18. D. P. Landau and K. Binder, A guide to Monte Carlo simula-
also be overcome by a parallel tempering simulation but in a tions in statistical physics. Cambridge: Cambridge University
Press, 2000.
quite different way. Figure 3 shows the histograms from a
parallel tempering simulation with eight processes on 19. B. A. Berg, Markov chain Monte Carlo simulations and their
statistical analysis. Singapore: World Scientific, 2004.
20  20 lattices. The barrier can be jumped when there
are on both sides temperatures in the ensemble, which are 20. W. S. Kendall, F. Liang, and J.-S. Wang (Eds), Markov Chain
Monte Carlo: Innovations and applications (Lecture Notes
sufficiently close to a pseudocritical temperature for which
Series, Institute for Mathematical Sciences, National Univer-
the two peaks of the histogram are of competitive height. In sity of Singapore). Singapore: World Scientific, 2005.
complex systems with a rugged free energy landscape (spin
21. D. Knuth, The art of computer programming, Vol 2: Semi
glasses, biomolecules, . . .), the barriers can no longer be numerical algorithms, Third Edition. Reading, MA: Addison-
explicitly controlled. Nevertheless it has turned out that Wesley, 1997, pp. 1193
switching to the discussed ensembles can greatly enhance 22. A. Bazavov and B. A. Berg, Heat bath efficiency with Metro-
the MCMC efficiency (53,54). For a recent discussion of polis-type updating. Phys. Rev. D., 71: 114506, 2005.
ensemble optimization techniques, see Ref. (56) and refer- 23. A. E. Ferdinand and M. E. Fisher, Bounded and inhomoge-
ences given therein. neous Ising models. I. Specific-heat anomaly of a finite lattice.
Phys. Rev., 185: 832846, 1969.
BIBLIOGRAPHY 24. R. H. Swendsen and J.-S. Wang, Non-universal critical
dynamics in Monte Carlo simulations. Phys. Rev. Lett., 58:
8688, 1987.
1. N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H.
Teller, and E. Teller, Equation of state calculations by fast 25. U. Wolff, Collective Monte Carlo updating for spin systems.
computing machines. J. Chem. Phys., 21: 10871092, 1953. Phys. Rev. Lett., 62: 361363, 1989.
2. J. Gubernatis (Editor). The Monte Carlo method in the physical 26. A. B. Bortz, M. H. Kalos, and J. L. Lebowitz, A new algorithm
sciences: Celebrating the 50th anniversary of the Metropolis for Monte Carlo simulation of Ising spin systems. J. Comp.
algorithm, AIP Conference Proc. Vol 690, Melville, NY, 2003. Phys., 17: 1018, 1975.
3. N. Metropolis and S. Ulam, The Monte Carlo method. J. Am. 27. M. A. Novotny, A tutorial on advanced dynamic Monte carlo
Stat. Assoc., 44: 335341, 1949. methods for systems with discrete state spaces. Ann. Rev.
Comp. Phys., 9: 153210, 2001.
4. J. G. Kemeny and J. L. Snell, Finite Markov Chains.New York:
Springer, 1976. 28. S. Duane, A. D. Kennedy, B. J. Pendleton, and D. Roweth,
Hybrid Monte Carlo. Phys. Lett. B., 195: 216222, 1987.
5. M. Iosifescu, Finite Markov Processes and Their Applica-
tions.Chichester: Wiley, 1980. 29. B. Mehlig, D. W. Heermann, and B. M. Forrest, Hybrid Monte
Carlo Methods for condensed-matter systems. Phys. Rev. B.,
6. K. L. Chung, Markov Chains with Stationary Transition Prob-
45: 679685, 1992.
abilities, 2nd ed., New York: Springer, 1967.
30. D. Frenkel and B. Smit, Understanding molecular simulation.
7. E. Nummelin, General Irreducible Markov Chains and Non-
San Diego CA: Academic Press, 1996.
Negative Operators.Cambridge: Cambridge Univ. Press, 1984.
31. J. Kertesz and I. Kondor (Ed.), Advances in Computer Simula-
8. A. A. Markov, Rasprostranenie zakona bolshih chisel na veli-
tion. Lecture Notes in Physics, Heidelberg: Springer Verlag,
chiny, zavisyaschie drug ot druga. Izvestiya Fiziko-matema-
1998.
ticheskogo obschestva pri Kazanskom Universitete, 2-ya
seriya, tom 15: 135156, 1906. 32. K. Binder (Ed.), Monte Carlo and molecular dynamics simula-
tions in polymer science, Oxford: Oxford University Press, 1996.
9. J. G. Propp and D. B. Wilson, Exact sampling with coupled
Markov chains and applications in statistical mechanics. Ran- 33. Z. W. Salsburg, J. D. Jacobson, W. S. Fickett, and W. W. Wood.
dom Structures and Algorithms, 9: 223252, 1996. Applications of the Monte Carlo method to the lattice-gas
model. I. Two-dimensional triangular lattice. J. Chem.
10. J. G. Proof and D. B. Wilson, Coupling from the Past Users
Phys., 30: 6572, 1959.
Guide. DIMACS Series in Discrete Mathematics and Theore-
tical Computer Science (AMS), 41: 181192, 1998. 34. I. R. McDonald and K. Singer, Calculation of thermodynamic
properties of liquid argon from Lennard-Jones parameters by a
11. W. K. Hastings, Monte Carlo sampling methods using Markov
Monte Carlo Method. Discussions Faraday Soc., 43: 4049,
chains and their applications. Biometrika, 57: 97109, 1970.
1967.
12. R. J. Glauber, Time-dependent statistics of the Ising model. J.
35. M. Falcioni, E. Marinari, L. Paciello, G. Parisi, and B.
Math. Phys., 4: 294307, 1963.
Taglienti, Complex zeros in the partition function of four-
13. M. Creutz, Monte Carlo study of quantized SU(2) gauge theory. dimensional SU(2) lattice gauge model. Phys. Lett. B., 108:
Phys. Rev. D., 21: 23082315, 1980. 331332, 1982.
MARKOV CHAIN MONTE CARLO SIMULATIONS 7

36. A. M. Ferrenberg and R. H. Swendsen, New Monte Carlo calculation of the free energy: Method of expanded ensembles.
technique for studying phase transitions. Phys. Rev. Lett., J. Chem. Phys., 96: 17761783, 1992.
61: 26352638, 1988; 63: 1658, 1989. 50. K. Hukusima and K. Nemoto, Exchange Monte Carlo method
37. J. P. Valleau and D. N. Card, Monte Carlo estimation of the free and applications to spin glass simulations. J. Phys. Soc. Japan,
energy by multistage sampling. J. Chem. Phys., 37: 54575462, 65: 16041608, 1996.
1972. 51. D. D. Frantz, D. L. Freemann, and J. D. Doll, Reducing quasi-
38. A. M. Ferrenberg and R. H. Swendsen, Optimized Monte Carlo ergodic behavior in Monte Carlo simulations by J-walking:
data analysis. Phys. Rev. Lett., 63: 11951198, 1989. Applications to atomic clusters. J. Chem. Phys., 93: 2769
39. N. A. Alves, B. A. Berg, and R. Villanova, Ising-Model Monte 2784, 1990.
Carlo simulations: Density of states and mass gap. Phys. Rev. 52. W. Janke, Multicanonical Monte Carlo simulations. Physica
B., 41: 383394, 1990. A., 254: 164178, 1998.
40. Z. Li and H. A. Scheraga, Structure and free energy of complex 53. U. H. Hansmann and Y. Okamoto, The generalized-ensemble
thermodynamic systems. J. Mol. Struct. (Theochem), 179: 333 approach for protein folding simulations. Ann. Rev. Comp.
352, 1988. Phys., 6: 129157, 1999.
41. B. A. Berg and T. Neuhaus, Multicanonical ensemble: A new 54. A. Mitsutake, Y. Sugita, and Y. Okamoto, Generalized-
approach to simulate first-order phase transitions. Phys. Rev. ensemble algorithms for molecular simulations of biopolymers.
Lett., 68: 912, 1992. Biopolymers (Peptide Science), 60: 96123, 2001.
42. W. Janke and S. Kappler, Multibondic cluster algorithm for 55. F. Y. Wu, The Potts model. Rev. Mod. Phys., 54: 235268, 1982.
Monte Carlo simulations of first-order phase transitions. Phys. 56. S. Trebst, D. A. Huse, E. Gull, H. G. Katzgraber, U. H. E.
Rev. Lett., 74: 212215, 1985. Hansmann, and M. Troyer, Ensemble optimization techniques
43. F. Wang and D. P. Landau, Efficient, multiple-range random for the simulation of slowly equilibrating systems, Invited talk
walk algorithm to calculate the density of states. Phys. Rev. at the19th Annual Workshop on Computer Simulation Studies
Lett., 86: 20502053, 2001. in Condensed Matter Physics, in D. P. Landau, S. P. Lewis, and
44. Y. Okamoto, Metropolis algorithms in generalized ensemble. H.-B. Schuettler (eds.), Athens, GA, 2024 February 2006;
In Ref. (2), pp. 248260. On the web at http://arxiv.org/abs/ Springer Proceedings in Physics, Vol. 115, 2007. Available
cond-mat/0308119. on the internet at: http://arxiv.org/abs/cond-mat/0606006.
45. R. H. Swendsen and J.-S. Wang, Replica Monte Carlo simula-
tions of spin glasses. Phys. Rev. Lett., 57: 26072609, 1986.
BERND A. BERG
46. C. J. Geyer, Markov Chain Monte Carlo maximum likelihood, Florida State University
in E. M. Keramidas (ed.), Computing Science and Statistics, Tallahassee, Florida
Proc. of the 23rd Symposium on the Interface. Fairfax, VA,
ALAIN BILLOIRE
Interface Foundation, 1991, pp. 156163.
Service de Physique Theorique
47. C. J. Geyer and E. A. Thompson, Annealing Markov chain CEA Saclay
Monte Carlo with applications to ancestral inference. J. Am. Gif-sur-Yvette, France
Stat. Ass., 90: 909920, 1995.
48. E. Marinari and G. Parisi, Simulated tempering: A new Monte
Carlo scheme. Europhys. Lett., 19: 451458, 1992.
49. A. P. Lyubartsev, A. A. Martsinovski, S. V. Shevkanov, and
P. N. Vorontsov-Velyaminov, New approach to Monte Carlo
M
MARKOV CHAINS gene expression. The second reason is that a collection of
powerful computational algorithms have been developed to
INTRODUCTION provide samples from complicated probability distributions
via the simulation of particular Markov chains: These
A Markov chain is, roughly speaking, some collection of Markov chain Monte Carlo methods are now ubiquitous
random variables with a temporal ordering that have the in all fields in which it is necessary to obtain samples from
property that conditional upon the present, the future does complex probability distributions, and this has driven
not depend on the past. This concept, which can be viewed much of the recent research in the field of Markov chains.
as a form of something known as the Markov property, will The areas in which Markov chains occur are far too
be made precise below, but the principle point is that such numerous to list here, but here are some typical examples:
collections lie somewhere between one of independent
random variables and a completely general collection,  Any collection of independent random variables forms
which could be extremely complex to deal with. a Markov chain: In this case, given the present, the
Andrei Andreivich Markov commenced the analysis of future is independent of the past and the present.
such collections of random variables in 1907, and their  The celebrated symmetric random walk over the inte-
analysis remains an active area of research to this day. gers provides a classic example: The next value taken
The study of Markov chains is one of the great achieve- by the chain is one more or less than the current value
ments of probability theory. In his seminal work (1), with equal probability, regardless of the route by which
Andrei Nikolaevich Kolmogorov remarked, Historically, the current value was reached. Despite its simplicity,
the independence of experiments and random variables this example, and some simple generalizations, can
represents the very mathematical concept that has given exhibit a great many interesting properties.
probability its peculiar stamp.  Many popular board games have a Markov chain
However, there are many situations in which it is neces- representation, for example, Snakes and Ladders,
sary to consider sequences of random variables that cannot in which there are 100 possible states for each counter
be considered to be independent. Kolmogorov went on to (actually, there are somewhat fewer, as it is not
observe that [Markov et al.] frequently fail to assume possible to end a turn at the top of a snake or the
complete independence, they nevertheless reveal the bottom of a ladder), and the next state occupied by any
importance of assuming analogous, weaker conditions, in particular counter is one of the six states that can be
order to obtain significant results. The aforementioned reached from the current one, each with equal prob-
Markov property, the defining feature of the Markov chain, ability. So, the next state is a function of the current
is such an analogous, weaker condition and it has proved state and an external, independent random variable
both strong enough to allow many, powerful results to be that corresponds to the roll of a die.
obtained while weak enough to allow it to encompass a
 More practically, the current amount of water held in a
great many interesting cases.
reservoir can be viewed as a Markov chain: The volume
Much development in probability theory during the
of water stored after a particular time interval will
latter part of the last century consisted of the study of
depend only on the volume of water stored now and two
sequences of random variables that are not entirely inde-
random quantities: the amount of water leaving the
pendent. Two weaker, but related conditions proved to be
reservoir and the amount of water entering the reser-
especially useful: the Markov property that defines the
voir. More sophisticated variants of this model are
Markov chain and the martingale property. Loosely
used in numerous areas, particularly within the field
speaking, a martingale is a sequence of random variables
of queueing theory (where water volume is replaced by
whose expectation at any point in the future, which is
customers awaiting service).
conditional on the past and the present is equal to
its current value. A broad and deep literature exists on  The evolution of a finite state machine can be viewed as
the subject of martingales, which will not be discussed the evolution of a (usually deterministic) Markov
in this article. A great many people have worked on the chain.
theory of Markov chains, as well as their application to
problems in a diverse range of areas, over the past century, It is common to think of Markov chains as describing the
and it is not possible to enumerate them all here. trajectories of dynamic objects. In some circumstances, a
There are two principal reasons that Markov chains play natural dynamic system can be associated with a collection
such a prominent role in modern probability theory. of random variables with the right conditional indepen-
The first reason is that they provide a powerful yet tractable dence structurethe random walk example discussed pre-
framework in which to describe, characterize, and analyze viously, for example, can be interpreted as moving from one
a broad class of sequences of random variables that find position to the next, with the nth element of the associated
applications in numerous areas from particle transport Markov chain corresponding to its position at discrete time
through finite state machines and even in the theory of index n. As the distribution of each random variable in the

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 MARKOV CHAINS

sequence depends only on the value of the previous element Monte Carlo methods and is standard in more recent
of the sequence, one can endow any such collection literature.
(assuming that one can order the elements of the collection,
which the definition of a Markov chain employed here Filtrations and Stopping Times
ensures is always possible) with a dynamic structure.
This section consists of some technical details that,
One simply views the distribution of each element, condi-
although not essential to a basic understanding of the
tional on the value of the previous one as being the
stochastic process or Markov chains in particular, are
probability of moving between those states at that time.
fundamental and will be encountered in any work dealing
This interpretation provides no great insight, but it can
with these subjects.
allow for simpler interpretations and descriptions of the
A little more technical structure is generally required to
behavior of collections of random variables of the sort
deal with stochastic processes than with simple random
described here. Indeed, it is the image of a chain of states,
variables. Although technical details are avoided as far as
with each one leading to the next that suggests the term
possible in this article, the following concept will be needed
Markov chain.
to understand much of the literature on Markov chains.
To deal with simple random variables, it suffices to
STOCHASTIC PROCESSES consider a probability space V; F ; P in which V is the
set of events, F is the s-algebra corresponding to the
To proceed to the formal definition of a Markov chain, it is collection of measurable outcomes (i.e., the collection of
first necessary to make precise what is meant by a collection subsets of V to which it is possible to assign a probability;
of random variables with some temporal ordering. Such a typically the collection of all subsets of V in the discrete
collection of random variables may be best characterized as case), and P is the probability measure, which tells us the
a stochastic process. An E-valued process is a function X : probability that any element of F contains the event that
I ! E that maps values in some index set I to some other occurs as follows: P : F ! 0; 1. To deal with stochastic
space E. The evolution of the process is described by processes, it is convenient to define a filtered probability
considering the variation of Xi : Xi with i. An E-valued spaceV; F ; fF i gi 2 N ; P. The collection of sub-s-algebras,
stochastic process (or random process) can be viewed as a fF i gi 2 N , which is termed a filtration, has a particular
process in which, for each i 2 I , Xi is a random variable structure:
taking values in E.
Although a rich literature on more general situations F 1  F 2  . . .  F n  F n1  . . .  F
exists, this article will consider only discrete time stochas-
tic processes in which the index set I is the natural and its most important property is that, for any n, the collec-
numbers, N (of course, any index set isomorphic to N tion of variables X1 ; X2 ; . . .; Xn must be measurable with
can be used in the same framework by simple relabeling). respect to F n . Although much more generality is possible,
The notation Xi is used to indicate the value of the process it is usually sufficient to consider the natural filtration of a
at time i (note that there need be no connection between process: that is the one generated by the process itself. Given
the index set and real time, but this terminology is both any collection of random variables of a common probability
convenient and standard). Note that the Markov property space, a smallest s-algebra exists with respect to which
may be extended to continuous time processes in which the those random variables are jointly measurable. The natural
index set is the positive real numbers, and this leads to a filtration is the filtration generated by setting each F n equal
collection of processes known as either Markov processes to the smallest s-algebra with respect to which X1 ; . . .; Xn
or continuous time Markov chains. Such processes are not are measurable. Only this filtration will be considered in the
considered here in more detail, as they are of somewhat current article. An intuitive interpretation of this filtration,
lesser importance in computer science and engineering which provides increasingly fine subdivisions of the prob-
applications. A rich literature on these processes does ability space, is that F n tells us how much information can
exist, and many of the results available in the discrete be provided by knowledge of the values of the first n random
time case have continuous time analogindeed, some variables: It tells us which events can be be distinguished
results may be obtained considerably more naturally in given knowledge of X1 ; . . .; Xn .
the continuous time setting. It is natural when considering a process of this sort to
At this point, a note on terminology is necessary. ask questions about random times: Is there anything to stop
Originally, the term Markov chain was used to describe us from defining additional random variables that have an
any stochastic process with the Markov property and a interpretation as the index, which identifies a particular
finite state space. Some references still use this definition time in the evolution of the process? In general, some care is
today. However, in computer science, engineering, and required if these random times are to be useful: If the
computational statistics, it has become more usual to use temporal structure is real, then it is necessary for us to
the term to refer to any discrete time stochastic process with be able to determine whether the time which has been
the Markov property, regardless of the state space, and this reached so far is the time of interest, given some realization
is the definition used here. Continuous time processes with of the process up to that time. Informally, one might require
the Markov property will be termed Markov processes, and that ft ng can be ascribed a probability of zero or one,
little reference will be made to them. This usage is moti- given knowledge of the first n states, for any n. In fact, this
vated by considerations developing from Markov chain is a little stronger than the actual requirement, but it
MARKOV CHAINS 3

provides a simple interpretation that suffices for many useful to consider the joint probability distribution of the
purposes. Formally, if t : V ! I is a random time, and first n elements of the Markov chain. Using the definition of
the event f! : t! ng 2 F n for all n, then t is known as conditional probability, it is possible to write the joint
a stopping time. Note that this condition amounts to requir- distribution of n random variables, X1 ; . . .; Xn , in the follow-
ing that the event f! : t! ng is independent of all ing form, using X1:n to denote the vector X1 ; . . .; Xn :
subsequent states of the chain, Xn1 ; Xn2 ; . . . conditional
upon X1 ; . . .; Xn . The most common example of a stopping PX1:n x1:n PX1 x1
time is the hitting time, tA , of a set A: Yn
i2
PXi xi jX1:i1 x1:i1
tA : inffn : Xn 2 Ag
The probability that each of the first n elements takes
which corresponds to the first time that the process enters particular values can be decomposed recursively as the
the set A. Note that the apparently similar probability that all but one of those elements takes the
appropriate value and the conditional probability that
t0A inffn : Xn1 2 Ag the remaining element takes the specified value given
that the other elements take the specified values.
is not a stopping time (in any degree of generality) as the This decomposition could be employed to describe the
state of the chain at time n 1 is not necessarily known in finite-dimensional distributions (that is, the distribution of
terms of the first n states. the random variables associated with finite subsets of I ) of
Note that this distinction is not an artificial or frivolous any stochastic process. In the case of a Markov chain, the
one. Consider the chain produced by setting Xn Xn1 distribution of any element is influenced only by the pre-
Wn where fWn g are a collection of independent random vious state if the entire history is known: This is what is
variables that correspond to the value of a gamblers win- meant by the statement that conditional upon the present,
nings, in dollars, in the nth independent game that he the future is independent of the past. This property may be
plays. If A 10; 000; 1, then tA would correspond to written formally as
the event of having won $10,000, and, indeed, it would
be possible to stop when this occurred. Conversely, if PXn xn jX1:n1 x1:n1 PXn xn jXn1 xn1
A 1; 10; 000, then t0A would correspond to the last
time before that at which $10,000 have been lost. Although and so for any discrete state space Markov chain:
many people would like to be able to stop betting immedi- Yn
ately before losing money, it is not possible to know that one PX1:n x1:n PX1 x1 i2
PXi xi jXi1 xi1
will lose the next one of a sequence of independent games.
Given a stopping time, t, it is possible to define the
stopped process, X1t ; X2t ; . . ., associated with the process As an aside, it is worthwhile to notice that Markov
X1 ; X2 ; . . ., which has the expected definition; writing chains encompass a much broader class of stochastic pro-
m ^ n for the smaller of m and n, define Xnt Xt ^ n . That cesses than is immediately apparent. Given any stochastic
is, the stopped process corresponds to the process itself at all process in which for all n > L and x1:n1 ,
times up to the random stopping time, after which it takes
the value it had at that stopping time: It stops. In the case of PXn xn jX1:n1 x1:n1 PXn xn jXnL:n1 xnL:n1
tA , for example, the stopped process mirrors the original
process until it enters A, and then it retains the value it had it suffices to consider a process Y on the larger space EL
upon entry to A for all subsequent times. defined as

Yn XnL1 ; . . .; Xn
MARKOV CHAINS ON DISCRETE STATE SPACES
Note that X1L ; . . .; X0 can be considered arbitrary with-
Markov chains that take values in a discrete state space,
out affecting the argument. Now, it is straightforward to
such as the positive integers or the set of colors with
determine that the distribution of Yn1 depends only on
elements red, green, and blue, are relatively easy to define
Yn . In this way, any stochastic process with a finite mem-
and use. Note that this class of Markov chains includes
ory may be cast into the form of a Markov chain on an
those whose state space is countably infinite: As is often the
extended space.
case with probability, little additional difficulty is intro-
The Markov property, as introduced above, is more
duced by the transition from finite to countable spaces, but
correctly known as the weak Markov property, and in
considerably more care is needed to deal rigorously with
the case of Markov chains in which the transition prob-
uncountable spaces.
ability is not explicitly dependent on the time index, it is
To specify the distribution a Markov chain on a discrete
normally written in terms of expectations of integrable
state space, it is intuitively sufficient to provide an initial
test function j : Em ! R, where m may be any positive
distribution, the marginal distribution of its first element,
integer. The weak Markov property in fact tells us that
and the conditional distributions of each element given the
the expected value of the integral of any integrable test
previous one. To formalize this notion, and precisely what
function over the next m states of a Markov chain depends
the Markov property referred to previously means, it is
4 MARKOV CHAINS

only on the value of the current state, so forany n and any x1:n : A Matrix Representation
The functional notation above is convenient, as it gener-
EjXn1 ; . . .; Xnm jX1:n  EjXn1 ; . . .; Xnm1 jXn 
alizes to Markov chains on state spaces that are not
discrete. However, discrete state space Markov chains
It is natural to attempt to generalize this by considering
exist in abundance in engineering and particularly in
random times rather than deterministic ones. The strong
computer science. It is convenient to represent probability
Markov property requires that, for any stopping time t, the
distributions on finite spaces as a row vector of probability
following holds:
values. To define such a vector m, simply set mi PX i
(where X is some random variable distributed according to
EjXt1 ; . . .; Xtm jX1:t  EjXt1 ; . . .; Xtm1 jXt 
m). It is also possible to define a Markov kernel on this
space by setting the elements of a matrix K equal to the
In continuous time settings, these two properties allow us
probability of moving from a state i to a state j; i.e.:
to distinguish between weak and strong Markov pro-
cesses (the latter is a strict subset of the former, because
Ki j PXn jjXn1 i
t n is a stopping time). However, in the discrete
time setting, the weak and strong Markov properties
Although this may appear little more than a notational
are equivalent and are possessed by Markov chains as
nicety, it has some properties that make manipulations
defined above.
particularly straightforward; for example, if X1  m,
It is conventional to view a Markov chain as describing
then:
the path of a dynamic object, which moves from one state to
another as time passes. Many physical systems that can be X
described by Markov chains have precisely this property PX2 j PX1 iPX2 jjX1 i
for example, the motion of a particle in an absorbing i
X
medium. The position of the particle, together with an mi Ki j
indication as to whether it has been absorbed or not, i
may be described by a Markov chain whose states contain mK j
coordinates and an absorbed/not-absorbed flag. It is then
natural to think of the initial state as having a particular where mK denotes the usual vector matrix product and
distribution, say, mx1 PX1 x1 and, furthermore, for mK j denotes the jth element of the resulting row vector.In
there to be some transition kernel that describes the fact, it can be shown inductively that PXn j mK n1 j ,
distribution of moves from a state xn1 to a state xn at where K n1 is the usual matrix power of K. Even more
time n, say, Kn xn1 ; xn PXn xn jXn1 xn1 . This generally, the conditional distributions may be written in
allows us to write the distribution of the first n elements terms of the transition matrix, K:
of the chain in the compact form:
Yn PXnm jjXn i K m i j
PX1:n x1:n mx1 i2
Ki xi1 ; xi
and so a great many calculations can be performed via
Nothing is preventing these transition kernels from being simple matrix algebra.
explicitly dependent on the time index; for example, in the
reservoir example presented above, one might expect both A Graphical Representation
water usage and rainfall to have a substantial seasonal It is common to represent a homogeneous, finite-state
variation, and so the volume of water stored tomorrow space Markov chain graphically. A single directed graph
would be influenced by the date as well as by that volume with labeled edges suffices to describe completely the
stored today. However, it is not surprising that for a great transition matrix of such a Markov chain. Together
many systems of interest (and most of those used in com- with the distribution of the initial state, this completely
puter simulation) that the transition kernel has no depen- characterizes the Markov chain. The vertices of the graph
dence on the time. Markov chains that have the same correspond to the states, and those edges that exist illus-
transition kernel at all times are termed time homogeneous trate the moves that it is possible to make. It is usual to
(or sometimes simply homogeneous) and will be the main label the edges with the probability associated with the
focus of this article. move that they represent, unless all possible moves are
In the time homogeneous context, the n-step transition equally probable.
kernels denoted K n , which have the property that A simple example, which also shows that the matrix
PXmn xmn jXm xm K n xm ; xmn may be obtained representation can be difficult to interpret, consists of the
inductively, as Markov chain obtained on the space f0; 1; . . .; 9g in which
X the next state is obtained by taking the number rolled on an
K n xm ; xmn Kxm ; xm1 K n1 xm1 ; xmn unbiased die and adding it, modulo 10, to the current state
xm1 unless a 6 is rolled when the state is 9, in which case, the
chain retains its current value. This has a straightforward,
for any n > 1, whereas K 1 xm ; xm1 Kxm ; xm1 .
MARKOV CHAINS 5

but cumbersome matrix representation, in which: state spacessuch as the real numbers or the points in
three-dimensional space. To deal with a fully general state
2 3
0 1 1 1 1 1 1 0 0 0 space, a degree of measure theoretic probability beyond that
60
6 0 1 1 1 1 1 1 0 077 which can be introduced in this article is required. Only
60
6 0 0 1 1 1 1 1 1 077 Markov chains on some subset of d-dimensional, Euclidean
60
6 0 0 0 1 1 1 1 1 177 space, Rd with distributions and transition kernels that
16 1 0 0 0 0 1 1 1 1 177 admit a density (for definiteness, with respect to Lebesgue
K 6
66
61 1 0 0 0 0 1 1 1 177 measurethat which attributes to any interval mass cor-
61
6 1 1 0 0 0 0 1 1 177 responding to its lengthover that space) will be considered
61
6 1 1 1 0 0 0 0 1 177 here. Kn x; y (or Kx; y in the time homogeneous case)
41 1 1 1 1 0 0 0 0 15 denotes a density with the property that
1 1 1 1 1 0 0 0 0 1
Z
Figure 1 shows a graphical illustration of the same PXn 2 AjXn1 xn1 Kn xn1 ; ydy
A
Markov transition kerneltransition probabilities are
omitted in this case, as they are all equal. Although it This approach has the great advantage that many concepts
may initially seem no simpler to interpret than the matrix, may be written for discrete and continuous state space cases
on closer inspection, it becomes apparent that one can in precisely the same manner, with the understanding that
easily determine from which states it is possible to reach the notation refers to probabilities in the discrete case and
any selected state, which states it is possible to reach from densities in the continuous setting. To generalize things, it
it and those states it is possible to move between in a is necessary to consider Lebesgue integrals with respect to
particular number of moves without performing any the measures of interest, but essentially, one can replace
calculations. It is these properties that this representa- equalities of densities with those of integrals over
tion makes it very easy to interpret even in the case of any measurable set and the definitions and results
Markov chains with large state spaces for which the presented below will continue to hold. For a rigorous and
matrix representation rapidly becomes very difficult to concise introduction to general state space Markov chains,
manipulate. Note the loop in the graph showing the see Ref. 2. For a much more detailed exposition, Ref. 3 is
possibility of remaining in state 9this is equivalent to recommended highly.
the presence of a nonzero diagonal element in the
transition matrix.
STATIONARY DISTRIBUTIONS AND ERGODICITY

MARKOV CHAINS ON GENERAL STATE SPACES The ergodic hypothesis of statistical mechanics claims,
loosely, that given a thermal system at equilibrium, the
In general, more subtle measure theoretic constructions are long-term average occurrence of any given system config-
required to define or study Markov chains on uncountable uration corresponds precisely to the average over an infinite

Figure 1. A graphical representation of a Markov chain.


6 MARKOV CHAINS

ensemble of identically prepared systems at the same tem- able sets An ; . . .; Anm :
perature. One area of great interest in the analysis of
Markov chains is that of establishing conditions under PXn 2 An ; . . .; Xnm 2 Anm PXn 2 An ; . . .; Xnm 2 Anm
which a (mathematically refined form of) this assertion
can be shown to be true: When are averages obtained by It is simple to verify that, in the context of a Markov chain,
considering those states occupied by a Markov chain over a this is equivalent to the detailed balance condition:
long period of its evolution close to those that would be
obtained by calculating the average under some distribution PXn 2 An ; Xn1 2 An1 PXn 2 An1 ; Xn1 2 An
associated with that chain? Throughout this section, inte-
grals over the state space are used with the understanding A Markov chain with kernel K is said to satisfy detailed
that in the discrete case these integrals should be replaced balance for a distribution p if
by sums. This process minimizes the amount of duplication
required to deal with both discrete and continuous state pxKx; y pyKy; x
spaces, which allows the significant differences to be empha-
sized when they develop. It is straightforward to verify that, if K is p-reversible, then
One of the most important properties of homogeneous p is a stationary distribution of K:
Markov chains, particularly within the field of simulation, Z Z
is that they can admit a stationary (or invariant) distribu-
pxKx; ydy pyKy; xdy
tion. A transition kernel K is p-stationary if Z
Z px pyKy; xdy
pxKx; ydx py
This is particularly useful, as the detailed balance condition
That is, given a sample X x from p, the distribution of a is straightforward to verify.
random variable Y, drawn from Kx;  is the same as that of Given a Markov chain with a particular stationary dis-
X, although the two variables are, of course, not indepen- tribution, it is important to be able to determine whether,
dent. In the discrete case, this becomes over a long enough period of time, the chain will explore all
of the space, which has a positive probability under that
X
piKi; j p j distribution. This leads to the concepts of accessibility,
i communication structure, and irreducibility.
In the discrete case, a state j is said to be accessible from
or, more succinctly, in the matrix representation, pK p. another state i written as i ! j, if for some n, K n i; j > 0.
The last of these reveals a convenient characterization That is, a state that is accessible from some starting point is
of the stationary distributions, where they exist, of a one that can be reached with positive probability in some
transition kernel: They are the left eigenvectors (or eigen- number of steps. If i is accessible from j and j is accessible
functions in the general state space case) of the transition from i, then the two states are said to communicate, and this
kernel with an associated eigenvalue of 1. Viewing the is written as i $ j. Given the Markov chain on the space
transition kernel as an operator on the space of distribu- E f0; 1; 2g with transition matrix:
tions, the same interpretation is valid in the general state 2 3
space case. 1 0 0
It is often of interest to simulate evolutions of Markov 60 1 1 7
K4 2 2 5
chains with particular stationary distributions. Doing so is 0 12 1
2
the basis of Markov chain Monte Carlo methods and is
beyond the scope of this article. However, several theore-
it is not difficult to verify that the uniform distribution m
tical concepts are required to determine when these dis-
tributions exist, when they are unique, and when their 13; 13; 13 is invariant under the action of K. However, if
existence is enough to ensure that a large enough sample X1 0, then Xn 0, for all n: The chain will never reach
path will have similar statistical properties to a collection of either of the other states, whereas starting from X1 2 f1; 2g,
independent, identically distributed random variables the chain will never reach 0. This chain is reducible: Some
from the stationary distribution. The remainder of this disjoint regions of the state space do not communicate.
section is dedicated to the introduction of such concepts Furthermore, it has multiple stationary distributions;
and to the presentation of two results that are of great 1; 0; 0 and 0; 12; 12 are both invariant under the action of
importance in this area. K. In the discrete setting, a chain is irreducible if all states
One property useful in the construction of Markov communicate: Starting from any point in the state space,
chains with a particular invariant distributions is that of any other point may be reached with positive probability in
reversibility. A stochastic process is termed reversible if the some finite number of steps.
statistical properties of its time reversal are the same as Although these concepts are adequate for dealing with
those of the process itself. To make this concept more discrete state spaces, a little more subtlety is required in
formal, it is useful to cast things in terms of certain joint more general settings: As ever, when dealing with prob-
probability distributions. A stationary process is reversible ability on continuous spaces, the probability associated
if for any n; m, the following equality holds for all measur- with individual states is generally zero and it is necessary
MARKOV CHAINS 7

to consider integrals over finite regions. The property that that communicate must have the same period. Thus,
is captured by irreducibility is that, wherever the chain irreducible Markov chains have a single period, 2, in
starts from, a positive probability of it reaches anywhere in the case of L, above and 1, in the case of K. Irreducible
the space. To generalize this to continuous state spaces, it Markov chains may be said to have a period themselves,
suffices to reduce the strength of this statement very and when this period is 1, they are termed aperiodic.
slightly: From most starting points, the chain has a Again, more subtlety is required in the general case. It is
positive probability of reaching any region of the space clear that something is needed to fill the role that individual
that itself has positive probability. To make this precise, states play in the discrete state space case and that indi-
a Markov chain of stationary distribution p is said to be p- vidual states are not appropriate in the continuous case. A
irreducible if, for all x (except for those lying in a set of set of events that is small enough that it is, in some sense,
exceptional points that has probability
R 0 under p), and all homogeneous and large enough that it has positive prob-
sets A with the property that A pxdx > 0, ability under the stationary distribution is required. A set C
Z is termed small if some integer n, some probability distri-
bution n, and some e > 0 exist such that the following
9n : K n x; ydy > 0
A condition holds:
inf K n x; y  eny
The terms strongly irreducible and stronglyp-irreducible are x2C
sometimes used when the irreducibility or p-irreducibility
condition, respectively, holds for n 1. Notice that any This condition tells us that for any point in C, with
irreducible Markov chain is p-irreducible with respect to probability e, the distribution of the next state the chain
any measure p. enters is independent of where in C it is. In that sense, C is
These concepts allow us to determine whether a Markov small, and these sets are precisely what is necessary to
chain has a joined-up state space: whether it is possible to extend much of the theory of Markov chains from the
move around the entire space (or at least that part of the discrete state space case to a more general setting. In
space that has mass under p). However, it tells us nothing particular, it is now possible to extend the notion of period
about when it is possible to reach these points. Consider the from the discrete state space setting to a more general one.
difference between the following two transition matrices on Note that in the case of irreducible aperiodic Markov
the space f0; 1g; for example, chains on a discrete state space, the entire state space
is small.
" #  
1 1
0 1 A Markov chain has a cycle of length d if a small set C
2 2
K 1 1
and L exists such that the greatest common divisor of the length of
2 2
1 0
paths from C to a measurable set of positive probability B is
d. If the largest cycle possessed by a Markov chain has
Both matrices admit p 12; 12 as a stationary distribution, length 1, then that chain is aperiodic. In the case of p-
and both are irreducible. However, consider their respec- irreducible chains, every state has a common period (except
tive marginal distributions after several iterations: a set of events of probability 0 under p), and the above
8  definition is equivalent to the more intuitive (but more
> 0 1 difficult to verify) condition, in which a partition of the
" # >
> n odd
1 1 < 1 0 state space, E, into d disjoint subsets E1 ; . . .; Ed exists with
Kn 2 2
; whereas Ln  
1 1 >
> 1 0 the property that PXn1 6 2 E j jXn 2 Ei 0 if
2 2 >
: n even j i 1 mod d.
0 1
Thus far, concepts that allow us to characterize those
Markov chains that can reach every important part of the
In other words, if m m1 ; m2 , then the Markov chain
space and that exhibit no periodic structure have been
associated with K has distribution mK n 12; 12 after n
introduced. Nothing has been said about how often a given
iterations, whereas that associated with L has distribution
region of the space might be visited. This point is particu-
m2 ; m1 after any odd number of iterations and distribution
larly important: A qualitative difference exists between
m1 ; m2 after any even number. L, then, never forgets its
chains that have a positive probability of returning to a
initial conditions, and it is periodic.
set infinitely often and those that can only visit it finitely
Although this example is contrived, it is clear that such
many times. Let hA denote the number of times that a set A
periodic behavior is significant and that a precise char-
is visited by a Markov chain; that is, hA jfXn 2 A : n 2 Ngj.
acterization is needed. This is straightforward in the case
A p-irreducible Markov chain is recurrent if EhA  1 for
of discrete state space Markov chains. The period of any
every A with positive probability under p. Thus, a recurrent
state, i in the space is defined, using gcd to refer to
Markov chain is one with positive probability of visiting any
the greatest common divisor (i.e., the largest common
significant (with respect to p) part of the state space infi-
factor), as
nitely often: It does not always escape to infinity. A slightly
stronger condition is termed Harris recurrence; it requires
d gcdfn : K n i; i > 0g
that every significant state is visited infinitely often (rather
than this event having positive probability);
R i.e., PhA
Thus, in the case of L, above, both states have a period
1 1 for every set A for which A pxdx > 0. A Markov
d 2. In fact, it can be shown easily, that any pair of states
chain that is not recurrent is termed transient.
8 MARKOV CHAINS

The following example illustrates the problems that can converge to the expectation under the stationary distribu-
originate if a Markov chain is p-recurrent but not Harris tion of the transition kernel. This mathematically refined,
recurrent. Consider the Markov chain over the positive rigorously proved form of the ergodic hypothesis was
integers with the transition kernel defined by alluded to at the start of this section. Many variants of
this theorem are available; one particularly simple form is
Kx; y x2 d1 y 1  x2 dx1 y the following: If fXn g is a Harris ergodic Markov chain of
invariant distribution p, then the following strong law of
where for any state, x, dx denotes the probability distribu- large numbers holds for any p-integrable function f :
tion that places all of its mass at x. This kernel is clearly d1 - E ! R (convergence is with probability one):
recurrent: If the chain is started from 1, it stays there
Z
deterministically. However, as the sum 1X n
lim f Xi ! f xpxdx
n!1n
i1
X1
1
<1
k 2 This is a particular case of Ref. 5 (p. 241, Theorem 6.63), and
k2
a proof of the general theorem is given there. The same
the BorelCantelli lemma ensures that whenever the theorem is also presented with proof in Ref. 3 (p. 433,
chain is started for any x greater than 1, a positive Theorem 17.3.2).
probability exists that the chain will never visit A central limit theorem also exists and tells us some-
state 1the chain is p-recurrent, but it is not Harris thing about the rate of convergence of averages under the
recurrent. Although this example is somewhat contrived, sample path of the Markov chain. Under technical
it illustrates an important phenomenonand one that regularity conditions (see Ref. 4 for a summary of various
often cannot be detected easily in more sophisticated combinations of conditions), it is possible to obtain a
situations. It has been suggested that Harris recurrence central limit theorem for the ergodic averages of a Harris
can be interpreted as a guarantee that no such patholo- recurrent, p-invariant Markov chain, and a function that
gical system trajectories exist: No parts of the space exist has at least two finite moments, f : E ! R (with E f  < 1
from which the chain will escape to infinity rather than and E f 2  < 1).1
returning to the support of the stationary distribution. " Z #
It is common to refer to a p-irreducible, aperiodic, p 1 X n
lim n f Xi  f xpxdx !d N 0; s2 f
recurrent Markov chain as being ergodic and to an ergodic n!1 n i1
Markov chain that is also Harris recurrent as being Harris
X
1
ergodic. These properties suffice to ensure that the Mar- s2 f E f X1 f 2 2 E f X1 f f Xk  f 
kov chain will, on average, visit every part of the state k2
space in proportion to its probability under p, that it
exhibits no periodic behavior in doing so, and that it might where ! d denotes convergence in distribution, N 0; s2 is
(or will, in the Harris case) visit regions of the state space the normal
R distribution of mean 0, and variance s2 f and
with positive probability infinitely often. Actually, ergo- f f xpxdx.
dicity tells us that a Markov chain eventually forgets its A great many refinements of these results exist in the
initial conditionsafter a sufficiently long time has literature. In particular, cases in which conditions may be
elapsed, the current state provides arbitrarily little infor- relaxed or stronger results proved have been studied
mation about the initial state. Many stronger forms of widely. It is of particular interest in many cases to obtain
ergodicity provide information about the rate at which the quantitative bounds on the rate of convergence of ergodic
initial conditions are forgotten; these are covered in great averages to the integral under the stationary distribution.
detail by Meyn and Tweedie (3). Intuitively, if a sequence In general, it is very difficult to obtain meaningful bounds of
of random variables forgets where it has been, but has this sort for systems of real practical interest, although
some stationary distribution, then one would expect the some progress has been made in recent years.
distribution of sufficiently widely separated samples to
approximate that of independent samples from that sta-
tionary distribution. This intuition can be made rigorous SELECTED EXTENSIONS AND RELATED AREAS
and is strong enough to tell us a lot about the distribution
of large samples obtained by iterative application of the It is unsurprising that a field as successful as that of Markov
Markov kernel and the sense in which approximations of chains has several interesting extensions and related areas.
integrals obtained by using the empirical average This section briefly describes two of these areas.
obtained by taking samples from the chain might converge So-called adaptive Markov chains have received a
to their integral under the stationary measure. This sec- significant amount of attention in the field of Monte Carlo
tion is concluded with two of the most important results in methodology in recent years. In these systems, the transi-
the theory of Markov chains. tion kernel used at each iteration is adjusted depending on
The ergodic theorem provides an analog of the law of
large numbers for independent random variables: It tells us
that under suitable regularity conditions, the averages 1
Depending on the combination of regularity condition assumed,
obtained from the sample path of a Markov chain will it may be necessary to have a finite moment of order 2 d.
MARKOV CHAINS 9

the entire history of the system or some statistical with genetic makeup xn , which governs the success of
summary of that history. Although these adaptive systems that individual in a selection step.
are attractive from a practical viewpoint, as they allow for Alternatively, one can view the evolution of a Feynman
automatic tuning of parameters and promise simpler Kac system as a nonlinear Markov Chain in which the
implementation of Monte Carlo methods in the future, a distribution of Xn depends on both Xn1 and its distribution
great deal of care must be taken when analyzing them. It is hn1 . That is, if Xn1  hn1 , then the distribution of Xn is
important to notice that because the transition kernel given by
depends on more than the current state at the time of its Z
application, it does not give rise to a Markov chain.
hn  hn1 xn1 Kn;hn1 xn1 ; dxn1
FeynmanKac formulas were first studied in the context
of describing physical particle motion. They describe a
sequence of probability distributions obtained from a col- where the nonlinear Markov kernel Kn;hn is defined as the
lection of Markov transition kernels Mn and a collection of composition of selection and mutation steps (numerous such
potential functions Gn . Given a distribution hn1 at time kernels may be associated with any particular Feynman
n  1, the system is mutated according to the transition Kac flow).
kernel to produce an updated distribution: An excellent monograph on FeynmanKac formulas
and their mean field approximations has been written
Z recently (6).
^ n xn
h hn1 xn1 Mn xn1 ; xn dxn1
BIBLIOGRAPHY
before weighting the probability of each state/region of the
space according to the value of the potential function: 1. A. N. Kolmogorov, Foundations of the Theory of Probability,
Chelsea Publishing Company, 2nd ed., 1956.
^ xn Gn xn
h 2. E. Nummelin, General Irreducible Markov Chains and Non-
hn xn R n Negative Operators, Number 83 in Cambridge Tracts in
^ n xGn xdx
h
Mathematics, 1st ed., Cambridge, UK: Cambridge University
Press, 1984.
Many convenient ways of interpreting such sequences of
3. S. P. Meyn and R. L. Tweedie, Markov Chains and Stochastic
distributions exist. One way is that if hn1 describes the
Stability, Berlin Springer Verlag, 1993.
distribution of a collection of particles at time n  1, which
4. G. L. Jones, On the Markov chain central limit theorem,
have dynamics described by the Markov kernel Mn in an
Probability Surv.1: 299320, 2004.
absorbing medium that is described by the potential func-
5. C. P. Robert and G. Casella, Monte Carlo Statistical Methods,
tion Gn (in the sense that the smaller the value of Gn at a
2nd ed., New York: Springer Verlag, 2004.
point, the greater the probability that a particle at that
6. P. Del Moral, Feynman-Kac formulae: genealogical and
location is absorbed), then hn describes the distribution of
interacting particle systems with applications. Probability
those particles that have not been absorbed at time n. These and Its Applications. New York: Springer Verlag, 2004.
systems have found a great deal of application in the fields
of Monte Carlo methodology, particularly sequential and
population-based methods, and genetic algorithms. The ADAM M. JOHANSEN
latter method gives rise to another interpretation: The University of Bristol
Markov kernel can be observed as describing the mutation Bristol, United Kingdom
undergone by individuals within a population, and the
potential function Gn xn the fitness of an individual
M
MIXED INTEGER PROGRAMMING extended reformulation with additional variables, and
heuristics to try to find good feasible solutions quickly.
INTRODUCTION In the References and Topics Additional section, we
give references for the basic material described in this
A (linear) mixed integer program (MIP) is an optimization article and for more advanced topics, including decomposi-
problem in which a subset of integer variables (unknowns) tion algorithms, MIP test instances, MIP modeling and
and a subset of real-valued (continuous) variables exist, the optimization software, and nonlinear MIPs.
constraints are all linear equations or inequalities, and the
objective is a linear function to be minimized (or maxi-
THE FORMULATION OF VARIOUS MIPS
mized). This can be written mathematically as
MIPs are solved on a regular basis in many areas of busi-
min cx hy
ness, management, science and engineering. Modeling pro-
Ax Gy  b
blems as MIPs is nontrivial. One needs to define first the
x 2 Rp ; y 2 Zn
unknowns (or variables), then a set of linear constraints so
as to characterize exactly the set of feasible solutions, and
where Rp denotes the space of p-dimensional non-negative
finally a linear objective function to be minimized or max-
real vectors: Zn denotes the space of n-dimensional non-
imized. Here we present three simplified problems that
negative integer vectors: x denotes the p continuous vari-
exemplify such applications.
ables: y, denotes the n integer variables; A and G are m  p
and m  n matrices, respectively; b is an m-vector (the
A Capacitated Facility Location Problem
requirements or right-hand side vector): and c and h are p-
and n-dimensional row vectors: Often one specifically dis- Given m clients with demands ai for i 1,. . ., m, n potential
tinguishes constraints of the form l  x  u or l0  y  u0 , depots with annual throughput of capacity bj for j 1,. . ., n
known as lower and upper bound constraintsthus, the where the annual cost of opening depot j is fj, suppose that
problem above is the special case where all the coordinates the potential cost of satisfying one unit of demand of client i
of l and l0 are zero and all the coordinates of u and u0 are 1. from depot j is cij. The problem is to decide which depots to
The subclass of MIPs in which p0 is called (linear) open so as to minimize the total annual cost of opening the
integer programs (IP): the subclass in which the bounds on depots and satisfying the annual demands of all the clients.
the integer variables are all 0 and 1 is called binary or 01 Obviously, one wishes to know which set of depots to
MIPs; and the subclass in which n 0 is called linear open and which clients to serve from each of the open
programs (LP). A problem in which the objective function depots. This situation suggests the introduction of the
and/or constraints involve nonlinear functions of the following variables:
form
yj 1 if depot j is opened, and yj0 otherwise.
minfcx; y : gi x; y  bi i 1; . . . ; m; x 2 Rp ; y 2 Zn g xij is the amount shipped from depot j to client i.

is a mixed integer nonlinear program (MINLP). The problem now can be formulated as the following
MIPs in general, are difficult problems N Phard in MIP:
the complexity sense), as are 01 MIPs and IPs. However, X
n m X
X n
LPs are easy (polynomially solvable), and linear program- min fi y j ci j xi j 1
ming plays a very significant role in both the theory and j1 i1 j1
practical solution of linear MIPs. Readers are referred to
X
n
the entry linear programming for background and some xi j ai for i 1; . . . ; m 2
basic terminology. j1
We now briefly outline what follows. In The Formulation
of verious MIPs section, we present the formulations of X
m

three typical optimization problems as mixed integer pro- xi j  b j y j for j 1; . . . ; n 3


i1
grams. In the Basic Properties of MIPs section, we present
some basic properties of MIPs that are used later. In The x 2 Rmn n
; y 2 f0; 1g 4
Branch-and-Cut Algorithems for MIPs section, we explain
how the majority of MIPs are solved in practice. All the state-
of-the-art solvers use a combination of linear programming where the objective function in Equation (1) includes terms
combined with intelligent enumeration (known as branch- for the fixed cost of opening the depots and for the variable
and-bound), preprocessing using simple tests to get a better shipping costs, the constraints in Equation (2) ensure that
initial representation of the problem, reformulation with the demand of each client is satisfied, the constraints in
additional constraints (valid inequalities or cutting planes), Equation (3) ensure that, if depot j is closed, nothing is
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 MIXED INTEGER PROGRAMMING

shipped from that depot, and otherwise at most bj is The problem now can be formulated as the following
shipped, and finally Equation (4) indicates the variable MIP:
types and bounds.
mint  t0 8
A Multi-Item Production Planning Problem X
n

Given m items to be produced over a time horizon of n yi j 1; i 2 f0; . . . ; ng 9


j0
periods with known demands dit for 1  i  m, 1  t  n; all
the items have to be processed on a single machine. The X
n
capacity of the machine in period t is Lt, and the production yi j 1; j 2 f0; . . . ; ng 10
costs are as follows: A fixed set-up cost of qit exists if item i is i0
produced in period t, as well as a per unit variable cost pit ; a X
storage cost hit exists for each unit of i in stock at the end of yi j  1; f  S  f1; . . . ; ng 11
period t. The problem is to satisfy all the demands and i 2 S; j 2
=S

minimize the total cost.


Introducing the variables t j  ti ci j yi j  M1  yi j ;
12
i 2 f0; . . . ; ng; j 2 f1; . . . ; ng
xit
is the amount of item i produced in period t,
sit
is the amount of item i in stock at the end of period t, t  ti ci0 yi0  M1  yi0 ; i 2 f1; . . . ; ng 13
yit
1 if there is production of item i in period t, and
ai  ti  bi ; i 2 f1; . . . ; ng
yit 0 otherwise, n1
n1n2 14
a possible MIP formulation of the problem is: t 2 R; t 2 R ; y 2 f0; 1g 2

n 
m X
X  where M is a large value exceeding the total travel time, the
min pit xit qit yit hit sit objective function, in Equation (8) measures the difference
i1 t1
5
between the time of leaving and returning to the depot,
sit1 xit dit sit for i 1; . . . ; m; t 1; . . . ; n Equations (9) and (10) ensure that the truck leaves/arrives
once at site i and Equation (11) ensures that the tour of the
truck is connected. Constraints in Equations (12) and (13)
xit  Lt yit for i 1; . . . ; m; t 1; . . . ; n 6 ensure that if the truck goes from i to j, the arrival time in j
is at least the arrival time in i plus the travel time from i to j.
Finally, Equation (14) ensures that the time window con-
X
m
straints are satisfied.
xit  Lt for t 1; . . . ; n
i1
7
mn
s; x 2 Rmn
; y 2 f0; 1g BASIC PROPERTIES OF MIPS
where constraints in Equation (5) impose conservation of
Given the MIP
product from one period to the next (namely end-stock of
item i in t  1 production of i in t demand for i in t end-
z minfcx hy : Ax Gy  b; x 2 Rp ; y 2 Zn g
stock of i in t), Equation (6) force the set-up variable yit to 1 if
there is production (xit > 0), and Equation (7) ensures that
several important properties help us to understand such
the total amount produced in period t does not exceed the
problems. In particular the linear program obtained by
capacity.
dropping the integrality constraints on the y variables:

Traveling Salesman Problem with Time Windows zLP minfcx hy : Ax Gy  b; x 2 Rp ; y 2 Zn g


Suppose that a truck (or salesperson) must leave the
depot, visit a set of n clients, and then return to the depot. is called the linear relaxation of the original MIP.
The travel times between clients (including the depot,
node 0) are given in an (n 1)  (n 1) matrix c. Each Observation 1. Considering the MIP and its linear
client i has a time window ai ; bi  during which the truck relaxation:
must make its delivery. The delivery time is assumed to be
negligible. The goal is to complete the tour and return to (i) zLP  z, and
the depot as soon as possible while satisfying the time (ii) if (x, y) is an optimal solution of LP and y is
window constraints of each client. Two possible sets of integral, then (x, y) is an optimal solution of MIP.
variables are

yij 1 if the truck travels directly from i to j, Definition 2. A set of the formfx 2 Rn : Ax  bgwith A an
i, j 2 f0; 1 . . . ; ng. m  n matrix is a polyhedron.
tj is the time of delivery to client j, j 2 f0; . . . ; ng. The convex hull of a set of points X  Rn is the smallest
t is the time of return to the depot. convex set containing X, denoted conv(X).
MIXED INTEGER PROGRAMMING 3

Ax + Gy > = b (ii) Find sets X 1 ; . . . ; X k such that

4 k
XMIP \X
i1
i

3
Ax+Gy> = b min cx + hy where a good or exact description of convX i is known for
2 i 1; . . . ; k. Then, a potentially effective approximation
to convXMIP is given by the set \ ki1 convX i . This
1 decomposition forms the basis of the preprocessing
Optimal MIP Solution
and cut generation steps used in the branch-and-cut
approach.
0 1 2 3 4 5

Figure 1. THE BRANCH-AND-CUT ALGORITHM FOR MIPs

Below we will examine the main steps contributing to a


branch-and-cut algorithm. The first step is the underlying
branch-and-bound algorithm. This algorithm then can be
Observation 3. The set XMIP fx; y 2 Rp  Zn : Ax improved by (1) a priori reformulation, (2) preprocessing,
Gy  bgis known as the feasible region of the: MIP. When (3) heuristics to obtain good feasible solutions quickly, and
A, G, b are rational matrices, then finally (4) cutting planes or dynamic reformulation in which
case we talk of a branch-and-cut algorithm.
(i) conv(XMIP) is a polyhedron, namely convXMIP
fx; y 2 Rpn : A0 x G0 y  b0 gfor some A0 ; G0 ; b0 , Branch-and-Bound
and First, we discuss the general ideas, and then we discuss how
(ii) the linear program minfcx hy : x; y 2 conv they typically are implemented. Suppose the MIP to be
XMIP g solves MIP. In Fig.1 one sees tha t an solved is z minfcx hy : x; y 2 XMIP g with
optimal vertex of convX MIP lies in XMIP .
k
The last observation suggests that it it is easy to solve an
MIP. Namely, it suffices to find the convex hull of the set of XMIP [X
i1
i

feasible solutions and then solve a linear program. Unfor-


tunately, it is rarely this simple. Finding convXMIP is
difficult, and usually an enormous number of inequalities where X i fx; y 2 Rp  Zn : Ai x Gi y  bi g for i 1;
are needed to describe the resulting polyhedron. . . . ; k. In addition suppose that we know the value of
each linear program
Thus, one typically must be less ambitious and examine
ziLP minfcx hy : Ai x Gi y  bi ; x 2 Rp ; y 2 Rn g
(i) whether certain simple classes of MIPs exist for
which one can find an exact description of
convXMIP , and and the value z , of the best known feasible solution x ; y of
(ii) whether one can find a good approximation of MIP found so far, known as the incumbent value.
convXMIP by linear inequalities in a reasonable
amount of time. Observation 4.

Below, in looking at ways to find such a description of (i) z  z and z  mini ziLP for i 1; . . . ; k:
XMIP and in using it in solving an MIP, we often will mix two (ii) If ziLP  z for some i, then no feasible solution with
distinct viewpoints: an objective value better than that of the incumbent
lies in X i . Thus, the set X i , has been enumerated
(i) Find sets X 1 ; . . . ; X k such that implicitly, and can be ignored (pruned by bound).
k
(iii) If ziLP  z and the optimal solution of the linear
program corresponding to X i hasyinteger, then
XMIP [X
i1
i
using Observation 1, this solution is feasible and
optimal in X i and feasible in XMIP . NOW the incum-
where optimizing over Xi is easier than optimizing over bent value z can be improved z ziLP , and the set X i
XMIP for i 1; . . . ; k, and where possibly good descrip- has been enumerated implicitly and, thus, can be
tions of the sets convX i are known. This decomposition ignored (pruned by optimality).
forms the basis of the branch-and-bound approach
explained in the next section. Now we outline the steps of the algorithm.
4 MIXED INTEGER PROGRAMMING

A list L contains a list of unexplored subsets of XMIP , each Preprocessing


possibly with some lower bound, as well as an incumbent
Preprocessing can be carried out on the initial MIP, as
value z. Initially, the list just contains XMIP and z 1.
well as on each problem Xt taken from the list L. The idea
is to improve the formulation of the selected set Xt. This
action typically involves reducing the number of con-
If the list is empty, stop. The best solution found so far is
straints and variables so that the linear programming
optimal and has value z.
relaxation is solved much faster and tightening the
Otherwise, select and remove a set Xt from the list L. bounds so as to increase the value of the lower bound
Solve the corresponding linear program (with optimal ztLP , thereby increasing the chances of pruning Xt or its
solution x t ; y t and value ztLP ). If it is infeasible, so descendants.
X t f, or if one of the conditions ii) or iii) of Observation A variable can be eliminated if its value is fixed. Also, if a
4 hold, we update the incumbent if appropriate, prune variable is unrestricted in value, it can be eliminated by
Xt, and return to the list. substitution. A constraint can be eliminated if it is shown to
be redundant. Also, if a constraint only involves one vari-
t
If the node is not pruned (z > ztLP and y is fractional), we able, then it can be replaced by a simple bound constraint.
have not succeeded in finding the optimal solution in X t , so These observations and similar, slightly less trivial obser-
we branch (i.e., break the set Xt into two or more pieces). As vations often allow really dramatic decreases in the size of
the linear programming solution was not integral, some the formulations.
t
variable yj takes a fractional value y j . The simplest and Now we give four simple examples of the bound tighten-
most common branching rule is to replace Xt by two new ing and other calculations that are carried out very rapidly
sets in preprocessing:

t
X X t \ fx; y : yi  b y tj cg; (i) (Linear Programming)
P P Suppose that one constraint
of Xt is j 2 N1 a j x j  j 2 N2 a j x j  b; a j > 0 for all
X t X t \ fx; y : yj  d ytj e g j 2 N1 [ N2 and the variables have bounds
l j  xP j  u j. P
whose union is Xt. The two new sets are added to the list L, If j 2 N1 a j u j  j 2 N2 a j l j < b, then the MIP is
and the algorithm continues. unfeasibleP P
Obvious questions that are important in practice are the If j 2 N1 a j l j  j 2 N2 a j u j  b, then the con-
choice of branching variable and the order of selection/ straint is redundant and can be dropped. P
removal of the sets from the list L. Good choices of branch- For P a variable t 2 N1 , weP have at xt  b P j 2 N2
ing variable can reduce significantly the size of the enu- a j x j  j 2 N1 nftg a j x j  b j 2 N2 a j l j  j 2 N nftg
1

meration tree. Pseudo-costs or approximate dual variables a j u j . Thus, we have the possibly improved bound
are used to estimate the costs of different variable choices. on xt
Strong branching is very effectivethis involves selecting
a subset of the potential variables and temporarily branch- P P
b j 2 N2 a jl j  j 2 N1 nftg a j u j
ing and carrying out a considerable number of dual pivots xt  maxlt ; 
with each of them to decide which is the most significant at
variable on which to finally branch. The order in which
nodes/subproblems are removed from the list L is a com-
One also possibly, can improve the upper bounds on xj
promise between different goals. At certain moments one
for j 2 N2 in a similar fashion.
may use a depth-first strategy to descend rapidly in the tree
so as to find feasible solutions quickly: however, at other (ii) (Integer Rounding) Suppose that the bounds on an
moments one may choose the node with the best bound so as integer variable l j  y j  u j just have been updated
not to waste time on nodes that will be cut off anyway once a by preprocessing. If l j ; u j 2
= Z, then these bounds can
better feasible solution is found. be tightened immediately to
The complexity or running time of the branch-and-
bound algorithm obviously depends on the number of sub-
l j   y j  ju j j
sets Xt that have to be examined. In the worst case, one
might need to examine 2n such sets just for a 01 MIP.
Therefore, it is crucial to improve the formulation so that
the value of the linear programming relaxation gives better (iii) (0-1 Logical Deductions) Suppose that Pone of the
bounds and more nodes are pruned, and/or to find a good constraints can be put in the form j 2 N a jy j 
feasible solution as quickly as possible. b; y j 2 f0; 1g for j 2 N with a j > 0 for j 2 N.
Ways to improve the formulation, including preproces- If b < 0, then the MIP is infeasible.
sing, cutting planes and a priori reformulation, are dis- If a j > b  0, then one has y j 0 for all points of
cussed in the next three subsections. The first two typically XMIP .
are carried out as part of the algorithm, whereas the MIP If a j ak > b  maxfa j ; ak g, then one obtains the
formulation given to the algorithm is the responsibility of simple valid inequality y j yk  1 for all points of
the user. XMIP .
MIXED INTEGER PROGRAMMING 5

(iv) (Reduced cost fixing) Given an incumbent value z (ii) (Mixed Integer Rounding) Consider an arbitrary
from the best feasible solution, and a representation
P row or combination of rows of XMIP of the form:
of the objective function in the form ztLP j c j x j
P X X
j c j yj with c j  0 and c j  0 obtained by linear
a jx j g jy j  b
programming, any better feasible solution in Xt j2P j2N
must satisfy x 2 Rp ; y 2 Zn

X X Using the inequality from i), it is easy to establish


c jx j c~ j y j < z  ztLP validity of the mixed integer rounding (MIR) inequality:
j j
X aj X f j  f
xj b gj c y j  b b c
j 2 P:a j <0
1 f j2N
1 f
Thus, any such solution satisfies the bounds x j 
z ztLP z ztLP
cj and y j  b cj c . (Note that reductions such as where f b  b b c and f j g j  b g j c . The Separa-
in item iv) that take into account the objective function tion Problem for the complete family of MIR inequalities
actually modify the feasible region XMIP). derived from all possible combinations of the initial
constraints, namely all single row sets of the form:

Valid Inequalities and Cutting Planes


uAx uGy  ub; x 2 Rp ; y 2 Zn
P P
Definition 5. An inequality pj1 p j x j nj1 m j y j  p0 is
a valid inequality (VI) for XMIP if it is satisfied by every where u  0, is N P-hard.
point of XMIP.
(iii) (Gomory Mixed Integer Cut) When the linear pro-
The inequalities added in preprocessing typically are
gramming solution x; y 2
= XMIP ; some row exists
very simple. Here, we consider all possible valid inequal-
from a representation of the optimal solution of the
ities, but because infinitely many of them exist, we restrict
form
our attention to the potentially interesting inequalities. In
Figure 1, one sees that only a finite number of inequalities X X
(known as facet-defining inequalities) are needed to yu a jx j g j y j a0
j 2 Pu j 2 Nu
describe convXMIP . Ideally, we would select a facet-defin-
ing inequality among those cutting off the present linear
with yu a0 2= Z1 ; xj 0 for j 2 Pu ;and yu 0 for
programming solution x ; y Formally, we need to solve
j 2 Nu . Applying the MIR inequality and then eliminat-
the
ing the variable yu by substitution, we obtain the valid
inequality
Separation Problem: Given XMIP and a point
x ; y 2 Rp  Rn either show that x ; y 2 convXMIP , or X X f0 X
find a valid inequality mx my  p0 for XMIP cutting off a jx j  a x f jy j
1  f0 j j
x ; y px my < p0 . j 2 Pu :a j > 0 j 2 Pu :a j <0 j 2 N u : f j  f0
Once one has a way of finding a valid inequality cutting off X f0 1  f j
noninteger points, the idea of a cutting plane algorithm is y j  f0
j 2 N u : f j > f0
1  f0
very natural. If the optimal linear programming solution
x ; y for the initial feasible set XMIP has y fractional and a
valid inequality cutting off the point is known (for example, called the Gomory mixed integer cut, where
given by an algorithm for the Separation Problem), then the f j g j  b g j c for j 2 Nu [ f0g. This inequality cuts
inequality is added, the linear program is resolved, and the off the LP solution x ; y . Here, the Separation Problem
procedure is repeated until no more cuts are found. Note is trivially solved by inspection and finding a cut is
that this process changes the linear programming repre- guaranteed. However, in practice the cuts may be judged
sentation of the set XMIP and that this new representation ineffective for a variety of reasons, such as very small
must be used from then on. violations or very dense constraints that slow down the
Below we present several examples of cutting planes. solution of the LPs.
(iv) (01 MIPs and Cover Inequalities) Consider a 01
MIP with a constraint of the form
(i) (Simple Mixed Integer Rounding) Consider the MIP X
set X fx; y 2 R1  Z1 : y  b xg It can be g j y j  b x; x 2 R1 ; y 2 Z
jNj

shown that every point of X satisfies the valid j2N


inequality
P
x with g j > 0 for j 2 N. A set C  N is a cover if j 2 c g j
y  bbc b l with l > 0. The MIP cover inequality is
1 f
X x
y j  jCj  1
where f b  b b c is the fractional part of b. j2C
l
6 MIXED INTEGER PROGRAMMING

Using appropriate multiples of the constraints y j  0 linear programming relaxations and, thus, much more
and y j  1, the cover inequality can be obtained as a effective solution of the corresponding MIPs.
weakening of an MIR inequality. When x 0, the
Separation Problem for such cover inequalities can be (i) (Capacitated Facility LocationAdding a Redun-
shown to be an NP-hard, single row 01 integer pro- dant Constraint) The constraints in Equations (2)
gram. through (4) obviously imply validity of the con-
(v) (Lot Sizing) Consider the single item uncapacitated straint
lot-sizing set
X
n X
m
 b jy j  ai
X LSU x; s; y 2 Rn  Rn  f0; 1gn : j1 i1

st1
Xxt dt st 1  t n
n stat which that the capacity of the open depots must
xt  du yt 1  t  n be at least equal to the sum of all the demands of the
ut clients. As y 2 f0; 1gn , the resulting set is a 01 knap-
sack problem for which cutting planes are derived
Note that the feasible region XPP of the production readily.
planning problem formulated in A multi-Item produc-
(ii) (Lot SizingAdding a Few Valid Inequalities) Con-
tion plenning problem section can be written as
LSU \ Y where Y  f0; 1gmn contains sider again the single item, uncapacitated lot-sizing
X pp \m i1 Xi set X LSU : In item v) of the valid in inequalities and
the joint Machine constraints in Equation (7) and the
cutting planes sections, we described the inequal-
possibly tighter bound constraints in Equation (6).
ities that give the convex hull. In practice, the most
effective inequalities are those that cover a periods.
Select an interval k; k 1; . . . ; l with 1  k  l  n and
Thus, a simple a priori strengthening is given by
some subset T  fk; . . . ; lg Note that if k  u  l and no
adding the inequalities in Equation (15) with T f
production
P exists in any period in fk; . . . ; ugnTi:e:;
and l  k k
j 2 fk;...;ugnT y j 0; then the demand du in period u must
either be part of the stock than the sk1 or be produced in 0 1
some period in T \ fk; . . . ; ug. This finding establishes the X
1 X
u

validity of the inequality sk1  du @1  y jA


uk jk
0 1
X Xi X
sk1 xj  du @1  y jA (15)
j2T uk j 2 fk;...;ugnT for some small value of k:
(iii) (Lot SizingAn Extended Formulation) Consider
again the single item, uncapacitated lot-sizing set
Taking l as above, L f1; . . . ; lg, and S f1; . . . ; k  1g
XLSU. Define the new variables zut with u  t as the
[ T;, the above inequality can be rewritten as a so-called
amount of demand for period t produced in period u.
(l,S)-inequality:
Now one obtains the extended formulation
0 1
X X X 1 X1 X
t
xj @ d u Ay j  du zut dt ; 1  t  n
j2S j 2 LnS u j u1 n1
zut  dt yu ; 1  u  t  n
This family of inequalities suffices to describe conv (X LSU ) Xn
Now, given a point x ; s ; y , the Separation Problem for xu zut ; 1  u  n
tu
the (l,S) inequalities is solved easily by checking if
st1 xt dt st ; 1  t  n
0 1 nn1=2
X1 X 1 X1 x; s 2 Rn ; z 2 R ; y 2 b 0; 1 c m
minxj ; @ du Ayj  < du
j1 u j u1 whose x; s; y solutions are just the points of conv
(XLSu). Thus, the linear program over this set solves
for some l. If it does not, the point lies in conv(X LSU ): the lot-sizing problem, whereas the original description
otherwise a violated(l, PS) inequality
  is found by taking S of xLSu provides a much weaker formulation.
l
f j 2 f1; . . . ; lg : xj < u j du y j g: (iv) (Modeling Disjunctive or Or ConstraintsAn
Extended Formulation) Numerous problems involve
A Priori Modeling or Reformulation disjunctions,for instance, given two jobs i, and j to
Below we present four examples of modeling or a priori be processed on a machine with processing times pi,
reformulations in which we add either a small number of pj, respectively, suppose that either job i must
constraints or new variables and constraints, called be completed before job j or vice versa. If ti, tj are
extended formulations, with the goal of obtaining tighter variables representing the start times, we have the
constraint EITHER job i precedes job j OR job j
MIXED INTEGER PROGRAMMING 7

precedes job i, which can be written more formally We distinguish between construction heuristics, in
as which one attempts to find a (good) feasible solution from
scratch, and improvement heuristics, which start from a
ti pi  t j or t j p j  ti feasible solution and attempt to find a better one. We start
More generally one often encounters the situation where with construction heuristics.
one must select a point (a solution) from one of k sets or Rounding . The first idea that comes to mind is to take
polyhedra (a polyhedron is a set described by a finite the solution of the linear program and to round the values
number of linear inequalities): of the integer variables to the nearest integer. Unfortu-
nately, this action is rarely feasible in XMIP.
k
x2 [ P where P fx : A x  b g  R
i1
i i
i i n
A Diving Heuristic. This heuristic solves a series of
linear programs. At the tth iteration, one solves
When each of the sets Pi is nonempty and bounded, the set
[ ki1 Pi can be formulated as the MIP: minfcx hy : Ax Gy  b; x 2 Rp ; y 2 Rn ; y j yj for j 2 N t g

X
k
If this linear program is infeasible, then the heuristic has
x zi (16) failed. Otherwise, let xt ; yt be the linear programming
i1
solution.
Ai zi  bi yi for i 1; . . . ; k (17) Now if y t 2 Zn , then a diving heuristic solution has been
found. Otherwise, if yt 2 = Zn , then at least one other vari-
X
k able is fixed at an integer value. Choose j 2 NnN t with
yi 1 (18) = Z1 Set N t1 N t [ f jg and t t 1. For example, one
ytj 2
i1
chooses to fix a variable whose LP value is close to an
x 2 Rn ; z 2 Rnk ; y 2 f0; 1gk (19) integer, i.e., j argmink:y t 2= z1 minykt  b ykt c ; d ykt e  ykt :
k

A Relax-and-Fix Heuristic. This heuristic works by


where yi 1 indicates that the point lies in Pi. Given a
decomposing the variables into K blocks in natural way,
solution with yi 1, the constraint in Equation (18) then
such as by time period, geographical location, or other. Let
forces yj 0 for j 6 i and the constraint in Equation (17)
N f1; . . . ng [ K
k1 Ik with intervals Ik sk ; tk  such that
then forces zi 2 Pi and z j 0 for j 6 i. Finally, Equation (16)
s1 1; tK n; and sk tk1 1 for k 2; . . . ; K.
shows that x 2 Pi if and only if yi 1 as required, and it
One solves K MIPs by progressively fixing the integer
follows that the MIP models [ ki1 Pi . What is more, it has
variables in the sets I1, I2,. . ., IK. Each of these MIPs is
been shown (6) that the linear programming relaxation of
much easier because in the k-th problem only the variables
this set describes conv( [ ki1 Pi ), so this again is an inter-
in Ik are integer. The k-th MIP is
esting extended formulation.
Extended formulations can be very effective in giving
better bounds, and they have the important advantage that min cx hy
they can be added a priori to the MIP problem, avoid which Ax Gy  b
is the need to solve a separation problem whenever one x 2 Rp ; y j y j for j 2 [ t1
k1
Ik ;
wishes to generate cutting planes just involving the origi- y j 2 Z for j 2 It ; y j 2 R for j 2 [ K
1 1
tk1 It
nal (x, y) variables. The potential disadvantage is that the
problem size can increase significantly and, thus, the time
to solve the linear programming relaxations also may If x; y is an optimal solution, then one sets yj yj for
increase. j 2 Ik and k k 1. If the Kth MIP is feasible, then a
heuristic solution is found; otherwise, the heuristic fails.
Now we describe three iterative improvement heuris-
Heuristics tics. For simplicity, we suppose that the integer variables
are binary. In each case one solves an easier MIP by
In practice, the MIP user often is interested in finding a
good feasible solution quickly. In addition, pruning by restricting the values taken by the integer variables to
optimality in branch-and-bound depends crucially on some neighborhood N(y) of the best-known feasible solu-
the value of the best known solution value z. We now tion (x, y) and one iterates. Also, let (xLP, yLP) be the
current LP solution. In each case, we solve the MIP
describe several MIP heuristics that are procedures
designed to find feasible, and hopefully, good, solutions
quickly. min cx hy
In general, finding a feasible solution to an MIP is an Ax Gy  b
NP-hard problem, so devising effective heuristics is far x 2 Rp ; y 2 Zn ; y 2 Ny
from simple. The heuristics we now describe are all based
on the solution of one or more MIPs that hopefully are much
simpler to solve than the original problem. with a different choice of Ny .
8 MIXED INTEGER PROGRAMMING

The Local Branching Heuristic. This heuristic restricts Initial formulation on list L
one to a solution at a (Hamming-) distance at most k from y:
YES
List empty? Stop. Incumbent is optimal.

Ny fy 2 f0; 1gn : jy j  yj j  kg NO


t t
This neighborhood can be represented by a linear con- Remove X with formulation P from list.
straint
X X Preprocess.
Ny fy 2 f0; 1gn : yj 1  y j  kg
j:yj 0 j:yj 1
Solve LP.

Prune by
YES infeasibility t
Update formulation P .
The Relaxation Induced Neighborhood Search Heuristic optimality, or
(RINS). This heuristic fixes all variables that have the bound?

same value in the IP and LP solutions and leaves the others NO



free. Let A f j 2 N : yIP
j y j g. Then Call heuristics. Update incumbent.

Ny fy : y j yj for j 2 Ag


YES
Separation. Cuts found?

NO

Branch. Add two new nodes to list L.


The Exchange Heuristic. This heuristic allows the user to
choose the set A of variables that are fixed. As for the Relax- Figure 2. Branch-and-cut schema.
and-Fix heuristic, if a natural ordering of the variables
exists then, a possible choice is to fix all the variables except
for those in one interval Ik. Now if A N\Ik, the neighbor- (v) Look for violated valid inequalities. If one or more
hood can again be taken as satisfactory cuts are found, then add them as cuts,
modify Pt, and repeat ii).
Ny fy : y j yj for j 2 Ag
(vi) If no more interesting violated inequalities are
found, Then branch as in the branch-and-bound
algorithm and add the two new sets Xt and X t
One possibility then is to iterate over k 1,. . ., K, and to the list L, along with their latest formulations P t.
repeat as long as additional improvements are found.
Then one returns to the branch-and-bound step of select-
The Branch-and-Cut Algorithm ing a new set from the list and so forth.
In practice, preprocessing and cut generation always are
The branch-and-cut algorithm is the same as the branch- carried out on the original set XMIP and then on selected sets
and-bound algorithm except for one major difference. Pre- drawn from the list (for example, sets obtained after a
viously one just selected a subset of solutions Xt from the list certain number of branches or every k-th set drawn from
L that was described by the initial problem representation the list). Often, the valid inequalities added for set Xt are
Ax Gy  b; x 2 Rp ; y 2 Zn and the bound constraints on the valid for the original set XMIP ; in which case the inequalities
integer variables added in branching lt  y  ut . Now, one can be added to each set P t. All the major branch-and-cut
retrieves a set Xt from the list, along with a possibly systems for MIP use preprocessing, and heuristics, such as
tightened formulation (based on preprocessing and cutting diving and RINS, and the valid inequalities generated
planes) include MIR inequalities, Gomory mixed integer cuts, 0
1 cover inequalities, and path inequalities, generalizing the
Pt fx; y 2 R p Rn : At x Gt y  bt ; lt  y  ut g (l, S) inequalities. A flowchart of a branch-and-cut algo-
rithm is shown in Fig. 2.
where X t pt \ R p  Zn .
Now the steps, once Xt is taken from the list, L are
REFERENCES AND ADDITIONAL TOPICS
(i) Preprocess to tighten the formulation Pt.
(ii) Solve the linear program ztLP minfcx hy :
Formulations of Problems as Mixed Integer Programs
x; y 2 Pt g.
(iii) Prune the node, if possible, as in branch-and-bound. Many examples of MIP models from numerous areas,
(iv) Call one or more heuristics. If a better feasible including air and ground transport, telecommunications,
solution is obtained, Then update the incumbent cutting and loading, and finance can be found in Heipcke (2)
value z. and Williams (3), as well as in the operations research
journals such as Operations Research, Management
MIXED INTEGER PROGRAMMING 9

Science, Mathematical Programming, Informs Journal of MIP Test Problems and Software
Computing, European Journal of Operational Research,
An important source for test instances is the MIPLIB
and more specialized journals such as Transportation
library (26). Several commercial branch-and-cut systems
Science, Networks, Journal of Chemical Engineering,
are available, of which three of the most well known are
and so forth.
Cplex (27), Xpress-MP (28), and Lindo (29). See OR-MS
Today for regular surveys of such systems. Among non
Basic References commercial systems, several MIP codes exist in the Coin
library (30), as well as several other research codes, includ-
Two basic texts on integer and mixed integer programming
ing SCIP (31) and MINTO (32). In addition, modeling
are Wolsey (4) and part I of Pochet and Wolsey (5). More
languages such as AMPL (33), LINGO (29) and MOSEL
advanced texts are Schrijver (6) and Nemhauser and Wol-
(28) that facilitate the modeling and generation of linear
sey (7). Recent surveys on integer and mixed integer pro-
and mixed integer programs.
gramming with an emphasis on cutting planes include
Marchand et al. (8), Fiigenschuh and Martin (9), Cornuejols
(10), and Wolsey (11). Nonlinear Mixed Integer Programming
Preprocessing is discussed in Savelsbergh (12) and The study of algorithms for nonlinear MIPs is, relatively, in
Andersen and Andersen (13), and branching rules is dis- its infancy. Portfolio optimization problems with integer
cussed in Achterberg et al. (14). Much fundamental work on variables are being tackled using convex (second order
cutting planes is because of Gomory (15, 16). The related cone) optimization as relaxations: see Ben Tal and Nemir-
mixed integer rounding inequality appears in chaper II.1 of ovsky (34). Two approaches for nonconvex MINLPs are
Nemhauser and Wolsey (7), and cover inequalities for 01 generalized Benders decomposition, see Geoffrion (35),
knapsack constraints are discussed in Balas (17), Hammer and outer approximation algorithms (36, 37). References
et al. (18), and Wolsey (19). The local branching heuristic include the book of Floudas (38) and the lecture notes of
appears in Fischetti and Lodi (29): RINS and diving Weismantel (39). Software includes the Dicopt code (40)
appears in Danna et al. (21). and the BARON code of Sahinidis and Tawarmalami (41):
see also Ref. 42 for recent computational results. SeDuMi
Decomposition Algorithms (43) is one of the most widely used codes for convex opti-
mization. The Cplex and Xpress-MP systems cited above
Significant classes of MIP problems cannot be solved allow for nonlinear MIPs with quadratic convex objective
directly by the branch-and-cut approach outlined above. functions and linear constraints. Heuristics for nonlinear
At least three important algorithmic approaches use the MIPs are presented in Ref. 44, and a test set of nonlinear
problem structure to decompose a problem into a sequence MIPs is in preparation (45).
of smaller/easier problems. One such class, known as
branch-and-price or column generation, see, for instance,
Barnhart et al. (22), extends the well-known Dantzig BIBLIOGRAPHY
Wolfe algorithm for linear programming (23) to IPs and
MIPs. Essentially, the problem is reformulated with a 1. E. Balas, Disjunctive programming: Properties of the convex
huge number of columns/variables, then dual variables or hull of feasible points, Invited paper with foreword byG. Cor-
prices from linear programming are used to select/gen- nuejols and W. R. Pulleyblank, Discrete Applied Mathematics,
erate interesting columns until optimality is reached, and 89: 144, 1998.
then the whole is embedded into a branch-and-bound 2. S. Heipcke, Applications of Optimization with Xpress. Dash
approach. Very many problems in the area of airlines, Optimization Ltd, 2002.
road and rail transport, and staff scheduling are treated in 3. H. P. Williams, Model Building in Mathematical Program-
this way. A related approach, Lagrangian relaxation (24), ming. John Wiley and Sons, 1999.
uses the prices to transfer complicating constraints into 4. L. A. Wolsey, Integer Programming. John Wiley and Sons,
the objective function. The resulting, easier problem pro- 1998.
vides a lower bound on the optimal value, and the prices 5. Y. Pochet and L. A. Wolsey, Production Planning by Mixed
then are optimized to generate as good a lower bound as Integer Programming. Springer, 2006.
possible. 6. A. Schrijver, Theory of Linear and Integer Programming., John
An alternative decomposition strategy, known as Bend- Wiley and Sons, 1986.
ers decomposition (25), takes a different approach. If the 7. G. L. Nemhauser and L. A. Wolsey, Integer and Combinatorial
value of the integer variables is fixed, then the remaining Optimization. John Wiley and Sons, 1988.
problem is a linear program fy minfcx : Ax  b  8. H. Marchand, A. Martin, R. Weismantel, and L. A. Wolsey,
Gy; x 2 Rp g and the original problem can be rewritten as Cutting planes in integer and mixed integer programming,
minffy hy : y 2 Zn g. Although fy is not known expli- Discrete Applied Mathematics, 123/124: 397446, 2002.
citly, whenever a linear program is solved for some y, a 9. A. Fugenschuh and A. Martin, Computational integer pro-
support of the function fy is obtained and the algorithm gramming and cutting planes, in K. Aardal, G. L. Nemhauser,
works by simultaneously enumerating over the y variables and R. Weismantel, (eds.) Combinatorial Optimization, Vol. 12
and continually updating the approximation to fy until of Handbooks in Operations Research and Management
Science, chapter 2, pages 69-121. Elsevier, 2006.
an optimal solution is obtained.
10 MIXED INTEGER PROGRAMMING

10. G. Cornuejols. Valid inequalities for mixed integer linear pro- 31. T. Achterberg, SCIPa framework to integrate constraint and
grams, Mathematical Programming B, 112: 344, 2007. mixed integer programs, ZIB Report 04-19. Konrad-Zuse Zen-
11. L. A. Wolsey, Strong formulations for mixed integer programs: trum, Berlin 2004. Available:http://scip.zib.de.
Valid inequalities and extended formulations, Mathematical 32. MINTO, Mixed integer optimizer, Developed and maintained
Programming B, 97: 423447, 2003. by M. W. P Savelsbergh, Georgia Institute of Technology.
12. M. W. P. Savelsbergh, Preprocessing and probing for mixed Available: http://www2.isye.gatech.edu/ mwps/software/.
integer programming problems, ORSA J. of Computing, 6: 33. R. Fourer, D. M. Gay and B. W. Kernighan, AMPL: A model-
445454, 1994. ing language for mathematical programming Duxbury Press/
13. E. D. Andersen and K. D. Andersen, Presolving in linear Brooks Cole Publishing Co. 2002. Available: http://
programming, Mathematical Programming, 71: 221245, www.ampl.com/.
1995. 34. A. Ben-Tal and A. Nemirovski, Lectures on Modern Convex
14. T. Achterberg, T. Koch, and A. Martin, Branching rules revis- Optimization: Analysis, Algorithms and Engineering Applica-
ited, Operations Research Letters, 33: 4254, 2005. tions, MPS-SIAM Series on Optimization, Philadelphia, 2001.
15. R. E. Gomory, Solving linear programs in integers, in R. E. 35. A. M. Geoffrion, Generalized Benders decomposition, Jo. Opti-
Belmman and M. Hall, Jr.(eds.), Combinatorial Analysis. mization Theory and Applications, 10: 237260, 1972.
American Mathematical Society, 211216, 1960. 36. R. Fletcher and S. Leyffer, Solving mixed integer nonlinear
16. R. E. Gomory, An algorithm for the mixed integer problem, programs by outer approximation, Mathematical Program-
RAND report RM-2597, 1960. ming, 66: 327349, 1994.
17. E. Balas, Facets of the knapsack polytope, Mathematical Pro- 37. M. A. Duran and I. E Grossman, An outer approximation
gramming, 8: 146164, 1975. algorithm for a class of mixed-integer nonlinear programs,
18. P. L. Hammer, E. L. Johnson, and U. N. Peled, Facets of Mathematical Programming, 36: 307339, 1986.
regular 01 polytopes, Mathematical Programming, 8: 179 38. C. A. Floudas, Nonlinear and Mixed-Integer Optimization:
206, 1975. Fundamentals and Applications. Oxford University Press,
19. L. A. Wolsey, Faces for linear inequalities in 01 variables, 1995.
Mathematical Programming8: 165178, 1975. 39. R. Weismantel, Mixed Integer Nonlinear Programming. CORE
20. M. Fischetti and A. Lodi, Local branching, Mathematical Pro- Lecture Series. CORE, Universite catholique de Louvain, Bel-
gium, 2006.
gramming, 98: 2348, 2003.
40. Dicopt. Framework for solving MINLP (mixed integer non-
21. E. Danna, E. Rothberg, and C. Le Pape, Exploring relaxation
induced neighborhoods to improve MIP solutions, Mathema- linear programming) models. Available: http://www.gams.-
tical Programming, 102: 7190, 2005. com.
22. C. Barnhart, E. L. Johnson, G. L. Nemhauser, M. W. P Savels- 41. BARON,Branch and reduce optimization navigator. Available:
http://neos.mcs.anl.gov/neos/solvers/go:BARON/GAMS.html.
bergh, and P. H. Vance, Branch-and-price: Column generation
for huge integer programs, Operations Research, 46: 316329, 42. M. Tawarmalami and N. V. Sahinidis, Global optimization of
1998. mixed-integer nonlinear programs: A theoretical and compu-
23. G. B. Dantzig and P. Wolfe, Decomposition principle for linear tational study, Mathematical Programming, 99: 563591,
2004.
programs, Operations Research, 8: 101111, 1960.
43. SeDuMi, Software for optimization over symmetric cones.
24. A. M. Geoffrion, Lagrangean relaxation for integer program-
ming, Mathematical Programming Study, 2: 82114, 1974. Available: http://sedumi.mcmaster.ca/.
25. J. F. Benders, Partitioning procedures for solving mixed vari- 44. P. Bonami, L. T. Biegler, A. R. Conn, G. Cornuejols, I. E.
ables programming problems, Numerische Mathematik, 4: Grossman, C. D. Laird, J. Lee, A. Lodi, F. Margot, N. Sawaya,
and A. Wachter, An algorithmic framework for convex mixed
238252, 1962.
integer nonlinear programs, Technical report RC23771, IBM
26. T. Achterberg, T. Koch, and A. Martin, MIPLIB 2003, Opera-
T. J. Watson Research Center, Discrete Optimization. In press.
tions Research Letters, 34: 112, 2006. Available: http://miplib:
zib.de. 45. N. W. Sawaya, C. D. Laird, and P. Bonami, A novel library of
nonlinear mixed-integer and generalized disjuctive program-
27. ILOG CPLEX, Using the Cplex callable library. Available:
ming problems. In press, 2006.
http://www.ilog.com/cplex.
28. Xpress-MP, Xpress-MP optimisation subroutine library. Avail-
able: http://www.dashoptimization.com. LAURENCE A. WOLSEY
29. LINDO, Optimization modeling with Lindo, Available: http:// Universite Catholique de
www.lindo.com. Louvain
30. COIN-OR, Computational infrastructure for operations LouvainlaNeuve, Belgium
research. Available: http://www.coin-or.org/.
M
MULTIGRID METHODS mal iterative solver is the one that scales optimally with the
problem size. That is, the computing resources employed by
INTRODUCTION the solver and the execution time should be proportional to
the problem size. To achieve an optimal iterative solution
Numerical modeling in science and engineering has procedure, we must ensure that it converges to a prescribed
emerged in recent years as a viable alternative to a more accuracy within a constant, presumably small, number of
conventional experimental approach, which has some iterations, regardless of the problem size or any other
shortfalls, such as the cost, the time consumption, the problem-specific parameters.
difficulties with accuracy, or the ethical issues. As compu- Simple iterative methods often fail in fulfilling the
ter processing power continues to increase, nowadays it is optimality condition when applied to discretized DEs. To
possible to perform modeling and simulation studies for understand the problem, we shall consider the solution
large-scale problems in important areas, such as conti- error in the Fourier space, represented as a linear combi-
nuum mechanics, electromagnetism, quantum physics, nation of the wave-like components having the shape of sine
and so forth. Modern trends also involve modeling of the or cosine functions with different wavelengths (or frequen-
complex systems with the constitutive parts from different cies). Simple iterative methods are very efficient in elim-
areas, which are often referred to as multi-physics systems. inating the high-frequency (short wavelength) error
The growing appetite for even larger models requires also a components because these require only the information
development of sophisticated algorithms and numerical from the closest grid neighbors. This efficiency also is
techniques for efficient solution of underlying equations. known as the smoothing property of the iterative methods
Computer-aided modeling represents the space and (4, p. 412419). After this initial phase, when rapid con-
time continuum by a finite set of properly selected discrete vergence is observed within a few iterations, the simple
coordinate points. These points typically are connected to iterative solvers have to work hard to reduce the remaining
form a mesh over the domain of interest. A discrete phy- error that is now dominated by the low-frequency (long
sical or numerical variable is associated with the mesh wavelength) error components. The reduction of low-fre-
points. Such a discrete variable is referred to here as the quency errors requires communication among distant grid
grid variable. A set of grid variables together with the variables and takes a much larger number of iterations
algebraic equations that define their implicit dependen- than in the case of the high-frequency error components.
cies represent a grid problem. A process of approximating This reason is why the simple iterative procedures become
a continuous problem by an appropriate grid problem is nonoptimal.
called the discretization. The most common class of The splitting into high-frequency and low-frequency
continuous problems that require discretization are error components is introduced, in principle, relative to
differential equations (DEs). the characteristic distance between neighboring mesh
DEs are the mathematical expressions that relate points or the mesh size. Namely, the wavelengths of the
unknown functions and their derivatives in continuous high-frequency solution error components are comparable
space and time. The local connectivity among the mesh with the mesh size. Obviously, a part of the low-frequency
points is used to approximate the derivatives of the error components can be regarded as the high-frequency
unknown function. The order of this approximation deter- components if the problem is discretized using a coarser
mines the order of accuracy of the method itself. The size of mesh. This situation naturally leads to the idea of using a
the resulting grid problem is proportional to the number of coarser grid problem to improve the convergence and
mesh points. Some well-known methods for the discretiza- reduce the numerical cost of an iterative solution scheme.
tion of DEs are the finite difference method (FDM), the finite But we need to keep in mind that only the fine grid problem
element method (FEM), and the finite volume method (13). approximates the continuous DE with the required accu-
A common feature of the grid problems obtained by discre- racy. Therefore, both problems should be combined in a
tization of DEs by these methods is the local dependence of proper way to produce an effective solution algorithm.
grid variables. Namely, a single grid variable depends only Moreover, some low-frequency error components still can
on a small set of grid variables in its close neighborhood. represent a problem for iterative procedures on the coarser
The solution of the grid problems created by the dis- mesh. These components can be reduced by introducing a
cretization of DEs, which usually take the form of linear or sequence of additional progressively coarser meshes and
non linear systems of algebraic equations, is obtained by corresponding grid problems associated with them. This
applying a certain solution procedure. Iterative methods idea leads to multigrid methods (MG) that employ a hier-
start from an initial approximation to the solution, which is archy of discrete grid problems to achieve an optimal solu-
improved over a number of iterations until the discrete tion procedure.
solution is obtained within the prescribed accuracy. The In this section, we present only a high-level descrip-
difference between the initial discrete approximation and tion of the MG heuristics. For additional technical
the discrete solution represents the iteration error that is details, the reader is referred to the next two sections.
eliminated during an iterative solution procedure. An opti- After a few steps of a simple iterative procedure at the

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 MULTIGRID METHODS

finest grid, the high-frequency error components are only algebraic information available for the grid variable
eliminated from the initial solution error. This procedure dependencies. In addition, a broad range of problems in
is called the smoothing. The remaining low-frequency science and engineering require multi scale modeling and
error then is transferred to the coarser grid by a process simulation techniques (e.g., oil reservoir modeling). The
called the restriction. The same procedure (smoothing range of scales involved in such problems induce a prohibi-
and restriction) is repeated on the coarser level. The tively large number of variables in the classic mono scale
remaining low-frequency error components at the coar- modeling approach. MG methods also naturally apply to
ser level are transfered even more to an even coarser grid, such cases.
and the smoothing procedure is repeated. This pair of
operations (the smoothing and the error transfer to a BASIC CONCEPTS
coarser grid) is repeated until a sufficiently coarse grid,
with only a few nodes, is reached. The coarsest grid The basic MG ideas are developed more in this section
solution (with the low-frequency errors removed by the within the context of second-order, elliptic, self-adjoint DE
application of a direct-solution method) then is used to problems. We first introduce the model problem in one
correct the corresponding discrete solutions on the finer spatial dimension. The FDM/FEM discretization of this
grid levels using prolongation or interpolation. The pro- problem produces a linear system that will serve as an
longation steps often are followed by additional post- example for studying the efficiency of the basic iterative
smoothing steps to eliminate the remaining high- schemes (fixed-point iterations). Lack of efficiency of
frequency error components that could be introduced simple iterations in this context is the main motivation
by them. behind the application of these schemes in a recursive
The first MG scheme was introduced by Fedorenko in fashion. This naturally leads to MG methods. We describe
the early 1960s (5). It was presented in the context of the the main algorithmic components of MG, its arithmetic
Poisson equation on the unit square domain. However, complexity, and its effectiveness.
the full potential of the MG approach was not realized
until the work of Brandt in the mid 1970s (6). Since Continuous and Discrete Single-Grid Problems
then, a tremendous amount of theory and application
related to MG methods has been published, including A general, time-dependent, DE in d spatial dimensions can
several monographs (715). Over time, MG methods be written as
have evolved into an independent field of research, inter- !
acting with numerous engineering application areas and @u @ 2 u @ku
A t; u; ; 2 ;...; k ;  0 on V  T 1
having major impact in almost all scientific and engineer- @t @t @x 1    @xkd
1 d
ing disciplines.
A typical application for MG is in the numerical solution where x x1 ; . . . ; xd 2 V  Rd and T 0; t. To ensure
of discrete elliptic, self-adjoint, partial differential equations well-posedness of the solution, an appropriate set of bound-
(PDEs), where it can be applied in combination with any of ary conditions (BCs) and initial conditions (ICs) need to be
the common discretization techniques. In such cases, MG is imposed. By covering the domain of interest V by a mesh Vh
among the fastest-known solution techniques. MG also is and by applying a suitable spatial discretization procedure,
directly applicable to more complicated, nonsymmetric, and such as the FDM or the FEM, the continuous differential
non linear DE problems, systems of DEs, evolution pro- problem becomes a system of differentialalgebraic equa-
blems, and integral equations. In recent years we have seen tions:
an increased development of multi level (ML) solvers for the
solution of DE problems in various areas, including aero- !
@uh @ 2 uh @ k uh
dynamics (16), atmospheric and oceanic modeling (17), Ah t; uh ; ; ;...; k ;    0 on Vh  T
structural mechanics (18), quantum mechanics, statistical @t @t2 @x 1    @xkd
1 d
physics, (19), semiconductor fabrication (20), and electro- 2
magnetism (2123). In all these applications, MG methods
can be used as the building blocks of an overall solver, with where uh represents a discrete solution variable of dimen-
an aim of reaching the convergence rate that is nearly sion nh associated with the mesh Vh . The BCs are included
independent of the number of unknown grid variables or in the formulation in Equation (2). If the discrete problem is
other problem parameters. Such solvers would be capable of stationary, Equation (2) reduces to a non linear algebraic
reducing the solution error to the order of the computer system
truncation error with (nearly) optimal computational cost.
In contrast to other numerical methods, MG represents Ah uh 0 on Vh 3
a computational principle rather than a particular compu-
tational technique, and, therefore, it is not restricted by Finally, in the case of linear stationary problems, the
the type of problem, domain, and mesh geometry, or dis- discrete solution uh is defined as a linear algebraic system
cretization procedure. MG methods even may be applied
successfully to algebraic problems that do not involve geo- Ah uh fh on Vh 4
metric information and do not even originate from the
discretization of DEs. To this end, special techniques where Ah is a coefficient matrix and fh is the right-hand
are developed to create a required hierarchy that uses side vector.
MULTIGRID METHODS 3

A simple practical example that will serve to introduce commonly are used in this context. The error is defined as
the basic MG concepts is the one-dimensional model eh uh  u~h and the residual as rh fh  Ah u~h . Note that
problem if the residual is small, this does not imply automatically
that the approximation u~h is close to the solution uh . The
d2 u error eh and the residual rh are connected by the residual
Au  f in V 0; 1 5
dx2 equation

subject to the homogeneous Dirichlet BCs Ah eh rh 11

u0 u1 0 6 The importance of Equation (11) can be seen from the fact


that if the approximation u~h to the solution uh of Equation
Choosing a mesh Vh to be a set of nh 1 uniformly spaced (4) is computed by some iterative scheme, it can be
points xi ih; i 0; . . . ; nh where h 1=nh ; and replacing improved as uh u~h eh .
the second derivative at the mesh points by a central finite- The simplest iterative schemes that can be deployed
difference approximation (3), we obtain a discrete problem for the solution of sparse linear systems belong to the
class of splitting iterations (see Refs 2,4,7,8, and 10 for
uh xi1 2uh xi  uh xi1 more details). In algorithmic terms, each splitting iteration
Ah uh fh xi ;
h2 7 starts from the decomposition of the coefficient matrix
i 1; . . . ; nh  1 Ah as Ah Mh  Nh , with Mh being a regular matrix (det
Mh 6 0, such that the linear systems of the form Mh uh
with uh x0 uh xn1 0. The coefficient matrix of the fh are easy to solve. Then, for a suitably chosen initial
linear system in Equation (7) is a symmetric tridiagonal approximation of the solution u ~0 an iteration is formed:
matrix Ah h12 triding1 2  1. Although the linear
k1
system in Equation (7), because of its simplicity, can be u~h Mh1 Nh u~k Mh1 fh ; k 0; 1; . . . 12
solved efficiently by a direct method, it is used as an
example to explain the main algorithmic features of MG. Note that (12) also can be rewritten to include the residual
The extension of the modelproblem in Equations (5) and k k
vector rh fh  Auh :
(6) and MG concepts to two or more spatial dimensions also is
straightforward. For this purpose, we introduce a natural k1 k k
u~h u~h Mh1 rh ; k 0; 1; . . . 13
extension of the modelproblem in Equations (5) and (6) to
two spatial dimensions, known as the Poisson equation (2,
Ch. 1):
! Some well-known methods that belong to this category
@2u @2u are the fixed-point iterations, or the relaxation methods,
Au  f in V 0; 1  0; 1 8 such as the Jacobi method, the Gauss-Seidel method, and
@x21 @x22
its generalizations SOR and SSOR (4). To introduce these
methods, we start from the splitting of the coefficient
with the homogeneous Dirichlet BCs matrix Ah in (4) in the form Ah Dh  Lh  Uh , where Dh
diagAh and Lh and Uh are strictly the lower and the
u 0 on @V 9
upper triangular part of Ah , respectively. In this way, the
system in Equation (4) becomes Dh  Lh  Uh uh fh and
In Equation (8) we adopted, for simplicity, the unit
we can form a variety of iterative methods of the form in
square domain V 0; 1  0; 1  R2 . Central finite-
Equation (12) by taking suitable choices for the matrices Mh
difference approximation of the second derivatives in
and Nh .
Equation (8), defined on a grid of uniformly spaced points
In the Jacobi method, the simplest choice for Mh is taken,
x1 i ; x2 j ih; jh; i; j 1; . . . ; nh  1, results in a lin-
that is Mh Dh ; Nh Lh Uh and the iteration can be
ear system in Equation (4), in which the coefficient matrix
written as:
Ah can be represented in stencil notation as
2 3
1 k1
D1
k
~h D1
1 4 u~h h Lh Uh u h fh ; k 0; 1; . . . 14
Ah 2 1 4 1 5 10
h 1
A slight modification of the original method in Equation
k1 k
(14) is to take the weighted average between u~h and u~h
We remark that the discretization in Equation (10) of the to form a new iteration, for example,
two-dimensional model problem on a uniform Cartesian
grid is obtained as a tensor product of two one-dimensional k1 k
u
~h 1  vI vD1 ~h vD1
h Lh Uh u h fh ;
discretizations in x1 and x2 coordinate directions. 15
k 0; 1; . . .
The Smoothing Property of Standard Iterative Methods
When an approximate solution u~h of the system in Equation where v 2 R. Equation (15) represents the weighted or
(4) is computed, it is important to know how close it is to damped Jacobi method. For v 1, Equation (15) reduces
the true discrete solution uh . Two quantitative measures to the standard Jacobi method in Equation (14).
4 MULTIGRID METHODS

The GaussSeidel method involves the choice For the case of the linear system in Equation (7) obtained
Mh Dh  Lh , Nh Uh and can be written as from the discretization of the modelproblem in Equations
(5) and (6), the eigenvalues of the iteration matrix
2
GJh I  vh 2 Ah for the damped Jacobi method are
k1 k
u~h Dh  Lh 1 Uh u~h Dh  Lh 1 fh ; given by jp
l j GJh 1  2v sin2 2n ; j 1; . . . ; nh  1.
16 J
h
Thus, jl j Gh j < 1 for each j if 0 < v < 1, and the method
k 0; 1; . . .
is convergent. However, different choices of the damping
parameter v have a crucial effect on the amount by which
different Fourier components of the error are reduced.
The main advantage of the GaussSeidel method is that
k1 One particular choice is to find the value of the para-
the components of the new approximation u~h can be used
meter v that maximizes the effectiveness of the damped
as soon as they are computed. Several modifications of the
Jacobi method in reducing the oscillatory components of
standard GaussSeidel method are developed with the aim
the error (the components with the wave numbers
of improving the convergence characteristics or paralleliz-
nh =2  l  nh  1). The optimal value for the linear sys-
ability of the original algorithm in Equation (16) (sym-
tem in Equation (7) is v 2=3(7), and for this value we
metric, red-black, etc. see Refs. 4,7, and 8).
have jl j j < 1=3 for nh =2  j  nh  1. This means that each
When applied to the solution of linear systems in Equa-
iteration of the damped Jacobi method reduces the mag-
tion (7) that arise from the discretization of the model
nitude of the oscillatory components of the error by at least
problem in Equations (5) and (6), the convergence of split-
a factor 3. For the linear system obtained from the FEM
ting iterations is initially rapid, only to slow down signifi-
discretization of the two-dimensional modelproblem in
cantly after a few iterations. More careful examination of
Equation (8), the optimal value of v is 4/5 for the case of
the convergence characteristics using Fourier analysis (7
linear approximation and v 8=9 for bilinear case, (2, p.
10) reveal different speeds of convergence for different
100, 4). For the GaussSeidel method, the eigenvalues of
Fourier modes. That is, if different Fourier modes (vectors
the iteration matrix for the model-problem in Equation (7)
of the form vl i sinilp=nh ; i 1; . . . ; nh  1, where l is 2 jp
are given by l j GGSh cos nh ; j 1; . . . ; nh  1. As in the
the wave number) are used as the exact solutions of the
case of the damped Jacobi method, the oscillatory modes in
residual Equation (11) with a zero initial guess, the con-
the error are reduced rapidly, whereas the smooth modes
vergence speed of the splitting iterations improves with the
persist.
increasing wave number l. This means that the conver-
The property of the fixed-point iteration schemes to
gence is faster when l is larger, for example, when the error
reduce rapidly the high-frequency components in the error
in the solution uh contains the high-frequency (highly
is known as the smoothing property, and such schemes
oscillatory) components. Thus, when a system in Equation
commonly are known as the smoothers. This property is, at
(7) with an arbitrary right-hand side is solved using a
the same time, the main factor that impairs the applic-
simple splitting iteration with an arbitrary initial guess
ability of these methods as stand-alone solvers for linear
~ 0
u h , the initial fast convergence is because of the rapid systems that arise in FDM/FEM discretizations of PDEs.
elimination of the high-frequency components in the error
eh . A slow decrease in the error at the later stages of
iteration indicates the presence of the low-frequency com- Two-Grid Correction Method
ponents. We assume that the Fourier modes in the lower Having introduced the smoothing property of standard
half of the discrete spectrum (with the wave numbers iterative methods, we investigate possible modifica-
1  l < nh =2) are referred to as the low-frequency (smooth) tions of such iterative procedures that would enable the
modes, whereas the modes in the upper half of the discrete efficient reduction of all frequency components of the
spectrum (with the wave numbers nh =2  l  nh  1) are solution error eh. Again, we study the modelproblem in
referred to as the high-frequency (oscillatory) modes. Equations (5) and (6) discretized on the uniform grid
If we rewrite a general splitting iteration in Equation Vh fxi ihg; h 1=nh ; i 1; . . . ; nh  1 yielding a linear
k1 k
(12) as u~h Gh u~h gh , then the matrix Gh is referred system in Equation (7). The mesh Vh may be regarded as a
k k
to as the iteration matrix. The error eh uh  u~h after k fine mesh obtained by the uniform refinement of a
k k 0
iterations satisfies the relation eh Gh eh . A sufficient coarse mesh VH fxi iHg; H 2h; i 1; . . . ; nH  1.
and necessary condition for a splitting iteration to con- The coarse mesh contains only the points of the fine
k
verge to the solution fu~h g ! uh is that the spectral mesh with the even numbers. After applying several steps
radius of the iteration matrix Gh is less than 1 (24). The of a fixed-point method to the h-system in Equation (7),
spectral radius is defined as rGh maxjl j Gh j, where only the smooth components of the error remain. The
l j Gh are the eigenvalues of Gh [recall that for a sym- questions that naturally arise in this setting concern the
metric and positive definite (SPD) matrix, all the eigen- properties of the smooth error components from the grid Vh ,
values are real and positive (24)]. The speed of when represented on the coarse grid VH . These components
convergence of a splitting iteration is determined by the seem to be more oscillatory on VH than on Vh (see Ref. 7).
asymptotic convergence rate (4) Notice that on the coarse grid VH , we have only half as
!1=k many Fourier modes compared with the fine grid Vh . The
k fact that the smooth error components from the fine grid
keh k
t ln lim 17 seem less smooth on the coarse grid offers a potential
k ! 1 ke0 k
h remedy for the situation when a fixed-point iteration loses
MULTIGRID METHODS 5

its effectivenesswe need to move to a coarse grid VH , property of the full weighting restriction operator in
where a fixed-point iteration will be more effective in the FDM setting is that it is the transpose of the linear
reducing the remaining error components. This idea forms interpolation operator up to the constant that depends on
T
the basis of the two-grid method, which is summarized in the spatial dimension d, for example, PhH 2d RH h . In the
the Algorithm 1. FEM setting, the restriction and the interpolation opera-
tors simply are selected as the transpose of each other, for
T
Algorithm 1. Two-grid correction scheme. example, PhH RH h . The spatial dimension-dependent
1: ~h Gvh1 u
u ~0
h ; fh
d
factor 2 that appears in the relation between the restric-
2: rh f h  A h u~h tion RH h
h and the interpolation PH is the consequence of the
3: r H RHh rh residuals being taken pointwise in the FDM case and being
4: Solve approximately AH eH rH element-weighted in the FEM case.
h
5: eh PH eH
If the coarse grid problem is solved with sufficient accu-
6: ~h u~h eh
u
racy, the two-grid correction scheme should work effi-
7: ~h Gvh2 u
u ~h ; fh
ciently, providing that the interpolation of the error from
coarse to fine grid is sufficiently accurate. This happens in
In Algorithm 1, Gvh u~h ; fh denotes the application of v cases when the error eH is smooth. As the fixed-point
iterations of a fixed-point iteration method to a linear iteration scheme applied to the coarse-grid problem
system in Equation (7) with the initial guess u~h . At Step smooths the error, it forms a complementary pair with
4 of Algorithm 1, the coarse-grid problem AH eH rH needs the interpolation, and the pair of these numerical proce-
to be solved. The coarse-grid discrete operator AH can be dures work very efficiently.
obtained either by the direct discretization of the contin-
uous problem on a coarse mesh VH or from the fine-grid V-Cycle Multigrid Scheme and Full Multigrid
discrete operator Ah by applying the Galerkin projection
If the coarse-grid problem AH eH rH in Algorithm 1 is
Ah R H h
h Ah PH . After solving the coarse grid problem (Step
solved approximately, presumably by using the fixed-point
4), we need to add the correction eH , defined on the coarse
iteration, the question is how to eliminate successfully the
grid VH , to the current approximation of the solution u~h ,
outstanding low-frequency modes on VH ? The answer lies
which is defined on the fine grid Vh . It is obvious that these
in the recursive application of the two-grid scheme. Such a
two vectors do not match dimensionally. Thus, before the
scheme would require a sequence of nested grids
correction, we need to transform the vector eH to the vector
V0  V1      VL , where V0 is a sufficiently coarse grid
eh . The numerical procedure that implements the transfer
(typically consisting of only a few nodes) to allow efficient
of information from a coarse to a fine grid is referred to
exact solution of the residual equation, presumably by a
as interpolation or prolongation. The interpolation can
direct solver. This scheme defines the V-cycle of MG, which
be presented in operator form as vh PhH vH , where
is summarized in Algorithm 2:
vH 2 RnH ; vh 2 Rnh , and PhH 2 Rnh nH . Here, nh denotes the
size of a discrete problem on the fine grid and nH denotes
Algorithm 2. V-Cycle multigrid (recursive definition): uL
the size of a discrete problem on the coarse grid. Many MGAL ; fL ; u ~0
L ; v1 ; v2 ; L:
different strategies exist for doing interpolation when MG 0
1: function MG Al ; fl ; u~l ; v1 ; v2 ; l
is considered in the FDM setting (see Refs. 4,7,8, and 10). 2:
0
u~l Gvh1 u~l ; fl
The most commonly used is linear or bilinear interpolation. 3: rl fl  Al u~l ;
In a FEM setting, the prolongation operator PhH is 4: rl1 Rll1 rl
connected naturally with the FE basis functions associated 5: if l  1 0 then
with the coarse grid (see Refs 1,7, and 8). In the case of 6: Solve exactly Al1 el1 rl1
the one-dimensional problem in Equations (5) and (6), the 7: else
elements of the interpolation matrix are given by 8: el  1 MGAl1 ; rl1 ; 0; v1 ; v2 ; l  1
PhH g j;gl fH 9: el Pll1 el1
l x j , where gl is the global number of
10: ~l u~l el
u
the node l on the coarse grid VH and g(j) is the global
11: ~l Gvh2 u~l ; fl
u
number of the node j on the fine grid Vh . fH l x j is the value 12: end if
of the FE basis function associated with the node l from the 13: return u~l
coarse grid VH at the point j of the fine grid with the 14: end function
coordinate xj.
Before solving the coarse grid problem AH eH rH , we
need to transfer the information about the fine grid residual
rh to the coarse grid VH , thus getting rH . This operation is A number of modifications of the basic V-cycle exist. The
the reverse of prolongation and is referred to as restriction. simplest modification is to vary the number of recursive
The restriction operator can be represented as vH RH h vh ,
calls g of the MG function in Step 8 of the Algorithm 2. For
nH nh
where RH h 2 R . The simplest restriction operator is g 1, we have the so-called V-cycle, whereas g 2 pro-
injection, defined in one dimension as vH j vh 2 j , duces the so-called W-cycle (7).
j 1; . . . ; nH  1, for example, the coarse grid vector takes Until now, we were assuming that the relaxation on the
0
the immediate values from the fine grid vector. Some more fine grid is done with an arbitrary initial guess u~L , most
sophisticated restriction techniques include half injection commonly taken to be the zero vector. A natural question in
and full weighting (see Refs 4,7, and 8). The important this context would be if it is possible to obtain an improved
6 MULTIGRID METHODS

initial guess for the relaxation method. Such an approxima- smoothing and one post smoothing iteration at each level
tion can be naturally obtained by applying a recursive and is v times larger than WU, with v 4 for d 1, v 83
procedure referred to as nested iteration (7,8,10). Assume for d 2 and v 16 7 for d 3 (7). These estimates do not
that the modelproblem in Equation (7) is discretized using take into account the application of the restriction/inter-
a sequence of nested grids V0  V1      VL . Then we can polation. The arithmetic cost of the FMG algorithm is
solve the problem on the coarsest level V0 exactly, inter- higher than that of a V-cycle of MG. For the FMG with one
polate the solution to the next finer level, and use this value relaxation step at each level, we have v 8 for d 1, v 72
0
as the initial guess for the relaxation (i.e., u~1 P10 u
~0 ). This for d 2, and v 52 for d 3 (7). Now we may ask how
procedure can be continued until we reach the finest level L. many V-cycles of MG or FMG are needed to achieve an
Under certain assumptions, the error in the initial guess iteration error commensurate with the discretization
0
u~L PLL1 u~L1 on the finest level is of the order of the error of the FDM/FEM. To answer this question, one
discretization error and only a small number of MG V-cycles needs to know more about the convergence characteristics
is needed to achieve the desired level of accuracy. The of MG. For this, deeper mathematical analysis of spectral
combination of the nested iteration and the MG V-cycle properties of the two-grid correction scheme is essential.
leads to the full multigrid (FMG) algorithm, summarized This analysis falls beyond the scope of our presentation.
in Algorithm 3: For further details see Refs 710. If a modelproblem in d
spatial dimensions is discretized by a uniform square grid,
the discrete problem has Omd unknowns, where m is
Algorithm 3. Full multigrid: u~L FMGAL ; fL ; v1 ; v2 ; L:
the number of grid lines in each spatial dimension. If the
1: function u~L FMGAL ; fL ; v1 ; v2 ; l
Vv1 ; v2 cycle of MG is applied to the solution of
2: ~0 f0 with sufficient accuracy
Solve A0 u
the discrete problem with fixed parameters v1 and v2 ,
3: for l1, L do
4: 0 l the convergence factor t in Equation (17) is bounded
u~l P^l1 u~l1
independently of the discretization parameter h (for a
5: u~l MGAl ; fl ; u~0
l ; v1 ; v2 ; l % Algorithm 2
6: end for rigorous mathematical proof, see Refs 810). For
7: return u~L the linear systems obtained from the discretization of
8: end function the second-order, elliptic, self-adjoint PDEs, the conver-
gence factor t of a V-cycle typically is of order 0.1. To
l reduce the error eh uh  u ~h to the level of the disretiza-
The interpolation operator P^l1 in the FMG scheme can
tion error, we need to apply O(log m) V-cycles. This means
be different, in general, from the interpolation operator
that the total cost of the V-cycle scheme is Omd log m. In
Pll1 used in the MG V-cycle. A FMG cycle can be viewed as a
the case of the FMG scheme, the problems discretized on
sequence of V-cycles on progressively finer grids, where
grids Vl ; l 0; 1; . . . ; L  1 already are solved to the level of
each V-cycle on the grid l is preceeded by a V-cycle on the
discretization error before proceeding with the solution of
grid l  1.
the problem on the finest grid VL . In this way, we need to
perform only O(1) V-cycles to solve the problem on the
Computational Complexity of Multigrid Algorithms finest grid. This process makes the computational cost of
the FMG scheme Omd , for example, it is an optimal
We conclude this section with an analysis of algorithmic algorithm.
complexity for MG, both in terms of the execution time and
the storage requirements. For simplicity, we assume that
the model problem in d spatial dimensions is discretized on ADVANCED TOPICS
a sequence of uniformly refined grids (in one and two spatial
dimensions, the modelproblem is given by Equations (5) The basic MG ideas are introduced in the previous section
and (6) and Equations (8) and (9), respectively). Denote the for the case of a linear, scalar and stationary DE with a
storage required to fit the discrete problem on the finest simple grid hierarchy. This section discusses some impor-
grid by ML . The total memory requirement for the MG tant issues when MG is applied to more realistic problems
scheme then is MMG mML , where m depends on d but not (non linear and/or time-dependent DEs and systems of
on L. This cost does not take into account the storage needed DEs), with complex grid structures in several spatial
for the restriction/prolongation operators, although in dimensions, and when the implementation is done on mod-
some implementations of MG, these operators do not ern computer architectures.
need to be stored explicitly. For the case of uniformly
Non linear Problems
refined grids, the upper bound for the constant m is 2 in
one P dimension,Pand 43 in two dimensions (by virtue of The coarse grid correction step of the MG algorithm is not
m Lj0 21jd < 1 1
j0 2 jd ). For non uniformly refined grids, directly applicable to discrete non linear problems as the
m is larger but MMG still is a linear function of ML , with the superposition principle does not apply in this case. Two
constant of proportionality independent of L. basic approaches exist for extending the application of MG
Computational complexity of MG usually is expressed methods to non linear problems. In the indirect approach,
in terms of work units (WU). One WU is the arithmetic the MG algorithm is employed to solve a sequence of linear
cost of one step of a splitting iteration applied to a discrete problems that result from certain iterative global linear-
problem on the finest grid. The computational cost of a ization procedures, such as Newtons method. Alternately,
V(1, 1) cycle of MG (V(1,1) is a V-cycle with one pre with the slight modification of the grid transfer and coarse
MULTIGRID METHODS 7

grid operators, the MG algorithm can be transformed into systems of DEs is usually a challenging task. Although no
the Brandt Full Approximation Scheme (FAS) algorithm fundamental obstacles exist to applying standard MG algo-
(6,7), which can be applied directly to the non linear discrete rithms to systems of DEs, one needs to construct the grid
equations. transfer operators and to create the coarse grid discrete
In the FAS algorithm, the non linear discrete problem operators. Moreover, the smoothing schemes need to be
defined on a fine grid Vh as Ah uh fh is replaced by selected carefully.
Problems in structural and fluid mechanics frequently
Ah u
~h eh  Ah u~h fh  Ah u~h 18 are discretized using staggered grids (10). In such cases,
different physical quantities are associated with different
The Equation (18) reduces in the linear case to the nodal positions within the grid. The main reason for such
residual Equation (11). Define a coarse-grid approxima- distribution of variables is the numerical stability of such
tion of Equation (18) schemes. However, this approach involves some restric-
tions and difficulties in the application of standard MG
 H   H  H
 
AH R^h u~h eH  AH R^h u~h R^h f h  Ah u~h 19 methods. For instance, using the simple injection as a
restriction operator may not be possible. An alternative
H construction of the restriction operator is based on aver-
where R^h is some restriction operator. Note that if the aging the fine grid values. Moreover, the non matching
discrete non linear problem in Equation (3) comes from the positions of fine and coarse grid points considerably com-
H
FEM approximation, the restriction operators R^h in plicates the interpolation near the domain boundaries. The
d
Equation (19) should differ by the factor of 2 , where d alternative approach to the staggered grid discretization is
is the spatial dimension (see the discussion on p. 11). to use non structured grids with the same nodal positions
Introducing the approximate coarse grid discrete solution for the different types of unknowns. Numerical stabiliza-
u~H R^H h
h uh eH and the fine-to-coarse correction tH
~ tion techniques are necessary to apply in this context (2,8).
AH R^H u
~
h h  R^H A u
h h h
~ , the coarse grid problem in the The effectiveness of standard MG methods, when
FAS MG algorithm becomes applied to the solution of systems of DEs, is determined
to a large extent by the effectiveness of a relaxation proce-
AH u~H RH h
h f h tH 20 dure. For scalar elliptic problems, it is possible to create
nearly optimal relaxation schemes based on standard fixed-
Then, the coarse grid correction point iterations. The straightforward extension of this
  scalar approach to systems of DEs is to group the discrete
h h H
u~h ~h P^H eH u~h P^H u~H  R^h u~h
u 21 equations either with respect to the grid points or with
respect to the discrete representations of each DE in the
can be applied directly to non linear problems. In Equ- system (the latter corresponds to the blocking of a linear
ation, (21) R^H
hu~h represents the solution of Equation (20) system coefficient matrix). For effective smoothing, the
on coarse grid VH . This means that once the solution of the order in which the particular grid points/equations are
fine grid problem is obtained, the coarse grid correction accessed is very important and should be adjusted for
does not introduce any changes through the interpolation. the problem at hand. Two main approaches exist for the
The fine-to-coarse correction thH is a measure of how close decoupling of a system: global decoupling, where for each
the approximation properties of the coarse grid equations DE all the grid points are accessed simultaneously, and
are to that of the fine grid equations. local decoupling, where all DEs are accessed for each grid
When the FAS MG approach is used, the global Newton point.
linearization is not needed, thus avoiding the storage of The local splitting naturally leads to collective or block
large Jacobian matrices. However, the linear smoothing relaxation schemes, where all the discrete unknowns at a
algorithms need to be replaced by non linear variants of the given grid node, or group of nodes, are relaxed simulta-
relaxation schemes. Within a non linear relaxation method, neously. The collective relaxation methods are very attrac-
we need to solve a non linear equation for each component of tive within the FAS MG framework for non linear problems.
the solution. To facilitate this, local variants of the Newton Another very general class of smoothing procedures that
method commonly are used. The FAS MG algorithm struc- are applicable in such situations are distributive relaxa-
ture and its implementation are almost the same as the tions (20). The idea is to triangulate locally the discrete
linear case and require only small modifications. For non operator for all discrete equations and variables within the
linear problems, a proper selection of the initial approx- framework of the smoother. The resulting smoothers also
imation is necessary to guarantee convergence. To this end, are called the transforming smoothers (25).
it is recommended to use the FMG method described in the In the section on grid-coarsening techniques, an
Basic Concepts section above. advanced technique based on the algebraic multigrid
(AMG) for the solution of linear systems obtained by the
Systems of Partial Differential Equations discretization of systems of PDEs will be presented.

Many complex problems in physics and engineering cannot


Time-Dependent Problems
be described by simple, scalar DEs. These problems, such as
DEs with unknown vector fields or multi-physics problems, A common approach in solving time-dependent problems
usually are described by systems of DEs. The solution of is to separate the discretization of spatial unknowns in
8 MULTIGRID METHODS

the problem from the discretization of time derivatives. or non smooth boundaries. Using uniformly refined grids
Discretization of all spatial variables by some stan- with the mesh size adjusted to the small-scale phenomena
dard numerical procedure results in such cases in a dif- is costly. This problem is addressed using adaptive mesh
ferential-algebraic system (DAE). A number of numerical refinement, which represents a process of dynamic intro-
procedures, such as the method of lines, have been devel- duction of local fine grid resolution in response to unre-
oped for the solution of such problems. Numerical proce- solved error in the solution. Adaptive mesh refinement
dures aimed at the solution of algebraic-differential techniques were introduced first by Brandt (6). The criteria
equations usually are some modifications and general- for adaptive grid refinement are provided by a posteriori
izations of the formal methods developed for the solution error estimation (2).
of systems of ODEs [e.g., the RungeKutta method, the The connectivity among mesh points is generally speci-
linear multistep methods, and the Newmark method fied by the small subgroup of nodes that form the mesh cells.
(26,27)]. In a system of DAEs, each degree of freedom Typically, each cell is a simplex (for example, lines in one
within the spatial discretization produces a single ODE dimension; triangles or quadrilaterals in two dimensions;
in time. All methods for the integration of DAE systems and tetrahedra, brick elements, or hexahedra in three
can be classified into two groups: explicit and implicit. dimensions). The refinement of a single grid cell is achieved
Explicit methods are computationally cheap (requiring by placing one or more new points on the surface of, or
only the sparse matrixvector multiplication at each inside, each grid cell and connecting newly created and
time step) and easy to implement. Their main drawback existing mesh points to create a new set of finer cells. A
lies in stability, when the time step size changes (i.e., they union of all refined cells at the given discretization level
are not stable for all step sizes). The region of stability of forms a new, locally refined, grid patch. Because adaptive
these methods is linked closely to the mesh size used in local refinement and MG both deal with grids of varying
spatial discretization (the so-called CFL criterion). How- mesh size, the two methods naturally fit together. However,
ever, if a particular application requires the use of small it is necessary to perform some adaptations on both sides to
time steps, then the solution algorithms based on explicit make the most effective use of both procedures. To apply
time-stepping schemes can be effective. The implicit time- MG methods, the local grid refinement should be performed
stepping schemes have no restrictions with respect to the with the possibility of accessing locally refined grids at
time step size, for example, they are unconditionally different levels.
stable for all step sizes. The price to pay for this stability The adaptive mesh refinement (AMR) procedure starts
is that at each time step one needs to solve a system of from a basic coarse grid covering the whole computational
linear or non linear equations. If sufficiently small time domain. As the solution phase proceeds, the regions
steps are used with the implicit schemes, standard itera- requiring a finer grid resolution are identified by an error
tive solvers based on fixed-point iterations or Krylov estimator, which produces an estimate of the discretiza-
h
subspace solvers (4) can be more effective than the use tion error, one specific example being eh R^ u  uh (28).
of MG solvers. This particularly applies if the time extra- Locally refined grid patches are created in these regions.
polation method or an explicit predictor method (within a This adaptive solution procedure is repeated recursively
predictorcorrector scheme) is used to provide a good until either a maximal number of refinement levels is
initial solution for the discrete problem at each time step. reached or the estimated error is below the user-specified
However, if sufficiently large time steps are used in the tolerance. Such a procedure is compatible with the FMG
time-stepping algorithm, the discrete solution will contain algorithm. Notice that a locally refined coarse grid should
a significant proportion of low-frequency errors introduced contain both the information on the correction of the
by the presence of diffusion in the system (20,27). The discrete solution in a part covered by it and the discrete
application of MG in such situations represents a feasible solution, itself, in the remainder of the grid. The simplest
alternative. In this context, one can use the so-called and most natural way to achieve this goal is to employ a
smart time-stepping algorithms (for their application slightly modified FAS MG algorithm. The main difference
in fluid mechanics see Ref. 27). In these algorithms (based between the FAS MG algorithm and the AMR MG algo-
on the predictorcorrector schemes), the time step size is rithm is the additional interpolation that is needed at the
adjusted adaptively to the physics of the problem. If a interior boundary of each locally refined grid patch. For
system that needs to be solved within the corrector is unstructured grids, it is possible to refine the grid cells
non linear, the explicit predictor method is used to provide close to the interior boundary in such a way to avoid
a good initial guess for the solution, thus reducing the interpolation at the interor boundaries altogether. For
overall computational cost. MG can be used as a building structured meshes, the internal boundaries of locally
block for an effective solver within the corrector (see the refined patches contain the so-called hanging nodes
section on preconditioning for the example of such solver in that require the interpolation from the coarse grid to
fluid mechanics). preserve the FE solution continuity across the element
boundaries. This interpolation may need to be defined in a
recursive fashion if more than one level of refinement is
Multigrid with Locally Refined Meshes
introduced on a grid patch (this procedure resembles the
Many practically important applications require the reso- long-range interpolation from the algebraic multigrid).
lution of small-scale physical phenomena, which are loca- The interpolation operator at the internal boundaries of
lized in areas much smaller than the simulation domain. the locally refined grids could be the same one used in the
Examples include shocks, singularities, boundary layers, standard FMG algorithm. Figure 1 shows an example of
MULTIGRID METHODS 9

In such cases, an unstructured mesh or a set of composite


block-structured meshes are required to resolve all the
geometric features of the domain. The resulting grid could
contain a large number of nodes to be used as the coarsest
grid level in the MG algorithms. To take full advantage of
MG methods in such circumstances, a variety of techniques
have been developed to provide multi level grid hierarchy
and generate intergrid transfer operators by coarsening a
given fine grid.
The first task in the grid-coarsening procedure is to
choose of the coarse-level variables. In practice, the qual-
ity of the selected coarse-level variables is based on heur-
Figure 1. Composite multi level adaptive mesh for the MG solu- istic principles (see Refs. 4,7, and 8). The aim is to achieve
tion of a dopant diffusion equation in a semiconductor fabrication. both the quality of interpolation and a significant reduc-
tion in the dimension of a discrete problem on the coarse
the adaptive grid structure comprising several locally grids. These two requirements are contradictory, and in
refined grid patches dynamically created in the simula- practice some tradeoffs are needed to meet them as closely
tion of dopant redistribution during semiconductor fabri- as possible. The coarse-level variables commonly are
cation (20). Other possibilities exist in the context of the identified as a subset of the fine grid variables based on
FAS MG scheme, for example, one could allow the exis- the mesh connectivity and algebraic dependencies. The
tence of hanging nodes and project the non conforming mesh connectivity can be employed in a graph-based
solution at each stage of the FAS to the space where the approach, by selecting coarse-level variables at the fine
solution values at the hanging nodes are the interpolants mesh points to form the maximal independent set (MIS) of
of their coarse grid parent values (29). the fine mesh points. For the construction of effective
Various error estimators have been proposed to support coarse grids and intergrid transfer operators, it often is
the process of the local grid refinement. The multi level necessary to include the algebraic information in the
locally refined grid structure and the MG algorithm provide coarse nodes selection procedure. One basic algebraic
additional reliable and numerically effective evaluation of principle is to select coarse-level variables with a strong
discretization errors. Namely, the grid correction operator connection to the neighboring fine-level variables
thH [introduced in Equation (20)] represents the local dis- (strength of dependence principle) (31). This approach
cretization error at the coarse grid level VH (up to a factor leads to a class of MG methods referred to as algebraic
that depends on the ratio H/h). It is the information multigrid (AMG) methods. Whereas geometric MG meth-
inherent to the FAS MG scheme and can be used directly ods operate on a sequence of nested grids, AMG operates
as a part of the local grid refinement process. The other on a hierarchy of progressively smaller linear systems,
possibility for error estimation is to compare discrete solu- which are constructed in an automatic coarsening pro-
tions obtained on different grid levels of FMG algorithms to cess, based on the algebraic information contained in the
extrapolate the global discretization error. In this case, the coefficient matrix.
actual discrete solutions are used, rather than those Another class of methods identifies a coarse grid variable
obtained after fine-to-coarse correction. as a combination of several fine-grid variables. It typically
Another class of adaptive multi level algorithms are the is used in combination with a finite-volume discretization
fast adaptive composite-grid (FAC) methods developed in method (10), where the grid variables are associated with
the 1980s (30). The main strength of the FAC is the use of the corresponding mesh control volumes. The volume
the existing single-grid solvers defined on uniform meshes agglomeration method simply aggregates the fine control
to solve different refinement levels. Another important volumes into larger agglomerates to form the coarse grid
advantage of the FAC is that the discrete systems on locally space. The agglomeration can be performed by a greedy
refined grids are given in the conservative form. The FAC algorithm. Alternatively, the fine grid variables can be
allows concurrent processing of grids at given refinement clustered directly (aggregated) into coarse-level variables
levels, and its convergence rate is bounded independently based on the algebraic principle of strongly or weakly
of the number of refinement levels. One potential pitfall of coupled neighborhoods. The aggregation method is intro-
both AMR MG and the FAC is in the multiplicative way duced in Ref. 32, and some similar methods can be found in
various refinement levels are treated, thus implying Refs. 33 and 34. The agglomeration method works also in
sequential processing of these levels. the finite element setting (35).
The most common approach in creating the intergrid
transfer operators within the grid-coarsening procedure is
Grid-Coarsening Techniques and Algebraic Multigrid (AMG)
to formulate first the prolongation operator PhH and to use
h T
A multi level grid hierarchy can be created in a straightfor- RHh PH as a restriction operator. One way of construct-
ward way by successively adding finer discretization levels ing the prolongation operator from a subset of fine grid
to an initial coarse grid. To this end, nested global and local variables is to apply the Delauney triangulation procedure
mesh refinement as well as non-nested global mesh gen- to the selected coarse mesh points. A certain finite element
eration steps can be employed. However, many practical space associated to this triangulation can be used to create
problems are defined in domains with complex geometries. the interpolation operator PhH . The prolongation operators
10 MULTIGRID METHODS

for the agglomeration and aggregation methods are defined The sum over weakly connected points Di can be lumped
in the way that each fine grid variable is represented by a with the diagonal terms, as ai j is relatively small compared
single (agglomerated or aggregated) variable of the coarse with aii . Also, the nodes j 2 Fis should be distributed to the
grid. nodes in the set Ci . In deriving this relation, we must
The interpolation operator also can be derived using ensure that the resulting interpolation formula works cor-
purely algebraic information. We start from a linear dis- rectly for the constant functions. The action of the inter-
crete problem in Equation (4) and introduce a concept of polation operator PhH obtained in this way can be
algebraically smooth error eh . Algebraically smooth error is represented as
the error that cannot be reduced effectively by a fixed-point 8
iteration. Note that the graph of an algebraically smooth < eX
i i2C
h
error may not necessarily be a smooth function (7). The PH ei vi j e j i 2 F 26
:
j 2 Ci
smooth errors are characterized by small residuals, for
example, componentwise jri j  aii jei j. This condition can where
be interpreted broadly as X aik ak j
ai j X
Ae  0 22 k 2 Fs akl
i

vi j  Xl 2 Ci 27
For the cases of modelproblems in Equations (5) and (6) aii aim
and Equations (8) and (9), where the coefficient matrices m 2 Di

are characterized by zero row sums, Equation (22) means


that we have component-wise Finally, the coarse grid discrete equations should be
determined. The volume agglomeration methods allow
X
aii ei   ai j e j 23 us, in some cases, to combine the fine grid discretization
j 6 i equations in the formulation of the coarse grid ones. How-
ever, in most cases, the explicit discretization procedure is
The relation in Equation (23) means that the smooth error not possible and coarse grid equations should be con-
can be approximated efficiently at a particular point if one structed algebraically. An efficient and popular method
knows its values at the neighboring points. This fact is the to obtain a coarse-level operator is through the Galerkin
starting point for the development of the interpolation form
operator PhH for AMG. Another important feature in con-
AH RH h
h Ah PH 28
structing the AMG interpolation is the fact that the
smooth error varies slowly along the strong connections
(associated with large negative off-diagonal elements in For other, more sophisticated methods based on con-
the coefficient matrix). Each equation in the Galerkin strained optimization schemes see Ref. 36.
system describes the dependence between the neighbor- The AMG approach that was introduced previously is
ing unknowns. The i-th equation in the system determines suitable for the approximate solution of linear algebraic
which unknowns u j affect the unknown ui the most. If the systems that arise in discretizations of scalar elliptic
value ui needs to be interpolated accurately, the best PDEs. The most robust performance of AMG is observed
choice would be to adopt the interpolation points u j for linear systems with coefficient matrices being SPD and
with large coefficients ai j in the Galerkin matrix. Such M-matrices (the example being the discrete Laplace opera-
points u j are, in turn, good candidates for coarse grid tor) (24). A reasonably good performance also can be
points. The quantitative expression that ui depends expected for the discrete systems obtained from the discre-
strongly on u j is given by tizations of the perturbations of elliptic operators (such as
the convectiondiffusionreaction equation). However,
ai j u max faik g; 0<u  1 24 when the AMG solver, based on the standard coarsening
1kn approach, is applied to the linear systems obtained from
the discretization of non scalar PDEs or systems of PDEs
Assume that we have partitioned the grid points into the (where the coefficient matrices are substantially different
subset of coarse grid points C and fine grid points F. For from the SPD M-matrices), its performance usually deterio-
each fine grid point i, its neighboring points, defined by the rates significantly (if converging at all). The reason for this is
nonzero off-diagonal entries in the i-th equation, can be that the classical AMG uses the variable-based approach.
subdivided into three different categories, with respect to This approach treats all the unknowns in the system
the strength of dependence: coarse grid points with strong equally. Thus, such approach cannot work effectively for
influence on iCi , fine grid points with strong influence on systems of PDEs, unless a very weak coupling exists
iFis , and the points (both coarse and fine) that weakly between the different unknowns. If the different types of
influence iDi . Then, the relation in Equation (23) for unknowns in a PDE system are coupled tightly, some mod-
algebraically smooth error becomes (for more details, see ifications and extensions of the classical approach are
Ref. 31) needed to improve the AMG convergence characteristics
X X X and robustness (see Ref. 37).
aii ei   ai j e j  ai j e j  ai j e j 25 An initial idea of generalizing the AMG concept to sys-
j 2 Ci j 2 Fis j 2 Di tems of PDEs resulted in the unknown-based approach. In
MULTIGRID METHODS 11

this approach, different types of unknowns are treated ing with the low-frequency error components motivated the
separately. Then, the coarsening of the set of variables design of MG techniques. Fixed-point iterations are just
that corresponds to each of the unknowns in a PDE system one member of the broad class of methods for the solution of
is based on the connectivity structure of the submatrix that sparse linear systems, which are based on projection. A
corresponds to these variables (the diagonal block of the projection process enables the extraction of an approximate
overall coefficient matrix, assuming that the variables cor- solution of a linear system from a given vector subspace.
responding to each of the unknowns are enumerated con- The simplest case of the projection methods are one-dimen-
secutively), and interpolation is based on the matrix entries sional projection schemes, where the search space is
in each submatrix separately. In contrast, the coarse-level spanned by a single vector. The representatives of one-
Galerkin matrices are assembled using the whole fine level dimensional projection schemes are the steepest descent
matrices. The unknown-based approach is the simplest way algorithm and the minimum residual iteration (4).
of generalizing the AMG for systems of PDEs. The addi- One way of improving the convergence characteristics of
tional information that is needed for the unknown-based the projection methods is to increase the dimension of the
approach (compared with the classical approach) is the vector subspace. Such approach is adopted in the Krylov
correspondence between the variables and the unknowns. subspace methods (2,4). Krylov methods are based on the
The best performance of AMG with the unknown-based projection process onto the Krylov subspace defined as
approach is expected if the diagonal submatrices that corr-
spond to all the unknowns are close to M-matrices. This K m A; y span y; Ay; . . . ; Am1 y 29
approach is proved to be effective for the systems involving
non scalar PDEs [such as linear elasticity (38)]. However, In Equation (29), A is the coefficient matrix and the vector y
this approach loses its effectiveness if different unknowns in usually is taken to be the initial residual r0 f  Ax0 .
the system are coupled tightly. The main property of the Krylov subspaces is that their
The latest development in generalizations of AMG for dimension increases by 1 at each iteration. From the defini-
the PDE systems is referred to as the point-based approach. tion in Equation (29) of the Krylov subspace, it follows that
In this approach, the coarsening is based on a set of points, the solution of a linear system Ax f is approximated by
and all the unknowns share the same grid hierarchy. In a x A1 f  qm1 Arj0j , where qm1 A is the matrix poly-
PDE setting, points can be regarded as the physical grid nomial of degree m  1. All Krylov subspace methods work
points in space, but they also can be considered in an on the same principle of polynomial approximation. Differ-
abstract setting. The coarsening process is based on an ent types of Krylov methods are obtained from different
auxiliary matrix, referred to as the primary matrix. This types of orthogonality constraints imposed to extract the
matrix should be defined to be the representative of the approximate solution from the Krylov subspace (4). The
connectivity patterns for all the unknowns in the system, as well-known representative of the Krylov methods aimed for
the same coarse levels are associated to all the unknowns. the linear systems with SPD coefficient matrices is the
The primary matrix is defined frequently based on the conjugate gradient (CG) algorithm.
distances between the grid points. Then, the associated The convergence characteristics of Krylov iterative sol-
coarsening procedure is similar to that of geometric MG. vers depend crucially on the spectral properties of the
The interpolation procedure can be defined as block inter- coefficient matrix. In the case of the CG algorithm, the
polation (by approximating the block equations), or one error norm reduction at the k-th iteration can be repre-
can use the variable-based approaches, which are the same sented as (2,4)
(s-interpolation) or different (u-interpolation) for each
unknown. The interpolation weights are computed based
kek kA
on the coefficients in the Galerkin matrix, the coefficients of  min max jqk1 l j j 30
the primary matrix, or the distances and positions of the ke0 kA qk1 2 P0k1 j

points. The interpolation schemes deployed in classical


AMG [such as direct, standard, or multi pass interpolation where qk1 is the polynomial of degree k  1 such that
(8)] generalize to the point-based AMG concept. qk1 0 1 and k  k2A A; . The estimate in Equation
Although great progress has been made in developing AMG (30) implies that the contraction rate of the CG algorithm at
for systems of PDEs, no unique technique works well for all the iteration k is determined by the maximum value of the
systems of PDEs. Concrete instances of this concept are found to characteristic polynomial qk1 evaluated at the eigenva-
work well for certain important applications, such as CFD (seg- lues l j of the coefficient matrix. This implies that the rapid
regated approaches in solving the NavierStokes equations), convergence of the CG algorithm requires the construction
multiphase flow in porous media (39), structural mechanics, of the characteristic polynomial q of relatively low degree,
semiconductor process and device simulation (40,41), and so which has small value at all eigenvalues of A. This con-
further. Finally, it should be pointed out that the code SAMG struction is possible if the eigenvalues of A are clustered
(42), based on the point approach, was developed at Fraunhofer tightly together. Unfortunately, the coefficient matrices
Institute in Germany. that arise in various discretizations of PDEs have the
eigenvalues spread over the large areas of the real axis
(or the complex plane). Moreover, the spectra of such
Multigrid as a Preconditioner
coefficient matrices change when the discretization para-
In the Basic Concepts section, the fixed-point iteration meter or other problem parameters vary. The prerequisite
methods were introduced. Their ineffectiveness when deal- for rapid and robust convergence of Krylov solvers is the
12 MULTIGRID METHODS

redistribution of the coefficient matrix eigenvalues. Ideally,


the eigenvalues of the transformed coefficient matrix
should be clustered tightly, and the bounds of the clusters
should be independent on any problem or discretization
parameters. As a consequence, the Krylov solver should
converge to a prescribed tolerance within a small, fixed
number of iterations. The numerical technique that trans-
forms the original linear system Ax f to an equivalent
system, with the same solution but a new coefficient matrix
that has more favorable spectral properties (such as a
tightly clustered spectrum), is referred to as precondition-
ing (2,4). Designing sophisticated preconditioners is pro- Figure 2. The principles of the hierarchical basis MG methods.
blem-dependent and represents a tradeoff between
accuracy and efficiency.
Preconditioning assumes the transformation of the ori- nodal basis functions. The process is presented in Fig. 2,
ginal linear system Ax f to an equivalent linear system where the fine grid basis functions that are replaced by
M1 Ax M1 f . In practice, the preconditioning matrix (or the coarse grid basis functions are plotted with the
the preconditioner) M is selected to be spectrally close to the dashed lines. The HBMG may be interpreted as the
matrix A. The application of a preconditioner requires at standard MG method, with the smoother at each level
each iteration of a Krylov solver that one solves (exactly or applied to the unknowns existing only at this level (and
approximately) a linear system Mz r, where r is the not present at coarser levels). The common choice ML
current residual. This operation potentially can represent MRt extends the important properties of the original
a considerable computational overhead. This overhead is coefficient matrix, such as symmetry and positive defi-
the main reason why the design of a good preconditioner nitness, to the preconditioned matrix. The HBMG
assumes the construction of such matrix M that can be method is suitable for implementation on adaptive,
assembled and computed the action of its inverse to a vector locally refined grids. Good results are obtained for the
at optimal cost. Moreover, for preconditioning to be effec- HBMG in two dimensions (with uniformly/locally refined
tive, the overall reduction in number of iterations of the meshes), but the efficiency deteriorates in 3-D.
preconditioned Krylov solver and, more importantly, the Another important MG-like preconditioning method is
reduction in the execution time should be considerable, the so-called BPX preconditioner (45). It belongs to a class
when compared with a non preconditioned Krylov solver of parallel multi level preconditioners targeted for the
(43). To design a (nearly) optimal Krylov solver for a parti- linear systems arising in discretizations of second-order,
cular application, the preconditioner needs to take into elliptic PDEs. The main feature of this preconditioner is
account the specific structure and spectral properties of that it is expressed as a sum of independent operators
the coefficient matrix. defined on a sequence of nested subspaces of the finest
In previous sections, we established MG as the optimal approximation space. The nested subspaces are asso-
iterative solver for the linear systems that arise in discre- ciated with the sequence of uniformly or adaptively
tizations of second-order, elliptic, PDEs. As an alternative refined triangulations and are spanned by the standard
to using MG as a solver, one may consider using it as a FEM basis sets associated with them. Given a sequence of
preconditioner for Krylov subspace solvers. When MG is nested subspaces Sh1  Sh2     ShL with Shl spanfflk gN
k1 ,
l

used as a preconditioner, one applies a small number the action of the BPX preconditioner to a vector can be
(typically 1 to 2) of V-cycles, with a small number of pre- represented by
and post smoothing iterations, at each Krylov iteration to
Nl
L X
X
approximate the action of M1 to a residual vector. This
P1 v v; flk flk 31
approach works well for SPD linear systems arising from
l1 k1
the discretization of second-order, elliptic PDEs. A number
of similar MG-based approaches work well in the same
The condition number of the preconditioned discrete
context.
operator P1 A is at most OL2 , and this result is inde-
One group of MG-based preconditioners creates expli-
pendent on the spatial dimension and holds for both quasi-
citly the transformed system matrix ML1 AMR1 , where ML
uniform and adaptively refined grids. The preconditioner
and MR are the left and the right preconditioning
in Equation (31) also can be represented in the operator
matrices, respectively. A typical representative is the
form as
hierarchical basis MG (HBMG) method (44). The HBMG
XL
method is introduced in the framework of the FE approx- P1 Rl Q l 32
imations based on nodal basis. In the HBMG method, the l1
right preconditioning matrix MR is constructed in such a
way that the solution x is contained in the space of where Rl is an SPD operator Shl 7! Shl and Ql : ShL 7! Shl is
hierarchical basis functions. Such space is obtained by the projection operator defined by Ql u; v u; v for
replacing, in a recursive fashion, the basis functions u 2 ShL and v 2 Shl [;  denotes the l2 -inner product].
associated with the fine grid nodes that also exist at The cost of applying the preconditioner P will depend
the coarser grid level, by the corresponding coarse grid on the choice of Rl . The preconditioner in Equation (32)
MULTIGRID METHODS 13

! !
is linked closely to the MG V-cycle. The operator Rl has the with MA i j A w i ; w j ; i; j 1; . . . ; m. For details, see
role of a smoother; however, in BPX, preconditioner Ref. 47. The optimal preconditioner for the linear system
smoothing at every level is applied to a fine grid residual in Equation (34) is given by
(which can be done concurrently). In MG, alternately,
smoothing of the residual at a given level cannot proceed  
MA 0
until the residual on that level is formed using the infor- M 1 Bt 35
0 BMA
mation from the previous grids. This process also involves
an extra computational overhead in the MG algorithm.
Parallelization issues associated with the BPX precondi- The exact implementation of this preconditioner requires
tioner will be discussed in the final section. the factorization of the dense Schur complement matrix
Many important problems in fundamental areas, such S BMA 1 Bt ). The matrix S can be approximated with-

as structural mechanics, fluid mechanics, and electromag- out significant loss of efficiency by the matrix
netics, do not belong to the class of scalar, elliptic PDEs. SD Bdiag MA 1 Bt , which is a sparse matrix. The action

Some problems are given in so-called mixed forms (2) or as 1


of SD to a vector can be approximated even better by a
the systems of PDEs. The latter is the regular case when small number of AMG V-cycles (47).
multiphysics and multiscale processes and phenomena
are modeled. When the systems of PDEs or PDEs with 2. Lames equations of linear elasticity. This problem is a
unknown vector fields are solved, the resulting discrete fundamental problem in structural mechanics. It also
operators (coefficient matrices) have spectral properties occurs in the design of integrated electronic components
that are not similar to the spectral properties of discrete (microfabrication). The equations by Lame represent a
elliptic, self-adjoint problems, for which MG is particu- displacement formulation of linear elasticity:
larly suited. Thus, direct application of standard MG as a
preconditioner in such complex cases is not effective. In @2u ! ! ! !
r 2
 mD u l mrD  u f 36
such cases, it is possible to construct the block precondi- @t
tionersan approach that proved efficient in many impor-
tant cases (2). A coefficient matrix is subdivided into subject to a suitable combination of Dirichlet and Neu-
blocks that correspond to different PDEs/unknowns in mann BCs. Equation (36) is a special case of non linear
the PDE system (similarly to the unknown-based equations of visco-elasticity. In Equation (36), r denotes
!
approach in the AMG for systems of PDEs). If some density of a continuous material body, u is the displace-
main diagonal blocks represent the discrete second-order, ment of the continuum from the equilibrium
position
elliptic PDEs (or their perturbations), they are suitable under the combination of external forces f , and l and m
candidates to be approximated by the standard MG/AMG are the Lame constants (see Ref. 49 for more details). After
with simple relaxation methods. The action of the inverse the discretization of Equation (36) by the FEM, a linear
of the whole preconditioner is achieved by the block back- system Ae u f is obtained, with Ae 2 Rndnd ; u, and
substitution. Successful block preconditioners have been f 2 Rnd , where n is the number of unconstrained nodes
developed for important problems in structural mechanics and d is the spatial dimension. If the degrees of freedom
(46), fluid mechanics (2,47), and electromagnetics (48). In are enumerated in such a way that the displacements
the following list, a brief review of some of these techni- along one Cartesian direction (unknowns that correspond
ques is given. to the same displacement component) are grouped
together, the PDE system in Equation (36) consists of d
1. Mixed formulation of second-order elliptic proble- scalar equations and can be preconditioned effectively by a
ms. The boundary value problem is given by block-diagonal preconditioner. For this problem, effective
solvers/preconditio-ners based on the variable and the
! point approach in AMG also are developed. However,
A1 u  r p 0 the block-diagonal preconditioner, developed in Equation
! 33
r u f (46) uses classical (unknown-based) AMG. From Equation
(36) it can be seen that each scalar PDE represents a
in V  Rd , subject to suitable BCs. In Equation (33) perturbation of the standard Laplacian operator. Thus,
A : R 7! Rdd is a symmetric and uniformly positive definite the effectiveness of MG applied in this context depends on
!
matrix function, p is the pressure, and u A1 p is the the relative size of the perturbation term. For compres-
velocity. Problems of this type arise in modeling of fluid flow sible materials (l away from 1), the block-diagonal
through porous media. The primal variable formulation of preconditioner (46) is very effective. For nearly incom-
!
Equation (33) is r  Ar p f , but if u is the quantity of pressible cases (l ! 1), an alternative formulation of the
interest, a numerical solution of the mixed form in Equation linear elasticity problem in Equation (36) is needed (see
(33) is preferable. Discretization of Equation (33) using the Stokes problem).
RaviartThomas FEM leads to a linear system with an
indefinite coeffiient matrix 3. The biharmonic equation. The biharmonic problem
D2 u f arises in structural and fluid mechanics (2,49).
   " #
FEM discretization of the original formulation of the bihar-
MA Bt u g
34 monic problem requires the use of Hermitian elements that
B 0 p f result in a system with SPD coefficient matrix, which is not
14 MULTIGRID METHODS

an M-matrix. Consequently, direct application of the stan- Optimal preconditioners for the discrete Stokes problem
dard GMG/AMG preconditioners will not be effective. in Equation (41) are of the form:
An alternative approach is to reformulate the biharmo-
 
nic problem as the system of two Poisson equations: A 0
M 42
0 Mp
Du v
37
Dv f
where Mp is the pressure mass matrix, which is spectrally
equivalent to the Schur complement matrix BA1 Bt . The
subject to suitable BCs (2). Discretization of Equation (37) vector Laplacian matrix A can be approximated by a small
an be done using the standard Lagrangian FEM, producing number of V-cycles of GMG/AMG (2).
an indefinite linear system
The NavierStokes problem.. The NavierStokes equa-
    
MB At v f tions have similar block structure as the Stokes equations,
38 with the vector Laplacian operator replaced by the vector
A 0 u 0
convection-diffusion operator. The steady-state Navier
Stokes system is given by
with MB i j fi ; f j ; i; j 1; . . . ; m, and Ai j rf j ;
rfi ; i 1; . . . ; n; j 1; . . . ; m. In Ref. 50, the application
! ! ! !
of a modified MG method to the Schur complement vr2 u u  r u r p f
! 43
system obtained from Equation (38) is discussed. Another r u 0
nearly optimal preconditioner for the system in Equation
(38) can be obtained by decoupling the free and constr- !
In Equation (43), u and p are the velocity and pressure and
ained nodes in the first equation of Equation (37). This
v > 0 is kinematic viscosity. The NavierStokes equations
decoupling introduces a 3  3 block splitting of the coeffi-
represent a model of fluid flow of an incompressible New-
cient matrix, and the preconditioner is given by (see Ref. 51)
tonian fluid. The system in Equation (43) is non linear. The
2 3 use of mixed FEM for the discretization of Equation (43)
0 0 AtI leads to a non linear system of algebraic equations. Such
M 40 MB AB 5
t 39
systems need to be solved iteratively, either by the Picard
AI AB 0 method or the Newton method. If a stable discretization
method is used in conjuction with the Picard linearization,
we obtain the discrete Oseen problem(2):
In Equation (39), the matrix block AI 2 Rnn corresponds
to a discrete Dirichlet Laplacian operator and it can be     
approximated readily by a small fixed number of GMG/ F Bt Du f
44
AMG V-cycles. B 0 Dp g

The Stokes problem.. The Stokes equations represent a In Equation (44), F vA C is the discrete vetor con-
system of PDEs that model visous flow: vection-diffusion operator and B is, as before, the diver-
gence matrix. The ideal preconditioning of the system in
! ! Equation (44) an be achieved by the blocks-triangular
D u r p 0 40
! matrix (2)
r u 0
 
! MF Bt
subject to a suitable set of BCs (see Ref. 2). The variable u M 45
0 MS
is a vector function representing the velocity, wheras the
scalar function p is the pressure. A host of suitable pairs of
FE spaces can be used to discretize Equation (40). Some In Equation (45), MF is the spectrally equivalent approx-
combinations are stable, and some require the stabiliza- imation of the matrix F. This approximation can be
tion (2,27). If a stable discretization is applied (see Ref. 2 achieved by a small number of V-cycles of GMG/AMG
for more discussion), the following linear system is with appropriate smoothing [line, ILU(0)] (2). The optimal
obtained choice for the block MS would be BF 1 Bt (the Schur
complement). As the Schur complement is a dense matrix,
     some effective approximations are needed. One such
A Bt u f
41 choice leads to the pressure convection-diffusion precon-
B 0 p g
ditioner (2) with

In Equation (41), A 2 Rmm represents the vector Lapla-


BF 1 Bt  BMu1 Bt F 1
p Mu 46
cian matrix (a block-diagonal matrix consisting of d scalar
disrete Laplacians), and B 2 R nm is the discrete diver-
gence matrix. The unknown vectors u and p are the dis- In Equation (46), Mu is the velocity mass matrix and Fp is
crete velocity and pressure solutions, respectively. the discretization of the convection-diffusion equation on
MULTIGRID METHODS 15

the pressure space. Another effective choice for the Schur coarse grid levels falls below a certain threshold, some
complement matrix approximation is to take (2) processors could become idle. This effect can be particu-
larly pronounced in applications with the local grid refine-
ment. In some extreme cases, no single level, may exist
BF 1 Bt  BMu1 Bt BMu1 FMu1 Bt 1 BMu1 Bt 47
with enough grid points to keep all the processors busy.
Moreover, the number of grid levels obtained by the
coarsening could be limited by the number of partitions
Parallel Multigrid Methods in the domain decomposition. Therefore, the grid decom-
The MG methods commonly are applied to large-scale position based parallelization of MG methods make sense
computational problems that involve millions of unknowns, only if the total number of unknowns in the multi level
which frequently are non linear and/or time-dependent, for grid structure is significantly larger than the number of
which the use of modern parallel computers is essential. To available processors.
benefit from MG in such cases, various techniques to par- The problem of sequential processing of different grid
allelize MG algorithms have been developed. levels in standard MG algorithm can potentially repre-
The simplest and most commonly used approach of sent a serious bottleneck for large-scale applications.
implementing MG algorithms in parallel is to employ the The solution to this problem is to use a class of multi
grid partitioning technique (52,53). This technique involves level (ML) methods known as the additive ML methods.
no real change to the basic MG algorithm. Namely, the In these methods, the solution (or the preconditioning)
finest grid level, level Vh , can be partitioned in a non procedure is defined as a sum of independent operators.
overlapping set of subgrids It should be emphasised that this type of parallelism is
completely independent of the parallelism induced by the
grid partitioning. As a result, the two techniques can be
P i
Vh [ Vh 48 combined together, giving a powerful parallel solver/
i1
preconditioner for elliptic problems. An example of a
parallel ML preconditioner, in which different grid levels
i
and each of the resulting subgrids Vh can be assigned to can be processed simultaneously, is the BPX precondi-
one of P parallel processors. The partition on the finest grid tioner (45) introduced in the previous section. The
induces, naturally, a similar partitioning of the coarser smoothing operator Rk in Equation (32) applies to the
levels. The partitioning in Equation (48) should be per- fine grid residual for all levels k. This application allows
formed in such a way that the resulting subgrids have the smoothing operation to be performed concurrently for
approximately the same number of nodes. This sameness all levels. Another example of additive ML method can be
is required for good load balancing of the computations. In derived from the FAC method introduced in the section
addition, the grid partitioning should introduce a small on MG with locally refined meshes. The original FAC
number of grid lines between the neighboring subdomains. algorithm is inherently sequential in the sense that,
It also is beneficial that the grid lines stretching between although different grid levels can be processed asynchro-
the neighboring subdomains define the weak connections nously, the various refinement levels are treated in a
between the unknowns. The former requirement is related multiplicative way (i.e., the action of the FAC solver/
to the minimization of the communication overhead preconditioner is obtained as a product of the actions
between the neighboring processors, whereas the latter from different refinement levels). To overcome this
affects the efficiency and the convergence characteristics obstacle, an asynchronous version of the FAC algorithm,
of the parallel MG algorithm. For structured grids defined referred to as AFAC, was developed (55). The AFAC has
on regular geometries, the partitioning in Equation (48) can the convergence rate independent of the number of
be done fairly simply. However, this problem becomes refinement levels and allows the use of uniform grid
progressively more complicated for non trivial geometries solvers on locally refined grid patches. However, these
(possibly with the internal boundaries) on which a problem uniform grid solvers are, themselves, MG-based, which
is discretized by unstructured or adaptively refined grids. can lead potentially to a substantial computational over-
In such cases, general-purpose algorithms for graph parti- head. A new version, AFACx (56), is designed to use the
tioning, such as METIS (54), provide the required balanced simple fixed-point iterations at different refinement
grid subdivision. levels without significant deterioration of the conver-
Two strategies of combining MG and domain decompo- gence characteristics when compared with the previous
sition for parallel computers exist. The simpler choice is to versions.
apply a serial MG algorithm on each of the subdomain In this article, AMG was introduced as a prototype of a
problems, communicating the solution among the proces- black-box solver and a preconditioner for elliptic PDE and
sors only at the finest level. This method is particularly some other class of problems where the coefficient matrix
effective if the subdomains are connected along physically has the properties that resemble the M-matrix. Because of
narrow areas that actually are not visible on coarse levels. A its robustness and ease of use, AMG has become an obvious
more complex choice is to extend the communication to the candidate as a solver for a variety of large-scale scientific
coarse grid levels. applications. In such cases, the performance characteris-
In some parallel MG algorithms based on the grid tics of the sequential AMG may not be sufficient. This
decomposition, different grid levels still are processed reason is why a considerable research effort was devoted
sequentially. When the number of grid variables at the to the parallelization of AMG.
16 MULTIGRID METHODS

The application of AMG to the solution of a linear system approach is that the strong couplings across the subdomain
consists of two phases: the coarsening and the solve phase boundaries are not taken into account. When MSB is used,
(which implements the MG V-cycle). The parallelization of the assembly of the interpolation operators is local for each
AMG is done using the domain decomposition approach subdomain (requiring no communication). The assembly of
based on the grid decomposition in Equation (48). In the the coarse grid discrete operators does require some com-
solve phase, parallelization is restricted to fixed-point itera- munication; however, it is restricted to the unknowns in the
tions. In this context, instead of the standard versions, some boundary layers of the neighboring subdomains.
modifications are needed. The most common approach is the
CF GaussSeidel method, which is performed indepen- Third-Pass Coarsening (RS3). This coarsening is an alter-
dently on each subdomain using the frozen values in the native approach to correct the problem of FF dependencies
boundary areas. The values in these areas are refreshed by across the subdomain boundaries that do not have a com-
the data communication between the neighboring subdo- mon C-point (58). In this approach, a two-pass standard RS
mains. coarsening is performed on each subdomain concurrently,
In most of the application areas, the coarsening phase is before the third pass is performed on the points within the
the most time-consuming part of the algorithm. Thus, the boundary layers. This method requires the communication
efficient parallelization of AMG coarsening will have a between the neighboring subdomains. In the RS3 coarsen-
major impact on AMG parallel performance. The problem ing, additional coarse grid points can be created in each of
is that the previously introduced classical coarsening algo- the subdomains on demand from its neighboring subdo-
rithm, which also is referred to as the RugeStuben (RS) mains. This approach may lead potentially to the load
coarsening, is inherently sequential. To perform the sub- imbalance between the subdomains. One drawback of
division of a set of variables at each grid level into coarse the RS3 coarsening is the concentration of the coarse points
(C) and fine (F) variables, based on the strength of depen- near the subdomain boundaries. Another problem is that
dence principle, one needs to start from an arbitrary vari- the introduction of a large number of subdomains will make
able and visit all the remaining variables in succession. To the coarsest grid problem unacceptably large (as each of the
parallelize this process, a combination of the domain subdomains cannot be coarsened beyond a single grid
decomposition methodology and the RS coarsening was point).
proposed. To facilitate this approach, a partitioning of
the graph associated with the coefficient matrix is per- The CLJP Coarsening. This procedure is based on parallel
formed. In this context, it is desirable that the partitioning graph-partitioning algorithms and is introduced in Ref. 59.
cuts only (or mostly) the weak connections in the graph. In this approach, a directed weighted graph is defined with
Moreover, it is necessary to mark the unknowns that have the vertices corresponding to the problem unknowns and
some of their connections cut, as these unknowns belong to the edges corresponding to the strong couplings. A weight is
the boundary layer between the neighboring subdomains associated with each vertex, being equal to the number of
and will be involved subsequently in the interprocessor strong couplings of the neighboring vertices to this vertex
communication. Most of the parallel coarsening schemes plus a random number. Random numbers are used to
are based on the application of the standard RS coarsening break ties between the unknowns with the same number
scheme applied concurrently on each of the subdomains, of strong influences (and thus to enable parallelization of
employing some kind of special treatment of the points in the coarsening procedure). The coarsening process pro-
the boundary layers. Two main reasons exist for this special ceeds iteratively, where at each iteration an independent
treatment; the standard coarsening scheme usually creates set is chosen from the vertices of the directed graph. A point
an unnecessarily high concentration of the C points close to i is selected to be in an independent set if its weight is larger
the processor boundaries, and possible coarsening incon- than the weights of all neighboring vertices. Then, the
sistencies may appear. The latter are manifested in strong points in the independent set are declared as C-points.
FF couplings across the subdomain boundaries, where The main advantage of the CLJP coarsening is that it is
both F points do not have a common C point. Several entirely parallel and it always selects the same coarse grid
different modifications have been proposed to alleviate points, regardless of the number of subdomains (this is not
such problems. In the sequel, a brief review of some well- the case with the RS and the RS3 coarsenings). A drawback
known modifications of the classical coarsening scheme is is that the CLJP coarsening process selects the coarse grids
given. with more points than necessary. This action, in turn,
increases the memory requirements and the complexity
Minimum Subdomain Blocking (MSB). This approach was of the solution phase. A recent modification of the CLJP
the first used to parallelize the AMG coarsening phase (57). scheme that addresses these issues is proposed in [Ref. 60].
In this approach, the coarsening process in each subdomain The interpolation operators and the coarse grid discrete
is decoupled into the coarsening of the variables in the operators are assembled in a usual way.
boundary layer (done by the classical RS coarsening
scheme, taking into account only the connections within The Falgout Coarsening. This hybrid scheme involves
the layer) and the coarsening of the remainder of the both the classical RS and the CLJP coarsening, designed
subdomain (again, done by the classical RS algorithm). with the aim of reducing the drawbacks that each of these
Such heuristics ensures that each of the F-points in the two schemes introduce. The Falgout coarsening (58) uses
boundary layer has at least one connection to a C-point the RS coarsening in the interior of the subdomains and the
within the boundary layer. The main drawback of this CLJP coarsening near the subdomain boundaries.
MULTIGRID METHODS 17

Parallel AMG as a Preconditioner for 3-D Applications. 12. U. Rude, Mathematical and Computational Techniques for
When traditional coarsening schemes are applied to Multilevel Adaptive Methods, Vol. 13, Frontiers in Applied
large-scale problems obtained from the discretizations Mathematics. Philadelphia, PA: SIAM, 1993.
of 3-D PDEs, the computational complexity and the 13. S. F. McCormick, Multilevel Adaptive Methods for Partial
memory requirements increase considerably, diminish- Differential Equations, Vol. 6, Frontiers in Applied Mathe-
ing the optimal scalability of AMG. If AMG is used as a matics. Philadelphia, PA: SIAM, 1989.
preconditioner in this context, the two coarsening 14. V. V. Shaidurov, Multigrid Methods for Finite Elements.
schemes, based on the maximal independent set algo- Dordrecht: Kluwer, 1995.
rithm, referred to as the parallel modified independent 15. M. Griebel and C. Zenger: Numerical simulation in science and
set (PMIS) and the hybrid modified independent set engineering, Notes on numerical fluid mechanics, Vol. 48.
Braunschweig: Vieweg Verlag, 1994.
(HIMS) (introduced in Ref. 61), can reduce the complexity
issues significantly. 16. B. Koren, Multigrid and Defect Correction for the Steady
NavierStokes Equations Applications to Aerodynamics.
Amsterdam: Centrum voor Wiskunde en Informatica, 1991.
FINAL REMARKS 17. C. Douglas and G. Haase, Algebraic multigrid and Schur
complement strategies within a multilayer spectral element
MG methods have been a subject of considerable research ocean model, Math. Models Meth. Appl. Sci., 13(3): 309322,
interest over the past three decades. Research groups at 2003.
many institutions are involved in ongoing projects related 18. M. Brezina, C. Tong, and R. Becker, Parallel algebraic multi-
to both theoretical and practical aspects of MG. It is grid for structural mechanics, SIAM J. Sci. Comput., 27(5):
virtually impossible to cover all the aspects of this versa- 15341554, 2006.
tile area of research and to cite all the relevant references 19. A. Brandt, J. Bernholc, and K. Binder (eds.), Multiscale Com-
within the limited space of this review. A comprehensive putational Methods in Chemistry and Physics. Amsterdam:
IOS Press, 2001.
reference list with over 3500 units on MG can be found at
[Ref. 62], together with some publicly available MG soft- 20. W. Joppich and S. Mijalkovic, Multigrid Methods for Process
Simulation. Wien: Springer-Verlag, 1993.
ware (63). The ongoing interest of the scientific commu-
nity in MG methods is reflected in two long-running 21. G. Haase, M. Kuhn, and U. Langer, Parallel multigrid 3D
Maxwell solvers, Parallel Comput., 27(6): 761775, 2001.
regular conference series on MG methods (64,65), which
attract an ever-increasing number of participants. Some 22. J. Hu, R. Tuminaro, P. Bochev, C. Garassi, and A. Robinson,
Toward an h-independent algebraic multigrid for Maxwells
additional relevant monographs, that were not previously
equations, SIAM J. Sci. Comput., 27(5): 16691688, 2006.
mentioned in this presentation, include Refs. 1115 and
23. J. Jones and B. Lee, A multigrid method for variable coefficient
Ref. 65.
Maxwells equatons, SIAM J. Sci. Comput, 27(5): 16891708,
2006.
BIBLIOGRAPHY 24. G. H. Golub and C. F. VanLoan, Matrix computations.
Baltimore, MD: J. Hopkins University Press, 1996.
1. K. Eriksson, D. Estep, P. Hansbo, and C. Johnson, Computa- 25. G. Wittum, Multigrid methods for Stokes and NavierStokes
tional Differential Equations. Cambridge: Cambridge Univer- equationstransforming smoothers: Algorithms and numer-
sity Press, 1996. ical results, Numer. Math., 54: 543563, 1989.
2. H. C. Elman, D. J. Silvester, and A. J. Wathen, Finite Elements 26. U. M. Ascher, R. M. M. Mattheij, and R. D. Russell, Numerical
and Fast Iterative Solvers. Oxford: Oxford University Press, Solution of Boundary Value Problems for Ordinary Differential
2005. Equations. Philadelphia, PA: SIAM, 1995.
3. A. R. Mitchell and D. F. Griffiths, The Finite Difference 27. P. M. Gresho and R. L. Sani, Incompressible Flow and the
Method in Partial Differential Equations. Chichester: Wiley, Finite Element Method. Chichester: Wiley, 1998.
1980. 28. R. E. Bank, PLTMG: A software package for solving elliptic
4. Y. Saad, Iterative Methods for Sparse Linear Systems, 2nd ed. partial differential equations, Users Guide 7.0, Vol. 15, Fron-
Philadelphia, PA: SIAM, 2003. tiers in applied mathematics, Philadelphia, PA: SIAM,
1994.
5. R. P. Fedorenko, A relaxation method for solving elliptic dif-
ference equations, USSR Computational Math. and Math. 29. A. C. Jones, P. K. Jimack, An adaptive multigrid tool for elliptic
Physics, 1: 10921096, 1962. and parabolic systems, Int. J. Numer. Meth. Fluids, 47: 1123
1128, 2005.
6. A. Brandt, Multi-level adaptive solutions to boundary-value
problems, Math. Comput., 31: 333390, 1977. 30. S. McCormick, Fast Adaptive Composite Grid (FAC) methods:
Theory for the variational case, in: K. Bohmer and H. Sctter
7. W. L. Briggs, V. E. Henson, and S. F. McCormick, A multigrid
(eds.), Defect Correction Methods: Theory and Applications,
tutorial, 2nd ed. Philadelphia, PA: SIAM, 2000.
Computation Supplementation, Vol. 5. Berlin: Springer
8. U. Trottenberg, C. W. Oosterlee, and A. Schuller, Multigrid. Verlag, 1984, pp. 131144.
London: Academic Press, 2001.
31. J. W. Ruge and K. Stuben, Algebraic multigrid, in: S. F.
9. W. Hackbusch, Multi-grid methods and applications. Berlin: McCormick (ed.), Multigrid methods, Vol. 3, Frontiers in
Springer, 2003. applied mathematics, Philadelphia, PA: SIAM, 1987, pp.
10. P. Wesseling, An Introduction to Multigrid Methods. Philadel- 73130.
phia, PA: R.T. Edwards, 2004. 32. P. Vanek, J. Mandel, and M. Brezina, Algebraic multigrid by
11. J. H. Bramble, Multigrid Methods. Harlow: Longman Scientific smoothed aggregation for second and fourth order elliptic
and Technical, 1993. problems, Computing, 56: 179196, 1996.
18 MULTIGRID METHODS

33. M. Brezina, A. J. Cleary, R. D. Falgout, V. E. Henson, J. E. 52. B. Smith, P. Bjstrad, and W. Gropp, Domain Decomposition:
Jones, T. A. Manteuffel, S. F. McCormick, and J. W. Ruge, Parallel Multilevel Methods for Elliptic Partial Differential
Algebraic multigrid based on element interpolation (AMGe), Equations. Cambridge: Cambridge University Press, 2004.
SIAM J. Sci. Comput., 22(5): 15701592, 2000. 53. A. Brandt, Multigrid solvers on parallel computers, in M. H.
34. T. Chartier, R. D. Falgout, V. E. Henson, J. Jones, T. Schultz (ed.), Elliptic Problem Solvers. New York: Academic
Manteuffel, S. McCormick, J. Ruge, and P. Vassilevski, Spec- Press, 1981, pp. 3983.
tral AMGe (rAMGe), SIAM J. Sci. Comput., 25(1): 126, 2003. 54. METIS, A family of multilevel partitioning algorithms. Avail-
35. J. E. Jones, P. S. Vassilevski, AMGe based on element agglom- able: http://glaros.dtc.umn.edu/gkhome/views/metis.
eration, SIAM J. Sci. Comput., 23(1): 109133, 2001. 55. L. Hart and S. McCormick, Asynchronous multilevel adaptive
36. A. Brandt, General highly accurate algebraic coarsening, methods for solving partial differential equations: Basic ideas,
Electronic Trans. Numerical Analysis, 10: 120, 2000. Parallel Comput., 12: 131144, 1989.
37. K. Stuben, A review of algebraic multigrid, J. Comput. Appl. 56. B. Lee, S. McCormick, B. Philip, and D. Quinlan, Asynchronous
Math., 128: 281309, 2001. fast adaptive composite-grid methods for elliptic problems:
38. T. Fullenbach, K. Stuben, and S. Mijalkovic, Application of theoretical foundations, SIAM J. Numer. Anal., 42: 130152,
algebraic multigrid solver to process simulation problems, 2004.
Proc. Int. Conf. of Simulat. of Semiconductor Processes and 57. A. Krechel and K. Stuben, Parallel algebraic multigrid based
Devices, 2000, pp. 225-228. on subdomain blocking, Parallel Comput., 27: 10091031,
39. K. Stuben, P. Delaney, and S. Chmakov, Algebraic multigrid 2001.
(AMG) for ground water flow and oil reservoir simulation, Proc. 58. V. E. Henson and U. Meier Yang, BoomerAMG: A parallel
MODFLOW 2003. algebraic multigrid solver and preconditioner, Appl. Numer.
40. T. Fullenbach and K. Stuben, Algebraic multigrid for selected Math., 41: 155177, 2002.
PDE systems, Proc. 4th Eur. Conf. on Elliptic and Parabolic 59. A. J. Cleary, R. D. Falgout, V. E. Henson, and J. E. Jones,
Problems, London, 2002, pp. 399-410. Coarse-grid selection for parallel algebraic multigrid, Lecture
41. T. Clees and K. Stuben, Algebraic multigrid for industrial Notes in Computer Science. New York: Springer, 1998, pp. 104
semiconductor device simulation, Proc. 1st Int. Conf. on 115.
Challenges in Sci. Comput., Engnrg, 2003. 60. D. M. Alber, Modifying CLJP to select grid hierarchies with
42. K. Stuben and T. Clees, SAMG users manual, Fraunhofer lower operator complexities and better performance, Numer.
Institute SCAI. Available: http://www.scai.fhg.de/samg. Linear Algebra Appl., 13: 87104, 2006.
43. J. J. Dongarra, I. S. Duff, D. Sorensen, and H. vander Vorst, 61. H. De Sterck, U. Meier Yang, and J. J. Heys, Reducing complex-
Numerical Linear Algebra for High-Performance Computers. ity in parallel algebraic multi grid preconditioners, SIAM
Philadelphia, PA: SIAM, 1998. J. Matrix Anal. Appl., 27: 10191039, 2006.
44. R. E. Bank, T. Dupont, and H. Yserentant, The hierarchical 62. C. C. Douglas, and M. B. Douglas, MGNet bibliography. Avail-
basis multigrid method, Numer. Math., 52: 427458, 1988. able: http://www.mgnet.org/bib/mgnet.bib. New Haven, CT:
45. J. H. Bramble, J. E. Pasciak, and J. Xu, Parallel multilevel Yale University, Department of Computer Science, 1991-2002.
preconditioners, Math. Comput., 55: 122, 1990. 63. MGNet: A repository for multigrid and other methods.
46. M. D. Mihajlovic and S. Z. Mijalkovic, A component decom- Available: http://www.mgnet.org/.
position preconditioning for 3D stress analysis problems, 64. Copper mountain conference on multigrid methods. Available:
Numer. Linear Algebra Appl., 9(6-7): 567583, 2002. http://amath.colorado.edu/faculty/copper/.
47. C. E. Powell and D. J. Silvester, Optimal preconditioning for 65. European conference on multigrid, multilevel and multiscale
RaviartThomas mixed formulation of second-order elliptic methods. Available: http://pcse.tudelft.nl/emg2005/
problems, SIAM J. Matrix Anal. Appl., 25: 718738, 2004. 66. R. Wienands and W. Joppich, Practical Fourier Analysis for
48. I. Perugia, V. Simoncini, and M. Arioli, Linear algebra methods Multigrid Methods. Boca Raton: Chapman & Hall/CRC, 2005.
in a mixed approximation of magnetostatic problems, SIAM J.
Sci. Comput., 21(3): 10851101, 1999.
49. G. Wempner, Mechanics of Solids. New York: McGraw-Hill,
SLOBODAN Z. MIJALKOVIC
Silvaco Technology Centre
1973.
Cambridge, United Kingdom
50. M. R. Hanisch, Multigrid preconditioning for the biharmonic Milan D. Mihajlovic
Dirichlet problem, SIAM J. Numer. Anal., 30: 184214, 1993. University of Manchester
51. D. J. Silvester, M. D. Mihajlovic, A black-box multigrid pre- Manchester, United Kingdom
conditioner for the biharmonic equation, BIT, 44(1): 151163,
2004.
P
PROBABILITY AND STATISTICS soned that it was unfair to award all stakes to the party who
was leading at the point of interruption. Rather, they
As an introductory definition, we consider probability to be computed the outcomes for all possible continuations of
a collection of concepts, methods, and interpretations that the game. Each party is allocated that fraction of the out-
facilitate the investigation of nondeterministic phenom- comes that result in a win for him. This fraction constitutes
ena. Although more mathematically precise definitions the probability that the party would win if the game were
will appear in due course, this broadly inclusive description completed. Hence, the partys expectation is that same
certainly captures the nonspecialists meaning of prob- fraction of the stakes and such should be his fair allocation
ability, and it aligns closely with the intuitive appreciation in the event of an interrupted game. We note that this
shared by engineering and computer science professionals. resolution accords with the intuition that the party who is
That is, probability is concerned with chance. In a general ahead at the time of interruption should receive a larger
context, probability represents a systematic attempt to share of the stakes. Indeed, he is ahead precisely because
cope with fluctuations of the stock market, winning and the fraction of game continuations in his favor is noticeably
losing streaks at the gaming table, and trends announced larger than that of his opponent.
by economists, sociologists, and weather forecasters. In For his role in gambling problems, such as the one
more scientific contexts, these examples extend to traffic described above, and for his concept of dominating strate-
flow patterns on computer networks, request queue lengths gies in decision theory, Pascal is sometimes called the
at a database server, and charge distributions near a father of probability theory. The title is contested, however,
semiconductor junction. as there are earlier contributers. In the 1560s, Girolamo
Modern life, despite the predictability afforded by scien- Cardano wrote a book on games of chance, and Fra Luca
tific advances and technological accomplishments, offers Paciuoli described the division of stakes problem in 1494.
frequent exposure to chance happenings. It is a safe con- In any case, it is not realistic to attribute such a broad
clusion that this situation has been part of human existence subject to a single parental figure. The mid-seventeenth-
from prehistoric times. Indeed, despite the associated anxi- century date of birth, however, is appropriate. Earlier
ety, it seems that humans actively seek chance encounters investigations are frequently erroneous and tend to be
and that they have done so from earliest times. For exam- anecdotal collections, whereas Pascals work is correct by
ple, archeological evidence confirms that gambling, typi- modern standards and marks the beginning of a systematic
cally in the form of dice games, has been with us for study that quickly attracted other talented contributors.
thousands of years. Given this long history, we might In 1657, Christian Huygens introduced the concept of
expect some accumulation of knowledge, at least at the expectation in the first printed probability textbook. About
level of folklore, that purports to improve the outcomes of the same time John Wallis published an algebra text that
chance encounters. In Europe, however, no evidence of a featured a discussion of combinatorics. Appearing posthu-
science of gambling appears before the fifteenth century, mously in 1713, Jacques Bernoullis Ars Conjectandi (The
and it is only in the middle of the seventeenth century that Art of Conjecture) presented the first limit theorem, which
such knowledge starts to encompass chance phenomena is today known as the Weak Law of Large Numbers. Soon
outside the gaming sphere. thereafter, Abraham de Moivre demonstrated the normal
A science of chance in this context means a set of con- distribution as the limiting form of binomial distributions, a
cepts and methods that quantifies the unpredictability of special case of the Central Limit Theorem. In marked
random events. For example, frequency of occurrence pro- contrast with its earlier focus on gambling, the new science
vides a useful guideline when betting on a roll of the dice. now found application in a variety of fields. In the 1660s,
Suppose your science tells you, from observation or calcula- John Hudde and John de Witt provided an actuarial foun-
tion, that a seven occurs about once in every 6 throws and a dation for the annuities used by Dutch towns to finance
two occurs about once in every 36 throws. You would then public works. In 1662, John Graunt published the first set of
demand a greater payoff for correctly predicting the next statistical inferences from mortality records, a subject of
throw to be a two than for predicting a seven. Although the morbid interest in those times when the plague was devas-
dice rolls may be random, a pattern applies to repeated tating London. Around 1665, Gottfried Leibniz brought
rolls. That pattern governs the relative abundance of probability to the law as he attempted to assess the credi-
sevens and twos among the outcomes. bility of judicial evidence.
Probability as a science of chance originated in efforts to Excepting Leibnizs concern with the credibility of evi-
quantify such patterns and to construct interpretations dence, all concepts and applications discussed to this point
useful to the gambler. Many historians associate the birth have involved patterns that appear over repeated trials of
of probability with a particular event in mid-seventeenth- some nondeterministic process. This is the frequency-of-
century France. In 1654, the Chevalier de Mere, a gambler, occurrence interpretation of probability, and it presents
asked Blaise Pascal and Pierre Fermat, leading mathema- some dificulty when contemplating a single trial. Suppose a
ticians of the time, to calculate a fair disposition of stakes medical test reveals that there is a 44% chance of your
when a game suffers a premature termination. They rea- having a particular disease. The frequency-of-occurrence

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 PROBABILITY AND STATISTICS

interpretation is that 44% of a large number of persons such as three or four on a single roll, is the probability
with the same test results have actually had the disease. Pf3; 4g 1=3.
What does this information tell you? At best, it seems to be a How are these values determined? In axiomatic prob-
rough guideline. If the number were low, say 0.01%, then ability theory, probabilities are externally specified. For
you might conclude that you have no medical problem. If example, in a coin-tossing context, we might know from
it were high, say 99.9%, then you would likely conclude external considerations that heads appears with relative
that you should undergo treatment. There is a rather large frequency 0.55. We then simply declare Pheads 0:55 as
gap between the two extremes for which it is dificult to the probability of heads. The probability of tails is then
reach any conclusion. Even more tenuous are statements 1:0  0:55 0:45. In axiomatic probability theory, these
such as There is a 30% chance of war if country X acquires values are assigned by the function P, the third component
nuclear weapons. In this case, we cannot even envision the of the probability space triple. That is, the theory develops
large number of trials that might underlie a frequency-of- under the assumption that the assignments are arbitrary
occurrence interpretation. These philosophical issues have (within certain constraints to be discussed shortly), and
long contributed to the uneasiness associated with prob- therefore any derived results are immediately applicable to
abilistic solutions. Fortunately for engineering and com- any situation where the user can place meaningful fre-
puter science, these questions do not typically arise. That is, quency assignments on the outcomes.
probability applications in these disciplines normally admit There is, however, one intervening technical dificulty.
a frequency-of-occurrence interpretation. If, for example, The function P does not assign probabilities directly to the
we use probability concepts to model query arrivals at a outcomes. Rather, it assigns probabilities to events, which
database input queue, we envision an operating environ- are subsets of V. These events constitute F , the second
ment in which a large number of such queries are generated element of the probability triple. In the frequency-of-occur-
with random time spacings between them. We want to rence interpretation, the probability of an event is the
design the system to accommodate most of the queries in fraction of trials that produces an outcome in the event.
an economic manner, and we wish to limit the consequences A subset in F may contain a single outcome from V, in
of the relatively rare decision to reject a request. which case this outcome receives a specific probability
In any case, as probability developed a sophisticated assignment. However, some outcomes may not occur as
mathematical foundation, the mathematics community singleton subsets in F . Such an outcome appears only
took the opportunity to sidestep the entire issue of inter- within subsets (events) that receive overall probability
pretations. A movement, led primarily by Andrei Kolmo- assignments. Also, all outcomes of an event E 2 F may
gorov, developed axiomatic probability theory. This theory constitute singleton events, each with probability assign-
defines the elements of interest, such as probability spaces, ment zero, whereas E itself receives a nonzero assignment.
random variables, and distributions and their transforms, Countability considerations, to be discussed shortly, force
as abstract mathematical objects. In this setting, the the- these subtleties in the general case to avoid internal con-
orems have specific meanings, and their proofs are the tradictions. In simple cases where V is a finite set, such
timeless proofs of general mathematics. The theorems as the outcomes of a dice roll, we can take F to be all
easily admit frequency-of-occurrence interpretations, and subsets of V, including the singletons. In this case, the
other interpretations are simply left to the observer with- probability assignment to an event must be the sum of the
out further comment. Modern probability theory, meaning assignments to its constituent outcomes.
probability as understood by mathematicians since the first Here are the official rules for constructing a probability
third of the twentieth century, is grounded in this space V; F ; P. First, V may be any set whatsoever. For
approach, and it is along this path that we now begin a engineering and computer science applications, the most
technical overview of the subject. convenient choice is often the real numbers, but any set will
do. F is a collection of subsets chosen from V. F must
constitute a s-field, which is a collection containing f,
PROBABILITY SPACES
the empty subset, and closed under the operations of com-
plement and countable union. That is,
Formally, a probability space is a triple V; F ; P. The first
component V is simply a set of outcomes. Examples are V  f 2 F.
fheads; tailsg for a coin-flipping scenario, V f1; 2; 3; 4; 5; 6g
for a single-die experiment, or V fx : 0  x < 1g for a
 A 2 F forces A V  A 2 F .
spinning pointer that comes to rest at some fraction of a  An 2 F for n 1; 2; . . . forces [ 1
n1 An 2 F .
full circle. The members of V are the occurrences over which
we wish to observe quantifiable patterns. That is, we envi- Finally, the function P maps subsets in F to real num-
sion that the various members will appear nondeterminis- bers in the range zero to one in a countably additive
tically over the course of many trials, but that the relative manner. That is,
frequencies of these appearances will tend to have estab-
lished values. These are values assigned by the function P  P : F ! 0; 1:
to outcomes or to collections of outcomes. These values are  Pf 0.
known as probabilities. In the single-die experiment, for  PV 1.
example, we might speak of P3 1=6 as the probability of P1
 P [ 1
n1 An n1 PAn for pairwise disjoint subsets
obtaining a three on a single roll. A composite outcome,
A1, A2,. . ..
PROBABILITY AND STATISTICS 3

P1
The events in F are called measurable sets because the  P [ 1
n1 An  n1 PAn , without regard to disjoint-
function P specifies their sizes as probability allotments. ness among the An.
You might well wonder about the necessity of the s-field F .  If A  B, then PA  PB.
As noted, when V is a finite outcome set, F is normally  If A1  A2  . . ., then P [ 1n1 An limn ! 1 PAn .
taken to be the collection of all subsets of V. This maximal
collection clearly satisfies the requirements. It contains all
 If A1  A2  . . ., then P \ 1n1 An limn ! 1 PAn .
singleton outcomes as well as all possible groupings. More-
over, the rule that P must be countably additive forces the The final two entries above are collectively known as the
probability of any subset to be the sum of the probabilities of Continuity of Measure Theorem. A more precise continuity
its members. This happy circumstance occurs in experi- of measure result is possible with more refined limits. For a
ments with dice, coins, and cards, and subsequent sections sequence a1, a2,. . . of real numbers and a sequence A1,
will investigate some typical probability assignments in A2, . . . of elements from F , we define the limit supremum
those cases. and the limit infimum as follows:
A countable set is one that can be placed in one-to-one
correspondence with the positive integers. The expedient limsup an limsup an
n!1 k ! 1n  k
introduced for finite V extends to include outcome spaces \1 1
limsup An k1 [ nk An
that are countable. That is, we can still choose F to be all n!1
subsets of the countably infinite V. The probability of a liminf an liminf an
n!1 k ! 1n  k
subset remains the sum of the probabilities of its members, [1 1
liminf An k1 \ nk An
although this sum now contains countably many terms. n!1
However, the appropriate V for many scientific purposes is
the set of real numbers. In the nineteenth century, Georg We adopt the term extended limits for the limit supremum
Cantor proved that the real numbers are uncountable, as is and the limit infimum. Although a sequence of bounded
any nonempty interval of real numbers. real numbers, such as probabilities, may oscillate indefi-
When V is an uncountable set, set-theoretic conun- nitely and therefore fail to achieve a well-defined limiting
drums beyond the scope of this article force F to be smaller value, every such sequence nevertheless achieves extended
than the collection of all subsets. In particular, the coun- limits. We find that liminf an  limsup an in all cases, and if
table additivity requirement on the function P cannot the sequence converges, then liminf an lim an limsup
always be achieved if F is the collection of all subsets of an. For a sequence of subsets in F , we adopt equality of the
V. On most occasions associated with engineering or extended limits as the definition of convergence. That is,
computer science applications, the uncountable V is the lim An A if liminf An limsup An A.
real numbers or some restricted span of real numbers. In When applied to subsets, we find liminf An  limsup An.
this case, we take F to be the Borel sets, which is the Also, for increasing sequences, A1  A2  . . ., or decreasing
smallest s-field containing all open intervals of the form sequences, A1  A2  . . ., it is evident that the sequences
(a, b). converge to the countable union and countable intersection,
Consider again the example where our outcomes are respectively. Consequently, the Continuity of Measure
interarrival times between requests in a database input Theorem above is actually a statement about convergent
queue. These outcomes can be any positive real numbers, sequences of sets: Plim An lim PAn . However, even if
but our instrumentation cannot measure them in infinite the sequence does not converge, we can derive a relation-
detail. Consequently, our interest normally lies with events ship among the probabilities: P(liminf An)  liminf P(An) 
of the form (a, b). The probability assigned to this interval limsup P(An)  P(limsup An).
should reflect the relative frequency with which the inter- We conclude this section with two more advanced results
arrival time falls between a and b. Hence, we do not need all that are useful in analyzing sequences of events. Suppose
subsets of the positive real numbers among our measurable An, for n 1; 2; . . ., is a sequence of events in F for which
P 1
sets. We need the intervals and interval combinations n1 PAn < 1. The Borel Lemma states that, under these
achieved through intersections and unions. Because F circumstances, Pliminf An Plimsup An 0.
must be a s-field, we must therefore take some s-field The second result is the BorelCantelli Lemma, for which
containing the intervals and their combinations. By defini- we need the definition of independent subsets. Two subsets
tion the collection of Borel sets satisfies this condition, and A, B in F are independent if PA \ B PAPB. Now
this choice has happy consequences in the later develop- suppose that Ai and Aj are independent for any two distinct
ment of random variables. subsets
P1 in the sequence. Then the lemma asserts that if
Although not specified explicitly in the defining con- n1 PAn 1, then Plimsup An 1. A more general
straints, closure under countable intersections is also a result, the KochenStone Lemma, provides a lower bound
property of a s-field. Moreover, we may interpret countable on P(limsup An) under slightly more relaxed conditions.
as either finite or countably infinite. Thus, every s-field is
closed under finite unions and finite intersections. From COMBINATORICS
set-theoretic arguments, we obtain the following properties
of the probability assignment function P: Suppose a probability space V; F ; P features a finite
outcome set V. If we use the notation |A| to denote the
 PA 1  PA. number of elements in a set A, then this condition is jVj n
4 PROBABILITY AND STATISTICS

for some positive integer n. In this case, we take F to be the ascending numerical values. That is, the first subchoice has
collection of all subsets of V. We find that jF j 2n , and a candidates: clubs, diamonds, hearts, spades. The second
feasible probability assignment allots probability 1/n to subchoice has candidates: 2, 3,. . ., 10. The number of can-
each event containing a singleton outcome. The countable didate hands for a straight flush and the corresponding
additivity constraint then forces each composite event to probability of a straight flush are then
receive probability equal to the sum of the probabilities of
! !
its constituents, which amounts to the size of the event 4 9
divided by n. In this context, combinatorics refers to meth- Nstraight flush 36
1 1
ods for calculating the size of V and for determining the
number of constituents in a composite event. 36
Pstraight flush 0:0000138517
In the simplest cases, this computation is mere enu- 2598960
meration. If V contains the six possible outcomes from the
roll of a single die, then V 1; 2; 3; 4; 5; 6. We observe that
n 6. If an event E is described as the outcome is odd or it The multiplicative approach that determines the num-
is greater than 4, then we note that outcomes 1, 3, 5, 6 ber of straight flush hands amounts to laying out the hands
conform to the description, and we calculate PE 4=6. In in four columns, one for each suit, and nine rows, one for
more complicated circumstances, neither n nor the size of each low card anchor value. That is, each candidate from
E is so easily available. For example, suppose we receive the first subchoice admits the same number of subsequent
5 cards from a shuffled deck of 52 standard playing cards. choices, nine in this example. If the number of subsequent
What is the probability that we receive five cards of the subchoices is not uniform, we resort to summing the values.
same suit with consecutive numerical values (a straight For example, how many hands exhibit either one or two
flush)? How many possible hands exist? How many of those aces? One-ace hands involve a choice of suit for the ace,
constitute a straight flush? followed by a choice of any 4 cards from the 48 non-aces.
A systematic approach to such problems considers Two-ace hands require a choice of two suits for the aces,
sequences or subsets obtained by choosing from a common followed by a selection of any 3 cards from the 48 non-aces.
pool of candidates. A further distinction appears when we The computation is
consider two choice protocols: choosing with replacement ! ! ! !
and choosing without replacement. Two sequences differ if 4 48 4 48
they differ in any position. For example, the sequence 1, 2, 3 None or two aces 882096
is different from the sequence 2, 1, 3. However, two sets 1 4 2 3
differ if one contains an element that is not in the other. 882096
Consequently, the sets 1, 2, 3 and 2, 1, 3 are the same set. Pone or two aces 0:3394
2598960
Suppose we are choosing k items from a pool of n without
replacement. That is, each choice reduces that size of the
pool available for subsequent choices. This constraint When the selections are performed with replacement,
forces k  n. Let Pk,n be the number of distincts sequences the resulting sequences or sets may contain duplicate
that might be chosen, and let Ck,n denote the number of entries. In this case, a set is more accurately described
possible sets. We have as a multiset, which is a set that admits duplicate members.
Moreover, the size of the selection k may be larger than
n! the size of the candidate pool n. If we let Pk;n and Ck;n denote
Pk;n nk#  nn  1n  2 n  k 1
k! the number of sequences and multisets, respectively, we
n n!
Ck;n  obtain
k k!n  k!
Pk;n nk
Consider again the scenario mentioned above in which we  
nk1
receive five cards from a shuffled deck. We receive one of Ck;n
k
525# 311875200 sequences. To determine whether we
have received a straight flush, however, we are allowed to
reorder the cards in our hand. Consequently, the size of the These formulas are useful in occupancy problems. For
outcome space is the number of possible sets, rather than example, suppose we have n bins into which we must
the number of sequences. As there are 52 5 2598960 such distribute k balls. As we place each ball, we choose one of
sets, we conclude that the size of the outcome space is the n bins for it. The chosen bin remains available for
n 2598960. Now, how many of these possible hands con- subsequent balls, so we are choosing with replacement. A
stitute a straight flush? generic outcome is (n1, n2,. . ., nk), where ni denotes the bin
For this calculation, it is convenient to introduce another selected for ball i. There are nk such outcomes correspond-
useful counting tool. If we can undertake a choice as a ing to the number of such sequences.
succession of subchoices, then the number of candidate If we collect birthdays from a group of 10 persons, we
choices is the product of the number available at each stage. obtain a sequence n1, n2,. . ., n10, in which each entry is an
A straight flush, for example, results from choosing one of integer in the range 1 to 365. As each such sequence
four suits and then one of nine low cards to anchor the represents one choice from a field of P365;10 36510 , we
PROBABILITY AND STATISTICS 5

can calculate the probability that there will be at least information for us to know the numbers ni. After the
one repetition among the birthdays by computing the experiment, we cannot locate ball i, and hence, we cannot
number of such sequences with at least one repetition specify its bin. In this case, we know only the multiset
and dividing by the size of the field. We can construct a outcome k1, k2,. . ., kn, where ki is the number of balls in bin
sequence with no repetitions by selecting, without replace- i. There are only Cn;k observable vectors of this latter type.
ment, 10 integers from the range 1 to 365. There are P365,10 In certain physics contexts, probability models with Pn;k
such sequences, and the remaining sequences must all equally likely outcomes accurately describe experiments
correspond to least one repeated birthday among the 10 with distinguishable particles across a range of energy
people. The probability of a repeated birthday is then levels (bins). These systems are said to obey Maxwell
Boltzmann statistics. On the other hand, if the experiment
36510  P365;10 involves indistinguishable particles, the more realistic
Prepeated birthday model use Cn;k outcomes, and the system is said to obey
36510
365364 . . . 365 BoseEinstein statistics.
1 0:117 The discussion above presents only an introduction to
36510
the vast literature of counting methods and their inter-
As we consider larger groups, the probability of a relationships that is known as combinatorics. For our
repeated birthday rises, although many people are sur- purposes, we take these methods as one approach to estab-
prised by how quickly it becomes larger than 0.5. For lishing a probability space over a finite collection of out-
example, if we redo the above calculation with 23 persons, comes.
we obtain 0.5073 for the probability of a repeated birthday.
Multisets differ from sequences in that a multiset is RANDOM VARIABLES AND THEIR DISTRIBUTIONS
not concerned with the order of its elements. In the bin-
choosing experiment above, a generic multiset outcome is A random variable is a function that maps a probability
k1, k2,. . ., kn, where ki counts the number of times bin i was space into the real numbers R. There is a subtle constraint.
chosen to receive a ball. That is, ki is the number of Suppose V; F ; P is a probability space. Then X : V ! R is a
occurrences of i in the generic sequence outcome n1, random variable if X 1 B 2 F for all Borel sets B
R. This
n2,. . ., nk, with a zero entered when a bin does not appear constraint ensures that all events of the form
at all. In the birthday example, there are C365;10 such day- fo 2 Vja < Xo < bg do indeed receive a probability assign-
count vectors, but we would not consider them equally ment. Such events are typically abbreviated (a < X <
likely outcomes. Doing so would imply that the probability b) and are interpreted to mean that the random variable (for
of all 10 birthdays coinciding is the same as the probability the implicit outcome o) lies in the interval (a, b). The laws of
of them dispersing across several days, a conclusion that s-fields then guarantee that related events, those obtained
does not accord with experience. by unions, intersections, and complements from the open
As an example of where the collection of multisets intervals, also receive probability assignments. In other
correctly specifies the equally likely outcomes, consider words, X constitutes a measurable function from V; F to
the ways of writing the positive integer k as a sum of n R.
nonnegative integers. A particular sum k1 k2 . . . kn If the probability space is the real numbers, then the
k is called a partition of k into nonnegative components. We identity function is a random variable. However, for any
can construct such a sum by tossing k ones at n bins. The probability space, we can use a random variable to transfer
first bin accumulates summand k1, which is equal to probability to the Borel sets B via the prescription P0 B
the number of times that bin is hit by an incoming one. Pfo 2 VjXo 2 Bg and thereby obtain a new probability
The second bin plays a similar role for the summand k2 and space R; B; P0 . Frequently, all subsequent analysis takes
so forth. There are C3;4 15 ways to partition 4 into 3 place in the real number setting, and the underlying out-
components: come space plays no further role.
For any x 2 R, the function F X x P0 X  x is called
004 013 022 031 040 the cumulative distribution of random variable X. It is
103 112 121 130 frequently written F(x) when the underlying random vari-
202 211 220 able is clear from context. Distribution functions have the
301 310 following properties:
400
 F(x) is monotone nondecreasing.
We can turn the set of partitions into a probability space  limx ! 1 Fx 0; limx ! 1 Fx 1.
by assigning probability 1/15 to each partition. We would
then speak of a random partition as 1 of these 15 equally
 At each point x, F is continuous from the right and
likely decompositions. possesses a limit from the left. That is, limy ! x Fy 
When the bin-choosing experiment is performed with Fx limy ! x Fy.
distinguishable balls, then it is possible to observe the  The set of discontinuities of F is countable.
outcome n1, n2,. . ., nk, where ni is the bin chosen for ball
i. There are Pn;k such observable vectors. If the balls are Indeed, any function F with these properties is the
not distinguishable, the outcome will not contain enough distribution of some random variable over some probability
6 PROBABILITY AND STATISTICS

space.
Rx If a nonnegative function f exists such that Fx Random variables X1, X2,. . ., Xn are independent if, for
1 f tdt, then f is called the density of the underlying any Borel sets B1, B2,. . ., Bn, the probability that all n
random variable X. Of course, there are actually many random variables lie in their respective sets is the product
densities, if there is one, because f can be changed arbi- of the individual occupancy probabilities. That is,
trarily at isolated points without disturbing the integral.
!
Random variables and their distributions provide the \
n Y
n
opening wedge into a broad spectrum of analytical results P Xi 2 Bi PXi 2 Bi
because at this point the concepts have been quantified. In i1 i1
working with distributions, we are working with real-
valued functions. The first step is to enumerate some dis- This definition is a restatement of the concept of inde-
tributions that prove useful in computer science and pendent events introduced earlier; the events are now
engineering applications. In each case, the underlying expressed in terms of the random variables. Because
probability space is scarcely mentioned. After transfering the Borel sets constitute a s-field, it suffices to check the
probability to the Borel sets within the real numbers, all above condition on Borel sets of the form (X  t). That is,
analysis takes place in a real-number setting. When the X1, X2,. . ., Xn are independent if, for any n-tuple of real
random variable takes on only a countable number of numbers t1, t2,. . .,tn, we have
discrete values, it is traditionally described by giving the !
probability assigned to each of these values. When the \
n Y
n Y
n
P Xi  ti PXi  ti F X ti
random variable assumes a continuum of values, it is i1 i1 i1
described by its density or distribution.
The Bernoulli random variable models experiments The sum of n independent Bernoulli random variables,
with two outcomes. It is an abstraction of the coin-tossing each with parameter p, exhibits a binomial distribution.
experiment, and it carries a parameter that denotes the
probability of heads. Formally, a Bernoulli random vari- PX1, X2,. . ., Xn are Bernoulli with parameter p
That is, if
and Y ni1 Xi , then
able X takes on only two values: 0 or 1. We say that X is a
Bernoulli random variable with parameter p if PX 1  
n
p and (necessarily) PX 0 1  p. PY i pi 1  pni
i
The expected value of a discrete random variable X,
denoted E[X], is
for i 0; 1; 2; . . . ; n. This random variable models, for exam-
ple, the number of heads in n tosses of a coin for which the
X
1
EX tn PX tn probability of a head on any given toss is p. For linear
n1 combinations of independent random variables, expected
values and variances are simple functions of the component
where t1, t2,. . . enumerates the discrete values that X values.
may assume. The expected value represents a weighted
average across the possible outcomes. The variance of a Ea1 X1 a2 X2 . . . a1 EX1  a2 EX2  . . .
discrete random variable is Vara1 X1 a2 X2 . . . a21 VarX1  a22 VarX2  . . .

X
1 For the binomial random variable Y above, therefore, we
VarX tn  EX2 have EY n p and VarY n p1  p.
n1 A Poisson random variable X with parameter l has
PX k el lk =k!. This random variable assumes all
The variance provides a summary measure of the disper-
nonnegative integer values, and it is useful for modeling
sion of the X values about the expected value with low
the number of events occurring in a specified interval when
variance corresponding to a tighter clustering. For a
it is plausible to assume that the count is proportional to the
Bernoulli random variable X with parameter p, we have
interval width in the limit of very small widths. Specifically,
EX p and VarX p1  p.
the following context gives rise to a Poisson random vari-
An indicator random variable is a Bernoulli random
able X with parameter l. Suppose, as time progresses, some
variable that takes on the value 1 precisely when some
random process is generating events. Let Xt;D count the
other random variable falls in a prescribed set. For exam-
number of events that occur during the time interval
ple, suppose we have a random variable X that measures
t; t D. Now, suppose further that the generating process
the service time (seconds) of a customer with a bank teller.
obeys three assumptions. The first is a homogeneity con-
We might be particularly interested in lengthy service
straint:
times, say those that exceed 120 seconds. The indicator
  PXt1 ; D k PXt2 ; D k for all integers k0
1; X > 120
I120;1
0; X  120 That is, the probabilities associated with an interval
of width do not depend on the location of the interval.
is a Bernoulli random variable with parameter p This constraint allows a notational simplification, and
PX > 120. we can now speak of XD because the various random
PROBABILITY AND STATISTICS 7

variables associated with different anchor positions t all Moving on to random variables that assume a conti-
have the same distribution. The remaining assumptions nuum of values, we describe each by giving its density
are as follows: function. The summation formulas for the expected value
and variance become integrals involving this density. That
 PXD 1 lD o1 D is, if random variable X has density f, then
 PXD > 1 o2 D
Z1
where the oi(D) denote anonymous functions with the prop- EX t f tdt
erty that oi D=D ! 0 as D ! 0. Then the assignment PX 1
k limD ! 0 PXD k produces a Poisson random variable. Z1
This model accurately describes such diverse phenom- VarX t  EX2 f tdt
ena as particles emitted in radioactive decay, customer 1
arrivals at an input queue, flaws in magnetic recording
media, airline accidents, and spectator coughing during a In truth, precise work in mathematical probability uses
concert. The expected value and variance are both l. If we a generalization of the familiar Riemann integral known
consider a sequence of binomial random variables Bn,p, as a measure-theoretic integral. The separate formulas,
where the parameters n and p are constrained such that summation for discrete random variables and Riemann
n ! 1 and p ! 0 in a manner that allows n p ! l > 0, then integration against a density for continuous random vari-
the distributions approach that of a Poisson random vari- ables, are then subsumed under a common notation. This
able Y with parameter l. That is, PBn; p k ! PY k more general integral also enables computations in cases
el lk =k!. where a density does not exist. When the measure in
A geometric random variable X with parameter p exhi- question corresponds to the traditional notion of length
bits PX k p1  pk for k 0; 1; 2; . . .. It models, for on the real line, the measure-theoretic integral is known
example, the number of tails before the first head in as the Lebesgue integral. In other cases, it corresponds to
repeated tosses of a coin for which the probability of heads a notion of length accorded by the probability distri-
is p. We have EX 1  p= p and VarX 1  p= p2 . bution: P(a < X < t) for real a and b. In most instances of
Suppose, for example, that we have a hash table in which j interest in engineering and computer science, the form
of the N addresses are unoccupied. If we generate random involving ordinary integration against a density suffices.
address probes in search of an unoccupied slot, the prob- The uniform random variable U on [0, 1] is described
ability of success is j/N for each probe. The number of by the constant density f t 1 for 0  t  1. The prob-
failures prior to the first success then follows a geometric ability that U falls in a subinterval (a, b) within [0, 1] is
distribution with parameter j/N. simply b  a, the length of that subinterval. We have
The sum of n independent geometric random variables
displays a negative binomial distribution. That is, if X1, Z 1 1
X2,. . ., Xn are all geometric with parameter p, then Y EU tdt
0 2
X1 X2 . . . Xn is negative binomial with parameters (n,
p). We have Z1  
1 2 1
VarU t dt
2 12
PY k Cnk1;k pn 1  pk 0

n1  p The uniform distribution is the continuous analog of the


EY
p equally likely outcomes discussed in the combinatorics
n1  p section above. It assumes that any outcome in the interval
VarY [0, 1] is equally likely to the extent possible under the
p2
constraint that probability must now be assigned to Borel
where Cnk1;k is the number of distinct multisets avail- sets. In this case, all individual outcomes receive zero
able when choosing k from a field of n with replacement. probability, but intervals receive probability in proportion
This random variable models, for example, the number of to their lengths. This random variable models situations
tails before the nth head in repeated coin tosses, the num- such as the final resting position of a spinning pointer,
ber of successful fights prior to the nth accident in an airline where no particular location has any apparent advantage.
history, or the number of defective parts chosen (with The most famous continuous random variable is the
replacement) from a bin prior to the nth functional one. Gaussian or normal random variable Zm;s . It is character-
For the hash table example above, if we are trying to fill n ized by two parameters, m and s, and has density, expected
unoccupied slots, the number of unsuccessful probes in the value, and variance as follows:
process will follow a negative binomial distribution with
parameters n, j/N. In this example, we assume that n is 1 2 2
f zm; s t p etm =2s
significantly smaller than N, so that insertions do not s 2p
materially change the probability j/N of success for each
EZm;s  m
address probe.
VarZm;s  s2
8 PROBABILITY AND STATISTICS

The well-known Central Limit Theorem states that the space V; F ; P and a random variable X, for which
average of a large number of independent observations
Z 1
behaves like a Gaussian random variable. Specifically, if
Pfo 2 V : Xo > tg lelx dx elt
X1, X2,. . . are independent random variables with identical t
finite-variance distributions, say EXi  a and
VarXi  c2 , then for any t, for t  0. Let t1 be a fixed positive real number, and consider
a related probability space V; ^ F^; P,
^ obtained as follows:
!
1 X n
lim P p Xi  a  t PZ0;1  t ^ fo 2 V : Xo > t1 g
n!1 nc2 i1 V
^ : A 2 Fg
F^ fA \ V
For example, if we toss a fair coin 100 times, what is the ^
PB ^ for all
PB=PV; B 2 F^
probability that we will see 40 or fewer heads? To use the
Central Limit Theorem, we let Xi 1 if heads occurs on the By restricting its domain, we can consider X to be a ran-
ith toss and zero otherwise. With this definition, we have ^ For any o 2 V,
dom variable on V. ^ we have Xo > t1 , but we
EXi  0:5 and VarXi  0:25, which yields can legitimately ask the probability, using the new mea-
! ! ^ that X(o) exceeds t1 by more than t.
sure P,
X
100
1 X
100
40  1000:5
P Xi  40 P p Xi  0:5  p
i1 1000:25 i1 1000:25
^ > t1 t PX > t1 t2 elt1 t
PX lt
PZ0;1  2 0:0288
PX > t1 e 1
elt PX > t
The last equality was obtained from a tabulation of such
values for the standard normal random variable with The probability PB^ is known as the conditional prob-
expected value 0 and variance 1. ability of B, given V.^ From the calculation above, we see
Because it represents a common limiting distribution for that the conditional probability that X exceeds t1 by t or
an average of independent observations, the Gaussian more, given that X > t1 is equal to the unconditional prob-
random variable is heavily used to calculate confidence ability that X > t. This is the memoryless property. If X is an
intervals that describe the chance of correctly estimating exponential random variable representing the time
a parameter from multiple trials. We will return to this between query arrivals to a database input queue, then
matter in a subsequent section. R the probability that 6 microseconds or more elapses before
1
The Gamma function is Gt 0 xt1 ex dx, defined for the next arrival is the same as the probability that an
t < 0. The Gamma random variable X with parameters (g, l) additional 6 microseconds or more elapses before the
(both positive) is described by the density next arrival, given that we have already waited in vain
 for 10 microseconds.
lg xg1 elx =Gg; for x  0 In general, we can renormalize our probability assign-
f x
0; for x < 0 ments by restricting the outcome space to some particular
event, such as the V ^ in the example. The more general
It has EX g=l and VarX g=l2 . For certain specific notation is P(B|A) for the conditional probability of B given
values of g, the random variable is known by other names. A. Also, we normally allow B to be any event in the original
If g 1, the density reduces to f x lelx for x  0, and F with the understanding that only that part of B that
X is then called an exponential random variable. The intersects A carries nonzero probability under the new
exponential random variable models the interarrival measure. The definition requires that the conditioning
times associated with events such as radioactive decay event A have nonzero probability. In that case,
and customer queues, which were discussed in connnection
with Poisson random variables above. Specifically, if a PB \ A
PBjA
Poisson random variable with parameter lT models the PA
number of events in interval T, then an exponential random
variable with parameter l models their interarrival times. specifies the revised probabilities for all events B. Note that
Consequently, the exponential random variable features
prominently in queueing theory. PA \ B PA \ B
PBjA
Exponential random variables possess a remarkable PA PA \ B PA \ B
feature; they are memoryless. To understand this concept,
we must first define the notion of conditional probability. PAjBPB

We will use the exponential random variable as an exam- PAjBPB PAjBPB
ple, although the discussion applies equally well to random
variables in general. Notationally, we have a probability This formula, a simple form of Bayes Law, relates the
conditional probability of B given A to that of A given B.
It finds frequent use in updating probability assignments to
reflect new information. Specifically, suppose we know P(B)
and therefore PB 1  PB. Such probabilities are
PROBABILITY AND STATISTICS 9

called prior probabilities because they reflect the chances of If g n=2 for a positive integer n and l 1=2, then the
a B occurrence in the absence of further knowledge about corresponding Gamma random variable is called a chi-
the underlying random process. If the actual outcome square random variable. It exhibits the P distribution of
remains unknown to us, but we are told that event A has the sum of n independent squares, Y ni1 Z2i , where
occurred, we may want to update our probability assign- each Zi is a Gaussian random variable with m; s2
ment to reflect more accurately the chances that B has 0; 1. These distributions are useful in computing confi-
also occurred. That is, we are interested in the posterior dence intervals for statistical estimates.
probability P(B|A). Bayes Law allows us to compute this Gamma distributions are the limiting forms of negative
new value, provided we also have the reverse conditional binomial random variables in the same manner that the
probabilities. Poisson distribution is the limit of binomials. That is,
For example, suppose a medical test for a specific disease suppose we have a sequence Cn of negative binomial ran-
is applied to a large population of persons known to have dom variables. The parameters of Cn are (m, pn). As n ! 1,
the disease. In 99% of the cases, the disease is detected. This we assume that pn ! 0 in a manner that allows
is a conditional probability. If we let S be the event person n pn ! l > 0. Then the limiting distribution of Cn/n is the
is sick and be the event medical test was positive, Gamma (Erlang) distribution with parameters (m, g). In
we have PjS 0:99 as an empirical estimate. Applying particular, if m 1, the Cn are geometric and the limit is
the test to a population of persons known not to have the exponential.
disease might reveal PjS 0:01 as a false alarm rate. Figure 1 summarizes the relationships among the ran-
Suppose further that the fraction PS 0:001 of the dom variables discussed in this section.
general population is sick with the disease. Now, if you The renewal count arrow from exponential to Poisson
take the test with positive results, what is the chance that refers to the fact that a phenomenon in which the event
you have the disease? That is, what is PSj? Applying interarrival time is exponential (l) will accumulate
Bayes Law, we have events in an interval T according to a Poisson distribution
with parameter lT . That is, if the sequence X1, X2,. . . of
PjSPS random variables measures time between successive
PSj
PjSPS PjSPS events, then the random variable
( )
0:990:001 X
k
0:0909 NT max kj Xi  T
0:990:001 0:010:99
i1
You have only a 9% chance of being sick, despite having
scored positive on a test with an apparent 1% error rate. is called a renewal count for the sequence. If the Xi are
Nevertheless, your chance of being sick has risen from a independent exponentials with parameter l, then NT has
prior value of 0.001 to a posterior value of 0.0909. This is a Poisson distribution with parameter lT.
nearly a hundredfold increase, which is commensurate A similar relationship holds between a sequence G1 1,
with the error rate of the test. G2 1,. . . of geometric random variables with a common
The full form of Bayes Law uses an arbitrary partition of parameter p. The difference is that the observation interval
the outcome space, rather than a simple two-event decom- T is now a positive integer. The renewal count NT then
position, such as sick and not sick. Suppose the event exhibits a binomial distribution with parameters (T, p).
collection fAi : 1  i  ng is a partition of the outcome space
V. That is, the Ai are disjoint, each has nonzero probability, CONVERGENCE MODES
and their union comprises all of V. We are interested in
which Ai has occurred, given knowledge of another event B. For a sequence of real numbers, there is a single mode
If we know the reverse conditional probabilities, that is if of convergence: A tail of the sequence must enter and
we know the probability of B given each Ai, then Bayes Law remain within any given neighborhood of the limit. This
enables the computation property either holds for some (possibly infinite) limiting
value or it does not. Sequences of random variables
PBjAi PAi exhibit more variety in this respect. There are three
PAi jB :
X
n modes of convergence.
PBjA j PA j A sequence X1, X2,. . . of random variables converges
j1
pointwise to a random variable Y if Xn o ! Yo as a
sequence of real numbers for every point o in the under-
Returning to the Gamma random variable with para-
lying probability space. We may also have pointwise
meters (g, l), we can distinguish additional special cases. If
convergence on sets smaller than the full probability space.
g n, a positive integer, then the corresponding distri-
If pointwise convergence occurs on a set of probability one,
bution is called an Erlang distribution. It models the time
then we say that the sequence converges almost surely. In
necessary to accumulate n events in a process that follows a
this case, we use the notation Xn ! Ya.s.
Poisson distribution for the number of events in a specified
The sequence converges in probability if, for every posi-
interval. An Erlang distribution, for example, describes
tive e, the measure of the misbehaving sets approaches
the time span covering the next n calls arriving at a tele-
phone exchange.
10 PROBABILITY AND STATISTICS

zero. That is, as n ! 1, than twice 1/l. The sequence is then excluded from the
misbehaving set at n 100 but enters that set before
Pfo : jXn o  Yoj > g ! 0 n 1100. Subsequent patterns of good and bad behavior
can migrate the sequence into and out of the exceptional
If Xn ! Y a.s, then it also converges in probability. How- set. With this additional insight, we can interpret more
ever, it is possible for a sequence to converge in probability precisely the meaning of the weak law.
and at the same time have no pointwise limits. PnSuppose 1=l 0:4. We can choose  0:04 and let Yn
The final convergence mode concerns distribution func- i1 Ti =n. The weak law asserts that PjYn  0:4j >
tions. The sequence converges in distribution if the corre- 0:04 ! 0, which is the same as P0:36  Yn  0:44 ! 1.
sponding cumulative distribution functions of the Xn Although the law does not inform us about the actual size
converge pointwise to the distribution function of Y at all of n required, it does say that eventually this latter
points where the cumulative distribution function of Y is probability exceeds 0.99. Intuitively, this means that if
continuous. we choose a large n, there is a scant 1% chance that our
The Weak Law of Large Numbers states that the average average will fail to fall close to 0.4. Moreover, as we choose
of a large number of independent, identically distributed larger and larger values for n, that chance decreases.
random variables tends in probability to a constant, the The Strong Law of Large Numbers states that the
expected value of the common distribution. That is, if X1, average converges pointwise to the common expected
X2,. . . is an independent sequence with a common distri- value, except perhaps on a set of probability zero. speci-
bution such that EXn  m and VarXn  s2 < 1, then for fically, if X1, X2,. . . is is an independent sequence with
every positive , a common distribution such that EXn  m (possibly infi-
nite), then
 P n  
 X 
P o :  i1 i  m >  !0 X
n
n
Xi
i1
as n ! 1. !m a:s:
n
Suppose, for example, that a random variable T mea-
sures the time between query requests arriving at a data- as n ! 1.
base server. This random variable is likely to exhibit an Applied in the above example, the strong law asserts
exponential distribution, as described in the previous sec- that essentially all outcome sequences exhibit averages
tion, with some rate parameter l. The expected value and that draw closer and closer to the expected value as n
variance are 1/l and 1/l2, respectively. We take n observa- increases. The issue of a given sequence forever drifting
tions of T and label them PT1, T2,. . . , Tn. The weak law into and out of the misbehaving set is placed in a pleasant
suggests that the number ni1 Ti =n will be close to 1/l. The perspective. Such sequences must belong to the set with
precise meaning is more subtle. As an exponential random probability measure zero. This reassurance does not mean
variable can assume any nonnegative value, we can ima- that the exceptional set is empty, because individual out-
gine a sequence of observations that are all larger than, say, comes (t1, t2,. . .) have zero probability. It does mean that
twice the expected value. In that case, the average would we can expect, with virtual certainty, that our average of
also be much larger than 1/l. It is then clear that not all n observations of the arrival time will draw ever closer
sequences of observations will produce averages close to to the expected 1/l.
1/l. The weak law states that the set of sequences that Although the above convergence results can be obtained
misbehave in this fashion is not large, when measured in with set-theoretic arguments, further progress is greatly
terms of probability. facilitated with the concept of characteristic functions,
We envision an infinite sequence of independent data- which are essentially Fourier transforms in a probability
base servers, each with its separate network of clients. Our space setting. For a random variable X, the characteristic
probability space now consists of outcomes of the form function of X is the complex-valued functionbX u EeiuX .
o t1 ; t2 ; . . ., which occurs when server 1 waits t1 seconds The exceptional utility of this device follows because
for its next arrival, server 2 waits t2 seconds, and so forth. there is a one-to-one relationship between characteristic
Any event of the form t1  x1 ; t2  x2 ; . . . ; t p  x p has functions and their generating random variables (distri-
probability equal to the product of the factors Pt1  xi , butions). For example, X is Gaussian with parameters
which are in turn determined by the common exponential 2
m 0 and s2 1 if and only if bX u eu =2 . X is Poisson
distribution of the Ti. By taking unions, complements, and with parameter l if and only if bX u expl1  eiu .
intersections of events of this type, we arrive at a s-field If X has a density f(t),
R 1the computation of bX is a common
that supports
P the probability measure. The random vari- integration: bX u 1 eiut f tdt. Conversely, if bX is
ables ni1 Ti =n are well defined on this new probability absolutely integrable, then X has a density, which R 1 can be
space, and the weak law asserts that, for large n, the set of recovered by an inversion formula. That is, if 1 jbuj
sequences (t1, t2,. . .) with misbehaving prefixes (t1, t2,. . . , tn) du < 1, then the density of X is
has small probability.
A given sequence can drift into and out of the misbehav- Z 1
1
ing set as n increases. Suppose the average of the first 100 fX t eiut budu
2p 1
entries is close to 1/l, but the next 1000 entries are all larger
PROBABILITY AND STATISTICS 11

These remarks have parallel versions if X is integer-


P about 40% ones. Notice that we can readily achieve this
valued. The calculation of bX is a sum: bX u 1 n1 result if we have a method for generating samples from a
eiun PX n. Also, if bX is periodic with period 2p, then uniform distribution U on [0, 1]. In particular, each time we
the corresponding X is integer-valued and the point prob- need a new sample of X, we generate an observation U and
abilities are recovered with a similar inversion formula: report X 1 if U  0:4 and X 0 otherwise.
This argument generalizes in various ways, but the
Z p
1 gist of the extension is that essentially any random variable
PX n eiun budu
2p p can be sampled by first sampling a uniform random
variable and then resorting to some calculations on the
In more general cases, the bX computation requires observed value. Although this reduction simplifies the
the measure-theoretic integral referenced earlier, and problem, the necessity remains of simulating observations
the recovery of the distribution of X requires more complex from a uniform distribution on [0, 1]. Here we encounter
operations on bX . Nevertheless, it is theoretically possible two dificulties. First, the computer operates with a finite
to translate in both directions between distributions and register length, say 32 bits, which means that the values
their characteristic functions. returned are patterns from the 232 possible arrangements
Some useful properties of characteristic functions are as of 32 bits. Second, a computer is a deterministic device.
follows: To circumvent the first problem, we put a binary point at
the left end of each such pattern, obtaining 232 evenly
 (Linear combinations) If Y aX b, then bY u spaced numbers in the range [0, 1). The most uniform
eiub bX au. probability assignment allots probability 1/232 to each
 (Independent sums) If Y X1 X2 Q . . . Xn , where such point. Let U be the random variable that operates
the Xi are independent, then bY u ni1 bXi u. on this probability space as the identity function. If we
calculate P(a < U < b) for subintervals (a, b) that are
 (Continuity Theorem) A sequence of random variables
appreciably wider than 1/232, we discover that these prob-
X1, X2,. . . converges in distribution to a random vari-
abilities are nearly b  a, which is the value required for a
able X if and only if the corresponding characteristic
true uniform random variable. The second dificulty is over-
functions converge pointwise to a function that is
come by arranging that the values returned on successive
continuous at zero; in which case, the limiting function
calls exhaust, or very nearly exhaust, the full range of
is the characteristic function of X.
patterns before repeating. In this manner, any determinis-
 (Moment Theorem) If EjXjn  < 1, then bX has deri- tic behavior is not observable under normal use. Some
n
vatives through order n and EX n  in bX 0, modern supercomputer computations may involve more
n th
where bX u is the n derivative of bX . than 232 random samples, an escalation that has forced
the use of 64-bit registers to maintain the appearance of
These features allow us to study convergence in distribu- nondeterminism.
tion of random variables by investigating the more tract- After accepting an approximation based on 232 (or more)
able pointwise convergence of their characteristic closely spaced numbers in [0, 1), we still face the problem of
functions. In the case of independent, identically distrib- simulating a discrete probability distribution on this finite
uted random variables with finite variance, this method set. This problem remains an area of active research today.
leads quickly to the Central Limit Theorem cited earlier. One popular approach is the linear congruential method.
For a nonnegative random variable X, the moment gen- We start with a seed sample x0, which is typically obtained
erating function fX u is less difficult to manipulate. Here in some nonreproducible manner, such as extracting a
fX u EeuX . For a random variable X that assumes 32-bit string from the computer real-time clock. Subse-
only nonnegative integer values, the probability generating quent samples are obtained with the recurrence xn1
function rX u is another
P appropriate transform. It is axn b mod c, where the parameters a, b, c are chosen
defined by rX u 1 n
n0 PX nu . Both moment and to optimize the criteria of a long period before repetition and
probability generating functions admit versions of the a fast computer implementation. For example, c is fre-
moment theorem and the continuity theorem and are there- quently chosen to be 232 because the (axn b) mod 232
fore useful for studying convergence in the special cases operation involves retaining only the least significant 32
where they apply. bits of (axn b). Knuth (1) discusses the mathematics
involved in choosing these parameters.
COMPUTER SIMULATIONS On many systems, the resulting generator is called
rand(). A program assignment statement, such as x
In various programming contexts, particularly with simu- rand, places a new sample in the variable x. From this
lations, the need arises to generate samples from some point, we manipulate the returned value to simulate
particular distribution. For example, if we know that samples from other distributions. As noted, if we wish to
PX 1 0:4 and PX 0 0:6, we may want to realize sample B, a Bernoulli random variable with parameter p,
this random variable as a sequence of numbers x1 ; x2 ; . . .. we continue by setting B 1 if x  p and B 0 otherwise.
This sequence should exhibit the same variability as If we need an random variable Ua,b, uniform on the interval
would the original X if outcomes were directly observed. [a, b], we calculate Ua;b a b  ax.
That is, we expect a thorough mixing of ones and zeros, with If the desired distribution has a continuous cumulative
distribution function, a general technique, called distri-
12 PROBABILITY AND STATISTICS

bution inversion, provides a simple computation of sam- Another method for dealing with irregular discrete
ples. Suppose X is a random variable for which the cumu- distributions is the rejection filter. If we have an algorithm
lative distribution Ft PX  t is continuous and to simulate distribution X, we can, under certain con-
strictly increasing. The inverse F 1 u then exists for 0 ditions, systematically withhold some of the returns to
< u < 1, and it can be shown that the derived random simulate a related distribution Y. Suppose X assumes
variable Y FX has a uniform distribution on (0, 1). nonnegative integer values with probabilities p0 ; p1 ; . . .,
It follows that the distribution of F 1 U is the same as Y assumes the same values but with different probabilities
that of X, where U is the uniform random variable approxi- q0 ; q1 ; . . .. The required condition is that a positive K exists
mated by rand(). To obtain samples from X, we sample U such that qn  K pn for all n. The following pseudocode
instead and return the values F 1 U. shows how to reject just the right number of X returns so
For example, the exponential random variable X with as to correctly adjust the return distribution to that of Y .
parameter l has the cumulative distribution function Here the routine X() refers to the existing algorithm that
Ft 1  elt , for t  0, which satisfies the required con- returns nonnegative integers according to the X distri-
ditions. The inverse is F 1 u log1  u=l. If U is bution. We also require that the pn be nonzero.
uniformly distributed, so is 1  U. Therefore, the samples
while (true) {
obtained from successive logrand=l values exhibit
n X();
the desired exponential distribution.
x rand();
A variation is necessary to accommodate discrete ran-
if (x < qn/(K * pn))
dom variables, such as those that assume integer values.
return n;}
Suppose we have a random variable X that assumes non-
negative integer values n with probabilities pn. Because
the cumulative distribution now exhibits a discrete jump STATISTICAL INFERENCE
at each integer, it no longer possesses an inverse. Never-
theless, we can salvage the idea by acquiring a rand() Suppose we have several random variables X,Y,. . . of
sample, say x, and then summing the pn until the accumu- interest. For example, X might be the systolic blood pres-
lation
Pn exceeds x. We return the largest n such that sure of a person who has taken a certain drug, whereas Y
i0 pi  x. A moments reflection will show that this is is the blood pressure of an individual who has not taken
precisely the method we used to obtain samples from a it. In this case, X and Y are defined on different probability
Bernoulli random variable above. spaces. Each probability space is a collection of persons
For certain cases, we can solve for the required n. For who either have or have not used the drug in question. X
example, suppose X is a geometric random variable with and Y then have distributions in a certain range, say
parameter p. In this case, pn p1  pn . Therefore if x is [50, 250], but it is not feasible to measure X or Y at each
the value obtained from rand(), we find outcome (person) to determine the detailed distributions.
Consequently, we resort to samples. That is, we observe X
( )

X
n
logx for various outcomes by measuring blood pressure for a
max n : pk  x subset of the X population. We call the observations
k0
log1  p
X1 ; X2 ; . . . ; Xn . We follow a similar procedure for Y if we
are interested in comparing the two distributions. Here,
For more irregular cases, we may need to perform the we concentrate on samples from a single distribution.
summation. Suppose we want to sample a Poisson random A sample from a random variable X is actually another
variable X with parameter l. In this case, we have random variable. Of course, after taking the sample, we
pn el ln =n!, and the following pseudocode illustrates observe that it is a specific number, which hardly seems to
the technique. We exploit the fact that p0 el and merit the status of a random variable. However, we can
pn1 pn l=n 1. envision that our choice is just one of many parallel obser-
vations that deliver a range of results. We can then speak of
x rand(); events such as PX1  t as they relate to the disparate
p exp(l); values obtained across the many parallel experiments as
cum p; they make their first observations. We refer to the distri-
n 0; bution of X as the population distribution and to that of Xn
while (x > cum){ as the nth sample distribution. Of course, PXn  t
n n 1; PX  t for all n and t, but the term sample typically
p p * l/(n 1); carries the implicit understanding that the various Xn
cum cum p;} are independent. That is, PXn  t1 ; . . . ; Xn  tn
Q n
return n; i1 PXi  ti . In this case, we say that the sample is a
random sample.
Various enhancements are available to reduce the num- With a random sample, the Xn are independent, identi-
ber of iterations necessary to locate the desired n to return. cally distributed random variables. Indeed, each has the
In the above example, we could start the search near same distribution as the underlying population X. In prac-
n b l c , because values near this expected value are tice, this property is assured by taking precautions to avoid
most frequently returned. any selection bias during the sampling. In the blood pres-
sure application, for example, we attempt to choose persons
PROBABILITY AND STATISTICS 13

p
in a manner that gives every individual the same chance of distribution for nX  m=s as the standard Gaussian
being observed. Z0,1. Let us assume (unrealistically) for the moment that
Armed with a random sample, we now attempt to infer we know s2. Then, we can announce X as our estimate of
features of the unknown distribution for the population m, and we can provide some credibility for this estimate
X. Ideally, we want the cumulative distribution of FX(t), in the form of a confidence interval. Suppose we want a
which announces the fraction of the population with blood 90% confidence interval. From tables for the standard
pressures less than or equal to t. Less complete, but still Gaussian, we discover that PjZ0;1 j  1:645 0:9. For
valuable, information lies with certain summary features, large n, we have
such as the expected value and variance of X.
p  
A statistic is simply a function of a sample. Given the  nX  m
sample X1 ; X2 ; . . . ; Xn ;, the new random variables 0:9 PjZ0;1 j  1:645 P    1:645

s
 
1:645s
1X n P jX  mj  p
X X n
n k1 k
p
1 X n If we let d 1:645s= n, we can assert that, for large n,
2
S X  X2 there is a 90% chance that the estimate X will lie within
n  1 k1 k
d of the population parameter m. We can further mani-
pulate the equation above to obtain PX  d  m 
are statistics known as the sample mean and sample vari- X d 0:9. The specific interval obtained by substi-
ance respectively. If the population has EX m and tuting the observed value of X into the generic form
VarX s2 , then EX m and ES2  s2 . The expected X  d; X d is known as the (90%) confidence interval.
value and variance are called parameters of the population, It must be properly interpreted. The parameter m is an
and a central problem in statistical inference is to estimate unknown constant, not a random variable. Consequently,
such unknown parameters through calculations on sam- either m lies in the specified confidence interval or it does
ples. At any point we can declare a particular statistic to be not. The random variable is the interval itself, which
an estimator of some parameter. Typically we only do so changes endpoints when new values of X are observed.
when the value realized through samples is indeed an The width of the interval remains constant at d. The
accurate estimate. proper interpretation is that 90% of these nondeter-
Suppose y is some parameter of a population distribu- ministic intervals will bracket the parameter m.
tion X. We say that a statistic Y is an unbiased estimator Under more realistic conditions, neither the mean m nor
of y if EY y. We then have that the sample mean and the variance s2 of the population is known. In this case, we
sample variance are unbiased estimators of the population can make further progress if we assume that the indi-
mean and variance. The quantity vidual Xi samples are normal random variables. Various
devices, such as composing each Xi as a sum of a subset of
2 1X n
the samples, render this assumption more viable. In any
S^ X  X2
n k1 k case, under this constraint, we can show that nX  m2 = s2
and n  1S 2 =s2 are independent random variables with
is also called the sample variance, but it is a biased esti- known distributions. These random variables have chi-
mator of the population variance s2 . If context is not clear, squared distributions.
we need to refer to the biased or unbiased sample variance. A chi-squared random variable with m degrees of free-
2 dom is the sum of the squares of m independent standard
In particular ES^  s2 1  1=n, which introduces a bias normal random variables. It is actually a special case of the
of b s2 =n. Evidently, the bias decays to zero with in- gamma distributions discussed previously; it occurs when
creasing sample size n. A sequence of biased estimators the parameters are g m and l 1=2. If Y1 is chi-squared
with this property is termed asymptotically unbiased. with m1 degrees of freedom and Y2 is chi-squared with m2
A statistic can be a vector-valued quantity. Consequently, degrees of freedom, then the ratio m2Y1/(m1Y2) has an F
the entire sample (X1, X2,. . ., Xn) is a statistic. For any distribution with (n,m) degree of freedom. A symmetric
given t, we can compute the fraction of the sample values random variable is said to follow a t distribution with m2
that is less than or equal to t. For a given set of t values, degrees of freedom if its square has an F distribution with
these computation produce a sample distribution function: (1,m2) degrees of freedom. For a given random variable R
and a given value p in the range (0, 1), the point rp for which
#fk : Xk  tg PR  r p p is called the pth percentile of the random
F n t
n variable. Percentiles for F and t distributions are available
Here we use #{. . .} to denote the size of a set. For each t, in tables.
the GlivenkoCantelli Theorem states that the Fn(t) con- Returning to our sample X1, X2,. . ., Xn, we find that
stitute an asymptotically unbiased sequence of estimators under the normal inference constraint, the two statistics
for Ft PX  t. mentioned above have independent chi-squared distribu-
Suppose X1, X2,. . ., Xn is a random sample of the popu- tions with 1 and n1 p degrees
ofpfreedom,
2 respectively.
lation random variable X, which has EX m and VarX Therefore the quantity njX  mj= S has a t distribution
s2 < 1. The Central Limit Theorem gives the limiting with n1 degrees of freedom. Given a confidence level, say
14 PROBABILITY AND STATISTICS

90%, we consult a table of percentiles for the t distribution I. Hacking, The Taming of Chance. Cambridge, MA: Cambridge
with n1 degrees of freedom. We obtain a symmetric University Press, 1990.
interval [r, r] such that J. L. Johnson, Probability and Statistics for Computer Science.
New York: Wiley, 2003.
p ! p2 ! O. Ore, Cardano, the Gambling Scholar. Princeton, NJ: Princeton
njX  mj r S
0:9 P p2  r P jX  mj  p University Press, 1953.
S n
O. Ore, Pascal and the invention of probability theory, Amer. Math.
p2 p Monthly, 67: 409419, 1960.
Letting d r S = n, we obtain the 90% confidence inter- C. A. Pickover, Computers and the Imagination. St. Martins Press,
val X  d; X d for our estimate X of the population 1991.
parameter m. The interpretation of this interval remains S. M. Ross, Probability Models for Computer Science. New York:
as discussed above. Academic Press, 2002.
This discussion above is an exceedingly abbreviated H. Royden, Real Analysis, 3rd ed. Englewood Cliffs, NJ: Prentice-
introduction to a vast literature on statistical inference. Hall, 1988.
The references below provide a starting point for further
study.
BIBLIOGRAPHY

FURTHER READING 1. D. E. Knuth, The Art of Computer Programming, Vol. 2


3rd ed. Reading, MA: Addison-Welsey, 1998.
B. Fristedt and L. Gray, A Modern Approach to Probability
Theory. Cambridge, MA: Birkhuser, 1997.
A. Gut, Probability: A Graduate Course. New York: Springer, 2006. JAMES JOHNSON
I. Hacking, The Emergence of Probability. Cambridge, MA: Western Washington University
Cambridge University Press, 1975. Bellingham, Washington
P
PROOFS OF CORRECTNESS IN MATHEMATICS This can be proved by showing it for n 0; and then
AND INDUSTRY Pthat if P(n) holds, then also pn 1. Indeed P(0)
showing
holds: 0k0 k2 0. If P(n) holds, then
THE QUALITY PROBLEM
!
X
n 1 X
n
Buying a product from a craftsman requires some care. k2
k2 n 12
For example, in the Stone Age, an arrow, used for hunting k0 k0
and hence for survival, needed to be inspected for its 1
nn 12n 1 n 12
sharpness and proper fixation of the stone head to the 6
wood. Complex products of more modern times cannot be 1
checked in such a simple way and the idea of warranty n 1n 22n 3;
6
was born: A nonsatisfactory product will be repaired or
replaced, or else you get your money back. This puts the hence Pn 1. Therefore P(n) holds for all natural num-
responsibility for quality on the shoulders of the manufac- bers n.
turer, who has to test the product before selling. In con- Another method to prove statements valid for an
temporary IT products, however, testing for proper infinite number of instances is to use symbolic rewriting:
functioning in general becomes impossible. If we have an From the usual properties of addition and multiplication
array of 1717 switches in a device, the number of possible over the natural numbers (proved by induction), one can
2
positions is 217 2289  1087 , more than the estimated derive equationally that x 1x  1 x2  1, for all
number of elementary particles in the universe. Modern instances of x.
chips have billions of switches on them, hence, a state space Proofs have been for more than two millennia the
of a size that is truly dwarfing astronomical numbers. essence of mathematics. For more than two decades, proofs
Therefore, in most cases, simple-minded testing is out of have become essential for warranting quality of complex IT
the question because the required time would surpass by products. Moreover, by the end of the twentieth century,
far the lifetime expectancy of the universe. As these chips proofs in mathematics have become highly complex. Three
are used in strategic applications, like airplanes, medical results deserve mention: the Four Color Theorem, the
equipment, and banking systems, there is a problem with Classification of the Finite Simple Groups, and the correct-
how to warrant correct functioning. ness of the Kepler Conjecture (about optimal packing of
Therefore, the need for special attention to the quality of equal three-dimensional spheres). Part of the complexity
complex products is obvious, both from a users point of view of these proofs is that they rely on large computations by a
and that of a producer. This concern is not just academic. In computer (involving up to a billion cases). A new technology
1994 the computational number theorist T. R. Nicely dis- for showing correctness has emerged: automated verifica-
covered by chance a bug1 in a widely distributed Pentium tion of large proofs.
chip. After an initial denial, the manufacturer eventually Two methodological problems arise (1). How do proofs
had to publicly announce a recall, replacement, and in mathematics relate to the physical world of processors
destruction of the flawed chip with a budgeted cost of US and other products? (2) How can we be sure that complex
$475 million. proofs are correct? The first question will be addressed in
Fortunately, mathematics has found a way to handle the next section, and the second in the following section.
within a finite amount of time a supra-astronomical num- Finally, the technology is predicted to have a major impact
ber of cases, in fact, an infinity of them. The notion of proof on the way mathematics will be done in the future.
provides a way to handle all possible cases with certainty.
The notion of mathematical induction is one proof method
SPECIFICATION, DESIGN, AND PROOFS OF CORRECTNESS
that can deal with an infinity of cases: If a property P is
valid for the first natural number 0 (or if you prefer 1) and if
The Rationality Square
validity of P for n implies that for n 1, then P is valid for all
natural numbers. For example, for all n one has The ideas in this section come from Ref. 2 and make explicit
what is known intuitively by designers of systems that use
Xn
1 proofs. The first thing to realize is that if we want quality of
k2 nn 12n 1: Pn a product, then we need to specify what we want as its
k0
6
behavior. Both the product and its (desired) behavior are in
reality, whereas the specification is written in some pre-
cise language. Then we make a design with the intention to
realize it as the intended product. Also the design is a
1
It took Dr. Nicely several months to realize that the inconsistency formal (mathematical) object. If one can prove that the
he noted in some of his output was not due to his algorithms, but designed object satisfies the formal specification, then it
caused by the (microcode on the) chip. See Ref. 1 for a description of is expected that the realization has the desired behavior
the mathematics behind the error.
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 PROOFS OF CORRECTNESS IN MATHEMATICS AND INDUSTRY

proof
Design Specification

realization requirement

Product Behavior
warranty

Figure 1. Wuppers rationality square.

(see Fig. 1). For this it is necessary that the informal


(desired) behavior and the specification are close to each
other and can be inspected in a clearly understandable
way. The same holds for the design and realization. Then
the role of proofs is in its place: They do not apply to an
object and desired behavior in reality but to a mathematical
descriptions of these. Figure 2. Partially opened Chinese box.
In this setup, the specification language should be close
enough to the informal specification of the desired beha- component-wise construction of anything, in particular of
vior. Similarly, the technology of realization should also be hardware, but also of software2. It is easy to construct a
reliable. The latter again may depend on tools that are grammar for expressions denoting these Chinese boxes.
constructed component wise and realize some design (e.g., The basic objects are denoted by o0 ; o1 ; . . .. Then there are
silicon compilers that take as input the design of a chip constructors that turn expressions into new expressions.
and have as output the instructions to realize them). Hence, Each constructor has an arity that indicates how many
the rationality square may have to be used in an earlier arguments it has. There may be unary, binary, ternary, and
phase. so on constructors. Such constructors are denoted by
This raises, however, two questions. Proofs should be
based on some axioms. Which ones? Moreover, how do we k k
f0 ; f1 ; . . . ;
know that provability of a formal (mathematical) property
implies that we get what we want? The answers to these where k denotes the arity of the constructor. If b1,. . ., bk
questions come together. The proofs are based on some k
are expressions and fi is a constructor of arity k, then
axioms that hold for the objects of which the product is
composed. Based on the empirical facts that the axioms k
hold, the quality of the realized product will follow. fi b1 ; . . . ; bk

Products as Chinese Boxes of Components is an expression. A precise grammar for such expressions is
as follows.
Now we need to enter some of the details of how the
languages for the design and specification of the products Definition
should look. The intuitive idea is that a complex product
consists of components b1,. . ., bk put together in a specific 1. Consider the following alphabet:
way yielding F k b1 ; . . . ; bk . The superscript (k) indicates
X
the number of arguments that F needs. The components foi ji 2 Ng [ f fik ji; k 2 Ng [ f;; ; g:
are constructed in a similar way, until one hits the basic
components O0 ; O1 ; . . . that no longer are composed. Think
of a playing music installation B. It consists of a CD, CD- 2. Expressions E form the smallest set of words over S
player, amplifier, boxes, wires and an electric outlet, all put satisfying
together in the right way. So
oi 2 E;
6 k
BF CD; CD-player; amplifyer; boxes; wires; outlet; b1 ; . . . ; bk 2 E ) fi b1 ; . . . ; bk 2 E:

where F(6) is the action that makes the right connections. An example of a fully specified expression is
Similarly the amplifier and other components can be
described as a composition of their parts. A convenient 2
f1 o0 ; f31 o1 ; o2 ; o0 :
way to depict this idea in general is the so-called Chinese
box (see Fig. 2). This is a box with a lid. After opening the lid
one finds a (finite) set of neatly arranged boxes that either
are open and contain a basic object or are again other 2
In order that the sketched design method works well for software,
Chinese boxes (with lid). Eventually one will find some- it is preferable to have declarative software, i.e., in the functional or
thing in a decreasing chain of boxes. This corresponds to the logic programming style, in particular without side effects.
PROOFS OF CORRECTNESS IN MATHEMATICS AND INDUSTRY 3

The partially opened Chinese box in Fig. 2 can be denoted Here P, Q, and R are formulas (formal statements)
by about designs: P and R about one design and Q about
k designs.
5
f1 b1 ; b2 ; o1 ; b4 ; b5 ; 5. The formulas of L have a physical interpretation.
6. By the laws of physics, it is known that the inter-
where pretation given by (5) of the axioms holds for the
interpretation described in the basic components
6 and constructors. The soundness of logic then implies
b4 f2 o2 ; b4;2 ; b4;3 ; b4;4 ; b4;5 ; b4;6 ;
12
that statements proved from the axioms will also hold
b4;4 f4 b4;4;1 ; o3 ; b4;4;3 ; o4 ; b4;3;5 ; b4;4;6 ; o5 ; after interpretation.
b4;4;8 ; o6 ; o7 ; o8 ; o9 ;
This all may sound a bit complex, but the idea is simple
and the other bk still have to be specified. and can be found in any book on predicate logic and its
semantics (see Refs. 7 and 8). Proving starts from the
Definition. A design is an expression b 2 E. axioms using logical steps; validity of the axioms and
soundness of logic implies that the proved formulas are
Specification and Correctness of Design also valid.
The industrial task of constructing a product with a
Following the rationality square, one now can explain the desired behavior can be fulfilled as follows.
role of mathematical proofs in industrial design.
Some mathematical language is needed to state in a Design Method (I)
precise way the requirements of the products. We suppose
that we have such a specification language L, in which the 1. Find a language L with a valid interpretation.
expressions in E are terms. We will not enter into the details
2. Formulate a specification S, such that the desired
of such a language, but we will mention that for IT products,
behavior becomes the interpretation of S.
it often is convenient to be able to express relationships
between the states before and after the execution of a 3. Construct an expression b, intended to solve the task.
command or to express temporal relationships. Temporal 4. Prove S(b) from the axioms of the interpretation men-
statements include eventually the machine halts or tioned in (1).
there will be always a later moment in which the system 5. The realization of b is the required product.
receives input. See Refs. 36 for possible specification
languages, notably for reactive systems, and Ref. 7 for a Of course the last step of realizing designs may be non-
general introduction to the syntax and semantics of logical trivial. For example, transforming a chip design to an
languages used in computer science. actual chip is an industry by itself. But that is not the
concern now. Moreover, such a realization process can be
Definition. A specification is a unary formula3 S in L. performed by a tool that is the outcome of a similar speci-
fication-design-proof procedure.
Suppose we have the specification S and a candidate The needed proofs have to be given from the axioms in the
design b as given. The task is to prove in a mathematical interpretation. Design method I builds up products from
way S(b), i.e., that S holds of b. We did not yet discuss any scratch. In order not to reinvent the wheel all the time, one
axioms, or a way to warrant that the proved property is can base new products on previously designed ones.
relevant. For this we need the following.
Design Method (II). Suppose one wants to construct b
Definition. A valid interpretation for L consists of the satisfying S.
following.
1. Find subspecifications S1 ; . . . ; Sk and a constructor
1. For basic component expressions o, there is an inter- f k such that
pretation O in the reality of products.
2. For constructors f k , there is a way to put together k S1 xi & . . . & Sk xk ) Sf k x1 ; . . . ; xk :
products p1 ; . . . ; pk to form F k p1 ; . . . ; pk .
3. By (1) and (2), all designs have a realization. For 2. Find (on-the-shelf) designs b1 ; . . . ; bk such that for
2 1 1  i  k, one has
example, the design f1 o0 ; f3 o1 ; o2 ; o0 is inter-
2 1
preted as F1 O0 ; F3 O1 ; O2 ; O0 .
4. (4) There are axioms of the form Si bi :

Pc 3. Then the design b f k b1 ; . . . ; bk solves the task.


8 x1 . . . xk Qx1 ; . . . ; xk ) R f k x1 ; . . . ; xk :
Again this is done in a context of a language L with a valid
interpretation and the proofs are from the axioms in the
3
interpretation.
Better: A formula S Sx S with one free variable x in S.
4 PROOFS OF CORRECTNESS IN MATHEMATICS AND INDUSTRY

After having explained proofs of correctness, the cor- Still one may wonder how one can assure the correct-
rectness of proofs becomes an issue. In an actual non- ness of mathematical proofs via machine verification, if
trivial industrial design, a software system controlling such proofs need to assure the correctness of machines. It
metro-trains in Paris without a driver, one needed to prove seems that there is here a vicious circle of the chicken-and-
about 25,000 propositions in order to get reliability. These the-egg type. The principal founder of machine verification
proofs were provided by a theorem prover. Derivation rules of formalized proofs is the Dutch mathematician N. G. de
were added to enhance the proving power of the system. It Bruijn4; see Ref. 13. He emphasized the following criterion
turned out that if no care was taken, 2% to 5% of these added for reliable automated proof-checkers: Their programs
derivation rules were flawed and led to incorrect state- must be small, so small that a human can (easily) verify
ments; see Ref. 9. The next section deals with the problem the code by hand. In the next subsection, we will explain
of getting proofs right. why it is possible to satisfy this so-called de Bruijn criterion.

Foundations of Mathematics
CORRECTNESS OF PROOFS
The reason that fully formalized proofs are possible is that
Methodology for all mathematical activities, there is a solid foundation
that has been laid in a precise formal system. The reason
Both in computer science and in mathematics proofs can
that automated proof-checkers exist that satisfy the de
become large. In computer science, this is the case because
Bruijn criterion is that these formal systems are simple
the proofs that products satisfy certain specifications, as
enough, allowing a logician to write them down from
explained earlier, may depend on a large number of cases
memory in a couple of pages.
that need to be analyzed. In mathematics, large proofs occur
Mathematics is created by three mental activities: struc-
as well, in this case because of the depth of the subject. The
turing, computing, and reasoning. It is an art and crafts-
example of the Four Color Theorem in which billions of cases
manship with a power, precision and certainty, that is
need to be checked is well known. Then there is the proof of
unequalled elsewhere in life5. The three activities, res-
the classification theorem for simple finite groups needing
pectively, provide definitions and structures, algorithms
thousands of pages (in the usual style of informal rigor).
and computations, and proofs and theorems. These activ-
That there are long proofs of short statements is not an
ities are taken as a subject of study by themselves, yielding
accident, but a consequence of a famous undecidability
ontology (consisting either of set, type, or category theory),
result.
computability theory, and logic.
Theorem (Turing). Provability in predicate logic is unde-
cidable. Activity Tools Results Meta study
Structuring Axioms Structures Ontology
PROOF. See, for example, Ref. 10. & Definitions
Computing Algorithms Answers Computability 6
Corollary. For predicate logic, there is a number n and
Reasoning Proofs Theorems Logic
a theorem of length n, with the smallest proof of length at
least nn! .
Figure 3. Mathematical activity: tools, results, and meta study.

PROOF. Suppose that for every n theorems of length at


least n, a proof of length < nn! exists. Then checking all
During the history of mathematics these activities enjoyed
possible proofs of such length provides a decision method
attention in different degrees. Mathematics started with
for theoremhood, contradicting the undecidablity result. &
the structures of the numbers and planar geometry.
BabylonianChineseEgyptian mathematics, was mainly
Of course this does not imply that there are interesting
occupied with computing. In ancient Greek mathematics,
theorems with essentially long proofs.
reasoning was introduced. These two activities came
The question now arises, how one can verify long proofs
together in the work of Archimedes, al-Kwarizmi, and New-
and large numbers of shorter ones? This question is both
ton. For a long time only occasional extensions of the number
of importance for pure mathematics and for the industrial
systems was all that was done as structuring activity. The
applications mentioned before.
art of defining more and more structures started in the
The answer is that the state of the foundations of mathe-
ninteenth century with the introduction of groups by Galois
matics is such that proofs can be written in full detail,
and non-Euclidean spaces by Lobachevsky and Bolyai. Then
making it possible for a computer to check their correctness.
mathematics flourished as never before.
Currently, it still requires considerable effort to make such
formalizations of proofs, but there is good hope that in the
future this will become easier. Anyway, industrial design,
as explained earlier, already has proved the viability and 4
McCarthy described machine proof-checking some years earlier
value of formal proofs. For example, the Itanium, a succes- (see, Ref. 12), but did not come up with a formal system that had a
sor of the Pentium chip, has a provably correct arithmetical sufficiently powerful and convenient implementation.
5
unit; see Ref. 11. From: The man without qualities, R. Musil, Rohwolt.
6
Formerly called Recursion Theory.
PROOFS OF CORRECTNESS IN MATHEMATICS AND INDUSTRY 5

Logic. The quest for finding a foundation for the three acti- gave the same notion of computability as Churchs. If we
vities started with Aristotle. This search for foundation assume the so-called ChurchTuring thesis that humans
does not imply that one was uncertain how to prove theo- and machines can compute the same class of mathematical
rems. Plato had already emphasized that any human being functions, something that most logicians and computer
of normal intelligence had the capacity to reason that was scientists are willing to do, then it follows that provability
required for mathematics. What Aristotle wanted was a in predicate logic is also undecidable by humans.
survey and an understanding of that capacity. He started
the quest for logic. At the same time Aristotle introduced Mechanical Proof Verification
the synthetic way of introducing new structures: the
As soon as logic was fully described, one started to formalize
axiomatic method. Mathematics consists of concepts and
mathematics. In this endeavor, Frege was unfortunate
of valid statements. Concepts can be defined from other
enough to base mathematics on the inconsistent version
concepts. Valid statements can be proved from other such
of Cantorian set theory. Then Russell and Whitehead came
statements. To prevent an infinite regress, one had to start
with an alternative ontology, type theory, and started to
somewhere. For concepts one starts with the primitive
formalize very elementary parts of mathematics. In type
notions and for valid statements with the axioms. Not
theory, that currently exists in various forms, functions
long after this description, Euclid described geometry using
are the basic elements of mathematics and the types form
the axiomatic method in a way that was only improved by
a way to classify these. The formal development of mathe-
Hilbert, more than 2000 years later. Also Hilbert gave the
matics, initiated by Russell and Whitehead, lay at the
right view on the axiomatic method: The axioms form an
basis of the theoretical results of Godel and Turing. On
implicit definition of the primitive notions.
the other hand, for practical applications, the formal proofs
Frege completed the quest of Aristotle by giving a precise
become so elaborate that it is almost undoable for a human
description of predicate logic. Godel proved that his system
to produce them, let alone to check that they are correct.
was complete, i.e., sufficiently strong to derive all valid
It was realized by J. McCarthy and independently by
statements within a given axiomatic system. Brouwer and
N. G. de Bruijn that this verification should not be done by
Heyting refined predicate logic into the so-called intuitio-
humans but by machines. The formal systems describing
nistic version. In their system, one can make a distinction
logic, ontology, and computability have an amazingly small
between a weak existence (there exists a solution, but it is
number of axioms and rules. This makes it possible to
not clear how to find it) and a constructive one (there
construct relatively small mathematical assistants. These
exists a solution and from the proof of this fact one can
computer systems help the mathematician to verify
construct it) (see Ref. 14).
whether the definitions and proofs provided by the human
are well founded and correct.
Ontology. An early contribution to ontology came from
Based on an extended form of type theory, de Bruijn
Descartes, who introduced what is now called Cartesian
introduced the system AUTOMATH (see Ref. 17), in
products (pairs or more generally tuples of entities), thereby
which this idea was first realized, although somewhat
relating geometrical structures to arithmetical (in the sense
painfully, because of the level of detail in which the proofs
of algebraic) ones. When in the nineteenth century, there
needed to be presented. Nevertheless, proof-checking by
was a need for systematic ontology, Cantor introduced set
mathematical assistants based on type theory is feasible
theory in which sets are the fundamental building-blocks of
and promising. For some modern versions of type theory
mathematics. His system turned out to be inconsistent, but
and assistants based on these, see Refs. 1721.
Zermelo and Fraenkel removed the inconsistency and
Soon after the introduction of AUTOMATH, other
improved the theory so that it could act as an ontological
mathematical assistants were developed, based on different
foundation for large parts of mathematics, (see Ref 15).
foundational systems. There is the system MIZAR based on
set theory; the system HOL(-light) based on higher order
Computability. As soon as the set of consequences of an
logic; and ACL2 based on the computational model primi-
axiom system had become a precise mathematical object,
tive recursive arithmetic. See Ref. 22 for an introduction
results about this collection started to appear. From the
and references and Ref. 23 for resulting differences of views
work of Godel, it followed that the axioms of arithmetic
in the philosophy of mathematics. To obtain a feel of the
are essentially incomplete (for any consistent extension of
different styles of formalization, see Ref. 24.
arithmetic, there is an independent statement A that is
In Ref. 25, an impressive full development of the Four
neither provable nor refutable). An important part of the
Color Theorem is described. Tom Hales of the University of
reasoning of Godel was that the notion p is a proof of A is
Pittsburgh, assisted by a group of computer scientists,
after coding a computable relation. Turing showed that
specializing in formalized proof-verification, is well on
predicate logic is undecidable (it cannot be predicted by
his way to verifying his proof of the Kepler conjecture
machine whether a given statement can be derived or not).
(26); see Ref. 27. The Annals of Mathematics published
To prove undecidability results, the notion of computation
that proof and considered addingbut finally did not do so
needed to be formalized. To this end, Church came with a
a proviso, that the referees became exhausted (after 5
system of lambda-calculus (see Ref. 16), later leading to the
years) from checking all of the details by hand; therefore,
notion of functional programming with languages such as
the full correctness depends on a (perhaps not so reliable)
Lisp, ML, and Haskell. Turing came with the notion of the
computer computation. If Hales and his group succeed in
Turing machine, later leading to imperative programming
formalizing and verifying the entire proof, then that will be
with languages such as Fortran and C and showed that it
6 PROOFS OF CORRECTNESS IN MATHEMATICS AND INDUSTRY

of a reliability higher than most mathematical proofs, one obligation in propositional logic:
third of which is estimated to contain real errors, not just
typos.7 A p$p$p$p$p$p$p$p$p$
The possibility of formalizing mathematics is not in p $ p $ :
contradiction with Godels theorem, which only states
the limitations of the axiomatic method, informal or formal Then A $ B12, with B1 p; Bn 1 p $ Bn. By
alike. The proof of Godels incompleteness theorem does in induction on n one can show that for all natural numbers
fact heavily rely on the fact that proof-checking is decidable n  1, one has B(2  n). Therefore, B(12) and hence A,
and uses this by reflecting over the notion of provability (the because 2  6 12. A direct proof from the axioms of
Godel sentence states: This sentence is not provable). propositonal logic would be long. Much more sophisticated
One particular technology to verify that statements are examples exist, but this is the essence of the method of
valid is the use of model-checking. In IT applications the reflection. It needs some form of computational reasoning
request statement A can be proved from assumptions G inside proofs. Therefore, the modern mathematical assis-
(the situation) often boils down to A is valid in a model tants contain a model of computation for which equalities
A AG depending on G. (In logical notation like 2  6 12 and much more complex ones become prov-
able. There are two ways to do this. One possibility is that
G A , AG  A: there is a deduction rule of the form
This is so because of the completeness theorem of logic As
and because of the fact that the IT situation is related to sH R t:
At
models of digital hardware that are finite by its nature.)
Now, despite the usual huge size of the model, using some
This so-called Poincare Principle should be interpreted
cleverness the validity in several models in some indust-
as follows: From the assumption A(s) and the side con-
rially relevant cases is decidable within a feasible ammount
dition that s computationally reduces in several steps to
of time. One of these methods uses the so-called binary
t according to the rewrite system R, it follows that A(t).
decision diagrams (BDDs). Another ingredient is that uni-
The alternative is that the transition from A(s) to A(t) is
versal properties are checked via some rewriting rules, like
only allowed if s t has been proved first. These two ways
x 1x  1 x2  1.
of dealing with proving computational statements can be
For an introduction to model-checkers, see Ref. 20.
compared with the styles of, respectively, functional and
For successful applications, see Ref. 29. The method of
logical programming. In the first style, one obtains proofs
model-checking is often somewhat ad hoc, but nevertheless
that can be recorded as proof-objects. In the second style,
important. Using automated abstraction that works in
these full proofs become too large to record as one object,
many cases (see Refs. 30 and 31), the method becomes
because computations may take giga steps. Nevertheless
more streamlined.
the proof exists, but appearing line by line over time, and
one speaks about an ephemeral proof-object.
SCALING-UP THROUGH REFLECTION In the technology of proof-verification, general state-
ments are about mathematical objects and algorithms,
As to the question of whether fully formalized proofs are proofs show the correctness of statements and computa-
practically possible, the opinions have been divided. tions, and computations are dealing with objects and
Indeed, it seems too much work to work out intuitive steps proofs.
in full detail. Because of industrial pressure, however, full
developments have been given for correctness of hardware
RESULTS
and frequently used protocols. Formalizations of substan-
tial parts of mathematics have been lagging behind.
The state-of-the-art of computer-verified proofs is as fol-
There is a method that helps in tackling larger proofs.
lows. To formalize one page of informal mathematics, one
Suppose we want to prove statement A. Then it helps if
needs four pages in a fully formalized style and it takes
we can write A $ B f t, where t belongs to some col-
about five working days to produce these four pages (see
lection X of objects, and we also can see that the truth of
Ref. 22). It is expected that both numbers will go down.
this is independent of t; i.e., one has a proof 8 x 2 X:B f x.
There have been formalized several nontrivial statements,
Then B f t, hence A.
like the fundamental theorem of algebra (also in a con-
An easy example of this was conveyed to me by A.
structive fashion; it states that every non-constant poly-
Mostowski in 1968. Consider the following formula as proof
nomial over the complex numbers has a root), the prime
number theorem (giving an asymptotic estimation of the
number of primes below a given number), and the Jordan
curve theorem (every closed curve divides the plane into
two regions that cannot be reached without crossing this
curve; on the torus surface, this is not true). One of the great
7
It is interesting to note that, although informal mathematics often success stories is the full formalization of the Four Color
contains bugs, the intuition of mathematicians is strong enough Theorem by Gonthier (see Ref. 25). The original proof of
that most of these bugs usually can be repaired.
PROOFS OF CORRECTNESS IN MATHEMATICS AND INDUSTRY 7

this result was not completely trustable for its correctness, 17. R. P. Nederpelt, J. H. Geuvers, and R. C. de Vrijer, Twenty-five
as a large number of cases needed to be examined by years of Automath research, in Selected Papers on Automath,
computer. Gonthiers proof still needs a computer-aided volume 133 of Stud. Logic Found, Math., North-Holland,
Amsterdam, 1994, pp. 354.
computation, but all steps have been formally verified by an
assistant satisfying the de Bruijn principle. 18. P. Martin-Lof, Intuitionistic type theory, volume 1 of Studies
in Proof Theory, Lecture Notes, Bibliopolis, Naples, Italy, 1984.
19. R. L. Constable, The structure of Nuprls type theory, in Logic
BIBLIOGRAPHY of Computation (Marktoberdorf, 1995), vol. 157 of NATO Adv.
Sci. Inst. Ser. F Comput. Systems Sci., Berlin: Springer, 1997,
1. Alan Edelman, The mathematics of the Pentium division bug, pp. 123155.
SIAM Review, 37: 5467, 1997. 20. H. P. Barendregt and H. Geuvers, Proof-assistants using
2. H. Wupper, Design as the discovery of a mathematical dependent type systems, in A. Robinson and A. Voronkov,
theorem What designers should know about the art of mathe- (eds.), Handbook of Automated Reasoning, Elsevier Science
matics, in Ertas, et al., (eds.), Proc. Third Biennial World Conf. Publishers B.V., 2001, pp. 11491238.
on Integrated Design and Process Technology (IDPT), 1998, pp. 21. Y. Bertot and P. Casteran, CoqArt: The Calculus of Inductive
8694; J. Integrated Des. Process Sci., 4 (2): 113, 2000. Constructions, Texts in Theoretical Computer Science, Berlin:
3. Z. Manna and A. Pnueli, The Temporal Logic of Reactive and Springer, 2004.
Concurrent Systems: Specification, New York: Springer, 1992. 22. H. P. Barendregt and F. Wiedijk, The challenge of computer
4. K. R. Apt and Ernst-Rudiger Olderog, Verification of Sequen- mathematics, Philos. Trans. R. Soc. Lond. Ser. A Math. Phys.
tial and Concurrent Programs, Texts and Monographs in Eng. Sci., 363 (1835): 23512375, 2005.
Computer Science, 2nd ed. New York: Springer-Verlag, 1997. 23. H. P. Barendregt, Foundations of mathematics from the per-
5. C.A.P Hoare and H. Jifeng, Unifying Theories of Programming, spective of computer verification, in Mathematics, Computer
Englewood Cliffs, N.J.: Prentice Hall, 1998. Science, Logic A Never Ending Story. New York: Springer-
6. J. A. Bergstra, A. Ponse, and S. A. Smolka, eds., Handbook of Verlag, 2006. To appear. Available www.cs.ru.nl/~henk/
Process Algebra, Amsterdam: North-Holland Publishing Co., papers.html.
2001. 24. F. Wiedijk, The Seventeen Provers of the World, vol. 3600 of
7. B.-A. Mordechai, Mathematical Logic for Computer Science, LNCS, New York: Springer, 2006.
New York: Springer, 2001. 25. G. Gonthier, A computer checked proof of the Four Colour
8. W. Hodges, A Shorter Model Theory, Cambridge, U.K.: Cam- Theorem, 2005. Available: hresearch.microsoft.com/~gonthier/
bridge University Press, 1997. 4colproof.pdfi.
9. J.-R. Abrial, On B, in D. Bert, (ed.), B98: Recent Advances in 26. T. C. Hales, A proof of the Kepler conjecture, Ann. of Math. (2),
the Development and Use of the B Method: Second Interna- 162 (3): 10651185, 2005.
tional B Conference Montpellier, in Vol. 1393 of LNCS, Berlin: 27. T. C. Hales, The flyspeck project fact sheet. Available:
Springer, 1998, pp. 18. www.math.pitt.edu/~thales/flyspeck/index.html.
10. M. Davis, ed., The Undecidable, Mineola, NY: Dover Publica- 28. E. M. Clarke Jr., O. Grumberg, and D. A. Peled, Model Check-
tions Inc., 2004. ing, Cambridge, MA: MIT Press, 1999.
11. B. Greer, J. Harrison, G. Henry, W. Li, and P. Tang, Scientific 29. G. J. Holzmann, The SPIN model checker, primer and reference
computing on the Itaniumr processor, Scientific Prog., 10 (4): manual, Reading, MA: Addison-Wesley, 2003.
329337, 2002, 30. S. Bensalem, V. Ganesh, Y. Lakhnech, C. Mu noz, S. Owre, H.
12. J. McCarthy, Computer programs for checking the correctness Rue, J. Rushby, V. Rusu, H. Sadi, N. Shankar, E. Singerman,
of mathematical proofs, in Proc. of a Symposium in Pure and A. Tiwari, An overview of SAL, in C. M. Holloway, (ed.),
Mathematics, vol. V., Providence, RI, 1962, pp. 219227. LFM 2000: Fifth NASA Langley Formal Methods Workshop,
13. N. G. de Bruijn, The mathematical language AUTOMATH, its 2000, pp. 187196.
usage, and some of its extensions, in Symposium on Automatic 31. F. W. Vaandrager, Does it pay off? Model-based verification and
Demonstration, Versailles, 1968, Mathematics, 125: 2961, validation of embedded systems! in F. A. Karelse, (ed.), PRO-
Berlin: Springer, 1970. GRESS White papers 2006. STW, the Netherlands, 2006.
14. D. van Dalen, Logic and Structure, Universitext, 4th ed. Berlin: Available: www.cs.ru.nl/ita/publications/papers/fvaan/white-
Springer-Verlag, 2004. paper.
15. P. R. Halmos, Naive Set Theory, New York: Springer-Verlag,
1974.
HENK BARENDREGT
16. H. P. Barendregt, Lambda calculi with types, in Handbook of Radboud University Nijmegen
Logic in Computer Science, Vol. 2, New York: Oxford Univ. Nijmegen, The Netherlands
Press, 1992, pp. 117309.
R
REGRESSION ANALYSIS Most regression models are parametric, so the mean
function mYjX x depends only on a few unknown para-
In statistics, regression is the study of dependence. The goal meters collected into a vector b. We write mYjX
of regression is to study how the distribution of a response x gx; b, where g is completely known apart from the
variable changes as values of one or more predictors are unknown value of b.
changed. For example, regression can be used to study In the heights data described above, data are generated
changes in automobile stopping distance as speed is varied. obtaining a sample of units, here motherdaughter pairs,
In another example, the response could be the total profit- and measuring the values of height for each of the pairs.
ability of a product as characteristics of it like selling price, Study of the conditional distribution of daughters height
advertising budget, placement in stores, and so on, are given the mothers height makes more sense than the study
varied. Key uses for regression methods include prediction of the mothers height given the daughters height because
of future values and assessing dependence of one variable the mother precedes the daughter, but in principle either
on another. conditional distribution could be studied via regression. In
The study of conditional distributions dates at least to other problems, the values of the predictor or the predictors
the beginning of the nineteenth century and the work of may be set by an experimenter. For example, in a laboratory
A. Legendre and C. F. Gauss. The use of the term regression setting, samples of homogeneous material could be
is somewhat newer, dating to the work of F. Galton at the assigned to get different levels of stress, and then a
end of the nineteenth century; see Ref. 1 for more history. response variable is measured with the goal of determining
the effect of stress on the outcome. This latter scenario will
usually include random assignment of units to levels of
GENERAL SETUP
predictors and can lead to more meaningful inferences.
Considerations for allocating levels of treatments to experi-
For the general univariate regression problem, we use the
mental units are part of the design of experiments; see
symbol Y for a response variable, which is sometimes called
Ref. 3. Both cases of predictors determined by the experi-
the dependent variable. The response can be a continuous
menter and predictors measured on a sample of units can
variable like a distance or a profit, or it could be discrete,
often be analyzed using regression analysis.
like success or failure, or some other categorical outcome.
The predictors, also called independent variables, carriers,
or features, can also be continuous or categorical; in the SIMPLE LINEAR REGRESSION
latter case they are often called factors or class variables.
For now, we assume only one predictor and use the symbol Model
X for it, but we will generalize to many predictors shortly.
Linear regression is the most familiar and widely used
The goal is to learn about the conditional distribution of Y
method for regression analysis; see, for example, Ref. 4
given that X has a particular value x, written symbolically
for book-length treatment of simple and multiple regres-
as FYjX x.
sion. This method concentrates almost exclusively on the
For example, Fig. 1 displays the heights of n 1375
mean function. Data consist of n independent pairs
motherdaughter pairs, with X mothers height on the
x1 ; y1 ; . . . ; xn ; yn as with the heights data in Fig. 1. The
horizontal axis and Y daughters height on the vertical
independence assumption might be violated if, for example,
axis, in inches. The conditional distributions FYjX x
a mother were included several times in the data, each with
correspond to the vertical spread of points in strips in this
a different daughter, or if the mothers formed several
plot. In Fig. 1, three of these conditional distributions are
groups of sisters.
highlighted, corresponding to mothers heights of 58, 61,
The simple linear regression model requires the follow-
and 65 inches. The conditional distributions almost cer-
ing mean and variance functions:
tainly differ in mean, with shorter mothers on average
having shorter daughters than do taller mothers, but there
mYjX x gx; b b0 b1 x
is substantial overlap between the distributions. (1)
Most regression problems center on the study of the VarYjX x s2
mean function, to learn about the average value of Y given
X x. We write the most general mean function as so for this model b b0 ; b1 0 . b1 is slope, which is the
mYjX x, the mean of Y when X x. The mean function expected change in Y when X is increased by one unit.
for the heights data would be a smooth curve, with mYjX x The intercept b0 is the mean value of Y when X 0,
increasing as x increases. Other characteristics of the con- although that interpretation may not make sense if X
ditional distributions, such as conditional variances cannot equal zero. The line shown on Fig. 1 is an estimate
varYjX x may well be constant across the range of of the simple regression mean function, computed using
values for mothers height, but in general the variance or least squares, to be described below. For the heights data,
indeed any other moment or percentile function can depend the simple regression mean function seems plausible, as it
on X. matches the data in the graph.
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 REGRESSION ANALYSIS

As s2 is the mean-squared difference between each data


point and its mean, it should be no surprise that the
estimate of s2 is similar to the average of the squared fitting
errors. Let d be the degrees of freedom for error, which in
linear regression is the number of observations minus the
number of parameters in the mean function, or n  2 in
simple regression. Then

1X n
s2 y  gxi ; b2 (4)
d i1

P
The quantity yi  gxi ; b2 is called the residual sum of
squares. We divide by d rather than the more intuitive
sample size n because this results in an unbiased estimate,
Es2 s2 . Many computing formulas for the residuals sum
of squares depend only on summary statistics. One that is
particularly revealing is
Figure 1. Heights of a sample of n 1375 mothers and daughters
as reported by Ref. 2. The line shown on the plot is the ordinary X
n
least-squares regression line, assuming a simple linear regression y  gxi ; b2 n  1SD2y 1  R2 (5)
model. The darker points display all pairs with mothers height i1
that would round to 58, 61, or 65 inches.
In both simple and multiple linear regression, the quantity
R2 is the square of the sample correlation between the
The simple regression model also assumes a constant observed response, the yi , and the fitted values gxi ; b. In
variance function, with s2 > 0 generally unknown. This simple regression R2 r2xy .
assumption is not a prerequisite for all regression models,
but it is a feature of the simple regression model. Distribution of Estimates
The estimates b0 ; b1 are random variables with variances
Estimation
!
We can obtain estimates of the unknown parameters, and 1 m2x
2
thus of the mean and the variance functions, without any Varb0 s ;
n n  1SD2x
further assumptions. The most common method of estima- (6)
tion is via least squares, which chooses the estimates b 2 1
Varb1 s
b0 ; b1 0 of b b0 ; b1 0 via a minimization problem: n  1SD2x

X
n The estimates are correlated, with covariance
b arg min fyi  gx; b g2 (2) Covb0 ; b1 s2 mx =fn  1SD2x g. The estimates are
b
i1 uncorrelated if the predictor is rescaled to have sample
mean mx 0; that is, replace X by a new predictor
A generic notation is used in Equation (2) because this same
X  X  mx . This will also change the meaning of the
objective function can be used for other parametric mean
intercept parameter from the value of EYjX 0 to the
functions.
value of EYjX mx . Estimates of the variances and cov-
The solution to this minimization problem is easily
ariances are obtained by substituting s2 for s2 . For exam-
found by differentiating Equation (2) with respect to
ple, the square root of the estimated variance of b1 is called
each element of b and setting the resulting equations to
its standard error, and is given by
zero, and solving. If we write mx and my as the sample
means of the xi and the yi respectively, SDx and SDy as
1
the sample standard deviations, and rxy as the sample seb1 s (7)
correlation, then fn  1SD2x g1=2

SDy
b1 rxy b0 my  b1 mx (3)
SDx Tests and confidence statements concerning the para-
meters require the sampling distribution of the statistic
These are linear estimators because both my and rxy are b0 ; b1 . This information can come about in three
linear combinations of the yi . They are also unbiased, ways. First, we might assume normality for the conditional
Eb0 b0 and Eb1 b1 . According to the Gauss-Markov distributions, FYjX x Ngx; b; s2 . Since the least
theorem, the least-squares estimates have minimum var- squares estimates are linear functions of the yi , this leads
iance among all possible linear unbiased estimates. Details to normal sampling distributions for b0 and b1 . Alterna-
are given in Refs. 4 and 5, the latter reference at a higher tively, by the central limit theorem b0 and b1 will be approxi-
mathematical level. mately normal regardless of the true F, assuming only mild
REGRESSION ANALYSIS 3

regularity conditions and a large enough sample. A third latter value is usually interpreted as a summary of the
approach uses the data itself to estimate the sampling comparison of the fit of model (1) with the fit of the null
distribution of b, and thereby get approximate inference. mean function
This last method is generally called the bootstrap, and is
discussed briefly in Ref. 4 and more completely in Ref. 6. m0 YjX x b0 (8)
Regardless of distributional assumptions, the estimate
s2 has a distribution that is independent of b. If we add the Mean function (8) asserts that the mean of YjX is the same
normality assumption, then ds2  s2 x2 d, a chi-squared for all values of X. Under this mean function the least
distribution with d df. The ratio b1  b1 =seb1 has a squares estimate of b0 is just the sample mean my and
t-distribution with d df, written td. Most tests in linear the residual sum of squares is n  1SD2y . Under mean
regression models under normality or in large samples function (1), the simple linear regression mean function,
are based either on t-distributions or on the related the residual sum of squares is given by Equation (5). The
F-distributions. proportion of variability unexplained by regression on X is
Suppose we write tg d to be the quantile of the just the ratio of these two residual sums of squares:
t-distribution with d df that cuts off probability g in its
upper tail. Based on normal theory, either a normality n  1SD2y 1  R2
assumption or large samples, a test of b1 b1 versus the Unexplained variability
n  1SD2y
alternative b1 6 b1 is rejected at level a if t b1 
b1 =seb1 exceeds t1a=2 d, where d is the number of df 1  R2
used to estimate s2 . Similarly, a 1  a  100% confidence
interval for b1 is given by the set and so R2 is the proportion of variability in Y that is
explained by the linear regression on X. This same inter-
fb1 2 b1  t1a=2 dseb1 ; b1 t1a=2 dseb1 g pretation also applies to multiple linear regression.
An important use of regression is the prediction of future
values. Consider predicting the height of a daughter whose
Computer Output from Heights Data mothers height is X 61. Whether data collected on
English motherdaughter pairs over 100 years ago is rele-
Typical computer output from a packaged regression pro-
vant to contemporary motherdaughter pairs is question-
gram is shown in Table 1 for the heights data. The usual
able, but if it were, the point prediction would be the
output includes the estimates (3) and their standard errors
estimated mean, g61; b 29:9174 0:5417  61  63
(7). The fitted mean function is gx; b 29:9174 0:5417x;
inches. From Fig. 1, even if we knew the mean function
this function is the straight line drawn on Fig. 1. The
exactly, we would not expect the prediction to be prefect
column marked t-value displays the ratio of each estimate
because mothers of height 61 inches have daughters of a
to its standard error, which is an appropriate statistic for
variety of heights. We therefore expect predictions to have
testing the hypotheses that each corresponding coefficient
two sources of error: a prediction error of magnitude s due
is equal to zero against either a one-tailed or two-tailed
to the new observation, and an error from estimating the
alternative. The column marked Pr > jtj is the signifi-
mean function,
cance level of this test assuming a two-sided alternative,
based on the tn  2 distribution. In this example the p-
values are zero to four decimals, and strong evidence is VarPredictionjX x s2 Vargx; b
present that the intercept is nonzero given the slope, and
that the slope is nonzero given the intercept. The estimated For simple regression Vargx; b Varb0 b1 x
slope of about 0.54 suggests that each inch increase on Varb0 x2 Varb1 xCovb0 ; b1 . Simplifying and repla-
mothers height corresponds to an increase in daughters cing s2 by s2 and taking square roots, we get
height of only about 0.54 inches, which indicates that tall !1=2
mothers have tall daughters but not as tall as themselves.  1 x  mx 2
This could have been anticipated from (3): Assuming that sePredictionjX x s 1
n n  1SD2x
heights of daughters and mothers are equally variable, we
will have SDx  SDy and so b1  rxy , the correlation. As the
where the sample size n, sample mean mx , and sample
scale-free correlation coefficient is always in 1; 1, the
standard deviation SDx are all from the data used to esti-
slope must also be in the range. This observation of regres-
mate b. For the heights data, this standard error at x 61
sion toward the mean is the origin of the term regression for
is about 2.3 inches. A 95% prediction interval, based on the
the study of conditional distributions.
tn  2 distribution, is from 58.5 to 67.4 inches.
Also included in Table 1 are the estimate s of s, the
degrees of freedom associated with s2 , and R2 r2xy . This
MULTIPLE LINEAR REGRESSION
Table 1. Typical simple regression computer output, for
the heights data The multiple linear regression model is an elaboration of
Estimate Std. Error t-value Pr > jtj the simple linear regression model. We now have a pre-
dictor X with p  1 components, X 1; X1 ; . . . ; X p . Also,
b0 29.9174 1.6225 18.44 0.0000
b1 0.5417 0.0260 20.87 0.0000 let x 1; x1 ; . . . ; x p be a vector of possible observed values
s 2:27, 1373 df, R2 0:241.
4 REGRESSION ANALYSIS

for X; the 1 is appended to the left of these quantities to change predictions: All least-squares estimates produce
allow for an intercept. Then the mean function in the same predictions.
Equation (1) is replaced by Equation 10 should never be used in computations, and
methods based on decompositions such as the QR decom-
mYjX x gx; b position are more numerically stable; see Linear systems
b0 b1 x1    b p x p of equation and Ref. 8.
(9)
b0 x
Distribution
VarYjX x s2
If the FYjX are normal distributions, or if the sample size
0 is large enough, then we will have, assuming X of full rank,
The parameter vector b b0 ; . . . ; b p now has p 1
components. Equation (9) describes a plane in p 1-dimen-
sional space. Each b j for j > 0 is called a partial slope, and b  Nb; s2 X 0 X 1 (11)
gives the expected change in Y when X j is increased by one
unit, assuming all other Xk , k 6 j, are fixed. This interpre- The standard error of any of the estimates is given by s
tation can be problematical if changing X j would require times the square root of the corresponding diagonal ele-
that one or more of the other Xk be changed as well. For ment of X 0 X 1 . Similarly, if a0 b is any linear combination
example, if X j was tax rate and Xk was savings rate, of the elements of b, then
changing X j may necessarily change Xk as well.
Linear models are not really restricted to fitting straight a0 b  Na0 b; s2 a0 X 0 X 1 a
lines and planes because we are free to define X as we wish.
For example, if the elements of X are different powers or In particular, the fitted value at X x is given by x0 b, and
other functions of the same base variables, then when its variance is s2 x0 X 0 X 1 x . A prediction of a future value
viewed as a function of the base variables the mean function at X x is also given by x0 b, and its variance is given by
will be curved. Similarly, by including dummy variables, s2 s2 x0 X 0 X 1 x . Both of these variances are estimated
which have values of zero and one only, denoting two by replacing s2 by s2 .
possible categories, we can fit separate mean functions to
subpopulations in the data (see Ref. 4., Chapter 6). Prescription Drug Cost

Estimation As an example, we will use data collected on 29 health plans


with pharmacies managed by the same insurance company
Given data yi ; xi1 ; . . . ; xi p for i 1; . . . ; n, we assume that in the United States in the mid-1990s. The response vari-
each case in the data is independent of each other case. This able is Cost, the average cost to the health plan for one
may exclude, for example, time-ordered observations on the prescription for one day, in dollars. Three aspects of the
same case, or other sampling plans with correlated cases. drug plan under the control of the health plan are GS, the
The least-squares estimates minimize Equation 2, but with usage of generic substitute drugs by the plan, an index
gx; b from Equation 9 substituting for the simple regres- between 0, for no substitution and 100, for complete sub-
sion mean function. The estimate s2 of s2 is obtained from stitution, RI, a restrictiveness index, also between 0 and
Equation 4 but with d n  p  1 df rather than the 100, describing the extent to which the plan requires phy-
n  2 for simple regression. Numerical methods for least- sicians to prescribe drugs from a limited formulary, and
squares computations are discussed in Ref. 7. High-quality Copay, the cost to the patient per prescription. Other
subroutines for least squares are provided by Ref. 8. As with characteristics of the plan that might influence costs are
simple regression, the standard least-squares calculations the average Age of patients in the plan, and RXPM, the
are performed by virtually all statistical computing number of prescriptions per year per patient, as a proxy
packages. measure of the overall health of the members in the plan.
For the multiple linear regression model, there is a Although primary interest is in the first three predictors,
closed-form solution for b available in compact form in the last two are included to adjust for demographic differ-
matrix notation. Suppose we write Y to be the n  1 vector ences in the plans. The data are from Ref. (4).
of the response variable and X to be the n  p 1 matrix Figure 2 is a scatterplot matrix. Except for the diagonal,
of the predictors, including a column of ones. The order of a scatterplot matrix is a two-dimensional array of scatter-
rows of Y and X must be the same. Then plots. The variable names on the diagonal label the axes. In
Fig. 2, the variable Age appears on the horizontal axis of all
b X 0 X 1 X 0 Y (10) plots in the fifth column from the left and on the vertical
axis of all plots in the fifth row from the top. Each plot in a
provided that the inverse exists. If the inverse does not scatterplot matrix is relevant to a particular one-predictor
exist, then there is not a unique least-squares estimator. If regression of the variable on the vertical axis given the
the matrix X is of rank r p, then most statistical comput- variable on the horizontal axis. For example, the plot of Cost
ing packages resolve the indeterminacy by finding r line- versus GS in the first plot in the second column of the
arly independent columns of X , resulting in a matrix X 1 , scatterplot matrix is relevant for the regression of Cost on
and then computing the estimator (10) with X 1 replacing X . GS ignoring the other variables. From the first row of plots,
This will change interpretation of parameters but not the mean of Cost generally decreases as predictors increase,
REGRESSION ANALYSIS 5

Figure 2. Scatterplot matrix for the drug cost example.

except perhaps RXPM where there is not any obvious variability in the response explained by the predictors;
dependence. This summary is clouded, however, by a few about half the variability in Cost is explained by this
unusual points, in particular one health plan with a very regression. The estimated coefficient for GS is about
low value for GS and three plans with large values of RI 0:012, which suggests that, if all other variables could
that have relatively high costs. The scatterplot matrix can be held fixed, increasing GI by 10 units is expected to
be very effective in helping the analyst focus on possibly change Cost by 10  :012 $0:12, which is a relatively
unusual data early in an analysis. large change. The t-test for the coefficient for GS equal to
The pairwise relationships between the predictors are zero has a very small p-value, which suggests that this
displayed in most other frames of this plot. Predictors that coefficient may indeed by nonzero. The coefficient for Age
have nonlinear joint distributions, or outlying or separated also has a small p-value and plans with older members
points, may complicate a regression problem; Refs. 4 and 9 have lower cost per prescription per day. Adjusted for the
present methodology for using the scatterplot matrix to other predictors, RI appears to be unimportant, whereas
choose transformations of predictors for which a linear the coefficient for Copay appears to be of the wrong sign.
regression model is more likely to provide a good approx-
imation. Model Comparison. In some regression problems, we
Table 2 gives standard computer output for the fit of a may wish to test the null hypothesis NH that a subset of
multiple linear regression model with five predictors. As in the b j are simultaneously zero versus the alternative AH
simple regression, the value of R2 gives the proportion of that at least one in the subset is nonzero. The usual
procedure is to do a likelihood ratio test: (1) Fit both the
Table 2. Regression output for the drug cost data. NH and the AH models and save the residual sum of
squares and the residual df; (2) compute the statistic
Estimate Std. Error t-value Pr > jtj
(Intercept) 2.6829 0.4010 6.69 0.0000 RSSNH  RSSAH =df NH  df AH
GS 0.0117 0.0028 4.23 0.0003 F
RSSAH =df AH
RI 0.0004 0.0021 0.19 0.8483
Copay 0.0154 0.0187 0.82 0.4193
Age 0.0420 0.0141 2.98 0.0068 Under the normality assumption, the numerator and
RXPM 0.0223 0.0110 2.03 0.0543 denominator are independent multiples of x2 random vari-
s 0:0828, df 23, R2 0:535.
6 REGRESSION ANALYSIS

ables, and F has an Fdf NH  df AH df AH distribution, which associated with lower values of Cost? The answer to this
can be used to get significance levels. For example, consider question depends on the way that the data were generated.
testing the null hypothesis that the mean function is given If GS were assigned to medical plans using a random
by Equation 8, which asserts that the mean function does mechanism, and then we observed Cost after the random
not vary with the predictors versus the alternative given by assignment, then inference of causation could be justified.
Equation 9. For the drug data, F 5:29 with 5; 23 df, The lack of randomization in these data could explain the
p 0:002, which suggests that at least one of the b j ; j  1 is wrong sign for Copay, as it is quite plausible that plans raise
nonzero. the copayment in response to higher costs. For observa-
tional studies like this one, causal inference based on
Model Selection/Variable Selection. Although some regression coefficients is problematical, but a substantial
regression models are dictated by a theory that specifies literature exists on methods for making causal inference
which predictors are needed and how they should be used in from observational data; see Ref. 13.
the problem, many problems are not so well specified. In the
drug cost example, Cost may depend on the predictors as Diagnostics. Fitting regression models is predicated
given, on some subset of them, or on some other functional upon several assumptions about FYjX. Should any of
form other than a linear combination. Many regression these assumptions fail, then a fitted regression model
problems will therefore include a model selection phase may not provide a useful summary of the regression pro-
in which several competing specifications for the mean blem. For example, if the true mean function were
function are to be considered. In the drug cost example, EYjX x b0 b1 x b2 x2 , then the fit of the simple
we might consider all 25 32 possible mean functions linear regression model (1) could provide a misleading
obtained using subsets of the five base predictors, although summary if b2 were substantially different from zero.
this is clearly only a small fraction of all possible sensible Similarly, if the assumed mean function were correct but
models. Comparing models two at a time is at best ineffi- the variance function was not constant, then estimates
cient and at worst impossible because the likelihood ratio would no longer be efficient, and tests and confidence
tests can only be used to compare models if the null model is intervals could be badly in error.
a special case of the alternative model. Regression diagnostics are a collection of graphical and
One important method for comparing models is based on numerical methods for checking assumptions concerning
estimating a criterion function that depends on both lack of the mean function and the variance function. In addition,
fit and complexity of the model (see also Information these methods can be used to detect outliers, a small frac-
theory.) The most commonly used method is the Akaike tion of the cases for which the assumed model is incorrect,
information criterion, or AIC, given for linear regression by and influential cases (14), which are cases that if deleted
would substantially change the estimates and inferences.
AIC n logResidual sum of squares 2 p 1 Diagnostics can also be used to suggest remedial action like
transforming predictors or the response, or adding inter-
where p 1 is the number of estimated coefficients in the actions to a mean function, that could improve the match of
mean function. The model that minimizes AIC is selected, the model to the data. Much of the theory for diagnostics is
even if the difference in AIC between two models is trivially laid out in Ref. 15 see also Refs. 4 and 9.
small; see Ref. 10. For the drug cost data, the mean function Many diagnostic methods are based on examining the
with all five predictors has AIC 139:21. The mean residuals, which for linear models are simply the differ-
function with minimum AIC excludes only RI, with ences ri yi  gxi ; b; i 1; . . . ; n. The key idea is that, if a
AIC 141:16. The fitted mean function for this mean fitted model is correct, then the residuals should be unre-
function is mYjX x 2:6572  0:0117 GS 0:0181 lated to the fitted values, to any function of the predictors,
Copay  0:0417Age 0:0229 RXPM. Assuming the multi- or indeed to any function of data that was not used in the
ple linear regression model is appropriate for these data, modeling. This suggests examining plots of the residuals
this suggests that the restrictiveness of the formulary is not versus functions of the predictors, such as the predictors
related to cost after adjusting for the other variables, plans themselves and also versus fitted values. If these graphs
with more GS are associated with lower costs. Both Copay show any pattern, such as a curved mean function or
and Age seem to have the wrong sign. nonconstant variance, we have evidence that the model
An alternative approach to model selection is model used does not match the data. Lack of patterns in all plots is
aggregation, in which a probability or weight is estimated consistent with an acceptable model, but not definitive.
for each candidate model, and the final model is a Figure 3 shows six plots, the residuals versus each of the
weighted combination of the individual models; see predictors, and also the residuals versus the fitted values
Ref. 11 for a Bayesian approach and Ref. 12 for a based on the model with all predictors. Diagnostic analysis
frequentist approach. should generally be done before any model selection based
on the largest sensible mean function. In each plot, the
Parameter Interpretation. If the results in Table 2 or the dashed line is a reference horizontal line at zero. The dotted
fitted model after selection were a reasonable summary of line is the fitted least-squares regression line for a quad-
the conditional mean of Cost given the predictors, how can ratic regression with the response given by the residuals
we interpret the parameters? For example, can we infer and the predictor given by the horizontal axis. The t-test
than increasing GS would decrease Cost? Or, should we be that the coefficient for the quadratic term when added to
more cautious and only infer that plans with higher GS are the original mean function is zero is a numeric diagnostic
REGRESSION ANALYSIS 7

remaining estimates are of the appropriate sign. This


seems to provide a useful summary for the data. We would
call the four points that were omitted influential observa-
tions, (14) because their exclusion markedly changes con-
clusions in the analysis.
In this example, as in many examples, we end up with a
fitted model that depends on choices made about the data.
The estimated model ignores 4 of 29 data points, so we are
admitting that the mean function is not appropriate for all
data.

OTHER REGRESSION MODELS

The linear model given by Equation 9 has surprising gen-


erality, given that so few assumptions are required. For
some problems, these methods will certainly not be useful,
for example if the response is not continuous, if the variance
depends on the mean, or if additional information about the
conditional distributions is available. For these cases,
methods are available to take advantage of the additional
information.

Logistic Regression
Suppose that the response variable Y can only take on two
values, say 1, corresponding perhaps to success, or 0,
corresponding to failure. For example, in a manufactur-
Figure 3. Residual plots for the drug cost data. The + symbol ing plant where all output is inspected, Y could indicate
indicates the plan with very small GS, x indicates plans with very items that either pass (Y 1) or fail (Y 1) inspection. We
high RI, and all other plans are indicated with a o. may want to study how the probability of passing depends
on characteristics such as operator, time of day, quality of
input materials, and so on.
that can help interpret the plot. In the case of the plot We build the logistic regression model in pieces. First, as
versus fitted value, this test is called Tukeys test for non- each Y can only equal 0 or 1, each Y has a Bernoulli
additivity, and p-values are obtained by comparing with a distribution, and
normal distribution rather than a t-distribution that is used
for all other plots. mYjX x ProbY 1jX x
In this example, the residual plots display patterns that
gx; b (12)
indicate that the linear model that was fit does not match
the data well. The plot for GS suggests that the case with a VarYjX x gx; b1  gx; b
very small value of GS might be quite different than the
others; the p-value for the lack-of-fit test is about 0.02. Each observation can have its own probability of success
Similarly, curvature is evident for RI due to the three plans gx; b and its own variance.
with very high values of RI but very high costs. No other Next, assume that Y depends on X x only through a
plot is particularly troubling, particularly in view of the linear combination hx b0 b1 x1 . . . b p x p b0 x.
small sample size. For example, the p-value for Tukeys test The quantity hx is called a linear predictor. For the
corresponding to the plot versus fitted values is about multiple linear regression model, we have gx; b hx,
p 0:10. The seemingly contradictory result that the but for a binary response, this does not make any sense
mean function matches acceptably overall but not with because a probability is bounded between zero and one. We
regard to GS or RI is plausible because the overall test can make a connection between gx; b and hx by assum-
will necessarily be less powerful than a test for a more ing that
specific type of model failure.
This analysis suggests that the four plans, one with 1
gx; b (13)
very low GS and the other three with very high RI, 1 exphx
may be cases that should be treated separately from the
remaining cases. If we refit without these cases, the result- This is called logistic regression because the right side of
ing residual plots do not exhibit any particular problems. Equation 13 is the logistic function. Other choices for g are
After using AIC to select a subset, we end up with the fitted possible, using any function that maps from 1; 1 to (0,
model gx; b 2:394  0:014 GS  0:004 RI  0:024 Age 1), but the logistic is adequate for many applications.
0:020 RXPM. In this fitted model, Copay is deleted. The To make the analogy with linear regression clearer,
coefficient estimate for GS is somewhat larger, and the Equation 13 is often inverted to have just the linear
8 REGRESSION ANALYSIS

predictor on the right side of the equation, models as well as the multiple linear regression model
assuming normal errors, are examples of generalized linear
gx; b models, described in Ref. 16.
log hx b0 x (14)
1  gx; b
Nonlinear Regression
In this context, the logit function, loggx; b=1  gx; b, Nonlinear regression refers in general to any regression
is called a link function that links the parameter of the problem for which the linear regression model does not
Bernoulli distribution, gx; b, to the linear predictor hx. hold. Thus, for example, the logistic and log-linear Poisson
models are nonlinear models; indeed nearly all regression
Estimation. If we have data yi ; xi , i 1; . . . ; n that are problems are nonlinear.
mutually independent, then we can write the log-likelihood However, it is traditional to use a narrower definition for
function as nonlinear regression that matches the multiple linear
  regression model except that the mean function mYjX
n
Lb log P gxi ; byi 1  gxi ; b1yi x gx; b is a nonlinear function of the parameters b. For
i1 example, the mean relationship between X age of a fish
  yi 
n gxi ; b and Y length of the fish is commonly described using the
log P 1  gxi ; b
i1 1  gxi ; b von Bertalanffy function,
( !)
Xn
1
0 EYjX x L1 1  expKx  x0
yi xi b log 1 
i1
1 expx0i b
The parameters b L1 ; K; x0 0 to be estimated are the
Maximum likelihood estimates are obtained to be the maximum length L1 for very old fish; the growth rate K,
values of b that maximize this last equation. Computations and x0 < 0, which allows fish to have positive length at
are generally done using NewtonRaphson iteration birth.
or using a variant called Fisher scoring; see Ref. 16; As with the linear model, a normality assumption for
for book-length treatments of this topic, see Refs. 17 YjX is not required to obtain estimates. An estimator b of b
and 18. can be obtained by minimizing Equation (2), and the esti-
mate of s2 assuming constant variance from Equation (4).
Poisson Regression Computations for a nonlinear mean function are much
When the response is the count of the number of indepen- more difficult; see Least squares approximation. The
dent events in a fixed time period, Poisson regression nonlinear regression problem generally requires an itera-
models are often used. The development is similar to the tive computational method for solution (7) and requires
Bernoulli case. We first assume that YjX x is distributed reasonable starting values for the computations. In addi-
as a Poisson random variable with mean mYjX x tion, the objective function (2) may be multimodal and
gx; b, programs can converge to a local rather than a global
minimum. Although software is generally available in
gx; by statistical packages and in mathematical programming
ProbY yjX x expgx; b
y! languages, the quality of the routines available is more
variable and different packages may give different
For the Poisson, 0 < mYjX x VarYjX x gx; b. answers. Additionally, even if normality is assumed, the
The connection between Y and X is assumed to be through estimate of b is normally distributed only in large samples,
the linear predictor hx, and for a log-linear model, we so inferences are approximate and particularly in small
assume that samples may be in error. See Ref. 20 for book-length
treatment.
gx; b exphx
Nonparametric Regression
giving the exponential mean function, or inverting we get
For the limited and important goal of learning about the
the log-link,
mean function, several newer approaches to regression
have been proposed in the last few years. These methods
hx loggx; b
either weaken assumptions or are designed to meet parti-
cular goals while sacrificing other goals.
Assuming independence, the log-likelihood function can be
The central idea behind nonparametric regression is to
shown to be equal to
estimate the mean function mYjX x without assuming
X
n any particular parametric form for the mean function. In
Lb fyi xi 0b  expx0i bg the special case of one predictor, the NaradayaWatson
i1 kernel regression estimator is the fundamental method. It
estimates mYjX x at any particular x by a weighed
Log-linear Poisson models are discussed in Ref. 19. average of the yi with weights determined by jxi  xj, so
There are obvious connections between the logistic and points close to x have higher weight than do points far away.
the Poisson models briefly described here. Both of these In particular, If Hu is a symmetric unimodal function,
REGRESSION ANALYSIS 9

of the g j , continuing until convergence is obtained. This


type of model can also be used in the generalized linear
model framework, where it is called a generalized additive
model.

Robust Regression
Robust regression was developed to address the concern
that standard estimates such as least-squares or maximum
likelihood estimates may be highly unstable in the presence
of outliers or other very large errors. For example, the least-
squares criterion (2) may be replaced by

X
n
b arg min rfjyi  gx; b jg
b
i1

where r is symmetric about zero and may downweight


observations for which jyi  gx; b j is large. The metho-
Figure 4. Three NaradayaWatson kernel smoothing estimates dology is presented in Ref. 25, although these methods seem
of the mean for the heights data, with h 1 for the solid line and
to be rarely used in practice, perhaps because they give
h 3 for the dashed line and h 9 for the dotted line.
protection against outliers but not necessarily against
model misspecifications, Ref. 26.

then the estimated mean function is Regression Trees


With one predictor, a regression tree would seek to replace
X
n X
n
mYjX x wi hyi = w j h the predictor by a discrete predictor, such that the predicted
i1 j1 value of Y would be the same for all X in the same discrete
1 x  x category. With two predictors, each category created by
wi h H i discretizing the first variable could be subdivided again
h h
according to a discrete version of the second predictor,
One choice for H is the standard normal density function, which leads to a tree-like structure for the predictions.
but other choices can have somewhat better properties. The Basic methods for regression trees are outlined in
bandwidth h is selected by the analyst; small values of h Refs. 27 and 28. The exact methodology for implementing
weigh cases with jxi  xj small heavily while ignoring other regression trees is constantly changing and is an active
cases, giving a very rough estimate. Choosing h large area of research; see Machine learning.
weighs all cases nearly equally, giving a very smooth,
but possibly biased, estimate, as shown in Fig. 4. The Dimension Reduction
bandwidth must be selected to balance bias and smooth- Virtually all regression methods described so far require
ness. Other methods for nonparametric regression include assumptions concerning some aspect of the conditional
smoothing splines, local polynomial regression, and wave- distributions FYjX, either about the mean function on
lets, among others; see Ref. 21. some other characteristic. Dimension reduction regression
seeks to learn about FYjX but with minimal assumptions.
Semiparametric Regression For example, suppose X is a p-dimensional predictor, now
A key feature of nonparametric regression is using nearby not including a 1 for the intercept. Suppose we could find a
observations to estimate the mean at a given point. If the r  p matrix B of minimal rank r such that
predictor is in many dimensions, then for most points x, FYjX FYjBX, which means that all dependence of
there may be either no points or at best just a few points that the response on the predictor is through r combinations
are nearby. As a result, nonparametric regression does not of the predictors. If r
p, then the resulting regression
scale well because of this curse of dimensionality, Ref. 22. problem is of much lower dimensionality and can be much
This has led to the proposal of semiparametric regres- easier to study. Methodology for finding B and r with no
sion models. For example, the additive regression model, assumptions about FYjX is a very active area of research;
Refs. 23, 24, suggests modeling the mean function as see Ref. 29 for the foundations; and references to this work
for more recent results.
p
X
mYjX x g j x j
BIBLIOGRAPHY
j1

1. S. M. Stigler, The History of Statistics: the Measurement of


where each g j is a function of just one predictor x j that can
Uncertainly before 1900. Cambridge MA: Harvard University
be estimated nonparametrically. Estimates can be obtained Press, 1986.
by an iterative procedure that sequentially estimates each
10 REGRESSION ANALYSIS

2. K. Pearson and S. Lee, One the laws of inheritance in man. 18. D. Collett, Modelling Binary Data, Second Edition.
Biometrika, 2: 357463, 1903. Boca Raton, FL: Chapman & Hall Ltd, 2003.
3. G. Oehlert, A First Course in Design and Analysis of Experi- 19. A. Agresti, Categorical Data Analysis, Second Edition.
ments. New York: Freeman, 2000. New York: John Wiley & Sons, 2002.
4. S. Weisberg, Applied Linear Regression, Third Edition. 20. D. M. Bates and D. G. Watts, Nonlinear Regression Analysis
New York: John Wiley & Sons, 2005. and Its Applications. New York: John Wiley & Sons, 1988.
5. R. Christensen, Plane Answers to Complex Questions: The 21. J. S. Simonoff, Smoothing Methods in Statistics. New York:
Theory of Linear Models. New York: Sparinger-Verlag Inc, Springer-Verlag Inc., 1996.
2002. 22. R. E. Bellman, Adaptive Control Processes. Princeton NJ:
6. B. Efron and R. Tibshirani, An Introduction to the Bootstrap. Princeton University Press, 1961.
Boca Raton, FL: Chapman & Hall Ltd, 1993. 23. T. Hastie and R. Tibshirani, Generalized Additive Models. Boca
7. C. L. Lawson and R. J. Hanson, Solving Least Squares Raton, FL: Chapman & Hall Ltd, 1999.
Problems. SIAM [Society for Industrial and Applied Mathe- 24. P. J. Green and B. W. Silverman, Nonparametric Regression
matics], 1995. and Generalized Linear Models: A Roughness Penalty
8. LAPACK Linear Algebra PACKAGE. http://www.netlib.org/ Approach. Boca Raton, FL: Chapman & Hall Ltd, 1994.
lapack/. 1995. 25. R. G. Staudte and S. J. Sheather, Robust Estimation and
9. R. Dennis Cook and S. Weisberg, Applied Regression Including Testing. New York: John Wiley & Sons, 1990.
Computing and Graphics. New York: John Wiley & Sons, 1999. 26. R. D. Cook, D. M. Hawkins, and S. Weisberg, Comparison of
10. C.-L Tsai and Allan D. R. McQuarrie. Regression and Time model misspecification diagnostics using residuals from least
Series Model Selection. Singapore: World Scientific, 1998. mean of squares and least median of squares fits, Journal of the
11. J. A. Hoeting, D. Madigan, A. E. Reftery, and C. T. Volinsky, American Statistical Association, 87: 419424, 1992.
Bayesian model averaging: A tutorial. Statistical Science, 27. D. M. Hawkins, FIRM: Formal inference-based recursive mod-
14(4): 382401, 1999. eling, The American Statistician, 45: 155, 1991.
12. Z. Yuan and Y. Yang, Combining linear regression 28. L. Breiman, J. H. Friedman, R. A. Olshen, and C. J. Stone,
models: When and how? Journal of the Amerian Statistical Classification and Regression Trees. Boca Raton, FL: Wads-
Association, 100(472): 12021214, 2005. worth Adv. Book Prog., 1984.
13. P. R. Rosenbaum, Observational Studies. New York: Springer- 29. R. Dennis Cook, Regression Graphics: Ideas for Studying
Verlag Inc, 2002. Regressions through Graphics. New York: John Wiley &
14. R. D. Cook, Detection of influential observation in linear Sons, 1998.
regression. Technometrics, 19: 1518, 1977.
15. R. D. Cook and S. Weisberg, Residuals and Influence in Regres-
sion. Boca Raton, FL: Chapman & Hall Ltd, available online at
SANFORD WEISBERG
University of Minnesota,
www.stat.umn.edu/rir, 1982.
School of Statistics
16. P. McCullagh and J. A. Nelder, Generalized Linear Models,
Minneapolis, Minnesota
Second Edition. Boca Raton, FL: Chapman & Hall Ltd, 1989.
17. D. W. Hosmer and S. Lemeshow, Applied Logistic Regression,
Second Edition. New York: John Wiley & Sons, 2000.
Hardware and
Architecture
C
CARRY LOGIC addition, a sum Si and a carryout Ci are produced by adding
a set of bits at the ith position. The carryout Ci produced
Addition is the fundamental operation for performing digi- during the process serves as the carry-in Ci1 for the
tal arithmetic; subtraction, multiplication, and division succeeding set of bits. Table 1 shows the underlying rules
rely on it. How computers store numbers and perform for adding two bits, Ai and Bi , with a carry-in Ci and
arithmetic should be understood by the designers of digital producing a sum Si and carry-out, Ci .
computers. For a given weighted number system, a single
digit could represent a maximum value of up to 1 less than
FULL ADDER
the base or radix of the number system. A plurality of
number systems exist (1). In the binary system, for
The logic equations that represent Si and Ci of Table 1 are
instance, the maximum that each digit or bit could repre-
shown in Equations (1) and (2). A block of logic that imple-
sent is 1. Numbers in real applications of computers are
ments these is called full adder, and it is shown in the inset
multibit and are stored as large collections of 16, 32, 64, or
of Fig. 1. The serial path for data through a full adder, hence
128 bits. If the addition of multibit numbers in such a
its delay, is 2 gates, as shown in Fig. 1. A full adder can be
number system is considered, the addition of two legal
implemented using eight gates (2) by sharing terms from
bits could result in the production of a result that cannot
Equations (1) and (2):
fit within one bit. In such cases, a carry is said to have been
generated. The generated carry needs to be added to the
Si Ai Bi Ci1 Ai Bi Ci1 Ai Bi Ci1 Ai Bi Ci1 1
sum of the next two bits. This process, called carry propa-
gation, continues from the least-significant bit (LSB) or Ci Ai Bi Ci1 Ai Bi 2
digit, the one that has the least weight and is the rightmost,
to the most-significant bit (MSB) or digit, the one with the
most weight and is the leftmost. This operation is analogous
to the usual manual computation with decimal numbers, RIPPLE CARRY ADDER
where pairs of digits are added with carries being propa-
gated toward the high-order (left) digits. Carry propagation The obvious implementation of an adder that adds two
serializes the otherwise parallel process of addition, thus n-bit numbers A and B, where A is An An1 An2 . . . A1 A0
slowing it down. and B is Bn Bn1 Bn2 . . . B1 B0 , is a ripple carry adder (RCA).
As a carry can be determined only after the addition of a By serially connecting n full adders and connecting the
particular set of bits is complete, it serializes the process of carryout C1 from each full adder as the Ci1 of the succeed-
multibit addition. If it takes a finite amount of time, say ing full adder, it is possible to propagate the carry from the
(Dg ), to calculate a carry, it will take 64 (Dg ) to calculate the LSB to the MSB. Figure 1 shows the cascading of n full
carries for a 64-bit adder. Several algorithms to reduce the adder blocks. It is clear that there is no special carry
carry propagation overhead have been devised to speed up propagation mechanism in the RCA except the serial con-
arithmetic addition. These algorithms are implemented nection between the adders. Thus, the carry logic has a
using digital logic gates (2) in computers and are termed minimal overhead for the RCA. The number of gates
carry logic. However, the gains in speed afforded by these required is 8n, as each full adder is constructed with eight
algorithms come with an additional cost, which is measured gates, and there are n such adders. Table 2 shows the
in terms of the number of logic gates required to implement typical gate count and speed for RCAs with varying number
them. of bits.
In addition to the choice of number systems for repre-
senting numbers, they can further be represented as fixed CARRY PROPAGATION MECHANISMS
or floating point (3). These representations use different
algorithms to calculate a sum, although the carry propaga- In a scenario where all carries are available right at the
tion mechanism remains the same. Hence, throughout this beginning, addition is a parallel process. Each set of inputs
article, carry propagation with respect to fixed-point binary Ai , Bi , and Ci1 could be added in parallel, and the sum for
addition will be discussed. As a multitude of 2-input logic 2 n-bit numbers could be computed with the delay of a full
gates could be used to implement any algorithm, all mea- adder.
surements are made in terms of the number of 2-input The input combinations of Table 1 show that if Ai and
NAND gates throughout this study. Bi are both 0s, then Ci is always 0, irrespective of the
value of Ci1 . Such a combination is called a carry kill
THE MECHANISM OF ADDITION term. For combinations where Ai and Bi are both 1s, Ci
is always 1. Such a combination is called a carry generate
Currently, most digital computers use the binary number term. In cases where Ai and Bi are not equal, Ci is equal to
system to represent data. The legal digits, or bits as they are Ci1 . These are called the propagate terms. Carry pro-
called in the binary number system, are 0 and 1. During pagation originates at a generate term, propagates through
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 CARRY LOGIC

Table 1. Addition of Bits Ai and Bi with a Carry-in Ci1 to Table 2. List of Gate Counts and Delay of Various Adders
Produce Sum Si and Carry-out Ci
Gate Count/Delay
Ai Bi Ci1 Si Ci
Adder Type 16-Bit 32-Bit 64-Bit
0 0 0 0 0
0 0 1 1 0 RCA 144/36 288/68 576/132
0 1 0 1 0 CLA 200/10 401/14 808/14
0 1 1 0 1 CSA 284/14 597/14 1228/14
1 0 0 1 0 CKA 170/17 350/19 695/23
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1

bit of the adder. This mechanism is static in nature. It can


be readily seen that different carry chains exist for different
sets of inputs. This introduces a dynamic dimension to the
any successive propagate terms, and gets terminated at a process of addition. The dynamic nature of the inputs could
carry kill or a new carry generate term. A carry chain is a also be used and a sum computed after the carry propaga-
succession of propagate terms that occur for any given tion through the longest carry chain is completed. This
input combination of Ai and Bi . For the addition of two leads to a classification into static and dynamic carry logic.
n-bit numbers, multiple generates, kills, and propagates An adder that employs static carry propagation always
could exist. Thus, many carry chains exist. Addition produces a sum after a fixed amount of time, whereas the
between carry chains can proceed in parallel, as there is time taken to compute the sum in a dynamic adder is
no carry propagation necessary over carry generate or kill dependent on the inputs. In general, it is easier to design
terms. a digital system with a static adder, as digital systems are
Based on the concept of carry generates, propagates, and predominantly synchronous in nature; i.e., they work in
kills, logic could be designed to predict the carries for each lock step based on a clock that initiates each operation and
uses the results after completion of a clock cycle (4).

STATIC CARRY LOGIC

From Equation (1), if Ai and Bi are both true, then Ci is true.


If Ai or Bi is true, then Ci depends on Ci1 . Thus, the term
Ai Bi in Equation (1) is the generate term or gi , and Ai Bi is
the propagate term or pi . Equation (1) can be rewritten as
in Equation (3):

Ci gi pi Ci1 (3)

where gi Ai Bi and pi Ai Bi . Substituting numbers


for i in Equation (3) results in Equations (4) and (5):

C1 g1 p1 C0 4
C2 g2 p2 C1 5

Substituting the value of C1 from Equation (4) in Equation


(5) yields Equation (6):

C2 g2 p2 g1 p2 p1 C0 (6)

Generalizing Equation (6) to any carry bit i yields Equation


(7):

Ci gi pi gi1 pi pi1 gi2    pi pi1    p1 g1


pi pi1 pi2    pi C0 (7)

Figure 1. A Ripple Carry Adder ripples the carry from stage to By implementing logic for the appropriate value of i in
stage using cascaded Full Adders.
Equation (7), the carry for any set of input bits can be
predicted.
CARRY LOGIC 3

Carry Look-Ahead Adder propagating carries through all bits of the adder. An adder
that employs this mechanism is called a carry select adder
An adder that uses Equation (7) to generate carries for the
(CSA) and is shown in Fig. 3. A CSA works on groups of k-
various bits, as soon as A and B are available, is called a
bits, and each group works like an independent RCA. The
carry look-ahead adder (CLA). From Equation (7), the carry
real carry-in is always known as the LSB, and it is used as
calculation time for such an adder is two gate delays, and a
C0. In Fig. 3, Ck is used to select one sum, like S13k2k1 or
further two gate delays are required to calculate the sum
S03k2k1 from the next group, gp2. In general, the selection
with bits Ai , Bi , and the generated carry. In general, for a
and the addition time per bit are approximately equal.
large number of bits n, it is impractical to generate the
Thus, for a group that is k bits wide, it approximately takes
carries for every bit, as the complexity of Equation (7)
2k units of time to compute the sums and a further two units
increases tremendously. It is commonly practice in such
of time to select the right sum, based on the actual carry.
cases to split the addition process into groups of k-bit CLA
Thus, the total time for a valid carry to propagate from one
blocks that are interconnected. A group CLA is shown in
group to another is 2(k 1) time units. Thus, for an optimal
Fig. 2. The groups now provide two new output functions
implementation, the groups in the CSA should be unequal
G* and P*, which are the group generate and propagate
in size, with each succeeding group being 1 bit wider than
terms. Equations (8) and (9) provide examples of how these
the preceding group. The gate count and speed of various
terms are generated for 4-bit blocks. Equation (10) shows
CSAs is listed in Table 2.
the generation of C4 using G1 and P1 :
Carry Skip Logic
G1 g4 p4 g3 p4 p3 g2 p4 p3 p2 g1 8
If an adder is split into groups, gp 0, gp 1, and so on of RCAs
P1 p4 p3 p2 p1 9 of equal width k, and if a carry-in of 0 is forced into each
group, then the carry out from each group is its generate
C4 G1 P1 C0 10 term. The propagate term is simple to compute and can be
computed by using Equation (9). As the group generate
In typical implementations, a CLA computes the sum in terms and propagate terms are thus available, the real
log2n time and uses gates to the order of nlogn. Table 2 carry-in at each group could be predicted and used to
lists the gate count and delay of various CLAs. Thus, with calculate the sum. An adder employing this mechanism
some additional gate investment, considerable speed-up is for carry propagation is called a carry skip adder (CKA) and
possible using the CLA carry logic algorithm. is shown in Fig. 3. The logic gates outside of the groups in
Based on the CLA algorithm, several methods have been Fig. 3 implement Equation (11), which is a generalization
devised to speed up carry propagation even further. Three of Equation (10) for the carry at any position i. Thus, the
such adders that employ circuit-level optimizations to process of carry propagation takes place at the group level,
achieve faster carry propagation are the Manchester Carry and it is possible to skip cary propagation over groups of
Adder (4), Ling Adder (5), and the Modified Ling Adder (6). bits:
However, these are specific implementations of the CLA
and do not modify carry propagation algorithms. Ci Gi=k Pi=k Cki (11)

Carry Select Adder


It takes 2k time units to calculate the carry from any group
The discussion in the previous section shows that the of size k. Carry propagation across groups takes an addi-
hardware investment on CLA logic is severe. Another tional n/k  2 time units, and it takes another 2k time units
mechanism to extract parallelism in the addition process to calculate the final sum. Thus, the total time is 4k n/
is to calculate two sums for each bit, one assuming a carry k  2 time units. By making the inner blocks larger in size,
input of 0 and another assuming a carry input of 1, and it is possible to calculate the sum faster, as it is then possible
choosing one sum based on the real carry generated. The to skip carry propagation over bigger groups. Table 2 lists
idea is that the selection of one sum is faster than actually the gate count and performance of various CKAs.

Figure 2. A group Carry Look


Ahead Scheme with n/k groups
each of size k.
4 CARRY LOGIC

Figure 3. The CSA and CKA propagate


carries over groups of k-bits.

Prefix Computation DYNAMIC CARRY LOGIC


Binary addition can be viewed as a parallel computation.
Dynamic carry propagation mechanisms exploit the nature
By introducing an associative operator , carry propagation
of the input bit patterns to speed up carry propagation and
and carry generation can be defined recursively. If Ci Gi
rely on the fact that the carry propagation on an average is
in Equation (3), then Equation (12) with  as the concatena-
of the order of log2n. Due to the dynamic nature of this
tion operator holds. Pi is the propagate term, and Gi is the
mechanism, valid results from addition are available at
generate term at bit position i at the boundary of a group of
different times for different input patterns. Thus, adders
size k:
that employ this technique have completion signals that
flag valid results.
Gi ; Pi gi ; pi if
(12)
i 1 and gi ; pi  Gi1 ; Pi1 if n  i > 1 Carry Completion Sensing Adder

where gt ; pt  gs ; ps gt pt gs ; pt ps by modifying The carry-completing sensing adder (CCA) works on the


Equation (3). Note that  is NOT commutative. All Ci can principle of creating two carry vectors, C and D, the pri-
be computed in parallel. As  is associative, the recursive mary and secondary carry vectors, respectively. The 1s in C
Equation (12) can be broken in arbitrary ways. The logic are the generate terms shifted once to the left and are
to compute carries can be constructed recursively too. determined by detecting 1s in a pair of Ai and Bi bits, which
Figure 4 shows an example of carry computation using represent the ith position of the addend and augend, A and
the prefix computation strategy described in Equation (12), B, respectively. The 1s in D are generated by checking the
with block size k 4 and how a combination of two 4-bit carries triggered by the primary carry vector C, and these
carry-logic blocks can perform 8-bit carry computation. are the propagate terms. Figure 5 shows an example for
The CLA, CKA, CSA, and Prefix computation have been such a carry computation process. The sum can be obtained
discussed in detail by Swartzlander (7), Henessey (8), and by adding A, B, C, and D without propagating carries. A
Koren (9). n-bit CCA has an approximate gate count of 17n  1 and a
CARRY LOGIC 5

Figure 5. The CCA and CEA use dynamic carry propagation.

2. Bit-wise XOR and AND SUM and CARRY simulta-


neously.
3. Route the XORed result back to SUM and left shift the
ANDed result and route it back to the CARRY.
4. Repeat the operations until the CARRY register
becomes zero. At this point, the result is available
in SUM.

The implementation of the algorithm and detailed com-


parisons with other carry-propagation mechanisms have
been discussed by Ramachandran (12).
Figure 5 shows an example of adding two numbers using
the CEA algorithm. Note that the Primary carry vector C in
Figure 4. Performing 4-bit prefix computation and extending it to the CCA is the same as the CARRY register value after the
8-bit numbers.
first iteration. The number of iterations that the CEA per-
forms before converging to a sum is equal to the maximum
length of the carry chain for the given inputs A and B. On
speed of n 4. Hwang (10) discusses the carry-completion average, the length of a carry chain for n-bit random
sensing adder in detail. Sklansky (11) provides an evalua- patterns is log2n. The gate count of the CEA is about
tion of several two-summand binary adders. 8n 22 gates. It approaches the CLA in terms of speed
and the CRA in terms of gate count.
Carry Elimination Adder
Ignoring carry propagation, Equation (1) describes a half- MATHEMATICAL ESTIMATION OF THE CARRY-CHAIN
adder, which can be implemented by a single XOR gate. In LENGTH
principle, it is possible to determine the sum of 2 n-bit
numbers by performing Half Addition on the input oper- For a given carry chain of length j, the probability of being
ands at all bit positions in parallel and by iteratively in the propagate state is k/k2 = 1/k. Define Pn (j) as the
adjusting the result to account for carry propagation. probability of the addition of two uniformly random n-bit
This mechanism is similar to the CCA. However, the dif- numbers having a maximal length carry chain of length  j:
ference is that the CCA uses primary and secondary carry
vectors to account for carry propagation, whereas the carry Pn j 0 if n < j; and Pn n 1=kn (13)
elimination adder (CEA) iterates. The CEA algorithm for
adding two numbers A and B is formalized by the following Pn j can be computed using dynamic programming if all
steps: outcomes contributing to probability Pn j are split into
suitable disjoint classes of events, which include each con-
1. Load A and B into two n-bit storage elements called tributing outcome exactly once. All outcomes contributing
SUM and CARRY. to Pn j can be split into two disjoint classes of events:
6 CARRY LOGIC

Class 1: A maximal carry chain of length  j does not 3.425308227539; for 32 bits, 4.379535542335; for 64 bits,
start at the first position. The events of this class 5.356384595083; and for 128 bits, 8.335725789691.
consist precisely of outcomes with initial prefixes
having 0 up to ( j  1) propagate positions followed
APPROXIMATION ADDITION
by one nonpropagate position and then followed with
the probability that a maximal carry chain of length
To generate the correct final result, the calculation must
 j exists in the remainder of the positions. A prob-
consider all input bits to obtain the final carry out. How-
ability expression for this class of events is shown in
ever, carry chains are usually much shorter, a design that
Equation (14):
considers only the previous k inputs instead of all previous
input bits for the current carry bit can approximate the
j1  t
X 1 k  1 result (13). Given that the delay cost of calculating the full
  Pnt1 t (14)
t0
k k carry chain length of N bits is proportional to log (N), if k
equals to the square root of N, the new approximation adder
In Equation (14), each term represents the condition will perform twice as fast as the fully correct adder. With
that the first (t 1) positions are not a part of a random inputs, the probability of having a correct result
maximal carry chain. If a position k < t in some considering only k previous inputs is:
term was instead listed as nonpropagating, it would
 Nk1
duplicate the outcomes counted by the earlier case t 1
PN; k 1
k  1. Thus, all outcomes with a maximal carry chain 2k2
beginning after the initial carry chains of length less
than j are counted, and none is counted twice. None of This is derived with the following steps. First consider
the events contributing to Pn j in class 1 is contained why the prediction is incorrect. If we only consider k pre-
by any case of class 2 below. vious bits to generate the carry, the result will be wrong
Class 2: A maximal carry chain of length j does begin in only if the carry propagation chain is greater than k 1.
the first position. What occurs after the end of each Moreover, the previous bit must be in the carry generate
possible maximal carry chain beginning in the first condition. This can only happen with a probability of 1=2k2
position is of no concern. In particular, it is incorrect if we consider a k-segment. Thus, the probability of being
to rule out other maximal carry chains in the space correct is one minus the probability of being wrong. Second,
following the initial maximal carry chain. Thus, there are a total of N  k 1 segments in an N-bit addi-
initial carry chains of lengths j through n are con- tion. To produce the final correct result, the segment should
sidered. Carry chains of length less than n are fol- not have an error condition. We multiply all probabilities to
lowed immediately by a nonpropagate position. produce the final product. This equation could determine
Equation (15) represents this condition: the risk taken by selecting the value of k. For example,
assuming random input data, a 64-bit approximation adder
 m m1
X 1t k  1 with 8-bit look-ahead (k 8) produces a correct result 95%
1
 (15) of the time.
k t j
k k
Figure 6 shows a sample approximation adder design
with k 4. The top and bottom rows are the usual carry,
The term Pm m 1=km handles the case of a carry propagate, and generate circuits. The figure also shows the
chain of full length m, and the summand handles the sum circuits used in other parallel adders. However, the
individual cases of maximal length carry chains of design implements the carry chain with 29, 4-bit carry
length j, j 1, j 2,. . ., m  1. Any outcome with a blocks and three boundary cells. These boundary cells
maximal carry chain with length  j not belonging to are similar but smaller in size. A Manchester carry chain
class 2 belongs to 1. In summary, any outcome with a could implement 4-bit carry blocks. Thus, the critical path
maximal carry chain of length  j, which contributes delay is asymptotically proportional to constant with this
to Pn j, is included once and only once in the disjoint design, and the cost complexity approaches N. In compar-
collections of classes 1 and 2. ison with Kogge Stone or Han Carlson adders, this design is
faster and smaller.
Adding the probabilities for collections 1 and 2 leads to It is worthwhile to note that an error indication circuit
the dynamic programming solution to Pn j provided could be and probably should be implemented because we
below, where Pn j pn j pn j 1    pn n  know exactly what causes a result to be incorrect. When-
1 pn n;, where Pn i is the probability of the occurrence ever a carry propagation chain is longer than k bits,
of a maximal length carry chain of precisely length i. the result given by the approximation adder circuit will
Thus, the expected value of the carry length [being the be incorrect. That is, for the ith carry bit, if the logic
sum from i 1 to n of i Pn i] becomes simply the sum of function - (ai-1 XOR bi-1) AND (ai-2 XOR bi-2) AND. . .
the Pn j from j 1 to n. Results of dynamic programming AND (ai-k XOR bi-k) AND (ai-k-1 AND bi-k-1) is true, the
indicate that the average carry length in the 2-ary number prediction will be wrong. We could implement this logic
system for 8 bits is 2.511718750000; for 16 bits it is function for each carry bit and perform the logical OR of all
CARRY LOGIC 7

Figure 6. An example 32-bit approximation adder.

these n-4 outputs to signal us if the approximation is 6. Milos D. Ercegovac and Tomas Lang, Digital Arithmetic. San
incorrect. Mateo, CA: Morgan Kaufmann, 2003.
7. E. E. Swartzlander Jr., Computer Arithmetic. Washington,
D.C.: IEEE Computer Society Press, 1990, chaps. 58.
HIGH PERFORMANCE IMPLEMENTAION
8. J. L. Henessey and D. A. Patterson, Computer Architecture: A
Quantitative Approach, 2nd ed.San Mateo, CA: Morgan Kauff-
The most recently reported adder implemented with the man, 1996, pp. A-38A-46.
state-of-art CMOS technology is (14). The adder style used 9. I. Koren, Computer Arithmetic Algorithms, 2nd ed. A. K. Peters
in that implementation is a variation of the prefix adder Ltd., 2001.
previously mentioned. Consideration was given not only to 10. K. Hwang, Computer Arithmetic. New York: Wiley, 1979,
gate delay but also to fan-in, fan-out as well as to wiring chap. 3.
delay in the design. Careful tuning was done to make sure 11. J. Sklansky, An evaluation of several two-summand binary
the design is balanced, and the critical path is minimized. adders, IRE Trans. EC-9 (2): 213226, 1960.
12. R. Ramachandran, Efficient arithmetic using self-timing,
BIBLIOGRAPHY Masters Thesis, Corvallis, OR: Oregon State University, 1994.
13. S.-L. Lu, Speeding up processing with approximation circuits,
1. H. L. Garner, Number systems and arithmetic, in F. Alt and M. IEEE Comput. 37 (3): 6773, 2004.
Rubinoff (eds.) Advances in Computers. New York: Academic 14. S. Mathew et al., A 4-GHz 130-nm address generation unit
Press, 1965, pp. 131194. with 32-bit sparse-tree adder core, IEEE J. Solid-State Circuits
2. E. J. McCluskey, Logic Design Principles. Englewood Cliffs, 38 (5): 689695, 2003.
NJ: Prentice-Hall, 1986.
3. S. Waser and M. J. Flynn, Introduction to Arithmetic for Digital
SHIH-LIEN LU
System Designers. New York: Holt, Reinhart and Winston,
Intel Corporation
1982.
Santa Clara, California
4. N. H. E. Weste and K. Eshragian, Principles of CMOS VLSI RAVICHANDRAN RAMACHANDRAN
DesignA Systems Perspective, 2nd ed. Reading, MA: Addison-
National Semiconductor
Wesley, 1993, chaps. 58. Corporation
5. H. Ling, High speed binary parallel adder, IEEE Trans. Com- Santa Clara, California
put., 799802, 1966.
A
AUTOMATIC TEST GENERATION designers to assemble systems using intellectual property
(IP) cores purchased from vendors. SoCs present their own
INTRODUCTION challenges in testing. SoC testing is complicated even more
by observing that vendors are, understandably, reluctant
This article describes the topic of automatic test generation to provide sufficient detail on the inner workings of their
(ATG) for digital circuitsjmd systems. Considered within cores to enable the development of a suitable defect test.
the scope of ATG are methods and processes that support Indeed, vendors may be unwilling to provide test vectors
computer-generated tests and supporting methodologies. that can provide hints on the inner workings. As a result,
Fundamental concepts necessary to understand defect the idea of embedded test has grown out of these challenges.
modeling and testing are presented to support later dis- Third, the sheer complexity of the systems can make it
cussions on ATG techniques. In addition, several closely prohibitively expensive to develop effective tests manually.
related topics are also presented that affect the ATG pro- As a result, reliance on tools that can generate tests auto-
cess, such as design for test (DFT) methodologies and matically can reduce manufacturing costs. Furthermore,
technologies. effective testing schemes also rely on the integration of
One can test digital systems to achieve one of several testing structures to improve the coverage, reduce the
goals. First, testing can be used to verify that a system number of tests required, and complement the ATG pro-
meets its functional specifications. In functional testing, cess. Fourth, ATG serves as an enabling technology for
algorithms, capabilities, and functions are verified to other testing techniques. For example, synthesis tools
ensure correct design and implementation. Once a system remove the burden of implementing systems down to the
has been verified to be correct, it can be manufactured in gate level. At the same time, gate level detail, necessary for
quantity. Second, one wishes to know whether each man- assembling a testing regimen, may be hidden from the
ufactured system is defect free. Third, testing can be used to designer. ATG fills this gap by generating tests for synth-
determine whether a system is defect free. Functional tests esis without requiring the designer to develop test synth-
can provide the basis for defect tests but are ineffective in esis tools as well.
providing acceptable defect tests. Defect tests can be devel-
oped by creating tests in an ad hoc fashion followed by FUNDAMENTALS OF TESTING
evaluation using a fault simulator. In complex systems, this
process can be challenging and time consuming for the test In this section, fundamental concepts from testing are
engineer. As a result, many effective techniques have been introduced. First, fault modeling is presented todefinelhe
developed to perform ATG as well as to make ATG more target for testing techniques. Second, testing measures are
effective. presented to provide a metric for assessing the efficacy of a
Technologic trends have continued to offer impressive given testing regimen. Finally, fault simulation is usedto
increases in capability and performance in computing func- quantify the testing measures. We will use the three uni-
tion and capacity, Moores law noted the annual doubling of verse mode (2) to differentiate the defect from the mani-
circuit complexities in 1966 that continued through 1976 festation of the fault and also the system malfunction. A
(1).1 Although the rate of complexity doubling slowed, such fault is the modelof the defect that is present physically in
increases are both nontrivial and continuous with the the circuit. An error is the manifestation of the fault where
increases in complexity comes the added burden of testing
a signal will have a value that differs from the desired
these increasingly complex systems. value. A failure is the malfunction of the system that results
Supporting the technologic improvements are comple- from errors.
mentary advances in the many supporting technologies
including design tools, design practices, simulation, man- Fault Modeling
ufacturing, and testing. Focusing on testing, the technolo-
gic advances have impacted testing in several ways. First, Circuits can fail in many ways. The failures can result from
the increase in the number of pins for an integrated circuit manufacturing defects, infant mortality, random failures,
has not increased at the same rate as the number of devices age, or external disturbances (2). The defects qan be loca-
on the integrated circuit. In the context of testing, the lized, which affect function of one circuit element, or dis-
increasing relative scarcity of pins creates a testing bottle- tributed, which affect many of all circuit elements. The
neck because more testing stimulus and results must be failures can result in temporary or permanent circuit fail-
communicated through relatively fewer pins. Second, ure. The fault model provides an analytical target for
design methodologies have changed to reflect the trends testing methodologies and strategies. Thus, the fidelity of
in the introduction of increasingly more complex systems. the fault models, in the context of the implementation
So-called systems on chip (SoC) approaches enable technology, can impact the efficacy of the testing (3). For
example, the stuck fault model is considered to be an
1
ineffective model for many faults that occur in CMOS
Moore actually stated his trend in terms of the number of
components per integrated circuit for minimum cost (1)
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 AUTOMATIC TEST GENERATION

Bridging Fault
A G
B G1 SA1
C H J G2
D G2 G4 D Q
Delay I2
E I
F G3
Memory
O1 G3
K G1
I3

Figure 1. An illustration of fault models.

G4
circuits. In addition, the fault model may influence the I4
overall test strategy.
The fault models selected depend on the technology,
used to implement the circuits. Manufacturing defects exist
as a consequence of manufacturing the circuit. The intro- Figure 2. Illustration of input stuck-at faults.
duction and study of manufacturing defects is a heavily
studied topic because of its impact on the profitability of the
device. Dust or other aerosols in the air can affect the defect
statistics of a particular manufacturing run. In addition, this case, O1 I3 I4 with G3 and G4 not affected directly
mask misalignment and defects in the mask can also by the fault.
increase the defect densities. Other fault models can
account for additional failure processes such as transient Delay Fault Models. A delay fault is a fault in which a
faults, wear out, and external disturbances. Figure 1 gives part of the circuit operates slowly compared with a correctly
some example faults that are discussed in more detail in the operating circuit. Because normal manufacturing varia-
following sections. tions result in delay differences, the operation must result
in a sufficient delay discrepancy to produce a circuit mal-
Stuck-at Fault Models. Stuck-at fault models are the function. For example, if a delay fault delays a change to a
simplest and most widely used fault models. Furthermore, flip-flop excitation input after the expected clock edge, then
the stuck-at fault model also models a common failure mode a fault is manifest. Indeed, when a delay fault is present,
in digital circuits. The stuck-at fault model requires the the circuit may operate correctly at slower clock rates, but
adoption of several fundamental assumptions. First, a not at speed. Delay faults can be modeled at several levels
stuck-at fault manifests itself as a node being stuck at (4). Gate delay fault models are represented as excessive
either of the allowable logic levels, zero or one, regardless propagation delay. The transition fault model is slow to
of the inputs that are applied to the gate that drive the node. transition either a from 0 to 1 or from 1 to 0. A path delay
Second, the stuck-at fault model assumes that the faults are fault is present when the propagation delay through a
permanent. Third, the stuck-at fault model assumes a series of gates is longer than some tolerable worst case
value for the fault, but otherwise preserves the gate func- delay. Indeed, a current industry practice is to perform
tion. The circuit shown in Fig. 1 is used to illustrate the statistical timing analysis of parts. The manufacturer can
fault model. The output of gate G1 can be stuck-at 1 (SA-1) determine that the parts can be run at a higher speed with a
as a result of a defect. When the fault is present, the certain probability so that higher levels of performance can
corresponding input to G4 will always be one. To express be delivered to customers. However, this relies on the
the error, a discrepancy with respect to fault-free operation statistical likelihood that delays will not be worst case
must occur in the circuit as a consequence of the fault. To (4). By running the device at a higher clock rate indicated
force the discrepancy, the circuit inputs are manipulated so by statistical grading, devices and structures that satisfy
that A B 1, and a discrepancy is observed at the output worst-case timing along the critical path may not meet the
of G1. A second example circuit is shown in Fig. 2, which timing at the new, higher clock rate. Hence, a delay fault
consists of an OR gate (G1) that drives one input in each of cas seem to be a consequence of the manufacturing deci-
three AND gates (G2, G3, and G4). Consider the presence of sions. Assuming the indicated delay fault in Fig. 1, Fig. 3
an SA-1 fault on any input to G1 fault results in the output gives a timing diagram that shows the manifestation of the
being 1 as a consequence of the fault. In G1 input and output fault. In this circuit, the delay fault causes the flip-flop
SA-1 faults are indistinguishable and for modeling pur- input, J, to change later, which results in a clock period
poses can be collapsed into a single fault. A somewhat delay in the flip-flop state change. Because of the nature of
higher fidelity model can also include gate input stuck delay faults, circuits must be tested at speed to detect the
faults. For example, in the event gate input I2 has a delay fault. As posed here, the delay fault is dynamic,
stuck-at 1 fault, the situation is somewhat different. In requiring two or more test vectors to detect the fault.
AUTOMATIC TEST GENERATION 3

Table 1. Input sequence to detect transistor Q1-stuck-open


Clock
A B Note
0 0 Set C to 1
J 0 1 C remains 1 for fault, 0 for no fault
delay
fault
J

exploration into CMOS circuit structures. CMOS circuits


Q
are constructed from complementary pull-up networks of
PMOS transistors and pull-down networks of NMOS tran-

Q sistors. In addition, MOS transistors switch based on vol-
tage levels relative to the other transistor terminals. The
Figure 3. Illustration of a delay faults. switching input, or gate, is the input and draws no current
other than very low leakage currents. The gate does, how-
Bridging Faults. Bridging faults exist when an undesir- ever, have significant parasitic capacitance that must be
able electrical connection occurs between two nodes result- charged and discharged to switch the transistor. Thus,
ing in circuit performance degradation or malfunction. significant currents are drawn when transistors are
Bridging faults between a circuit node and power supply switched.
or ground may be manifest as stuck faults. Furthermore, In addition to the stuck faults, CMOS circuits have an
bridging faults may result in behavioral changes such as interesting failure mode where an ordinary gate can be
wired-and, wired-or, and even sequential characteristics transformed into a dynamic sequential circuit for certain
when the bridging fault creates a feedback connection (5). types of faults. The fault is a consequence of a transistor
Bridging faults require physical proximity between the failure, low quiescent currents, and capacitive gate inputs.
circuit structures afflicted by the bridging faults. In Fig. 4, if transistor Q1 is stuck open and if A = 0, the past
Figure 1 gives an example of a bridging fault that changes value on node C is isolatedelectrically and will act as a
the combinational circuit into a sequential circuit. storage element through the capacitance on the inverter
input. Table 1 summarizes the sequence of inputs neces-
CMOS Fault Models. CMOS technology has several fault sary to detect the transistor Q1 stuck open fault. To detect
modes that are unique to the technology (5). Furthermore, this fault, node C must first be set by assigning A = B = 0
as a consequence of the properties of the technology, alter- followed by setting B = 1 to store the value at the input of
native methods for detecting faults in CMOS circuits are G2. Each of the four transistors in the NAND gate will
necessary. CMOS gates consist of complementary networks require a similar test.
of PMOS and NMOS transistors structured such that sig- The CMOS circuits current draw can be used as a
nificant currents are drawn only when signal changes diagnostic for detecting faults. For example, because the
occur. In fault-free operation, when no signal changes CMOS circuit should only draw significant currents when
occur, the circuit draws very low leakage currents. Under- the circuit is switching, any significant deviation from a
standing the different fault models requires deeper known current profile suggests faults. Indeed, the CMOS

Capacitive
B
Input
C D

Q1
stuckopen

G G
1 2

Figure 4. An illustration of a CMOS memory fault.


4 AUTOMATIC TEST GENERATION

logic gates may function correctly, but when faults are A


present, the circuit may draw abnormally large power
supply currents. Testing for faults based on this observa- B
tion is called IDDQ testing. Bridging faults are common in
C
CMOS circuits (6) and are detected effectively with IDDQ
testing (7). IDDQ faults can have a significant impact on D
portable designs where the low current drawn by CMOS
circuits is required. Increased IDDQ currents can result
from transistors that are degraded because of manufactur-
ing defects such that measurable leakage currents are
drawn. In addition, bridging faults can also show increased
IDDQ currents. Cross Point Fault

Memory Faults. Semiconductor memories have struc-


tures that are very regular and very dense. As a result, Figure 5. An illustration of a crosspoint fault.
memories can exhibit faults that are not observed ordina-
rily in other circuits that can complicate the testing process.
The faults can affect the memory behavior in unusual ways
(8). First, a fault can link two memory cells such that when a detectable defects be supplemented with other testing
value is written into one cell, the value the linked cell approaches. Furthermore, an integrated circuit is gener-
toggles. Second, the memory cell can only be written to 0 ally integrated with other circuit technologies that draw
or 1 but cannot be written the opposite value. Third, the significant quiescent currents, for example, IC pads, bipo-
behavior of a memory cell may be sensitive to the contents of lar, and analog circuits. Thus, testing for IDDQ defects
neighboring cells. For example, a particular pattern of requires that the supply for IDDQ testable circuits be iso-
values stored in surrounding cells may prevent writing lated from the supply for other parts of the circuit.
into the affected cell. Fourth, the particular pattern of
values stored in the cells can result in a change in the Deep Sub-Micron (DSM). Deep sub-micron (DSM) tech-
value in the affected cell. The nature of these faults make nologies offer the promise of increased circuit densities and
detection challenging because the test must take into speeds. For several reasons, the defect manifestations
account the physical locality of memory cells. change with decreasing feature size (3) First, supply vol-
tages are reduced along with an associated reduction in
Crosspoint Faults. Crosspoint faults (9) are a type of noise margins, which makes circuits more suscepitible to
defect that can occur in programmable logic arrays malfunctions caused by noise. Second, higher operating
(PLAs). PLAs consist of AND arrays and OR arrays with frequencies affect defect manifestations in many ways.
functional terms contributing through programming tran- Capacitive coupling increases with increasing operating
sistors to either include or exclude a term. In field program- frequency, which increases the likelihood of crosstalk.
mable devices, a transistor is programmed to be on or off, Furthermore, other errors may be sensitive to operating
respectively, to represent the presence or absence of a frequency and may not be detected if testing is conducted at
connection. A crosspoint fault is the undesired presence slower frequencies. Third, leakage currents increase with
or absence of a connection in the PLA. Clearly, because the decreasing feature size, which increases the difficulty of
crosspoint fault can result in a change in the logic function, using tests to detect current anomalies. Fourth, increasing
the stuck fault model cannot model crosspoint defects circuit density has resulted in an increase in the number of
effectively. A crosspoint fault with a missing connection interconnect levels, which increases the likelihood of inter-
in the AND array results in a product term of fewer vari- connect related defects. Although the classic stuck-at fault
ables, whereas an extra connection results in more vari- model was not conceived with these faults in mind, the
ables in the product term. For example, consider function stuck-at fault model does focus testing goals on controlling
f(A, B, C, D) = AB + CD implemented on a PLA. The exis- and observing circuits nodes, thereby detecting many inter-
tence of a crosspoint fault can change the function to fcpf(A, connect faults that do not conform to the stuck-at fault
B, C, D) = ABC + CD. Figure 5 diagrams the structure of model.
the PLA and the functional effect of the crosspoint fault.
Measures of Testing. To gauge the success of a test meth-
IDDQ Defects. An ideal CMOS circuit draws current only odology, some metric for assessing the test regimen and any
when logic values change. In practice, because transistors associated overhead is needed. In this section, the mea-
are not ideal, a small leakage current is drawn when no sures of test set fault coverage, test set size, hardware
circuit changes occur. Many circuit defects result in anom- overhead, performance impacts, testability, and computa-
alous significant current that are one type of fault mani- tional complexity are presented.
festation. Furthermore, many circuits can have a
characteristic IDDQ current when switching. Again, this Fault Coverage. Fault coverage, sometimes termed test
characteristic current can change in response to defects. coverage, is the percentage of targeted faults that have
Detectable IDDQ defects have no relation to the expected been covered by the test regimen. Ideally, 100% fault cover-
correct circuit outputs, which require that testing for IDDQ
AUTOMATIC TEST GENERATION 5

Rest of Circuit

Primary
Outputs

Primary
Inputs S

Figure 6. Representative circuit with fault.

age is desired; however, this statistic can be misleading circuitry may displace circuitry that contributes to the
when the fault model does not reflect the types of faults functional performance.
accurately that can be expected to occur (10). As noted
earlier, the stuck-at fault model is a simple and popular Testability. Testability is an analysis and a metric that
fault model that works well in many situations. CMOS describes how easily a system may be tested for defects. In
circuits, however, have several failure modes that are circuit defect testing, the goal is to supply inputs to the
beyond the scope of the simple stuck-at fault model. Fault circuit so that it behaves correctly when no defects are
coverage is determined through fault simulation of the present, but it malfunctions if a single defect is present. In
respective circuit. To assess the performance of a test, a other words, the only way to detect the defect is to force the
fault simulator should model accurately the targeted fault circuit to malfunction. In general, testability is measured in
to get a realistic measure of fault coverage. terms of the specific and the collective observability and
controllability of nodes within a design. For example, a
Size of Test Set. The size of the test set is an indirect circuit that provides the test engineer direct access (setting
measure of the complexity of the test set. Larger test sets and reading) to flip-flop contents is estable more easily than
increase the testing time, which have a direct a direct one that does not, which gives a corresponding better
impact on the final cost if expensive circuit testers are testability measure. In the test community, testability
employed. In addition, the test set size is related to the often is described in the context of controllability and to
effort in personnel required computationally to develop the observability. Controllability of a circuit node is the ability
test. The size of the test set depends on many factors to set the node to a particular value. Observability of a
including the ease with which the design can be tested circuit node is the ability to observe the value of the node
as well as integrating DFT methodologies. Use of scan path (either complemented or uncomplemented) at the circuit
approaches with flip-flops interconnected as shift registers outputs. Estimating the difficulty to control and to observe
gives excellent fault coverages, yet the process of scanning circuit nodes forms the basis for testability measures.
into and from the shift register may result in large test sets. Figure 6 presents a simple illustration of the problem
and the process. The node S is susceptible to many types
Hardware Overhead. The addition of circuity to improve of faults. The general procedure for testing the correct
testability through the integration of built-in test and built- operation of node S is to control the node to a value com-
in self test (BIST) capabilities increases the size of a system plementary to the fault value. Next, the observed value of
and can have a significant impact on circuit costs. The ratio the signal is propagated to system outputs for observation.
of the circuit size with test circuitry to the circuit without Detecting faults in systems that have redundancy of any
test circuitry is a straightforward measure of the hardware sort requires special consideration to detect all possible
overhead. If improved testability is a requirement, then faults. For example, fault-tolerant systems that employ
increased hardware overhead can be used as a criterion for triple modular redundancy will not show any output dis-
evaluating different designs. The additional hardware can crepancies when one masked fault is present (2). To make
simplify the test development process and enable testing the modules testable, individual modules must be isolated
for cases that are otherwise impractical, System failure so that the redundancy does not mask the presence of
rates are a function of the size and the complexity of the faults. In addition, redundant gates necessary to remove
implementation, where ordinarily larger circuits have hazards from combinational circuits result in a circuit
higher failure rates. As a result, the additional circuitry where certain faults are untestable. Improved testability
for test can increase the likelihood of system failure. can be achieved by making certain internal nodes obser-
vable through the addition of test points. The Sandia con-
Impact on Performance. Likewise, the addition of test trollability/observability analysis program is an example
circuitry can impact system performance. The impact can application that evaluates the testability of a circuit or
be measured in terms of reduced clock rate, higher power system (11).
requirements, and/or increased cost. For example, scan
design methods add circuitry to flip-flops that can switch
between normal and test modes and typically with have 2
For example, an exponential time algorithm may double the
longer delays compared with circuits not so equipped. For required resources when the problem size is increased by this
devices with fixed die sizes and PLAs, the addition of test result is much like what happens when you double the number
of pennies on each successive the square of a chess board.
6 AUTOMATIC TEST GENERATION

Computational Complexity. The computational complex- ALGEBRAIC APPROACHES FOR ATG


ity measures both the number of computations and the
storage requirements necessary to achieve a particular Algebraic-techniques may be a used to derive tests for
algorithmic goal. From these measures, bound estimates faults and can be used in ATG. The Boolean difference
of the actual amount of time required can be determined. In (2,14,15) is an algebraic method for finding a test should one
testing applications, the worst-case computational com- exist. Given a Boolean function F the Boolean difference is
plexity for many algorithms used to find tests unfortu- defined as
nately is bad. Many algorithms fall in the class of NP-
Complete algorithms for which no polynomial time (i.e, dFX
Fx1 ; x2 ; ; xi1 ; 0; xi1 ; ; xn F
good) algorithm exists. Instead, the best known algorithms dxi
to solve NP-Complete problems require exponential time.2
 x1 ; x2 ; ; xi1 ; 1; xi1 ; ; xn 1
Although devising a perfect test is highly desirable, in
practice, 100% coverage generally is not achieved. In dFX
where dxi is the Boolean difference of the Boolean func-
most cases, tests are found more quickly than the worst
case, and cases taking too long are stopped, which results in tion F, xi is an input, and  is the exclusive-or. One
a test not being found. Some have noted that most tests are dFX
interpretation of the quantity is to show the depen-
generated in a reasonable amount of time and provide an dxi
empirical rationale to support this assertion (12). dFX
dence of F(X) on input xi. If 0, the function is
dxi
Fault Simulation independent of xi, which indicates that it is impossible to
Fault simulation is a simulation capable of determining dFX
find a test for a fault on xi. On the other hand, if 1,
whether a set of tests can detect the presence of faults dxi
within the circuit. In practice, a fault simulator simulates then the output depends on xi, and a test for a fault on xi can
the fault-free system concurrently with the faulty system. be found.
In the event that faults produce circuit responses that differ The Boolean difference can be used to determine a test
from the fault-free cases, the fault simulator records the because it can be used in an expression that encapsulates
detection of the fault. both controllability and observability into a Boolean tau-
To validate a testing approach, fault simulation is tology that when satisfied, results in a test for the fault
employed to determine the efficacy of the test. Fault simu-
lation can be used to validate the success of a test regimen dFX
xi 1 2
and to give a quantitative measure of fault coverage dxi
achieved in the test. In addition, test engineers can use
fault simulationfor assessing functional test patterns. By for XiSA faults and
examining the faults covered, the test engineer can identify
circuit structures that have not received adequate coverage dFX
xi 1 3
and can target these structures formore intensive tests. dxi
To assess different fault models, the fault simulator
should both model the effect of the faults and also report for XiSA 1 faults. Note that the Boolean difference
the faults detected. In the test for bridging faults detectable represents the observability of input xi, and the assertion
by IDDQ testing, traditional logic and fault simulators are associated with xi represents its controllability. Equations
incapable of detecting such faults because these.faults may (2) and (3) can be reduced to SOP or POS forms. A suitable
not produce a fault value that can differentiate faulty from assignment of inputs that satisfies the tautology is the test
fault-free instances. In Ref. 13, a fault simulator capable of pattern. Finding a suitable test pattern is intractable com-
detecting IDDQ faults is described. putationally if product and sum terms have more than two
terms (16).
BASIC COMBINATIONAL ATG TECHNIQUES
Boolean Satisfiability ATPG
In ATG, a circuit specification is used to generate a set of Boolean satisfiability SAT-ATPG (17) is related to the
tests. In this section, several basic techniques for ATG are Boolean difference method for determining test patterns.
presented. The stuck-at fault model described previously As in the Boolean difference method, SAT-ATPG constructs
provides the test objective for many ATG approaches. The the Boolean difference between the fault free and the faulty
single stuck fault is a fault on a node within the circuit that circuits. Rather than deriving the formula to derive a test,
is either SA-0 or SA-l. Furthermore, only one fault is SAT-ATPG creates a satisfiability problem such that the
assumed to be in the circuit at any given time. Presented variable assignments to achieve satisfiability are a test for
in detail here are algebraic approaches for ATG, Boolean the fault. The satisfiability problem is derived from the
satisfiability ATG, the D-Algorithm, one of the first ATG combinational circuit by mapping the circuit structure into
algorithms, and PODEM. Subsequent developments in a directed acyclic graph (DAG). From the DAG, a formula in
ATG are compared largely with the D-Algorithm and other conjunctive normal form (CNF) is derived that when satis-
derived works. fied, produces a test for a fault in the circuit. Although the
SAT problem is NP-Complete (16), the structure of the
AUTOMATIC TEST GENERATION 7

X1 fault-free and faulty circuits must be (1) to distinguish


& between the two expressed as
b1
f
X2 F Ffaulty Ffault - free 1 5
+
b2 where satisfication of the tautology results in a test for the
X3 desired fault. Starting with the output, the conjunction of
& i all nodes is formed following the edges of the DAG. The
g
fault-free CNF for the circuit is the conjunction of the
& following conjunctive normal forms for the various circuit
X4 h structures

X5 & F fF i
 F f i G5
f X1 f b1 f X1 b1 G1

i gi hi g h G4
Figure 7. Example combinational circuit. g b2 g X3 g b2 X3 G2 6
X2 b1 X2 b1 Top fan - out at b
X2 b2 X2 b2 Bottom fan - out at b
resulting formula has specific features that tend to reduce
h X4 h X5 h X4 X5 G3
the computational effort compared with the general SAT
problem. Indeed, the resulting CNF formula is character-
ized by having a majority of the factors being two terms.
The CNF for the i-SA-0 fault requires a modification to
Note that satisfiability of a CNF formula with two terms
the circuit DAG to represent the presence of the fault. From
(2SAT) is solvable in linear time. Reference 17 notes that as
the DAG structure derived from the circuit and the target
many as 90% of the factors are two elements. This structure
fault, a CNF formula is derived. A CNF that represents the
suggests strongly that satisfiability for expressions that
fault test is formed by taking the exclusive-or of the fault
results from this construction are solvable in a reasonable
free circuit with a CNF form that represents the circuit with
amount of time, but the are not guaranteed in polynomial
the fault. The CNF for the faulted circuit is derived by
time. The basic SAT-ATPG is described in more detail in the
modifying the DAG by breaking the connection at the point
following paragraphs.
of the fault and adding a new variable to represent the fault.
As an example, consider the circuit example used to 0
The variable i is used to representthe fault i-SA-0. Note
illustrate the D-Algorithm in Fig. 7. The DAG derived is
that in the faulty circuit, the combinational circuit deter-
given in Fig. 8. The mapping of the circuit to the DAG is
mining i in the fault-free circuit is redundant, and the CNF
straightforward with each logic gate, input, output, and
formula for the faulted circuit is
fanout point mapping to a node in the DAG. Assuming
inputs X, Y, and output Z, the conjunctive normal forms for 0 0
the NAND and OR gates are (17). F 0 fF 0 i0 F f i G5
0
i The fault
 7
f X1 f b1 f X1 b1 G1
Z XZ YZ X Y
 NAND X2 b1 X2 b1 Top fan - out at b
  Z X Y OR 4
Z XZ Y
Combining Equations (6) and (7), the exclusive-or of the
faulty and fault-free formulas, and eliminating redundant
CNF formulas for other gates and the procedure for terms gives the following formula whose satisfaction is a
handling gates with three or more inputs are also summar- test for the fault
ized in Ref. 17. The CFN for the fault-free and faulty circuits
are derived from the DAG. The exclusive-or of the outputs of F fF i
 F f i
f X1 f b1 f X1 b1
i gi hi g h
a g b2 g X3 g b2 X3
X1 f X2 b1 X2 b1
G1
X2 b2 X2 b2
b
h X4 h X5 h X4 X5
0
X2 g i
c G2 0 0
X3 j
F
F F 0 BDF F BDX X BDX
 X 0 BD

i G5
G4 8
d
X4 h
e G3
X5 Note that the last line of Equation (8) represents the
exclusive-or for the faulty and the fault-free circuits, and
Figure 8. DAG for circuit from Fig. . Logic gate nodes labeled to the variable BD is the output that represents the exclusive-
show original circuit functions.
8 AUTOMATIC TEST GENERATION

or of the two. Significantly, most terms in Equation (8) have Table 3. Singular covers, PDCFs, and PDCs for several
two or fewer terms. basic gates
The next step is to determine an assignment that satis- Gate Singu9lar cover PDCF PDC
fies Equation (8). The problem is broken into two parts
where one part represents the satisfaction of the trinary
terms and the second the satisfaction of binary terms
(solvable in polynomial time) that are consistent with the
trinary terms. Efforts that followed (17) concentrated on
identifying heuristics that improved the efficiency of find- through the selection of an appropriate PDCF and then
ing assignments. propagated to a primary output. Once the D-drive is com-
plete, justification is performed. Justification is the process
D-Algorithm of determining signal values for internal node and primary
inputs consistent with node assignments made during D-
The D-Algorithm (18) is an ATG for combinational logic
drive and intermediate justification steps. In the event a
circuits. Furthermore, the D-Algorithm was the first com-
conflict occurs, where at some point a node must be both 0
binational ATG algorithm to guarantee the ability to find a
and 1 to satisfy the algorithm, backtracking occurs to the
test for a SA-0/1 fault should a test exist. In addition, the D-
various points in the algorithm where choices for assign-
Algorithm provides a formalism for composing tests for
ments were possible and an alternate choice is made. An
combinational circuits constructed modularly or hierarchi-
input combination that propagates the fault to the circuit
cally. The D-Algorithm relies on a five-valued Boolean
outputs and can be justified at the inputs is a test pattern
algebra to generate tests, which is summarized in
 represent a discre- for the fault. To generate a test for a combinational logic
Table 2. Note that the values D and D
circuit, the D-Algorithm is applied for all faults for which
pancy between the fault free and faulty signal values where
tests are desired.
these values can be either the seminal error of the fault or
The D-Algorithm is applied to the circuit given in Fig. 8.
the discrepancy attributable to the fault that has been
For an example demonstration, consider the fault i-SA-0.
propagated through several layers of combinational logic.
Figure 9 gives a summary of the algorithmic steps that
The D-AIgorithm also requires two additional assump-
results in the determination of the test pattern. The result-
tions. First, exactly one stuck-at fault may be present at
ing test pattern for the example in Fig. 9 is
any given time. Second, other than the faulted node, circuit
X1 X2 X3 X4 X5 111XX, where X is as defined in Table 2.
structures are assumed to operate fault free (i.e., normaly).
Either fault simulation can be used to identify other faults
To begin the algorithm, the discrepancy that represents
detected by this test, or the dont cares can be used to
the direct manifestation of the fault is assigned to the
combine tests for two or more different faults.
output of a primitive component. For this component, the
input/output combination that forces the manifestation of
Path-Oriented Decision Making (PODEM)
the fault is called the primitive D cube of failure (PDCF).
The PDCF provides a representation of the inputs neces- The D-Algorithm was pioneering in that it provided a
sary to result in discrepancies for the faults of interest. The complete algorithmic solution to the problem of test pattern
effect of the fault is propagated through logic circuits using generation for combinational circuits. In the years after it
the PDC for each circuit. The application of PDCs continues was introduced, researchers and practitioners noticed that
with primitive elements until the discrepancy is propa- the D-Algorithm had certain undesirable asymptotic prop-
gated to one or more primary outputs. Next, the inputs erties and in the general case was found to be NP-Complete
are justified through a backward propagation step using (10). This term means the worst case performance is an
the singular cover for each component in the backward exponential number of steps in the number of circuit nodes.
path. The singular cover is a compressed truth table for the Despite this finding for many types of problems, the D-
fault-free circuit. Singular covers, PDCFs, and PDCs for Algorithm can find tests in a reasonable amount of time. In
several basic gates are shown in Table 3. Note that the Ref. 17, it was noted that the D-Algorithm was particularly
PDCFs and PDCs follow straightforwardly from the logic inefficient in determining tests for circuit structures typi-
functions and the five valued Boolean logic summarized in cally used in error correcting circuits (ECC). Typically, ECC
Table 2. Theoretic derivation of these terms are presented circuits have a tree of exclusive-OR gates with reconver-
in Ref. 18. gent fanout through two separate exclusive-OR trees. The
The D-Algorithm consists principally of two phases. The path-oriented decision making (PODEM) test pattern gen-
first phase is the D-drive phase, where the fault is set eration algorithm (20) was proposed to speed the search for
tests for circuits similar to and used in ECC. In fact, the
researchers learned that their approach was in general as
Table 2. Boolean values
effective and more efficient computationally compared with
Value Meaning the D-Algorithm.
1 Logic one PODEM is fundamentally different from the D-Algo-
0 Logic zero rithm in that test searches are conducted on primary
D
 Discrepancy: expected one, but is zero due to fault inputs. As a result, the amount of backtracking that might
D Discrepancy: expected zero, but is one due to fault occur is less than the D-Algorithm because fewer places
X Dont care, could be either 0 or 1 exist where backtracking can occur. Furthermore, the
AUTOMATIC TEST GENERATION 9

Node
TC a b c d e f g h i j Note

1 0 X D PDCF

2 0 0 X D D D-Drive
3 1 1 0 0 X D D Justify
4 1 1 1 0 0 X D D Justify
5 1 1 1 X X 0 0 X D D Justify

Figure 9. The D-algorithm, step by step. Values in boxes show work for a specific step.

backtracking is simpler computationally. PODEM works approach is to load the smallest initial count and then clock
by selecting a fault for evaluation and then choosing the until the count rolls over after 2N counts. For long counters,
inputs one at a time to determine whether the input com- this exhaustive testing of the count function is complete but
bination serves as a test pattern. The evaluation process is excessively time consuming. Ad hoc techniques can be
based on the same five valued logic family used in the D- employed to devise a test. For example, loading initial
Algorithm. The algorithm searches for a discrepancy counts at selected values that focus on exercising the carry
between the good and the faulty circuits. An example chain within the logic of the counter are very effective
decision tree is shown in Fig. 10. The decision tree shows because of the regular structure present in most counters.
a record of the process for finding a test to detect the i-SA-0 Understanding the intimate structure and the function of
fault. The number of possible nodes in the decision tree are the sequential machine produces an effective test. Less-
2N+1  1 where each node identifies a possible test. In the structured sequential circuits are more problematic
worst case, the PODEM algorithm will visit each node in because tests for specific cases may require more intricate
the search tree. A simple search process is employed in this initialization and propagation sequences.
example where each input is assigned trial values in a
sequence. The search proceeds for successive inputs from Introduction to Deterministic ATPG for Synchronous
each trial assignment resulting in either the acceptance of Sequential Machines
this assignment in a test for the desired fault or a rejection
In this subsection, we will make several observations about
because the trial assignment cannot result in a test. The
ATG in sequential circuits. Clearly, faults will result in
first trial value assigned to an input is 0, and in the event a
incorrect and undesirable behaviors, but the effect of the
test is not possible, the trial input is 1. Given this simple
faulted node may not be observable immediately. In other
structure, the test X1 X2 X3 X4 X5 11011 results. Heuristics
words, an error is latent for some period of time before it can
can be employed to improve the search by taking into
be detected. Likewise, a faulted node may not be control-
account the structure of the circuit (20). For example, if
lable immediately. Consider the simple five state counter,
the trial input for X3 1, the test X1 X2 X3 X4 X5 111XX
shown in Fig. 12 with an enable input and a terminal count
results after only three iterations of the search.
as the output.
After reset, all flip-flop states are set to zero. When
SEQUENTIAL ATG TECHNIQUES enabled, the fault-free counter will cycle through the five

Because most interesting digital systems are sequential,


sequential ATG is an important aspect of the test genera-
X1
tion process. For the purposes of this section, we will o 1
assume clocked sequential circuits that conform the struc- X2
ture shown in Fig. 11. The combinational logic in the state
machine determines the next state and the output function. o 1
A very significant difference between combinational cir- X3
cuits and sequential machines is that the latter have mem-
ory elements isolating circuit nodes to be neither directly o 1
X4
controllable at the inputs nor observable at the outputs. As
a result, the ATG process must be more sophisticated
compared with those used in combinational circuits. o 1 X5
A synchronous counter is an example of a simple sequen-
tial circuit that also demonstrates some complexities in o 1
devejqping defect tests for sequential circuits. Consider a
synchronous counter that can be loaded synchronously 11011
with an initial count and has one output that is asserted
when the counter is at its terminal count. One testing Figure 10. A PODEM decision tree for circuit from Fig. 8.
10 AUTOMATIC TEST GENERATION

occurrence of several discrepancies in prior times. In this


X Z example, if the state is observable, the fault can be detected
CL
at T2. Suppose that only the inputs and the clock can be

State
E
controlled and only the output, Z, can be observed. In this
y Next
Present State case, the detection of the fault is delayed for two clock
State Excitation cycles, until T4.
Synchronous ATG is challenging, but it can be under-
stood and in some cases solved using concepts from combi-
Clock national ATG methods. Indeed, this leads to one of three
Figure 11. General model of sequential circuit. approaches. First, tests can be created in an ad hoc fashion.
Then, using a technique called fault simulation similar to
that presented in Fig. 14, detected faults can be tabulated
count states. Consider what happens when Da SA-1. With and reported. Second, the circuit can be transformed in
each state update, the fault may cause incorrect operation specific ways so that combinational ATG can be applied
because discrepancies caused by the fault can be stored in directly. Such approaches are presented in the following
the state. In addition, in subsequent clocks, additional subsections. Third, the circuit operation can be modeled so
discrepancies can be introduced whereas prior stored dis- that the circuit operation gives the illusion of a combina-
crepancies can be recycled. Indeed, under certain circum- tional circuit, and it allows combinational ATG to be used.
stances, faulty behavior may disappear momentarily. As a Indeed, any of these three techniques can be used together
result of the fault, the state machine operation changes and as testing needs dictate.
can be viewed as a change in the state machine operation as
shown in Fig. 13. Iterative Array Models for Deterministic ATPG
Using the discrepancy notation from the D Algorithm,
Clearly, ATG for sequential circuits is more challenging
the state machine passes through the following states in
compared with combinational circuits. Many sequential
successive clocks as shown in Fig. 14. Inspecting the state
 DD1;
 D;
 D0
 D;
 0D1;
 ATG techniques rely on the ability to model a sequential
sequencing, CBA f000; 001; 01D; DD
DD;
 011, 10D;  0D  D;
 D01;
  we see that the pattern machine in a combina-tional fashion, which makes possible
D 01Dg
the use of combinational ATG in sequential circuits. Ana-
repeats every eight clocks compared with the expected four
lytical strategies for determining test patterns use iterative
clocks. Furthermore, the effect of the fault can be latent
array models (19). The iterative array models provide a
because discrepancies are stored in the state and not
theoretic framework for making sequential machines seem
observable immediately. Because multiple discrepancies
combinational from the perspective of the ATG process.
can be present simultaneously, the circuit may occasion-
Iterative arrays follow from unrolling the operation of the
ally show correct operation, for example at T8, despite the

E=0

Enable
0/0
1 E=1

Da A
0 4/1 1/0 0 D Q

CLR
1 1
Clock
3/0 2/0
1 B
D Q

0 0 CLR

Reset*

C
D Q

CLR

(a) State Diagram (b) Implementation

Figure 12. Five state counter.


AUTOMATIC TEST GENERATION 11

E=0 The size of the circuit is determined by the initial state


and the number of array iterations necessary to control and
to observe a particular fault. In all iterations, the iterative
0/0 model replicates combinational circuitry and all inputs and
outputs for that time step. The ATG generation process
E=1
1 will, by necessity, be required to instantiate, on demand,
E=0
combinational logic iterations because the required num-
ber of iterations necessary to test for a specific fault is not
0 4/1 5/0 1/0 0 known. For some initial states, it is impossible to determine
1 1 a test for specific faults because multiple expressions of a
0 fault may mask its presence. Different algorithms will
1 1 1 assume either an arbitrary initial state or a fixed state.
From the timing diagram in Fig. 13, the iterative circuit
3/0 2/0 model for the counter example with a Da-SA-1 fault is given
in Fig. 16. A discrepancy occurs after the fourth clock cycle,
1
where the test pattern required to detect the fault is
Dc0 Db0 Da0 E0 E1 E2 E3 Z0 Z1 Z2 Z3 00000000001, where
0 0
the input pattern is the concatenation of initial state
Figure 13. Effect of faults on state diagram.
Dc0 Db0 Da0 , the inputs at each time frame E0 E1 E2 E3 ,
and the outputs at each time frame are Z0 Z1 Z2 Z3 . Because
circuit in Fig. 16 is combinational, algorithms such as the D-
state machine where each unrolling exposes another time
Algorithm and PODEM can be employed to determine test
frame or clock edge that can update the state of the state
patterns. Both algorithms would require modification to
machine. The unrolling process replicates the excitation
handle both variable iterations and multiple faults.
functions in each time frame, applying the inputs consis-
From the iterative array model, two general approaches
tent with that particular state. Memory elements are mod-
can be pursued to produce a test for a fault. The first
eled using structures that make them seem combinational.
approach identifies a propagation path from the point of
Furthermore, output functions are replicated as well. Each
the fault and the output. From the selected output, reverse
input and output is now represented as a vector of values
time processing is employed to sensitize a path through the
where each element gives the value within a specific time
frame iterations to the point of the fault. In the event a path
frame. With this model, combinational ATG methods can be
is not found, backtracking and other heuristics are
used to determine circuits for specific times.
employed. After the propagation path for the fault is estab-
Iterative array methods complicate the application of
lished, reverse time processing is used to justify the inputs
sequential ATG methods in our major ways: (1) the size of
required to express the fault and to maintain consistency
the combinational circuit is not known, (2) the state
with previous assignments. The second approach employs
contribution is a constrained input, (3) multiple iterations
forward processing from the point of the fault to propagate
express faults multiple times, and (4) integration level
to the primary outputs and then reverse time processing to
issues complicate when and how inputs are controlled
justify the conditions to express the fault and consistency
and outputs are observed. For test pattern generation,
(21,22). Additional heuristics are employed to improve the
the concatenation of the inputs from the different time
success and the performance of the test pattern generation
frames,    X t1 X t X t1    , serve as the inputs for the com-
process, including using hints from fault simulation (22).
binational ATG algorithms, where for the actual circuit, the
Several approaches can be applied for determining test
superscript specifies the time frame when that input is set
patterns.
to the required value.. The combinational ATG algorithm
outputs are the concatenation of the frame outputs,
Genetic Algorithm-Based ATPG
   Zt1 Zt Zt1    , where again, the superscript identifies
when an output should be observed to detect a particular Because of the challenges of devising tests for sequential
fault (Fig. 15). circuits, many approaches have been studied. Genetic algo-
rithms (GAs) operate by generating and evaluating popu-

Clock

Reset*

Z X D D

C X D D D D D

B X D D D D D

A X D D D D D D D
T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12
S=001 S=01D S=DD0 S=DDD S=D0D S=0D1 S=DDD S=011 S=10D S=0DD S=D01 S=01D

Figure 14. Fault simulation of counter with Da-SA-1.


12 AUTOMATIC TEST GENERATION

Xt1 Zt1 Xt Zt Xt+1 Zt+1

CL FlipFlop CL FlipFlop CL FlipFlop


Excitation Excitation Excitation
yt1 Et1 Function yt Et Function yt+1 Et+1 Function yt+2

Frame t1 Frame t Frame t+1

Figure 15. Excerpt from iterative array sequential circuit model.

lations of organisms for fitness to a particular purpose and initialized in some random fashion with a set of strings that
then using the fitness to identify organisms from which the represent the initial GA generation of test sequences. The
next generation is created (23). Organism structure and likelihood that any given string can detect the fault
capabilities are defined by a genetic code represented as a depends on the complexity and the size of the circuit.
string of values that set the configuration of the organism. Assuming the circuit is sufficiently complex that no organ-
The organism constructed from the genetic code is then ism can detect the fault, the fitness function must include
evaluated for fitness. Organisms in the next generation are the ability to identify organisms that have good qualities
generated from fit organisms in the current generation (i.e., have sequencing similar to what one might expect of
using simulated variations of crossover and mutation. the actual test sequence). Two fitness functions were
In the context of a DUT, the string of test patterns can formed in Ref. 24 for the justification and the propagation
serve as the genome for the organism and the fitness can be phases. Each was the weighted sum of six components that
a function of whether and how well a particular fault is include the ability to detect the fault, measures of controll-
detected from the sequence. The work of Hsiao et al. (24) ability, distinguishing measures, circuit activity measures,
used GAs to assemble test sequences for faults from pro- and flip-flop justification measures. The GA test generation
mising pieces. In their work, the GA operates in two phases, operates in three stages where the GA is run in each stage
the first targets controlling the fault and the second targets until the fault coverage plateaus. In addition, test lengths
propagating the faulted node to the primary outputs. are allowed to grow in subsequent stages, on the assump-
Sequences from which a test is assembled are from one tion that faults not detectable with shorter sequences may
of three categories: (1) distinguishing sequences, (2) set/ be detected with longer sequences.
clear sequences, and (3) pseudoregister justification
sequences. Distinguishing sequences propagate flip-flop DESIGN FOR TESTABILITY
fault effects to the primary outputs. Set/clear sequences
justify (i.e., force flip-flop) to specific states. Finally, pseu- Many ATG techniques provide capabilities that are prac-
doregister justification sequences put sets of flip-flops into tical in a variety of situations. DFT is the process and the
specific states. These sequences form the basis from which discipline for designing digital systems to make them easier
tests are generated for a particular fault. The process is
to test. Furthermore, constructing circuits that facilitate

Enable 0 Enable 1 Enable 2 Enable 3

Dc 1 Dc 2 Dc 3 Dc 4
Dc 0
Db 1 Db 2 Db 3 Db 4
Db 0
Da 1 Da 2 Da 3 Da 4
Da 0

0
1
SA1
Z1 Z2 Z3 Z4 SA0

Figure 16. Iterative array model for example circuit for Da-SA-1.
AUTOMATIC TEST GENERATION 13

testing also simplifies ATG. In this capacity, DFT can affect flops as a shift register (2730), effectively making each flip-
the entire testing process, from ATG to testing. DFT tech- flop a test point. Taken to the logical extreme, all flip-flops
niques apply other concepts and design paradigms includ- are part of the shift register and are therefore also test
ing circuit fault models and techniques for detecting faults. points. The power of this configuration is that the storage
Modifying designs themselves to improve and to simplify elements can be decoupled from the combinational logic
the testing process can offer many benefits. First, time enabling the application of combinational ATG to generate
devoted to test development is reduced with a higher like- fault tests. The shift register organization has the addi-
lihood of guaranteed results. Second, DFT reduces the test tional benefit that it can be controlled by relatively few
set size because individual tests are generally more effec- inputs and outputs. Because a single shift register might be
tive. Third, DFT can reduce the time necessary to test a excessively long, the shift register may be broken into
system. DFT approaches fall into one of two categories. several smaller shift registers.
Starting with a traditional design, the first category is Historically, scan path approaches follow from techni-
exemplified by adding circuit structures to facilitate the ques incorporated into the IBM System/360 where shift
testing process. The second category attacks the testing registers were employed to improve testability of the sys-
process from basic design principals resulting in systems tem (27). A typical application of a scan design is given in
that are inherently easy to test. In this section, DFT Fig. 17. Note the switching of the multiplexer at the flip-flop
approaches that support ATG are presented. inputs controls whether the circuit is in test or normal
operation. Differences between different scan design meth-
Circuit Augmentation to Facilitate ATG ods occur in the flip-flop characteristics or in clocking.
Digital systems designed in an ad hoc fashion may be
Scan Path Design. Relevant aspects of the design include
difficult to test. Several basic techniques are available to
the integration of race free D flip-flops to make the flip-flops
improve the testability of a given system. These techniques
fully testabl (29). Level sensitive scan design (28) is for-
include test point insertion, scan design methods, and
mulated similarly. One fundamental difference is the
boundary scan techniques. These approaches preserve
machine state is implemented using special master slave
the overall structure of the system.
flip-flops clocked with non overlapping clocks to enable
testing of all stuck faults in flop-flops.
Test Point Insertion. Test point insertion is a simple and
straightforward approach for providing direct controllabil-
Boundary Scan Techniques. In many design approaches,
ity and observability of problem circuit nodes. In test point
the option of applying design for testability to some
insertion, additional inputs and outputs are provided to
components is impossible. For example, standard parts
serve as inputs and outputs for testing purposes. These
that might be used in printed circuit boards that are not
additional test point inputs and outputs do not provide any
typically designed with a full system scandesign in mind.
additional functional capabilities. The identification of
As another example, more and more ASIC designs are
these points can follow from a testability analysis of the
integrated from cores, which are subsystems designed by
entire system by identifying difficult-to-test internal nodes.
third-party vendors. The core subsystems are typically
Circuit nodes are selected as test points to facilitate testing
processors, memories, and other devices that until
of difficult-to-test nodes or modules. As test points are
recently were individual integrated circuits themselves.
identified, the testability analysis can be repeated to deter-
To enable testing in these situations, boundary scan
mine how well the additional test points improve testability
methods were developed. Boundary scan techniques
and to determine whether additional test points are neces-
employ shift registers to achieve controllability and
sary. Indeed, the test points enhance clearly the efficacy of
observability for the inputs/outputs to circuit boards,
ATG (25). Furthermore, test point insertion can provide the
chips, and cores. An important application of boundary
basis for structured design for testability approaches. The
scan approaches is to test the interconnect between chips
principal disadvantage of adding test points is the
and circuit boards that employ boundary scan techni-
increased expense and reduced performance that results
ques. In addition, the boundary scan techniques provide
from the addition of test points. One study showed (26) that
a minimal capability to perform defect testing of the
adding 1% additional test points increases circuit over-
components at the boundary. The interface to the bound-
heads by only 0.5% but can impact system performance
ary scan is a test access port (TAP) that enables setting
by as much as 5%. In the study, test points were internal
and reading of the values at the boundary. In addition,
and inserted by state of the art test point insertion software.
the TAP may also allow internal testing of the compo-
nents delimited by the boundary scan. Applications of
Scan Design Methods. The success of test point insertion
boundary scan approaches include BIST applications
relies on the selection of good test points to ease the testing
(31), test of cores (32), and hierarchical circuits (33).
burden. Determining these optimal points for.test point
The IEEE (Piscatouoaes NJ) has created and approved
insertion can be difficult. As a result, structured
the IEEE Std 1149.1 boundary scan standard (34). This
approaches can be integrated to guarantee ATG success.
standard encourages designers to employ boundary scan
One particularly successful structured design approach is
techniques by making possible testable designs con-
scan design. Scan design methods improve testability by
structed with subsystems from different companies
making the internal system state both easily controllable
that conform to the standard.
and observable by configuring, in test mode, selected flip-
14 AUTOMATIC TEST GENERATION

d1
d0 Y D Q
S

d1
d0 Y D Q
Combinational S
Logic

d1
d0 Y D Q
S

Clock
Test

Figure 17. One scan path approach.

ATG and Built-In Test techniques is Ref. 36. A third type of circuit is constructed to
generate specific test patterns efficiently for specific types
of circuit structures. In this case, the desired sequence of
Background. Requiring built-in tests affects test genera-
test patterns is examined and a machine is synthesized to
tion process in two ways. First, the mechanism for gener-
recreate the sequenc. Memory tests have shown some
ating test patterns must be self-contained within the
success in using specialized test pattern generator circuits
circuitry itself. Although in theory, circuitry can be
(37).
designed to produce any desired test pattern sequence, in
To determine whether a fault is present, the outputs of
reality, most are impractical. As a result, simpler circuitry
the circuit must be monitored and compared with expected
must be employed to generate test patterns. ATG and built-
fault-free outputs. Test pattern generation equipment
in tests require the circuits to have the ability to generate
solves this by storing the expected circuit outputs for a
test sequences and also to determine that the circuits
given sequence of inputs applied by the tester. As noted
operate correctly after being presented with the test
above, it may be impractical to store or to recreate the exact
sequence.
circuit responses. Alternate approaches employ duplication
Three classes of circuits are typically employed because
approaches (several are summarized in Ref. 2) where a
the patterns have good properties and also have the ability
duplicate subsystem guarantees the ability to generate
to produce any sequence of test patterns. The first type of
correct circuit outputs, assuming a single fault model. A
circuit is a simple N-bit counter, which can generate all
discrepancy between the outputs of the duplicated modules
possible assignments to N bits. Counter solutions may be
infers the presence of a fault. Although duplication often is
impractical because test sequences are long for circuits
used in systems that require tault tolerance or safety,
with a relatively few inputs and also may be ineffective
duplication may be an undesirable approach in many situa-
in producing sequences to test for delay or CMOS faults.
tions. An alternative approach, signature analysis, com-
Researchers have investigated optimizing count sequences
presses the circuit output responses into a single code word,
to achieve more reasonable test lengths (35). The second
a signature, which is used to detect the presence of faults.
type of circuit generates pseudorandom sequences using
Good circuit responses are taken either from a known good
linear feedback shift registers (LFSRs). For combinational
circuit or more frequently from circuit simulations. A fault
circuits, as the number of random test patterns applied to
in a circuit would result in a signature that differs from the
the circuit increases, fault coverage increases asymptoti-
expected good signature with high probability.
cally to 100%. Much research has been conducted in the
development of efficient pseudorandom sequence genera-
Signature Analysis. The cost of testing is a function of
tors. An excellent source on many aspects of pseudorandom
many influences that include design costs, testing time, and
AUTOMATIC TEST GENERATION 15

D Q D Q D Q D Q
TP

Clock

Figure 18. Linear feedback shift register.

test equipment costs. Thus, reducing the test set size and
the ease of determining whether a fault is present has a BILBO. The built-in logic block observer (BILBO)
great influence on the success of the system. In signature approach has gained a fairly wide usage as a result of its
analysis, the test set is reduced effectively to one repre- modularity and flexibility (40). The BILBO approach can be
sentative value, which is termed a signature. The signature used in both scan path and signature analysis test applica-
comparison can be performed internally, using the same tions by encapsulating several important functions. BILBO
technology as the system proper. In signature analysis, the registers operate in one of four modes. The first mode is
signature register is implemented as a LFSR as shown in used to hold the state for the circuitry as D flip-flops. In the
Fig. 18. The LFSR consists of a shift register of length N, second mode, the BILBO register can be configured as a
and linear connections fed back to stages nearer the begin- shift register that can be used to scan values into the
ning of the shift register. With successive clocks, the LFSR register. In the third mode, the register operates as a
combines its current state with the updated test point multiple input signature register (MISR). In the fourth
values. Figure 19 shows two different LFSR configurations: mode, the register operates as a parallel random pattern
(1) a single input shift register (SISR) compresses the generator. These four modes make possible several test
results of a single test point into a signature and (2) a capabilities. A four-bit BILBO register is shown in Fig. 20.
multiple input shift register (MISR) compresses several One example application of BILBO registers is shown in
test point results. After the test sequence is complete, the Fig. 21. In test mode, two BILBO registers are configured to
contents of the LFSR is compared with the known good isolate one combinational logic block. The BILBO register
signature to determine whether faults are present. A single at the input, R1, is configured as a PRPG, whereas the
fault may result in the LFSR contents differing from the register at the output, R2, is configured as a MISR. In test
good signature, but generally will not provide sufficient mode operation, for each random pattern generated, one
information to identify the specific fault. Furthermore, a output is taken and used to compute the next intermediate
single fault may result in a final LFSR state that is identical signature in the MISR. When all tests have been per-
to the good signature, which is termed allasing. This out- formed, the signature is read and compared with the known
come is acceptable if aliasing occurs with low probability. In good signature. Any deviation indicates the presence of
Ref. 36, the aliasing probability upper bounds were derived faults in the combinational circuit. To test the other com-
for signatures computed with SISRs. In addition in Ref. 30, binational logic block, the functions of R1 and R2 only need
methods for developing MISRs with no aliasing for single to be swapped. Configuration of the data path to support
faults were developed. The circuitry necessary to store the test using BILBO registers is best achtevedby performing
signature, to generate a vector to compre with the signa- register allocation and data path design with testability in
ture, and to compare the signature is modular and simple mind (41).
enough to be intergrated with circuit functions of reason-
able sizes, which makes signature analysis an important Memory BIST
BIST technique. LFSRs can be used in signature analysis in Semiconductor memories are designed to achieve the high
several ways. storage densities in specific technologies. High storage
densities are achieved by developing manufacturing pro-
cesses that result in the replication, organization, and
Test Input optimization of a basic storage element. Although in prin-
ciple the memories can be tested as other sequential storage
elements, in reality the overhead associated with using
scan path and similar test approaches would impact
severely the storage capacity of the devices. Furthermore,
Test Input LFSR LFSR
the basic function of a memory typically allows straightfor-
ward observability and controllability of stored informa-
tion. On the other hand, the regularity, of the memorys
Signature Signature physical structure and the requisite optimizations result in
fault manifestations as a linkage between adjacent memory
(a) SISR (b) MISR cells. From a testing perspective, the manifestation of the
fault is a function of the state of a memory cell and its
Figure 19. Different signature register configurations.
16 AUTOMATIC TEST GENERATION

C1
C0

D Q D Q D Q D Q
S
Shift in d0 Y Q Q Q Q
d1

Figure 20. BILBO register.

physically adjacent memory cells. Among the test design that component. Summarized previously, PLAs exhibit
considerations of memories is the number of tests as a fault models not observed in other implerneniation tech-
function of the memory capacity. For example, a test meth- nologies. One approach for testing to apply BIST
odology was developed (37) for creating test patterns. These approaches described previously (42). PLA test can be
test patterns could be computed using a state machine that viewed from two perspectives. First, the blank device can
is relatively simple and straightforward. The resulting be tested and deemed suitable for use in an application.
state machine was shown to be implementable in random Second, once a device is programmed, the resulting digital
logic and as a microcode driven sequencer. system can be tested according to the jpejhods already
described. One early and notable ATG methods applied
Programmable Devices to PLAs is PLATYPUS (43). The method balances random
TPG with deterministic TPG to devise tests for both tradi-
With seyeral vendors currently (2004) marketing FPGA
tional stuck-at faults as well as cross-point faults. Modern
devices capable of providing in excess of one million usable
FPGAs support standard test interfaces such as JTAG/
gates, testing of the programmed FPGA becomes a serious
IEEE 1149 standards. In this context, ATG techniques
design consideration. Indeed, the capacity and perfor-
can be applied in the context of boundary scan for the
mance of FPGAs makes this class of technology viable in
programmed device.
many applications. Furthermore, FPGA devices are an
integration of simpler programmable device architectures,
Minimizing the Size of the Test Vector Set
each requiring its own testing approach. FPGAs include the
ability to integrate memories and programmable logic In the combinational ATG algorithms presented, specific
arrays, which requires ATG approaches most suitable for faults are targeted in the test generation process. To

Combinational
Logic

PRPG R1 (BILBO)

Combinational
Logic

MISR R2 (BILBO)

Figure 21. Application of BILBO to testing.


AUTOMATIC TEST GENERATION 17

Table 4. Test pattern compaction Compaction Using Fault Simulation. A test that has been
Fault Test found for one fault may also test for several other faults.
Those additional tests can be determined experimentally
a 00X0 by performing a fault simulation for the test and identifying
b 001X
the additional faults that are also detected. The process is
c X00X
d X011
outlined as follows:

1. Initialize fault set


2. Select a fault from the fault set
develop a comprehensive test for a combinational circuit,
one may develop a test for each faultlndividually. In most 3. Generate a test pattern for the selected fault
cases, however, the number of tests that results is much 4. Run fault simulation
larger than necessary to achieve the same fault coverage. 5. Remove additional detected faults form fault set
Indeed, the techniques of fault collapsing, test compaction, 6. If fault set empty or fault coverage threshold met then
and fault simulation can produce a significant reduction in exit, otherwise go to step 2
the test set size.

Fault Collapsing. Distinct faults in a circuit may produce Test Vector Compression. Test vector compression takes
the identical effect when observed at circuit outputs. As a on two forms, lossless and lossy. Lossless compression is
result, the faults cannot be differentiated by any test. For necessary in circumstances where the precise input and
example, if any AND gate input is SA-0, the input fault output values must be known as what might be necessary
cannot be differentiated frogi thexiutout SA-0 fault. In this on an integrated circuit tester. Under certain limited cir-
case, the faults can be collapsed into one, output SA-0, cumstances, lossless compression might make it possible to
which requires a test only for the collapsed fault. store test-compressed vectors in the system itself. In lossy
compression, the original test vectors cannot be reconsti-
Test Compaction. The D-Algorithm and PODEM can tuted. Lossy compression is used in such applications as
generate test vectors with incompletely specified inputs, pseudorandom number generation and signature registers,
providing an opportunity to merge different tests through where input and output vectors are compressed through
test compaction. For example, consider a combinational the inherent structure of the linear feedback shift registers
circuit whose tests are given in Table 4. Examining the as described previously. Lossy compression is suitable
first two faults in the table, aand b, shows the test 0010 will when the probability of not detecting an existing fault is
test for both faults. Test compaction can be either static or much smaller than the proportion of uncovered faults in the
dynamic. In static test compaction, all tests are generated circuit.
by the desired ATG and then analyzed to determine those
tests that can be combined, off-line, thereby creating tests
to detect several faults and specifying undetermined input ATG CHALLENGES AND RELATED AREAS
values. In dynamic tests, after each new test is generated,
the test is compacted with the cumulative compacted list. As circuit complexity and capabilities evolve, so does the art
For the tests in Table 4, static compaction results in two and science of ATG. Technologic innovations have resulted
tests that tests for all faults, 0000, and 0011 for faults {a,c} in the ability to implement increasingly complex and inno-
and {b,d} respectively. Dynamic compaction produces a vative designs. The technologic innovations also drive the
different result, as summarized in Table 5. Note that the evolution of testing. One trend, for example, is that newer
number of tests that result from dynamic compaction is CMOS circuits have increased quiescent currents, which
more compared with static compaction. From a practical impacts the ability to apply IDDQ testing technologies.
perspective, optimal compaction is computationally expen- ATG in Embedded Systems
sive and heuristics are often employed (1). Reference 9 also
notes that in cases where heuristics are used in static The natural evolution of technology advances and design
compaction, dynamic compaction generally produces has resulted in systems composed from IP obtained from
superior results while consuming fewer computational many sources. Clearly, the use of IP provides developers
resources. Furthermore, dynamic compaction processes faster development cycles and quicker entry to market. The
vectors as they come, but more advanced dynamic compac- use of IP presents several ATG challenges. First, the testing
tion heuristics may choose to not compact immediately but embedded IP components can be difficult. Second, because
rather wait until a more opportune time. the internals of the IP components are often not known, the
success of ATG techniques that require full knowledge of
the circuit structure will be limited. Third, IP developers
Table 5. Simple dynamic test compaction may be hesitant to provide fault tests for fear that it would
Sequence New test Compacted tests give undesired insights into the IP implementation.
1 00X0 {00X0}
Functional ATG
2 001X {0010}
3 X00X {0010,X00X} Design tools and rapid prototyping paradigms result in the
4 X011 {0010,X00X,X011} designer specifying hardware systems in an increasingly
18 AUTOMATIC TEST GENERATION

abstract fashion. As a result, the modern digital system 13. S. Chakravarty and P. J. Thadikaran, Simulation and genera-
designer may not get the opportunity develop tests based on tion of IDDQ tests for bridging faults in combinational circuits,
gate level implementations. Employing ATG technologies IEEE Trans. Comp., 45(10): 11311140, 1996.
relieves the designer of this task provided the design tools 14. A. D. Friedman and P. R. Menin, Fault Detection in Digital
can define and analyze a gate level implementation. Circuits. Englewood Cliffs, NJ: Prentice-Hall, 1971.
15. Z. Kohavi, Switching and Finite Automata Theory, 2nd ed.New
York: McGraw-Hill, 1978.
SUMMARY 16. M. R. Garey and D. S. Johnson, Computers and Intractability:
A Guide to the Theory of NP-Completeness, San Francisco, CA:
In this article, many aspects of ATG have been reviewed. W.H. Freeman and Company, 1979.
ATG is the process of generating tests for a digital system in 17. T. Larrabee, Test pattern generation using Boolean satisfia-
an automated fashion. The ATG algorithms are grounded bility, IEEE Trans. Comp. Aided Des., 5(1): 415, 1992.
in fault models that provide the objective for the test gen- 18. J. Paul Roth, Diagnosis of automata failures: A calculus and a
eration process. Building on fault models, ATG for combi- method, IBM J. Res. Devel., 10: 277291, 1966.
national circuits have been shown to be effective. 19. O. H. Ibarra and S. K. Sahni, Polynomially complete fault
Sequential circuits are more difficult to test as they require detection problems, IEEE Trans. Computers, C-24(3): 242
the circuits to be unrolled in a symbolic fashion or be the 249, 1975.
object of specialized test pattern search algorithms. 20. P. Goel, An implicit enumeration algorithm to generate tests
Because of the difficulties encountered in testing sequential for combinational logic circuits, IEEE Trans. Comp., C-30(3):
circuits, the circuits themselves are occasionally modified 2l5222, 1981.
to simplify the process of finding test patterns and to 21. I. Hamzaoglu and J. H. Patel, Deterministic test pattern gen-
improve the overal test fault coverage. The inexorable eration techniques for sequential circuits, DAC, 2000, pp. 538
technology progression provides many challenges in test 543.
testing process. As technology advances, new models and 22. T. M. Niermann and J. H. Patel, HITEC: A test generation
techniques must continue to be developed to keep pace. package for sequential circuits, Proceedings European Design
Automation Conference, 1990, pp. 214218.
23. D. E. Goldberg, Genetic Algorithms in Search, Optimization,
BIBLIOGRAPHY and Machine Learning. Reading, MA: Addison Wesley, 1989.
24. M. S. Hsiao, E. M. Rudnick, and J. H. Patel, Application of
1. G. E. Moore, Cramming more components onto integrated genetically engineered finite-state-machine sequences to
circuits, Electronics, 38 (8): 1965. sequential circuit TPGA, IEEE Trans. Comp.-Aided Design
2. B. W. Johnson, Design and Analysis of Fault-Tolerant Digital of Integrated Circuits Sys., 17(3): 239254, 1998.
Systems, Reading, MA: Addison-Wesley Publishing Company, 25. M. J. Geuzebroek, J. Th. van derLinden, and A. J. van deGoor,
1989. Test point insertion that facilitates ATPG in reducing test time
3. R. C. Aitken, Nanometer technology effects on fault models for and data volume, Proceedings of the 2002 International Test
IC testing, Computer, 32 (11): 4752, 1999. Conference (ITC2002), 2002, pp. 138147.
4. M. Sivaraman and A. J. Strojwas, A Unified Approach for 26. H. Vranken, F. S. Sapei, and H. Wunderlich, Impact of test
Timing Verification and Delay Fault Testing, Boston: Kluwer point insertion on silicon area and timing during layout, Pro-
Academic Publishers, 1998. ceedings of the Design, Automatin and test in Europe Confer-
5. N. K. Jha and S. Kindu, Testing and Reliable Design of CMOS ence and Exhibition (DATE04), 2004.
Circuits, Boston: Kluwer, 1992. 27. W. C. Carter, H. C. Montgomery, R. J. Preiss, and J. J. Rein-
6. J. Gailay, Y. Crouzet, and M. Vergniault, Physical versus heimer, Design of serviceability features for the IBM system/
logical fault models in MOS LSI circuits: Impact on their 360, IBM J. Res. & Devel., 115126, 1964.
testability, IEEE Trans. Computers, 29(6): 2861293, l980. 28. E. B. Eichelberger and T. W. Williams, A logic design structure
7. C. F. Hawkins, J. M. Soden, R. R. Fritzmeier, and L. K. for LSI testability, Proceedings of the Fourteenth Design Auto-
Horning, Quiescent power supply current measurement for mation Conference, New Orleans, LA: 1977, pp. 462468.
CMOS IC defect detection, IEEE Trans. Industrial Electron., 29. S. Funatsu, N. Wakatsuki, and T. Arima, Test generation
36(2): 211218, 1989. systems in Japan, Proceedings of the Twelfth Design Automa-
8. R. Dekker, F. Beenker, and L. Thijssen, A realistic fault model tion Conference, 1975, pp. 114122.
and test., algorithms for static random access memories, IEEE 30. M. J. Y. Williams and J. B. Angel, Enhancing testability of
Trans. Comp.-Aided Des., 9(6): 567572, 1996. large-scale integrated circuits via test points and additional
9. M. Abramovici, M. A. Breuer, and A. D. Friedman, Digital logic, IEEE Trans. Computers, C-22(l): 4660, 1973.
Systems Testing and Testable Design, Ascataway, NJ: IEEE 31. A. S. M. Hassan, V. K. Agarwal, B. Nadeau-Dostie, and J.
Press, revised printing edition, 1990. Rajski, BIST of PCB interconnects using boundary-scan archi-
10. N. K. Jha and S. Kindu, Assessing Fault Model and Test tecture, IEEE Trans. Comp., 41(10): 12781288, 1992.
Quality, Boston: Kluwer, 1992. 32. N. A. Touba and B. Pouya, Using partial isolation rings to test
11. L. H. Goldstein and E. L. Thigpen, SCOAP: Sandia controll- core-based designs, IEEE Design and Test of Computers, 1997,
ability/observability analysis program, Proceedings of the 17th pp. 5257.
Conference on Design Automation, Minneapolis, MN: 1980, pp. 33. Y. Zorian, A structured testability approach for multi-chip
190196. modules based on BIST and boundary-scan, IEEE Trans.
12. V. D. Agrawal, C. R. Kime, and K. K. Saluja, A tutorial on built- Compon., Packag. Manufactu. Technol. Part B, 17(3): 283
in-self-test part 2: Applications, IEEE Design and Test of 290, 1994.
Computers, 6977, 1993.
AUTOMATIC TEST GENERATION 19

34. IEEEIEEE Standard Test Access Port and Boundary-Scan 40. B. Koenemann, B. J. Mucha, and G. Zwiehoff, Built-in test for
Architecture, Piscataway, NJ: IEEE, 1990. complex digital integrated circuits, IEEE J. Solid State Phys.,
35. D. Kagaris, S. Tragoudas, and A. Majumdar, On the use of SC-15(3): 315318, 1980.
counters for reproducing deterministic test sets, IEEE Trans. 41. M. Tien-Chien Lee, High-Level Tests Synthesis of Digital VLSI
Comp., 45(12): 14051419, 1996. Circuits, Boston: Artech House, Inc, 1997.
36. P. H. Bardell, W. H. McAnney, and J. Savir, Built-in Test for 42. M. R. Prasad, P. Chong, and K. Keutzer, Why is ATPG easy?
VLSI: Pseudorandom Techniques, New York: John Wiley & Design Automation Conference, 1999.
Sons, l987. 43. R. Wei and A. Sangiovanni-Vincentelli, PLATYPUS: A PLA
37. M. Franklin, K. K. Saluja, and K. Kinoshita, A built-in self-test test pattern generation tool, 22nd Design Automation Confer-
algorithm for row/column pattern sensitive faults in RAMs, ence, 1985, pp. 197203.
IEEE J. Solid-State Circuits, 25(2): 514524, 1990.
38. S. Feng, T. Fujiwara, T. Kasami, and K. Iwasaki, On the
maximum value of aliasing probabilities for single input sig- LEE A. BELFORE II
nature registers, IEEE Trans. Comp., 44(11): 12651274, 1995. Old Dominion University,
39. M. Lempel and S. K. Gupta, Zero aliasing for modeled faults, Norfolk, Virginia
IEEE Trans. Computers, 44(11): 12831295, 1995.
C
CD-ROMs AND COMPUTER SYSTEMS industry, and the mass archivation and document storage
and retrieval business.
HISTORY OF DEVELOPMENT: CD-ROM AND DVD To illustrate the breath and the depth of the opportu-
nities of electronic image capture, manipulation, storage,
To distribute massive amounts of digital audio data, at and retrieval, consider Fig. 1(a) and 1(b), a solid model
reasonable cost and high quality, industry giants, such as animation sequence of a short battle created by Richard G.
Philips (Amsterdam, the Netherlands) and Sony (Tokyo, Ranky, illustrating 200 high-resolution frame-by-frame
Japan), developed CD-ROM optical storage technology in rendered complex images, integrated into an Apple Quick-
the early 1980s, when digital fever was taking over the Time digital, interactive movie and stored on CD-ROM, and
analog stereo music industry. Fig. 2(a)(d), by Mick. F. Ranky, an interactively naviga-
The obvious attractive features of the audio CD versus table, panable, Apple QuickTime VR virtual reality movie
the vinyl LP are the relatively low cost of production, of Budapest by night, allowing user-controlled zoom-in/out
duplication, and distribution, as well as the robustness of and other hot-spot controlled interactivity. (Note that some
the media and the significantly clearer and better (a feature of these images and sequences are available in full color at
that is still disputed by some artistically bent ears) sound www.cimwareukandusa.com and that more interactive
quality that the digital technology offers over that of the demonstrations are available in the electronic version of
analog. this encyclopedia.) Note the difference in terms of the
It might be interesting to note that, as with many new, approach and methods used between the two figures.
revolutionary technologies, even in the United States, The first set was created entirely by computer modeling
where society accepts technological change at a faster and imaging, and it illustrates a totally artificial world,
rate than in most other countries, it took approximately whereas the second was first photographed of real, physical
5 years for the audio CD to take over the vinyl phonograph objects and then digitized and pasted and integrated into
record industry. (Based on this experience, one wonders an interactive QTVR (see below) movie (111).
how long it will take to replace the current combustion
automobile engine for clean electric or other type of
CD-ROM TECHNOLOGY, MEDIUM, AND THE STORAGE
power. . . .)
DENSITY OF DATA
For the computer industry, the compact disc digital
audio (CD-DA) became an exciting media for storing any
The most important differences between the magnetic
data (i.e., not just audio), including computer-controlled
(hard disk) versus the optical (compact disc) technology
interactive multimedia, one of the most interesting tech-
include the storage density of data as well as the way data
nological innovations of the twentieth century. The
are coded and stored. This difference is because CD-ROMs
approximately $1.00 cost of duplicating 650 Mb of data
(and DVDs) use coherent light waves, or laser beams,
and then selling it as a recorded product for approximately
versus magnetic fields that are spread much wider than
$200.00 (in those days) created a new revolution that
laser beams to encode information.
became the multimedia CD-ROM as we know it today.
The other major advantage is that the laser beam does
Although there are not just read-only, but read/write
not need to be that close to the surface of the media as is the
CD-ROMs too (see CD-RW below), typically a CD-ROM is
case with the magnetic hard disk read/write heads. Mag-
an optical read-only media, capable of storing approxi-
netic read/write heads can be as close as 16 mm, or
mately 650 Mb of uncompressed digital data (as an example
0.0016 mm, to the surface, increasing the opportunity of
a Sony CD-ROM stores 656.10 Mb in 335925 blocks, uncom-
the jet-fighter-shaped, literally flying read/write head to
pressed), meaning any mixcture of text, digital video, voice,
crash into the magnetic surface, in most cases, meaning
images, and others.
catastrophic data loss to the user.
It is important to note that, with the advancement of
The principle of the optical technology is that binary
real-time compression and decompression methods and
data can be encoded by creating a pattern of black-and-
technologies, CD recording software packages can put on
white splotches, just as ON/OFF electrical signals do or as the
a CD-ROM over 1.3 Gb of data, instead of the usual 650 Mb.
well-known bar code appears in the supermarket. Reading
It is expected that, with increasing computer processor
patterns of light and dark requires a photo detector, which
speeds and better integration [see what Apples (Cupertino,
changes its resistance depending on the brightness levels it
CA) backside cache can do to the overall speed of the
senses through a reflected laser beam.
machine], real-time compression and decompression will
In terms of manufacturing, i.e., printing/ duplicating the
be an excellent solution for many applications that need
compact disc, the major breakthrough came when engi-
more than 650 Mb on one CD. Obviously this depends on the
neers found that, by altering the texture of a surface
cost of the competing DVD technology too! This solution
mechanically, its reflectivity could be changed too, which
makes the CD-ROM and the emerging even higher capacity
means that the dark pit does not reflect light as well as a
DVD technology essential to the digitalization and compu-
bright mirror. Thus, the CD-ROM should be a reflective
terization of photography, the animation and the video
mirror that should be dotted with dark pits to encode data,
1

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 CD-ROMs AND COMPUTERS SYSTEMS

blem on a piece of coated plastic disk, in comparison with


the magnetic hard disk, mechanically in a much simpler
way.
To maximize the data storage capacity of the disc, the
linear velocity recording of the compact disc is a constant
1.2 m per second. To achieve this rate both at the inside as
well as the outside tracks of the disc, the spin varies
between 400 rpm (revolutions per minute) and 200 rpm
(at the outside edge). This way the same length of tracks
appears to the read/write head in every second.
Furthermore, because of the access time the drive is
capable of performing, it is important to note that the track
pitch of the CD is 1.6 mm. This is the distance the head
moves from the center toward the outside of the disc as it
reads/writes data, and that the data bits are at least
0.83 mm long. (In other words, a CD-ROM and its drive are
precision electro-mechanical and software instruments.)
It should be noted that, due to such small distances
between the tracks, it is extremely important to properly
cool CD writers as they cut master CD-ROMs in a profes-
sional studio, or inside or outside a PC or Mac on the
desktop. Usually fan cooling is adequate; nevertheless,
on a warm summer day, air-conditioning even in a desktop
environment is advisable! Furthermore, such equipment
should not be operated at all in case the inside cooling fan
breaks down!
In terms of mass duplication, a master CD (often
referred to as the gold CD) is recorded first, then this
master is duplicated by means of a stamping equipment
in principle, it is very similar to the vinyl audio LP produc-
tion or the photocopying process. A crucial aspect of this
process is that the data pits are sealed within layers of the
disc and are never reached mechanically, only optically by
the laser beam. Therefore, theoretically, quality mass-pro-
duced (silver) CDs never wear out, only when abusing
them harshly leaves scratches on the surface of the disc or
when exposing them to extreme temperatures (1217).

CD-ROM BLOCKS AND SECTORS


Figure 1. (a) and (b) Example of a 3-D animation scene. Solid
model animation sequence of a short battle created by Richard G. The recordable part of the compact disc consists of at least
Ranky, illustrating 200 high-resolution frame-by-frame rendered three blocks. These are as follows:
complex images, integrated into a QuickTime digital, interactive
movie and stored on CD-ROM. (For full-color images, please look  Lead-in-block, holding the directory information,
up the website: http://www.cimwareukandusa.com.)
located on the innermost 4 mm of the discs recording
surface.
 Program block, holding the data or audio tracks and
fills the next 33 mm of the disc.
by means of a laser beam traveling along a long spiral, just  Lead-out-block, which marks the end of the CD at the
as with the vinyl audio LPs, that blasts pits accurately onto external 1 mm.
the disc.
The CD is a 80-mm-(i.e., the minidisc) or a 120-mm- The compact disc is divided into sectors. The actual size
diameter (i.e., the standard) disc, which is 1.2 mm thick that is available is 2352 bytes for each sector. It should be
and is spinning, enabling direct data access, just as with the noted that different CD formats use this 2352 bytes in
vinyl audio LP, when the needle was dropped to any of the different ways. As an example, an audio CD uses all
songs in any order. (Note that the more obvious 100 mm 2352 bytes for audio data, whereas computer-oriented
diameter would have been too small to provide the approxi- multimedia data formats need several bytes for error detec-
mately 150-Mb-per-square-inch storage density of the opti- tion and correction.
cal technology of that of the 1980s, preferred by the classical
music industry.) This meant solving the data access pro-
CD-ROMs AND COMPUTERS SYSTEMS 3

Figure 2. (a)(d ) An interactively navigatable, 360-degree panable, QuickTime VR virtual reality movie of Budapest by night by Mick F.
Ranky, allowing user-controlled zoom-in/out and other hot-spot controlled interactivity. (For full-color images, please look up the website:
http://www.cimwareukandusa.com.)
4 CD-ROMs AND COMPUTERS SYSTEMS

Each sector is then divided further into logical blocks of A session is a collection of one or more tracks. Each
512, 1024, or 2048 bytes. These block sizes are part of the recording procedure on a CD-R generates a session
definition for each standardized compact disc format. that contains all tracks recorded within the same time
period, hence the terminology, session.
A compact disc recorded in multiple recording ses-
CD-ROM STANDARDS
sions is referred to as a multisession CD. In this case,
each session has its own lead-in track and table of
As is the case with any successful technology, everyone
contents, used by the software. The number of sessions
wants to use CD-ROMs, but in their own way, depending on
should be minimized, for efficient interactive multi-
the applications; therefore, standardization of both the
media playback as well as for saving 13 Mb overhead
hardware as well as the software has brought at least
per session.
some order to this chaos.
Furthermore, the Orange Book defines the Program
Compact disc standards include the following:
Area, which holds the actual data on the disc; a Pro-
gram Memory Area, which records the track informa-
 Red Book: This is the original compact disc application
tion for the entire disc; including all sessions it
standardized by the International Standards Organiza-
contains; the Lead-in Area, which holds the directory
tion (ISO 10149) for digital audio data storage that
information; the Lead-out Area, which marks the end
defines digitization and sampling data rates, data
of the CD; and the Power Calibration Area, which is
transfer rates, and the pulse code modulation used.
used to calibrate the power of the recording laser beam.
As prescribed by the Red Book, the ISRC-Code holds
the serial number for each track in a standardized
 The Blue Book standard was first published in 1995.
format. It introduced stamped multisession compact discs in
Q-Codes contain extra information about sectors which the first track is a Red Book audio track. This
such as the ISRC-Code, the Media Catalog Number, resolved the track one compatibility problem.
and the indices. The Media Catalog Number is a (Formerly this standard was known as CD-Extra.
unique identification number (UPC-EAN bar code, Microsoft calls it CD-Plus.) The Blue Book standard
Universal Product Code) for the compact disc. enables compact disc authors to put interactive multi-
If required, the ISRC and Q-Codes can be set in media data into the unused capacity of music CDs.
specialized CD writing/mastering software, such as in  The White Book comprises the standards for video
Adaptecs Jam (see the discussion below on CD-ROM CDs. This format is based on CD-i (see the discussion
software packages). above on the Green Book standard). These CD pro-
 Yellow Book: Introduced in 1984, it was the first to ducts are meant to be played on CD-i players.
enable multimedia and it describes the data format
standards for CD-ROMs and includes CD-XA, which
adds compressed audio data to other CD-ROM data. PROPRIETARY CD-ROM STANDARDS
From a computing, interactive multimedia perspec-
tive, this format is the most important. It should be mentioned that there are other proprietary
The Yellow Book [ISO 10149: 1989(E)] divides the compact disc standards too, most importantly the following:
compact disc into two modes, as follows:
Mode 1, for ordinary computer data.  The KODAK Photo CD Sydney, Australia, readable on
Macs, PCs, SIGs (computers made by Silicon Graphics
Mode 2, for compressed audio and digital video data.
Inc.,), and other machines, is a standard for storing
high-quality photographic images developed by the
Because Yellow Book CD-ROMs have mixed audio, Eastman Kodak Company (Rochester, NY).
video, and ordinary computer data, they are often referred  MMCD, a multimedia standard for handheld CD
to as mixed-mode CDs. (See the discussion on CD-ROM
players by the Sony Corporation.
formats below.)

 The Green Book is the elaborate extension of the


CD-ROM TRANSFER RATE
Yellow Book and is a standard for Philips CD-i, Com-
pact Disc Interactive. It brings together text, video,
The transfer rate of a compact disc system is a direct
and sound on a single disc in an interleaved mode as
function of the revolutions per minute (rpm) at which the
well as extends the amount of digital, stereo audio data
disc spins in the player.
that can be put onto a single CD to up to 120 minutes
Because of the different sizes of blocks and the error
(versus 74 minutes).
correction methods used by different formats, the exact
 The Orange Book, developed jointly by Philips and transfer rate at a given spin rate varies from one type of CD
Sony, defines the hardware as well as the software to the other.
aspects of the recordable CDs, often referred to as CD- As an example, in audio mode, the block size of 2362
R (Compact Disc Recordablesee below in more bytes is transferred using a 1  drive at 176 Kb per second,
detail). Introduced in 1992, the Orange Book enabled and in Mode 1, where the block size is 2048 bytes, the
multisession technology. 1  drive pushes through 153.6 Kb per second.
CD-ROMs AND COMPUTERS SYSTEMS 5

As with a CD-ROM drive, at 32  speed, in Mode 1, CD-R (CD-RECORDABLE)


where the block size is 2048 bytes, the 32  drive pushes
through 32  153.6 4915.2 Kb per second, a value close to The fact that the compact disc is a sequentially recorded,
a reasonable hard disk drives transfer rate. but randomly playable, system (versus the magnetic disk,
which is randomly recordable as well as playable) makes
writing a CD-R a more complex operation than copying files
CD-ROM ACCESS TIME
over to a (magnetic) hard disk.
As CD recorders want to write data (i.e., burn the CD-
In comparison with the magnetic hard disk drives, the
R) in a continuous stream, the data files to be recorded onto
CD-ROMs access time is significantly higher, due to the
the CD must be put first into a defragmented magnetic disk
bulkiness of the optical read head, versus the elegant
folder, often referred to as writing a virtual image file. To
flyweight mechanism of the hard disk. The optical assem-
assure continuous space on a hard drive, the best practice is
bly, which moves on a track, carries more mass that trans-
to reformat the drive or its partition before moving any files
lates to longer times for the head to settle into place.
into it. This will prevent any interruptions during CD
Besides the mass of the optical head, the constant linear
recording (i.e., mastering) that will most likely result in
velocity recording system of the CD slows further the access
an error in recording. In a normal case, the folder created on
of a desired data. With music, for which the CD was
the magnetic disk will be copied over/recorded exactly as
originally designed for, this is not a problem, because it
is onto the CD-ROM.
is (usually) played back sequentially. As with computer
Furthermore, the number of sessions should be mini-
data access, the CD must act as a random access storage
mized too, for efficient interactive multimedia playback (in
device, when the speed (access time, plus read, or write
particular, in the case of several large video files) as well as
time) becomes crucial.
for saving space (i.e., 13 Mb per session).
The typical access time for a modern CD drive is approxi-
For the laser beam to code data onto the CD-R, the CD-R
mately 100 to 200 ms, about ten times longer, than that of a
media needs an extra layer of dye. To guide the process even
modern magnetic hard disks access time.
better, in particular in a desktop case, all CD-Rs have a
formatting spiral permanently stamped into each disc.
CD-ROM FORMATS Analyzing the cross section of a CD-R, the outside layer
is a Silkscreened Label; then as we move further inside,
The Yellow Book standard enables multimedia, because it there is a Protective Layer, and then the Reflective Gold
describes the data format standards for CD-ROM discs and Coating, with the photoreactive Green Layer embedded
includes CD-XA, which adds compressed audio data to into a clear polycarbonate base.
other CD-ROM data. However, the Yellow Book does not As in the case with all CDs, the CD-R has a bottom
define how to organize the data into files on the disc. protective layer, which gives its robustness. On the poly-
Therefore, the High Sierra Format (HSF) and later the carbonate a thin reflective layer is plated to deflect the CD
ISO9660 format was developed and standardized. beam back so that it can be read by the compact disc drive.
The only difference between the HFS and the ISO9660 The dye layer, special to the CD-R, can be found between
formats is that some CD drives will read HFS CDs only (on this reflective layer and the standard protective lacquer
old Macs), but the good news is that all recent drives on all layer of the disc. It is photoreactive and therefore changes
platforms (i.e., MacOS, Windows/NT, Unix) should be able its reflectivity in response to the laser beam of the CD writer
to read both. enabling data coding.
Note that ISO9660 strictly maintains the 8/3 DOS nam-
ing conventions, whereas the HFS format, used on Macs
CD-RW, CD-ERASABLE, OR CD-E
from the very early days, allowed full-length Mac file
names. (Long file names are beneficial in particular
Ricoh Co. Ltd. (Tokyo, Japan) pioneered the MP6200S
when a large number of multimedia objects/files has to
CD-ReWritable drive in May 1996. (Note that CD-Erasable
be named and coded in a meaningful way.)
or CD-E was the original, confusing terminology.) At that
To fix this problem, for Windows 95, Microsoft (Redmond,
time that was the only solution to a compact disk drive that
WA) has introduced a set of extensions to ISO9660, called the
could read as well as write data onto a CD! Users today
Joliet CD-ROM Recording Specification. These extensions
enjoy a vastly expanded range of choices, both in terms of
support 128-character-long filenames (not the maximum
manufacturers as of well as of the variety of software
255) with a broad character set. Unfortunately, DOS sys-
bundles and interface options.
tems before Windows 95 still read according to the 8/3 file
CD-RW employ phase-change laser technology to code
naming convention; thus, even some of the latest multimedia
and decode data. From a user point of view, in operation,
CDs are still forced to use the short 8/3 filenames (e.g., for a
CD-RW is similar to that of the magnetic hard disk. The
video clip: 12345678.mov, instead of a more meaningful:
drive can update the disc table of contents any time; thus,
JaguarTestDrive_1.mov), to maintain compatibility.
files and tracks can be added without additional session
6 CD-ROMs AND COMPUTERS SYSTEMS

overheads. (Note that in the case of the CD-Rs, a session According to the National Technology Alliance (USA), a
overhead is 13 Mb.) common cause of CD-ROM failure is a change in the reflec-
Where CD-R drives in the past were limited to internal tivity of the aluminum coating as a result of oxidation,
and external small computer system interface (SCSI), corrosion, or delamination. Deterioration of the protective
todays range of CD-RW/CD-R multifunction drives come overcoat (acrylic or nitrocellulose lacquer) can make the
with parallel and IDE connections, in addition to SCSI. aluminum layer more susceptible to oxidation and corro-
Other important aspects of CD-RWs include the sion. Some manufacturers use a silver reflecting layer that
following: is subject to tarnishing by sulfur compounds in the envir-
onment and CD-ROM packaging.
 In comparison with the IDE, or parallel-connected CD-ROMs can also fail because of deterioration of the
drives, SCSI drives can be considerably faster, espe- polycarbonate substrate. Polycarbonate is subject to craz-
cially when using a PCI bus-mastering card. ing, which locally reduces the optical clarity of the
 Most modern PC motherboards support four IDE substrate. Oils in fingerprints and organic vapors in the
devices. If two hard drives and two CD-ROM drives environment can contribute to crazing. Scratches in the
are already installed, there is no room for additional substrate as a result of mishandling can also cause disk
IDE devices; thus, something has to be removed to failures.
install the CD-RW/CD-R drive. The relative effectiveness of CD-Recordable media is an
 At the time of writing, the maximum read-speed of issue often bandied about in industry and business circles,
CD-RW drives is 6; therefore, a faster 12  to where the technology is used and increasingly relied on.
32  CD-ROM drive should be installed, in addition Much controversy surrounds finding some useful way of
to the rewritable drive for fast multimedia playback. evaluating the blank discs of various brands and types used
in CD recorders today.
Last, but not least, as with anything as complex as a Several criteria go into evaluating disc usefulness: read-
CD-R, or CD-RW, it is strongly advisable to determine the ability, compatibility with recorders and players, and
importance of toll-free technical support, technical support expected life span. According to the National Technology
hours of accessibility and availability, and the cost of soft- Alliance (USA), results compiled in a series of tests per-
ware, driver, and flash BIOS upgrades. formed by One-Off CD Shops International between early
1993 and mid-1995 on a variety of disc brands and types
shed a great deal of light on the topic, even though the tests
CD-ROM CARE AND STABILITY were done only to evaluate the readability of recorded discs,
and not media longevity or suitability of specific brands or
In general, inside the optical disc, there is a data layer on a types for use on every system. But the methodological rigor
substrate, which is read by a laser. In the case of CD-ROM, of the narrow focus afforded yielded considerable data that
the data layer consists of a reflective layer of aluminum bodes well for the effectiveness of current disc-evaluating
with pits and plateaus that selectively reflect and scatter mechanisms.
the incident laser beam. Not every question has been answered by any means,
Optical discs are generally constructed from polymers but one finding, according to the National Technology
and metallics. The polymers are subject to deformation and Alliance (USA), is clear: worry about the quality of
degradation. Metallic films are subject to corrosion, dela- CD-R media seems largely unfounded (1821). Note
mination, and cracking. Metallic alloys are subject to de- that, in reality, the bigger worry is not the disk, but the
alloying. entire system, in terms of computers, software, as well as
Optical discs consist of a data layer (pits, bumps, or CD/DVD readers and writers becoming obsolete within
regions of differing physical or magnetic properties) sup- technology periods of approximately 35 years, and then
ported on a much thicker polycarbonate or glass substrate. after 1015 years, one might not find a machine (i.e., a
A reflective layer is also required for CD-ROMs. The data system) that can read an old CD-ROM or DVD-ROM, even
layer/reflective layer is protected with an overcoat. if the data on the media is in good shape. . . .
In optical media, there is a data pit that is responsible
for reflecting/dispersing of an incident laser beam. Any-
thing that changes the reflectivity or other optical proper- CD-RECORDABLE VERSUS MASS-REPLICATED (SILVER)
ties for the data bits can result in a misread. According to COMPACT DISCS [AN ANALYSIS BY THE NATIONAL
the National Technology Alliance (USA), the optical clarity TECHNOLOGY ALLIANCE (USA)]
of the substrate is important in those systems where the
laser must pass through this layer. Anything that inter- Mass-replicated (i.e., silver) discs have their data encoded
feres with the transmission of the beam, such as a scratch, during injection molding, with pits and lands pressed
or reduced optical clarity of the substrate, can result in a directly into the substrate. The data side of the transparent
data error. disc is metalized, usually with aluminum sputtered onto
CD-ROM technology relies on the difference in reflec- the bumpy surface, which is spincoated with lacquer to
tivity of pits stamped into a polycarbonate substrate protect the metal from corrosion, and then it is usually
and vapor coated with a reflective metallic layer, which labeled in some fashion, generally with a silkscreened or
is typically aluminum, hence the terminology for the mass- offset printed design.
produced CDs, silver CDs.
CD-ROMs AND COMPUTERS SYSTEMS 7

One source of confusion and concern about CD-R discs is specified in the Orange Book. According to the National
their notable physical differences (i.e., gold/green shine) Technology Alliance (USA), several companies have built
from normal (i.e., silver shine), pressed compact discs. machines that are used for testing discs during and after
Each CD-R blank is designed to meet standards regard- the manufacturing process using these criteria, and only
ing function, but the way each achieves the function of recently have new testing devices made specifically for CD-
storing digital information in a manner that can be read by Recordable become available.
standard CD players and drives is distinct. In terms of the
top side and bottom side, replicated discs are similar to that
ACCELERATED TEST METHODOLOGY BY THE NATIONAL
of the CD-Rs; it is what comes between the polycarbonate
TECHNOLOGY ALLIANCE (USA)
substrate and the tops lacquer coating that makes the
difference.
Changes in a physical property involving chemical degra-
CD-Rs are polycarbonate underneath, too, but the sub-
dation can usually be modeled by an appropriate Arrhenius
strate is molded with a spiral guide groove, not with data
model. Error rates can be fit to an appropriate failure time
pits and lands. This side is then coated with an organic dye,
distribution model. Once an appropriate model has been
and gold or silver (instead of aluminum as in the case of
determined and fit to the experimental data, it can be used
mass-replicated discs) is layered on the top of the dye as the
to estimate media properties or error rates at a future time
reflective surface, which in turn is lacquered and some-
at a given condition.
times labeled just as replicated discs are.
In performing accelerated tests, there is a tradeoff
The dye forms the data layer when the disc is recorded,
between the accuracy and the timeliness of the results. It
having a binary information image encoded by a laser
is impractical to age data storage media at use conditions
controlled from a microcomputer using a pre-mastering
becouse it would take several years to evaluate the product,
and recording program. Where the recording laser hits
by which time it would be obsolete. To obtain results in a
the dye, the equivalent of a molded pit is formed by the
timely manner, use temperatures and humidities are
laser beam reacting with the photosensitive dye, causing it
typically exceeded to accelerate the rates of material
to become refractive rather than clear or translucent. When
decomposition.
read by a CD player or CD-ROM drive, the affected area
Severe temperature/humidity aging may allow for a
diffuses the reading lasers beam, causing it to not reflect
relatively rapid assessment of media stability, but results
back onto the readers light-sensor. The alternations
may not be representative of actual use conditions.
between the pickup lasers reflected light and the refracted
Furthermore, samples treated in a laboratory environment
light make up the binary signal transmitted to the players
may not be in a configuration representative of typical use
firmware for unencoding, error detection, and correction,
conditions.
and further transmission to the computers processor or the
To perform accelerated testing, several media samples
audio players digital/analog converter.
are placed in several different temperature/humidity/pol-
According to the National Technology Alliance (USA),
lutant environments. The media are removed at periodic
the feature that really distinguishes recordable media from
intervals, and a key property is measured.
replicated discs is the dye layer. The polymer dye formulas
This key property could be a physical characteristic,
used by manufacturers are proprietary or licensed and are
such as magnetic remanence, or it could be data error
one of the distinguishing characteristics between brands.
rates, if the materials were prerecorded. After a sufficient
Two types of dye formulas are in use at the time of
number of key property versus time data has been collected
writing, cyanine (and metal-stabilized cyanine) and phtha-
at each condition, the data can be fit to a predictive model
locyanine. One (cyanine) is green, and the other appears
(19,2231).
gold because the gold metalized reflective layer is seen
through the clear dye.
ALTERNATIVE, INTERNET/INTRANET-BASED
TECHNOLOGIES
TENETS OF READABILITY TESTING OF CD-ROMS
AND CD-RS
With the rapid advancement of the Internet and local,
typically much faster and more secure versions of it, often
At least in theory, however, these differences should have
referred to as intranets, mass storage, document archiving,
little or no impact on readability, becouse CD-R and CD-
interactive multimedia distribution, and other services,
ROM media share the Red Book standard for CD-DA
mostly online, will become a reality and to some extent
(Digital Audio). The Red Book specifies several testable
an alternative for data stored and distributed on CD-ROMs
measurements that collectively are supposed to determine
and DVDs.
whether a disc should be readable as an audio CD media.
The issue, nevertheless is always the same: online acces-
The Yellow Book, or multimedia CD-ROM standard,
sible data over a very fast network, under the networks
requires some additional tests.
control, or at the desk on a CD-ROM, or DVD disc, under
As CD-Recordable discs, described in the Orange Book,
the users/creators control. No doubt there are reasons for
are supposed to be functionally identical to mass-replicated
both technologies to be viable for a long time, not forgetting
silver CD-ROMs, it is logical to assume that the same test
the point, that even if it comes online over the fast network,
equipment and standards should be applied to them as to
at some point in the system the servers will most likely read
Yellow Book discs, so no new readability criteria were
8 CD-ROMs AND COMPUTERS SYSTEMS

Table 1. Maximum Data Rates of Digital


Telecommunications Standards
Standard Connection type Downstream rate Upstream rate
V.34 Analog 33.6 Kbps 33.6 Kbps
SDS 56 Digital 56 Kbps 56 Kbps
ISDN Digital 128 Kbps 128 Kbps
SDSL Digital 1.544 Mbps 1.544 Mbps
T1 Digital 1.544 Mbps 1.544 Mbps
E1 Digital 2.048 Mbps 2.048 Mbps
ADSL Digital 9 Mbps 640 Kbps
VDSL Digital 52 Mbps 2 Mbps

the data from a CD-ROM or DVD jukebox, or even large-


capacity magnetic hard disks.
To understand the importance of the online, networked
solution and the areas in which they could, and most likely
will, compete with the CD-ROM/ DVD technologies, refer to
Table 1. It must be noted that these rates in Table 1 are
theoretical maximum data rates, and in practice, unless a
direct hired line is used, the actual transfer rates will most
likely depend on the actual traffic.
Analyzing Table 1, it is obvious that 128-Kbps ISDN
(Integrated Services Digital Network) lines, and upward,
such as the T1 lines, representing the bandwidth of 24 voice
channel telephone lines combined, provide viable online
multimedia solutions. As with anything else, though,
simultaneously competing, supporting, and conflicting
issues such as speed, ease of use, security, privacy of
data, and reliability/robustness will ensure that both the
online as well as the, in this sense, offline, CD-ROM, CD-R,
and DVD technologies will be used for a very long time.

CD-ROM/DVD-ROM APPLICATIONS

The CD-ROM and DVD-ROM technology is applied in


several different areas, but most importantly as audio
CDs (note that some rock stars have sold over 100 million
CDs), for data and document archiving, for linear and
nonlinear (i.e., interactive) video storage and playback,
for image compression and storage, for interactive multi-
Figure 3. (a) and (b) These screenshots illustrate two frames of an
media-based education, marketing, entertainment, and animated space flight (by Gregory N. Ranky) as part of a video-
many other fields of interest, where mass storage of data game project on CD-ROM. The individual frames have been com-
is important. puter generated and then rendered and integrated into an inter-
Since besides the MPEG video standards, Apples active QT movie.
multiplatform as well as Internet-friendly QuickTime
and QTVR digital interactive video and virtual reality
software tools became the de facto interactive multimedia can be found electronically at the website: http://www.
standards (delivered on CD-ROMs and DVDs as well as cimwareukandusa.com.)
usually streamed at lower quality due to the transfer rate As the video-game industry is the prime source for
and bandwidth over the Internet and intranets), as exam- computing and related CD-ROM R&D funding, we felt
ples of applications, we introduce these technologies as that we should demonstrate such new developments by
they are embedded into engineering educational, market- showing Fig. 3(a) and (b). These screenshots illustrate two
ing, or game-oriented CD-ROM and DVD programs. In frames of a longer animated space flight (by Gregory N.
these examples, one should recognize the importance of Ranky) as part of a video-game project on CD-ROM. The
accessing a large amount of data (e.g., 525-Mb digital, individual frames have been computer generated, and then
compressed video files), interactively, in a meaningful way, rendered and integrated into an interactive QT movie.
at the time and place the information is needed. (Further- As Apple Computer Inc. defines, QuickTime(QT) is not
more, note that many of these interactive examples an application, it is an enabling technology. QuickTime
CD-ROMs AND COMPUTERS SYSTEMS 9

comprises of pieces of software that extend the ability of a more polluted, and major demographic changes and move-
Macs or PCs operating system to handle dynamic media. ments of people are taking place.
Applications then use this technology and turn it into The fundamental change that has to be recognized is
other applications. As an example, many educational titles, that most existing hi-tech systems were designed with the
games, and reference titles have incorporated QuickTime human operator playing a passive role, and a machine
into their development, including Myst by Broderbund; being the clever component in the system. This is because
Microsoft Encarta by Microsoft; DOOM II by Id Software; accountant-driven management considers the workforce to
and Flexible Automation and Manufacturing, Concurrent be a major cost item instead of a major asset!
Engineering, and Total Quality Management by CIMware Anthropocentric technologies, such as flexible, interac-
and others. tive multimedia, make the best use of science and technol-
QuickTime as a technology became the basis for many of ogy, driven by the user at his or her pace and time, enabling
the multimedia/computing industrys most respected digi- the learner to explore and implement concepts further than
tal media tools. QuickTime is much more than just video that of the accountants order-bound fiscal view.
and sound. It is a true multimedia architecture that allows Consequently, interactive multimedia is not war, but a
the integration of text, still graphics, video, animation, 3-D, new opportunity to put back humans into harmony with
VR, and sound into a cohesive platform. QuickTime, deli- nature and able machines, by being better informed,
vered either on CD-ROMs, DVDs, or in a somewhat less educated, and happier contributors, rather than efficient
interactive mode over the Internet/intranet makes it easy long-term waste creators and destroyers of nature and the
to bring all of these media types together. society (3240).
In February 1988, ISO has adopted the QuickTime File
Format as a starting point for developing the key compo-
WHAT IS INTERACTIVE MULTIMEDIA?
nent of the MPEG-4 digital video specification, as the next-
generation standard. This format is supported by Apple
Interactive multimedia combines and integrates text, gra-
Computer Inc., IBM, Netscape Corp., Oracle Corp., Silicon
phics, animation, video, and sound. It enables learners to
Graphics Inc., and Sun Microsystems Inc.
extend and enhance their skills and knowledge working at
MPEGs decision to utilize the QuickTime file format
a time, pace, and place to suit them as individuals and/or
for the MPEG-4 specification has huge benefits for users
teams and should have a range of choices about the way
and the industry, said Ralph Rogers, Principal Analyst for
they might be supported and assessed.
Multimedia at Dataquest, San Jose, CA. This strategy will
In other words:
leverage the broad adoption of QuickTime in the profes-
sional media space, speed the creation of MPEG-4 tools and  The user has a choice and the freedom to learn.
content while providing a common target for industry
adoption.
 He or she is supported by the multimedia-based learn-
At a broader level, interactive multimedia, stored on CD- ing materials and technology.
ROMs, DVDs, and the forthcoming fast Internet and intra-  The tutors are creating an effective, enjoyable learning
nets urges the development of anthropocentric systems in environment and infrastructure.
which humans and machines work in harmony, each play-  The learners are simultaneously learners as well as
ing the appropriate and affordable (i.e., the best possible) authors.
role for the purpose of creating intellectual as well as fiscal
wealth. This means creating better educated engineers, Figure 4 represents a screen of over 300 interactive
managers, and workforce, at all levels, by building on screens of an industrial educational program on Servo
existing skills, ingenuity, and expertise, using new science Pneumatic Positioning, by Flaherty et al. (40) on CD-
and technology-based methods and tools, such as interac- ROM. The 650 Mb of data includes several hundred color
tive multimedia. photos and over 45 minutes of interactive digital videos
Today, and in the forthcoming decade of our information explaining the various aspects of servo pneumatic compo-
technology revolution, and eventually the Knowledge Age, nents, systems, positioning, control, programming, and
engineering, science, and technology in combination can applications.
create an intellectually exciting environment that molds Figure 5 is a screen of over 720 interactive screens of an
human creativity, enthusiasm, excitement, and the under- educational multimedia program on Total Quality Control
lying curiosity and hunger to explore, create, and learn. It is and Management and the ISO 9001 Quality Standard, by
obvious that economic development is not a unidimensional Ranky (41) on CD-ROM. The 650 Mb of data includes
process that can be measured by a narrow view of conven- several hundred color photos and over 45 minutes of inter-
tional accounting. active digital videos explaining the various aspects of total
Consequently there is a need to develop new creative and quality and the international quality standard as applied to
stimulative multimedia-based infrastructures, educa- design, manufacturing, and assembly in a variety of dif-
tional tools, as well as products and means of production ferent industries.
that have the embedded intelligence to teach their users Note the many opportunities we have programmed into
about themselves and that can meet challenges now faced these screens to continuously motivate the learners to be
by many companies and even countries as natural responsive and be actively involved in the learning process.
resources become more scarce, the environment becomes To maintain the continuous interactivity not just within the
10 CD-ROMs AND COMPUTERS SYSTEMS

Figure 4. A sample screen of over 300 interactive screens of a 3-D eBook multimedia program for medical education. As can be seen, the
screen includes text, images, video clips, and even 3-D objects. The novel feature of this approach is that the human characters are all based on
real, living people and illustrated on the screen using photo-accurate, interactive 3-D methods developed by Paul G Ranky and Mick F.
Ranky. (For full-color images and 3-D models, please look up the website: http://www.cimwareukandusa.com.)

CD-ROM, but also outside the CD, Internet and e-mail with real photographic images, versus rendered artificial
support is offered to learners. This enables them to interact models.
with the author(s) and/or the subject area specialists of the Apples QuickTime VR is now an integral part of Quick-
particular CD-ROM via e-mail as well as visit the desig- Time; it allows Macintosh and Windows users to experience
nated WWW domain site for further technical as well as these kinds of spatial interactions using only a personal
educational support (42). computer. Furthermore, through an innovative use of 360
(Please note that some of these interactive multimedia panoramic photography, QuickTime VR enables these
examples are available in electronic format as executable interactions using real-world representations as well as
demo code when this encyclopedia is published electroni- computer simulations.
cally. Also note that some of the images and demos illu- To illustrate the power of this technology, when applied
strated here can be seen in full color at the website: http:// to interactive knowledge propagation on CD-ROMs,
www.cimwareukandusa.com.) DVD-ROMs, and to some extent on the Internet, refer to
Fig. 6(a)(c), illustrating a few frames of an interactively
controllable (Chevy) automobile image, including opening
WHAT IS QUICKTIME VR?
and closing its doors, under user control; Fig. 7(a)(d),
showing a few frames of an interactively navigatable inter-
As Apple describes, virtual reality describes a range of
ior of a Mercedes automobile; and Fig. 8(a)(b), showing a
experiences that enables a person to interact with and
traditional job-shop, again with all those great opportu-
explore a spatial environment through a computer. These
nities of interactive navigation, zoom/in and out, and hot-
environments are typically artistic renderings of simple or
spot controlled exploration of these hyperlinked images.
complex computer models. Until recently, most VR appli-
As can be recognized, the opportunities for interactivity,
cations required specialized hardware or accessories, such
for learning by exploring under user (versus teacher con-
as high-end graphics workstations, stereo displays, or 3-D
trol) is wasted, not just in education, but also in marketing
goggles or gloves. QuickTime VR now does this in software,
and general culture, in terms of showing and illustrating
CD-ROMs AND COMPUTERS SYSTEMS 11

Figure 5. An illustration of a screen of over 720 interactive screens of an educational multimedia program on Alternative Energy Sources.
The program is stored on CD-ROM (as well as the Web) and includes hundreds of images, video clips, 3-D objects, and 3-D panoramas; all
interactive for the users to explore. (For full-color images and samples, please look up the website: http://www.cimwareukandusa.com.)

scenes, people, cultures, lifestyles, business practices, of Technology (NJIT) with industry-partners in 1998 with
manufacturing, design and maintenance processes, and serious industrial applications in mind, implemented in a
products even remotely, which have never been explored voice I/O controlled, interactive multimedia, mobile-
like this before. wearable device for use by the automobile (and other)
(Please note that some of these interactive multimedia industries (see Fig. 9). The Co-Principal Investigators of
examples are available in electronic format as executable this R&D project at NJIT were Professor Paul G. Ranky and
demo code when this encyclopedia is published electroni- Professor S. Tricamo and project partners in an R&D
cally. Also note that some of the images and demos illu- Consortium included General Motors, Raytheon, the U.S.
strated here can be seen in full color at the website: http:// National Guard, and Interactive Solutions, Inc.
www.cimwareukandusa.com.) The system consists of the following components:

 Integrated to the computer diagnostic port of the auto-


SMART DART: A SMART DIAGNOSTIC AND REPAIR TOOL
mobile, or offline, interacting with the technician, can
IMPLEMENTED IN A VOICE I/O CONTROLLED,
diagnose a variety of problems and can communicate
INTERACTIVE MULTIMEDIA, MOBILE -WEARABLE
the results at the appropriate level, format, and mode,
COMPUTER-BASED DEVICE FOR THE AUTOMOBILE (AND
using various multimedia tools and solutions.
OTHER) INDUSTRIES
 Can self-tune, in terms of adjusting to the actual user
Smart DART is a novel, computer-based prototype mentor- needs and levels in an intelligent way.
ing system originally developed at the New Jersey Institute  Has a highly interactive and user-friendly multimedia
interface.
12 CD-ROMs AND COMPUTERS SYSTEMS

Figure 6. (a)(c) The figure illustrates a few frames of an interactively controllable (GM Chevy) automobile image, including opening and
closing its doors, under user control in QTVR on CD-ROM. (For full-color images, please look up the website: http://www.cimwareukandu-
sa.com.)

Figure 7. (a)(d) The figure shows a few frames of the interactively navigatable 3-D interior of a Mercedes automobile in QTVR on CD-ROM.
(For full-color images, please look up the website: http://www.cimwareukandusa.com.)
CD-ROMs AND COMPUTERS SYSTEMS 13

Figure 8. (a) and (b) The figure shows a traditional job-shop, again with all those great opportunities of interactive 3-D navigation, zoom/in
and out, and hot-spot controlled exploration of these hyperlinked images in QTVR on CD-ROM. (For full-color images, please look up the
website: http://www.cimwareukandusa.com.)

 Can update itself (based on either the learned knowl-  Can work in hazardous environments.
edge and/or by means of networked or plugged-in  Can automatically generate diagnostic and mainte-
technical fact data). nance reports and can communicate these reports
 Is a highly parallel, distributed, and networked device. via its networked communications system to any
 Has command-based voice recognition. receiving site or compatible computer.
 Has a hands-free user interface.  To help to improve the next generation of products, the
automated mentoring system can feed data as well as
learned knowledge in a format and language that is
appropriate and understandable to the design, man-
ufacturing, quality control, and so on engineering
community and their computer support and design
systems (CAD/CAM).
 Smart DART can diagnose itself and report its own
problems (and possible solutions) as they occur; there-
fore, it can help to improve the maintenance process as
well as the design and the overall quality of the auto-
mobile (or other complex product it is trained for).

About the System Architecture


To achieve the above listed and other functions, Smart
DART is implemented as a small, ruggedized, networked
mobile-wearable, or desktop networked computer-based
Figure 9. Smart DART is a novel, computer-based prototype device, which runs on a set of core processes, such as:
mentoring system, originally developed in 1998, with serious
industrial applications in mind, implemented in a voice I/O con-  The Process Manager.
trolled, interactive multimedia, mobile-wearable device for use by
the automobile (and other) industries. The R&D Consortium  The Information Manager.
included NJIT, General Motors, Raytheon, the U.S. National  The Interface Manager.
Guard, and Interactive Solutions, Inc. (For full color-images,  The Team Coordinator.
please look up the website: http://www.cimwareukandusa.com.)
14 CD-ROMs AND COMPUTERS SYSTEMS

Smart DART has a set of core modules linked to a fast


knowledge-bus, through which various smart cards, or
modules, it can execute various processes. These smart
cards have embedded various domain expertise and have
been integrated following the object-linking methodology.
Smart Dart has an open systems architecture, meaning
that as the need arises new smart cards can be developed
and plugged-in, in a way enhancing its field expertise.
Due to the well-integrated, object-linked design architec-
ture, these new modules, or smart cards, will automatically
integrate with the rest of the system, as well as follow the
standard multimedia user-interface design, cutting the
learning curve of using a new smart card to minimum.

The Typical Application Scope of Smart DART


To explain the application scope of our system, let us list
some broad application areas, with that of the view of the
maintenance technician, or engineer, whose job is to diag-
nose or fix a problem. In general, Smart DART will answer
the following questions and resolve the following problems:

 How does the particular system under test work? This is


explained using highly interactive, multimedia tools
Figure 10. Examples of the structure and storage capacity of
and interfaces to a newcomer, or to anybody that
different DVD formats; single-sided single and double layer, and
wishes to learn about the particular system. Note double-sided, double layer.
that a system in this sense can be an automobile, a
tank, or some other machine, such as a VCR or a
medical instrument.
 What are the subsystems, how do they work, and how do DVD is short for digital video (or versatility) disc and is
they interact? the successor of the CD or compact disc. Because of its
greater storage capacity (approximately seven times that of
Furthermore, Smart DART can a CD), a DVD can hold 8 hours of music or 133 minutes of
high-resolution video per side. This storage capacity varies
 Diagnose the problem. depending on whether single-or double-layer discs are used
 Offer Go/No-go reporting. and can range between 4.7 Gb and 8.5 Gb for single-sided
discs or 17 Gb for double-sided dual-layer discs (see Fig. 10).
 Provide end-to-end versus fault isolation.
The capacity does not directly double when a second layer is
 Rehearse the repair/fix scenarios and procedures by added because the pits on each layer are made longer to
means of highly interactive, and if required by the avoid interference. Otherwise they have the same dimen-
user, individualized interactive multimedia tools sions as a CD, 12 cm in diameter and 1.2 mm in thickness.
and techniques. The DVD medium resembles that of the CD-ROM tech-
 Be used as an expert tutor, supporting learners at nology. Even the size is the same, 120 mm diameter and 1.2
various levels, following different educational scenar- mm thick.
ios and techniques, best suited to the variety of differ- A DVD or CD is created by injection molding several
ent users (i.e., maintenance technicians, design, layers of plastic into a circular shape, which creates a
manufacturing and quality engineers, students, man- continuous stream of bumps arranged in a spiral pattern
agers, and others). around the disc. Next, a layer of reflective material, alu-
minum for the inner layers, gold for the outermost, is
spread to cover the indents. Finally, each layer is covered
DVD-ROM (DIGITAL VERSATILITY DISC) with lacquer and then compressed and cured under infra-
red light. Because of its composition, it is far more resistant
The DVD-ROM, or DVD technology, was created by mer- to water absorption than its predecessor, the laser disc, and
ging two competing proposals, one by the CD-ROM inven- do not suffer from laser rot. Each of these layers could act
tors Philips and Sony and the other one by Toshiba (Tokyo, as fully functional disks on both sides. Individual layers are
Japan). The purpose of the DVD is to create up-front a distinguished (i.e., addressed) by the system by focusing the
universal, digital storage and playback system, not just for laser beam. The result is a sandwich that has two layers per
audio, but for video, multimedia, archiving, and general side, or in other words four different recording surfaces,
digital mass data storage. hence, the significant data capacity increase.
DVDs are capable of storing significantly more data than Because the spiral data track begins in the center of the
CD-ROMs and come in different sizes and standards. disc, a single-layer DVD can actually be smaller than 12 cm.
CD-ROMs AND COMPUTERS SYSTEMS 15

whereas PAL displays 50 fields but at a higher resolution.


These differences in resolution also entail Pal or NTSC
formatting for DVDs. Audio is usually in Dolby Digital
formats, although NTSC discs may use PCM as well.
Region codes also exist depending on the geographic loca-
tion, from 1 to 8, with 0 used for universal playability.
There are several types of recordable DVD discs; of
these, DVD-R for Authoring, DVD-R for General use,
Figure 11. An illustration of the dimensions and spacing of the DVD R, and DVD-R are used to record data once like
pits in successive tracks on a DVD. CD-R. The remaining three, DVD RW, DVD-RW, and
DVD-RAM, can all be rewritten multiple times.
As an example, DVD-5 with one side and one layer offers
4.7-Gb storage capacity and 133 minutes of playing time.
This is the case for the UMD discs used by the Sony PSP DVD-9 can store 8.5 Gb on two layers, DVD-10 can store 9.4
Handheld Console. Each successive spiral is separated by Gb, and DVD-18 can store a massive 17.5 Gb and 480
740 nm (109m) of space (see Figs. 11 and 12), with each minutes of equivalent playing time. These DVDs will be
bump 120 nm in height, 400 nm long, and 320 nm wide; if most likely used in interactive multimedia and digital video
unrolled, the entire line would be nearly 12 km (12000 m!) applications.
long. As optical technology has improved significantly since
These are usually called pits due to their appearance the 1980s when the CD-ROM was created, DVDs (standar-
on the aluminum coating, although they are bumps when dized in December 1995) employ more closely spaced tracks
read by a laser. Because data are stored gradually outward, and a better focused and high wavelength laser beam (635
the speed of the drive is usually 5070% of the maximum to 650 nm, medium red).
speed. By comparison, the spiral tracks of a CD are sepa- The DVD constant linear velocity is 3.49 m per second,
rated by 1.6 mm (106m), with each bump 100 nm deep, and the disc spins between 600 rpm and 1200 rpm, at the
500 nm wide, and up to 850 nm long. This, combined with a inner edge, much faster than the conventional CD-ROM.
780 nm wavelength red laser, allows for much less data DVD raw data transfer rates are high too, 11.08 Mb per
capacity than a DVD, approximately 700 Mb. second raw and approximately 9.8 Mb per second actual,
The data are actually stored directly under the label and approximately 7 or 8 in CD-ROM terms, enabling full
are read from beneath by the laser. Therefore, if the top motion, full-screen video playback.
surface is scratched, the data can be damaged. If the under- Besides the computing industrys need to store massive
side is scratched or smudged, the data will remain, but the amounts of data, the real commercial driver behind the
laser will have difficulty reading through the distortion. DVD technology is the mereging, new high-definition (or
HD) video industry, because DVDs could replace the old-
fashioned, slow, linear, and relatively poor-quality VHS
VIDEO FORMATS and S-VHS videotape technology.
For videos, DVD uses MPEG-2 encoding that allows a
The usual form of data compression for (standard definition relatively high-quality display with 480 lines of 720 pixels
or SD) digital video is MPEG-2; the acronym comes from the (SD DVD quality), each to fit into a 4-Mb/s datastream.
Moving Picture Experts Group, which establishes video (Note that with MPEG, the actual data rate depends on the
standards. The usual rate is 24 frames per second for video complexity of the image, analyzed frame-by-frame at com-
footage, but the display frame depends on the television pression stage. Also note that HD DVD video offers
format. The NTSC format displays footage in 60 fields, 1920  1080 or better resolution, meaning approximately
2 megapixels per frame, which is very good quality for most
home and even professional users.)
DVD-Audio is excellent too, allowing a 44.1-KHz sam-
pling rate and supporting 24-bit audio as well as several
compressed multichannel formats, allowing switchable,
multiple-language full-length videos to be stored and
played back with additional audio and interactive features.

BLU-RAY

Blu-ray discs are named for the laser wavelength of 405 nm


used to encode their data. Their sponsors include Apple
Computer Corp., Dell, HP, Panasonic, Walt Disney, and
Sun Microsystems.
Figure 12. A simplified illustration of the spiraling layout of the As DVDs use a longer wavelength red laser, Blu-ray
DVD pits. discs have a higher storage capacity. By using a shorter
wavelength, as well as using higher quality lenses and a
16 CD-ROMs AND COMPUTERS SYSTEMS

higher numerical aperture, the laser beam can be more Maestro CDR 4x12E,4X/12X, Macintosh, 200ms, SCSI.
tightly focused and therefore used to store more data. Maestro CDR 4x121,4X/12X, Windows 95, Windows NT,
A standard 12-cm Blu-ray disc has a single-layer storage 200ms, SCSI.
capacity of 23.3, 25, or 27 Gb, equal to approximately 4
hours of high-definition video. They have a dual-layer Japan Computer & Communication
capacity of 46.6 to 54 GB. Blu-ray discs were initially
more vulnerable due to their data being closer to the sur- JCD-64RW, 4X/2X/6X, Windows 95, Windows NT,
face, but with the introduction of a clear polymer coating, 250ms, E-IDE.
they can be cleaned with a tissue or supposedly resist
damage by a screwdriver. This makes them more durable MicroBoards Technology
than current DVDs, with even fingerprints removable. Playwrite 4000RW, 4X2X/6X, Windows 95, Windows
Blu-ray DVDs require a much lower rotation speed than NT, Windows 3.1, UNIX, Macintosh, 250ms, SCSI-2.
HD DVDs to reach a 36 Mbps transfer rate. This results in a Playwrite 400IRW, 4X/2X/6X, Windows 95, Windows
12 BD for a Blu-ray disc but only 9 BD for an HD disc, as NT, Windows 3.1, 250ms, E-IDE.
the current upper limit for optical drives is 10 rpm.
Unlike the eight DVD region codes, Blu-ray discs have MicroNet Technology
three; region 1 covers the Americas, Japan, and East Asia
excluding China; region 2 is for Europe and Africa; and MCDPLUS4X12, 4X/12X, Macintosh, 165ms, SCSI.
region 3 is for China, Russia, India, and all other countries. MCDPLUS4X12ADD, 4X/!2X, Windows 95, Windows
The Blu-ray Disc Association has also added digital NT, Windows 3.1, DOS, 165ms, SCSI.
watermarking to prevent unofficial distribution, or MCDPLUS4X12PC, 4X/12X, Windows 95, Windows NT,
through HDTVs without an HDCP-enabled interface. Pos- Windows 3.1, DOS, 165ms, SCSI.
sible codecs used by Blu-ray discs include MPEG-2, H.264, MCDPLUS4X121, 4X/12X, Windows 95, Windows NT,
and VC-1 for video and PCM and Dolby Digital for audio. Windows 3.1, DOS, 165ms, SCSI.
MCDPLUS4X121PC, 4X/12X, Windows 95, Windows
HD DVD NT, Windows 3.1, DOS, 165ms, SCSI.

HD DVD discs, like Blu-ray, use a blue-violet 405-nm laser Microsynergy


to encode data. Their promoters include Sanyo, Toshiba,
CD-R4121, 4X/12X, Windows 95, Windows NT, Win-
Intel, Microsoft, Paramount Pictures, and Warner Bros.
dows 3.1 Macintosh, 165ms, SCSI-2.
HD DVDs have storage capacities of 15 Gb and 30 Gb for
single-and dual-layer discs, respectively. This allows for CD-R412E, 4X/12X, Windows 95, Windows NT, Win-
approximately 8 hours of high-definition video storage for dows 3.1 Macintosh, 165ms, SCSI-2.
the 30-Gb model. Unlike Blu-ray, HD DVDs are backward CD-RW4261, 4X/2X/6X, Windows 95, Windows NT,
compatible with DVDs, requiring no change in DVD players Windows 3.1 Macintosh, 250ms, SCSI-2.
for the new format. HD DVD discs have a thicker protective CD-RW426E, 4X/2X/6X, Windows 95, Windows NT,
coating (0.6 mm compared with 0.1 mm for Blu-ray), which Windows 3.1 Macintosh, 250ms, SCSI-2.
allows greater resistance to damage, but also lower storage
capacity, as the laser has more covering to penetrate. Optima Technology Corp
Because HD DVDs use similar manufacturing processes
CDWriter, 4X/2X/6X, Windows 95, Windows NT, 250ms,
to current DVDs, it is less expensive than having to change
SCSI-2.
facilities to newer systems. A new system by Memory Tech
can be adapted to create HD DVDs in 5 minutes. These
Panasonic
converted lines will also be able to produce higher quality
conventional DVDs, because HD-DVDs require a higher CW-7502-B, 4X/8X, Windows 95, Windows NT, Win-
level of manufacturing precision. dows 3.1, Macintosh, 175ms, SCSI-2.

Pinnacle Micro
CD-ROM/DVD DRIVE MANUFACTURERS AND CURRENT
DRIVES RCD-4x12e, 4X/12X, Windows 95, Windows NT, Macin-
tosh, 165ms, SCSI-2.
Although companies manufacturing CD-ROM and DVD RCD-4x12i, 4X/12X, Windows 95, Windows NT, Macin-
hardware and software change, this list could be used as tosh, 165ms, SCSI-2.
a reliable source for searching information and products.
Plexor
DVS (Synchrome Technology)
PX-R412Ce, 4X/12X, Windows 95, Windows NT, Macin-
Maestro CDR 4x12E,4X/12X, Windows 95, Windows NT, tosh, 190ms, SCSI.
200ms, SCSI.
CD-ROMs AND COMPUTERS SYSTEMS 17

PX-R412Ci, 4X/12X, Windows 95, Windows NT, Macin- Plus 4.10a


tosh, 190ms, SCSI. Kodac Build-It 1.5
Microboards VideoCD Maker1.2.5E
OMI/Microtest Audiotracer 1.0
Smart and Friendly
OMI/Microtest Disc-to-disk 1.8
CD-R 4006 Delux Ext (SAF781), 4X/6X, Windows 95, OMI/Microtest Quick TOPiX2.20
Windows NT, Macintosh, 250ms, SCSI-2. Optima Technology CD-R Access Pro 3.0
Pinnacle Micro CD Burner 2.21
CD-R 4006 Delux Int (SAF780), 4X/6X, Windows 95,
Pinnacle Micro RCD 1.58
Windows NT, Macintosh, 250ms, SCSI-2.
Ricoh CD Print 2.3.1
CD Speed/Writer Delux Ext (SAF785), 4X/6X, Windows
95, Windows NT, Macintosh, 165ms, SCSI-2. IBM OS/2
Citrus Technology Unite CD-Maker 3.0
CD Speed/Writer Int (SAF783), 4X/6X, Windows 95, Electroson GEAR 3.3
Windows NT, 165ms, SCSI-2. Young Minds Makedisc/CD
CD-RW 426 Delux Ext (SAF782), 4X/2X/6X, Windows Studio 1.20
95, Windows NT, Macintosh, 250ms, SCSI-2.
Sun SunOS
CD-RW 426 Delux Int (SAF779), 4X/2X/6X, Windows 95, Creative Digital Research CD Publisher
Windows NT, 250ms, E-IDE. 
HyCD 4.6.5.
Dataware Technologies CD Record 2.2
TEAC Eletroson GEAR 3.50
JVC Personal RomMaker
CD-R555,4X/12X, Windows 95, Windows NT, Windows Plus UNIX 3.6
3.1, 165ms, SCSI. Young Minds Makedisc/CD Studio 1.2
CD-RE555,4X/12X, Windows 95, Windows NT, Win-
Sun Solaris
dows 3.1, 165ms.SCSI. Creative Digital Research CDR Publisher
HyCD 4.6.5
Yamaha Dataware Technologies CD Record 2.2
Electroson GEAR 3.50
CDR400t, 4X/6X, Windows 95, Windows NT, Windows
JVC Personal RomMaker
3.1, UNIX, Macintosh, 250ms, SCSI-2.
Plus UNI 3.6
CDR400tx, 4X/6X, Windows 95, Windows NT, Windows Kodak Built-It 1.2
3.1, UNIX, Macintosh, 250ms, SCSI-2. Luminex Fire Series 1.9
CDRW4260t, 4X/2X/6X, Windows 95, Windows NT, Smart Storage SmartCD for integrated
Windows 3.1, UNIX, Macintosh, 250ms, SCSI-2. recording & access 2.00
Young Minds Makedisc/CD Studio 1.2
CDRW4260tx, 4X/2X/6X, Windows 95, Windows NT,
Windows 3.1, UNIX, Macintosh, 250ms, SCSI-2. HP HP/UX
Electroson Gear 3.50
Smart Storage SmartCD for integrated
recording & access 2.00
CD-ROM/DVD SOFTWARE WRITERS/VENDORS Young Minds Makedisc/CD Studio 1.20
AND CD-RECORDING SOFTWARE JVC Personal RomMaker
Plus UNIX 1.0
Although companies manufacturing CD-ROM and DVD Luminex Fire Series 1.9
software as well as software version numbers change, SGI IRIX
this list could be used as a reliable source for searching Creative Digital Research CDR Publisher HyCD 4.6.5
information and products. Electroson GEAR 3.50
JVC Personal RomMaker
Plus UNIX 1.0
Company Software
Luminex Fire Series 1.9
Apple MacOS Young Minds Makedisc/CD Studio 1.20
Adaptec Jam 2.1 DEC OSF
Adaptec Toast 3.54 Electroson GEAR 3.50
Adaptec DirectCD 1.01 Young Minds Makedisc/CD Sturdio 1.20
Astarte CD-Copy 2.01
CeQuadrat Vulkan 1.43 IBM AIX
CharisMac Engineering Backup Mastery 1.00 Electroson GEAR 3.50
CharisMac Engineering Discribe 2.13 Luminex Fire Series 1.9
Dantz Retrospect 4.0 Smart Storage SmartCD for integrated recording
Dataware Technologies CD Record 2.12 & access 2.00
Digidesign Masterlist CD 1.4 Young Minds Makedisc/CD Studio1.20
Electroson Gear 3.34
SCO SVR/ODT
JVC Personal Archiver
Young Minds Makedisc/CD Studio 1.20
18 CD-ROMs AND COMPUTERS SYSTEMS

Novell NetWare ROM decoder LSI Sanyo Electric Co, Ltd, Digest of Technical
Celerity systems Virtual CD Writer 2.1 PapersIEEE International Conference on Consumer Electronics
Smart Storage SmartCD for recording 3.78 Proc. 1997 16th International Conference on Consumer Electronics,
Smart Storage Smart CD for integrated recording Rosemont IL, 1113, 1997, pp. 122123.
& access 3.78 K. Holtz and E. Holtz, Carom: A solid-state replacement for the CD-
Amiga ROM, Record Proc. 1997 WESCON Conference, San Jose, CA, Nov.
Asimware Innovations MasterISO 2.0 46, 1997, pp. 478483.
Anonymous, Trenchless technology research in the UK water
industry, Tunnelling Underground Space Technol., 11(Suppl 2):
6166, 1996.
J. Larish, IMAGEGATE: Making web image marketing work for
ACKNOWLEDGMENTS
the individual photographer, Adv. Imag., 13(1): 7375, 1998.
We hereby would like to express our thanks to NSF (USA), B. C. Lamartine, R. A. Stutz and J. B. Alexander, Long, long-term
storage, IEEE Potentials, 16(5): 1719, 1998.
NJIT (in particular co-PIs in major research grants, Pro-
A. D. Stuart and A. W. Mayers, Two examples of asynchronous
fessors Steven Tricamo, Don Sebastian, and Richard
learning programs for professional development, Conference Proc.
Hatch, and the students), Professor T. Pato at ISBE, Swit-
1997 27th Annual Conference on Frontiers in Education. Part 1
zerland (co-PI in our European research grants), the stu- (of 3), Nov. 58, Pittsburgh, PA, 1997, pp. 256260.
dents, and faculty who have helped us a lot with their
P. Jacso, CD-ROM databases with full-page images, Comput.
comments in the United Kingdom, the United States, Libraries, 18(2): 1998.
Switzerland, Sweden, Germany, Hungary, Austria, Hong
J. Hohle, Computer-assisted teaching and learning in photogram-
Kong, China, and Japan. We also thank DARPA in the metry, ISPRS J. Photogrammetry Remote Sensing, 52(6): 266276,
United States, The U.S. Department of Commerce, The 1997.
National Council for Educational Technology (NCET, Uni- Y. Zhao, Q. Zhao, C. Zhu and W. Huang, Laser-induced tempera-
ted Kingdom), The University of East London, the Enter- ture field distribution in multi-layers of cds and its effect on the
prise Project team, the Ford Motor Company, General stability of the organic record-layer, Chinese J. Lasers, 24(6): 546
Motors, Hitachi Seiki (United Kingdom) Ltd, FESTO (Uni- 550, 1997.
ted Kingdom and United States), Denford Machine Tools, K. Sakamoto and H. Urabe, Standard high precision picture-
Rolls-Royce Motor Cars, HP (United Kingdom) Ltd., s:SHIPP, Proc. 1997 5th Color Imaging Conference: Color Science,
Siemens Plessey, Marconi Instruments, and Apple Com- Systems, and Applications, Scottsdale, AZ, Nov. 1720, 1997,
puters Inc. for their continuous support in our research, pp. 240244.
industrial, and educational multimedia (and other) pro- S. M. Zhu, F. H. Choo, K. S. Low, C. W. Chan, P. H. Kong and M.
jects. Furthermore, we would like to express our thanks to Suraj, Servo system control in digital video disc, Proc. 1997 IEEE
our families for their unconditional support and encour- International Symposium on Consumer Electronics, ISCE97
agement, including our sons, Gregory, Mick Jr. and Singapore, Dec. 24, 1997, pp. 114117.
Richard, for being our first test engineers and for their Robert T. Parkhurst, Pollution prevention in the laboratory, Proc.
valuable contributions to our interactive multimedia Air & Waste Management Associations Annual Meeting & Exhibi-
projects. tion Proceedings, Toronto, Canada, June 813, 1997.
V. W. Sparrow and V. S. Williams, CD-ROM development for a
certificate program in acoustics, Engineering Proc. 1997 National
FURTHER READING Conference on Noise Control Engineering, June 1517, 1997,
pp. 369374.
A. Kleijhorst, E. T. Van der Velde, M. H. Baljon, M. J. G. M. W. H. Abbott, Corrosion of electrical contacts: Review of flowing
Gerritsen and H. Oon, Secure and cost-effective exchange of mixed gas test developments, Br. Corros. J., 24(2): 153, 1989.
cardiac images over the electronic highway in the Netherlands, M. Parker, et al., Magnetic and magneto-photoellipsometric eva-
computers in cardiology, Proc. 1997 24th Annual Meeting on luation of corrosion in metal-particle media, IEEE Trans. Mag-
Computers in Cardiology, Lund, Sweden, Sept. 710, 1997, netics, 28(5): 2368, 1992.
pp. 191194.
P. C. Searson and K. Sieradzki, Corrosion chemistry of magneto-
P. Laguna, R. G. Mark, A. Goldberg and G. B. Moody, Database optic data storage media, Proc. SPIE, 1663: 397, 1992.
for evaluation of algorithms for measurement of qt and other
Y. Gorodetsky, Y. Haibin and R. Heming, Effective use of multi-
waveform intervals in the ecg, Proc. 1997 24th Annual Meeting
media for presentations, Proc. 1997 IEEE International Conference
on Computers in Cardiology, Lund, Sweden, Sept. 710, 1997,
on Systems, Man, and Cybernetics, Orlando, FL, Oct. 1215, 1997,
pp. 673676.
pp. 23752379.
B. J. Dutson, Outlook for interactivity via digital satellite, IEE
J. Lamont, Latest federal information on CD-ROMs, Comput.
Conference Publication, Proc. 1997 International Broadcasting
Libraries, 17: 1997.
Convention, Amsterdam, the Netherlands, Sept. 1216, 1997,
pp. 15. M. F. Iskander, A. Rodriguez-Balcells, O. de losSantos, R. M.
Jameson and A. Nielsen, Interactive multimedia CD-ROM for
Physical properties of polymers handbook, CD-ROM, J. Am.
engineering electromagnetics, Proc. 1997 IEEE Antennas and
Chemi. Soc., 119(46): 1997.
Propagation Society International Symposium, Montreal, Quebec,
J. Phillips, Roamable imaging gets professional: Putting immer- Canada, July 1318, 1997, pp. 24862489.
sive images to work, Adv. Imag., 12(10): 4750, 1997.
M. Elphick, Rapid progress seen in chips for optical drives, Comput.
H. Yamauchi, H. Miyamoto, T. Sakamoto, T. Watanabe, H. Tsuda Design, 36(9): 46, 4850, 1997.
and R. Yamamura, 24&Times;-speed circ decoder for a Cd-Dsp/CD-
CD-ROMs AND COMPUTERS SYSTEMS 19

H. Iwamoto, H. Kawabe, and N. Mutoh, Telephone directory 6. R. Guensler, P. Chinowsky and C. Conklin, Development of a
retrieval technology for CD-ROM, Telecommun. Res. Lab Source, Web-based environmental, impact, monitoring and assment
46(7): 639646, 1997. course, Proc. 1997 ASEE Annual Conference, Milwaukee, WI,
J. Deponte, H. Mueller, G. Pietrek, S. Schlosser and B. Stoltefuss, 1997.
Design and implementation of a system for multimedial distrib- 7. M. G. J. M. Gerritsen, F. M. VanRappard, M. H. Baljon, N. V.
uted teaching and scientific conferences, Proc. 1997 3rd Annual Putten, W. R. M. Dassen, W. A. Dijk, DICOM CD-R, your
Conference on Virtual Systems and Multimedia, Geneva, Switzer- guarantee to interchangeability?Proc. 1997 24th Annual
land, Sept. 1012, 1997, pp. 156165. Meeting on Computers in Cardiology, Lund, Sweden, 1997,
B. K. Das and A. C. Rastogi, Thin films for secondary data storage pp. 175178.
IETE, J. Res., 43(23): 221232, 1997. 8. T. Yoshida, N. Yanagihara, Y. Mii, M. Soma, H. Yamada,
D. E. Speliotis et al., Corrosion study of metal particle, metal film, Robust control of CD-ROM drives using multirate disturbance
and ba-ferrite tape, IEEE Trans. Magnetics, 27(6): 1991. observer, Trans. Jpn. Soc. Mech. Eng. (Part C), 63(615):
pp. 39193925, 1997.
J. VanBogart et al., Understanding the Battelle Lab accelerated
tests, NML Bits, 2(4): 2, 1992. 9. J. Glanville and I. Smith, Evaluating the options for developing
P. G. Ranky, An Introduction to Concurrent Engineering, an databases to support research-based medicine at the NHS
Interactive Multimedia CD-ROM with off-line and on-line Internet Centre for Reviews and Dissemination, Int. J. Med. Infor-
matics, 47(12): pp. 8386, 1997.
support, over 700 interactive screens following an Interactive
Multimedia Talking Book format, Design & Programming by 10. J.-L. Malleron and A. Juin, with R.-P. Rorer, Database of
P. G. Ranky and M. F. Ranky, CIMware 1996, 97. Available: palladium chemistry: Reactions, catalytic cycles and chemical
http://www.cimwareukandusa.com. parameters on CD-ROM Version 1.0 J. Amer. Chem. Soc.,
120(6): p. 1347, 1998.
P. G. Ranky, An Introduction to Computer Networks, an Inter-
active Multimedia CD-ROM with off-line and on-line Internet 11. M. S. Park, Y. Chait, M. Steinbuch, Inversion-free design
support, over 700 interactive screens following an Interactive algorithms for multivariable quantitative feedback theory:
Multimedia Talking Book format, Design & Programming by An application to robust control of a CD-ROM park, Automa-
P. G. Ranky and M. F. Ranky, CIMware 1998. Available: http:// tica, 33(5): pp. 915920, 1997.
www.cimwareukandusa.com. 12. J.-H. Zhang and L. Cai, Profilometry using an optical stylus
Nice, Karim, Available: http://electronics.howstuffworks.com/ with interferometric readout, Proc. IEEE/ASME Interna-
dvd1. htm, 2005. tional Conference on Advanced Intelligent Mechatronics,
Available: http://en.wikipedia.org/wiki/Blu-Ray, 2006. Tokyo, Japan, p. 62, 1997.
13. E. W. Williams and T. Kubo, Cross-substitutional alloys of insb.
Available: http://en.wikipedia.org/wiki/Dvd, Feb. 2006.
for write-once read-many optical media, Jpn. J. Appl. Phys.
Available: http://en.wikipedia.org/wiki/HD_DVD, Feb. 2006.
(Part 2), 37(2A): pp. L127L128, 1998.
R. Silva, Available: http://hometheater.about.com/od/dvdrecor-
14. P. Nicholls, Apocalypse now or orderly withdrawal for CD-
derfaqs/f/ dvdrecgfaq5. htm, 2006.
ROM? Comput. Libraries, 18(4): p. 57, 1998.
Herbert, Available: http://www.cdfreaks.com/article/186/1, Mar.
15. N. Honda, T. Ishiwaka, T. Takagi, M. Ishikawa, T. Nakajima,
2005.
Information services for greater driving enjoyment, SAE Spe-
J. Taylor, Available: http://www.dvddemystified.com/dvdfaq.html, cial Publications on ITS Advanced Controls and Vehicle Navi-
Feb. 10, 2005. gation Systems, Proc. 1998 SAE International Congress &
B. Greenway, Available: http://www.hometheaterblog.com/home- Exposition, Detroit, MI, 1998, pp. 5169.
theater/blu-ray_hd-dvd/, Feb. 14, 2006. 16. J. K. Whitesell, Merck Index, 12th Edition, CD-ROM (Macin-
L. Magid, Available: http://www.pcanswer.com/articles/synd_dvds. tosh): An encyclopedia of chemicals, drugs & biologicals, J.
htm, Oct. 2 2003. Amer. Chem. Soc., 120(9): 1998.
17. C. Van Nimwegen, C. Zeelenberg, W. Cavens, Medical devices
database on CD, Proc. 1996 18th Annual International Con-
BIBLIOGRAPHY ference of the IEEE Engineering in Medicine and Biology
Society (Part 5), Amsterdam, 1996, pp. 19731974.
1. C. F. Quist, L. Lindegren and S. Soderhjelm, Synthesis ima- 18. S. G. Stan, H. Van Kempen, G. Leenknegt, T. H. M. Akker-
ging, Eur. Space Agency, SP-402: 257262, 1997. mans, Look-ahead seek correction in high-performance CD-
2. H. Schrijver, Hipparcos/Tycho ASCII CD-ROM and access ROM drives, IEEE Transactions on Consumer Electronics,
software, Eur. Space Agency, SP-402: 6972, 1997. 44(1): 178186, 1998.
3. J. Zedler, and M. Ramadan, I-Media: An integrated media 19. W. P. Murray, CD-ROM archivability, NML Bits, 2(2): p. 4,
server and media database as a basic component of a cross 1992.
media publishing system, Comput. Graph., 21(6): 693702, 20. W. P. Murray, Archival life expectancy of 3M magneto-optic
1997. media, J. Magnetic Soci. Japan, 17(S1): 309, 1993.
4. V. Madisetti, A. Gadient, J. Stinson, J. Aylor, R. Klenke, H. 21. F. L. Podio, Research on methods for determining optical disc
Carter, T. Egolf, M. Salinas and T. Taylor, Darpas digital media life expectancy estimates, Proc. SPIE, 1663: 447, 1992.
system design curriculum and peer-reviewed educational
22. On CD-ROMs that set a new standard, Technol. Rev., 101(2):
infrastructure, Proc. 1997 ASEE Annual Conference, Milwau-
1998.
kee, WI, 1997.
23. National Geographic publishes 108 years on CD-ROM, Ima-
5. T. F. Hess, R. F. Rynk, S. Chen, L. G. King and A. L. Kenimer,
ging Mag., 7(3): 1998.
Natural systems for wastewater treatment: Course material
and CD-ROM development, ASEE Annual Conference Proc., 24. Shareware Boosts CD-ROM performance, tells time, EDN,
Milwaukee, WI, 1997. 43(4): 1998.
20 CD-ROMs AND COMPUTERS SYSTEMS

25. Ford standardizes training with CD-ROMs, Industrial Paint manufacturing technology, Invited Keynote Presentation,
Powder, 74(2): 1998. The Fourth International Conference on Modern Industrial
26. O. Widell and E. Egis, Geophysical information services, Eur. Training, Xilan, China, 1994, pp. 1628.
Space Agency, SP-397: 1997. 37. D. A. Norman and J. C. Spohner, Learner-centered education,
27. J. Tillinghast, G. Beretta, Structure and navigation for elec- Commun. ACM, 39(4): 2427, 1996.
tronic publishing, HP Laboratories Technical Report, 97162, 38. R. C. Schank and A. Kass, A goal-based scenario for high school
Hewlett Packard Lab Technical Publ Dept, Palo Alto, CA, Dec. students, Commun. ACM, 39(4): 2829, 1996.
1997. 39. B. Woolf, Intelligent multimedia tutoring systems, Commun.
28. J. Fry, A cornerstone of tomorrows entertainment eco- ACM, 39(4): 3031, 1996.
nomy, Proc. 1997 WESCON Conference, San Jose, CA, 1997, 40. M. Flaherty, M. F. Ranky, P. G. Ranky, S. Sands and S.
pp. 6573. Stratful, FESTO: Servo Pneumatic Positioning, an Interactive
29. M. Kageyama, A. Ohba, T. Matsushita, T. Suzuki, H. Tanabe, Multimedia CD-ROM with off-line and on-line Internet sup-
Y. Kumagai, H. Yoshigi and T. Kinoshita, Free time-shift DVD port, Over 330 interactive screens, CIMware & FESTO Auto-
video recorder, IEEE Trans. Consumer Electron., 43(3): 469 mation joint development 1995,96, Design & Programming by
474, 1997. P.G. Ranky and M. F. Ranky. Available: http://www.cimwar-
30. S. P. Schreiner, M. Gaughan, T. Myint and R. Walentowicz, eukandusa.com.
Exposure models of library and integrated model evaluation 41. P. G. Ranky, An Introduction to Total Quality (including
system: A modeling information system on a CD-ROM with ISO9000x), an Interactive Multimedia CD-ROM with off-line
World-Wide Web links, Proc. 1997 4th IAWQ International and on-line Internet support, over 700 interactive screens
Symposium on Systems Analysis and Computing in Water following an Interactive Multimedia Talking Book format,
Quality Management, Quebec, Canada, June 1720, 1997, Design & Programming by P. G. Ranky and M. F. Ranky,
pp. 243249. CIMware 1997. Available: http://www.cimwareukandusa.com.
31. Anonymous, software review, Contr. Eng., 44(15): 1997. 42. P. G. Ranky, An Introduction to Flexible Manufacturing, Auto-
32. M. William, Using multimedia and cooperative learning in mation & Assembly, an Interactive Multimedia CD-ROM with
and out of class, Proc. 1997 27th Annual Conference on off-line and on-line Internet support, over 700 interactive
Frontiers in Education. Part 1 (of 3), Pittsburgh, PA, Nov. screens following an Interactive Multimedia Talking Book
58,1997 pp. 4852. format, Design & Programming by P. G. Ranky and M. F.
33. P. G. Ranky, A methodology for supporting the product innova- Ranky, CIMware 1997. Available: http://www.cimwareukan-
tion process, Proc. USA/Japan International IEEE Conference dusa.com.
on Factory Automation, Kobe, Japan, 1994, pp. 234239.
34. P. Ashton and P. G. Ranky, The development and application of
PAUL G. RANKY
an advanced concurrent engineering research tool set at Rolls- New Jersey Institute of
Royce Motor Cars Limited, UK, Proc. USA/Japan Interna- Technology
tional IEEE Conference on Factory Automation, Kobe, Japan, Newark, New Jersey
1994, pp. 186190.
GREGORY N. RANKY
35. K. L. Ho and P. G. Ranky, The design and operation control of a
MICK F. RANKY
reconfigurable flexible material handling system, Proc. USA/ Ridgewood, New Jersey
Japan International IEEE Conference on Factory Automation,
Kobe, Japan, 1994, pp. 324328.
36. P. G. Ranky, The principles, application and research of inter-
active multimedia and open/distance learning in advanced
C
COMPUTER ARCHITECTURE down by the same scaling factor, the interconnect delay
remains roughly unchanged, because the fringing field
The term computer architecture was coined in the 1960s component of wire capacitance does not vary with feature
by the designers of the IBM System/360 to mean the size. Consequently, interconnect delay becomes a limiting
structure of a computer that a machine language program- factor in the deep submicron era.
mer must understand to write a correct program for a Another very important technical challenge is the
machine (1). difficulty faced trying to dissipate heat from processor
The task of a computer architect is to understand the chip packages as chip complexity and clock frequency
state-of-the-art technologies at each design level and the increases.
changing design tradeoffs for their specific applications. Indeed, special cooling techniques are needed for pro-
The tradeoff of cost, performance, and power consumption cessors that consume more than 100W of power. These
is fundamental to a computer system design. Different cooling techniques are expensive and economically infea-
designs result from the selection of different points on sible for most applications (e.g., PC). There are also a
the cost-performance-power continuum, and each applica- number of other technical challenges for high-performance
tion will require a different optimum design point. For high- processors. Custom circuit designs are necessary to enable
performance server applications, chip and system costs are GHz signals to travel in and out of chips. These challenges
less important than performance. Computer speedup can require that designers provide whole-system solutions
be accomplished by constructing more capable processor rather than treating logic design, circuit design, and
units or by integrating many processors units on a die. For packaging as independent phases of the design process.
cost-sensitive embedded applications, the goal is to mini-
mize processor die size and system power consumption. Performance Considerations
Microprocessor performance has improved by approxi-
Technology Considerations
mately 50% per year for the last 20 years, which can be
Modern computer implementations are based on silicon attributed to higher clock frequencies, deeper pipelines,
technology. The two driving parameters of this technology and improved exploitation of instruction-level parallelism.
are die size and feature size. Die size largely determines However, the cycle time at a given technology cannot be
cost. Feature size is dependent on the lithography used in too small, or we will sacrifice overall performance by incur-
wafer processing and is defined as the length of the smallest ring too much clock overhead and suffering long pipeline
realizable device. Feature size determines circuit density, breaks. Similarly, the instruction-level parallelism is
circuit delay, and power consumption. Current feature usually limited by the application, which is further dimin-
sizes range from 90 nm to 250 nm. Feature sizes below ished by code generation inefficiencies, processor resource
100 nm are called deep submicron. Deep submicron tech- limitations, and execution disturbances. The overall sys-
nology allows microprocessors to be increasingly more tem performance may deteriorate if the hardware to exploit
complicated. According to the Semiconductor Industry the parallelism becomes too complicated.
Association (2), the number of transistors (Fig. 1) for High-performance server applications, in which chip and
high-performance microprocessors will continue to grow system costs are less important than total performance, en-
exponentially in the next 10 years. However, there are compass a wide range of requirements, from computation-
physical and program behavioral constraints that limit intensive to memory-intensive to I/O-intensive. The need
the usefulness of this complexity. Physical constraints to customize implementation to specific applications may
include interconnect and device limits as well as practical even alter manufacturing. Although expensive, high-
limits on power and cost. Program behavior constraints performance servers may require fabrication micropro-
result from program control and data dependencies and duction runs to maximize performance.
unpredictable events during execution (3).
Much of the improvement in microprocessor performance Power Considerations
has been a result of technology scaling that allows increased
Power consumption has received increasingly more atten-
circuit densities at higher clock frequencies. As feature sizes
tion because both high-performance processors and pro-
shrink, device area shrinks roughly as the square of the
cessors for portable applications are limited by power
scaling factor, whereas device speed (under constant field
consumption. For CMOS design, the total power dissipa-
assumptions) improves linearly with feature size.
tion has three major components as follows:
On the other hand, there are a number of major tech-
nical challenges in the deep submicron era, the most impor-
1. switching loss,
tant of which is that interconnect delay (especially global
interconnect delay) does not scale with the feature size. If 2. leakage current loss, and
all three dimensions of an interconnect wire are scaled 3. short circuit current loss.

Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah.


Copyright # 2008 John Wiley & Sons, Inc.
2 COMPUTER ARCHITECTURE

10000

No. of transistors (millions)


9000
8000
7000
6000
5000
4000
3000
2000
1000
0
90 65 32 18

2004 2007 2013 2018


Figure 1. Number of transistors per chip.
(Source: National Technology Roadmap for Semiconduc- Technology (nm) / Year of First Introduction
tors)

At a given technology, die cost is affected by chip size in


Among these three factors, switching loss is usually the two ways. First, as die area increases, fewer die can be
most dominant factor. Switching loss is proportional to realized from a wafer. Second, as the chip size increases, the
operating frequency and is also proportional to the square yield decreases, generally following a Poisson distribution
of supply voltage. Thus, lowering supply voltage can effec- of defects. For certain die sizes, doubling the area can
tively reduce switching loss. In general, operating increase the die cost by 10 times.
frequency is roughly proportional to supply voltage. If
supply voltage is reduced by 50%, operating frequency is Other Considerations
also reduced by 50%, and total power consumption As VLSI technology continues to improve, there are new
becomes one-eighth of the original power. On the other design considerations for computer architects. The simple
hand, leakage power loss is a function of CMOS threshold traditional measures of processor performancecycle time
voltage. As supply voltage decreases, threshold voltage has and cache sizeare becoming less relevant in evaluating
to be reduced, which results in an exponential increase in application performance. Some of the new considerations
leakage power loss. When feature size goes below 90 nm, include:
leakage power loss can be as high as switching power loss.
For many DSP applications, the acceptable performance 1. Creating high-performance processors with enabling
can be achieved at a low operating frequency by exploiting compiler technology.
the available program parallelism using suitable parallel
2. Designing power-sensitive system-on-chip proces-
forms of processor configurations. Improving the battery
sors in a very short turnaround time.
technology, obviously, can allow processors to run for an
extended period of time. Conventional nickel-cadmium 3. Improving features that ensure the integrity and
battery technology has been replaced by high-energy den- reliability of the computer.
sity batteries such as the NiMH battery. Nevertheless, the 4. Increasing the adaptability of processor structures,
energy density of a battery is unlikely to improve drasti- such as cache and signal processors.
cally for safety reasons. When the energy density is too
high, a battery becomes virtually an explosive.
Performance-Cost-Power Tradeoffs
Cost Considerations In the era of deep-submicron technology, two classes of
microprocessors are evolving: (1) high-performance server
Another design tradeoff is to determine the optimum die
processors and (2) embedded client processors. The major-
size. In the high-performance server market, the processor
ity of implementations are commodity system-on-chip
cost may be relatively small compared with the overall
processors devoted to end-user applications. These highly
system cost. Increasing the processor cost by 10 times
cost-sensitive client processors are used extensively in
may not significantly affect the overall system cost. On
consumer electronics. Individual application may have
the other hand, system-on-chip implementations tend to be
specific requirements; for example, portable and wireless
very cost sensitive. For these applications, the optimum use
applications require very low power consumption. The
of die size is extremely important.
other class consists of high-end server processors, which
The area available to a designer is largely a function of
are performance-driven. Here, other parts of the system
the manufacturing processing technology, which includes
dominate cost and power issues.
the purity of the silicon crystals, the absence of dust and
At a fixed feature size, area can be traded off for perfor-
other impurities, and the overall control of the diffusion and
mance (expressed in term of execution time, T). VLSI
process technology. Improved manufacturing technology
complexity theorists have shown that an A  Tn bound
allows larger die with higher yields, and thus lower man-
exists for microprocessor designs (1), where n usually falls
ufacturing costs.
between 1 and 2. By varying the supply voltage, it is also
possible to tradeoff time T for power P with a P  T3 bound.
COMPUTER ARCHITECTURE 3

Power (P)

High-performance
server processor
design
3
P T = constant
Area (A)

A Tn= constant

Cost- and power-


sensitive client
Time (T) processor design Figure 2. Design tradeoffs for high-end and low-end proces-
sors.

Figure 2 shows the possible tradeoff involving area, time, PROCESSOR ARCHITECTURE
and power in a processor design (3). Embedded and high-
end processors operate in different design regions of this The processor architecture consists of the instruction
three-dimensional space. The power and area axes are set, the memory that it operates on, and the control and
typically optimized for embedded processors, whereas the functional units that implement and interpret the instruc-
time axis is typically optimized for high-end processors. tions. Although the instruction set implies many imple-
mentation details, the resulting implementation is a great
Alternatives in Computer Architecture deal more than the instruction set. It is the synthesis of the
physical device limitations with area-time-power tradeoffs
In computer architecture, the designer must understand
to optimize cost-performance for specified user require-
the technology and the user requirements as well as the
ments. As shown in Fig. 3, the processor architecture
available alternatives in configuring a processor. The
may be divided into a high-level programming model and
designer must apply what is known of user program beha-
a low-level microarchitecture.
vior and other requirements to the task of realizing an
area-time-power optimized processor. User programs offer
Instruction Set
differing types and forms of parallelism that can be
matched by one or more processor configurations. A pri- Computers deal with many different kinds of data and
mary design goal is to identify the most suitable processor data representations. The operations available to perform
configuration and then scale the concurrency available the requisite data manipulations are determined by the
within that configuration to match cost constraints. data types and the uses of such data. Processor design
The next section describes the principle functional ele- issues are closely bound to the instruction set. Instruction
ments of a processor. Then the various types of parallel and set behavior data affects many of these design issues
concurrent processor configuration are discussed. Finally, The instruction set for most modern machines is based
some recent architectures are compared and some conclud- on a register set to hold operands and addresses. The
ing remarks are presented. register set size varies from 8 to 64 words, each word
consisting of 32 to 64 bits. An additional set of floating-
point registers (16 to 64 bits) is usually also available. A

Figure 3. Processor architecture block


diagram.
4 COMPUTER ARCHITECTURE

typical instruction set specifies a program status word, variable instruction size makes decoding more difficult.
which consists of various types of control status informa- The decoding of multiple instructions requires predicting
tion, including condition codes set by the instruction. the starting point of each. The register-memory processors
Common instruction sets can be classified by format differ- require more circuitry (and area) to be devoted to instruc-
ences into three types as follows: tion fetch and decode. Generally, the success of Intel-type
x86 implementations in achieving high clock rates and
1. the L/S, or Load-Store architecture; performance has shown that the limitations of a register-
2. the R/M, or Register-Memory architecture; and memory instruction set can be overcome.
3. the RM, or Register-plus-Memory architecture.
Memory
The L/S or Load-Store instruction set describes many of The memory system comprises the physical storage ele-
the RISC (reduced instruction set computer) microproces- ments in the memory hierarchy. These elements include
sors (5). All values must be loaded into registers before an those specified by the instruction set (registers, main mem-
execution can take place. An ALU ADD instruction must ory, and disk sectors) as well as those elements that are
have both operands with the result specified as registers largely transparent to the users program (buffer registers,
(three addresses). The purpose of the RISC architecture is cache, and page-mapped virtual memory). Registers have
to establish regularity of execution and ease of decoding the fastest access and, although limited in capacity (32 to
in an effort to improve overall performance. RISC archi- 128 bits), in program execution, is the most often referenced
tects have tried to reduce the amount of complexity in type of memory. A processor cycle time is usually defined
the instruction set itself and regularize the instruction by the time it takes to access one or more registers, operate
format so as to simplify decoding of the instruction. A their contents, and return the result to a register.
simpler instruction set with straightforward timing is Main memory is the type of storage usually associated
more readily implemented. For these reasons, it was with the simple term memory. Most implementations are
assumed that implementations based on the L/S instruc- based on DRAM (e.g., DDR and DDR-2 SDRAM), although
tion set would always be faster (higher clock rates and SRAM and Flash technologies have also been used. DRAM
performance) than other classes, other parameters being memory is accessible in order of 10s of cycles (typically
generally the same. 20 to 30) and usually processors have between 128 MB and
The R/M or Register-Memory architectures include 4 GB of such storage. The disk contains all the programs
instruction that can operate both on registers and with and data available to the processor. Its addressable unit
one of the operands residing in memory. Thus, for the R/M (sector) is accessible in 1 to 10 ms, with a typical single-unit
architecture, an ADD instruction might be defined as the disk capacity of 10 to 300 GB. Large server systems may
sum of a register value and a value contained in memory, have 100s or more such disk units. As the levels of the
with the result going to a register. The R/M instruction sets memory system have such widely differing access times,
generally trace their evolution to the IBM System/360 additional levels of storage (buffer registers, cache, and
introduced in 1963. The mainframe computers follow the paged memory) are added that serve as a buffer between
R/M style (IBM, Amdahl, Hitachi, Fujitsu, etc., which all levels attempting to hide the access time differences.
use the IBM instruction set), as well as the basic Intel x86
series. Memory Hierarchy. There are basically three para-
The RM or Register-plus-Memory architectures allow meters that define the effectiveness of the memory system:
formats to include operands that are either in memory or latency, bandwidth, and the capacity of each level of the
in registers. Thus, for example, an ADD may have all of system. Latency is the time for a particular access request
its operands in registers or all of its operands in memory, to be completed. Bandwidth refers to the number of
or any combination thereof. The RM architecture gene- requests supplied per unit time. To provide large memory
ralizes the formats of R/M. The classic example of the RM spaces with desirable access time latency and bandwidths,
architecture was Digital Equipments VAX series of modern memory systems use a multiple-level memory
machines. VAX also generalized the use of the register hierarchy.
set through the use of register modes. The use of an Smaller, faster levels have greater cost per bit than
extended set of formats and register modes allows a power- larger, slower levels. The multiple levels in the storage
ful and varied specification of operands and operation type hierarchy can be ordered by their size and access time from
within a single instruction. Unfortunately, format and the smallest, fastest level to the largest, slowest level. The
mode variability complicates the decoding process so that goal of a good memory system design is to provide the
the process of interpretation of instructions can be slow (but processor with an effective memory capacity of the largest
RM architectures make excellent use of memory/bus level with an access time close to the fastest. How well this
bandwidth). goal is achieved depends on a number of factorsthe
From the architects point of view, the tradeoff in instruc- characteristics of the device used in each level as well as
tion sets is an area-time compromise. The register-memory the behavioral properties of the programs being executed.
(R/M and RM) architectures offer a more concise program Suppose we have a memory system hierarchy consisting
representation using fewer instructions of variable size of a cache, a main memory, and a disk or backing storage.
compared with L/S. Programs occupy less space in memory The disk contains the contents of the entire virtual memory
and smaller instruction caches can be used effectively. The space. Typical size (S) and access time ratios (t) are as
COMPUTER ARCHITECTURE 5

follows:
IF ID AG DF EX WB
Size: memory/cache  1000
Access time: memory/cache  30 Time
Size: disk/memory  1001000
Access time: disk/memory  100,000 Figure 4. Instruction execution sequence.

Associated with both the cache and a paged main memory


are corresponding tables that define the localities that are
currently available at that level. The page table contains
the working set of the diskthose disk localities that have 3. generating the address in memory of any data item
been recently referenced by the program, and are contained residing there (AG),
in main memory. The cache table is completely managed by 4. fetching data operand(s) into executable registers
the hardware and contains those localities (called lines) of (DF),
memory that have been recently referenced by the pro- 5. executing the specified operation (EX), and
gram. 6. returning the result to the specified register (WB).
The memory system operates by responding to a virtual
effective address generated by a user program, which is Decode: Hardwired and Microcode. The decoder pro-
translated into a real address in main memory. This real duces the control signals that enable the functional units
address accesses the cache table to find the entry in the to execute the actions that produce the result specified
cache for the desired value. by the instruction. Each cycle, the decoder produces a
Paging and caching are the mechanisms to support the new set of control values that connect various registers
efficient management of the memory space. Paging is and functional units. The decoder takes as an initial input
the mechanism by which the operating system brings the op code of the instruction. Using this op code, it gene-
fixed-size blocks (or pages)a typical size is 4 to 64 KB rates the sequence of actions, one per cycle, which com-
into main memory. Pages are fetched from backing store pletes the execution process. The last step of the current
(usually disk) on demand (or as required) by the processor. instructions execution is the fetching of the next instruc-
When a referenced page is not present, the operating tion into the instruction register so that it may be decoded.
system is called and makes a request for the page, then The implementation of the decoder may be based on
transfers control to another process, allowing the processor Boolean equations that directly implement the specified
resources to be used while waiting for the return of the actions for each instruction. When these equations are
requested information. The real address is used to access implemented with logic gates, the resultant decoder is
the cache and main memory. The low-order (least signi- called a hardwired decoder.
ficant) bits address a particular location in a page. The For extended instruction sets or complex instructions,
upper bits of a virtual address access a page table (in another implementation is sometimes used, which is based
memory) that: on the use of a fast storage (or microprogram store). A
particular word in the storage (called a microcode) contains
1. determines whether this particular partial page lies the control information for a single action or cycle. A
in memory, and sequence of microinstructions implements the instruction
2. translates the upper address bits if the page is pre- execution.
sent, producing the real address.
Data Paths: Busses and Functional Units. The data paths
Usually, the tables performing address translation are in of the processor include all the functional units needed
memory, and a mechanism for the translation called the to implement the vocabulary (or op codes) of the instruc-
translation lookaside buffer (TLB) must be used to speed up tion set. Typical functional units are the ALU (arithmetic
this translation. The TLB is a simple register system logic unit) and the floating-point unit. Busses and other
usually consisting of between 64 and 256 entries that structured interconnections between the registers and
save recent address translations for reuse. the functional units complete the data paths.

Control and Execution


PROGRAM PARALLELISM AND PARALLEL ARCHITECTURE
Instruction Execution Sequence. The semantics of the
instruction determines that a sequence of actions must Exploiting program parallelism is one of the most impor-
be performed to produce the specified result (Fig. 4). These tant elements in computer architecture design. Programs
actions can be overlapped (as discussed in the pipelined written in imperative languages encompass the following
processor section) but the result must appear in the speci- four levels of parallelism:
fied serial order. These actions include the following:
1. parallelism at the instruction level (fine-grained),
1. fetching the instruction into the instruction register 2. parallelism at the loop level (middle-grained),
(IF),
2. decoding the op code of the instruction (ID),
6 COMPUTER ARCHITECTURE

3. parallelism at the procedure level (middle-grained),


and
4. parallelism at the program level (coarse-grained).

Instruction-level parallelism (ILP) means that multiple


operations can be executed in parallel within a program.
ILP may be achieved with hardware, compiler, or operating
system techniques. At the loop level, consecutive loop itera-
tions are ideal candidates for parallel execution provided
that there is no data dependency between subsequent loop
iterations. Next, there is parallelism available at the pro-
cedure level, which depends largely on the algorithms used Figure 6. SIMD single instruction, multiple data stream.
in the program. Finally, multiple independent programs
can obviously execute in parallel.
Different computer architectures have been built to
exploit this inherent parallelism. In general, a computer
architecture consists of one or more interconnected proces-
sor elements that operate concurrently, solving a single
overall problem. The various architectures can be conve-
niently described using the stream concept. A stream is
simply a sequence of objects or actions. There are both
instruction streams and data streams, and there are four
simple combinations that describe the most familiar par-
allel architectures (6):
Figure 7. MISD multiple instruction, single data stream.
1. SISD single instruction, single data stream; The
traditional uniprocessor (Fig. 5).
2. SIMD single instruction, multiple data stream,
which includes array processors and vector proces- bly language level, but becomes visible at execution time
sors (Fig. 6). with improved performance.
3. MISD multiple instruction, single data stream, There are many factors that determine the overall effec-
which are typically systolic arrays (Fig. 7). tiveness of a parallel processor organization. Interconnec-
4. MIMD multiple instruction, multiple data stream, tion network, for instance, can affect the overall speedup.
which includes traditional multiprocessors as well as The characterizations of both processors and networks are
the newer work of networks of workstations (Fig. 8). complementary to the stream model and, when coupled
with the stream model, enhance the qualitative under-
The stream description of computer architectures standing of a given processor configuration.
serves as a programmers view of the machine. If the pro-
cessor architecture allows for parallel processing of one SISD Single Instruction, Single Data Stream
sort or another, then this information is also visible to The SISD class of processor architecture includes most
the programmer. As a result, there are limitations to the commonly available computers. These processors are
stream categorization. Although it serves as useful short- known as uniprocessors and can be found in millions of
hand, it ignores many subtleties of an architecture or an embedded processors in video games and home appliances
implementation. Even an SISD processor can be highly
as well as stand-alone processors in home computers, engi-
parallel in its execution of operations. This parallelism is neering workstations, and mainframe computers. Although
typically not visible to the programmer even at the assem-

Figure 5. SISD single instruction, single data stream. Figure 8. MIMD multiple instruction, multiple data stream.
COMPUTER ARCHITECTURE 7

Table 1. Typical Scalar Processors (SISD)


Year of Number of Issue Number of
Processor introduction function unit width Scheduling transistors
Intel 8086 1978 1 1 Dynamic 29K
Intel 80286 1982 1 1 Dynamic 134K
Intel 80486 1989 2 1 Dynamic 1.2M
HP PA-RISC 7000 1991 1 1 Dynamic 580K
Sun SPARC 1992 1 1 Dynamic 1.8M
MIPS R4000 1992 2 1 Dynamic 1.1M
ARM 610 1993 1 1 Dynamic 360K
ARM SA-1100 1997 1 1 Dynamic 2.5M

a programmer may not realize the inherent parallelism executed to completion in sequence. In the sequential
within these processors, a good deal of concurrency can be execution model, execution is instruction-precise if the
present. Pipelining is a powerful technique that is used in following conditions are met:
almost all current processor implementations. Other tech-
niques aggressively exploit parallelism in executing code 1. All instructions (or operations) preceding the current
whether it is declared statically or determined dynamically instruction (or operation) have been executed and all
from an analysis of the code stream. results have been committed.
During execution, a SISD processor executes one or 2. All instructions (or operations) after the current
more operations per clock cycle from the instruction instruction (or operation) are unexecuted and no
stream. An instruction is a container that represents the results have been committed.
smallest execution packet managed explicitly by the pro- 3. The current instruction (or operation) is in an arbi-
cessor. One or more operations are contained within an trary state of execution and may or may not have
instruction. The distinction between instructions and completed or had its results committed.
operations is crucial to distinguish between processor beha-
viors. Scalar and superscalar processors consume one or For scalar and superscalar processors with only a single
more instructions per cycle where each instruction contains operation per instruction, instruction-precise and operation-
a single operation. VLIW processors, on the other hand, precise executions are equivalent. The traditional defini-
consume a single instruction per cycle where this instruc- tion of sequential execution requires instruction-precise
tion contains multiple operations. execution behavior at all times, mimicking the execution
A SISD processor has four primary characteristics. of a nonpipelined sequential processor.
The first characteristic is whether the processor is capable
of executing multiple operations concurrently. The second Sequential Processor. Sequential processors directly
characteristic is the mechanisms by which operations implement the sequential execution model. These proces-
are scheduled for executionstatically at compile time, sors process instructions sequentially from the instruction
dynamically at execution, or possibly both. The third char- stream. The next instruction is not processed until all
acteristic is the order that operations are issued and retired execution for the current instruction is complete and its
relative to the original program orderthese operations results have been committed.
can be in order or out of order. The fourth characteristic is Although conceptually simple, executing each instruc-
the manner in which exceptions are handled by the pro- tion sequentially has significant performance drawbacks
cessorprecise, imprecise, or a combination. This last a considerable amount of time is spent in overhead and not
condition is not of immediate concern to the applications in actual execution. Thus, the simplicity of directly imple-
programmer, although it is certainly important to the menting the sequential execution model has significant
compiler writer or operating system programmer who performance costs.
must be able to properly handle exception conditions.
Most processors implement precise exceptions, although Pipelined Processor. Pipelining is a straightforward
a few high-performance architectures allow imprecise approach to exploiting parallelism that is based on concur-
floating-point exceptions. rently performing different phases (instruction fetch,
Tables 1, 2, and 3 describe some representative scalar, decode, execution, etc.) of processing an instruction. Pipe-
processors, superscalar processors, and VLIW processors. lining assumes that these phases are independent between
different operations and can be overlapped; when this
Scalar Processor. Scalar processors process a maximum condition does not hold, the processor stalls the down-
of one instruction per cycle and execute a maximum of one stream phases to enforce the dependency. Thus, multiple
operation per cycle. The simplest scalar processors, sequen- operations can be processed simultaneously with each
tial processors, process instructions atomically one after operation at a different phase of its processing. Figure 9
another. This sequential execution behavior describes the illustrates the instruction timing in a pipelined processors,
sequential execution model that requires each instruction assuming that the instructions are independent. The
8 COMPUTER ARCHITECTURE

Table 2. Typical Superscalar Processors (SISD)


Year of Number of Issue Number of
Processor introduction function unit width Scheduling transistors
HP PA-RISC 7100 1992 2 2 Dynamic 850K
Motorola PowerPC 601 1993 4 3 Dynamic 2.8M
MIPS R8000 1994 6 4 Dynamic 3.4M
DEC Alpha 21164 1994 4 4 Dynamic 9.3M
Motorola PowerPC 620 1995 4 2 Dynamic 7M
MIPS R10000 1995 5 4 Dynamic 6.8M
HP PA-RISC 7200 1995 3 2 Dynamic 1.3M
Intel Pentium Pro 1995 5 3/6y Dynamic 5.5M
DEC Alpha 21064 1992 4 2 Dynamic 1.7M
Sun Ultra I 1995 9 4 Dynamic 5.2M
Sun Ultra II 1996 9 4 Dynamic 5.4M
AMD K5 1996 6 4/46y Dynamic 4.3M
Intel Pentium II 1997 5 3/66y Dynamic 7.5M
AMD K6 1997 7 2/66y Dynamic 8.8M
Motorola PowerPC 740 1997 6 3 Dynamic 6.4M
DEC Alpha 21264 1998 6 4 Dynamic 15.2M
HP PA-RISC 8500 1998 10 4 Dynamic 140M
Motorola PowerPC 7400 1999 10 3 Dynamic 6.5M
AMD K7 1999 9 3/66y Dynamic 22M
Intel Pentium III 1999 5 3/66y Dynamic 28M
Sun Ultra III 2000 6 4 Dynamic 29M
DEC Alpha 21364 2000 6 4 Dynamic 100M
AMD Athlon 64 FX51 2003 9 3/66y Dynamic 105M
Intel Pentium 4 Prescott 2003 5 3/66y Dynamic 125M
1
For some Intel 86 family processors, each instruction is broken into a number of microoperation codes in the decoding stage. In this article,
two different issue widths are given for these processors: The first one is the maximum number of instructions issued per cycle, and the second
one is the maximum number of microoperation codes issued per cycle.

meaning of each pipeline stage is described in the Instruc-  Type 1: Dynamic pipelines that require instructions to
tion Execution Sequence system. be decoded in sequence and results to be executed and
For a simple pipelined machine, only one operation written back in sequence. For these types of simpler
occurs in each phase at any given time. Thus, one operation dynamic pipeline processors, the advantage over a
is being fetched, one operation is being decoded, one opera- static pipeline is relatively modest. In-order execution
tion is accessing operands, one operation is in execution, requires the actual change of state to occur in order
and one operation is storing results. The most rigid form of a specified in the instruction sequence.
pipeline, sometimes called the static pipeline, requires the  Type 1-Extended: A popular extension of the Type 1
processor to go through all stages or phases of the pipeline pipeline is to require the decode to be in order, but
whether required by a particular instruction or not. the execution stage of ALU operations need not be in
Dynamic pipeline allows the bypassing of one or more of order. In these organizations, the address generation
the stages of the pipeline depending on the requirements of stage of the load and store instructions must be
the instruction. There are at least three levels of sophisti- completed before any subsequent ALU instruction
cation within the category of dynamic pipeline processors does a writeback. The reason is that the address gen-
as follows: eration may cause a page execution and affect the

Table 3. Typical VLIW Processors (SISD)


Year of Number of Issue Issue/complete
Processor introduction function unit width Scheduling order
Multiflow Trace 7/200 1987 7 7 Static In-order/in-order
Multiflow Trace 14/200 1987 14 14 Static In-order/in-order
Multiflow Trace 28/200 1987 28 28 Static In-order/in-order
Cydrome Cydra 5 1987 7 7 Static In-order/in-order
Philips TM-1 1996 27 5 Static In-order/in-order
TI TMS320/C62x 1997 8 8 Static In-order/in-order
Intel Itanium 2001 9 6 Static In-order/in-order
Intel Itanium 2 2003 11 6 Static In-order/in-order
COMPUTER ARCHITECTURE 9

Instruction #1
IF ID AG DF EX WB

Instruction #2
IF ID AG DF EX WB

Instruction #3
IF ID AG DF EX

Instruction #4
IF ID AG DF

Time Figure 9. Instruction timing in a pipelined processor.

processor state. As a result of these restrictions and the per cycle. In this case, all the instructions are independent
overall frequency of load and store instructions, the so that they can be executed in parallel.
Type 1-Extended pipeline behaves much as the basic
Type-1 pipeline. Superscalar Processor. Dynamic out-of-order pipelined
 Type 2: Dynamic pipelined machines that can be con- processors reach the limits of performance for a scalar
figured to allow out-of order execution yet retain in- processor by allowing out-of-order operation execution.
order instruction decode. For this type of pipelined Unfortunately, these processors remain limited to execut-
processor, the execution and writeback of all instruc- ing a single operation per cycle by virtue of their scalar
tions is a function only of dependencies on prior nature. This limitation can be avoided with the addition
instruction. If a particular instruction is independent of multiple functional units and a dynamic scheduler to
of all preceding instructions, its execution can be com- process more than one instruction per cycle. These result-
pleted independently of the successful completion of ing superscalar processors can achieve execution rates of
prior instructions. more than one instruction per cycle. The most significant
 Type 3: The third type of dynamic pipeline allows advantage of a superscalar processor is that processing
instructions to be issued as well as completed out of multiple instructions per cycle is done transparently to
order. A group of instruction is analyzed together, and the user, and that it can provide binary compatibility while
the first instruction that is found to be independent of achieving better performance.
prior instructions is decoded. Compared with an out-of-order pipelined processor, a
superscalar processor adds a scheduling instruction win-
dow that dynamically analyzes multiple instructions from
Instruction-level Parallelism. Although pipelining does the instruction stream. Although processed in parallel,
not necessarily lead to executing multiple instructions at these instructions are treated in the same manner as in
exactly the same time, there are other techniques that do. an out-of-order pipelined processor. Before an instruction is
These techniques may use some combination of static sche- issued for execution, dependencies between the instruction
duling and dynamic analysis to perform concurrently the and its prior instructions must be checked by hardware.
actual evaluation phase of several different operations, As a result of the complexity of the dynamic scheduling
potentially yielding an execution rate of greater than one logic, high-performance superscalar processors are limited
operation every cycle. This kind of parallelism exploits to processing four to six instructions per cycle (refer to the
concurrency at the computation level. As historically Examples of Recent Architecture section). Although super-
most instructions consist of only a single operation, this scalar processors can take advantage of dynamic execution
kind of parallelism has been named instruction-level par- behavior and exploit instruction-level parallelism from
allelism (ILP). the dynamic instruction stream, exploiting high degrees
Two architectures that exploit ILP are superscalar of instruction requires a different approach. An alter-
and VLIW, which use radically different techniques to native approach is to rely on the compiler to perform the
achieve greater than one operation per cycle. A superscalar dependency analyses and to eliminate the need for complex
processor dynamically examines the instruction stream to analyses performed in hardware.
determine which operations are independent and can be
executed. A VLIW processor depends on the compiler to VLIW Processor. In contrast to dynamic analyses in
analyze the available operations (OP) and to schedule hardware to determine which operations can be executed
independent operations into wide instruction words, which in parallel, VLIW processors rely on static analyses in the
then executes these operations in parallel with no further compiler. VLIW processors are, thus, less complex than
analysis. superscalar processor and have the potential for higher
Figure 10 shows the instruction timing of a pipelined performance. A VLIW processor executes operations from
superscalar or VLIW processor executing two instructions statically scheduled instructions that contain multiple
10 COMPUTER ARCHITECTURE

Instruction #1
IF ID AG DF EX WB

Instruction #2
IF ID AG DF EX WB

Instruction #3
IF ID AG DF EX WB

Instruction #4
IF ID AG DF EX WB

Instruction #5
IF ID AG DF EX

Instruction #6
IF ID AG DF EX

Figure 10. Instruction timing of a pipelined ILP Time


processor.

independent operations. Although it is not required that additional cycles to complete an operation. The most com-
static processors exploit instruction-level parallelism, most mon execution delay is a data cache miss; another example
statically scheduled processors use wide instruction is a floating-point operation that requires an additional
words. As the complexity of a VLIW processor is not sig- normalization cycle. For processors without hardware
nificantly greater than that of a scalar processor, the resource management, delayed results can cause resource
improved performance comes without the complexity conflicts and incorrect execution behavior. VLIW proces-
penalties. sors typically avoid all situations that can result in a delay
On the other hand, VLIW processors rely on the static by not using data caches and by assuming worst-case
analyses performed by the compiler and are unable to take latencies for operations. However, when there is insuffi-
advantage of any dynamic execution characteristics. As cient parallelism to hide the exposed worst-case operation
issue widths become wider and wider, the avoidance of latency, the instruction schedule will have many incom-
complex hardware logic will rapidly erode the benefits of pletely filled or empty instructions that can result in poor
out-of-order execution. This benefit becomes more signifi- performance.
cant as memory latencies increase and the benefits from Interruptions are usually more difficult to control than
out-of-order execution become a less significant portion of delayed results. Managing interruptions is a significant
the total execution time. For applications that can be problem because of their disruptive behavior and because
statically scheduled to use the processor resources effec- the origins of interruptions are often completely beyond a
tively, a simple VLIW implementation results in high programs control. Interruptions develop from execution-
performance. related internal sources (exceptions) as well as arbitrary
Unfortunately, not all applications can be effectively external sources (interrupts). The most common interrup-
scheduled for VLIW processors. In real systems, execution tion is an operation exception resulting from either an error
rarely proceeds exactly along the path defined by the code condition during execution or a special-case condition that
scheduler in the compiler. These are two classes of execu- requires additional corrective action to complete operation
tion variations that can develop and affect the scheduled execution. Whatever the source, all interruptions require
execution behavior: the execution of an appropriate service routine to resolve
the problem and to restore normal execution at the point of
1. Delayed results from operations whose latency differs the interruption.
from the assumed latency scheduled by the compiler.
2. Interruptions from exceptions or interrupts, which SIMD Single Instruction, Multiple Data Stream
change the execution path to a completely different The SIMD class of processor architecture includes both
and unanticipated code schedule. array and vector processors. The SIMD processor is a
natural response to the use of certain regular data struc-
Although stalling the processor can control delayed tures, such as vectors and matrices. From the reference
results, this solution can result in significant performance point of an assembly-level programmer, programming
penalties from having to distribute the stall signal across SIMD architecture appears to be very similar to pro-
the processor. Delays occur from many causes including gramming a simple SISD processor except that some opera-
mismatches between the architecture and an implementa- tions perform computations on aggregate data. As these
tion as well as from special-case conditions that require
COMPUTER ARCHITECTURE 11

Table 4. Typical Vector Computers (SIMD)


Year of Memory- or Number of Maximum vector
Processor introduction register-based processor units length
Cray 1 1976 Register 1 64
CDC Cyber 205 1981 Memory 1 65535
Cray X-MP 1982 Register 14 64
Cray 2 1985 Register 5 64
Fujitsu VP-100/200 1985 Register 3 321024
ETA ETA 1987 Memory 28 65535
Cray Y-MP/832 1989 Register 18 64
Cray Y-MP/C90 1991 Register 16 64
Convex C3 1991 Register 18 128
Cray T90 1995 Register 132 128
NEC SX-5 1998 Register 1512 256

regular structures are widely used in scientific program- As instructions are broadcast, there is no means local
ming, the SIMD processor has been very successful in these to a processor element of altering the flow of the instruction
environments. stream; however, individual processor elements can con-
The two popular types of SIMD processor are the array ditionally disable instructions based on local status
processor and the vector processor. They differ both in informationthese processor elements are idle when
their implementations and in their data organizations. this condition occurs. The actual instruction stream con-
An array processor consists of many interconnected pro- sists of more than a fixed stream of operations; an array
cessor elements that each have their own local memory processor is typically coupled to a general-purpose control
space. A vector processor consists of a single processor that processor that provides both scalar operations as well as
references a single global memory space and has special array operations that are broadcast to all processor ele-
function units that operate specifically on vectors. Tables 4 ments in the array. The control processor performs the
and 5 describe some representative vector processors and scalar sections of the application, interfaces with the out-
array processors. side world, and controls the flow of execution; the array
processor performs the array sections of the application as
Array Processors. The array processor is a set of parallel directed by the control processor.
processor elements connected via one or more networks, A suitable application for use on an array processor
possibly including local and global interelement commu- has several key characteristics: a significant amount of
nications and control communications. Processor elements data that has a regular structure; computations on the
operate in lockstep in response to a single broadcast data that are uniformly applied to many or all elements
instruction from a control processor. Each processor ele- of the dataset; and simple and regular patterns relating
ment has its own private memory and data is distributed the computations and the data. An example of an appli-
across the elements in a regular fashion that is dependent cation that has these characteristics is the solution of the
on both the actual structure of the data and also on the Navier Stokes equations, although any application that
computations to be performed on the data. Direct access has significant matrix computations is likely to benefit from
to global memory or another processor elements local the concurrent capabilities of an array processor.
memory is expensive, so intermediate values are pro- The programmers reference point for an array processor
pagated through the array through local interprocessor is typically the high-level language level; the programmer
connections, which requires that the data be distributed is concerned with describing the relationships between the
carefully so that the routing required to propagate these data and the computations but is not directly concerned
values is simple and regular. It is sometimes easier to with the details of scalar and array instruction scheduling
duplicate data values and computations than it is to affect or the details of the interprocessor distribution of data
a complex or irregular routing of data between processor within the processor. In fact, in many cases, the program-
elements. mer is not even concerned with size of the array processor.
In general, the programmer specifies the size and any

Table 5. Typical Array Processors (SIMD)


Year of Memory Processor Number of
Processor introduction model element processors
Burroughs BSP 1979 Shared General purpose 16
Thinking Machine CM-1 1985 Distributed Bit-serial Up to 65,536
Thinking Machine CM-2 1987 Distributed Bit-serial 4,09665,536
MasPar MP-1 1990 Distributed Bit-serial 1,02416,384
12 COMPUTER ARCHITECTURE

specific distribution information for the data and the dependent on. Sequential computations can be efficiently
compiler maps the implied virtual processor array onto compounded and behave as if they were a single opera-
the physical processor elements that are available and tion with a total latency equal to the latency of the first
generates code to perform the required computations. operation with the pipeline and chaining latencies of the
Thus, although the size of the processor is an important remaining operations but none of the startup overhead
factor in determining the performance that the array that would be incurred without chaining. For example,
processor can achieve, it is not a fundamental characteristic division could be synthesized by chaining a reciprocal
of an array processor. with a multiply operation. Chaining typically works for
The primary characteristic of a SIMD processor is the results of load operations as well as normal computa-
whether the memory model is shared or distributed. In tions. Most vector processors implement some form of
this section, only processors using a distributed memory chaining.
model are described as this configuration is used by SIMD A typical vector processor configuration consists of a
processors today and the cost of scaling a shared-memory vector register file, one vector addition unit, one vector
SIMD processor to a large number of processor elements multiplication unit, and one vector reciprocal unit (used
would be prohibitive. Processor elements and network in conjunction with the vector multiplication unit to per-
characteristics are also important in characterizing a form division); the vector register file contains multiple
SIMD processor. vector registers. In addition to the vector registers, there
are also a number of auxiliary and control registers, the
Vector Processors. A vector processor is a single proces- most important of which is the vector length register.
sor that resembles a traditional SISD processor except The vector length register contains the length of the vector
that some of the function units (and registers) operate (or the loaded subvector if the full vector length is longer
on vectorssequences of data values that are seemingly than the vector register itself) and is used to control the
operated on as a single entity. These function units are number of elements processed by vector operations. There
deeply pipelined and have a high clock rate; although the is no reason to perform computations on non-data that
vector pipelines have as long or longer latency than a is useless or could cause an exception.
normal scalar function unit, their high clock rate and the As with the array processor, the programmers reference
rapid delivery of the input vector data elements results in a point for a vector machine is the high-level language. In
significant throughput that cannot be matched by scalar most cases, the programmer sees a traditional SISD
function units. machine; however, as vector machines excel on vectorizable
Early vector processors processed vectors directly from loops, the programmer can often improve the performance
memory. The primary advantage of this approach was of the application by carefully coding the application, in
that the vectors could be of arbitrary lengths and were some cases explicitly writing the code to perform strip-
not limited by processor resources; however, the high start- mining, and by providing hints to the compiler that help
up cost, limited memory system bandwidth, and memory to locate the vectorizable sections of the code. This situation
system contention proved to be significant limitations. is purely an artifact of the fact that the programming
Modern vector processors require that vectors be explicitly languages are scalar oriented and do not support the treat-
loaded into special vector registers and stored back into ment of vectors as an aggregate data type but only as a
memory, the same course that modern scalar processors collection of individual values. As languages are defined
have taken for similar reasons. However, as vector regis- (such as Fortran 90 or High-Performance Fortran) that
ters can rapidly produce values for or collect results from make vectors a fundamental data-type, then the program-
the vector function units and have low startup costs, mod- mer is exposed less to the details of the machine and to its
ern register-based vector processors achieve significantly SIMD nature.
higher performance than the earlier memory-based vector The vector processor has one primary characteristic.
processors for the same implementation technology. This characteristic is the location of the vectors; vectors
Modern processors have several features that enable can be memory-or register-based. There are many fea-
them to achieve high performance. One feature is the ability tures that vector processors have that are not included
to concurrently load and store values between the vector here because of their number and many variations. These
register file and main memory while performing computa- features include variations on chaining, masked vector
tions on values in the vector register file. This feature is operations based on a boolean mask vector, indirectly
important because the limited length of vector registers addressed vector operations (scatter/gather), compressed/
requires that vectors that are longer be processed in expanded vector operations, reconfigurable register files,
segmentsa technique called strip-mining. Not being multiprocessor support, and soon. Vector processors have
able to overlap memory accesses and computations would developed dramatically from simple memory-based vector
pose a significant performance bottleneck. processors to modern multiple-processor vector processors
Just like SISD processors, vector processors support a that exploit both SIMD vector and MIMD style processing.
form of result bypassingin this case called chaining
that allows a follow-on computation to commence as soon MISD Multiple Instruction, Single Data Stream
as the first value is available from the preceding compu-
Although it is easy to both envision and design MISD
tation. Thus, instead of waiting for the entire vector to be
processors, there has been little interest in this type of
processed, the follow-on computation can be significantly
parallel architecture. The reason, so far anyway, is that
overlapped with the preceding computation that it is
COMPUTER ARCHITECTURE 13

there are no ready programming constructs that easily map each processor element is the same, whereas in the MIMD
programs into the MISD organization. processor, the instruction stream delivered to each proces-
Conceptually, MISD architecture can be represented as sor element is independent and specific to each processor
multiple independently executing function units operating element. Recall that in the array processor, the control
on a single stream of data, forwarding results from one processor generates the instruction stream for each pro-
function unit to the next, which, on the microarchitecture cessor element and that the processor elements operate
level, is exactly what the vector processor does. However, in in lock step. In the MIMD processor, the instruction stream
the vector pipeline, the operations are simply fragments of for each processor element is generated independently by
an assembly-level operation, as distinct from being a com- that processor element as it executes its program. Although
plete operation. Surprisingly, some of the earliest attempts it is often the case that each processor element is running
at computers in the 1940s could be seen as the MISD pieces the same program, there is no reason that differ-
concept. They used plug boards for programs, where data ent processor elements should not run different programs.
in the form of a punched card was introduced into the first The interconnection network in both the array proces-
stage of a multistage processor. A sequential series of sor and the MIMD processor passes data between processor
actions was taken where the intermediate results were elements; however, in the MIMD processor, it is also used
forwarded from stage to stage until, at the final stage, a to synchronize the independent execution streams between
result would be punched into a new card. processor elements. When the memory of the processor is
There are, however, more interesting uses of the MISD distributed across all processors and only the local proces-
organization. Nakamura has pointed out the value of an sor element has access to it, all data sharing is performed
MISD machine called the SHIFT machine. In the SHIFT explicitly using messages and all synchronization is
machine, all data memory is decomposed into shift regis- handled within the message system. When the memory
ters. Various function units are associated with each shift of the processor is shared across all processor elements,
column. Data is initially introduced into the first column synchronization is more of a problemcertainly messages
and is shifted across the shift register memory. In the can be used through the memory system to pass data
SHIFT machine concept, data is regularly shifted from and information between processor elements, but it is
memory region to memory region (column to column) for not necessarily the most effective use of the system.
processing by various function units. The purpose behind When communications between processor elements is
the SHIFT machine is to reduce memory latency. In a performed through a shared-memory address space, either
traditional organization, any function unit can access global or distributed between processor elements (called
any region of memory and the worst-case delay path for distributed shared memory to distinguish it from distri-
accessing memory must be taken into account. In the buted memory), there are two significant problems that
SHIFT machine, we must only allow for access time to develop. The first is maintaining memory consistency; the
the worst element in a data column. The memory latency programmer-visible ordering effects of memory references
in modern machines is becoming a major problem the both within a processor element and between different
SHIFT machine has a natural appeal for its ability to processor elements. The second is cache coherency; the
tolerate this latency. programmer-invisible mechanism ensures that all proces-
sor elements see the same value for a given memory loca-
MIMD Multiple Instruction, Multiple Data Stream tion. Neither of these problems is significant in SISD or
SIMD array processors. In a SISD processor, there is only
The MIMD class of parallel architecture brings together
one instruction stream and the amount of reordering is
multiple processors with some form of interconnection. In
limited so the hardware can easily guarantee the effects of
this configuration, each processor executes completely
perfect memory reference ordering and thus there is no
independently, although most applications require some
consistency problem; because a SISD processor has only
form of synchronization during execution to pass informa-
one processor element, cache coherency is not applicable. In
tion and data between processors. Although no require-
a SIMD array processor (assuming distributed memory),
ment exists that all processor elements be identical, most
there is still only one instruction stream and typically no
MIMD configurations are homogeneous with all processor
instruction reordering; because all interprocessor element
elements identical. There have been heterogeneous MIMD
communications is via message, there is neither a consis-
configurations that use different kinds of processor
tency problem nor a coherency problem.
elements to perform different kinds of tasks, but these
The memory consistency problem is usually solved
configurations have not yielded to general-purpose appli-
through a combination of hardware and software techni-
cations. We limit ourselves to homogeneous MIMD orga-
ques. At the processor element level, the appearance of
nizations in the remainder of this section.
perfect memory consistency is usually guaranteed for local
memory references only, which is usually a feature of the
MIMD Programming and Implementation Considerations.
processor element itself. At the MIMD processor level,
Up to this point, the MIMD processor with its multiple
memory consistency is often only guaranteed through
processor elements interconnected by a network appears
explicit synchronization between processors. In this case,
to be very similar to a SIMD array processor. This simi-
all nonlocal references are only ordered relative to these
larity is deceptive because there is a significant difference
synchronization points. Although the programmer must be
between these two configurations of processor elements
aware of the limitations imposed by the ordering scheme,
in the array processor, the instruction stream delivered to
14 COMPUTER ARCHITECTURE

the added performance achieved using nonsequential or program speedup. Ideally, if we have n identical pro-
ordering can be significant. cessors, the failure of one processor should not affect the
The cache coherency problem is usually solved exclu- ability of the multiprocessor to continue program execu-
sively through hardware techniques. This problem is sig- tion. However, this case is not always true. If the operating
nificant because of the possibility that multiple processor system is designated to run on a particular processor and
elements will have copies of data in their local caches, each that processor fails, the system fails. On the other hand,
copy of which can have different values. There are two some multiprocessor ensembles have been built with the
primary techniques to maintain cache coherency. The first sole purpose of high-integrity, fault-tolerant computation.
is to ensure that all processor elements are informed of any Generally, these systems may not provide any program
change to the shared-memory statethese changes are speedup over a single processor. Systems that duplicate
broadcast throughout the MIMD processor and each pro- computations or that triplicate and vote on results are
cessor element monitors these changes (commonly referred examples of designing for fault tolerance.
to as snooping). The second is to keep track of all users of a
memory address or block in a directory structure and to MIMD Speedup: Partitioning and Scheduling. As multi-
specifically inform each user when there is a change made processors simply consist of multiple computing elements,
to the shared-memory state. In either case, the result of a each computing element is subject to the same basic
change can be one of two things, either the new value is design issues. These elements are slowed down by branch
provided and the local value is updated or all other copies of delays, cache misses, and so on. The multiprocessor con-
the value are invalidated. figuration, however, introduces speedup potential as well
As the number of processor elements in a system as additional sources of delay and performance degrada-
increases, a directory-based system becomes significantly tion. The sources of performance bottlenecks in multipro-
better as the amount of communications required to main- cessors generally relate to the way the program was
tain coherency is limited to only those processors holding decomposed to allow concurrent execution on multiple
copies of the data. Snooping is frequently used within a processors. The speedup (Sp) of an MIMD processor ensem-
small cluster of processor elements to track local changes ble is defined as:
here the local interconnection can support the extra
traffic used to maintain coherency because each cluster S p T1=Tn
has only a few processor elements in it.
The primary characteristic of a MIMD processor is the or the execution time of a single processor (T(1)) divided by
nature of the memory address space; it is either separate or the execution time for n processors executing the same
shared for all processor elements. The interconnection application (T(n)). The achievable MIMD speedup depends
network is also important in characterizing a MIMD pro- on the amount of parallelism available in the program
cessor and is described in the next section. With a separate (partitioning) and how well the partitioned tasks are sched-
address space (distributed memory), the only means of uled.
communications between processor elements is through Partitioning is the process of dividing a program into
messages and thus these processors force the programmer tasks, each of which can be assigned to an individual pro-
to use a message-passing paradigm. With a shared address cessor for execution at run time. These tasks can be repre-
space (shared memory), communications between proces- sented as nodes in a control graph. The arcs in the graph
sor elements is through the memory systemdepending on specify the order in which execution of the subtasks must
the application needs or programmer preference, either a occur. The partitioning process occurs at compile time, well
shared memory or message passing paradigm can be used. before program execution. The goal of the partitioning
The implementation of a distributed-memory machine is process is to uncover the maximum amount of parallelism
far easier than the implementation of a shared-memory possible without going beyond certain obvious machine
machine when memory consistency and cache coherency is limitations.
taken into account. However, programming a distributed The program partitioning is usually performed with
memory processor can be much more difficult because the some a priori notion of program overhead. Program over-
applications must be written to exploit and not be limited by head (o) is the added time a task takes to be loaded into a
the use of message passing as the only form of communica- processor before beginning execution. The larger the size of
tions between processor elements. On the other hand, the minimum task defined by the partitioning program,
despite the problems associated with maintaining consis- the smaller the effect of program overhead. Table 6 gives
tency and coherency, programming a shared-memory pro- an instruction count for some various program grain sizes.
cessor can take advantage of whatever communications The essential difference between multiprocessor concur-
paradigm is appropriate for a given communications rency and instruction-level parallelism is the amount of
requirement and can be much easier to program. Both overhead expected to be associated with each task. Over-
distributed-and shared-memory processors can be extre- head affects speedup. If uniprocessor program P1 does
mely scalable and neither approach is significantly more operation W1, then the parallel version of P1 does opera-
difficult to scale than the other. tions Wp, where W p  W1 .
For each task Ti, there is an associated number of over-
MIMD Rationale. MIMD processors usually are head operations oi, so that if Ti takes Wi operations without
designed for at least one of two reasons: fault tolerance
COMPUTER ARCHITECTURE 15

Table 6. Grain Size oftentimes the case that program initiation does not begin
Grain Typical number with n designated idle processors. Rather, it begins with a
Description Program Construct of instructions smaller number as previously executing tasks complete
their work. Thus, the processor availability is difficult to
Fine grain Basic block 5 to 10
predict and may vary from run to run. Although run-time
Instruction-level parallelism
Medium Loop/Procedure 100 to 100,000
scheduling has obvious advantages, handling changing
grain Loop-level parallelism systems environments, as well as highly variable program
Procedure-level parallelism structures, it also has some disadvantages, primarily its
Coarse Large task 100,000 or more run-time overhead.
grain Program-level parallelism Run-time scheduling can be performed in a number
of different ways. The scheduler itself may run on a parti-
cular processor or it may run on any processor. It can
be centralized or distributed. It is desirable that the
overhead, then scheduling not be designated to a particular processor,
but rather any processor, and then the scheduling process
WP SWi oi  W1 itself can be distributed across all available processors.

where Wp is the total work done by Pp, including overhead. Types of MIMD processors. Although all MIMD archi-
To achieve speedup over a uniprocessor, a multiprocessor tectures share the same general programming model, there
system must achieve the maximum degree of parallelism are many differences in programming detail, hardware
among executing subtasks or control nodes. On the other configuration, and speedup potential. Most differences
hand, if we increase the amount of parallelism by using develop from the variety of shared hardware, especially
finer- and finer-grain task sizes, we necessarily increase the way the processors share memory. For example,
the amount of overhead. Moreover, the overhead depends processors may share at one of several levels:
on the following factors.
 Shared internal logic (floating point, decoders, etc.),
 Overhead time is configuration-dependent. Different shared data cache, and shared memory.
shared-memory multiprocessors may have signifi-  Shared data cacheshared memory.
cantly different task overheads associated with
them, depending on cache size, organization, and
 Separate data cache but shared busshared memory.
the way caches are shared.  Separate data cache with separate busses leading to a
 Overhead may be significantly different depending on shared memory.
how tasks are actually assigned (scheduled) at run  Separate processors and separate memory modules
time. A task returning to a processor whose cache interconnected with a multistage interconnection net-
already contains significant pieces of the task code work.
or dataset will have a significantly lower overhead  Separate processor-memory systems cooperatively
than the same task assigned to an unrelated processor. executing applications via a network.

Increased parallelism usually corresponds to finer task The basic tradeoff in selecting a type of multiprocessor
granularity and larger overhead. Clustering is the group- architecture is between resource limitations and syn-
ing together of subtasks into a single assignable task. chronization delay. Simple architectures are generally
Clustering is usually performed both at partitioning time resource-limited and have rather low synchronization
and during scheduling run time. The reasons for clustering communications delay overhead. More robust processor-
during partition time might include when memory configurations may offer adequate resources for
extensive communications among various processors in
 The available parallelism exceeds the known number memory, but these configurations are limited by
of processors that the program is being compiled for.
 The placement of several shorter tasks that share the  delay through the communications network and
same instruction or data working set into a single task  multiple accesses of a single synchronization variable.
provides lower overhead.
The simpler and more limited the multiprocessor con-
Scheduling can be performed statically at compile time figuration, the easier it is to provide synchronization com-
or dynamically at run time. Static scheduling information munications and memory coherency. Each of these
can be derived on the basis of the probable critical paths, functions requires an access to memory. As long as memory
which alone is insufficient to ensure optimum speedup or bandwidth is adequate, these functions can be readily
even fault tolerance. Suppose, for example, one of the handled. As processor speed and the number of processors
processors scheduled statically was unavailable at run increase, eventually shared data caches and busses run out
time, having suffered a failure. If only static scheduling of bandwidth and become the bottleneck in the multipro-
had been done, the program would be unable to execute if cessor system. Replicating caches or busses to provide
assignment to all n processors had been made. It is also additional bandwidth requires management of not only
16 COMPUTER ARCHITECTURE

the original traffic, but the coherency traffic also. From the simpler hardware but is a more complex programming
systems point of view, one would expect to find an optimum model.
level of sharing for each of the shared resourcesdata
cache, bus, memory, and so onfostering a hierarchical Cooperative computing: networked multiprocessors.
view of shared-memory multiprocessing systems. Simple processor-memory systems with LAN of even Inter-
net connection can, for particular problems, be quite effec-
Multithreaded or shared resource multiprocessing. The tive multiprocessors. Such configurations are sometimes
simplest and most primitive type of multiprocessor system called network of workstations (NOW).
is what is sometimes called multithreaded or what we call Table 7 illustrates some of the tradeoffs possible in
here shared-resource multiprocessing (SRMP). In SRMP, configuring multiprocessor systems. Note that the applica-
each of the processors consists of basically only a register tion determines the effectiveness of the system. As archi-
set, which includes a program counter, general registers, tects consider various ways of facilitating interprocessor
instruction counter, and so on. The driving principle behind communication in a shared-memory multiprocessor, they
SRMP is to make the best use of processor silicon area. must be constantly aware of the cost required to improve
The functional units and busses are time-shared. The interprocessor communications. In a typical shared-mem-
objective is to eliminate context-switching overhead and ory multiprocessor, the cost does not scale linearly; each
to reduce the realized effect of branch and cache miss additional processor requires additional network services
penalties. Each processor executes without significant and facilities. Depending on the type of interconnection, the
instruction-level concurrency, so it executes more slowly cost for an additional processor may increase at a greater
than a more typical SISD, which reduces per instruction than linear rate.
effect of processing delays; but the MIMD ensemble can For those applications that require rapid communica-
achieve excellent speedup because of the reduced overhead. tions and have a great deal of

You might also like